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 for absolute timeouts */
173 int sec; /* seconds since Unix epoch */
174 int usec; /* microseconds */
177 /* structure returned in the list of window properties */
180 atom_t atom; /* property atom */
181 short string; /* was atom a string originally? */
182 obj_handle_t handle; /* handle stored in property */
185 /* structure to specify window rectangles */
194 /* structure for console char/attribute info */
201 /****************************************************************/
202 /* Request declarations */
204 /* Create a new process from the context of the parent */
206 int inherit_all; /* inherit all handles from parent */
207 int use_handles; /* use stdio handles */
208 int create_flags; /* creation flags */
209 int unix_pid; /* Unix pid of new process */
210 obj_handle_t exe_file; /* file handle for main exe */
211 obj_handle_t hstdin; /* handle for stdin */
212 obj_handle_t hstdout; /* handle for stdout */
213 obj_handle_t hstderr; /* handle for stderr */
214 VARARG(info,startup_info); /* startup information */
216 obj_handle_t info; /* new process info handle */
220 /* Retrieve information about a newly started process */
221 @REQ(get_new_process_info)
222 obj_handle_t info; /* info handle returned from new_process_request */
223 int pinherit; /* process handle inherit flag */
224 int tinherit; /* thread handle inherit flag */
226 process_id_t pid; /* process id */
227 obj_handle_t phandle; /* process handle (in the current process) */
228 thread_id_t tid; /* thread id */
229 obj_handle_t thandle; /* thread handle (in the current process) */
230 int success; /* did the process start successfully? */
234 /* Create a new thread from the context of the parent */
236 int suspend; /* new thread should be suspended on creation */
237 int inherit; /* inherit flag */
238 int request_fd; /* fd for request pipe */
240 thread_id_t tid; /* thread id */
241 obj_handle_t handle; /* thread handle (in the current process) */
245 /* Signal that we are finished booting on the client side */
247 int debug_level; /* new debug level */
251 /* Initialize a process; called from the new process context */
253 void* ldt_copy; /* addr of LDT copy */
255 int create_flags; /* creation flags */
256 unsigned int server_start; /* server start time (GetTickCount) */
257 size_t info_size; /* total size of startup info */
258 obj_handle_t exe_file; /* file handle for main exe */
259 obj_handle_t hstdin; /* handle for stdin */
260 obj_handle_t hstdout; /* handle for stdout */
261 obj_handle_t hstderr; /* handle for stderr */
265 /* Retrieve the new process startup info */
266 @REQ(get_startup_info)
268 VARARG(info,startup_info); /* startup information */
272 /* Signal the end of the process initialization */
273 @REQ(init_process_done)
274 void* module; /* main module base address */
275 size_t module_size; /* main module size */
276 void* entry; /* process entry point */
277 void* name; /* ptr to ptr to name (in process addr space) */
278 obj_handle_t exe_file; /* file handle for main exe */
279 int gui; /* is it a GUI process? */
280 VARARG(filename,string); /* file name of main exe */
282 int debugged; /* being debugged? */
286 /* Initialize a thread; called from the child after fork()/clone() */
288 int unix_pid; /* Unix pid of new thread */
289 int unix_tid; /* Unix tid of new thread */
290 void* teb; /* TEB of new thread (in thread address space) */
291 void* entry; /* thread entry point (in thread address space) */
292 int reply_fd; /* fd for reply pipe */
293 int wait_fd; /* fd for blocking calls pipe */
295 process_id_t pid; /* process id of the new thread's process */
296 thread_id_t tid; /* thread id of the new thread */
297 int boot; /* is this the boot thread? */
298 int version; /* protocol version */
302 /* Terminate a process */
303 @REQ(terminate_process)
304 obj_handle_t handle; /* process handle to terminate */
305 int exit_code; /* process exit code */
307 int self; /* suicide? */
311 /* Terminate a thread */
312 @REQ(terminate_thread)
313 obj_handle_t handle; /* thread handle to terminate */
314 int exit_code; /* thread exit code */
316 int self; /* suicide? */
317 int last; /* last thread in this process? */
321 /* Retrieve information about a process */
322 @REQ(get_process_info)
323 obj_handle_t handle; /* process handle */
325 process_id_t pid; /* server process id */
326 int debugged; /* debugged? */
327 int exit_code; /* process exit code */
328 int priority; /* priority class */
329 int process_affinity; /* process affinity mask */
330 int system_affinity; /* system affinity mask */
334 /* Set a process informations */
335 @REQ(set_process_info)
336 obj_handle_t handle; /* process handle */
337 int mask; /* setting mask (see below) */
338 int priority; /* priority class */
339 int affinity; /* affinity mask */
341 #define SET_PROCESS_INFO_PRIORITY 0x01
342 #define SET_PROCESS_INFO_AFFINITY 0x02
345 /* Retrieve information about a thread */
346 @REQ(get_thread_info)
347 obj_handle_t handle; /* thread handle */
348 thread_id_t tid_in; /* thread id (optional) */
350 thread_id_t tid; /* server thread id */
351 void* teb; /* thread teb pointer */
352 int exit_code; /* thread exit code */
353 int priority; /* thread priority level */
354 time_t creation_time; /* thread creation time */
355 time_t exit_time; /* thread exit time */
359 /* Set a thread informations */
360 @REQ(set_thread_info)
361 obj_handle_t handle; /* thread handle */
362 int mask; /* setting mask (see below) */
363 int priority; /* priority class */
364 int affinity; /* affinity mask */
366 #define SET_THREAD_INFO_PRIORITY 0x01
367 #define SET_THREAD_INFO_AFFINITY 0x02
370 /* Retrieve information about a module */
372 obj_handle_t handle; /* process handle */
373 void* base_address; /* base address of module */
375 size_t size; /* module size */
377 VARARG(filename,string); /* file name of module */
381 /* Suspend a thread */
383 obj_handle_t handle; /* thread handle */
385 int count; /* new suspend count */
389 /* Resume a thread */
391 obj_handle_t handle; /* thread handle */
393 int count; /* new suspend count */
397 /* Notify the server that a dll has been loaded */
399 obj_handle_t handle; /* file handle */
400 void* base; /* base address */
401 size_t size; /* dll size */
402 int dbg_offset; /* debug info offset */
403 int dbg_size; /* debug info size */
404 void* name; /* ptr to ptr to name (in process addr space) */
405 VARARG(filename,string); /* file name of dll */
409 /* Notify the server that a dll is being unloaded */
411 void* base; /* base address */
415 /* Queue an APC for a thread */
417 obj_handle_t handle; /* thread handle */
418 int user; /* user or system apc? */
419 void* func; /* function to call */
420 void* param; /* param for function to call */
424 /* Get next APC to call */
426 int alertable; /* is thread alertable? */
428 void* func; /* function to call */
429 int type; /* function type */
430 VARARG(args,ptrs); /* function arguments */
432 enum apc_type { APC_NONE, APC_USER, APC_TIMER, APC_ASYNC, APC_ASYNC_IO };
435 /* Close a handle for the current process */
437 obj_handle_t handle; /* handle to close */
439 int fd; /* associated fd to close */
443 /* Set a handle information */
444 @REQ(set_handle_info)
445 obj_handle_t handle; /* handle we are interested in */
446 int flags; /* new handle flags */
447 int mask; /* mask for flags to set */
448 int fd; /* file descriptor or -1 */
450 int old_flags; /* old flag value */
451 int cur_fd; /* current file descriptor */
455 /* Duplicate a handle */
457 obj_handle_t src_process; /* src process handle */
458 obj_handle_t src_handle; /* src handle to duplicate */
459 obj_handle_t dst_process; /* dst process handle */
460 unsigned int access; /* wanted access rights */
461 int inherit; /* inherit flag */
462 int options; /* duplicate options (see below) */
464 obj_handle_t handle; /* duplicated handle in dst process */
465 int fd; /* associated fd to close */
467 #define DUP_HANDLE_CLOSE_SOURCE DUPLICATE_CLOSE_SOURCE
468 #define DUP_HANDLE_SAME_ACCESS DUPLICATE_SAME_ACCESS
469 #define DUP_HANDLE_MAKE_GLOBAL 0x80000000 /* Not a Windows flag */
472 /* Open a handle to a process */
474 process_id_t pid; /* process id to open */
475 unsigned int access; /* wanted access rights */
476 int inherit; /* inherit flag */
478 obj_handle_t handle; /* handle to the process */
482 /* Open a handle to a thread */
484 thread_id_t tid; /* thread id to open */
485 unsigned int access; /* wanted access rights */
486 int inherit; /* inherit flag */
488 obj_handle_t handle; /* handle to the thread */
492 /* Wait for handles */
494 int flags; /* wait flags (see below) */
495 void* cookie; /* magic cookie to return to client */
496 abs_time_t timeout; /* absolute timeout */
497 VARARG(handles,handles); /* handles to select on */
500 #define SELECT_ALERTABLE 2
501 #define SELECT_INTERRUPTIBLE 4
502 #define SELECT_TIMEOUT 8
505 /* Create an event */
507 int manual_reset; /* manual reset event */
508 int initial_state; /* initial state of the event */
509 int inherit; /* inherit flag */
510 VARARG(name,unicode_str); /* object name */
512 obj_handle_t handle; /* handle to the event */
515 /* Event operation */
517 obj_handle_t handle; /* handle to event */
518 int op; /* event operation (see below) */
520 enum event_op { PULSE_EVENT, SET_EVENT, RESET_EVENT };
525 unsigned int access; /* wanted access rights */
526 int inherit; /* inherit flag */
527 VARARG(name,unicode_str); /* object name */
529 obj_handle_t handle; /* handle to the event */
535 int owned; /* initially owned? */
536 int inherit; /* inherit flag */
537 VARARG(name,unicode_str); /* object name */
539 obj_handle_t handle; /* handle to the mutex */
543 /* Release a mutex */
545 obj_handle_t handle; /* handle to the mutex */
551 unsigned int access; /* wanted access rights */
552 int inherit; /* inherit flag */
553 VARARG(name,unicode_str); /* object name */
555 obj_handle_t handle; /* handle to the mutex */
559 /* Create a semaphore */
560 @REQ(create_semaphore)
561 unsigned int initial; /* initial count */
562 unsigned int max; /* maximum count */
563 int inherit; /* inherit flag */
564 VARARG(name,unicode_str); /* object name */
566 obj_handle_t handle; /* handle to the semaphore */
570 /* Release a semaphore */
571 @REQ(release_semaphore)
572 obj_handle_t handle; /* handle to the semaphore */
573 unsigned int count; /* count to add to semaphore */
575 unsigned int prev_count; /* previous semaphore count */
579 /* Open a semaphore */
581 unsigned int access; /* wanted access rights */
582 int inherit; /* inherit flag */
583 VARARG(name,unicode_str); /* object name */
585 obj_handle_t handle; /* handle to the semaphore */
591 unsigned int access; /* wanted access rights */
592 int inherit; /* inherit flag */
593 unsigned int sharing; /* sharing flags */
594 int create; /* file create action */
595 unsigned int attrs; /* file attributes for creation */
596 int drive_type; /* type of drive the file is on */
597 VARARG(filename,string); /* file name */
599 obj_handle_t handle; /* handle to the file */
603 /* Allocate a file handle for a Unix fd */
604 @REQ(alloc_file_handle)
605 unsigned int access; /* wanted access rights */
606 int inherit; /* inherit flag */
607 int fd; /* file descriptor on the client side */
609 obj_handle_t handle; /* handle to the file */
613 /* Get a Unix fd to access a file */
615 obj_handle_t handle; /* handle to the file */
616 unsigned int access; /* wanted access rights */
618 int fd; /* file descriptor */
619 int type; /* the type of file (see below) */
620 int flags; /* file read/write flags (see below) */
630 #define FD_FLAG_OVERLAPPED 0x01
631 #define FD_FLAG_TIMEOUT 0x02
632 #define FD_FLAG_RECV_SHUTDOWN 0x04
633 #define FD_FLAG_SEND_SHUTDOWN 0x08
635 /* Set a file current position */
636 @REQ(set_file_pointer)
637 obj_handle_t handle; /* handle to the file */
638 int low; /* position low word */
639 int high; /* position high word */
640 int whence; /* whence to seek */
642 int new_low; /* new position low word */
643 int new_high; /* new position high word */
647 /* Truncate (or extend) a file */
649 obj_handle_t handle; /* handle to the file */
653 /* Set a file access and modification times */
655 obj_handle_t handle; /* handle to the file */
656 time_t access_time; /* last access time */
657 time_t write_time; /* last write time */
661 /* Flush a file buffers */
663 obj_handle_t handle; /* handle to the file */
667 /* Get information about a file */
669 obj_handle_t handle; /* handle to the file */
671 int type; /* file type */
672 int attr; /* file attributes */
673 time_t access_time; /* last access time */
674 time_t write_time; /* last write time */
675 int size_high; /* file size */
676 int size_low; /* file size */
677 int links; /* number of links */
678 int index_high; /* unique index */
679 int index_low; /* unique index */
680 unsigned int serial; /* volume serial number */
684 /* Lock a region of a file */
686 obj_handle_t handle; /* handle to the file */
687 unsigned int offset_low; /* offset of start of lock */
688 unsigned int offset_high; /* offset of start of lock */
689 unsigned int count_low; /* count of bytes to lock */
690 unsigned int count_high; /* count of bytes to lock */
691 int shared; /* shared or exclusive lock? */
692 int wait; /* do we want to wait? */
694 obj_handle_t handle; /* handle to wait on */
695 int overlapped; /* is it an overlapped I/O handle? */
699 /* Unlock a region of a file */
701 obj_handle_t handle; /* handle to the file */
702 unsigned int offset_low; /* offset of start of unlock */
703 unsigned int offset_high; /* offset of start of unlock */
704 unsigned int count_low; /* count of bytes to unlock */
705 unsigned int count_high; /* count of bytes to unlock */
709 /* Create an anonymous pipe */
711 int inherit; /* inherit flag */
713 obj_handle_t handle_read; /* handle to the read-side of the pipe */
714 obj_handle_t handle_write; /* handle to the write-side of the pipe */
718 /* Create a socket */
720 unsigned int access; /* wanted access rights */
721 int inherit; /* inherit flag */
722 int family; /* family, see socket manpage */
723 int type; /* type, see socket manpage */
724 int protocol; /* protocol, see socket manpage */
725 unsigned int flags; /* socket flags */
727 obj_handle_t handle; /* handle to the new socket */
731 /* Accept a socket */
733 obj_handle_t lhandle; /* handle to the listening socket */
734 unsigned int access; /* wanted access rights */
735 int inherit; /* inherit flag */
737 obj_handle_t handle; /* handle to the new socket */
741 /* Set socket event parameters */
742 @REQ(set_socket_event)
743 obj_handle_t handle; /* handle to the socket */
744 unsigned int mask; /* event mask */
745 obj_handle_t event; /* event object */
746 user_handle_t window; /* window to send the message to */
747 unsigned int msg; /* message to send */
751 /* Get socket event parameters */
752 @REQ(get_socket_event)
753 obj_handle_t handle; /* handle to the socket */
754 int service; /* clear pending? */
755 obj_handle_t c_event; /* event to clear */
757 unsigned int mask; /* event mask */
758 unsigned int pmask; /* pending events */
759 unsigned int state; /* status bits */
760 VARARG(errors,ints); /* event errors */
764 /* Reenable pending socket events */
765 @REQ(enable_socket_event)
766 obj_handle_t handle; /* handle to the socket */
767 unsigned int mask; /* events to re-enable */
768 unsigned int sstate; /* status bits to set */
769 unsigned int cstate; /* status bits to clear */
772 @REQ(set_socket_deferred)
773 obj_handle_t handle; /* handle to the socket */
774 obj_handle_t deferred; /* handle to the socket for which accept() is deferred */
777 /* Allocate a console (only used by a console renderer) */
779 unsigned int access; /* wanted access rights */
780 int inherit; /* inherit flag */
781 process_id_t pid; /* pid of process which shall be attached to the console */
783 obj_handle_t handle_in; /* handle to console input */
784 obj_handle_t event; /* handle to renderer events change notification */
788 /* Free the console of the current process */
793 #define CONSOLE_RENDERER_NONE_EVENT 0x00
794 #define CONSOLE_RENDERER_TITLE_EVENT 0x01
795 #define CONSOLE_RENDERER_ACTIVE_SB_EVENT 0x02
796 #define CONSOLE_RENDERER_SB_RESIZE_EVENT 0x03
797 #define CONSOLE_RENDERER_UPDATE_EVENT 0x04
798 #define CONSOLE_RENDERER_CURSOR_POS_EVENT 0x05
799 #define CONSOLE_RENDERER_CURSOR_GEOM_EVENT 0x06
800 #define CONSOLE_RENDERER_DISPLAY_EVENT 0x07
801 #define CONSOLE_RENDERER_EXIT_EVENT 0x08
802 struct console_renderer_event
837 /* retrieve console events for the renderer */
838 @REQ(get_console_renderer_events)
839 obj_handle_t handle; /* handle to console input events */
841 VARARG(data,bytes); /* the various console_renderer_events */
845 /* Open a handle to the process console */
847 int from; /* 0 (resp 1) input (resp output) of current process console */
848 /* otherwise console_in handle to get active screen buffer? */
849 unsigned int access; /* wanted access rights */
850 int inherit; /* inherit flag */
851 int share; /* share mask (only for output handles) */
853 obj_handle_t handle; /* handle to the console */
857 /* Get a console mode (input or output) */
858 @REQ(get_console_mode)
859 obj_handle_t handle; /* handle to the console */
861 int mode; /* console mode */
865 /* Set a console mode (input or output) */
866 @REQ(set_console_mode)
867 obj_handle_t handle; /* handle to the console */
868 int mode; /* console mode */
872 /* Set info about a console (input only) */
873 @REQ(set_console_input_info)
874 obj_handle_t handle; /* handle to console input, or 0 for process' console */
875 int mask; /* setting mask (see below) */
876 obj_handle_t active_sb; /* active screen buffer */
877 int history_mode; /* whether we duplicate lines in history */
878 int history_size; /* number of lines in history */
879 int edition_mode; /* index to the edition mode flavors */
880 VARARG(title,unicode_str); /* console title */
882 #define SET_CONSOLE_INPUT_INFO_ACTIVE_SB 0x01
883 #define SET_CONSOLE_INPUT_INFO_TITLE 0x02
884 #define SET_CONSOLE_INPUT_INFO_HISTORY_MODE 0x04
885 #define SET_CONSOLE_INPUT_INFO_HISTORY_SIZE 0x08
886 #define SET_CONSOLE_INPUT_INFO_EDITION_MODE 0x10
889 /* Get info about a console (input only) */
890 @REQ(get_console_input_info)
891 obj_handle_t handle; /* handle to console input, or 0 for process' console */
893 int history_mode; /* whether we duplicate lines in history */
894 int history_size; /* number of lines in history */
895 int history_index; /* number of used lines in history */
896 int edition_mode; /* index to the edition mode flavors */
897 VARARG(title,unicode_str); /* console title */
901 /* appends a string to console's history */
902 @REQ(append_console_input_history)
903 obj_handle_t handle; /* handle to console input, or 0 for process' console */
904 VARARG(line,unicode_str); /* line to add */
908 /* appends a string to console's history */
909 @REQ(get_console_input_history)
910 obj_handle_t handle; /* handle to console input, or 0 for process' console */
911 int index; /* index to get line from */
913 int total; /* total length of line in Unicode chars */
914 VARARG(line,unicode_str); /* line to add */
918 /* creates a new screen buffer on process' console */
919 @REQ(create_console_output)
920 obj_handle_t handle_in; /* handle to console input, or 0 for process' console */
921 int access; /* wanted access rights */
922 int share; /* sharing credentials */
923 int inherit; /* inherit flag */
925 obj_handle_t handle_out; /* handle to the screen buffer */
929 /* Set info about a console (output only) */
930 @REQ(set_console_output_info)
931 obj_handle_t handle; /* handle to the console */
932 int mask; /* setting mask (see below) */
933 short int cursor_size; /* size of cursor (percentage filled) */
934 short int cursor_visible;/* cursor visibility flag */
935 short int cursor_x; /* position of cursor (x, y) */
937 short int width; /* width of the screen buffer */
938 short int height; /* height of the screen buffer */
939 short int attr; /* default attribute */
940 short int win_left; /* window actually displayed by renderer */
941 short int win_top; /* the rect area is expressed withing the */
942 short int win_right; /* boundaries of the screen buffer */
943 short int win_bottom;
944 short int max_width; /* maximum size (width x height) for the window */
945 short int max_height;
947 #define SET_CONSOLE_OUTPUT_INFO_CURSOR_GEOM 0x01
948 #define SET_CONSOLE_OUTPUT_INFO_CURSOR_POS 0x02
949 #define SET_CONSOLE_OUTPUT_INFO_SIZE 0x04
950 #define SET_CONSOLE_OUTPUT_INFO_ATTR 0x08
951 #define SET_CONSOLE_OUTPUT_INFO_DISPLAY_WINDOW 0x10
952 #define SET_CONSOLE_OUTPUT_INFO_MAX_SIZE 0x20
955 /* Get info about a console (output only) */
956 @REQ(get_console_output_info)
957 obj_handle_t handle; /* handle to the console */
959 short int cursor_size; /* size of cursor (percentage filled) */
960 short int cursor_visible;/* cursor visibility flag */
961 short int cursor_x; /* position of cursor (x, y) */
963 short int width; /* width of the screen buffer */
964 short int height; /* height of the screen buffer */
965 short int attr; /* default attribute */
966 short int win_left; /* window actually displayed by renderer */
967 short int win_top; /* the rect area is expressed withing the */
968 short int win_right; /* boundaries of the screen buffer */
969 short int win_bottom;
970 short int max_width; /* maximum size (width x height) for the window */
971 short int max_height;
974 /* Add input records to a console input queue */
975 @REQ(write_console_input)
976 obj_handle_t handle; /* handle to the console input */
977 VARARG(rec,input_records); /* input records */
979 int written; /* number of records written */
983 /* Fetch input records from a console input queue */
984 @REQ(read_console_input)
985 obj_handle_t handle; /* handle to the console input */
986 int flush; /* flush the retrieved records from the queue? */
988 int read; /* number of records read */
989 VARARG(rec,input_records); /* input records */
993 /* write data (chars and/or attributes) in a screen buffer */
994 @REQ(write_console_output)
995 obj_handle_t handle; /* handle to the console output */
996 int x; /* position where to start writing */
998 int mode; /* char info (see below) */
999 int wrap; /* wrap around at end of line? */
1000 VARARG(data,bytes); /* info to write */
1002 int written; /* number of char infos actually written */
1003 int width; /* width of screen buffer */
1004 int height; /* height of screen buffer */
1008 CHAR_INFO_MODE_TEXT, /* characters only */
1009 CHAR_INFO_MODE_ATTR, /* attributes only */
1010 CHAR_INFO_MODE_TEXTATTR, /* both characters and attributes */
1011 CHAR_INFO_MODE_TEXTSTDATTR /* characters but use standard attributes */
1015 /* fill a screen buffer with constant data (chars and/or attributes) */
1016 @REQ(fill_console_output)
1017 obj_handle_t handle; /* handle to the console output */
1018 int x; /* position where to start writing */
1020 int mode; /* char info mode */
1021 int count; /* number to write */
1022 int wrap; /* wrap around at end of line? */
1023 char_info_t data; /* data to write */
1025 int written; /* number of char infos actually written */
1029 /* read data (chars and/or attributes) from a screen buffer */
1030 @REQ(read_console_output)
1031 obj_handle_t handle; /* handle to the console output */
1032 int x; /* position (x,y) where to start reading */
1034 int mode; /* char info mode */
1035 int wrap; /* wrap around at end of line? */
1037 int width; /* width of screen buffer */
1038 int height; /* height of screen buffer */
1043 /* move a rect (of data) in screen buffer content */
1044 @REQ(move_console_output)
1045 obj_handle_t handle; /* handle to the console output */
1046 short int x_src; /* position (x, y) of rect to start moving from */
1048 short int x_dst; /* position (x, y) of rect to move to */
1050 short int w; /* size of the rect (width, height) to move */
1055 /* Sends a signal to a process group */
1056 @REQ(send_console_signal)
1057 int signal; /* the signal to send */
1058 process_id_t group_id; /* the group to send the signal to */
1062 /* Create a change notification */
1063 @REQ(create_change_notification)
1064 obj_handle_t handle; /* handle to the directory */
1065 int subtree; /* watch all the subtree */
1066 unsigned int filter; /* notification filter */
1068 obj_handle_t handle; /* handle to the change notification */
1072 /* Move to the next change notification */
1073 @REQ(next_change_notification)
1074 obj_handle_t handle; /* handle to the change notification */
1077 /* Create a file mapping */
1078 @REQ(create_mapping)
1079 int size_high; /* mapping size */
1080 int size_low; /* mapping size */
1081 int protect; /* protection flags (see below) */
1082 unsigned int access; /* wanted access rights */
1083 int inherit; /* inherit flag */
1084 obj_handle_t file_handle; /* file handle */
1085 VARARG(name,unicode_str); /* object name */
1087 obj_handle_t handle; /* handle to the mapping */
1089 /* protection flags */
1090 #define VPROT_READ 0x01
1091 #define VPROT_WRITE 0x02
1092 #define VPROT_EXEC 0x04
1093 #define VPROT_WRITECOPY 0x08
1094 #define VPROT_GUARD 0x10
1095 #define VPROT_NOCACHE 0x20
1096 #define VPROT_COMMITTED 0x40
1097 #define VPROT_IMAGE 0x80
1100 /* Open a mapping */
1102 unsigned int access; /* wanted access rights */
1103 int inherit; /* inherit flag */
1104 VARARG(name,unicode_str); /* object name */
1106 obj_handle_t handle; /* handle to the mapping */
1110 /* Get information about a file mapping */
1111 @REQ(get_mapping_info)
1112 obj_handle_t handle; /* handle to the mapping */
1114 int size_high; /* mapping size */
1115 int size_low; /* mapping size */
1116 int protect; /* protection flags */
1117 int header_size; /* header size (for VPROT_IMAGE mapping) */
1118 void* base; /* default base addr (for VPROT_IMAGE mapping) */
1119 obj_handle_t shared_file; /* shared mapping file handle */
1120 int shared_size; /* shared mapping size */
1121 int drive_type; /* type of drive the file is on */
1125 /* Create a device */
1127 unsigned int access; /* wanted access rights */
1128 int inherit; /* inherit flag */
1129 int id; /* client private id */
1131 obj_handle_t handle; /* handle to the device */
1135 /* Retrieve the client private id for a device */
1137 obj_handle_t handle; /* handle to the device */
1139 int id; /* client private id */
1143 #define SNAP_HEAPLIST 0x00000001
1144 #define SNAP_PROCESS 0x00000002
1145 #define SNAP_THREAD 0x00000004
1146 #define SNAP_MODULE 0x00000008
1147 /* Create a snapshot */
1148 @REQ(create_snapshot)
1149 int inherit; /* inherit flag */
1150 int flags; /* snapshot flags (SNAP_*) */
1151 process_id_t pid; /* process id */
1153 obj_handle_t handle; /* handle to the snapshot */
1157 /* Get the next process from a snapshot */
1159 obj_handle_t handle; /* handle to the snapshot */
1160 int reset; /* reset snapshot position? */
1162 int count; /* process usage count */
1163 process_id_t pid; /* process id */
1164 process_id_t ppid; /* parent process id */
1165 void* heap; /* heap base */
1166 void* module; /* main module */
1167 int threads; /* number of threads */
1168 int priority; /* process priority */
1169 VARARG(filename,string); /* file name of main exe */
1173 /* Get the next thread from a snapshot */
1175 obj_handle_t handle; /* handle to the snapshot */
1176 int reset; /* reset snapshot position? */
1178 int count; /* thread usage count */
1179 process_id_t pid; /* process id */
1180 thread_id_t tid; /* thread id */
1181 int base_pri; /* base priority */
1182 int delta_pri; /* delta priority */
1186 /* Get the next module from a snapshot */
1188 obj_handle_t handle; /* handle to the snapshot */
1189 int reset; /* reset snapshot position? */
1191 process_id_t pid; /* process id */
1192 void* base; /* module base address */
1193 size_t size; /* module size */
1194 VARARG(filename,string); /* file name of module */
1198 /* Wait for a debug event */
1199 @REQ(wait_debug_event)
1200 int get_handle; /* should we alloc a handle for waiting? */
1202 process_id_t pid; /* process id */
1203 thread_id_t tid; /* thread id */
1204 obj_handle_t wait; /* wait handle if no event ready */
1205 VARARG(event,debug_event); /* debug event data */
1209 /* Queue an exception event */
1210 @REQ(queue_exception_event)
1211 int first; /* first chance exception? */
1212 VARARG(record,exc_event); /* thread context followed by exception record */
1214 obj_handle_t handle; /* handle to the queued event */
1218 /* Retrieve the status of an exception event */
1219 @REQ(get_exception_status)
1220 obj_handle_t handle; /* handle to the queued event */
1222 int status; /* event continuation status */
1223 VARARG(context,context); /* modified thread context */
1227 /* Send an output string to the debugger */
1228 @REQ(output_debug_string)
1229 void* string; /* string to display (in debugged process address space) */
1230 int unicode; /* is it Unicode? */
1231 int length; /* string length */
1235 /* Continue a debug event */
1236 @REQ(continue_debug_event)
1237 process_id_t pid; /* process id to continue */
1238 thread_id_t tid; /* thread id to continue */
1239 int status; /* continuation status */
1243 /* Start/stop debugging an existing process */
1245 process_id_t pid; /* id of the process to debug */
1246 int attach; /* 1=attaching / 0=detaching from the process */
1250 /* Simulate a breakpoint in a process */
1252 obj_handle_t handle; /* process handle */
1254 int self; /* was it the caller itself? */
1258 /* Set debugger kill on exit flag */
1259 @REQ(set_debugger_kill_on_exit)
1260 int kill_on_exit; /* 0=detach/1=kill debuggee when debugger dies */
1264 /* Read data from a process address space */
1265 @REQ(read_process_memory)
1266 obj_handle_t handle; /* process handle */
1267 void* addr; /* addr to read from */
1269 VARARG(data,bytes); /* result data */
1273 /* Write data to a process address space */
1274 @REQ(write_process_memory)
1275 obj_handle_t handle; /* process handle */
1276 void* addr; /* addr to write to (must be int-aligned) */
1277 unsigned int first_mask; /* mask for first word */
1278 unsigned int last_mask; /* mask for last word */
1279 VARARG(data,bytes); /* data to write */
1283 /* Create a registry key */
1285 obj_handle_t parent; /* handle to the parent key */
1286 unsigned int access; /* desired access rights */
1287 unsigned int options; /* creation options */
1288 time_t modif; /* last modification time */
1289 size_t namelen; /* length of key name in bytes */
1290 VARARG(name,unicode_str,namelen); /* key name */
1291 VARARG(class,unicode_str); /* class name */
1293 obj_handle_t hkey; /* handle to the created key */
1294 int created; /* has it been newly created? */
1297 /* Open a registry key */
1299 obj_handle_t parent; /* handle to the parent key */
1300 unsigned int access; /* desired access rights */
1301 VARARG(name,unicode_str); /* key name */
1303 obj_handle_t hkey; /* handle to the open key */
1307 /* Delete a registry key */
1309 obj_handle_t hkey; /* handle to the key */
1313 /* Enumerate registry subkeys */
1315 obj_handle_t hkey; /* handle to registry key */
1316 int index; /* index of subkey (or -1 for current key) */
1317 int info_class; /* requested information class */
1319 int subkeys; /* number of subkeys */
1320 int max_subkey; /* longest subkey name */
1321 int max_class; /* longest class name */
1322 int values; /* number of values */
1323 int max_value; /* longest value name */
1324 int max_data; /* longest value data */
1325 time_t modif; /* last modification time */
1326 size_t total; /* total length needed for full name and class */
1327 size_t namelen; /* length of key name in bytes */
1328 VARARG(name,unicode_str,namelen); /* key name */
1329 VARARG(class,unicode_str); /* class name */
1333 /* Set a value of a registry key */
1335 obj_handle_t hkey; /* handle to registry key */
1336 int type; /* value type */
1337 size_t namelen; /* length of value name in bytes */
1338 VARARG(name,unicode_str,namelen); /* value name */
1339 VARARG(data,bytes); /* value data */
1343 /* Retrieve the value of a registry key */
1345 obj_handle_t hkey; /* handle to registry key */
1346 VARARG(name,unicode_str); /* value name */
1348 int type; /* value type */
1349 size_t total; /* total length needed for data */
1350 VARARG(data,bytes); /* value data */
1354 /* Enumerate a value of a registry key */
1355 @REQ(enum_key_value)
1356 obj_handle_t hkey; /* handle to registry key */
1357 int index; /* value index */
1358 int info_class; /* requested information class */
1360 int type; /* value type */
1361 size_t total; /* total length needed for full name and data */
1362 size_t namelen; /* length of value name in bytes */
1363 VARARG(name,unicode_str,namelen); /* value name */
1364 VARARG(data,bytes); /* value data */
1368 /* Delete a value of a registry key */
1369 @REQ(delete_key_value)
1370 obj_handle_t hkey; /* handle to registry key */
1371 VARARG(name,unicode_str); /* value name */
1375 /* Load a registry branch from a file */
1377 obj_handle_t hkey; /* root key to load to */
1378 obj_handle_t file; /* file to load from */
1379 VARARG(name,unicode_str); /* subkey name */
1383 /* Save a registry branch to a file */
1385 obj_handle_t hkey; /* key to save */
1386 obj_handle_t file; /* file to save to */
1390 /* Save a registry branch at server exit */
1391 @REQ(save_registry_atexit)
1392 obj_handle_t hkey; /* key to save */
1393 VARARG(file,string); /* file to save to */
1397 /* Set the current and saving level for the registry */
1398 @REQ(set_registry_levels)
1399 int current; /* new current level */
1400 int saving; /* new saving level */
1401 int period; /* duration between periodic saves (milliseconds) */
1405 @REQ(set_registry_notification)
1406 obj_handle_t hkey; /* key to watch for changes */
1407 obj_handle_t event; /* event to set */
1408 int subtree; /* should we watch the whole subtree? */
1409 unsigned int filter; /* things to watch */
1413 /* Create a waitable timer */
1415 int inherit; /* inherit flag */
1416 int manual; /* manual reset */
1417 VARARG(name,unicode_str); /* object name */
1419 obj_handle_t handle; /* handle to the timer */
1423 /* Open a waitable timer */
1425 unsigned int access; /* wanted access rights */
1426 int inherit; /* inherit flag */
1427 VARARG(name,unicode_str); /* object name */
1429 obj_handle_t handle; /* handle to the timer */
1432 /* Set a waitable timer */
1434 obj_handle_t handle; /* handle to the timer */
1435 abs_time_t expire; /* next expiration absolute time */
1436 int period; /* timer period in ms */
1437 void* callback; /* callback function */
1438 void* arg; /* callback argument */
1441 /* Cancel a waitable timer */
1443 obj_handle_t handle; /* handle to the timer */
1447 /* Retrieve the current context of a thread */
1448 @REQ(get_thread_context)
1449 obj_handle_t handle; /* thread handle */
1450 unsigned int flags; /* context flags */
1452 VARARG(context,context); /* thread context */
1456 /* Set the current context of a thread */
1457 @REQ(set_thread_context)
1458 obj_handle_t handle; /* thread handle */
1459 unsigned int flags; /* context flags */
1460 VARARG(context,context); /* thread context */
1464 /* Fetch a selector entry for a thread */
1465 @REQ(get_selector_entry)
1466 obj_handle_t handle; /* thread handle */
1467 int entry; /* LDT entry */
1469 unsigned int base; /* selector base */
1470 unsigned int limit; /* selector limit */
1471 unsigned char flags; /* selector flags */
1477 int local; /* is atom in local process table? */
1478 VARARG(name,unicode_str); /* atom name */
1480 atom_t atom; /* resulting atom */
1484 /* Delete an atom */
1486 atom_t atom; /* atom handle */
1487 int local; /* is atom in local process table? */
1493 int local; /* is atom in local process table? */
1494 VARARG(name,unicode_str); /* atom name */
1496 atom_t atom; /* atom handle */
1500 /* Get an atom name */
1502 atom_t atom; /* atom handle */
1503 int local; /* is atom in local process table? */
1505 int count; /* atom lock count */
1506 VARARG(name,unicode_str); /* atom name */
1510 /* Init the process atom table */
1511 @REQ(init_atom_table)
1512 int entries; /* number of entries */
1516 /* Get the message queue of the current thread */
1519 obj_handle_t handle; /* handle to the queue */
1523 /* Set the current message queue wakeup mask */
1524 @REQ(set_queue_mask)
1525 unsigned int wake_mask; /* wakeup bits mask */
1526 unsigned int changed_mask; /* changed bits mask */
1527 int skip_wait; /* will we skip waiting if signaled? */
1529 unsigned int wake_bits; /* current wake bits */
1530 unsigned int changed_bits; /* current changed bits */
1534 /* Get the current message queue status */
1535 @REQ(get_queue_status)
1536 int clear; /* should we clear the change bits? */
1538 unsigned int wake_bits; /* wake bits */
1539 unsigned int changed_bits; /* changed bits since last time */
1543 /* Wait for a process to start waiting on input */
1544 @REQ(wait_input_idle)
1545 obj_handle_t handle; /* process handle */
1546 int timeout; /* timeout */
1548 obj_handle_t event; /* handle to idle event */
1552 /* Send a message to a thread queue */
1554 thread_id_t id; /* thread id */
1555 int type; /* message type (see below) */
1556 user_handle_t win; /* window handle */
1557 unsigned int msg; /* message code */
1558 unsigned int wparam; /* parameters */
1559 unsigned int lparam; /* parameters */
1560 int x; /* x position */
1561 int y; /* y position */
1562 unsigned int time; /* message time */
1563 unsigned int info; /* extra info */
1564 int timeout; /* timeout for reply */
1565 VARARG(data,bytes); /* message data for sent messages */
1570 MSG_ASCII, /* Ascii message (from SendMessageA) */
1571 MSG_UNICODE, /* Unicode message (from SendMessageW) */
1572 MSG_NOTIFY, /* notify message (from SendNotifyMessageW), always Unicode */
1573 MSG_CALLBACK, /* callback message (from SendMessageCallbackW), always Unicode */
1574 MSG_OTHER_PROCESS, /* sent from other process, may include vararg data, always Unicode */
1575 MSG_POSTED, /* posted message (from PostMessageW), always Unicode */
1576 MSG_HARDWARE /* hardware message */
1580 /* Get a message from the current queue */
1582 int flags; /* see below */
1583 user_handle_t get_win; /* window handle to get */
1584 unsigned int get_first; /* first message code to get */
1585 unsigned int get_last; /* last message code to get */
1587 int type; /* message type */
1588 user_handle_t win; /* window handle */
1589 unsigned int msg; /* message code */
1590 unsigned int wparam; /* parameters */
1591 unsigned int lparam; /* parameters */
1592 int x; /* x position */
1593 int y; /* y position */
1594 unsigned int time; /* message time */
1595 unsigned int info; /* extra info */
1596 size_t total; /* total size of extra data */
1597 VARARG(data,bytes); /* message data for sent messages */
1599 #define GET_MSG_REMOVE 1 /* remove the message */
1600 #define GET_MSG_SENT_ONLY 2 /* only get sent messages */
1602 /* Reply to a sent message */
1604 int type; /* type of original message */
1605 unsigned int result; /* message result */
1606 int remove; /* should we remove the message? */
1607 VARARG(data,bytes); /* message data for sent messages */
1611 /* Retrieve the reply for the last message sent */
1612 @REQ(get_message_reply)
1613 int cancel; /* cancel message if not ready? */
1615 unsigned int result; /* message result */
1616 VARARG(data,bytes); /* message data for sent messages */
1620 /* Set a window timer */
1622 user_handle_t win; /* window handle */
1623 unsigned int msg; /* message to post */
1624 unsigned int id; /* timer id */
1625 unsigned int rate; /* timer rate in ms */
1626 unsigned int lparam; /* message lparam (callback proc) */
1630 /* Kill a window timer */
1631 @REQ(kill_win_timer)
1632 user_handle_t win; /* window handle */
1633 unsigned int msg; /* message to post */
1634 unsigned int id; /* timer id */
1638 /* Open a serial port */
1640 unsigned int access; /* wanted access rights */
1641 int inherit; /* inherit flag */
1642 unsigned int attributes; /* eg. FILE_FLAG_OVERLAPPED */
1643 unsigned int sharing; /* sharing flags */
1644 VARARG(name,string); /* file name */
1646 obj_handle_t handle; /* handle to the port */
1650 /* Retrieve info about a serial port */
1651 @REQ(get_serial_info)
1652 obj_handle_t handle; /* handle to comm port */
1654 unsigned int readinterval;
1655 unsigned int readconst;
1656 unsigned int readmult;
1657 unsigned int writeconst;
1658 unsigned int writemult;
1659 unsigned int eventmask;
1660 unsigned int commerror;
1664 /* Set info about a serial port */
1665 @REQ(set_serial_info)
1666 obj_handle_t handle; /* handle to comm port */
1667 int flags; /* bitmask to set values (see below) */
1668 unsigned int readinterval;
1669 unsigned int readconst;
1670 unsigned int readmult;
1671 unsigned int writeconst;
1672 unsigned int writemult;
1673 unsigned int eventmask;
1674 unsigned int commerror;
1676 #define SERIALINFO_SET_TIMEOUTS 0x01
1677 #define SERIALINFO_SET_MASK 0x02
1678 #define SERIALINFO_SET_ERROR 0x04
1681 /* Create / reschedule an async I/O */
1682 @REQ(register_async)
1683 obj_handle_t handle; /* handle to comm port, socket or file */
1687 unsigned int status;
1689 #define ASYNC_TYPE_NONE 0x00
1690 #define ASYNC_TYPE_READ 0x01
1691 #define ASYNC_TYPE_WRITE 0x02
1692 #define ASYNC_TYPE_WAIT 0x03
1695 /* Create a named pipe */
1696 @REQ(create_named_pipe)
1697 unsigned int openmode;
1698 unsigned int pipemode;
1699 unsigned int maxinstances;
1700 unsigned int outsize;
1701 unsigned int insize;
1702 unsigned int timeout;
1703 VARARG(name,unicode_str); /* pipe name */
1705 obj_handle_t handle; /* handle to the pipe */
1709 /* Open an existing named pipe */
1710 @REQ(open_named_pipe)
1711 unsigned int access;
1712 VARARG(name,unicode_str); /* pipe name */
1714 obj_handle_t handle; /* handle to the pipe */
1718 /* Connect to a named pipe */
1719 @REQ(connect_named_pipe)
1720 obj_handle_t handle;
1726 /* Wait for a named pipe */
1727 @REQ(wait_named_pipe)
1728 unsigned int timeout;
1731 VARARG(name,unicode_str); /* pipe name */
1735 /* Disconnect a named pipe */
1736 @REQ(disconnect_named_pipe)
1737 obj_handle_t handle;
1741 @REQ(get_named_pipe_info)
1742 obj_handle_t handle;
1745 unsigned int maxinstances;
1746 unsigned int outsize;
1747 unsigned int insize;
1753 unsigned int tree_id;
1754 unsigned int user_id;
1755 unsigned int file_id;
1756 unsigned int dialect;
1758 obj_handle_t handle;
1763 obj_handle_t handle;
1765 unsigned int offset;
1767 unsigned int tree_id;
1768 unsigned int user_id;
1769 unsigned int dialect;
1770 unsigned int file_id;
1771 unsigned int offset;
1773 #define SMBINFO_SET_OFFSET 0x01
1776 /* Create a window */
1778 user_handle_t parent; /* parent window */
1779 user_handle_t owner; /* owner window */
1780 atom_t atom; /* class atom */
1782 user_handle_t handle; /* created window */
1786 /* Link a window into the tree */
1788 user_handle_t handle; /* handle to the window */
1789 user_handle_t parent; /* handle to the parent */
1790 user_handle_t previous; /* previous child in Z-order */
1792 user_handle_t full_parent; /* full handle of new parent */
1796 /* Destroy a window */
1797 @REQ(destroy_window)
1798 user_handle_t handle; /* handle to the window */
1802 /* Set a window owner */
1803 @REQ(set_window_owner)
1804 user_handle_t handle; /* handle to the window */
1805 user_handle_t owner; /* new owner */
1807 user_handle_t full_owner; /* full handle of new owner */
1808 user_handle_t prev_owner; /* full handle of previous owner */
1812 /* Get information from a window handle */
1813 @REQ(get_window_info)
1814 user_handle_t handle; /* handle to the window */
1816 user_handle_t full_handle; /* full 32-bit handle */
1817 user_handle_t last_active; /* last active popup */
1818 process_id_t pid; /* process owning the window */
1819 thread_id_t tid; /* thread owning the window */
1820 atom_t atom; /* class atom */
1824 /* Set some information in a window */
1825 @REQ(set_window_info)
1826 user_handle_t handle; /* handle to the window */
1827 unsigned int flags; /* flags for fields to set (see below) */
1828 unsigned int style; /* window style */
1829 unsigned int ex_style; /* window extended style */
1830 unsigned int id; /* window id */
1831 void* instance; /* creator instance */
1832 void* user_data; /* user-specific data */
1834 unsigned int old_style; /* old window style */
1835 unsigned int old_ex_style; /* old window extended style */
1836 unsigned int old_id; /* old window id */
1837 void* old_instance; /* old creator instance */
1838 void* old_user_data; /* old user-specific data */
1840 #define SET_WIN_STYLE 0x01
1841 #define SET_WIN_EXSTYLE 0x02
1842 #define SET_WIN_ID 0x04
1843 #define SET_WIN_INSTANCE 0x08
1844 #define SET_WIN_USERDATA 0x10
1847 /* Get a list of the window parents, up to the root of the tree */
1848 @REQ(get_window_parents)
1849 user_handle_t handle; /* handle to the window */
1851 int count; /* total count of parents */
1852 VARARG(parents,user_handles); /* parent handles */
1856 /* Get a list of the window children */
1857 @REQ(get_window_children)
1858 user_handle_t parent; /* parent window */
1859 atom_t atom; /* class atom for the listed children */
1860 thread_id_t tid; /* thread owning the listed children */
1862 int count; /* total count of children */
1863 VARARG(children,user_handles); /* children handles */
1867 /* Get window tree information from a window handle */
1868 @REQ(get_window_tree)
1869 user_handle_t handle; /* handle to the window */
1871 user_handle_t parent; /* parent window */
1872 user_handle_t owner; /* owner window */
1873 user_handle_t next_sibling; /* next sibling in Z-order */
1874 user_handle_t prev_sibling; /* prev sibling in Z-order */
1875 user_handle_t first_sibling; /* first sibling in Z-order */
1876 user_handle_t last_sibling; /* last sibling in Z-order */
1877 user_handle_t first_child; /* first child */
1878 user_handle_t last_child; /* last child */
1881 /* Set the window and client rectangles of a window */
1882 @REQ(set_window_rectangles)
1883 user_handle_t handle; /* handle to the window */
1884 rectangle_t window; /* window rectangle */
1885 rectangle_t client; /* client rectangle */
1889 /* Get the window and client rectangles of a window */
1890 @REQ(get_window_rectangles)
1891 user_handle_t handle; /* handle to the window */
1893 rectangle_t window; /* window rectangle */
1894 rectangle_t client; /* client rectangle */
1898 /* Get the window text */
1899 @REQ(get_window_text)
1900 user_handle_t handle; /* handle to the window */
1902 VARARG(text,unicode_str); /* window text */
1906 /* Set the window text */
1907 @REQ(set_window_text)
1908 user_handle_t handle; /* handle to the window */
1909 VARARG(text,unicode_str); /* window text */
1913 /* Increment the window paint count */
1914 @REQ(inc_window_paint_count)
1915 user_handle_t handle; /* handle to the window */
1916 int incr; /* increment (can be negative) */
1920 /* Get the coordinates offset between two windows */
1921 @REQ(get_windows_offset)
1922 user_handle_t from; /* handle to the first window */
1923 user_handle_t to; /* handle to the second window */
1925 int x; /* x coordinate offset */
1926 int y; /* y coordinate offset */
1930 /* Set a window property */
1931 @REQ(set_window_property)
1932 user_handle_t window; /* handle to the window */
1933 atom_t atom; /* property atom (high-word set if it was a string) */
1934 int string; /* was atom a string originally? */
1935 obj_handle_t handle; /* handle to store */
1939 /* Remove a window property */
1940 @REQ(remove_window_property)
1941 user_handle_t window; /* handle to the window */
1942 atom_t atom; /* property atom */
1944 obj_handle_t handle; /* handle stored in property */
1948 /* Get a window property */
1949 @REQ(get_window_property)
1950 user_handle_t window; /* handle to the window */
1951 atom_t atom; /* property atom */
1953 obj_handle_t handle; /* handle stored in property */
1957 /* Get the list of properties of a window */
1958 @REQ(get_window_properties)
1959 user_handle_t window; /* handle to the window */
1961 int total; /* total number of properties */
1962 VARARG(props,properties); /* list of properties */
1966 /* Attach (or detach) thread inputs */
1967 @REQ(attach_thread_input)
1968 thread_id_t tid_from; /* thread to be attached */
1969 thread_id_t tid_to; /* thread to which tid_from should be attached */
1970 int attach; /* is it an attach? */
1974 /* Get input data for a given thread */
1975 @REQ(get_thread_input)
1976 thread_id_t tid; /* id of thread */
1978 user_handle_t focus; /* handle to the focus window */
1979 user_handle_t capture; /* handle to the capture window */
1980 user_handle_t active; /* handle to the active window */
1981 user_handle_t foreground; /* handle to the global foreground window */
1982 user_handle_t menu_owner; /* handle to the menu owner */
1983 user_handle_t move_size; /* handle to the moving/resizing window */
1984 user_handle_t caret; /* handle to the caret window */
1985 rectangle_t rect; /* caret rectangle */
1988 /* Retrieve queue keyboard state for a given thread */
1990 thread_id_t tid; /* id of thread */
1991 int key; /* optional key code or -1 */
1993 unsigned char state; /* state of specified key */
1994 VARARG(keystate,bytes); /* state array for all the keys */
1997 /* Set queue keyboard state for a given thread */
1999 thread_id_t tid; /* id of thread */
2000 VARARG(keystate,bytes); /* state array for all the keys */
2003 /* Set the system foreground window */
2004 @REQ(set_foreground_window)
2005 user_handle_t handle; /* handle to the foreground window */
2007 user_handle_t previous; /* handle to the previous foreground window */
2008 int send_msg_old; /* whether we have to send a msg to the old window */
2009 int send_msg_new; /* whether we have to send a msg to the new window */
2012 /* Set the current thread focus window */
2013 @REQ(set_focus_window)
2014 user_handle_t handle; /* handle to the focus window */
2016 user_handle_t previous; /* handle to the previous focus window */
2019 /* Set the current thread active window */
2020 @REQ(set_active_window)
2021 user_handle_t handle; /* handle to the active window */
2023 user_handle_t previous; /* handle to the previous active window */
2026 /* Set the current thread capture window */
2027 @REQ(set_capture_window)
2028 user_handle_t handle; /* handle to the capture window */
2029 unsigned int flags; /* capture flags (see below) */
2031 user_handle_t previous; /* handle to the previous capture window */
2032 user_handle_t full_handle; /* full 32-bit handle of new capture window */
2034 #define CAPTURE_MENU 0x01 /* capture is for a menu */
2035 #define CAPTURE_MOVESIZE 0x02 /* capture is for moving/resizing */
2038 /* Set the current thread caret window */
2039 @REQ(set_caret_window)
2040 user_handle_t handle; /* handle to the caret window */
2041 int width; /* caret width */
2042 int height; /* caret height */
2044 user_handle_t previous; /* handle to the previous caret window */
2045 rectangle_t old_rect; /* previous caret rectangle */
2046 int old_hide; /* previous hide count */
2047 int old_state; /* previous caret state (1=on, 0=off) */
2051 /* Set the current thread caret information */
2052 @REQ(set_caret_info)
2053 unsigned int flags; /* caret flags (see below) */
2054 user_handle_t handle; /* handle to the caret window */
2055 int x; /* caret x position */
2056 int y; /* caret y position */
2057 int hide; /* increment for hide count (can be negative to show it) */
2058 int state; /* caret state (1=on, 0=off, -1=toggle current state) */
2060 user_handle_t full_handle; /* handle to the current caret window */
2061 rectangle_t old_rect; /* previous caret rectangle */
2062 int old_hide; /* previous hide count */
2063 int old_state; /* previous caret state (1=on, 0=off) */
2065 #define SET_CARET_POS 0x01 /* set the caret position from x,y */
2066 #define SET_CARET_HIDE 0x02 /* increment the caret hide count */
2067 #define SET_CARET_STATE 0x04 /* set the caret on/off state */
2070 /* Set a window hook */
2072 int id; /* id of the hook */
2073 thread_id_t tid; /* id of thread to set the hook into */
2074 void* proc; /* hook procedure */
2075 int unicode; /* is it a unicode hook? */
2076 VARARG(module,unicode_str); /* module name */
2078 user_handle_t handle; /* handle to the hook */
2082 /* Remove a window hook */
2084 user_handle_t handle; /* handle to the hook */
2085 int id; /* id of the hook if handle is 0 */
2086 void* proc; /* hook procedure if handle is 0 */
2090 /* Start calling a hook chain */
2091 @REQ(start_hook_chain)
2092 int id; /* id of the hook */
2094 user_handle_t handle; /* handle to the next hook */
2095 void* proc; /* hook procedure */
2096 int unicode; /* is it a unicode hook? */
2097 VARARG(module,unicode_str); /* module name */
2101 /* Finished calling a hook chain */
2102 @REQ(finish_hook_chain)
2103 int id; /* id of the hook */
2107 /* Get the next hook to call */
2109 user_handle_t handle; /* handle to the current hook */
2111 user_handle_t next; /* handle to the next hook */
2112 int id; /* id of the next hook */
2113 void* proc; /* next hook procedure */
2114 int prev_unicode; /* was the previous a unicode hook? */
2115 int next_unicode; /* is the next a unicode hook? */
2116 VARARG(module,unicode_str); /* module name */