blob: 24c18d5a8d43776251565422e9ead6c2acf48eb3 [file] [log] [blame]
Alexandre Julliard1a66d222001-08-28 18:44:52 +00001/*
2 * Wine server USER definitions
3 *
4 * Copyright (C) 2001 Alexandre Julliard
Alexandre Julliard0799c1a2002-03-09 23:29:33 +00005 *
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 Julliard1a66d222001-08-28 18:44:52 +000019 */
20
21#ifndef __WINE_SERVER_USER_H
22#define __WINE_SERVER_USER_H
23
24#include "wine/server_protocol.h"
25
26struct thread;
27struct window;
Alexandre Julliard805bdc52001-11-13 22:23:48 +000028struct msg_queue;
Alexandre Julliard1a66d222001-08-28 18:44:52 +000029
30enum user_object
31{
Alexandre Julliard02861352002-10-29 00:41:42 +000032 USER_WINDOW = 1,
33 USER_HOOK
Alexandre Julliard1a66d222001-08-28 18:44:52 +000034};
35
36/* user handles functions */
37
38extern user_handle_t alloc_user_handle( void *ptr, enum user_object type );
39extern void *get_user_object( user_handle_t handle, enum user_object type );
40extern void *get_user_object_handle( user_handle_t *handle, enum user_object type );
Alexandre Julliardbc878ef2001-09-12 17:09:24 +000041extern user_handle_t get_user_full_handle( user_handle_t handle );
Alexandre Julliard1a66d222001-08-28 18:44:52 +000042extern void *free_user_handle( user_handle_t handle );
43extern void *next_user_handle( user_handle_t *handle, enum user_object type );
44
Alexandre Julliard14e68ba2002-11-20 19:54:32 +000045/* hook functions */
46
47extern void close_global_hooks(void);
48
Alexandre Julliard1a66d222001-08-28 18:44:52 +000049/* queue functions */
50
Alexandre Julliard31022d62002-08-16 23:30:41 +000051extern void free_msg_queue( struct thread *thread );
Alexandre Julliard805bdc52001-11-13 22:23:48 +000052extern void inc_queue_paint_count( struct thread *thread, int incr );
Alexandre Julliard1a66d222001-08-28 18:44:52 +000053extern void queue_cleanup_window( struct thread *thread, user_handle_t win );
Alexandre Julliardab5063b2002-10-11 18:50:15 +000054extern int attach_thread_input( struct thread *thread_from, struct thread *thread_to );
Alexandre Julliard81f2a732002-03-23 20:43:52 +000055extern void post_message( user_handle_t win, unsigned int message,
56 unsigned int wparam, unsigned int lparam );
Alexandre Julliard1a66d222001-08-28 18:44:52 +000057
58/* window functions */
59
60extern void destroy_thread_windows( struct thread *thread );
Alexandre Julliarda09da0c2001-09-21 21:08:40 +000061extern int is_child_window( user_handle_t parent, user_handle_t child );
Alexandre Julliard5030bda2002-10-11 23:41:06 +000062extern int is_top_level_window( user_handle_t window );
63extern int make_window_active( user_handle_t window );
Alexandre Julliard81f2a732002-03-23 20:43:52 +000064extern struct thread *get_window_thread( user_handle_t handle );
Alexandre Julliard242e3952003-01-08 00:27:58 +000065extern user_handle_t window_from_point( int x, int y );
Alexandre Julliard47f98212001-11-14 21:28:36 +000066extern user_handle_t find_window_to_repaint( user_handle_t parent, struct thread *thread );
Alexandre Julliard1a66d222001-08-28 18:44:52 +000067
68#endif /* __WINE_SERVER_USER_H */