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 int unix_pid; /* Unix pid of new process */
203 obj_handle_t exe_file; /* file handle for main exe */
204 obj_handle_t hstdin; /* handle for stdin */
205 obj_handle_t hstdout; /* handle for stdout */
206 obj_handle_t hstderr; /* handle for stderr */
207 VARARG(info,startup_info); /* startup information */
209 obj_handle_t info; /* new process info handle */
213 /* Retrieve information about a newly started process */
214 @REQ(get_new_process_info)
215 obj_handle_t info; /* info handle returned from new_process_request */
216 int pinherit; /* process handle inherit flag */
217 int tinherit; /* thread handle inherit flag */
219 process_id_t pid; /* process id */
220 obj_handle_t phandle; /* process handle (in the current process) */
221 thread_id_t tid; /* thread id */
222 obj_handle_t thandle; /* thread handle (in the current process) */
223 int success; /* did the process start successfully? */
227 /* Create a new thread from the context of the parent */
229 int suspend; /* new thread should be suspended on creation */
230 int inherit; /* inherit flag */
231 int request_fd; /* fd for request pipe */
233 thread_id_t tid; /* thread id */
234 obj_handle_t handle; /* thread handle (in the current process) */
238 /* Signal that we are finished booting on the client side */
240 int debug_level; /* new debug level */
244 /* Initialize a process; called from the new process context */
246 void* ldt_copy; /* addr of LDT copy */
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 int unix_tid; /* Unix tid of new thread */
283 void* teb; /* TEB of new thread (in thread address space) */
284 void* entry; /* thread entry point (in thread address space) */
285 int reply_fd; /* fd for reply pipe */
286 int wait_fd; /* fd for blocking calls pipe */
288 process_id_t pid; /* process id of the new thread's process */
289 thread_id_t tid; /* thread id of the new thread */
290 int boot; /* is this the boot thread? */
291 int version; /* protocol version */
295 /* Terminate a process */
296 @REQ(terminate_process)
297 obj_handle_t handle; /* process handle to terminate */
298 int exit_code; /* process exit code */
300 int self; /* suicide? */
304 /* Terminate a thread */
305 @REQ(terminate_thread)
306 obj_handle_t handle; /* thread handle to terminate */
307 int exit_code; /* thread exit code */
309 int self; /* suicide? */
310 int last; /* last thread in this process? */
314 /* Retrieve information about a process */
315 @REQ(get_process_info)
316 obj_handle_t handle; /* process handle */
318 process_id_t pid; /* server process id */
319 int debugged; /* debugged? */
320 int exit_code; /* process exit code */
321 int priority; /* priority class */
322 int process_affinity; /* process affinity mask */
323 int system_affinity; /* system affinity mask */
327 /* Set a process informations */
328 @REQ(set_process_info)
329 obj_handle_t handle; /* process handle */
330 int mask; /* setting mask (see below) */
331 int priority; /* priority class */
332 int affinity; /* affinity mask */
334 #define SET_PROCESS_INFO_PRIORITY 0x01
335 #define SET_PROCESS_INFO_AFFINITY 0x02
338 /* Retrieve information about a thread */
339 @REQ(get_thread_info)
340 obj_handle_t handle; /* thread handle */
341 thread_id_t tid_in; /* thread id (optional) */
343 thread_id_t tid; /* server thread id */
344 void* teb; /* thread teb pointer */
345 int exit_code; /* thread exit code */
346 int priority; /* thread priority level */
347 time_t creation_time; /* thread creation time */
348 time_t exit_time; /* thread exit time */
352 /* Set a thread informations */
353 @REQ(set_thread_info)
354 obj_handle_t handle; /* thread handle */
355 int mask; /* setting mask (see below) */
356 int priority; /* priority class */
357 int affinity; /* affinity mask */
359 #define SET_THREAD_INFO_PRIORITY 0x01
360 #define SET_THREAD_INFO_AFFINITY 0x02
363 /* Retrieve information about a module */
365 obj_handle_t handle; /* process handle */
366 void* base_address; /* base address of module */
368 size_t size; /* module size */
370 VARARG(filename,string); /* file name of module */
374 /* Suspend a thread */
376 obj_handle_t handle; /* thread handle */
378 int count; /* new suspend count */
382 /* Resume a thread */
384 obj_handle_t handle; /* thread handle */
386 int count; /* new suspend count */
390 /* Notify the server that a dll has been loaded */
392 obj_handle_t handle; /* file handle */
393 void* base; /* base address */
394 size_t size; /* dll size */
395 int dbg_offset; /* debug info offset */
396 int dbg_size; /* debug info size */
397 void* name; /* ptr to ptr to name (in process addr space) */
398 VARARG(filename,string); /* file name of dll */
402 /* Notify the server that a dll is being unloaded */
404 void* base; /* base address */
408 /* Queue an APC for a thread */
410 obj_handle_t handle; /* thread handle */
411 int user; /* user or system apc? */
412 void* func; /* function to call */
413 void* param; /* param for function to call */
417 /* Get next APC to call */
419 int alertable; /* is thread alertable? */
421 void* func; /* function to call */
422 int type; /* function type */
423 VARARG(args,ptrs); /* function arguments */
425 enum apc_type { APC_NONE, APC_USER, APC_TIMER, APC_ASYNC, APC_ASYNC_IO };
428 /* Close a handle for the current process */
430 obj_handle_t handle; /* handle to close */
432 int fd; /* associated fd to close */
436 /* Set a handle information */
437 @REQ(set_handle_info)
438 obj_handle_t handle; /* handle we are interested in */
439 int flags; /* new handle flags */
440 int mask; /* mask for flags to set */
441 int fd; /* file descriptor or -1 */
443 int old_flags; /* old flag value */
444 int cur_fd; /* current file descriptor */
448 /* Duplicate a handle */
450 obj_handle_t src_process; /* src process handle */
451 obj_handle_t src_handle; /* src handle to duplicate */
452 obj_handle_t dst_process; /* dst process handle */
453 unsigned int access; /* wanted access rights */
454 int inherit; /* inherit flag */
455 int options; /* duplicate options (see below) */
457 obj_handle_t handle; /* duplicated handle in dst process */
458 int fd; /* associated fd to close */
460 #define DUP_HANDLE_CLOSE_SOURCE DUPLICATE_CLOSE_SOURCE
461 #define DUP_HANDLE_SAME_ACCESS DUPLICATE_SAME_ACCESS
462 #define DUP_HANDLE_MAKE_GLOBAL 0x80000000 /* Not a Windows flag */
465 /* Open a handle to a process */
467 process_id_t pid; /* process id to open */
468 unsigned int access; /* wanted access rights */
469 int inherit; /* inherit flag */
471 obj_handle_t handle; /* handle to the process */
475 /* Open a handle to a thread */
477 thread_id_t tid; /* thread id to open */
478 unsigned int access; /* wanted access rights */
479 int inherit; /* inherit flag */
481 obj_handle_t handle; /* handle to the thread */
485 /* Wait for handles */
487 int flags; /* wait flags (see below) */
488 void* cookie; /* magic cookie to return to client */
489 int sec; /* absolute timeout */
490 int usec; /* absolute timeout */
491 VARARG(handles,handles); /* handles to select on */
494 #define SELECT_ALERTABLE 2
495 #define SELECT_INTERRUPTIBLE 4
496 #define SELECT_TIMEOUT 8
499 /* Create an event */
501 int manual_reset; /* manual reset event */
502 int initial_state; /* initial state of the event */
503 int inherit; /* inherit flag */
504 VARARG(name,unicode_str); /* object name */
506 obj_handle_t handle; /* handle to the event */
509 /* Event operation */
511 obj_handle_t handle; /* handle to event */
512 int op; /* event operation (see below) */
514 enum event_op { PULSE_EVENT, SET_EVENT, RESET_EVENT };
519 unsigned int access; /* wanted access rights */
520 int inherit; /* inherit flag */
521 VARARG(name,unicode_str); /* object name */
523 obj_handle_t handle; /* handle to the event */
529 int owned; /* initially owned? */
530 int inherit; /* inherit flag */
531 VARARG(name,unicode_str); /* object name */
533 obj_handle_t handle; /* handle to the mutex */
537 /* Release a mutex */
539 obj_handle_t handle; /* handle to the mutex */
545 unsigned int access; /* wanted access rights */
546 int inherit; /* inherit flag */
547 VARARG(name,unicode_str); /* object name */
549 obj_handle_t handle; /* handle to the mutex */
553 /* Create a semaphore */
554 @REQ(create_semaphore)
555 unsigned int initial; /* initial count */
556 unsigned int max; /* maximum count */
557 int inherit; /* inherit flag */
558 VARARG(name,unicode_str); /* object name */
560 obj_handle_t handle; /* handle to the semaphore */
564 /* Release a semaphore */
565 @REQ(release_semaphore)
566 obj_handle_t handle; /* handle to the semaphore */
567 unsigned int count; /* count to add to semaphore */
569 unsigned int prev_count; /* previous semaphore count */
573 /* Open a semaphore */
575 unsigned int access; /* wanted access rights */
576 int inherit; /* inherit flag */
577 VARARG(name,unicode_str); /* object name */
579 obj_handle_t handle; /* handle to the semaphore */
585 unsigned int access; /* wanted access rights */
586 int inherit; /* inherit flag */
587 unsigned int sharing; /* sharing flags */
588 int create; /* file create action */
589 unsigned int attrs; /* file attributes for creation */
590 int drive_type; /* type of drive the file is on */
591 VARARG(filename,string); /* file name */
593 obj_handle_t handle; /* handle to the file */
597 /* Allocate a file handle for a Unix fd */
598 @REQ(alloc_file_handle)
599 unsigned int access; /* wanted access rights */
600 int inherit; /* inherit flag */
601 int fd; /* file descriptor on the client side */
603 obj_handle_t handle; /* handle to the file */
607 /* Get a Unix fd to access a file */
609 obj_handle_t handle; /* handle to the file */
610 unsigned int access; /* wanted access rights */
612 int fd; /* file descriptor */
613 int type; /* the type of file (see below) */
614 int flags; /* file read/write flags (see below) */
624 #define FD_FLAG_OVERLAPPED 0x01
625 #define FD_FLAG_TIMEOUT 0x02
626 #define FD_FLAG_RECV_SHUTDOWN 0x04
627 #define FD_FLAG_SEND_SHUTDOWN 0x08
629 /* Set a file current position */
630 @REQ(set_file_pointer)
631 obj_handle_t handle; /* handle to the file */
632 int low; /* position low word */
633 int high; /* position high word */
634 int whence; /* whence to seek */
636 int new_low; /* new position low word */
637 int new_high; /* new position high word */
641 /* Truncate (or extend) a file */
643 obj_handle_t handle; /* handle to the file */
647 /* Set a file access and modification times */
649 obj_handle_t handle; /* handle to the file */
650 time_t access_time; /* last access time */
651 time_t write_time; /* last write time */
655 /* Flush a file buffers */
657 obj_handle_t handle; /* handle to the file */
661 /* Get information about a file */
663 obj_handle_t handle; /* handle to the file */
665 int type; /* file type */
666 int attr; /* file attributes */
667 time_t access_time; /* last access time */
668 time_t write_time; /* last write time */
669 int size_high; /* file size */
670 int size_low; /* file size */
671 int links; /* number of links */
672 int index_high; /* unique index */
673 int index_low; /* unique index */
674 unsigned int serial; /* volume serial number */
678 /* Lock a region of a file */
680 obj_handle_t handle; /* handle to the file */
681 unsigned int offset_low; /* offset of start of lock */
682 unsigned int offset_high; /* offset of start of lock */
683 unsigned int count_low; /* count of bytes to lock */
684 unsigned int count_high; /* count of bytes to lock */
685 int shared; /* shared or exclusive lock? */
686 int wait; /* do we want to wait? */
688 obj_handle_t handle; /* handle to wait on */
689 int overlapped; /* is it an overlapped I/O handle? */
693 /* Unlock a region of a file */
695 obj_handle_t handle; /* handle to the file */
696 unsigned int offset_low; /* offset of start of unlock */
697 unsigned int offset_high; /* offset of start of unlock */
698 unsigned int count_low; /* count of bytes to unlock */
699 unsigned int count_high; /* count of bytes to unlock */
703 /* Create an anonymous pipe */
705 int inherit; /* inherit flag */
707 obj_handle_t handle_read; /* handle to the read-side of the pipe */
708 obj_handle_t handle_write; /* handle to the write-side of the pipe */
712 /* Create a socket */
714 unsigned int access; /* wanted access rights */
715 int inherit; /* inherit flag */
716 int family; /* family, see socket manpage */
717 int type; /* type, see socket manpage */
718 int protocol; /* protocol, see socket manpage */
719 unsigned int flags; /* socket flags */
721 obj_handle_t handle; /* handle to the new socket */
725 /* Accept a socket */
727 obj_handle_t lhandle; /* handle to the listening socket */
728 unsigned int access; /* wanted access rights */
729 int inherit; /* inherit flag */
731 obj_handle_t handle; /* handle to the new socket */
735 /* Set socket event parameters */
736 @REQ(set_socket_event)
737 obj_handle_t handle; /* handle to the socket */
738 unsigned int mask; /* event mask */
739 obj_handle_t event; /* event object */
740 user_handle_t window; /* window to send the message to */
741 unsigned int msg; /* message to send */
745 /* Get socket event parameters */
746 @REQ(get_socket_event)
747 obj_handle_t handle; /* handle to the socket */
748 int service; /* clear pending? */
749 obj_handle_t c_event; /* event to clear */
751 unsigned int mask; /* event mask */
752 unsigned int pmask; /* pending events */
753 unsigned int state; /* status bits */
754 VARARG(errors,ints); /* event errors */
758 /* Reenable pending socket events */
759 @REQ(enable_socket_event)
760 obj_handle_t handle; /* handle to the socket */
761 unsigned int mask; /* events to re-enable */
762 unsigned int sstate; /* status bits to set */
763 unsigned int cstate; /* status bits to clear */
766 @REQ(set_socket_deferred)
767 obj_handle_t handle; /* handle to the socket */
768 obj_handle_t deferred; /* handle to the socket for which accept() is deferred */
771 /* Allocate a console (only used by a console renderer) */
773 unsigned int access; /* wanted access rights */
774 int inherit; /* inherit flag */
775 process_id_t pid; /* pid of process which shall be attached to the console */
777 obj_handle_t handle_in; /* handle to console input */
778 obj_handle_t event; /* handle to renderer events change notification */
782 /* Free the console of the current process */
787 #define CONSOLE_RENDERER_NONE_EVENT 0x00
788 #define CONSOLE_RENDERER_TITLE_EVENT 0x01
789 #define CONSOLE_RENDERER_ACTIVE_SB_EVENT 0x02
790 #define CONSOLE_RENDERER_SB_RESIZE_EVENT 0x03
791 #define CONSOLE_RENDERER_UPDATE_EVENT 0x04
792 #define CONSOLE_RENDERER_CURSOR_POS_EVENT 0x05
793 #define CONSOLE_RENDERER_CURSOR_GEOM_EVENT 0x06
794 #define CONSOLE_RENDERER_DISPLAY_EVENT 0x07
795 #define CONSOLE_RENDERER_EXIT_EVENT 0x08
796 struct console_renderer_event
831 /* retrieve console events for the renderer */
832 @REQ(get_console_renderer_events)
833 obj_handle_t handle; /* handle to console input events */
835 VARARG(data,bytes); /* the various console_renderer_events */
839 /* Open a handle to the process console */
841 int from; /* 0 (resp 1) input (resp output) of current process console */
842 /* otherwise console_in handle to get active screen buffer? */
843 unsigned int access; /* wanted access rights */
844 int inherit; /* inherit flag */
845 int share; /* share mask (only for output handles) */
847 obj_handle_t handle; /* handle to the console */
851 /* Get a console mode (input or output) */
852 @REQ(get_console_mode)
853 obj_handle_t handle; /* handle to the console */
855 int mode; /* console mode */
859 /* Set a console mode (input or output) */
860 @REQ(set_console_mode)
861 obj_handle_t handle; /* handle to the console */
862 int mode; /* console mode */
866 /* Set info about a console (input only) */
867 @REQ(set_console_input_info)
868 obj_handle_t handle; /* handle to console input, or 0 for process' console */
869 int mask; /* setting mask (see below) */
870 obj_handle_t active_sb; /* active screen buffer */
871 int history_mode; /* whether we duplicate lines in history */
872 int history_size; /* number of lines in history */
873 int edition_mode; /* index to the edition mode flavors */
874 VARARG(title,unicode_str); /* console title */
876 #define SET_CONSOLE_INPUT_INFO_ACTIVE_SB 0x01
877 #define SET_CONSOLE_INPUT_INFO_TITLE 0x02
878 #define SET_CONSOLE_INPUT_INFO_HISTORY_MODE 0x04
879 #define SET_CONSOLE_INPUT_INFO_HISTORY_SIZE 0x08
880 #define SET_CONSOLE_INPUT_INFO_EDITION_MODE 0x10
883 /* Get info about a console (input only) */
884 @REQ(get_console_input_info)
885 obj_handle_t handle; /* handle to console input, or 0 for process' console */
887 int history_mode; /* whether we duplicate lines in history */
888 int history_size; /* number of lines in history */
889 int history_index; /* number of used lines in history */
890 int edition_mode; /* index to the edition mode flavors */
891 VARARG(title,unicode_str); /* console title */
895 /* appends a string to console's history */
896 @REQ(append_console_input_history)
897 obj_handle_t handle; /* handle to console input, or 0 for process' console */
898 VARARG(line,unicode_str); /* line to add */
902 /* appends a string to console's history */
903 @REQ(get_console_input_history)
904 obj_handle_t handle; /* handle to console input, or 0 for process' console */
905 int index; /* index to get line from */
907 int total; /* total length of line in Unicode chars */
908 VARARG(line,unicode_str); /* line to add */
912 /* creates a new screen buffer on process' console */
913 @REQ(create_console_output)
914 obj_handle_t handle_in; /* handle to console input, or 0 for process' console */
915 int access; /* wanted access rights */
916 int share; /* sharing credentials */
917 int inherit; /* inherit flag */
919 obj_handle_t handle_out; /* handle to the screen buffer */
923 /* Set info about a console (output only) */
924 @REQ(set_console_output_info)
925 obj_handle_t handle; /* handle to the console */
926 int mask; /* setting mask (see below) */
927 short int cursor_size; /* size of cursor (percentage filled) */
928 short int cursor_visible;/* cursor visibility flag */
929 short int cursor_x; /* position of cursor (x, y) */
931 short int width; /* width of the screen buffer */
932 short int height; /* height of the screen buffer */
933 short int attr; /* default attribute */
934 short int win_left; /* window actually displayed by renderer */
935 short int win_top; /* the rect area is expressed withing the */
936 short int win_right; /* boundaries of the screen buffer */
937 short int win_bottom;
938 short int max_width; /* maximum size (width x height) for the window */
939 short int max_height;
941 #define SET_CONSOLE_OUTPUT_INFO_CURSOR_GEOM 0x01
942 #define SET_CONSOLE_OUTPUT_INFO_CURSOR_POS 0x02
943 #define SET_CONSOLE_OUTPUT_INFO_SIZE 0x04
944 #define SET_CONSOLE_OUTPUT_INFO_ATTR 0x08
945 #define SET_CONSOLE_OUTPUT_INFO_DISPLAY_WINDOW 0x10
946 #define SET_CONSOLE_OUTPUT_INFO_MAX_SIZE 0x20
949 /* Get info about a console (output only) */
950 @REQ(get_console_output_info)
951 obj_handle_t handle; /* handle to the console */
953 short int cursor_size; /* size of cursor (percentage filled) */
954 short int cursor_visible;/* cursor visibility flag */
955 short int cursor_x; /* position of cursor (x, y) */
957 short int width; /* width of the screen buffer */
958 short int height; /* height of the screen buffer */
959 short int attr; /* default attribute */
960 short int win_left; /* window actually displayed by renderer */
961 short int win_top; /* the rect area is expressed withing the */
962 short int win_right; /* boundaries of the screen buffer */
963 short int win_bottom;
964 short int max_width; /* maximum size (width x height) for the window */
965 short int max_height;
968 /* Add input records to a console input queue */
969 @REQ(write_console_input)
970 obj_handle_t handle; /* handle to the console input */
971 VARARG(rec,input_records); /* input records */
973 int written; /* number of records written */
977 /* Fetch input records from a console input queue */
978 @REQ(read_console_input)
979 obj_handle_t handle; /* handle to the console input */
980 int flush; /* flush the retrieved records from the queue? */
982 int read; /* number of records read */
983 VARARG(rec,input_records); /* input records */
987 /* write data (chars and/or attributes) in a screen buffer */
988 @REQ(write_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 (see below) */
993 int wrap; /* wrap around at end of line? */
994 VARARG(data,bytes); /* info to write */
996 int written; /* number of char infos actually written */
997 int width; /* width of screen buffer */
998 int height; /* height of screen buffer */
1002 CHAR_INFO_MODE_TEXT, /* characters only */
1003 CHAR_INFO_MODE_ATTR, /* attributes only */
1004 CHAR_INFO_MODE_TEXTATTR, /* both characters and attributes */
1005 CHAR_INFO_MODE_TEXTSTDATTR /* characters but use standard attributes */
1009 /* fill a screen buffer with constant data (chars and/or attributes) */
1010 @REQ(fill_console_output)
1011 obj_handle_t handle; /* handle to the console output */
1012 int x; /* position where to start writing */
1014 int mode; /* char info mode */
1015 int count; /* number to write */
1016 int wrap; /* wrap around at end of line? */
1017 char_info_t data; /* data to write */
1019 int written; /* number of char infos actually written */
1023 /* read data (chars and/or attributes) from a screen buffer */
1024 @REQ(read_console_output)
1025 obj_handle_t handle; /* handle to the console output */
1026 int x; /* position (x,y) where to start reading */
1028 int mode; /* char info mode */
1029 int wrap; /* wrap around at end of line? */
1031 int width; /* width of screen buffer */
1032 int height; /* height of screen buffer */
1037 /* move a rect (of data) in screen buffer content */
1038 @REQ(move_console_output)
1039 obj_handle_t handle; /* handle to the console output */
1040 short int x_src; /* position (x, y) of rect to start moving from */
1042 short int x_dst; /* position (x, y) of rect to move to */
1044 short int w; /* size of the rect (width, height) to move */
1049 /* Sends a signal to a process group */
1050 @REQ(send_console_signal)
1051 int signal; /* the signal to send */
1052 process_id_t group_id; /* the group to send the signal to */
1056 /* Create a change notification */
1057 @REQ(create_change_notification)
1058 int subtree; /* watch all the subtree */
1059 int filter; /* notification filter */
1061 obj_handle_t handle; /* handle to the change notification */
1065 /* Create a file mapping */
1066 @REQ(create_mapping)
1067 int size_high; /* mapping size */
1068 int size_low; /* mapping size */
1069 int protect; /* protection flags (see below) */
1070 unsigned int access; /* wanted access rights */
1071 int inherit; /* inherit flag */
1072 obj_handle_t file_handle; /* file handle */
1073 VARARG(name,unicode_str); /* object name */
1075 obj_handle_t handle; /* handle to the mapping */
1077 /* protection flags */
1078 #define VPROT_READ 0x01
1079 #define VPROT_WRITE 0x02
1080 #define VPROT_EXEC 0x04
1081 #define VPROT_WRITECOPY 0x08
1082 #define VPROT_GUARD 0x10
1083 #define VPROT_NOCACHE 0x20
1084 #define VPROT_COMMITTED 0x40
1085 #define VPROT_IMAGE 0x80
1088 /* Open a mapping */
1090 unsigned int access; /* wanted access rights */
1091 int inherit; /* inherit flag */
1092 VARARG(name,unicode_str); /* object name */
1094 obj_handle_t handle; /* handle to the mapping */
1098 /* Get information about a file mapping */
1099 @REQ(get_mapping_info)
1100 obj_handle_t handle; /* handle to the mapping */
1102 int size_high; /* mapping size */
1103 int size_low; /* mapping size */
1104 int protect; /* protection flags */
1105 int header_size; /* header size (for VPROT_IMAGE mapping) */
1106 void* base; /* default base addr (for VPROT_IMAGE mapping) */
1107 obj_handle_t shared_file; /* shared mapping file handle */
1108 int shared_size; /* shared mapping size */
1109 int drive_type; /* type of drive the file is on */
1113 /* Create a device */
1115 unsigned int access; /* wanted access rights */
1116 int inherit; /* inherit flag */
1117 int id; /* client private id */
1119 obj_handle_t handle; /* handle to the device */
1123 /* Retrieve the client private id for a device */
1125 obj_handle_t handle; /* handle to the device */
1127 int id; /* client private id */
1131 #define SNAP_HEAPLIST 0x00000001
1132 #define SNAP_PROCESS 0x00000002
1133 #define SNAP_THREAD 0x00000004
1134 #define SNAP_MODULE 0x00000008
1135 /* Create a snapshot */
1136 @REQ(create_snapshot)
1137 int inherit; /* inherit flag */
1138 int flags; /* snapshot flags (SNAP_*) */
1139 process_id_t pid; /* process id */
1141 obj_handle_t handle; /* handle to the snapshot */
1145 /* Get the next process from a snapshot */
1147 obj_handle_t handle; /* handle to the snapshot */
1148 int reset; /* reset snapshot position? */
1150 int count; /* process usage count */
1151 process_id_t pid; /* process id */
1152 process_id_t ppid; /* parent process id */
1153 void* heap; /* heap base */
1154 void* module; /* main module */
1155 int threads; /* number of threads */
1156 int priority; /* process priority */
1157 VARARG(filename,string); /* file name of main exe */
1161 /* Get the next thread from a snapshot */
1163 obj_handle_t handle; /* handle to the snapshot */
1164 int reset; /* reset snapshot position? */
1166 int count; /* thread usage count */
1167 process_id_t pid; /* process id */
1168 thread_id_t tid; /* thread id */
1169 int base_pri; /* base priority */
1170 int delta_pri; /* delta priority */
1174 /* Get the next module from a snapshot */
1176 obj_handle_t handle; /* handle to the snapshot */
1177 int reset; /* reset snapshot position? */
1179 process_id_t pid; /* process id */
1180 void* base; /* module base address */
1181 size_t size; /* module size */
1182 VARARG(filename,string); /* file name of module */
1186 /* Wait for a debug event */
1187 @REQ(wait_debug_event)
1188 int get_handle; /* should we alloc a handle for waiting? */
1190 process_id_t pid; /* process id */
1191 thread_id_t tid; /* thread id */
1192 obj_handle_t wait; /* wait handle if no event ready */
1193 VARARG(event,debug_event); /* debug event data */
1197 /* Queue an exception event */
1198 @REQ(queue_exception_event)
1199 int first; /* first chance exception? */
1200 VARARG(record,exc_event); /* thread context followed by exception record */
1202 obj_handle_t handle; /* handle to the queued event */
1206 /* Retrieve the status of an exception event */
1207 @REQ(get_exception_status)
1208 obj_handle_t handle; /* handle to the queued event */
1210 int status; /* event continuation status */
1211 VARARG(context,context); /* modified thread context */
1215 /* Send an output string to the debugger */
1216 @REQ(output_debug_string)
1217 void* string; /* string to display (in debugged process address space) */
1218 int unicode; /* is it Unicode? */
1219 int length; /* string length */
1223 /* Continue a debug event */
1224 @REQ(continue_debug_event)
1225 process_id_t pid; /* process id to continue */
1226 thread_id_t tid; /* thread id to continue */
1227 int status; /* continuation status */
1231 /* Start/stop debugging an existing process */
1233 process_id_t pid; /* id of the process to debug */
1234 int attach; /* 1=attaching / 0=detaching from the process */
1238 /* Simulate a breakpoint in a process */
1240 obj_handle_t handle; /* process handle */
1242 int self; /* was it the caller itself? */
1246 /* Set debugger kill on exit flag */
1247 @REQ(set_debugger_kill_on_exit)
1248 int kill_on_exit; /* 0=detach/1=kill debuggee when debugger dies */
1252 /* Read data from a process address space */
1253 @REQ(read_process_memory)
1254 obj_handle_t handle; /* process handle */
1255 void* addr; /* addr to read from */
1257 VARARG(data,bytes); /* result data */
1261 /* Write data to a process address space */
1262 @REQ(write_process_memory)
1263 obj_handle_t handle; /* process handle */
1264 void* addr; /* addr to write to (must be int-aligned) */
1265 unsigned int first_mask; /* mask for first word */
1266 unsigned int last_mask; /* mask for last word */
1267 VARARG(data,bytes); /* data to write */
1271 /* Create a registry key */
1273 obj_handle_t parent; /* handle to the parent key */
1274 unsigned int access; /* desired access rights */
1275 unsigned int options; /* creation options */
1276 time_t modif; /* last modification time */
1277 size_t namelen; /* length of key name in bytes */
1278 VARARG(name,unicode_str,namelen); /* key name */
1279 VARARG(class,unicode_str); /* class name */
1281 obj_handle_t hkey; /* handle to the created key */
1282 int created; /* has it been newly created? */
1285 /* Open a registry key */
1287 obj_handle_t parent; /* handle to the parent key */
1288 unsigned int access; /* desired access rights */
1289 VARARG(name,unicode_str); /* key name */
1291 obj_handle_t hkey; /* handle to the open key */
1295 /* Delete a registry key */
1297 obj_handle_t hkey; /* handle to the key */
1301 /* Enumerate registry subkeys */
1303 obj_handle_t hkey; /* handle to registry key */
1304 int index; /* index of subkey (or -1 for current key) */
1305 int info_class; /* requested information class */
1307 int subkeys; /* number of subkeys */
1308 int max_subkey; /* longest subkey name */
1309 int max_class; /* longest class name */
1310 int values; /* number of values */
1311 int max_value; /* longest value name */
1312 int max_data; /* longest value data */
1313 time_t modif; /* last modification time */
1314 size_t total; /* total length needed for full name and class */
1315 size_t namelen; /* length of key name in bytes */
1316 VARARG(name,unicode_str,namelen); /* key name */
1317 VARARG(class,unicode_str); /* class name */
1321 /* Set a value of a registry key */
1323 obj_handle_t hkey; /* handle to registry key */
1324 int type; /* value type */
1325 size_t namelen; /* length of value name in bytes */
1326 VARARG(name,unicode_str,namelen); /* value name */
1327 VARARG(data,bytes); /* value data */
1331 /* Retrieve the value of a registry key */
1333 obj_handle_t hkey; /* handle to registry key */
1334 VARARG(name,unicode_str); /* value name */
1336 int type; /* value type */
1337 size_t total; /* total length needed for data */
1338 VARARG(data,bytes); /* value data */
1342 /* Enumerate a value of a registry key */
1343 @REQ(enum_key_value)
1344 obj_handle_t hkey; /* handle to registry key */
1345 int index; /* value index */
1346 int info_class; /* requested information class */
1348 int type; /* value type */
1349 size_t total; /* total length needed for full name and data */
1350 size_t namelen; /* length of value name in bytes */
1351 VARARG(name,unicode_str,namelen); /* value name */
1352 VARARG(data,bytes); /* value data */
1356 /* Delete a value of a registry key */
1357 @REQ(delete_key_value)
1358 obj_handle_t hkey; /* handle to registry key */
1359 VARARG(name,unicode_str); /* value name */
1363 /* Load a registry branch from a file */
1365 obj_handle_t hkey; /* root key to load to */
1366 obj_handle_t file; /* file to load from */
1367 VARARG(name,unicode_str); /* subkey name */
1371 /* Save a registry branch to a file */
1373 obj_handle_t hkey; /* key to save */
1374 obj_handle_t file; /* file to save to */
1378 /* Save a registry branch at server exit */
1379 @REQ(save_registry_atexit)
1380 obj_handle_t hkey; /* key to save */
1381 VARARG(file,string); /* file to save to */
1385 /* Set the current and saving level for the registry */
1386 @REQ(set_registry_levels)
1387 int current; /* new current level */
1388 int saving; /* new saving level */
1389 int period; /* duration between periodic saves (milliseconds) */
1393 @REQ(set_registry_notification)
1394 obj_handle_t hkey; /* key to watch for changes */
1395 obj_handle_t event; /* event to set */
1396 int subtree; /* should we watch the whole subtree? */
1397 unsigned int filter; /* things to watch */
1401 /* Create a waitable timer */
1403 int inherit; /* inherit flag */
1404 int manual; /* manual reset */
1405 VARARG(name,unicode_str); /* object name */
1407 obj_handle_t handle; /* handle to the timer */
1411 /* Open a waitable timer */
1413 unsigned int access; /* wanted access rights */
1414 int inherit; /* inherit flag */
1415 VARARG(name,unicode_str); /* object name */
1417 obj_handle_t handle; /* handle to the timer */
1420 /* Set a waitable timer */
1422 obj_handle_t handle; /* handle to the timer */
1423 int sec; /* next expiration absolute time */
1424 int usec; /* next expiration absolute time */
1425 int period; /* timer period in ms */
1426 void* callback; /* callback function */
1427 void* arg; /* callback argument */
1430 /* Cancel a waitable timer */
1432 obj_handle_t handle; /* handle to the timer */
1436 /* Retrieve the current context of a thread */
1437 @REQ(get_thread_context)
1438 obj_handle_t handle; /* thread handle */
1439 unsigned int flags; /* context flags */
1441 VARARG(context,context); /* thread context */
1445 /* Set the current context of a thread */
1446 @REQ(set_thread_context)
1447 obj_handle_t handle; /* thread handle */
1448 unsigned int flags; /* context flags */
1449 VARARG(context,context); /* thread context */
1453 /* Fetch a selector entry for a thread */
1454 @REQ(get_selector_entry)
1455 obj_handle_t handle; /* thread handle */
1456 int entry; /* LDT entry */
1458 unsigned int base; /* selector base */
1459 unsigned int limit; /* selector limit */
1460 unsigned char flags; /* selector flags */
1466 int local; /* is atom in local process table? */
1467 VARARG(name,unicode_str); /* atom name */
1469 atom_t atom; /* resulting atom */
1473 /* Delete an atom */
1475 atom_t atom; /* atom handle */
1476 int local; /* is atom in local process table? */
1482 int local; /* is atom in local process table? */
1483 VARARG(name,unicode_str); /* atom name */
1485 atom_t atom; /* atom handle */
1489 /* Get an atom name */
1491 atom_t atom; /* atom handle */
1492 int local; /* is atom in local process table? */
1494 int count; /* atom lock count */
1495 VARARG(name,unicode_str); /* atom name */
1499 /* Init the process atom table */
1500 @REQ(init_atom_table)
1501 int entries; /* number of entries */
1505 /* Get the message queue of the current thread */
1508 obj_handle_t handle; /* handle to the queue */
1512 /* Set the current message queue wakeup mask */
1513 @REQ(set_queue_mask)
1514 unsigned int wake_mask; /* wakeup bits mask */
1515 unsigned int changed_mask; /* changed bits mask */
1516 int skip_wait; /* will we skip waiting if signaled? */
1518 unsigned int wake_bits; /* current wake bits */
1519 unsigned int changed_bits; /* current changed bits */
1523 /* Get the current message queue status */
1524 @REQ(get_queue_status)
1525 int clear; /* should we clear the change bits? */
1527 unsigned int wake_bits; /* wake bits */
1528 unsigned int changed_bits; /* changed bits since last time */
1532 /* Wait for a process to start waiting on input */
1533 @REQ(wait_input_idle)
1534 obj_handle_t handle; /* process handle */
1535 int timeout; /* timeout */
1537 obj_handle_t event; /* handle to idle event */
1541 /* Send a message to a thread queue */
1543 thread_id_t id; /* thread id */
1544 int type; /* message type (see below) */
1545 user_handle_t win; /* window handle */
1546 unsigned int msg; /* message code */
1547 unsigned int wparam; /* parameters */
1548 unsigned int lparam; /* parameters */
1549 int x; /* x position */
1550 int y; /* y position */
1551 unsigned int time; /* message time */
1552 unsigned int info; /* extra info */
1553 int timeout; /* timeout for reply */
1554 VARARG(data,bytes); /* message data for sent messages */
1559 MSG_ASCII, /* Ascii message (from SendMessageA) */
1560 MSG_UNICODE, /* Unicode message (from SendMessageW) */
1561 MSG_NOTIFY, /* notify message (from SendNotifyMessageW), always Unicode */
1562 MSG_CALLBACK, /* callback message (from SendMessageCallbackW), always Unicode */
1563 MSG_OTHER_PROCESS, /* sent from other process, may include vararg data, always Unicode */
1564 MSG_POSTED, /* posted message (from PostMessageW), always Unicode */
1565 MSG_HARDWARE /* hardware message */
1569 /* Get a message from the current queue */
1571 int flags; /* see below */
1572 user_handle_t get_win; /* window handle to get */
1573 unsigned int get_first; /* first message code to get */
1574 unsigned int get_last; /* last message code to get */
1576 int type; /* message type */
1577 user_handle_t win; /* window handle */
1578 unsigned int msg; /* message code */
1579 unsigned int wparam; /* parameters */
1580 unsigned int lparam; /* parameters */
1581 int x; /* x position */
1582 int y; /* y position */
1583 unsigned int time; /* message time */
1584 unsigned int info; /* extra info */
1585 size_t total; /* total size of extra data */
1586 VARARG(data,bytes); /* message data for sent messages */
1588 #define GET_MSG_REMOVE 1 /* remove the message */
1589 #define GET_MSG_SENT_ONLY 2 /* only get sent messages */
1591 /* Reply to a sent message */
1593 int type; /* type of original message */
1594 unsigned int result; /* message result */
1595 int remove; /* should we remove the message? */
1596 VARARG(data,bytes); /* message data for sent messages */
1600 /* Retrieve the reply for the last message sent */
1601 @REQ(get_message_reply)
1602 int cancel; /* cancel message if not ready? */
1604 unsigned int result; /* message result */
1605 VARARG(data,bytes); /* message data for sent messages */
1609 /* Set a window timer */
1611 user_handle_t win; /* window handle */
1612 unsigned int msg; /* message to post */
1613 unsigned int id; /* timer id */
1614 unsigned int rate; /* timer rate in ms */
1615 unsigned int lparam; /* message lparam (callback proc) */
1619 /* Kill a window timer */
1620 @REQ(kill_win_timer)
1621 user_handle_t win; /* window handle */
1622 unsigned int msg; /* message to post */
1623 unsigned int id; /* timer id */
1627 /* Open a serial port */
1629 unsigned int access; /* wanted access rights */
1630 int inherit; /* inherit flag */
1631 unsigned int attributes; /* eg. FILE_FLAG_OVERLAPPED */
1632 unsigned int sharing; /* sharing flags */
1633 VARARG(name,string); /* file name */
1635 obj_handle_t handle; /* handle to the port */
1639 /* Retrieve info about a serial port */
1640 @REQ(get_serial_info)
1641 obj_handle_t handle; /* handle to comm port */
1643 unsigned int readinterval;
1644 unsigned int readconst;
1645 unsigned int readmult;
1646 unsigned int writeconst;
1647 unsigned int writemult;
1648 unsigned int eventmask;
1649 unsigned int commerror;
1653 /* Set info about a serial port */
1654 @REQ(set_serial_info)
1655 obj_handle_t handle; /* handle to comm port */
1656 int flags; /* bitmask to set values (see below) */
1657 unsigned int readinterval;
1658 unsigned int readconst;
1659 unsigned int readmult;
1660 unsigned int writeconst;
1661 unsigned int writemult;
1662 unsigned int eventmask;
1663 unsigned int commerror;
1665 #define SERIALINFO_SET_TIMEOUTS 0x01
1666 #define SERIALINFO_SET_MASK 0x02
1667 #define SERIALINFO_SET_ERROR 0x04
1670 /* Create / reschedule an async I/O */
1671 @REQ(register_async)
1672 obj_handle_t handle; /* handle to comm port, socket or file */
1676 unsigned int status;
1678 #define ASYNC_TYPE_NONE 0x00
1679 #define ASYNC_TYPE_READ 0x01
1680 #define ASYNC_TYPE_WRITE 0x02
1681 #define ASYNC_TYPE_WAIT 0x03
1684 /* Create a named pipe */
1685 @REQ(create_named_pipe)
1686 unsigned int openmode;
1687 unsigned int pipemode;
1688 unsigned int maxinstances;
1689 unsigned int outsize;
1690 unsigned int insize;
1691 unsigned int timeout;
1692 VARARG(name,unicode_str); /* pipe name */
1694 obj_handle_t handle; /* handle to the pipe */
1698 /* Open an existing named pipe */
1699 @REQ(open_named_pipe)
1700 unsigned int access;
1701 VARARG(name,unicode_str); /* pipe name */
1703 obj_handle_t handle; /* handle to the pipe */
1707 /* Connect to a named pipe */
1708 @REQ(connect_named_pipe)
1709 obj_handle_t handle;
1715 /* Wait for a named pipe */
1716 @REQ(wait_named_pipe)
1717 unsigned int timeout;
1720 VARARG(name,unicode_str); /* pipe name */
1724 /* Disconnect a named pipe */
1725 @REQ(disconnect_named_pipe)
1726 obj_handle_t handle;
1730 @REQ(get_named_pipe_info)
1731 obj_handle_t handle;
1734 unsigned int maxinstances;
1735 unsigned int outsize;
1736 unsigned int insize;
1742 unsigned int tree_id;
1743 unsigned int user_id;
1744 unsigned int file_id;
1745 unsigned int dialect;
1747 obj_handle_t handle;
1752 obj_handle_t handle;
1754 unsigned int offset;
1756 unsigned int tree_id;
1757 unsigned int user_id;
1758 unsigned int dialect;
1759 unsigned int file_id;
1760 unsigned int offset;
1762 #define SMBINFO_SET_OFFSET 0x01
1765 /* Create a window */
1767 user_handle_t parent; /* parent window */
1768 user_handle_t owner; /* owner window */
1769 atom_t atom; /* class atom */
1771 user_handle_t handle; /* created window */
1775 /* Link a window into the tree */
1777 user_handle_t handle; /* handle to the window */
1778 user_handle_t parent; /* handle to the parent */
1779 user_handle_t previous; /* previous child in Z-order */
1781 user_handle_t full_parent; /* full handle of new parent */
1785 /* Destroy a window */
1786 @REQ(destroy_window)
1787 user_handle_t handle; /* handle to the window */
1791 /* Set a window owner */
1792 @REQ(set_window_owner)
1793 user_handle_t handle; /* handle to the window */
1794 user_handle_t owner; /* new owner */
1796 user_handle_t full_owner; /* full handle of new owner */
1797 user_handle_t prev_owner; /* full handle of previous owner */
1801 /* Get information from a window handle */
1802 @REQ(get_window_info)
1803 user_handle_t handle; /* handle to the window */
1805 user_handle_t full_handle; /* full 32-bit handle */
1806 user_handle_t last_active; /* last active popup */
1807 process_id_t pid; /* process owning the window */
1808 thread_id_t tid; /* thread owning the window */
1809 atom_t atom; /* class atom */
1813 /* Set some information in a window */
1814 @REQ(set_window_info)
1815 user_handle_t handle; /* handle to the window */
1816 unsigned int flags; /* flags for fields to set (see below) */
1817 unsigned int style; /* window style */
1818 unsigned int ex_style; /* window extended style */
1819 unsigned int id; /* window id */
1820 void* instance; /* creator instance */
1821 void* user_data; /* user-specific data */
1823 unsigned int old_style; /* old window style */
1824 unsigned int old_ex_style; /* old window extended style */
1825 unsigned int old_id; /* old window id */
1826 void* old_instance; /* old creator instance */
1827 void* old_user_data; /* old user-specific data */
1829 #define SET_WIN_STYLE 0x01
1830 #define SET_WIN_EXSTYLE 0x02
1831 #define SET_WIN_ID 0x04
1832 #define SET_WIN_INSTANCE 0x08
1833 #define SET_WIN_USERDATA 0x10
1836 /* Get a list of the window parents, up to the root of the tree */
1837 @REQ(get_window_parents)
1838 user_handle_t handle; /* handle to the window */
1840 int count; /* total count of parents */
1841 VARARG(parents,user_handles); /* parent handles */
1845 /* Get a list of the window children */
1846 @REQ(get_window_children)
1847 user_handle_t parent; /* parent window */
1848 atom_t atom; /* class atom for the listed children */
1849 thread_id_t tid; /* thread owning the listed children */
1851 int count; /* total count of children */
1852 VARARG(children,user_handles); /* children handles */
1856 /* Get window tree information from a window handle */
1857 @REQ(get_window_tree)
1858 user_handle_t handle; /* handle to the window */
1860 user_handle_t parent; /* parent window */
1861 user_handle_t owner; /* owner window */
1862 user_handle_t next_sibling; /* next sibling in Z-order */
1863 user_handle_t prev_sibling; /* prev sibling in Z-order */
1864 user_handle_t first_sibling; /* first sibling in Z-order */
1865 user_handle_t last_sibling; /* last sibling in Z-order */
1866 user_handle_t first_child; /* first child */
1867 user_handle_t last_child; /* last child */
1870 /* Set the window and client rectangles of a window */
1871 @REQ(set_window_rectangles)
1872 user_handle_t handle; /* handle to the window */
1873 rectangle_t window; /* window rectangle */
1874 rectangle_t client; /* client rectangle */
1878 /* Get the window and client rectangles of a window */
1879 @REQ(get_window_rectangles)
1880 user_handle_t handle; /* handle to the window */
1882 rectangle_t window; /* window rectangle */
1883 rectangle_t client; /* client rectangle */
1887 /* Get the window text */
1888 @REQ(get_window_text)
1889 user_handle_t handle; /* handle to the window */
1891 VARARG(text,unicode_str); /* window text */
1895 /* Set the window text */
1896 @REQ(set_window_text)
1897 user_handle_t handle; /* handle to the window */
1898 VARARG(text,unicode_str); /* window text */
1902 /* Increment the window paint count */
1903 @REQ(inc_window_paint_count)
1904 user_handle_t handle; /* handle to the window */
1905 int incr; /* increment (can be negative) */
1909 /* Get the coordinates offset between two windows */
1910 @REQ(get_windows_offset)
1911 user_handle_t from; /* handle to the first window */
1912 user_handle_t to; /* handle to the second window */
1914 int x; /* x coordinate offset */
1915 int y; /* y coordinate offset */
1919 /* Set a window property */
1920 @REQ(set_window_property)
1921 user_handle_t window; /* handle to the window */
1922 atom_t atom; /* property atom (high-word set if it was a string) */
1923 int string; /* was atom a string originally? */
1924 obj_handle_t handle; /* handle to store */
1928 /* Remove a window property */
1929 @REQ(remove_window_property)
1930 user_handle_t window; /* handle to the window */
1931 atom_t atom; /* property atom */
1933 obj_handle_t handle; /* handle stored in property */
1937 /* Get a window property */
1938 @REQ(get_window_property)
1939 user_handle_t window; /* handle to the window */
1940 atom_t atom; /* property atom */
1942 obj_handle_t handle; /* handle stored in property */
1946 /* Get the list of properties of a window */
1947 @REQ(get_window_properties)
1948 user_handle_t window; /* handle to the window */
1950 int total; /* total number of properties */
1951 VARARG(props,properties); /* list of properties */
1955 /* Attach (or detach) thread inputs */
1956 @REQ(attach_thread_input)
1957 thread_id_t tid_from; /* thread to be attached */
1958 thread_id_t tid_to; /* thread to which tid_from should be attached */
1959 int attach; /* is it an attach? */
1963 /* Get input data for a given thread */
1964 @REQ(get_thread_input)
1965 thread_id_t tid; /* id of thread */
1967 user_handle_t focus; /* handle to the focus window */
1968 user_handle_t capture; /* handle to the capture window */
1969 user_handle_t active; /* handle to the active window */
1970 user_handle_t foreground; /* handle to the global foreground window */
1971 user_handle_t menu_owner; /* handle to the menu owner */
1972 user_handle_t move_size; /* handle to the moving/resizing window */
1973 user_handle_t caret; /* handle to the caret window */
1974 rectangle_t rect; /* caret rectangle */
1977 /* Retrieve queue keyboard state for a given thread */
1979 thread_id_t tid; /* id of thread */
1980 int key; /* optional key code or -1 */
1982 unsigned char state; /* state of specified key */
1983 VARARG(keystate,bytes); /* state array for all the keys */
1986 /* Set queue keyboard state for a given thread */
1988 thread_id_t tid; /* id of thread */
1989 VARARG(keystate,bytes); /* state array for all the keys */
1992 /* Set the system foreground window */
1993 @REQ(set_foreground_window)
1994 user_handle_t handle; /* handle to the foreground window */
1996 user_handle_t previous; /* handle to the previous foreground window */
1997 int send_msg_old; /* whether we have to send a msg to the old window */
1998 int send_msg_new; /* whether we have to send a msg to the new window */
2001 /* Set the current thread focus window */
2002 @REQ(set_focus_window)
2003 user_handle_t handle; /* handle to the focus window */
2005 user_handle_t previous; /* handle to the previous focus window */
2008 /* Set the current thread active window */
2009 @REQ(set_active_window)
2010 user_handle_t handle; /* handle to the active window */
2012 user_handle_t previous; /* handle to the previous active window */
2015 /* Set the current thread capture window */
2016 @REQ(set_capture_window)
2017 user_handle_t handle; /* handle to the capture window */
2018 unsigned int flags; /* capture flags (see below) */
2020 user_handle_t previous; /* handle to the previous capture window */
2021 user_handle_t full_handle; /* full 32-bit handle of new capture window */
2023 #define CAPTURE_MENU 0x01 /* capture is for a menu */
2024 #define CAPTURE_MOVESIZE 0x02 /* capture is for moving/resizing */
2027 /* Set the current thread caret window */
2028 @REQ(set_caret_window)
2029 user_handle_t handle; /* handle to the caret window */
2030 int width; /* caret width */
2031 int height; /* caret height */
2033 user_handle_t previous; /* handle to the previous caret window */
2034 rectangle_t old_rect; /* previous caret rectangle */
2035 int old_hide; /* previous hide count */
2036 int old_state; /* previous caret state (1=on, 0=off) */
2040 /* Set the current thread caret information */
2041 @REQ(set_caret_info)
2042 unsigned int flags; /* caret flags (see below) */
2043 user_handle_t handle; /* handle to the caret window */
2044 int x; /* caret x position */
2045 int y; /* caret y position */
2046 int hide; /* increment for hide count (can be negative to show it) */
2047 int state; /* caret state (1=on, 0=off, -1=toggle current state) */
2049 user_handle_t full_handle; /* handle to the current caret window */
2050 rectangle_t old_rect; /* previous caret rectangle */
2051 int old_hide; /* previous hide count */
2052 int old_state; /* previous caret state (1=on, 0=off) */
2054 #define SET_CARET_POS 0x01 /* set the caret position from x,y */
2055 #define SET_CARET_HIDE 0x02 /* increment the caret hide count */
2056 #define SET_CARET_STATE 0x04 /* set the caret on/off state */
2059 /* Set a window hook */
2061 int id; /* id of the hook */
2062 thread_id_t tid; /* id of thread to set the hook into */
2063 void* proc; /* hook procedure */
2064 int unicode; /* is it a unicode hook? */
2065 VARARG(module,unicode_str); /* module name */
2067 user_handle_t handle; /* handle to the hook */
2071 /* Remove a window hook */
2073 user_handle_t handle; /* handle to the hook */
2074 int id; /* id of the hook if handle is 0 */
2075 void* proc; /* hook procedure if handle is 0 */
2079 /* Start calling a hook chain */
2080 @REQ(start_hook_chain)
2081 int id; /* id of the hook */
2083 user_handle_t handle; /* handle to the next hook */
2084 void* proc; /* hook procedure */
2085 int unicode; /* is it a unicode hook? */
2086 VARARG(module,unicode_str); /* module name */
2090 /* Finished calling a hook chain */
2091 @REQ(finish_hook_chain)
2092 int id; /* id of the hook */
2096 /* Get the next hook to call */
2098 user_handle_t handle; /* handle to the current hook */
2100 user_handle_t next; /* handle to the next hook */
2101 int id; /* id of the next hook */
2102 void* proc; /* next hook procedure */
2103 int prev_unicode; /* was the previous a unicode hook? */
2104 int next_unicode; /* is the next a unicode hook? */
2105 VARARG(module,unicode_str); /* module name */