- Try LoadLibrary/LoadImage to extract icons from wine's built-in dlls
[wine/gsoc_dplay.git] / server / protocol.def
blob61a4e09dbabe28463e69602302677c548b4c036a
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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 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 struct request_header
36 int req; /* request code */
37 size_t request_size; /* request variable part size */
38 size_t reply_size; /* reply variable part maximum size */
41 struct reply_header
43 unsigned int error; /* error result */
44 size_t reply_size; /* reply variable part size */
47 /* placeholder structure for the maximum allowed request size */
48 /* this is used to construct the generic_request union */
49 struct request_max_size
51 int pad[16]; /* the max request size is 16 ints */
54 typedef void *obj_handle_t;
55 typedef void *user_handle_t;
56 typedef unsigned short atom_t;
57 typedef unsigned int process_id_t;
58 typedef unsigned int thread_id_t;
60 #define FIRST_USER_HANDLE 0x0020 /* first possible value for low word of user handle */
61 #define LAST_USER_HANDLE 0xffef /* last possible value for low word of user handle */
64 /* definitions of the event data depending on the event code */
65 struct debug_event_exception
67 EXCEPTION_RECORD record; /* exception record */
68 int first; /* first chance exception? */
70 struct debug_event_create_thread
72 obj_handle_t handle; /* handle to the new thread */
73 void *teb; /* thread teb (in debugged process address space) */
74 void *start; /* thread startup routine */
76 struct debug_event_create_process
78 obj_handle_t file; /* handle to the process exe file */
79 obj_handle_t process; /* handle to the new process */
80 obj_handle_t thread; /* handle to the new thread */
81 void *base; /* base of executable image */
82 int dbg_offset; /* offset of debug info in file */
83 int dbg_size; /* size of debug info */
84 void *teb; /* thread teb (in debugged process address space) */
85 void *start; /* thread startup routine */
86 void *name; /* image name (optional) */
87 int unicode; /* is it Unicode? */
89 struct debug_event_exit
91 int exit_code; /* thread or process exit code */
93 struct debug_event_load_dll
95 obj_handle_t handle; /* file handle for the dll */
96 void *base; /* base address of the dll */
97 int dbg_offset; /* offset of debug info in file */
98 int dbg_size; /* size of debug info */
99 void *name; /* image name (optional) */
100 int unicode; /* is it Unicode? */
102 struct debug_event_unload_dll
104 void *base; /* base address of the dll */
106 struct debug_event_output_string
108 void *string; /* string to display (in debugged process address space) */
109 int unicode; /* is it Unicode? */
110 int length; /* string length */
112 struct debug_event_rip_info
114 int error; /* ??? */
115 int type; /* ??? */
117 union debug_event_data
119 struct debug_event_exception exception;
120 struct debug_event_create_thread create_thread;
121 struct debug_event_create_process create_process;
122 struct debug_event_exit exit;
123 struct debug_event_load_dll load_dll;
124 struct debug_event_unload_dll unload_dll;
125 struct debug_event_output_string output_string;
126 struct debug_event_rip_info rip_info;
129 /* debug event data */
130 typedef struct
132 int code; /* event code */
133 union debug_event_data info; /* event information */
134 } debug_event_t;
136 /* structure used in sending an fd from client to server */
137 struct send_fd
139 thread_id_t tid; /* thread id */
140 int fd; /* file descriptor on client-side */
143 /* structure sent by the server on the wait fifo */
144 struct wake_up_reply
146 void *cookie; /* magic cookie that was passed in select_request */
147 int signaled; /* wait result */
150 /* structure for absolute timeouts */
151 typedef struct
153 int sec; /* seconds since Unix epoch */
154 int usec; /* microseconds */
155 } abs_time_t;
157 /* structure returned in the list of window properties */
158 typedef struct
160 atom_t atom; /* property atom */
161 short string; /* was atom a string originally? */
162 obj_handle_t handle; /* handle stored in property */
163 } property_data_t;
165 /* structure to specify window rectangles */
166 typedef struct
168 int left;
169 int top;
170 int right;
171 int bottom;
172 } rectangle_t;
174 /* structure for console char/attribute info */
175 typedef struct
177 WCHAR ch;
178 unsigned short attr;
179 } char_info_t;
181 #define MAX_ACL_LEN 65535
183 struct security_descriptor
185 unsigned int control; /* SE_ flags */
186 size_t owner_len;
187 size_t group_len;
188 size_t sacl_len;
189 size_t dacl_len;
190 /* VARARGS(owner,SID); */
191 /* VARARGS(group,SID); */
192 /* VARARGS(sacl,ACL); */
193 /* VARARGS(dacl,ACL); */
196 /****************************************************************/
197 /* Request declarations */
199 /* Create a new process from the context of the parent */
200 @REQ(new_process)
201 int inherit_all; /* inherit all handles from parent */
202 unsigned int create_flags; /* creation flags */
203 int unix_pid; /* Unix pid of new process */
204 obj_handle_t exe_file; /* file handle for main exe */
205 obj_handle_t hstdin; /* handle for stdin */
206 obj_handle_t hstdout; /* handle for stdout */
207 obj_handle_t hstderr; /* handle for stderr */
208 VARARG(info,startup_info); /* startup information */
209 VARARG(env,unicode_str); /* environment for new process */
210 @REPLY
211 obj_handle_t info; /* new process info handle */
212 @END
215 /* Retrieve information about a newly started process */
216 @REQ(get_new_process_info)
217 obj_handle_t info; /* info handle returned from new_process_request */
218 int pinherit; /* process handle inherit flag */
219 int tinherit; /* thread handle inherit flag */
220 @REPLY
221 process_id_t pid; /* process id */
222 obj_handle_t phandle; /* process handle (in the current process) */
223 thread_id_t tid; /* thread id */
224 obj_handle_t thandle; /* thread handle (in the current process) */
225 int success; /* did the process start successfully? */
226 @END
229 /* Create a new thread from the context of the parent */
230 @REQ(new_thread)
231 int suspend; /* new thread should be suspended on creation */
232 int inherit; /* inherit flag */
233 int request_fd; /* fd for request pipe */
234 @REPLY
235 thread_id_t tid; /* thread id */
236 obj_handle_t handle; /* thread handle (in the current process) */
237 @END
240 /* Retrieve the new process startup info */
241 @REQ(get_startup_info)
242 @REPLY
243 unsigned int create_flags; /* creation flags */
244 obj_handle_t exe_file; /* file handle for main exe */
245 obj_handle_t hstdin; /* handle for stdin */
246 obj_handle_t hstdout; /* handle for stdout */
247 obj_handle_t hstderr; /* handle for stderr */
248 VARARG(info,startup_info); /* startup information */
249 VARARG(env,unicode_str); /* environment */
250 @END
253 /* Signal the end of the process initialization */
254 @REQ(init_process_done)
255 void* module; /* main module base address */
256 size_t module_size; /* main module size */
257 void* entry; /* process entry point */
258 void* name; /* ptr to ptr to name (in process addr space) */
259 obj_handle_t exe_file; /* file handle for main exe */
260 int gui; /* is it a GUI process? */
261 VARARG(filename,unicode_str); /* file name of main exe */
262 @END
265 /* Initialize a thread; called from the child after fork()/clone() */
266 @REQ(init_thread)
267 int unix_pid; /* Unix pid of new thread */
268 int unix_tid; /* Unix tid of new thread */
269 void* teb; /* TEB of new thread (in thread address space) */
270 void* peb; /* address of PEB (in thread address space) */
271 void* entry; /* thread entry point (in thread address space) */
272 void* ldt_copy; /* address of LDT copy (in thread address space) */
273 int reply_fd; /* fd for reply pipe */
274 int wait_fd; /* fd for blocking calls pipe */
275 int debug_level; /* new debug level */
276 @REPLY
277 process_id_t pid; /* process id of the new thread's process */
278 thread_id_t tid; /* thread id of the new thread */
279 size_t info_size; /* total size of startup info */
280 time_t server_start; /* server start time */
281 int version; /* protocol version */
282 @END
285 /* Terminate a process */
286 @REQ(terminate_process)
287 obj_handle_t handle; /* process handle to terminate */
288 int exit_code; /* process exit code */
289 @REPLY
290 int self; /* suicide? */
291 @END
294 /* Terminate a thread */
295 @REQ(terminate_thread)
296 obj_handle_t handle; /* thread handle to terminate */
297 int exit_code; /* thread exit code */
298 @REPLY
299 int self; /* suicide? */
300 int last; /* last thread in this process? */
301 @END
304 /* Retrieve information about a process */
305 @REQ(get_process_info)
306 obj_handle_t handle; /* process handle */
307 @REPLY
308 process_id_t pid; /* server process id */
309 process_id_t ppid; /* server process id of parent */
310 int exit_code; /* process exit code */
311 int priority; /* priority class */
312 int affinity; /* process affinity mask */
313 void* peb; /* PEB address in process address space */
314 @END
317 /* Set a process informations */
318 @REQ(set_process_info)
319 obj_handle_t handle; /* process handle */
320 int mask; /* setting mask (see below) */
321 int priority; /* priority class */
322 int affinity; /* affinity mask */
323 @END
324 #define SET_PROCESS_INFO_PRIORITY 0x01
325 #define SET_PROCESS_INFO_AFFINITY 0x02
328 /* Retrieve information about a thread */
329 @REQ(get_thread_info)
330 obj_handle_t handle; /* thread handle */
331 thread_id_t tid_in; /* thread id (optional) */
332 @REPLY
333 process_id_t pid; /* server process id */
334 thread_id_t tid; /* server thread id */
335 void* teb; /* thread teb pointer */
336 int exit_code; /* thread exit code */
337 int priority; /* thread priority level */
338 int affinity; /* thread affinity mask */
339 time_t creation_time; /* thread creation time */
340 time_t exit_time; /* thread exit time */
341 @END
344 /* Set a thread informations */
345 @REQ(set_thread_info)
346 obj_handle_t handle; /* thread handle */
347 int mask; /* setting mask (see below) */
348 int priority; /* priority class */
349 int affinity; /* affinity mask */
350 obj_handle_t token; /* impersonation token */
351 @END
352 #define SET_THREAD_INFO_PRIORITY 0x01
353 #define SET_THREAD_INFO_AFFINITY 0x02
354 #define SET_THREAD_INFO_TOKEN 0x04
357 /* Retrieve information about a module */
358 @REQ(get_dll_info)
359 obj_handle_t handle; /* process handle */
360 void* base_address; /* base address of module */
361 @REPLY
362 size_t size; /* module size */
363 void* entry_point;
364 VARARG(filename,unicode_str); /* file name of module */
365 @END
368 /* Suspend a thread */
369 @REQ(suspend_thread)
370 obj_handle_t handle; /* thread handle */
371 @REPLY
372 int count; /* new suspend count */
373 @END
376 /* Resume a thread */
377 @REQ(resume_thread)
378 obj_handle_t handle; /* thread handle */
379 @REPLY
380 int count; /* new suspend count */
381 @END
384 /* Notify the server that a dll has been loaded */
385 @REQ(load_dll)
386 obj_handle_t handle; /* file handle */
387 void* base; /* base address */
388 size_t size; /* dll size */
389 int dbg_offset; /* debug info offset */
390 int dbg_size; /* debug info size */
391 void* name; /* ptr to ptr to name (in process addr space) */
392 VARARG(filename,unicode_str); /* file name of dll */
393 @END
396 /* Notify the server that a dll is being unloaded */
397 @REQ(unload_dll)
398 void* base; /* base address */
399 @END
402 /* Queue an APC for a thread */
403 @REQ(queue_apc)
404 obj_handle_t handle; /* thread handle */
405 int user; /* user or system apc? */
406 void* func; /* function to call */
407 void* arg1; /* params for function to call */
408 void* arg2;
409 void* arg3;
410 @END
413 /* Get next APC to call */
414 @REQ(get_apc)
415 int alertable; /* is thread alertable? */
416 @REPLY
417 void* func; /* function to call */
418 int type; /* function type */
419 void* arg1; /* function arguments */
420 void* arg2;
421 void* arg3;
422 @END
423 enum apc_type { APC_NONE, APC_USER, APC_TIMER, APC_ASYNC_IO };
426 /* Close a handle for the current process */
427 @REQ(close_handle)
428 obj_handle_t handle; /* handle to close */
429 @REPLY
430 int fd; /* associated fd to close */
431 @END
434 /* Set a handle information */
435 @REQ(set_handle_info)
436 obj_handle_t handle; /* handle we are interested in */
437 int flags; /* new handle flags */
438 int mask; /* mask for flags to set */
439 @REPLY
440 int old_flags; /* old flag value */
441 @END
444 /* Duplicate a handle */
445 @REQ(dup_handle)
446 obj_handle_t src_process; /* src process handle */
447 obj_handle_t src_handle; /* src handle to duplicate */
448 obj_handle_t dst_process; /* dst process handle */
449 unsigned int access; /* wanted access rights */
450 int inherit; /* inherit flag */
451 int options; /* duplicate options (see below) */
452 @REPLY
453 obj_handle_t handle; /* duplicated handle in dst process */
454 int fd; /* associated fd to close */
455 @END
456 #define DUP_HANDLE_CLOSE_SOURCE DUPLICATE_CLOSE_SOURCE
457 #define DUP_HANDLE_SAME_ACCESS DUPLICATE_SAME_ACCESS
458 #define DUP_HANDLE_MAKE_GLOBAL 0x80000000 /* Not a Windows flag */
461 /* Open a handle to a process */
462 @REQ(open_process)
463 process_id_t pid; /* process id to open */
464 unsigned int access; /* wanted access rights */
465 int inherit; /* inherit flag */
466 @REPLY
467 obj_handle_t handle; /* handle to the process */
468 @END
471 /* Open a handle to a thread */
472 @REQ(open_thread)
473 thread_id_t tid; /* thread id to open */
474 unsigned int access; /* wanted access rights */
475 int inherit; /* inherit flag */
476 @REPLY
477 obj_handle_t handle; /* handle to the thread */
478 @END
481 /* Wait for handles */
482 @REQ(select)
483 int flags; /* wait flags (see below) */
484 void* cookie; /* magic cookie to return to client */
485 obj_handle_t signal; /* object to signal (0 if none) */
486 abs_time_t timeout; /* absolute timeout */
487 VARARG(handles,handles); /* handles to select on */
488 @END
489 #define SELECT_ALL 1
490 #define SELECT_ALERTABLE 2
491 #define SELECT_INTERRUPTIBLE 4
492 #define SELECT_TIMEOUT 8
495 /* Create an event */
496 @REQ(create_event)
497 unsigned int access; /* wanted access rights */
498 int manual_reset; /* manual reset event */
499 int initial_state; /* initial state of the event */
500 int inherit; /* inherit flag */
501 VARARG(name,unicode_str); /* object name */
502 @REPLY
503 obj_handle_t handle; /* handle to the event */
504 @END
506 /* Event operation */
507 @REQ(event_op)
508 obj_handle_t handle; /* handle to event */
509 int op; /* event operation (see below) */
510 @END
511 enum event_op { PULSE_EVENT, SET_EVENT, RESET_EVENT };
514 /* Open an event */
515 @REQ(open_event)
516 unsigned int access; /* wanted access rights */
517 int inherit; /* inherit flag */
518 VARARG(name,unicode_str); /* object name */
519 @REPLY
520 obj_handle_t handle; /* handle to the event */
521 @END
524 /* Create a mutex */
525 @REQ(create_mutex)
526 unsigned int access; /* wanted access rights */
527 int owned; /* initially owned? */
528 int inherit; /* inherit flag */
529 VARARG(name,unicode_str); /* object name */
530 @REPLY
531 obj_handle_t handle; /* handle to the mutex */
532 @END
535 /* Release a mutex */
536 @REQ(release_mutex)
537 obj_handle_t handle; /* handle to the mutex */
538 @REPLY
539 unsigned int prev_count; /* value of internal counter, before release */
540 @END
543 /* Open a mutex */
544 @REQ(open_mutex)
545 unsigned int access; /* wanted access rights */
546 int inherit; /* inherit flag */
547 VARARG(name,unicode_str); /* object name */
548 @REPLY
549 obj_handle_t handle; /* handle to the mutex */
550 @END
553 /* Create a semaphore */
554 @REQ(create_semaphore)
555 unsigned int access; /* wanted access rights */
556 unsigned int initial; /* initial count */
557 unsigned int max; /* maximum count */
558 int inherit; /* inherit flag */
559 VARARG(name,unicode_str); /* object name */
560 @REPLY
561 obj_handle_t handle; /* handle to the semaphore */
562 @END
565 /* Release a semaphore */
566 @REQ(release_semaphore)
567 obj_handle_t handle; /* handle to the semaphore */
568 unsigned int count; /* count to add to semaphore */
569 @REPLY
570 unsigned int prev_count; /* previous semaphore count */
571 @END
574 /* Open a semaphore */
575 @REQ(open_semaphore)
576 unsigned int access; /* wanted access rights */
577 int inherit; /* inherit flag */
578 VARARG(name,unicode_str); /* object name */
579 @REPLY
580 obj_handle_t handle; /* handle to the semaphore */
581 @END
584 /* Create a file */
585 @REQ(create_file)
586 unsigned int access; /* wanted access rights */
587 int inherit; /* inherit flag */
588 unsigned int sharing; /* sharing flags */
589 int create; /* file create action */
590 unsigned int options; /* file options */
591 unsigned int attrs; /* file attributes for creation */
592 VARARG(filename,string); /* file name */
593 @REPLY
594 obj_handle_t handle; /* handle to the file */
595 @END
598 /* Allocate a file handle for a Unix fd */
599 @REQ(alloc_file_handle)
600 unsigned int access; /* wanted access rights */
601 int inherit; /* inherit flag */
602 int fd; /* file descriptor on the client side */
603 @REPLY
604 obj_handle_t handle; /* handle to the file */
605 @END
608 /* Get a Unix fd to access a file */
609 @REQ(get_handle_fd)
610 obj_handle_t handle; /* handle to the file */
611 unsigned int access; /* wanted access rights */
612 @REPLY
613 int fd; /* file descriptor */
614 int removable; /* is device removable? (-1 if unknown) */
615 int flags; /* file read/write flags (see below) */
616 @END
617 #define FD_FLAG_OVERLAPPED 0x01 /* fd opened in overlapped mode */
618 #define FD_FLAG_TIMEOUT 0x02 /* read/write is synchronous */
619 #define FD_FLAG_RECV_SHUTDOWN 0x04
620 #define FD_FLAG_SEND_SHUTDOWN 0x08
621 #define FD_FLAG_AVAILABLE 0x10 /* in overlap read/write operation,
622 * only handle available data (don't wait) */
624 /* Set the cached file descriptor of a handle */
625 @REQ(set_handle_fd)
626 obj_handle_t handle; /* handle we are interested in */
627 int fd; /* file descriptor */
628 int removable; /* is device removable? (-1 if unknown) */
629 @REPLY
630 int cur_fd; /* current file descriptor */
631 @END
634 /* Flush a file buffers */
635 @REQ(flush_file)
636 obj_handle_t handle; /* handle to the file */
637 @REPLY
638 obj_handle_t event; /* event set when finished */
639 @END
642 /* Lock a region of a file */
643 @REQ(lock_file)
644 obj_handle_t handle; /* handle to the file */
645 unsigned int offset_low; /* offset of start of lock */
646 unsigned int offset_high; /* offset of start of lock */
647 unsigned int count_low; /* count of bytes to lock */
648 unsigned int count_high; /* count of bytes to lock */
649 int shared; /* shared or exclusive lock? */
650 int wait; /* do we want to wait? */
651 @REPLY
652 obj_handle_t handle; /* handle to wait on */
653 int overlapped; /* is it an overlapped I/O handle? */
654 @END
657 /* Unlock a region of a file */
658 @REQ(unlock_file)
659 obj_handle_t handle; /* handle to the file */
660 unsigned int offset_low; /* offset of start of unlock */
661 unsigned int offset_high; /* offset of start of unlock */
662 unsigned int count_low; /* count of bytes to unlock */
663 unsigned int count_high; /* count of bytes to unlock */
664 @END
667 /* Get ready to unmount a Unix device */
668 @REQ(unmount_device)
669 obj_handle_t handle; /* handle to a file on the device */
670 @END
673 /* Create a socket */
674 @REQ(create_socket)
675 unsigned int access; /* wanted access rights */
676 int inherit; /* inherit flag */
677 int family; /* family, see socket manpage */
678 int type; /* type, see socket manpage */
679 int protocol; /* protocol, see socket manpage */
680 unsigned int flags; /* socket flags */
681 @REPLY
682 obj_handle_t handle; /* handle to the new socket */
683 @END
686 /* Accept a socket */
687 @REQ(accept_socket)
688 obj_handle_t lhandle; /* handle to the listening socket */
689 unsigned int access; /* wanted access rights */
690 int inherit; /* inherit flag */
691 @REPLY
692 obj_handle_t handle; /* handle to the new socket */
693 @END
696 /* Set socket event parameters */
697 @REQ(set_socket_event)
698 obj_handle_t handle; /* handle to the socket */
699 unsigned int mask; /* event mask */
700 obj_handle_t event; /* event object */
701 user_handle_t window; /* window to send the message to */
702 unsigned int msg; /* message to send */
703 @END
706 /* Get socket event parameters */
707 @REQ(get_socket_event)
708 obj_handle_t handle; /* handle to the socket */
709 int service; /* clear pending? */
710 obj_handle_t c_event; /* event to clear */
711 @REPLY
712 unsigned int mask; /* event mask */
713 unsigned int pmask; /* pending events */
714 unsigned int state; /* status bits */
715 VARARG(errors,ints); /* event errors */
716 @END
719 /* Reenable pending socket events */
720 @REQ(enable_socket_event)
721 obj_handle_t handle; /* handle to the socket */
722 unsigned int mask; /* events to re-enable */
723 unsigned int sstate; /* status bits to set */
724 unsigned int cstate; /* status bits to clear */
725 @END
727 @REQ(set_socket_deferred)
728 obj_handle_t handle; /* handle to the socket */
729 obj_handle_t deferred; /* handle to the socket for which accept() is deferred */
730 @END
732 /* Allocate a console (only used by a console renderer) */
733 @REQ(alloc_console)
734 unsigned int access; /* wanted access rights */
735 int inherit; /* inherit flag */
736 process_id_t pid; /* pid of process which shall be attached to the console */
737 @REPLY
738 obj_handle_t handle_in; /* handle to console input */
739 obj_handle_t event; /* handle to renderer events change notification */
740 @END
743 /* Free the console of the current process */
744 @REQ(free_console)
745 @END
748 #define CONSOLE_RENDERER_NONE_EVENT 0x00
749 #define CONSOLE_RENDERER_TITLE_EVENT 0x01
750 #define CONSOLE_RENDERER_ACTIVE_SB_EVENT 0x02
751 #define CONSOLE_RENDERER_SB_RESIZE_EVENT 0x03
752 #define CONSOLE_RENDERER_UPDATE_EVENT 0x04
753 #define CONSOLE_RENDERER_CURSOR_POS_EVENT 0x05
754 #define CONSOLE_RENDERER_CURSOR_GEOM_EVENT 0x06
755 #define CONSOLE_RENDERER_DISPLAY_EVENT 0x07
756 #define CONSOLE_RENDERER_EXIT_EVENT 0x08
757 struct console_renderer_event
759 short event;
760 union
762 struct update
764 short top;
765 short bottom;
766 } update;
767 struct resize
769 short width;
770 short height;
771 } resize;
772 struct cursor_pos
774 short x;
775 short y;
776 } cursor_pos;
777 struct cursor_geom
779 short visible;
780 short size;
781 } cursor_geom;
782 struct display
784 short left;
785 short top;
786 short width;
787 short height;
788 } display;
789 } u;
792 /* retrieve console events for the renderer */
793 @REQ(get_console_renderer_events)
794 obj_handle_t handle; /* handle to console input events */
795 @REPLY
796 VARARG(data,bytes); /* the various console_renderer_events */
797 @END
800 /* Open a handle to the process console */
801 @REQ(open_console)
802 int from; /* 0 (resp 1) input (resp output) of current process console */
803 /* otherwise console_in handle to get active screen buffer? */
804 unsigned int access; /* wanted access rights */
805 int inherit; /* inherit flag */
806 int share; /* share mask (only for output handles) */
807 @REPLY
808 obj_handle_t handle; /* handle to the console */
809 @END
812 /* Get the input queue wait event */
813 @REQ(get_console_wait_event)
814 @REPLY
815 obj_handle_t handle;
816 @END
818 /* Get a console mode (input or output) */
819 @REQ(get_console_mode)
820 obj_handle_t handle; /* handle to the console */
821 @REPLY
822 int mode; /* console mode */
823 @END
826 /* Set a console mode (input or output) */
827 @REQ(set_console_mode)
828 obj_handle_t handle; /* handle to the console */
829 int mode; /* console mode */
830 @END
833 /* Set info about a console (input only) */
834 @REQ(set_console_input_info)
835 obj_handle_t handle; /* handle to console input, or 0 for process' console */
836 int mask; /* setting mask (see below) */
837 obj_handle_t active_sb; /* active screen buffer */
838 int history_mode; /* whether we duplicate lines in history */
839 int history_size; /* number of lines in history */
840 int edition_mode; /* index to the edition mode flavors */
841 VARARG(title,unicode_str); /* console title */
842 @END
843 #define SET_CONSOLE_INPUT_INFO_ACTIVE_SB 0x01
844 #define SET_CONSOLE_INPUT_INFO_TITLE 0x02
845 #define SET_CONSOLE_INPUT_INFO_HISTORY_MODE 0x04
846 #define SET_CONSOLE_INPUT_INFO_HISTORY_SIZE 0x08
847 #define SET_CONSOLE_INPUT_INFO_EDITION_MODE 0x10
850 /* Get info about a console (input only) */
851 @REQ(get_console_input_info)
852 obj_handle_t handle; /* handle to console input, or 0 for process' console */
853 @REPLY
854 int history_mode; /* whether we duplicate lines in history */
855 int history_size; /* number of lines in history */
856 int history_index; /* number of used lines in history */
857 int edition_mode; /* index to the edition mode flavors */
858 VARARG(title,unicode_str); /* console title */
859 @END
862 /* appends a string to console's history */
863 @REQ(append_console_input_history)
864 obj_handle_t handle; /* handle to console input, or 0 for process' console */
865 VARARG(line,unicode_str); /* line to add */
866 @END
869 /* appends a string to console's history */
870 @REQ(get_console_input_history)
871 obj_handle_t handle; /* handle to console input, or 0 for process' console */
872 int index; /* index to get line from */
873 @REPLY
874 int total; /* total length of line in Unicode chars */
875 VARARG(line,unicode_str); /* line to add */
876 @END
879 /* creates a new screen buffer on process' console */
880 @REQ(create_console_output)
881 obj_handle_t handle_in; /* handle to console input, or 0 for process' console */
882 int access; /* wanted access rights */
883 int share; /* sharing credentials */
884 int inherit; /* inherit flag */
885 @REPLY
886 obj_handle_t handle_out; /* handle to the screen buffer */
887 @END
890 /* Set info about a console (output only) */
891 @REQ(set_console_output_info)
892 obj_handle_t handle; /* handle to the console */
893 int mask; /* setting mask (see below) */
894 short int cursor_size; /* size of cursor (percentage filled) */
895 short int cursor_visible;/* cursor visibility flag */
896 short int cursor_x; /* position of cursor (x, y) */
897 short int cursor_y;
898 short int width; /* width of the screen buffer */
899 short int height; /* height of the screen buffer */
900 short int attr; /* default attribute */
901 short int win_left; /* window actually displayed by renderer */
902 short int win_top; /* the rect area is expressed withing the */
903 short int win_right; /* boundaries of the screen buffer */
904 short int win_bottom;
905 short int max_width; /* maximum size (width x height) for the window */
906 short int max_height;
907 @END
908 #define SET_CONSOLE_OUTPUT_INFO_CURSOR_GEOM 0x01
909 #define SET_CONSOLE_OUTPUT_INFO_CURSOR_POS 0x02
910 #define SET_CONSOLE_OUTPUT_INFO_SIZE 0x04
911 #define SET_CONSOLE_OUTPUT_INFO_ATTR 0x08
912 #define SET_CONSOLE_OUTPUT_INFO_DISPLAY_WINDOW 0x10
913 #define SET_CONSOLE_OUTPUT_INFO_MAX_SIZE 0x20
916 /* Get info about a console (output only) */
917 @REQ(get_console_output_info)
918 obj_handle_t handle; /* handle to the console */
919 @REPLY
920 short int cursor_size; /* size of cursor (percentage filled) */
921 short int cursor_visible;/* cursor visibility flag */
922 short int cursor_x; /* position of cursor (x, y) */
923 short int cursor_y;
924 short int width; /* width of the screen buffer */
925 short int height; /* height of the screen buffer */
926 short int attr; /* default attribute */
927 short int win_left; /* window actually displayed by renderer */
928 short int win_top; /* the rect area is expressed withing the */
929 short int win_right; /* boundaries of the screen buffer */
930 short int win_bottom;
931 short int max_width; /* maximum size (width x height) for the window */
932 short int max_height;
933 @END
935 /* Add input records to a console input queue */
936 @REQ(write_console_input)
937 obj_handle_t handle; /* handle to the console input */
938 VARARG(rec,input_records); /* input records */
939 @REPLY
940 int written; /* number of records written */
941 @END
944 /* Fetch input records from a console input queue */
945 @REQ(read_console_input)
946 obj_handle_t handle; /* handle to the console input */
947 int flush; /* flush the retrieved records from the queue? */
948 @REPLY
949 int read; /* number of records read */
950 VARARG(rec,input_records); /* input records */
951 @END
954 /* write data (chars and/or attributes) in a screen buffer */
955 @REQ(write_console_output)
956 obj_handle_t handle; /* handle to the console output */
957 int x; /* position where to start writing */
958 int y;
959 int mode; /* char info (see below) */
960 int wrap; /* wrap around at end of line? */
961 VARARG(data,bytes); /* info to write */
962 @REPLY
963 int written; /* number of char infos actually written */
964 int width; /* width of screen buffer */
965 int height; /* height of screen buffer */
966 @END
967 enum char_info_mode
969 CHAR_INFO_MODE_TEXT, /* characters only */
970 CHAR_INFO_MODE_ATTR, /* attributes only */
971 CHAR_INFO_MODE_TEXTATTR, /* both characters and attributes */
972 CHAR_INFO_MODE_TEXTSTDATTR /* characters but use standard attributes */
976 /* fill a screen buffer with constant data (chars and/or attributes) */
977 @REQ(fill_console_output)
978 obj_handle_t handle; /* handle to the console output */
979 int x; /* position where to start writing */
980 int y;
981 int mode; /* char info mode */
982 int count; /* number to write */
983 int wrap; /* wrap around at end of line? */
984 char_info_t data; /* data to write */
985 @REPLY
986 int written; /* number of char infos actually written */
987 @END
990 /* read data (chars and/or attributes) from a screen buffer */
991 @REQ(read_console_output)
992 obj_handle_t handle; /* handle to the console output */
993 int x; /* position (x,y) where to start reading */
994 int y;
995 int mode; /* char info mode */
996 int wrap; /* wrap around at end of line? */
997 @REPLY
998 int width; /* width of screen buffer */
999 int height; /* height of screen buffer */
1000 VARARG(data,bytes);
1001 @END
1004 /* move a rect (of data) in screen buffer content */
1005 @REQ(move_console_output)
1006 obj_handle_t handle; /* handle to the console output */
1007 short int x_src; /* position (x, y) of rect to start moving from */
1008 short int y_src;
1009 short int x_dst; /* position (x, y) of rect to move to */
1010 short int y_dst;
1011 short int w; /* size of the rect (width, height) to move */
1012 short int h;
1013 @END
1016 /* Sends a signal to a process group */
1017 @REQ(send_console_signal)
1018 int signal; /* the signal to send */
1019 process_id_t group_id; /* the group to send the signal to */
1020 @END
1023 /* Create a change notification */
1024 @REQ(create_change_notification)
1025 obj_handle_t handle; /* handle to the directory */
1026 int subtree; /* watch all the subtree */
1027 unsigned int filter; /* notification filter */
1028 @REPLY
1029 obj_handle_t handle; /* handle to the change notification */
1030 @END
1033 /* Move to the next change notification */
1034 @REQ(next_change_notification)
1035 obj_handle_t handle; /* handle to the change notification */
1036 @END
1038 /* Create a file mapping */
1039 @REQ(create_mapping)
1040 int size_high; /* mapping size */
1041 int size_low; /* mapping size */
1042 int protect; /* protection flags (see below) */
1043 unsigned int access; /* wanted access rights */
1044 int inherit; /* inherit flag */
1045 obj_handle_t file_handle; /* file handle */
1046 VARARG(name,unicode_str); /* object name */
1047 @REPLY
1048 obj_handle_t handle; /* handle to the mapping */
1049 @END
1050 /* protection flags */
1051 #define VPROT_READ 0x01
1052 #define VPROT_WRITE 0x02
1053 #define VPROT_EXEC 0x04
1054 #define VPROT_WRITECOPY 0x08
1055 #define VPROT_GUARD 0x10
1056 #define VPROT_NOCACHE 0x20
1057 #define VPROT_COMMITTED 0x40
1058 #define VPROT_IMAGE 0x80
1061 /* Open a mapping */
1062 @REQ(open_mapping)
1063 unsigned int access; /* wanted access rights */
1064 int inherit; /* inherit flag */
1065 VARARG(name,unicode_str); /* object name */
1066 @REPLY
1067 obj_handle_t handle; /* handle to the mapping */
1068 @END
1071 /* Get information about a file mapping */
1072 @REQ(get_mapping_info)
1073 obj_handle_t handle; /* handle to the mapping */
1074 @REPLY
1075 int size_high; /* mapping size */
1076 int size_low; /* mapping size */
1077 int protect; /* protection flags */
1078 int header_size; /* header size (for VPROT_IMAGE mapping) */
1079 void* base; /* default base addr (for VPROT_IMAGE mapping) */
1080 obj_handle_t shared_file; /* shared mapping file handle */
1081 int shared_size; /* shared mapping size */
1082 @END
1085 #define SNAP_HEAPLIST 0x00000001
1086 #define SNAP_PROCESS 0x00000002
1087 #define SNAP_THREAD 0x00000004
1088 #define SNAP_MODULE 0x00000008
1089 /* Create a snapshot */
1090 @REQ(create_snapshot)
1091 int inherit; /* inherit flag */
1092 int flags; /* snapshot flags (SNAP_*) */
1093 process_id_t pid; /* process id */
1094 @REPLY
1095 obj_handle_t handle; /* handle to the snapshot */
1096 @END
1099 /* Get the next process from a snapshot */
1100 @REQ(next_process)
1101 obj_handle_t handle; /* handle to the snapshot */
1102 int reset; /* reset snapshot position? */
1103 @REPLY
1104 int count; /* process usage count */
1105 process_id_t pid; /* process id */
1106 process_id_t ppid; /* parent process id */
1107 void* heap; /* heap base */
1108 void* module; /* main module */
1109 int threads; /* number of threads */
1110 int priority; /* process priority */
1111 int handles; /* number of handles */
1112 VARARG(filename,unicode_str); /* file name of main exe */
1113 @END
1116 /* Get the next thread from a snapshot */
1117 @REQ(next_thread)
1118 obj_handle_t handle; /* handle to the snapshot */
1119 int reset; /* reset snapshot position? */
1120 @REPLY
1121 int count; /* thread usage count */
1122 process_id_t pid; /* process id */
1123 thread_id_t tid; /* thread id */
1124 int base_pri; /* base priority */
1125 int delta_pri; /* delta priority */
1126 @END
1129 /* Get the next module from a snapshot */
1130 @REQ(next_module)
1131 obj_handle_t handle; /* handle to the snapshot */
1132 int reset; /* reset snapshot position? */
1133 @REPLY
1134 process_id_t pid; /* process id */
1135 void* base; /* module base address */
1136 size_t size; /* module size */
1137 VARARG(filename,unicode_str); /* file name of module */
1138 @END
1141 /* Wait for a debug event */
1142 @REQ(wait_debug_event)
1143 int get_handle; /* should we alloc a handle for waiting? */
1144 @REPLY
1145 process_id_t pid; /* process id */
1146 thread_id_t tid; /* thread id */
1147 obj_handle_t wait; /* wait handle if no event ready */
1148 VARARG(event,debug_event); /* debug event data */
1149 @END
1152 /* Queue an exception event */
1153 @REQ(queue_exception_event)
1154 int first; /* first chance exception? */
1155 VARARG(record,exc_event); /* thread context followed by exception record */
1156 @REPLY
1157 obj_handle_t handle; /* handle to the queued event */
1158 @END
1161 /* Retrieve the status of an exception event */
1162 @REQ(get_exception_status)
1163 obj_handle_t handle; /* handle to the queued event */
1164 @REPLY
1165 int status; /* event continuation status */
1166 VARARG(context,context); /* modified thread context */
1167 @END
1170 /* Send an output string to the debugger */
1171 @REQ(output_debug_string)
1172 void* string; /* string to display (in debugged process address space) */
1173 int unicode; /* is it Unicode? */
1174 int length; /* string length */
1175 @END
1178 /* Continue a debug event */
1179 @REQ(continue_debug_event)
1180 process_id_t pid; /* process id to continue */
1181 thread_id_t tid; /* thread id to continue */
1182 int status; /* continuation status */
1183 @END
1186 /* Start/stop debugging an existing process */
1187 @REQ(debug_process)
1188 process_id_t pid; /* id of the process to debug */
1189 int attach; /* 1=attaching / 0=detaching from the process */
1190 @END
1193 /* Simulate a breakpoint in a process */
1194 @REQ(debug_break)
1195 obj_handle_t handle; /* process handle */
1196 @REPLY
1197 int self; /* was it the caller itself? */
1198 @END
1201 /* Set debugger kill on exit flag */
1202 @REQ(set_debugger_kill_on_exit)
1203 int kill_on_exit; /* 0=detach/1=kill debuggee when debugger dies */
1204 @END
1207 /* Read data from a process address space */
1208 @REQ(read_process_memory)
1209 obj_handle_t handle; /* process handle */
1210 void* addr; /* addr to read from */
1211 @REPLY
1212 VARARG(data,bytes); /* result data */
1213 @END
1216 /* Write data to a process address space */
1217 @REQ(write_process_memory)
1218 obj_handle_t handle; /* process handle */
1219 void* addr; /* addr to write to (must be int-aligned) */
1220 unsigned int first_mask; /* mask for first word */
1221 unsigned int last_mask; /* mask for last word */
1222 VARARG(data,bytes); /* data to write */
1223 @END
1226 /* Create a registry key */
1227 @REQ(create_key)
1228 obj_handle_t parent; /* handle to the parent key */
1229 unsigned int access; /* desired access rights */
1230 unsigned int options; /* creation options */
1231 time_t modif; /* last modification time */
1232 size_t namelen; /* length of key name in bytes */
1233 VARARG(name,unicode_str,namelen); /* key name */
1234 VARARG(class,unicode_str); /* class name */
1235 @REPLY
1236 obj_handle_t hkey; /* handle to the created key */
1237 int created; /* has it been newly created? */
1238 @END
1240 /* Open a registry key */
1241 @REQ(open_key)
1242 obj_handle_t parent; /* handle to the parent key */
1243 unsigned int access; /* desired access rights */
1244 VARARG(name,unicode_str); /* key name */
1245 @REPLY
1246 obj_handle_t hkey; /* handle to the open key */
1247 @END
1250 /* Delete a registry key */
1251 @REQ(delete_key)
1252 obj_handle_t hkey; /* handle to the key */
1253 @END
1256 /* Flush a registry key */
1257 @REQ(flush_key)
1258 obj_handle_t hkey; /* handle to the key */
1259 @END
1262 /* Enumerate registry subkeys */
1263 @REQ(enum_key)
1264 obj_handle_t hkey; /* handle to registry key */
1265 int index; /* index of subkey (or -1 for current key) */
1266 int info_class; /* requested information class */
1267 @REPLY
1268 int subkeys; /* number of subkeys */
1269 int max_subkey; /* longest subkey name */
1270 int max_class; /* longest class name */
1271 int values; /* number of values */
1272 int max_value; /* longest value name */
1273 int max_data; /* longest value data */
1274 time_t modif; /* last modification time */
1275 size_t total; /* total length needed for full name and class */
1276 size_t namelen; /* length of key name in bytes */
1277 VARARG(name,unicode_str,namelen); /* key name */
1278 VARARG(class,unicode_str); /* class name */
1279 @END
1282 /* Set a value of a registry key */
1283 @REQ(set_key_value)
1284 obj_handle_t hkey; /* handle to registry key */
1285 int type; /* value type */
1286 size_t namelen; /* length of value name in bytes */
1287 VARARG(name,unicode_str,namelen); /* value name */
1288 VARARG(data,bytes); /* value data */
1289 @END
1292 /* Retrieve the value of a registry key */
1293 @REQ(get_key_value)
1294 obj_handle_t hkey; /* handle to registry key */
1295 VARARG(name,unicode_str); /* value name */
1296 @REPLY
1297 int type; /* value type */
1298 size_t total; /* total length needed for data */
1299 VARARG(data,bytes); /* value data */
1300 @END
1303 /* Enumerate a value of a registry key */
1304 @REQ(enum_key_value)
1305 obj_handle_t hkey; /* handle to registry key */
1306 int index; /* value index */
1307 int info_class; /* requested information class */
1308 @REPLY
1309 int type; /* value type */
1310 size_t total; /* total length needed for full name and data */
1311 size_t namelen; /* length of value name in bytes */
1312 VARARG(name,unicode_str,namelen); /* value name */
1313 VARARG(data,bytes); /* value data */
1314 @END
1317 /* Delete a value of a registry key */
1318 @REQ(delete_key_value)
1319 obj_handle_t hkey; /* handle to registry key */
1320 VARARG(name,unicode_str); /* value name */
1321 @END
1324 /* Load a registry branch from a file */
1325 @REQ(load_registry)
1326 obj_handle_t hkey; /* root key to load to */
1327 obj_handle_t file; /* file to load from */
1328 VARARG(name,unicode_str); /* subkey name */
1329 @END
1332 /* UnLoad a registry branch from a file */
1333 @REQ(unload_registry)
1334 obj_handle_t hkey; /* root key to unload to */
1335 @END
1338 /* Save a registry branch to a file */
1339 @REQ(save_registry)
1340 obj_handle_t hkey; /* key to save */
1341 obj_handle_t file; /* file to save to */
1342 @END
1345 /* Add a registry key change notification */
1346 @REQ(set_registry_notification)
1347 obj_handle_t hkey; /* key to watch for changes */
1348 obj_handle_t event; /* event to set */
1349 int subtree; /* should we watch the whole subtree? */
1350 unsigned int filter; /* things to watch */
1351 @END
1354 /* Create a waitable timer */
1355 @REQ(create_timer)
1356 unsigned int access; /* wanted access rights */
1357 int inherit; /* inherit flag */
1358 int manual; /* manual reset */
1359 VARARG(name,unicode_str); /* object name */
1360 @REPLY
1361 obj_handle_t handle; /* handle to the timer */
1362 @END
1365 /* Open a waitable timer */
1366 @REQ(open_timer)
1367 unsigned int access; /* wanted access rights */
1368 int inherit; /* inherit flag */
1369 VARARG(name,unicode_str); /* object name */
1370 @REPLY
1371 obj_handle_t handle; /* handle to the timer */
1372 @END
1374 /* Set a waitable timer */
1375 @REQ(set_timer)
1376 obj_handle_t handle; /* handle to the timer */
1377 abs_time_t expire; /* next expiration absolute time */
1378 int period; /* timer period in ms */
1379 void* callback; /* callback function */
1380 void* arg; /* callback argument */
1381 @REPLY
1382 int signaled; /* was the timer signaled before this call ? */
1383 @END
1385 /* Cancel a waitable timer */
1386 @REQ(cancel_timer)
1387 obj_handle_t handle; /* handle to the timer */
1388 @REPLY
1389 int signaled; /* was the timer signaled before this calltime ? */
1390 @END
1392 /* Get information on a waitable timer */
1393 @REQ(get_timer_info)
1394 obj_handle_t handle; /* handle to the timer */
1395 @REPLY
1396 abs_time_t when; /* absolute time when the timer next expires */
1397 int signaled; /* is the timer signaled? */
1398 @END
1401 /* Retrieve the current context of a thread */
1402 @REQ(get_thread_context)
1403 obj_handle_t handle; /* thread handle */
1404 unsigned int flags; /* context flags */
1405 @REPLY
1406 VARARG(context,context); /* thread context */
1407 @END
1410 /* Set the current context of a thread */
1411 @REQ(set_thread_context)
1412 obj_handle_t handle; /* thread handle */
1413 unsigned int flags; /* context flags */
1414 VARARG(context,context); /* thread context */
1415 @END
1418 /* Fetch a selector entry for a thread */
1419 @REQ(get_selector_entry)
1420 obj_handle_t handle; /* thread handle */
1421 int entry; /* LDT entry */
1422 @REPLY
1423 unsigned int base; /* selector base */
1424 unsigned int limit; /* selector limit */
1425 unsigned char flags; /* selector flags */
1426 @END
1429 /* Add an atom */
1430 @REQ(add_atom)
1431 obj_handle_t table; /* which table to add atom to */
1432 VARARG(name,unicode_str); /* atom name */
1433 @REPLY
1434 atom_t atom; /* resulting atom */
1435 @END
1438 /* Delete an atom */
1439 @REQ(delete_atom)
1440 obj_handle_t table; /* which table to delete atom from */
1441 atom_t atom; /* atom handle */
1442 @END
1445 /* Find an atom */
1446 @REQ(find_atom)
1447 obj_handle_t table; /* which table to find atom from */
1448 VARARG(name,unicode_str); /* atom name */
1449 @REPLY
1450 atom_t atom; /* atom handle */
1451 @END
1454 /* Get information about an atom */
1455 @REQ(get_atom_information)
1456 obj_handle_t table; /* which table to find atom from */
1457 atom_t atom; /* atom handle */
1458 @REPLY
1459 int count; /* atom lock count */
1460 int pinned; /* whether the atom has been pinned */
1461 VARARG(name,unicode_str); /* atom name */
1462 @END
1465 /* Set information about an atom */
1466 @REQ(set_atom_information)
1467 obj_handle_t table; /* which table to find atom from */
1468 atom_t atom; /* atom handle */
1469 int pinned; /* whether to bump atom information */
1470 @END
1473 /* Empty an atom table */
1474 @REQ(empty_atom_table)
1475 obj_handle_t table; /* which table to find atom from */
1476 int if_pinned; /* whether to delete pinned atoms */
1477 @END
1480 /* Init an atom table */
1481 @REQ(init_atom_table)
1482 int entries; /* number of entries (only for local) */
1483 @REPLY
1484 obj_handle_t table; /* handle to the atom table */
1485 @END
1488 /* Get the message queue of the current thread */
1489 @REQ(get_msg_queue)
1490 @REPLY
1491 obj_handle_t handle; /* handle to the queue */
1492 @END
1495 /* Set the current message queue wakeup mask */
1496 @REQ(set_queue_mask)
1497 unsigned int wake_mask; /* wakeup bits mask */
1498 unsigned int changed_mask; /* changed bits mask */
1499 int skip_wait; /* will we skip waiting if signaled? */
1500 @REPLY
1501 unsigned int wake_bits; /* current wake bits */
1502 unsigned int changed_bits; /* current changed bits */
1503 @END
1506 /* Get the current message queue status */
1507 @REQ(get_queue_status)
1508 int clear; /* should we clear the change bits? */
1509 @REPLY
1510 unsigned int wake_bits; /* wake bits */
1511 unsigned int changed_bits; /* changed bits since last time */
1512 @END
1515 /* Wait for a process to start waiting on input */
1516 @REQ(wait_input_idle)
1517 obj_handle_t handle; /* process handle */
1518 int timeout; /* timeout */
1519 @REPLY
1520 obj_handle_t event; /* handle to idle event */
1521 @END
1524 /* Send a message to a thread queue */
1525 @REQ(send_message)
1526 thread_id_t id; /* thread id */
1527 int type; /* message type (see below) */
1528 int flags; /* message flags (see below) */
1529 user_handle_t win; /* window handle */
1530 unsigned int msg; /* message code */
1531 unsigned int wparam; /* parameters */
1532 unsigned int lparam; /* parameters */
1533 int x; /* x position */
1534 int y; /* y position */
1535 unsigned int time; /* message time */
1536 unsigned int info; /* extra info */
1537 int timeout; /* timeout for reply */
1538 void* callback; /* callback address */
1539 VARARG(data,bytes); /* message data for sent messages */
1540 @END
1542 enum message_type
1544 MSG_ASCII, /* Ascii message (from SendMessageA) */
1545 MSG_UNICODE, /* Unicode message (from SendMessageW) */
1546 MSG_NOTIFY, /* notify message (from SendNotifyMessageW), always Unicode */
1547 MSG_CALLBACK, /* callback message (from SendMessageCallbackW), always Unicode */
1548 MSG_CALLBACK_RESULT,/* result of a callback message */
1549 MSG_OTHER_PROCESS, /* sent from other process, may include vararg data, always Unicode */
1550 MSG_POSTED, /* posted message (from PostMessageW), always Unicode */
1551 MSG_HARDWARE, /* hardware message */
1552 MSG_WINEVENT /* winevent message */
1554 #define SEND_MSG_ABORT_IF_HUNG 0x01
1557 /* Get a message from the current queue */
1558 @REQ(get_message)
1559 int flags; /* see below */
1560 user_handle_t get_win; /* window handle to get */
1561 unsigned int get_first; /* first message code to get */
1562 unsigned int get_last; /* last message code to get */
1563 unsigned int hw_id; /* id of the previous hardware message (or 0) */
1564 @REPLY
1565 int type; /* message type */
1566 user_handle_t win; /* window handle */
1567 unsigned int msg; /* message code */
1568 unsigned int wparam; /* parameters (callback function for MSG_CALLBACK_RESULT) */
1569 unsigned int lparam; /* parameters (result for MSG_CALLBACK_RESULT) */
1570 int x; /* x position */
1571 int y; /* y position */
1572 user_handle_t hook; /* winevent hook handle */
1573 void* hook_proc; /* winevent hook proc address */
1574 unsigned int time; /* message time */
1575 unsigned int info; /* extra info (callback argument for MSG_CALLBACK_RESULT) */
1576 unsigned int hw_id; /* id if hardware message */
1577 unsigned int active_hooks; /* active hooks bitmap */
1578 size_t total; /* total size of extra data */
1579 VARARG(data,bytes); /* message data for sent messages */
1580 @END
1581 #define GET_MSG_REMOVE 1 /* remove the message */
1582 #define GET_MSG_SENT_ONLY 2 /* only get sent messages */
1584 /* Reply to a sent message */
1585 @REQ(reply_message)
1586 unsigned int result; /* message result */
1587 int remove; /* should we remove the message? */
1588 VARARG(data,bytes); /* message data for sent messages */
1589 @END
1592 /* Accept the current hardware message */
1593 @REQ(accept_hardware_message)
1594 unsigned int hw_id; /* id of the hardware message */
1595 int remove; /* should we remove the message? */
1596 user_handle_t new_win; /* new destination window for current message */
1597 @END
1600 /* Retrieve the reply for the last message sent */
1601 @REQ(get_message_reply)
1602 int cancel; /* cancel message if not ready? */
1603 @REPLY
1604 unsigned int result; /* message result */
1605 VARARG(data,bytes); /* message data for sent messages */
1606 @END
1609 /* Set a window timer */
1610 @REQ(set_win_timer)
1611 user_handle_t win; /* window handle */
1612 unsigned int msg; /* message to post */
1613 unsigned int id; /* timer id */
1614 unsigned int rate; /* timer rate in ms */
1615 unsigned int lparam; /* message lparam (callback proc) */
1616 @REPLY
1617 unsigned int id; /* timer id */
1618 @END
1621 /* Kill a window timer */
1622 @REQ(kill_win_timer)
1623 user_handle_t win; /* window handle */
1624 unsigned int msg; /* message to post */
1625 unsigned int id; /* timer id */
1626 @END
1629 /* Retrieve info about a serial port */
1630 @REQ(get_serial_info)
1631 obj_handle_t handle; /* handle to comm port */
1632 @REPLY
1633 unsigned int readinterval;
1634 unsigned int readconst;
1635 unsigned int readmult;
1636 unsigned int writeconst;
1637 unsigned int writemult;
1638 unsigned int eventmask;
1639 unsigned int commerror;
1640 @END
1643 /* Set info about a serial port */
1644 @REQ(set_serial_info)
1645 obj_handle_t handle; /* handle to comm port */
1646 int flags; /* bitmask to set values (see below) */
1647 unsigned int readinterval;
1648 unsigned int readconst;
1649 unsigned int readmult;
1650 unsigned int writeconst;
1651 unsigned int writemult;
1652 unsigned int eventmask;
1653 unsigned int commerror;
1654 @END
1655 #define SERIALINFO_SET_TIMEOUTS 0x01
1656 #define SERIALINFO_SET_MASK 0x02
1657 #define SERIALINFO_SET_ERROR 0x04
1660 /* Create an async I/O */
1661 @REQ(register_async)
1662 obj_handle_t handle; /* handle to comm port, socket or file */
1663 int type; /* type of queue to look after */
1664 void* io_apc; /* APC routine to queue upon end of async */
1665 void* io_sb; /* I/O status block (unique across all async on this handle) */
1666 void* io_user; /* data to pass back to caller */
1667 int count; /* count - usually # of bytes to be read/written */
1668 @END
1669 #define ASYNC_TYPE_READ 0x01
1670 #define ASYNC_TYPE_WRITE 0x02
1671 #define ASYNC_TYPE_WAIT 0x03
1674 /* Cancel all async op on a fd */
1675 @REQ(cancel_async)
1676 obj_handle_t handle; /* handle to comm port, socket or file */
1677 @END
1680 /* Create a named pipe */
1681 @REQ(create_named_pipe)
1682 unsigned int access;
1683 unsigned int options;
1684 unsigned int flags;
1685 unsigned int maxinstances;
1686 unsigned int outsize;
1687 unsigned int insize;
1688 unsigned int timeout;
1689 int inherit; /* inherit flag */
1690 VARARG(name,unicode_str); /* pipe name */
1691 @REPLY
1692 obj_handle_t handle; /* handle to the pipe */
1693 @END
1695 /* flags in create_named_pipe and get_named_pipe_info */
1696 #define NAMED_PIPE_MESSAGE_STREAM_WRITE 0x0001
1697 #define NAMED_PIPE_MESSAGE_STREAM_READ 0x0002
1698 #define NAMED_PIPE_NONBLOCKING_MODE 0x0004
1701 /* Open an existing named pipe */
1702 @REQ(open_named_pipe)
1703 unsigned int access;
1704 unsigned int flags; /* file flags */
1705 int inherit; /* inherit flag */
1706 VARARG(name,unicode_str); /* pipe name */
1707 @REPLY
1708 obj_handle_t handle; /* handle to the pipe */
1709 @END
1712 /* Connect to a named pipe */
1713 @REQ(connect_named_pipe)
1714 obj_handle_t handle;
1715 obj_handle_t event;
1716 void* func;
1717 @END
1720 /* Wait for a named pipe */
1721 @REQ(wait_named_pipe)
1722 unsigned int timeout;
1723 void* overlapped;
1724 void* func;
1725 VARARG(name,unicode_str); /* pipe name */
1726 @END
1729 /* Disconnect a named pipe */
1730 @REQ(disconnect_named_pipe)
1731 obj_handle_t handle;
1732 @REPLY
1733 int fd; /* associated fd to close */
1734 @END
1737 @REQ(get_named_pipe_info)
1738 obj_handle_t handle;
1739 @REPLY
1740 unsigned int flags;
1741 unsigned int maxinstances;
1742 unsigned int outsize;
1743 unsigned int insize;
1744 @END
1747 /* Create a window */
1748 @REQ(create_window)
1749 user_handle_t parent; /* parent window */
1750 user_handle_t owner; /* owner window */
1751 atom_t atom; /* class atom */
1752 void* instance; /* module instance */
1753 @REPLY
1754 user_handle_t handle; /* created window */
1755 int extra; /* number of extra bytes */
1756 void* class_ptr; /* pointer to class in client address space */
1757 @END
1760 /* Destroy a window */
1761 @REQ(destroy_window)
1762 user_handle_t handle; /* handle to the window */
1763 @END
1766 /* Retrieve the desktop window for the current thread */
1767 @REQ(get_desktop_window)
1768 @REPLY
1769 user_handle_t handle; /* handle to the desktop window */
1770 @END
1773 /* Set a window owner */
1774 @REQ(set_window_owner)
1775 user_handle_t handle; /* handle to the window */
1776 user_handle_t owner; /* new owner */
1777 @REPLY
1778 user_handle_t full_owner; /* full handle of new owner */
1779 user_handle_t prev_owner; /* full handle of previous owner */
1780 @END
1783 /* Get information from a window handle */
1784 @REQ(get_window_info)
1785 user_handle_t handle; /* handle to the window */
1786 @REPLY
1787 user_handle_t full_handle; /* full 32-bit handle */
1788 user_handle_t last_active; /* last active popup */
1789 process_id_t pid; /* process owning the window */
1790 thread_id_t tid; /* thread owning the window */
1791 atom_t atom; /* class atom */
1792 int is_unicode; /* ANSI or unicode */
1793 @END
1796 /* Set some information in a window */
1797 @REQ(set_window_info)
1798 user_handle_t handle; /* handle to the window */
1799 unsigned int flags; /* flags for fields to set (see below) */
1800 unsigned int style; /* window style */
1801 unsigned int ex_style; /* window extended style */
1802 unsigned int id; /* window id */
1803 void* instance; /* creator instance */
1804 int is_unicode; /* ANSI or unicode */
1805 void* user_data; /* user-specific data */
1806 int extra_offset; /* offset to set in extra bytes */
1807 size_t extra_size; /* size to set in extra bytes */
1808 unsigned int extra_value; /* value to set in extra bytes */
1809 @REPLY
1810 unsigned int old_style; /* old window style */
1811 unsigned int old_ex_style; /* old window extended style */
1812 unsigned int old_id; /* old window id */
1813 void* old_instance; /* old creator instance */
1814 void* old_user_data; /* old user-specific data */
1815 unsigned int old_extra_value; /* old value in extra bytes */
1816 @END
1817 #define SET_WIN_STYLE 0x01
1818 #define SET_WIN_EXSTYLE 0x02
1819 #define SET_WIN_ID 0x04
1820 #define SET_WIN_INSTANCE 0x08
1821 #define SET_WIN_USERDATA 0x10
1822 #define SET_WIN_EXTRA 0x20
1823 #define SET_WIN_UNICODE 0x40
1826 /* Set the parent of a window */
1827 @REQ(set_parent)
1828 user_handle_t handle; /* handle to the window */
1829 user_handle_t parent; /* handle to the parent */
1830 @REPLY
1831 user_handle_t old_parent; /* old parent window */
1832 user_handle_t full_parent; /* full handle of new parent */
1833 @END
1836 /* Get a list of the window parents, up to the root of the tree */
1837 @REQ(get_window_parents)
1838 user_handle_t handle; /* handle to the window */
1839 @REPLY
1840 int count; /* total count of parents */
1841 VARARG(parents,user_handles); /* parent handles */
1842 @END
1845 /* Get a list of the window children */
1846 @REQ(get_window_children)
1847 user_handle_t parent; /* parent window */
1848 atom_t atom; /* class atom for the listed children */
1849 thread_id_t tid; /* thread owning the listed children */
1850 @REPLY
1851 int count; /* total count of children */
1852 VARARG(children,user_handles); /* children handles */
1853 @END
1856 /* Get a list of the window children that contain a given point */
1857 @REQ(get_window_children_from_point)
1858 user_handle_t parent; /* parent window */
1859 int x; /* point in parent coordinates */
1860 int y;
1861 @REPLY
1862 int count; /* total count of children */
1863 VARARG(children,user_handles); /* children handles */
1864 @END
1867 /* Get window tree information from a window handle */
1868 @REQ(get_window_tree)
1869 user_handle_t handle; /* handle to the window */
1870 @REPLY
1871 user_handle_t parent; /* parent window */
1872 user_handle_t owner; /* owner window */
1873 user_handle_t next_sibling; /* next sibling in Z-order */
1874 user_handle_t prev_sibling; /* prev sibling in Z-order */
1875 user_handle_t first_sibling; /* first sibling in Z-order */
1876 user_handle_t last_sibling; /* last sibling in Z-order */
1877 user_handle_t first_child; /* first child */
1878 user_handle_t last_child; /* last child */
1879 @END
1881 /* Set the position and Z order of a window */
1882 @REQ(set_window_pos)
1883 user_handle_t handle; /* handle to the window */
1884 user_handle_t previous; /* previous window in Z order */
1885 unsigned int flags; /* SWP_* flags */
1886 rectangle_t window; /* window rectangle */
1887 rectangle_t client; /* client rectangle */
1888 VARARG(valid,rectangles); /* valid rectangles from WM_NCCALCSIZE */
1889 @REPLY
1890 unsigned int new_style; /* new window style */
1891 @END
1894 /* Get the window and client rectangles of a window */
1895 @REQ(get_window_rectangles)
1896 user_handle_t handle; /* handle to the window */
1897 @REPLY
1898 rectangle_t window; /* window rectangle */
1899 rectangle_t visible; /* visible part of the window rectangle */
1900 rectangle_t client; /* client rectangle */
1901 @END
1904 /* Get the window text */
1905 @REQ(get_window_text)
1906 user_handle_t handle; /* handle to the window */
1907 @REPLY
1908 VARARG(text,unicode_str); /* window text */
1909 @END
1912 /* Set the window text */
1913 @REQ(set_window_text)
1914 user_handle_t handle; /* handle to the window */
1915 VARARG(text,unicode_str); /* window text */
1916 @END
1919 /* Get the coordinates offset between two windows */
1920 @REQ(get_windows_offset)
1921 user_handle_t from; /* handle to the first window */
1922 user_handle_t to; /* handle to the second window */
1923 @REPLY
1924 int x; /* x coordinate offset */
1925 int y; /* y coordinate offset */
1926 @END
1929 /* Get the visible region of a window */
1930 @REQ(get_visible_region)
1931 user_handle_t window; /* handle to the window */
1932 unsigned int flags; /* DCX flags */
1933 @REPLY
1934 user_handle_t top_win; /* top window to clip against */
1935 int top_org_x; /* top window visible rect origin in screen coords */
1936 int top_org_y;
1937 int win_org_x; /* window rect origin in screen coords */
1938 int win_org_y;
1939 size_t total_size; /* total size of the resulting region */
1940 VARARG(region,rectangles); /* list of rectangles for the region (in screen coords) */
1941 @END
1944 /* Get the window region */
1945 @REQ(get_window_region)
1946 user_handle_t window; /* handle to the window */
1947 @REPLY
1948 size_t total_size; /* total size of the resulting region */
1949 VARARG(region,rectangles); /* list of rectangles for the region */
1950 @END
1953 /* Set the window region */
1954 @REQ(set_window_region)
1955 user_handle_t window; /* handle to the window */
1956 VARARG(region,rectangles); /* list of rectangles for the region */
1957 @END
1960 /* Get the window update region */
1961 @REQ(get_update_region)
1962 user_handle_t window; /* handle to the window */
1963 user_handle_t from_child; /* child to start searching from */
1964 unsigned int flags; /* update flags (see below) */
1965 @REPLY
1966 user_handle_t child; /* child to repaint (or window itself) */
1967 unsigned int flags; /* resulting update flags (see below) */
1968 size_t total_size; /* total size of the resulting region */
1969 VARARG(region,rectangles); /* list of rectangles for the region */
1970 @END
1971 #define UPDATE_NONCLIENT 0x01 /* get region for repainting non-client area */
1972 #define UPDATE_ERASE 0x02 /* get region for erasing client area */
1973 #define UPDATE_PAINT 0x04 /* get region for painting client area */
1974 #define UPDATE_INTERNALPAINT 0x08 /* get region if internal paint is pending */
1975 #define UPDATE_ALLCHILDREN 0x10 /* force repaint of all children */
1976 #define UPDATE_NOCHILDREN 0x20 /* don't try to repaint any children */
1977 #define UPDATE_NOREGION 0x40 /* don't return a region, only the flags */
1980 /* Update the z order of a window so that a given rectangle is fully visible */
1981 @REQ(update_window_zorder)
1982 user_handle_t window; /* handle to the window */
1983 rectangle_t rect; /* rectangle that must be visible */
1984 @END
1987 /* Mark parts of a window as needing a redraw */
1988 @REQ(redraw_window)
1989 user_handle_t window; /* handle to the window */
1990 unsigned int flags; /* RDW_* flags */
1991 VARARG(region,rectangles); /* list of rectangles for the region */
1992 @END
1995 /* Set a window property */
1996 @REQ(set_window_property)
1997 user_handle_t window; /* handle to the window */
1998 atom_t atom; /* property atom (if no name specified) */
1999 obj_handle_t handle; /* handle to store */
2000 VARARG(name,unicode_str); /* property name */
2001 @END
2004 /* Remove a window property */
2005 @REQ(remove_window_property)
2006 user_handle_t window; /* handle to the window */
2007 atom_t atom; /* property atom (if no name specified) */
2008 VARARG(name,unicode_str); /* property name */
2009 @REPLY
2010 obj_handle_t handle; /* handle stored in property */
2011 @END
2014 /* Get a window property */
2015 @REQ(get_window_property)
2016 user_handle_t window; /* handle to the window */
2017 atom_t atom; /* property atom (if no name specified) */
2018 VARARG(name,unicode_str); /* property name */
2019 @REPLY
2020 obj_handle_t handle; /* handle stored in property */
2021 @END
2024 /* Get the list of properties of a window */
2025 @REQ(get_window_properties)
2026 user_handle_t window; /* handle to the window */
2027 @REPLY
2028 int total; /* total number of properties */
2029 VARARG(props,properties); /* list of properties */
2030 @END
2033 /* Create a window station */
2034 @REQ(create_winstation)
2035 unsigned int flags; /* window station flags */
2036 unsigned int access; /* wanted access rights */
2037 int inherit; /* inherit flag */
2038 VARARG(name,unicode_str); /* object name */
2039 @REPLY
2040 obj_handle_t handle; /* handle to the window station */
2041 @END
2044 /* Open a handle to a window station */
2045 @REQ(open_winstation)
2046 unsigned int access; /* wanted access rights */
2047 int inherit; /* inherit flag */
2048 VARARG(name,unicode_str); /* object name */
2049 @REPLY
2050 obj_handle_t handle; /* handle to the window station */
2051 @END
2054 /* Close a window station */
2055 @REQ(close_winstation)
2056 obj_handle_t handle; /* handle to the window station */
2057 @END
2060 /* Get the process current window station */
2061 @REQ(get_process_winstation)
2062 @REPLY
2063 obj_handle_t handle; /* handle to the window station */
2064 @END
2067 /* Set the process current window station */
2068 @REQ(set_process_winstation)
2069 obj_handle_t handle; /* handle to the window station */
2070 @END
2073 /* Create a desktop */
2074 @REQ(create_desktop)
2075 unsigned int flags; /* desktop flags */
2076 unsigned int access; /* wanted access rights */
2077 int inherit; /* inherit flag */
2078 VARARG(name,unicode_str); /* object name */
2079 @REPLY
2080 obj_handle_t handle; /* handle to the desktop */
2081 @END
2084 /* Open a handle to a desktop */
2085 @REQ(open_desktop)
2086 unsigned int flags; /* desktop flags */
2087 unsigned int access; /* wanted access rights */
2088 int inherit; /* inherit flag */
2089 VARARG(name,unicode_str); /* object name */
2090 @REPLY
2091 obj_handle_t handle; /* handle to the desktop */
2092 @END
2095 /* Close a desktop */
2096 @REQ(close_desktop)
2097 obj_handle_t handle; /* handle to the desktop */
2098 @END
2101 /* Get the thread current desktop */
2102 @REQ(get_thread_desktop)
2103 thread_id_t tid; /* thread id */
2104 @REPLY
2105 obj_handle_t handle; /* handle to the desktop */
2106 @END
2109 /* Set the thread current desktop */
2110 @REQ(set_thread_desktop)
2111 obj_handle_t handle; /* handle to the desktop */
2112 @END
2115 /* Get/set information about a user object (window station or desktop) */
2116 @REQ(set_user_object_info)
2117 obj_handle_t handle; /* handle to the object */
2118 unsigned int flags; /* information to set */
2119 unsigned int obj_flags; /* new object flags */
2120 @REPLY
2121 int is_desktop; /* is object a desktop? */
2122 unsigned int old_obj_flags; /* old object flags */
2123 VARARG(name,unicode_str); /* object name */
2124 @END
2125 #define SET_USER_OBJECT_FLAGS 1
2128 /* Attach (or detach) thread inputs */
2129 @REQ(attach_thread_input)
2130 thread_id_t tid_from; /* thread to be attached */
2131 thread_id_t tid_to; /* thread to which tid_from should be attached */
2132 int attach; /* is it an attach? */
2133 @END
2136 /* Get input data for a given thread */
2137 @REQ(get_thread_input)
2138 thread_id_t tid; /* id of thread */
2139 @REPLY
2140 user_handle_t focus; /* handle to the focus window */
2141 user_handle_t capture; /* handle to the capture window */
2142 user_handle_t active; /* handle to the active window */
2143 user_handle_t foreground; /* handle to the global foreground window */
2144 user_handle_t menu_owner; /* handle to the menu owner */
2145 user_handle_t move_size; /* handle to the moving/resizing window */
2146 user_handle_t caret; /* handle to the caret window */
2147 rectangle_t rect; /* caret rectangle */
2148 @END
2151 /* Get the time of the last input event */
2152 @REQ(get_last_input_time)
2153 @REPLY
2154 unsigned int time;
2155 @END
2158 /* Retrieve queue keyboard state for a given thread */
2159 @REQ(get_key_state)
2160 thread_id_t tid; /* id of thread */
2161 int key; /* optional key code or -1 */
2162 @REPLY
2163 unsigned char state; /* state of specified key */
2164 VARARG(keystate,bytes); /* state array for all the keys */
2165 @END
2167 /* Set queue keyboard state for a given thread */
2168 @REQ(set_key_state)
2169 thread_id_t tid; /* id of thread */
2170 VARARG(keystate,bytes); /* state array for all the keys */
2171 @END
2173 /* Set the system foreground window */
2174 @REQ(set_foreground_window)
2175 user_handle_t handle; /* handle to the foreground window */
2176 @REPLY
2177 user_handle_t previous; /* handle to the previous foreground window */
2178 int send_msg_old; /* whether we have to send a msg to the old window */
2179 int send_msg_new; /* whether we have to send a msg to the new window */
2180 @END
2182 /* Set the current thread focus window */
2183 @REQ(set_focus_window)
2184 user_handle_t handle; /* handle to the focus window */
2185 @REPLY
2186 user_handle_t previous; /* handle to the previous focus window */
2187 @END
2189 /* Set the current thread active window */
2190 @REQ(set_active_window)
2191 user_handle_t handle; /* handle to the active window */
2192 @REPLY
2193 user_handle_t previous; /* handle to the previous active window */
2194 @END
2196 /* Set the current thread capture window */
2197 @REQ(set_capture_window)
2198 user_handle_t handle; /* handle to the capture window */
2199 unsigned int flags; /* capture flags (see below) */
2200 @REPLY
2201 user_handle_t previous; /* handle to the previous capture window */
2202 user_handle_t full_handle; /* full 32-bit handle of new capture window */
2203 @END
2204 #define CAPTURE_MENU 0x01 /* capture is for a menu */
2205 #define CAPTURE_MOVESIZE 0x02 /* capture is for moving/resizing */
2208 /* Set the current thread caret window */
2209 @REQ(set_caret_window)
2210 user_handle_t handle; /* handle to the caret window */
2211 int width; /* caret width */
2212 int height; /* caret height */
2213 @REPLY
2214 user_handle_t previous; /* handle to the previous caret window */
2215 rectangle_t old_rect; /* previous caret rectangle */
2216 int old_hide; /* previous hide count */
2217 int old_state; /* previous caret state (1=on, 0=off) */
2218 @END
2221 /* Set the current thread caret information */
2222 @REQ(set_caret_info)
2223 unsigned int flags; /* caret flags (see below) */
2224 user_handle_t handle; /* handle to the caret window */
2225 int x; /* caret x position */
2226 int y; /* caret y position */
2227 int hide; /* increment for hide count (can be negative to show it) */
2228 int state; /* caret state (1=on, 0=off, -1=toggle current state) */
2229 @REPLY
2230 user_handle_t full_handle; /* handle to the current caret window */
2231 rectangle_t old_rect; /* previous caret rectangle */
2232 int old_hide; /* previous hide count */
2233 int old_state; /* previous caret state (1=on, 0=off) */
2234 @END
2235 #define SET_CARET_POS 0x01 /* set the caret position from x,y */
2236 #define SET_CARET_HIDE 0x02 /* increment the caret hide count */
2237 #define SET_CARET_STATE 0x04 /* set the caret on/off state */
2240 /* Set a window hook */
2241 @REQ(set_hook)
2242 int id; /* id of the hook */
2243 process_id_t pid; /* id of process to set the hook into */
2244 thread_id_t tid; /* id of thread to set the hook into */
2245 int event_min;
2246 int event_max;
2247 int flags;
2248 void* proc; /* hook procedure */
2249 int unicode; /* is it a unicode hook? */
2250 VARARG(module,unicode_str); /* module name */
2251 @REPLY
2252 user_handle_t handle; /* handle to the hook */
2253 unsigned int active_hooks; /* active hooks bitmap */
2254 @END
2257 /* Remove a window hook */
2258 @REQ(remove_hook)
2259 user_handle_t handle; /* handle to the hook */
2260 int id; /* id of the hook if handle is 0 */
2261 void* proc; /* hook procedure if handle is 0 */
2262 @REPLY
2263 unsigned int active_hooks; /* active hooks bitmap */
2264 @END
2267 /* Start calling a hook chain */
2268 @REQ(start_hook_chain)
2269 int id; /* id of the hook */
2270 int event; /* signalled event */
2271 user_handle_t window; /* handle to the event window */
2272 int object_id; /* object id for out of context winevent */
2273 int child_id; /* child id for out of context winevent */
2274 @REPLY
2275 user_handle_t handle; /* handle to the next hook */
2276 process_id_t pid; /* process id for low-level keyboard/mouse hooks */
2277 thread_id_t tid; /* thread id for low-level keyboard/mouse hooks */
2278 void* proc; /* hook procedure */
2279 int unicode; /* is it a unicode hook? */
2280 unsigned int active_hooks; /* active hooks bitmap */
2281 VARARG(module,unicode_str); /* module name */
2282 @END
2285 /* Finished calling a hook chain */
2286 @REQ(finish_hook_chain)
2287 int id; /* id of the hook */
2288 @END
2291 /* Get the next hook to call */
2292 @REQ(get_next_hook)
2293 user_handle_t handle; /* handle to the current hook */
2294 int event; /* signalled event */
2295 user_handle_t window; /* handle to the event window */
2296 int object_id; /* object id for out of context winevent */
2297 int child_id; /* child id for out of context winevent */
2298 @REPLY
2299 user_handle_t next; /* handle to the next hook */
2300 int id; /* id of the next hook */
2301 process_id_t pid; /* process id for low-level keyboard/mouse hooks */
2302 thread_id_t tid; /* thread id for low-level keyboard/mouse hooks */
2303 void* proc; /* next hook procedure */
2304 int prev_unicode; /* was the previous a unicode hook? */
2305 int next_unicode; /* is the next a unicode hook? */
2306 VARARG(module,unicode_str); /* module name */
2307 @END
2310 /* Create a window class */
2311 @REQ(create_class)
2312 int local; /* is it a local class? */
2313 atom_t atom; /* class atom */
2314 unsigned int style; /* class style */
2315 void* instance; /* module instance */
2316 int extra; /* number of extra class bytes */
2317 int win_extra; /* number of window extra bytes */
2318 void* client_ptr; /* pointer to class in client address space */
2319 @END
2322 /* Destroy a window class */
2323 @REQ(destroy_class)
2324 atom_t atom; /* class atom */
2325 void* instance; /* module instance */
2326 @REPLY
2327 void* client_ptr; /* pointer to class in client address space */
2328 @END
2331 /* Set some information in a class */
2332 @REQ(set_class_info)
2333 user_handle_t window; /* handle to the window */
2334 unsigned int flags; /* flags for info to set (see below) */
2335 atom_t atom; /* class atom */
2336 unsigned int style; /* class style */
2337 int win_extra; /* number of window extra bytes */
2338 void* instance; /* module instance */
2339 int extra_offset; /* offset to set in extra bytes */
2340 size_t extra_size; /* size to set in extra bytes */
2341 unsigned int extra_value; /* value to set in extra bytes */
2342 @REPLY
2343 atom_t old_atom; /* previous class atom */
2344 unsigned int old_style; /* previous class style */
2345 int old_extra; /* previous number of class extra bytes */
2346 int old_win_extra; /* previous number of window extra bytes */
2347 void* old_instance; /* previous module instance */
2348 unsigned int old_extra_value; /* old value in extra bytes */
2349 @END
2350 #define SET_CLASS_ATOM 0x0001
2351 #define SET_CLASS_STYLE 0x0002
2352 #define SET_CLASS_WINEXTRA 0x0004
2353 #define SET_CLASS_INSTANCE 0x0008
2354 #define SET_CLASS_EXTRA 0x0010
2357 /* Set/get clipboard information */
2358 @REQ(set_clipboard_info)
2359 unsigned int flags; /* flags for fields to set (see below) */
2360 user_handle_t clipboard; /* clipboard window */
2361 user_handle_t owner; /* clipboard owner */
2362 user_handle_t viewer; /* first clipboard viewer */
2363 unsigned int seqno; /* change sequence number */
2364 @REPLY
2365 unsigned int flags; /* status flags (see below) */
2366 user_handle_t old_clipboard; /* old clipboard window */
2367 user_handle_t old_owner; /* old clipboard owner */
2368 user_handle_t old_viewer; /* old clipboard viewer */
2369 unsigned int seqno; /* current sequence number */
2370 @END
2372 #define SET_CB_OPEN 0x001
2373 #define SET_CB_OWNER 0x002
2374 #define SET_CB_VIEWER 0x004
2375 #define SET_CB_SEQNO 0x008
2376 #define SET_CB_RELOWNER 0x010
2377 #define SET_CB_CLOSE 0x020
2378 #define CB_OPEN 0x040
2379 #define CB_OWNER 0x080
2380 #define CB_PROCESS 0x100
2383 /* Open a security token */
2384 @REQ(open_token)
2385 obj_handle_t handle; /* handle to the thread or process */
2386 unsigned int flags; /* flags (see below) */
2387 @REPLY
2388 obj_handle_t token; /* handle to the token */
2389 @END
2390 #define OPEN_TOKEN_THREAD 1
2391 #define OPEN_TOKEN_AS_SELF 2
2394 /* Set/get the global windows */
2395 @REQ(set_global_windows)
2396 unsigned int flags; /* flags for fields to set (see below) */
2397 user_handle_t shell_window; /* handle to the new shell window */
2398 user_handle_t shell_listview; /* handle to the new shell listview window */
2399 user_handle_t progman_window; /* handle to the new program manager window */
2400 user_handle_t taskman_window; /* handle to the new task manager window */
2401 @REPLY
2402 user_handle_t old_shell_window; /* handle to the shell window */
2403 user_handle_t old_shell_listview; /* handle to the shell listview window */
2404 user_handle_t old_progman_window; /* handle to the new program manager window */
2405 user_handle_t old_taskman_window; /* handle to the new task manager window */
2406 @END
2407 #define SET_GLOBAL_SHELL_WINDOWS 0x01 /* set both main shell and listview windows */
2408 #define SET_GLOBAL_PROGMAN_WINDOW 0x02
2409 #define SET_GLOBAL_TASKMAN_WINDOW 0x04
2411 /* Adjust the privileges held by a token */
2412 @REQ(adjust_token_privileges)
2413 obj_handle_t handle; /* handle to the token */
2414 int disable_all; /* disable all privileges? */
2415 int get_modified_state; /* get modified privileges? */
2416 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges to enable/disable/remove */
2417 @REPLY
2418 unsigned int len; /* total length in bytes required to store token privileges */
2419 VARARG(privileges,LUID_AND_ATTRIBUTES); /* modified privileges */
2420 @END
2422 /* Retrieves the set of privileges held by or available to a token */
2423 @REQ(get_token_privileges)
2424 obj_handle_t handle; /* handle to the token */
2425 @REPLY
2426 unsigned int len; /* total length in bytes required to store token privileges */
2427 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges held by or available to a token */
2428 @END
2430 /* Check the token has the required privileges */
2431 @REQ(check_token_privileges)
2432 obj_handle_t handle; /* handle to the token */
2433 int all_required; /* are all the privileges required for the check to succeed? */
2434 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges to check */
2435 @REPLY
2436 int has_privileges; /* does the token have the required privileges? */
2437 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges held by or available to a token */
2438 @END
2440 @REQ(duplicate_token)
2441 obj_handle_t handle; /* handle to the token to duplicate */
2442 unsigned int access; /* access rights to the new token */
2443 int inherit; /* inherit flag */
2444 int primary; /* is the new token to be a primary one? */
2445 int impersonation_level; /* impersonation level of the new token */
2446 @REPLY
2447 obj_handle_t new_handle; /* duplicated handle */
2448 @END
2450 @REQ(access_check)
2451 obj_handle_t handle; /* handle to the token */
2452 unsigned int desired_access; /* desired access to the object */
2453 unsigned int mapping_read; /* mapping from generic read to specific rights */
2454 unsigned int mapping_write; /* mapping from generic write to specific rights */
2455 unsigned int mapping_execute; /* mapping from generic execute to specific rights */
2456 unsigned int mapping_all; /* mapping from generic all to specific rights */
2457 VARARG(sd,security_descriptor); /* security descriptor to check */
2458 @REPLY
2459 unsigned int access_granted; /* access rights actually granted */
2460 unsigned int access_status; /* was access granted? */
2461 unsigned int privileges_len; /* length needed to store privileges */
2462 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges used during access check */
2463 @END
2465 @REQ(get_token_user)
2466 obj_handle_t handle; /* handle to the token */
2467 @REPLY
2468 size_t user_len; /* length needed to store user */
2469 VARARG(user,SID); /* sid of the user the token represents */
2470 @END
2472 /* Create a mailslot */
2473 @REQ(create_mailslot)
2474 unsigned int max_msgsize;
2475 unsigned int read_timeout;
2476 int inherit;
2477 VARARG(name,unicode_str); /* mailslot name */
2478 @REPLY
2479 obj_handle_t handle; /* handle to the mailslot */
2480 @END
2483 /* Open an existing mailslot */
2484 @REQ(open_mailslot)
2485 unsigned int access;
2486 int inherit; /* inherit flag */
2487 unsigned int sharing; /* sharing mode */
2488 VARARG(name,unicode_str); /* mailslot name */
2489 @REPLY
2490 obj_handle_t handle; /* handle to the mailslot */
2491 @END
2494 /* Set mailslot information */
2495 @REQ(set_mailslot_info)
2496 obj_handle_t handle; /* handle to the mailslot */
2497 unsigned int flags;
2498 unsigned int read_timeout;
2499 @REPLY
2500 unsigned int max_msgsize;
2501 unsigned int read_timeout;
2502 unsigned int msg_count;
2503 unsigned int next_msgsize;
2504 @END
2505 #define MAILSLOT_SET_READ_TIMEOUT 1