3 * Wine server protocol definition
5 * Copyright (C) 2001 Alexandre Julliard
7 * This file is used by tools/make_requests to build the
8 * protocol structures in include/wine/server_protocol.h
10 * This library is free software; you can redistribute it and/or
11 * modify it under the terms of the GNU Lesser General Public
12 * License as published by the Free Software Foundation; either
13 * version 2.1 of the License, or (at your option) any later version.
15 * This library is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 * Lesser General Public License for more details.
20 * You should have received a copy of the GNU Lesser General Public
21 * License along with this library; if not, write to the Free Software
22 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
25 @HEADER /* start of C declarations */
33 int req; /* request code */
34 size_t request_size; /* request variable part size */
35 size_t reply_size; /* reply variable part maximum size */
40 unsigned int error; /* error result */
41 size_t reply_size; /* reply variable part size */
44 /* placeholder structure for the maximum allowed request size */
45 /* this is used to construct the generic_request union */
46 struct request_max_size
48 int pad[16]; /* the max request size is 16 ints */
51 typedef int obj_handle_t;
52 typedef unsigned short atom_t;
53 typedef unsigned int user_handle_t;
54 typedef unsigned int process_id_t;
55 typedef unsigned int thread_id_t;
57 #define FIRST_USER_HANDLE 0x0020 /* first possible value for low word of user handle */
58 #define LAST_USER_HANDLE 0xffef /* last possible value for low word of user handle */
61 /* definitions of the event data depending on the event code */
62 struct debug_event_exception
64 EXCEPTION_RECORD record; /* exception record */
65 int first; /* first chance exception? */
67 struct debug_event_create_thread
69 obj_handle_t handle; /* handle to the new thread */
70 void *teb; /* thread teb (in debugged process address space) */
71 void *start; /* thread startup routine */
73 struct debug_event_create_process
75 obj_handle_t file; /* handle to the process exe file */
76 obj_handle_t process; /* handle to the new process */
77 obj_handle_t thread; /* handle to the new thread */
78 void *base; /* base of executable image */
79 int dbg_offset; /* offset of debug info in file */
80 int dbg_size; /* size of debug info */
81 void *teb; /* thread teb (in debugged process address space) */
82 void *start; /* thread startup routine */
83 void *name; /* image name (optional) */
84 int unicode; /* is it Unicode? */
86 struct debug_event_exit
88 int exit_code; /* thread or process exit code */
90 struct debug_event_load_dll
92 obj_handle_t handle; /* file handle for the dll */
93 void *base; /* base address of the dll */
94 int dbg_offset; /* offset of debug info in file */
95 int dbg_size; /* size of debug info */
96 void *name; /* image name (optional) */
97 int unicode; /* is it Unicode? */
99 struct debug_event_unload_dll
101 void *base; /* base address of the dll */
103 struct debug_event_output_string
105 void *string; /* string to display (in debugged process address space) */
106 int unicode; /* is it Unicode? */
107 int length; /* string length */
109 struct debug_event_rip_info
114 union debug_event_data
116 struct debug_event_exception exception;
117 struct debug_event_create_thread create_thread;
118 struct debug_event_create_process create_process;
119 struct debug_event_exit exit;
120 struct debug_event_load_dll load_dll;
121 struct debug_event_unload_dll unload_dll;
122 struct debug_event_output_string output_string;
123 struct debug_event_rip_info rip_info;
126 /* debug event data */
129 int code; /* event code */
130 union debug_event_data info; /* event information */
133 /* structure used in sending an fd from client to server */
136 thread_id_t tid; /* thread id */
137 int fd; /* file descriptor on client-side */
140 /* structure sent by the server on the wait fifo */
143 void *cookie; /* magic cookie that was passed in select_request */
144 int signaled; /* wait result */
147 /* structure for process startup info */
150 size_t size; /* size of this structure */
151 size_t filename_len; /* length of filename */
152 size_t cmdline_len; /* length of cmd line */
153 size_t desktop_len; /* length of desktop name */
154 size_t title_len; /* length of title */
155 int x; /* window position */
157 int cx; /* window size */
159 int x_chars; /* console size */
161 int attribute; /* console attributes */
162 int cmd_show; /* main window show mode */
163 unsigned int flags; /* info flags */
164 /* char filename[...]; */
165 /* char cmdline[...]; */
166 /* char desktop[...]; */
167 /* char title[...]; */
170 /* structure returned in the list of window properties */
173 atom_t atom; /* property atom */
174 short string; /* was atom a string originally? */
175 obj_handle_t handle; /* handle stored in property */
178 /* structure to specify window rectangles */
187 /* structure for console char/attribute info */
194 /****************************************************************/
195 /* Request declarations */
197 /* Create a new process from the context of the parent */
199 int inherit_all; /* inherit all handles from parent */
200 int use_handles; /* use stdio handles */
201 int create_flags; /* creation flags */
202 obj_handle_t exe_file; /* file handle for main exe */
203 obj_handle_t hstdin; /* handle for stdin */
204 obj_handle_t hstdout; /* handle for stdout */
205 obj_handle_t hstderr; /* handle for stderr */
206 VARARG(info,startup_info); /* startup information */
208 obj_handle_t info; /* new process info handle */
212 /* Retrieve information about a newly started process */
213 @REQ(get_new_process_info)
214 obj_handle_t info; /* info handle returned from new_process_request */
215 int pinherit; /* process handle inherit flag */
216 int tinherit; /* thread handle inherit flag */
218 process_id_t pid; /* process id */
219 obj_handle_t phandle; /* process handle (in the current process) */
220 thread_id_t tid; /* thread id */
221 obj_handle_t thandle; /* thread handle (in the current process) */
222 int success; /* did the process start successfully? */
226 /* Create a new thread from the context of the parent */
228 int suspend; /* new thread should be suspended on creation */
229 int inherit; /* inherit flag */
230 int request_fd; /* fd for request pipe */
232 thread_id_t tid; /* thread id */
233 obj_handle_t handle; /* thread handle (in the current process) */
237 /* Signal that we are finished booting on the client side */
239 int debug_level; /* new debug level */
243 /* Initialize a process; called from the new process context */
245 void* ldt_copy; /* addr of LDT copy */
246 int ppid; /* parent Unix pid */
248 int create_flags; /* creation flags */
249 unsigned int server_start; /* server start time (GetTickCount) */
250 size_t info_size; /* total size of startup info */
251 obj_handle_t exe_file; /* file handle for main exe */
252 obj_handle_t hstdin; /* handle for stdin */
253 obj_handle_t hstdout; /* handle for stdout */
254 obj_handle_t hstderr; /* handle for stderr */
258 /* Retrieve the new process startup info */
259 @REQ(get_startup_info)
261 VARARG(info,startup_info); /* startup information */
265 /* Signal the end of the process initialization */
266 @REQ(init_process_done)
267 void* module; /* main module base address */
268 size_t module_size; /* main module size */
269 void* entry; /* process entry point */
270 void* name; /* ptr to ptr to name (in process addr space) */
271 obj_handle_t exe_file; /* file handle for main exe */
272 int gui; /* is it a GUI process? */
273 VARARG(filename,string); /* file name of main exe */
275 int debugged; /* being debugged? */
279 /* Initialize a thread; called from the child after fork()/clone() */
281 int unix_pid; /* Unix pid of new thread */
282 void* teb; /* TEB of new thread (in thread address space) */
283 void* entry; /* thread entry point (in thread address space) */
284 int reply_fd; /* fd for reply pipe */
285 int wait_fd; /* fd for blocking calls pipe */
287 process_id_t pid; /* process id of the new thread's process */
288 thread_id_t tid; /* thread id of the new thread */
289 int boot; /* is this the boot thread? */
290 int version; /* protocol version */
294 /* Terminate a process */
295 @REQ(terminate_process)
296 obj_handle_t handle; /* process handle to terminate */
297 int exit_code; /* process exit code */
299 int self; /* suicide? */
303 /* Terminate a thread */
304 @REQ(terminate_thread)
305 obj_handle_t handle; /* thread handle to terminate */
306 int exit_code; /* thread exit code */
308 int self; /* suicide? */
309 int last; /* last thread in this process? */
313 /* Retrieve information about a process */
314 @REQ(get_process_info)
315 obj_handle_t handle; /* process handle */
317 process_id_t pid; /* server process id */
318 int debugged; /* debugged? */
319 int exit_code; /* process exit code */
320 int priority; /* priority class */
321 int process_affinity; /* process affinity mask */
322 int system_affinity; /* system affinity mask */
326 /* Set a process informations */
327 @REQ(set_process_info)
328 obj_handle_t handle; /* process handle */
329 int mask; /* setting mask (see below) */
330 int priority; /* priority class */
331 int affinity; /* affinity mask */
333 #define SET_PROCESS_INFO_PRIORITY 0x01
334 #define SET_PROCESS_INFO_AFFINITY 0x02
337 /* Retrieve information about a thread */
338 @REQ(get_thread_info)
339 obj_handle_t handle; /* thread handle */
340 thread_id_t tid_in; /* thread id (optional) */
342 thread_id_t tid; /* server thread id */
343 void* teb; /* thread teb pointer */
344 int exit_code; /* thread exit code */
345 int priority; /* thread priority level */
349 /* Set a thread informations */
350 @REQ(set_thread_info)
351 obj_handle_t handle; /* thread handle */
352 int mask; /* setting mask (see below) */
353 int priority; /* priority class */
354 int affinity; /* affinity mask */
356 #define SET_THREAD_INFO_PRIORITY 0x01
357 #define SET_THREAD_INFO_AFFINITY 0x02
360 /* Suspend a thread */
362 obj_handle_t handle; /* thread handle */
364 int count; /* new suspend count */
368 /* Resume a thread */
370 obj_handle_t handle; /* thread handle */
372 int count; /* new suspend count */
376 /* Notify the server that a dll has been loaded */
378 obj_handle_t handle; /* file handle */
379 void* base; /* base address */
380 size_t size; /* dll size */
381 int dbg_offset; /* debug info offset */
382 int dbg_size; /* debug info size */
383 void* name; /* ptr to ptr to name (in process addr space) */
384 VARARG(filename,string); /* file name of dll */
388 /* Notify the server that a dll is being unloaded */
390 void* base; /* base address */
394 /* Queue an APC for a thread */
396 obj_handle_t handle; /* thread handle */
397 int user; /* user or system apc? */
398 void* func; /* function to call */
399 void* param; /* param for function to call */
403 /* Get next APC to call */
405 int alertable; /* is thread alertable? */
407 void* func; /* function to call */
408 int type; /* function type */
409 VARARG(args,ptrs); /* function arguments */
411 enum apc_type { APC_NONE, APC_USER, APC_TIMER, APC_ASYNC, APC_ASYNC_IO };
414 /* Close a handle for the current process */
416 obj_handle_t handle; /* handle to close */
418 int fd; /* associated fd to close */
422 /* Set a handle information */
423 @REQ(set_handle_info)
424 obj_handle_t handle; /* handle we are interested in */
425 int flags; /* new handle flags */
426 int mask; /* mask for flags to set */
427 int fd; /* file descriptor or -1 */
429 int old_flags; /* old flag value */
430 int cur_fd; /* current file descriptor */
434 /* Duplicate a handle */
436 obj_handle_t src_process; /* src process handle */
437 obj_handle_t src_handle; /* src handle to duplicate */
438 obj_handle_t dst_process; /* dst process handle */
439 unsigned int access; /* wanted access rights */
440 int inherit; /* inherit flag */
441 int options; /* duplicate options (see below) */
443 obj_handle_t handle; /* duplicated handle in dst process */
444 int fd; /* associated fd to close */
446 #define DUP_HANDLE_CLOSE_SOURCE DUPLICATE_CLOSE_SOURCE
447 #define DUP_HANDLE_SAME_ACCESS DUPLICATE_SAME_ACCESS
448 #define DUP_HANDLE_MAKE_GLOBAL 0x80000000 /* Not a Windows flag */
451 /* Open a handle to a process */
453 process_id_t pid; /* process id to open */
454 unsigned int access; /* wanted access rights */
455 int inherit; /* inherit flag */
457 obj_handle_t handle; /* handle to the process */
461 /* Open a handle to a thread */
463 thread_id_t tid; /* thread id to open */
464 unsigned int access; /* wanted access rights */
465 int inherit; /* inherit flag */
467 obj_handle_t handle; /* handle to the thread */
471 /* Wait for handles */
473 int flags; /* wait flags (see below) */
474 void* cookie; /* magic cookie to return to client */
475 int sec; /* absolute timeout */
476 int usec; /* absolute timeout */
477 VARARG(handles,handles); /* handles to select on */
480 #define SELECT_ALERTABLE 2
481 #define SELECT_INTERRUPTIBLE 4
482 #define SELECT_TIMEOUT 8
485 /* Create an event */
487 int manual_reset; /* manual reset event */
488 int initial_state; /* initial state of the event */
489 int inherit; /* inherit flag */
490 VARARG(name,unicode_str); /* object name */
492 obj_handle_t handle; /* handle to the event */
495 /* Event operation */
497 obj_handle_t handle; /* handle to event */
498 int op; /* event operation (see below) */
500 enum event_op { PULSE_EVENT, SET_EVENT, RESET_EVENT };
505 unsigned int access; /* wanted access rights */
506 int inherit; /* inherit flag */
507 VARARG(name,unicode_str); /* object name */
509 obj_handle_t handle; /* handle to the event */
515 int owned; /* initially owned? */
516 int inherit; /* inherit flag */
517 VARARG(name,unicode_str); /* object name */
519 obj_handle_t handle; /* handle to the mutex */
523 /* Release a mutex */
525 obj_handle_t handle; /* handle to the mutex */
531 unsigned int access; /* wanted access rights */
532 int inherit; /* inherit flag */
533 VARARG(name,unicode_str); /* object name */
535 obj_handle_t handle; /* handle to the mutex */
539 /* Create a semaphore */
540 @REQ(create_semaphore)
541 unsigned int initial; /* initial count */
542 unsigned int max; /* maximum count */
543 int inherit; /* inherit flag */
544 VARARG(name,unicode_str); /* object name */
546 obj_handle_t handle; /* handle to the semaphore */
550 /* Release a semaphore */
551 @REQ(release_semaphore)
552 obj_handle_t handle; /* handle to the semaphore */
553 unsigned int count; /* count to add to semaphore */
555 unsigned int prev_count; /* previous semaphore count */
559 /* Open a semaphore */
561 unsigned int access; /* wanted access rights */
562 int inherit; /* inherit flag */
563 VARARG(name,unicode_str); /* object name */
565 obj_handle_t handle; /* handle to the semaphore */
571 unsigned int access; /* wanted access rights */
572 int inherit; /* inherit flag */
573 unsigned int sharing; /* sharing flags */
574 int create; /* file create action */
575 unsigned int attrs; /* file attributes for creation */
576 int drive_type; /* type of drive the file is on */
577 VARARG(filename,string); /* file name */
579 obj_handle_t handle; /* handle to the file */
583 /* Allocate a file handle for a Unix fd */
584 @REQ(alloc_file_handle)
585 unsigned int access; /* wanted access rights */
586 int inherit; /* inherit flag */
587 int fd; /* file descriptor on the client side */
589 obj_handle_t handle; /* handle to the file */
593 /* Get a Unix fd to access a file */
595 obj_handle_t handle; /* handle to the file */
596 unsigned int access; /* wanted access rights */
598 int fd; /* file descriptor */
599 int type; /* the type of file (see below) */
600 int flags; /* file read/write flags (see below) */
610 #define FD_FLAG_OVERLAPPED 0x01
611 #define FD_FLAG_TIMEOUT 0x02
612 #define FD_FLAG_RECV_SHUTDOWN 0x04
613 #define FD_FLAG_SEND_SHUTDOWN 0x08
615 /* Set a file current position */
616 @REQ(set_file_pointer)
617 obj_handle_t handle; /* handle to the file */
618 int low; /* position low word */
619 int high; /* position high word */
620 int whence; /* whence to seek */
622 int new_low; /* new position low word */
623 int new_high; /* new position high word */
627 /* Truncate (or extend) a file */
629 obj_handle_t handle; /* handle to the file */
633 /* Set a file access and modification times */
635 obj_handle_t handle; /* handle to the file */
636 time_t access_time; /* last access time */
637 time_t write_time; /* last write time */
641 /* Flush a file buffers */
643 obj_handle_t handle; /* handle to the file */
647 /* Get information about a file */
649 obj_handle_t handle; /* handle to the file */
651 int type; /* file type */
652 int attr; /* file attributes */
653 time_t access_time; /* last access time */
654 time_t write_time; /* last write time */
655 int size_high; /* file size */
656 int size_low; /* file size */
657 int links; /* number of links */
658 int index_high; /* unique index */
659 int index_low; /* unique index */
660 unsigned int serial; /* volume serial number */
664 /* Lock a region of a file */
666 obj_handle_t handle; /* handle to the file */
667 unsigned int offset_low; /* offset of start of lock */
668 unsigned int offset_high; /* offset of start of lock */
669 unsigned int count_low; /* count of bytes to lock */
670 unsigned int count_high; /* count of bytes to lock */
674 /* Unlock a region of a file */
676 obj_handle_t handle; /* handle to the file */
677 unsigned int offset_low; /* offset of start of unlock */
678 unsigned int offset_high; /* offset of start of unlock */
679 unsigned int count_low; /* count of bytes to unlock */
680 unsigned int count_high; /* count of bytes to unlock */
684 /* Create an anonymous pipe */
686 int inherit; /* inherit flag */
688 obj_handle_t handle_read; /* handle to the read-side of the pipe */
689 obj_handle_t handle_write; /* handle to the write-side of the pipe */
693 /* Create a socket */
695 unsigned int access; /* wanted access rights */
696 int inherit; /* inherit flag */
697 int family; /* family, see socket manpage */
698 int type; /* type, see socket manpage */
699 int protocol; /* protocol, see socket manpage */
700 unsigned int flags; /* socket flags */
702 obj_handle_t handle; /* handle to the new socket */
706 /* Accept a socket */
708 obj_handle_t lhandle; /* handle to the listening socket */
709 unsigned int access; /* wanted access rights */
710 int inherit; /* inherit flag */
712 obj_handle_t handle; /* handle to the new socket */
716 /* Set socket event parameters */
717 @REQ(set_socket_event)
718 obj_handle_t handle; /* handle to the socket */
719 unsigned int mask; /* event mask */
720 obj_handle_t event; /* event object */
721 user_handle_t window; /* window to send the message to */
722 unsigned int msg; /* message to send */
726 /* Get socket event parameters */
727 @REQ(get_socket_event)
728 obj_handle_t handle; /* handle to the socket */
729 int service; /* clear pending? */
730 obj_handle_t c_event; /* event to clear */
732 unsigned int mask; /* event mask */
733 unsigned int pmask; /* pending events */
734 unsigned int state; /* status bits */
735 VARARG(errors,ints); /* event errors */
739 /* Reenable pending socket events */
740 @REQ(enable_socket_event)
741 obj_handle_t handle; /* handle to the socket */
742 unsigned int mask; /* events to re-enable */
743 unsigned int sstate; /* status bits to set */
744 unsigned int cstate; /* status bits to clear */
747 @REQ(set_socket_deferred)
748 obj_handle_t handle; /* handle to the socket */
749 obj_handle_t deferred; /* handle to the socket for which accept() is deferred */
752 /* Allocate a console (only used by a console renderer) */
754 unsigned int access; /* wanted access rights */
755 int inherit; /* inherit flag */
756 process_id_t pid; /* pid of process which shall be attached to the console */
758 obj_handle_t handle_in; /* handle to console input */
759 obj_handle_t event; /* handle to renderer events change notification */
763 /* Free the console of the current process */
768 #define CONSOLE_RENDERER_NONE_EVENT 0x00
769 #define CONSOLE_RENDERER_TITLE_EVENT 0x01
770 #define CONSOLE_RENDERER_ACTIVE_SB_EVENT 0x02
771 #define CONSOLE_RENDERER_SB_RESIZE_EVENT 0x03
772 #define CONSOLE_RENDERER_UPDATE_EVENT 0x04
773 #define CONSOLE_RENDERER_CURSOR_POS_EVENT 0x05
774 #define CONSOLE_RENDERER_CURSOR_GEOM_EVENT 0x06
775 #define CONSOLE_RENDERER_DISPLAY_EVENT 0x07
776 #define CONSOLE_RENDERER_EXIT_EVENT 0x08
777 struct console_renderer_event
812 /* retrieve console events for the renderer */
813 @REQ(get_console_renderer_events)
814 obj_handle_t handle; /* handle to console input events */
816 VARARG(data,bytes); /* the various console_renderer_events */
820 /* Open a handle to the process console */
822 int from; /* 0 (resp 1) input (resp output) of current process console */
823 /* otherwise console_in handle to get active screen buffer? */
824 unsigned int access; /* wanted access rights */
825 int inherit; /* inherit flag */
826 int share; /* share mask (only for output handles) */
828 obj_handle_t handle; /* handle to the console */
832 /* Get a console mode (input or output) */
833 @REQ(get_console_mode)
834 obj_handle_t handle; /* handle to the console */
836 int mode; /* console mode */
840 /* Set a console mode (input or output) */
841 @REQ(set_console_mode)
842 obj_handle_t handle; /* handle to the console */
843 int mode; /* console mode */
847 /* Set info about a console (input only) */
848 @REQ(set_console_input_info)
849 obj_handle_t handle; /* handle to console input, or 0 for process' console */
850 int mask; /* setting mask (see below) */
851 obj_handle_t active_sb; /* active screen buffer */
852 int history_mode; /* whether we duplicate lines in history */
853 int history_size; /* number of lines in history */
854 VARARG(title,unicode_str); /* console title */
856 #define SET_CONSOLE_INPUT_INFO_ACTIVE_SB 0x01
857 #define SET_CONSOLE_INPUT_INFO_TITLE 0x02
858 #define SET_CONSOLE_INPUT_INFO_HISTORY_MODE 0x04
859 #define SET_CONSOLE_INPUT_INFO_HISTORY_SIZE 0x08
862 /* Get info about a console (input only) */
863 @REQ(get_console_input_info)
864 obj_handle_t handle; /* handle to console input, or 0 for process' console */
866 int history_mode; /* whether we duplicate lines in history */
867 int history_size; /* number of lines in history */
868 int history_index; /* number of used lines in history */
869 VARARG(title,unicode_str); /* console title */
873 /* appends a string to console's history */
874 @REQ(append_console_input_history)
875 obj_handle_t handle; /* handle to console input, or 0 for process' console */
876 VARARG(line,unicode_str); /* line to add */
880 /* appends a string to console's history */
881 @REQ(get_console_input_history)
882 obj_handle_t handle; /* handle to console input, or 0 for process' console */
883 int index; /* index to get line from */
885 int total; /* total length of line in Unicode chars */
886 VARARG(line,unicode_str); /* line to add */
890 /* creates a new screen buffer on process' console */
891 @REQ(create_console_output)
892 obj_handle_t handle_in; /* handle to console input, or 0 for process' console */
893 int access; /* wanted access rights */
894 int share; /* sharing credentials */
895 int inherit; /* inherit flag */
897 obj_handle_t handle_out; /* handle to the screen buffer */
901 /* Set info about a console (output only) */
902 @REQ(set_console_output_info)
903 obj_handle_t handle; /* handle to the console */
904 int mask; /* setting mask (see below) */
905 short int cursor_size; /* size of cursor (percentage filled) */
906 short int cursor_visible;/* cursor visibility flag */
907 short int cursor_x; /* position of cursor (x, y) */
909 short int width; /* width of the screen buffer */
910 short int height; /* height of the screen buffer */
911 short int attr; /* default attribute */
912 short int win_left; /* window actually displayed by renderer */
913 short int win_top; /* the rect area is expressed withing the */
914 short int win_right; /* boundaries of the screen buffer */
915 short int win_bottom;
916 short int max_width; /* maximum size (width x height) for the window */
917 short int max_height;
919 #define SET_CONSOLE_OUTPUT_INFO_CURSOR_GEOM 0x01
920 #define SET_CONSOLE_OUTPUT_INFO_CURSOR_POS 0x02
921 #define SET_CONSOLE_OUTPUT_INFO_SIZE 0x04
922 #define SET_CONSOLE_OUTPUT_INFO_ATTR 0x08
923 #define SET_CONSOLE_OUTPUT_INFO_DISPLAY_WINDOW 0x10
924 #define SET_CONSOLE_OUTPUT_INFO_MAX_SIZE 0x20
927 /* Get info about a console (output only) */
928 @REQ(get_console_output_info)
929 obj_handle_t handle; /* handle to the console */
931 short int cursor_size; /* size of cursor (percentage filled) */
932 short int cursor_visible;/* cursor visibility flag */
933 short int cursor_x; /* position of cursor (x, y) */
935 short int width; /* width of the screen buffer */
936 short int height; /* height of the screen buffer */
937 short int attr; /* default attribute */
938 short int win_left; /* window actually displayed by renderer */
939 short int win_top; /* the rect area is expressed withing the */
940 short int win_right; /* boundaries of the screen buffer */
941 short int win_bottom;
942 short int max_width; /* maximum size (width x height) for the window */
943 short int max_height;
946 /* Add input records to a console input queue */
947 @REQ(write_console_input)
948 obj_handle_t handle; /* handle to the console input */
949 VARARG(rec,input_records); /* input records */
951 int written; /* number of records written */
955 /* Fetch input records from a console input queue */
956 @REQ(read_console_input)
957 obj_handle_t handle; /* handle to the console input */
958 int flush; /* flush the retrieved records from the queue? */
960 int read; /* number of records read */
961 VARARG(rec,input_records); /* input records */
965 /* write data (chars and/or attributes) in a screen buffer */
966 @REQ(write_console_output)
967 obj_handle_t handle; /* handle to the console output */
968 int x; /* position where to start writing */
970 int mode; /* char info (see below) */
971 int wrap; /* wrap around at end of line? */
972 VARARG(data,bytes); /* info to write */
974 int written; /* number of char infos actually written */
975 int width; /* width of screen buffer */
976 int height; /* height of screen buffer */
980 CHAR_INFO_MODE_TEXT, /* characters only */
981 CHAR_INFO_MODE_ATTR, /* attributes only */
982 CHAR_INFO_MODE_TEXTATTR, /* both characters and attributes */
983 CHAR_INFO_MODE_TEXTSTDATTR /* characters but use standard attributes */
987 /* fill a screen buffer with constant data (chars and/or attributes) */
988 @REQ(fill_console_output)
989 obj_handle_t handle; /* handle to the console output */
990 int x; /* position where to start writing */
992 int mode; /* char info mode */
993 int count; /* number to write */
994 int wrap; /* wrap around at end of line? */
995 char_info_t data; /* data to write */
997 int written; /* number of char infos actually written */
1001 /* read data (chars and/or attributes) from a screen buffer */
1002 @REQ(read_console_output)
1003 obj_handle_t handle; /* handle to the console output */
1004 int x; /* position (x,y) where to start reading */
1006 int mode; /* char info mode */
1007 int wrap; /* wrap around at end of line? */
1009 int width; /* width of screen buffer */
1010 int height; /* height of screen buffer */
1015 /* move a rect (of data) in screen buffer content */
1016 @REQ(move_console_output)
1017 obj_handle_t handle; /* handle to the console output */
1018 short int x_src; /* position (x, y) of rect to start moving from */
1020 short int x_dst; /* position (x, y) of rect to move to */
1022 short int w; /* size of the rect (width, height) to move */
1027 /* Sends a signal to a process group */
1028 @REQ(send_console_signal)
1029 int signal; /* the signal to send */
1030 process_id_t group_id; /* the group to send the signal to */
1034 /* Create a change notification */
1035 @REQ(create_change_notification)
1036 int subtree; /* watch all the subtree */
1037 int filter; /* notification filter */
1039 obj_handle_t handle; /* handle to the change notification */
1043 /* Create a file mapping */
1044 @REQ(create_mapping)
1045 int size_high; /* mapping size */
1046 int size_low; /* mapping size */
1047 int protect; /* protection flags (see below) */
1048 unsigned int access; /* wanted access rights */
1049 int inherit; /* inherit flag */
1050 obj_handle_t file_handle; /* file handle */
1051 VARARG(name,unicode_str); /* object name */
1053 obj_handle_t handle; /* handle to the mapping */
1055 /* protection flags */
1056 #define VPROT_READ 0x01
1057 #define VPROT_WRITE 0x02
1058 #define VPROT_EXEC 0x04
1059 #define VPROT_WRITECOPY 0x08
1060 #define VPROT_GUARD 0x10
1061 #define VPROT_NOCACHE 0x20
1062 #define VPROT_COMMITTED 0x40
1063 #define VPROT_IMAGE 0x80
1066 /* Open a mapping */
1068 unsigned int access; /* wanted access rights */
1069 int inherit; /* inherit flag */
1070 VARARG(name,unicode_str); /* object name */
1072 obj_handle_t handle; /* handle to the mapping */
1076 /* Get information about a file mapping */
1077 @REQ(get_mapping_info)
1078 obj_handle_t handle; /* handle to the mapping */
1080 int size_high; /* mapping size */
1081 int size_low; /* mapping size */
1082 int protect; /* protection flags */
1083 int header_size; /* header size (for VPROT_IMAGE mapping) */
1084 void* base; /* default base addr (for VPROT_IMAGE mapping) */
1085 obj_handle_t shared_file; /* shared mapping file handle */
1086 int shared_size; /* shared mapping size */
1087 int drive_type; /* type of drive the file is on */
1091 /* Create a device */
1093 unsigned int access; /* wanted access rights */
1094 int inherit; /* inherit flag */
1095 int id; /* client private id */
1097 obj_handle_t handle; /* handle to the device */
1101 /* Create a snapshot */
1102 @REQ(create_snapshot)
1103 int inherit; /* inherit flag */
1104 int flags; /* snapshot flags (TH32CS_*) */
1105 process_id_t pid; /* process id */
1107 obj_handle_t handle; /* handle to the snapshot */
1111 /* Get the next process from a snapshot */
1113 obj_handle_t handle; /* handle to the snapshot */
1114 int reset; /* reset snapshot position? */
1116 int count; /* process usage count */
1117 process_id_t pid; /* process id */
1118 process_id_t ppid; /* parent process id */
1119 void* heap; /* heap base */
1120 void* module; /* main module */
1121 int threads; /* number of threads */
1122 int priority; /* process priority */
1123 VARARG(filename,string); /* file name of main exe */
1127 /* Get the next thread from a snapshot */
1129 obj_handle_t handle; /* handle to the snapshot */
1130 int reset; /* reset snapshot position? */
1132 int count; /* thread usage count */
1133 process_id_t pid; /* process id */
1134 thread_id_t tid; /* thread id */
1135 int base_pri; /* base priority */
1136 int delta_pri; /* delta priority */
1140 /* Get the next module from a snapshot */
1142 obj_handle_t handle; /* handle to the snapshot */
1143 int reset; /* reset snapshot position? */
1145 process_id_t pid; /* process id */
1146 void* base; /* module base address */
1147 size_t size; /* module size */
1148 VARARG(filename,string); /* file name of module */
1152 /* Wait for a debug event */
1153 @REQ(wait_debug_event)
1154 int get_handle; /* should we alloc a handle for waiting? */
1156 process_id_t pid; /* process id */
1157 thread_id_t tid; /* thread id */
1158 obj_handle_t wait; /* wait handle if no event ready */
1159 VARARG(event,debug_event); /* debug event data */
1163 /* Queue an exception event */
1164 @REQ(queue_exception_event)
1165 int first; /* first chance exception? */
1166 VARARG(record,exc_event); /* thread context followed by exception record */
1168 obj_handle_t handle; /* handle to the queued event */
1172 /* Retrieve the status of an exception event */
1173 @REQ(get_exception_status)
1174 obj_handle_t handle; /* handle to the queued event */
1176 int status; /* event continuation status */
1177 VARARG(context,context); /* modified thread context */
1181 /* Send an output string to the debugger */
1182 @REQ(output_debug_string)
1183 void* string; /* string to display (in debugged process address space) */
1184 int unicode; /* is it Unicode? */
1185 int length; /* string length */
1189 /* Continue a debug event */
1190 @REQ(continue_debug_event)
1191 process_id_t pid; /* process id to continue */
1192 thread_id_t tid; /* thread id to continue */
1193 int status; /* continuation status */
1197 /* Start/stop debugging an existing process */
1199 process_id_t pid; /* id of the process to debug */
1200 int attach; /* 1=attaching / 0=detaching from the process */
1204 /* Simulate a breakpoint in a process */
1206 obj_handle_t handle; /* process handle */
1208 int self; /* was it the caller itself? */
1212 /* Set debugger kill on exit flag */
1213 @REQ(set_debugger_kill_on_exit)
1214 int kill_on_exit; /* 0=detach/1=kill debuggee when debugger dies */
1218 /* Read data from a process address space */
1219 @REQ(read_process_memory)
1220 obj_handle_t handle; /* process handle */
1221 void* addr; /* addr to read from */
1223 VARARG(data,bytes); /* result data */
1227 /* Write data to a process address space */
1228 @REQ(write_process_memory)
1229 obj_handle_t handle; /* process handle */
1230 void* addr; /* addr to write to (must be int-aligned) */
1231 unsigned int first_mask; /* mask for first word */
1232 unsigned int last_mask; /* mask for last word */
1233 VARARG(data,bytes); /* data to write */
1237 /* Create a registry key */
1239 obj_handle_t parent; /* handle to the parent key */
1240 unsigned int access; /* desired access rights */
1241 unsigned int options; /* creation options */
1242 time_t modif; /* last modification time */
1243 size_t namelen; /* length of key name in bytes */
1244 VARARG(name,unicode_str,namelen); /* key name */
1245 VARARG(class,unicode_str); /* class name */
1247 obj_handle_t hkey; /* handle to the created key */
1248 int created; /* has it been newly created? */
1251 /* Open a registry key */
1253 obj_handle_t parent; /* handle to the parent key */
1254 unsigned int access; /* desired access rights */
1255 VARARG(name,unicode_str); /* key name */
1257 obj_handle_t hkey; /* handle to the open key */
1261 /* Delete a registry key */
1263 obj_handle_t hkey; /* handle to the key */
1267 /* Enumerate registry subkeys */
1269 obj_handle_t hkey; /* handle to registry key */
1270 int index; /* index of subkey (or -1 for current key) */
1271 int info_class; /* requested information class */
1273 int subkeys; /* number of subkeys */
1274 int max_subkey; /* longest subkey name */
1275 int max_class; /* longest class name */
1276 int values; /* number of values */
1277 int max_value; /* longest value name */
1278 int max_data; /* longest value data */
1279 time_t modif; /* last modification time */
1280 size_t total; /* total length needed for full name and class */
1281 size_t namelen; /* length of key name in bytes */
1282 VARARG(name,unicode_str,namelen); /* key name */
1283 VARARG(class,unicode_str); /* class name */
1287 /* Set a value of a registry key */
1289 obj_handle_t hkey; /* handle to registry key */
1290 int type; /* value type */
1291 size_t namelen; /* length of value name in bytes */
1292 VARARG(name,unicode_str,namelen); /* value name */
1293 VARARG(data,bytes); /* value data */
1297 /* Retrieve the value of a registry key */
1299 obj_handle_t hkey; /* handle to registry key */
1300 VARARG(name,unicode_str); /* value name */
1302 int type; /* value type */
1303 size_t total; /* total length needed for data */
1304 VARARG(data,bytes); /* value data */
1308 /* Enumerate a value of a registry key */
1309 @REQ(enum_key_value)
1310 obj_handle_t hkey; /* handle to registry key */
1311 int index; /* value index */
1312 int info_class; /* requested information class */
1314 int type; /* value type */
1315 size_t total; /* total length needed for full name and data */
1316 size_t namelen; /* length of value name in bytes */
1317 VARARG(name,unicode_str,namelen); /* value name */
1318 VARARG(data,bytes); /* value data */
1322 /* Delete a value of a registry key */
1323 @REQ(delete_key_value)
1324 obj_handle_t hkey; /* handle to registry key */
1325 VARARG(name,unicode_str); /* value name */
1329 /* Load a registry branch from a file */
1331 obj_handle_t hkey; /* root key to load to */
1332 obj_handle_t file; /* file to load from */
1333 VARARG(name,unicode_str); /* subkey name */
1337 /* Save a registry branch to a file */
1339 obj_handle_t hkey; /* key to save */
1340 obj_handle_t file; /* file to save to */
1344 /* Save a registry branch at server exit */
1345 @REQ(save_registry_atexit)
1346 obj_handle_t hkey; /* key to save */
1347 VARARG(file,string); /* file to save to */
1351 /* Set the current and saving level for the registry */
1352 @REQ(set_registry_levels)
1353 int current; /* new current level */
1354 int saving; /* new saving level */
1355 int period; /* duration between periodic saves (milliseconds) */
1359 /* Create a waitable timer */
1361 int inherit; /* inherit flag */
1362 int manual; /* manual reset */
1363 VARARG(name,unicode_str); /* object name */
1365 obj_handle_t handle; /* handle to the timer */
1369 /* Open a waitable timer */
1371 unsigned int access; /* wanted access rights */
1372 int inherit; /* inherit flag */
1373 VARARG(name,unicode_str); /* object name */
1375 obj_handle_t handle; /* handle to the timer */
1378 /* Set a waitable timer */
1380 obj_handle_t handle; /* handle to the timer */
1381 int sec; /* next expiration absolute time */
1382 int usec; /* next expiration absolute time */
1383 int period; /* timer period in ms */
1384 void* callback; /* callback function */
1385 void* arg; /* callback argument */
1388 /* Cancel a waitable timer */
1390 obj_handle_t handle; /* handle to the timer */
1394 /* Retrieve the current context of a thread */
1395 @REQ(get_thread_context)
1396 obj_handle_t handle; /* thread handle */
1397 unsigned int flags; /* context flags */
1399 VARARG(context,context); /* thread context */
1403 /* Set the current context of a thread */
1404 @REQ(set_thread_context)
1405 obj_handle_t handle; /* thread handle */
1406 unsigned int flags; /* context flags */
1407 VARARG(context,context); /* thread context */
1411 /* Fetch a selector entry for a thread */
1412 @REQ(get_selector_entry)
1413 obj_handle_t handle; /* thread handle */
1414 int entry; /* LDT entry */
1416 unsigned int base; /* selector base */
1417 unsigned int limit; /* selector limit */
1418 unsigned char flags; /* selector flags */
1424 int local; /* is atom in local process table? */
1425 VARARG(name,unicode_str); /* atom name */
1427 atom_t atom; /* resulting atom */
1431 /* Delete an atom */
1433 atom_t atom; /* atom handle */
1434 int local; /* is atom in local process table? */
1440 int local; /* is atom in local process table? */
1441 VARARG(name,unicode_str); /* atom name */
1443 atom_t atom; /* atom handle */
1447 /* Get an atom name */
1449 atom_t atom; /* atom handle */
1450 int local; /* is atom in local process table? */
1452 int count; /* atom lock count */
1453 VARARG(name,unicode_str); /* atom name */
1457 /* Init the process atom table */
1458 @REQ(init_atom_table)
1459 int entries; /* number of entries */
1463 /* Get the message queue of the current thread */
1466 obj_handle_t handle; /* handle to the queue */
1470 /* Set the current message queue wakeup mask */
1471 @REQ(set_queue_mask)
1472 unsigned int wake_mask; /* wakeup bits mask */
1473 unsigned int changed_mask; /* changed bits mask */
1474 int skip_wait; /* will we skip waiting if signaled? */
1476 unsigned int wake_bits; /* current wake bits */
1477 unsigned int changed_bits; /* current changed bits */
1481 /* Get the current message queue status */
1482 @REQ(get_queue_status)
1483 int clear; /* should we clear the change bits? */
1485 unsigned int wake_bits; /* wake bits */
1486 unsigned int changed_bits; /* changed bits since last time */
1490 /* Wait for a process to start waiting on input */
1491 @REQ(wait_input_idle)
1492 obj_handle_t handle; /* process handle */
1493 int timeout; /* timeout */
1495 obj_handle_t event; /* handle to idle event */
1499 /* Send a message to a thread queue */
1501 thread_id_t id; /* thread id */
1502 int type; /* message type (see below) */
1503 user_handle_t win; /* window handle */
1504 unsigned int msg; /* message code */
1505 unsigned int wparam; /* parameters */
1506 unsigned int lparam; /* parameters */
1507 int x; /* x position */
1508 int y; /* y position */
1509 unsigned int time; /* message time */
1510 unsigned int info; /* extra info */
1511 int timeout; /* timeout for reply */
1512 VARARG(data,bytes); /* message data for sent messages */
1517 MSG_ASCII, /* Ascii message (from SendMessageA) */
1518 MSG_UNICODE, /* Unicode message (from SendMessageW) */
1519 MSG_NOTIFY, /* notify message (from SendNotifyMessageW), always Unicode */
1520 MSG_CALLBACK, /* callback message (from SendMessageCallbackW), always Unicode */
1521 MSG_OTHER_PROCESS, /* sent from other process, may include vararg data, always Unicode */
1522 MSG_POSTED, /* posted message (from PostMessageW), always Unicode */
1523 MSG_HARDWARE_RAW, /* raw hardware message */
1524 MSG_HARDWARE_COOKED /* cooked hardware message */
1528 /* Get a message from the current queue */
1530 int flags; /* see below */
1531 user_handle_t get_win; /* window handle to get */
1532 unsigned int get_first; /* first message code to get */
1533 unsigned int get_last; /* last message code to get */
1535 int type; /* message type */
1536 user_handle_t win; /* window handle */
1537 unsigned int msg; /* message code */
1538 unsigned int wparam; /* parameters */
1539 unsigned int lparam; /* parameters */
1540 int x; /* x position */
1541 int y; /* y position */
1542 unsigned int time; /* message time */
1543 unsigned int info; /* extra info */
1544 size_t total; /* total size of extra data */
1545 VARARG(data,bytes); /* message data for sent messages */
1547 #define GET_MSG_REMOVE 1 /* remove the message */
1548 #define GET_MSG_SENT_ONLY 2 /* only get sent messages */
1549 #define GET_MSG_REMOVE_LAST 4 /* remove last message returned before checking for a new one */
1551 /* Reply to a sent message */
1553 unsigned int result; /* message result */
1554 int remove; /* should we remove the message? */
1555 VARARG(data,bytes); /* message data for sent messages */
1559 /* Retrieve the reply for the last message sent */
1560 @REQ(get_message_reply)
1561 int cancel; /* cancel message if not ready? */
1563 unsigned int result; /* message result */
1564 VARARG(data,bytes); /* message data for sent messages */
1568 /* Set a window timer */
1570 user_handle_t win; /* window handle */
1571 unsigned int msg; /* message to post */
1572 unsigned int id; /* timer id */
1573 unsigned int rate; /* timer rate in ms */
1574 unsigned int lparam; /* message lparam (callback proc) */
1578 /* Kill a window timer */
1579 @REQ(kill_win_timer)
1580 user_handle_t win; /* window handle */
1581 unsigned int msg; /* message to post */
1582 unsigned int id; /* timer id */
1586 /* Open a serial port */
1588 unsigned int access; /* wanted access rights */
1589 int inherit; /* inherit flag */
1590 unsigned int attributes; /* eg. FILE_FLAG_OVERLAPPED */
1591 unsigned int sharing; /* sharing flags */
1592 VARARG(name,string); /* file name */
1594 obj_handle_t handle; /* handle to the port */
1598 /* Retrieve info about a serial port */
1599 @REQ(get_serial_info)
1600 obj_handle_t handle; /* handle to comm port */
1602 unsigned int readinterval;
1603 unsigned int readconst;
1604 unsigned int readmult;
1605 unsigned int writeconst;
1606 unsigned int writemult;
1607 unsigned int eventmask;
1608 unsigned int commerror;
1612 /* Set info about a serial port */
1613 @REQ(set_serial_info)
1614 obj_handle_t handle; /* handle to comm port */
1615 int flags; /* bitmask to set values (see below) */
1616 unsigned int readinterval;
1617 unsigned int readconst;
1618 unsigned int readmult;
1619 unsigned int writeconst;
1620 unsigned int writemult;
1621 unsigned int eventmask;
1622 unsigned int commerror;
1624 #define SERIALINFO_SET_TIMEOUTS 0x01
1625 #define SERIALINFO_SET_MASK 0x02
1626 #define SERIALINFO_SET_ERROR 0x04
1629 /* Create / reschedule an async I/O */
1630 @REQ(register_async)
1631 obj_handle_t handle; /* handle to comm port, socket or file */
1635 unsigned int status;
1637 #define ASYNC_TYPE_NONE 0x00
1638 #define ASYNC_TYPE_READ 0x01
1639 #define ASYNC_TYPE_WRITE 0x02
1640 #define ASYNC_TYPE_WAIT 0x03
1643 /* Create a named pipe */
1644 @REQ(create_named_pipe)
1645 unsigned int openmode;
1646 unsigned int pipemode;
1647 unsigned int maxinstances;
1648 unsigned int outsize;
1649 unsigned int insize;
1650 unsigned int timeout;
1651 VARARG(name,unicode_str); /* pipe name */
1653 obj_handle_t handle; /* handle to the pipe */
1657 /* Open an existing named pipe */
1658 @REQ(open_named_pipe)
1659 unsigned int access;
1660 VARARG(name,unicode_str); /* pipe name */
1662 obj_handle_t handle; /* handle to the pipe */
1666 /* Connect to a named pipe */
1667 @REQ(connect_named_pipe)
1668 obj_handle_t handle;
1674 /* Wait for a named pipe */
1675 @REQ(wait_named_pipe)
1676 unsigned int timeout;
1679 VARARG(name,unicode_str); /* pipe name */
1683 /* Disconnect a named pipe */
1684 @REQ(disconnect_named_pipe)
1685 obj_handle_t handle;
1689 @REQ(get_named_pipe_info)
1690 obj_handle_t handle;
1693 unsigned int maxinstances;
1694 unsigned int outsize;
1695 unsigned int insize;
1701 unsigned int tree_id;
1702 unsigned int user_id;
1703 unsigned int file_id;
1704 unsigned int dialect;
1706 obj_handle_t handle;
1711 obj_handle_t handle;
1713 unsigned int offset;
1715 unsigned int tree_id;
1716 unsigned int user_id;
1717 unsigned int dialect;
1718 unsigned int file_id;
1719 unsigned int offset;
1721 #define SMBINFO_SET_OFFSET 0x01
1724 /* Create a window */
1726 user_handle_t parent; /* parent window */
1727 user_handle_t owner; /* owner window */
1728 atom_t atom; /* class atom */
1730 user_handle_t handle; /* created window */
1734 /* Link a window into the tree */
1736 user_handle_t handle; /* handle to the window */
1737 user_handle_t parent; /* handle to the parent */
1738 user_handle_t previous; /* previous child in Z-order */
1740 user_handle_t full_parent; /* full handle of new parent */
1744 /* Destroy a window */
1745 @REQ(destroy_window)
1746 user_handle_t handle; /* handle to the window */
1750 /* Set a window owner */
1751 @REQ(set_window_owner)
1752 user_handle_t handle; /* handle to the window */
1753 user_handle_t owner; /* new owner */
1755 user_handle_t full_owner; /* full handle of new owner */
1756 user_handle_t prev_owner; /* full handle of previous owner */
1760 /* Get information from a window handle */
1761 @REQ(get_window_info)
1762 user_handle_t handle; /* handle to the window */
1764 user_handle_t full_handle; /* full 32-bit handle */
1765 user_handle_t last_active; /* last active popup */
1766 process_id_t pid; /* process owning the window */
1767 thread_id_t tid; /* thread owning the window */
1768 atom_t atom; /* class atom */
1772 /* Set some information in a window */
1773 @REQ(set_window_info)
1774 user_handle_t handle; /* handle to the window */
1775 unsigned int flags; /* flags for fields to set (see below) */
1776 unsigned int style; /* window style */
1777 unsigned int ex_style; /* window extended style */
1778 unsigned int id; /* window id */
1779 void* instance; /* creator instance */
1780 void* user_data; /* user-specific data */
1782 unsigned int old_style; /* old window style */
1783 unsigned int old_ex_style; /* old window extended style */
1784 unsigned int old_id; /* old window id */
1785 void* old_instance; /* old creator instance */
1786 void* old_user_data; /* old user-specific data */
1788 #define SET_WIN_STYLE 0x01
1789 #define SET_WIN_EXSTYLE 0x02
1790 #define SET_WIN_ID 0x04
1791 #define SET_WIN_INSTANCE 0x08
1792 #define SET_WIN_USERDATA 0x10
1795 /* Get a list of the window parents, up to the root of the tree */
1796 @REQ(get_window_parents)
1797 user_handle_t handle; /* handle to the window */
1799 int count; /* total count of parents */
1800 VARARG(parents,user_handles); /* parent handles */
1804 /* Get a list of the window children */
1805 @REQ(get_window_children)
1806 user_handle_t parent; /* parent window */
1807 atom_t atom; /* class atom for the listed children */
1808 thread_id_t tid; /* thread owning the listed children */
1810 int count; /* total count of children */
1811 VARARG(children,user_handles); /* children handles */
1815 /* Get window tree information from a window handle */
1816 @REQ(get_window_tree)
1817 user_handle_t handle; /* handle to the window */
1819 user_handle_t parent; /* parent window */
1820 user_handle_t owner; /* owner window */
1821 user_handle_t next_sibling; /* next sibling in Z-order */
1822 user_handle_t prev_sibling; /* prev sibling in Z-order */
1823 user_handle_t first_sibling; /* first sibling in Z-order */
1824 user_handle_t last_sibling; /* last sibling in Z-order */
1825 user_handle_t first_child; /* first child */
1826 user_handle_t last_child; /* last child */
1829 /* Set the window and client rectangles of a window */
1830 @REQ(set_window_rectangles)
1831 user_handle_t handle; /* handle to the window */
1832 rectangle_t window; /* window rectangle */
1833 rectangle_t client; /* client rectangle */
1837 /* Get the window and client rectangles of a window */
1838 @REQ(get_window_rectangles)
1839 user_handle_t handle; /* handle to the window */
1841 rectangle_t window; /* window rectangle */
1842 rectangle_t client; /* client rectangle */
1846 /* Get the window text */
1847 @REQ(get_window_text)
1848 user_handle_t handle; /* handle to the window */
1850 VARARG(text,unicode_str); /* window text */
1854 /* Set the window text */
1855 @REQ(set_window_text)
1856 user_handle_t handle; /* handle to the window */
1857 VARARG(text,unicode_str); /* window text */
1861 /* Increment the window paint count */
1862 @REQ(inc_window_paint_count)
1863 user_handle_t handle; /* handle to the window */
1864 int incr; /* increment (can be negative) */
1868 /* Get the coordinates offset between two windows */
1869 @REQ(get_windows_offset)
1870 user_handle_t from; /* handle to the first window */
1871 user_handle_t to; /* handle to the second window */
1873 int x; /* x coordinate offset */
1874 int y; /* y coordinate offset */
1878 /* Set a window property */
1879 @REQ(set_window_property)
1880 user_handle_t window; /* handle to the window */
1881 atom_t atom; /* property atom (high-word set if it was a string) */
1882 int string; /* was atom a string originally? */
1883 obj_handle_t handle; /* handle to store */
1887 /* Remove a window property */
1888 @REQ(remove_window_property)
1889 user_handle_t window; /* handle to the window */
1890 atom_t atom; /* property atom */
1892 obj_handle_t handle; /* handle stored in property */
1896 /* Get a window property */
1897 @REQ(get_window_property)
1898 user_handle_t window; /* handle to the window */
1899 atom_t atom; /* property atom */
1901 obj_handle_t handle; /* handle stored in property */
1905 /* Get the list of properties of a window */
1906 @REQ(get_window_properties)
1907 user_handle_t window; /* handle to the window */
1909 int total; /* total number of properties */
1910 VARARG(props,properties); /* list of properties */
1914 /* Attach (or detach) thread inputs */
1915 @REQ(attach_thread_input)
1916 thread_id_t tid_from; /* thread to be attached */
1917 thread_id_t tid_to; /* thread to which tid_from should be attached */
1918 int attach; /* is it an attach? */
1922 /* Get input data for a given thread */
1923 @REQ(get_thread_input)
1924 thread_id_t tid; /* id of thread */
1926 user_handle_t focus; /* handle to the focus window */
1927 user_handle_t capture; /* handle to the capture window */
1928 user_handle_t active; /* handle to the active window */
1929 user_handle_t foreground; /* handle to the global foreground window */
1930 user_handle_t menu_owner; /* handle to the menu owner */
1931 user_handle_t move_size; /* handle to the moving/resizing window */
1932 user_handle_t caret; /* handle to the caret window */
1933 rectangle_t rect; /* caret rectangle */
1936 /* Set the system foreground window */
1937 @REQ(set_foreground_window)
1938 user_handle_t handle; /* handle to the foreground window */
1940 user_handle_t previous; /* handle to the previous foreground window */
1941 int send_msg_old; /* whether we have to send a msg to the old window */
1942 int send_msg_new; /* whether we have to send a msg to the new window */
1945 /* Set the current thread focus window */
1946 @REQ(set_focus_window)
1947 user_handle_t handle; /* handle to the focus window */
1949 user_handle_t previous; /* handle to the previous focus window */
1952 /* Set the current thread active window */
1953 @REQ(set_active_window)
1954 user_handle_t handle; /* handle to the active window */
1956 user_handle_t previous; /* handle to the previous active window */
1959 /* Set the current thread capture window */
1960 @REQ(set_capture_window)
1961 user_handle_t handle; /* handle to the capture window */
1962 unsigned int flags; /* capture flags (see below) */
1964 user_handle_t previous; /* handle to the previous capture window */
1965 user_handle_t full_handle; /* full 32-bit handle of new capture window */
1967 #define CAPTURE_MENU 0x01 /* capture is for a menu */
1968 #define CAPTURE_MOVESIZE 0x02 /* capture is for moving/resizing */