Alexandre Julliard | 1a66d22 | 2001-08-28 18:44:52 +0000 | [diff] [blame] | 1 | /* |
| 2 | * Wine server USER definitions |
| 3 | * |
| 4 | * Copyright (C) 2001 Alexandre Julliard |
Alexandre Julliard | 0799c1a | 2002-03-09 23:29:33 +0000 | [diff] [blame] | 5 | * |
| 6 | * This library is free software; you can redistribute it and/or |
| 7 | * modify it under the terms of the GNU Lesser General Public |
| 8 | * License as published by the Free Software Foundation; either |
| 9 | * version 2.1 of the License, or (at your option) any later version. |
| 10 | * |
| 11 | * This library is distributed in the hope that it will be useful, |
| 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 14 | * Lesser General Public License for more details. |
| 15 | * |
| 16 | * You should have received a copy of the GNU Lesser General Public |
| 17 | * License along with this library; if not, write to the Free Software |
| 18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
Alexandre Julliard | 1a66d22 | 2001-08-28 18:44:52 +0000 | [diff] [blame] | 19 | */ |
| 20 | |
| 21 | #ifndef __WINE_SERVER_USER_H |
| 22 | #define __WINE_SERVER_USER_H |
| 23 | |
| 24 | #include "wine/server_protocol.h" |
| 25 | |
| 26 | struct thread; |
| 27 | struct window; |
Alexandre Julliard | 805bdc5 | 2001-11-13 22:23:48 +0000 | [diff] [blame] | 28 | struct msg_queue; |
Alexandre Julliard | 1a66d22 | 2001-08-28 18:44:52 +0000 | [diff] [blame] | 29 | |
| 30 | enum user_object |
| 31 | { |
Alexandre Julliard | 0286135 | 2002-10-29 00:41:42 +0000 | [diff] [blame] | 32 | USER_WINDOW = 1, |
| 33 | USER_HOOK |
Alexandre Julliard | 1a66d22 | 2001-08-28 18:44:52 +0000 | [diff] [blame] | 34 | }; |
| 35 | |
| 36 | /* user handles functions */ |
| 37 | |
| 38 | extern user_handle_t alloc_user_handle( void *ptr, enum user_object type ); |
| 39 | extern void *get_user_object( user_handle_t handle, enum user_object type ); |
| 40 | extern void *get_user_object_handle( user_handle_t *handle, enum user_object type ); |
Alexandre Julliard | bc878ef | 2001-09-12 17:09:24 +0000 | [diff] [blame] | 41 | extern user_handle_t get_user_full_handle( user_handle_t handle ); |
Alexandre Julliard | 1a66d22 | 2001-08-28 18:44:52 +0000 | [diff] [blame] | 42 | extern void *free_user_handle( user_handle_t handle ); |
| 43 | extern void *next_user_handle( user_handle_t *handle, enum user_object type ); |
| 44 | |
Alexandre Julliard | 14e68ba | 2002-11-20 19:54:32 +0000 | [diff] [blame] | 45 | /* hook functions */ |
| 46 | |
| 47 | extern void close_global_hooks(void); |
| 48 | |
Alexandre Julliard | 1a66d22 | 2001-08-28 18:44:52 +0000 | [diff] [blame] | 49 | /* queue functions */ |
| 50 | |
Alexandre Julliard | 31022d6 | 2002-08-16 23:30:41 +0000 | [diff] [blame] | 51 | extern void free_msg_queue( struct thread *thread ); |
Alexandre Julliard | 805bdc5 | 2001-11-13 22:23:48 +0000 | [diff] [blame] | 52 | extern void inc_queue_paint_count( struct thread *thread, int incr ); |
Alexandre Julliard | 1a66d22 | 2001-08-28 18:44:52 +0000 | [diff] [blame] | 53 | extern void queue_cleanup_window( struct thread *thread, user_handle_t win ); |
Alexandre Julliard | ab5063b | 2002-10-11 18:50:15 +0000 | [diff] [blame] | 54 | extern int attach_thread_input( struct thread *thread_from, struct thread *thread_to ); |
Alexandre Julliard | 81f2a73 | 2002-03-23 20:43:52 +0000 | [diff] [blame] | 55 | extern void post_message( user_handle_t win, unsigned int message, |
| 56 | unsigned int wparam, unsigned int lparam ); |
Alexandre Julliard | 1a66d22 | 2001-08-28 18:44:52 +0000 | [diff] [blame] | 57 | |
| 58 | /* window functions */ |
| 59 | |
| 60 | extern void destroy_thread_windows( struct thread *thread ); |
Alexandre Julliard | a09da0c | 2001-09-21 21:08:40 +0000 | [diff] [blame] | 61 | extern int is_child_window( user_handle_t parent, user_handle_t child ); |
Alexandre Julliard | 5030bda | 2002-10-11 23:41:06 +0000 | [diff] [blame] | 62 | extern int is_top_level_window( user_handle_t window ); |
| 63 | extern int make_window_active( user_handle_t window ); |
Alexandre Julliard | 81f2a73 | 2002-03-23 20:43:52 +0000 | [diff] [blame] | 64 | extern struct thread *get_window_thread( user_handle_t handle ); |
Alexandre Julliard | 242e395 | 2003-01-08 00:27:58 +0000 | [diff] [blame] | 65 | extern user_handle_t window_from_point( int x, int y ); |
Alexandre Julliard | 47f9821 | 2001-11-14 21:28:36 +0000 | [diff] [blame] | 66 | extern user_handle_t find_window_to_repaint( user_handle_t parent, struct thread *thread ); |
Alexandre Julliard | 1a66d22 | 2001-08-28 18:44:52 +0000 | [diff] [blame] | 67 | |
| 68 | #endif /* __WINE_SERVER_USER_H */ |