d3dcompiler: Share the source with d3dcompiler_46.
[wine.git] / server / protocol.def
blob9e5e416341e7e2e876ea7e8dafdfe1d48b208fc7
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 data_size_t sd_len; /* length of security_descriptor data. may be 0 */
397 data_size_t name_len; /* length of the name string. may be 0 */
398 /* VARARG(sd,security_descriptor); */
399 /* VARARG(name,unicode_str); */
402 struct token_groups
404 unsigned int count;
405 /* unsigned int attributes[count]; */
406 /* VARARG(sids,SID); */
409 enum select_op
411 SELECT_NONE,
412 SELECT_WAIT,
413 SELECT_WAIT_ALL,
414 SELECT_SIGNAL_AND_WAIT,
415 SELECT_KEYED_EVENT_WAIT,
416 SELECT_KEYED_EVENT_RELEASE
419 typedef union
421 enum select_op op;
422 struct
424 enum select_op op; /* SELECT_WAIT or SELECT_WAIT_ALL */
425 obj_handle_t handles[MAXIMUM_WAIT_OBJECTS];
426 } wait;
427 struct
429 enum select_op op; /* SELECT_SIGNAL_AND_WAIT */
430 obj_handle_t wait;
431 obj_handle_t signal; /* must be last in the structure so we can remove it on retries */
432 } signal_and_wait;
433 struct
435 enum select_op op; /* SELECT_KEYED_EVENT_WAIT or SELECT_KEYED_EVENT_RELEASE */
436 obj_handle_t handle;
437 client_ptr_t key;
438 } keyed_event;
439 } select_op_t;
441 enum apc_type
443 APC_NONE,
444 APC_USER,
445 APC_TIMER,
446 APC_ASYNC_IO,
447 APC_VIRTUAL_ALLOC,
448 APC_VIRTUAL_FREE,
449 APC_VIRTUAL_QUERY,
450 APC_VIRTUAL_PROTECT,
451 APC_VIRTUAL_FLUSH,
452 APC_VIRTUAL_LOCK,
453 APC_VIRTUAL_UNLOCK,
454 APC_MAP_VIEW,
455 APC_UNMAP_VIEW,
456 APC_CREATE_THREAD
459 typedef union
461 enum apc_type type;
462 struct
464 enum apc_type type; /* APC_USER */
465 int __pad;
466 client_ptr_t func; /* void (__stdcall *func)(ULONG_PTR,ULONG_PTR,ULONG_PTR); */
467 apc_param_t args[3]; /* arguments for user function */
468 } user;
469 struct
471 enum apc_type type; /* APC_TIMER */
472 int __pad;
473 client_ptr_t func; /* void (__stdcall *func)(void*, unsigned int, unsigned int); */
474 timeout_t time; /* absolute time of expiration */
475 client_ptr_t arg; /* user argument */
476 } timer;
477 struct
479 enum apc_type type; /* APC_ASYNC_IO */
480 unsigned int status; /* I/O status */
481 client_ptr_t func; /* unsigned int (*func)(void*, void*, unsigned int, void**, void**); */
482 client_ptr_t user; /* user pointer */
483 client_ptr_t sb; /* status block */
484 } async_io;
485 struct
487 enum apc_type type; /* APC_VIRTUAL_ALLOC */
488 unsigned int op_type; /* type of operation */
489 client_ptr_t addr; /* requested address */
490 mem_size_t size; /* allocation size */
491 unsigned int zero_bits; /* allocation alignment */
492 unsigned int prot; /* memory protection flags */
493 } virtual_alloc;
494 struct
496 enum apc_type type; /* APC_VIRTUAL_FREE */
497 unsigned int op_type; /* type of operation */
498 client_ptr_t addr; /* requested address */
499 mem_size_t size; /* allocation size */
500 } virtual_free;
501 struct
503 enum apc_type type; /* APC_VIRTUAL_QUERY */
504 int __pad;
505 client_ptr_t addr; /* requested address */
506 } virtual_query;
507 struct
509 enum apc_type type; /* APC_VIRTUAL_PROTECT */
510 unsigned int prot; /* new protection flags */
511 client_ptr_t addr; /* requested address */
512 mem_size_t size; /* requested size */
513 } virtual_protect;
514 struct
516 enum apc_type type; /* APC_VIRTUAL_FLUSH */
517 int __pad;
518 client_ptr_t addr; /* requested address */
519 mem_size_t size; /* requested size */
520 } virtual_flush;
521 struct
523 enum apc_type type; /* APC_VIRTUAL_LOCK */
524 int __pad;
525 client_ptr_t addr; /* requested address */
526 mem_size_t size; /* requested size */
527 } virtual_lock;
528 struct
530 enum apc_type type; /* APC_VIRTUAL_UNLOCK */
531 int __pad;
532 client_ptr_t addr; /* requested address */
533 mem_size_t size; /* requested size */
534 } virtual_unlock;
535 struct
537 enum apc_type type; /* APC_MAP_VIEW */
538 obj_handle_t handle; /* mapping handle */
539 client_ptr_t addr; /* requested address */
540 mem_size_t size; /* allocation size */
541 file_pos_t offset; /* file offset */
542 unsigned int alloc_type;/* allocation type */
543 unsigned short zero_bits; /* allocation alignment */
544 unsigned short prot; /* memory protection flags */
545 } map_view;
546 struct
548 enum apc_type type; /* APC_UNMAP_VIEW */
549 int __pad;
550 client_ptr_t addr; /* view address */
551 } unmap_view;
552 struct
554 enum apc_type type; /* APC_CREATE_THREAD */
555 int suspend; /* suspended thread? */
556 client_ptr_t func; /* void (__stdcall *func)(void*); start function */
557 client_ptr_t arg; /* argument for start function */
558 mem_size_t reserve; /* reserve size for thread stack */
559 mem_size_t commit; /* commit size for thread stack */
560 } create_thread;
561 } apc_call_t;
563 typedef union
565 enum apc_type type;
566 struct
568 enum apc_type type; /* APC_ASYNC_IO */
569 unsigned int status; /* new status of async operation */
570 client_ptr_t apc; /* user APC to call */
571 client_ptr_t arg; /* user APC argument */
572 unsigned int total; /* bytes transferred */
573 } async_io;
574 struct
576 enum apc_type type; /* APC_VIRTUAL_ALLOC */
577 unsigned int status; /* status returned by call */
578 client_ptr_t addr; /* resulting address */
579 mem_size_t size; /* resulting size */
580 } virtual_alloc;
581 struct
583 enum apc_type type; /* APC_VIRTUAL_FREE */
584 unsigned int status; /* status returned by call */
585 client_ptr_t addr; /* resulting address */
586 mem_size_t size; /* resulting size */
587 } virtual_free;
588 struct
590 enum apc_type type; /* APC_VIRTUAL_QUERY */
591 unsigned int status; /* status returned by call */
592 client_ptr_t base; /* resulting base address */
593 client_ptr_t alloc_base;/* resulting allocation base */
594 mem_size_t size; /* resulting region size */
595 unsigned short state; /* resulting region state */
596 unsigned short prot; /* resulting region protection */
597 unsigned short alloc_prot;/* resulting allocation protection */
598 unsigned short alloc_type;/* resulting region allocation type */
599 } virtual_query;
600 struct
602 enum apc_type type; /* APC_VIRTUAL_PROTECT */
603 unsigned int status; /* status returned by call */
604 client_ptr_t addr; /* resulting address */
605 mem_size_t size; /* resulting size */
606 unsigned int prot; /* old protection flags */
607 } virtual_protect;
608 struct
610 enum apc_type type; /* APC_VIRTUAL_FLUSH */
611 unsigned int status; /* status returned by call */
612 client_ptr_t addr; /* resulting address */
613 mem_size_t size; /* resulting size */
614 } virtual_flush;
615 struct
617 enum apc_type type; /* APC_VIRTUAL_LOCK */
618 unsigned int status; /* status returned by call */
619 client_ptr_t addr; /* resulting address */
620 mem_size_t size; /* resulting size */
621 } virtual_lock;
622 struct
624 enum apc_type type; /* APC_VIRTUAL_UNLOCK */
625 unsigned int status; /* status returned by call */
626 client_ptr_t addr; /* resulting address */
627 mem_size_t size; /* resulting size */
628 } virtual_unlock;
629 struct
631 enum apc_type type; /* APC_MAP_VIEW */
632 unsigned int status; /* status returned by call */
633 client_ptr_t addr; /* resulting address */
634 mem_size_t size; /* resulting size */
635 } map_view;
636 struct
638 enum apc_type type; /* APC_MAP_VIEW */
639 unsigned int status; /* status returned by call */
640 } unmap_view;
641 struct
643 enum apc_type type; /* APC_CREATE_THREAD */
644 unsigned int status; /* status returned by call */
645 thread_id_t tid; /* thread id */
646 obj_handle_t handle; /* handle to new thread */
647 } create_thread;
648 } apc_result_t;
650 typedef union
652 unsigned int major; /* irp major function */
653 struct
655 unsigned int major; /* IRP_MJ_READ */
656 unsigned int key; /* driver key */
657 file_pos_t pos; /* file position */
658 } read;
659 struct
661 unsigned int major; /* IRP_MJ_WRITE */
662 unsigned int key; /* driver key */
663 file_pos_t pos; /* file position */
664 } write;
665 struct
667 unsigned int major; /* IRP_MJ_DEVICE_CONTROL */
668 ioctl_code_t code; /* ioctl code */
669 } ioctl;
670 } irp_params_t;
672 struct rawinput_device
674 unsigned short usage_page;
675 unsigned short usage;
676 unsigned int flags;
677 user_handle_t target;
680 /****************************************************************/
681 /* Request declarations */
683 /* Create a new process from the context of the parent */
684 @REQ(new_process)
685 int inherit_all; /* inherit all handles from parent */
686 unsigned int create_flags; /* creation flags */
687 int socket_fd; /* file descriptor for process socket */
688 obj_handle_t exe_file; /* file handle for main exe */
689 unsigned int process_access; /* access rights for process object */
690 unsigned int process_attr; /* attributes for process object */
691 unsigned int thread_access; /* access rights for thread object */
692 unsigned int thread_attr; /* attributes for thread object */
693 cpu_type_t cpu; /* CPU that the new process will use */
694 data_size_t info_size; /* size of startup info */
695 VARARG(info,startup_info,info_size); /* startup information */
696 VARARG(env,unicode_str); /* environment for new process */
697 @REPLY
698 obj_handle_t info; /* new process info handle */
699 process_id_t pid; /* process id */
700 obj_handle_t phandle; /* process handle (in the current process) */
701 thread_id_t tid; /* thread id */
702 obj_handle_t thandle; /* thread handle (in the current process) */
703 @END
706 /* Retrieve information about a newly started process */
707 @REQ(get_new_process_info)
708 obj_handle_t info; /* info handle returned from new_process_request */
709 @REPLY
710 int success; /* did the process start successfully? */
711 int exit_code; /* process exit code if failed */
712 @END
715 /* Create a new thread from the context of the parent */
716 @REQ(new_thread)
717 unsigned int access; /* wanted access rights */
718 unsigned int attributes; /* object attributes */
719 int suspend; /* new thread should be suspended on creation */
720 int request_fd; /* fd for request pipe */
721 @REPLY
722 thread_id_t tid; /* thread id */
723 obj_handle_t handle; /* thread handle (in the current process) */
724 @END
727 /* Retrieve the new process startup info */
728 @REQ(get_startup_info)
729 @REPLY
730 obj_handle_t exe_file; /* file handle for main exe */
731 data_size_t info_size; /* size of startup info */
732 VARARG(info,startup_info,info_size); /* startup information */
733 VARARG(env,unicode_str); /* environment */
734 @END
737 /* Signal the end of the process initialization */
738 @REQ(init_process_done)
739 int gui; /* is it a GUI process? */
740 mod_handle_t module; /* main module base address */
741 client_ptr_t ldt_copy; /* address of LDT copy (in thread address space) */
742 client_ptr_t entry; /* process entry point */
743 @END
746 /* Initialize a thread; called from the child after fork()/clone() */
747 @REQ(init_thread)
748 int unix_pid; /* Unix pid of new thread */
749 int unix_tid; /* Unix tid of new thread */
750 int debug_level; /* new debug level */
751 client_ptr_t teb; /* TEB of new thread (in thread address space) */
752 client_ptr_t entry; /* entry point or PEB if initial thread (in thread address space) */
753 int reply_fd; /* fd for reply pipe */
754 int wait_fd; /* fd for blocking calls pipe */
755 cpu_type_t cpu; /* CPU that this thread is running on */
756 @REPLY
757 process_id_t pid; /* process id of the new thread's process */
758 thread_id_t tid; /* thread id of the new thread */
759 timeout_t server_start; /* server start time */
760 data_size_t info_size; /* total size of startup info */
761 int version; /* protocol version */
762 unsigned int all_cpus; /* bitset of supported CPUs */
763 @END
766 /* Terminate a process */
767 @REQ(terminate_process)
768 obj_handle_t handle; /* process handle to terminate */
769 int exit_code; /* process exit code */
770 @REPLY
771 int self; /* suicide? */
772 @END
775 /* Terminate a thread */
776 @REQ(terminate_thread)
777 obj_handle_t handle; /* thread handle to terminate */
778 int exit_code; /* thread exit code */
779 @REPLY
780 int self; /* suicide? */
781 int last; /* last thread in this process? */
782 @END
785 /* Retrieve information about a process */
786 @REQ(get_process_info)
787 obj_handle_t handle; /* process handle */
788 @REPLY
789 process_id_t pid; /* server process id */
790 process_id_t ppid; /* server process id of parent */
791 affinity_t affinity; /* process affinity mask */
792 client_ptr_t peb; /* PEB address in process address space */
793 timeout_t start_time; /* process start time */
794 timeout_t end_time; /* process end time */
795 int exit_code; /* process exit code */
796 int priority; /* priority class */
797 cpu_type_t cpu; /* CPU that this process is running on */
798 int debugger_present; /* process is being debugged */
799 @END
802 /* Set a process information */
803 @REQ(set_process_info)
804 obj_handle_t handle; /* process handle */
805 int mask; /* setting mask (see below) */
806 int priority; /* priority class */
807 affinity_t affinity; /* affinity mask */
808 @END
809 #define SET_PROCESS_INFO_PRIORITY 0x01
810 #define SET_PROCESS_INFO_AFFINITY 0x02
813 /* Retrieve information about a thread */
814 @REQ(get_thread_info)
815 obj_handle_t handle; /* thread handle */
816 thread_id_t tid_in; /* thread id (optional) */
817 @REPLY
818 process_id_t pid; /* server process id */
819 thread_id_t tid; /* server thread id */
820 client_ptr_t teb; /* thread teb pointer */
821 affinity_t affinity; /* thread affinity mask */
822 timeout_t creation_time; /* thread creation time */
823 timeout_t exit_time; /* thread exit time */
824 int exit_code; /* thread exit code */
825 int priority; /* thread priority level */
826 int last; /* last thread in process */
827 @END
830 /* Set a thread information */
831 @REQ(set_thread_info)
832 obj_handle_t handle; /* thread handle */
833 int mask; /* setting mask (see below) */
834 int priority; /* priority class */
835 affinity_t affinity; /* affinity mask */
836 obj_handle_t token; /* impersonation token */
837 @END
838 #define SET_THREAD_INFO_PRIORITY 0x01
839 #define SET_THREAD_INFO_AFFINITY 0x02
840 #define SET_THREAD_INFO_TOKEN 0x04
843 /* Retrieve information about a module */
844 @REQ(get_dll_info)
845 obj_handle_t handle; /* process handle */
846 mod_handle_t base_address; /* base address of module */
847 @REPLY
848 client_ptr_t entry_point;
849 data_size_t size; /* module size */
850 data_size_t filename_len; /* buffer len in bytes required to store filename */
851 VARARG(filename,unicode_str); /* file name of module */
852 @END
855 /* Suspend a thread */
856 @REQ(suspend_thread)
857 obj_handle_t handle; /* thread handle */
858 @REPLY
859 int count; /* new suspend count */
860 @END
863 /* Resume a thread */
864 @REQ(resume_thread)
865 obj_handle_t handle; /* thread handle */
866 @REPLY
867 int count; /* new suspend count */
868 @END
871 /* Notify the server that a dll has been loaded */
872 @REQ(load_dll)
873 obj_handle_t mapping; /* file mapping handle */
874 mod_handle_t base; /* base address */
875 client_ptr_t name; /* ptr to ptr to name (in process addr space) */
876 data_size_t size; /* dll size */
877 int dbg_offset; /* debug info offset */
878 int dbg_size; /* debug info size */
879 VARARG(filename,unicode_str); /* file name of dll */
880 @END
883 /* Notify the server that a dll is being unloaded */
884 @REQ(unload_dll)
885 mod_handle_t base; /* base address */
886 @END
889 /* Queue an APC for a thread or process */
890 @REQ(queue_apc)
891 obj_handle_t handle; /* thread or process handle */
892 apc_call_t call; /* call arguments */
893 @REPLY
894 obj_handle_t handle; /* APC handle */
895 int self; /* run APC in caller itself? */
896 @END
899 /* Get the result of an APC call */
900 @REQ(get_apc_result)
901 obj_handle_t handle; /* handle to the APC */
902 @REPLY
903 apc_result_t result; /* result of the APC */
904 @END
907 /* Close a handle for the current process */
908 @REQ(close_handle)
909 obj_handle_t handle; /* handle to close */
910 @END
913 /* Set a handle information */
914 @REQ(set_handle_info)
915 obj_handle_t handle; /* handle we are interested in */
916 int flags; /* new handle flags */
917 int mask; /* mask for flags to set */
918 @REPLY
919 int old_flags; /* old flag value */
920 @END
923 /* Duplicate a handle */
924 @REQ(dup_handle)
925 obj_handle_t src_process; /* src process handle */
926 obj_handle_t src_handle; /* src handle to duplicate */
927 obj_handle_t dst_process; /* dst process handle */
928 unsigned int access; /* wanted access rights */
929 unsigned int attributes; /* object attributes */
930 unsigned int options; /* duplicate options (see below) */
931 @REPLY
932 obj_handle_t handle; /* duplicated handle in dst process */
933 int self; /* is the source the current process? */
934 int closed; /* whether the source handle has been closed */
935 @END
936 #define DUP_HANDLE_CLOSE_SOURCE DUPLICATE_CLOSE_SOURCE
937 #define DUP_HANDLE_SAME_ACCESS DUPLICATE_SAME_ACCESS
938 #define DUP_HANDLE_MAKE_GLOBAL 0x80000000 /* Not a Windows flag */
941 /* Open a handle to a process */
942 @REQ(open_process)
943 process_id_t pid; /* process id to open */
944 unsigned int access; /* wanted access rights */
945 unsigned int attributes; /* object attributes */
946 @REPLY
947 obj_handle_t handle; /* handle to the process */
948 @END
951 /* Open a handle to a thread */
952 @REQ(open_thread)
953 thread_id_t tid; /* thread id to open */
954 unsigned int access; /* wanted access rights */
955 unsigned int attributes; /* object attributes */
956 @REPLY
957 obj_handle_t handle; /* handle to the thread */
958 @END
961 /* Wait for handles */
962 @REQ(select)
963 int flags; /* wait flags (see below) */
964 client_ptr_t cookie; /* magic cookie to return to client */
965 timeout_t timeout; /* timeout */
966 obj_handle_t prev_apc; /* handle to previous APC */
967 VARARG(result,apc_result); /* result of previous APC */
968 VARARG(data,select_op); /* operation-specific data */
969 @REPLY
970 timeout_t timeout; /* timeout converted to absolute */
971 apc_call_t call; /* APC call arguments */
972 obj_handle_t apc_handle; /* handle to next APC */
973 @END
974 #define SELECT_ALERTABLE 1
975 #define SELECT_INTERRUPTIBLE 2
978 /* Create an event */
979 @REQ(create_event)
980 unsigned int access; /* wanted access rights */
981 unsigned int attributes; /* object attributes */
982 int manual_reset; /* manual reset event */
983 int initial_state; /* initial state of the event */
984 VARARG(objattr,object_attributes); /* object attributes */
985 @REPLY
986 obj_handle_t handle; /* handle to the event */
987 @END
989 /* Event operation */
990 @REQ(event_op)
991 obj_handle_t handle; /* handle to event */
992 int op; /* event operation (see below) */
993 @END
994 enum event_op { PULSE_EVENT, SET_EVENT, RESET_EVENT };
996 @REQ(query_event)
997 obj_handle_t handle; /* handle to event */
998 @REPLY
999 int manual_reset; /* manual reset event */
1000 int state; /* current state of the event */
1001 @END
1003 /* Open an event */
1004 @REQ(open_event)
1005 unsigned int access; /* wanted access rights */
1006 unsigned int attributes; /* object attributes */
1007 obj_handle_t rootdir; /* root directory */
1008 VARARG(name,unicode_str); /* object name */
1009 @REPLY
1010 obj_handle_t handle; /* handle to the event */
1011 @END
1014 /* Create a keyed event */
1015 @REQ(create_keyed_event)
1016 unsigned int access; /* wanted access rights */
1017 unsigned int attributes; /* object attributes */
1018 VARARG(objattr,object_attributes); /* object attributes */
1019 @REPLY
1020 obj_handle_t handle; /* handle to the event */
1021 @END
1023 /* Open a keyed event */
1024 @REQ(open_keyed_event)
1025 unsigned int access; /* wanted access rights */
1026 unsigned int attributes; /* object attributes */
1027 obj_handle_t rootdir; /* root directory */
1028 VARARG(name,unicode_str); /* object name */
1029 @REPLY
1030 obj_handle_t handle; /* handle to the event */
1031 @END
1034 /* Create a mutex */
1035 @REQ(create_mutex)
1036 unsigned int access; /* wanted access rights */
1037 unsigned int attributes; /* object attributes */
1038 int owned; /* initially owned? */
1039 VARARG(objattr,object_attributes); /* object attributes */
1040 @REPLY
1041 obj_handle_t handle; /* handle to the mutex */
1042 @END
1045 /* Release a mutex */
1046 @REQ(release_mutex)
1047 obj_handle_t handle; /* handle to the mutex */
1048 @REPLY
1049 unsigned int prev_count; /* value of internal counter, before release */
1050 @END
1053 /* Open a mutex */
1054 @REQ(open_mutex)
1055 unsigned int access; /* wanted access rights */
1056 unsigned int attributes; /* object attributes */
1057 obj_handle_t rootdir; /* root directory */
1058 VARARG(name,unicode_str); /* object name */
1059 @REPLY
1060 obj_handle_t handle; /* handle to the mutex */
1061 @END
1064 /* Create a semaphore */
1065 @REQ(create_semaphore)
1066 unsigned int access; /* wanted access rights */
1067 unsigned int attributes; /* object attributes */
1068 unsigned int initial; /* initial count */
1069 unsigned int max; /* maximum count */
1070 VARARG(objattr,object_attributes); /* object attributes */
1071 @REPLY
1072 obj_handle_t handle; /* handle to the semaphore */
1073 @END
1076 /* Release a semaphore */
1077 @REQ(release_semaphore)
1078 obj_handle_t handle; /* handle to the semaphore */
1079 unsigned int count; /* count to add to semaphore */
1080 @REPLY
1081 unsigned int prev_count; /* previous semaphore count */
1082 @END
1084 @REQ(query_semaphore)
1085 obj_handle_t handle; /* handle to the semaphore */
1086 @REPLY
1087 unsigned int current; /* current count */
1088 unsigned int max; /* maximum count */
1089 @END
1091 /* Open a semaphore */
1092 @REQ(open_semaphore)
1093 unsigned int access; /* wanted access rights */
1094 unsigned int attributes; /* object attributes */
1095 obj_handle_t rootdir; /* root directory */
1096 VARARG(name,unicode_str); /* object name */
1097 @REPLY
1098 obj_handle_t handle; /* handle to the semaphore */
1099 @END
1102 /* Create a file */
1103 @REQ(create_file)
1104 unsigned int access; /* wanted access rights */
1105 unsigned int attributes; /* object attributes */
1106 unsigned int sharing; /* sharing flags */
1107 int create; /* file create action */
1108 unsigned int options; /* file options */
1109 unsigned int attrs; /* file attributes for creation */
1110 VARARG(objattr,object_attributes); /* object attributes */
1111 VARARG(filename,string); /* file name */
1112 @REPLY
1113 obj_handle_t handle; /* handle to the file */
1114 @END
1117 /* Open a file object */
1118 @REQ(open_file_object)
1119 unsigned int access; /* wanted access rights */
1120 unsigned int attributes; /* open attributes */
1121 obj_handle_t rootdir; /* root directory */
1122 unsigned int sharing; /* sharing flags */
1123 unsigned int options; /* file options */
1124 VARARG(filename,unicode_str); /* file name */
1125 @REPLY
1126 obj_handle_t handle; /* handle to the file */
1127 @END
1130 /* Allocate a file handle for a Unix fd */
1131 @REQ(alloc_file_handle)
1132 unsigned int access; /* wanted access rights */
1133 unsigned int attributes; /* object attributes */
1134 int fd; /* file descriptor on the client side */
1135 @REPLY
1136 obj_handle_t handle; /* handle to the file */
1137 @END
1140 /* Get the Unix name from a file handle */
1141 @REQ(get_handle_unix_name)
1142 obj_handle_t handle; /* file handle */
1143 @REPLY
1144 data_size_t name_len; /* unix name length */
1145 VARARG(name,string); /* unix name */
1146 @END
1149 /* Get a Unix fd to access a file */
1150 @REQ(get_handle_fd)
1151 obj_handle_t handle; /* handle to the file */
1152 @REPLY
1153 int type; /* file type (see below) */
1154 int cacheable; /* can fd be cached in the client? */
1155 unsigned int access; /* file access rights */
1156 unsigned int options; /* file open options */
1157 @END
1158 enum server_fd_type
1160 FD_TYPE_INVALID, /* invalid file (no associated fd) */
1161 FD_TYPE_FILE, /* regular file */
1162 FD_TYPE_DIR, /* directory */
1163 FD_TYPE_SOCKET, /* socket */
1164 FD_TYPE_SERIAL, /* serial port */
1165 FD_TYPE_PIPE, /* named pipe */
1166 FD_TYPE_MAILSLOT, /* mailslot */
1167 FD_TYPE_CHAR, /* unspecified char device */
1168 FD_TYPE_DEVICE, /* Windows device file */
1169 FD_TYPE_NB_TYPES
1173 /* Flush a file buffers */
1174 @REQ(flush)
1175 int blocking; /* whether it's a blocking flush */
1176 async_data_t async; /* async I/O parameters */
1177 @REPLY
1178 obj_handle_t event; /* event set when finished */
1179 @END
1182 /* Lock a region of a file */
1183 @REQ(lock_file)
1184 obj_handle_t handle; /* handle to the file */
1185 file_pos_t offset; /* offset of start of lock */
1186 file_pos_t count; /* count of bytes to lock */
1187 int shared; /* shared or exclusive lock? */
1188 int wait; /* do we want to wait? */
1189 @REPLY
1190 obj_handle_t handle; /* handle to wait on */
1191 int overlapped; /* is it an overlapped I/O handle? */
1192 @END
1195 /* Unlock a region of a file */
1196 @REQ(unlock_file)
1197 obj_handle_t handle; /* handle to the file */
1198 file_pos_t offset; /* offset of start of unlock */
1199 file_pos_t count; /* count of bytes to unlock */
1200 @END
1203 /* Create a socket */
1204 @REQ(create_socket)
1205 unsigned int access; /* wanted access rights */
1206 unsigned int attributes; /* object attributes */
1207 int family; /* family, see socket manpage */
1208 int type; /* type, see socket manpage */
1209 int protocol; /* protocol, see socket manpage */
1210 unsigned int flags; /* socket flags */
1211 @REPLY
1212 obj_handle_t handle; /* handle to the new socket */
1213 @END
1216 /* Accept a socket */
1217 @REQ(accept_socket)
1218 obj_handle_t lhandle; /* handle to the listening socket */
1219 unsigned int access; /* wanted access rights */
1220 unsigned int attributes; /* object attributes */
1221 @REPLY
1222 obj_handle_t handle; /* handle to the new socket */
1223 @END
1226 /* Accept into an initialized socket */
1227 @REQ(accept_into_socket)
1228 obj_handle_t lhandle; /* handle to the listening socket */
1229 obj_handle_t ahandle; /* handle to the accepting socket */
1230 @END
1233 /* Set socket event parameters */
1234 @REQ(set_socket_event)
1235 obj_handle_t handle; /* handle to the socket */
1236 unsigned int mask; /* event mask */
1237 obj_handle_t event; /* event object */
1238 user_handle_t window; /* window to send the message to */
1239 unsigned int msg; /* message to send */
1240 @END
1243 /* Get socket event parameters */
1244 @REQ(get_socket_event)
1245 obj_handle_t handle; /* handle to the socket */
1246 int service; /* clear pending? */
1247 obj_handle_t c_event; /* event to clear */
1248 @REPLY
1249 unsigned int mask; /* event mask */
1250 unsigned int pmask; /* pending events */
1251 unsigned int state; /* status bits */
1252 VARARG(errors,ints); /* event errors */
1253 @END
1256 /* Get socket info */
1257 @REQ(get_socket_info)
1258 obj_handle_t handle; /* handle to the socket */
1259 @REPLY
1260 int family; /* family, see socket manpage */
1261 int type; /* type, see socket manpage */
1262 int protocol; /* protocol, see socket manpage */
1263 @END
1266 /* Re-enable pending socket events */
1267 @REQ(enable_socket_event)
1268 obj_handle_t handle; /* handle to the socket */
1269 unsigned int mask; /* events to re-enable */
1270 unsigned int sstate; /* status bits to set */
1271 unsigned int cstate; /* status bits to clear */
1272 @END
1274 @REQ(set_socket_deferred)
1275 obj_handle_t handle; /* handle to the socket */
1276 obj_handle_t deferred; /* handle to the socket for which accept() is deferred */
1277 @END
1279 /* Allocate a console (only used by a console renderer) */
1280 @REQ(alloc_console)
1281 unsigned int access; /* wanted access rights */
1282 unsigned int attributes; /* object attributes */
1283 process_id_t pid; /* pid of process which shall be attached to the console */
1284 int input_fd; /* if pid=-1 (bare console to current process), fd for input */
1285 @REPLY
1286 obj_handle_t handle_in; /* handle to console input */
1287 obj_handle_t event; /* handle to renderer events change notification */
1288 @END
1291 /* Free the console of the current process */
1292 @REQ(free_console)
1293 @END
1296 #define CONSOLE_RENDERER_NONE_EVENT 0x00
1297 #define CONSOLE_RENDERER_TITLE_EVENT 0x01
1298 #define CONSOLE_RENDERER_ACTIVE_SB_EVENT 0x02
1299 #define CONSOLE_RENDERER_SB_RESIZE_EVENT 0x03
1300 #define CONSOLE_RENDERER_UPDATE_EVENT 0x04
1301 #define CONSOLE_RENDERER_CURSOR_POS_EVENT 0x05
1302 #define CONSOLE_RENDERER_CURSOR_GEOM_EVENT 0x06
1303 #define CONSOLE_RENDERER_DISPLAY_EVENT 0x07
1304 #define CONSOLE_RENDERER_EXIT_EVENT 0x08
1305 struct console_renderer_event
1307 short event;
1308 union
1310 struct update
1312 short top;
1313 short bottom;
1314 } update;
1315 struct resize
1317 short width;
1318 short height;
1319 } resize;
1320 struct cursor_pos
1322 short x;
1323 short y;
1324 } cursor_pos;
1325 struct cursor_geom
1327 short visible;
1328 short size;
1329 } cursor_geom;
1330 struct display
1332 short left;
1333 short top;
1334 short width;
1335 short height;
1336 } display;
1337 } u;
1340 /* retrieve console events for the renderer */
1341 @REQ(get_console_renderer_events)
1342 obj_handle_t handle; /* handle to console input events */
1343 @REPLY
1344 VARARG(data,bytes); /* the various console_renderer_events */
1345 @END
1348 /* Open a handle to the process console */
1349 @REQ(open_console)
1350 obj_handle_t from; /* 0 (resp 1) input (resp output) of current process console */
1351 /* otherwise console_in handle to get active screen buffer? */
1352 unsigned int access; /* wanted access rights */
1353 unsigned int attributes; /* object attributes */
1354 int share; /* share mask (only for output handles) */
1355 @REPLY
1356 obj_handle_t handle; /* handle to the console */
1357 @END
1360 /* Get the input queue wait event */
1361 @REQ(get_console_wait_event)
1362 @REPLY
1363 obj_handle_t handle;
1364 @END
1366 /* Get a console mode (input or output) */
1367 @REQ(get_console_mode)
1368 obj_handle_t handle; /* handle to the console */
1369 @REPLY
1370 int mode; /* console mode */
1371 @END
1374 /* Set a console mode (input or output) */
1375 @REQ(set_console_mode)
1376 obj_handle_t handle; /* handle to the console */
1377 int mode; /* console mode */
1378 @END
1381 /* Set info about a console (input only) */
1382 @REQ(set_console_input_info)
1383 obj_handle_t handle; /* handle to console input, or 0 for process' console */
1384 int mask; /* setting mask (see below) */
1385 obj_handle_t active_sb; /* active screen buffer */
1386 int history_mode; /* whether we duplicate lines in history */
1387 int history_size; /* number of lines in history */
1388 int edition_mode; /* index to the edition mode flavors */
1389 int input_cp; /* console input codepage */
1390 int output_cp; /* console output codepage */
1391 user_handle_t win; /* console window if backend supports it */
1392 VARARG(title,unicode_str); /* console title */
1393 @END
1394 #define SET_CONSOLE_INPUT_INFO_ACTIVE_SB 0x01
1395 #define SET_CONSOLE_INPUT_INFO_TITLE 0x02
1396 #define SET_CONSOLE_INPUT_INFO_HISTORY_MODE 0x04
1397 #define SET_CONSOLE_INPUT_INFO_HISTORY_SIZE 0x08
1398 #define SET_CONSOLE_INPUT_INFO_EDITION_MODE 0x10
1399 #define SET_CONSOLE_INPUT_INFO_INPUT_CODEPAGE 0x20
1400 #define SET_CONSOLE_INPUT_INFO_OUTPUT_CODEPAGE 0x40
1401 #define SET_CONSOLE_INPUT_INFO_WIN 0x80
1404 /* Get info about a console (input only) */
1405 @REQ(get_console_input_info)
1406 obj_handle_t handle; /* handle to console input, or 0 for process' console */
1407 @REPLY
1408 int history_mode; /* whether we duplicate lines in history */
1409 int history_size; /* number of lines in history */
1410 int history_index; /* number of used lines in history */
1411 int edition_mode; /* index to the edition mode flavors */
1412 int input_cp; /* console input codepage */
1413 int output_cp; /* console output codepage */
1414 user_handle_t win; /* console window if backend supports it */
1415 VARARG(title,unicode_str); /* console title */
1416 @END
1419 /* appends a string to console's history */
1420 @REQ(append_console_input_history)
1421 obj_handle_t handle; /* handle to console input, or 0 for process' console */
1422 VARARG(line,unicode_str); /* line to add */
1423 @END
1426 /* appends a string to console's history */
1427 @REQ(get_console_input_history)
1428 obj_handle_t handle; /* handle to console input, or 0 for process' console */
1429 int index; /* index to get line from */
1430 @REPLY
1431 int total; /* total length of line in Unicode chars */
1432 VARARG(line,unicode_str); /* line to add */
1433 @END
1436 /* creates a new screen buffer on process' console */
1437 @REQ(create_console_output)
1438 obj_handle_t handle_in; /* handle to console input, or 0 for process' console */
1439 unsigned int access; /* wanted access rights */
1440 unsigned int attributes; /* object attributes */
1441 unsigned int share; /* sharing credentials */
1442 int fd; /* for bare consoles, fd the screen-buffer is attached to */
1443 @REPLY
1444 obj_handle_t handle_out; /* handle to the screen buffer */
1445 @END
1448 /* Set info about a console (output only) */
1449 @REQ(set_console_output_info)
1450 obj_handle_t handle; /* handle to the console */
1451 int mask; /* setting mask (see below) */
1452 short int cursor_size; /* size of cursor (percentage filled) */
1453 short int cursor_visible;/* cursor visibility flag */
1454 short int cursor_x; /* position of cursor (x, y) */
1455 short int cursor_y;
1456 short int width; /* width of the screen buffer */
1457 short int height; /* height of the screen buffer */
1458 short int attr; /* default attribute */
1459 short int win_left; /* window actually displayed by renderer */
1460 short int win_top; /* the rect area is expressed within the */
1461 short int win_right; /* boundaries of the screen buffer */
1462 short int win_bottom;
1463 short int max_width; /* maximum size (width x height) for the window */
1464 short int max_height;
1465 @END
1466 #define SET_CONSOLE_OUTPUT_INFO_CURSOR_GEOM 0x01
1467 #define SET_CONSOLE_OUTPUT_INFO_CURSOR_POS 0x02
1468 #define SET_CONSOLE_OUTPUT_INFO_SIZE 0x04
1469 #define SET_CONSOLE_OUTPUT_INFO_ATTR 0x08
1470 #define SET_CONSOLE_OUTPUT_INFO_DISPLAY_WINDOW 0x10
1471 #define SET_CONSOLE_OUTPUT_INFO_MAX_SIZE 0x20
1474 /* Get info about a console (output only) */
1475 @REQ(get_console_output_info)
1476 obj_handle_t handle; /* handle to the console */
1477 @REPLY
1478 short int cursor_size; /* size of cursor (percentage filled) */
1479 short int cursor_visible;/* cursor visibility flag */
1480 short int cursor_x; /* position of cursor (x, y) */
1481 short int cursor_y;
1482 short int width; /* width of the screen buffer */
1483 short int height; /* height of the screen buffer */
1484 short int attr; /* default attribute */
1485 short int win_left; /* window actually displayed by renderer */
1486 short int win_top; /* the rect area is expressed within the */
1487 short int win_right; /* boundaries of the screen buffer */
1488 short int win_bottom;
1489 short int max_width; /* maximum size (width x height) for the window */
1490 short int max_height;
1491 @END
1493 /* Add input records to a console input queue */
1494 @REQ(write_console_input)
1495 obj_handle_t handle; /* handle to the console input */
1496 VARARG(rec,input_records); /* input records */
1497 @REPLY
1498 int written; /* number of records written */
1499 @END
1502 /* Fetch input records from a console input queue */
1503 @REQ(read_console_input)
1504 obj_handle_t handle; /* handle to the console input */
1505 int flush; /* flush the retrieved records from the queue? */
1506 @REPLY
1507 int read; /* number of records read */
1508 VARARG(rec,input_records); /* input records */
1509 @END
1512 /* write data (chars and/or attributes) in a screen buffer */
1513 @REQ(write_console_output)
1514 obj_handle_t handle; /* handle to the console output */
1515 int x; /* position where to start writing */
1516 int y;
1517 int mode; /* char info (see below) */
1518 int wrap; /* wrap around at end of line? */
1519 VARARG(data,bytes); /* info to write */
1520 @REPLY
1521 int written; /* number of char infos actually written */
1522 int width; /* width of screen buffer */
1523 int height; /* height of screen buffer */
1524 @END
1525 enum char_info_mode
1527 CHAR_INFO_MODE_TEXT, /* characters only */
1528 CHAR_INFO_MODE_ATTR, /* attributes only */
1529 CHAR_INFO_MODE_TEXTATTR, /* both characters and attributes */
1530 CHAR_INFO_MODE_TEXTSTDATTR /* characters but use standard attributes */
1534 /* fill a screen buffer with constant data (chars and/or attributes) */
1535 @REQ(fill_console_output)
1536 obj_handle_t handle; /* handle to the console output */
1537 int x; /* position where to start writing */
1538 int y;
1539 int mode; /* char info mode */
1540 int count; /* number to write */
1541 int wrap; /* wrap around at end of line? */
1542 char_info_t data; /* data to write */
1543 @REPLY
1544 int written; /* number of char infos actually written */
1545 @END
1548 /* read data (chars and/or attributes) from a screen buffer */
1549 @REQ(read_console_output)
1550 obj_handle_t handle; /* handle to the console output */
1551 int x; /* position (x,y) where to start reading */
1552 int y;
1553 int mode; /* char info mode */
1554 int wrap; /* wrap around at end of line? */
1555 @REPLY
1556 int width; /* width of screen buffer */
1557 int height; /* height of screen buffer */
1558 VARARG(data,bytes);
1559 @END
1562 /* move a rect (of data) in screen buffer content */
1563 @REQ(move_console_output)
1564 obj_handle_t handle; /* handle to the console output */
1565 short int x_src; /* position (x, y) of rect to start moving from */
1566 short int y_src;
1567 short int x_dst; /* position (x, y) of rect to move to */
1568 short int y_dst;
1569 short int w; /* size of the rect (width, height) to move */
1570 short int h;
1571 @END
1574 /* Sends a signal to a process group */
1575 @REQ(send_console_signal)
1576 int signal; /* the signal to send */
1577 process_id_t group_id; /* the group to send the signal to */
1578 @END
1581 /* enable directory change notifications */
1582 @REQ(read_directory_changes)
1583 unsigned int filter; /* notification filter */
1584 int subtree; /* watch the subtree? */
1585 int want_data; /* flag indicating whether change data should be collected */
1586 async_data_t async; /* async I/O parameters */
1587 @END
1590 @REQ(read_change)
1591 obj_handle_t handle;
1592 @REPLY
1593 VARARG(events,filesystem_event); /* collected filesystem events */
1594 @END
1597 /* Create a file mapping */
1598 @REQ(create_mapping)
1599 unsigned int access; /* wanted access rights */
1600 unsigned int attributes; /* object attributes */
1601 unsigned int protect; /* protection flags (see below) */
1602 mem_size_t size; /* mapping size */
1603 obj_handle_t file_handle; /* file handle */
1604 VARARG(objattr,object_attributes); /* object attributes */
1605 @REPLY
1606 obj_handle_t handle; /* handle to the mapping */
1607 @END
1608 /* per-page protection flags */
1609 #define VPROT_READ 0x01
1610 #define VPROT_WRITE 0x02
1611 #define VPROT_EXEC 0x04
1612 #define VPROT_WRITECOPY 0x08
1613 #define VPROT_GUARD 0x10
1614 #define VPROT_NOCACHE 0x20
1615 #define VPROT_COMMITTED 0x40
1616 #define VPROT_WRITEWATCH 0x80
1617 /* per-mapping protection flags */
1618 #define VPROT_IMAGE 0x0100 /* mapping for an exe image */
1619 #define VPROT_SYSTEM 0x0200 /* system view (underlying mmap not under our control) */
1620 #define VPROT_VALLOC 0x0400 /* allocated by VirtualAlloc */
1621 #define VPROT_NOEXEC 0x0800 /* don't force exec permission */
1624 /* Open a mapping */
1625 @REQ(open_mapping)
1626 unsigned int access; /* wanted access rights */
1627 unsigned int attributes; /* object attributes */
1628 obj_handle_t rootdir; /* root directory */
1629 VARARG(name,unicode_str); /* object name */
1630 @REPLY
1631 obj_handle_t handle; /* handle to the mapping */
1632 @END
1635 /* Get information about a file mapping */
1636 @REQ(get_mapping_info)
1637 obj_handle_t handle; /* handle to the mapping */
1638 unsigned int access; /* wanted access rights */
1639 @REPLY
1640 mem_size_t size; /* mapping size */
1641 int protect; /* protection flags */
1642 int header_size; /* header size (for VPROT_IMAGE mapping) */
1643 client_ptr_t base; /* default base addr (for VPROT_IMAGE mapping) */
1644 obj_handle_t mapping; /* duplicate mapping handle unless removable */
1645 obj_handle_t shared_file; /* shared mapping file handle */
1646 @END
1649 /* Get a range of committed pages in a file mapping */
1650 @REQ(get_mapping_committed_range)
1651 obj_handle_t handle; /* handle to the mapping */
1652 file_pos_t offset; /* starting offset (page-aligned, in bytes) */
1653 @REPLY
1654 mem_size_t size; /* size of range starting at offset (page-aligned, in bytes) */
1655 int committed; /* whether it is a committed range */
1656 @END
1659 /* Add a range to the committed pages in a file mapping */
1660 @REQ(add_mapping_committed_range)
1661 obj_handle_t handle; /* handle to the mapping */
1662 file_pos_t offset; /* starting offset (page-aligned, in bytes) */
1663 mem_size_t size; /* size to set (page-aligned, in bytes) or 0 if only retrieving */
1664 @END
1667 #define SNAP_PROCESS 0x00000001
1668 #define SNAP_THREAD 0x00000002
1669 /* Create a snapshot */
1670 @REQ(create_snapshot)
1671 unsigned int attributes; /* object attributes */
1672 unsigned int flags; /* snapshot flags (SNAP_*) */
1673 @REPLY
1674 obj_handle_t handle; /* handle to the snapshot */
1675 @END
1678 /* Get the next process from a snapshot */
1679 @REQ(next_process)
1680 obj_handle_t handle; /* handle to the snapshot */
1681 int reset; /* reset snapshot position? */
1682 @REPLY
1683 int count; /* process usage count */
1684 process_id_t pid; /* process id */
1685 process_id_t ppid; /* parent process id */
1686 int threads; /* number of threads */
1687 int priority; /* process priority */
1688 int handles; /* number of handles */
1689 int unix_pid; /* Unix pid */
1690 VARARG(filename,unicode_str); /* file name of main exe */
1691 @END
1694 /* Get the next thread from a snapshot */
1695 @REQ(next_thread)
1696 obj_handle_t handle; /* handle to the snapshot */
1697 int reset; /* reset snapshot position? */
1698 @REPLY
1699 int count; /* thread usage count */
1700 process_id_t pid; /* process id */
1701 thread_id_t tid; /* thread id */
1702 int base_pri; /* base priority */
1703 int delta_pri; /* delta priority */
1704 @END
1707 /* Wait for a debug event */
1708 @REQ(wait_debug_event)
1709 int get_handle; /* should we alloc a handle for waiting? */
1710 @REPLY
1711 process_id_t pid; /* process id */
1712 thread_id_t tid; /* thread id */
1713 obj_handle_t wait; /* wait handle if no event ready */
1714 VARARG(event,debug_event); /* debug event data */
1715 @END
1718 /* Queue an exception event */
1719 @REQ(queue_exception_event)
1720 int first; /* first chance exception? */
1721 unsigned int code; /* exception code */
1722 unsigned int flags; /* exception flags */
1723 client_ptr_t record; /* exception record */
1724 client_ptr_t address; /* exception address */
1725 data_size_t len; /* size of parameters */
1726 VARARG(params,uints64,len);/* exception parameters */
1727 VARARG(context,context); /* thread context */
1728 @REPLY
1729 obj_handle_t handle; /* handle to the queued event */
1730 @END
1733 /* Retrieve the status of an exception event */
1734 @REQ(get_exception_status)
1735 obj_handle_t handle; /* handle to the queued event */
1736 @REPLY
1737 VARARG(context,context); /* modified thread context */
1738 @END
1741 /* Continue a debug event */
1742 @REQ(continue_debug_event)
1743 process_id_t pid; /* process id to continue */
1744 thread_id_t tid; /* thread id to continue */
1745 int status; /* continuation status */
1746 @END
1749 /* Start/stop debugging an existing process */
1750 @REQ(debug_process)
1751 process_id_t pid; /* id of the process to debug */
1752 int attach; /* 1=attaching / 0=detaching from the process */
1753 @END
1756 /* Simulate a breakpoint in a process */
1757 @REQ(debug_break)
1758 obj_handle_t handle; /* process handle */
1759 @REPLY
1760 int self; /* was it the caller itself? */
1761 @END
1764 /* Set debugger kill on exit flag */
1765 @REQ(set_debugger_kill_on_exit)
1766 int kill_on_exit; /* 0=detach/1=kill debuggee when debugger dies */
1767 @END
1770 /* Read data from a process address space */
1771 @REQ(read_process_memory)
1772 obj_handle_t handle; /* process handle */
1773 client_ptr_t addr; /* addr to read from */
1774 @REPLY
1775 VARARG(data,bytes); /* result data */
1776 @END
1779 /* Write data to a process address space */
1780 @REQ(write_process_memory)
1781 obj_handle_t handle; /* process handle */
1782 client_ptr_t addr; /* addr to write to */
1783 VARARG(data,bytes); /* data to write */
1784 @END
1787 /* Create a registry key */
1788 @REQ(create_key)
1789 obj_handle_t parent; /* handle to the parent key */
1790 unsigned int access; /* desired access rights */
1791 unsigned int attributes; /* object attributes */
1792 unsigned int options; /* creation options */
1793 data_size_t namelen; /* length of key name in bytes */
1794 VARARG(name,unicode_str,namelen); /* key name */
1795 VARARG(class,unicode_str); /* class name */
1796 @REPLY
1797 obj_handle_t hkey; /* handle to the created key */
1798 int created; /* has it been newly created? */
1799 @END
1801 /* Open a registry key */
1802 @REQ(open_key)
1803 obj_handle_t parent; /* handle to the parent key */
1804 unsigned int access; /* desired access rights */
1805 unsigned int attributes; /* object attributes */
1806 VARARG(name,unicode_str); /* key name */
1807 @REPLY
1808 obj_handle_t hkey; /* handle to the open key */
1809 @END
1812 /* Delete a registry key */
1813 @REQ(delete_key)
1814 obj_handle_t hkey; /* handle to the key */
1815 @END
1818 /* Flush a registry key */
1819 @REQ(flush_key)
1820 obj_handle_t hkey; /* handle to the key */
1821 @END
1824 /* Enumerate registry subkeys */
1825 @REQ(enum_key)
1826 obj_handle_t hkey; /* handle to registry key */
1827 int index; /* index of subkey (or -1 for current key) */
1828 int info_class; /* requested information class */
1829 @REPLY
1830 int subkeys; /* number of subkeys */
1831 int max_subkey; /* longest subkey name */
1832 int max_class; /* longest class name */
1833 int values; /* number of values */
1834 int max_value; /* longest value name */
1835 int max_data; /* longest value data */
1836 timeout_t modif; /* last modification time */
1837 data_size_t total; /* total length needed for full name and class */
1838 data_size_t namelen; /* length of key name in bytes */
1839 VARARG(name,unicode_str,namelen); /* key name */
1840 VARARG(class,unicode_str); /* class name */
1841 @END
1844 /* Set a value of a registry key */
1845 @REQ(set_key_value)
1846 obj_handle_t hkey; /* handle to registry key */
1847 int type; /* value type */
1848 data_size_t namelen; /* length of value name in bytes */
1849 VARARG(name,unicode_str,namelen); /* value name */
1850 VARARG(data,bytes); /* value data */
1851 @END
1854 /* Retrieve the value of a registry key */
1855 @REQ(get_key_value)
1856 obj_handle_t hkey; /* handle to registry key */
1857 VARARG(name,unicode_str); /* value name */
1858 @REPLY
1859 int type; /* value type */
1860 data_size_t total; /* total length needed for data */
1861 VARARG(data,bytes); /* value data */
1862 @END
1865 /* Enumerate a value of a registry key */
1866 @REQ(enum_key_value)
1867 obj_handle_t hkey; /* handle to registry key */
1868 int index; /* value index */
1869 int info_class; /* requested information class */
1870 @REPLY
1871 int type; /* value type */
1872 data_size_t total; /* total length needed for full name and data */
1873 data_size_t namelen; /* length of value name in bytes */
1874 VARARG(name,unicode_str,namelen); /* value name */
1875 VARARG(data,bytes); /* value data */
1876 @END
1879 /* Delete a value of a registry key */
1880 @REQ(delete_key_value)
1881 obj_handle_t hkey; /* handle to registry key */
1882 VARARG(name,unicode_str); /* value name */
1883 @END
1886 /* Load a registry branch from a file */
1887 @REQ(load_registry)
1888 obj_handle_t hkey; /* root key to load to */
1889 obj_handle_t file; /* file to load from */
1890 VARARG(name,unicode_str); /* subkey name */
1891 @END
1894 /* UnLoad a registry branch from a file */
1895 @REQ(unload_registry)
1896 obj_handle_t hkey; /* root key to unload to */
1897 @END
1900 /* Save a registry branch to a file */
1901 @REQ(save_registry)
1902 obj_handle_t hkey; /* key to save */
1903 obj_handle_t file; /* file to save to */
1904 @END
1907 /* Add a registry key change notification */
1908 @REQ(set_registry_notification)
1909 obj_handle_t hkey; /* key to watch for changes */
1910 obj_handle_t event; /* event to set */
1911 int subtree; /* should we watch the whole subtree? */
1912 unsigned int filter; /* things to watch */
1913 @END
1916 /* Create a waitable timer */
1917 @REQ(create_timer)
1918 unsigned int access; /* wanted access rights */
1919 unsigned int attributes; /* object attributes */
1920 obj_handle_t rootdir; /* root directory */
1921 int manual; /* manual reset */
1922 VARARG(name,unicode_str); /* object name */
1923 @REPLY
1924 obj_handle_t handle; /* handle to the timer */
1925 @END
1928 /* Open a waitable timer */
1929 @REQ(open_timer)
1930 unsigned int access; /* wanted access rights */
1931 unsigned int attributes; /* object attributes */
1932 obj_handle_t rootdir; /* root directory */
1933 VARARG(name,unicode_str); /* object name */
1934 @REPLY
1935 obj_handle_t handle; /* handle to the timer */
1936 @END
1938 /* Set a waitable timer */
1939 @REQ(set_timer)
1940 obj_handle_t handle; /* handle to the timer */
1941 timeout_t expire; /* next expiration absolute time */
1942 client_ptr_t callback; /* callback function */
1943 client_ptr_t arg; /* callback argument */
1944 int period; /* timer period in ms */
1945 @REPLY
1946 int signaled; /* was the timer signaled before this call ? */
1947 @END
1949 /* Cancel a waitable timer */
1950 @REQ(cancel_timer)
1951 obj_handle_t handle; /* handle to the timer */
1952 @REPLY
1953 int signaled; /* was the timer signaled before this calltime ? */
1954 @END
1956 /* Get information on a waitable timer */
1957 @REQ(get_timer_info)
1958 obj_handle_t handle; /* handle to the timer */
1959 @REPLY
1960 timeout_t when; /* absolute time when the timer next expires */
1961 int signaled; /* is the timer signaled? */
1962 @END
1965 /* Retrieve the current context of a thread */
1966 @REQ(get_thread_context)
1967 obj_handle_t handle; /* thread handle */
1968 unsigned int flags; /* context flags */
1969 int suspend; /* suspend the thread if needed */
1970 @REPLY
1971 int self; /* was it a handle to the current thread? */
1972 VARARG(context,context); /* thread context */
1973 @END
1976 /* Set the current context of a thread */
1977 @REQ(set_thread_context)
1978 obj_handle_t handle; /* thread handle */
1979 int suspend; /* suspend the thread if needed */
1980 VARARG(context,context); /* thread context */
1981 @REPLY
1982 int self; /* was it a handle to the current thread? */
1983 @END
1986 /* Fetch a selector entry for a thread */
1987 @REQ(get_selector_entry)
1988 obj_handle_t handle; /* thread handle */
1989 int entry; /* LDT entry */
1990 @REPLY
1991 unsigned int base; /* selector base */
1992 unsigned int limit; /* selector limit */
1993 unsigned char flags; /* selector flags */
1994 @END
1997 /* Add an atom */
1998 @REQ(add_atom)
1999 obj_handle_t table; /* which table to add atom to */
2000 VARARG(name,unicode_str); /* atom name */
2001 @REPLY
2002 atom_t atom; /* resulting atom */
2003 @END
2006 /* Delete an atom */
2007 @REQ(delete_atom)
2008 obj_handle_t table; /* which table to delete atom from */
2009 atom_t atom; /* atom handle */
2010 @END
2013 /* Find an atom */
2014 @REQ(find_atom)
2015 obj_handle_t table; /* which table to find atom from */
2016 VARARG(name,unicode_str); /* atom name */
2017 @REPLY
2018 atom_t atom; /* atom handle */
2019 @END
2022 /* Get information about an atom */
2023 @REQ(get_atom_information)
2024 obj_handle_t table; /* which table to find atom from */
2025 atom_t atom; /* atom handle */
2026 @REPLY
2027 int count; /* atom lock count */
2028 int pinned; /* whether the atom has been pinned */
2029 data_size_t total; /* actual length of atom name */
2030 VARARG(name,unicode_str); /* atom name */
2031 @END
2034 /* Set information about an atom */
2035 @REQ(set_atom_information)
2036 obj_handle_t table; /* which table to find atom from */
2037 atom_t atom; /* atom handle */
2038 int pinned; /* whether to bump atom information */
2039 @END
2042 /* Empty an atom table */
2043 @REQ(empty_atom_table)
2044 obj_handle_t table; /* which table to find atom from */
2045 int if_pinned; /* whether to delete pinned atoms */
2046 @END
2049 /* Init an atom table */
2050 @REQ(init_atom_table)
2051 int entries; /* number of entries (only for local) */
2052 @REPLY
2053 obj_handle_t table; /* handle to the atom table */
2054 @END
2057 /* Get the message queue of the current thread */
2058 @REQ(get_msg_queue)
2059 @REPLY
2060 obj_handle_t handle; /* handle to the queue */
2061 @END
2064 /* Set the file descriptor associated to the current thread queue */
2065 @REQ(set_queue_fd)
2066 obj_handle_t handle; /* handle to the file descriptor */
2067 @END
2070 /* Set the current message queue wakeup mask */
2071 @REQ(set_queue_mask)
2072 unsigned int wake_mask; /* wakeup bits mask */
2073 unsigned int changed_mask; /* changed bits mask */
2074 int skip_wait; /* will we skip waiting if signaled? */
2075 @REPLY
2076 unsigned int wake_bits; /* current wake bits */
2077 unsigned int changed_bits; /* current changed bits */
2078 @END
2081 /* Get the current message queue status */
2082 @REQ(get_queue_status)
2083 unsigned int clear_bits; /* should we clear the change bits? */
2084 @REPLY
2085 unsigned int wake_bits; /* wake bits */
2086 unsigned int changed_bits; /* changed bits since last time */
2087 @END
2090 /* Retrieve the process idle event */
2091 @REQ(get_process_idle_event)
2092 obj_handle_t handle; /* process handle */
2093 @REPLY
2094 obj_handle_t event; /* handle to idle event */
2095 @END
2098 /* Send a message to a thread queue */
2099 @REQ(send_message)
2100 thread_id_t id; /* thread id */
2101 int type; /* message type (see below) */
2102 int flags; /* message flags (see below) */
2103 user_handle_t win; /* window handle */
2104 unsigned int msg; /* message code */
2105 lparam_t wparam; /* parameters */
2106 lparam_t lparam; /* parameters */
2107 timeout_t timeout; /* timeout for reply */
2108 VARARG(data,message_data); /* message data for sent messages */
2109 @END
2111 @REQ(post_quit_message)
2112 int exit_code; /* exit code to return */
2113 @END
2115 enum message_type
2117 MSG_ASCII, /* Ascii message (from SendMessageA) */
2118 MSG_UNICODE, /* Unicode message (from SendMessageW) */
2119 MSG_NOTIFY, /* notify message (from SendNotifyMessageW), always Unicode */
2120 MSG_CALLBACK, /* callback message (from SendMessageCallbackW), always Unicode */
2121 MSG_CALLBACK_RESULT,/* result of a callback message */
2122 MSG_OTHER_PROCESS, /* sent from other process, may include vararg data, always Unicode */
2123 MSG_POSTED, /* posted message (from PostMessageW), always Unicode */
2124 MSG_HARDWARE, /* hardware message */
2125 MSG_WINEVENT, /* winevent message */
2126 MSG_HOOK_LL /* low-level hardware hook */
2128 #define SEND_MSG_ABORT_IF_HUNG 0x01
2131 /* Send a hardware message to a thread queue */
2132 @REQ(send_hardware_message)
2133 user_handle_t win; /* window handle */
2134 hw_input_t input; /* input data */
2135 unsigned int flags; /* flags (see below) */
2136 @REPLY
2137 int wait; /* do we need to wait for a reply? */
2138 int prev_x; /* previous cursor position */
2139 int prev_y;
2140 int new_x; /* new cursor position */
2141 int new_y;
2142 VARARG(keystate,bytes); /* global state array for all the keys */
2143 @END
2144 #define SEND_HWMSG_INJECTED 0x01
2147 /* Get a message from the current queue */
2148 @REQ(get_message)
2149 unsigned int flags; /* PM_* flags */
2150 user_handle_t get_win; /* window handle to get */
2151 unsigned int get_first; /* first message code to get */
2152 unsigned int get_last; /* last message code to get */
2153 unsigned int hw_id; /* id of the previous hardware message (or 0) */
2154 unsigned int wake_mask; /* wakeup bits mask */
2155 unsigned int changed_mask; /* changed bits mask */
2156 @REPLY
2157 user_handle_t win; /* window handle */
2158 unsigned int msg; /* message code */
2159 lparam_t wparam; /* parameters */
2160 lparam_t lparam; /* parameters */
2161 int type; /* message type */
2162 int x; /* message x position */
2163 int y; /* message y position */
2164 unsigned int time; /* message time */
2165 unsigned int active_hooks; /* active hooks bitmap */
2166 data_size_t total; /* total size of extra data */
2167 VARARG(data,message_data); /* message data for sent messages */
2168 @END
2171 /* Reply to a sent message */
2172 @REQ(reply_message)
2173 int remove; /* should we remove the message? */
2174 lparam_t result; /* message result */
2175 VARARG(data,bytes); /* message data for sent messages */
2176 @END
2179 /* Accept the current hardware message */
2180 @REQ(accept_hardware_message)
2181 unsigned int hw_id; /* id of the hardware message */
2182 int remove; /* should we remove the message? */
2183 @END
2186 /* Retrieve the reply for the last message sent */
2187 @REQ(get_message_reply)
2188 int cancel; /* cancel message if not ready? */
2189 @REPLY
2190 lparam_t result; /* message result */
2191 VARARG(data,bytes); /* message data for sent messages */
2192 @END
2195 /* Set a window timer */
2196 @REQ(set_win_timer)
2197 user_handle_t win; /* window handle */
2198 unsigned int msg; /* message to post */
2199 unsigned int rate; /* timer rate in ms */
2200 lparam_t id; /* timer id */
2201 lparam_t lparam; /* message lparam (callback proc) */
2202 @REPLY
2203 lparam_t id; /* timer id */
2204 @END
2207 /* Kill a window timer */
2208 @REQ(kill_win_timer)
2209 user_handle_t win; /* window handle */
2210 lparam_t id; /* timer id */
2211 unsigned int msg; /* message to post */
2212 @END
2215 /* check if the thread owning the window is hung */
2216 @REQ(is_window_hung)
2217 user_handle_t win; /* window handle */
2218 @REPLY
2219 int is_hung;
2220 @END
2223 /* Retrieve info about a serial port */
2224 @REQ(get_serial_info)
2225 obj_handle_t handle; /* handle to comm port */
2226 int flags;
2227 @REPLY
2228 unsigned int readinterval;
2229 unsigned int readconst;
2230 unsigned int readmult;
2231 unsigned int writeconst;
2232 unsigned int writemult;
2233 unsigned int eventmask;
2234 unsigned int cookie;
2235 unsigned int pending_write;
2236 @END
2239 /* Set info about a serial port */
2240 @REQ(set_serial_info)
2241 obj_handle_t handle; /* handle to comm port */
2242 int flags; /* bitmask to set values (see below) */
2243 unsigned int readinterval;
2244 unsigned int readconst;
2245 unsigned int readmult;
2246 unsigned int writeconst;
2247 unsigned int writemult;
2248 unsigned int eventmask;
2249 @END
2250 #define SERIALINFO_SET_TIMEOUTS 0x01
2251 #define SERIALINFO_SET_MASK 0x02
2252 #define SERIALINFO_PENDING_WRITE 0x04
2253 #define SERIALINFO_PENDING_WAIT 0x08
2256 /* Create an async I/O */
2257 @REQ(register_async)
2258 int type; /* type of queue to look after */
2259 async_data_t async; /* async I/O parameters */
2260 int count; /* count - usually # of bytes to be read/written */
2261 @END
2262 #define ASYNC_TYPE_READ 0x01
2263 #define ASYNC_TYPE_WRITE 0x02
2264 #define ASYNC_TYPE_WAIT 0x03
2267 /* Cancel all async op on a fd */
2268 @REQ(cancel_async)
2269 obj_handle_t handle; /* handle to comm port, socket or file */
2270 client_ptr_t iosb; /* I/O status block (NULL=all) */
2271 int only_thread; /* cancel matching this thread */
2272 @END
2275 /* Perform a read on a file object */
2276 @REQ(read)
2277 int blocking; /* whether it's a blocking read */
2278 async_data_t async; /* async I/O parameters */
2279 file_pos_t pos; /* read position */
2280 @REPLY
2281 obj_handle_t wait; /* handle to wait on for blocking read */
2282 unsigned int options; /* device open options */
2283 VARARG(data,bytes); /* read data */
2284 @END
2287 /* Perform a write on a file object */
2288 @REQ(write)
2289 int blocking; /* whether it's a blocking write */
2290 async_data_t async; /* async I/O parameters */
2291 file_pos_t pos; /* write position */
2292 VARARG(data,bytes); /* write data */
2293 @REPLY
2294 obj_handle_t wait; /* handle to wait on for blocking write */
2295 unsigned int options; /* device open options */
2296 data_size_t size; /* size written */
2297 @END
2300 /* Perform an ioctl on a file */
2301 @REQ(ioctl)
2302 ioctl_code_t code; /* ioctl code */
2303 async_data_t async; /* async I/O parameters */
2304 int blocking; /* whether it's a blocking ioctl */
2305 VARARG(in_data,bytes); /* ioctl input data */
2306 @REPLY
2307 obj_handle_t wait; /* handle to wait on for blocking ioctl */
2308 unsigned int options; /* device open options */
2309 VARARG(out_data,bytes); /* ioctl output data */
2310 @END
2313 /* Store results of an async irp */
2314 @REQ(set_irp_result)
2315 obj_handle_t manager; /* handle to the device manager */
2316 obj_handle_t handle; /* handle to the irp */
2317 unsigned int status; /* status of the irp */
2318 data_size_t size; /* result size (input or output depending on the operation) */
2319 VARARG(data,bytes); /* output data of the irp */
2320 @END
2323 /* Retrieve results of an async irp */
2324 @REQ(get_irp_result)
2325 obj_handle_t handle; /* handle to the device */
2326 client_ptr_t user_arg; /* user arg used to identify the request */
2327 @REPLY
2328 data_size_t size; /* result size (input or output depending on the operation) */
2329 VARARG(out_data,bytes); /* irp output data */
2330 @END
2333 /* Create a named pipe */
2334 @REQ(create_named_pipe)
2335 unsigned int access;
2336 unsigned int attributes; /* object attributes */
2337 unsigned int options;
2338 unsigned int sharing;
2339 unsigned int maxinstances;
2340 unsigned int outsize;
2341 unsigned int insize;
2342 timeout_t timeout;
2343 unsigned int flags;
2344 VARARG(objattr,object_attributes); /* object attributes */
2345 @REPLY
2346 obj_handle_t handle; /* handle to the pipe */
2347 @END
2349 /* flags in create_named_pipe and get_named_pipe_info */
2350 #define NAMED_PIPE_MESSAGE_STREAM_WRITE 0x0001
2351 #define NAMED_PIPE_MESSAGE_STREAM_READ 0x0002
2352 #define NAMED_PIPE_NONBLOCKING_MODE 0x0004
2353 #define NAMED_PIPE_SERVER_END 0x8000
2355 /* Get named pipe information by handle */
2356 @REQ(get_named_pipe_info)
2357 obj_handle_t handle;
2358 @REPLY
2359 unsigned int flags;
2360 unsigned int sharing;
2361 unsigned int maxinstances;
2362 unsigned int instances;
2363 unsigned int outsize;
2364 unsigned int insize;
2365 @END
2367 /* Set named pipe information by handle */
2368 @REQ(set_named_pipe_info)
2369 obj_handle_t handle;
2370 unsigned int flags;
2371 @END
2373 /* Create a window */
2374 @REQ(create_window)
2375 user_handle_t parent; /* parent window */
2376 user_handle_t owner; /* owner window */
2377 atom_t atom; /* class atom */
2378 mod_handle_t instance; /* module instance */
2379 VARARG(class,unicode_str); /* class name */
2380 @REPLY
2381 user_handle_t handle; /* created window */
2382 user_handle_t parent; /* full handle of parent */
2383 user_handle_t owner; /* full handle of owner */
2384 int extra; /* number of extra bytes */
2385 client_ptr_t class_ptr; /* pointer to class in client address space */
2386 @END
2389 /* Destroy a window */
2390 @REQ(destroy_window)
2391 user_handle_t handle; /* handle to the window */
2392 @END
2395 /* Retrieve the desktop window for the current thread */
2396 @REQ(get_desktop_window)
2397 int force; /* force creation if it doesn't exist */
2398 @REPLY
2399 user_handle_t top_window; /* handle to the desktop window */
2400 user_handle_t msg_window; /* handle to the top-level HWND_MESSAGE parent */
2401 @END
2404 /* Set a window owner */
2405 @REQ(set_window_owner)
2406 user_handle_t handle; /* handle to the window */
2407 user_handle_t owner; /* new owner */
2408 @REPLY
2409 user_handle_t full_owner; /* full handle of new owner */
2410 user_handle_t prev_owner; /* full handle of previous owner */
2411 @END
2414 /* Get information from a window handle */
2415 @REQ(get_window_info)
2416 user_handle_t handle; /* handle to the window */
2417 @REPLY
2418 user_handle_t full_handle; /* full 32-bit handle */
2419 user_handle_t last_active; /* last active popup */
2420 process_id_t pid; /* process owning the window */
2421 thread_id_t tid; /* thread owning the window */
2422 atom_t atom; /* class atom */
2423 int is_unicode; /* ANSI or unicode */
2424 @END
2427 /* Set some information in a window */
2428 @REQ(set_window_info)
2429 unsigned short flags; /* flags for fields to set (see below) */
2430 short int is_unicode; /* ANSI or unicode */
2431 user_handle_t handle; /* handle to the window */
2432 unsigned int style; /* window style */
2433 unsigned int ex_style; /* window extended style */
2434 unsigned int id; /* window id */
2435 mod_handle_t instance; /* creator instance */
2436 lparam_t user_data; /* user-specific data */
2437 int extra_offset; /* offset to set in extra bytes */
2438 data_size_t extra_size; /* size to set in extra bytes */
2439 lparam_t extra_value; /* value to set in extra bytes */
2440 @REPLY
2441 unsigned int old_style; /* old window style */
2442 unsigned int old_ex_style; /* old window extended style */
2443 mod_handle_t old_instance; /* old creator instance */
2444 lparam_t old_user_data; /* old user-specific data */
2445 lparam_t old_extra_value; /* old value in extra bytes */
2446 unsigned int old_id; /* old window id */
2447 @END
2448 #define SET_WIN_STYLE 0x01
2449 #define SET_WIN_EXSTYLE 0x02
2450 #define SET_WIN_ID 0x04
2451 #define SET_WIN_INSTANCE 0x08
2452 #define SET_WIN_USERDATA 0x10
2453 #define SET_WIN_EXTRA 0x20
2454 #define SET_WIN_UNICODE 0x40
2457 /* Set the parent of a window */
2458 @REQ(set_parent)
2459 user_handle_t handle; /* handle to the window */
2460 user_handle_t parent; /* handle to the parent */
2461 @REPLY
2462 user_handle_t old_parent; /* old parent window */
2463 user_handle_t full_parent; /* full handle of new parent */
2464 @END
2467 /* Get a list of the window parents, up to the root of the tree */
2468 @REQ(get_window_parents)
2469 user_handle_t handle; /* handle to the window */
2470 @REPLY
2471 int count; /* total count of parents */
2472 VARARG(parents,user_handles); /* parent handles */
2473 @END
2476 /* Get a list of the window children */
2477 @REQ(get_window_children)
2478 obj_handle_t desktop; /* handle to desktop */
2479 user_handle_t parent; /* parent window */
2480 atom_t atom; /* class atom for the listed children */
2481 thread_id_t tid; /* thread owning the listed children */
2482 VARARG(class,unicode_str); /* class name */
2483 @REPLY
2484 int count; /* total count of children */
2485 VARARG(children,user_handles); /* children handles */
2486 @END
2489 /* Get a list of the window children that contain a given point */
2490 @REQ(get_window_children_from_point)
2491 user_handle_t parent; /* parent window */
2492 int x; /* point in parent coordinates */
2493 int y;
2494 @REPLY
2495 int count; /* total count of children */
2496 VARARG(children,user_handles); /* children handles */
2497 @END
2500 /* Get window tree information from a window handle */
2501 @REQ(get_window_tree)
2502 user_handle_t handle; /* handle to the window */
2503 @REPLY
2504 user_handle_t parent; /* parent window */
2505 user_handle_t owner; /* owner window */
2506 user_handle_t next_sibling; /* next sibling in Z-order */
2507 user_handle_t prev_sibling; /* prev sibling in Z-order */
2508 user_handle_t first_sibling; /* first sibling in Z-order */
2509 user_handle_t last_sibling; /* last sibling in Z-order */
2510 user_handle_t first_child; /* first child */
2511 user_handle_t last_child; /* last child */
2512 @END
2514 /* Set the position and Z order of a window */
2515 @REQ(set_window_pos)
2516 unsigned short swp_flags; /* SWP_* flags */
2517 unsigned short paint_flags; /* paint flags (see below) */
2518 user_handle_t handle; /* handle to the window */
2519 user_handle_t previous; /* previous window in Z order */
2520 rectangle_t window; /* window rectangle (in parent coords) */
2521 rectangle_t client; /* client rectangle (in parent coords) */
2522 VARARG(valid,rectangles); /* valid rectangles from WM_NCCALCSIZE (in parent coords) */
2523 @REPLY
2524 unsigned int new_style; /* new window style */
2525 unsigned int new_ex_style; /* new window extended style */
2526 user_handle_t surface_win; /* window that needs a surface update */
2527 @END
2528 #define SET_WINPOS_PAINT_SURFACE 0x01 /* window has a paintable surface */
2529 #define SET_WINPOS_PIXEL_FORMAT 0x02 /* window has a custom pixel format */
2531 /* Get the window and client rectangles of a window */
2532 @REQ(get_window_rectangles)
2533 user_handle_t handle; /* handle to the window */
2534 int relative; /* coords relative to (see below) */
2535 @REPLY
2536 rectangle_t window; /* window rectangle */
2537 rectangle_t visible; /* visible part of the window rectangle */
2538 rectangle_t client; /* client rectangle */
2539 @END
2540 enum coords_relative
2542 COORDS_CLIENT, /* relative to client area */
2543 COORDS_WINDOW, /* relative to whole window area */
2544 COORDS_PARENT, /* relative to parent's client area */
2545 COORDS_SCREEN /* relative to screen origin */
2549 /* Get the window text */
2550 @REQ(get_window_text)
2551 user_handle_t handle; /* handle to the window */
2552 @REPLY
2553 VARARG(text,unicode_str); /* window text */
2554 @END
2557 /* Set the window text */
2558 @REQ(set_window_text)
2559 user_handle_t handle; /* handle to the window */
2560 VARARG(text,unicode_str); /* window text */
2561 @END
2564 /* Get the coordinates offset between two windows */
2565 @REQ(get_windows_offset)
2566 user_handle_t from; /* handle to the first window */
2567 user_handle_t to; /* handle to the second window */
2568 @REPLY
2569 int x; /* x coordinate offset */
2570 int y; /* y coordinate offset */
2571 int mirror; /* whether to mirror the x coordinate */
2572 @END
2575 /* Get the visible region of a window */
2576 @REQ(get_visible_region)
2577 user_handle_t window; /* handle to the window */
2578 unsigned int flags; /* DCX flags */
2579 @REPLY
2580 user_handle_t top_win; /* top window to clip against */
2581 rectangle_t top_rect; /* top window visible rect with screen coords */
2582 rectangle_t win_rect; /* window rect in screen coords */
2583 unsigned int paint_flags; /* paint flags (from SET_WINPOS_* flags) */
2584 data_size_t total_size; /* total size of the resulting region */
2585 VARARG(region,rectangles); /* list of rectangles for the region (in screen coords) */
2586 @END
2589 /* Get the visible surface region of a window */
2590 @REQ(get_surface_region)
2591 user_handle_t window; /* handle to the window */
2592 @REPLY
2593 rectangle_t visible_rect; /* window visible rect in screen coords */
2594 data_size_t total_size; /* total size of the resulting region */
2595 VARARG(region,rectangles); /* list of rectangles for the region (in screen coords) */
2596 @END
2599 /* Get the window region */
2600 @REQ(get_window_region)
2601 user_handle_t window; /* handle to the window */
2602 @REPLY
2603 data_size_t total_size; /* total size of the resulting region */
2604 VARARG(region,rectangles); /* list of rectangles for the region (in window coords) */
2605 @END
2608 /* Set the window region */
2609 @REQ(set_window_region)
2610 user_handle_t window; /* handle to the window */
2611 int redraw; /* redraw the window? */
2612 VARARG(region,rectangles); /* list of rectangles for the region (in window coords) */
2613 @END
2616 /* Get the window update region */
2617 @REQ(get_update_region)
2618 user_handle_t window; /* handle to the window */
2619 user_handle_t from_child; /* child to start searching from */
2620 unsigned int flags; /* update flags (see below) */
2621 @REPLY
2622 user_handle_t child; /* child to repaint (or window itself) */
2623 unsigned int flags; /* resulting update flags (see below) */
2624 data_size_t total_size; /* total size of the resulting region */
2625 VARARG(region,rectangles); /* list of rectangles for the region (in screen coords) */
2626 @END
2627 #define UPDATE_NONCLIENT 0x01 /* get region for repainting non-client area */
2628 #define UPDATE_ERASE 0x02 /* get region for erasing client area */
2629 #define UPDATE_PAINT 0x04 /* get region for painting client area */
2630 #define UPDATE_INTERNALPAINT 0x08 /* get region if internal paint is pending */
2631 #define UPDATE_ALLCHILDREN 0x10 /* force repaint of all children */
2632 #define UPDATE_NOCHILDREN 0x20 /* don't try to repaint any children */
2633 #define UPDATE_NOREGION 0x40 /* don't return a region, only the flags */
2634 #define UPDATE_DELAYED_ERASE 0x80 /* still needs erase after BeginPaint */
2637 /* Update the z order of a window so that a given rectangle is fully visible */
2638 @REQ(update_window_zorder)
2639 user_handle_t window; /* handle to the window */
2640 rectangle_t rect; /* rectangle that must be visible (in client coords) */
2641 @END
2644 /* Mark parts of a window as needing a redraw */
2645 @REQ(redraw_window)
2646 user_handle_t window; /* handle to the window */
2647 unsigned int flags; /* RDW_* flags */
2648 VARARG(region,rectangles); /* list of rectangles for the region (in window coords) */
2649 @END
2652 /* Set a window property */
2653 @REQ(set_window_property)
2654 user_handle_t window; /* handle to the window */
2655 lparam_t data; /* data to store */
2656 atom_t atom; /* property atom (if no name specified) */
2657 VARARG(name,unicode_str); /* property name */
2658 @END
2661 /* Remove a window property */
2662 @REQ(remove_window_property)
2663 user_handle_t window; /* handle to the window */
2664 atom_t atom; /* property atom (if no name specified) */
2665 VARARG(name,unicode_str); /* property name */
2666 @REPLY
2667 lparam_t data; /* data stored in property */
2668 @END
2671 /* Get a window property */
2672 @REQ(get_window_property)
2673 user_handle_t window; /* handle to the window */
2674 atom_t atom; /* property atom (if no name specified) */
2675 VARARG(name,unicode_str); /* property name */
2676 @REPLY
2677 lparam_t data; /* data stored in property */
2678 @END
2681 /* Get the list of properties of a window */
2682 @REQ(get_window_properties)
2683 user_handle_t window; /* handle to the window */
2684 @REPLY
2685 int total; /* total number of properties */
2686 VARARG(props,properties); /* list of properties */
2687 @END
2690 /* Create a window station */
2691 @REQ(create_winstation)
2692 unsigned int flags; /* window station flags */
2693 unsigned int access; /* wanted access rights */
2694 unsigned int attributes; /* object attributes */
2695 VARARG(name,unicode_str); /* object name */
2696 @REPLY
2697 obj_handle_t handle; /* handle to the window station */
2698 @END
2701 /* Open a handle to a window station */
2702 @REQ(open_winstation)
2703 unsigned int access; /* wanted access rights */
2704 unsigned int attributes; /* object attributes */
2705 VARARG(name,unicode_str); /* object name */
2706 @REPLY
2707 obj_handle_t handle; /* handle to the window station */
2708 @END
2711 /* Close a window station */
2712 @REQ(close_winstation)
2713 obj_handle_t handle; /* handle to the window station */
2714 @END
2717 /* Get the process current window station */
2718 @REQ(get_process_winstation)
2719 @REPLY
2720 obj_handle_t handle; /* handle to the window station */
2721 @END
2724 /* Set the process current window station */
2725 @REQ(set_process_winstation)
2726 obj_handle_t handle; /* handle to the window station */
2727 @END
2730 /* Enumerate window stations */
2731 @REQ(enum_winstation)
2732 unsigned int index; /* current index */
2733 @REPLY
2734 unsigned int next; /* next index */
2735 VARARG(name,unicode_str); /* window station name */
2736 @END
2739 /* Create a desktop */
2740 @REQ(create_desktop)
2741 unsigned int flags; /* desktop flags */
2742 unsigned int access; /* wanted access rights */
2743 unsigned int attributes; /* object attributes */
2744 VARARG(name,unicode_str); /* object name */
2745 @REPLY
2746 obj_handle_t handle; /* handle to the desktop */
2747 @END
2750 /* Open a handle to a desktop */
2751 @REQ(open_desktop)
2752 obj_handle_t winsta; /* window station to open (null allowed) */
2753 unsigned int flags; /* desktop flags */
2754 unsigned int access; /* wanted access rights */
2755 unsigned int attributes; /* object attributes */
2756 VARARG(name,unicode_str); /* object name */
2757 @REPLY
2758 obj_handle_t handle; /* handle to the desktop */
2759 @END
2762 /* Open a handle to current input desktop */
2763 @REQ(open_input_desktop)
2764 unsigned int flags; /* desktop flags */
2765 unsigned int access; /* wanted access rights */
2766 unsigned int attributes; /* object attributes */
2767 @REPLY
2768 obj_handle_t handle; /* handle to the desktop */
2769 @END
2772 /* Close a desktop */
2773 @REQ(close_desktop)
2774 obj_handle_t handle; /* handle to the desktop */
2775 @END
2778 /* Get the thread current desktop */
2779 @REQ(get_thread_desktop)
2780 thread_id_t tid; /* thread id */
2781 @REPLY
2782 obj_handle_t handle; /* handle to the desktop */
2783 @END
2786 /* Set the thread current desktop */
2787 @REQ(set_thread_desktop)
2788 obj_handle_t handle; /* handle to the desktop */
2789 @END
2792 /* Enumerate desktops */
2793 @REQ(enum_desktop)
2794 obj_handle_t winstation; /* handle to the window station */
2795 unsigned int index; /* current index */
2796 @REPLY
2797 unsigned int next; /* next index */
2798 VARARG(name,unicode_str); /* window station name */
2799 @END
2802 /* Get/set information about a user object (window station or desktop) */
2803 @REQ(set_user_object_info)
2804 obj_handle_t handle; /* handle to the object */
2805 unsigned int flags; /* information to set */
2806 unsigned int obj_flags; /* new object flags */
2807 @REPLY
2808 int is_desktop; /* is object a desktop? */
2809 unsigned int old_obj_flags; /* old object flags */
2810 VARARG(name,unicode_str); /* object name */
2811 @END
2812 #define SET_USER_OBJECT_FLAGS 1
2815 /* Register a hotkey */
2816 @REQ(register_hotkey)
2817 user_handle_t window; /* handle to the window */
2818 int id; /* hotkey identifier */
2819 unsigned int flags; /* modifier keys */
2820 unsigned int vkey; /* virtual key code */
2821 @REPLY
2822 int replaced; /* did we replace an existing hotkey? */
2823 unsigned int flags; /* flags of replaced hotkey */
2824 unsigned int vkey; /* virtual key code of replaced hotkey */
2825 @END
2828 /* Unregister a hotkey */
2829 @REQ(unregister_hotkey)
2830 user_handle_t window; /* handle to the window */
2831 int id; /* hotkey identifier */
2832 @REPLY
2833 unsigned int flags; /* flags of removed hotkey */
2834 unsigned int vkey; /* virtual key code of removed hotkey */
2835 @END
2838 /* Attach (or detach) thread inputs */
2839 @REQ(attach_thread_input)
2840 thread_id_t tid_from; /* thread to be attached */
2841 thread_id_t tid_to; /* thread to which tid_from should be attached */
2842 int attach; /* is it an attach? */
2843 @END
2846 /* Get input data for a given thread */
2847 @REQ(get_thread_input)
2848 thread_id_t tid; /* id of thread */
2849 @REPLY
2850 user_handle_t focus; /* handle to the focus window */
2851 user_handle_t capture; /* handle to the capture window */
2852 user_handle_t active; /* handle to the active window */
2853 user_handle_t foreground; /* handle to the global foreground window */
2854 user_handle_t menu_owner; /* handle to the menu owner */
2855 user_handle_t move_size; /* handle to the moving/resizing window */
2856 user_handle_t caret; /* handle to the caret window */
2857 user_handle_t cursor; /* handle to the cursor */
2858 int show_count; /* cursor show count */
2859 rectangle_t rect; /* caret rectangle */
2860 @END
2863 /* Get the time of the last input event */
2864 @REQ(get_last_input_time)
2865 @REPLY
2866 unsigned int time;
2867 @END
2870 /* Retrieve queue keyboard state for a given thread */
2871 @REQ(get_key_state)
2872 thread_id_t tid; /* id of thread */
2873 int key; /* optional key code or -1 */
2874 @REPLY
2875 unsigned char state; /* state of specified key */
2876 VARARG(keystate,bytes); /* state array for all the keys */
2877 @END
2879 /* Set queue keyboard state for a given thread */
2880 @REQ(set_key_state)
2881 thread_id_t tid; /* id of thread */
2882 int async; /* whether to change the async state too */
2883 VARARG(keystate,bytes); /* state array for all the keys */
2884 @END
2886 /* Set the system foreground window */
2887 @REQ(set_foreground_window)
2888 user_handle_t handle; /* handle to the foreground window */
2889 @REPLY
2890 user_handle_t previous; /* handle to the previous foreground window */
2891 int send_msg_old; /* whether we have to send a msg to the old window */
2892 int send_msg_new; /* whether we have to send a msg to the new window */
2893 @END
2895 /* Set the current thread focus window */
2896 @REQ(set_focus_window)
2897 user_handle_t handle; /* handle to the focus window */
2898 @REPLY
2899 user_handle_t previous; /* handle to the previous focus window */
2900 @END
2902 /* Set the current thread active window */
2903 @REQ(set_active_window)
2904 user_handle_t handle; /* handle to the active window */
2905 @REPLY
2906 user_handle_t previous; /* handle to the previous active window */
2907 @END
2909 /* Set the current thread capture window */
2910 @REQ(set_capture_window)
2911 user_handle_t handle; /* handle to the capture window */
2912 unsigned int flags; /* capture flags (see below) */
2913 @REPLY
2914 user_handle_t previous; /* handle to the previous capture window */
2915 user_handle_t full_handle; /* full 32-bit handle of new capture window */
2916 @END
2917 #define CAPTURE_MENU 0x01 /* capture is for a menu */
2918 #define CAPTURE_MOVESIZE 0x02 /* capture is for moving/resizing */
2921 /* Set the current thread caret window */
2922 @REQ(set_caret_window)
2923 user_handle_t handle; /* handle to the caret window */
2924 int width; /* caret width */
2925 int height; /* caret height */
2926 @REPLY
2927 user_handle_t previous; /* handle to the previous caret window */
2928 rectangle_t old_rect; /* previous caret rectangle */
2929 int old_hide; /* previous hide count */
2930 int old_state; /* previous caret state (1=on, 0=off) */
2931 @END
2934 /* Set the current thread caret information */
2935 @REQ(set_caret_info)
2936 unsigned int flags; /* caret flags (see below) */
2937 user_handle_t handle; /* handle to the caret window */
2938 int x; /* caret x position */
2939 int y; /* caret y position */
2940 int hide; /* increment for hide count (can be negative to show it) */
2941 int state; /* caret state (1=on, 0=off, -1=toggle current state) */
2942 @REPLY
2943 user_handle_t full_handle; /* handle to the current caret window */
2944 rectangle_t old_rect; /* previous caret rectangle */
2945 int old_hide; /* previous hide count */
2946 int old_state; /* previous caret state (1=on, 0=off) */
2947 @END
2948 #define SET_CARET_POS 0x01 /* set the caret position from x,y */
2949 #define SET_CARET_HIDE 0x02 /* increment the caret hide count */
2950 #define SET_CARET_STATE 0x04 /* set the caret on/off state */
2953 /* Set a window hook */
2954 @REQ(set_hook)
2955 int id; /* id of the hook */
2956 process_id_t pid; /* id of process to set the hook into */
2957 thread_id_t tid; /* id of thread to set the hook into */
2958 int event_min;
2959 int event_max;
2960 client_ptr_t proc; /* hook procedure */
2961 int flags;
2962 int unicode; /* is it a unicode hook? */
2963 VARARG(module,unicode_str); /* module name */
2964 @REPLY
2965 user_handle_t handle; /* handle to the hook */
2966 unsigned int active_hooks; /* active hooks bitmap */
2967 @END
2970 /* Remove a window hook */
2971 @REQ(remove_hook)
2972 user_handle_t handle; /* handle to the hook */
2973 client_ptr_t proc; /* hook procedure if handle is 0 */
2974 int id; /* id of the hook if handle is 0 */
2975 @REPLY
2976 unsigned int active_hooks; /* active hooks bitmap */
2977 @END
2980 /* Start calling a hook chain */
2981 @REQ(start_hook_chain)
2982 int id; /* id of the hook */
2983 int event; /* signalled event */
2984 user_handle_t window; /* handle to the event window */
2985 int object_id; /* object id for out of context winevent */
2986 int child_id; /* child id for out of context winevent */
2987 @REPLY
2988 user_handle_t handle; /* handle to the next hook */
2989 process_id_t pid; /* process id for low-level keyboard/mouse hooks */
2990 thread_id_t tid; /* thread id for low-level keyboard/mouse hooks */
2991 int unicode; /* is it a unicode hook? */
2992 client_ptr_t proc; /* hook procedure */
2993 unsigned int active_hooks; /* active hooks bitmap */
2994 VARARG(module,unicode_str); /* module name */
2995 @END
2998 /* Finished calling a hook chain */
2999 @REQ(finish_hook_chain)
3000 int id; /* id of the hook */
3001 @END
3004 /* Get the hook information */
3005 @REQ(get_hook_info)
3006 user_handle_t handle; /* handle to the current hook */
3007 int get_next; /* do we want info about current or next hook? */
3008 int event; /* signalled event */
3009 user_handle_t window; /* handle to the event window */
3010 int object_id; /* object id for out of context winevent */
3011 int child_id; /* child id for out of context winevent */
3012 @REPLY
3013 user_handle_t handle; /* handle to the hook */
3014 int id; /* id of the hook */
3015 process_id_t pid; /* process id for low-level keyboard/mouse hooks */
3016 thread_id_t tid; /* thread id for low-level keyboard/mouse hooks */
3017 client_ptr_t proc; /* hook procedure */
3018 int unicode; /* is it a unicode hook? */
3019 VARARG(module,unicode_str); /* module name */
3020 @END
3023 /* Create a window class */
3024 @REQ(create_class)
3025 int local; /* is it a local class? */
3026 atom_t atom; /* class atom */
3027 unsigned int style; /* class style */
3028 mod_handle_t instance; /* module instance */
3029 int extra; /* number of extra class bytes */
3030 int win_extra; /* number of window extra bytes */
3031 client_ptr_t client_ptr; /* pointer to class in client address space */
3032 VARARG(name,unicode_str); /* class name */
3033 @REPLY
3034 atom_t atom; /* resulting class atom */
3035 @END
3038 /* Destroy a window class */
3039 @REQ(destroy_class)
3040 atom_t atom; /* class atom */
3041 mod_handle_t instance; /* module instance */
3042 VARARG(name,unicode_str); /* class name */
3043 @REPLY
3044 client_ptr_t client_ptr; /* pointer to class in client address space */
3045 @END
3048 /* Set some information in a class */
3049 @REQ(set_class_info)
3050 user_handle_t window; /* handle to the window */
3051 unsigned int flags; /* flags for info to set (see below) */
3052 atom_t atom; /* class atom */
3053 unsigned int style; /* class style */
3054 int win_extra; /* number of window extra bytes */
3055 mod_handle_t instance; /* module instance */
3056 int extra_offset; /* offset to set in extra bytes */
3057 data_size_t extra_size; /* size to set in extra bytes */
3058 lparam_t extra_value; /* value to set in extra bytes */
3059 @REPLY
3060 atom_t old_atom; /* previous class atom */
3061 unsigned int old_style; /* previous class style */
3062 int old_extra; /* previous number of class extra bytes */
3063 int old_win_extra; /* previous number of window extra bytes */
3064 mod_handle_t old_instance; /* previous module instance */
3065 lparam_t old_extra_value; /* old value in extra bytes */
3066 @END
3067 #define SET_CLASS_ATOM 0x0001
3068 #define SET_CLASS_STYLE 0x0002
3069 #define SET_CLASS_WINEXTRA 0x0004
3070 #define SET_CLASS_INSTANCE 0x0008
3071 #define SET_CLASS_EXTRA 0x0010
3074 /* Set/get clipboard information */
3075 @REQ(set_clipboard_info)
3076 unsigned int flags; /* flags for fields to set (see below) */
3077 user_handle_t clipboard; /* clipboard window */
3078 user_handle_t owner; /* clipboard owner */
3079 user_handle_t viewer; /* first clipboard viewer */
3080 unsigned int seqno; /* change sequence number */
3081 @REPLY
3082 unsigned int flags; /* status flags (see below) */
3083 user_handle_t old_clipboard; /* old clipboard window */
3084 user_handle_t old_owner; /* old clipboard owner */
3085 user_handle_t old_viewer; /* old clipboard viewer */
3086 unsigned int seqno; /* current sequence number */
3087 @END
3089 #define SET_CB_OPEN 0x001
3090 #define SET_CB_VIEWER 0x004
3091 #define SET_CB_SEQNO 0x008
3092 #define SET_CB_RELOWNER 0x010
3093 #define SET_CB_CLOSE 0x020
3094 #define CB_OPEN 0x040
3095 #define CB_OWNER 0x080
3096 #define CB_PROCESS 0x100
3099 /* Empty the clipboard and grab ownership */
3100 @REQ(empty_clipboard)
3101 @END
3104 /* Open a security token */
3105 @REQ(open_token)
3106 obj_handle_t handle; /* handle to the thread or process */
3107 unsigned int access; /* access rights to the new token */
3108 unsigned int attributes;/* object attributes */
3109 unsigned int flags; /* flags (see below) */
3110 @REPLY
3111 obj_handle_t token; /* handle to the token */
3112 @END
3113 #define OPEN_TOKEN_THREAD 1
3114 #define OPEN_TOKEN_AS_SELF 2
3117 /* Set/get the global windows */
3118 @REQ(set_global_windows)
3119 unsigned int flags; /* flags for fields to set (see below) */
3120 user_handle_t shell_window; /* handle to the new shell window */
3121 user_handle_t shell_listview; /* handle to the new shell listview window */
3122 user_handle_t progman_window; /* handle to the new program manager window */
3123 user_handle_t taskman_window; /* handle to the new task manager window */
3124 @REPLY
3125 user_handle_t old_shell_window; /* handle to the shell window */
3126 user_handle_t old_shell_listview; /* handle to the shell listview window */
3127 user_handle_t old_progman_window; /* handle to the new program manager window */
3128 user_handle_t old_taskman_window; /* handle to the new task manager window */
3129 @END
3130 #define SET_GLOBAL_SHELL_WINDOWS 0x01 /* set both main shell and listview windows */
3131 #define SET_GLOBAL_PROGMAN_WINDOW 0x02
3132 #define SET_GLOBAL_TASKMAN_WINDOW 0x04
3134 /* Adjust the privileges held by a token */
3135 @REQ(adjust_token_privileges)
3136 obj_handle_t handle; /* handle to the token */
3137 int disable_all; /* disable all privileges? */
3138 int get_modified_state; /* get modified privileges? */
3139 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges to enable/disable/remove */
3140 @REPLY
3141 unsigned int len; /* total length in bytes required to store token privileges */
3142 VARARG(privileges,LUID_AND_ATTRIBUTES); /* modified privileges */
3143 @END
3145 /* Retrieves the set of privileges held by or available to a token */
3146 @REQ(get_token_privileges)
3147 obj_handle_t handle; /* handle to the token */
3148 @REPLY
3149 unsigned int len; /* total length in bytes required to store token privileges */
3150 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges held by or available to a token */
3151 @END
3153 /* Check the token has the required privileges */
3154 @REQ(check_token_privileges)
3155 obj_handle_t handle; /* handle to the token */
3156 int all_required; /* are all the privileges required for the check to succeed? */
3157 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges to check */
3158 @REPLY
3159 int has_privileges; /* does the token have the required privileges? */
3160 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges held by or available to a token */
3161 @END
3163 @REQ(duplicate_token)
3164 obj_handle_t handle; /* handle to the token to duplicate */
3165 unsigned int access; /* access rights to the new token */
3166 unsigned int attributes; /* object attributes */
3167 int primary; /* is the new token to be a primary one? */
3168 int impersonation_level; /* impersonation level of the new token */
3169 @REPLY
3170 obj_handle_t new_handle; /* duplicated handle */
3171 @END
3173 @REQ(access_check)
3174 obj_handle_t handle; /* handle to the token */
3175 unsigned int desired_access; /* desired access to the object */
3176 unsigned int mapping_read; /* mapping from generic read to specific rights */
3177 unsigned int mapping_write; /* mapping from generic write to specific rights */
3178 unsigned int mapping_execute; /* mapping from generic execute to specific rights */
3179 unsigned int mapping_all; /* mapping from generic all to specific rights */
3180 VARARG(sd,security_descriptor); /* security descriptor to check */
3181 @REPLY
3182 unsigned int access_granted; /* access rights actually granted */
3183 unsigned int access_status; /* was access granted? */
3184 unsigned int privileges_len; /* length needed to store privileges */
3185 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges used during access check */
3186 @END
3188 @REQ(get_token_sid)
3189 obj_handle_t handle; /* handle to the token */
3190 unsigned int which_sid; /* which SID to retrieve from the token */
3191 @REPLY
3192 data_size_t sid_len; /* length needed to store sid */
3193 VARARG(sid,SID); /* the sid specified by which_sid from the token */
3194 @END
3196 @REQ(get_token_groups)
3197 obj_handle_t handle; /* handle to the token */
3198 @REPLY
3199 data_size_t user_len; /* length needed to store user */
3200 VARARG(user,token_groups); /* groups the token's user belongs to */
3201 @END
3203 @REQ(get_token_default_dacl)
3204 obj_handle_t handle; /* handle to the token */
3205 @REPLY
3206 data_size_t acl_len; /* length needed to store access control list */
3207 VARARG(acl,ACL); /* access control list */
3208 @END
3210 @REQ(set_token_default_dacl)
3211 obj_handle_t handle; /* handle to the token */
3212 VARARG(acl,ACL); /* default dacl to set */
3213 @END
3215 @REQ(set_security_object)
3216 obj_handle_t handle; /* handle to the object */
3217 unsigned int security_info; /* which parts of security descriptor to set */
3218 VARARG(sd,security_descriptor); /* security descriptor to set */
3219 @END
3221 @REQ(get_security_object)
3222 obj_handle_t handle; /* handle to the object */
3223 unsigned int security_info; /* which parts of security descriptor to get */
3224 @REPLY
3225 unsigned int sd_len; /* buffer size needed for sd */
3226 VARARG(sd,security_descriptor); /* retrieved security descriptor */
3227 @END
3229 /* Create a mailslot */
3230 @REQ(create_mailslot)
3231 unsigned int access; /* wanted access rights */
3232 unsigned int attributes; /* object attributes */
3233 obj_handle_t rootdir; /* root directory */
3234 timeout_t read_timeout;
3235 unsigned int max_msgsize;
3236 VARARG(name,unicode_str); /* mailslot name */
3237 @REPLY
3238 obj_handle_t handle; /* handle to the mailslot */
3239 @END
3242 /* Set mailslot information */
3243 @REQ(set_mailslot_info)
3244 obj_handle_t handle; /* handle to the mailslot */
3245 timeout_t read_timeout;
3246 unsigned int flags;
3247 @REPLY
3248 timeout_t read_timeout;
3249 unsigned int max_msgsize;
3250 @END
3251 #define MAILSLOT_SET_READ_TIMEOUT 1
3254 /* Create a directory object */
3255 @REQ(create_directory)
3256 unsigned int access; /* access flags */
3257 unsigned int attributes; /* object attributes */
3258 obj_handle_t rootdir; /* root directory */
3259 VARARG(directory_name,unicode_str); /* Directory name */
3260 @REPLY
3261 obj_handle_t handle; /* handle to the directory */
3262 @END
3265 /* Open a directory object */
3266 @REQ(open_directory)
3267 unsigned int access; /* access flags */
3268 unsigned int attributes; /* object attributes */
3269 obj_handle_t rootdir; /* root directory */
3270 VARARG(directory_name,unicode_str); /* Directory name */
3271 @REPLY
3272 obj_handle_t handle; /* handle to the directory */
3273 @END
3276 /* Get a directory entry by index */
3277 @REQ(get_directory_entry)
3278 obj_handle_t handle; /* handle to the directory */
3279 unsigned int index; /* entry index */
3280 @REPLY
3281 data_size_t name_len; /* length of the entry name in bytes */
3282 VARARG(name,unicode_str,name_len); /* entry name */
3283 VARARG(type,unicode_str); /* entry type */
3284 @END
3287 /* Create a symbolic link object */
3288 @REQ(create_symlink)
3289 unsigned int access; /* access flags */
3290 unsigned int attributes; /* object attributes */
3291 obj_handle_t rootdir; /* root directory */
3292 data_size_t name_len; /* length of the symlink name in bytes */
3293 VARARG(name,unicode_str,name_len); /* symlink name */
3294 VARARG(target_name,unicode_str); /* target name */
3295 @REPLY
3296 obj_handle_t handle; /* handle to the symlink */
3297 @END
3300 /* Open a symbolic link object */
3301 @REQ(open_symlink)
3302 unsigned int access; /* access flags */
3303 unsigned int attributes; /* object attributes */
3304 obj_handle_t rootdir; /* root directory */
3305 VARARG(name,unicode_str); /* symlink name */
3306 @REPLY
3307 obj_handle_t handle; /* handle to the symlink */
3308 @END
3311 /* Query a symbolic link object */
3312 @REQ(query_symlink)
3313 obj_handle_t handle; /* handle to the symlink */
3314 @REPLY
3315 data_size_t total; /* total needed size for name */
3316 VARARG(target_name,unicode_str); /* target name */
3317 @END
3320 /* Query basic object information */
3321 @REQ(get_object_info)
3322 obj_handle_t handle; /* handle to the object */
3323 @REPLY
3324 unsigned int access; /* granted access mask */
3325 unsigned int ref_count; /* object ref count */
3326 unsigned int handle_count; /* object handle count */
3327 data_size_t total; /* total needed size for name */
3328 VARARG(name,unicode_str); /* object name */
3329 @END
3332 /* Query object type name information */
3333 @REQ(get_object_type)
3334 obj_handle_t handle; /* handle to the object */
3335 @REPLY
3336 data_size_t total; /* needed size for type name */
3337 VARARG(type,unicode_str); /* type name */
3338 @END
3341 /* Unlink a named object */
3342 @REQ(unlink_object)
3343 obj_handle_t handle; /* handle to the object */
3344 @END
3347 /* Query the impersonation level of an impersonation token */
3348 @REQ(get_token_impersonation_level)
3349 obj_handle_t handle; /* handle to the object */
3350 @REPLY
3351 int impersonation_level; /* impersonation level of the impersonation token */
3352 @END
3354 /* Allocate a locally-unique identifier */
3355 @REQ(allocate_locally_unique_id)
3356 @REPLY
3357 luid_t luid;
3358 @END
3361 /* Create a device manager */
3362 @REQ(create_device_manager)
3363 unsigned int access; /* wanted access rights */
3364 unsigned int attributes; /* object attributes */
3365 @REPLY
3366 obj_handle_t handle; /* handle to the device */
3367 @END
3370 /* Create a device */
3371 @REQ(create_device)
3372 unsigned int access; /* wanted access rights */
3373 unsigned int attributes; /* object attributes */
3374 obj_handle_t rootdir; /* root directory */
3375 client_ptr_t user_ptr; /* opaque ptr for use by client */
3376 obj_handle_t manager; /* device manager */
3377 VARARG(name,unicode_str); /* object name */
3378 @REPLY
3379 obj_handle_t handle; /* handle to the device */
3380 @END
3383 /* Delete a device */
3384 @REQ(delete_device)
3385 obj_handle_t handle; /* handle to the device */
3386 @END
3389 /* Retrieve the next pending device irp request */
3390 @REQ(get_next_device_request)
3391 obj_handle_t manager; /* handle to the device manager */
3392 obj_handle_t prev; /* handle to the previous irp */
3393 unsigned int status; /* status of the previous irp */
3394 @REPLY
3395 client_ptr_t user_ptr; /* opaque ptr for the device */
3396 irp_params_t params; /* irp parameters */
3397 obj_handle_t next; /* handle to the next irp */
3398 process_id_t client_pid; /* pid of process calling irp */
3399 thread_id_t client_tid; /* tid of thread calling irp */
3400 data_size_t in_size; /* total needed input size */
3401 data_size_t out_size; /* needed output size */
3402 VARARG(next_data,bytes); /* input data of the next irp */
3403 @END
3406 /* Make the current process a system process */
3407 @REQ(make_process_system)
3408 @REPLY
3409 obj_handle_t event; /* event signaled when all user processes have exited */
3410 @END
3413 /* Get detailed fixed-size information about a token */
3414 @REQ(get_token_statistics)
3415 obj_handle_t handle; /* handle to the object */
3416 @REPLY
3417 luid_t token_id; /* locally-unique identifier of the token */
3418 luid_t modified_id; /* locally-unique identifier of the modified version of the token */
3419 int primary; /* is the token primary or impersonation? */
3420 int impersonation_level; /* level of impersonation */
3421 int group_count; /* the number of groups the token is a member of */
3422 int privilege_count; /* the number of privileges the token has */
3423 @END
3426 /* Create I/O completion port */
3427 @REQ(create_completion)
3428 unsigned int access; /* desired access to a port */
3429 unsigned int attributes; /* object attributes */
3430 unsigned int concurrent; /* max number of concurrent active threads */
3431 obj_handle_t rootdir; /* root directory */
3432 VARARG(filename,unicode_str); /* port name */
3433 @REPLY
3434 obj_handle_t handle; /* port handle */
3435 @END
3438 /* Open I/O completion port */
3439 @REQ(open_completion)
3440 unsigned int access; /* desired access to a port */
3441 unsigned int attributes; /* object attributes */
3442 obj_handle_t rootdir; /* root directory */
3443 VARARG(filename,unicode_str); /* port name */
3444 @REPLY
3445 obj_handle_t handle; /* port handle */
3446 @END
3449 /* add completion to completion port */
3450 @REQ(add_completion)
3451 obj_handle_t handle; /* port handle */
3452 apc_param_t ckey; /* completion key */
3453 apc_param_t cvalue; /* completion value */
3454 apc_param_t information; /* IO_STATUS_BLOCK Information */
3455 unsigned int status; /* completion result */
3456 @END
3459 /* get completion from completion port queue */
3460 @REQ(remove_completion)
3461 obj_handle_t handle; /* port handle */
3462 @REPLY
3463 apc_param_t ckey; /* completion key */
3464 apc_param_t cvalue; /* completion value */
3465 apc_param_t information; /* IO_STATUS_BLOCK Information */
3466 unsigned int status; /* completion result */
3467 @END
3470 /* get completion queue depth */
3471 @REQ(query_completion)
3472 obj_handle_t handle; /* port handle */
3473 @REPLY
3474 unsigned int depth; /* completion queue depth */
3475 @END
3478 /* associate object with completion port */
3479 @REQ(set_completion_info)
3480 obj_handle_t handle; /* object handle */
3481 apc_param_t ckey; /* completion key */
3482 obj_handle_t chandle; /* port handle */
3483 @END
3486 /* check for associated completion and push msg */
3487 @REQ(add_fd_completion)
3488 obj_handle_t handle; /* async' object */
3489 apc_param_t cvalue; /* completion value */
3490 apc_param_t information; /* IO_STATUS_BLOCK Information */
3491 unsigned int status; /* completion status */
3492 @END
3495 /* Retrieve layered info for a window */
3496 @REQ(get_window_layered_info)
3497 user_handle_t handle; /* handle to the window */
3498 @REPLY
3499 unsigned int color_key; /* color key */
3500 unsigned int alpha; /* alpha (0..255) */
3501 unsigned int flags; /* LWA_* flags */
3502 @END
3505 /* Set layered info for a window */
3506 @REQ(set_window_layered_info)
3507 user_handle_t handle; /* handle to the window */
3508 unsigned int color_key; /* color key */
3509 unsigned int alpha; /* alpha (0..255) */
3510 unsigned int flags; /* LWA_* flags */
3511 @END
3514 /* Allocate an arbitrary user handle */
3515 @REQ(alloc_user_handle)
3516 @REPLY
3517 user_handle_t handle; /* allocated handle */
3518 @END
3521 /* Free an arbitrary user handle */
3522 @REQ(free_user_handle)
3523 user_handle_t handle; /* handle to free*/
3524 @END
3527 /* Set/get the current cursor */
3528 @REQ(set_cursor)
3529 unsigned int flags; /* flags for fields to set (see below) */
3530 user_handle_t handle; /* handle to the cursor */
3531 int show_count; /* show count increment/decrement */
3532 int x; /* cursor position */
3533 int y;
3534 rectangle_t clip; /* cursor clip rectangle */
3535 unsigned int clip_msg; /* message to post on cursor clip changes */
3536 @REPLY
3537 user_handle_t prev_handle; /* previous handle */
3538 int prev_count; /* previous show count */
3539 int prev_x; /* previous position */
3540 int prev_y;
3541 int new_x; /* new position */
3542 int new_y;
3543 rectangle_t new_clip; /* new clip rectangle */
3544 unsigned int last_change; /* time of last position change */
3545 @END
3546 #define SET_CURSOR_HANDLE 0x01
3547 #define SET_CURSOR_COUNT 0x02
3548 #define SET_CURSOR_POS 0x04
3549 #define SET_CURSOR_CLIP 0x08
3550 #define SET_CURSOR_NOCLIP 0x10
3553 /* Modify the list of registered rawinput devices */
3554 @REQ(update_rawinput_devices)
3555 VARARG(devices,rawinput_devices);
3556 @END
3559 /* Retrieve the suspended context of a thread */
3560 @REQ(get_suspend_context)
3561 @REPLY
3562 VARARG(context,context); /* thread context */
3563 @END
3566 /* Store the suspend context of a thread */
3567 @REQ(set_suspend_context)
3568 VARARG(context,context); /* thread context */
3569 @END
3572 /* Create a new job object */
3573 @REQ(create_job)
3574 unsigned int access; /* wanted access rights */
3575 unsigned int attributes; /* object attributes */
3576 VARARG(objattr,object_attributes); /* object attributes */
3577 @REPLY
3578 obj_handle_t handle; /* handle to the job */
3579 @END
3582 /* Assign a job object to a process */
3583 @REQ(assign_job)
3584 obj_handle_t job; /* handle to the job */
3585 obj_handle_t process; /* handle to the process */
3586 @END
3589 /* Check if a process is associated with a job */
3590 @REQ(process_in_job)
3591 obj_handle_t job; /* handle to the job */
3592 obj_handle_t process; /* handle to the process */
3593 @END
3596 /* Set limit flags on a job */
3597 @REQ(set_job_limits)
3598 obj_handle_t handle; /* handle to the job */
3599 unsigned int limit_flags; /* new limit flags */
3600 @END
3603 /* Set new completion port for a job */
3604 @REQ(set_job_completion_port)
3605 obj_handle_t job; /* handle to the job */
3606 obj_handle_t port; /* handle to the completion port */
3607 client_ptr_t key; /* key to send with completion messages */
3608 @END
3611 /* Terminate all processes associated with the job */
3612 @REQ(terminate_job)
3613 obj_handle_t handle; /* handle to the job */
3614 int status; /* process exit code */
3615 @END