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 void *obj_handle_t;
52 typedef void *user_handle_t;
53 typedef unsigned short atom_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 */
346 time_t creation_time; /* thread creation time */
347 time_t exit_time; /* thread exit time */
351 /* Set a thread informations */
352 @REQ(set_thread_info)
353 obj_handle_t handle; /* thread handle */
354 int mask; /* setting mask (see below) */
355 int priority; /* priority class */
356 int affinity; /* affinity mask */
358 #define SET_THREAD_INFO_PRIORITY 0x01
359 #define SET_THREAD_INFO_AFFINITY 0x02
362 /* Suspend a thread */
364 obj_handle_t handle; /* thread handle */
366 int count; /* new suspend count */
370 /* Resume a thread */
372 obj_handle_t handle; /* thread handle */
374 int count; /* new suspend count */
378 /* Notify the server that a dll has been loaded */
380 obj_handle_t handle; /* file handle */
381 void* base; /* base address */
382 size_t size; /* dll size */
383 int dbg_offset; /* debug info offset */
384 int dbg_size; /* debug info size */
385 void* name; /* ptr to ptr to name (in process addr space) */
386 VARARG(filename,string); /* file name of dll */
390 /* Notify the server that a dll is being unloaded */
392 void* base; /* base address */
396 /* Queue an APC for a thread */
398 obj_handle_t handle; /* thread handle */
399 int user; /* user or system apc? */
400 void* func; /* function to call */
401 void* param; /* param for function to call */
405 /* Get next APC to call */
407 int alertable; /* is thread alertable? */
409 void* func; /* function to call */
410 int type; /* function type */
411 VARARG(args,ptrs); /* function arguments */
413 enum apc_type { APC_NONE, APC_USER, APC_TIMER, APC_ASYNC, APC_ASYNC_IO };
416 /* Close a handle for the current process */
418 obj_handle_t handle; /* handle to close */
420 int fd; /* associated fd to close */
424 /* Set a handle information */
425 @REQ(set_handle_info)
426 obj_handle_t handle; /* handle we are interested in */
427 int flags; /* new handle flags */
428 int mask; /* mask for flags to set */
429 int fd; /* file descriptor or -1 */
431 int old_flags; /* old flag value */
432 int cur_fd; /* current file descriptor */
436 /* Duplicate a handle */
438 obj_handle_t src_process; /* src process handle */
439 obj_handle_t src_handle; /* src handle to duplicate */
440 obj_handle_t dst_process; /* dst process handle */
441 unsigned int access; /* wanted access rights */
442 int inherit; /* inherit flag */
443 int options; /* duplicate options (see below) */
445 obj_handle_t handle; /* duplicated handle in dst process */
446 int fd; /* associated fd to close */
448 #define DUP_HANDLE_CLOSE_SOURCE DUPLICATE_CLOSE_SOURCE
449 #define DUP_HANDLE_SAME_ACCESS DUPLICATE_SAME_ACCESS
450 #define DUP_HANDLE_MAKE_GLOBAL 0x80000000 /* Not a Windows flag */
453 /* Open a handle to a process */
455 process_id_t pid; /* process id to open */
456 unsigned int access; /* wanted access rights */
457 int inherit; /* inherit flag */
459 obj_handle_t handle; /* handle to the process */
463 /* Open a handle to a thread */
465 thread_id_t tid; /* thread id to open */
466 unsigned int access; /* wanted access rights */
467 int inherit; /* inherit flag */
469 obj_handle_t handle; /* handle to the thread */
473 /* Wait for handles */
475 int flags; /* wait flags (see below) */
476 void* cookie; /* magic cookie to return to client */
477 int sec; /* absolute timeout */
478 int usec; /* absolute timeout */
479 VARARG(handles,handles); /* handles to select on */
482 #define SELECT_ALERTABLE 2
483 #define SELECT_INTERRUPTIBLE 4
484 #define SELECT_TIMEOUT 8
487 /* Create an event */
489 int manual_reset; /* manual reset event */
490 int initial_state; /* initial state of the event */
491 int inherit; /* inherit flag */
492 VARARG(name,unicode_str); /* object name */
494 obj_handle_t handle; /* handle to the event */
497 /* Event operation */
499 obj_handle_t handle; /* handle to event */
500 int op; /* event operation (see below) */
502 enum event_op { PULSE_EVENT, SET_EVENT, RESET_EVENT };
507 unsigned int access; /* wanted access rights */
508 int inherit; /* inherit flag */
509 VARARG(name,unicode_str); /* object name */
511 obj_handle_t handle; /* handle to the event */
517 int owned; /* initially owned? */
518 int inherit; /* inherit flag */
519 VARARG(name,unicode_str); /* object name */
521 obj_handle_t handle; /* handle to the mutex */
525 /* Release a mutex */
527 obj_handle_t handle; /* handle to the mutex */
533 unsigned int access; /* wanted access rights */
534 int inherit; /* inherit flag */
535 VARARG(name,unicode_str); /* object name */
537 obj_handle_t handle; /* handle to the mutex */
541 /* Create a semaphore */
542 @REQ(create_semaphore)
543 unsigned int initial; /* initial count */
544 unsigned int max; /* maximum count */
545 int inherit; /* inherit flag */
546 VARARG(name,unicode_str); /* object name */
548 obj_handle_t handle; /* handle to the semaphore */
552 /* Release a semaphore */
553 @REQ(release_semaphore)
554 obj_handle_t handle; /* handle to the semaphore */
555 unsigned int count; /* count to add to semaphore */
557 unsigned int prev_count; /* previous semaphore count */
561 /* Open a semaphore */
563 unsigned int access; /* wanted access rights */
564 int inherit; /* inherit flag */
565 VARARG(name,unicode_str); /* object name */
567 obj_handle_t handle; /* handle to the semaphore */
573 unsigned int access; /* wanted access rights */
574 int inherit; /* inherit flag */
575 unsigned int sharing; /* sharing flags */
576 int create; /* file create action */
577 unsigned int attrs; /* file attributes for creation */
578 int drive_type; /* type of drive the file is on */
579 VARARG(filename,string); /* file name */
581 obj_handle_t handle; /* handle to the file */
585 /* Allocate a file handle for a Unix fd */
586 @REQ(alloc_file_handle)
587 unsigned int access; /* wanted access rights */
588 int inherit; /* inherit flag */
589 int fd; /* file descriptor on the client side */
591 obj_handle_t handle; /* handle to the file */
595 /* Get a Unix fd to access a file */
597 obj_handle_t handle; /* handle to the file */
598 unsigned int access; /* wanted access rights */
600 int fd; /* file descriptor */
601 int type; /* the type of file (see below) */
602 int flags; /* file read/write flags (see below) */
612 #define FD_FLAG_OVERLAPPED 0x01
613 #define FD_FLAG_TIMEOUT 0x02
614 #define FD_FLAG_RECV_SHUTDOWN 0x04
615 #define FD_FLAG_SEND_SHUTDOWN 0x08
617 /* Set a file current position */
618 @REQ(set_file_pointer)
619 obj_handle_t handle; /* handle to the file */
620 int low; /* position low word */
621 int high; /* position high word */
622 int whence; /* whence to seek */
624 int new_low; /* new position low word */
625 int new_high; /* new position high word */
629 /* Truncate (or extend) a file */
631 obj_handle_t handle; /* handle to the file */
635 /* Set a file access and modification times */
637 obj_handle_t handle; /* handle to the file */
638 time_t access_time; /* last access time */
639 time_t write_time; /* last write time */
643 /* Flush a file buffers */
645 obj_handle_t handle; /* handle to the file */
649 /* Get information about a file */
651 obj_handle_t handle; /* handle to the file */
653 int type; /* file type */
654 int attr; /* file attributes */
655 time_t access_time; /* last access time */
656 time_t write_time; /* last write time */
657 int size_high; /* file size */
658 int size_low; /* file size */
659 int links; /* number of links */
660 int index_high; /* unique index */
661 int index_low; /* unique index */
662 unsigned int serial; /* volume serial number */
666 /* Lock a region of a file */
668 obj_handle_t handle; /* handle to the file */
669 unsigned int offset_low; /* offset of start of lock */
670 unsigned int offset_high; /* offset of start of lock */
671 unsigned int count_low; /* count of bytes to lock */
672 unsigned int count_high; /* count of bytes to lock */
676 /* Unlock a region of a file */
678 obj_handle_t handle; /* handle to the file */
679 unsigned int offset_low; /* offset of start of unlock */
680 unsigned int offset_high; /* offset of start of unlock */
681 unsigned int count_low; /* count of bytes to unlock */
682 unsigned int count_high; /* count of bytes to unlock */
686 /* Create an anonymous pipe */
688 int inherit; /* inherit flag */
690 obj_handle_t handle_read; /* handle to the read-side of the pipe */
691 obj_handle_t handle_write; /* handle to the write-side of the pipe */
695 /* Create a socket */
697 unsigned int access; /* wanted access rights */
698 int inherit; /* inherit flag */
699 int family; /* family, see socket manpage */
700 int type; /* type, see socket manpage */
701 int protocol; /* protocol, see socket manpage */
702 unsigned int flags; /* socket flags */
704 obj_handle_t handle; /* handle to the new socket */
708 /* Accept a socket */
710 obj_handle_t lhandle; /* handle to the listening socket */
711 unsigned int access; /* wanted access rights */
712 int inherit; /* inherit flag */
714 obj_handle_t handle; /* handle to the new socket */
718 /* Set socket event parameters */
719 @REQ(set_socket_event)
720 obj_handle_t handle; /* handle to the socket */
721 unsigned int mask; /* event mask */
722 obj_handle_t event; /* event object */
723 user_handle_t window; /* window to send the message to */
724 unsigned int msg; /* message to send */
728 /* Get socket event parameters */
729 @REQ(get_socket_event)
730 obj_handle_t handle; /* handle to the socket */
731 int service; /* clear pending? */
732 obj_handle_t c_event; /* event to clear */
734 unsigned int mask; /* event mask */
735 unsigned int pmask; /* pending events */
736 unsigned int state; /* status bits */
737 VARARG(errors,ints); /* event errors */
741 /* Reenable pending socket events */
742 @REQ(enable_socket_event)
743 obj_handle_t handle; /* handle to the socket */
744 unsigned int mask; /* events to re-enable */
745 unsigned int sstate; /* status bits to set */
746 unsigned int cstate; /* status bits to clear */
749 @REQ(set_socket_deferred)
750 obj_handle_t handle; /* handle to the socket */
751 obj_handle_t deferred; /* handle to the socket for which accept() is deferred */
754 /* Allocate a console (only used by a console renderer) */
756 unsigned int access; /* wanted access rights */
757 int inherit; /* inherit flag */
758 process_id_t pid; /* pid of process which shall be attached to the console */
760 obj_handle_t handle_in; /* handle to console input */
761 obj_handle_t event; /* handle to renderer events change notification */
765 /* Free the console of the current process */
770 #define CONSOLE_RENDERER_NONE_EVENT 0x00
771 #define CONSOLE_RENDERER_TITLE_EVENT 0x01
772 #define CONSOLE_RENDERER_ACTIVE_SB_EVENT 0x02
773 #define CONSOLE_RENDERER_SB_RESIZE_EVENT 0x03
774 #define CONSOLE_RENDERER_UPDATE_EVENT 0x04
775 #define CONSOLE_RENDERER_CURSOR_POS_EVENT 0x05
776 #define CONSOLE_RENDERER_CURSOR_GEOM_EVENT 0x06
777 #define CONSOLE_RENDERER_DISPLAY_EVENT 0x07
778 #define CONSOLE_RENDERER_EXIT_EVENT 0x08
779 struct console_renderer_event
814 /* retrieve console events for the renderer */
815 @REQ(get_console_renderer_events)
816 obj_handle_t handle; /* handle to console input events */
818 VARARG(data,bytes); /* the various console_renderer_events */
822 /* Open a handle to the process console */
824 int from; /* 0 (resp 1) input (resp output) of current process console */
825 /* otherwise console_in handle to get active screen buffer? */
826 unsigned int access; /* wanted access rights */
827 int inherit; /* inherit flag */
828 int share; /* share mask (only for output handles) */
830 obj_handle_t handle; /* handle to the console */
834 /* Get a console mode (input or output) */
835 @REQ(get_console_mode)
836 obj_handle_t handle; /* handle to the console */
838 int mode; /* console mode */
842 /* Set a console mode (input or output) */
843 @REQ(set_console_mode)
844 obj_handle_t handle; /* handle to the console */
845 int mode; /* console mode */
849 /* Set info about a console (input only) */
850 @REQ(set_console_input_info)
851 obj_handle_t handle; /* handle to console input, or 0 for process' console */
852 int mask; /* setting mask (see below) */
853 obj_handle_t active_sb; /* active screen buffer */
854 int history_mode; /* whether we duplicate lines in history */
855 int history_size; /* number of lines in history */
856 VARARG(title,unicode_str); /* console title */
858 #define SET_CONSOLE_INPUT_INFO_ACTIVE_SB 0x01
859 #define SET_CONSOLE_INPUT_INFO_TITLE 0x02
860 #define SET_CONSOLE_INPUT_INFO_HISTORY_MODE 0x04
861 #define SET_CONSOLE_INPUT_INFO_HISTORY_SIZE 0x08
864 /* Get info about a console (input only) */
865 @REQ(get_console_input_info)
866 obj_handle_t handle; /* handle to console input, or 0 for process' console */
868 int history_mode; /* whether we duplicate lines in history */
869 int history_size; /* number of lines in history */
870 int history_index; /* number of used lines in history */
871 VARARG(title,unicode_str); /* console title */
875 /* appends a string to console's history */
876 @REQ(append_console_input_history)
877 obj_handle_t handle; /* handle to console input, or 0 for process' console */
878 VARARG(line,unicode_str); /* line to add */
882 /* appends a string to console's history */
883 @REQ(get_console_input_history)
884 obj_handle_t handle; /* handle to console input, or 0 for process' console */
885 int index; /* index to get line from */
887 int total; /* total length of line in Unicode chars */
888 VARARG(line,unicode_str); /* line to add */
892 /* creates a new screen buffer on process' console */
893 @REQ(create_console_output)
894 obj_handle_t handle_in; /* handle to console input, or 0 for process' console */
895 int access; /* wanted access rights */
896 int share; /* sharing credentials */
897 int inherit; /* inherit flag */
899 obj_handle_t handle_out; /* handle to the screen buffer */
903 /* Set info about a console (output only) */
904 @REQ(set_console_output_info)
905 obj_handle_t handle; /* handle to the console */
906 int mask; /* setting mask (see below) */
907 short int cursor_size; /* size of cursor (percentage filled) */
908 short int cursor_visible;/* cursor visibility flag */
909 short int cursor_x; /* position of cursor (x, y) */
911 short int width; /* width of the screen buffer */
912 short int height; /* height of the screen buffer */
913 short int attr; /* default attribute */
914 short int win_left; /* window actually displayed by renderer */
915 short int win_top; /* the rect area is expressed withing the */
916 short int win_right; /* boundaries of the screen buffer */
917 short int win_bottom;
918 short int max_width; /* maximum size (width x height) for the window */
919 short int max_height;
921 #define SET_CONSOLE_OUTPUT_INFO_CURSOR_GEOM 0x01
922 #define SET_CONSOLE_OUTPUT_INFO_CURSOR_POS 0x02
923 #define SET_CONSOLE_OUTPUT_INFO_SIZE 0x04
924 #define SET_CONSOLE_OUTPUT_INFO_ATTR 0x08
925 #define SET_CONSOLE_OUTPUT_INFO_DISPLAY_WINDOW 0x10
926 #define SET_CONSOLE_OUTPUT_INFO_MAX_SIZE 0x20
929 /* Get info about a console (output only) */
930 @REQ(get_console_output_info)
931 obj_handle_t handle; /* handle to the console */
933 short int cursor_size; /* size of cursor (percentage filled) */
934 short int cursor_visible;/* cursor visibility flag */
935 short int cursor_x; /* position of cursor (x, y) */
937 short int width; /* width of the screen buffer */
938 short int height; /* height of the screen buffer */
939 short int attr; /* default attribute */
940 short int win_left; /* window actually displayed by renderer */
941 short int win_top; /* the rect area is expressed withing the */
942 short int win_right; /* boundaries of the screen buffer */
943 short int win_bottom;
944 short int max_width; /* maximum size (width x height) for the window */
945 short int max_height;
948 /* Add input records to a console input queue */
949 @REQ(write_console_input)
950 obj_handle_t handle; /* handle to the console input */
951 VARARG(rec,input_records); /* input records */
953 int written; /* number of records written */
957 /* Fetch input records from a console input queue */
958 @REQ(read_console_input)
959 obj_handle_t handle; /* handle to the console input */
960 int flush; /* flush the retrieved records from the queue? */
962 int read; /* number of records read */
963 VARARG(rec,input_records); /* input records */
967 /* write data (chars and/or attributes) in a screen buffer */
968 @REQ(write_console_output)
969 obj_handle_t handle; /* handle to the console output */
970 int x; /* position where to start writing */
972 int mode; /* char info (see below) */
973 int wrap; /* wrap around at end of line? */
974 VARARG(data,bytes); /* info to write */
976 int written; /* number of char infos actually written */
977 int width; /* width of screen buffer */
978 int height; /* height of screen buffer */
982 CHAR_INFO_MODE_TEXT, /* characters only */
983 CHAR_INFO_MODE_ATTR, /* attributes only */
984 CHAR_INFO_MODE_TEXTATTR, /* both characters and attributes */
985 CHAR_INFO_MODE_TEXTSTDATTR /* characters but use standard attributes */
989 /* fill a screen buffer with constant data (chars and/or attributes) */
990 @REQ(fill_console_output)
991 obj_handle_t handle; /* handle to the console output */
992 int x; /* position where to start writing */
994 int mode; /* char info mode */
995 int count; /* number to write */
996 int wrap; /* wrap around at end of line? */
997 char_info_t data; /* data to write */
999 int written; /* number of char infos actually written */
1003 /* read data (chars and/or attributes) from a screen buffer */
1004 @REQ(read_console_output)
1005 obj_handle_t handle; /* handle to the console output */
1006 int x; /* position (x,y) where to start reading */
1008 int mode; /* char info mode */
1009 int wrap; /* wrap around at end of line? */
1011 int width; /* width of screen buffer */
1012 int height; /* height of screen buffer */
1017 /* move a rect (of data) in screen buffer content */
1018 @REQ(move_console_output)
1019 obj_handle_t handle; /* handle to the console output */
1020 short int x_src; /* position (x, y) of rect to start moving from */
1022 short int x_dst; /* position (x, y) of rect to move to */
1024 short int w; /* size of the rect (width, height) to move */
1029 /* Sends a signal to a process group */
1030 @REQ(send_console_signal)
1031 int signal; /* the signal to send */
1032 process_id_t group_id; /* the group to send the signal to */
1036 /* Create a change notification */
1037 @REQ(create_change_notification)
1038 int subtree; /* watch all the subtree */
1039 int filter; /* notification filter */
1041 obj_handle_t handle; /* handle to the change notification */
1045 /* Create a file mapping */
1046 @REQ(create_mapping)
1047 int size_high; /* mapping size */
1048 int size_low; /* mapping size */
1049 int protect; /* protection flags (see below) */
1050 unsigned int access; /* wanted access rights */
1051 int inherit; /* inherit flag */
1052 obj_handle_t file_handle; /* file handle */
1053 VARARG(name,unicode_str); /* object name */
1055 obj_handle_t handle; /* handle to the mapping */
1057 /* protection flags */
1058 #define VPROT_READ 0x01
1059 #define VPROT_WRITE 0x02
1060 #define VPROT_EXEC 0x04
1061 #define VPROT_WRITECOPY 0x08
1062 #define VPROT_GUARD 0x10
1063 #define VPROT_NOCACHE 0x20
1064 #define VPROT_COMMITTED 0x40
1065 #define VPROT_IMAGE 0x80
1068 /* Open a mapping */
1070 unsigned int access; /* wanted access rights */
1071 int inherit; /* inherit flag */
1072 VARARG(name,unicode_str); /* object name */
1074 obj_handle_t handle; /* handle to the mapping */
1078 /* Get information about a file mapping */
1079 @REQ(get_mapping_info)
1080 obj_handle_t handle; /* handle to the mapping */
1082 int size_high; /* mapping size */
1083 int size_low; /* mapping size */
1084 int protect; /* protection flags */
1085 int header_size; /* header size (for VPROT_IMAGE mapping) */
1086 void* base; /* default base addr (for VPROT_IMAGE mapping) */
1087 obj_handle_t shared_file; /* shared mapping file handle */
1088 int shared_size; /* shared mapping size */
1089 int drive_type; /* type of drive the file is on */
1093 /* Create a device */
1095 unsigned int access; /* wanted access rights */
1096 int inherit; /* inherit flag */
1097 int id; /* client private id */
1099 obj_handle_t handle; /* handle to the device */
1103 /* Create a snapshot */
1104 @REQ(create_snapshot)
1105 int inherit; /* inherit flag */
1106 int flags; /* snapshot flags (TH32CS_*) */
1107 process_id_t pid; /* process id */
1109 obj_handle_t handle; /* handle to the snapshot */
1113 /* Get the next process from a snapshot */
1115 obj_handle_t handle; /* handle to the snapshot */
1116 int reset; /* reset snapshot position? */
1118 int count; /* process usage count */
1119 process_id_t pid; /* process id */
1120 process_id_t ppid; /* parent process id */
1121 void* heap; /* heap base */
1122 void* module; /* main module */
1123 int threads; /* number of threads */
1124 int priority; /* process priority */
1125 VARARG(filename,string); /* file name of main exe */
1129 /* Get the next thread from a snapshot */
1131 obj_handle_t handle; /* handle to the snapshot */
1132 int reset; /* reset snapshot position? */
1134 int count; /* thread usage count */
1135 process_id_t pid; /* process id */
1136 thread_id_t tid; /* thread id */
1137 int base_pri; /* base priority */
1138 int delta_pri; /* delta priority */
1142 /* Get the next module from a snapshot */
1144 obj_handle_t handle; /* handle to the snapshot */
1145 int reset; /* reset snapshot position? */
1147 process_id_t pid; /* process id */
1148 void* base; /* module base address */
1149 size_t size; /* module size */
1150 VARARG(filename,string); /* file name of module */
1154 /* Wait for a debug event */
1155 @REQ(wait_debug_event)
1156 int get_handle; /* should we alloc a handle for waiting? */
1158 process_id_t pid; /* process id */
1159 thread_id_t tid; /* thread id */
1160 obj_handle_t wait; /* wait handle if no event ready */
1161 VARARG(event,debug_event); /* debug event data */
1165 /* Queue an exception event */
1166 @REQ(queue_exception_event)
1167 int first; /* first chance exception? */
1168 VARARG(record,exc_event); /* thread context followed by exception record */
1170 obj_handle_t handle; /* handle to the queued event */
1174 /* Retrieve the status of an exception event */
1175 @REQ(get_exception_status)
1176 obj_handle_t handle; /* handle to the queued event */
1178 int status; /* event continuation status */
1179 VARARG(context,context); /* modified thread context */
1183 /* Send an output string to the debugger */
1184 @REQ(output_debug_string)
1185 void* string; /* string to display (in debugged process address space) */
1186 int unicode; /* is it Unicode? */
1187 int length; /* string length */
1191 /* Continue a debug event */
1192 @REQ(continue_debug_event)
1193 process_id_t pid; /* process id to continue */
1194 thread_id_t tid; /* thread id to continue */
1195 int status; /* continuation status */
1199 /* Start/stop debugging an existing process */
1201 process_id_t pid; /* id of the process to debug */
1202 int attach; /* 1=attaching / 0=detaching from the process */
1206 /* Simulate a breakpoint in a process */
1208 obj_handle_t handle; /* process handle */
1210 int self; /* was it the caller itself? */
1214 /* Set debugger kill on exit flag */
1215 @REQ(set_debugger_kill_on_exit)
1216 int kill_on_exit; /* 0=detach/1=kill debuggee when debugger dies */
1220 /* Read data from a process address space */
1221 @REQ(read_process_memory)
1222 obj_handle_t handle; /* process handle */
1223 void* addr; /* addr to read from */
1225 VARARG(data,bytes); /* result data */
1229 /* Write data to a process address space */
1230 @REQ(write_process_memory)
1231 obj_handle_t handle; /* process handle */
1232 void* addr; /* addr to write to (must be int-aligned) */
1233 unsigned int first_mask; /* mask for first word */
1234 unsigned int last_mask; /* mask for last word */
1235 VARARG(data,bytes); /* data to write */
1239 /* Create a registry key */
1241 obj_handle_t parent; /* handle to the parent key */
1242 unsigned int access; /* desired access rights */
1243 unsigned int options; /* creation options */
1244 time_t modif; /* last modification time */
1245 size_t namelen; /* length of key name in bytes */
1246 VARARG(name,unicode_str,namelen); /* key name */
1247 VARARG(class,unicode_str); /* class name */
1249 obj_handle_t hkey; /* handle to the created key */
1250 int created; /* has it been newly created? */
1253 /* Open a registry key */
1255 obj_handle_t parent; /* handle to the parent key */
1256 unsigned int access; /* desired access rights */
1257 VARARG(name,unicode_str); /* key name */
1259 obj_handle_t hkey; /* handle to the open key */
1263 /* Delete a registry key */
1265 obj_handle_t hkey; /* handle to the key */
1269 /* Enumerate registry subkeys */
1271 obj_handle_t hkey; /* handle to registry key */
1272 int index; /* index of subkey (or -1 for current key) */
1273 int info_class; /* requested information class */
1275 int subkeys; /* number of subkeys */
1276 int max_subkey; /* longest subkey name */
1277 int max_class; /* longest class name */
1278 int values; /* number of values */
1279 int max_value; /* longest value name */
1280 int max_data; /* longest value data */
1281 time_t modif; /* last modification time */
1282 size_t total; /* total length needed for full name and class */
1283 size_t namelen; /* length of key name in bytes */
1284 VARARG(name,unicode_str,namelen); /* key name */
1285 VARARG(class,unicode_str); /* class name */
1289 /* Set a value of a registry key */
1291 obj_handle_t hkey; /* handle to registry key */
1292 int type; /* value type */
1293 size_t namelen; /* length of value name in bytes */
1294 VARARG(name,unicode_str,namelen); /* value name */
1295 VARARG(data,bytes); /* value data */
1299 /* Retrieve the value of a registry key */
1301 obj_handle_t hkey; /* handle to registry key */
1302 VARARG(name,unicode_str); /* value name */
1304 int type; /* value type */
1305 size_t total; /* total length needed for data */
1306 VARARG(data,bytes); /* value data */
1310 /* Enumerate a value of a registry key */
1311 @REQ(enum_key_value)
1312 obj_handle_t hkey; /* handle to registry key */
1313 int index; /* value index */
1314 int info_class; /* requested information class */
1316 int type; /* value type */
1317 size_t total; /* total length needed for full name and data */
1318 size_t namelen; /* length of value name in bytes */
1319 VARARG(name,unicode_str,namelen); /* value name */
1320 VARARG(data,bytes); /* value data */
1324 /* Delete a value of a registry key */
1325 @REQ(delete_key_value)
1326 obj_handle_t hkey; /* handle to registry key */
1327 VARARG(name,unicode_str); /* value name */
1331 /* Load a registry branch from a file */
1333 obj_handle_t hkey; /* root key to load to */
1334 obj_handle_t file; /* file to load from */
1335 VARARG(name,unicode_str); /* subkey name */
1339 /* Save a registry branch to a file */
1341 obj_handle_t hkey; /* key to save */
1342 obj_handle_t file; /* file to save to */
1346 /* Save a registry branch at server exit */
1347 @REQ(save_registry_atexit)
1348 obj_handle_t hkey; /* key to save */
1349 VARARG(file,string); /* file to save to */
1353 /* Set the current and saving level for the registry */
1354 @REQ(set_registry_levels)
1355 int current; /* new current level */
1356 int saving; /* new saving level */
1357 int period; /* duration between periodic saves (milliseconds) */
1361 @REQ(set_registry_notification)
1362 obj_handle_t hkey; /* key to watch for changes */
1363 obj_handle_t event; /* event to set */
1364 int subtree; /* should we watch the whole subtree? */
1365 unsigned int filter; /* things to watch */
1369 /* Create a waitable timer */
1371 int inherit; /* inherit flag */
1372 int manual; /* manual reset */
1373 VARARG(name,unicode_str); /* object name */
1375 obj_handle_t handle; /* handle to the timer */
1379 /* Open a waitable timer */
1381 unsigned int access; /* wanted access rights */
1382 int inherit; /* inherit flag */
1383 VARARG(name,unicode_str); /* object name */
1385 obj_handle_t handle; /* handle to the timer */
1388 /* Set a waitable timer */
1390 obj_handle_t handle; /* handle to the timer */
1391 int sec; /* next expiration absolute time */
1392 int usec; /* next expiration absolute time */
1393 int period; /* timer period in ms */
1394 void* callback; /* callback function */
1395 void* arg; /* callback argument */
1398 /* Cancel a waitable timer */
1400 obj_handle_t handle; /* handle to the timer */
1404 /* Retrieve the current context of a thread */
1405 @REQ(get_thread_context)
1406 obj_handle_t handle; /* thread handle */
1407 unsigned int flags; /* context flags */
1409 VARARG(context,context); /* thread context */
1413 /* Set the current context of a thread */
1414 @REQ(set_thread_context)
1415 obj_handle_t handle; /* thread handle */
1416 unsigned int flags; /* context flags */
1417 VARARG(context,context); /* thread context */
1421 /* Fetch a selector entry for a thread */
1422 @REQ(get_selector_entry)
1423 obj_handle_t handle; /* thread handle */
1424 int entry; /* LDT entry */
1426 unsigned int base; /* selector base */
1427 unsigned int limit; /* selector limit */
1428 unsigned char flags; /* selector flags */
1434 int local; /* is atom in local process table? */
1435 VARARG(name,unicode_str); /* atom name */
1437 atom_t atom; /* resulting atom */
1441 /* Delete an atom */
1443 atom_t atom; /* atom handle */
1444 int local; /* is atom in local process table? */
1450 int local; /* is atom in local process table? */
1451 VARARG(name,unicode_str); /* atom name */
1453 atom_t atom; /* atom handle */
1457 /* Get an atom name */
1459 atom_t atom; /* atom handle */
1460 int local; /* is atom in local process table? */
1462 int count; /* atom lock count */
1463 VARARG(name,unicode_str); /* atom name */
1467 /* Init the process atom table */
1468 @REQ(init_atom_table)
1469 int entries; /* number of entries */
1473 /* Get the message queue of the current thread */
1476 obj_handle_t handle; /* handle to the queue */
1480 /* Set the current message queue wakeup mask */
1481 @REQ(set_queue_mask)
1482 unsigned int wake_mask; /* wakeup bits mask */
1483 unsigned int changed_mask; /* changed bits mask */
1484 int skip_wait; /* will we skip waiting if signaled? */
1486 unsigned int wake_bits; /* current wake bits */
1487 unsigned int changed_bits; /* current changed bits */
1491 /* Get the current message queue status */
1492 @REQ(get_queue_status)
1493 int clear; /* should we clear the change bits? */
1495 unsigned int wake_bits; /* wake bits */
1496 unsigned int changed_bits; /* changed bits since last time */
1500 /* Wait for a process to start waiting on input */
1501 @REQ(wait_input_idle)
1502 obj_handle_t handle; /* process handle */
1503 int timeout; /* timeout */
1505 obj_handle_t event; /* handle to idle event */
1509 /* Send a message to a thread queue */
1511 thread_id_t id; /* thread id */
1512 int type; /* message type (see below) */
1513 user_handle_t win; /* window handle */
1514 unsigned int msg; /* message code */
1515 unsigned int wparam; /* parameters */
1516 unsigned int lparam; /* parameters */
1517 int x; /* x position */
1518 int y; /* y position */
1519 unsigned int time; /* message time */
1520 unsigned int info; /* extra info */
1521 int timeout; /* timeout for reply */
1522 VARARG(data,bytes); /* message data for sent messages */
1527 MSG_ASCII, /* Ascii message (from SendMessageA) */
1528 MSG_UNICODE, /* Unicode message (from SendMessageW) */
1529 MSG_NOTIFY, /* notify message (from SendNotifyMessageW), always Unicode */
1530 MSG_CALLBACK, /* callback message (from SendMessageCallbackW), always Unicode */
1531 MSG_OTHER_PROCESS, /* sent from other process, may include vararg data, always Unicode */
1532 MSG_POSTED, /* posted message (from PostMessageW), always Unicode */
1533 MSG_HARDWARE_RAW, /* raw hardware message */
1534 MSG_HARDWARE_COOKED /* cooked hardware message */
1538 /* Get a message from the current queue */
1540 int flags; /* see below */
1541 user_handle_t get_win; /* window handle to get */
1542 unsigned int get_first; /* first message code to get */
1543 unsigned int get_last; /* last message code to get */
1545 int type; /* message type */
1546 user_handle_t win; /* window handle */
1547 unsigned int msg; /* message code */
1548 unsigned int wparam; /* parameters */
1549 unsigned int lparam; /* parameters */
1550 int x; /* x position */
1551 int y; /* y position */
1552 unsigned int time; /* message time */
1553 unsigned int info; /* extra info */
1554 size_t total; /* total size of extra data */
1555 VARARG(data,bytes); /* message data for sent messages */
1557 #define GET_MSG_REMOVE 1 /* remove the message */
1558 #define GET_MSG_SENT_ONLY 2 /* only get sent messages */
1559 #define GET_MSG_REMOVE_LAST 4 /* remove last message returned before checking for a new one */
1561 /* Reply to a sent message */
1563 unsigned int result; /* message result */
1564 int remove; /* should we remove the message? */
1565 VARARG(data,bytes); /* message data for sent messages */
1569 /* Retrieve the reply for the last message sent */
1570 @REQ(get_message_reply)
1571 int cancel; /* cancel message if not ready? */
1573 unsigned int result; /* message result */
1574 VARARG(data,bytes); /* message data for sent messages */
1578 /* Set a window timer */
1580 user_handle_t win; /* window handle */
1581 unsigned int msg; /* message to post */
1582 unsigned int id; /* timer id */
1583 unsigned int rate; /* timer rate in ms */
1584 unsigned int lparam; /* message lparam (callback proc) */
1588 /* Kill a window timer */
1589 @REQ(kill_win_timer)
1590 user_handle_t win; /* window handle */
1591 unsigned int msg; /* message to post */
1592 unsigned int id; /* timer id */
1596 /* Open a serial port */
1598 unsigned int access; /* wanted access rights */
1599 int inherit; /* inherit flag */
1600 unsigned int attributes; /* eg. FILE_FLAG_OVERLAPPED */
1601 unsigned int sharing; /* sharing flags */
1602 VARARG(name,string); /* file name */
1604 obj_handle_t handle; /* handle to the port */
1608 /* Retrieve info about a serial port */
1609 @REQ(get_serial_info)
1610 obj_handle_t handle; /* handle to comm port */
1612 unsigned int readinterval;
1613 unsigned int readconst;
1614 unsigned int readmult;
1615 unsigned int writeconst;
1616 unsigned int writemult;
1617 unsigned int eventmask;
1618 unsigned int commerror;
1622 /* Set info about a serial port */
1623 @REQ(set_serial_info)
1624 obj_handle_t handle; /* handle to comm port */
1625 int flags; /* bitmask to set values (see below) */
1626 unsigned int readinterval;
1627 unsigned int readconst;
1628 unsigned int readmult;
1629 unsigned int writeconst;
1630 unsigned int writemult;
1631 unsigned int eventmask;
1632 unsigned int commerror;
1634 #define SERIALINFO_SET_TIMEOUTS 0x01
1635 #define SERIALINFO_SET_MASK 0x02
1636 #define SERIALINFO_SET_ERROR 0x04
1639 /* Create / reschedule an async I/O */
1640 @REQ(register_async)
1641 obj_handle_t handle; /* handle to comm port, socket or file */
1645 unsigned int status;
1647 #define ASYNC_TYPE_NONE 0x00
1648 #define ASYNC_TYPE_READ 0x01
1649 #define ASYNC_TYPE_WRITE 0x02
1650 #define ASYNC_TYPE_WAIT 0x03
1653 /* Create a named pipe */
1654 @REQ(create_named_pipe)
1655 unsigned int openmode;
1656 unsigned int pipemode;
1657 unsigned int maxinstances;
1658 unsigned int outsize;
1659 unsigned int insize;
1660 unsigned int timeout;
1661 VARARG(name,unicode_str); /* pipe name */
1663 obj_handle_t handle; /* handle to the pipe */
1667 /* Open an existing named pipe */
1668 @REQ(open_named_pipe)
1669 unsigned int access;
1670 VARARG(name,unicode_str); /* pipe name */
1672 obj_handle_t handle; /* handle to the pipe */
1676 /* Connect to a named pipe */
1677 @REQ(connect_named_pipe)
1678 obj_handle_t handle;
1684 /* Wait for a named pipe */
1685 @REQ(wait_named_pipe)
1686 unsigned int timeout;
1689 VARARG(name,unicode_str); /* pipe name */
1693 /* Disconnect a named pipe */
1694 @REQ(disconnect_named_pipe)
1695 obj_handle_t handle;
1699 @REQ(get_named_pipe_info)
1700 obj_handle_t handle;
1703 unsigned int maxinstances;
1704 unsigned int outsize;
1705 unsigned int insize;
1711 unsigned int tree_id;
1712 unsigned int user_id;
1713 unsigned int file_id;
1714 unsigned int dialect;
1716 obj_handle_t handle;
1721 obj_handle_t handle;
1723 unsigned int offset;
1725 unsigned int tree_id;
1726 unsigned int user_id;
1727 unsigned int dialect;
1728 unsigned int file_id;
1729 unsigned int offset;
1731 #define SMBINFO_SET_OFFSET 0x01
1734 /* Create a window */
1736 user_handle_t parent; /* parent window */
1737 user_handle_t owner; /* owner window */
1738 atom_t atom; /* class atom */
1740 user_handle_t handle; /* created window */
1744 /* Link a window into the tree */
1746 user_handle_t handle; /* handle to the window */
1747 user_handle_t parent; /* handle to the parent */
1748 user_handle_t previous; /* previous child in Z-order */
1750 user_handle_t full_parent; /* full handle of new parent */
1754 /* Destroy a window */
1755 @REQ(destroy_window)
1756 user_handle_t handle; /* handle to the window */
1760 /* Set a window owner */
1761 @REQ(set_window_owner)
1762 user_handle_t handle; /* handle to the window */
1763 user_handle_t owner; /* new owner */
1765 user_handle_t full_owner; /* full handle of new owner */
1766 user_handle_t prev_owner; /* full handle of previous owner */
1770 /* Get information from a window handle */
1771 @REQ(get_window_info)
1772 user_handle_t handle; /* handle to the window */
1774 user_handle_t full_handle; /* full 32-bit handle */
1775 user_handle_t last_active; /* last active popup */
1776 process_id_t pid; /* process owning the window */
1777 thread_id_t tid; /* thread owning the window */
1778 atom_t atom; /* class atom */
1782 /* Set some information in a window */
1783 @REQ(set_window_info)
1784 user_handle_t handle; /* handle to the window */
1785 unsigned int flags; /* flags for fields to set (see below) */
1786 unsigned int style; /* window style */
1787 unsigned int ex_style; /* window extended style */
1788 unsigned int id; /* window id */
1789 void* instance; /* creator instance */
1790 void* user_data; /* user-specific data */
1792 unsigned int old_style; /* old window style */
1793 unsigned int old_ex_style; /* old window extended style */
1794 unsigned int old_id; /* old window id */
1795 void* old_instance; /* old creator instance */
1796 void* old_user_data; /* old user-specific data */
1798 #define SET_WIN_STYLE 0x01
1799 #define SET_WIN_EXSTYLE 0x02
1800 #define SET_WIN_ID 0x04
1801 #define SET_WIN_INSTANCE 0x08
1802 #define SET_WIN_USERDATA 0x10
1805 /* Get a list of the window parents, up to the root of the tree */
1806 @REQ(get_window_parents)
1807 user_handle_t handle; /* handle to the window */
1809 int count; /* total count of parents */
1810 VARARG(parents,user_handles); /* parent handles */
1814 /* Get a list of the window children */
1815 @REQ(get_window_children)
1816 user_handle_t parent; /* parent window */
1817 atom_t atom; /* class atom for the listed children */
1818 thread_id_t tid; /* thread owning the listed children */
1820 int count; /* total count of children */
1821 VARARG(children,user_handles); /* children handles */
1825 /* Get window tree information from a window handle */
1826 @REQ(get_window_tree)
1827 user_handle_t handle; /* handle to the window */
1829 user_handle_t parent; /* parent window */
1830 user_handle_t owner; /* owner window */
1831 user_handle_t next_sibling; /* next sibling in Z-order */
1832 user_handle_t prev_sibling; /* prev sibling in Z-order */
1833 user_handle_t first_sibling; /* first sibling in Z-order */
1834 user_handle_t last_sibling; /* last sibling in Z-order */
1835 user_handle_t first_child; /* first child */
1836 user_handle_t last_child; /* last child */
1839 /* Set the window and client rectangles of a window */
1840 @REQ(set_window_rectangles)
1841 user_handle_t handle; /* handle to the window */
1842 rectangle_t window; /* window rectangle */
1843 rectangle_t client; /* client rectangle */
1847 /* Get the window and client rectangles of a window */
1848 @REQ(get_window_rectangles)
1849 user_handle_t handle; /* handle to the window */
1851 rectangle_t window; /* window rectangle */
1852 rectangle_t client; /* client rectangle */
1856 /* Get the window text */
1857 @REQ(get_window_text)
1858 user_handle_t handle; /* handle to the window */
1860 VARARG(text,unicode_str); /* window text */
1864 /* Set the window text */
1865 @REQ(set_window_text)
1866 user_handle_t handle; /* handle to the window */
1867 VARARG(text,unicode_str); /* window text */
1871 /* Increment the window paint count */
1872 @REQ(inc_window_paint_count)
1873 user_handle_t handle; /* handle to the window */
1874 int incr; /* increment (can be negative) */
1878 /* Get the coordinates offset between two windows */
1879 @REQ(get_windows_offset)
1880 user_handle_t from; /* handle to the first window */
1881 user_handle_t to; /* handle to the second window */
1883 int x; /* x coordinate offset */
1884 int y; /* y coordinate offset */
1888 /* Set a window property */
1889 @REQ(set_window_property)
1890 user_handle_t window; /* handle to the window */
1891 atom_t atom; /* property atom (high-word set if it was a string) */
1892 int string; /* was atom a string originally? */
1893 obj_handle_t handle; /* handle to store */
1897 /* Remove a window property */
1898 @REQ(remove_window_property)
1899 user_handle_t window; /* handle to the window */
1900 atom_t atom; /* property atom */
1902 obj_handle_t handle; /* handle stored in property */
1906 /* Get a window property */
1907 @REQ(get_window_property)
1908 user_handle_t window; /* handle to the window */
1909 atom_t atom; /* property atom */
1911 obj_handle_t handle; /* handle stored in property */
1915 /* Get the list of properties of a window */
1916 @REQ(get_window_properties)
1917 user_handle_t window; /* handle to the window */
1919 int total; /* total number of properties */
1920 VARARG(props,properties); /* list of properties */
1924 /* Attach (or detach) thread inputs */
1925 @REQ(attach_thread_input)
1926 thread_id_t tid_from; /* thread to be attached */
1927 thread_id_t tid_to; /* thread to which tid_from should be attached */
1928 int attach; /* is it an attach? */
1932 /* Get input data for a given thread */
1933 @REQ(get_thread_input)
1934 thread_id_t tid; /* id of thread */
1936 user_handle_t focus; /* handle to the focus window */
1937 user_handle_t capture; /* handle to the capture window */
1938 user_handle_t active; /* handle to the active window */
1939 user_handle_t foreground; /* handle to the global foreground window */
1940 user_handle_t menu_owner; /* handle to the menu owner */
1941 user_handle_t move_size; /* handle to the moving/resizing window */
1942 user_handle_t caret; /* handle to the caret window */
1943 rectangle_t rect; /* caret rectangle */
1946 /* Set the system foreground window */
1947 @REQ(set_foreground_window)
1948 user_handle_t handle; /* handle to the foreground window */
1950 user_handle_t previous; /* handle to the previous foreground window */
1951 int send_msg_old; /* whether we have to send a msg to the old window */
1952 int send_msg_new; /* whether we have to send a msg to the new window */
1955 /* Set the current thread focus window */
1956 @REQ(set_focus_window)
1957 user_handle_t handle; /* handle to the focus window */
1959 user_handle_t previous; /* handle to the previous focus window */
1962 /* Set the current thread active window */
1963 @REQ(set_active_window)
1964 user_handle_t handle; /* handle to the active window */
1966 user_handle_t previous; /* handle to the previous active window */
1969 /* Set the current thread capture window */
1970 @REQ(set_capture_window)
1971 user_handle_t handle; /* handle to the capture window */
1972 unsigned int flags; /* capture flags (see below) */
1974 user_handle_t previous; /* handle to the previous capture window */
1975 user_handle_t full_handle; /* full 32-bit handle of new capture window */
1977 #define CAPTURE_MENU 0x01 /* capture is for a menu */
1978 #define CAPTURE_MOVESIZE 0x02 /* capture is for moving/resizing */
1981 /* Set the current thread caret window */
1982 @REQ(set_caret_window)
1983 user_handle_t handle; /* handle to the caret window */
1984 int width; /* caret width */
1985 int height; /* caret height */
1987 user_handle_t previous; /* handle to the previous caret window */
1988 rectangle_t old_rect; /* previous caret rectangle */
1989 int old_hide; /* previous hide count */
1990 int old_state; /* previous caret state (1=on, 0=off) */
1994 /* Set the current thread caret information */
1995 @REQ(set_caret_info)
1996 unsigned int flags; /* caret flags (see below) */
1997 user_handle_t handle; /* handle to the caret window */
1998 int x; /* caret x position */
1999 int y; /* caret y position */
2000 int hide; /* increment for hide count (can be negative to show it) */
2001 int state; /* caret state (1=on, 0=off, -1=toggle current state) */
2003 user_handle_t full_handle; /* handle to the current caret window */
2004 rectangle_t old_rect; /* previous caret rectangle */
2005 int old_hide; /* previous hide count */
2006 int old_state; /* previous caret state (1=on, 0=off) */
2008 #define SET_CARET_POS 0x01 /* set the caret position from x,y */
2009 #define SET_CARET_HIDE 0x02 /* increment the caret hide count */
2010 #define SET_CARET_STATE 0x04 /* set the caret on/off state */
2013 /* Set a window hook */
2015 int id; /* id of the hook */
2016 thread_id_t tid; /* id of thread to set the hook into */
2017 void* proc; /* hook procedure */
2018 int unicode; /* is it a unicode hook? */
2019 VARARG(module,unicode_str); /* module name */
2021 user_handle_t handle; /* handle to the hook */
2025 /* Remove a window hook */
2027 user_handle_t handle; /* handle to the hook */
2028 int id; /* id of the hook if handle is 0 */
2029 void* proc; /* hook procedure if handle is 0 */
2033 /* Start calling a hook chain */
2034 @REQ(start_hook_chain)
2035 int id; /* id of the hook */
2037 user_handle_t handle; /* handle to the next hook */
2038 void* proc; /* hook procedure */
2039 int unicode; /* is it a unicode hook? */
2040 VARARG(module,unicode_str); /* module name */
2044 /* Finished calling a hook chain */
2045 @REQ(finish_hook_chain)
2046 int id; /* id of the hook */
2050 /* Get the next hook to call */
2052 user_handle_t handle; /* handle to the current hook */
2054 user_handle_t next; /* handle to the next hook */
2055 int id; /* id of the next hook */
2056 void* proc; /* next hook procedure */
2057 int prev_unicode; /* was the previous a unicode hook? */
2058 int next_unicode; /* is the next a unicode hook? */
2059 VARARG(module,unicode_str); /* module name */