Store the window caption text in the server.
[wine] / server / protocol.def
1 /* -*- C -*-
2  *
3  * Wine server protocol definition
4  *
5  * Copyright (C) 2001 Alexandre Julliard
6  *
7  * This file is used by tools/make_requests to build the
8  * protocol structures in include/wine/server_protocol.h
9  */
10
11 @HEADER  /* start of C declarations */
12
13 #include <stdlib.h>
14 #include <time.h>
15 #include "winbase.h"
16
17 struct request_header
18 {
19     int            req;          /* request code */
20     unsigned short var_offset;   /* offset of the variable part of the request */
21     unsigned short var_size;     /* size of the variable part of the request */
22     unsigned int   error;        /* error result */
23 };
24
25 struct reply_header
26 {
27     unsigned int   error;        /* error result */
28     unsigned short var_offset;   /* offset of the variable part of the request */
29     unsigned short var_size;     /* size of the variable part of the request */
30 };
31
32 /* placeholder structure for the maximum allowed request size */
33 /* this is used to construct the generic_request union */
34 struct request_max_size
35 {
36     int pad[16]; /* the max request size is 16 ints */
37 };
38
39 /* max size of the variable part of a request */
40 #define REQUEST_MAX_VAR_SIZE  1024
41
42 typedef int handle_t;
43 typedef unsigned short atom_t;
44 typedef unsigned int user_handle_t;
45
46 #define FIRST_USER_HANDLE 0x0020  /* first possible value for low word of user handle */
47 #define LAST_USER_HANDLE  0xffef  /* last possible value for low word of user handle */
48
49
50 /* definitions of the event data depending on the event code */
51 struct debug_event_exception
52 {
53     EXCEPTION_RECORD record;   /* exception record */
54     int              first;    /* first chance exception? */
55 };
56 struct debug_event_create_thread
57 {
58     handle_t    handle;     /* handle to the new thread */
59     void       *teb;        /* thread teb (in debugged process address space) */
60     void       *start;      /* thread startup routine */
61 };
62 struct debug_event_create_process
63 {
64     handle_t    file;       /* handle to the process exe file */
65     handle_t    process;    /* handle to the new process */
66     handle_t    thread;     /* handle to the new thread */
67     void       *base;       /* base of executable image */
68     int         dbg_offset; /* offset of debug info in file */
69     int         dbg_size;   /* size of debug info */
70     void       *teb;        /* thread teb (in debugged process address space) */
71     void       *start;      /* thread startup routine */
72     void       *name;       /* image name (optional) */
73     int         unicode;    /* is it Unicode? */
74 };
75 struct debug_event_exit
76 {
77     int         exit_code;  /* thread or process exit code */
78 };
79 struct debug_event_load_dll
80 {
81     handle_t    handle;     /* file handle for the dll */
82     void       *base;       /* base address of the dll */
83     int         dbg_offset; /* offset of debug info in file */
84     int         dbg_size;   /* size of debug info */
85     void       *name;       /* image name (optional) */
86     int         unicode;    /* is it Unicode? */
87 };
88 struct debug_event_unload_dll
89 {
90     void       *base;       /* base address of the dll */
91 };
92 struct debug_event_output_string
93 {
94     void       *string;     /* string to display (in debugged process address space) */
95     int         unicode;    /* is it Unicode? */
96     int         length;     /* string length */
97 };
98 struct debug_event_rip_info
99 {
100     int         error;      /* ??? */
101     int         type;       /* ??? */
102 };
103 union debug_event_data
104 {
105     struct debug_event_exception      exception;
106     struct debug_event_create_thread  create_thread;
107     struct debug_event_create_process create_process;
108     struct debug_event_exit           exit;
109     struct debug_event_load_dll       load_dll;
110     struct debug_event_unload_dll     unload_dll;
111     struct debug_event_output_string  output_string;
112     struct debug_event_rip_info       rip_info;
113 };
114
115 /* debug event data */
116 typedef struct
117 {
118     int                      code;   /* event code */
119     union debug_event_data   info;   /* event information */
120 } debug_event_t;
121
122 /* structure used in sending an fd from client to server */
123 struct send_fd
124 {
125     void  *tid;  /* thread id */
126     int    fd;   /* file descriptor on client-side */
127 };
128
129 /* structure sent by the server on the wait fifo */
130 struct wake_up_reply
131 {
132     void *cookie;    /* magic cookie that was passed in select_request */
133     int   signaled;  /* wait result */
134 };
135
136 /* structure returned in the list of window properties */
137 typedef struct
138 {
139     atom_t         atom;     /* property atom */
140     short          string;   /* was atom a string originally? */
141     handle_t       handle;   /* handle stored in property */
142 } property_data_t;
143
144 /* structure to specify window rectangles */
145 typedef struct
146 {
147     int  left;
148     int  top;
149     int  right;
150     int  bottom;
151 } rectangle_t;
152
153 /****************************************************************/
154 /* Request declarations */
155
156 /* Create a new process from the context of the parent */
157 @REQ(new_process)
158     int          inherit_all;  /* inherit all handles from parent */
159     int          create_flags; /* creation flags */
160     int          start_flags;  /* flags from startup info */
161     handle_t     exe_file;     /* file handle for main exe */
162     handle_t     hstdin;       /* handle for stdin */
163     handle_t     hstdout;      /* handle for stdout */
164     handle_t     hstderr;      /* handle for stderr */
165     int          cmd_show;     /* main window show mode */
166     VARARG(filename,string);   /* file name of main exe */
167 @REPLY
168     handle_t     info;         /* new process info handle */
169 @END
170
171
172 /* Retrieve information about a newly started process */
173 @REQ(get_new_process_info)
174     handle_t     info;         /* info handle returned from new_process_request */
175     int          pinherit;     /* process handle inherit flag */
176     int          tinherit;     /* thread handle inherit flag */
177 @REPLY
178     void*        pid;          /* process id */
179     handle_t     phandle;      /* process handle (in the current process) */
180     void*        tid;          /* thread id */
181     handle_t     thandle;      /* thread handle (in the current process) */
182     handle_t     event;        /* event handle to signal startup */
183 @END
184
185
186 /* Create a new thread from the context of the parent */
187 @REQ(new_thread)
188     int          suspend;      /* new thread should be suspended on creation */
189     int          inherit;      /* inherit flag */
190     int          request_fd;   /* fd for request pipe */
191 @REPLY
192     void*        tid;          /* thread id */
193     handle_t     handle;       /* thread handle (in the current process) */
194 @END
195
196
197 /* Signal that we are finished booting on the client side */
198 @REQ(boot_done)
199     int          debug_level;  /* new debug level */
200 @END
201
202
203 /* Initialize a process; called from the new process context */
204 @REQ(init_process)
205     void*        ldt_copy;     /* addr of LDT copy */
206     int          ppid;         /* parent Unix pid */
207 @REPLY
208     int          create_flags; /* creation flags */
209     int          start_flags;  /* flags from startup info */
210     unsigned int server_start; /* server start time (GetTickCount) */
211     handle_t     exe_file;     /* file handle for main exe */
212     handle_t     hstdin;       /* handle for stdin */
213     handle_t     hstdout;      /* handle for stdout */
214     handle_t     hstderr;      /* handle for stderr */
215     int          cmd_show;     /* main window show mode */
216     VARARG(filename,string);   /* file name of main exe */
217 @END
218
219
220 /* Signal the end of the process initialization */
221 @REQ(init_process_done)
222     void*        module;       /* main module base address */
223     void*        entry;        /* process entry point */
224     void*        name;         /* ptr to ptr to name (in process addr space) */
225     handle_t     exe_file;     /* file handle for main exe */
226     int          gui;          /* is it a GUI process? */
227 @REPLY
228     int          debugged;     /* being debugged? */
229 @END
230
231
232 /* Initialize a thread; called from the child after fork()/clone() */
233 @REQ(init_thread)
234     int          unix_pid;     /* Unix pid of new thread */
235     void*        teb;          /* TEB of new thread (in thread address space) */
236     void*        entry;        /* thread entry point (in thread address space) */
237     int          reply_fd;     /* fd for reply pipe */
238     int          wait_fd;      /* fd for blocking calls pipe */
239 @REPLY
240     void*        pid;          /* process id of the new thread's process */
241     void*        tid;          /* thread id of the new thread */
242     int          boot;         /* is this the boot thread? */
243     int          version;      /* protocol version */
244 @END
245
246
247 /* Set the shared buffer for a thread */
248 @REQ(set_thread_buffer)
249     int          fd;           /* fd to mmap as shared buffer */
250 @REPLY
251     unsigned int offset;       /* offset of buffer in file */
252     unsigned int size;         /* size of buffer */
253 @END
254
255
256 /* Terminate a process */
257 @REQ(terminate_process)
258     handle_t     handle;       /* process handle to terminate */
259     int          exit_code;    /* process exit code */
260 @REPLY
261     int          self;         /* suicide? */
262 @END
263
264
265 /* Terminate a thread */
266 @REQ(terminate_thread)
267     handle_t     handle;       /* thread handle to terminate */
268     int          exit_code;    /* thread exit code */
269 @REPLY
270     int          self;         /* suicide? */
271     int          last;         /* last thread in this process? */
272 @END
273
274
275 /* Retrieve information about a process */
276 @REQ(get_process_info)
277     handle_t     handle;           /* process handle */
278 @REPLY
279     void*        pid;              /* server process id */
280     int          debugged;         /* debugged? */
281     int          exit_code;        /* process exit code */
282     int          priority;         /* priority class */
283     int          process_affinity; /* process affinity mask */
284     int          system_affinity;  /* system affinity mask */
285 @END
286
287
288 /* Set a process informations */
289 @REQ(set_process_info)
290     handle_t     handle;       /* process handle */
291     int          mask;         /* setting mask (see below) */
292     int          priority;     /* priority class */
293     int          affinity;     /* affinity mask */
294 @END
295 #define SET_PROCESS_INFO_PRIORITY 0x01
296 #define SET_PROCESS_INFO_AFFINITY 0x02
297
298
299 /* Retrieve information about a thread */
300 @REQ(get_thread_info)
301     handle_t     handle;       /* thread handle */
302     void*        tid_in;       /* thread id (optional) */
303 @REPLY
304     void*        tid;          /* server thread id */
305     void*        teb;          /* thread teb pointer */
306     int          exit_code;    /* thread exit code */
307     int          priority;     /* thread priority level */
308 @END
309
310
311 /* Set a thread informations */
312 @REQ(set_thread_info)
313     handle_t     handle;       /* thread handle */
314     int          mask;         /* setting mask (see below) */
315     int          priority;     /* priority class */
316     int          affinity;     /* affinity mask */
317 @END
318 #define SET_THREAD_INFO_PRIORITY 0x01
319 #define SET_THREAD_INFO_AFFINITY 0x02
320
321
322 /* Suspend a thread */
323 @REQ(suspend_thread)
324     handle_t     handle;       /* thread handle */
325 @REPLY
326     int          count;        /* new suspend count */
327 @END
328
329
330 /* Resume a thread */
331 @REQ(resume_thread)
332     handle_t     handle;       /* thread handle */
333 @REPLY
334     int          count;        /* new suspend count */
335 @END
336
337
338 /* Notify the server that a dll has been loaded */
339 @REQ(load_dll)
340     handle_t     handle;       /* file handle */
341     void*        base;         /* base address */
342     int          dbg_offset;   /* debug info offset */
343     int          dbg_size;     /* debug info size */
344     void*        name;         /* ptr to ptr to name (in process addr space) */
345 @END
346
347
348 /* Notify the server that a dll is being unloaded */
349 @REQ(unload_dll)
350     void*        base;         /* base address */
351 @END
352
353
354 /* Queue an APC for a thread */
355 @REQ(queue_apc)
356     handle_t     handle;       /* thread handle */
357     int          user;         /* user or system apc? */
358     void*        func;         /* function to call */
359     void*        param;        /* param for function to call */
360 @END
361
362
363 /* Get next APC to call */
364 @REQ(get_apc)
365     int          alertable;    /* is thread alertable? */
366 @REPLY
367     void*        func;         /* function to call */
368     int          type;         /* function type */
369     VARARG(args,ptrs);         /* function arguments */
370 @END
371 enum apc_type { APC_NONE, APC_USER, APC_TIMER, APC_ASYNC };
372
373
374 /* Close a handle for the current process */
375 @REQ(close_handle)
376     handle_t     handle;       /* handle to close */
377 @REPLY
378     int          fd;           /* associated fd to close */
379 @END
380
381
382 /* Set a handle information */
383 @REQ(set_handle_info)
384     handle_t     handle;       /* handle we are interested in */
385     int          flags;        /* new handle flags */
386     int          mask;         /* mask for flags to set */
387     int          fd;           /* file descriptor or -1 */
388 @REPLY
389     int          old_flags;    /* old flag value */
390     int          cur_fd;       /* current file descriptor */
391 @END
392
393
394 /* Duplicate a handle */
395 @REQ(dup_handle)
396     handle_t     src_process;  /* src process handle */
397     handle_t     src_handle;   /* src handle to duplicate */
398     handle_t     dst_process;  /* dst process handle */
399     unsigned int access;       /* wanted access rights */
400     int          inherit;      /* inherit flag */
401     int          options;      /* duplicate options (see below) */
402 @REPLY
403     handle_t     handle;       /* duplicated handle in dst process */
404     int          fd;           /* associated fd to close */
405 @END
406 #define DUP_HANDLE_CLOSE_SOURCE  DUPLICATE_CLOSE_SOURCE
407 #define DUP_HANDLE_SAME_ACCESS   DUPLICATE_SAME_ACCESS
408 #define DUP_HANDLE_MAKE_GLOBAL   0x80000000  /* Not a Windows flag */
409
410
411 /* Open a handle to a process */
412 @REQ(open_process)
413     void*        pid;          /* process id to open */
414     unsigned int access;       /* wanted access rights */
415     int          inherit;      /* inherit flag */
416 @REPLY
417     handle_t     handle;       /* handle to the process */
418 @END
419
420
421 /* Wait for handles */
422 @REQ(select)
423     int          flags;        /* wait flags (see below) */
424     void*        cookie;       /* magic cookie to return to client */
425     int          sec;          /* absolute timeout */
426     int          usec;         /* absolute timeout */
427     VARARG(handles,handles);   /* handles to select on */
428 @END
429 #define SELECT_ALL           1
430 #define SELECT_ALERTABLE     2
431 #define SELECT_INTERRUPTIBLE 4
432 #define SELECT_TIMEOUT       8
433
434
435 /* Create an event */
436 @REQ(create_event)
437     int          manual_reset;  /* manual reset event */
438     int          initial_state; /* initial state of the event */
439     int          inherit;       /* inherit flag */
440     VARARG(name,unicode_str);   /* object name */
441 @REPLY
442     handle_t     handle;        /* handle to the event */
443 @END
444
445 /* Event operation */
446 @REQ(event_op)
447     handle_t      handle;       /* handle to event */
448     int           op;           /* event operation (see below) */
449 @END
450 enum event_op { PULSE_EVENT, SET_EVENT, RESET_EVENT };
451
452
453 /* Open an event */
454 @REQ(open_event)
455     unsigned int access;        /* wanted access rights */
456     int          inherit;       /* inherit flag */
457     VARARG(name,unicode_str);   /* object name */
458 @REPLY
459     handle_t     handle;        /* handle to the event */
460 @END
461
462
463 /* Create a mutex */
464 @REQ(create_mutex)
465     int          owned;         /* initially owned? */
466     int          inherit;       /* inherit flag */
467     VARARG(name,unicode_str);   /* object name */
468 @REPLY
469     handle_t     handle;        /* handle to the mutex */
470 @END
471
472
473 /* Release a mutex */
474 @REQ(release_mutex)
475     handle_t     handle;        /* handle to the mutex */
476 @END
477
478
479 /* Open a mutex */
480 @REQ(open_mutex)
481     unsigned int access;        /* wanted access rights */
482     int          inherit;       /* inherit flag */
483     VARARG(name,unicode_str);   /* object name */
484 @REPLY
485     handle_t     handle;        /* handle to the mutex */
486 @END
487
488
489 /* Create a semaphore */
490 @REQ(create_semaphore)
491     unsigned int initial;       /* initial count */
492     unsigned int max;           /* maximum count */
493     int          inherit;       /* inherit flag */
494     VARARG(name,unicode_str);   /* object name */
495 @REPLY
496     handle_t     handle;        /* handle to the semaphore */
497 @END
498
499
500 /* Release a semaphore */
501 @REQ(release_semaphore)
502     handle_t     handle;        /* handle to the semaphore */
503     unsigned int count;         /* count to add to semaphore */
504 @REPLY
505     unsigned int prev_count;    /* previous semaphore count */
506 @END
507
508
509 /* Open a semaphore */
510 @REQ(open_semaphore)
511     unsigned int access;        /* wanted access rights */
512     int          inherit;       /* inherit flag */
513     VARARG(name,unicode_str);   /* object name */
514 @REPLY
515     handle_t     handle;        /* handle to the semaphore */
516 @END
517
518
519 /* Create a file */
520 @REQ(create_file)
521     unsigned int access;        /* wanted access rights */
522     int          inherit;       /* inherit flag */
523     unsigned int sharing;       /* sharing flags */
524     int          create;        /* file create action */
525     unsigned int attrs;         /* file attributes for creation */
526     int          drive_type;    /* type of drive the file is on */
527     VARARG(filename,string);    /* file name */
528 @REPLY
529     handle_t     handle;        /* handle to the file */
530 @END
531
532
533 /* Allocate a file handle for a Unix fd */
534 @REQ(alloc_file_handle)
535     unsigned int access;        /* wanted access rights */
536     int          fd;            /* file descriptor on the client side */
537 @REPLY
538     handle_t     handle;        /* handle to the file */
539 @END
540
541
542 /* Get a Unix fd to access a file */
543 @REQ(get_handle_fd)
544     handle_t     handle;        /* handle to the file */
545     unsigned int access;        /* wanted access rights */
546 @REPLY
547     int          fd;            /* file descriptor */
548     int          type;          /* the type of file */
549 @END
550 #define FD_TYPE_INVALID    0
551 #define FD_TYPE_DEFAULT    1
552 #define FD_TYPE_CONSOLE    2
553 #define FD_TYPE_OVERLAPPED 3
554 #define FD_TYPE_TIMEOUT    4
555
556
557 /* Set a file current position */
558 @REQ(set_file_pointer)
559     handle_t     handle;        /* handle to the file */
560     int          low;           /* position low word */
561     int          high;          /* position high word */
562     int          whence;        /* whence to seek */
563 @REPLY
564     int          new_low;       /* new position low word */
565     int          new_high;      /* new position high word */
566 @END
567
568
569 /* Truncate (or extend) a file */
570 @REQ(truncate_file)
571     handle_t     handle;        /* handle to the file */
572 @END
573
574
575 /* Set a file access and modification times */
576 @REQ(set_file_time)
577     handle_t     handle;        /* handle to the file */
578     time_t       access_time;   /* last access time */
579     time_t       write_time;    /* last write time */
580 @END
581
582
583 /* Flush a file buffers */
584 @REQ(flush_file)
585     handle_t     handle;        /* handle to the file */
586 @END
587
588
589 /* Get information about a file */
590 @REQ(get_file_info)
591     handle_t     handle;        /* handle to the file */
592 @REPLY
593     int          type;          /* file type */
594     int          attr;          /* file attributes */
595     time_t       access_time;   /* last access time */
596     time_t       write_time;    /* last write time */
597     int          size_high;     /* file size */
598     int          size_low;      /* file size */
599     int          links;         /* number of links */
600     int          index_high;    /* unique index */
601     int          index_low;     /* unique index */
602     unsigned int serial;        /* volume serial number */
603 @END
604
605
606 /* Lock a region of a file */
607 @REQ(lock_file)
608     handle_t     handle;        /* handle to the file */
609     unsigned int offset_low;    /* offset of start of lock */
610     unsigned int offset_high;   /* offset of start of lock */
611     unsigned int count_low;     /* count of bytes to lock */
612     unsigned int count_high;    /* count of bytes to lock */
613 @END
614
615
616 /* Unlock a region of a file */
617 @REQ(unlock_file)
618     handle_t     handle;        /* handle to the file */
619     unsigned int offset_low;    /* offset of start of unlock */
620     unsigned int offset_high;   /* offset of start of unlock */
621     unsigned int count_low;     /* count of bytes to unlock */
622     unsigned int count_high;    /* count of bytes to unlock */
623 @END
624
625
626 /* Create an anonymous pipe */
627 @REQ(create_pipe)
628     int          inherit;       /* inherit flag */
629 @REPLY
630     handle_t     handle_read;   /* handle to the read-side of the pipe */
631     handle_t     handle_write;  /* handle to the write-side of the pipe */
632 @END
633
634
635 /* Create a socket */
636 @REQ(create_socket)
637     unsigned int access;        /* wanted access rights */
638     int          inherit;       /* inherit flag */
639     int          family;        /* family, see socket manpage */
640     int          type;          /* type, see socket manpage */
641     int          protocol;      /* protocol, see socket manpage */
642 @REPLY
643     handle_t     handle;        /* handle to the new socket */
644 @END
645
646
647 /* Accept a socket */
648 @REQ(accept_socket)
649     handle_t     lhandle;       /* handle to the listening socket */
650     unsigned int access;        /* wanted access rights */
651     int          inherit;       /* inherit flag */
652 @REPLY
653     handle_t     handle;        /* handle to the new socket */
654 @END
655
656
657 /* Set socket event parameters */
658 @REQ(set_socket_event)
659     handle_t     handle;        /* handle to the socket */
660     unsigned int mask;          /* event mask */
661     handle_t     event;         /* event object */
662 @END
663
664
665 /* Get socket event parameters */
666 @REQ(get_socket_event)
667     handle_t     handle;        /* handle to the socket */
668     int          service;       /* clear pending? */
669     handle_t     s_event;       /* "expected" event object */
670     handle_t     c_event;       /* event to clear */
671 @REPLY
672     unsigned int mask;          /* event mask */
673     unsigned int pmask;         /* pending events */
674     unsigned int state;         /* status bits */
675     VARARG(errors,ints);        /* event errors */
676 @END
677
678
679 /* Reenable pending socket events */
680 @REQ(enable_socket_event)
681     handle_t     handle;        /* handle to the socket */
682     unsigned int mask;          /* events to re-enable */
683     unsigned int sstate;        /* status bits to set */
684     unsigned int cstate;        /* status bits to clear */
685 @END
686
687
688 /* Allocate a console for the current process */
689 @REQ(alloc_console)
690     unsigned int access;        /* wanted access rights */
691     int          inherit;       /* inherit flag */
692 @REPLY
693     handle_t     handle_in;     /* handle to console input */
694     handle_t     handle_out;    /* handle to console output */
695 @END
696
697
698 /* Free the console of the current process */
699 @REQ(free_console)
700 @END
701
702
703 /* Open a handle to the process console */
704 @REQ(open_console)
705     int          output;        /* input or output? */
706     unsigned int access;        /* wanted access rights */
707     int          inherit;       /* inherit flag */
708 @REPLY
709     handle_t     handle;        /* handle to the console */
710 @END
711
712
713 /* Set a console file descriptor */
714 @REQ(set_console_fd)
715     handle_t     handle;        /* handle to the console */
716     int          fd_in;         /* file descriptor to use as input */
717     int          fd_out;        /* file descriptor to use as output */
718     int          pid;           /* pid of xterm (hack) */
719 @END
720
721
722 /* Get a console mode (input or output) */
723 @REQ(get_console_mode)
724     handle_t     handle;        /* handle to the console */
725 @REPLY
726     int          mode;          /* console mode */
727 @END
728
729
730 /* Set a console mode (input or output) */
731 @REQ(set_console_mode)
732     handle_t     handle;        /* handle to the console */
733     int          mode;          /* console mode */
734 @END
735
736
737 /* Set info about a console (output only) */
738 @REQ(set_console_info)
739     handle_t     handle;        /* handle to the console */
740     int          mask;          /* setting mask (see below) */
741     int          cursor_size;   /* size of cursor (percentage filled) */
742     int          cursor_visible;/* cursor visibility flag */
743     VARARG(title,string);       /* console title */
744 @END
745 #define SET_CONSOLE_INFO_CURSOR 0x01
746 #define SET_CONSOLE_INFO_TITLE  0x02
747
748 /* Get info about a console (output only) */
749 @REQ(get_console_info)
750     handle_t     handle;        /* handle to the console */
751 @REPLY
752     int          cursor_size;   /* size of cursor (percentage filled) */
753     int          cursor_visible;/* cursor visibility flag */
754     int          pid;           /* pid of xterm (hack) */
755     VARARG(title,string);       /* console title */
756 @END
757
758
759 /* Add input records to a console input queue */
760 @REQ(write_console_input)
761     handle_t     handle;        /* handle to the console input */
762     VARARG(rec,input_records);  /* input records */
763 @REPLY
764     int          written;       /* number of records written */
765 @END
766
767 /* Fetch input records from a console input queue */
768 @REQ(read_console_input)
769     handle_t     handle;        /* handle to the console input */
770     int          flush;         /* flush the retrieved records from the queue? */
771 @REPLY
772     int          read;          /* number of records read */
773     VARARG(rec,input_records);  /* input records */
774 @END
775
776
777 /* Create a change notification */
778 @REQ(create_change_notification)
779     int          subtree;       /* watch all the subtree */
780     int          filter;        /* notification filter */
781 @REPLY
782     handle_t     handle;        /* handle to the change notification */
783 @END
784
785
786 /* Create a file mapping */
787 @REQ(create_mapping)
788     int          size_high;     /* mapping size */
789     int          size_low;      /* mapping size */
790     int          protect;       /* protection flags (see below) */
791     int          inherit;       /* inherit flag */
792     handle_t     file_handle;   /* file handle */
793     VARARG(name,unicode_str);   /* object name */
794 @REPLY
795     handle_t     handle;        /* handle to the mapping */
796 @END
797 /* protection flags */
798 #define VPROT_READ       0x01
799 #define VPROT_WRITE      0x02
800 #define VPROT_EXEC       0x04
801 #define VPROT_WRITECOPY  0x08
802 #define VPROT_GUARD      0x10
803 #define VPROT_NOCACHE    0x20
804 #define VPROT_COMMITTED  0x40
805 #define VPROT_IMAGE      0x80
806
807
808 /* Open a mapping */
809 @REQ(open_mapping)
810     unsigned int access;        /* wanted access rights */
811     int          inherit;       /* inherit flag */
812     VARARG(name,unicode_str);   /* object name */
813 @REPLY
814     handle_t     handle;        /* handle to the mapping */
815 @END
816
817
818 /* Get information about a file mapping */
819 @REQ(get_mapping_info)
820     handle_t     handle;        /* handle to the mapping */
821 @REPLY
822     int          size_high;     /* mapping size */
823     int          size_low;      /* mapping size */
824     int          protect;       /* protection flags */
825     int          header_size;   /* header size (for VPROT_IMAGE mapping) */
826     void*        base;          /* default base addr (for VPROT_IMAGE mapping) */
827     handle_t     shared_file;   /* shared mapping file handle */
828     int          shared_size;   /* shared mapping size */
829     int          drive_type;    /* type of drive the file is on */
830 @END
831
832
833 /* Create a device */
834 @REQ(create_device)
835     unsigned int access;        /* wanted access rights */
836     int          inherit;       /* inherit flag */
837     int          id;            /* client private id */
838 @REPLY
839     handle_t     handle;        /* handle to the device */
840 @END
841
842
843 /* Create a snapshot */
844 @REQ(create_snapshot)
845     int          inherit;       /* inherit flag */
846     int          flags;         /* snapshot flags (TH32CS_*) */
847     void*        pid;           /* process id */
848 @REPLY
849     handle_t     handle;        /* handle to the snapshot */
850 @END
851
852
853 /* Get the next process from a snapshot */
854 @REQ(next_process)
855     handle_t     handle;        /* handle to the snapshot */
856     int          reset;         /* reset snapshot position? */
857 @REPLY
858     int          count;         /* process usage count */
859     void*        pid;           /* process id */
860     int          threads;       /* number of threads */
861     int          priority;      /* process priority */
862 @END
863
864
865 /* Get the next thread from a snapshot */
866 @REQ(next_thread)
867     handle_t     handle;        /* handle to the snapshot */
868     int          reset;         /* reset snapshot position? */
869 @REPLY
870     int          count;         /* thread usage count */
871     void*        pid;           /* process id */
872     void*        tid;           /* thread id */
873     int          base_pri;      /* base priority */
874     int          delta_pri;     /* delta priority */
875 @END
876
877
878 /* Get the next module from a snapshot */
879 @REQ(next_module)
880     handle_t     handle;        /* handle to the snapshot */
881     int          reset;         /* reset snapshot position? */
882 @REPLY
883     void*        pid;           /* process id */
884     void*        base;          /* module base address */
885 @END
886
887
888 /* Wait for a debug event */
889 @REQ(wait_debug_event)
890     int           get_handle;  /* should we alloc a handle for waiting? */
891 @REPLY
892     void*         pid;         /* process id */
893     void*         tid;         /* thread id */
894     handle_t      wait;        /* wait handle if no event ready */
895     VARARG(event,debug_event); /* debug event data */
896 @END
897
898
899 /* Queue an exception event */
900 @REQ(queue_exception_event)
901     int              first;    /* first chance exception? */
902     VARARG(record,exc_event);  /* thread context followed by exception record */
903 @REPLY
904     handle_t         handle;   /* handle to the queued event */
905 @END
906
907
908 /* Retrieve the status of an exception event */
909 @REQ(get_exception_status)
910 @REPLY
911     handle_t         handle;   /* handle to the queued event */
912     int              status;   /* event continuation status */
913     VARARG(context,context);   /* modified thread context */
914 @END
915
916
917 /* Send an output string to the debugger */
918 @REQ(output_debug_string)
919     void*         string;      /* string to display (in debugged process address space) */
920     int           unicode;     /* is it Unicode? */
921     int           length;      /* string length */
922 @END
923
924
925 /* Continue a debug event */
926 @REQ(continue_debug_event)
927     void*        pid;          /* process id to continue */
928     void*        tid;          /* thread id to continue */
929     int          status;       /* continuation status */
930 @END
931
932
933 /* Start debugging an existing process */
934 @REQ(debug_process)
935     void*        pid;          /* id of the process to debug */
936 @END
937
938
939 /* Read data from a process address space */
940 @REQ(read_process_memory)
941     handle_t     handle;       /* process handle */
942     void*        addr;         /* addr to read from (must be int-aligned) */
943     int          len;          /* number of ints to read */
944 @REPLY
945     VARARG(data,bytes);        /* result data */
946 @END
947
948
949 /* Write data to a process address space */
950 @REQ(write_process_memory)
951     handle_t     handle;       /* process handle */
952     void*        addr;         /* addr to write to (must be int-aligned) */
953     int          len;          /* number of ints to write */
954     unsigned int first_mask;   /* mask for first word */
955     unsigned int last_mask;    /* mask for last word */
956     VARARG(data,bytes);        /* result data */
957 @END
958
959
960 /* Create a registry key */
961 @REQ(create_key)
962     handle_t     parent;       /* handle to the parent key */
963     unsigned int access;       /* desired access rights */
964     unsigned int options;      /* creation options */
965     time_t       modif;        /* last modification time */
966     VARARG(name,unicode_len_str);  /* key name */
967     VARARG(class,unicode_str);     /* class name */
968 @REPLY
969     handle_t     hkey;         /* handle to the created key */
970     int          created;      /* has it been newly created? */
971 @END
972
973 /* Open a registry key */
974 @REQ(open_key)
975     handle_t     parent;       /* handle to the parent key */
976     unsigned int access;       /* desired access rights */
977     VARARG(name,unicode_str);  /* key name */
978 @REPLY
979     handle_t     hkey;         /* handle to the open key */
980 @END
981
982
983 /* Delete a registry key */
984 @REQ(delete_key)
985     handle_t     hkey;         /* handle to the key */
986 @END
987
988
989 /* Enumerate registry subkeys */
990 @REQ(enum_key)
991     handle_t     hkey;         /* handle to registry key */
992     int          index;        /* index of subkey (or -1 for current key) */
993     int          full;         /* return the full info? */
994 @REPLY
995     int          subkeys;      /* number of subkeys */
996     int          max_subkey;   /* longest subkey name */
997     int          max_class;    /* longest class name */
998     int          values;       /* number of values */
999     int          max_value;    /* longest value name */
1000     int          max_data;     /* longest value data */
1001     time_t       modif;        /* last modification time */
1002     VARARG(name,unicode_len_str);  /* key name */
1003     VARARG(class,unicode_str);     /* class name */
1004 @END
1005
1006
1007 /* Set a value of a registry key */
1008 @REQ(set_key_value)
1009     handle_t     hkey;         /* handle to registry key */
1010     int          type;         /* value type */
1011     unsigned int total;        /* total value len */
1012     unsigned int offset;       /* offset for setting data */
1013     VARARG(name,unicode_len_str);  /* value name */
1014     VARARG(data,bytes);        /* value data */
1015 @END
1016
1017
1018 /* Retrieve the value of a registry key */
1019 @REQ(get_key_value)
1020     handle_t     hkey;         /* handle to registry key */
1021     unsigned int offset;       /* offset for getting data */
1022     VARARG(name,unicode_len_str);  /* value name */
1023 @REPLY
1024     int          type;         /* value type */
1025     int          len;          /* value data len */
1026     VARARG(data,bytes);        /* value data */
1027 @END
1028
1029
1030 /* Enumerate a value of a registry key */
1031 @REQ(enum_key_value)
1032     handle_t     hkey;         /* handle to registry key */
1033     int          index;        /* value index */
1034     unsigned int offset;       /* offset for getting data */
1035 @REPLY
1036     int          type;         /* value type */
1037     int          len;          /* value data len */
1038     VARARG(name,unicode_len_str);  /* value name */
1039     VARARG(data,bytes);        /* value data */
1040 @END
1041
1042
1043 /* Delete a value of a registry key */
1044 @REQ(delete_key_value)
1045     handle_t     hkey;         /* handle to registry key */
1046     VARARG(name,unicode_str);  /* value name */
1047 @END
1048
1049
1050 /* Load a registry branch from a file */
1051 @REQ(load_registry)
1052     handle_t     hkey;         /* root key to load to */
1053     handle_t     file;         /* file to load from */
1054     VARARG(name,unicode_str);  /* subkey name */
1055 @END
1056
1057
1058 /* Save a registry branch to a file */
1059 @REQ(save_registry)
1060     handle_t     hkey;         /* key to save */
1061     handle_t     file;         /* file to save to */
1062 @END
1063
1064
1065 /* Save a registry branch at server exit */
1066 @REQ(save_registry_atexit)
1067     handle_t     hkey;         /* key to save */
1068     VARARG(file,string);       /* file to save to */
1069 @END
1070
1071
1072 /* Set the current and saving level for the registry */
1073 @REQ(set_registry_levels)
1074     int          current;      /* new current level */
1075     int          saving;       /* new saving level */
1076     int          period;       /* duration between periodic saves (milliseconds) */
1077 @END
1078
1079
1080 /* Create a waitable timer */
1081 @REQ(create_timer)
1082     int          inherit;       /* inherit flag */
1083     int          manual;        /* manual reset */
1084     VARARG(name,unicode_str);   /* object name */
1085 @REPLY
1086     handle_t     handle;        /* handle to the timer */
1087 @END
1088
1089
1090 /* Open a waitable timer */
1091 @REQ(open_timer)
1092     unsigned int access;        /* wanted access rights */
1093     int          inherit;       /* inherit flag */
1094     VARARG(name,unicode_str);   /* object name */
1095 @REPLY
1096     handle_t     handle;        /* handle to the timer */
1097 @END
1098
1099 /* Set a waitable timer */
1100 @REQ(set_timer)
1101     handle_t     handle;        /* handle to the timer */
1102     int          sec;           /* next expiration absolute time */
1103     int          usec;          /* next expiration absolute time */
1104     int          period;        /* timer period in ms */
1105     void*        callback;      /* callback function */
1106     void*        arg;           /* callback argument */
1107 @END
1108
1109 /* Cancel a waitable timer */
1110 @REQ(cancel_timer)
1111     handle_t     handle;        /* handle to the timer */
1112 @END
1113
1114
1115 /* Retrieve the current context of a thread */
1116 @REQ(get_thread_context)
1117     handle_t     handle;       /* thread handle */
1118     unsigned int flags;        /* context flags */
1119 @REPLY
1120     VARARG(context,context);   /* thread context */
1121 @END
1122
1123
1124 /* Set the current context of a thread */
1125 @REQ(set_thread_context)
1126     handle_t     handle;       /* thread handle */
1127     unsigned int flags;        /* context flags */
1128     VARARG(context,context);   /* thread context */
1129 @END
1130
1131
1132 /* Fetch a selector entry for a thread */
1133 @REQ(get_selector_entry)
1134     handle_t      handle;      /* thread handle */
1135     int           entry;       /* LDT entry */
1136 @REPLY
1137     unsigned int  base;        /* selector base */
1138     unsigned int  limit;       /* selector limit */
1139     unsigned char flags;       /* selector flags */
1140 @END
1141
1142
1143 /* Add an atom */
1144 @REQ(add_atom)
1145     int           local;       /* is atom in local process table? */
1146     VARARG(name,unicode_str);  /* atom name */
1147 @REPLY
1148     atom_t        atom;        /* resulting atom */
1149 @END
1150
1151
1152 /* Delete an atom */
1153 @REQ(delete_atom)
1154     atom_t        atom;        /* atom handle */
1155     int           local;       /* is atom in local process table? */
1156 @END
1157
1158
1159 /* Find an atom */
1160 @REQ(find_atom)
1161     int          local;        /* is atom in local process table? */
1162     VARARG(name,unicode_str);  /* atom name */
1163 @REPLY
1164     atom_t       atom;         /* atom handle */
1165 @END
1166
1167
1168 /* Get an atom name */
1169 @REQ(get_atom_name)
1170     atom_t       atom;         /* atom handle */
1171     int          local;        /* is atom in local process table? */
1172 @REPLY
1173     int          count;        /* atom lock count */
1174     VARARG(name,unicode_str);  /* atom name */
1175 @END
1176
1177
1178 /* Init the process atom table */
1179 @REQ(init_atom_table)
1180     int          entries;      /* number of entries */
1181 @END
1182
1183
1184 /* Get the message queue of the current thread */
1185 @REQ(get_msg_queue)
1186 @REPLY
1187     handle_t     handle;       /* handle to the queue */
1188 @END
1189
1190
1191 /* Set the current message queue wakeup mask */
1192 @REQ(set_queue_mask)
1193     unsigned int wake_mask;    /* wakeup bits mask */
1194     unsigned int changed_mask; /* changed bits mask */
1195     int          skip_wait;    /* will we skip waiting if signaled? */
1196 @REPLY
1197     unsigned int wake_bits;    /* current wake bits */
1198     unsigned int changed_bits; /* current changed bits */
1199 @END
1200
1201
1202 /* Get the current message queue status */
1203 @REQ(get_queue_status)
1204     int          clear;        /* should we clear the change bits? */
1205 @REPLY
1206     unsigned int wake_bits;    /* wake bits */
1207     unsigned int changed_bits; /* changed bits since last time */
1208 @END
1209
1210
1211 /* Wait for a process to start waiting on input */
1212 @REQ(wait_input_idle)
1213     handle_t     handle;       /* process handle */
1214     int          timeout;      /* timeout */
1215 @REPLY
1216     handle_t     event;        /* handle to idle event */
1217 @END
1218
1219
1220 /* Send a message to a thread queue */
1221 @REQ(send_message)
1222     void*           id;        /* thread id */
1223     int             type;      /* message type (see below) */
1224     user_handle_t   win;       /* window handle */
1225     unsigned int    msg;       /* message code */
1226     unsigned int    wparam;    /* parameters */
1227     unsigned int    lparam;    /* parameters */
1228     int             x;         /* x position */
1229     int             y;         /* y position */
1230     unsigned int    time;      /* message time */
1231     unsigned int    info;      /* extra info */
1232     int             timeout;   /* timeout for reply */
1233     VARARG(data,bytes);        /* message data for sent messages */
1234 @END
1235
1236 enum message_type
1237 {
1238     MSG_ASCII,          /* Ascii message (from SendMessageA) */
1239     MSG_UNICODE,        /* Unicode message (from SendMessageW) */
1240     MSG_NOTIFY,         /* notify message (from SendNotifyMessageW), always Unicode */
1241     MSG_CALLBACK,       /* callback message (from SendMessageCallbackW), always Unicode */
1242     MSG_OTHER_PROCESS,  /* sent from other process, may include vararg data, always Unicode */
1243     MSG_POSTED,         /* posted message (from PostMessageW), always Unicode */
1244     MSG_HARDWARE_RAW,   /* raw hardware message */
1245     MSG_HARDWARE_COOKED /* cooked hardware message */
1246 };
1247
1248
1249 /* Get a message from the current queue */
1250 @REQ(get_message)
1251     int             flags;     /* see below */
1252     user_handle_t   get_win;   /* window handle to get */
1253     unsigned int    get_first; /* first message code to get */
1254     unsigned int    get_last;  /* last message code to get */
1255 @REPLY
1256     int             type;      /* message type */
1257     user_handle_t   win;       /* window handle */
1258     unsigned int    msg;       /* message code */
1259     unsigned int    wparam;    /* parameters */
1260     unsigned int    lparam;    /* parameters */
1261     int             x;         /* x position */
1262     int             y;         /* y position */
1263     unsigned int    time;      /* message time */
1264     unsigned int    info;      /* extra info */
1265     VARARG(data,bytes);        /* message data for sent messages */
1266 @END
1267 #define GET_MSG_REMOVE      1  /* remove the message */
1268 #define GET_MSG_SENT_ONLY   2  /* only get sent messages */
1269 #define GET_MSG_REMOVE_LAST 4  /* remove last message returned before checking for a new one */
1270
1271 /* Reply to a sent message */
1272 @REQ(reply_message)
1273     unsigned int    result;    /* message result */
1274     int             remove;    /* should we remove the message? */
1275     VARARG(data,bytes);        /* message data for sent messages */
1276 @END
1277
1278
1279 /* Retrieve the reply for the last message sent */
1280 @REQ(get_message_reply)
1281     int             cancel;    /* cancel message if not ready? */
1282 @REPLY
1283     unsigned int    result;    /* message result */
1284     VARARG(data,bytes);        /* message data for sent messages */
1285 @END
1286
1287
1288 /* Set a window timer */
1289 @REQ(set_win_timer)
1290     user_handle_t   win;       /* window handle */
1291     unsigned int    msg;       /* message to post */
1292     unsigned int    id;        /* timer id */
1293     unsigned int    rate;      /* timer rate in ms */
1294     unsigned int    lparam;    /* message lparam (callback proc) */
1295 @END
1296
1297
1298 /* Kill a window timer */
1299 @REQ(kill_win_timer)
1300     user_handle_t   win;       /* window handle */
1301     unsigned int    msg;       /* message to post */
1302     unsigned int    id;        /* timer id */
1303 @END
1304
1305
1306 /* Open a serial port */
1307 @REQ(create_serial)
1308     unsigned int access;       /* wanted access rights */
1309     int          inherit;      /* inherit flag */
1310     unsigned int attributes;   /* eg. FILE_FLAG_OVERLAPPED */
1311     unsigned int sharing;      /* sharing flags */
1312     VARARG(name,string);       /* file name */
1313 @REPLY
1314     handle_t     handle;       /* handle to the port */
1315 @END
1316
1317
1318 /* Retrieve info about a serial port */
1319 @REQ(get_serial_info)
1320     handle_t     handle;       /* handle to comm port */
1321 @REPLY
1322     unsigned int readinterval;
1323     unsigned int readconst;
1324     unsigned int readmult;
1325     unsigned int writeconst;
1326     unsigned int writemult;
1327     unsigned int eventmask;
1328     unsigned int commerror;
1329 @END
1330
1331
1332 /* Set info about a serial port */
1333 @REQ(set_serial_info)
1334     handle_t     handle;       /* handle to comm port */
1335     int          flags;        /* bitmask to set values (see below) */
1336     unsigned int readinterval;
1337     unsigned int readconst;
1338     unsigned int readmult;
1339     unsigned int writeconst;
1340     unsigned int writemult;
1341     unsigned int eventmask;
1342     unsigned int commerror;
1343 @END
1344 #define SERIALINFO_SET_TIMEOUTS  0x01
1345 #define SERIALINFO_SET_MASK      0x02
1346 #define SERIALINFO_SET_ERROR     0x04
1347
1348
1349 /* Create an async I/O */
1350 @REQ(create_async)
1351     handle_t     file_handle;  /* handle to comm port, socket or file */
1352     int          count;
1353     int          type;
1354 @REPLY
1355     int          timeout;
1356 @END
1357 #define ASYNC_TYPE_READ  0x01
1358 #define ASYNC_TYPE_WRITE 0x02
1359 #define ASYNC_TYPE_WAIT  0x03
1360
1361
1362 /* Create a named pipe */
1363 @REQ(create_named_pipe)
1364     unsigned int   openmode;
1365     unsigned int   pipemode;
1366     unsigned int   maxinstances;
1367     unsigned int   outsize;
1368     unsigned int   insize;
1369     unsigned int   timeout;
1370     VARARG(filename,string);    /* pipe name */
1371 @REPLY
1372     handle_t       handle;     /* handle to the pipe */
1373 @END
1374
1375
1376 /* Open an existing named pipe */
1377 @REQ(open_named_pipe)
1378     unsigned int   access;
1379     VARARG(filename,string);    /* pipe name */
1380 @REPLY
1381     handle_t       handle;     /* handle to the pipe */
1382 @END
1383
1384
1385 /* Connect to a named pipe */
1386 @REQ(connect_named_pipe)
1387     handle_t       handle;
1388     void*          overlapped;
1389     void*          func;
1390 @END
1391
1392
1393 /* Wait for a named pipe */
1394 @REQ(wait_named_pipe)
1395     unsigned int   timeout;
1396     void*          overlapped;
1397     void*          func;
1398     VARARG(filename,string);    /* pipe name */
1399 @END
1400
1401
1402 /* Disconnect a named pipe */
1403 @REQ(disconnect_named_pipe)
1404     handle_t       handle;
1405 @END
1406
1407
1408 @REQ(get_named_pipe_info)
1409     handle_t       handle;
1410 @REPLY
1411     unsigned int   flags;
1412     unsigned int   maxinstances;
1413     unsigned int   outsize;
1414     unsigned int   insize;
1415 @END
1416
1417
1418 /* Create a window */
1419 @REQ(create_window)
1420     user_handle_t  parent;      /* parent window */
1421     user_handle_t  owner;       /* owner window */
1422     atom_t         atom;        /* class atom */
1423 @REPLY
1424     user_handle_t  handle;      /* created window */
1425 @END
1426
1427
1428 /* Link a window into the tree */
1429 @REQ(link_window)
1430     user_handle_t  handle;      /* handle to the window */
1431     user_handle_t  parent;      /* handle to the parent */
1432     user_handle_t  previous;    /* previous child in Z-order */
1433 @REPLY
1434     user_handle_t  full_parent; /* full handle of new parent */
1435 @END
1436
1437
1438 /* Destroy a window */
1439 @REQ(destroy_window)
1440     user_handle_t  handle;      /* handle to the window */
1441 @END
1442
1443
1444 /* Set a window owner */
1445 @REQ(set_window_owner)
1446     user_handle_t  handle;      /* handle to the window */
1447     user_handle_t  owner;       /* new owner */
1448 @REPLY
1449     user_handle_t  full_owner;  /* full handle of new owner */
1450 @END
1451
1452
1453 /* Get information from a window handle */
1454 @REQ(get_window_info)
1455     user_handle_t  handle;      /* handle to the window */
1456 @REPLY
1457     user_handle_t  full_handle; /* full 32-bit handle */
1458     void*          pid;         /* process owning the window */
1459     void*          tid;         /* thread owning the window */
1460     atom_t         atom;        /* class atom */
1461 @END
1462
1463
1464 /* Set some information in a window */
1465 @REQ(set_window_info)
1466     user_handle_t  handle;        /* handle to the window */
1467     unsigned int   flags;         /* flags for fields to set (see below) */
1468     unsigned int   style;         /* window style */
1469     unsigned int   ex_style;      /* window extended style */
1470     unsigned int   id;            /* window id */
1471     void*          instance;      /* creator instance */
1472     void*          user_data;     /* user-specific data */
1473 @REPLY
1474     unsigned int   old_style;     /* old window style */
1475     unsigned int   old_ex_style;  /* old window extended style */
1476     unsigned int   old_id;        /* old window id */
1477     void*          old_instance;  /* old creator instance */
1478     void*          old_user_data; /* old user-specific data */
1479 @END
1480 #define SET_WIN_STYLE     0x01
1481 #define SET_WIN_EXSTYLE   0x02
1482 #define SET_WIN_ID        0x04
1483 #define SET_WIN_INSTANCE  0x08
1484 #define SET_WIN_USERDATA  0x10
1485
1486
1487 /* Get a list of the window parents, up to the root of the tree */
1488 @REQ(get_window_parents)
1489     user_handle_t  handle;        /* handle to the window */
1490 @REPLY
1491     int            count;         /* total count of parents */
1492     VARARG(parents,user_handles); /* parent handles */
1493 @END
1494
1495
1496 /* Get a list of the window children */
1497 @REQ(get_window_children)
1498     user_handle_t  parent;        /* parent window */
1499     atom_t         atom;          /* class atom for the listed children */
1500     void*          tid;           /* thread owning the listed children */
1501 @REPLY
1502     int            count;         /* total count of children */
1503     VARARG(children,user_handles); /* children handles */
1504 @END
1505
1506
1507 /* Get window tree information from a window handle */
1508 @REQ(get_window_tree)
1509     user_handle_t  handle;        /* handle to the window */
1510 @REPLY
1511     user_handle_t  parent;        /* parent window */
1512     user_handle_t  owner;         /* owner window */
1513     user_handle_t  next_sibling;  /* next sibling in Z-order */
1514     user_handle_t  prev_sibling;  /* prev sibling in Z-order */
1515     user_handle_t  first_sibling; /* first sibling in Z-order */
1516     user_handle_t  last_sibling;  /* last sibling in Z-order */
1517     user_handle_t  first_child;   /* first child */
1518     user_handle_t  last_child;    /* last child */
1519 @END
1520
1521 /* Set the window and client rectangles of a window */
1522 @REQ(set_window_rectangles)
1523     user_handle_t  handle;        /* handle to the window */
1524     rectangle_t    window;        /* window rectangle */
1525     rectangle_t    client;        /* client rectangle */
1526 @END
1527
1528
1529 /* Get the window and client rectangles of a window */
1530 @REQ(get_window_rectangles)
1531     user_handle_t  handle;        /* handle to the window */
1532 @REPLY
1533     rectangle_t    window;        /* window rectangle */
1534     rectangle_t    client;        /* client rectangle */
1535 @END
1536
1537
1538 /* Get the window text */
1539 @REQ(get_window_text)
1540     user_handle_t  handle;        /* handle to the window */
1541 @REPLY
1542     VARARG(text,unicode_str);     /* window text */
1543 @END
1544
1545
1546 /* Set the window text */
1547 @REQ(set_window_text)
1548     user_handle_t  handle;        /* handle to the window */
1549     VARARG(text,unicode_str);     /* window text */
1550 @END
1551
1552
1553 /* Increment the window paint count */
1554 @REQ(inc_window_paint_count)
1555     user_handle_t  handle;        /* handle to the window */
1556     int             incr;         /* increment (can be negative) */
1557 @END
1558
1559
1560 /* Get the coordinates offset between two windows */
1561 @REQ(get_windows_offset)
1562     user_handle_t  from;          /* handle to the first window */
1563     user_handle_t  to;            /* handle to the second window */
1564 @REPLY
1565     int            x;             /* x coordinate offset */
1566     int            y;             /* y coordinate offset */
1567 @END
1568
1569
1570 /* Set a window property */
1571 @REQ(set_window_property)
1572     user_handle_t  window;        /* handle to the window */
1573     atom_t         atom;          /* property atom (high-word set if it was a string) */
1574     int            string;        /* was atom a string originally? */
1575     handle_t       handle;        /* handle to store */
1576 @END
1577
1578
1579 /* Remove a window property */
1580 @REQ(remove_window_property)
1581     user_handle_t  window;        /* handle to the window */
1582     atom_t         atom;          /* property atom */
1583 @REPLY
1584     handle_t       handle;        /* handle stored in property */
1585 @END
1586
1587
1588 /* Get a window property */
1589 @REQ(get_window_property)
1590     user_handle_t  window;        /* handle to the window */
1591     atom_t         atom;          /* property atom */
1592 @REPLY
1593     handle_t       handle;        /* handle stored in property */
1594 @END
1595
1596
1597 /* Get the list of properties of a window */
1598 @REQ(get_window_properties)
1599     user_handle_t  window;        /* handle to the window */
1600 @REPLY
1601     VARARG(props,properties);     /* list of properties */
1602 @END