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 */
52 typedef int obj_handle_t;
53 typedef unsigned int user_handle_t;
55 typedef void *obj_handle_t;
56 typedef void *user_handle_t;
59 typedef unsigned short atom_t;
60 typedef unsigned int process_id_t;
61 typedef unsigned int thread_id_t;
63 #define FIRST_USER_HANDLE 0x0020 /* first possible value for low word of user handle */
64 #define LAST_USER_HANDLE 0xffef /* last possible value for low word of user handle */
67 /* definitions of the event data depending on the event code */
68 struct debug_event_exception
70 EXCEPTION_RECORD record; /* exception record */
71 int first; /* first chance exception? */
73 struct debug_event_create_thread
75 obj_handle_t handle; /* handle to the new thread */
76 void *teb; /* thread teb (in debugged process address space) */
77 void *start; /* thread startup routine */
79 struct debug_event_create_process
81 obj_handle_t file; /* handle to the process exe file */
82 obj_handle_t process; /* handle to the new process */
83 obj_handle_t thread; /* handle to the new thread */
84 void *base; /* base of executable image */
85 int dbg_offset; /* offset of debug info in file */
86 int dbg_size; /* size of debug info */
87 void *teb; /* thread teb (in debugged process address space) */
88 void *start; /* thread startup routine */
89 void *name; /* image name (optional) */
90 int unicode; /* is it Unicode? */
92 struct debug_event_exit
94 int exit_code; /* thread or process exit code */
96 struct debug_event_load_dll
98 obj_handle_t handle; /* file handle for the dll */
99 void *base; /* base address of the dll */
100 int dbg_offset; /* offset of debug info in file */
101 int dbg_size; /* size of debug info */
102 void *name; /* image name (optional) */
103 int unicode; /* is it Unicode? */
105 struct debug_event_unload_dll
107 void *base; /* base address of the dll */
109 struct debug_event_output_string
111 void *string; /* string to display (in debugged process address space) */
112 int unicode; /* is it Unicode? */
113 int length; /* string length */
115 struct debug_event_rip_info
120 union debug_event_data
122 struct debug_event_exception exception;
123 struct debug_event_create_thread create_thread;
124 struct debug_event_create_process create_process;
125 struct debug_event_exit exit;
126 struct debug_event_load_dll load_dll;
127 struct debug_event_unload_dll unload_dll;
128 struct debug_event_output_string output_string;
129 struct debug_event_rip_info rip_info;
132 /* debug event data */
135 int code; /* event code */
136 union debug_event_data info; /* event information */
139 /* structure used in sending an fd from client to server */
142 thread_id_t tid; /* thread id */
143 int fd; /* file descriptor on client-side */
146 /* structure sent by the server on the wait fifo */
149 void *cookie; /* magic cookie that was passed in select_request */
150 int signaled; /* wait result */
153 /* structure for process startup info */
156 size_t size; /* size of this structure */
157 size_t filename_len; /* length of filename */
158 size_t cmdline_len; /* length of cmd line */
159 size_t desktop_len; /* length of desktop name */
160 size_t title_len; /* length of title */
161 int x; /* window position */
163 int cx; /* window size */
165 int x_chars; /* console size */
167 int attribute; /* console attributes */
168 int cmd_show; /* main window show mode */
169 unsigned int flags; /* info flags */
170 /* char filename[...]; */
171 /* char cmdline[...]; */
172 /* char desktop[...]; */
173 /* char title[...]; */
176 /* structure returned in the list of window properties */
179 atom_t atom; /* property atom */
180 short string; /* was atom a string originally? */
181 obj_handle_t handle; /* handle stored in property */
184 /* structure to specify window rectangles */
193 /* structure for console char/attribute info */
200 /****************************************************************/
201 /* Request declarations */
203 /* Create a new process from the context of the parent */
205 int inherit_all; /* inherit all handles from parent */
206 int use_handles; /* use stdio handles */
207 int create_flags; /* creation flags */
208 obj_handle_t exe_file; /* file handle for main exe */
209 obj_handle_t hstdin; /* handle for stdin */
210 obj_handle_t hstdout; /* handle for stdout */
211 obj_handle_t hstderr; /* handle for stderr */
212 VARARG(info,startup_info); /* startup information */
214 obj_handle_t info; /* new process info handle */
218 /* Retrieve information about a newly started process */
219 @REQ(get_new_process_info)
220 obj_handle_t info; /* info handle returned from new_process_request */
221 int pinherit; /* process handle inherit flag */
222 int tinherit; /* thread handle inherit flag */
224 process_id_t pid; /* process id */
225 obj_handle_t phandle; /* process handle (in the current process) */
226 thread_id_t tid; /* thread id */
227 obj_handle_t thandle; /* thread handle (in the current process) */
228 int success; /* did the process start successfully? */
232 /* Create a new thread from the context of the parent */
234 int suspend; /* new thread should be suspended on creation */
235 int inherit; /* inherit flag */
236 int request_fd; /* fd for request pipe */
238 thread_id_t tid; /* thread id */
239 obj_handle_t handle; /* thread handle (in the current process) */
243 /* Signal that we are finished booting on the client side */
245 int debug_level; /* new debug level */
249 /* Initialize a process; called from the new process context */
251 void* ldt_copy; /* addr of LDT copy */
252 int ppid; /* parent Unix pid */
254 int create_flags; /* creation flags */
255 unsigned int server_start; /* server start time (GetTickCount) */
256 size_t info_size; /* total size of startup info */
257 obj_handle_t exe_file; /* file handle for main exe */
258 obj_handle_t hstdin; /* handle for stdin */
259 obj_handle_t hstdout; /* handle for stdout */
260 obj_handle_t hstderr; /* handle for stderr */
264 /* Retrieve the new process startup info */
265 @REQ(get_startup_info)
267 VARARG(info,startup_info); /* startup information */
271 /* Signal the end of the process initialization */
272 @REQ(init_process_done)
273 void* module; /* main module base address */
274 size_t module_size; /* main module size */
275 void* entry; /* process entry point */
276 void* name; /* ptr to ptr to name (in process addr space) */
277 obj_handle_t exe_file; /* file handle for main exe */
278 int gui; /* is it a GUI process? */
279 VARARG(filename,string); /* file name of main exe */
281 int debugged; /* being debugged? */
285 /* Initialize a thread; called from the child after fork()/clone() */
287 int unix_pid; /* Unix pid of new thread */
288 void* teb; /* TEB of new thread (in thread address space) */
289 void* entry; /* thread entry point (in thread address space) */
290 int reply_fd; /* fd for reply pipe */
291 int wait_fd; /* fd for blocking calls pipe */
293 process_id_t pid; /* process id of the new thread's process */
294 thread_id_t tid; /* thread id of the new thread */
295 int boot; /* is this the boot thread? */
296 int version; /* protocol version */
300 /* Terminate a process */
301 @REQ(terminate_process)
302 obj_handle_t handle; /* process handle to terminate */
303 int exit_code; /* process exit code */
305 int self; /* suicide? */
309 /* Terminate a thread */
310 @REQ(terminate_thread)
311 obj_handle_t handle; /* thread handle to terminate */
312 int exit_code; /* thread exit code */
314 int self; /* suicide? */
315 int last; /* last thread in this process? */
319 /* Retrieve information about a process */
320 @REQ(get_process_info)
321 obj_handle_t handle; /* process handle */
323 process_id_t pid; /* server process id */
324 int debugged; /* debugged? */
325 int exit_code; /* process exit code */
326 int priority; /* priority class */
327 int process_affinity; /* process affinity mask */
328 int system_affinity; /* system affinity mask */
332 /* Set a process informations */
333 @REQ(set_process_info)
334 obj_handle_t handle; /* process handle */
335 int mask; /* setting mask (see below) */
336 int priority; /* priority class */
337 int affinity; /* affinity mask */
339 #define SET_PROCESS_INFO_PRIORITY 0x01
340 #define SET_PROCESS_INFO_AFFINITY 0x02
343 /* Retrieve information about a thread */
344 @REQ(get_thread_info)
345 obj_handle_t handle; /* thread handle */
346 thread_id_t tid_in; /* thread id (optional) */
348 thread_id_t tid; /* server thread id */
349 void* teb; /* thread teb pointer */
350 int exit_code; /* thread exit code */
351 int priority; /* thread priority level */
355 /* Set a thread informations */
356 @REQ(set_thread_info)
357 obj_handle_t handle; /* thread handle */
358 int mask; /* setting mask (see below) */
359 int priority; /* priority class */
360 int affinity; /* affinity mask */
362 #define SET_THREAD_INFO_PRIORITY 0x01
363 #define SET_THREAD_INFO_AFFINITY 0x02
366 /* Suspend a thread */
368 obj_handle_t handle; /* thread handle */
370 int count; /* new suspend count */
374 /* Resume a thread */
376 obj_handle_t handle; /* thread handle */
378 int count; /* new suspend count */
382 /* Notify the server that a dll has been loaded */
384 obj_handle_t handle; /* file handle */
385 void* base; /* base address */
386 size_t size; /* dll size */
387 int dbg_offset; /* debug info offset */
388 int dbg_size; /* debug info size */
389 void* name; /* ptr to ptr to name (in process addr space) */
390 VARARG(filename,string); /* file name of dll */
394 /* Notify the server that a dll is being unloaded */
396 void* base; /* base address */
400 /* Queue an APC for a thread */
402 obj_handle_t handle; /* thread handle */
403 int user; /* user or system apc? */
404 void* func; /* function to call */
405 void* param; /* param for function to call */
409 /* Get next APC to call */
411 int alertable; /* is thread alertable? */
413 void* func; /* function to call */
414 int type; /* function type */
415 VARARG(args,ptrs); /* function arguments */
417 enum apc_type { APC_NONE, APC_USER, APC_TIMER, APC_ASYNC, APC_ASYNC_IO };
420 /* Close a handle for the current process */
422 obj_handle_t handle; /* handle to close */
424 int fd; /* associated fd to close */
428 /* Set a handle information */
429 @REQ(set_handle_info)
430 obj_handle_t handle; /* handle we are interested in */
431 int flags; /* new handle flags */
432 int mask; /* mask for flags to set */
433 int fd; /* file descriptor or -1 */
435 int old_flags; /* old flag value */
436 int cur_fd; /* current file descriptor */
440 /* Duplicate a handle */
442 obj_handle_t src_process; /* src process handle */
443 obj_handle_t src_handle; /* src handle to duplicate */
444 obj_handle_t dst_process; /* dst process handle */
445 unsigned int access; /* wanted access rights */
446 int inherit; /* inherit flag */
447 int options; /* duplicate options (see below) */
449 obj_handle_t handle; /* duplicated handle in dst process */
450 int fd; /* associated fd to close */
452 #define DUP_HANDLE_CLOSE_SOURCE DUPLICATE_CLOSE_SOURCE
453 #define DUP_HANDLE_SAME_ACCESS DUPLICATE_SAME_ACCESS
454 #define DUP_HANDLE_MAKE_GLOBAL 0x80000000 /* Not a Windows flag */
457 /* Open a handle to a process */
459 process_id_t pid; /* process id to open */
460 unsigned int access; /* wanted access rights */
461 int inherit; /* inherit flag */
463 obj_handle_t handle; /* handle to the process */
467 /* Open a handle to a thread */
469 thread_id_t tid; /* thread id to open */
470 unsigned int access; /* wanted access rights */
471 int inherit; /* inherit flag */
473 obj_handle_t handle; /* handle to the thread */
477 /* Wait for handles */
479 int flags; /* wait flags (see below) */
480 void* cookie; /* magic cookie to return to client */
481 int sec; /* absolute timeout */
482 int usec; /* absolute timeout */
483 VARARG(handles,handles); /* handles to select on */
486 #define SELECT_ALERTABLE 2
487 #define SELECT_INTERRUPTIBLE 4
488 #define SELECT_TIMEOUT 8
491 /* Create an event */
493 int manual_reset; /* manual reset event */
494 int initial_state; /* initial state of the event */
495 int inherit; /* inherit flag */
496 VARARG(name,unicode_str); /* object name */
498 obj_handle_t handle; /* handle to the event */
501 /* Event operation */
503 obj_handle_t handle; /* handle to event */
504 int op; /* event operation (see below) */
506 enum event_op { PULSE_EVENT, SET_EVENT, RESET_EVENT };
511 unsigned int access; /* wanted access rights */
512 int inherit; /* inherit flag */
513 VARARG(name,unicode_str); /* object name */
515 obj_handle_t handle; /* handle to the event */
521 int owned; /* initially owned? */
522 int inherit; /* inherit flag */
523 VARARG(name,unicode_str); /* object name */
525 obj_handle_t handle; /* handle to the mutex */
529 /* Release a mutex */
531 obj_handle_t handle; /* handle to the mutex */
537 unsigned int access; /* wanted access rights */
538 int inherit; /* inherit flag */
539 VARARG(name,unicode_str); /* object name */
541 obj_handle_t handle; /* handle to the mutex */
545 /* Create a semaphore */
546 @REQ(create_semaphore)
547 unsigned int initial; /* initial count */
548 unsigned int max; /* maximum count */
549 int inherit; /* inherit flag */
550 VARARG(name,unicode_str); /* object name */
552 obj_handle_t handle; /* handle to the semaphore */
556 /* Release a semaphore */
557 @REQ(release_semaphore)
558 obj_handle_t handle; /* handle to the semaphore */
559 unsigned int count; /* count to add to semaphore */
561 unsigned int prev_count; /* previous semaphore count */
565 /* Open a semaphore */
567 unsigned int access; /* wanted access rights */
568 int inherit; /* inherit flag */
569 VARARG(name,unicode_str); /* object name */
571 obj_handle_t handle; /* handle to the semaphore */
577 unsigned int access; /* wanted access rights */
578 int inherit; /* inherit flag */
579 unsigned int sharing; /* sharing flags */
580 int create; /* file create action */
581 unsigned int attrs; /* file attributes for creation */
582 int drive_type; /* type of drive the file is on */
583 VARARG(filename,string); /* file name */
585 obj_handle_t handle; /* handle to the file */
589 /* Allocate a file handle for a Unix fd */
590 @REQ(alloc_file_handle)
591 unsigned int access; /* wanted access rights */
592 int inherit; /* inherit flag */
593 int fd; /* file descriptor on the client side */
595 obj_handle_t handle; /* handle to the file */
599 /* Get a Unix fd to access a file */
601 obj_handle_t handle; /* handle to the file */
602 unsigned int access; /* wanted access rights */
604 int fd; /* file descriptor */
605 int type; /* the type of file (see below) */
606 int flags; /* file read/write flags (see below) */
616 #define FD_FLAG_OVERLAPPED 0x01
617 #define FD_FLAG_TIMEOUT 0x02
618 #define FD_FLAG_RECV_SHUTDOWN 0x04
619 #define FD_FLAG_SEND_SHUTDOWN 0x08
621 /* Set a file current position */
622 @REQ(set_file_pointer)
623 obj_handle_t handle; /* handle to the file */
624 int low; /* position low word */
625 int high; /* position high word */
626 int whence; /* whence to seek */
628 int new_low; /* new position low word */
629 int new_high; /* new position high word */
633 /* Truncate (or extend) a file */
635 obj_handle_t handle; /* handle to the file */
639 /* Set a file access and modification times */
641 obj_handle_t handle; /* handle to the file */
642 time_t access_time; /* last access time */
643 time_t write_time; /* last write time */
647 /* Flush a file buffers */
649 obj_handle_t handle; /* handle to the file */
653 /* Get information about a file */
655 obj_handle_t handle; /* handle to the file */
657 int type; /* file type */
658 int attr; /* file attributes */
659 time_t access_time; /* last access time */
660 time_t write_time; /* last write time */
661 int size_high; /* file size */
662 int size_low; /* file size */
663 int links; /* number of links */
664 int index_high; /* unique index */
665 int index_low; /* unique index */
666 unsigned int serial; /* volume serial number */
670 /* Lock a region of a file */
672 obj_handle_t handle; /* handle to the file */
673 unsigned int offset_low; /* offset of start of lock */
674 unsigned int offset_high; /* offset of start of lock */
675 unsigned int count_low; /* count of bytes to lock */
676 unsigned int count_high; /* count of bytes to lock */
680 /* Unlock a region of a file */
682 obj_handle_t handle; /* handle to the file */
683 unsigned int offset_low; /* offset of start of unlock */
684 unsigned int offset_high; /* offset of start of unlock */
685 unsigned int count_low; /* count of bytes to unlock */
686 unsigned int count_high; /* count of bytes to unlock */
690 /* Create an anonymous pipe */
692 int inherit; /* inherit flag */
694 obj_handle_t handle_read; /* handle to the read-side of the pipe */
695 obj_handle_t handle_write; /* handle to the write-side of the pipe */
699 /* Create a socket */
701 unsigned int access; /* wanted access rights */
702 int inherit; /* inherit flag */
703 int family; /* family, see socket manpage */
704 int type; /* type, see socket manpage */
705 int protocol; /* protocol, see socket manpage */
706 unsigned int flags; /* socket flags */
708 obj_handle_t handle; /* handle to the new socket */
712 /* Accept a socket */
714 obj_handle_t lhandle; /* handle to the listening socket */
715 unsigned int access; /* wanted access rights */
716 int inherit; /* inherit flag */
718 obj_handle_t handle; /* handle to the new socket */
722 /* Set socket event parameters */
723 @REQ(set_socket_event)
724 obj_handle_t handle; /* handle to the socket */
725 unsigned int mask; /* event mask */
726 obj_handle_t event; /* event object */
727 user_handle_t window; /* window to send the message to */
728 unsigned int msg; /* message to send */
732 /* Get socket event parameters */
733 @REQ(get_socket_event)
734 obj_handle_t handle; /* handle to the socket */
735 int service; /* clear pending? */
736 obj_handle_t c_event; /* event to clear */
738 unsigned int mask; /* event mask */
739 unsigned int pmask; /* pending events */
740 unsigned int state; /* status bits */
741 VARARG(errors,ints); /* event errors */
745 /* Reenable pending socket events */
746 @REQ(enable_socket_event)
747 obj_handle_t handle; /* handle to the socket */
748 unsigned int mask; /* events to re-enable */
749 unsigned int sstate; /* status bits to set */
750 unsigned int cstate; /* status bits to clear */
753 @REQ(set_socket_deferred)
754 obj_handle_t handle; /* handle to the socket */
755 obj_handle_t deferred; /* handle to the socket for which accept() is deferred */
758 /* Allocate a console (only used by a console renderer) */
760 unsigned int access; /* wanted access rights */
761 int inherit; /* inherit flag */
762 process_id_t pid; /* pid of process which shall be attached to the console */
764 obj_handle_t handle_in; /* handle to console input */
765 obj_handle_t event; /* handle to renderer events change notification */
769 /* Free the console of the current process */
774 #define CONSOLE_RENDERER_NONE_EVENT 0x00
775 #define CONSOLE_RENDERER_TITLE_EVENT 0x01
776 #define CONSOLE_RENDERER_ACTIVE_SB_EVENT 0x02
777 #define CONSOLE_RENDERER_SB_RESIZE_EVENT 0x03
778 #define CONSOLE_RENDERER_UPDATE_EVENT 0x04
779 #define CONSOLE_RENDERER_CURSOR_POS_EVENT 0x05
780 #define CONSOLE_RENDERER_CURSOR_GEOM_EVENT 0x06
781 #define CONSOLE_RENDERER_DISPLAY_EVENT 0x07
782 #define CONSOLE_RENDERER_EXIT_EVENT 0x08
783 struct console_renderer_event
818 /* retrieve console events for the renderer */
819 @REQ(get_console_renderer_events)
820 obj_handle_t handle; /* handle to console input events */
822 VARARG(data,bytes); /* the various console_renderer_events */
826 /* Open a handle to the process console */
828 int from; /* 0 (resp 1) input (resp output) of current process console */
829 /* otherwise console_in handle to get active screen buffer? */
830 unsigned int access; /* wanted access rights */
831 int inherit; /* inherit flag */
832 int share; /* share mask (only for output handles) */
834 obj_handle_t handle; /* handle to the console */
838 /* Get a console mode (input or output) */
839 @REQ(get_console_mode)
840 obj_handle_t handle; /* handle to the console */
842 int mode; /* console mode */
846 /* Set a console mode (input or output) */
847 @REQ(set_console_mode)
848 obj_handle_t handle; /* handle to the console */
849 int mode; /* console mode */
853 /* Set info about a console (input only) */
854 @REQ(set_console_input_info)
855 obj_handle_t handle; /* handle to console input, or 0 for process' console */
856 int mask; /* setting mask (see below) */
857 obj_handle_t active_sb; /* active screen buffer */
858 int history_mode; /* whether we duplicate lines in history */
859 int history_size; /* number of lines in history */
860 VARARG(title,unicode_str); /* console title */
862 #define SET_CONSOLE_INPUT_INFO_ACTIVE_SB 0x01
863 #define SET_CONSOLE_INPUT_INFO_TITLE 0x02
864 #define SET_CONSOLE_INPUT_INFO_HISTORY_MODE 0x04
865 #define SET_CONSOLE_INPUT_INFO_HISTORY_SIZE 0x08
868 /* Get info about a console (input only) */
869 @REQ(get_console_input_info)
870 obj_handle_t handle; /* handle to console input, or 0 for process' console */
872 int history_mode; /* whether we duplicate lines in history */
873 int history_size; /* number of lines in history */
874 int history_index; /* number of used lines in history */
875 VARARG(title,unicode_str); /* console title */
879 /* appends a string to console's history */
880 @REQ(append_console_input_history)
881 obj_handle_t handle; /* handle to console input, or 0 for process' console */
882 VARARG(line,unicode_str); /* line to add */
886 /* appends a string to console's history */
887 @REQ(get_console_input_history)
888 obj_handle_t handle; /* handle to console input, or 0 for process' console */
889 int index; /* index to get line from */
891 int total; /* total length of line in Unicode chars */
892 VARARG(line,unicode_str); /* line to add */
896 /* creates a new screen buffer on process' console */
897 @REQ(create_console_output)
898 obj_handle_t handle_in; /* handle to console input, or 0 for process' console */
899 int access; /* wanted access rights */
900 int share; /* sharing credentials */
901 int inherit; /* inherit flag */
903 obj_handle_t handle_out; /* handle to the screen buffer */
907 /* Set info about a console (output only) */
908 @REQ(set_console_output_info)
909 obj_handle_t handle; /* handle to the console */
910 int mask; /* setting mask (see below) */
911 short int cursor_size; /* size of cursor (percentage filled) */
912 short int cursor_visible;/* cursor visibility flag */
913 short int cursor_x; /* position of cursor (x, y) */
915 short int width; /* width of the screen buffer */
916 short int height; /* height of the screen buffer */
917 short int attr; /* default attribute */
918 short int win_left; /* window actually displayed by renderer */
919 short int win_top; /* the rect area is expressed withing the */
920 short int win_right; /* boundaries of the screen buffer */
921 short int win_bottom;
922 short int max_width; /* maximum size (width x height) for the window */
923 short int max_height;
925 #define SET_CONSOLE_OUTPUT_INFO_CURSOR_GEOM 0x01
926 #define SET_CONSOLE_OUTPUT_INFO_CURSOR_POS 0x02
927 #define SET_CONSOLE_OUTPUT_INFO_SIZE 0x04
928 #define SET_CONSOLE_OUTPUT_INFO_ATTR 0x08
929 #define SET_CONSOLE_OUTPUT_INFO_DISPLAY_WINDOW 0x10
930 #define SET_CONSOLE_OUTPUT_INFO_MAX_SIZE 0x20
933 /* Get info about a console (output only) */
934 @REQ(get_console_output_info)
935 obj_handle_t handle; /* handle to the console */
937 short int cursor_size; /* size of cursor (percentage filled) */
938 short int cursor_visible;/* cursor visibility flag */
939 short int cursor_x; /* position of cursor (x, y) */
941 short int width; /* width of the screen buffer */
942 short int height; /* height of the screen buffer */
943 short int attr; /* default attribute */
944 short int win_left; /* window actually displayed by renderer */
945 short int win_top; /* the rect area is expressed withing the */
946 short int win_right; /* boundaries of the screen buffer */
947 short int win_bottom;
948 short int max_width; /* maximum size (width x height) for the window */
949 short int max_height;
952 /* Add input records to a console input queue */
953 @REQ(write_console_input)
954 obj_handle_t handle; /* handle to the console input */
955 VARARG(rec,input_records); /* input records */
957 int written; /* number of records written */
961 /* Fetch input records from a console input queue */
962 @REQ(read_console_input)
963 obj_handle_t handle; /* handle to the console input */
964 int flush; /* flush the retrieved records from the queue? */
966 int read; /* number of records read */
967 VARARG(rec,input_records); /* input records */
971 /* write data (chars and/or attributes) in a screen buffer */
972 @REQ(write_console_output)
973 obj_handle_t handle; /* handle to the console output */
974 int x; /* position where to start writing */
976 int mode; /* char info (see below) */
977 int wrap; /* wrap around at end of line? */
978 VARARG(data,bytes); /* info to write */
980 int written; /* number of char infos actually written */
981 int width; /* width of screen buffer */
982 int height; /* height of screen buffer */
986 CHAR_INFO_MODE_TEXT, /* characters only */
987 CHAR_INFO_MODE_ATTR, /* attributes only */
988 CHAR_INFO_MODE_TEXTATTR, /* both characters and attributes */
989 CHAR_INFO_MODE_TEXTSTDATTR /* characters but use standard attributes */
993 /* fill a screen buffer with constant data (chars and/or attributes) */
994 @REQ(fill_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 mode */
999 int count; /* number to write */
1000 int wrap; /* wrap around at end of line? */
1001 char_info_t data; /* data to write */
1003 int written; /* number of char infos actually written */
1007 /* read data (chars and/or attributes) from a screen buffer */
1008 @REQ(read_console_output)
1009 obj_handle_t handle; /* handle to the console output */
1010 int x; /* position (x,y) where to start reading */
1012 int mode; /* char info mode */
1013 int wrap; /* wrap around at end of line? */
1015 int width; /* width of screen buffer */
1016 int height; /* height of screen buffer */
1021 /* move a rect (of data) in screen buffer content */
1022 @REQ(move_console_output)
1023 obj_handle_t handle; /* handle to the console output */
1024 short int x_src; /* position (x, y) of rect to start moving from */
1026 short int x_dst; /* position (x, y) of rect to move to */
1028 short int w; /* size of the rect (width, height) to move */
1033 /* Sends a signal to a process group */
1034 @REQ(send_console_signal)
1035 int signal; /* the signal to send */
1036 process_id_t group_id; /* the group to send the signal to */
1040 /* Create a change notification */
1041 @REQ(create_change_notification)
1042 int subtree; /* watch all the subtree */
1043 int filter; /* notification filter */
1045 obj_handle_t handle; /* handle to the change notification */
1049 /* Create a file mapping */
1050 @REQ(create_mapping)
1051 int size_high; /* mapping size */
1052 int size_low; /* mapping size */
1053 int protect; /* protection flags (see below) */
1054 unsigned int access; /* wanted access rights */
1055 int inherit; /* inherit flag */
1056 obj_handle_t file_handle; /* file handle */
1057 VARARG(name,unicode_str); /* object name */
1059 obj_handle_t handle; /* handle to the mapping */
1061 /* protection flags */
1062 #define VPROT_READ 0x01
1063 #define VPROT_WRITE 0x02
1064 #define VPROT_EXEC 0x04
1065 #define VPROT_WRITECOPY 0x08
1066 #define VPROT_GUARD 0x10
1067 #define VPROT_NOCACHE 0x20
1068 #define VPROT_COMMITTED 0x40
1069 #define VPROT_IMAGE 0x80
1072 /* Open a mapping */
1074 unsigned int access; /* wanted access rights */
1075 int inherit; /* inherit flag */
1076 VARARG(name,unicode_str); /* object name */
1078 obj_handle_t handle; /* handle to the mapping */
1082 /* Get information about a file mapping */
1083 @REQ(get_mapping_info)
1084 obj_handle_t handle; /* handle to the mapping */
1086 int size_high; /* mapping size */
1087 int size_low; /* mapping size */
1088 int protect; /* protection flags */
1089 int header_size; /* header size (for VPROT_IMAGE mapping) */
1090 void* base; /* default base addr (for VPROT_IMAGE mapping) */
1091 obj_handle_t shared_file; /* shared mapping file handle */
1092 int shared_size; /* shared mapping size */
1093 int drive_type; /* type of drive the file is on */
1097 /* Create a device */
1099 unsigned int access; /* wanted access rights */
1100 int inherit; /* inherit flag */
1101 int id; /* client private id */
1103 obj_handle_t handle; /* handle to the device */
1107 /* Create a snapshot */
1108 @REQ(create_snapshot)
1109 int inherit; /* inherit flag */
1110 int flags; /* snapshot flags (TH32CS_*) */
1111 process_id_t pid; /* process id */
1113 obj_handle_t handle; /* handle to the snapshot */
1117 /* Get the next process from a snapshot */
1119 obj_handle_t handle; /* handle to the snapshot */
1120 int reset; /* reset snapshot position? */
1122 int count; /* process usage count */
1123 process_id_t pid; /* process id */
1124 process_id_t ppid; /* parent process id */
1125 void* heap; /* heap base */
1126 void* module; /* main module */
1127 int threads; /* number of threads */
1128 int priority; /* process priority */
1129 VARARG(filename,string); /* file name of main exe */
1133 /* Get the next thread from a snapshot */
1135 obj_handle_t handle; /* handle to the snapshot */
1136 int reset; /* reset snapshot position? */
1138 int count; /* thread usage count */
1139 process_id_t pid; /* process id */
1140 thread_id_t tid; /* thread id */
1141 int base_pri; /* base priority */
1142 int delta_pri; /* delta priority */
1146 /* Get the next module from a snapshot */
1148 obj_handle_t handle; /* handle to the snapshot */
1149 int reset; /* reset snapshot position? */
1151 process_id_t pid; /* process id */
1152 void* base; /* module base address */
1153 size_t size; /* module size */
1154 VARARG(filename,string); /* file name of module */
1158 /* Wait for a debug event */
1159 @REQ(wait_debug_event)
1160 int get_handle; /* should we alloc a handle for waiting? */
1162 process_id_t pid; /* process id */
1163 thread_id_t tid; /* thread id */
1164 obj_handle_t wait; /* wait handle if no event ready */
1165 VARARG(event,debug_event); /* debug event data */
1169 /* Queue an exception event */
1170 @REQ(queue_exception_event)
1171 int first; /* first chance exception? */
1172 VARARG(record,exc_event); /* thread context followed by exception record */
1174 obj_handle_t handle; /* handle to the queued event */
1178 /* Retrieve the status of an exception event */
1179 @REQ(get_exception_status)
1180 obj_handle_t handle; /* handle to the queued event */
1182 int status; /* event continuation status */
1183 VARARG(context,context); /* modified thread context */
1187 /* Send an output string to the debugger */
1188 @REQ(output_debug_string)
1189 void* string; /* string to display (in debugged process address space) */
1190 int unicode; /* is it Unicode? */
1191 int length; /* string length */
1195 /* Continue a debug event */
1196 @REQ(continue_debug_event)
1197 process_id_t pid; /* process id to continue */
1198 thread_id_t tid; /* thread id to continue */
1199 int status; /* continuation status */
1203 /* Start/stop debugging an existing process */
1205 process_id_t pid; /* id of the process to debug */
1206 int attach; /* 1=attaching / 0=detaching from the process */
1210 /* Simulate a breakpoint in a process */
1212 obj_handle_t handle; /* process handle */
1214 int self; /* was it the caller itself? */
1218 /* Set debugger kill on exit flag */
1219 @REQ(set_debugger_kill_on_exit)
1220 int kill_on_exit; /* 0=detach/1=kill debuggee when debugger dies */
1224 /* Read data from a process address space */
1225 @REQ(read_process_memory)
1226 obj_handle_t handle; /* process handle */
1227 void* addr; /* addr to read from */
1229 VARARG(data,bytes); /* result data */
1233 /* Write data to a process address space */
1234 @REQ(write_process_memory)
1235 obj_handle_t handle; /* process handle */
1236 void* addr; /* addr to write to (must be int-aligned) */
1237 unsigned int first_mask; /* mask for first word */
1238 unsigned int last_mask; /* mask for last word */
1239 VARARG(data,bytes); /* data to write */
1243 /* Create a registry key */
1245 obj_handle_t parent; /* handle to the parent key */
1246 unsigned int access; /* desired access rights */
1247 unsigned int options; /* creation options */
1248 time_t modif; /* last modification time */
1249 size_t namelen; /* length of key name in bytes */
1250 VARARG(name,unicode_str,namelen); /* key name */
1251 VARARG(class,unicode_str); /* class name */
1253 obj_handle_t hkey; /* handle to the created key */
1254 int created; /* has it been newly created? */
1257 /* Open a registry key */
1259 obj_handle_t parent; /* handle to the parent key */
1260 unsigned int access; /* desired access rights */
1261 VARARG(name,unicode_str); /* key name */
1263 obj_handle_t hkey; /* handle to the open key */
1267 /* Delete a registry key */
1269 obj_handle_t hkey; /* handle to the key */
1273 /* Enumerate registry subkeys */
1275 obj_handle_t hkey; /* handle to registry key */
1276 int index; /* index of subkey (or -1 for current key) */
1277 int info_class; /* requested information class */
1279 int subkeys; /* number of subkeys */
1280 int max_subkey; /* longest subkey name */
1281 int max_class; /* longest class name */
1282 int values; /* number of values */
1283 int max_value; /* longest value name */
1284 int max_data; /* longest value data */
1285 time_t modif; /* last modification time */
1286 size_t total; /* total length needed for full name and class */
1287 size_t namelen; /* length of key name in bytes */
1288 VARARG(name,unicode_str,namelen); /* key name */
1289 VARARG(class,unicode_str); /* class name */
1293 /* Set a value of a registry key */
1295 obj_handle_t hkey; /* handle to registry key */
1296 int type; /* value type */
1297 size_t namelen; /* length of value name in bytes */
1298 VARARG(name,unicode_str,namelen); /* value name */
1299 VARARG(data,bytes); /* value data */
1303 /* Retrieve the value of a registry key */
1305 obj_handle_t hkey; /* handle to registry key */
1306 VARARG(name,unicode_str); /* value name */
1308 int type; /* value type */
1309 size_t total; /* total length needed for data */
1310 VARARG(data,bytes); /* value data */
1314 /* Enumerate a value of a registry key */
1315 @REQ(enum_key_value)
1316 obj_handle_t hkey; /* handle to registry key */
1317 int index; /* value index */
1318 int info_class; /* requested information class */
1320 int type; /* value type */
1321 size_t total; /* total length needed for full name and data */
1322 size_t namelen; /* length of value name in bytes */
1323 VARARG(name,unicode_str,namelen); /* value name */
1324 VARARG(data,bytes); /* value data */
1328 /* Delete a value of a registry key */
1329 @REQ(delete_key_value)
1330 obj_handle_t hkey; /* handle to registry key */
1331 VARARG(name,unicode_str); /* value name */
1335 /* Load a registry branch from a file */
1337 obj_handle_t hkey; /* root key to load to */
1338 obj_handle_t file; /* file to load from */
1339 VARARG(name,unicode_str); /* subkey name */
1343 /* Save a registry branch to a file */
1345 obj_handle_t hkey; /* key to save */
1346 obj_handle_t file; /* file to save to */
1350 /* Save a registry branch at server exit */
1351 @REQ(save_registry_atexit)
1352 obj_handle_t hkey; /* key to save */
1353 VARARG(file,string); /* file to save to */
1357 /* Set the current and saving level for the registry */
1358 @REQ(set_registry_levels)
1359 int current; /* new current level */
1360 int saving; /* new saving level */
1361 int period; /* duration between periodic saves (milliseconds) */
1365 /* Create a waitable timer */
1367 int inherit; /* inherit flag */
1368 int manual; /* manual reset */
1369 VARARG(name,unicode_str); /* object name */
1371 obj_handle_t handle; /* handle to the timer */
1375 /* Open a waitable timer */
1377 unsigned int access; /* wanted access rights */
1378 int inherit; /* inherit flag */
1379 VARARG(name,unicode_str); /* object name */
1381 obj_handle_t handle; /* handle to the timer */
1384 /* Set a waitable timer */
1386 obj_handle_t handle; /* handle to the timer */
1387 int sec; /* next expiration absolute time */
1388 int usec; /* next expiration absolute time */
1389 int period; /* timer period in ms */
1390 void* callback; /* callback function */
1391 void* arg; /* callback argument */
1394 /* Cancel a waitable timer */
1396 obj_handle_t handle; /* handle to the timer */
1400 /* Retrieve the current context of a thread */
1401 @REQ(get_thread_context)
1402 obj_handle_t handle; /* thread handle */
1403 unsigned int flags; /* context flags */
1405 VARARG(context,context); /* thread context */
1409 /* Set the current context of a thread */
1410 @REQ(set_thread_context)
1411 obj_handle_t handle; /* thread handle */
1412 unsigned int flags; /* context flags */
1413 VARARG(context,context); /* thread context */
1417 /* Fetch a selector entry for a thread */
1418 @REQ(get_selector_entry)
1419 obj_handle_t handle; /* thread handle */
1420 int entry; /* LDT entry */
1422 unsigned int base; /* selector base */
1423 unsigned int limit; /* selector limit */
1424 unsigned char flags; /* selector flags */
1430 int local; /* is atom in local process table? */
1431 VARARG(name,unicode_str); /* atom name */
1433 atom_t atom; /* resulting atom */
1437 /* Delete an atom */
1439 atom_t atom; /* atom handle */
1440 int local; /* is atom in local process table? */
1446 int local; /* is atom in local process table? */
1447 VARARG(name,unicode_str); /* atom name */
1449 atom_t atom; /* atom handle */
1453 /* Get an atom name */
1455 atom_t atom; /* atom handle */
1456 int local; /* is atom in local process table? */
1458 int count; /* atom lock count */
1459 VARARG(name,unicode_str); /* atom name */
1463 /* Init the process atom table */
1464 @REQ(init_atom_table)
1465 int entries; /* number of entries */
1469 /* Get the message queue of the current thread */
1472 obj_handle_t handle; /* handle to the queue */
1476 /* Set the current message queue wakeup mask */
1477 @REQ(set_queue_mask)
1478 unsigned int wake_mask; /* wakeup bits mask */
1479 unsigned int changed_mask; /* changed bits mask */
1480 int skip_wait; /* will we skip waiting if signaled? */
1482 unsigned int wake_bits; /* current wake bits */
1483 unsigned int changed_bits; /* current changed bits */
1487 /* Get the current message queue status */
1488 @REQ(get_queue_status)
1489 int clear; /* should we clear the change bits? */
1491 unsigned int wake_bits; /* wake bits */
1492 unsigned int changed_bits; /* changed bits since last time */
1496 /* Wait for a process to start waiting on input */
1497 @REQ(wait_input_idle)
1498 obj_handle_t handle; /* process handle */
1499 int timeout; /* timeout */
1501 obj_handle_t event; /* handle to idle event */
1505 /* Send a message to a thread queue */
1507 thread_id_t id; /* thread id */
1508 int type; /* message type (see below) */
1509 user_handle_t win; /* window handle */
1510 unsigned int msg; /* message code */
1511 unsigned int wparam; /* parameters */
1512 unsigned int lparam; /* parameters */
1513 int x; /* x position */
1514 int y; /* y position */
1515 unsigned int time; /* message time */
1516 unsigned int info; /* extra info */
1517 int timeout; /* timeout for reply */
1518 VARARG(data,bytes); /* message data for sent messages */
1523 MSG_ASCII, /* Ascii message (from SendMessageA) */
1524 MSG_UNICODE, /* Unicode message (from SendMessageW) */
1525 MSG_NOTIFY, /* notify message (from SendNotifyMessageW), always Unicode */
1526 MSG_CALLBACK, /* callback message (from SendMessageCallbackW), always Unicode */
1527 MSG_OTHER_PROCESS, /* sent from other process, may include vararg data, always Unicode */
1528 MSG_POSTED, /* posted message (from PostMessageW), always Unicode */
1529 MSG_HARDWARE_RAW, /* raw hardware message */
1530 MSG_HARDWARE_COOKED /* cooked hardware message */
1534 /* Get a message from the current queue */
1536 int flags; /* see below */
1537 user_handle_t get_win; /* window handle to get */
1538 unsigned int get_first; /* first message code to get */
1539 unsigned int get_last; /* last message code to get */
1541 int type; /* message type */
1542 user_handle_t win; /* window handle */
1543 unsigned int msg; /* message code */
1544 unsigned int wparam; /* parameters */
1545 unsigned int lparam; /* parameters */
1546 int x; /* x position */
1547 int y; /* y position */
1548 unsigned int time; /* message time */
1549 unsigned int info; /* extra info */
1550 size_t total; /* total size of extra data */
1551 VARARG(data,bytes); /* message data for sent messages */
1553 #define GET_MSG_REMOVE 1 /* remove the message */
1554 #define GET_MSG_SENT_ONLY 2 /* only get sent messages */
1555 #define GET_MSG_REMOVE_LAST 4 /* remove last message returned before checking for a new one */
1557 /* Reply to a sent message */
1559 unsigned int result; /* message result */
1560 int remove; /* should we remove the message? */
1561 VARARG(data,bytes); /* message data for sent messages */
1565 /* Retrieve the reply for the last message sent */
1566 @REQ(get_message_reply)
1567 int cancel; /* cancel message if not ready? */
1569 unsigned int result; /* message result */
1570 VARARG(data,bytes); /* message data for sent messages */
1574 /* Set a window timer */
1576 user_handle_t win; /* window handle */
1577 unsigned int msg; /* message to post */
1578 unsigned int id; /* timer id */
1579 unsigned int rate; /* timer rate in ms */
1580 unsigned int lparam; /* message lparam (callback proc) */
1584 /* Kill a window timer */
1585 @REQ(kill_win_timer)
1586 user_handle_t win; /* window handle */
1587 unsigned int msg; /* message to post */
1588 unsigned int id; /* timer id */
1592 /* Open a serial port */
1594 unsigned int access; /* wanted access rights */
1595 int inherit; /* inherit flag */
1596 unsigned int attributes; /* eg. FILE_FLAG_OVERLAPPED */
1597 unsigned int sharing; /* sharing flags */
1598 VARARG(name,string); /* file name */
1600 obj_handle_t handle; /* handle to the port */
1604 /* Retrieve info about a serial port */
1605 @REQ(get_serial_info)
1606 obj_handle_t handle; /* handle to comm port */
1608 unsigned int readinterval;
1609 unsigned int readconst;
1610 unsigned int readmult;
1611 unsigned int writeconst;
1612 unsigned int writemult;
1613 unsigned int eventmask;
1614 unsigned int commerror;
1618 /* Set info about a serial port */
1619 @REQ(set_serial_info)
1620 obj_handle_t handle; /* handle to comm port */
1621 int flags; /* bitmask to set values (see below) */
1622 unsigned int readinterval;
1623 unsigned int readconst;
1624 unsigned int readmult;
1625 unsigned int writeconst;
1626 unsigned int writemult;
1627 unsigned int eventmask;
1628 unsigned int commerror;
1630 #define SERIALINFO_SET_TIMEOUTS 0x01
1631 #define SERIALINFO_SET_MASK 0x02
1632 #define SERIALINFO_SET_ERROR 0x04
1635 /* Create / reschedule an async I/O */
1636 @REQ(register_async)
1637 obj_handle_t handle; /* handle to comm port, socket or file */
1641 unsigned int status;
1643 #define ASYNC_TYPE_NONE 0x00
1644 #define ASYNC_TYPE_READ 0x01
1645 #define ASYNC_TYPE_WRITE 0x02
1646 #define ASYNC_TYPE_WAIT 0x03
1649 /* Create a named pipe */
1650 @REQ(create_named_pipe)
1651 unsigned int openmode;
1652 unsigned int pipemode;
1653 unsigned int maxinstances;
1654 unsigned int outsize;
1655 unsigned int insize;
1656 unsigned int timeout;
1657 VARARG(name,unicode_str); /* pipe name */
1659 obj_handle_t handle; /* handle to the pipe */
1663 /* Open an existing named pipe */
1664 @REQ(open_named_pipe)
1665 unsigned int access;
1666 VARARG(name,unicode_str); /* pipe name */
1668 obj_handle_t handle; /* handle to the pipe */
1672 /* Connect to a named pipe */
1673 @REQ(connect_named_pipe)
1674 obj_handle_t handle;
1680 /* Wait for a named pipe */
1681 @REQ(wait_named_pipe)
1682 unsigned int timeout;
1685 VARARG(name,unicode_str); /* pipe name */
1689 /* Disconnect a named pipe */
1690 @REQ(disconnect_named_pipe)
1691 obj_handle_t handle;
1695 @REQ(get_named_pipe_info)
1696 obj_handle_t handle;
1699 unsigned int maxinstances;
1700 unsigned int outsize;
1701 unsigned int insize;
1707 unsigned int tree_id;
1708 unsigned int user_id;
1709 unsigned int file_id;
1710 unsigned int dialect;
1712 obj_handle_t handle;
1717 obj_handle_t handle;
1719 unsigned int offset;
1721 unsigned int tree_id;
1722 unsigned int user_id;
1723 unsigned int dialect;
1724 unsigned int file_id;
1725 unsigned int offset;
1727 #define SMBINFO_SET_OFFSET 0x01
1730 /* Create a window */
1732 user_handle_t parent; /* parent window */
1733 user_handle_t owner; /* owner window */
1734 atom_t atom; /* class atom */
1736 user_handle_t handle; /* created window */
1740 /* Link a window into the tree */
1742 user_handle_t handle; /* handle to the window */
1743 user_handle_t parent; /* handle to the parent */
1744 user_handle_t previous; /* previous child in Z-order */
1746 user_handle_t full_parent; /* full handle of new parent */
1750 /* Destroy a window */
1751 @REQ(destroy_window)
1752 user_handle_t handle; /* handle to the window */
1756 /* Set a window owner */
1757 @REQ(set_window_owner)
1758 user_handle_t handle; /* handle to the window */
1759 user_handle_t owner; /* new owner */
1761 user_handle_t full_owner; /* full handle of new owner */
1762 user_handle_t prev_owner; /* full handle of previous owner */
1766 /* Get information from a window handle */
1767 @REQ(get_window_info)
1768 user_handle_t handle; /* handle to the window */
1770 user_handle_t full_handle; /* full 32-bit handle */
1771 user_handle_t last_active; /* last active popup */
1772 process_id_t pid; /* process owning the window */
1773 thread_id_t tid; /* thread owning the window */
1774 atom_t atom; /* class atom */
1778 /* Set some information in a window */
1779 @REQ(set_window_info)
1780 user_handle_t handle; /* handle to the window */
1781 unsigned int flags; /* flags for fields to set (see below) */
1782 unsigned int style; /* window style */
1783 unsigned int ex_style; /* window extended style */
1784 unsigned int id; /* window id */
1785 void* instance; /* creator instance */
1786 void* user_data; /* user-specific data */
1788 unsigned int old_style; /* old window style */
1789 unsigned int old_ex_style; /* old window extended style */
1790 unsigned int old_id; /* old window id */
1791 void* old_instance; /* old creator instance */
1792 void* old_user_data; /* old user-specific data */
1794 #define SET_WIN_STYLE 0x01
1795 #define SET_WIN_EXSTYLE 0x02
1796 #define SET_WIN_ID 0x04
1797 #define SET_WIN_INSTANCE 0x08
1798 #define SET_WIN_USERDATA 0x10
1801 /* Get a list of the window parents, up to the root of the tree */
1802 @REQ(get_window_parents)
1803 user_handle_t handle; /* handle to the window */
1805 int count; /* total count of parents */
1806 VARARG(parents,user_handles); /* parent handles */
1810 /* Get a list of the window children */
1811 @REQ(get_window_children)
1812 user_handle_t parent; /* parent window */
1813 atom_t atom; /* class atom for the listed children */
1814 thread_id_t tid; /* thread owning the listed children */
1816 int count; /* total count of children */
1817 VARARG(children,user_handles); /* children handles */
1821 /* Get window tree information from a window handle */
1822 @REQ(get_window_tree)
1823 user_handle_t handle; /* handle to the window */
1825 user_handle_t parent; /* parent window */
1826 user_handle_t owner; /* owner window */
1827 user_handle_t next_sibling; /* next sibling in Z-order */
1828 user_handle_t prev_sibling; /* prev sibling in Z-order */
1829 user_handle_t first_sibling; /* first sibling in Z-order */
1830 user_handle_t last_sibling; /* last sibling in Z-order */
1831 user_handle_t first_child; /* first child */
1832 user_handle_t last_child; /* last child */
1835 /* Set the window and client rectangles of a window */
1836 @REQ(set_window_rectangles)
1837 user_handle_t handle; /* handle to the window */
1838 rectangle_t window; /* window rectangle */
1839 rectangle_t client; /* client rectangle */
1843 /* Get the window and client rectangles of a window */
1844 @REQ(get_window_rectangles)
1845 user_handle_t handle; /* handle to the window */
1847 rectangle_t window; /* window rectangle */
1848 rectangle_t client; /* client rectangle */
1852 /* Get the window text */
1853 @REQ(get_window_text)
1854 user_handle_t handle; /* handle to the window */
1856 VARARG(text,unicode_str); /* window text */
1860 /* Set the window text */
1861 @REQ(set_window_text)
1862 user_handle_t handle; /* handle to the window */
1863 VARARG(text,unicode_str); /* window text */
1867 /* Increment the window paint count */
1868 @REQ(inc_window_paint_count)
1869 user_handle_t handle; /* handle to the window */
1870 int incr; /* increment (can be negative) */
1874 /* Get the coordinates offset between two windows */
1875 @REQ(get_windows_offset)
1876 user_handle_t from; /* handle to the first window */
1877 user_handle_t to; /* handle to the second window */
1879 int x; /* x coordinate offset */
1880 int y; /* y coordinate offset */
1884 /* Set a window property */
1885 @REQ(set_window_property)
1886 user_handle_t window; /* handle to the window */
1887 atom_t atom; /* property atom (high-word set if it was a string) */
1888 int string; /* was atom a string originally? */
1889 obj_handle_t handle; /* handle to store */
1893 /* Remove a window property */
1894 @REQ(remove_window_property)
1895 user_handle_t window; /* handle to the window */
1896 atom_t atom; /* property atom */
1898 obj_handle_t handle; /* handle stored in property */
1902 /* Get a window property */
1903 @REQ(get_window_property)
1904 user_handle_t window; /* handle to the window */
1905 atom_t atom; /* property atom */
1907 obj_handle_t handle; /* handle stored in property */
1911 /* Get the list of properties of a window */
1912 @REQ(get_window_properties)
1913 user_handle_t window; /* handle to the window */
1915 int total; /* total number of properties */
1916 VARARG(props,properties); /* list of properties */
1920 /* Attach (or detach) thread inputs */
1921 @REQ(attach_thread_input)
1922 thread_id_t tid_from; /* thread to be attached */
1923 thread_id_t tid_to; /* thread to which tid_from should be attached */
1924 int attach; /* is it an attach? */
1928 /* Get input data for a given thread */
1929 @REQ(get_thread_input)
1930 thread_id_t tid; /* id of thread */
1932 user_handle_t focus; /* handle to the focus window */
1933 user_handle_t capture; /* handle to the capture window */
1934 user_handle_t active; /* handle to the active window */
1935 user_handle_t foreground; /* handle to the global foreground window */
1936 user_handle_t menu_owner; /* handle to the menu owner */
1937 user_handle_t move_size; /* handle to the moving/resizing window */
1938 user_handle_t caret; /* handle to the caret window */
1939 rectangle_t rect; /* caret rectangle */
1942 /* Set the system foreground window */
1943 @REQ(set_foreground_window)
1944 user_handle_t handle; /* handle to the foreground window */
1946 user_handle_t previous; /* handle to the previous foreground window */
1947 int send_msg_old; /* whether we have to send a msg to the old window */
1948 int send_msg_new; /* whether we have to send a msg to the new window */
1951 /* Set the current thread focus window */
1952 @REQ(set_focus_window)
1953 user_handle_t handle; /* handle to the focus window */
1955 user_handle_t previous; /* handle to the previous focus window */
1958 /* Set the current thread active window */
1959 @REQ(set_active_window)
1960 user_handle_t handle; /* handle to the active window */
1962 user_handle_t previous; /* handle to the previous active window */
1965 /* Set the current thread capture window */
1966 @REQ(set_capture_window)
1967 user_handle_t handle; /* handle to the capture window */
1968 unsigned int flags; /* capture flags (see below) */
1970 user_handle_t previous; /* handle to the previous capture window */
1971 user_handle_t full_handle; /* full 32-bit handle of new capture window */
1973 #define CAPTURE_MENU 0x01 /* capture is for a menu */
1974 #define CAPTURE_MOVESIZE 0x02 /* capture is for moving/resizing */
1977 /* Set the current thread caret window */
1978 @REQ(set_caret_window)
1979 user_handle_t handle; /* handle to the caret window */
1980 int width; /* caret width */
1981 int height; /* caret height */
1983 user_handle_t previous; /* handle to the previous caret window */
1984 rectangle_t old_rect; /* previous caret rectangle */
1985 int old_hide; /* previous hide count */
1986 int old_state; /* previous caret state (1=on, 0=off) */
1990 /* Set the current thread caret information */
1991 @REQ(set_caret_info)
1992 unsigned int flags; /* caret flags (see below) */
1993 user_handle_t handle; /* handle to the caret window */
1994 int x; /* caret x position */
1995 int y; /* caret y position */
1996 int hide; /* increment for hide count (can be negative to show it) */
1997 int state; /* caret state (1=on, 0=off, -1=toggle current state) */
1999 user_handle_t full_handle; /* handle to the current caret window */
2000 rectangle_t old_rect; /* previous caret rectangle */
2001 int old_hide; /* previous hide count */
2002 int old_state; /* previous caret state (1=on, 0=off) */
2004 #define SET_CARET_POS 0x01 /* set the caret position from x,y */
2005 #define SET_CARET_HIDE 0x02 /* increment the caret hide count */
2006 #define SET_CARET_STATE 0x04 /* set the caret on/off state */