3 * Wine server protocol definition
5 * Copyright (C
) 2001 Alexandre Julliard
7 * This file is used by tools
/make_requests to build the
8 * protocol structures in include
/wine
/server_protocol.h
10 * This library is free software
; you can redistribute it and
/or
11 * modify it under the terms of the GNU Lesser General Public
12 * License as published by the Free Software Foundation
; either
13 * version
2.1 of the License
, or (at your option
) any later version.
15 * This library is distributed in the hope that it will be useful
,
16 * but WITHOUT ANY WARRANTY
; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. See the GNU
18 * Lesser General Public License for more details.
20 * You should have received a copy of the GNU Lesser General Public
21 * License along with this library
; if not
, write to the Free Software
22 * Foundation
, Inc.
, 59 Temple Place
, Suite
330, Boston
, MA
02111-1307 USA
25 @HEADER
/* start of C declarations
*/
33 int req
; /* request code
*/
34 size_t request_size
; /* request variable part size
*/
35 size_t reply_size
; /* reply variable part maximum size
*/
40 unsigned int error
; /* error result
*/
41 size_t reply_size
; /* reply variable part size
*/
44 /* placeholder structure for the maximum allowed request size
*/
45 /* this is used to construct the generic_request union
*/
46 struct request_max_size
48 int pad
[16]; /* the max request size is
16 ints
*/
51 typedef void
*obj_handle_t
;
52 typedef void
*user_handle_t
;
53 typedef unsigned short atom_t
;
54 typedef unsigned int process_id_t
;
55 typedef unsigned int thread_id_t
;
57 #define FIRST_USER_HANDLE
0x0020 /* first possible value for low word of user handle
*/
58 #define LAST_USER_HANDLE
0xffef /* last possible value for low word of user handle
*/
61 /* definitions of the event data depending on the event code
*/
62 struct debug_event_exception
64 EXCEPTION_RECORD record
; /* exception record
*/
65 int first
; /* first chance exception?
*/
67 struct debug_event_create_thread
69 obj_handle_t handle
; /* handle to the new thread
*/
70 void
*teb
; /* thread
teb (in debugged process address space
) */
71 void
*start
; /* thread startup routine
*/
73 struct debug_event_create_process
75 obj_handle_t file
; /* handle to the process exe file
*/
76 obj_handle_t process
; /* handle to the new process
*/
77 obj_handle_t thread
; /* handle to the new thread
*/
78 void
*base
; /* base of executable image
*/
79 int dbg_offset
; /* offset of debug info in file
*/
80 int dbg_size
; /* size of debug info
*/
81 void
*teb
; /* thread
teb (in debugged process address space
) */
82 void
*start
; /* thread startup routine
*/
83 void
*name
; /* image
name (optional
) */
84 int unicode
; /* is it Unicode?
*/
86 struct debug_event_exit
88 int exit_code
; /* thread or process exit code
*/
90 struct debug_event_load_dll
92 obj_handle_t handle
; /* file handle for the dll
*/
93 void
*base
; /* base address of the dll
*/
94 int dbg_offset
; /* offset of debug info in file
*/
95 int dbg_size
; /* size of debug info
*/
96 void
*name
; /* image
name (optional
) */
97 int unicode
; /* is it Unicode?
*/
99 struct debug_event_unload_dll
101 void
*base
; /* base address of the dll
*/
103 struct debug_event_output_string
105 void
*string
; /* string to
display (in debugged process address space
) */
106 int unicode
; /* is it Unicode?
*/
107 int length
; /* string length
*/
109 struct debug_event_rip_info
114 union debug_event_data
116 struct debug_event_exception exception
;
117 struct debug_event_create_thread create_thread
;
118 struct debug_event_create_process create_process
;
119 struct debug_event_exit exit
;
120 struct debug_event_load_dll load_dll
;
121 struct debug_event_unload_dll unload_dll
;
122 struct debug_event_output_string output_string
;
123 struct debug_event_rip_info rip_info
;
126 /* debug event data
*/
129 int code
; /* event code
*/
130 union debug_event_data info
; /* event information
*/
133 /* structure used in sending an fd from client to server
*/
136 thread_id_t tid
; /* thread id
*/
137 int fd
; /* file descriptor on client
-side
*/
140 /* structure sent by the server on the wait fifo
*/
143 void
*cookie
; /* magic cookie that was passed in select_request
*/
144 int signaled
; /* wait result
*/
147 /* structure for process startup info
*/
150 size_t size
; /* size of this structure
*/
151 size_t filename_len
; /* length of filename
*/
152 size_t cmdline_len
; /* length of cmd line
*/
153 size_t desktop_len
; /* length of desktop name
*/
154 size_t title_len
; /* length of title
*/
155 int x
; /* window position
*/
157 int cx
; /* window size
*/
159 int x_chars
; /* console size
*/
161 int attribute
; /* console attributes
*/
162 int cmd_show
; /* main window show mode
*/
163 unsigned int flags
; /* info flags
*/
164 /* char filename
[...
]; */
165 /* char cmdline
[...
]; */
166 /* char desktop
[...
]; */
167 /* char title
[...
]; */
170 /* structure returned in the list of window properties
*/
173 atom_t atom
; /* property atom
*/
174 short string
; /* was atom a string originally?
*/
175 obj_handle_t handle
; /* handle stored in property
*/
178 /* structure to specify window rectangles
*/
187 /* structure for console char
/attribute info
*/
194 /****************************************************************/
195 /* Request declarations
*/
197 /* Create a new process from the context of the parent
*/
199 int inherit_all
; /* inherit all handles from parent
*/
200 int use_handles
; /* use stdio handles
*/
201 int create_flags
; /* creation flags
*/
202 obj_handle_t exe_file
; /* file handle for main exe
*/
203 obj_handle_t hstdin
; /* handle for stdin
*/
204 obj_handle_t hstdout
; /* handle for stdout
*/
205 obj_handle_t hstderr
; /* handle for stderr
*/
206 VARARG(info
,startup_info
); /* startup information
*/
208 obj_handle_t info
; /* new process info handle
*/
212 /* Retrieve information about a newly started process
*/
213 @
REQ(get_new_process_info
)
214 obj_handle_t info
; /* info handle returned from new_process_request
*/
215 int pinherit
; /* process handle inherit flag
*/
216 int tinherit
; /* thread handle inherit flag
*/
218 process_id_t pid
; /* process id
*/
219 obj_handle_t phandle
; /* process
handle (in the current process
) */
220 thread_id_t tid
; /* thread id
*/
221 obj_handle_t thandle
; /* thread
handle (in the current process
) */
222 int success
; /* did the process start successfully?
*/
226 /* Create a new thread from the context of the parent
*/
228 int suspend
; /* new thread should be suspended on creation
*/
229 int inherit
; /* inherit flag
*/
230 int request_fd
; /* fd for request pipe
*/
232 thread_id_t tid
; /* thread id
*/
233 obj_handle_t handle
; /* thread
handle (in the current process
) */
237 /* Signal that we are finished booting on the client side
*/
239 int debug_level
; /* new debug level
*/
243 /* Initialize a process
; called from the new process context
*/
245 void
* ldt_copy
; /* addr of LDT copy
*/
246 int ppid
; /* parent Unix pid
*/
248 int create_flags
; /* creation flags
*/
249 unsigned int server_start
; /* server start
time (GetTickCount
) */
250 size_t info_size
; /* total size of startup info
*/
251 obj_handle_t exe_file
; /* file handle for main exe
*/
252 obj_handle_t hstdin
; /* handle for stdin
*/
253 obj_handle_t hstdout
; /* handle for stdout
*/
254 obj_handle_t hstderr
; /* handle for stderr
*/
258 /* Retrieve the new process startup info
*/
259 @
REQ(get_startup_info
)
261 VARARG(info
,startup_info
); /* startup information
*/
265 /* Signal the end of the process initialization
*/
266 @
REQ(init_process_done
)
267 void
* module
; /* main module base address
*/
268 size_t module_size
; /* main module size
*/
269 void
* entry
; /* process entry point
*/
270 void
* name
; /* ptr to ptr to
name (in process addr space
) */
271 obj_handle_t exe_file
; /* file handle for main exe
*/
272 int gui
; /* is it a GUI process?
*/
273 VARARG(filename
,string
); /* file name of main exe
*/
275 int debugged
; /* being debugged?
*/
279 /* Initialize a thread
; called from the child after
fork()/clone() */
281 int unix_pid
; /* Unix pid of new thread
*/
282 void
* teb
; /* TEB of new
thread (in thread address space
) */
283 void
* entry
; /* thread entry
point (in thread address space
) */
284 int reply_fd
; /* fd for reply pipe
*/
285 int wait_fd
; /* fd for blocking calls pipe
*/
287 process_id_t pid
; /* process id of the new thread
's process */
288 thread_id_t tid; /* thread id of the new thread */
289 int boot; /* is this the boot thread? */
290 int version; /* protocol version */
294 /* Terminate a process */
295 @REQ(terminate_process)
296 obj_handle_t handle; /* process handle to terminate */
297 int exit_code; /* process exit code */
299 int self; /* suicide? */
303 /* Terminate a thread */
304 @REQ(terminate_thread)
305 obj_handle_t handle; /* thread handle to terminate */
306 int exit_code; /* thread exit code */
308 int self; /* suicide? */
309 int last; /* last thread in this process? */
313 /* Retrieve information about a process */
314 @REQ(get_process_info)
315 obj_handle_t handle; /* process handle */
317 process_id_t pid; /* server process id */
318 int debugged; /* debugged? */
319 int exit_code; /* process exit code */
320 int priority; /* priority class */
321 int process_affinity; /* process affinity mask */
322 int system_affinity; /* system affinity mask */
326 /* Set a process informations */
327 @REQ(set_process_info)
328 obj_handle_t handle; /* process handle */
329 int mask; /* setting mask (see below) */
330 int priority; /* priority class */
331 int affinity; /* affinity mask */
333 #define SET_PROCESS_INFO_PRIORITY 0x01
334 #define SET_PROCESS_INFO_AFFINITY 0x02
337 /* Retrieve information about a thread */
338 @REQ(get_thread_info)
339 obj_handle_t handle; /* thread handle */
340 thread_id_t tid_in; /* thread id (optional) */
342 thread_id_t tid; /* server thread id */
343 void* teb; /* thread teb pointer */
344 int exit_code; /* thread exit code */
345 int priority; /* thread priority level */
346 time_t creation_time; /* thread creation time */
347 time_t exit_time; /* thread exit time */
351 /* Set a thread informations */
352 @REQ(set_thread_info)
353 obj_handle_t handle; /* thread handle */
354 int mask; /* setting mask (see below) */
355 int priority; /* priority class */
356 int affinity; /* affinity mask */
358 #define SET_THREAD_INFO_PRIORITY 0x01
359 #define SET_THREAD_INFO_AFFINITY 0x02
362 /* Retrieve information about a module */
364 obj_handle_t handle; /* process handle */
365 void* base_address; /* base address of module */
367 size_t size; /* module size */
369 VARARG(filename,string); /* file name of module */
373 /* Suspend a thread */
375 obj_handle_t handle; /* thread handle */
377 int count; /* new suspend count */
381 /* Resume a thread */
383 obj_handle_t handle; /* thread handle */
385 int count; /* new suspend count */
389 /* Notify the server that a dll has been loaded */
391 obj_handle_t handle; /* file handle */
392 void* base; /* base address */
393 size_t size; /* dll size */
394 int dbg_offset; /* debug info offset */
395 int dbg_size; /* debug info size */
396 void* name; /* ptr to ptr to name (in process addr space) */
397 VARARG(filename,string); /* file name of dll */
401 /* Notify the server that a dll is being unloaded */
403 void* base; /* base address */
407 /* Queue an APC for a thread */
409 obj_handle_t handle; /* thread handle */
410 int user; /* user or system apc? */
411 void* func; /* function to call */
412 void* param; /* param for function to call */
416 /* Get next APC to call */
418 int alertable; /* is thread alertable? */
420 void* func; /* function to call */
421 int type; /* function type */
422 VARARG(args,ptrs); /* function arguments */
424 enum apc_type { APC_NONE, APC_USER, APC_TIMER, APC_ASYNC, APC_ASYNC_IO };
427 /* Close a handle for the current process */
429 obj_handle_t handle; /* handle to close */
431 int fd; /* associated fd to close */
435 /* Set a handle information */
436 @REQ(set_handle_info)
437 obj_handle_t handle; /* handle we are interested in */
438 int flags; /* new handle flags */
439 int mask; /* mask for flags to set */
440 int fd; /* file descriptor or -1 */
442 int old_flags; /* old flag value */
443 int cur_fd; /* current file descriptor */
447 /* Duplicate a handle */
449 obj_handle_t src_process; /* src process handle */
450 obj_handle_t src_handle; /* src handle to duplicate */
451 obj_handle_t dst_process; /* dst process handle */
452 unsigned int access; /* wanted access rights */
453 int inherit; /* inherit flag */
454 int options; /* duplicate options (see below) */
456 obj_handle_t handle; /* duplicated handle in dst process */
457 int fd; /* associated fd to close */
459 #define DUP_HANDLE_CLOSE_SOURCE DUPLICATE_CLOSE_SOURCE
460 #define DUP_HANDLE_SAME_ACCESS DUPLICATE_SAME_ACCESS
461 #define DUP_HANDLE_MAKE_GLOBAL 0x80000000 /* Not a Windows flag */
464 /* Open a handle to a process */
466 process_id_t pid; /* process id to open */
467 unsigned int access; /* wanted access rights */
468 int inherit; /* inherit flag */
470 obj_handle_t handle; /* handle to the process */
474 /* Open a handle to a thread */
476 thread_id_t tid; /* thread id to open */
477 unsigned int access; /* wanted access rights */
478 int inherit; /* inherit flag */
480 obj_handle_t handle; /* handle to the thread */
484 /* Wait for handles */
486 int flags; /* wait flags (see below) */
487 void* cookie; /* magic cookie to return to client */
488 int sec; /* absolute timeout */
489 int usec; /* absolute timeout */
490 VARARG(handles,handles); /* handles to select on */
493 #define SELECT_ALERTABLE 2
494 #define SELECT_INTERRUPTIBLE 4
495 #define SELECT_TIMEOUT 8
498 /* Create an event */
500 int manual_reset; /* manual reset event */
501 int initial_state; /* initial state of the event */
502 int inherit; /* inherit flag */
503 VARARG(name,unicode_str); /* object name */
505 obj_handle_t handle; /* handle to the event */
508 /* Event operation */
510 obj_handle_t handle; /* handle to event */
511 int op; /* event operation (see below) */
513 enum event_op { PULSE_EVENT, SET_EVENT, RESET_EVENT };
518 unsigned int access; /* wanted access rights */
519 int inherit; /* inherit flag */
520 VARARG(name,unicode_str); /* object name */
522 obj_handle_t handle; /* handle to the event */
528 int owned; /* initially owned? */
529 int inherit; /* inherit flag */
530 VARARG(name,unicode_str); /* object name */
532 obj_handle_t handle; /* handle to the mutex */
536 /* Release a mutex */
538 obj_handle_t handle; /* handle to the mutex */
544 unsigned int access; /* wanted access rights */
545 int inherit; /* inherit flag */
546 VARARG(name,unicode_str); /* object name */
548 obj_handle_t handle; /* handle to the mutex */
552 /* Create a semaphore */
553 @REQ(create_semaphore)
554 unsigned int initial; /* initial count */
555 unsigned int max; /* maximum count */
556 int inherit; /* inherit flag */
557 VARARG(name,unicode_str); /* object name */
559 obj_handle_t handle; /* handle to the semaphore */
563 /* Release a semaphore */
564 @REQ(release_semaphore)
565 obj_handle_t handle; /* handle to the semaphore */
566 unsigned int count; /* count to add to semaphore */
568 unsigned int prev_count; /* previous semaphore count */
572 /* Open a semaphore */
574 unsigned int access; /* wanted access rights */
575 int inherit; /* inherit flag */
576 VARARG(name,unicode_str); /* object name */
578 obj_handle_t handle; /* handle to the semaphore */
584 unsigned int access; /* wanted access rights */
585 int inherit; /* inherit flag */
586 unsigned int sharing; /* sharing flags */
587 int create; /* file create action */
588 unsigned int attrs; /* file attributes for creation */
589 int drive_type; /* type of drive the file is on */
590 VARARG(filename,string); /* file name */
592 obj_handle_t handle; /* handle to the file */
596 /* Allocate a file handle for a Unix fd */
597 @REQ(alloc_file_handle)
598 unsigned int access; /* wanted access rights */
599 int inherit; /* inherit flag */
600 int fd; /* file descriptor on the client side */
602 obj_handle_t handle; /* handle to the file */
606 /* Get a Unix fd to access a file */
608 obj_handle_t handle; /* handle to the file */
609 unsigned int access; /* wanted access rights */
611 int fd; /* file descriptor */
612 int type; /* the type of file (see below) */
613 int flags; /* file read/write flags (see below) */
623 #define FD_FLAG_OVERLAPPED 0x01
624 #define FD_FLAG_TIMEOUT 0x02
625 #define FD_FLAG_RECV_SHUTDOWN 0x04
626 #define FD_FLAG_SEND_SHUTDOWN 0x08
628 /* Set a file current position */
629 @REQ(set_file_pointer)
630 obj_handle_t handle; /* handle to the file */
631 int low; /* position low word */
632 int high; /* position high word */
633 int whence; /* whence to seek */
635 int new_low; /* new position low word */
636 int new_high; /* new position high word */
640 /* Truncate (or extend) a file */
642 obj_handle_t handle; /* handle to the file */
646 /* Set a file access and modification times */
648 obj_handle_t handle; /* handle to the file */
649 time_t access_time; /* last access time */
650 time_t write_time; /* last write time */
654 /* Flush a file buffers */
656 obj_handle_t handle; /* handle to the file */
660 /* Get information about a file */
662 obj_handle_t handle; /* handle to the file */
664 int type; /* file type */
665 int attr; /* file attributes */
666 time_t access_time; /* last access time */
667 time_t write_time; /* last write time */
668 int size_high; /* file size */
669 int size_low; /* file size */
670 int links; /* number of links */
671 int index_high; /* unique index */
672 int index_low; /* unique index */
673 unsigned int serial; /* volume serial number */
677 /* Lock a region of a file */
679 obj_handle_t handle; /* handle to the file */
680 unsigned int offset_low; /* offset of start of lock */
681 unsigned int offset_high; /* offset of start of lock */
682 unsigned int count_low; /* count of bytes to lock */
683 unsigned int count_high; /* count of bytes to lock */
687 /* Unlock a region of a file */
689 obj_handle_t handle; /* handle to the file */
690 unsigned int offset_low; /* offset of start of unlock */
691 unsigned int offset_high; /* offset of start of unlock */
692 unsigned int count_low; /* count of bytes to unlock */
693 unsigned int count_high; /* count of bytes to unlock */
697 /* Create an anonymous pipe */
699 int inherit; /* inherit flag */
701 obj_handle_t handle_read; /* handle to the read-side of the pipe */
702 obj_handle_t handle_write; /* handle to the write-side of the pipe */
706 /* Create a socket */
708 unsigned int access; /* wanted access rights */
709 int inherit; /* inherit flag */
710 int family; /* family, see socket manpage */
711 int type; /* type, see socket manpage */
712 int protocol; /* protocol, see socket manpage */
713 unsigned int flags; /* socket flags */
715 obj_handle_t handle; /* handle to the new socket */
719 /* Accept a socket */
721 obj_handle_t lhandle; /* handle to the listening socket */
722 unsigned int access; /* wanted access rights */
723 int inherit; /* inherit flag */
725 obj_handle_t handle; /* handle to the new socket */
729 /* Set socket event parameters */
730 @REQ(set_socket_event)
731 obj_handle_t handle; /* handle to the socket */
732 unsigned int mask; /* event mask */
733 obj_handle_t event; /* event object */
734 user_handle_t window; /* window to send the message to */
735 unsigned int msg; /* message to send */
739 /* Get socket event parameters */
740 @REQ(get_socket_event)
741 obj_handle_t handle; /* handle to the socket */
742 int service; /* clear pending? */
743 obj_handle_t c_event; /* event to clear */
745 unsigned int mask; /* event mask */
746 unsigned int pmask; /* pending events */
747 unsigned int state; /* status bits */
748 VARARG(errors,ints); /* event errors */
752 /* Reenable pending socket events */
753 @REQ(enable_socket_event)
754 obj_handle_t handle; /* handle to the socket */
755 unsigned int mask; /* events to re-enable */
756 unsigned int sstate; /* status bits to set */
757 unsigned int cstate; /* status bits to clear */
760 @REQ(set_socket_deferred)
761 obj_handle_t handle; /* handle to the socket */
762 obj_handle_t deferred; /* handle to the socket for which accept() is deferred */
765 /* Allocate a console (only used by a console renderer) */
767 unsigned int access; /* wanted access rights */
768 int inherit; /* inherit flag */
769 process_id_t pid; /* pid of process which shall be attached to the console */
771 obj_handle_t handle_in; /* handle to console input */
772 obj_handle_t event; /* handle to renderer events change notification */
776 /* Free the console of the current process */
781 #define CONSOLE_RENDERER_NONE_EVENT 0x00
782 #define CONSOLE_RENDERER_TITLE_EVENT 0x01
783 #define CONSOLE_RENDERER_ACTIVE_SB_EVENT 0x02
784 #define CONSOLE_RENDERER_SB_RESIZE_EVENT 0x03
785 #define CONSOLE_RENDERER_UPDATE_EVENT 0x04
786 #define CONSOLE_RENDERER_CURSOR_POS_EVENT 0x05
787 #define CONSOLE_RENDERER_CURSOR_GEOM_EVENT 0x06
788 #define CONSOLE_RENDERER_DISPLAY_EVENT 0x07
789 #define CONSOLE_RENDERER_EXIT_EVENT 0x08
790 struct console_renderer_event
825 /* retrieve console events for the renderer */
826 @REQ(get_console_renderer_events)
827 obj_handle_t handle; /* handle to console input events */
829 VARARG(data,bytes); /* the various console_renderer_events */
833 /* Open a handle to the process console */
835 int from; /* 0 (resp 1) input (resp output) of current process console */
836 /* otherwise console_in handle to get active screen buffer? */
837 unsigned int access; /* wanted access rights */
838 int inherit; /* inherit flag */
839 int share; /* share mask (only for output handles) */
841 obj_handle_t handle; /* handle to the console */
845 /* Get a console mode (input or output) */
846 @REQ(get_console_mode)
847 obj_handle_t handle; /* handle to the console */
849 int mode; /* console mode */
853 /* Set a console mode (input or output) */
854 @REQ(set_console_mode)
855 obj_handle_t handle; /* handle to the console */
856 int mode; /* console mode */
860 /* Set info about a console (input only) */
861 @REQ(set_console_input_info)
862 obj_handle_t handle; /* handle to console input, or 0 for process' console
*/
863 int mask
; /* setting
mask (see below
) */
864 obj_handle_t active_sb
; /* active screen buffer
*/
865 int history_mode
; /* whether we duplicate lines in history
*/
866 int history_size
; /* number of lines in history
*/
867 int edition_mode
; /* index to the edition mode flavors
*/
868 VARARG(title
,unicode_str
); /* console title
*/
870 #define SET_CONSOLE_INPUT_INFO_ACTIVE_SB
0x01
871 #define SET_CONSOLE_INPUT_INFO_TITLE
0x02
872 #define SET_CONSOLE_INPUT_INFO_HISTORY_MODE
0x04
873 #define SET_CONSOLE_INPUT_INFO_HISTORY_SIZE
0x08
874 #define SET_CONSOLE_INPUT_INFO_EDITION_MODE
0x10
877 /* Get info about a
console (input only
) */
878 @
REQ(get_console_input_info
)
879 obj_handle_t handle
; /* handle to console input
, or
0 for process
' console */
881 int history_mode; /* whether we duplicate lines in history */
882 int history_size; /* number of lines in history */
883 int history_index; /* number of used lines in history */
884 int edition_mode; /* index to the edition mode flavors */
885 VARARG(title,unicode_str); /* console title */
889 /* appends a string to console's history
*/
890 @
REQ(append_console_input_history
)
891 obj_handle_t handle
; /* handle to console input
, or
0 for process
' console */
892 VARARG(line,unicode_str); /* line to add */
896 /* appends a string to console's history
*/
897 @
REQ(get_console_input_history
)
898 obj_handle_t handle
; /* handle to console input
, or
0 for process
' console */
899 int index; /* index to get line from */
901 int total; /* total length of line in Unicode chars */
902 VARARG(line,unicode_str); /* line to add */
906 /* creates a new screen buffer on process' console
*/
907 @
REQ(create_console_output
)
908 obj_handle_t handle_in
; /* handle to console input
, or
0 for process
' console */
909 int access; /* wanted access rights */
910 int share; /* sharing credentials */
911 int inherit; /* inherit flag */
913 obj_handle_t handle_out; /* handle to the screen buffer */
917 /* Set info about a console (output only) */
918 @REQ(set_console_output_info)
919 obj_handle_t handle; /* handle to the console */
920 int mask; /* setting mask (see below) */
921 short int cursor_size; /* size of cursor (percentage filled) */
922 short int cursor_visible;/* cursor visibility flag */
923 short int cursor_x; /* position of cursor (x, y) */
925 short int width; /* width of the screen buffer */
926 short int height; /* height of the screen buffer */
927 short int attr; /* default attribute */
928 short int win_left; /* window actually displayed by renderer */
929 short int win_top; /* the rect area is expressed withing the */
930 short int win_right; /* boundaries of the screen buffer */
931 short int win_bottom;
932 short int max_width; /* maximum size (width x height) for the window */
933 short int max_height;
935 #define SET_CONSOLE_OUTPUT_INFO_CURSOR_GEOM 0x01
936 #define SET_CONSOLE_OUTPUT_INFO_CURSOR_POS 0x02
937 #define SET_CONSOLE_OUTPUT_INFO_SIZE 0x04
938 #define SET_CONSOLE_OUTPUT_INFO_ATTR 0x08
939 #define SET_CONSOLE_OUTPUT_INFO_DISPLAY_WINDOW 0x10
940 #define SET_CONSOLE_OUTPUT_INFO_MAX_SIZE 0x20
943 /* Get info about a console (output only) */
944 @REQ(get_console_output_info)
945 obj_handle_t handle; /* handle to the console */
947 short int cursor_size; /* size of cursor (percentage filled) */
948 short int cursor_visible;/* cursor visibility flag */
949 short int cursor_x; /* position of cursor (x, y) */
951 short int width; /* width of the screen buffer */
952 short int height; /* height of the screen buffer */
953 short int attr; /* default attribute */
954 short int win_left; /* window actually displayed by renderer */
955 short int win_top; /* the rect area is expressed withing the */
956 short int win_right; /* boundaries of the screen buffer */
957 short int win_bottom;
958 short int max_width; /* maximum size (width x height) for the window */
959 short int max_height;
962 /* Add input records to a console input queue */
963 @REQ(write_console_input)
964 obj_handle_t handle; /* handle to the console input */
965 VARARG(rec,input_records); /* input records */
967 int written; /* number of records written */
971 /* Fetch input records from a console input queue */
972 @REQ(read_console_input)
973 obj_handle_t handle; /* handle to the console input */
974 int flush; /* flush the retrieved records from the queue? */
976 int read; /* number of records read */
977 VARARG(rec,input_records); /* input records */
981 /* write data (chars and/or attributes) in a screen buffer */
982 @REQ(write_console_output)
983 obj_handle_t handle; /* handle to the console output */
984 int x; /* position where to start writing */
986 int mode; /* char info (see below) */
987 int wrap; /* wrap around at end of line? */
988 VARARG(data,bytes); /* info to write */
990 int written; /* number of char infos actually written */
991 int width; /* width of screen buffer */
992 int height; /* height of screen buffer */
996 CHAR_INFO_MODE_TEXT, /* characters only */
997 CHAR_INFO_MODE_ATTR, /* attributes only */
998 CHAR_INFO_MODE_TEXTATTR, /* both characters and attributes */
999 CHAR_INFO_MODE_TEXTSTDATTR /* characters but use standard attributes */
1003 /* fill a screen buffer with constant data (chars and/or attributes) */
1004 @REQ(fill_console_output)
1005 obj_handle_t handle; /* handle to the console output */
1006 int x; /* position where to start writing */
1008 int mode; /* char info mode */
1009 int count; /* number to write */
1010 int wrap; /* wrap around at end of line? */
1011 char_info_t data; /* data to write */
1013 int written; /* number of char infos actually written */
1017 /* read data (chars and/or attributes) from a screen buffer */
1018 @REQ(read_console_output)
1019 obj_handle_t handle; /* handle to the console output */
1020 int x; /* position (x,y) where to start reading */
1022 int mode; /* char info mode */
1023 int wrap; /* wrap around at end of line? */
1025 int width; /* width of screen buffer */
1026 int height; /* height of screen buffer */
1031 /* move a rect (of data) in screen buffer content */
1032 @REQ(move_console_output)
1033 obj_handle_t handle; /* handle to the console output */
1034 short int x_src; /* position (x, y) of rect to start moving from */
1036 short int x_dst; /* position (x, y) of rect to move to */
1038 short int w; /* size of the rect (width, height) to move */
1043 /* Sends a signal to a process group */
1044 @REQ(send_console_signal)
1045 int signal; /* the signal to send */
1046 process_id_t group_id; /* the group to send the signal to */
1050 /* Create a change notification */
1051 @REQ(create_change_notification)
1052 int subtree; /* watch all the subtree */
1053 int filter; /* notification filter */
1055 obj_handle_t handle; /* handle to the change notification */
1059 /* Create a file mapping */
1060 @REQ(create_mapping)
1061 int size_high; /* mapping size */
1062 int size_low; /* mapping size */
1063 int protect; /* protection flags (see below) */
1064 unsigned int access; /* wanted access rights */
1065 int inherit; /* inherit flag */
1066 obj_handle_t file_handle; /* file handle */
1067 VARARG(name,unicode_str); /* object name */
1069 obj_handle_t handle; /* handle to the mapping */
1071 /* protection flags */
1072 #define VPROT_READ 0x01
1073 #define VPROT_WRITE 0x02
1074 #define VPROT_EXEC 0x04
1075 #define VPROT_WRITECOPY 0x08
1076 #define VPROT_GUARD 0x10
1077 #define VPROT_NOCACHE 0x20
1078 #define VPROT_COMMITTED 0x40
1079 #define VPROT_IMAGE 0x80
1082 /* Open a mapping */
1084 unsigned int access; /* wanted access rights */
1085 int inherit; /* inherit flag */
1086 VARARG(name,unicode_str); /* object name */
1088 obj_handle_t handle; /* handle to the mapping */
1092 /* Get information about a file mapping */
1093 @REQ(get_mapping_info)
1094 obj_handle_t handle; /* handle to the mapping */
1096 int size_high; /* mapping size */
1097 int size_low; /* mapping size */
1098 int protect; /* protection flags */
1099 int header_size; /* header size (for VPROT_IMAGE mapping) */
1100 void* base; /* default base addr (for VPROT_IMAGE mapping) */
1101 obj_handle_t shared_file; /* shared mapping file handle */
1102 int shared_size; /* shared mapping size */
1103 int drive_type; /* type of drive the file is on */
1107 /* Create a device */
1109 unsigned int access; /* wanted access rights */
1110 int inherit; /* inherit flag */
1111 int id; /* client private id */
1113 obj_handle_t handle; /* handle to the device */
1117 #define SNAP_HEAPLIST 0x00000001
1118 #define SNAP_PROCESS 0x00000002
1119 #define SNAP_THREAD 0x00000004
1120 #define SNAP_MODULE 0x00000008
1121 /* Create a snapshot */
1122 @REQ(create_snapshot)
1123 int inherit; /* inherit flag */
1124 int flags; /* snapshot flags (SNAP_*) */
1125 process_id_t pid; /* process id */
1127 obj_handle_t handle; /* handle to the snapshot */
1131 /* Get the next process from a snapshot */
1133 obj_handle_t handle; /* handle to the snapshot */
1134 int reset; /* reset snapshot position? */
1136 int count; /* process usage count */
1137 process_id_t pid; /* process id */
1138 process_id_t ppid; /* parent process id */
1139 void* heap; /* heap base */
1140 void* module; /* main module */
1141 int threads; /* number of threads */
1142 int priority; /* process priority */
1143 VARARG(filename,string); /* file name of main exe */
1147 /* Get the next thread from a snapshot */
1149 obj_handle_t handle; /* handle to the snapshot */
1150 int reset; /* reset snapshot position? */
1152 int count; /* thread usage count */
1153 process_id_t pid; /* process id */
1154 thread_id_t tid; /* thread id */
1155 int base_pri; /* base priority */
1156 int delta_pri; /* delta priority */
1160 /* Get the next module from a snapshot */
1162 obj_handle_t handle; /* handle to the snapshot */
1163 int reset; /* reset snapshot position? */
1165 process_id_t pid; /* process id */
1166 void* base; /* module base address */
1167 size_t size; /* module size */
1168 VARARG(filename,string); /* file name of module */
1172 /* Wait for a debug event */
1173 @REQ(wait_debug_event)
1174 int get_handle; /* should we alloc a handle for waiting? */
1176 process_id_t pid; /* process id */
1177 thread_id_t tid; /* thread id */
1178 obj_handle_t wait; /* wait handle if no event ready */
1179 VARARG(event,debug_event); /* debug event data */
1183 /* Queue an exception event */
1184 @REQ(queue_exception_event)
1185 int first; /* first chance exception? */
1186 VARARG(record,exc_event); /* thread context followed by exception record */
1188 obj_handle_t handle; /* handle to the queued event */
1192 /* Retrieve the status of an exception event */
1193 @REQ(get_exception_status)
1194 obj_handle_t handle; /* handle to the queued event */
1196 int status; /* event continuation status */
1197 VARARG(context,context); /* modified thread context */
1201 /* Send an output string to the debugger */
1202 @REQ(output_debug_string)
1203 void* string; /* string to display (in debugged process address space) */
1204 int unicode; /* is it Unicode? */
1205 int length; /* string length */
1209 /* Continue a debug event */
1210 @REQ(continue_debug_event)
1211 process_id_t pid; /* process id to continue */
1212 thread_id_t tid; /* thread id to continue */
1213 int status; /* continuation status */
1217 /* Start/stop debugging an existing process */
1219 process_id_t pid; /* id of the process to debug */
1220 int attach; /* 1=attaching / 0=detaching from the process */
1224 /* Simulate a breakpoint in a process */
1226 obj_handle_t handle; /* process handle */
1228 int self; /* was it the caller itself? */
1232 /* Set debugger kill on exit flag */
1233 @REQ(set_debugger_kill_on_exit)
1234 int kill_on_exit; /* 0=detach/1=kill debuggee when debugger dies */
1238 /* Read data from a process address space */
1239 @REQ(read_process_memory)
1240 obj_handle_t handle; /* process handle */
1241 void* addr; /* addr to read from */
1243 VARARG(data,bytes); /* result data */
1247 /* Write data to a process address space */
1248 @REQ(write_process_memory)
1249 obj_handle_t handle; /* process handle */
1250 void* addr; /* addr to write to (must be int-aligned) */
1251 unsigned int first_mask; /* mask for first word */
1252 unsigned int last_mask; /* mask for last word */
1253 VARARG(data,bytes); /* data to write */
1257 /* Create a registry key */
1259 obj_handle_t parent; /* handle to the parent key */
1260 unsigned int access; /* desired access rights */
1261 unsigned int options; /* creation options */
1262 time_t modif; /* last modification time */
1263 size_t namelen; /* length of key name in bytes */
1264 VARARG(name,unicode_str,namelen); /* key name */
1265 VARARG(class,unicode_str); /* class name */
1267 obj_handle_t hkey; /* handle to the created key */
1268 int created; /* has it been newly created? */
1271 /* Open a registry key */
1273 obj_handle_t parent; /* handle to the parent key */
1274 unsigned int access; /* desired access rights */
1275 VARARG(name,unicode_str); /* key name */
1277 obj_handle_t hkey; /* handle to the open key */
1281 /* Delete a registry key */
1283 obj_handle_t hkey; /* handle to the key */
1287 /* Enumerate registry subkeys */
1289 obj_handle_t hkey; /* handle to registry key */
1290 int index; /* index of subkey (or -1 for current key) */
1291 int info_class; /* requested information class */
1293 int subkeys; /* number of subkeys */
1294 int max_subkey; /* longest subkey name */
1295 int max_class; /* longest class name */
1296 int values; /* number of values */
1297 int max_value; /* longest value name */
1298 int max_data; /* longest value data */
1299 time_t modif; /* last modification time */
1300 size_t total; /* total length needed for full name and class */
1301 size_t namelen; /* length of key name in bytes */
1302 VARARG(name,unicode_str,namelen); /* key name */
1303 VARARG(class,unicode_str); /* class name */
1307 /* Set a value of a registry key */
1309 obj_handle_t hkey; /* handle to registry key */
1310 int type; /* value type */
1311 size_t namelen; /* length of value name in bytes */
1312 VARARG(name,unicode_str,namelen); /* value name */
1313 VARARG(data,bytes); /* value data */
1317 /* Retrieve the value of a registry key */
1319 obj_handle_t hkey; /* handle to registry key */
1320 VARARG(name,unicode_str); /* value name */
1322 int type; /* value type */
1323 size_t total; /* total length needed for data */
1324 VARARG(data,bytes); /* value data */
1328 /* Enumerate a value of a registry key */
1329 @REQ(enum_key_value)
1330 obj_handle_t hkey; /* handle to registry key */
1331 int index; /* value index */
1332 int info_class; /* requested information class */
1334 int type; /* value type */
1335 size_t total; /* total length needed for full name and data */
1336 size_t namelen; /* length of value name in bytes */
1337 VARARG(name,unicode_str,namelen); /* value name */
1338 VARARG(data,bytes); /* value data */
1342 /* Delete a value of a registry key */
1343 @REQ(delete_key_value)
1344 obj_handle_t hkey; /* handle to registry key */
1345 VARARG(name,unicode_str); /* value name */
1349 /* Load a registry branch from a file */
1351 obj_handle_t hkey; /* root key to load to */
1352 obj_handle_t file; /* file to load from */
1353 VARARG(name,unicode_str); /* subkey name */
1357 /* Save a registry branch to a file */
1359 obj_handle_t hkey; /* key to save */
1360 obj_handle_t file; /* file to save to */
1364 /* Save a registry branch at server exit */
1365 @REQ(save_registry_atexit)
1366 obj_handle_t hkey; /* key to save */
1367 VARARG(file,string); /* file to save to */
1371 /* Set the current and saving level for the registry */
1372 @REQ(set_registry_levels)
1373 int current; /* new current level */
1374 int saving; /* new saving level */
1375 int period; /* duration between periodic saves (milliseconds) */
1379 @REQ(set_registry_notification)
1380 obj_handle_t hkey; /* key to watch for changes */
1381 obj_handle_t event; /* event to set */
1382 int subtree; /* should we watch the whole subtree? */
1383 unsigned int filter; /* things to watch */
1387 /* Create a waitable timer */
1389 int inherit; /* inherit flag */
1390 int manual; /* manual reset */
1391 VARARG(name,unicode_str); /* object name */
1393 obj_handle_t handle; /* handle to the timer */
1397 /* Open a waitable timer */
1399 unsigned int access; /* wanted access rights */
1400 int inherit; /* inherit flag */
1401 VARARG(name,unicode_str); /* object name */
1403 obj_handle_t handle; /* handle to the timer */
1406 /* Set a waitable timer */
1408 obj_handle_t handle; /* handle to the timer */
1409 int sec; /* next expiration absolute time */
1410 int usec; /* next expiration absolute time */
1411 int period; /* timer period in ms */
1412 void* callback; /* callback function */
1413 void* arg; /* callback argument */
1416 /* Cancel a waitable timer */
1418 obj_handle_t handle; /* handle to the timer */
1422 /* Retrieve the current context of a thread */
1423 @REQ(get_thread_context)
1424 obj_handle_t handle; /* thread handle */
1425 unsigned int flags; /* context flags */
1427 VARARG(context,context); /* thread context */
1431 /* Set the current context of a thread */
1432 @REQ(set_thread_context)
1433 obj_handle_t handle; /* thread handle */
1434 unsigned int flags; /* context flags */
1435 VARARG(context,context); /* thread context */
1439 /* Fetch a selector entry for a thread */
1440 @REQ(get_selector_entry)
1441 obj_handle_t handle; /* thread handle */
1442 int entry; /* LDT entry */
1444 unsigned int base; /* selector base */
1445 unsigned int limit; /* selector limit */
1446 unsigned char flags; /* selector flags */
1452 int local; /* is atom in local process table? */
1453 VARARG(name,unicode_str); /* atom name */
1455 atom_t atom; /* resulting atom */
1459 /* Delete an atom */
1461 atom_t atom; /* atom handle */
1462 int local; /* is atom in local process table? */
1468 int local; /* is atom in local process table? */
1469 VARARG(name,unicode_str); /* atom name */
1471 atom_t atom; /* atom handle */
1475 /* Get an atom name */
1477 atom_t atom; /* atom handle */
1478 int local; /* is atom in local process table? */
1480 int count; /* atom lock count */
1481 VARARG(name,unicode_str); /* atom name */
1485 /* Init the process atom table */
1486 @REQ(init_atom_table)
1487 int entries; /* number of entries */
1491 /* Get the message queue of the current thread */
1494 obj_handle_t handle; /* handle to the queue */
1498 /* Set the current message queue wakeup mask */
1499 @REQ(set_queue_mask)
1500 unsigned int wake_mask; /* wakeup bits mask */
1501 unsigned int changed_mask; /* changed bits mask */
1502 int skip_wait; /* will we skip waiting if signaled? */
1504 unsigned int wake_bits; /* current wake bits */
1505 unsigned int changed_bits; /* current changed bits */
1509 /* Get the current message queue status */
1510 @REQ(get_queue_status)
1511 int clear; /* should we clear the change bits? */
1513 unsigned int wake_bits; /* wake bits */
1514 unsigned int changed_bits; /* changed bits since last time */
1518 /* Wait for a process to start waiting on input */
1519 @REQ(wait_input_idle)
1520 obj_handle_t handle; /* process handle */
1521 int timeout; /* timeout */
1523 obj_handle_t event; /* handle to idle event */
1527 /* Send a message to a thread queue */
1529 thread_id_t id; /* thread id */
1530 int type; /* message type (see below) */
1531 user_handle_t win; /* window handle */
1532 unsigned int msg; /* message code */
1533 unsigned int wparam; /* parameters */
1534 unsigned int lparam; /* parameters */
1535 int x; /* x position */
1536 int y; /* y position */
1537 unsigned int time; /* message time */
1538 unsigned int info; /* extra info */
1539 int timeout; /* timeout for reply */
1540 VARARG(data,bytes); /* message data for sent messages */
1545 MSG_ASCII, /* Ascii message (from SendMessageA) */
1546 MSG_UNICODE, /* Unicode message (from SendMessageW) */
1547 MSG_NOTIFY, /* notify message (from SendNotifyMessageW), always Unicode */
1548 MSG_CALLBACK, /* callback message (from SendMessageCallbackW), always Unicode */
1549 MSG_OTHER_PROCESS, /* sent from other process, may include vararg data, always Unicode */
1550 MSG_POSTED, /* posted message (from PostMessageW), always Unicode */
1551 MSG_HARDWARE /* hardware message */
1555 /* Get a message from the current queue */
1557 int flags; /* see below */
1558 user_handle_t get_win; /* window handle to get */
1559 unsigned int get_first; /* first message code to get */
1560 unsigned int get_last; /* last message code to get */
1562 int type; /* message type */
1563 user_handle_t win; /* window handle */
1564 unsigned int msg; /* message code */
1565 unsigned int wparam; /* parameters */
1566 unsigned int lparam; /* parameters */
1567 int x; /* x position */
1568 int y; /* y position */
1569 unsigned int time; /* message time */
1570 unsigned int info; /* extra info */
1571 size_t total; /* total size of extra data */
1572 VARARG(data,bytes); /* message data for sent messages */
1574 #define GET_MSG_REMOVE 1 /* remove the message */
1575 #define GET_MSG_SENT_ONLY 2 /* only get sent messages */
1577 /* Reply to a sent message */
1579 unsigned int result; /* message result */
1580 int remove; /* should we remove the message? */
1581 VARARG(data,bytes); /* message data for sent messages */
1585 /* Retrieve the reply for the last message sent */
1586 @REQ(get_message_reply)
1587 int cancel; /* cancel message if not ready? */
1589 unsigned int result; /* message result */
1590 VARARG(data,bytes); /* message data for sent messages */
1594 /* Set a window timer */
1596 user_handle_t win; /* window handle */
1597 unsigned int msg; /* message to post */
1598 unsigned int id; /* timer id */
1599 unsigned int rate; /* timer rate in ms */
1600 unsigned int lparam; /* message lparam (callback proc) */
1604 /* Kill a window timer */
1605 @REQ(kill_win_timer)
1606 user_handle_t win; /* window handle */
1607 unsigned int msg; /* message to post */
1608 unsigned int id; /* timer id */
1612 /* Open a serial port */
1614 unsigned int access; /* wanted access rights */
1615 int inherit; /* inherit flag */
1616 unsigned int attributes; /* eg. FILE_FLAG_OVERLAPPED */
1617 unsigned int sharing; /* sharing flags */
1618 VARARG(name,string); /* file name */
1620 obj_handle_t handle; /* handle to the port */
1624 /* Retrieve info about a serial port */
1625 @REQ(get_serial_info)
1626 obj_handle_t handle; /* handle to comm port */
1628 unsigned int readinterval;
1629 unsigned int readconst;
1630 unsigned int readmult;
1631 unsigned int writeconst;
1632 unsigned int writemult;
1633 unsigned int eventmask;
1634 unsigned int commerror;
1638 /* Set info about a serial port */
1639 @REQ(set_serial_info)
1640 obj_handle_t handle; /* handle to comm port */
1641 int flags; /* bitmask to set values (see below) */
1642 unsigned int readinterval;
1643 unsigned int readconst;
1644 unsigned int readmult;
1645 unsigned int writeconst;
1646 unsigned int writemult;
1647 unsigned int eventmask;
1648 unsigned int commerror;
1650 #define SERIALINFO_SET_TIMEOUTS 0x01
1651 #define SERIALINFO_SET_MASK 0x02
1652 #define SERIALINFO_SET_ERROR 0x04
1655 /* Create / reschedule an async I/O */
1656 @REQ(register_async)
1657 obj_handle_t handle; /* handle to comm port, socket or file */
1661 unsigned int status;
1663 #define ASYNC_TYPE_NONE 0x00
1664 #define ASYNC_TYPE_READ 0x01
1665 #define ASYNC_TYPE_WRITE 0x02
1666 #define ASYNC_TYPE_WAIT 0x03
1669 /* Create a named pipe */
1670 @REQ(create_named_pipe)
1671 unsigned int openmode;
1672 unsigned int pipemode;
1673 unsigned int maxinstances;
1674 unsigned int outsize;
1675 unsigned int insize;
1676 unsigned int timeout;
1677 VARARG(name,unicode_str); /* pipe name */
1679 obj_handle_t handle; /* handle to the pipe */
1683 /* Open an existing named pipe */
1684 @REQ(open_named_pipe)
1685 unsigned int access;
1686 VARARG(name,unicode_str); /* pipe name */
1688 obj_handle_t handle; /* handle to the pipe */
1692 /* Connect to a named pipe */
1693 @REQ(connect_named_pipe)
1694 obj_handle_t handle;
1700 /* Wait for a named pipe */
1701 @REQ(wait_named_pipe)
1702 unsigned int timeout;
1705 VARARG(name,unicode_str); /* pipe name */
1709 /* Disconnect a named pipe */
1710 @REQ(disconnect_named_pipe)
1711 obj_handle_t handle;
1715 @REQ(get_named_pipe_info)
1716 obj_handle_t handle;
1719 unsigned int maxinstances;
1720 unsigned int outsize;
1721 unsigned int insize;
1727 unsigned int tree_id;
1728 unsigned int user_id;
1729 unsigned int file_id;
1730 unsigned int dialect;
1732 obj_handle_t handle;
1737 obj_handle_t handle;
1739 unsigned int offset;
1741 unsigned int tree_id;
1742 unsigned int user_id;
1743 unsigned int dialect;
1744 unsigned int file_id;
1745 unsigned int offset;
1747 #define SMBINFO_SET_OFFSET 0x01
1750 /* Create a window */
1752 user_handle_t parent; /* parent window */
1753 user_handle_t owner; /* owner window */
1754 atom_t atom; /* class atom */
1756 user_handle_t handle; /* created window */
1760 /* Link a window into the tree */
1762 user_handle_t handle; /* handle to the window */
1763 user_handle_t parent; /* handle to the parent */
1764 user_handle_t previous; /* previous child in Z-order */
1766 user_handle_t full_parent; /* full handle of new parent */
1770 /* Destroy a window */
1771 @REQ(destroy_window)
1772 user_handle_t handle; /* handle to the window */
1776 /* Set a window owner */
1777 @REQ(set_window_owner)
1778 user_handle_t handle; /* handle to the window */
1779 user_handle_t owner; /* new owner */
1781 user_handle_t full_owner; /* full handle of new owner */
1782 user_handle_t prev_owner; /* full handle of previous owner */
1786 /* Get information from a window handle */
1787 @REQ(get_window_info)
1788 user_handle_t handle; /* handle to the window */
1790 user_handle_t full_handle; /* full 32-bit handle */
1791 user_handle_t last_active; /* last active popup */
1792 process_id_t pid; /* process owning the window */
1793 thread_id_t tid; /* thread owning the window */
1794 atom_t atom; /* class atom */
1798 /* Set some information in a window */
1799 @REQ(set_window_info)
1800 user_handle_t handle; /* handle to the window */
1801 unsigned int flags; /* flags for fields to set (see below) */
1802 unsigned int style; /* window style */
1803 unsigned int ex_style; /* window extended style */
1804 unsigned int id; /* window id */
1805 void* instance; /* creator instance */
1806 void* user_data; /* user-specific data */
1808 unsigned int old_style; /* old window style */
1809 unsigned int old_ex_style; /* old window extended style */
1810 unsigned int old_id; /* old window id */
1811 void* old_instance; /* old creator instance */
1812 void* old_user_data; /* old user-specific data */
1814 #define SET_WIN_STYLE 0x01
1815 #define SET_WIN_EXSTYLE 0x02
1816 #define SET_WIN_ID 0x04
1817 #define SET_WIN_INSTANCE 0x08
1818 #define SET_WIN_USERDATA 0x10
1821 /* Get a list of the window parents, up to the root of the tree */
1822 @REQ(get_window_parents)
1823 user_handle_t handle; /* handle to the window */
1825 int count; /* total count of parents */
1826 VARARG(parents,user_handles); /* parent handles */
1830 /* Get a list of the window children */
1831 @REQ(get_window_children)
1832 user_handle_t parent; /* parent window */
1833 atom_t atom; /* class atom for the listed children */
1834 thread_id_t tid; /* thread owning the listed children */
1836 int count; /* total count of children */
1837 VARARG(children,user_handles); /* children handles */
1841 /* Get window tree information from a window handle */
1842 @REQ(get_window_tree)
1843 user_handle_t handle; /* handle to the window */
1845 user_handle_t parent; /* parent window */
1846 user_handle_t owner; /* owner window */
1847 user_handle_t next_sibling; /* next sibling in Z-order */
1848 user_handle_t prev_sibling; /* prev sibling in Z-order */
1849 user_handle_t first_sibling; /* first sibling in Z-order */
1850 user_handle_t last_sibling; /* last sibling in Z-order */
1851 user_handle_t first_child; /* first child */
1852 user_handle_t last_child; /* last child */
1855 /* Set the window and client rectangles of a window */
1856 @REQ(set_window_rectangles)
1857 user_handle_t handle; /* handle to the window */
1858 rectangle_t window; /* window rectangle */
1859 rectangle_t client; /* client rectangle */
1863 /* Get the window and client rectangles of a window */
1864 @REQ(get_window_rectangles)
1865 user_handle_t handle; /* handle to the window */
1867 rectangle_t window; /* window rectangle */
1868 rectangle_t client; /* client rectangle */
1872 /* Get the window text */
1873 @REQ(get_window_text)
1874 user_handle_t handle; /* handle to the window */
1876 VARARG(text,unicode_str); /* window text */
1880 /* Set the window text */
1881 @REQ(set_window_text)
1882 user_handle_t handle; /* handle to the window */
1883 VARARG(text,unicode_str); /* window text */
1887 /* Increment the window paint count */
1888 @REQ(inc_window_paint_count)
1889 user_handle_t handle; /* handle to the window */
1890 int incr; /* increment (can be negative) */
1894 /* Get the coordinates offset between two windows */
1895 @REQ(get_windows_offset)
1896 user_handle_t from; /* handle to the first window */
1897 user_handle_t to; /* handle to the second window */
1899 int x; /* x coordinate offset */
1900 int y; /* y coordinate offset */
1904 /* Set a window property */
1905 @REQ(set_window_property)
1906 user_handle_t window; /* handle to the window */
1907 atom_t atom; /* property atom (high-word set if it was a string) */
1908 int string; /* was atom a string originally? */
1909 obj_handle_t handle; /* handle to store */
1913 /* Remove a window property */
1914 @REQ(remove_window_property)
1915 user_handle_t window; /* handle to the window */
1916 atom_t atom; /* property atom */
1918 obj_handle_t handle; /* handle stored in property */
1922 /* Get a window property */
1923 @REQ(get_window_property)
1924 user_handle_t window; /* handle to the window */
1925 atom_t atom; /* property atom */
1927 obj_handle_t handle; /* handle stored in property */
1931 /* Get the list of properties of a window */
1932 @REQ(get_window_properties)
1933 user_handle_t window; /* handle to the window */
1935 int total; /* total number of properties */
1936 VARARG(props,properties); /* list of properties */
1940 /* Attach (or detach) thread inputs */
1941 @REQ(attach_thread_input)
1942 thread_id_t tid_from; /* thread to be attached */
1943 thread_id_t tid_to; /* thread to which tid_from should be attached */
1944 int attach; /* is it an attach? */
1948 /* Get input data for a given thread */
1949 @REQ(get_thread_input)
1950 thread_id_t tid; /* id of thread */
1952 user_handle_t focus; /* handle to the focus window */
1953 user_handle_t capture; /* handle to the capture window */
1954 user_handle_t active; /* handle to the active window */
1955 user_handle_t foreground; /* handle to the global foreground window */
1956 user_handle_t menu_owner; /* handle to the menu owner */
1957 user_handle_t move_size; /* handle to the moving/resizing window */
1958 user_handle_t caret; /* handle to the caret window */
1959 rectangle_t rect; /* caret rectangle */
1962 /* Retrieve queue keyboard state for a given thread */
1964 thread_id_t tid; /* id of thread */
1965 int key; /* optional key code or -1 */
1967 unsigned char state; /* state of specified key */
1968 VARARG(keystate,bytes); /* state array for all the keys */
1971 /* Set queue keyboard state for a given thread */
1973 thread_id_t tid; /* id of thread */
1974 VARARG(keystate,bytes); /* state array for all the keys */
1977 /* Set the system foreground window */
1978 @REQ(set_foreground_window)
1979 user_handle_t handle; /* handle to the foreground window */
1981 user_handle_t previous; /* handle to the previous foreground window */
1982 int send_msg_old; /* whether we have to send a msg to the old window */
1983 int send_msg_new; /* whether we have to send a msg to the new window */
1986 /* Set the current thread focus window */
1987 @REQ(set_focus_window)
1988 user_handle_t handle; /* handle to the focus window */
1990 user_handle_t previous; /* handle to the previous focus window */
1993 /* Set the current thread active window */
1994 @REQ(set_active_window)
1995 user_handle_t handle; /* handle to the active window */
1997 user_handle_t previous; /* handle to the previous active window */
2000 /* Set the current thread capture window */
2001 @REQ(set_capture_window)
2002 user_handle_t handle; /* handle to the capture window */
2003 unsigned int flags; /* capture flags (see below) */
2005 user_handle_t previous; /* handle to the previous capture window */
2006 user_handle_t full_handle; /* full 32-bit handle of new capture window */
2008 #define CAPTURE_MENU 0x01 /* capture is for a menu */
2009 #define CAPTURE_MOVESIZE 0x02 /* capture is for moving/resizing */
2012 /* Set the current thread caret window */
2013 @REQ(set_caret_window)
2014 user_handle_t handle; /* handle to the caret window */
2015 int width; /* caret width */
2016 int height; /* caret height */
2018 user_handle_t previous; /* handle to the previous caret window */
2019 rectangle_t old_rect; /* previous caret rectangle */
2020 int old_hide; /* previous hide count */
2021 int old_state; /* previous caret state (1=on, 0=off) */
2025 /* Set the current thread caret information */
2026 @REQ(set_caret_info)
2027 unsigned int flags; /* caret flags (see below) */
2028 user_handle_t handle; /* handle to the caret window */
2029 int x; /* caret x position */
2030 int y; /* caret y position */
2031 int hide; /* increment for hide count (can be negative to show it) */
2032 int state; /* caret state (1=on, 0=off, -1=toggle current state) */
2034 user_handle_t full_handle; /* handle to the current caret window */
2035 rectangle_t old_rect; /* previous caret rectangle */
2036 int old_hide; /* previous hide count */
2037 int old_state; /* previous caret state (1=on, 0=off) */
2039 #define SET_CARET_POS 0x01 /* set the caret position from x,y */
2040 #define SET_CARET_HIDE 0x02 /* increment the caret hide count */
2041 #define SET_CARET_STATE 0x04 /* set the caret on/off state */
2044 /* Set a window hook */
2046 int id; /* id of the hook */
2047 thread_id_t tid; /* id of thread to set the hook into */
2048 void* proc; /* hook procedure */
2049 int unicode; /* is it a unicode hook? */
2050 VARARG(module,unicode_str); /* module name */
2052 user_handle_t handle; /* handle to the hook */
2056 /* Remove a window hook */
2058 user_handle_t handle; /* handle to the hook */
2059 int id; /* id of the hook if handle is 0 */
2060 void* proc; /* hook procedure if handle is 0 */
2064 /* Start calling a hook chain */
2065 @REQ(start_hook_chain)
2066 int id; /* id of the hook */
2068 user_handle_t handle; /* handle to the next hook */
2069 void* proc; /* hook procedure */
2070 int unicode; /* is it a unicode hook? */
2071 VARARG(module,unicode_str); /* module name */
2075 /* Finished calling a hook chain */
2076 @REQ(finish_hook_chain)
2077 int id; /* id of the hook */
2081 /* Get the next hook to call */
2083 user_handle_t handle; /* handle to the current hook */
2085 user_handle_t next; /* handle to the next hook */
2086 int id; /* id of the next hook */
2087 void* proc; /* next hook procedure */
2088 int prev_unicode; /* was the previous a unicode hook? */
2089 int next_unicode; /* is the next a unicode hook? */
2090 VARARG(module,unicode_str); /* module name */