blob: be779ea8e99356475b7d86dc64b14d12143fb5c8 [file] [log] [blame]
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001/* -*- 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
17struct 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
25struct 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 */
34struct 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
42typedef int handle_t;
Alexandre Julliardd8a8c112001-10-12 18:45:29 +000043typedef unsigned short atom_t;
Alexandre Julliard1a66d222001-08-28 18:44:52 +000044typedef unsigned int user_handle_t;
Alexandre Julliard37ec9272001-07-19 00:35:37 +000045
Alexandre Julliard7695d692001-09-24 01:19:59 +000046#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
Alexandre Julliard37ec9272001-07-19 00:35:37 +000050/* definitions of the event data depending on the event code */
51struct debug_event_exception
52{
53 EXCEPTION_RECORD record; /* exception record */
54 int first; /* first chance exception? */
55};
56struct 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};
62struct 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};
75struct debug_event_exit
76{
77 int exit_code; /* thread or process exit code */
78};
79struct 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};
88struct debug_event_unload_dll
89{
90 void *base; /* base address of the dll */
91};
92struct 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};
98struct debug_event_rip_info
99{
100 int error; /* ??? */
101 int type; /* ??? */
102};
103union 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 */
116typedef 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 */
123struct 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 */
130struct wake_up_reply
131{
132 void *cookie; /* magic cookie that was passed in select_request */
133 int signaled; /* wait result */
134};
135
Alexandre Julliard7a2017d2001-10-12 19:10:26 +0000136/* structure returned in the list of window properties */
137typedef 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
Alexandre Julliard0d509652001-10-16 21:55:37 +0000144/* structure to specify window rectangles */
145typedef struct
146{
147 int left;
148 int top;
149 int right;
150 int bottom;
151} rectangle_t;
152
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000153/****************************************************************/
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
371enum 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
450enum 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 VARARG(filename,string); /* file name */
527@REPLY
528 handle_t handle; /* handle to the file */
529@END
530
531
532/* Allocate a file handle for a Unix fd */
533@REQ(alloc_file_handle)
534 unsigned int access; /* wanted access rights */
535 int fd; /* file descriptor on the client side */
536@REPLY
537 handle_t handle; /* handle to the file */
538@END
539
540
541/* Get a Unix fd to access a file */
542@REQ(get_handle_fd)
543 handle_t handle; /* handle to the file */
544 unsigned int access; /* wanted access rights */
545@REPLY
546 int fd; /* file descriptor */
Mike McCormackff58be52001-10-04 16:18:15 +0000547 int type; /* the type of file */
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000548@END
Mike McCormackff58be52001-10-04 16:18:15 +0000549#define FD_TYPE_INVALID 0
550#define FD_TYPE_DEFAULT 1
551#define FD_TYPE_CONSOLE 2
552#define FD_TYPE_OVERLAPPED 3
Mike McCormack568c67e2001-10-08 20:40:57 +0000553#define FD_TYPE_TIMEOUT 4
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000554
555
556/* Set a file current position */
557@REQ(set_file_pointer)
558 handle_t handle; /* handle to the file */
559 int low; /* position low word */
560 int high; /* position high word */
561 int whence; /* whence to seek */
562@REPLY
563 int new_low; /* new position low word */
564 int new_high; /* new position high word */
565@END
566
567
568/* Truncate (or extend) a file */
569@REQ(truncate_file)
570 handle_t handle; /* handle to the file */
571@END
572
573
574/* Set a file access and modification times */
575@REQ(set_file_time)
576 handle_t handle; /* handle to the file */
577 time_t access_time; /* last access time */
578 time_t write_time; /* last write time */
579@END
580
581
582/* Flush a file buffers */
583@REQ(flush_file)
584 handle_t handle; /* handle to the file */
585@END
586
587
588/* Get information about a file */
589@REQ(get_file_info)
590 handle_t handle; /* handle to the file */
591@REPLY
592 int type; /* file type */
593 int attr; /* file attributes */
594 time_t access_time; /* last access time */
595 time_t write_time; /* last write time */
596 int size_high; /* file size */
597 int size_low; /* file size */
598 int links; /* number of links */
599 int index_high; /* unique index */
600 int index_low; /* unique index */
601 unsigned int serial; /* volume serial number */
602@END
603
604
605/* Lock a region of a file */
606@REQ(lock_file)
607 handle_t handle; /* handle to the file */
608 unsigned int offset_low; /* offset of start of lock */
609 unsigned int offset_high; /* offset of start of lock */
610 unsigned int count_low; /* count of bytes to lock */
611 unsigned int count_high; /* count of bytes to lock */
612@END
613
614
615/* Unlock a region of a file */
616@REQ(unlock_file)
617 handle_t handle; /* handle to the file */
618 unsigned int offset_low; /* offset of start of unlock */
619 unsigned int offset_high; /* offset of start of unlock */
620 unsigned int count_low; /* count of bytes to unlock */
621 unsigned int count_high; /* count of bytes to unlock */
622@END
623
624
625/* Create an anonymous pipe */
626@REQ(create_pipe)
627 int inherit; /* inherit flag */
628@REPLY
629 handle_t handle_read; /* handle to the read-side of the pipe */
630 handle_t handle_write; /* handle to the write-side of the pipe */
631@END
632
633
634/* Create a socket */
635@REQ(create_socket)
636 unsigned int access; /* wanted access rights */
637 int inherit; /* inherit flag */
638 int family; /* family, see socket manpage */
639 int type; /* type, see socket manpage */
640 int protocol; /* protocol, see socket manpage */
641@REPLY
642 handle_t handle; /* handle to the new socket */
643@END
644
645
646/* Accept a socket */
647@REQ(accept_socket)
648 handle_t lhandle; /* handle to the listening socket */
649 unsigned int access; /* wanted access rights */
650 int inherit; /* inherit flag */
651@REPLY
652 handle_t handle; /* handle to the new socket */
653@END
654
655
656/* Set socket event parameters */
657@REQ(set_socket_event)
658 handle_t handle; /* handle to the socket */
659 unsigned int mask; /* event mask */
660 handle_t event; /* event object */
661@END
662
663
664/* Get socket event parameters */
665@REQ(get_socket_event)
666 handle_t handle; /* handle to the socket */
667 int service; /* clear pending? */
668 handle_t s_event; /* "expected" event object */
669 handle_t c_event; /* event to clear */
670@REPLY
671 unsigned int mask; /* event mask */
672 unsigned int pmask; /* pending events */
673 unsigned int state; /* status bits */
674 VARARG(errors,ints); /* event errors */
675@END
676
677
678/* Reenable pending socket events */
679@REQ(enable_socket_event)
680 handle_t handle; /* handle to the socket */
681 unsigned int mask; /* events to re-enable */
682 unsigned int sstate; /* status bits to set */
683 unsigned int cstate; /* status bits to clear */
684@END
685
686
687/* Allocate a console for the current process */
688@REQ(alloc_console)
689 unsigned int access; /* wanted access rights */
690 int inherit; /* inherit flag */
691@REPLY
692 handle_t handle_in; /* handle to console input */
693 handle_t handle_out; /* handle to console output */
694@END
695
696
697/* Free the console of the current process */
698@REQ(free_console)
699@END
700
701
702/* Open a handle to the process console */
703@REQ(open_console)
704 int output; /* input or output? */
705 unsigned int access; /* wanted access rights */
706 int inherit; /* inherit flag */
707@REPLY
708 handle_t handle; /* handle to the console */
709@END
710
711
712/* Set a console file descriptor */
713@REQ(set_console_fd)
714 handle_t handle; /* handle to the console */
715 int fd_in; /* file descriptor to use as input */
716 int fd_out; /* file descriptor to use as output */
717 int pid; /* pid of xterm (hack) */
718@END
719
720
721/* Get a console mode (input or output) */
722@REQ(get_console_mode)
723 handle_t handle; /* handle to the console */
724@REPLY
725 int mode; /* console mode */
726@END
727
728
729/* Set a console mode (input or output) */
730@REQ(set_console_mode)
731 handle_t handle; /* handle to the console */
732 int mode; /* console mode */
733@END
734
735
736/* Set info about a console (output only) */
737@REQ(set_console_info)
738 handle_t handle; /* handle to the console */
739 int mask; /* setting mask (see below) */
740 int cursor_size; /* size of cursor (percentage filled) */
741 int cursor_visible;/* cursor visibility flag */
742 VARARG(title,string); /* console title */
743@END
744#define SET_CONSOLE_INFO_CURSOR 0x01
745#define SET_CONSOLE_INFO_TITLE 0x02
746
747/* Get info about a console (output only) */
748@REQ(get_console_info)
749 handle_t handle; /* handle to the console */
750@REPLY
751 int cursor_size; /* size of cursor (percentage filled) */
752 int cursor_visible;/* cursor visibility flag */
753 int pid; /* pid of xterm (hack) */
754 VARARG(title,string); /* console title */
755@END
756
757
758/* Add input records to a console input queue */
759@REQ(write_console_input)
760 handle_t handle; /* handle to the console input */
761 VARARG(rec,input_records); /* input records */
762@REPLY
763 int written; /* number of records written */
764@END
765
766/* Fetch input records from a console input queue */
767@REQ(read_console_input)
768 handle_t handle; /* handle to the console input */
769 int flush; /* flush the retrieved records from the queue? */
770@REPLY
771 int read; /* number of records read */
772 VARARG(rec,input_records); /* input records */
773@END
774
775
776/* Create a change notification */
777@REQ(create_change_notification)
778 int subtree; /* watch all the subtree */
779 int filter; /* notification filter */
780@REPLY
781 handle_t handle; /* handle to the change notification */
782@END
783
784
785/* Create a file mapping */
786@REQ(create_mapping)
787 int size_high; /* mapping size */
788 int size_low; /* mapping size */
789 int protect; /* protection flags (see below) */
790 int inherit; /* inherit flag */
791 handle_t file_handle; /* file handle */
792 VARARG(name,unicode_str); /* object name */
793@REPLY
794 handle_t handle; /* handle to the mapping */
795@END
796/* protection flags */
797#define VPROT_READ 0x01
798#define VPROT_WRITE 0x02
799#define VPROT_EXEC 0x04
800#define VPROT_WRITECOPY 0x08
801#define VPROT_GUARD 0x10
802#define VPROT_NOCACHE 0x20
803#define VPROT_COMMITTED 0x40
804#define VPROT_IMAGE 0x80
805
806
807/* Open a mapping */
808@REQ(open_mapping)
809 unsigned int access; /* wanted access rights */
810 int inherit; /* inherit flag */
811 VARARG(name,unicode_str); /* object name */
812@REPLY
813 handle_t handle; /* handle to the mapping */
814@END
815
816
817/* Get information about a file mapping */
818@REQ(get_mapping_info)
819 handle_t handle; /* handle to the mapping */
820@REPLY
821 int size_high; /* mapping size */
822 int size_low; /* mapping size */
823 int protect; /* protection flags */
824 int header_size; /* header size (for VPROT_IMAGE mapping) */
825 void* base; /* default base addr (for VPROT_IMAGE mapping) */
826 handle_t shared_file; /* shared mapping file handle */
827 int shared_size; /* shared mapping size */
828@END
829
830
831/* Create a device */
832@REQ(create_device)
833 unsigned int access; /* wanted access rights */
834 int inherit; /* inherit flag */
835 int id; /* client private id */
836@REPLY
837 handle_t handle; /* handle to the device */
838@END
839
840
841/* Create a snapshot */
842@REQ(create_snapshot)
843 int inherit; /* inherit flag */
844 int flags; /* snapshot flags (TH32CS_*) */
845 void* pid; /* process id */
846@REPLY
847 handle_t handle; /* handle to the snapshot */
848@END
849
850
851/* Get the next process from a snapshot */
852@REQ(next_process)
853 handle_t handle; /* handle to the snapshot */
854 int reset; /* reset snapshot position? */
855@REPLY
856 int count; /* process usage count */
857 void* pid; /* process id */
858 int threads; /* number of threads */
859 int priority; /* process priority */
860@END
861
862
863/* Get the next thread from a snapshot */
864@REQ(next_thread)
865 handle_t handle; /* handle to the snapshot */
866 int reset; /* reset snapshot position? */
867@REPLY
868 int count; /* thread usage count */
869 void* pid; /* process id */
870 void* tid; /* thread id */
871 int base_pri; /* base priority */
872 int delta_pri; /* delta priority */
873@END
874
875
876/* Get the next module from a snapshot */
877@REQ(next_module)
878 handle_t handle; /* handle to the snapshot */
879 int reset; /* reset snapshot position? */
880@REPLY
881 void* pid; /* process id */
882 void* base; /* module base address */
883@END
884
885
886/* Wait for a debug event */
887@REQ(wait_debug_event)
888 int get_handle; /* should we alloc a handle for waiting? */
889@REPLY
890 void* pid; /* process id */
891 void* tid; /* thread id */
892 handle_t wait; /* wait handle if no event ready */
893 VARARG(event,debug_event); /* debug event data */
894@END
895
896
897/* Queue an exception event */
898@REQ(queue_exception_event)
899 int first; /* first chance exception? */
900 VARARG(record,exc_event); /* thread context followed by exception record */
901@REPLY
902 handle_t handle; /* handle to the queued event */
903@END
904
905
906/* Retrieve the status of an exception event */
907@REQ(get_exception_status)
908@REPLY
909 handle_t handle; /* handle to the queued event */
910 int status; /* event continuation status */
911 VARARG(context,context); /* modified thread context */
912@END
913
914
915/* Send an output string to the debugger */
916@REQ(output_debug_string)
917 void* string; /* string to display (in debugged process address space) */
918 int unicode; /* is it Unicode? */
919 int length; /* string length */
920@END
921
922
923/* Continue a debug event */
924@REQ(continue_debug_event)
925 void* pid; /* process id to continue */
926 void* tid; /* thread id to continue */
927 int status; /* continuation status */
928@END
929
930
931/* Start debugging an existing process */
932@REQ(debug_process)
933 void* pid; /* id of the process to debug */
934@END
935
936
937/* Read data from a process address space */
938@REQ(read_process_memory)
939 handle_t handle; /* process handle */
940 void* addr; /* addr to read from (must be int-aligned) */
941 int len; /* number of ints to read */
942@REPLY
943 VARARG(data,bytes); /* result data */
944@END
945
946
947/* Write data to a process address space */
948@REQ(write_process_memory)
949 handle_t handle; /* process handle */
950 void* addr; /* addr to write to (must be int-aligned) */
951 int len; /* number of ints to write */
952 unsigned int first_mask; /* mask for first word */
953 unsigned int last_mask; /* mask for last word */
954 VARARG(data,bytes); /* result data */
955@END
956
957
958/* Create a registry key */
959@REQ(create_key)
960 handle_t parent; /* handle to the parent key */
961 unsigned int access; /* desired access rights */
962 unsigned int options; /* creation options */
963 time_t modif; /* last modification time */
964 VARARG(name,unicode_len_str); /* key name */
965 VARARG(class,unicode_str); /* class name */
966@REPLY
967 handle_t hkey; /* handle to the created key */
968 int created; /* has it been newly created? */
969@END
970
971/* Open a registry key */
972@REQ(open_key)
973 handle_t parent; /* handle to the parent key */
974 unsigned int access; /* desired access rights */
975 VARARG(name,unicode_str); /* key name */
976@REPLY
977 handle_t hkey; /* handle to the open key */
978@END
979
980
981/* Delete a registry key */
982@REQ(delete_key)
983 handle_t hkey; /* handle to the key */
984@END
985
986
987/* Enumerate registry subkeys */
988@REQ(enum_key)
989 handle_t hkey; /* handle to registry key */
990 int index; /* index of subkey (or -1 for current key) */
991 int full; /* return the full info? */
992@REPLY
993 int subkeys; /* number of subkeys */
994 int max_subkey; /* longest subkey name */
995 int max_class; /* longest class name */
996 int values; /* number of values */
997 int max_value; /* longest value name */
998 int max_data; /* longest value data */
999 time_t modif; /* last modification time */
1000 VARARG(name,unicode_len_str); /* key name */
1001 VARARG(class,unicode_str); /* class name */
1002@END
1003
1004
1005/* Set a value of a registry key */
1006@REQ(set_key_value)
1007 handle_t hkey; /* handle to registry key */
1008 int type; /* value type */
1009 unsigned int total; /* total value len */
1010 unsigned int offset; /* offset for setting data */
1011 VARARG(name,unicode_len_str); /* value name */
1012 VARARG(data,bytes); /* value data */
1013@END
1014
1015
1016/* Retrieve the value of a registry key */
1017@REQ(get_key_value)
1018 handle_t hkey; /* handle to registry key */
1019 unsigned int offset; /* offset for getting data */
1020 VARARG(name,unicode_len_str); /* value name */
1021@REPLY
1022 int type; /* value type */
1023 int len; /* value data len */
1024 VARARG(data,bytes); /* value data */
1025@END
1026
1027
1028/* Enumerate a value of a registry key */
1029@REQ(enum_key_value)
1030 handle_t hkey; /* handle to registry key */
1031 int index; /* value index */
1032 unsigned int offset; /* offset for getting data */
1033@REPLY
1034 int type; /* value type */
1035 int len; /* value data len */
1036 VARARG(name,unicode_len_str); /* value name */
1037 VARARG(data,bytes); /* value data */
1038@END
1039
1040
1041/* Delete a value of a registry key */
1042@REQ(delete_key_value)
1043 handle_t hkey; /* handle to registry key */
1044 VARARG(name,unicode_str); /* value name */
1045@END
1046
1047
1048/* Load a registry branch from a file */
1049@REQ(load_registry)
1050 handle_t hkey; /* root key to load to */
1051 handle_t file; /* file to load from */
1052 VARARG(name,unicode_str); /* subkey name */
1053@END
1054
1055
1056/* Save a registry branch to a file */
1057@REQ(save_registry)
1058 handle_t hkey; /* key to save */
1059 handle_t file; /* file to save to */
1060@END
1061
1062
1063/* Save a registry branch at server exit */
1064@REQ(save_registry_atexit)
1065 handle_t hkey; /* key to save */
1066 VARARG(file,string); /* file to save to */
1067@END
1068
1069
1070/* Set the current and saving level for the registry */
1071@REQ(set_registry_levels)
1072 int current; /* new current level */
1073 int saving; /* new saving level */
1074 int period; /* duration between periodic saves (milliseconds) */
1075@END
1076
1077
1078/* Create a waitable timer */
1079@REQ(create_timer)
1080 int inherit; /* inherit flag */
1081 int manual; /* manual reset */
1082 VARARG(name,unicode_str); /* object name */
1083@REPLY
1084 handle_t handle; /* handle to the timer */
1085@END
1086
1087
1088/* Open a waitable timer */
1089@REQ(open_timer)
1090 unsigned int access; /* wanted access rights */
1091 int inherit; /* inherit flag */
1092 VARARG(name,unicode_str); /* object name */
1093@REPLY
1094 handle_t handle; /* handle to the timer */
1095@END
1096
1097/* Set a waitable timer */
1098@REQ(set_timer)
1099 handle_t handle; /* handle to the timer */
1100 int sec; /* next expiration absolute time */
1101 int usec; /* next expiration absolute time */
1102 int period; /* timer period in ms */
1103 void* callback; /* callback function */
1104 void* arg; /* callback argument */
1105@END
1106
1107/* Cancel a waitable timer */
1108@REQ(cancel_timer)
1109 handle_t handle; /* handle to the timer */
1110@END
1111
1112
1113/* Retrieve the current context of a thread */
1114@REQ(get_thread_context)
1115 handle_t handle; /* thread handle */
1116 unsigned int flags; /* context flags */
1117@REPLY
1118 VARARG(context,context); /* thread context */
1119@END
1120
1121
1122/* Set the current context of a thread */
1123@REQ(set_thread_context)
1124 handle_t handle; /* thread handle */
1125 unsigned int flags; /* context flags */
1126 VARARG(context,context); /* thread context */
1127@END
1128
1129
1130/* Fetch a selector entry for a thread */
1131@REQ(get_selector_entry)
1132 handle_t handle; /* thread handle */
1133 int entry; /* LDT entry */
1134@REPLY
1135 unsigned int base; /* selector base */
1136 unsigned int limit; /* selector limit */
1137 unsigned char flags; /* selector flags */
1138@END
1139
1140
1141/* Add an atom */
1142@REQ(add_atom)
1143 int local; /* is atom in local process table? */
1144 VARARG(name,unicode_str); /* atom name */
1145@REPLY
Alexandre Julliardd8a8c112001-10-12 18:45:29 +00001146 atom_t atom; /* resulting atom */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001147@END
1148
1149
1150/* Delete an atom */
1151@REQ(delete_atom)
Alexandre Julliardd8a8c112001-10-12 18:45:29 +00001152 atom_t atom; /* atom handle */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001153 int local; /* is atom in local process table? */
1154@END
1155
1156
1157/* Find an atom */
1158@REQ(find_atom)
1159 int local; /* is atom in local process table? */
1160 VARARG(name,unicode_str); /* atom name */
1161@REPLY
Alexandre Julliardd8a8c112001-10-12 18:45:29 +00001162 atom_t atom; /* atom handle */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001163@END
1164
1165
1166/* Get an atom name */
1167@REQ(get_atom_name)
Alexandre Julliardd8a8c112001-10-12 18:45:29 +00001168 atom_t atom; /* atom handle */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001169 int local; /* is atom in local process table? */
1170@REPLY
1171 int count; /* atom lock count */
1172 VARARG(name,unicode_str); /* atom name */
1173@END
1174
1175
1176/* Init the process atom table */
1177@REQ(init_atom_table)
1178 int entries; /* number of entries */
1179@END
1180
1181
1182/* Get the message queue of the current thread */
1183@REQ(get_msg_queue)
1184@REPLY
1185 handle_t handle; /* handle to the queue */
1186@END
1187
1188
1189/* Increment the message queue paint count */
1190@REQ(inc_queue_paint_count)
1191 void* id; /* thread id */
1192 int incr; /* increment (can be negative) */
1193@END
1194
1195
1196/* Set the current message queue wakeup mask */
1197@REQ(set_queue_mask)
1198 unsigned int wake_mask; /* wakeup bits mask */
1199 unsigned int changed_mask; /* changed bits mask */
1200 int skip_wait; /* will we skip waiting if signaled? */
1201@REPLY
1202 unsigned int wake_bits; /* current wake bits */
1203 unsigned int changed_bits; /* current changed bits */
1204@END
1205
1206
1207/* Get the current message queue status */
1208@REQ(get_queue_status)
1209 int clear; /* should we clear the change bits? */
1210@REPLY
1211 unsigned int wake_bits; /* wake bits */
1212 unsigned int changed_bits; /* changed bits since last time */
1213@END
1214
1215
1216/* Wait for a process to start waiting on input */
1217@REQ(wait_input_idle)
1218 handle_t handle; /* process handle */
1219 int timeout; /* timeout */
1220@REPLY
1221 handle_t event; /* handle to idle event */
1222@END
1223
1224
1225/* Send a message to a thread queue */
1226@REQ(send_message)
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001227 void* id; /* thread id */
Alexandre Julliardd253c582001-08-07 19:19:08 +00001228 int type; /* message type (see below) */
Alexandre Julliard1a66d222001-08-28 18:44:52 +00001229 user_handle_t win; /* window handle */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001230 unsigned int msg; /* message code */
1231 unsigned int wparam; /* parameters */
1232 unsigned int lparam; /* parameters */
Alexandre Julliardd253c582001-08-07 19:19:08 +00001233 int x; /* x position */
1234 int y; /* y position */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001235 unsigned int time; /* message time */
1236 unsigned int info; /* extra info */
Alexandre Julliardd253c582001-08-07 19:19:08 +00001237 int timeout; /* timeout for reply */
1238 VARARG(data,bytes); /* message data for sent messages */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001239@END
Alexandre Julliardd253c582001-08-07 19:19:08 +00001240
1241enum message_type
1242{
1243 MSG_ASCII, /* Ascii message (from SendMessageA) */
1244 MSG_UNICODE, /* Unicode message (from SendMessageW) */
1245 MSG_NOTIFY, /* notify message (from SendNotifyMessageW), always Unicode */
1246 MSG_CALLBACK, /* callback message (from SendMessageCallbackW), always Unicode */
1247 MSG_OTHER_PROCESS, /* sent from other process, may include vararg data, always Unicode */
1248 MSG_POSTED, /* posted message (from PostMessageW), always Unicode */
1249 MSG_HARDWARE_RAW, /* raw hardware message */
1250 MSG_HARDWARE_COOKED /* cooked hardware message */
1251};
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001252
1253
1254/* Get a message from the current queue */
1255@REQ(get_message)
1256 int flags; /* see below */
Alexandre Julliard1a66d222001-08-28 18:44:52 +00001257 user_handle_t get_win; /* window handle to get */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001258 unsigned int get_first; /* first message code to get */
1259 unsigned int get_last; /* last message code to get */
1260@REPLY
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001261 int type; /* message type */
Alexandre Julliard1a66d222001-08-28 18:44:52 +00001262 user_handle_t win; /* window handle */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001263 unsigned int msg; /* message code */
1264 unsigned int wparam; /* parameters */
1265 unsigned int lparam; /* parameters */
Alexandre Julliardd253c582001-08-07 19:19:08 +00001266 int x; /* x position */
1267 int y; /* y position */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001268 unsigned int time; /* message time */
1269 unsigned int info; /* extra info */
Alexandre Julliardd253c582001-08-07 19:19:08 +00001270 VARARG(data,bytes); /* message data for sent messages */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001271@END
1272#define GET_MSG_REMOVE 1 /* remove the message */
1273#define GET_MSG_SENT_ONLY 2 /* only get sent messages */
1274#define GET_MSG_REMOVE_LAST 4 /* remove last message returned before checking for a new one */
1275
1276/* Reply to a sent message */
1277@REQ(reply_message)
1278 unsigned int result; /* message result */
1279 int remove; /* should we remove the message? */
Alexandre Julliardd253c582001-08-07 19:19:08 +00001280 VARARG(data,bytes); /* message data for sent messages */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001281@END
1282
1283
1284/* Retrieve the reply for the last message sent */
1285@REQ(get_message_reply)
1286 int cancel; /* cancel message if not ready? */
1287@REPLY
1288 unsigned int result; /* message result */
Alexandre Julliardd253c582001-08-07 19:19:08 +00001289 VARARG(data,bytes); /* message data for sent messages */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001290@END
1291
1292
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001293/* Set a window timer */
1294@REQ(set_win_timer)
Alexandre Julliard1a66d222001-08-28 18:44:52 +00001295 user_handle_t win; /* window handle */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001296 unsigned int msg; /* message to post */
1297 unsigned int id; /* timer id */
1298 unsigned int rate; /* timer rate in ms */
1299 unsigned int lparam; /* message lparam (callback proc) */
1300@END
1301
1302
1303/* Kill a window timer */
1304@REQ(kill_win_timer)
Alexandre Julliard1a66d222001-08-28 18:44:52 +00001305 user_handle_t win; /* window handle */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001306 unsigned int msg; /* message to post */
1307 unsigned int id; /* timer id */
1308@END
1309
1310
1311/* Open a serial port */
1312@REQ(create_serial)
1313 unsigned int access; /* wanted access rights */
1314 int inherit; /* inherit flag */
Mike McCormack568c67e2001-10-08 20:40:57 +00001315 unsigned int attributes; /* eg. FILE_FLAG_OVERLAPPED */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001316 unsigned int sharing; /* sharing flags */
1317 VARARG(name,string); /* file name */
1318@REPLY
1319 handle_t handle; /* handle to the port */
1320@END
1321
1322
1323/* Retrieve info about a serial port */
1324@REQ(get_serial_info)
1325 handle_t handle; /* handle to comm port */
1326@REPLY
1327 unsigned int readinterval;
1328 unsigned int readconst;
1329 unsigned int readmult;
1330 unsigned int writeconst;
1331 unsigned int writemult;
1332 unsigned int eventmask;
1333 unsigned int commerror;
1334@END
1335
1336
1337/* Set info about a serial port */
1338@REQ(set_serial_info)
1339 handle_t handle; /* handle to comm port */
1340 int flags; /* bitmask to set values (see below) */
1341 unsigned int readinterval;
1342 unsigned int readconst;
1343 unsigned int readmult;
1344 unsigned int writeconst;
1345 unsigned int writemult;
1346 unsigned int eventmask;
1347 unsigned int commerror;
1348@END
1349#define SERIALINFO_SET_TIMEOUTS 0x01
1350#define SERIALINFO_SET_MASK 0x02
1351#define SERIALINFO_SET_ERROR 0x04
1352
1353
1354/* Create an async I/O */
1355@REQ(create_async)
1356 handle_t file_handle; /* handle to comm port, socket or file */
1357 int count;
1358 int type;
1359@REPLY
1360 int timeout;
1361@END
1362#define ASYNC_TYPE_READ 0x01
1363#define ASYNC_TYPE_WRITE 0x02
1364#define ASYNC_TYPE_WAIT 0x03
1365
1366
1367/* Create a named pipe */
1368@REQ(create_named_pipe)
1369 unsigned int openmode;
1370 unsigned int pipemode;
1371 unsigned int maxinstances;
1372 unsigned int outsize;
1373 unsigned int insize;
1374 unsigned int timeout;
1375 VARARG(filename,string); /* pipe name */
1376@REPLY
1377 handle_t handle; /* handle to the pipe */
1378@END
1379
1380
1381/* Open an existing named pipe */
1382@REQ(open_named_pipe)
1383 unsigned int access;
1384 VARARG(filename,string); /* pipe name */
1385@REPLY
1386 handle_t handle; /* handle to the pipe */
1387@END
1388
1389
1390/* Connect to a named pipe */
1391@REQ(connect_named_pipe)
1392 handle_t handle;
1393 handle_t event; /* set this event when it's ready */
1394@END
Mike McCormackbf554572001-08-23 23:29:20 +00001395
1396
1397/* Wait for a named pipe */
1398@REQ(wait_named_pipe)
1399 unsigned int timeout;
1400 handle_t event; /* set this event when it's ready */
1401 VARARG(filename,string); /* pipe name */
1402@END
1403
1404
1405/* Disconnect a named pipe */
1406@REQ(disconnect_named_pipe)
1407 handle_t handle;
1408@END
Mike McCormackf2e7ce72001-08-27 19:03:42 +00001409
Alexandre Julliard1a66d222001-08-28 18:44:52 +00001410
Mike McCormackf2e7ce72001-08-27 19:03:42 +00001411@REQ(get_named_pipe_info)
1412 handle_t handle;
1413@REPLY
1414 unsigned int flags;
1415 unsigned int maxinstances;
1416 unsigned int outsize;
1417 unsigned int insize;
1418@END
1419
Alexandre Julliard1a66d222001-08-28 18:44:52 +00001420
Alexandre Julliard1a66d222001-08-28 18:44:52 +00001421/* Create a window */
1422@REQ(create_window)
Alexandre Julliarda09da0c2001-09-21 21:08:40 +00001423 user_handle_t parent; /* parent window */
1424 user_handle_t owner; /* owner window */
Alexandre Julliardd8a8c112001-10-12 18:45:29 +00001425 atom_t atom; /* class atom */
Alexandre Julliard1a66d222001-08-28 18:44:52 +00001426@REPLY
Alexandre Julliarda09da0c2001-09-21 21:08:40 +00001427 user_handle_t handle; /* created window */
Alexandre Julliard1a66d222001-08-28 18:44:52 +00001428@END
1429
1430
1431/* Link a window into the tree */
1432@REQ(link_window)
1433 user_handle_t handle; /* handle to the window */
1434 user_handle_t parent; /* handle to the parent */
1435 user_handle_t previous; /* previous child in Z-order */
1436@REPLY
Alexandre Julliardddc33172001-10-22 19:08:33 +00001437 user_handle_t full_parent; /* full handle of new parent */
Alexandre Julliard1a66d222001-08-28 18:44:52 +00001438@END
1439
1440
1441/* Destroy a window */
1442@REQ(destroy_window)
1443 user_handle_t handle; /* handle to the window */
1444@END
1445
1446
Alexandre Julliardddc33172001-10-22 19:08:33 +00001447/* Set a window owner */
1448@REQ(set_window_owner)
1449 user_handle_t handle; /* handle to the window */
1450 user_handle_t owner; /* new owner */
1451@REPLY
1452 user_handle_t full_owner; /* full handle of new owner */
1453@END
1454
1455
Alexandre Julliard1a66d222001-08-28 18:44:52 +00001456/* Get information from a window handle */
1457@REQ(get_window_info)
1458 user_handle_t handle; /* handle to the window */
1459@REPLY
1460 user_handle_t full_handle; /* full 32-bit handle */
1461 void* pid; /* process owning the window */
1462 void* tid; /* thread owning the window */
Alexandre Julliardddc33172001-10-22 19:08:33 +00001463 atom_t atom; /* class atom */
Alexandre Julliard1a66d222001-08-28 18:44:52 +00001464@END
Alexandre Julliarda09da0c2001-09-21 21:08:40 +00001465
1466
Alexandre Julliardddc33172001-10-22 19:08:33 +00001467/* Set some information in a window */
1468@REQ(set_window_info)
1469 user_handle_t handle; /* handle to the window */
1470 unsigned int flags; /* flags for fields to set (see below) */
1471 unsigned int style; /* window style */
1472 unsigned int ex_style; /* window extended style */
1473 unsigned int id; /* window id */
1474 void* instance; /* creator instance */
1475 void* user_data; /* user-specific data */
1476@REPLY
1477 unsigned int old_style; /* old window style */
1478 unsigned int old_ex_style; /* old window extended style */
1479 unsigned int old_id; /* old window id */
1480 void* old_instance; /* old creator instance */
1481 void* old_user_data; /* old user-specific data */
1482@END
1483#define SET_WIN_STYLE 0x01
1484#define SET_WIN_EXSTYLE 0x02
1485#define SET_WIN_ID 0x04
1486#define SET_WIN_INSTANCE 0x08
1487#define SET_WIN_USERDATA 0x10
1488
1489
Alexandre Julliarda09da0c2001-09-21 21:08:40 +00001490/* Get a list of the window parents, up to the root of the tree */
1491@REQ(get_window_parents)
1492 user_handle_t handle; /* handle to the window */
1493@REPLY
1494 int count; /* total count of parents */
1495 VARARG(parents,user_handles); /* parent handles */
1496@END
1497
1498
1499/* Get a list of the window children */
1500@REQ(get_window_children)
1501 user_handle_t parent; /* parent window */
Alexandre Julliardd8a8c112001-10-12 18:45:29 +00001502 atom_t atom; /* class atom for the listed children */
Alexandre Julliard844ceb92001-10-09 23:26:40 +00001503 void* tid; /* thread owning the listed children */
Alexandre Julliarda09da0c2001-09-21 21:08:40 +00001504@REPLY
1505 int count; /* total count of children */
Alexandre Julliard7695d692001-09-24 01:19:59 +00001506 VARARG(children,user_handles); /* children handles */
Alexandre Julliarda09da0c2001-09-21 21:08:40 +00001507@END
1508
1509
1510/* Get window tree information from a window handle */
1511@REQ(get_window_tree)
1512 user_handle_t handle; /* handle to the window */
1513@REPLY
1514 user_handle_t parent; /* parent window */
1515 user_handle_t owner; /* owner window */
1516 user_handle_t next_sibling; /* next sibling in Z-order */
1517 user_handle_t prev_sibling; /* prev sibling in Z-order */
1518 user_handle_t first_sibling; /* first sibling in Z-order */
1519 user_handle_t last_sibling; /* last sibling in Z-order */
1520 user_handle_t first_child; /* first child */
1521 user_handle_t last_child; /* last child */
1522@END
Alexandre Julliard7a2017d2001-10-12 19:10:26 +00001523
Alexandre Julliard0d509652001-10-16 21:55:37 +00001524/* Set the window and client rectangles of a window */
1525@REQ(set_window_rectangles)
1526 user_handle_t handle; /* handle to the window */
1527 rectangle_t window; /* window rectangle */
1528 rectangle_t client; /* client rectangle */
1529@END
1530
1531
1532/* Get the window and client rectangles of a window */
1533@REQ(get_window_rectangles)
1534 user_handle_t handle; /* handle to the window */
1535@REPLY
1536 rectangle_t window; /* window rectangle */
1537 rectangle_t client; /* client rectangle */
1538@END
1539
1540
1541/* Get the coordinates offset between two windows */
1542@REQ(get_windows_offset)
1543 user_handle_t from; /* handle to the first window */
1544 user_handle_t to; /* handle to the second window */
1545@REPLY
1546 int x; /* x coordinate offset */
1547 int y; /* y coordinate offset */
1548@END
1549
Alexandre Julliard7a2017d2001-10-12 19:10:26 +00001550
1551/* Set a window property */
1552@REQ(set_window_property)
1553 user_handle_t window; /* handle to the window */
1554 atom_t atom; /* property atom (high-word set if it was a string) */
1555 int string; /* was atom a string originally? */
1556 handle_t handle; /* handle to store */
1557@END
1558
1559
1560/* Remove a window property */
1561@REQ(remove_window_property)
1562 user_handle_t window; /* handle to the window */
1563 atom_t atom; /* property atom */
1564@REPLY
1565 handle_t handle; /* handle stored in property */
1566@END
1567
1568
1569/* Get a window property */
1570@REQ(get_window_property)
1571 user_handle_t window; /* handle to the window */
1572 atom_t atom; /* property atom */
1573@REPLY
1574 handle_t handle; /* handle stored in property */
1575@END
1576
1577
1578/* Get the list of properties of a window */
1579@REQ(get_window_properties)
1580 user_handle_t window; /* handle to the window */
1581@REPLY
1582 VARARG(props,properties); /* list of properties */
1583@END