wined3d: Emit position / attribute 0 last in draw_primitive_immediate_mode().
[wine.git] / server / protocol.def
blobe67632ceee3e11fa8a5a27021f4eca2e27df5055
1 /* -*- C -*-
3 * Wine server protocol definition
5 * Copyright (C) 2001 Alexandre Julliard
7 * This file is used by tools/make_requests to build the
8 * protocol structures in include/wine/server_protocol.h
10 * This library is free software; you can redistribute it and/or
11 * modify it under the terms of the GNU Lesser General Public
12 * License as published by the Free Software Foundation; either
13 * version 2.1 of the License, or (at your option) any later version.
15 * This library is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 * Lesser General Public License for more details.
20 * You should have received a copy of the GNU Lesser General Public
21 * License along with this library; if not, write to the Free Software
22 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
25 @HEADER /* start of C declarations */
27 #include <stdarg.h>
28 #include <stdlib.h>
29 #include <time.h>
31 #include <windef.h>
32 #include <winbase.h>
34 typedef unsigned int obj_handle_t;
35 typedef unsigned int user_handle_t;
36 typedef unsigned int atom_t;
37 typedef unsigned int process_id_t;
38 typedef unsigned int thread_id_t;
39 typedef unsigned int data_size_t;
40 typedef unsigned int ioctl_code_t;
41 typedef unsigned __int64 lparam_t;
42 typedef unsigned __int64 apc_param_t;
43 typedef unsigned __int64 mem_size_t;
44 typedef unsigned __int64 file_pos_t;
45 typedef unsigned __int64 client_ptr_t;
46 typedef unsigned __int64 affinity_t;
47 typedef client_ptr_t mod_handle_t;
49 struct request_header
51 int req; /* request code */
52 data_size_t request_size; /* request variable part size */
53 data_size_t reply_size; /* reply variable part maximum size */
56 struct reply_header
58 unsigned int error; /* error result */
59 data_size_t reply_size; /* reply variable part size */
62 /* placeholder structure for the maximum allowed request size */
63 /* this is used to construct the generic_request union */
64 struct request_max_size
66 int pad[16]; /* the max request size is 16 ints */
69 #define FIRST_USER_HANDLE 0x0020 /* first possible value for low word of user handle */
70 #define LAST_USER_HANDLE 0xffef /* last possible value for low word of user handle */
73 /* debug event data */
74 typedef union
76 int code; /* event code */
77 struct
79 int code; /* EXCEPTION_DEBUG_EVENT */
80 int first; /* first chance exception? */
81 unsigned int exc_code; /* exception code */
82 unsigned int flags; /* exception flags */
83 client_ptr_t record; /* exception record */
84 client_ptr_t address; /* exception address */
85 int nb_params; /* number of parameters */
86 int __pad;
87 client_ptr_t params[15]; /* parameters */
88 } exception;
89 struct
91 int code; /* CREATE_THREAD_DEBUG_EVENT */
92 obj_handle_t handle; /* handle to the new thread */
93 client_ptr_t teb; /* thread teb (in debugged process address space) */
94 client_ptr_t start; /* thread startup routine */
95 } create_thread;
96 struct
98 int code; /* CREATE_PROCESS_DEBUG_EVENT */
99 obj_handle_t file; /* handle to the process exe file */
100 obj_handle_t process; /* handle to the new process */
101 obj_handle_t thread; /* handle to the new thread */
102 mod_handle_t base; /* base of executable image */
103 int dbg_offset; /* offset of debug info in file */
104 int dbg_size; /* size of debug info */
105 client_ptr_t teb; /* thread teb (in debugged process address space) */
106 client_ptr_t start; /* thread startup routine */
107 client_ptr_t name; /* image name (optional) */
108 int unicode; /* is it Unicode? */
109 } create_process;
110 struct
112 int code; /* EXIT_THREAD_DEBUG_EVENT/EXIT_PROCESS_DEBUG_EVENT */
113 int exit_code; /* thread or process exit code */
114 } exit;
115 struct
117 int code; /* LOAD_DLL_DEBUG_EVENT */
118 obj_handle_t handle; /* file handle for the dll */
119 mod_handle_t base; /* base address of the dll */
120 int dbg_offset; /* offset of debug info in file */
121 int dbg_size; /* size of debug info */
122 client_ptr_t name; /* image name (optional) */
123 int unicode; /* is it Unicode? */
124 } load_dll;
125 struct
127 int code; /* UNLOAD_DLL_DEBUG_EVENT */
128 int __pad;
129 mod_handle_t base; /* base address of the dll */
130 } unload_dll;
131 } debug_event_t;
133 /* supported CPU types */
134 enum cpu_type
136 CPU_x86, CPU_x86_64, CPU_POWERPC, CPU_ARM, CPU_ARM64
138 typedef int cpu_type_t;
140 /* context data */
141 typedef struct
143 cpu_type_t cpu; /* cpu type */
144 unsigned int flags; /* SERVER_CTX_* flags */
145 union
147 struct { unsigned int eip, ebp, esp, eflags, cs, ss; } i386_regs;
148 struct { unsigned __int64 rip, rbp, rsp;
149 unsigned int cs, ss, flags, __pad; } x86_64_regs;
150 struct { unsigned int iar, msr, ctr, lr, dar, dsisr, trap, __pad; } powerpc_regs;
151 struct { unsigned int sp, lr, pc, cpsr; } arm_regs;
152 struct { unsigned __int64 sp, pc, pstate; } arm64_regs;
153 } ctl; /* selected by SERVER_CTX_CONTROL */
154 union
156 struct { unsigned int eax, ebx, ecx, edx, esi, edi; } i386_regs;
157 struct { unsigned __int64 rax,rbx, rcx, rdx, rsi, rdi,
158 r8, r9, r10, r11, r12, r13, r14, r15; } x86_64_regs;
159 struct { unsigned int gpr[32], cr, xer; } powerpc_regs;
160 struct { unsigned int r[13]; } arm_regs;
161 struct { unsigned __int64 x[31]; } arm64_regs;
162 } integer; /* selected by SERVER_CTX_INTEGER */
163 union
165 struct { unsigned int ds, es, fs, gs; } i386_regs;
166 struct { unsigned int ds, es, fs, gs; } x86_64_regs;
167 } seg; /* selected by SERVER_CTX_SEGMENTS */
168 union
170 struct { unsigned int ctrl, status, tag, err_off, err_sel, data_off, data_sel, cr0npx;
171 unsigned char regs[80]; } i386_regs;
172 struct { struct { unsigned __int64 low, high; } fpregs[32]; } x86_64_regs;
173 struct { double fpr[32], fpscr; } powerpc_regs;
174 } fp; /* selected by SERVER_CTX_FLOATING_POINT */
175 union
177 struct { unsigned int dr0, dr1, dr2, dr3, dr6, dr7; } i386_regs;
178 struct { unsigned __int64 dr0, dr1, dr2, dr3, dr6, dr7; } x86_64_regs;
179 struct { unsigned int dr[8]; } powerpc_regs;
180 } debug; /* selected by SERVER_CTX_DEBUG_REGISTERS */
181 union
183 unsigned char i386_regs[512];
184 } ext; /* selected by SERVER_CTX_EXTENDED_REGISTERS */
185 } context_t;
187 #define SERVER_CTX_CONTROL 0x01
188 #define SERVER_CTX_INTEGER 0x02
189 #define SERVER_CTX_SEGMENTS 0x04
190 #define SERVER_CTX_FLOATING_POINT 0x08
191 #define SERVER_CTX_DEBUG_REGISTERS 0x10
192 #define SERVER_CTX_EXTENDED_REGISTERS 0x20
194 /* structure used in sending an fd from client to server */
195 struct send_fd
197 thread_id_t tid; /* thread id */
198 int fd; /* file descriptor on client-side */
201 /* structure sent by the server on the wait fifo */
202 struct wake_up_reply
204 client_ptr_t cookie; /* magic cookie that was passed in select_request */
205 int signaled; /* wait result */
206 int __pad;
209 /* NT-style timeout, in 100ns units, negative means relative timeout */
210 typedef __int64 timeout_t;
211 #define TIMEOUT_INFINITE (((timeout_t)0x7fffffff) << 32 | 0xffffffff)
213 /* structure for process startup info */
214 typedef struct
216 unsigned int debug_flags;
217 unsigned int console_flags;
218 obj_handle_t console;
219 obj_handle_t hstdin;
220 obj_handle_t hstdout;
221 obj_handle_t hstderr;
222 unsigned int x;
223 unsigned int y;
224 unsigned int xsize;
225 unsigned int ysize;
226 unsigned int xchars;
227 unsigned int ychars;
228 unsigned int attribute;
229 unsigned int flags;
230 unsigned int show;
231 data_size_t curdir_len;
232 data_size_t dllpath_len;
233 data_size_t imagepath_len;
234 data_size_t cmdline_len;
235 data_size_t title_len;
236 data_size_t desktop_len;
237 data_size_t shellinfo_len;
238 data_size_t runtime_len;
239 /* VARARG(curdir,unicode_str,curdir_len); */
240 /* VARARG(dllpath,unicode_str,dllpath_len); */
241 /* VARARG(imagepath,unicode_str,imagepath_len); */
242 /* VARARG(cmdline,unicode_str,cmdline_len); */
243 /* VARARG(title,unicode_str,title_len); */
244 /* VARARG(desktop,unicode_str,desktop_len); */
245 /* VARARG(shellinfo,unicode_str,shellinfo_len); */
246 /* VARARG(runtime,unicode_str,runtime_len); */
247 } startup_info_t;
249 /* structure returned in the list of window properties */
250 typedef struct
252 atom_t atom; /* property atom */
253 int string; /* was atom a string originally? */
254 lparam_t data; /* data stored in property */
255 } property_data_t;
257 /* structure to specify window rectangles */
258 typedef struct
260 int left;
261 int top;
262 int right;
263 int bottom;
264 } rectangle_t;
266 /* structure for parameters of async I/O calls */
267 typedef struct
269 obj_handle_t handle; /* object to perform I/O on */
270 obj_handle_t event; /* event to signal when done */
271 client_ptr_t callback; /* client-side callback to call upon end of async */
272 client_ptr_t iosb; /* I/O status block in client addr space */
273 client_ptr_t arg; /* opaque user data to pass to callback */
274 apc_param_t cvalue; /* completion value to use for completion events */
275 } async_data_t;
277 /* structures for extra message data */
279 struct hardware_msg_data
281 lparam_t info; /* extra info */
282 unsigned int hw_id; /* unique id */
283 unsigned int flags; /* hook flags */
284 union
286 int type;
287 struct
289 int type; /* RIM_TYPEKEYBOARD */
290 unsigned int message; /* message generated by this rawinput event */
291 unsigned short vkey; /* virtual key code */
292 unsigned short scan; /* scan code */
293 } kbd;
294 struct
296 int type; /* RIM_TYPEMOUSE */
297 int x; /* x coordinate */
298 int y; /* y coordinate */
299 unsigned int data; /* mouse data */
300 } mouse;
301 } rawinput;
304 struct callback_msg_data
306 client_ptr_t callback; /* callback function */
307 lparam_t data; /* user data for callback */
308 lparam_t result; /* message result */
311 struct winevent_msg_data
313 user_handle_t hook; /* hook handle */
314 thread_id_t tid; /* thread id */
315 client_ptr_t hook_proc; /* hook proc address */
316 /* followed by module name if any */
319 typedef union
321 int type;
322 struct
324 int type; /* INPUT_KEYBOARD */
325 unsigned short vkey; /* virtual key code */
326 unsigned short scan; /* scan code */
327 unsigned int flags; /* event flags */
328 unsigned int time; /* event time */
329 lparam_t info; /* extra info */
330 } kbd;
331 struct
333 int type; /* INPUT_MOUSE */
334 int x; /* coordinates */
335 int y;
336 unsigned int data; /* mouse data */
337 unsigned int flags; /* event flags */
338 unsigned int time; /* event time */
339 lparam_t info; /* extra info */
340 } mouse;
341 struct
343 int type; /* INPUT_HARDWARE */
344 unsigned int msg; /* message code */
345 lparam_t lparam; /* message param */
346 } hw;
347 } hw_input_t;
349 typedef union
351 unsigned char bytes[1]; /* raw data for sent messages */
352 struct hardware_msg_data hardware;
353 struct callback_msg_data callback;
354 struct winevent_msg_data winevent;
355 } message_data_t;
357 /* structure for console char/attribute info */
358 typedef struct
360 WCHAR ch;
361 unsigned short attr;
362 } char_info_t;
364 /* structure returned in filesystem events */
365 struct filesystem_event
367 int action;
368 data_size_t len;
369 char name[1];
372 typedef struct
374 unsigned int low_part;
375 int high_part;
376 } luid_t;
378 #define MAX_ACL_LEN 65535
380 struct security_descriptor
382 unsigned int control; /* SE_ flags */
383 data_size_t owner_len;
384 data_size_t group_len;
385 data_size_t sacl_len;
386 data_size_t dacl_len;
387 /* VARARG(owner,SID); */
388 /* VARARG(group,SID); */
389 /* VARARG(sacl,ACL); */
390 /* VARARG(dacl,ACL); */
393 struct object_attributes
395 obj_handle_t rootdir; /* root directory */
396 unsigned int attributes; /* object attributes */
397 data_size_t sd_len; /* length of security_descriptor data. may be 0 */
398 data_size_t name_len; /* length of the name string. may be 0 */
399 /* VARARG(sd,security_descriptor); */
400 /* VARARG(name,unicode_str); */
403 struct token_groups
405 unsigned int count;
406 /* unsigned int attributes[count]; */
407 /* VARARG(sids,SID); */
410 enum select_op
412 SELECT_NONE,
413 SELECT_WAIT,
414 SELECT_WAIT_ALL,
415 SELECT_SIGNAL_AND_WAIT,
416 SELECT_KEYED_EVENT_WAIT,
417 SELECT_KEYED_EVENT_RELEASE
420 typedef union
422 enum select_op op;
423 struct
425 enum select_op op; /* SELECT_WAIT or SELECT_WAIT_ALL */
426 obj_handle_t handles[MAXIMUM_WAIT_OBJECTS];
427 } wait;
428 struct
430 enum select_op op; /* SELECT_SIGNAL_AND_WAIT */
431 obj_handle_t wait;
432 obj_handle_t signal; /* must be last in the structure so we can remove it on retries */
433 } signal_and_wait;
434 struct
436 enum select_op op; /* SELECT_KEYED_EVENT_WAIT or SELECT_KEYED_EVENT_RELEASE */
437 obj_handle_t handle;
438 client_ptr_t key;
439 } keyed_event;
440 } select_op_t;
442 enum apc_type
444 APC_NONE,
445 APC_USER,
446 APC_TIMER,
447 APC_ASYNC_IO,
448 APC_VIRTUAL_ALLOC,
449 APC_VIRTUAL_FREE,
450 APC_VIRTUAL_QUERY,
451 APC_VIRTUAL_PROTECT,
452 APC_VIRTUAL_FLUSH,
453 APC_VIRTUAL_LOCK,
454 APC_VIRTUAL_UNLOCK,
455 APC_MAP_VIEW,
456 APC_UNMAP_VIEW,
457 APC_CREATE_THREAD
460 typedef union
462 enum apc_type type;
463 struct
465 enum apc_type type; /* APC_USER */
466 int __pad;
467 client_ptr_t func; /* void (__stdcall *func)(ULONG_PTR,ULONG_PTR,ULONG_PTR); */
468 apc_param_t args[3]; /* arguments for user function */
469 } user;
470 struct
472 enum apc_type type; /* APC_TIMER */
473 int __pad;
474 client_ptr_t func; /* void (__stdcall *func)(void*, unsigned int, unsigned int); */
475 timeout_t time; /* absolute time of expiration */
476 client_ptr_t arg; /* user argument */
477 } timer;
478 struct
480 enum apc_type type; /* APC_ASYNC_IO */
481 unsigned int status; /* I/O status */
482 client_ptr_t func; /* unsigned int (*func)(void*, void*, unsigned int, void**, void**); */
483 client_ptr_t user; /* user pointer */
484 client_ptr_t sb; /* status block */
485 } async_io;
486 struct
488 enum apc_type type; /* APC_VIRTUAL_ALLOC */
489 unsigned int op_type; /* type of operation */
490 client_ptr_t addr; /* requested address */
491 mem_size_t size; /* allocation size */
492 unsigned int zero_bits; /* allocation alignment */
493 unsigned int prot; /* memory protection flags */
494 } virtual_alloc;
495 struct
497 enum apc_type type; /* APC_VIRTUAL_FREE */
498 unsigned int op_type; /* type of operation */
499 client_ptr_t addr; /* requested address */
500 mem_size_t size; /* allocation size */
501 } virtual_free;
502 struct
504 enum apc_type type; /* APC_VIRTUAL_QUERY */
505 int __pad;
506 client_ptr_t addr; /* requested address */
507 } virtual_query;
508 struct
510 enum apc_type type; /* APC_VIRTUAL_PROTECT */
511 unsigned int prot; /* new protection flags */
512 client_ptr_t addr; /* requested address */
513 mem_size_t size; /* requested size */
514 } virtual_protect;
515 struct
517 enum apc_type type; /* APC_VIRTUAL_FLUSH */
518 int __pad;
519 client_ptr_t addr; /* requested address */
520 mem_size_t size; /* requested size */
521 } virtual_flush;
522 struct
524 enum apc_type type; /* APC_VIRTUAL_LOCK */
525 int __pad;
526 client_ptr_t addr; /* requested address */
527 mem_size_t size; /* requested size */
528 } virtual_lock;
529 struct
531 enum apc_type type; /* APC_VIRTUAL_UNLOCK */
532 int __pad;
533 client_ptr_t addr; /* requested address */
534 mem_size_t size; /* requested size */
535 } virtual_unlock;
536 struct
538 enum apc_type type; /* APC_MAP_VIEW */
539 obj_handle_t handle; /* mapping handle */
540 client_ptr_t addr; /* requested address */
541 mem_size_t size; /* allocation size */
542 file_pos_t offset; /* file offset */
543 unsigned int alloc_type;/* allocation type */
544 unsigned short zero_bits; /* allocation alignment */
545 unsigned short prot; /* memory protection flags */
546 } map_view;
547 struct
549 enum apc_type type; /* APC_UNMAP_VIEW */
550 int __pad;
551 client_ptr_t addr; /* view address */
552 } unmap_view;
553 struct
555 enum apc_type type; /* APC_CREATE_THREAD */
556 int suspend; /* suspended thread? */
557 client_ptr_t func; /* void (__stdcall *func)(void*); start function */
558 client_ptr_t arg; /* argument for start function */
559 mem_size_t reserve; /* reserve size for thread stack */
560 mem_size_t commit; /* commit size for thread stack */
561 } create_thread;
562 } apc_call_t;
564 typedef union
566 enum apc_type type;
567 struct
569 enum apc_type type; /* APC_ASYNC_IO */
570 unsigned int status; /* new status of async operation */
571 client_ptr_t apc; /* user APC to call */
572 client_ptr_t arg; /* user APC argument */
573 unsigned int total; /* bytes transferred */
574 } async_io;
575 struct
577 enum apc_type type; /* APC_VIRTUAL_ALLOC */
578 unsigned int status; /* status returned by call */
579 client_ptr_t addr; /* resulting address */
580 mem_size_t size; /* resulting size */
581 } virtual_alloc;
582 struct
584 enum apc_type type; /* APC_VIRTUAL_FREE */
585 unsigned int status; /* status returned by call */
586 client_ptr_t addr; /* resulting address */
587 mem_size_t size; /* resulting size */
588 } virtual_free;
589 struct
591 enum apc_type type; /* APC_VIRTUAL_QUERY */
592 unsigned int status; /* status returned by call */
593 client_ptr_t base; /* resulting base address */
594 client_ptr_t alloc_base;/* resulting allocation base */
595 mem_size_t size; /* resulting region size */
596 unsigned short state; /* resulting region state */
597 unsigned short prot; /* resulting region protection */
598 unsigned short alloc_prot;/* resulting allocation protection */
599 unsigned short alloc_type;/* resulting region allocation type */
600 } virtual_query;
601 struct
603 enum apc_type type; /* APC_VIRTUAL_PROTECT */
604 unsigned int status; /* status returned by call */
605 client_ptr_t addr; /* resulting address */
606 mem_size_t size; /* resulting size */
607 unsigned int prot; /* old protection flags */
608 } virtual_protect;
609 struct
611 enum apc_type type; /* APC_VIRTUAL_FLUSH */
612 unsigned int status; /* status returned by call */
613 client_ptr_t addr; /* resulting address */
614 mem_size_t size; /* resulting size */
615 } virtual_flush;
616 struct
618 enum apc_type type; /* APC_VIRTUAL_LOCK */
619 unsigned int status; /* status returned by call */
620 client_ptr_t addr; /* resulting address */
621 mem_size_t size; /* resulting size */
622 } virtual_lock;
623 struct
625 enum apc_type type; /* APC_VIRTUAL_UNLOCK */
626 unsigned int status; /* status returned by call */
627 client_ptr_t addr; /* resulting address */
628 mem_size_t size; /* resulting size */
629 } virtual_unlock;
630 struct
632 enum apc_type type; /* APC_MAP_VIEW */
633 unsigned int status; /* status returned by call */
634 client_ptr_t addr; /* resulting address */
635 mem_size_t size; /* resulting size */
636 } map_view;
637 struct
639 enum apc_type type; /* APC_MAP_VIEW */
640 unsigned int status; /* status returned by call */
641 } unmap_view;
642 struct
644 enum apc_type type; /* APC_CREATE_THREAD */
645 unsigned int status; /* status returned by call */
646 thread_id_t tid; /* thread id */
647 obj_handle_t handle; /* handle to new thread */
648 } create_thread;
649 } apc_result_t;
651 typedef union
653 unsigned int major; /* irp major function */
654 struct
656 unsigned int major; /* IRP_MJ_CREATE */
657 unsigned int access; /* access rights */
658 unsigned int sharing; /* sharing flags */
659 unsigned int options; /* file options */
660 client_ptr_t device; /* opaque ptr for the device */
661 } create;
662 struct
664 unsigned int major; /* IRP_MJ_CLOSE */
665 int __pad;
666 client_ptr_t file; /* opaque ptr for the file object */
667 } close;
668 struct
670 unsigned int major; /* IRP_MJ_READ */
671 unsigned int key; /* driver key */
672 client_ptr_t file; /* opaque ptr for the file object */
673 file_pos_t pos; /* file position */
674 } read;
675 struct
677 unsigned int major; /* IRP_MJ_WRITE */
678 unsigned int key; /* driver key */
679 client_ptr_t file; /* opaque ptr for the file object */
680 file_pos_t pos; /* file position */
681 } write;
682 struct
684 unsigned int major; /* IRP_MJ_FLUSH_BUFFERS */
685 int __pad;
686 client_ptr_t file; /* opaque ptr for the file object */
687 } flush;
688 struct
690 unsigned int major; /* IRP_MJ_DEVICE_CONTROL */
691 ioctl_code_t code; /* ioctl code */
692 client_ptr_t file; /* opaque ptr for the file object */
693 } ioctl;
694 } irp_params_t;
696 struct rawinput_device
698 unsigned short usage_page;
699 unsigned short usage;
700 unsigned int flags;
701 user_handle_t target;
704 /****************************************************************/
705 /* Request declarations */
707 /* Create a new process from the context of the parent */
708 @REQ(new_process)
709 int inherit_all; /* inherit all handles from parent */
710 unsigned int create_flags; /* creation flags */
711 int socket_fd; /* file descriptor for process socket */
712 obj_handle_t exe_file; /* file handle for main exe */
713 unsigned int process_access; /* access rights for process object */
714 unsigned int process_attr; /* attributes for process object */
715 unsigned int thread_access; /* access rights for thread object */
716 unsigned int thread_attr; /* attributes for thread object */
717 cpu_type_t cpu; /* CPU that the new process will use */
718 data_size_t info_size; /* size of startup info */
719 VARARG(info,startup_info,info_size); /* startup information */
720 VARARG(env,unicode_str); /* environment for new process */
721 @REPLY
722 obj_handle_t info; /* new process info handle */
723 process_id_t pid; /* process id */
724 obj_handle_t phandle; /* process handle (in the current process) */
725 thread_id_t tid; /* thread id */
726 obj_handle_t thandle; /* thread handle (in the current process) */
727 @END
730 /* Retrieve information about a newly started process */
731 @REQ(get_new_process_info)
732 obj_handle_t info; /* info handle returned from new_process_request */
733 @REPLY
734 int success; /* did the process start successfully? */
735 int exit_code; /* process exit code if failed */
736 @END
739 /* Create a new thread from the context of the parent */
740 @REQ(new_thread)
741 unsigned int access; /* wanted access rights */
742 unsigned int attributes; /* object attributes */
743 int suspend; /* new thread should be suspended on creation */
744 int request_fd; /* fd for request pipe */
745 @REPLY
746 thread_id_t tid; /* thread id */
747 obj_handle_t handle; /* thread handle (in the current process) */
748 @END
751 /* Retrieve the new process startup info */
752 @REQ(get_startup_info)
753 @REPLY
754 obj_handle_t exe_file; /* file handle for main exe */
755 data_size_t info_size; /* size of startup info */
756 VARARG(info,startup_info,info_size); /* startup information */
757 VARARG(env,unicode_str); /* environment */
758 @END
761 /* Signal the end of the process initialization */
762 @REQ(init_process_done)
763 int gui; /* is it a GUI process? */
764 mod_handle_t module; /* main module base address */
765 client_ptr_t ldt_copy; /* address of LDT copy (in thread address space) */
766 client_ptr_t entry; /* process entry point */
767 @END
770 /* Initialize a thread; called from the child after fork()/clone() */
771 @REQ(init_thread)
772 int unix_pid; /* Unix pid of new thread */
773 int unix_tid; /* Unix tid of new thread */
774 int debug_level; /* new debug level */
775 client_ptr_t teb; /* TEB of new thread (in thread address space) */
776 client_ptr_t entry; /* entry point or PEB if initial thread (in thread address space) */
777 int reply_fd; /* fd for reply pipe */
778 int wait_fd; /* fd for blocking calls pipe */
779 cpu_type_t cpu; /* CPU that this thread is running on */
780 @REPLY
781 process_id_t pid; /* process id of the new thread's process */
782 thread_id_t tid; /* thread id of the new thread */
783 timeout_t server_start; /* server start time */
784 data_size_t info_size; /* total size of startup info */
785 int version; /* protocol version */
786 unsigned int all_cpus; /* bitset of supported CPUs */
787 @END
790 /* Terminate a process */
791 @REQ(terminate_process)
792 obj_handle_t handle; /* process handle to terminate */
793 int exit_code; /* process exit code */
794 @REPLY
795 int self; /* suicide? */
796 @END
799 /* Terminate a thread */
800 @REQ(terminate_thread)
801 obj_handle_t handle; /* thread handle to terminate */
802 int exit_code; /* thread exit code */
803 @REPLY
804 int self; /* suicide? */
805 int last; /* last thread in this process? */
806 @END
809 /* Retrieve information about a process */
810 @REQ(get_process_info)
811 obj_handle_t handle; /* process handle */
812 @REPLY
813 process_id_t pid; /* server process id */
814 process_id_t ppid; /* server process id of parent */
815 affinity_t affinity; /* process affinity mask */
816 client_ptr_t peb; /* PEB address in process address space */
817 timeout_t start_time; /* process start time */
818 timeout_t end_time; /* process end time */
819 int exit_code; /* process exit code */
820 int priority; /* priority class */
821 cpu_type_t cpu; /* CPU that this process is running on */
822 short int debugger_present; /* process is being debugged */
823 short int debug_children; /* inherit debugger to child processes */
824 @END
827 /* Set a process information */
828 @REQ(set_process_info)
829 obj_handle_t handle; /* process handle */
830 int mask; /* setting mask (see below) */
831 int priority; /* priority class */
832 affinity_t affinity; /* affinity mask */
833 @END
834 #define SET_PROCESS_INFO_PRIORITY 0x01
835 #define SET_PROCESS_INFO_AFFINITY 0x02
838 /* Retrieve information about a thread */
839 @REQ(get_thread_info)
840 obj_handle_t handle; /* thread handle */
841 thread_id_t tid_in; /* thread id (optional) */
842 @REPLY
843 process_id_t pid; /* server process id */
844 thread_id_t tid; /* server thread id */
845 client_ptr_t teb; /* thread teb pointer */
846 client_ptr_t entry_point; /* thread entry point */
847 affinity_t affinity; /* thread affinity mask */
848 int exit_code; /* thread exit code */
849 int priority; /* thread priority level */
850 int last; /* last thread in process */
851 @END
854 /* Retrieve information about thread times */
855 @REQ(get_thread_times)
856 obj_handle_t handle; /* thread handle */
857 @REPLY
858 timeout_t creation_time; /* thread creation time */
859 timeout_t exit_time; /* thread exit time */
860 @END
863 /* Set a thread information */
864 @REQ(set_thread_info)
865 obj_handle_t handle; /* thread handle */
866 int mask; /* setting mask (see below) */
867 int priority; /* priority class */
868 affinity_t affinity; /* affinity mask */
869 client_ptr_t entry_point; /* thread entry point */
870 obj_handle_t token; /* impersonation token */
871 @END
872 #define SET_THREAD_INFO_PRIORITY 0x01
873 #define SET_THREAD_INFO_AFFINITY 0x02
874 #define SET_THREAD_INFO_TOKEN 0x04
875 #define SET_THREAD_INFO_ENTRYPOINT 0x08
878 /* Retrieve information about a module */
879 @REQ(get_dll_info)
880 obj_handle_t handle; /* process handle */
881 mod_handle_t base_address; /* base address of module */
882 @REPLY
883 client_ptr_t entry_point;
884 data_size_t size; /* module size */
885 data_size_t filename_len; /* buffer len in bytes required to store filename */
886 VARARG(filename,unicode_str); /* file name of module */
887 @END
890 /* Suspend a thread */
891 @REQ(suspend_thread)
892 obj_handle_t handle; /* thread handle */
893 @REPLY
894 int count; /* new suspend count */
895 @END
898 /* Resume a thread */
899 @REQ(resume_thread)
900 obj_handle_t handle; /* thread handle */
901 @REPLY
902 int count; /* new suspend count */
903 @END
906 /* Notify the server that a dll has been loaded */
907 @REQ(load_dll)
908 obj_handle_t mapping; /* file mapping handle */
909 mod_handle_t base; /* base address */
910 client_ptr_t name; /* ptr to ptr to name (in process addr space) */
911 data_size_t size; /* dll size */
912 int dbg_offset; /* debug info offset */
913 int dbg_size; /* debug info size */
914 VARARG(filename,unicode_str); /* file name of dll */
915 @END
918 /* Notify the server that a dll is being unloaded */
919 @REQ(unload_dll)
920 mod_handle_t base; /* base address */
921 @END
924 /* Queue an APC for a thread or process */
925 @REQ(queue_apc)
926 obj_handle_t handle; /* thread or process handle */
927 apc_call_t call; /* call arguments */
928 @REPLY
929 obj_handle_t handle; /* APC handle */
930 int self; /* run APC in caller itself? */
931 @END
934 /* Get the result of an APC call */
935 @REQ(get_apc_result)
936 obj_handle_t handle; /* handle to the APC */
937 @REPLY
938 apc_result_t result; /* result of the APC */
939 @END
942 /* Close a handle for the current process */
943 @REQ(close_handle)
944 obj_handle_t handle; /* handle to close */
945 @END
948 /* Set a handle information */
949 @REQ(set_handle_info)
950 obj_handle_t handle; /* handle we are interested in */
951 int flags; /* new handle flags */
952 int mask; /* mask for flags to set */
953 @REPLY
954 int old_flags; /* old flag value */
955 @END
958 /* Duplicate a handle */
959 @REQ(dup_handle)
960 obj_handle_t src_process; /* src process handle */
961 obj_handle_t src_handle; /* src handle to duplicate */
962 obj_handle_t dst_process; /* dst process handle */
963 unsigned int access; /* wanted access rights */
964 unsigned int attributes; /* object attributes */
965 unsigned int options; /* duplicate options (see below) */
966 @REPLY
967 obj_handle_t handle; /* duplicated handle in dst process */
968 int self; /* is the source the current process? */
969 int closed; /* whether the source handle has been closed */
970 @END
971 #define DUP_HANDLE_CLOSE_SOURCE DUPLICATE_CLOSE_SOURCE
972 #define DUP_HANDLE_SAME_ACCESS DUPLICATE_SAME_ACCESS
973 #define DUP_HANDLE_MAKE_GLOBAL 0x80000000 /* Not a Windows flag */
976 /* Open a handle to a process */
977 @REQ(open_process)
978 process_id_t pid; /* process id to open */
979 unsigned int access; /* wanted access rights */
980 unsigned int attributes; /* object attributes */
981 @REPLY
982 obj_handle_t handle; /* handle to the process */
983 @END
986 /* Open a handle to a thread */
987 @REQ(open_thread)
988 thread_id_t tid; /* thread id to open */
989 unsigned int access; /* wanted access rights */
990 unsigned int attributes; /* object attributes */
991 @REPLY
992 obj_handle_t handle; /* handle to the thread */
993 @END
996 /* Wait for handles */
997 @REQ(select)
998 int flags; /* wait flags (see below) */
999 client_ptr_t cookie; /* magic cookie to return to client */
1000 timeout_t timeout; /* timeout */
1001 obj_handle_t prev_apc; /* handle to previous APC */
1002 VARARG(result,apc_result); /* result of previous APC */
1003 VARARG(data,select_op); /* operation-specific data */
1004 @REPLY
1005 timeout_t timeout; /* timeout converted to absolute */
1006 apc_call_t call; /* APC call arguments */
1007 obj_handle_t apc_handle; /* handle to next APC */
1008 @END
1009 #define SELECT_ALERTABLE 1
1010 #define SELECT_INTERRUPTIBLE 2
1013 /* Create an event */
1014 @REQ(create_event)
1015 unsigned int access; /* wanted access rights */
1016 int manual_reset; /* manual reset event */
1017 int initial_state; /* initial state of the event */
1018 VARARG(objattr,object_attributes); /* object attributes */
1019 @REPLY
1020 obj_handle_t handle; /* handle to the event */
1021 @END
1023 /* Event operation */
1024 @REQ(event_op)
1025 obj_handle_t handle; /* handle to event */
1026 int op; /* event operation (see below) */
1027 @END
1028 enum event_op { PULSE_EVENT, SET_EVENT, RESET_EVENT };
1030 @REQ(query_event)
1031 obj_handle_t handle; /* handle to event */
1032 @REPLY
1033 int manual_reset; /* manual reset event */
1034 int state; /* current state of the event */
1035 @END
1037 /* Open an event */
1038 @REQ(open_event)
1039 unsigned int access; /* wanted access rights */
1040 unsigned int attributes; /* object attributes */
1041 obj_handle_t rootdir; /* root directory */
1042 VARARG(name,unicode_str); /* object name */
1043 @REPLY
1044 obj_handle_t handle; /* handle to the event */
1045 @END
1048 /* Create a keyed event */
1049 @REQ(create_keyed_event)
1050 unsigned int access; /* wanted access rights */
1051 VARARG(objattr,object_attributes); /* object attributes */
1052 @REPLY
1053 obj_handle_t handle; /* handle to the event */
1054 @END
1056 /* Open a keyed event */
1057 @REQ(open_keyed_event)
1058 unsigned int access; /* wanted access rights */
1059 unsigned int attributes; /* object attributes */
1060 obj_handle_t rootdir; /* root directory */
1061 VARARG(name,unicode_str); /* object name */
1062 @REPLY
1063 obj_handle_t handle; /* handle to the event */
1064 @END
1067 /* Create a mutex */
1068 @REQ(create_mutex)
1069 unsigned int access; /* wanted access rights */
1070 int owned; /* initially owned? */
1071 VARARG(objattr,object_attributes); /* object attributes */
1072 @REPLY
1073 obj_handle_t handle; /* handle to the mutex */
1074 @END
1077 /* Release a mutex */
1078 @REQ(release_mutex)
1079 obj_handle_t handle; /* handle to the mutex */
1080 @REPLY
1081 unsigned int prev_count; /* value of internal counter, before release */
1082 @END
1085 /* Open a mutex */
1086 @REQ(open_mutex)
1087 unsigned int access; /* wanted access rights */
1088 unsigned int attributes; /* object attributes */
1089 obj_handle_t rootdir; /* root directory */
1090 VARARG(name,unicode_str); /* object name */
1091 @REPLY
1092 obj_handle_t handle; /* handle to the mutex */
1093 @END
1096 /* Query a mutex */
1097 @REQ(query_mutex)
1098 obj_handle_t handle; /* handle to mutex */
1099 @REPLY
1100 unsigned int count; /* current count of mutex */
1101 int owned; /* true if owned by current thread */
1102 int abandoned; /* true if abandoned */
1103 @END
1106 /* Create a semaphore */
1107 @REQ(create_semaphore)
1108 unsigned int access; /* wanted access rights */
1109 unsigned int initial; /* initial count */
1110 unsigned int max; /* maximum count */
1111 VARARG(objattr,object_attributes); /* object attributes */
1112 @REPLY
1113 obj_handle_t handle; /* handle to the semaphore */
1114 @END
1117 /* Release a semaphore */
1118 @REQ(release_semaphore)
1119 obj_handle_t handle; /* handle to the semaphore */
1120 unsigned int count; /* count to add to semaphore */
1121 @REPLY
1122 unsigned int prev_count; /* previous semaphore count */
1123 @END
1125 @REQ(query_semaphore)
1126 obj_handle_t handle; /* handle to the semaphore */
1127 @REPLY
1128 unsigned int current; /* current count */
1129 unsigned int max; /* maximum count */
1130 @END
1132 /* Open a semaphore */
1133 @REQ(open_semaphore)
1134 unsigned int access; /* wanted access rights */
1135 unsigned int attributes; /* object attributes */
1136 obj_handle_t rootdir; /* root directory */
1137 VARARG(name,unicode_str); /* object name */
1138 @REPLY
1139 obj_handle_t handle; /* handle to the semaphore */
1140 @END
1143 /* Create a file */
1144 @REQ(create_file)
1145 unsigned int access; /* wanted access rights */
1146 unsigned int sharing; /* sharing flags */
1147 int create; /* file create action */
1148 unsigned int options; /* file options */
1149 unsigned int attrs; /* file attributes for creation */
1150 VARARG(objattr,object_attributes); /* object attributes */
1151 VARARG(filename,string); /* file name */
1152 @REPLY
1153 obj_handle_t handle; /* handle to the file */
1154 @END
1157 /* Open a file object */
1158 @REQ(open_file_object)
1159 unsigned int access; /* wanted access rights */
1160 unsigned int attributes; /* open attributes */
1161 obj_handle_t rootdir; /* root directory */
1162 unsigned int sharing; /* sharing flags */
1163 unsigned int options; /* file options */
1164 VARARG(filename,unicode_str); /* file name */
1165 @REPLY
1166 obj_handle_t handle; /* handle to the file */
1167 @END
1170 /* Allocate a file handle for a Unix fd */
1171 @REQ(alloc_file_handle)
1172 unsigned int access; /* wanted access rights */
1173 unsigned int attributes; /* object attributes */
1174 int fd; /* file descriptor on the client side */
1175 @REPLY
1176 obj_handle_t handle; /* handle to the file */
1177 @END
1180 /* Get the Unix name from a file handle */
1181 @REQ(get_handle_unix_name)
1182 obj_handle_t handle; /* file handle */
1183 @REPLY
1184 data_size_t name_len; /* unix name length */
1185 VARARG(name,string); /* unix name */
1186 @END
1189 /* Get a Unix fd to access a file */
1190 @REQ(get_handle_fd)
1191 obj_handle_t handle; /* handle to the file */
1192 @REPLY
1193 int type; /* file type (see below) */
1194 int cacheable; /* can fd be cached in the client? */
1195 unsigned int access; /* file access rights */
1196 unsigned int options; /* file open options */
1197 @END
1198 enum server_fd_type
1200 FD_TYPE_INVALID, /* invalid file (no associated fd) */
1201 FD_TYPE_FILE, /* regular file */
1202 FD_TYPE_DIR, /* directory */
1203 FD_TYPE_SOCKET, /* socket */
1204 FD_TYPE_SERIAL, /* serial port */
1205 FD_TYPE_PIPE, /* named pipe */
1206 FD_TYPE_MAILSLOT, /* mailslot */
1207 FD_TYPE_CHAR, /* unspecified char device */
1208 FD_TYPE_DEVICE, /* Windows device file */
1209 FD_TYPE_NB_TYPES
1213 /* Retrieve (or allocate) the client-side directory cache entry */
1214 @REQ(get_directory_cache_entry)
1215 obj_handle_t handle; /* handle to the directory */
1216 @REPLY
1217 int entry; /* cache entry on the client side */
1218 VARARG(free,ints); /* entries that can be freed */
1219 @END
1222 /* Flush a file buffers */
1223 @REQ(flush)
1224 int blocking; /* whether it's a blocking flush */
1225 async_data_t async; /* async I/O parameters */
1226 @REPLY
1227 obj_handle_t event; /* event set when finished */
1228 @END
1231 /* Lock a region of a file */
1232 @REQ(lock_file)
1233 obj_handle_t handle; /* handle to the file */
1234 file_pos_t offset; /* offset of start of lock */
1235 file_pos_t count; /* count of bytes to lock */
1236 int shared; /* shared or exclusive lock? */
1237 int wait; /* do we want to wait? */
1238 @REPLY
1239 obj_handle_t handle; /* handle to wait on */
1240 int overlapped; /* is it an overlapped I/O handle? */
1241 @END
1244 /* Unlock a region of a file */
1245 @REQ(unlock_file)
1246 obj_handle_t handle; /* handle to the file */
1247 file_pos_t offset; /* offset of start of unlock */
1248 file_pos_t count; /* count of bytes to unlock */
1249 @END
1252 /* Create a socket */
1253 @REQ(create_socket)
1254 unsigned int access; /* wanted access rights */
1255 unsigned int attributes; /* object attributes */
1256 int family; /* family, see socket manpage */
1257 int type; /* type, see socket manpage */
1258 int protocol; /* protocol, see socket manpage */
1259 unsigned int flags; /* socket flags */
1260 @REPLY
1261 obj_handle_t handle; /* handle to the new socket */
1262 @END
1265 /* Accept a socket */
1266 @REQ(accept_socket)
1267 obj_handle_t lhandle; /* handle to the listening socket */
1268 unsigned int access; /* wanted access rights */
1269 unsigned int attributes; /* object attributes */
1270 @REPLY
1271 obj_handle_t handle; /* handle to the new socket */
1272 @END
1275 /* Accept into an initialized socket */
1276 @REQ(accept_into_socket)
1277 obj_handle_t lhandle; /* handle to the listening socket */
1278 obj_handle_t ahandle; /* handle to the accepting socket */
1279 @END
1282 /* Set socket event parameters */
1283 @REQ(set_socket_event)
1284 obj_handle_t handle; /* handle to the socket */
1285 unsigned int mask; /* event mask */
1286 obj_handle_t event; /* event object */
1287 user_handle_t window; /* window to send the message to */
1288 unsigned int msg; /* message to send */
1289 @END
1292 /* Get socket event parameters */
1293 @REQ(get_socket_event)
1294 obj_handle_t handle; /* handle to the socket */
1295 int service; /* clear pending? */
1296 obj_handle_t c_event; /* event to clear */
1297 @REPLY
1298 unsigned int mask; /* event mask */
1299 unsigned int pmask; /* pending events */
1300 unsigned int state; /* status bits */
1301 VARARG(errors,ints); /* event errors */
1302 @END
1305 /* Get socket info */
1306 @REQ(get_socket_info)
1307 obj_handle_t handle; /* handle to the socket */
1308 @REPLY
1309 int family; /* family, see socket manpage */
1310 int type; /* type, see socket manpage */
1311 int protocol; /* protocol, see socket manpage */
1312 @END
1315 /* Re-enable pending socket events */
1316 @REQ(enable_socket_event)
1317 obj_handle_t handle; /* handle to the socket */
1318 unsigned int mask; /* events to re-enable */
1319 unsigned int sstate; /* status bits to set */
1320 unsigned int cstate; /* status bits to clear */
1321 @END
1323 @REQ(set_socket_deferred)
1324 obj_handle_t handle; /* handle to the socket */
1325 obj_handle_t deferred; /* handle to the socket for which accept() is deferred */
1326 @END
1328 /* Allocate a console (only used by a console renderer) */
1329 @REQ(alloc_console)
1330 unsigned int access; /* wanted access rights */
1331 unsigned int attributes; /* object attributes */
1332 process_id_t pid; /* pid of process which shall be attached to the console */
1333 int input_fd; /* if pid=-1 (bare console to current process), fd for input */
1334 @REPLY
1335 obj_handle_t handle_in; /* handle to console input */
1336 obj_handle_t event; /* handle to renderer events change notification */
1337 @END
1340 /* Free the console of the current process */
1341 @REQ(free_console)
1342 @END
1345 #define CONSOLE_RENDERER_NONE_EVENT 0x00
1346 #define CONSOLE_RENDERER_TITLE_EVENT 0x01
1347 #define CONSOLE_RENDERER_ACTIVE_SB_EVENT 0x02
1348 #define CONSOLE_RENDERER_SB_RESIZE_EVENT 0x03
1349 #define CONSOLE_RENDERER_UPDATE_EVENT 0x04
1350 #define CONSOLE_RENDERER_CURSOR_POS_EVENT 0x05
1351 #define CONSOLE_RENDERER_CURSOR_GEOM_EVENT 0x06
1352 #define CONSOLE_RENDERER_DISPLAY_EVENT 0x07
1353 #define CONSOLE_RENDERER_EXIT_EVENT 0x08
1354 struct console_renderer_event
1356 short event;
1357 union
1359 struct update
1361 short top;
1362 short bottom;
1363 } update;
1364 struct resize
1366 short width;
1367 short height;
1368 } resize;
1369 struct cursor_pos
1371 short x;
1372 short y;
1373 } cursor_pos;
1374 struct cursor_geom
1376 short visible;
1377 short size;
1378 } cursor_geom;
1379 struct display
1381 short left;
1382 short top;
1383 short width;
1384 short height;
1385 } display;
1386 } u;
1389 /* retrieve console events for the renderer */
1390 @REQ(get_console_renderer_events)
1391 obj_handle_t handle; /* handle to console input events */
1392 @REPLY
1393 VARARG(data,bytes); /* the various console_renderer_events */
1394 @END
1397 /* Open a handle to the process console */
1398 @REQ(open_console)
1399 obj_handle_t from; /* 0 (resp 1) input (resp output) of current process console */
1400 /* otherwise console_in handle to get active screen buffer? */
1401 unsigned int access; /* wanted access rights */
1402 unsigned int attributes; /* object attributes */
1403 int share; /* share mask (only for output handles) */
1404 @REPLY
1405 obj_handle_t handle; /* handle to the console */
1406 @END
1409 /* Get the input queue wait event */
1410 @REQ(get_console_wait_event)
1411 @REPLY
1412 obj_handle_t handle;
1413 @END
1415 /* Get a console mode (input or output) */
1416 @REQ(get_console_mode)
1417 obj_handle_t handle; /* handle to the console */
1418 @REPLY
1419 int mode; /* console mode */
1420 @END
1423 /* Set a console mode (input or output) */
1424 @REQ(set_console_mode)
1425 obj_handle_t handle; /* handle to the console */
1426 int mode; /* console mode */
1427 @END
1430 /* Set info about a console (input only) */
1431 @REQ(set_console_input_info)
1432 obj_handle_t handle; /* handle to console input, or 0 for process' console */
1433 int mask; /* setting mask (see below) */
1434 obj_handle_t active_sb; /* active screen buffer */
1435 int history_mode; /* whether we duplicate lines in history */
1436 int history_size; /* number of lines in history */
1437 int edition_mode; /* index to the edition mode flavors */
1438 int input_cp; /* console input codepage */
1439 int output_cp; /* console output codepage */
1440 user_handle_t win; /* console window if backend supports it */
1441 VARARG(title,unicode_str); /* console title */
1442 @END
1443 #define SET_CONSOLE_INPUT_INFO_ACTIVE_SB 0x01
1444 #define SET_CONSOLE_INPUT_INFO_TITLE 0x02
1445 #define SET_CONSOLE_INPUT_INFO_HISTORY_MODE 0x04
1446 #define SET_CONSOLE_INPUT_INFO_HISTORY_SIZE 0x08
1447 #define SET_CONSOLE_INPUT_INFO_EDITION_MODE 0x10
1448 #define SET_CONSOLE_INPUT_INFO_INPUT_CODEPAGE 0x20
1449 #define SET_CONSOLE_INPUT_INFO_OUTPUT_CODEPAGE 0x40
1450 #define SET_CONSOLE_INPUT_INFO_WIN 0x80
1453 /* Get info about a console (input only) */
1454 @REQ(get_console_input_info)
1455 obj_handle_t handle; /* handle to console input, or 0 for process' console */
1456 @REPLY
1457 int history_mode; /* whether we duplicate lines in history */
1458 int history_size; /* number of lines in history */
1459 int history_index; /* number of used lines in history */
1460 int edition_mode; /* index to the edition mode flavors */
1461 int input_cp; /* console input codepage */
1462 int output_cp; /* console output codepage */
1463 user_handle_t win; /* console window if backend supports it */
1464 VARARG(title,unicode_str); /* console title */
1465 @END
1468 /* appends a string to console's history */
1469 @REQ(append_console_input_history)
1470 obj_handle_t handle; /* handle to console input, or 0 for process' console */
1471 VARARG(line,unicode_str); /* line to add */
1472 @END
1475 /* appends a string to console's history */
1476 @REQ(get_console_input_history)
1477 obj_handle_t handle; /* handle to console input, or 0 for process' console */
1478 int index; /* index to get line from */
1479 @REPLY
1480 int total; /* total length of line in Unicode chars */
1481 VARARG(line,unicode_str); /* line to add */
1482 @END
1485 /* creates a new screen buffer on process' console */
1486 @REQ(create_console_output)
1487 obj_handle_t handle_in; /* handle to console input, or 0 for process' console */
1488 unsigned int access; /* wanted access rights */
1489 unsigned int attributes; /* object attributes */
1490 unsigned int share; /* sharing credentials */
1491 int fd; /* for bare consoles, fd the screen-buffer is attached to */
1492 @REPLY
1493 obj_handle_t handle_out; /* handle to the screen buffer */
1494 @END
1497 /* Set info about a console (output only) */
1498 @REQ(set_console_output_info)
1499 obj_handle_t handle; /* handle to the console */
1500 int mask; /* setting mask (see below) */
1501 short int cursor_size; /* size of cursor (percentage filled) */
1502 short int cursor_visible;/* cursor visibility flag */
1503 short int cursor_x; /* position of cursor (x, y) */
1504 short int cursor_y;
1505 short int width; /* width of the screen buffer */
1506 short int height; /* height of the screen buffer */
1507 short int attr; /* default attribute */
1508 short int win_left; /* window actually displayed by renderer */
1509 short int win_top; /* the rect area is expressed within the */
1510 short int win_right; /* boundaries of the screen buffer */
1511 short int win_bottom;
1512 short int max_width; /* maximum size (width x height) for the window */
1513 short int max_height;
1514 short int font_width; /* font size (width x height) */
1515 short int font_height;
1516 @END
1517 #define SET_CONSOLE_OUTPUT_INFO_CURSOR_GEOM 0x01
1518 #define SET_CONSOLE_OUTPUT_INFO_CURSOR_POS 0x02
1519 #define SET_CONSOLE_OUTPUT_INFO_SIZE 0x04
1520 #define SET_CONSOLE_OUTPUT_INFO_ATTR 0x08
1521 #define SET_CONSOLE_OUTPUT_INFO_DISPLAY_WINDOW 0x10
1522 #define SET_CONSOLE_OUTPUT_INFO_MAX_SIZE 0x20
1523 #define SET_CONSOLE_OUTPUT_INFO_FONT 0x40
1526 /* Get info about a console (output only) */
1527 @REQ(get_console_output_info)
1528 obj_handle_t handle; /* handle to the console */
1529 @REPLY
1530 short int cursor_size; /* size of cursor (percentage filled) */
1531 short int cursor_visible;/* cursor visibility flag */
1532 short int cursor_x; /* position of cursor (x, y) */
1533 short int cursor_y;
1534 short int width; /* width of the screen buffer */
1535 short int height; /* height of the screen buffer */
1536 short int attr; /* default attribute */
1537 short int win_left; /* window actually displayed by renderer */
1538 short int win_top; /* the rect area is expressed within the */
1539 short int win_right; /* boundaries of the screen buffer */
1540 short int win_bottom;
1541 short int max_width; /* maximum size (width x height) for the window */
1542 short int max_height;
1543 short int font_width; /* font size (width x height) */
1544 short int font_height;
1545 @END
1547 /* Add input records to a console input queue */
1548 @REQ(write_console_input)
1549 obj_handle_t handle; /* handle to the console input */
1550 VARARG(rec,input_records); /* input records */
1551 @REPLY
1552 int written; /* number of records written */
1553 @END
1556 /* Fetch input records from a console input queue */
1557 @REQ(read_console_input)
1558 obj_handle_t handle; /* handle to the console input */
1559 int flush; /* flush the retrieved records from the queue? */
1560 @REPLY
1561 int read; /* number of records read */
1562 VARARG(rec,input_records); /* input records */
1563 @END
1566 /* write data (chars and/or attributes) in a screen buffer */
1567 @REQ(write_console_output)
1568 obj_handle_t handle; /* handle to the console output */
1569 int x; /* position where to start writing */
1570 int y;
1571 int mode; /* char info (see below) */
1572 int wrap; /* wrap around at end of line? */
1573 VARARG(data,bytes); /* info to write */
1574 @REPLY
1575 int written; /* number of char infos actually written */
1576 int width; /* width of screen buffer */
1577 int height; /* height of screen buffer */
1578 @END
1579 enum char_info_mode
1581 CHAR_INFO_MODE_TEXT, /* characters only */
1582 CHAR_INFO_MODE_ATTR, /* attributes only */
1583 CHAR_INFO_MODE_TEXTATTR, /* both characters and attributes */
1584 CHAR_INFO_MODE_TEXTSTDATTR /* characters but use standard attributes */
1588 /* fill a screen buffer with constant data (chars and/or attributes) */
1589 @REQ(fill_console_output)
1590 obj_handle_t handle; /* handle to the console output */
1591 int x; /* position where to start writing */
1592 int y;
1593 int mode; /* char info mode */
1594 int count; /* number to write */
1595 int wrap; /* wrap around at end of line? */
1596 char_info_t data; /* data to write */
1597 @REPLY
1598 int written; /* number of char infos actually written */
1599 @END
1602 /* read data (chars and/or attributes) from a screen buffer */
1603 @REQ(read_console_output)
1604 obj_handle_t handle; /* handle to the console output */
1605 int x; /* position (x,y) where to start reading */
1606 int y;
1607 int mode; /* char info mode */
1608 int wrap; /* wrap around at end of line? */
1609 @REPLY
1610 int width; /* width of screen buffer */
1611 int height; /* height of screen buffer */
1612 VARARG(data,bytes);
1613 @END
1616 /* move a rect (of data) in screen buffer content */
1617 @REQ(move_console_output)
1618 obj_handle_t handle; /* handle to the console output */
1619 short int x_src; /* position (x, y) of rect to start moving from */
1620 short int y_src;
1621 short int x_dst; /* position (x, y) of rect to move to */
1622 short int y_dst;
1623 short int w; /* size of the rect (width, height) to move */
1624 short int h;
1625 @END
1628 /* Sends a signal to a process group */
1629 @REQ(send_console_signal)
1630 int signal; /* the signal to send */
1631 process_id_t group_id; /* the group to send the signal to */
1632 @END
1635 /* enable directory change notifications */
1636 @REQ(read_directory_changes)
1637 unsigned int filter; /* notification filter */
1638 int subtree; /* watch the subtree? */
1639 int want_data; /* flag indicating whether change data should be collected */
1640 async_data_t async; /* async I/O parameters */
1641 @END
1644 @REQ(read_change)
1645 obj_handle_t handle;
1646 @REPLY
1647 VARARG(events,filesystem_event); /* collected filesystem events */
1648 @END
1651 /* Create a file mapping */
1652 @REQ(create_mapping)
1653 unsigned int access; /* wanted access rights */
1654 unsigned int protect; /* protection flags (see below) */
1655 mem_size_t size; /* mapping size */
1656 obj_handle_t file_handle; /* file handle */
1657 VARARG(objattr,object_attributes); /* object attributes */
1658 @REPLY
1659 obj_handle_t handle; /* handle to the mapping */
1660 @END
1661 /* per-page protection flags */
1662 #define VPROT_READ 0x01
1663 #define VPROT_WRITE 0x02
1664 #define VPROT_EXEC 0x04
1665 #define VPROT_WRITECOPY 0x08
1666 #define VPROT_GUARD 0x10
1667 #define VPROT_NOCACHE 0x20
1668 #define VPROT_COMMITTED 0x40
1669 #define VPROT_WRITEWATCH 0x80
1670 /* per-mapping protection flags */
1671 #define VPROT_IMAGE 0x0100 /* mapping for an exe image */
1672 #define VPROT_SYSTEM 0x0200 /* system view (underlying mmap not under our control) */
1673 #define VPROT_VALLOC 0x0400 /* allocated by VirtualAlloc */
1674 #define VPROT_NOEXEC 0x0800 /* don't force exec permission */
1677 /* Open a mapping */
1678 @REQ(open_mapping)
1679 unsigned int access; /* wanted access rights */
1680 unsigned int attributes; /* object attributes */
1681 obj_handle_t rootdir; /* root directory */
1682 VARARG(name,unicode_str); /* object name */
1683 @REPLY
1684 obj_handle_t handle; /* handle to the mapping */
1685 @END
1688 /* Get information about a file mapping */
1689 @REQ(get_mapping_info)
1690 obj_handle_t handle; /* handle to the mapping */
1691 unsigned int access; /* wanted access rights */
1692 @REPLY
1693 mem_size_t size; /* mapping size */
1694 int protect; /* protection flags */
1695 int header_size; /* header size (for VPROT_IMAGE mapping) */
1696 client_ptr_t base; /* default base addr (for VPROT_IMAGE mapping) */
1697 obj_handle_t mapping; /* duplicate mapping handle unless removable */
1698 obj_handle_t shared_file; /* shared mapping file handle */
1699 @END
1702 /* Get a range of committed pages in a file mapping */
1703 @REQ(get_mapping_committed_range)
1704 obj_handle_t handle; /* handle to the mapping */
1705 file_pos_t offset; /* starting offset (page-aligned, in bytes) */
1706 @REPLY
1707 mem_size_t size; /* size of range starting at offset (page-aligned, in bytes) */
1708 int committed; /* whether it is a committed range */
1709 @END
1712 /* Add a range to the committed pages in a file mapping */
1713 @REQ(add_mapping_committed_range)
1714 obj_handle_t handle; /* handle to the mapping */
1715 file_pos_t offset; /* starting offset (page-aligned, in bytes) */
1716 mem_size_t size; /* size to set (page-aligned, in bytes) or 0 if only retrieving */
1717 @END
1720 #define SNAP_PROCESS 0x00000001
1721 #define SNAP_THREAD 0x00000002
1722 /* Create a snapshot */
1723 @REQ(create_snapshot)
1724 unsigned int attributes; /* object attributes */
1725 unsigned int flags; /* snapshot flags (SNAP_*) */
1726 @REPLY
1727 obj_handle_t handle; /* handle to the snapshot */
1728 @END
1731 /* Get the next process from a snapshot */
1732 @REQ(next_process)
1733 obj_handle_t handle; /* handle to the snapshot */
1734 int reset; /* reset snapshot position? */
1735 @REPLY
1736 int count; /* process usage count */
1737 process_id_t pid; /* process id */
1738 process_id_t ppid; /* parent process id */
1739 int threads; /* number of threads */
1740 int priority; /* process priority */
1741 int handles; /* number of handles */
1742 int unix_pid; /* Unix pid */
1743 VARARG(filename,unicode_str); /* file name of main exe */
1744 @END
1747 /* Get the next thread from a snapshot */
1748 @REQ(next_thread)
1749 obj_handle_t handle; /* handle to the snapshot */
1750 int reset; /* reset snapshot position? */
1751 @REPLY
1752 int count; /* thread usage count */
1753 process_id_t pid; /* process id */
1754 thread_id_t tid; /* thread id */
1755 int base_pri; /* base priority */
1756 int delta_pri; /* delta priority */
1757 @END
1760 /* Wait for a debug event */
1761 @REQ(wait_debug_event)
1762 int get_handle; /* should we alloc a handle for waiting? */
1763 @REPLY
1764 process_id_t pid; /* process id */
1765 thread_id_t tid; /* thread id */
1766 obj_handle_t wait; /* wait handle if no event ready */
1767 VARARG(event,debug_event); /* debug event data */
1768 @END
1771 /* Queue an exception event */
1772 @REQ(queue_exception_event)
1773 int first; /* first chance exception? */
1774 unsigned int code; /* exception code */
1775 unsigned int flags; /* exception flags */
1776 client_ptr_t record; /* exception record */
1777 client_ptr_t address; /* exception address */
1778 data_size_t len; /* size of parameters */
1779 VARARG(params,uints64,len);/* exception parameters */
1780 VARARG(context,context); /* thread context */
1781 @REPLY
1782 obj_handle_t handle; /* handle to the queued event */
1783 @END
1786 /* Retrieve the status of an exception event */
1787 @REQ(get_exception_status)
1788 obj_handle_t handle; /* handle to the queued event */
1789 @REPLY
1790 VARARG(context,context); /* modified thread context */
1791 @END
1794 /* Continue a debug event */
1795 @REQ(continue_debug_event)
1796 process_id_t pid; /* process id to continue */
1797 thread_id_t tid; /* thread id to continue */
1798 int status; /* continuation status */
1799 @END
1802 /* Start/stop debugging an existing process */
1803 @REQ(debug_process)
1804 process_id_t pid; /* id of the process to debug */
1805 int attach; /* 1=attaching / 0=detaching from the process */
1806 @END
1809 /* Simulate a breakpoint in a process */
1810 @REQ(debug_break)
1811 obj_handle_t handle; /* process handle */
1812 @REPLY
1813 int self; /* was it the caller itself? */
1814 @END
1817 /* Set debugger kill on exit flag */
1818 @REQ(set_debugger_kill_on_exit)
1819 int kill_on_exit; /* 0=detach/1=kill debuggee when debugger dies */
1820 @END
1823 /* Read data from a process address space */
1824 @REQ(read_process_memory)
1825 obj_handle_t handle; /* process handle */
1826 client_ptr_t addr; /* addr to read from */
1827 @REPLY
1828 VARARG(data,bytes); /* result data */
1829 @END
1832 /* Write data to a process address space */
1833 @REQ(write_process_memory)
1834 obj_handle_t handle; /* process handle */
1835 client_ptr_t addr; /* addr to write to */
1836 VARARG(data,bytes); /* data to write */
1837 @END
1840 /* Create a registry key */
1841 @REQ(create_key)
1842 unsigned int access; /* desired access rights */
1843 unsigned int options; /* creation options */
1844 VARARG(objattr,object_attributes); /* object attributes */
1845 VARARG(class,unicode_str); /* class name */
1846 @REPLY
1847 obj_handle_t hkey; /* handle to the created key */
1848 int created; /* has it been newly created? */
1849 @END
1851 /* Open a registry key */
1852 @REQ(open_key)
1853 obj_handle_t parent; /* handle to the parent key */
1854 unsigned int access; /* desired access rights */
1855 unsigned int attributes; /* object attributes */
1856 VARARG(name,unicode_str); /* key name */
1857 @REPLY
1858 obj_handle_t hkey; /* handle to the open key */
1859 @END
1862 /* Delete a registry key */
1863 @REQ(delete_key)
1864 obj_handle_t hkey; /* handle to the key */
1865 @END
1868 /* Flush a registry key */
1869 @REQ(flush_key)
1870 obj_handle_t hkey; /* handle to the key */
1871 @END
1874 /* Enumerate registry subkeys */
1875 @REQ(enum_key)
1876 obj_handle_t hkey; /* handle to registry key */
1877 int index; /* index of subkey (or -1 for current key) */
1878 int info_class; /* requested information class */
1879 @REPLY
1880 int subkeys; /* number of subkeys */
1881 int max_subkey; /* longest subkey name */
1882 int max_class; /* longest class name */
1883 int values; /* number of values */
1884 int max_value; /* longest value name */
1885 int max_data; /* longest value data */
1886 timeout_t modif; /* last modification time */
1887 data_size_t total; /* total length needed for full name and class */
1888 data_size_t namelen; /* length of key name in bytes */
1889 VARARG(name,unicode_str,namelen); /* key name */
1890 VARARG(class,unicode_str); /* class name */
1891 @END
1894 /* Set a value of a registry key */
1895 @REQ(set_key_value)
1896 obj_handle_t hkey; /* handle to registry key */
1897 int type; /* value type */
1898 data_size_t namelen; /* length of value name in bytes */
1899 VARARG(name,unicode_str,namelen); /* value name */
1900 VARARG(data,bytes); /* value data */
1901 @END
1904 /* Retrieve the value of a registry key */
1905 @REQ(get_key_value)
1906 obj_handle_t hkey; /* handle to registry key */
1907 VARARG(name,unicode_str); /* value name */
1908 @REPLY
1909 int type; /* value type */
1910 data_size_t total; /* total length needed for data */
1911 VARARG(data,bytes); /* value data */
1912 @END
1915 /* Enumerate a value of a registry key */
1916 @REQ(enum_key_value)
1917 obj_handle_t hkey; /* handle to registry key */
1918 int index; /* value index */
1919 int info_class; /* requested information class */
1920 @REPLY
1921 int type; /* value type */
1922 data_size_t total; /* total length needed for full name and data */
1923 data_size_t namelen; /* length of value name in bytes */
1924 VARARG(name,unicode_str,namelen); /* value name */
1925 VARARG(data,bytes); /* value data */
1926 @END
1929 /* Delete a value of a registry key */
1930 @REQ(delete_key_value)
1931 obj_handle_t hkey; /* handle to registry key */
1932 VARARG(name,unicode_str); /* value name */
1933 @END
1936 /* Load a registry branch from a file */
1937 @REQ(load_registry)
1938 obj_handle_t file; /* file to load from */
1939 VARARG(objattr,object_attributes); /* object attributes */
1940 @END
1943 /* UnLoad a registry branch from a file */
1944 @REQ(unload_registry)
1945 obj_handle_t hkey; /* root key to unload to */
1946 @END
1949 /* Save a registry branch to a file */
1950 @REQ(save_registry)
1951 obj_handle_t hkey; /* key to save */
1952 obj_handle_t file; /* file to save to */
1953 @END
1956 /* Add a registry key change notification */
1957 @REQ(set_registry_notification)
1958 obj_handle_t hkey; /* key to watch for changes */
1959 obj_handle_t event; /* event to set */
1960 int subtree; /* should we watch the whole subtree? */
1961 unsigned int filter; /* things to watch */
1962 @END
1965 /* Create a waitable timer */
1966 @REQ(create_timer)
1967 unsigned int access; /* wanted access rights */
1968 int manual; /* manual reset */
1969 VARARG(objattr,object_attributes); /* object attributes */
1970 @REPLY
1971 obj_handle_t handle; /* handle to the timer */
1972 @END
1975 /* Open a waitable timer */
1976 @REQ(open_timer)
1977 unsigned int access; /* wanted access rights */
1978 unsigned int attributes; /* object attributes */
1979 obj_handle_t rootdir; /* root directory */
1980 VARARG(name,unicode_str); /* object name */
1981 @REPLY
1982 obj_handle_t handle; /* handle to the timer */
1983 @END
1985 /* Set a waitable timer */
1986 @REQ(set_timer)
1987 obj_handle_t handle; /* handle to the timer */
1988 timeout_t expire; /* next expiration absolute time */
1989 client_ptr_t callback; /* callback function */
1990 client_ptr_t arg; /* callback argument */
1991 int period; /* timer period in ms */
1992 @REPLY
1993 int signaled; /* was the timer signaled before this call ? */
1994 @END
1996 /* Cancel a waitable timer */
1997 @REQ(cancel_timer)
1998 obj_handle_t handle; /* handle to the timer */
1999 @REPLY
2000 int signaled; /* was the timer signaled before this calltime ? */
2001 @END
2003 /* Get information on a waitable timer */
2004 @REQ(get_timer_info)
2005 obj_handle_t handle; /* handle to the timer */
2006 @REPLY
2007 timeout_t when; /* absolute time when the timer next expires */
2008 int signaled; /* is the timer signaled? */
2009 @END
2012 /* Retrieve the current context of a thread */
2013 @REQ(get_thread_context)
2014 obj_handle_t handle; /* thread handle */
2015 unsigned int flags; /* context flags */
2016 int suspend; /* suspend the thread if needed */
2017 @REPLY
2018 int self; /* was it a handle to the current thread? */
2019 VARARG(context,context); /* thread context */
2020 @END
2023 /* Set the current context of a thread */
2024 @REQ(set_thread_context)
2025 obj_handle_t handle; /* thread handle */
2026 int suspend; /* suspend the thread if needed */
2027 VARARG(context,context); /* thread context */
2028 @REPLY
2029 int self; /* was it a handle to the current thread? */
2030 @END
2033 /* Fetch a selector entry for a thread */
2034 @REQ(get_selector_entry)
2035 obj_handle_t handle; /* thread handle */
2036 int entry; /* LDT entry */
2037 @REPLY
2038 unsigned int base; /* selector base */
2039 unsigned int limit; /* selector limit */
2040 unsigned char flags; /* selector flags */
2041 @END
2044 /* Add an atom */
2045 @REQ(add_atom)
2046 obj_handle_t table; /* which table to add atom to */
2047 VARARG(name,unicode_str); /* atom name */
2048 @REPLY
2049 atom_t atom; /* resulting atom */
2050 @END
2053 /* Delete an atom */
2054 @REQ(delete_atom)
2055 obj_handle_t table; /* which table to delete atom from */
2056 atom_t atom; /* atom handle */
2057 @END
2060 /* Find an atom */
2061 @REQ(find_atom)
2062 obj_handle_t table; /* which table to find atom from */
2063 VARARG(name,unicode_str); /* atom name */
2064 @REPLY
2065 atom_t atom; /* atom handle */
2066 @END
2069 /* Get information about an atom */
2070 @REQ(get_atom_information)
2071 obj_handle_t table; /* which table to find atom from */
2072 atom_t atom; /* atom handle */
2073 @REPLY
2074 int count; /* atom lock count */
2075 int pinned; /* whether the atom has been pinned */
2076 data_size_t total; /* actual length of atom name */
2077 VARARG(name,unicode_str); /* atom name */
2078 @END
2081 /* Set information about an atom */
2082 @REQ(set_atom_information)
2083 obj_handle_t table; /* which table to find atom from */
2084 atom_t atom; /* atom handle */
2085 int pinned; /* whether to bump atom information */
2086 @END
2089 /* Empty an atom table */
2090 @REQ(empty_atom_table)
2091 obj_handle_t table; /* which table to find atom from */
2092 int if_pinned; /* whether to delete pinned atoms */
2093 @END
2096 /* Init an atom table */
2097 @REQ(init_atom_table)
2098 int entries; /* number of entries (only for local) */
2099 @REPLY
2100 obj_handle_t table; /* handle to the atom table */
2101 @END
2104 /* Get the message queue of the current thread */
2105 @REQ(get_msg_queue)
2106 @REPLY
2107 obj_handle_t handle; /* handle to the queue */
2108 @END
2111 /* Set the file descriptor associated to the current thread queue */
2112 @REQ(set_queue_fd)
2113 obj_handle_t handle; /* handle to the file descriptor */
2114 @END
2117 /* Set the current message queue wakeup mask */
2118 @REQ(set_queue_mask)
2119 unsigned int wake_mask; /* wakeup bits mask */
2120 unsigned int changed_mask; /* changed bits mask */
2121 int skip_wait; /* will we skip waiting if signaled? */
2122 @REPLY
2123 unsigned int wake_bits; /* current wake bits */
2124 unsigned int changed_bits; /* current changed bits */
2125 @END
2128 /* Get the current message queue status */
2129 @REQ(get_queue_status)
2130 unsigned int clear_bits; /* should we clear the change bits? */
2131 @REPLY
2132 unsigned int wake_bits; /* wake bits */
2133 unsigned int changed_bits; /* changed bits since last time */
2134 @END
2137 /* Retrieve the process idle event */
2138 @REQ(get_process_idle_event)
2139 obj_handle_t handle; /* process handle */
2140 @REPLY
2141 obj_handle_t event; /* handle to idle event */
2142 @END
2145 /* Send a message to a thread queue */
2146 @REQ(send_message)
2147 thread_id_t id; /* thread id */
2148 int type; /* message type (see below) */
2149 int flags; /* message flags (see below) */
2150 user_handle_t win; /* window handle */
2151 unsigned int msg; /* message code */
2152 lparam_t wparam; /* parameters */
2153 lparam_t lparam; /* parameters */
2154 timeout_t timeout; /* timeout for reply */
2155 VARARG(data,message_data); /* message data for sent messages */
2156 @END
2158 @REQ(post_quit_message)
2159 int exit_code; /* exit code to return */
2160 @END
2162 enum message_type
2164 MSG_ASCII, /* Ascii message (from SendMessageA) */
2165 MSG_UNICODE, /* Unicode message (from SendMessageW) */
2166 MSG_NOTIFY, /* notify message (from SendNotifyMessageW), always Unicode */
2167 MSG_CALLBACK, /* callback message (from SendMessageCallbackW), always Unicode */
2168 MSG_CALLBACK_RESULT,/* result of a callback message */
2169 MSG_OTHER_PROCESS, /* sent from other process, may include vararg data, always Unicode */
2170 MSG_POSTED, /* posted message (from PostMessageW), always Unicode */
2171 MSG_HARDWARE, /* hardware message */
2172 MSG_WINEVENT, /* winevent message */
2173 MSG_HOOK_LL /* low-level hardware hook */
2175 #define SEND_MSG_ABORT_IF_HUNG 0x01
2178 /* Send a hardware message to a thread queue */
2179 @REQ(send_hardware_message)
2180 user_handle_t win; /* window handle */
2181 hw_input_t input; /* input data */
2182 unsigned int flags; /* flags (see below) */
2183 @REPLY
2184 int wait; /* do we need to wait for a reply? */
2185 int prev_x; /* previous cursor position */
2186 int prev_y;
2187 int new_x; /* new cursor position */
2188 int new_y;
2189 VARARG(keystate,bytes); /* global state array for all the keys */
2190 @END
2191 #define SEND_HWMSG_INJECTED 0x01
2194 /* Get a message from the current queue */
2195 @REQ(get_message)
2196 unsigned int flags; /* PM_* flags */
2197 user_handle_t get_win; /* window handle to get */
2198 unsigned int get_first; /* first message code to get */
2199 unsigned int get_last; /* last message code to get */
2200 unsigned int hw_id; /* id of the previous hardware message (or 0) */
2201 unsigned int wake_mask; /* wakeup bits mask */
2202 unsigned int changed_mask; /* changed bits mask */
2203 @REPLY
2204 user_handle_t win; /* window handle */
2205 unsigned int msg; /* message code */
2206 lparam_t wparam; /* parameters */
2207 lparam_t lparam; /* parameters */
2208 int type; /* message type */
2209 int x; /* message x position */
2210 int y; /* message y position */
2211 unsigned int time; /* message time */
2212 unsigned int active_hooks; /* active hooks bitmap */
2213 data_size_t total; /* total size of extra data */
2214 VARARG(data,message_data); /* message data for sent messages */
2215 @END
2218 /* Reply to a sent message */
2219 @REQ(reply_message)
2220 int remove; /* should we remove the message? */
2221 lparam_t result; /* message result */
2222 VARARG(data,bytes); /* message data for sent messages */
2223 @END
2226 /* Accept the current hardware message */
2227 @REQ(accept_hardware_message)
2228 unsigned int hw_id; /* id of the hardware message */
2229 int remove; /* should we remove the message? */
2230 @END
2233 /* Retrieve the reply for the last message sent */
2234 @REQ(get_message_reply)
2235 int cancel; /* cancel message if not ready? */
2236 @REPLY
2237 lparam_t result; /* message result */
2238 VARARG(data,bytes); /* message data for sent messages */
2239 @END
2242 /* Set a window timer */
2243 @REQ(set_win_timer)
2244 user_handle_t win; /* window handle */
2245 unsigned int msg; /* message to post */
2246 unsigned int rate; /* timer rate in ms */
2247 lparam_t id; /* timer id */
2248 lparam_t lparam; /* message lparam (callback proc) */
2249 @REPLY
2250 lparam_t id; /* timer id */
2251 @END
2254 /* Kill a window timer */
2255 @REQ(kill_win_timer)
2256 user_handle_t win; /* window handle */
2257 lparam_t id; /* timer id */
2258 unsigned int msg; /* message to post */
2259 @END
2262 /* check if the thread owning the window is hung */
2263 @REQ(is_window_hung)
2264 user_handle_t win; /* window handle */
2265 @REPLY
2266 int is_hung;
2267 @END
2270 /* Retrieve info about a serial port */
2271 @REQ(get_serial_info)
2272 obj_handle_t handle; /* handle to comm port */
2273 int flags;
2274 @REPLY
2275 unsigned int readinterval;
2276 unsigned int readconst;
2277 unsigned int readmult;
2278 unsigned int writeconst;
2279 unsigned int writemult;
2280 unsigned int eventmask;
2281 unsigned int cookie;
2282 unsigned int pending_write;
2283 @END
2286 /* Set info about a serial port */
2287 @REQ(set_serial_info)
2288 obj_handle_t handle; /* handle to comm port */
2289 int flags; /* bitmask to set values (see below) */
2290 unsigned int readinterval;
2291 unsigned int readconst;
2292 unsigned int readmult;
2293 unsigned int writeconst;
2294 unsigned int writemult;
2295 unsigned int eventmask;
2296 @END
2297 #define SERIALINFO_SET_TIMEOUTS 0x01
2298 #define SERIALINFO_SET_MASK 0x02
2299 #define SERIALINFO_PENDING_WRITE 0x04
2300 #define SERIALINFO_PENDING_WAIT 0x08
2303 /* Create an async I/O */
2304 @REQ(register_async)
2305 int type; /* type of queue to look after */
2306 async_data_t async; /* async I/O parameters */
2307 int count; /* count - usually # of bytes to be read/written */
2308 @END
2309 #define ASYNC_TYPE_READ 0x01
2310 #define ASYNC_TYPE_WRITE 0x02
2311 #define ASYNC_TYPE_WAIT 0x03
2314 /* Cancel all async op on a fd */
2315 @REQ(cancel_async)
2316 obj_handle_t handle; /* handle to comm port, socket or file */
2317 client_ptr_t iosb; /* I/O status block (NULL=all) */
2318 int only_thread; /* cancel matching this thread */
2319 @END
2322 /* Perform a read on a file object */
2323 @REQ(read)
2324 int blocking; /* whether it's a blocking read */
2325 async_data_t async; /* async I/O parameters */
2326 file_pos_t pos; /* read position */
2327 @REPLY
2328 obj_handle_t wait; /* handle to wait on for blocking read */
2329 unsigned int options; /* device open options */
2330 VARARG(data,bytes); /* read data */
2331 @END
2334 /* Perform a write on a file object */
2335 @REQ(write)
2336 int blocking; /* whether it's a blocking write */
2337 async_data_t async; /* async I/O parameters */
2338 file_pos_t pos; /* write position */
2339 VARARG(data,bytes); /* write data */
2340 @REPLY
2341 obj_handle_t wait; /* handle to wait on for blocking write */
2342 unsigned int options; /* device open options */
2343 data_size_t size; /* size written */
2344 @END
2347 /* Perform an ioctl on a file */
2348 @REQ(ioctl)
2349 ioctl_code_t code; /* ioctl code */
2350 async_data_t async; /* async I/O parameters */
2351 int blocking; /* whether it's a blocking ioctl */
2352 VARARG(in_data,bytes); /* ioctl input data */
2353 @REPLY
2354 obj_handle_t wait; /* handle to wait on for blocking ioctl */
2355 unsigned int options; /* device open options */
2356 VARARG(out_data,bytes); /* ioctl output data */
2357 @END
2360 /* Store results of an async irp */
2361 @REQ(set_irp_result)
2362 obj_handle_t handle; /* handle to the irp */
2363 unsigned int status; /* status of the irp */
2364 data_size_t size; /* result size (input or output depending on the operation) */
2365 client_ptr_t file_ptr; /* opaque pointer to the file object */
2366 VARARG(data,bytes); /* output data of the irp */
2367 @END
2370 /* Retrieve results of an async irp */
2371 @REQ(get_irp_result)
2372 obj_handle_t handle; /* handle to the device */
2373 client_ptr_t user_arg; /* user arg used to identify the request */
2374 @REPLY
2375 data_size_t size; /* result size (input or output depending on the operation) */
2376 VARARG(out_data,bytes); /* irp output data */
2377 @END
2380 /* Create a named pipe */
2381 @REQ(create_named_pipe)
2382 unsigned int access;
2383 unsigned int options;
2384 unsigned int sharing;
2385 unsigned int maxinstances;
2386 unsigned int outsize;
2387 unsigned int insize;
2388 timeout_t timeout;
2389 unsigned int flags;
2390 VARARG(objattr,object_attributes); /* object attributes */
2391 @REPLY
2392 obj_handle_t handle; /* handle to the pipe */
2393 @END
2395 /* flags in create_named_pipe and get_named_pipe_info */
2396 #define NAMED_PIPE_MESSAGE_STREAM_WRITE 0x0001
2397 #define NAMED_PIPE_MESSAGE_STREAM_READ 0x0002
2398 #define NAMED_PIPE_NONBLOCKING_MODE 0x0004
2399 #define NAMED_PIPE_SERVER_END 0x8000
2401 /* Get named pipe information by handle */
2402 @REQ(get_named_pipe_info)
2403 obj_handle_t handle;
2404 @REPLY
2405 unsigned int flags;
2406 unsigned int sharing;
2407 unsigned int maxinstances;
2408 unsigned int instances;
2409 unsigned int outsize;
2410 unsigned int insize;
2411 @END
2413 /* Set named pipe information by handle */
2414 @REQ(set_named_pipe_info)
2415 obj_handle_t handle;
2416 unsigned int flags;
2417 @END
2419 /* Create a window */
2420 @REQ(create_window)
2421 user_handle_t parent; /* parent window */
2422 user_handle_t owner; /* owner window */
2423 atom_t atom; /* class atom */
2424 mod_handle_t instance; /* module instance */
2425 VARARG(class,unicode_str); /* class name */
2426 @REPLY
2427 user_handle_t handle; /* created window */
2428 user_handle_t parent; /* full handle of parent */
2429 user_handle_t owner; /* full handle of owner */
2430 int extra; /* number of extra bytes */
2431 client_ptr_t class_ptr; /* pointer to class in client address space */
2432 @END
2435 /* Destroy a window */
2436 @REQ(destroy_window)
2437 user_handle_t handle; /* handle to the window */
2438 @END
2441 /* Retrieve the desktop window for the current thread */
2442 @REQ(get_desktop_window)
2443 int force; /* force creation if it doesn't exist */
2444 @REPLY
2445 user_handle_t top_window; /* handle to the desktop window */
2446 user_handle_t msg_window; /* handle to the top-level HWND_MESSAGE parent */
2447 @END
2450 /* Set a window owner */
2451 @REQ(set_window_owner)
2452 user_handle_t handle; /* handle to the window */
2453 user_handle_t owner; /* new owner */
2454 @REPLY
2455 user_handle_t full_owner; /* full handle of new owner */
2456 user_handle_t prev_owner; /* full handle of previous owner */
2457 @END
2460 /* Get information from a window handle */
2461 @REQ(get_window_info)
2462 user_handle_t handle; /* handle to the window */
2463 @REPLY
2464 user_handle_t full_handle; /* full 32-bit handle */
2465 user_handle_t last_active; /* last active popup */
2466 process_id_t pid; /* process owning the window */
2467 thread_id_t tid; /* thread owning the window */
2468 atom_t atom; /* class atom */
2469 int is_unicode; /* ANSI or unicode */
2470 @END
2473 /* Set some information in a window */
2474 @REQ(set_window_info)
2475 unsigned short flags; /* flags for fields to set (see below) */
2476 short int is_unicode; /* ANSI or unicode */
2477 user_handle_t handle; /* handle to the window */
2478 unsigned int style; /* window style */
2479 unsigned int ex_style; /* window extended style */
2480 unsigned int id; /* window id */
2481 mod_handle_t instance; /* creator instance */
2482 lparam_t user_data; /* user-specific data */
2483 int extra_offset; /* offset to set in extra bytes */
2484 data_size_t extra_size; /* size to set in extra bytes */
2485 lparam_t extra_value; /* value to set in extra bytes */
2486 @REPLY
2487 unsigned int old_style; /* old window style */
2488 unsigned int old_ex_style; /* old window extended style */
2489 mod_handle_t old_instance; /* old creator instance */
2490 lparam_t old_user_data; /* old user-specific data */
2491 lparam_t old_extra_value; /* old value in extra bytes */
2492 unsigned int old_id; /* old window id */
2493 @END
2494 #define SET_WIN_STYLE 0x01
2495 #define SET_WIN_EXSTYLE 0x02
2496 #define SET_WIN_ID 0x04
2497 #define SET_WIN_INSTANCE 0x08
2498 #define SET_WIN_USERDATA 0x10
2499 #define SET_WIN_EXTRA 0x20
2500 #define SET_WIN_UNICODE 0x40
2503 /* Set the parent of a window */
2504 @REQ(set_parent)
2505 user_handle_t handle; /* handle to the window */
2506 user_handle_t parent; /* handle to the parent */
2507 @REPLY
2508 user_handle_t old_parent; /* old parent window */
2509 user_handle_t full_parent; /* full handle of new parent */
2510 @END
2513 /* Get a list of the window parents, up to the root of the tree */
2514 @REQ(get_window_parents)
2515 user_handle_t handle; /* handle to the window */
2516 @REPLY
2517 int count; /* total count of parents */
2518 VARARG(parents,user_handles); /* parent handles */
2519 @END
2522 /* Get a list of the window children */
2523 @REQ(get_window_children)
2524 obj_handle_t desktop; /* handle to desktop */
2525 user_handle_t parent; /* parent window */
2526 atom_t atom; /* class atom for the listed children */
2527 thread_id_t tid; /* thread owning the listed children */
2528 VARARG(class,unicode_str); /* class name */
2529 @REPLY
2530 int count; /* total count of children */
2531 VARARG(children,user_handles); /* children handles */
2532 @END
2535 /* Get a list of the window children that contain a given point */
2536 @REQ(get_window_children_from_point)
2537 user_handle_t parent; /* parent window */
2538 int x; /* point in parent coordinates */
2539 int y;
2540 @REPLY
2541 int count; /* total count of children */
2542 VARARG(children,user_handles); /* children handles */
2543 @END
2546 /* Get window tree information from a window handle */
2547 @REQ(get_window_tree)
2548 user_handle_t handle; /* handle to the window */
2549 @REPLY
2550 user_handle_t parent; /* parent window */
2551 user_handle_t owner; /* owner window */
2552 user_handle_t next_sibling; /* next sibling in Z-order */
2553 user_handle_t prev_sibling; /* prev sibling in Z-order */
2554 user_handle_t first_sibling; /* first sibling in Z-order */
2555 user_handle_t last_sibling; /* last sibling in Z-order */
2556 user_handle_t first_child; /* first child */
2557 user_handle_t last_child; /* last child */
2558 @END
2560 /* Set the position and Z order of a window */
2561 @REQ(set_window_pos)
2562 unsigned short swp_flags; /* SWP_* flags */
2563 unsigned short paint_flags; /* paint flags (see below) */
2564 user_handle_t handle; /* handle to the window */
2565 user_handle_t previous; /* previous window in Z order */
2566 rectangle_t window; /* window rectangle (in parent coords) */
2567 rectangle_t client; /* client rectangle (in parent coords) */
2568 VARARG(valid,rectangles); /* valid rectangles from WM_NCCALCSIZE (in parent coords) */
2569 @REPLY
2570 unsigned int new_style; /* new window style */
2571 unsigned int new_ex_style; /* new window extended style */
2572 user_handle_t surface_win; /* window that needs a surface update */
2573 @END
2574 #define SET_WINPOS_PAINT_SURFACE 0x01 /* window has a paintable surface */
2575 #define SET_WINPOS_PIXEL_FORMAT 0x02 /* window has a custom pixel format */
2577 /* Get the window and client rectangles of a window */
2578 @REQ(get_window_rectangles)
2579 user_handle_t handle; /* handle to the window */
2580 int relative; /* coords relative to (see below) */
2581 @REPLY
2582 rectangle_t window; /* window rectangle */
2583 rectangle_t visible; /* visible part of the window rectangle */
2584 rectangle_t client; /* client rectangle */
2585 @END
2586 enum coords_relative
2588 COORDS_CLIENT, /* relative to client area */
2589 COORDS_WINDOW, /* relative to whole window area */
2590 COORDS_PARENT, /* relative to parent's client area */
2591 COORDS_SCREEN /* relative to screen origin */
2595 /* Get the window text */
2596 @REQ(get_window_text)
2597 user_handle_t handle; /* handle to the window */
2598 @REPLY
2599 VARARG(text,unicode_str); /* window text */
2600 @END
2603 /* Set the window text */
2604 @REQ(set_window_text)
2605 user_handle_t handle; /* handle to the window */
2606 VARARG(text,unicode_str); /* window text */
2607 @END
2610 /* Get the coordinates offset between two windows */
2611 @REQ(get_windows_offset)
2612 user_handle_t from; /* handle to the first window */
2613 user_handle_t to; /* handle to the second window */
2614 @REPLY
2615 int x; /* x coordinate offset */
2616 int y; /* y coordinate offset */
2617 int mirror; /* whether to mirror the x coordinate */
2618 @END
2621 /* Get the visible region of a window */
2622 @REQ(get_visible_region)
2623 user_handle_t window; /* handle to the window */
2624 unsigned int flags; /* DCX flags */
2625 @REPLY
2626 user_handle_t top_win; /* top window to clip against */
2627 rectangle_t top_rect; /* top window visible rect with screen coords */
2628 rectangle_t win_rect; /* window rect in screen coords */
2629 unsigned int paint_flags; /* paint flags (from SET_WINPOS_* flags) */
2630 data_size_t total_size; /* total size of the resulting region */
2631 VARARG(region,rectangles); /* list of rectangles for the region (in screen coords) */
2632 @END
2635 /* Get the visible surface region of a window */
2636 @REQ(get_surface_region)
2637 user_handle_t window; /* handle to the window */
2638 @REPLY
2639 rectangle_t visible_rect; /* window visible rect in screen coords */
2640 data_size_t total_size; /* total size of the resulting region */
2641 VARARG(region,rectangles); /* list of rectangles for the region (in screen coords) */
2642 @END
2645 /* Get the window region */
2646 @REQ(get_window_region)
2647 user_handle_t window; /* handle to the window */
2648 @REPLY
2649 data_size_t total_size; /* total size of the resulting region */
2650 VARARG(region,rectangles); /* list of rectangles for the region (in window coords) */
2651 @END
2654 /* Set the window region */
2655 @REQ(set_window_region)
2656 user_handle_t window; /* handle to the window */
2657 int redraw; /* redraw the window? */
2658 VARARG(region,rectangles); /* list of rectangles for the region (in window coords) */
2659 @END
2662 /* Get the window update region */
2663 @REQ(get_update_region)
2664 user_handle_t window; /* handle to the window */
2665 user_handle_t from_child; /* child to start searching from */
2666 unsigned int flags; /* update flags (see below) */
2667 @REPLY
2668 user_handle_t child; /* child to repaint (or window itself) */
2669 unsigned int flags; /* resulting update flags (see below) */
2670 data_size_t total_size; /* total size of the resulting region */
2671 VARARG(region,rectangles); /* list of rectangles for the region (in screen coords) */
2672 @END
2673 #define UPDATE_NONCLIENT 0x01 /* get region for repainting non-client area */
2674 #define UPDATE_ERASE 0x02 /* get region for erasing client area */
2675 #define UPDATE_PAINT 0x04 /* get region for painting client area */
2676 #define UPDATE_INTERNALPAINT 0x08 /* get region if internal paint is pending */
2677 #define UPDATE_ALLCHILDREN 0x10 /* force repaint of all children */
2678 #define UPDATE_NOCHILDREN 0x20 /* don't try to repaint any children */
2679 #define UPDATE_NOREGION 0x40 /* don't return a region, only the flags */
2680 #define UPDATE_DELAYED_ERASE 0x80 /* still needs erase after BeginPaint */
2683 /* Update the z order of a window so that a given rectangle is fully visible */
2684 @REQ(update_window_zorder)
2685 user_handle_t window; /* handle to the window */
2686 rectangle_t rect; /* rectangle that must be visible (in client coords) */
2687 @END
2690 /* Mark parts of a window as needing a redraw */
2691 @REQ(redraw_window)
2692 user_handle_t window; /* handle to the window */
2693 unsigned int flags; /* RDW_* flags */
2694 VARARG(region,rectangles); /* list of rectangles for the region (in window coords) */
2695 @END
2698 /* Set a window property */
2699 @REQ(set_window_property)
2700 user_handle_t window; /* handle to the window */
2701 lparam_t data; /* data to store */
2702 atom_t atom; /* property atom (if no name specified) */
2703 VARARG(name,unicode_str); /* property name */
2704 @END
2707 /* Remove a window property */
2708 @REQ(remove_window_property)
2709 user_handle_t window; /* handle to the window */
2710 atom_t atom; /* property atom (if no name specified) */
2711 VARARG(name,unicode_str); /* property name */
2712 @REPLY
2713 lparam_t data; /* data stored in property */
2714 @END
2717 /* Get a window property */
2718 @REQ(get_window_property)
2719 user_handle_t window; /* handle to the window */
2720 atom_t atom; /* property atom (if no name specified) */
2721 VARARG(name,unicode_str); /* property name */
2722 @REPLY
2723 lparam_t data; /* data stored in property */
2724 @END
2727 /* Get the list of properties of a window */
2728 @REQ(get_window_properties)
2729 user_handle_t window; /* handle to the window */
2730 @REPLY
2731 int total; /* total number of properties */
2732 VARARG(props,properties); /* list of properties */
2733 @END
2736 /* Create a window station */
2737 @REQ(create_winstation)
2738 unsigned int flags; /* window station flags */
2739 unsigned int access; /* wanted access rights */
2740 unsigned int attributes; /* object attributes */
2741 obj_handle_t rootdir; /* root directory */
2742 VARARG(name,unicode_str); /* object name */
2743 @REPLY
2744 obj_handle_t handle; /* handle to the window station */
2745 @END
2748 /* Open a handle to a window station */
2749 @REQ(open_winstation)
2750 unsigned int access; /* wanted access rights */
2751 unsigned int attributes; /* object attributes */
2752 obj_handle_t rootdir; /* root directory */
2753 VARARG(name,unicode_str); /* object name */
2754 @REPLY
2755 obj_handle_t handle; /* handle to the window station */
2756 @END
2759 /* Close a window station */
2760 @REQ(close_winstation)
2761 obj_handle_t handle; /* handle to the window station */
2762 @END
2765 /* Get the process current window station */
2766 @REQ(get_process_winstation)
2767 @REPLY
2768 obj_handle_t handle; /* handle to the window station */
2769 @END
2772 /* Set the process current window station */
2773 @REQ(set_process_winstation)
2774 obj_handle_t handle; /* handle to the window station */
2775 @END
2778 /* Enumerate window stations */
2779 @REQ(enum_winstation)
2780 unsigned int index; /* current index */
2781 @REPLY
2782 unsigned int next; /* next index */
2783 VARARG(name,unicode_str); /* window station name */
2784 @END
2787 /* Create a desktop */
2788 @REQ(create_desktop)
2789 unsigned int flags; /* desktop flags */
2790 unsigned int access; /* wanted access rights */
2791 unsigned int attributes; /* object attributes */
2792 VARARG(name,unicode_str); /* object name */
2793 @REPLY
2794 obj_handle_t handle; /* handle to the desktop */
2795 @END
2798 /* Open a handle to a desktop */
2799 @REQ(open_desktop)
2800 obj_handle_t winsta; /* window station to open (null allowed) */
2801 unsigned int flags; /* desktop flags */
2802 unsigned int access; /* wanted access rights */
2803 unsigned int attributes; /* object attributes */
2804 VARARG(name,unicode_str); /* object name */
2805 @REPLY
2806 obj_handle_t handle; /* handle to the desktop */
2807 @END
2810 /* Open a handle to current input desktop */
2811 @REQ(open_input_desktop)
2812 unsigned int flags; /* desktop flags */
2813 unsigned int access; /* wanted access rights */
2814 unsigned int attributes; /* object attributes */
2815 @REPLY
2816 obj_handle_t handle; /* handle to the desktop */
2817 @END
2820 /* Close a desktop */
2821 @REQ(close_desktop)
2822 obj_handle_t handle; /* handle to the desktop */
2823 @END
2826 /* Get the thread current desktop */
2827 @REQ(get_thread_desktop)
2828 thread_id_t tid; /* thread id */
2829 @REPLY
2830 obj_handle_t handle; /* handle to the desktop */
2831 @END
2834 /* Set the thread current desktop */
2835 @REQ(set_thread_desktop)
2836 obj_handle_t handle; /* handle to the desktop */
2837 @END
2840 /* Enumerate desktops */
2841 @REQ(enum_desktop)
2842 obj_handle_t winstation; /* handle to the window station */
2843 unsigned int index; /* current index */
2844 @REPLY
2845 unsigned int next; /* next index */
2846 VARARG(name,unicode_str); /* window station name */
2847 @END
2850 /* Get/set information about a user object (window station or desktop) */
2851 @REQ(set_user_object_info)
2852 obj_handle_t handle; /* handle to the object */
2853 unsigned int flags; /* information to set/get */
2854 unsigned int obj_flags; /* new object flags */
2855 @REPLY
2856 int is_desktop; /* is object a desktop? */
2857 unsigned int old_obj_flags; /* old object flags */
2858 VARARG(name,unicode_str); /* object name */
2859 @END
2860 #define SET_USER_OBJECT_SET_FLAGS 1
2861 #define SET_USER_OBJECT_GET_FULL_NAME 2
2864 /* Register a hotkey */
2865 @REQ(register_hotkey)
2866 user_handle_t window; /* handle to the window */
2867 int id; /* hotkey identifier */
2868 unsigned int flags; /* modifier keys */
2869 unsigned int vkey; /* virtual key code */
2870 @REPLY
2871 int replaced; /* did we replace an existing hotkey? */
2872 unsigned int flags; /* flags of replaced hotkey */
2873 unsigned int vkey; /* virtual key code of replaced hotkey */
2874 @END
2877 /* Unregister a hotkey */
2878 @REQ(unregister_hotkey)
2879 user_handle_t window; /* handle to the window */
2880 int id; /* hotkey identifier */
2881 @REPLY
2882 unsigned int flags; /* flags of removed hotkey */
2883 unsigned int vkey; /* virtual key code of removed hotkey */
2884 @END
2887 /* Attach (or detach) thread inputs */
2888 @REQ(attach_thread_input)
2889 thread_id_t tid_from; /* thread to be attached */
2890 thread_id_t tid_to; /* thread to which tid_from should be attached */
2891 int attach; /* is it an attach? */
2892 @END
2895 /* Get input data for a given thread */
2896 @REQ(get_thread_input)
2897 thread_id_t tid; /* id of thread */
2898 @REPLY
2899 user_handle_t focus; /* handle to the focus window */
2900 user_handle_t capture; /* handle to the capture window */
2901 user_handle_t active; /* handle to the active window */
2902 user_handle_t foreground; /* handle to the global foreground window */
2903 user_handle_t menu_owner; /* handle to the menu owner */
2904 user_handle_t move_size; /* handle to the moving/resizing window */
2905 user_handle_t caret; /* handle to the caret window */
2906 user_handle_t cursor; /* handle to the cursor */
2907 int show_count; /* cursor show count */
2908 rectangle_t rect; /* caret rectangle */
2909 @END
2912 /* Get the time of the last input event */
2913 @REQ(get_last_input_time)
2914 @REPLY
2915 unsigned int time;
2916 @END
2919 /* Retrieve queue keyboard state for a given thread */
2920 @REQ(get_key_state)
2921 thread_id_t tid; /* id of thread */
2922 int key; /* optional key code or -1 */
2923 @REPLY
2924 unsigned char state; /* state of specified key */
2925 VARARG(keystate,bytes); /* state array for all the keys */
2926 @END
2928 /* Set queue keyboard state for a given thread */
2929 @REQ(set_key_state)
2930 thread_id_t tid; /* id of thread */
2931 int async; /* whether to change the async state too */
2932 VARARG(keystate,bytes); /* state array for all the keys */
2933 @END
2935 /* Set the system foreground window */
2936 @REQ(set_foreground_window)
2937 user_handle_t handle; /* handle to the foreground window */
2938 @REPLY
2939 user_handle_t previous; /* handle to the previous foreground window */
2940 int send_msg_old; /* whether we have to send a msg to the old window */
2941 int send_msg_new; /* whether we have to send a msg to the new window */
2942 @END
2944 /* Set the current thread focus window */
2945 @REQ(set_focus_window)
2946 user_handle_t handle; /* handle to the focus window */
2947 @REPLY
2948 user_handle_t previous; /* handle to the previous focus window */
2949 @END
2951 /* Set the current thread active window */
2952 @REQ(set_active_window)
2953 user_handle_t handle; /* handle to the active window */
2954 @REPLY
2955 user_handle_t previous; /* handle to the previous active window */
2956 @END
2958 /* Set the current thread capture window */
2959 @REQ(set_capture_window)
2960 user_handle_t handle; /* handle to the capture window */
2961 unsigned int flags; /* capture flags (see below) */
2962 @REPLY
2963 user_handle_t previous; /* handle to the previous capture window */
2964 user_handle_t full_handle; /* full 32-bit handle of new capture window */
2965 @END
2966 #define CAPTURE_MENU 0x01 /* capture is for a menu */
2967 #define CAPTURE_MOVESIZE 0x02 /* capture is for moving/resizing */
2970 /* Set the current thread caret window */
2971 @REQ(set_caret_window)
2972 user_handle_t handle; /* handle to the caret window */
2973 int width; /* caret width */
2974 int height; /* caret height */
2975 @REPLY
2976 user_handle_t previous; /* handle to the previous caret window */
2977 rectangle_t old_rect; /* previous caret rectangle */
2978 int old_hide; /* previous hide count */
2979 int old_state; /* previous caret state (1=on, 0=off) */
2980 @END
2983 /* Set the current thread caret information */
2984 @REQ(set_caret_info)
2985 unsigned int flags; /* caret flags (see below) */
2986 user_handle_t handle; /* handle to the caret window */
2987 int x; /* caret x position */
2988 int y; /* caret y position */
2989 int hide; /* increment for hide count (can be negative to show it) */
2990 int state; /* caret state (see below) */
2991 @REPLY
2992 user_handle_t full_handle; /* handle to the current caret window */
2993 rectangle_t old_rect; /* previous caret rectangle */
2994 int old_hide; /* previous hide count */
2995 int old_state; /* previous caret state (1=on, 0=off) */
2996 @END
2997 #define SET_CARET_POS 0x01 /* set the caret position from x,y */
2998 #define SET_CARET_HIDE 0x02 /* increment the caret hide count */
2999 #define SET_CARET_STATE 0x04 /* set the caret on/off state */
3000 enum caret_state
3002 CARET_STATE_OFF, /* off */
3003 CARET_STATE_ON, /* on */
3004 CARET_STATE_TOGGLE, /* toggle current state */
3005 CARET_STATE_ON_IF_MOVED /* on if the position differs, unchanged otherwise */
3009 /* Set a window hook */
3010 @REQ(set_hook)
3011 int id; /* id of the hook */
3012 process_id_t pid; /* id of process to set the hook into */
3013 thread_id_t tid; /* id of thread to set the hook into */
3014 int event_min;
3015 int event_max;
3016 client_ptr_t proc; /* hook procedure */
3017 int flags;
3018 int unicode; /* is it a unicode hook? */
3019 VARARG(module,unicode_str); /* module name */
3020 @REPLY
3021 user_handle_t handle; /* handle to the hook */
3022 unsigned int active_hooks; /* active hooks bitmap */
3023 @END
3026 /* Remove a window hook */
3027 @REQ(remove_hook)
3028 user_handle_t handle; /* handle to the hook */
3029 client_ptr_t proc; /* hook procedure if handle is 0 */
3030 int id; /* id of the hook if handle is 0 */
3031 @REPLY
3032 unsigned int active_hooks; /* active hooks bitmap */
3033 @END
3036 /* Start calling a hook chain */
3037 @REQ(start_hook_chain)
3038 int id; /* id of the hook */
3039 int event; /* signalled event */
3040 user_handle_t window; /* handle to the event window */
3041 int object_id; /* object id for out of context winevent */
3042 int child_id; /* child id for out of context winevent */
3043 @REPLY
3044 user_handle_t handle; /* handle to the next hook */
3045 process_id_t pid; /* process id for low-level keyboard/mouse hooks */
3046 thread_id_t tid; /* thread id for low-level keyboard/mouse hooks */
3047 int unicode; /* is it a unicode hook? */
3048 client_ptr_t proc; /* hook procedure */
3049 unsigned int active_hooks; /* active hooks bitmap */
3050 VARARG(module,unicode_str); /* module name */
3051 @END
3054 /* Finished calling a hook chain */
3055 @REQ(finish_hook_chain)
3056 int id; /* id of the hook */
3057 @END
3060 /* Get the hook information */
3061 @REQ(get_hook_info)
3062 user_handle_t handle; /* handle to the current hook */
3063 int get_next; /* do we want info about current or next hook? */
3064 int event; /* signalled event */
3065 user_handle_t window; /* handle to the event window */
3066 int object_id; /* object id for out of context winevent */
3067 int child_id; /* child id for out of context winevent */
3068 @REPLY
3069 user_handle_t handle; /* handle to the hook */
3070 int id; /* id of the hook */
3071 process_id_t pid; /* process id for low-level keyboard/mouse hooks */
3072 thread_id_t tid; /* thread id for low-level keyboard/mouse hooks */
3073 client_ptr_t proc; /* hook procedure */
3074 int unicode; /* is it a unicode hook? */
3075 VARARG(module,unicode_str); /* module name */
3076 @END
3079 /* Create a window class */
3080 @REQ(create_class)
3081 int local; /* is it a local class? */
3082 atom_t atom; /* class atom */
3083 unsigned int style; /* class style */
3084 mod_handle_t instance; /* module instance */
3085 int extra; /* number of extra class bytes */
3086 int win_extra; /* number of window extra bytes */
3087 client_ptr_t client_ptr; /* pointer to class in client address space */
3088 VARARG(name,unicode_str); /* class name */
3089 @REPLY
3090 atom_t atom; /* resulting class atom */
3091 @END
3094 /* Destroy a window class */
3095 @REQ(destroy_class)
3096 atom_t atom; /* class atom */
3097 mod_handle_t instance; /* module instance */
3098 VARARG(name,unicode_str); /* class name */
3099 @REPLY
3100 client_ptr_t client_ptr; /* pointer to class in client address space */
3101 @END
3104 /* Set some information in a class */
3105 @REQ(set_class_info)
3106 user_handle_t window; /* handle to the window */
3107 unsigned int flags; /* flags for info to set (see below) */
3108 atom_t atom; /* class atom */
3109 unsigned int style; /* class style */
3110 int win_extra; /* number of window extra bytes */
3111 mod_handle_t instance; /* module instance */
3112 int extra_offset; /* offset to set in extra bytes */
3113 data_size_t extra_size; /* size to set in extra bytes */
3114 lparam_t extra_value; /* value to set in extra bytes */
3115 @REPLY
3116 atom_t old_atom; /* previous class atom */
3117 unsigned int old_style; /* previous class style */
3118 int old_extra; /* previous number of class extra bytes */
3119 int old_win_extra; /* previous number of window extra bytes */
3120 mod_handle_t old_instance; /* previous module instance */
3121 lparam_t old_extra_value; /* old value in extra bytes */
3122 @END
3123 #define SET_CLASS_ATOM 0x0001
3124 #define SET_CLASS_STYLE 0x0002
3125 #define SET_CLASS_WINEXTRA 0x0004
3126 #define SET_CLASS_INSTANCE 0x0008
3127 #define SET_CLASS_EXTRA 0x0010
3130 /* Set/get clipboard information */
3131 @REQ(set_clipboard_info)
3132 unsigned int flags; /* flags for fields to set (see below) */
3133 user_handle_t clipboard; /* clipboard window */
3134 user_handle_t owner; /* clipboard owner */
3135 user_handle_t viewer; /* first clipboard viewer */
3136 unsigned int seqno; /* change sequence number */
3137 @REPLY
3138 unsigned int flags; /* status flags (see below) */
3139 user_handle_t old_clipboard; /* old clipboard window */
3140 user_handle_t old_owner; /* old clipboard owner */
3141 user_handle_t old_viewer; /* old clipboard viewer */
3142 unsigned int seqno; /* current sequence number */
3143 @END
3145 #define SET_CB_OPEN 0x001
3146 #define SET_CB_VIEWER 0x004
3147 #define SET_CB_SEQNO 0x008
3148 #define SET_CB_RELOWNER 0x010
3149 #define SET_CB_CLOSE 0x020
3150 #define CB_OPEN 0x040
3151 #define CB_OWNER 0x080
3152 #define CB_PROCESS 0x100
3155 /* Empty the clipboard and grab ownership */
3156 @REQ(empty_clipboard)
3157 @END
3160 /* Open a security token */
3161 @REQ(open_token)
3162 obj_handle_t handle; /* handle to the thread or process */
3163 unsigned int access; /* access rights to the new token */
3164 unsigned int attributes;/* object attributes */
3165 unsigned int flags; /* flags (see below) */
3166 @REPLY
3167 obj_handle_t token; /* handle to the token */
3168 @END
3169 #define OPEN_TOKEN_THREAD 1
3170 #define OPEN_TOKEN_AS_SELF 2
3173 /* Set/get the global windows */
3174 @REQ(set_global_windows)
3175 unsigned int flags; /* flags for fields to set (see below) */
3176 user_handle_t shell_window; /* handle to the new shell window */
3177 user_handle_t shell_listview; /* handle to the new shell listview window */
3178 user_handle_t progman_window; /* handle to the new program manager window */
3179 user_handle_t taskman_window; /* handle to the new task manager window */
3180 @REPLY
3181 user_handle_t old_shell_window; /* handle to the shell window */
3182 user_handle_t old_shell_listview; /* handle to the shell listview window */
3183 user_handle_t old_progman_window; /* handle to the new program manager window */
3184 user_handle_t old_taskman_window; /* handle to the new task manager window */
3185 @END
3186 #define SET_GLOBAL_SHELL_WINDOWS 0x01 /* set both main shell and listview windows */
3187 #define SET_GLOBAL_PROGMAN_WINDOW 0x02
3188 #define SET_GLOBAL_TASKMAN_WINDOW 0x04
3190 /* Adjust the privileges held by a token */
3191 @REQ(adjust_token_privileges)
3192 obj_handle_t handle; /* handle to the token */
3193 int disable_all; /* disable all privileges? */
3194 int get_modified_state; /* get modified privileges? */
3195 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges to enable/disable/remove */
3196 @REPLY
3197 unsigned int len; /* total length in bytes required to store token privileges */
3198 VARARG(privileges,LUID_AND_ATTRIBUTES); /* modified privileges */
3199 @END
3201 /* Retrieves the set of privileges held by or available to a token */
3202 @REQ(get_token_privileges)
3203 obj_handle_t handle; /* handle to the token */
3204 @REPLY
3205 unsigned int len; /* total length in bytes required to store token privileges */
3206 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges held by or available to a token */
3207 @END
3209 /* Check the token has the required privileges */
3210 @REQ(check_token_privileges)
3211 obj_handle_t handle; /* handle to the token */
3212 int all_required; /* are all the privileges required for the check to succeed? */
3213 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges to check */
3214 @REPLY
3215 int has_privileges; /* does the token have the required privileges? */
3216 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges held by or available to a token */
3217 @END
3219 @REQ(duplicate_token)
3220 obj_handle_t handle; /* handle to the token to duplicate */
3221 unsigned int access; /* access rights to the new token */
3222 unsigned int attributes; /* object attributes */
3223 int primary; /* is the new token to be a primary one? */
3224 int impersonation_level; /* impersonation level of the new token */
3225 @REPLY
3226 obj_handle_t new_handle; /* duplicated handle */
3227 @END
3229 @REQ(access_check)
3230 obj_handle_t handle; /* handle to the token */
3231 unsigned int desired_access; /* desired access to the object */
3232 unsigned int mapping_read; /* mapping from generic read to specific rights */
3233 unsigned int mapping_write; /* mapping from generic write to specific rights */
3234 unsigned int mapping_execute; /* mapping from generic execute to specific rights */
3235 unsigned int mapping_all; /* mapping from generic all to specific rights */
3236 VARARG(sd,security_descriptor); /* security descriptor to check */
3237 @REPLY
3238 unsigned int access_granted; /* access rights actually granted */
3239 unsigned int access_status; /* was access granted? */
3240 unsigned int privileges_len; /* length needed to store privileges */
3241 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges used during access check */
3242 @END
3244 @REQ(get_token_sid)
3245 obj_handle_t handle; /* handle to the token */
3246 unsigned int which_sid; /* which SID to retrieve from the token */
3247 @REPLY
3248 data_size_t sid_len; /* length needed to store sid */
3249 VARARG(sid,SID); /* the sid specified by which_sid from the token */
3250 @END
3252 @REQ(get_token_groups)
3253 obj_handle_t handle; /* handle to the token */
3254 @REPLY
3255 data_size_t user_len; /* length needed to store user */
3256 VARARG(user,token_groups); /* groups the token's user belongs to */
3257 @END
3259 @REQ(get_token_default_dacl)
3260 obj_handle_t handle; /* handle to the token */
3261 @REPLY
3262 data_size_t acl_len; /* length needed to store access control list */
3263 VARARG(acl,ACL); /* access control list */
3264 @END
3266 @REQ(set_token_default_dacl)
3267 obj_handle_t handle; /* handle to the token */
3268 VARARG(acl,ACL); /* default dacl to set */
3269 @END
3271 @REQ(set_security_object)
3272 obj_handle_t handle; /* handle to the object */
3273 unsigned int security_info; /* which parts of security descriptor to set */
3274 VARARG(sd,security_descriptor); /* security descriptor to set */
3275 @END
3277 @REQ(get_security_object)
3278 obj_handle_t handle; /* handle to the object */
3279 unsigned int security_info; /* which parts of security descriptor to get */
3280 @REPLY
3281 unsigned int sd_len; /* buffer size needed for sd */
3282 VARARG(sd,security_descriptor); /* retrieved security descriptor */
3283 @END
3286 struct handle_info
3288 process_id_t owner;
3289 obj_handle_t handle;
3290 unsigned int access;
3293 /* Return a list of all opened handles */
3294 @REQ(get_system_handles)
3295 @REPLY
3296 unsigned int count; /* number of handles */
3297 VARARG(data,handle_infos); /* array of handle_infos */
3298 @END
3301 /* Create a mailslot */
3302 @REQ(create_mailslot)
3303 unsigned int access; /* wanted access rights */
3304 timeout_t read_timeout;
3305 unsigned int max_msgsize;
3306 VARARG(objattr,object_attributes); /* object attributes */
3307 @REPLY
3308 obj_handle_t handle; /* handle to the mailslot */
3309 @END
3312 /* Set mailslot information */
3313 @REQ(set_mailslot_info)
3314 obj_handle_t handle; /* handle to the mailslot */
3315 timeout_t read_timeout;
3316 unsigned int flags;
3317 @REPLY
3318 timeout_t read_timeout;
3319 unsigned int max_msgsize;
3320 @END
3321 #define MAILSLOT_SET_READ_TIMEOUT 1
3324 /* Create a directory object */
3325 @REQ(create_directory)
3326 unsigned int access; /* access flags */
3327 VARARG(objattr,object_attributes); /* object attributes */
3328 @REPLY
3329 obj_handle_t handle; /* handle to the directory */
3330 @END
3333 /* Open a directory object */
3334 @REQ(open_directory)
3335 unsigned int access; /* access flags */
3336 unsigned int attributes; /* object attributes */
3337 obj_handle_t rootdir; /* root directory */
3338 VARARG(directory_name,unicode_str); /* Directory name */
3339 @REPLY
3340 obj_handle_t handle; /* handle to the directory */
3341 @END
3344 /* Get a directory entry by index */
3345 @REQ(get_directory_entry)
3346 obj_handle_t handle; /* handle to the directory */
3347 unsigned int index; /* entry index */
3348 @REPLY
3349 data_size_t name_len; /* length of the entry name in bytes */
3350 VARARG(name,unicode_str,name_len); /* entry name */
3351 VARARG(type,unicode_str); /* entry type */
3352 @END
3355 /* Create a symbolic link object */
3356 @REQ(create_symlink)
3357 unsigned int access; /* access flags */
3358 VARARG(objattr,object_attributes); /* object attributes */
3359 VARARG(target_name,unicode_str); /* target name */
3360 @REPLY
3361 obj_handle_t handle; /* handle to the symlink */
3362 @END
3365 /* Open a symbolic link object */
3366 @REQ(open_symlink)
3367 unsigned int access; /* access flags */
3368 unsigned int attributes; /* object attributes */
3369 obj_handle_t rootdir; /* root directory */
3370 VARARG(name,unicode_str); /* symlink name */
3371 @REPLY
3372 obj_handle_t handle; /* handle to the symlink */
3373 @END
3376 /* Query a symbolic link object */
3377 @REQ(query_symlink)
3378 obj_handle_t handle; /* handle to the symlink */
3379 @REPLY
3380 data_size_t total; /* total needed size for name */
3381 VARARG(target_name,unicode_str); /* target name */
3382 @END
3385 /* Query basic object information */
3386 @REQ(get_object_info)
3387 obj_handle_t handle; /* handle to the object */
3388 @REPLY
3389 unsigned int access; /* granted access mask */
3390 unsigned int ref_count; /* object ref count */
3391 unsigned int handle_count; /* object handle count */
3392 data_size_t total; /* total needed size for name */
3393 VARARG(name,unicode_str); /* object name */
3394 @END
3397 /* Query object type name information */
3398 @REQ(get_object_type)
3399 obj_handle_t handle; /* handle to the object */
3400 @REPLY
3401 data_size_t total; /* needed size for type name */
3402 VARARG(type,unicode_str); /* type name */
3403 @END
3406 /* Unlink a named object */
3407 @REQ(unlink_object)
3408 obj_handle_t handle; /* handle to the object */
3409 @END
3412 /* Query the impersonation level of an impersonation token */
3413 @REQ(get_token_impersonation_level)
3414 obj_handle_t handle; /* handle to the object */
3415 @REPLY
3416 int impersonation_level; /* impersonation level of the impersonation token */
3417 @END
3419 /* Allocate a locally-unique identifier */
3420 @REQ(allocate_locally_unique_id)
3421 @REPLY
3422 luid_t luid;
3423 @END
3426 /* Create a device manager */
3427 @REQ(create_device_manager)
3428 unsigned int access; /* wanted access rights */
3429 unsigned int attributes; /* object attributes */
3430 @REPLY
3431 obj_handle_t handle; /* handle to the device */
3432 @END
3435 /* Create a device */
3436 @REQ(create_device)
3437 unsigned int access; /* wanted access rights */
3438 unsigned int attributes; /* object attributes */
3439 obj_handle_t rootdir; /* root directory */
3440 client_ptr_t user_ptr; /* opaque ptr for use by client */
3441 obj_handle_t manager; /* device manager */
3442 VARARG(name,unicode_str); /* object name */
3443 @REPLY
3444 obj_handle_t handle; /* handle to the device */
3445 @END
3448 /* Delete a device */
3449 @REQ(delete_device)
3450 obj_handle_t handle; /* handle to the device */
3451 @END
3454 /* Retrieve the next pending device irp request */
3455 @REQ(get_next_device_request)
3456 obj_handle_t manager; /* handle to the device manager */
3457 obj_handle_t prev; /* handle to the previous irp */
3458 unsigned int status; /* status of the previous irp */
3459 @REPLY
3460 irp_params_t params; /* irp parameters */
3461 obj_handle_t next; /* handle to the next irp */
3462 process_id_t client_pid; /* pid of process calling irp */
3463 thread_id_t client_tid; /* tid of thread calling irp */
3464 data_size_t in_size; /* total needed input size */
3465 data_size_t out_size; /* needed output size */
3466 VARARG(next_data,bytes); /* input data of the next irp */
3467 @END
3470 /* Make the current process a system process */
3471 @REQ(make_process_system)
3472 @REPLY
3473 obj_handle_t event; /* event signaled when all user processes have exited */
3474 @END
3477 /* Get detailed fixed-size information about a token */
3478 @REQ(get_token_statistics)
3479 obj_handle_t handle; /* handle to the object */
3480 @REPLY
3481 luid_t token_id; /* locally-unique identifier of the token */
3482 luid_t modified_id; /* locally-unique identifier of the modified version of the token */
3483 int primary; /* is the token primary or impersonation? */
3484 int impersonation_level; /* level of impersonation */
3485 int group_count; /* the number of groups the token is a member of */
3486 int privilege_count; /* the number of privileges the token has */
3487 @END
3490 /* Create I/O completion port */
3491 @REQ(create_completion)
3492 unsigned int access; /* desired access to a port */
3493 unsigned int concurrent; /* max number of concurrent active threads */
3494 VARARG(objattr,object_attributes); /* object attributes */
3495 @REPLY
3496 obj_handle_t handle; /* port handle */
3497 @END
3500 /* Open I/O completion port */
3501 @REQ(open_completion)
3502 unsigned int access; /* desired access to a port */
3503 unsigned int attributes; /* object attributes */
3504 obj_handle_t rootdir; /* root directory */
3505 VARARG(filename,unicode_str); /* port name */
3506 @REPLY
3507 obj_handle_t handle; /* port handle */
3508 @END
3511 /* add completion to completion port */
3512 @REQ(add_completion)
3513 obj_handle_t handle; /* port handle */
3514 apc_param_t ckey; /* completion key */
3515 apc_param_t cvalue; /* completion value */
3516 apc_param_t information; /* IO_STATUS_BLOCK Information */
3517 unsigned int status; /* completion result */
3518 @END
3521 /* get completion from completion port queue */
3522 @REQ(remove_completion)
3523 obj_handle_t handle; /* port handle */
3524 @REPLY
3525 apc_param_t ckey; /* completion key */
3526 apc_param_t cvalue; /* completion value */
3527 apc_param_t information; /* IO_STATUS_BLOCK Information */
3528 unsigned int status; /* completion result */
3529 @END
3532 /* get completion queue depth */
3533 @REQ(query_completion)
3534 obj_handle_t handle; /* port handle */
3535 @REPLY
3536 unsigned int depth; /* completion queue depth */
3537 @END
3540 /* associate object with completion port */
3541 @REQ(set_completion_info)
3542 obj_handle_t handle; /* object handle */
3543 apc_param_t ckey; /* completion key */
3544 obj_handle_t chandle; /* port handle */
3545 @END
3548 /* check for associated completion and push msg */
3549 @REQ(add_fd_completion)
3550 obj_handle_t handle; /* async' object */
3551 apc_param_t cvalue; /* completion value */
3552 apc_param_t information; /* IO_STATUS_BLOCK Information */
3553 unsigned int status; /* completion status */
3554 @END
3557 /* set fd disposition information */
3558 @REQ(set_fd_disp_info)
3559 obj_handle_t handle; /* handle to a file or directory */
3560 int unlink; /* whether to unlink file on close */
3561 @END
3564 /* set fd name information */
3565 @REQ(set_fd_name_info)
3566 obj_handle_t handle; /* handle to a file or directory */
3567 obj_handle_t rootdir; /* root directory */
3568 int link; /* link instead of renaming */
3569 VARARG(filename,string); /* new file name */
3570 @END
3573 /* Retrieve layered info for a window */
3574 @REQ(get_window_layered_info)
3575 user_handle_t handle; /* handle to the window */
3576 @REPLY
3577 unsigned int color_key; /* color key */
3578 unsigned int alpha; /* alpha (0..255) */
3579 unsigned int flags; /* LWA_* flags */
3580 @END
3583 /* Set layered info for a window */
3584 @REQ(set_window_layered_info)
3585 user_handle_t handle; /* handle to the window */
3586 unsigned int color_key; /* color key */
3587 unsigned int alpha; /* alpha (0..255) */
3588 unsigned int flags; /* LWA_* flags */
3589 @END
3592 /* Allocate an arbitrary user handle */
3593 @REQ(alloc_user_handle)
3594 @REPLY
3595 user_handle_t handle; /* allocated handle */
3596 @END
3599 /* Free an arbitrary user handle */
3600 @REQ(free_user_handle)
3601 user_handle_t handle; /* handle to free*/
3602 @END
3605 /* Set/get the current cursor */
3606 @REQ(set_cursor)
3607 unsigned int flags; /* flags for fields to set (see below) */
3608 user_handle_t handle; /* handle to the cursor */
3609 int show_count; /* show count increment/decrement */
3610 int x; /* cursor position */
3611 int y;
3612 rectangle_t clip; /* cursor clip rectangle */
3613 unsigned int clip_msg; /* message to post on cursor clip changes */
3614 @REPLY
3615 user_handle_t prev_handle; /* previous handle */
3616 int prev_count; /* previous show count */
3617 int prev_x; /* previous position */
3618 int prev_y;
3619 int new_x; /* new position */
3620 int new_y;
3621 rectangle_t new_clip; /* new clip rectangle */
3622 unsigned int last_change; /* time of last position change */
3623 @END
3624 #define SET_CURSOR_HANDLE 0x01
3625 #define SET_CURSOR_COUNT 0x02
3626 #define SET_CURSOR_POS 0x04
3627 #define SET_CURSOR_CLIP 0x08
3628 #define SET_CURSOR_NOCLIP 0x10
3631 /* Modify the list of registered rawinput devices */
3632 @REQ(update_rawinput_devices)
3633 VARARG(devices,rawinput_devices);
3634 @END
3637 /* Retrieve the suspended context of a thread */
3638 @REQ(get_suspend_context)
3639 @REPLY
3640 VARARG(context,context); /* thread context */
3641 @END
3644 /* Store the suspend context of a thread */
3645 @REQ(set_suspend_context)
3646 VARARG(context,context); /* thread context */
3647 @END
3650 /* Create a new job object */
3651 @REQ(create_job)
3652 unsigned int access; /* wanted access rights */
3653 VARARG(objattr,object_attributes); /* object attributes */
3654 @REPLY
3655 obj_handle_t handle; /* handle to the job */
3656 @END
3659 /* Open a job object */
3660 @REQ(open_job)
3661 unsigned int access; /* wanted access rights */
3662 unsigned int attributes; /* object attributes */
3663 obj_handle_t rootdir; /* root directory */
3664 VARARG(name,unicode_str); /* object name */
3665 @REPLY
3666 obj_handle_t handle; /* handle to the job */
3667 @END
3670 /* Assign a job object to a process */
3671 @REQ(assign_job)
3672 obj_handle_t job; /* handle to the job */
3673 obj_handle_t process; /* handle to the process */
3674 @END
3677 /* Check if a process is associated with a job */
3678 @REQ(process_in_job)
3679 obj_handle_t job; /* handle to the job */
3680 obj_handle_t process; /* handle to the process */
3681 @END
3684 /* Set limit flags on a job */
3685 @REQ(set_job_limits)
3686 obj_handle_t handle; /* handle to the job */
3687 unsigned int limit_flags; /* new limit flags */
3688 @END
3691 /* Set new completion port for a job */
3692 @REQ(set_job_completion_port)
3693 obj_handle_t job; /* handle to the job */
3694 obj_handle_t port; /* handle to the completion port */
3695 client_ptr_t key; /* key to send with completion messages */
3696 @END
3699 /* Terminate all processes associated with the job */
3700 @REQ(terminate_job)
3701 obj_handle_t handle; /* handle to the job */
3702 int status; /* process exit code */
3703 @END