2001-08-28 11:44:52 -07:00
|
|
|
/*
|
|
|
|
* Wine server USER definitions
|
|
|
|
*
|
|
|
|
* Copyright (C) 2001 Alexandre Julliard
|
2002-03-09 16:29:33 -07:00
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2.1 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
* License along with this library; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
2001-08-28 11:44:52 -07:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __WINE_SERVER_USER_H
|
|
|
|
#define __WINE_SERVER_USER_H
|
|
|
|
|
|
|
|
#include "wine/server_protocol.h"
|
|
|
|
|
|
|
|
struct thread;
|
2004-06-23 13:44:58 -07:00
|
|
|
struct region;
|
2001-08-28 11:44:52 -07:00
|
|
|
struct window;
|
2001-11-13 15:23:48 -07:00
|
|
|
struct msg_queue;
|
2003-07-03 11:16:48 -07:00
|
|
|
struct hook_table;
|
2003-12-09 21:08:06 -07:00
|
|
|
struct window_class;
|
2001-08-28 11:44:52 -07:00
|
|
|
|
|
|
|
enum user_object
|
|
|
|
{
|
2002-10-28 17:41:42 -07:00
|
|
|
USER_WINDOW = 1,
|
|
|
|
USER_HOOK
|
2001-08-28 11:44:52 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
/* user handles functions */
|
|
|
|
|
|
|
|
extern user_handle_t alloc_user_handle( void *ptr, enum user_object type );
|
|
|
|
extern void *get_user_object( user_handle_t handle, enum user_object type );
|
|
|
|
extern void *get_user_object_handle( user_handle_t *handle, enum user_object type );
|
2001-09-12 10:09:24 -07:00
|
|
|
extern user_handle_t get_user_full_handle( user_handle_t handle );
|
2001-08-28 11:44:52 -07:00
|
|
|
extern void *free_user_handle( user_handle_t handle );
|
|
|
|
extern void *next_user_handle( user_handle_t *handle, enum user_object type );
|
|
|
|
|
2003-06-23 16:02:02 -07:00
|
|
|
/* clipboard functions */
|
|
|
|
|
|
|
|
extern void cleanup_clipboard_thread( struct thread *thread );
|
|
|
|
|
2002-11-20 12:54:32 -07:00
|
|
|
/* hook functions */
|
|
|
|
|
|
|
|
extern void close_global_hooks(void);
|
2003-07-11 14:55:58 -07:00
|
|
|
extern void remove_thread_hooks( struct thread *thread );
|
2002-11-20 12:54:32 -07:00
|
|
|
|
2001-08-28 11:44:52 -07:00
|
|
|
/* queue functions */
|
|
|
|
|
2002-08-16 16:30:41 -07:00
|
|
|
extern void free_msg_queue( struct thread *thread );
|
2003-07-03 11:16:48 -07:00
|
|
|
extern struct hook_table *get_queue_hooks( struct thread *thread );
|
|
|
|
extern void set_queue_hooks( struct thread *thread, struct hook_table *hooks );
|
2001-11-13 15:23:48 -07:00
|
|
|
extern void inc_queue_paint_count( struct thread *thread, int incr );
|
2001-08-28 11:44:52 -07:00
|
|
|
extern void queue_cleanup_window( struct thread *thread, user_handle_t win );
|
2002-10-11 11:50:15 -07:00
|
|
|
extern int attach_thread_input( struct thread *thread_from, struct thread *thread_to );
|
2002-03-23 13:43:52 -07:00
|
|
|
extern void post_message( user_handle_t win, unsigned int message,
|
|
|
|
unsigned int wparam, unsigned int lparam );
|
2005-02-03 09:40:20 -07:00
|
|
|
extern void post_win_event( struct thread *thread, unsigned int event,
|
|
|
|
user_handle_t win, unsigned int object_id,
|
|
|
|
unsigned int child_id, void *proc,
|
|
|
|
const WCHAR *module, size_t module_size,
|
|
|
|
user_handle_t handle );
|
2001-08-28 11:44:52 -07:00
|
|
|
|
2004-06-23 13:44:58 -07:00
|
|
|
/* region functions */
|
|
|
|
|
2005-02-22 12:42:35 -07:00
|
|
|
extern struct region *create_empty_region(void);
|
2004-06-28 20:53:25 -07:00
|
|
|
extern struct region *create_region_from_req_data( const void *data, size_t size );
|
2004-06-23 13:44:58 -07:00
|
|
|
extern void free_region( struct region *region );
|
|
|
|
extern void set_region_rect( struct region *region, const rectangle_t *rect );
|
2004-09-17 11:20:11 -07:00
|
|
|
extern rectangle_t *get_region_data( const struct region *region, size_t max_size,
|
|
|
|
size_t *total_size );
|
|
|
|
extern rectangle_t *get_region_data_and_free( struct region *region, size_t max_size,
|
|
|
|
size_t *total_size );
|
2004-06-23 13:44:58 -07:00
|
|
|
extern int is_region_empty( const struct region *region );
|
|
|
|
extern void get_region_extents( const struct region *region, rectangle_t *rect );
|
|
|
|
extern void offset_region( struct region *region, int x, int y );
|
|
|
|
extern struct region *copy_region( struct region *dst, const struct region *src );
|
|
|
|
extern struct region *intersect_region( struct region *dst, const struct region *src1,
|
|
|
|
const struct region *src2 );
|
|
|
|
extern struct region *subtract_region( struct region *dst, const struct region *src1,
|
|
|
|
const struct region *src2 );
|
|
|
|
extern struct region *union_region( struct region *dst, const struct region *src1,
|
|
|
|
const struct region *src2 );
|
2004-09-07 18:34:22 -07:00
|
|
|
extern struct region *xor_region( struct region *dst, const struct region *src1,
|
|
|
|
const struct region *src2 );
|
2004-07-20 15:17:38 -07:00
|
|
|
extern int point_in_region( struct region *region, int x, int y );
|
2004-09-01 15:49:14 -07:00
|
|
|
extern int rect_in_region( struct region *region, const rectangle_t *rect );
|
2004-06-23 13:44:58 -07:00
|
|
|
|
2001-08-28 11:44:52 -07:00
|
|
|
/* window functions */
|
|
|
|
|
|
|
|
extern void destroy_thread_windows( struct thread *thread );
|
2001-09-21 14:08:40 -07:00
|
|
|
extern int is_child_window( user_handle_t parent, user_handle_t child );
|
2002-10-11 16:41:06 -07:00
|
|
|
extern int is_top_level_window( user_handle_t window );
|
2004-10-27 14:54:41 -07:00
|
|
|
extern int is_window_visible( user_handle_t window );
|
2002-10-11 16:41:06 -07:00
|
|
|
extern int make_window_active( user_handle_t window );
|
2002-03-23 13:43:52 -07:00
|
|
|
extern struct thread *get_window_thread( user_handle_t handle );
|
2003-01-07 17:27:58 -07:00
|
|
|
extern user_handle_t window_from_point( int x, int y );
|
2001-11-14 14:28:36 -07:00
|
|
|
extern user_handle_t find_window_to_repaint( user_handle_t parent, struct thread *thread );
|
2003-12-09 21:08:06 -07:00
|
|
|
extern struct window_class *get_window_class( user_handle_t window );
|
|
|
|
|
|
|
|
/* window class functions */
|
|
|
|
|
|
|
|
extern void destroy_process_classes( struct process *process );
|
2003-12-10 22:34:53 -07:00
|
|
|
extern struct window_class *grab_class( struct process *process, atom_t atom,
|
|
|
|
void *instance, int *extra_bytes );
|
2003-12-09 21:08:06 -07:00
|
|
|
extern void release_class( struct window_class *class );
|
|
|
|
extern atom_t get_class_atom( struct window_class *class );
|
2003-12-10 22:34:53 -07:00
|
|
|
extern void *get_class_client_ptr( struct window_class *class );
|
2001-08-28 11:44:52 -07:00
|
|
|
|
|
|
|
#endif /* __WINE_SERVER_USER_H */
|