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 obj_handle_t handle; /* handle to the directory */
1059 int subtree; /* watch all the subtree */
1060 unsigned int filter; /* notification filter */
1062 obj_handle_t handle; /* handle to the change notification */
1066 /* Move to the next change notification */
1067 @REQ(next_change_notification)
1068 obj_handle_t handle; /* handle to the change notification */
1071 /* Create a file mapping */
1072 @REQ(create_mapping)
1073 int size_high; /* mapping size */
1074 int size_low; /* mapping size */
1075 int protect; /* protection flags (see below) */
1076 unsigned int access; /* wanted access rights */
1077 int inherit; /* inherit flag */
1078 obj_handle_t file_handle; /* file handle */
1079 VARARG(name,unicode_str); /* object name */
1081 obj_handle_t handle; /* handle to the mapping */
1083 /* protection flags */
1084 #define VPROT_READ 0x01
1085 #define VPROT_WRITE 0x02
1086 #define VPROT_EXEC 0x04
1087 #define VPROT_WRITECOPY 0x08
1088 #define VPROT_GUARD 0x10
1089 #define VPROT_NOCACHE 0x20
1090 #define VPROT_COMMITTED 0x40
1091 #define VPROT_IMAGE 0x80
1094 /* Open a mapping */
1096 unsigned int access; /* wanted access rights */
1097 int inherit; /* inherit flag */
1098 VARARG(name,unicode_str); /* object name */
1100 obj_handle_t handle; /* handle to the mapping */
1104 /* Get information about a file mapping */
1105 @REQ(get_mapping_info)
1106 obj_handle_t handle; /* handle to the mapping */
1108 int size_high; /* mapping size */
1109 int size_low; /* mapping size */
1110 int protect; /* protection flags */
1111 int header_size; /* header size (for VPROT_IMAGE mapping) */
1112 void* base; /* default base addr (for VPROT_IMAGE mapping) */
1113 obj_handle_t shared_file; /* shared mapping file handle */
1114 int shared_size; /* shared mapping size */
1115 int drive_type; /* type of drive the file is on */
1119 /* Create a device */
1121 unsigned int access; /* wanted access rights */
1122 int inherit; /* inherit flag */
1123 int id; /* client private id */
1125 obj_handle_t handle; /* handle to the device */
1129 /* Retrieve the client private id for a device */
1131 obj_handle_t handle; /* handle to the device */
1133 int id; /* client private id */
1137 #define SNAP_HEAPLIST 0x00000001
1138 #define SNAP_PROCESS 0x00000002
1139 #define SNAP_THREAD 0x00000004
1140 #define SNAP_MODULE 0x00000008
1141 /* Create a snapshot */
1142 @REQ(create_snapshot)
1143 int inherit; /* inherit flag */
1144 int flags; /* snapshot flags (SNAP_*) */
1145 process_id_t pid; /* process id */
1147 obj_handle_t handle; /* handle to the snapshot */
1151 /* Get the next process from a snapshot */
1153 obj_handle_t handle; /* handle to the snapshot */
1154 int reset; /* reset snapshot position? */
1156 int count; /* process usage count */
1157 process_id_t pid; /* process id */
1158 process_id_t ppid; /* parent process id */
1159 void* heap; /* heap base */
1160 void* module; /* main module */
1161 int threads; /* number of threads */
1162 int priority; /* process priority */
1163 VARARG(filename,string); /* file name of main exe */
1167 /* Get the next thread from a snapshot */
1169 obj_handle_t handle; /* handle to the snapshot */
1170 int reset; /* reset snapshot position? */
1172 int count; /* thread usage count */
1173 process_id_t pid; /* process id */
1174 thread_id_t tid; /* thread id */
1175 int base_pri; /* base priority */
1176 int delta_pri; /* delta priority */
1180 /* Get the next module from a snapshot */
1182 obj_handle_t handle; /* handle to the snapshot */
1183 int reset; /* reset snapshot position? */
1185 process_id_t pid; /* process id */
1186 void* base; /* module base address */
1187 size_t size; /* module size */
1188 VARARG(filename,string); /* file name of module */
1192 /* Wait for a debug event */
1193 @REQ(wait_debug_event)
1194 int get_handle; /* should we alloc a handle for waiting? */
1196 process_id_t pid; /* process id */
1197 thread_id_t tid; /* thread id */
1198 obj_handle_t wait; /* wait handle if no event ready */
1199 VARARG(event,debug_event); /* debug event data */
1203 /* Queue an exception event */
1204 @REQ(queue_exception_event)
1205 int first; /* first chance exception? */
1206 VARARG(record,exc_event); /* thread context followed by exception record */
1208 obj_handle_t handle; /* handle to the queued event */
1212 /* Retrieve the status of an exception event */
1213 @REQ(get_exception_status)
1214 obj_handle_t handle; /* handle to the queued event */
1216 int status; /* event continuation status */
1217 VARARG(context,context); /* modified thread context */
1221 /* Send an output string to the debugger */
1222 @REQ(output_debug_string)
1223 void* string; /* string to display (in debugged process address space) */
1224 int unicode; /* is it Unicode? */
1225 int length; /* string length */
1229 /* Continue a debug event */
1230 @REQ(continue_debug_event)
1231 process_id_t pid; /* process id to continue */
1232 thread_id_t tid; /* thread id to continue */
1233 int status; /* continuation status */
1237 /* Start/stop debugging an existing process */
1239 process_id_t pid; /* id of the process to debug */
1240 int attach; /* 1=attaching / 0=detaching from the process */
1244 /* Simulate a breakpoint in a process */
1246 obj_handle_t handle; /* process handle */
1248 int self; /* was it the caller itself? */
1252 /* Set debugger kill on exit flag */
1253 @REQ(set_debugger_kill_on_exit)
1254 int kill_on_exit; /* 0=detach/1=kill debuggee when debugger dies */
1258 /* Read data from a process address space */
1259 @REQ(read_process_memory)
1260 obj_handle_t handle; /* process handle */
1261 void* addr; /* addr to read from */
1263 VARARG(data,bytes); /* result data */
1267 /* Write data to a process address space */
1268 @REQ(write_process_memory)
1269 obj_handle_t handle; /* process handle */
1270 void* addr; /* addr to write to (must be int-aligned) */
1271 unsigned int first_mask; /* mask for first word */
1272 unsigned int last_mask; /* mask for last word */
1273 VARARG(data,bytes); /* data to write */
1277 /* Create a registry key */
1279 obj_handle_t parent; /* handle to the parent key */
1280 unsigned int access; /* desired access rights */
1281 unsigned int options; /* creation options */
1282 time_t modif; /* last modification time */
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 */
1287 obj_handle_t hkey; /* handle to the created key */
1288 int created; /* has it been newly created? */
1291 /* Open a registry key */
1293 obj_handle_t parent; /* handle to the parent key */
1294 unsigned int access; /* desired access rights */
1295 VARARG(name,unicode_str); /* key name */
1297 obj_handle_t hkey; /* handle to the open key */
1301 /* Delete a registry key */
1303 obj_handle_t hkey; /* handle to the key */
1307 /* Enumerate registry subkeys */
1309 obj_handle_t hkey; /* handle to registry key */
1310 int index; /* index of subkey (or -1 for current key) */
1311 int info_class; /* requested information class */
1313 int subkeys; /* number of subkeys */
1314 int max_subkey; /* longest subkey name */
1315 int max_class; /* longest class name */
1316 int values; /* number of values */
1317 int max_value; /* longest value name */
1318 int max_data; /* longest value data */
1319 time_t modif; /* last modification time */
1320 size_t total; /* total length needed for full name and class */
1321 size_t namelen; /* length of key name in bytes */
1322 VARARG(name,unicode_str,namelen); /* key name */
1323 VARARG(class,unicode_str); /* class name */
1327 /* Set a value of a registry key */
1329 obj_handle_t hkey; /* handle to registry key */
1330 int type; /* value type */
1331 size_t namelen; /* length of value name in bytes */
1332 VARARG(name,unicode_str,namelen); /* value name */
1333 VARARG(data,bytes); /* value data */
1337 /* Retrieve the value of a registry key */
1339 obj_handle_t hkey; /* handle to registry key */
1340 VARARG(name,unicode_str); /* value name */
1342 int type; /* value type */
1343 size_t total; /* total length needed for data */
1344 VARARG(data,bytes); /* value data */
1348 /* Enumerate a value of a registry key */
1349 @REQ(enum_key_value)
1350 obj_handle_t hkey; /* handle to registry key */
1351 int index; /* value index */
1352 int info_class; /* requested information class */
1354 int type; /* value type */
1355 size_t total; /* total length needed for full name and data */
1356 size_t namelen; /* length of value name in bytes */
1357 VARARG(name,unicode_str,namelen); /* value name */
1358 VARARG(data,bytes); /* value data */
1362 /* Delete a value of a registry key */
1363 @REQ(delete_key_value)
1364 obj_handle_t hkey; /* handle to registry key */
1365 VARARG(name,unicode_str); /* value name */
1369 /* Load a registry branch from a file */
1371 obj_handle_t hkey; /* root key to load to */
1372 obj_handle_t file; /* file to load from */
1373 VARARG(name,unicode_str); /* subkey name */
1377 /* Save a registry branch to a file */
1379 obj_handle_t hkey; /* key to save */
1380 obj_handle_t file; /* file to save to */
1384 /* Save a registry branch at server exit */
1385 @REQ(save_registry_atexit)
1386 obj_handle_t hkey; /* key to save */
1387 VARARG(file,string); /* file to save to */
1391 /* Set the current and saving level for the registry */
1392 @REQ(set_registry_levels)
1393 int current; /* new current level */
1394 int saving; /* new saving level */
1395 int period; /* duration between periodic saves (milliseconds) */
1399 @REQ(set_registry_notification)
1400 obj_handle_t hkey; /* key to watch for changes */
1401 obj_handle_t event; /* event to set */
1402 int subtree; /* should we watch the whole subtree? */
1403 unsigned int filter; /* things to watch */
1407 /* Create a waitable timer */
1409 int inherit; /* inherit flag */
1410 int manual; /* manual reset */
1411 VARARG(name,unicode_str); /* object name */
1413 obj_handle_t handle; /* handle to the timer */
1417 /* Open a waitable timer */
1419 unsigned int access; /* wanted access rights */
1420 int inherit; /* inherit flag */
1421 VARARG(name,unicode_str); /* object name */
1423 obj_handle_t handle; /* handle to the timer */
1426 /* Set a waitable timer */
1428 obj_handle_t handle; /* handle to the timer */
1429 int sec; /* next expiration absolute time */
1430 int usec; /* next expiration absolute time */
1431 int period; /* timer period in ms */
1432 void* callback; /* callback function */
1433 void* arg; /* callback argument */
1436 /* Cancel a waitable timer */
1438 obj_handle_t handle; /* handle to the timer */
1442 /* Retrieve the current context of a thread */
1443 @REQ(get_thread_context)
1444 obj_handle_t handle; /* thread handle */
1445 unsigned int flags; /* context flags */
1447 VARARG(context,context); /* thread context */
1451 /* Set the current context of a thread */
1452 @REQ(set_thread_context)
1453 obj_handle_t handle; /* thread handle */
1454 unsigned int flags; /* context flags */
1455 VARARG(context,context); /* thread context */
1459 /* Fetch a selector entry for a thread */
1460 @REQ(get_selector_entry)
1461 obj_handle_t handle; /* thread handle */
1462 int entry; /* LDT entry */
1464 unsigned int base; /* selector base */
1465 unsigned int limit; /* selector limit */
1466 unsigned char flags; /* selector flags */
1472 int local; /* is atom in local process table? */
1473 VARARG(name,unicode_str); /* atom name */
1475 atom_t atom; /* resulting atom */
1479 /* Delete an atom */
1481 atom_t atom; /* atom handle */
1482 int local; /* is atom in local process table? */
1488 int local; /* is atom in local process table? */
1489 VARARG(name,unicode_str); /* atom name */
1491 atom_t atom; /* atom handle */
1495 /* Get an atom name */
1497 atom_t atom; /* atom handle */
1498 int local; /* is atom in local process table? */
1500 int count; /* atom lock count */
1501 VARARG(name,unicode_str); /* atom name */
1505 /* Init the process atom table */
1506 @REQ(init_atom_table)
1507 int entries; /* number of entries */
1511 /* Get the message queue of the current thread */
1514 obj_handle_t handle; /* handle to the queue */
1518 /* Set the current message queue wakeup mask */
1519 @REQ(set_queue_mask)
1520 unsigned int wake_mask; /* wakeup bits mask */
1521 unsigned int changed_mask; /* changed bits mask */
1522 int skip_wait; /* will we skip waiting if signaled? */
1524 unsigned int wake_bits; /* current wake bits */
1525 unsigned int changed_bits; /* current changed bits */
1529 /* Get the current message queue status */
1530 @REQ(get_queue_status)
1531 int clear; /* should we clear the change bits? */
1533 unsigned int wake_bits; /* wake bits */
1534 unsigned int changed_bits; /* changed bits since last time */
1538 /* Wait for a process to start waiting on input */
1539 @REQ(wait_input_idle)
1540 obj_handle_t handle; /* process handle */
1541 int timeout; /* timeout */
1543 obj_handle_t event; /* handle to idle event */
1547 /* Send a message to a thread queue */
1549 thread_id_t id; /* thread id */
1550 int type; /* message type (see below) */
1551 user_handle_t win; /* window handle */
1552 unsigned int msg; /* message code */
1553 unsigned int wparam; /* parameters */
1554 unsigned int lparam; /* parameters */
1555 int x; /* x position */
1556 int y; /* y position */
1557 unsigned int time; /* message time */
1558 unsigned int info; /* extra info */
1559 int timeout; /* timeout for reply */
1560 VARARG(data,bytes); /* message data for sent messages */
1565 MSG_ASCII, /* Ascii message (from SendMessageA) */
1566 MSG_UNICODE, /* Unicode message (from SendMessageW) */
1567 MSG_NOTIFY, /* notify message (from SendNotifyMessageW), always Unicode */
1568 MSG_CALLBACK, /* callback message (from SendMessageCallbackW), always Unicode */
1569 MSG_OTHER_PROCESS, /* sent from other process, may include vararg data, always Unicode */
1570 MSG_POSTED, /* posted message (from PostMessageW), always Unicode */
1571 MSG_HARDWARE /* hardware message */
1575 /* Get a message from the current queue */
1577 int flags; /* see below */
1578 user_handle_t get_win; /* window handle to get */
1579 unsigned int get_first; /* first message code to get */
1580 unsigned int get_last; /* last message code to get */
1582 int type; /* message type */
1583 user_handle_t win; /* window handle */
1584 unsigned int msg; /* message code */
1585 unsigned int wparam; /* parameters */
1586 unsigned int lparam; /* parameters */
1587 int x; /* x position */
1588 int y; /* y position */
1589 unsigned int time; /* message time */
1590 unsigned int info; /* extra info */
1591 size_t total; /* total size of extra data */
1592 VARARG(data,bytes); /* message data for sent messages */
1594 #define GET_MSG_REMOVE 1 /* remove the message */
1595 #define GET_MSG_SENT_ONLY 2 /* only get sent messages */
1597 /* Reply to a sent message */
1599 int type; /* type of original message */
1600 unsigned int result; /* message result */
1601 int remove; /* should we remove the message? */
1602 VARARG(data,bytes); /* message data for sent messages */
1606 /* Retrieve the reply for the last message sent */
1607 @REQ(get_message_reply)
1608 int cancel; /* cancel message if not ready? */
1610 unsigned int result; /* message result */
1611 VARARG(data,bytes); /* message data for sent messages */
1615 /* Set a window timer */
1617 user_handle_t win; /* window handle */
1618 unsigned int msg; /* message to post */
1619 unsigned int id; /* timer id */
1620 unsigned int rate; /* timer rate in ms */
1621 unsigned int lparam; /* message lparam (callback proc) */
1625 /* Kill a window timer */
1626 @REQ(kill_win_timer)
1627 user_handle_t win; /* window handle */
1628 unsigned int msg; /* message to post */
1629 unsigned int id; /* timer id */
1633 /* Open a serial port */
1635 unsigned int access; /* wanted access rights */
1636 int inherit; /* inherit flag */
1637 unsigned int attributes; /* eg. FILE_FLAG_OVERLAPPED */
1638 unsigned int sharing; /* sharing flags */
1639 VARARG(name,string); /* file name */
1641 obj_handle_t handle; /* handle to the port */
1645 /* Retrieve info about a serial port */
1646 @REQ(get_serial_info)
1647 obj_handle_t handle; /* handle to comm port */
1649 unsigned int readinterval;
1650 unsigned int readconst;
1651 unsigned int readmult;
1652 unsigned int writeconst;
1653 unsigned int writemult;
1654 unsigned int eventmask;
1655 unsigned int commerror;
1659 /* Set info about a serial port */
1660 @REQ(set_serial_info)
1661 obj_handle_t handle; /* handle to comm port */
1662 int flags; /* bitmask to set values (see below) */
1663 unsigned int readinterval;
1664 unsigned int readconst;
1665 unsigned int readmult;
1666 unsigned int writeconst;
1667 unsigned int writemult;
1668 unsigned int eventmask;
1669 unsigned int commerror;
1671 #define SERIALINFO_SET_TIMEOUTS 0x01
1672 #define SERIALINFO_SET_MASK 0x02
1673 #define SERIALINFO_SET_ERROR 0x04
1676 /* Create / reschedule an async I/O */
1677 @REQ(register_async)
1678 obj_handle_t handle; /* handle to comm port, socket or file */
1682 unsigned int status;
1684 #define ASYNC_TYPE_NONE 0x00
1685 #define ASYNC_TYPE_READ 0x01
1686 #define ASYNC_TYPE_WRITE 0x02
1687 #define ASYNC_TYPE_WAIT 0x03
1690 /* Create a named pipe */
1691 @REQ(create_named_pipe)
1692 unsigned int openmode;
1693 unsigned int pipemode;
1694 unsigned int maxinstances;
1695 unsigned int outsize;
1696 unsigned int insize;
1697 unsigned int timeout;
1698 VARARG(name,unicode_str); /* pipe name */
1700 obj_handle_t handle; /* handle to the pipe */
1704 /* Open an existing named pipe */
1705 @REQ(open_named_pipe)
1706 unsigned int access;
1707 VARARG(name,unicode_str); /* pipe name */
1709 obj_handle_t handle; /* handle to the pipe */
1713 /* Connect to a named pipe */
1714 @REQ(connect_named_pipe)
1715 obj_handle_t handle;
1721 /* Wait for a named pipe */
1722 @REQ(wait_named_pipe)
1723 unsigned int timeout;
1726 VARARG(name,unicode_str); /* pipe name */
1730 /* Disconnect a named pipe */
1731 @REQ(disconnect_named_pipe)
1732 obj_handle_t handle;
1736 @REQ(get_named_pipe_info)
1737 obj_handle_t handle;
1740 unsigned int maxinstances;
1741 unsigned int outsize;
1742 unsigned int insize;
1748 unsigned int tree_id;
1749 unsigned int user_id;
1750 unsigned int file_id;
1751 unsigned int dialect;
1753 obj_handle_t handle;
1758 obj_handle_t handle;
1760 unsigned int offset;
1762 unsigned int tree_id;
1763 unsigned int user_id;
1764 unsigned int dialect;
1765 unsigned int file_id;
1766 unsigned int offset;
1768 #define SMBINFO_SET_OFFSET 0x01
1771 /* Create a window */
1773 user_handle_t parent; /* parent window */
1774 user_handle_t owner; /* owner window */
1775 atom_t atom; /* class atom */
1777 user_handle_t handle; /* created window */
1781 /* Link a window into the tree */
1783 user_handle_t handle; /* handle to the window */
1784 user_handle_t parent; /* handle to the parent */
1785 user_handle_t previous; /* previous child in Z-order */
1787 user_handle_t full_parent; /* full handle of new parent */
1791 /* Destroy a window */
1792 @REQ(destroy_window)
1793 user_handle_t handle; /* handle to the window */
1797 /* Set a window owner */
1798 @REQ(set_window_owner)
1799 user_handle_t handle; /* handle to the window */
1800 user_handle_t owner; /* new owner */
1802 user_handle_t full_owner; /* full handle of new owner */
1803 user_handle_t prev_owner; /* full handle of previous owner */
1807 /* Get information from a window handle */
1808 @REQ(get_window_info)
1809 user_handle_t handle; /* handle to the window */
1811 user_handle_t full_handle; /* full 32-bit handle */
1812 user_handle_t last_active; /* last active popup */
1813 process_id_t pid; /* process owning the window */
1814 thread_id_t tid; /* thread owning the window */
1815 atom_t atom; /* class atom */
1819 /* Set some information in a window */
1820 @REQ(set_window_info)
1821 user_handle_t handle; /* handle to the window */
1822 unsigned int flags; /* flags for fields to set (see below) */
1823 unsigned int style; /* window style */
1824 unsigned int ex_style; /* window extended style */
1825 unsigned int id; /* window id */
1826 void* instance; /* creator instance */
1827 void* user_data; /* user-specific data */
1829 unsigned int old_style; /* old window style */
1830 unsigned int old_ex_style; /* old window extended style */
1831 unsigned int old_id; /* old window id */
1832 void* old_instance; /* old creator instance */
1833 void* old_user_data; /* old user-specific data */
1835 #define SET_WIN_STYLE 0x01
1836 #define SET_WIN_EXSTYLE 0x02
1837 #define SET_WIN_ID 0x04
1838 #define SET_WIN_INSTANCE 0x08
1839 #define SET_WIN_USERDATA 0x10
1842 /* Get a list of the window parents, up to the root of the tree */
1843 @REQ(get_window_parents)
1844 user_handle_t handle; /* handle to the window */
1846 int count; /* total count of parents */
1847 VARARG(parents,user_handles); /* parent handles */
1851 /* Get a list of the window children */
1852 @REQ(get_window_children)
1853 user_handle_t parent; /* parent window */
1854 atom_t atom; /* class atom for the listed children */
1855 thread_id_t tid; /* thread owning the listed children */
1857 int count; /* total count of children */
1858 VARARG(children,user_handles); /* children handles */
1862 /* Get window tree information from a window handle */
1863 @REQ(get_window_tree)
1864 user_handle_t handle; /* handle to the window */
1866 user_handle_t parent; /* parent window */
1867 user_handle_t owner; /* owner window */
1868 user_handle_t next_sibling; /* next sibling in Z-order */
1869 user_handle_t prev_sibling; /* prev sibling in Z-order */
1870 user_handle_t first_sibling; /* first sibling in Z-order */
1871 user_handle_t last_sibling; /* last sibling in Z-order */
1872 user_handle_t first_child; /* first child */
1873 user_handle_t last_child; /* last child */
1876 /* Set the window and client rectangles of a window */
1877 @REQ(set_window_rectangles)
1878 user_handle_t handle; /* handle to the window */
1879 rectangle_t window; /* window rectangle */
1880 rectangle_t client; /* client rectangle */
1884 /* Get the window and client rectangles of a window */
1885 @REQ(get_window_rectangles)
1886 user_handle_t handle; /* handle to the window */
1888 rectangle_t window; /* window rectangle */
1889 rectangle_t client; /* client rectangle */
1893 /* Get the window text */
1894 @REQ(get_window_text)
1895 user_handle_t handle; /* handle to the window */
1897 VARARG(text,unicode_str); /* window text */
1901 /* Set the window text */
1902 @REQ(set_window_text)
1903 user_handle_t handle; /* handle to the window */
1904 VARARG(text,unicode_str); /* window text */
1908 /* Increment the window paint count */
1909 @REQ(inc_window_paint_count)
1910 user_handle_t handle; /* handle to the window */
1911 int incr; /* increment (can be negative) */
1915 /* Get the coordinates offset between two windows */
1916 @REQ(get_windows_offset)
1917 user_handle_t from; /* handle to the first window */
1918 user_handle_t to; /* handle to the second window */
1920 int x; /* x coordinate offset */
1921 int y; /* y coordinate offset */
1925 /* Set a window property */
1926 @REQ(set_window_property)
1927 user_handle_t window; /* handle to the window */
1928 atom_t atom; /* property atom (high-word set if it was a string) */
1929 int string; /* was atom a string originally? */
1930 obj_handle_t handle; /* handle to store */
1934 /* Remove a window property */
1935 @REQ(remove_window_property)
1936 user_handle_t window; /* handle to the window */
1937 atom_t atom; /* property atom */
1939 obj_handle_t handle; /* handle stored in property */
1943 /* Get a window property */
1944 @REQ(get_window_property)
1945 user_handle_t window; /* handle to the window */
1946 atom_t atom; /* property atom */
1948 obj_handle_t handle; /* handle stored in property */
1952 /* Get the list of properties of a window */
1953 @REQ(get_window_properties)
1954 user_handle_t window; /* handle to the window */
1956 int total; /* total number of properties */
1957 VARARG(props,properties); /* list of properties */
1961 /* Attach (or detach) thread inputs */
1962 @REQ(attach_thread_input)
1963 thread_id_t tid_from; /* thread to be attached */
1964 thread_id_t tid_to; /* thread to which tid_from should be attached */
1965 int attach; /* is it an attach? */
1969 /* Get input data for a given thread */
1970 @REQ(get_thread_input)
1971 thread_id_t tid; /* id of thread */
1973 user_handle_t focus; /* handle to the focus window */
1974 user_handle_t capture; /* handle to the capture window */
1975 user_handle_t active; /* handle to the active window */
1976 user_handle_t foreground; /* handle to the global foreground window */
1977 user_handle_t menu_owner; /* handle to the menu owner */
1978 user_handle_t move_size; /* handle to the moving/resizing window */
1979 user_handle_t caret; /* handle to the caret window */
1980 rectangle_t rect; /* caret rectangle */
1983 /* Retrieve queue keyboard state for a given thread */
1985 thread_id_t tid; /* id of thread */
1986 int key; /* optional key code or -1 */
1988 unsigned char state; /* state of specified key */
1989 VARARG(keystate,bytes); /* state array for all the keys */
1992 /* Set queue keyboard state for a given thread */
1994 thread_id_t tid; /* id of thread */
1995 VARARG(keystate,bytes); /* state array for all the keys */
1998 /* Set the system foreground window */
1999 @REQ(set_foreground_window)
2000 user_handle_t handle; /* handle to the foreground window */
2002 user_handle_t previous; /* handle to the previous foreground window */
2003 int send_msg_old; /* whether we have to send a msg to the old window */
2004 int send_msg_new; /* whether we have to send a msg to the new window */
2007 /* Set the current thread focus window */
2008 @REQ(set_focus_window)
2009 user_handle_t handle; /* handle to the focus window */
2011 user_handle_t previous; /* handle to the previous focus window */
2014 /* Set the current thread active window */
2015 @REQ(set_active_window)
2016 user_handle_t handle; /* handle to the active window */
2018 user_handle_t previous; /* handle to the previous active window */
2021 /* Set the current thread capture window */
2022 @REQ(set_capture_window)
2023 user_handle_t handle; /* handle to the capture window */
2024 unsigned int flags; /* capture flags (see below) */
2026 user_handle_t previous; /* handle to the previous capture window */
2027 user_handle_t full_handle; /* full 32-bit handle of new capture window */
2029 #define CAPTURE_MENU 0x01 /* capture is for a menu */
2030 #define CAPTURE_MOVESIZE 0x02 /* capture is for moving/resizing */
2033 /* Set the current thread caret window */
2034 @REQ(set_caret_window)
2035 user_handle_t handle; /* handle to the caret window */
2036 int width; /* caret width */
2037 int height; /* caret height */
2039 user_handle_t previous; /* handle to the previous caret window */
2040 rectangle_t old_rect; /* previous caret rectangle */
2041 int old_hide; /* previous hide count */
2042 int old_state; /* previous caret state (1=on, 0=off) */
2046 /* Set the current thread caret information */
2047 @REQ(set_caret_info)
2048 unsigned int flags; /* caret flags (see below) */
2049 user_handle_t handle; /* handle to the caret window */
2050 int x; /* caret x position */
2051 int y; /* caret y position */
2052 int hide; /* increment for hide count (can be negative to show it) */
2053 int state; /* caret state (1=on, 0=off, -1=toggle current state) */
2055 user_handle_t full_handle; /* handle to the current caret window */
2056 rectangle_t old_rect; /* previous caret rectangle */
2057 int old_hide; /* previous hide count */
2058 int old_state; /* previous caret state (1=on, 0=off) */
2060 #define SET_CARET_POS 0x01 /* set the caret position from x,y */
2061 #define SET_CARET_HIDE 0x02 /* increment the caret hide count */
2062 #define SET_CARET_STATE 0x04 /* set the caret on/off state */
2065 /* Set a window hook */
2067 int id; /* id of the hook */
2068 thread_id_t tid; /* id of thread to set the hook into */
2069 void* proc; /* hook procedure */
2070 int unicode; /* is it a unicode hook? */
2071 VARARG(module,unicode_str); /* module name */
2073 user_handle_t handle; /* handle to the hook */
2077 /* Remove a window hook */
2079 user_handle_t handle; /* handle to the hook */
2080 int id; /* id of the hook if handle is 0 */
2081 void* proc; /* hook procedure if handle is 0 */
2085 /* Start calling a hook chain */
2086 @REQ(start_hook_chain)
2087 int id; /* id of the hook */
2089 user_handle_t handle; /* handle to the next hook */
2090 void* proc; /* hook procedure */
2091 int unicode; /* is it a unicode hook? */
2092 VARARG(module,unicode_str); /* module name */
2096 /* Finished calling a hook chain */
2097 @REQ(finish_hook_chain)
2098 int id; /* id of the hook */
2102 /* Get the next hook to call */
2104 user_handle_t handle; /* handle to the current hook */
2106 user_handle_t next; /* handle to the next hook */
2107 int id; /* id of the next hook */
2108 void* proc; /* next hook procedure */
2109 int prev_unicode; /* was the previous a unicode hook? */
2110 int next_unicode; /* is the next a unicode hook? */
2111 VARARG(module,unicode_str); /* module name */