Fixed memory leak.
[wine/multimedia.git] / server / protocol.def
blob835b3ad31f34dc31bc0d173fdda8063b428f01cd
1 /* -*- C -*-
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
9 */
11 @HEADER /* start of C declarations */
13 #include <stdlib.h>
14 #include <time.h>
15 #include "winbase.h"
17 struct request_header
19 int req; /* request code */
20 size_t request_size; /* request variable part size */
21 size_t reply_size; /* reply variable part maximum size */
24 struct reply_header
26 unsigned int error; /* error result */
27 size_t reply_size; /* reply variable part size */
30 /* placeholder structure for the maximum allowed request size */
31 /* this is used to construct the generic_request union */
32 struct request_max_size
34 int pad[16]; /* the max request size is 16 ints */
37 /* max size of the variable part of a request */
38 #define REQUEST_MAX_VAR_SIZE 1024
40 typedef int handle_t;
41 typedef unsigned short atom_t;
42 typedef unsigned int user_handle_t;
44 #define FIRST_USER_HANDLE 0x0020 /* first possible value for low word of user handle */
45 #define LAST_USER_HANDLE 0xffef /* last possible value for low word of user handle */
48 /* definitions of the event data depending on the event code */
49 struct debug_event_exception
51 EXCEPTION_RECORD record; /* exception record */
52 int first; /* first chance exception? */
54 struct debug_event_create_thread
56 handle_t handle; /* handle to the new thread */
57 void *teb; /* thread teb (in debugged process address space) */
58 void *start; /* thread startup routine */
60 struct debug_event_create_process
62 handle_t file; /* handle to the process exe file */
63 handle_t process; /* handle to the new process */
64 handle_t thread; /* handle to the new thread */
65 void *base; /* base of executable image */
66 int dbg_offset; /* offset of debug info in file */
67 int dbg_size; /* size of debug info */
68 void *teb; /* thread teb (in debugged process address space) */
69 void *start; /* thread startup routine */
70 void *name; /* image name (optional) */
71 int unicode; /* is it Unicode? */
73 struct debug_event_exit
75 int exit_code; /* thread or process exit code */
77 struct debug_event_load_dll
79 handle_t handle; /* file handle for the dll */
80 void *base; /* base address of the dll */
81 int dbg_offset; /* offset of debug info in file */
82 int dbg_size; /* size of debug info */
83 void *name; /* image name (optional) */
84 int unicode; /* is it Unicode? */
86 struct debug_event_unload_dll
88 void *base; /* base address of the dll */
90 struct debug_event_output_string
92 void *string; /* string to display (in debugged process address space) */
93 int unicode; /* is it Unicode? */
94 int length; /* string length */
96 struct debug_event_rip_info
98 int error; /* ??? */
99 int type; /* ??? */
101 union debug_event_data
103 struct debug_event_exception exception;
104 struct debug_event_create_thread create_thread;
105 struct debug_event_create_process create_process;
106 struct debug_event_exit exit;
107 struct debug_event_load_dll load_dll;
108 struct debug_event_unload_dll unload_dll;
109 struct debug_event_output_string output_string;
110 struct debug_event_rip_info rip_info;
113 /* debug event data */
114 typedef struct
116 int code; /* event code */
117 union debug_event_data info; /* event information */
118 } debug_event_t;
120 /* structure used in sending an fd from client to server */
121 struct send_fd
123 void *tid; /* thread id */
124 int fd; /* file descriptor on client-side */
127 /* structure sent by the server on the wait fifo */
128 struct wake_up_reply
130 void *cookie; /* magic cookie that was passed in select_request */
131 int signaled; /* wait result */
134 /* structure returned in the list of window properties */
135 typedef struct
137 atom_t atom; /* property atom */
138 short string; /* was atom a string originally? */
139 handle_t handle; /* handle stored in property */
140 } property_data_t;
142 /* structure to specify window rectangles */
143 typedef struct
145 int left;
146 int top;
147 int right;
148 int bottom;
149 } rectangle_t;
151 /* structure for console char/attribute info */
152 typedef struct
154 WCHAR ch;
155 unsigned short attr;
156 } char_info_t;
158 /****************************************************************/
159 /* Request declarations */
161 /* Create a new process from the context of the parent */
162 @REQ(new_process)
163 int inherit_all; /* inherit all handles from parent */
164 int create_flags; /* creation flags */
165 int start_flags; /* flags from startup info */
166 handle_t exe_file; /* file handle for main exe */
167 handle_t hstdin; /* handle for stdin */
168 handle_t hstdout; /* handle for stdout */
169 handle_t hstderr; /* handle for stderr */
170 int cmd_show; /* main window show mode */
171 VARARG(filename,string); /* file name of main exe */
172 @REPLY
173 handle_t info; /* new process info handle */
174 @END
177 /* Retrieve information about a newly started process */
178 @REQ(get_new_process_info)
179 handle_t info; /* info handle returned from new_process_request */
180 int pinherit; /* process handle inherit flag */
181 int tinherit; /* thread handle inherit flag */
182 @REPLY
183 void* pid; /* process id */
184 handle_t phandle; /* process handle (in the current process) */
185 void* tid; /* thread id */
186 handle_t thandle; /* thread handle (in the current process) */
187 handle_t event; /* event handle to signal startup */
188 @END
191 /* Create a new thread from the context of the parent */
192 @REQ(new_thread)
193 int suspend; /* new thread should be suspended on creation */
194 int inherit; /* inherit flag */
195 int request_fd; /* fd for request pipe */
196 @REPLY
197 void* tid; /* thread id */
198 handle_t handle; /* thread handle (in the current process) */
199 @END
202 /* Signal that we are finished booting on the client side */
203 @REQ(boot_done)
204 int debug_level; /* new debug level */
205 @END
208 /* Initialize a process; called from the new process context */
209 @REQ(init_process)
210 void* ldt_copy; /* addr of LDT copy */
211 int ppid; /* parent Unix pid */
212 @REPLY
213 int create_flags; /* creation flags */
214 int start_flags; /* flags from startup info */
215 unsigned int server_start; /* server start time (GetTickCount) */
216 handle_t exe_file; /* file handle for main exe */
217 handle_t hstdin; /* handle for stdin */
218 handle_t hstdout; /* handle for stdout */
219 handle_t hstderr; /* handle for stderr */
220 int cmd_show; /* main window show mode */
221 VARARG(filename,string); /* file name of main exe */
222 @END
225 /* Signal the end of the process initialization */
226 @REQ(init_process_done)
227 void* module; /* main module base address */
228 void* entry; /* process entry point */
229 void* name; /* ptr to ptr to name (in process addr space) */
230 handle_t exe_file; /* file handle for main exe */
231 int gui; /* is it a GUI process? */
232 @REPLY
233 int debugged; /* being debugged? */
234 @END
237 /* Initialize a thread; called from the child after fork()/clone() */
238 @REQ(init_thread)
239 int unix_pid; /* Unix pid of new thread */
240 void* teb; /* TEB of new thread (in thread address space) */
241 void* entry; /* thread entry point (in thread address space) */
242 int reply_fd; /* fd for reply pipe */
243 int wait_fd; /* fd for blocking calls pipe */
244 @REPLY
245 void* pid; /* process id of the new thread's process */
246 void* tid; /* thread id of the new thread */
247 int boot; /* is this the boot thread? */
248 int version; /* protocol version */
249 @END
252 /* Terminate a process */
253 @REQ(terminate_process)
254 handle_t handle; /* process handle to terminate */
255 int exit_code; /* process exit code */
256 @REPLY
257 int self; /* suicide? */
258 @END
261 /* Terminate a thread */
262 @REQ(terminate_thread)
263 handle_t handle; /* thread handle to terminate */
264 int exit_code; /* thread exit code */
265 @REPLY
266 int self; /* suicide? */
267 int last; /* last thread in this process? */
268 @END
271 /* Retrieve information about a process */
272 @REQ(get_process_info)
273 handle_t handle; /* process handle */
274 @REPLY
275 void* pid; /* server process id */
276 int debugged; /* debugged? */
277 int exit_code; /* process exit code */
278 int priority; /* priority class */
279 int process_affinity; /* process affinity mask */
280 int system_affinity; /* system affinity mask */
281 @END
284 /* Set a process informations */
285 @REQ(set_process_info)
286 handle_t handle; /* process handle */
287 int mask; /* setting mask (see below) */
288 int priority; /* priority class */
289 int affinity; /* affinity mask */
290 @END
291 #define SET_PROCESS_INFO_PRIORITY 0x01
292 #define SET_PROCESS_INFO_AFFINITY 0x02
295 /* Retrieve information about a thread */
296 @REQ(get_thread_info)
297 handle_t handle; /* thread handle */
298 void* tid_in; /* thread id (optional) */
299 @REPLY
300 void* tid; /* server thread id */
301 void* teb; /* thread teb pointer */
302 int exit_code; /* thread exit code */
303 int priority; /* thread priority level */
304 @END
307 /* Set a thread informations */
308 @REQ(set_thread_info)
309 handle_t handle; /* thread handle */
310 int mask; /* setting mask (see below) */
311 int priority; /* priority class */
312 int affinity; /* affinity mask */
313 @END
314 #define SET_THREAD_INFO_PRIORITY 0x01
315 #define SET_THREAD_INFO_AFFINITY 0x02
318 /* Suspend a thread */
319 @REQ(suspend_thread)
320 handle_t handle; /* thread handle */
321 @REPLY
322 int count; /* new suspend count */
323 @END
326 /* Resume a thread */
327 @REQ(resume_thread)
328 handle_t handle; /* thread handle */
329 @REPLY
330 int count; /* new suspend count */
331 @END
334 /* Notify the server that a dll has been loaded */
335 @REQ(load_dll)
336 handle_t handle; /* file handle */
337 void* base; /* base address */
338 int dbg_offset; /* debug info offset */
339 int dbg_size; /* debug info size */
340 void* name; /* ptr to ptr to name (in process addr space) */
341 @END
344 /* Notify the server that a dll is being unloaded */
345 @REQ(unload_dll)
346 void* base; /* base address */
347 @END
350 /* Queue an APC for a thread */
351 @REQ(queue_apc)
352 handle_t handle; /* thread handle */
353 int user; /* user or system apc? */
354 void* func; /* function to call */
355 void* param; /* param for function to call */
356 @END
359 /* Get next APC to call */
360 @REQ(get_apc)
361 int alertable; /* is thread alertable? */
362 @REPLY
363 void* func; /* function to call */
364 int type; /* function type */
365 VARARG(args,ptrs); /* function arguments */
366 @END
367 enum apc_type { APC_NONE, APC_USER, APC_TIMER, APC_ASYNC };
370 /* Close a handle for the current process */
371 @REQ(close_handle)
372 handle_t handle; /* handle to close */
373 @REPLY
374 int fd; /* associated fd to close */
375 @END
378 /* Set a handle information */
379 @REQ(set_handle_info)
380 handle_t handle; /* handle we are interested in */
381 int flags; /* new handle flags */
382 int mask; /* mask for flags to set */
383 int fd; /* file descriptor or -1 */
384 @REPLY
385 int old_flags; /* old flag value */
386 int cur_fd; /* current file descriptor */
387 @END
390 /* Duplicate a handle */
391 @REQ(dup_handle)
392 handle_t src_process; /* src process handle */
393 handle_t src_handle; /* src handle to duplicate */
394 handle_t dst_process; /* dst process handle */
395 unsigned int access; /* wanted access rights */
396 int inherit; /* inherit flag */
397 int options; /* duplicate options (see below) */
398 @REPLY
399 handle_t handle; /* duplicated handle in dst process */
400 int fd; /* associated fd to close */
401 @END
402 #define DUP_HANDLE_CLOSE_SOURCE DUPLICATE_CLOSE_SOURCE
403 #define DUP_HANDLE_SAME_ACCESS DUPLICATE_SAME_ACCESS
404 #define DUP_HANDLE_MAKE_GLOBAL 0x80000000 /* Not a Windows flag */
407 /* Open a handle to a process */
408 @REQ(open_process)
409 void* pid; /* process id to open */
410 unsigned int access; /* wanted access rights */
411 int inherit; /* inherit flag */
412 @REPLY
413 handle_t handle; /* handle to the process */
414 @END
417 /* Wait for handles */
418 @REQ(select)
419 int flags; /* wait flags (see below) */
420 void* cookie; /* magic cookie to return to client */
421 int sec; /* absolute timeout */
422 int usec; /* absolute timeout */
423 VARARG(handles,handles); /* handles to select on */
424 @END
425 #define SELECT_ALL 1
426 #define SELECT_ALERTABLE 2
427 #define SELECT_INTERRUPTIBLE 4
428 #define SELECT_TIMEOUT 8
431 /* Create an event */
432 @REQ(create_event)
433 int manual_reset; /* manual reset event */
434 int initial_state; /* initial state of the event */
435 int inherit; /* inherit flag */
436 VARARG(name,unicode_str); /* object name */
437 @REPLY
438 handle_t handle; /* handle to the event */
439 @END
441 /* Event operation */
442 @REQ(event_op)
443 handle_t handle; /* handle to event */
444 int op; /* event operation (see below) */
445 @END
446 enum event_op { PULSE_EVENT, SET_EVENT, RESET_EVENT };
449 /* Open an event */
450 @REQ(open_event)
451 unsigned int access; /* wanted access rights */
452 int inherit; /* inherit flag */
453 VARARG(name,unicode_str); /* object name */
454 @REPLY
455 handle_t handle; /* handle to the event */
456 @END
459 /* Create a mutex */
460 @REQ(create_mutex)
461 int owned; /* initially owned? */
462 int inherit; /* inherit flag */
463 VARARG(name,unicode_str); /* object name */
464 @REPLY
465 handle_t handle; /* handle to the mutex */
466 @END
469 /* Release a mutex */
470 @REQ(release_mutex)
471 handle_t handle; /* handle to the mutex */
472 @END
475 /* Open a mutex */
476 @REQ(open_mutex)
477 unsigned int access; /* wanted access rights */
478 int inherit; /* inherit flag */
479 VARARG(name,unicode_str); /* object name */
480 @REPLY
481 handle_t handle; /* handle to the mutex */
482 @END
485 /* Create a semaphore */
486 @REQ(create_semaphore)
487 unsigned int initial; /* initial count */
488 unsigned int max; /* maximum count */
489 int inherit; /* inherit flag */
490 VARARG(name,unicode_str); /* object name */
491 @REPLY
492 handle_t handle; /* handle to the semaphore */
493 @END
496 /* Release a semaphore */
497 @REQ(release_semaphore)
498 handle_t handle; /* handle to the semaphore */
499 unsigned int count; /* count to add to semaphore */
500 @REPLY
501 unsigned int prev_count; /* previous semaphore count */
502 @END
505 /* Open a semaphore */
506 @REQ(open_semaphore)
507 unsigned int access; /* wanted access rights */
508 int inherit; /* inherit flag */
509 VARARG(name,unicode_str); /* object name */
510 @REPLY
511 handle_t handle; /* handle to the semaphore */
512 @END
515 /* Create a file */
516 @REQ(create_file)
517 unsigned int access; /* wanted access rights */
518 int inherit; /* inherit flag */
519 unsigned int sharing; /* sharing flags */
520 int create; /* file create action */
521 unsigned int attrs; /* file attributes for creation */
522 int drive_type; /* type of drive the file is on */
523 VARARG(filename,string); /* file name */
524 @REPLY
525 handle_t handle; /* handle to the file */
526 @END
529 /* Allocate a file handle for a Unix fd */
530 @REQ(alloc_file_handle)
531 unsigned int access; /* wanted access rights */
532 int inherit; /* inherit flag */
533 int fd; /* file descriptor on the client side */
534 @REPLY
535 handle_t handle; /* handle to the file */
536 @END
539 /* Get a Unix fd to access a file */
540 @REQ(get_handle_fd)
541 handle_t handle; /* handle to the file */
542 unsigned int access; /* wanted access rights */
543 @REPLY
544 int fd; /* file descriptor */
545 int type; /* the type of file */
546 @END
547 #define FD_TYPE_INVALID 0
548 #define FD_TYPE_DEFAULT 1
549 #define FD_TYPE_CONSOLE 2
550 #define FD_TYPE_OVERLAPPED 3
551 #define FD_TYPE_TIMEOUT 4
554 /* Set a file current position */
555 @REQ(set_file_pointer)
556 handle_t handle; /* handle to the file */
557 int low; /* position low word */
558 int high; /* position high word */
559 int whence; /* whence to seek */
560 @REPLY
561 int new_low; /* new position low word */
562 int new_high; /* new position high word */
563 @END
566 /* Truncate (or extend) a file */
567 @REQ(truncate_file)
568 handle_t handle; /* handle to the file */
569 @END
572 /* Set a file access and modification times */
573 @REQ(set_file_time)
574 handle_t handle; /* handle to the file */
575 time_t access_time; /* last access time */
576 time_t write_time; /* last write time */
577 @END
580 /* Flush a file buffers */
581 @REQ(flush_file)
582 handle_t handle; /* handle to the file */
583 @END
586 /* Get information about a file */
587 @REQ(get_file_info)
588 handle_t handle; /* handle to the file */
589 @REPLY
590 int type; /* file type */
591 int attr; /* file attributes */
592 time_t access_time; /* last access time */
593 time_t write_time; /* last write time */
594 int size_high; /* file size */
595 int size_low; /* file size */
596 int links; /* number of links */
597 int index_high; /* unique index */
598 int index_low; /* unique index */
599 unsigned int serial; /* volume serial number */
600 @END
603 /* Lock a region of a file */
604 @REQ(lock_file)
605 handle_t handle; /* handle to the file */
606 unsigned int offset_low; /* offset of start of lock */
607 unsigned int offset_high; /* offset of start of lock */
608 unsigned int count_low; /* count of bytes to lock */
609 unsigned int count_high; /* count of bytes to lock */
610 @END
613 /* Unlock a region of a file */
614 @REQ(unlock_file)
615 handle_t handle; /* handle to the file */
616 unsigned int offset_low; /* offset of start of unlock */
617 unsigned int offset_high; /* offset of start of unlock */
618 unsigned int count_low; /* count of bytes to unlock */
619 unsigned int count_high; /* count of bytes to unlock */
620 @END
623 /* Create an anonymous pipe */
624 @REQ(create_pipe)
625 int inherit; /* inherit flag */
626 @REPLY
627 handle_t handle_read; /* handle to the read-side of the pipe */
628 handle_t handle_write; /* handle to the write-side of the pipe */
629 @END
632 /* Create a socket */
633 @REQ(create_socket)
634 unsigned int access; /* wanted access rights */
635 int inherit; /* inherit flag */
636 int family; /* family, see socket manpage */
637 int type; /* type, see socket manpage */
638 int protocol; /* protocol, see socket manpage */
639 @REPLY
640 handle_t handle; /* handle to the new socket */
641 @END
644 /* Accept a socket */
645 @REQ(accept_socket)
646 handle_t lhandle; /* handle to the listening socket */
647 unsigned int access; /* wanted access rights */
648 int inherit; /* inherit flag */
649 @REPLY
650 handle_t handle; /* handle to the new socket */
651 @END
654 /* Set socket event parameters */
655 @REQ(set_socket_event)
656 handle_t handle; /* handle to the socket */
657 unsigned int mask; /* event mask */
658 handle_t event; /* event object */
659 @END
662 /* Get socket event parameters */
663 @REQ(get_socket_event)
664 handle_t handle; /* handle to the socket */
665 int service; /* clear pending? */
666 handle_t s_event; /* "expected" event object */
667 handle_t c_event; /* event to clear */
668 @REPLY
669 unsigned int mask; /* event mask */
670 unsigned int pmask; /* pending events */
671 unsigned int state; /* status bits */
672 VARARG(errors,ints); /* event errors */
673 @END
676 /* Reenable pending socket events */
677 @REQ(enable_socket_event)
678 handle_t handle; /* handle to the socket */
679 unsigned int mask; /* events to re-enable */
680 unsigned int sstate; /* status bits to set */
681 unsigned int cstate; /* status bits to clear */
682 @END
685 /* Allocate a console (only used by a console renderer) */
686 @REQ(alloc_console)
687 unsigned int access; /* wanted access rights */
688 int inherit; /* inherit flag */
689 void* pid; /* pid of process which shall be attached to the console */
690 @REPLY
691 handle_t handle_in; /* handle to console input */
692 handle_t event; /* handle to renderer events change notification */
693 @END
696 /* Free the console of the current process */
697 @REQ(free_console)
698 @END
701 #define CONSOLE_RENDERER_NONE_EVENT 0x00
702 #define CONSOLE_RENDERER_TITLE_EVENT 0x01
703 #define CONSOLE_RENDERER_ACTIVE_SB_EVENT 0x02
704 #define CONSOLE_RENDERER_SB_RESIZE_EVENT 0x03
705 #define CONSOLE_RENDERER_UPDATE_EVENT 0x04
706 #define CONSOLE_RENDERER_CURSOR_POS_EVENT 0x05
707 #define CONSOLE_RENDERER_CURSOR_GEOM_EVENT 0x06
708 #define CONSOLE_RENDERER_DISPLAY_EVENT 0x07
709 #define CONSOLE_RENDERER_EXIT_EVENT 0x08
710 struct console_renderer_event
712 short event;
713 union
715 struct update
717 short top;
718 short bottom;
719 } update;
720 struct resize
722 short width;
723 short height;
724 } resize;
725 struct cursor_pos
727 short x;
728 short y;
729 } cursor_pos;
730 struct cursor_geom
732 short visible;
733 short size;
734 } cursor_geom;
735 struct display
737 short left;
738 short top;
739 short width;
740 short height;
741 } display;
742 } u;
745 /* retrieve console events for the renderer */
746 @REQ(get_console_renderer_events)
747 handle_t handle; /* handle to console input events */
748 @REPLY
749 VARARG(data,bytes); /* the various console_renderer_events */
750 @END
753 /* Open a handle to the process console */
754 @REQ(open_console)
755 int from; /* 0 (resp 1) input (resp output) of current process console */
756 /* otherwise console_in handle to get active screen buffer? */
757 unsigned int access; /* wanted access rights */
758 int inherit; /* inherit flag */
759 int share; /* share mask (only for output handles) */
760 @REPLY
761 handle_t handle; /* handle to the console */
762 @END
765 /* Get a console mode (input or output) */
766 @REQ(get_console_mode)
767 handle_t handle; /* handle to the console */
768 @REPLY
769 int mode; /* console mode */
770 @END
773 /* Set a console mode (input or output) */
774 @REQ(set_console_mode)
775 handle_t handle; /* handle to the console */
776 int mode; /* console mode */
777 @END
780 /* Set info about a console (input only) */
781 @REQ(set_console_input_info)
782 handle_t handle; /* handle to console input, or 0 for process' console */
783 int mask; /* setting mask (see below) */
784 handle_t active_sb; /* active screen buffer */
785 int history_mode; /* whether we duplicate lines in history */
786 int history_size; /* number of lines in history */
787 VARARG(title,unicode_str); /* console title */
788 @END
789 #define SET_CONSOLE_INPUT_INFO_ACTIVE_SB 0x01
790 #define SET_CONSOLE_INPUT_INFO_TITLE 0x02
791 #define SET_CONSOLE_INPUT_INFO_HISTORY_MODE 0x04
792 #define SET_CONSOLE_INPUT_INFO_HISTORY_SIZE 0x08
795 /* Get info about a console (input only) */
796 @REQ(get_console_input_info)
797 handle_t handle; /* handle to console input, or 0 for process' console */
798 @REPLY
799 int history_mode; /* whether we duplicate lines in history */
800 int history_size; /* number of lines in history */
801 int history_index; /* number of used lines in history */
802 VARARG(title,unicode_str); /* console title */
803 @END
806 /* appends a string to console's history */
807 @REQ(append_console_input_history)
808 handle_t handle; /* handle to console input, or 0 for process' console */
809 VARARG(line,unicode_str); /* line to add */
810 @END
813 /* appends a string to console's history */
814 @REQ(get_console_input_history)
815 handle_t handle; /* handle to console input, or 0 for process' console */
816 int index; /* index to get line from */
817 @REPLY
818 int total; /* total length of line in Unicode chars */
819 VARARG(line,unicode_str); /* line to add */
820 @END
823 /* creates a new screen buffer on process' console */
824 @REQ(create_console_output)
825 handle_t handle_in; /* handle to console input, or 0 for process' console */
826 int access; /* wanted access rights */
827 int share; /* sharing credentials */
828 int inherit; /* inherit flag */
829 @REPLY
830 handle_t handle_out; /* handle to the screen buffer */
831 @END
834 /* Set info about a console (output only) */
835 @REQ(set_console_output_info)
836 handle_t handle; /* handle to the console */
837 int mask; /* setting mask (see below) */
838 short int cursor_size; /* size of cursor (percentage filled) */
839 short int cursor_visible;/* cursor visibility flag */
840 short int cursor_x; /* position of cursor (x, y) */
841 short int cursor_y;
842 short int width; /* width of the screen buffer */
843 short int height; /* height of the screen buffer */
844 short int attr; /* default attribute */
845 short int win_left; /* window actually displayed by renderer */
846 short int win_top; /* the rect area is expressed withing the */
847 short int win_right; /* boundaries of the screen buffer */
848 short int win_bottom;
849 short int max_width; /* maximum size (width x height) for the window */
850 short int max_height;
851 @END
852 #define SET_CONSOLE_OUTPUT_INFO_CURSOR_GEOM 0x01
853 #define SET_CONSOLE_OUTPUT_INFO_CURSOR_POS 0x02
854 #define SET_CONSOLE_OUTPUT_INFO_SIZE 0x04
855 #define SET_CONSOLE_OUTPUT_INFO_ATTR 0x08
856 #define SET_CONSOLE_OUTPUT_INFO_DISPLAY_WINDOW 0x10
857 #define SET_CONSOLE_OUTPUT_INFO_MAX_SIZE 0x20
860 /* Get info about a console (output only) */
861 @REQ(get_console_output_info)
862 handle_t handle; /* handle to the console */
863 @REPLY
864 short int cursor_size; /* size of cursor (percentage filled) */
865 short int cursor_visible;/* cursor visibility flag */
866 short int cursor_x; /* position of cursor (x, y) */
867 short int cursor_y;
868 short int width; /* width of the screen buffer */
869 short int height; /* height of the screen buffer */
870 short int attr; /* default attribute */
871 short int win_left; /* window actually displayed by renderer */
872 short int win_top; /* the rect area is expressed withing the */
873 short int win_right; /* boundaries of the screen buffer */
874 short int win_bottom;
875 short int max_width; /* maximum size (width x height) for the window */
876 short int max_height;
877 @END
879 /* Add input records to a console input queue */
880 @REQ(write_console_input)
881 handle_t handle; /* handle to the console input */
882 VARARG(rec,input_records); /* input records */
883 @REPLY
884 int written; /* number of records written */
885 @END
888 /* Fetch input records from a console input queue */
889 @REQ(read_console_input)
890 handle_t handle; /* handle to the console input */
891 int flush; /* flush the retrieved records from the queue? */
892 @REPLY
893 int read; /* number of records read */
894 VARARG(rec,input_records); /* input records */
895 @END
898 /* write data (chars and/or attributes) in a screen buffer */
899 @REQ(write_console_output)
900 handle_t handle; /* handle to the console output */
901 int x; /* position where to start writing */
902 int y;
903 int mode; /* char info (see below) */
904 int wrap; /* wrap around at end of line? */
905 VARARG(data,bytes); /* info to write */
906 @REPLY
907 int written; /* number of char infos actually written */
908 int width; /* width of screen buffer */
909 int height; /* height of screen buffer */
910 @END
911 enum char_info_mode
913 CHAR_INFO_MODE_TEXT, /* characters only */
914 CHAR_INFO_MODE_ATTR, /* attributes only */
915 CHAR_INFO_MODE_TEXTATTR, /* both characters and attributes */
916 CHAR_INFO_MODE_TEXTSTDATTR /* characters but use standard attributes */
920 /* fill a screen buffer with constant data (chars and/or attributes) */
921 @REQ(fill_console_output)
922 handle_t handle; /* handle to the console output */
923 int x; /* position where to start writing */
924 int y;
925 int mode; /* char info mode */
926 int count; /* number to write */
927 int wrap; /* wrap around at end of line? */
928 char_info_t data; /* data to write */
929 @REPLY
930 int written; /* number of char infos actually written */
931 @END
934 /* read data (chars and/or attributes) from a screen buffer */
935 @REQ(read_console_output)
936 handle_t handle; /* handle to the console output */
937 int x; /* position (x,y) where to start reading */
938 int y;
939 int mode; /* char info mode */
940 int wrap; /* wrap around at end of line? */
941 @REPLY
942 int width; /* width of screen buffer */
943 int height; /* height of screen buffer */
944 VARARG(data,bytes);
945 @END
947 /* move a rect (of data) in screen buffer content */
948 @REQ(move_console_output)
949 handle_t handle; /* handle to the console output */
950 short int x_src; /* position (x, y) of rect to start moving from */
951 short int y_src;
952 short int x_dst; /* position (x, y) of rect to move to */
953 short int y_dst;
954 short int w; /* size of the rect (width, height) to move */
955 short int h;
956 @END
959 /* Create a change notification */
960 @REQ(create_change_notification)
961 int subtree; /* watch all the subtree */
962 int filter; /* notification filter */
963 @REPLY
964 handle_t handle; /* handle to the change notification */
965 @END
968 /* Create a file mapping */
969 @REQ(create_mapping)
970 int size_high; /* mapping size */
971 int size_low; /* mapping size */
972 int protect; /* protection flags (see below) */
973 int inherit; /* inherit flag */
974 handle_t file_handle; /* file handle */
975 VARARG(name,unicode_str); /* object name */
976 @REPLY
977 handle_t handle; /* handle to the mapping */
978 @END
979 /* protection flags */
980 #define VPROT_READ 0x01
981 #define VPROT_WRITE 0x02
982 #define VPROT_EXEC 0x04
983 #define VPROT_WRITECOPY 0x08
984 #define VPROT_GUARD 0x10
985 #define VPROT_NOCACHE 0x20
986 #define VPROT_COMMITTED 0x40
987 #define VPROT_IMAGE 0x80
990 /* Open a mapping */
991 @REQ(open_mapping)
992 unsigned int access; /* wanted access rights */
993 int inherit; /* inherit flag */
994 VARARG(name,unicode_str); /* object name */
995 @REPLY
996 handle_t handle; /* handle to the mapping */
997 @END
1000 /* Get information about a file mapping */
1001 @REQ(get_mapping_info)
1002 handle_t handle; /* handle to the mapping */
1003 @REPLY
1004 int size_high; /* mapping size */
1005 int size_low; /* mapping size */
1006 int protect; /* protection flags */
1007 int header_size; /* header size (for VPROT_IMAGE mapping) */
1008 void* base; /* default base addr (for VPROT_IMAGE mapping) */
1009 handle_t shared_file; /* shared mapping file handle */
1010 int shared_size; /* shared mapping size */
1011 int drive_type; /* type of drive the file is on */
1012 @END
1015 /* Create a device */
1016 @REQ(create_device)
1017 unsigned int access; /* wanted access rights */
1018 int inherit; /* inherit flag */
1019 int id; /* client private id */
1020 @REPLY
1021 handle_t handle; /* handle to the device */
1022 @END
1025 /* Create a snapshot */
1026 @REQ(create_snapshot)
1027 int inherit; /* inherit flag */
1028 int flags; /* snapshot flags (TH32CS_*) */
1029 void* pid; /* process id */
1030 @REPLY
1031 handle_t handle; /* handle to the snapshot */
1032 @END
1035 /* Get the next process from a snapshot */
1036 @REQ(next_process)
1037 handle_t handle; /* handle to the snapshot */
1038 int reset; /* reset snapshot position? */
1039 @REPLY
1040 int count; /* process usage count */
1041 void* pid; /* process id */
1042 int threads; /* number of threads */
1043 int priority; /* process priority */
1044 @END
1047 /* Get the next thread from a snapshot */
1048 @REQ(next_thread)
1049 handle_t handle; /* handle to the snapshot */
1050 int reset; /* reset snapshot position? */
1051 @REPLY
1052 int count; /* thread usage count */
1053 void* pid; /* process id */
1054 void* tid; /* thread id */
1055 int base_pri; /* base priority */
1056 int delta_pri; /* delta priority */
1057 @END
1060 /* Get the next module from a snapshot */
1061 @REQ(next_module)
1062 handle_t handle; /* handle to the snapshot */
1063 int reset; /* reset snapshot position? */
1064 @REPLY
1065 void* pid; /* process id */
1066 void* base; /* module base address */
1067 @END
1070 /* Wait for a debug event */
1071 @REQ(wait_debug_event)
1072 int get_handle; /* should we alloc a handle for waiting? */
1073 @REPLY
1074 void* pid; /* process id */
1075 void* tid; /* thread id */
1076 handle_t wait; /* wait handle if no event ready */
1077 VARARG(event,debug_event); /* debug event data */
1078 @END
1081 /* Queue an exception event */
1082 @REQ(queue_exception_event)
1083 int first; /* first chance exception? */
1084 VARARG(record,exc_event); /* thread context followed by exception record */
1085 @REPLY
1086 handle_t handle; /* handle to the queued event */
1087 @END
1090 /* Retrieve the status of an exception event */
1091 @REQ(get_exception_status)
1092 handle_t handle; /* handle to the queued event */
1093 @REPLY
1094 int status; /* event continuation status */
1095 VARARG(context,context); /* modified thread context */
1096 @END
1099 /* Send an output string to the debugger */
1100 @REQ(output_debug_string)
1101 void* string; /* string to display (in debugged process address space) */
1102 int unicode; /* is it Unicode? */
1103 int length; /* string length */
1104 @END
1107 /* Continue a debug event */
1108 @REQ(continue_debug_event)
1109 void* pid; /* process id to continue */
1110 void* tid; /* thread id to continue */
1111 int status; /* continuation status */
1112 @END
1115 /* Start debugging an existing process */
1116 @REQ(debug_process)
1117 void* pid; /* id of the process to debug */
1118 @END
1121 /* Read data from a process address space */
1122 @REQ(read_process_memory)
1123 handle_t handle; /* process handle */
1124 void* addr; /* addr to read from */
1125 @REPLY
1126 VARARG(data,bytes); /* result data */
1127 @END
1130 /* Write data to a process address space */
1131 @REQ(write_process_memory)
1132 handle_t handle; /* process handle */
1133 void* addr; /* addr to write to (must be int-aligned) */
1134 unsigned int first_mask; /* mask for first word */
1135 unsigned int last_mask; /* mask for last word */
1136 VARARG(data,bytes); /* data to write */
1137 @END
1140 /* Create a registry key */
1141 @REQ(create_key)
1142 handle_t parent; /* handle to the parent key */
1143 unsigned int access; /* desired access rights */
1144 unsigned int options; /* creation options */
1145 time_t modif; /* last modification time */
1146 size_t namelen; /* length of key name in bytes */
1147 VARARG(name,unicode_str,namelen); /* key name */
1148 VARARG(class,unicode_str); /* class name */
1149 @REPLY
1150 handle_t hkey; /* handle to the created key */
1151 int created; /* has it been newly created? */
1152 @END
1154 /* Open a registry key */
1155 @REQ(open_key)
1156 handle_t parent; /* handle to the parent key */
1157 unsigned int access; /* desired access rights */
1158 VARARG(name,unicode_str); /* key name */
1159 @REPLY
1160 handle_t hkey; /* handle to the open key */
1161 @END
1164 /* Delete a registry key */
1165 @REQ(delete_key)
1166 handle_t hkey; /* handle to the key */
1167 @END
1170 /* Enumerate registry subkeys */
1171 @REQ(enum_key)
1172 handle_t hkey; /* handle to registry key */
1173 int index; /* index of subkey (or -1 for current key) */
1174 int info_class; /* requested information class */
1175 @REPLY
1176 int subkeys; /* number of subkeys */
1177 int max_subkey; /* longest subkey name */
1178 int max_class; /* longest class name */
1179 int values; /* number of values */
1180 int max_value; /* longest value name */
1181 int max_data; /* longest value data */
1182 time_t modif; /* last modification time */
1183 size_t total; /* total length needed for full name and class */
1184 size_t namelen; /* length of key name in bytes */
1185 VARARG(name,unicode_str,namelen); /* key name */
1186 VARARG(class,unicode_str); /* class name */
1187 @END
1190 /* Set a value of a registry key */
1191 @REQ(set_key_value)
1192 handle_t hkey; /* handle to registry key */
1193 int type; /* value type */
1194 size_t namelen; /* length of value name in bytes */
1195 VARARG(name,unicode_str,namelen); /* value name */
1196 VARARG(data,bytes); /* value data */
1197 @END
1200 /* Retrieve the value of a registry key */
1201 @REQ(get_key_value)
1202 handle_t hkey; /* handle to registry key */
1203 VARARG(name,unicode_str); /* value name */
1204 @REPLY
1205 int type; /* value type */
1206 size_t total; /* total length needed for data */
1207 VARARG(data,bytes); /* value data */
1208 @END
1211 /* Enumerate a value of a registry key */
1212 @REQ(enum_key_value)
1213 handle_t hkey; /* handle to registry key */
1214 int index; /* value index */
1215 int info_class; /* requested information class */
1216 @REPLY
1217 int type; /* value type */
1218 size_t total; /* total length needed for full name and data */
1219 size_t namelen; /* length of value name in bytes */
1220 VARARG(name,unicode_str,namelen); /* value name */
1221 VARARG(data,bytes); /* value data */
1222 @END
1225 /* Delete a value of a registry key */
1226 @REQ(delete_key_value)
1227 handle_t hkey; /* handle to registry key */
1228 VARARG(name,unicode_str); /* value name */
1229 @END
1232 /* Load a registry branch from a file */
1233 @REQ(load_registry)
1234 handle_t hkey; /* root key to load to */
1235 handle_t file; /* file to load from */
1236 VARARG(name,unicode_str); /* subkey name */
1237 @END
1240 /* Save a registry branch to a file */
1241 @REQ(save_registry)
1242 handle_t hkey; /* key to save */
1243 handle_t file; /* file to save to */
1244 @END
1247 /* Save a registry branch at server exit */
1248 @REQ(save_registry_atexit)
1249 handle_t hkey; /* key to save */
1250 VARARG(file,string); /* file to save to */
1251 @END
1254 /* Set the current and saving level for the registry */
1255 @REQ(set_registry_levels)
1256 int current; /* new current level */
1257 int saving; /* new saving level */
1258 int period; /* duration between periodic saves (milliseconds) */
1259 @END
1262 /* Create a waitable timer */
1263 @REQ(create_timer)
1264 int inherit; /* inherit flag */
1265 int manual; /* manual reset */
1266 VARARG(name,unicode_str); /* object name */
1267 @REPLY
1268 handle_t handle; /* handle to the timer */
1269 @END
1272 /* Open a waitable timer */
1273 @REQ(open_timer)
1274 unsigned int access; /* wanted access rights */
1275 int inherit; /* inherit flag */
1276 VARARG(name,unicode_str); /* object name */
1277 @REPLY
1278 handle_t handle; /* handle to the timer */
1279 @END
1281 /* Set a waitable timer */
1282 @REQ(set_timer)
1283 handle_t handle; /* handle to the timer */
1284 int sec; /* next expiration absolute time */
1285 int usec; /* next expiration absolute time */
1286 int period; /* timer period in ms */
1287 void* callback; /* callback function */
1288 void* arg; /* callback argument */
1289 @END
1291 /* Cancel a waitable timer */
1292 @REQ(cancel_timer)
1293 handle_t handle; /* handle to the timer */
1294 @END
1297 /* Retrieve the current context of a thread */
1298 @REQ(get_thread_context)
1299 handle_t handle; /* thread handle */
1300 unsigned int flags; /* context flags */
1301 @REPLY
1302 VARARG(context,context); /* thread context */
1303 @END
1306 /* Set the current context of a thread */
1307 @REQ(set_thread_context)
1308 handle_t handle; /* thread handle */
1309 unsigned int flags; /* context flags */
1310 VARARG(context,context); /* thread context */
1311 @END
1314 /* Fetch a selector entry for a thread */
1315 @REQ(get_selector_entry)
1316 handle_t handle; /* thread handle */
1317 int entry; /* LDT entry */
1318 @REPLY
1319 unsigned int base; /* selector base */
1320 unsigned int limit; /* selector limit */
1321 unsigned char flags; /* selector flags */
1322 @END
1325 /* Add an atom */
1326 @REQ(add_atom)
1327 int local; /* is atom in local process table? */
1328 VARARG(name,unicode_str); /* atom name */
1329 @REPLY
1330 atom_t atom; /* resulting atom */
1331 @END
1334 /* Delete an atom */
1335 @REQ(delete_atom)
1336 atom_t atom; /* atom handle */
1337 int local; /* is atom in local process table? */
1338 @END
1341 /* Find an atom */
1342 @REQ(find_atom)
1343 int local; /* is atom in local process table? */
1344 VARARG(name,unicode_str); /* atom name */
1345 @REPLY
1346 atom_t atom; /* atom handle */
1347 @END
1350 /* Get an atom name */
1351 @REQ(get_atom_name)
1352 atom_t atom; /* atom handle */
1353 int local; /* is atom in local process table? */
1354 @REPLY
1355 int count; /* atom lock count */
1356 VARARG(name,unicode_str); /* atom name */
1357 @END
1360 /* Init the process atom table */
1361 @REQ(init_atom_table)
1362 int entries; /* number of entries */
1363 @END
1366 /* Get the message queue of the current thread */
1367 @REQ(get_msg_queue)
1368 @REPLY
1369 handle_t handle; /* handle to the queue */
1370 @END
1373 /* Set the current message queue wakeup mask */
1374 @REQ(set_queue_mask)
1375 unsigned int wake_mask; /* wakeup bits mask */
1376 unsigned int changed_mask; /* changed bits mask */
1377 int skip_wait; /* will we skip waiting if signaled? */
1378 @REPLY
1379 unsigned int wake_bits; /* current wake bits */
1380 unsigned int changed_bits; /* current changed bits */
1381 @END
1384 /* Get the current message queue status */
1385 @REQ(get_queue_status)
1386 int clear; /* should we clear the change bits? */
1387 @REPLY
1388 unsigned int wake_bits; /* wake bits */
1389 unsigned int changed_bits; /* changed bits since last time */
1390 @END
1393 /* Wait for a process to start waiting on input */
1394 @REQ(wait_input_idle)
1395 handle_t handle; /* process handle */
1396 int timeout; /* timeout */
1397 @REPLY
1398 handle_t event; /* handle to idle event */
1399 @END
1402 /* Send a message to a thread queue */
1403 @REQ(send_message)
1404 void* id; /* thread id */
1405 int type; /* message type (see below) */
1406 user_handle_t win; /* window handle */
1407 unsigned int msg; /* message code */
1408 unsigned int wparam; /* parameters */
1409 unsigned int lparam; /* parameters */
1410 int x; /* x position */
1411 int y; /* y position */
1412 unsigned int time; /* message time */
1413 unsigned int info; /* extra info */
1414 int timeout; /* timeout for reply */
1415 VARARG(data,bytes); /* message data for sent messages */
1416 @END
1418 enum message_type
1420 MSG_ASCII, /* Ascii message (from SendMessageA) */
1421 MSG_UNICODE, /* Unicode message (from SendMessageW) */
1422 MSG_NOTIFY, /* notify message (from SendNotifyMessageW), always Unicode */
1423 MSG_CALLBACK, /* callback message (from SendMessageCallbackW), always Unicode */
1424 MSG_OTHER_PROCESS, /* sent from other process, may include vararg data, always Unicode */
1425 MSG_POSTED, /* posted message (from PostMessageW), always Unicode */
1426 MSG_HARDWARE_RAW, /* raw hardware message */
1427 MSG_HARDWARE_COOKED /* cooked hardware message */
1431 /* Get a message from the current queue */
1432 @REQ(get_message)
1433 int flags; /* see below */
1434 user_handle_t get_win; /* window handle to get */
1435 unsigned int get_first; /* first message code to get */
1436 unsigned int get_last; /* last message code to get */
1437 @REPLY
1438 int type; /* message type */
1439 user_handle_t win; /* window handle */
1440 unsigned int msg; /* message code */
1441 unsigned int wparam; /* parameters */
1442 unsigned int lparam; /* parameters */
1443 int x; /* x position */
1444 int y; /* y position */
1445 unsigned int time; /* message time */
1446 unsigned int info; /* extra info */
1447 size_t total; /* total size of extra data */
1448 VARARG(data,bytes); /* message data for sent messages */
1449 @END
1450 #define GET_MSG_REMOVE 1 /* remove the message */
1451 #define GET_MSG_SENT_ONLY 2 /* only get sent messages */
1452 #define GET_MSG_REMOVE_LAST 4 /* remove last message returned before checking for a new one */
1454 /* Reply to a sent message */
1455 @REQ(reply_message)
1456 unsigned int result; /* message result */
1457 int remove; /* should we remove the message? */
1458 VARARG(data,bytes); /* message data for sent messages */
1459 @END
1462 /* Retrieve the reply for the last message sent */
1463 @REQ(get_message_reply)
1464 int cancel; /* cancel message if not ready? */
1465 @REPLY
1466 unsigned int result; /* message result */
1467 VARARG(data,bytes); /* message data for sent messages */
1468 @END
1471 /* Set a window timer */
1472 @REQ(set_win_timer)
1473 user_handle_t win; /* window handle */
1474 unsigned int msg; /* message to post */
1475 unsigned int id; /* timer id */
1476 unsigned int rate; /* timer rate in ms */
1477 unsigned int lparam; /* message lparam (callback proc) */
1478 @END
1481 /* Kill a window timer */
1482 @REQ(kill_win_timer)
1483 user_handle_t win; /* window handle */
1484 unsigned int msg; /* message to post */
1485 unsigned int id; /* timer id */
1486 @END
1489 /* Open a serial port */
1490 @REQ(create_serial)
1491 unsigned int access; /* wanted access rights */
1492 int inherit; /* inherit flag */
1493 unsigned int attributes; /* eg. FILE_FLAG_OVERLAPPED */
1494 unsigned int sharing; /* sharing flags */
1495 VARARG(name,string); /* file name */
1496 @REPLY
1497 handle_t handle; /* handle to the port */
1498 @END
1501 /* Retrieve info about a serial port */
1502 @REQ(get_serial_info)
1503 handle_t handle; /* handle to comm port */
1504 @REPLY
1505 unsigned int readinterval;
1506 unsigned int readconst;
1507 unsigned int readmult;
1508 unsigned int writeconst;
1509 unsigned int writemult;
1510 unsigned int eventmask;
1511 unsigned int commerror;
1512 @END
1515 /* Set info about a serial port */
1516 @REQ(set_serial_info)
1517 handle_t handle; /* handle to comm port */
1518 int flags; /* bitmask to set values (see below) */
1519 unsigned int readinterval;
1520 unsigned int readconst;
1521 unsigned int readmult;
1522 unsigned int writeconst;
1523 unsigned int writemult;
1524 unsigned int eventmask;
1525 unsigned int commerror;
1526 @END
1527 #define SERIALINFO_SET_TIMEOUTS 0x01
1528 #define SERIALINFO_SET_MASK 0x02
1529 #define SERIALINFO_SET_ERROR 0x04
1532 /* Create/Destroy an async I/O */
1533 @REQ(register_async)
1534 handle_t handle; /* handle to comm port, socket or file */
1535 void* func;
1536 int type;
1537 void* overlapped;
1538 int count;
1539 unsigned int status;
1540 @END
1541 #define ASYNC_TYPE_NONE 0x00
1542 #define ASYNC_TYPE_READ 0x01
1543 #define ASYNC_TYPE_WRITE 0x02
1544 #define ASYNC_TYPE_WAIT 0x03
1547 /* Create a named pipe */
1548 @REQ(create_named_pipe)
1549 unsigned int openmode;
1550 unsigned int pipemode;
1551 unsigned int maxinstances;
1552 unsigned int outsize;
1553 unsigned int insize;
1554 unsigned int timeout;
1555 VARARG(filename,string); /* pipe name */
1556 @REPLY
1557 handle_t handle; /* handle to the pipe */
1558 @END
1561 /* Open an existing named pipe */
1562 @REQ(open_named_pipe)
1563 unsigned int access;
1564 VARARG(filename,string); /* pipe name */
1565 @REPLY
1566 handle_t handle; /* handle to the pipe */
1567 @END
1570 /* Connect to a named pipe */
1571 @REQ(connect_named_pipe)
1572 handle_t handle;
1573 void* overlapped;
1574 void* func;
1575 @END
1578 /* Wait for a named pipe */
1579 @REQ(wait_named_pipe)
1580 unsigned int timeout;
1581 void* overlapped;
1582 void* func;
1583 VARARG(filename,string); /* pipe name */
1584 @END
1587 /* Disconnect a named pipe */
1588 @REQ(disconnect_named_pipe)
1589 handle_t handle;
1590 @END
1593 @REQ(get_named_pipe_info)
1594 handle_t handle;
1595 @REPLY
1596 unsigned int flags;
1597 unsigned int maxinstances;
1598 unsigned int outsize;
1599 unsigned int insize;
1600 @END
1603 /* Create a window */
1604 @REQ(create_window)
1605 user_handle_t parent; /* parent window */
1606 user_handle_t owner; /* owner window */
1607 atom_t atom; /* class atom */
1608 @REPLY
1609 user_handle_t handle; /* created window */
1610 @END
1613 /* Link a window into the tree */
1614 @REQ(link_window)
1615 user_handle_t handle; /* handle to the window */
1616 user_handle_t parent; /* handle to the parent */
1617 user_handle_t previous; /* previous child in Z-order */
1618 @REPLY
1619 user_handle_t full_parent; /* full handle of new parent */
1620 @END
1623 /* Destroy a window */
1624 @REQ(destroy_window)
1625 user_handle_t handle; /* handle to the window */
1626 @END
1629 /* Set a window owner */
1630 @REQ(set_window_owner)
1631 user_handle_t handle; /* handle to the window */
1632 user_handle_t owner; /* new owner */
1633 @REPLY
1634 user_handle_t full_owner; /* full handle of new owner */
1635 @END
1638 /* Get information from a window handle */
1639 @REQ(get_window_info)
1640 user_handle_t handle; /* handle to the window */
1641 @REPLY
1642 user_handle_t full_handle; /* full 32-bit handle */
1643 void* pid; /* process owning the window */
1644 void* tid; /* thread owning the window */
1645 atom_t atom; /* class atom */
1646 @END
1649 /* Set some information in a window */
1650 @REQ(set_window_info)
1651 user_handle_t handle; /* handle to the window */
1652 unsigned int flags; /* flags for fields to set (see below) */
1653 unsigned int style; /* window style */
1654 unsigned int ex_style; /* window extended style */
1655 unsigned int id; /* window id */
1656 void* instance; /* creator instance */
1657 void* user_data; /* user-specific data */
1658 @REPLY
1659 unsigned int old_style; /* old window style */
1660 unsigned int old_ex_style; /* old window extended style */
1661 unsigned int old_id; /* old window id */
1662 void* old_instance; /* old creator instance */
1663 void* old_user_data; /* old user-specific data */
1664 @END
1665 #define SET_WIN_STYLE 0x01
1666 #define SET_WIN_EXSTYLE 0x02
1667 #define SET_WIN_ID 0x04
1668 #define SET_WIN_INSTANCE 0x08
1669 #define SET_WIN_USERDATA 0x10
1672 /* Get a list of the window parents, up to the root of the tree */
1673 @REQ(get_window_parents)
1674 user_handle_t handle; /* handle to the window */
1675 @REPLY
1676 int count; /* total count of parents */
1677 VARARG(parents,user_handles); /* parent handles */
1678 @END
1681 /* Get a list of the window children */
1682 @REQ(get_window_children)
1683 user_handle_t parent; /* parent window */
1684 atom_t atom; /* class atom for the listed children */
1685 void* tid; /* thread owning the listed children */
1686 @REPLY
1687 int count; /* total count of children */
1688 VARARG(children,user_handles); /* children handles */
1689 @END
1692 /* Get window tree information from a window handle */
1693 @REQ(get_window_tree)
1694 user_handle_t handle; /* handle to the window */
1695 @REPLY
1696 user_handle_t parent; /* parent window */
1697 user_handle_t owner; /* owner window */
1698 user_handle_t next_sibling; /* next sibling in Z-order */
1699 user_handle_t prev_sibling; /* prev sibling in Z-order */
1700 user_handle_t first_sibling; /* first sibling in Z-order */
1701 user_handle_t last_sibling; /* last sibling in Z-order */
1702 user_handle_t first_child; /* first child */
1703 user_handle_t last_child; /* last child */
1704 @END
1706 /* Set the window and client rectangles of a window */
1707 @REQ(set_window_rectangles)
1708 user_handle_t handle; /* handle to the window */
1709 rectangle_t window; /* window rectangle */
1710 rectangle_t client; /* client rectangle */
1711 @END
1714 /* Get the window and client rectangles of a window */
1715 @REQ(get_window_rectangles)
1716 user_handle_t handle; /* handle to the window */
1717 @REPLY
1718 rectangle_t window; /* window rectangle */
1719 rectangle_t client; /* client rectangle */
1720 @END
1723 /* Get the window text */
1724 @REQ(get_window_text)
1725 user_handle_t handle; /* handle to the window */
1726 @REPLY
1727 VARARG(text,unicode_str); /* window text */
1728 @END
1731 /* Set the window text */
1732 @REQ(set_window_text)
1733 user_handle_t handle; /* handle to the window */
1734 VARARG(text,unicode_str); /* window text */
1735 @END
1738 /* Increment the window paint count */
1739 @REQ(inc_window_paint_count)
1740 user_handle_t handle; /* handle to the window */
1741 int incr; /* increment (can be negative) */
1742 @END
1745 /* Get the coordinates offset between two windows */
1746 @REQ(get_windows_offset)
1747 user_handle_t from; /* handle to the first window */
1748 user_handle_t to; /* handle to the second window */
1749 @REPLY
1750 int x; /* x coordinate offset */
1751 int y; /* y coordinate offset */
1752 @END
1755 /* Set a window property */
1756 @REQ(set_window_property)
1757 user_handle_t window; /* handle to the window */
1758 atom_t atom; /* property atom (high-word set if it was a string) */
1759 int string; /* was atom a string originally? */
1760 handle_t handle; /* handle to store */
1761 @END
1764 /* Remove a window property */
1765 @REQ(remove_window_property)
1766 user_handle_t window; /* handle to the window */
1767 atom_t atom; /* property atom */
1768 @REPLY
1769 handle_t handle; /* handle stored in property */
1770 @END
1773 /* Get a window property */
1774 @REQ(get_window_property)
1775 user_handle_t window; /* handle to the window */
1776 atom_t atom; /* property atom */
1777 @REPLY
1778 handle_t handle; /* handle stored in property */
1779 @END
1782 /* Get the list of properties of a window */
1783 @REQ(get_window_properties)
1784 user_handle_t window; /* handle to the window */
1785 @REPLY
1786 int total; /* total number of properties */
1787 VARARG(props,properties); /* list of properties */
1788 @END