server: Rename the wait_input_idle request to better reflect what it does.
[wine/multimedia.git] / server / protocol.def
blob7fd045a4556e050728898fbf6d3f7798e9f1fe18
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 void *obj_handle_t;
35 typedef void *user_handle_t;
36 typedef unsigned short atom_t;
37 typedef unsigned int process_id_t;
38 typedef unsigned int thread_id_t;
39 typedef unsigned int data_size_t;
41 struct request_header
43 int req; /* request code */
44 data_size_t request_size; /* request variable part size */
45 data_size_t reply_size; /* reply variable part maximum size */
48 struct reply_header
50 unsigned int error; /* error result */
51 data_size_t reply_size; /* reply variable part size */
54 /* placeholder structure for the maximum allowed request size */
55 /* this is used to construct the generic_request union */
56 struct request_max_size
58 int pad[16]; /* the max request size is 16 ints */
61 #define FIRST_USER_HANDLE 0x0020 /* first possible value for low word of user handle */
62 #define LAST_USER_HANDLE 0xffef /* last possible value for low word of user handle */
65 /* definitions of the event data depending on the event code */
66 struct debug_event_exception
68 EXCEPTION_RECORD record; /* exception record */
69 int first; /* first chance exception? */
71 struct debug_event_create_thread
73 obj_handle_t handle; /* handle to the new thread */
74 void *teb; /* thread teb (in debugged process address space) */
75 void *start; /* thread startup routine */
77 struct debug_event_create_process
79 obj_handle_t file; /* handle to the process exe file */
80 obj_handle_t process; /* handle to the new process */
81 obj_handle_t thread; /* handle to the new thread */
82 void *base; /* base of executable image */
83 int dbg_offset; /* offset of debug info in file */
84 int dbg_size; /* size of debug info */
85 void *teb; /* thread teb (in debugged process address space) */
86 void *start; /* thread startup routine */
87 void *name; /* image name (optional) */
88 int unicode; /* is it Unicode? */
90 struct debug_event_exit
92 int exit_code; /* thread or process exit code */
94 struct debug_event_load_dll
96 obj_handle_t handle; /* file handle for the dll */
97 void *base; /* base address of the dll */
98 int dbg_offset; /* offset of debug info in file */
99 int dbg_size; /* size of debug info */
100 void *name; /* image name (optional) */
101 int unicode; /* is it Unicode? */
103 struct debug_event_unload_dll
105 void *base; /* base address of the dll */
107 struct debug_event_output_string
109 void *string; /* string to display (in debugged process address space) */
110 int unicode; /* is it Unicode? */
111 int length; /* string length */
113 struct debug_event_rip_info
115 int error; /* ??? */
116 int type; /* ??? */
118 union debug_event_data
120 struct debug_event_exception exception;
121 struct debug_event_create_thread create_thread;
122 struct debug_event_create_process create_process;
123 struct debug_event_exit exit;
124 struct debug_event_load_dll load_dll;
125 struct debug_event_unload_dll unload_dll;
126 struct debug_event_output_string output_string;
127 struct debug_event_rip_info rip_info;
130 /* debug event data */
131 typedef struct
133 int code; /* event code */
134 union debug_event_data info; /* event information */
135 } debug_event_t;
137 /* structure used in sending an fd from client to server */
138 struct send_fd
140 thread_id_t tid; /* thread id */
141 int fd; /* file descriptor on client-side */
144 /* structure sent by the server on the wait fifo */
145 struct wake_up_reply
147 void *cookie; /* magic cookie that was passed in select_request */
148 int signaled; /* wait result */
151 /* structure for absolute timeouts */
152 typedef struct
154 int sec; /* seconds since Unix epoch */
155 int usec; /* microseconds */
156 } abs_time_t;
158 /* structure returned in the list of window properties */
159 typedef struct
161 atom_t atom; /* property atom */
162 short string; /* was atom a string originally? */
163 obj_handle_t handle; /* handle stored in property */
164 } property_data_t;
166 /* structure to specify window rectangles */
167 typedef struct
169 int left;
170 int top;
171 int right;
172 int bottom;
173 } rectangle_t;
175 /* structure for console char/attribute info */
176 typedef struct
178 WCHAR ch;
179 unsigned short attr;
180 } char_info_t;
182 #define MAX_ACL_LEN 65535
184 struct security_descriptor
186 unsigned int control; /* SE_ flags */
187 data_size_t owner_len;
188 data_size_t group_len;
189 data_size_t sacl_len;
190 data_size_t dacl_len;
191 /* VARARGS(owner,SID); */
192 /* VARARGS(group,SID); */
193 /* VARARGS(sacl,ACL); */
194 /* VARARGS(dacl,ACL); */
197 struct token_groups
199 unsigned int count;
200 /* unsigned int attributes[count]; */
201 /* VARARGS(sids,SID); */
204 /****************************************************************/
205 /* Request declarations */
207 /* Create a new process from the context of the parent */
208 @REQ(new_process)
209 int inherit_all; /* inherit all handles from parent */
210 unsigned int create_flags; /* creation flags */
211 int socket_fd; /* file descriptor for process socket */
212 obj_handle_t exe_file; /* file handle for main exe */
213 obj_handle_t hstdin; /* handle for stdin */
214 obj_handle_t hstdout; /* handle for stdout */
215 obj_handle_t hstderr; /* handle for stderr */
216 unsigned int process_access; /* access rights for process object */
217 unsigned int process_attr; /* attributes for process object */
218 unsigned int thread_access; /* access rights for thread object */
219 unsigned int thread_attr; /* attributes for thread object */
220 VARARG(info,startup_info); /* startup information */
221 VARARG(env,unicode_str); /* environment for new process */
222 @REPLY
223 obj_handle_t info; /* new process info handle */
224 process_id_t pid; /* process id */
225 obj_handle_t phandle; /* process handle (in the current process) */
226 thread_id_t tid; /* thread id */
227 obj_handle_t thandle; /* thread handle (in the current process) */
228 @END
231 /* Retrieve information about a newly started process */
232 @REQ(get_new_process_info)
233 obj_handle_t info; /* info handle returned from new_process_request */
234 @REPLY
235 int success; /* did the process start successfully? */
236 int exit_code; /* process exit code if failed */
237 @END
240 /* Create a new thread from the context of the parent */
241 @REQ(new_thread)
242 unsigned int access; /* wanted access rights */
243 unsigned int attributes; /* object attributes */
244 int suspend; /* new thread should be suspended on creation */
245 int request_fd; /* fd for request pipe */
246 @REPLY
247 thread_id_t tid; /* thread id */
248 obj_handle_t handle; /* thread handle (in the current process) */
249 @END
252 /* Retrieve the new process startup info */
253 @REQ(get_startup_info)
254 @REPLY
255 obj_handle_t exe_file; /* file handle for main exe */
256 obj_handle_t hstdin; /* handle for stdin */
257 obj_handle_t hstdout; /* handle for stdout */
258 obj_handle_t hstderr; /* handle for stderr */
259 VARARG(info,startup_info); /* startup information */
260 VARARG(env,unicode_str); /* environment */
261 @END
264 /* Signal the end of the process initialization */
265 @REQ(init_process_done)
266 void* module; /* main module base address */
267 void* entry; /* process entry point */
268 int gui; /* is it a GUI process? */
269 @END
272 /* Initialize a thread; called from the child after fork()/clone() */
273 @REQ(init_thread)
274 int unix_pid; /* Unix pid of new thread */
275 int unix_tid; /* Unix tid of new thread */
276 void* teb; /* TEB of new thread (in thread address space) */
277 void* peb; /* address of PEB (in thread address space) */
278 void* entry; /* thread entry point (in thread address space) */
279 void* ldt_copy; /* address of LDT copy (in thread address space) */
280 int reply_fd; /* fd for reply pipe */
281 int wait_fd; /* fd for blocking calls pipe */
282 int debug_level; /* new debug level */
283 @REPLY
284 process_id_t pid; /* process id of the new thread's process */
285 thread_id_t tid; /* thread id of the new thread */
286 data_size_t info_size; /* total size of startup info */
287 time_t server_start; /* server start time */
288 int version; /* protocol version */
289 @END
292 /* Terminate a process */
293 @REQ(terminate_process)
294 obj_handle_t handle; /* process handle to terminate */
295 int exit_code; /* process exit code */
296 @REPLY
297 int self; /* suicide? */
298 @END
301 /* Terminate a thread */
302 @REQ(terminate_thread)
303 obj_handle_t handle; /* thread handle to terminate */
304 int exit_code; /* thread exit code */
305 @REPLY
306 int self; /* suicide? */
307 int last; /* last thread in this process? */
308 @END
311 /* Retrieve information about a process */
312 @REQ(get_process_info)
313 obj_handle_t handle; /* process handle */
314 @REPLY
315 process_id_t pid; /* server process id */
316 process_id_t ppid; /* server process id of parent */
317 int exit_code; /* process exit code */
318 int priority; /* priority class */
319 int affinity; /* process affinity mask */
320 void* peb; /* PEB address in process address space */
321 abs_time_t start_time; /* process start time */
322 abs_time_t end_time; /* process end time */
323 @END
326 /* Set a process informations */
327 @REQ(set_process_info)
328 obj_handle_t handle; /* process handle */
329 int mask; /* setting mask (see below) */
330 int priority; /* priority class */
331 int affinity; /* affinity mask */
332 @END
333 #define SET_PROCESS_INFO_PRIORITY 0x01
334 #define SET_PROCESS_INFO_AFFINITY 0x02
337 /* Retrieve information about a thread */
338 @REQ(get_thread_info)
339 obj_handle_t handle; /* thread handle */
340 thread_id_t tid_in; /* thread id (optional) */
341 @REPLY
342 process_id_t pid; /* server process id */
343 thread_id_t tid; /* server thread id */
344 void* teb; /* thread teb pointer */
345 int exit_code; /* thread exit code */
346 int priority; /* thread priority level */
347 int affinity; /* thread affinity mask */
348 time_t creation_time; /* thread creation time */
349 time_t exit_time; /* thread exit time */
350 @END
353 /* Set a thread informations */
354 @REQ(set_thread_info)
355 obj_handle_t handle; /* thread handle */
356 int mask; /* setting mask (see below) */
357 int priority; /* priority class */
358 int affinity; /* affinity mask */
359 obj_handle_t token; /* impersonation token */
360 @END
361 #define SET_THREAD_INFO_PRIORITY 0x01
362 #define SET_THREAD_INFO_AFFINITY 0x02
363 #define SET_THREAD_INFO_TOKEN 0x04
366 /* Retrieve information about a module */
367 @REQ(get_dll_info)
368 obj_handle_t handle; /* process handle */
369 void* base_address; /* base address of module */
370 @REPLY
371 size_t size; /* module size */
372 void* entry_point;
373 VARARG(filename,unicode_str); /* file name of module */
374 @END
377 /* Suspend a thread */
378 @REQ(suspend_thread)
379 obj_handle_t handle; /* thread handle */
380 @REPLY
381 int count; /* new suspend count */
382 @END
385 /* Resume a thread */
386 @REQ(resume_thread)
387 obj_handle_t handle; /* thread handle */
388 @REPLY
389 int count; /* new suspend count */
390 @END
393 /* Notify the server that a dll has been loaded */
394 @REQ(load_dll)
395 obj_handle_t handle; /* file handle */
396 void* base; /* base address */
397 size_t size; /* dll size */
398 int dbg_offset; /* debug info offset */
399 int dbg_size; /* debug info size */
400 void* name; /* ptr to ptr to name (in process addr space) */
401 VARARG(filename,unicode_str); /* file name of dll */
402 @END
405 /* Notify the server that a dll is being unloaded */
406 @REQ(unload_dll)
407 void* base; /* base address */
408 @END
411 /* Queue an APC for a thread */
412 @REQ(queue_apc)
413 obj_handle_t handle; /* thread handle */
414 int user; /* user or system apc? */
415 void* func; /* function to call */
416 void* arg1; /* params for function to call */
417 void* arg2;
418 void* arg3;
419 @END
422 /* Get next APC to call */
423 @REQ(get_apc)
424 int alertable; /* is thread alertable? */
425 @REPLY
426 void* func; /* function to call */
427 int type; /* function type */
428 void* arg1; /* function arguments */
429 void* arg2;
430 void* arg3;
431 @END
432 enum apc_type { APC_NONE, APC_USER, APC_TIMER, APC_ASYNC_IO };
435 /* Close a handle for the current process */
436 @REQ(close_handle)
437 obj_handle_t handle; /* handle to close */
438 @REPLY
439 int fd; /* associated fd to close */
440 @END
443 /* Set a handle information */
444 @REQ(set_handle_info)
445 obj_handle_t handle; /* handle we are interested in */
446 int flags; /* new handle flags */
447 int mask; /* mask for flags to set */
448 @REPLY
449 int old_flags; /* old flag value */
450 @END
453 /* Duplicate a handle */
454 @REQ(dup_handle)
455 obj_handle_t src_process; /* src process handle */
456 obj_handle_t src_handle; /* src handle to duplicate */
457 obj_handle_t dst_process; /* dst process handle */
458 unsigned int access; /* wanted access rights */
459 unsigned int attributes; /* object attributes */
460 unsigned int options; /* duplicate options (see below) */
461 @REPLY
462 obj_handle_t handle; /* duplicated handle in dst process */
463 int fd; /* associated fd to close */
464 @END
465 #define DUP_HANDLE_CLOSE_SOURCE DUPLICATE_CLOSE_SOURCE
466 #define DUP_HANDLE_SAME_ACCESS DUPLICATE_SAME_ACCESS
467 #define DUP_HANDLE_MAKE_GLOBAL 0x80000000 /* Not a Windows flag */
470 /* Open a handle to a process */
471 @REQ(open_process)
472 process_id_t pid; /* process id to open */
473 unsigned int access; /* wanted access rights */
474 unsigned int attributes; /* object attributes */
475 @REPLY
476 obj_handle_t handle; /* handle to the process */
477 @END
480 /* Open a handle to a thread */
481 @REQ(open_thread)
482 thread_id_t tid; /* thread id to open */
483 unsigned int access; /* wanted access rights */
484 unsigned int attributes; /* object attributes */
485 @REPLY
486 obj_handle_t handle; /* handle to the thread */
487 @END
490 /* Wait for handles */
491 @REQ(select)
492 int flags; /* wait flags (see below) */
493 void* cookie; /* magic cookie to return to client */
494 obj_handle_t signal; /* object to signal (0 if none) */
495 abs_time_t timeout; /* absolute timeout */
496 VARARG(handles,handles); /* handles to select on */
497 @END
498 #define SELECT_ALL 1
499 #define SELECT_ALERTABLE 2
500 #define SELECT_INTERRUPTIBLE 4
501 #define SELECT_TIMEOUT 8
504 /* Create an event */
505 @REQ(create_event)
506 unsigned int access; /* wanted access rights */
507 unsigned int attributes; /* object attributes */
508 obj_handle_t rootdir; /* root directory */
509 int manual_reset; /* manual reset event */
510 int initial_state; /* initial state of the event */
511 VARARG(name,unicode_str); /* object name */
512 @REPLY
513 obj_handle_t handle; /* handle to the event */
514 @END
516 /* Event operation */
517 @REQ(event_op)
518 obj_handle_t handle; /* handle to event */
519 int op; /* event operation (see below) */
520 @END
521 enum event_op { PULSE_EVENT, SET_EVENT, RESET_EVENT };
524 /* Open an event */
525 @REQ(open_event)
526 unsigned int access; /* wanted access rights */
527 unsigned int attributes; /* object attributes */
528 obj_handle_t rootdir; /* root directory */
529 VARARG(name,unicode_str); /* object name */
530 @REPLY
531 obj_handle_t handle; /* handle to the event */
532 @END
535 /* Create a mutex */
536 @REQ(create_mutex)
537 unsigned int access; /* wanted access rights */
538 unsigned int attributes; /* object attributes */
539 obj_handle_t rootdir; /* root directory */
540 int owned; /* initially owned? */
541 VARARG(name,unicode_str); /* object name */
542 @REPLY
543 obj_handle_t handle; /* handle to the mutex */
544 @END
547 /* Release a mutex */
548 @REQ(release_mutex)
549 obj_handle_t handle; /* handle to the mutex */
550 @REPLY
551 unsigned int prev_count; /* value of internal counter, before release */
552 @END
555 /* Open a mutex */
556 @REQ(open_mutex)
557 unsigned int access; /* wanted access rights */
558 unsigned int attributes; /* object attributes */
559 obj_handle_t rootdir; /* root directory */
560 VARARG(name,unicode_str); /* object name */
561 @REPLY
562 obj_handle_t handle; /* handle to the mutex */
563 @END
566 /* Create a semaphore */
567 @REQ(create_semaphore)
568 unsigned int access; /* wanted access rights */
569 unsigned int attributes; /* object attributes */
570 obj_handle_t rootdir; /* root directory */
571 unsigned int initial; /* initial count */
572 unsigned int max; /* maximum count */
573 VARARG(name,unicode_str); /* object name */
574 @REPLY
575 obj_handle_t handle; /* handle to the semaphore */
576 @END
579 /* Release a semaphore */
580 @REQ(release_semaphore)
581 obj_handle_t handle; /* handle to the semaphore */
582 unsigned int count; /* count to add to semaphore */
583 @REPLY
584 unsigned int prev_count; /* previous semaphore count */
585 @END
588 /* Open a semaphore */
589 @REQ(open_semaphore)
590 unsigned int access; /* wanted access rights */
591 unsigned int attributes; /* object attributes */
592 obj_handle_t rootdir; /* root directory */
593 VARARG(name,unicode_str); /* object name */
594 @REPLY
595 obj_handle_t handle; /* handle to the semaphore */
596 @END
599 /* Create a file */
600 @REQ(create_file)
601 unsigned int access; /* wanted access rights */
602 unsigned int attributes; /* object attributes */
603 unsigned int sharing; /* sharing flags */
604 int create; /* file create action */
605 unsigned int options; /* file options */
606 unsigned int attrs; /* file attributes for creation */
607 VARARG(filename,string); /* file name */
608 @REPLY
609 obj_handle_t handle; /* handle to the file */
610 @END
613 /* Open a file object */
614 @REQ(open_file_object)
615 unsigned int access; /* wanted access rights */
616 unsigned int attributes; /* open attributes */
617 obj_handle_t rootdir; /* root directory */
618 unsigned int sharing; /* sharing flags */
619 VARARG(filename,unicode_str); /* file name */
620 @REPLY
621 obj_handle_t handle; /* handle to the file */
622 @END
625 /* Allocate a file handle for a Unix fd */
626 @REQ(alloc_file_handle)
627 unsigned int access; /* wanted access rights */
628 unsigned int attributes; /* object attributes */
629 int fd; /* file descriptor on the client side */
630 @REPLY
631 obj_handle_t handle; /* handle to the file */
632 @END
635 /* Get a Unix fd to access a file */
636 @REQ(get_handle_fd)
637 obj_handle_t handle; /* handle to the file */
638 unsigned int access; /* wanted access rights */
639 @REPLY
640 int fd; /* file descriptor */
641 int removable; /* is device removable? (-1 if unknown) */
642 int flags; /* file read/write flags (see below) */
643 @END
644 #define FD_FLAG_OVERLAPPED 0x01 /* fd opened in overlapped mode */
645 #define FD_FLAG_TIMEOUT 0x02 /* read/write is synchronous */
646 #define FD_FLAG_RECV_SHUTDOWN 0x04
647 #define FD_FLAG_SEND_SHUTDOWN 0x08
648 #define FD_FLAG_AVAILABLE 0x10 /* in overlap read/write operation,
649 * only handle available data (don't wait) */
651 /* Set the cached file descriptor of a handle */
652 @REQ(set_handle_fd)
653 obj_handle_t handle; /* handle we are interested in */
654 int fd; /* file descriptor */
655 int removable; /* is device removable? (-1 if unknown) */
656 @REPLY
657 int cur_fd; /* current file descriptor */
658 @END
661 /* Flush a file buffers */
662 @REQ(flush_file)
663 obj_handle_t handle; /* handle to the file */
664 @REPLY
665 obj_handle_t event; /* event set when finished */
666 @END
669 /* Lock a region of a file */
670 @REQ(lock_file)
671 obj_handle_t handle; /* handle to the file */
672 unsigned int offset_low; /* offset of start of lock */
673 unsigned int offset_high; /* offset of start of lock */
674 unsigned int count_low; /* count of bytes to lock */
675 unsigned int count_high; /* count of bytes to lock */
676 int shared; /* shared or exclusive lock? */
677 int wait; /* do we want to wait? */
678 @REPLY
679 obj_handle_t handle; /* handle to wait on */
680 int overlapped; /* is it an overlapped I/O handle? */
681 @END
684 /* Unlock a region of a file */
685 @REQ(unlock_file)
686 obj_handle_t handle; /* handle to the file */
687 unsigned int offset_low; /* offset of start of unlock */
688 unsigned int offset_high; /* offset of start of unlock */
689 unsigned int count_low; /* count of bytes to unlock */
690 unsigned int count_high; /* count of bytes to unlock */
691 @END
694 /* Get ready to unmount a Unix device */
695 @REQ(unmount_device)
696 obj_handle_t handle; /* handle to a file on the device */
697 @END
700 /* Create a socket */
701 @REQ(create_socket)
702 unsigned int access; /* wanted access rights */
703 unsigned int attributes; /* object attributes */
704 int family; /* family, see socket manpage */
705 int type; /* type, see socket manpage */
706 int protocol; /* protocol, see socket manpage */
707 unsigned int flags; /* socket flags */
708 @REPLY
709 obj_handle_t handle; /* handle to the new socket */
710 @END
713 /* Accept a socket */
714 @REQ(accept_socket)
715 obj_handle_t lhandle; /* handle to the listening socket */
716 unsigned int access; /* wanted access rights */
717 unsigned int attributes; /* object attributes */
718 @REPLY
719 obj_handle_t handle; /* handle to the new socket */
720 @END
723 /* Set socket event parameters */
724 @REQ(set_socket_event)
725 obj_handle_t handle; /* handle to the socket */
726 unsigned int mask; /* event mask */
727 obj_handle_t event; /* event object */
728 user_handle_t window; /* window to send the message to */
729 unsigned int msg; /* message to send */
730 @END
733 /* Get socket event parameters */
734 @REQ(get_socket_event)
735 obj_handle_t handle; /* handle to the socket */
736 int service; /* clear pending? */
737 obj_handle_t c_event; /* event to clear */
738 @REPLY
739 unsigned int mask; /* event mask */
740 unsigned int pmask; /* pending events */
741 unsigned int state; /* status bits */
742 VARARG(errors,ints); /* event errors */
743 @END
746 /* Reenable pending socket events */
747 @REQ(enable_socket_event)
748 obj_handle_t handle; /* handle to the socket */
749 unsigned int mask; /* events to re-enable */
750 unsigned int sstate; /* status bits to set */
751 unsigned int cstate; /* status bits to clear */
752 @END
754 @REQ(set_socket_deferred)
755 obj_handle_t handle; /* handle to the socket */
756 obj_handle_t deferred; /* handle to the socket for which accept() is deferred */
757 @END
759 /* Allocate a console (only used by a console renderer) */
760 @REQ(alloc_console)
761 unsigned int access; /* wanted access rights */
762 unsigned int attributes; /* object attributes */
763 process_id_t pid; /* pid of process which shall be attached to the console */
764 @REPLY
765 obj_handle_t handle_in; /* handle to console input */
766 obj_handle_t event; /* handle to renderer events change notification */
767 @END
770 /* Free the console of the current process */
771 @REQ(free_console)
772 @END
775 #define CONSOLE_RENDERER_NONE_EVENT 0x00
776 #define CONSOLE_RENDERER_TITLE_EVENT 0x01
777 #define CONSOLE_RENDERER_ACTIVE_SB_EVENT 0x02
778 #define CONSOLE_RENDERER_SB_RESIZE_EVENT 0x03
779 #define CONSOLE_RENDERER_UPDATE_EVENT 0x04
780 #define CONSOLE_RENDERER_CURSOR_POS_EVENT 0x05
781 #define CONSOLE_RENDERER_CURSOR_GEOM_EVENT 0x06
782 #define CONSOLE_RENDERER_DISPLAY_EVENT 0x07
783 #define CONSOLE_RENDERER_EXIT_EVENT 0x08
784 struct console_renderer_event
786 short event;
787 union
789 struct update
791 short top;
792 short bottom;
793 } update;
794 struct resize
796 short width;
797 short height;
798 } resize;
799 struct cursor_pos
801 short x;
802 short y;
803 } cursor_pos;
804 struct cursor_geom
806 short visible;
807 short size;
808 } cursor_geom;
809 struct display
811 short left;
812 short top;
813 short width;
814 short height;
815 } display;
816 } u;
819 /* retrieve console events for the renderer */
820 @REQ(get_console_renderer_events)
821 obj_handle_t handle; /* handle to console input events */
822 @REPLY
823 VARARG(data,bytes); /* the various console_renderer_events */
824 @END
827 /* Open a handle to the process console */
828 @REQ(open_console)
829 obj_handle_t from; /* 0 (resp 1) input (resp output) of current process console */
830 /* otherwise console_in handle to get active screen buffer? */
831 unsigned int access; /* wanted access rights */
832 unsigned int attributes; /* object attributes */
833 int share; /* share mask (only for output handles) */
834 @REPLY
835 obj_handle_t handle; /* handle to the console */
836 @END
839 /* Get the input queue wait event */
840 @REQ(get_console_wait_event)
841 @REPLY
842 obj_handle_t handle;
843 @END
845 /* Get a console mode (input or output) */
846 @REQ(get_console_mode)
847 obj_handle_t handle; /* handle to the console */
848 @REPLY
849 int mode; /* console mode */
850 @END
853 /* Set a console mode (input or output) */
854 @REQ(set_console_mode)
855 obj_handle_t handle; /* handle to the console */
856 int mode; /* console mode */
857 @END
860 /* Set info about a console (input only) */
861 @REQ(set_console_input_info)
862 obj_handle_t handle; /* handle to console input, or 0 for process' console */
863 int mask; /* setting mask (see below) */
864 obj_handle_t active_sb; /* active screen buffer */
865 int history_mode; /* whether we duplicate lines in history */
866 int history_size; /* number of lines in history */
867 int edition_mode; /* index to the edition mode flavors */
868 VARARG(title,unicode_str); /* console title */
869 @END
870 #define SET_CONSOLE_INPUT_INFO_ACTIVE_SB 0x01
871 #define SET_CONSOLE_INPUT_INFO_TITLE 0x02
872 #define SET_CONSOLE_INPUT_INFO_HISTORY_MODE 0x04
873 #define SET_CONSOLE_INPUT_INFO_HISTORY_SIZE 0x08
874 #define SET_CONSOLE_INPUT_INFO_EDITION_MODE 0x10
877 /* Get info about a console (input only) */
878 @REQ(get_console_input_info)
879 obj_handle_t handle; /* handle to console input, or 0 for process' console */
880 @REPLY
881 int history_mode; /* whether we duplicate lines in history */
882 int history_size; /* number of lines in history */
883 int history_index; /* number of used lines in history */
884 int edition_mode; /* index to the edition mode flavors */
885 VARARG(title,unicode_str); /* console title */
886 @END
889 /* appends a string to console's history */
890 @REQ(append_console_input_history)
891 obj_handle_t handle; /* handle to console input, or 0 for process' console */
892 VARARG(line,unicode_str); /* line to add */
893 @END
896 /* appends a string to console's history */
897 @REQ(get_console_input_history)
898 obj_handle_t handle; /* handle to console input, or 0 for process' console */
899 int index; /* index to get line from */
900 @REPLY
901 int total; /* total length of line in Unicode chars */
902 VARARG(line,unicode_str); /* line to add */
903 @END
906 /* creates a new screen buffer on process' console */
907 @REQ(create_console_output)
908 obj_handle_t handle_in; /* handle to console input, or 0 for process' console */
909 unsigned int access; /* wanted access rights */
910 unsigned int attributes; /* object attributes */
911 unsigned int share; /* sharing credentials */
912 @REPLY
913 obj_handle_t handle_out; /* handle to the screen buffer */
914 @END
917 /* Set info about a console (output only) */
918 @REQ(set_console_output_info)
919 obj_handle_t handle; /* handle to the console */
920 int mask; /* setting mask (see below) */
921 short int cursor_size; /* size of cursor (percentage filled) */
922 short int cursor_visible;/* cursor visibility flag */
923 short int cursor_x; /* position of cursor (x, y) */
924 short int cursor_y;
925 short int width; /* width of the screen buffer */
926 short int height; /* height of the screen buffer */
927 short int attr; /* default attribute */
928 short int win_left; /* window actually displayed by renderer */
929 short int win_top; /* the rect area is expressed withing the */
930 short int win_right; /* boundaries of the screen buffer */
931 short int win_bottom;
932 short int max_width; /* maximum size (width x height) for the window */
933 short int max_height;
934 @END
935 #define SET_CONSOLE_OUTPUT_INFO_CURSOR_GEOM 0x01
936 #define SET_CONSOLE_OUTPUT_INFO_CURSOR_POS 0x02
937 #define SET_CONSOLE_OUTPUT_INFO_SIZE 0x04
938 #define SET_CONSOLE_OUTPUT_INFO_ATTR 0x08
939 #define SET_CONSOLE_OUTPUT_INFO_DISPLAY_WINDOW 0x10
940 #define SET_CONSOLE_OUTPUT_INFO_MAX_SIZE 0x20
943 /* Get info about a console (output only) */
944 @REQ(get_console_output_info)
945 obj_handle_t handle; /* handle to the console */
946 @REPLY
947 short int cursor_size; /* size of cursor (percentage filled) */
948 short int cursor_visible;/* cursor visibility flag */
949 short int cursor_x; /* position of cursor (x, y) */
950 short int cursor_y;
951 short int width; /* width of the screen buffer */
952 short int height; /* height of the screen buffer */
953 short int attr; /* default attribute */
954 short int win_left; /* window actually displayed by renderer */
955 short int win_top; /* the rect area is expressed withing the */
956 short int win_right; /* boundaries of the screen buffer */
957 short int win_bottom;
958 short int max_width; /* maximum size (width x height) for the window */
959 short int max_height;
960 @END
962 /* Add input records to a console input queue */
963 @REQ(write_console_input)
964 obj_handle_t handle; /* handle to the console input */
965 VARARG(rec,input_records); /* input records */
966 @REPLY
967 int written; /* number of records written */
968 @END
971 /* Fetch input records from a console input queue */
972 @REQ(read_console_input)
973 obj_handle_t handle; /* handle to the console input */
974 int flush; /* flush the retrieved records from the queue? */
975 @REPLY
976 int read; /* number of records read */
977 VARARG(rec,input_records); /* input records */
978 @END
981 /* write data (chars and/or attributes) in a screen buffer */
982 @REQ(write_console_output)
983 obj_handle_t handle; /* handle to the console output */
984 int x; /* position where to start writing */
985 int y;
986 int mode; /* char info (see below) */
987 int wrap; /* wrap around at end of line? */
988 VARARG(data,bytes); /* info to write */
989 @REPLY
990 int written; /* number of char infos actually written */
991 int width; /* width of screen buffer */
992 int height; /* height of screen buffer */
993 @END
994 enum char_info_mode
996 CHAR_INFO_MODE_TEXT, /* characters only */
997 CHAR_INFO_MODE_ATTR, /* attributes only */
998 CHAR_INFO_MODE_TEXTATTR, /* both characters and attributes */
999 CHAR_INFO_MODE_TEXTSTDATTR /* characters but use standard attributes */
1003 /* fill a screen buffer with constant data (chars and/or attributes) */
1004 @REQ(fill_console_output)
1005 obj_handle_t handle; /* handle to the console output */
1006 int x; /* position where to start writing */
1007 int y;
1008 int mode; /* char info mode */
1009 int count; /* number to write */
1010 int wrap; /* wrap around at end of line? */
1011 char_info_t data; /* data to write */
1012 @REPLY
1013 int written; /* number of char infos actually written */
1014 @END
1017 /* read data (chars and/or attributes) from a screen buffer */
1018 @REQ(read_console_output)
1019 obj_handle_t handle; /* handle to the console output */
1020 int x; /* position (x,y) where to start reading */
1021 int y;
1022 int mode; /* char info mode */
1023 int wrap; /* wrap around at end of line? */
1024 @REPLY
1025 int width; /* width of screen buffer */
1026 int height; /* height of screen buffer */
1027 VARARG(data,bytes);
1028 @END
1031 /* move a rect (of data) in screen buffer content */
1032 @REQ(move_console_output)
1033 obj_handle_t handle; /* handle to the console output */
1034 short int x_src; /* position (x, y) of rect to start moving from */
1035 short int y_src;
1036 short int x_dst; /* position (x, y) of rect to move to */
1037 short int y_dst;
1038 short int w; /* size of the rect (width, height) to move */
1039 short int h;
1040 @END
1043 /* Sends a signal to a process group */
1044 @REQ(send_console_signal)
1045 int signal; /* the signal to send */
1046 process_id_t group_id; /* the group to send the signal to */
1047 @END
1050 /* enable directory change notifications */
1051 @REQ(read_directory_changes)
1052 obj_handle_t handle; /* handle to the directory */
1053 obj_handle_t event; /* handle to the event */
1054 unsigned int filter; /* notification filter */
1055 int subtree; /* watch the subtree? */
1056 int want_data; /* flag indicating whether change data should be collected */
1057 void* io_apc; /* APC routine to queue upon end of async */
1058 void* io_sb; /* I/O status block (unique across all async on this handle) */
1059 void* io_user; /* data to pass back to caller */
1060 @END
1063 @REQ(read_change)
1064 obj_handle_t handle;
1065 @REPLY
1066 int action; /* type of change */
1067 VARARG(name,string); /* name of directory entry that changed */
1068 @END
1071 /* Create a file mapping */
1072 @REQ(create_mapping)
1073 unsigned int access; /* wanted access rights */
1074 unsigned int attributes; /* object attributes */
1075 obj_handle_t rootdir; /* root directory */
1076 int size_high; /* mapping size */
1077 int size_low; /* mapping size */
1078 int protect; /* protection flags (see below) */
1079 obj_handle_t file_handle; /* file handle */
1080 VARARG(name,unicode_str); /* object name */
1081 @REPLY
1082 obj_handle_t handle; /* handle to the mapping */
1083 @END
1084 /* protection flags */
1085 #define VPROT_READ 0x01
1086 #define VPROT_WRITE 0x02
1087 #define VPROT_EXEC 0x04
1088 #define VPROT_WRITECOPY 0x08
1089 #define VPROT_GUARD 0x10
1090 #define VPROT_NOCACHE 0x20
1091 #define VPROT_COMMITTED 0x40
1092 #define VPROT_IMAGE 0x80
1095 /* Open a mapping */
1096 @REQ(open_mapping)
1097 unsigned int access; /* wanted access rights */
1098 unsigned int attributes; /* object attributes */
1099 obj_handle_t rootdir; /* root directory */
1100 VARARG(name,unicode_str); /* object name */
1101 @REPLY
1102 obj_handle_t handle; /* handle to the mapping */
1103 @END
1106 /* Get information about a file mapping */
1107 @REQ(get_mapping_info)
1108 obj_handle_t handle; /* handle to the mapping */
1109 @REPLY
1110 int size_high; /* mapping size */
1111 int size_low; /* mapping size */
1112 int protect; /* protection flags */
1113 int header_size; /* header size (for VPROT_IMAGE mapping) */
1114 void* base; /* default base addr (for VPROT_IMAGE mapping) */
1115 obj_handle_t shared_file; /* shared mapping file handle */
1116 int shared_size; /* shared mapping size */
1117 @END
1120 #define SNAP_HEAPLIST 0x00000001
1121 #define SNAP_PROCESS 0x00000002
1122 #define SNAP_THREAD 0x00000004
1123 #define SNAP_MODULE 0x00000008
1124 /* Create a snapshot */
1125 @REQ(create_snapshot)
1126 unsigned int attributes; /* object attributes */
1127 int flags; /* snapshot flags (SNAP_*) */
1128 process_id_t pid; /* process id */
1129 @REPLY
1130 obj_handle_t handle; /* handle to the snapshot */
1131 @END
1134 /* Get the next process from a snapshot */
1135 @REQ(next_process)
1136 obj_handle_t handle; /* handle to the snapshot */
1137 int reset; /* reset snapshot position? */
1138 @REPLY
1139 int count; /* process usage count */
1140 process_id_t pid; /* process id */
1141 process_id_t ppid; /* parent process id */
1142 void* heap; /* heap base */
1143 void* module; /* main module */
1144 int threads; /* number of threads */
1145 int priority; /* process priority */
1146 int handles; /* number of handles */
1147 VARARG(filename,unicode_str); /* file name of main exe */
1148 @END
1151 /* Get the next thread from a snapshot */
1152 @REQ(next_thread)
1153 obj_handle_t handle; /* handle to the snapshot */
1154 int reset; /* reset snapshot position? */
1155 @REPLY
1156 int count; /* thread usage count */
1157 process_id_t pid; /* process id */
1158 thread_id_t tid; /* thread id */
1159 int base_pri; /* base priority */
1160 int delta_pri; /* delta priority */
1161 @END
1164 /* Get the next module from a snapshot */
1165 @REQ(next_module)
1166 obj_handle_t handle; /* handle to the snapshot */
1167 int reset; /* reset snapshot position? */
1168 @REPLY
1169 process_id_t pid; /* process id */
1170 void* base; /* module base address */
1171 size_t size; /* module size */
1172 VARARG(filename,unicode_str); /* file name of module */
1173 @END
1176 /* Wait for a debug event */
1177 @REQ(wait_debug_event)
1178 int get_handle; /* should we alloc a handle for waiting? */
1179 @REPLY
1180 process_id_t pid; /* process id */
1181 thread_id_t tid; /* thread id */
1182 obj_handle_t wait; /* wait handle if no event ready */
1183 VARARG(event,debug_event); /* debug event data */
1184 @END
1187 /* Queue an exception event */
1188 @REQ(queue_exception_event)
1189 int first; /* first chance exception? */
1190 VARARG(record,exc_event); /* thread context followed by exception record */
1191 @REPLY
1192 obj_handle_t handle; /* handle to the queued event */
1193 @END
1196 /* Retrieve the status of an exception event */
1197 @REQ(get_exception_status)
1198 obj_handle_t handle; /* handle to the queued event */
1199 @REPLY
1200 VARARG(context,context); /* modified thread context */
1201 @END
1204 /* Send an output string to the debugger */
1205 @REQ(output_debug_string)
1206 void* string; /* string to display (in debugged process address space) */
1207 int unicode; /* is it Unicode? */
1208 int length; /* string length */
1209 @END
1212 /* Continue a debug event */
1213 @REQ(continue_debug_event)
1214 process_id_t pid; /* process id to continue */
1215 thread_id_t tid; /* thread id to continue */
1216 int status; /* continuation status */
1217 @END
1220 /* Start/stop debugging an existing process */
1221 @REQ(debug_process)
1222 process_id_t pid; /* id of the process to debug */
1223 int attach; /* 1=attaching / 0=detaching from the process */
1224 @END
1227 /* Simulate a breakpoint in a process */
1228 @REQ(debug_break)
1229 obj_handle_t handle; /* process handle */
1230 @REPLY
1231 int self; /* was it the caller itself? */
1232 @END
1235 /* Set debugger kill on exit flag */
1236 @REQ(set_debugger_kill_on_exit)
1237 int kill_on_exit; /* 0=detach/1=kill debuggee when debugger dies */
1238 @END
1241 /* Read data from a process address space */
1242 @REQ(read_process_memory)
1243 obj_handle_t handle; /* process handle */
1244 void* addr; /* addr to read from */
1245 @REPLY
1246 VARARG(data,bytes); /* result data */
1247 @END
1250 /* Write data to a process address space */
1251 @REQ(write_process_memory)
1252 obj_handle_t handle; /* process handle */
1253 void* addr; /* addr to write to */
1254 VARARG(data,bytes); /* data to write */
1255 @END
1258 /* Create a registry key */
1259 @REQ(create_key)
1260 obj_handle_t parent; /* handle to the parent key */
1261 unsigned int access; /* desired access rights */
1262 unsigned int attributes; /* object attributes */
1263 unsigned int options; /* creation options */
1264 time_t modif; /* last modification time */
1265 data_size_t namelen; /* length of key name in bytes */
1266 VARARG(name,unicode_str,namelen); /* key name */
1267 VARARG(class,unicode_str); /* class name */
1268 @REPLY
1269 obj_handle_t hkey; /* handle to the created key */
1270 int created; /* has it been newly created? */
1271 @END
1273 /* Open a registry key */
1274 @REQ(open_key)
1275 obj_handle_t parent; /* handle to the parent key */
1276 unsigned int access; /* desired access rights */
1277 unsigned int attributes; /* object attributes */
1278 VARARG(name,unicode_str); /* key name */
1279 @REPLY
1280 obj_handle_t hkey; /* handle to the open key */
1281 @END
1284 /* Delete a registry key */
1285 @REQ(delete_key)
1286 obj_handle_t hkey; /* handle to the key */
1287 @END
1290 /* Flush a registry key */
1291 @REQ(flush_key)
1292 obj_handle_t hkey; /* handle to the key */
1293 @END
1296 /* Enumerate registry subkeys */
1297 @REQ(enum_key)
1298 obj_handle_t hkey; /* handle to registry key */
1299 int index; /* index of subkey (or -1 for current key) */
1300 int info_class; /* requested information class */
1301 @REPLY
1302 int subkeys; /* number of subkeys */
1303 int max_subkey; /* longest subkey name */
1304 int max_class; /* longest class name */
1305 int values; /* number of values */
1306 int max_value; /* longest value name */
1307 int max_data; /* longest value data */
1308 time_t modif; /* last modification time */
1309 data_size_t total; /* total length needed for full name and class */
1310 data_size_t namelen; /* length of key name in bytes */
1311 VARARG(name,unicode_str,namelen); /* key name */
1312 VARARG(class,unicode_str); /* class name */
1313 @END
1316 /* Set a value of a registry key */
1317 @REQ(set_key_value)
1318 obj_handle_t hkey; /* handle to registry key */
1319 int type; /* value type */
1320 data_size_t namelen; /* length of value name in bytes */
1321 VARARG(name,unicode_str,namelen); /* value name */
1322 VARARG(data,bytes); /* value data */
1323 @END
1326 /* Retrieve the value of a registry key */
1327 @REQ(get_key_value)
1328 obj_handle_t hkey; /* handle to registry key */
1329 VARARG(name,unicode_str); /* value name */
1330 @REPLY
1331 int type; /* value type */
1332 data_size_t total; /* total length needed for data */
1333 VARARG(data,bytes); /* value data */
1334 @END
1337 /* Enumerate a value of a registry key */
1338 @REQ(enum_key_value)
1339 obj_handle_t hkey; /* handle to registry key */
1340 int index; /* value index */
1341 int info_class; /* requested information class */
1342 @REPLY
1343 int type; /* value type */
1344 data_size_t total; /* total length needed for full name and data */
1345 data_size_t namelen; /* length of value name in bytes */
1346 VARARG(name,unicode_str,namelen); /* value name */
1347 VARARG(data,bytes); /* value data */
1348 @END
1351 /* Delete a value of a registry key */
1352 @REQ(delete_key_value)
1353 obj_handle_t hkey; /* handle to registry key */
1354 VARARG(name,unicode_str); /* value name */
1355 @END
1358 /* Load a registry branch from a file */
1359 @REQ(load_registry)
1360 obj_handle_t hkey; /* root key to load to */
1361 obj_handle_t file; /* file to load from */
1362 VARARG(name,unicode_str); /* subkey name */
1363 @END
1366 /* UnLoad a registry branch from a file */
1367 @REQ(unload_registry)
1368 obj_handle_t hkey; /* root key to unload to */
1369 @END
1372 /* Save a registry branch to a file */
1373 @REQ(save_registry)
1374 obj_handle_t hkey; /* key to save */
1375 obj_handle_t file; /* file to save to */
1376 @END
1379 /* Add a registry key change notification */
1380 @REQ(set_registry_notification)
1381 obj_handle_t hkey; /* key to watch for changes */
1382 obj_handle_t event; /* event to set */
1383 int subtree; /* should we watch the whole subtree? */
1384 unsigned int filter; /* things to watch */
1385 @END
1388 /* Create a waitable timer */
1389 @REQ(create_timer)
1390 unsigned int access; /* wanted access rights */
1391 unsigned int attributes; /* object attributes */
1392 obj_handle_t rootdir; /* root directory */
1393 int manual; /* manual reset */
1394 VARARG(name,unicode_str); /* object name */
1395 @REPLY
1396 obj_handle_t handle; /* handle to the timer */
1397 @END
1400 /* Open a waitable timer */
1401 @REQ(open_timer)
1402 unsigned int access; /* wanted access rights */
1403 unsigned int attributes; /* object attributes */
1404 obj_handle_t rootdir; /* root directory */
1405 VARARG(name,unicode_str); /* object name */
1406 @REPLY
1407 obj_handle_t handle; /* handle to the timer */
1408 @END
1410 /* Set a waitable timer */
1411 @REQ(set_timer)
1412 obj_handle_t handle; /* handle to the timer */
1413 abs_time_t expire; /* next expiration absolute time */
1414 int period; /* timer period in ms */
1415 void* callback; /* callback function */
1416 void* arg; /* callback argument */
1417 @REPLY
1418 int signaled; /* was the timer signaled before this call ? */
1419 @END
1421 /* Cancel a waitable timer */
1422 @REQ(cancel_timer)
1423 obj_handle_t handle; /* handle to the timer */
1424 @REPLY
1425 int signaled; /* was the timer signaled before this calltime ? */
1426 @END
1428 /* Get information on a waitable timer */
1429 @REQ(get_timer_info)
1430 obj_handle_t handle; /* handle to the timer */
1431 @REPLY
1432 abs_time_t when; /* absolute time when the timer next expires */
1433 int signaled; /* is the timer signaled? */
1434 @END
1437 /* Retrieve the current context of a thread */
1438 @REQ(get_thread_context)
1439 obj_handle_t handle; /* thread handle */
1440 unsigned int flags; /* context flags */
1441 int suspend; /* if getting context during suspend */
1442 @REPLY
1443 int self; /* was it a handle to the current thread? */
1444 VARARG(context,context); /* thread context */
1445 @END
1448 /* Set the current context of a thread */
1449 @REQ(set_thread_context)
1450 obj_handle_t handle; /* thread handle */
1451 unsigned int flags; /* context flags */
1452 int suspend; /* if setting context during suspend */
1453 VARARG(context,context); /* thread context */
1454 @REPLY
1455 int self; /* was it a handle to the current thread? */
1456 @END
1459 /* Fetch a selector entry for a thread */
1460 @REQ(get_selector_entry)
1461 obj_handle_t handle; /* thread handle */
1462 int entry; /* LDT entry */
1463 @REPLY
1464 unsigned int base; /* selector base */
1465 unsigned int limit; /* selector limit */
1466 unsigned char flags; /* selector flags */
1467 @END
1470 /* Add an atom */
1471 @REQ(add_atom)
1472 obj_handle_t table; /* which table to add atom to */
1473 VARARG(name,unicode_str); /* atom name */
1474 @REPLY
1475 atom_t atom; /* resulting atom */
1476 @END
1479 /* Delete an atom */
1480 @REQ(delete_atom)
1481 obj_handle_t table; /* which table to delete atom from */
1482 atom_t atom; /* atom handle */
1483 @END
1486 /* Find an atom */
1487 @REQ(find_atom)
1488 obj_handle_t table; /* which table to find atom from */
1489 VARARG(name,unicode_str); /* atom name */
1490 @REPLY
1491 atom_t atom; /* atom handle */
1492 @END
1495 /* Get information about an atom */
1496 @REQ(get_atom_information)
1497 obj_handle_t table; /* which table to find atom from */
1498 atom_t atom; /* atom handle */
1499 @REPLY
1500 int count; /* atom lock count */
1501 int pinned; /* whether the atom has been pinned */
1502 data_size_t total; /* actual length of atom name */
1503 VARARG(name,unicode_str); /* atom name */
1504 @END
1507 /* Set information about an atom */
1508 @REQ(set_atom_information)
1509 obj_handle_t table; /* which table to find atom from */
1510 atom_t atom; /* atom handle */
1511 int pinned; /* whether to bump atom information */
1512 @END
1515 /* Empty an atom table */
1516 @REQ(empty_atom_table)
1517 obj_handle_t table; /* which table to find atom from */
1518 int if_pinned; /* whether to delete pinned atoms */
1519 @END
1522 /* Init an atom table */
1523 @REQ(init_atom_table)
1524 int entries; /* number of entries (only for local) */
1525 @REPLY
1526 obj_handle_t table; /* handle to the atom table */
1527 @END
1530 /* Get the message queue of the current thread */
1531 @REQ(get_msg_queue)
1532 @REPLY
1533 obj_handle_t handle; /* handle to the queue */
1534 @END
1537 /* Set the current message queue wakeup mask */
1538 @REQ(set_queue_mask)
1539 unsigned int wake_mask; /* wakeup bits mask */
1540 unsigned int changed_mask; /* changed bits mask */
1541 int skip_wait; /* will we skip waiting if signaled? */
1542 @REPLY
1543 unsigned int wake_bits; /* current wake bits */
1544 unsigned int changed_bits; /* current changed bits */
1545 @END
1548 /* Get the current message queue status */
1549 @REQ(get_queue_status)
1550 int clear; /* should we clear the change bits? */
1551 @REPLY
1552 unsigned int wake_bits; /* wake bits */
1553 unsigned int changed_bits; /* changed bits since last time */
1554 @END
1557 /* Retrieve the process idle event */
1558 @REQ(get_process_idle_event)
1559 obj_handle_t handle; /* process handle */
1560 @REPLY
1561 obj_handle_t event; /* handle to idle event */
1562 @END
1565 /* Send a message to a thread queue */
1566 @REQ(send_message)
1567 thread_id_t id; /* thread id */
1568 int type; /* message type (see below) */
1569 int flags; /* message flags (see below) */
1570 user_handle_t win; /* window handle */
1571 unsigned int msg; /* message code */
1572 unsigned long wparam; /* parameters */
1573 unsigned long lparam; /* parameters */
1574 int x; /* x position */
1575 int y; /* y position */
1576 unsigned int time; /* message time */
1577 unsigned int info; /* extra info */
1578 int timeout; /* timeout for reply */
1579 void* callback; /* callback address */
1580 VARARG(data,bytes); /* message data for sent messages */
1581 @END
1583 @REQ(post_quit_message)
1584 int exit_code; /* exit code to return */
1585 @END
1587 enum message_type
1589 MSG_ASCII, /* Ascii message (from SendMessageA) */
1590 MSG_UNICODE, /* Unicode message (from SendMessageW) */
1591 MSG_NOTIFY, /* notify message (from SendNotifyMessageW), always Unicode */
1592 MSG_CALLBACK, /* callback message (from SendMessageCallbackW), always Unicode */
1593 MSG_CALLBACK_RESULT,/* result of a callback message */
1594 MSG_OTHER_PROCESS, /* sent from other process, may include vararg data, always Unicode */
1595 MSG_POSTED, /* posted message (from PostMessageW), always Unicode */
1596 MSG_HARDWARE, /* hardware message */
1597 MSG_WINEVENT /* winevent message */
1599 #define SEND_MSG_ABORT_IF_HUNG 0x01
1602 /* Get a message from the current queue */
1603 @REQ(get_message)
1604 int flags; /* see below */
1605 user_handle_t get_win; /* window handle to get */
1606 unsigned int get_first; /* first message code to get */
1607 unsigned int get_last; /* last message code to get */
1608 unsigned int hw_id; /* id of the previous hardware message (or 0) */
1609 @REPLY
1610 int type; /* message type */
1611 user_handle_t win; /* window handle */
1612 unsigned int msg; /* message code */
1613 unsigned long wparam; /* parameters (callback function for MSG_CALLBACK_RESULT) */
1614 unsigned long lparam; /* parameters (result for MSG_CALLBACK_RESULT) */
1615 int x; /* x position */
1616 int y; /* y position */
1617 user_handle_t hook; /* winevent hook handle */
1618 void* hook_proc; /* winevent hook proc address */
1619 unsigned int time; /* message time */
1620 unsigned int info; /* extra info (callback argument for MSG_CALLBACK_RESULT) */
1621 unsigned int hw_id; /* id if hardware message */
1622 unsigned int active_hooks; /* active hooks bitmap */
1623 data_size_t total; /* total size of extra data */
1624 VARARG(data,bytes); /* message data for sent messages */
1625 @END
1626 #define GET_MSG_REMOVE 1 /* remove the message */
1627 #define GET_MSG_SENT_ONLY 2 /* only get sent messages */
1629 /* Reply to a sent message */
1630 @REQ(reply_message)
1631 unsigned int result; /* message result */
1632 int remove; /* should we remove the message? */
1633 VARARG(data,bytes); /* message data for sent messages */
1634 @END
1637 /* Accept the current hardware message */
1638 @REQ(accept_hardware_message)
1639 unsigned int hw_id; /* id of the hardware message */
1640 int remove; /* should we remove the message? */
1641 user_handle_t new_win; /* new destination window for current message */
1642 @END
1645 /* Retrieve the reply for the last message sent */
1646 @REQ(get_message_reply)
1647 int cancel; /* cancel message if not ready? */
1648 @REPLY
1649 unsigned int result; /* message result */
1650 VARARG(data,bytes); /* message data for sent messages */
1651 @END
1654 /* Set a window timer */
1655 @REQ(set_win_timer)
1656 user_handle_t win; /* window handle */
1657 unsigned int msg; /* message to post */
1658 unsigned int id; /* timer id */
1659 unsigned int rate; /* timer rate in ms */
1660 unsigned long lparam; /* message lparam (callback proc) */
1661 @REPLY
1662 unsigned int id; /* timer id */
1663 @END
1666 /* Kill a window timer */
1667 @REQ(kill_win_timer)
1668 user_handle_t win; /* window handle */
1669 unsigned int msg; /* message to post */
1670 unsigned int id; /* timer id */
1671 @END
1674 /* Retrieve info about a serial port */
1675 @REQ(get_serial_info)
1676 obj_handle_t handle; /* handle to comm port */
1677 @REPLY
1678 unsigned int readinterval;
1679 unsigned int readconst;
1680 unsigned int readmult;
1681 unsigned int writeconst;
1682 unsigned int writemult;
1683 unsigned int eventmask;
1684 @END
1687 /* Set info about a serial port */
1688 @REQ(set_serial_info)
1689 obj_handle_t handle; /* handle to comm port */
1690 int flags; /* bitmask to set values (see below) */
1691 unsigned int readinterval;
1692 unsigned int readconst;
1693 unsigned int readmult;
1694 unsigned int writeconst;
1695 unsigned int writemult;
1696 unsigned int eventmask;
1697 @END
1698 #define SERIALINFO_SET_TIMEOUTS 0x01
1699 #define SERIALINFO_SET_MASK 0x02
1702 /* Create an async I/O */
1703 @REQ(register_async)
1704 obj_handle_t handle; /* handle to comm port, socket or file */
1705 int type; /* type of queue to look after */
1706 void* io_apc; /* APC routine to queue upon end of async */
1707 void* io_sb; /* I/O status block (unique across all async on this handle) */
1708 void* io_user; /* data to pass back to caller */
1709 int count; /* count - usually # of bytes to be read/written */
1710 @END
1711 #define ASYNC_TYPE_READ 0x01
1712 #define ASYNC_TYPE_WRITE 0x02
1713 #define ASYNC_TYPE_WAIT 0x03
1716 /* Cancel all async op on a fd */
1717 @REQ(cancel_async)
1718 obj_handle_t handle; /* handle to comm port, socket or file */
1719 @END
1722 /* Create a named pipe */
1723 @REQ(create_named_pipe)
1724 unsigned int access;
1725 unsigned int attributes; /* object attributes */
1726 obj_handle_t rootdir; /* root directory */
1727 unsigned int options;
1728 unsigned int flags;
1729 unsigned int maxinstances;
1730 unsigned int outsize;
1731 unsigned int insize;
1732 unsigned int timeout;
1733 VARARG(name,unicode_str); /* pipe name */
1734 @REPLY
1735 obj_handle_t handle; /* handle to the pipe */
1736 @END
1738 /* flags in create_named_pipe and get_named_pipe_info */
1739 #define NAMED_PIPE_MESSAGE_STREAM_WRITE 0x0001
1740 #define NAMED_PIPE_MESSAGE_STREAM_READ 0x0002
1741 #define NAMED_PIPE_NONBLOCKING_MODE 0x0004
1742 #define NAMED_PIPE_SERVER_END 0x8000
1744 /* Open an existing named pipe */
1745 @REQ(open_named_pipe)
1746 unsigned int access;
1747 unsigned int attributes; /* object attributes */
1748 obj_handle_t rootdir; /* root directory */
1749 unsigned int flags; /* file flags */
1750 VARARG(name,unicode_str); /* pipe name */
1751 @REPLY
1752 obj_handle_t handle; /* handle to the pipe */
1753 @END
1756 /* Connect to a named pipe */
1757 @REQ(connect_named_pipe)
1758 obj_handle_t handle;
1759 obj_handle_t event;
1760 void* func;
1761 @END
1764 /* Wait for a named pipe */
1765 @REQ(wait_named_pipe)
1766 obj_handle_t handle;
1767 unsigned int timeout;
1768 obj_handle_t event;
1769 void* func;
1770 VARARG(name,unicode_str); /* pipe name */
1771 @END
1774 /* Disconnect a named pipe */
1775 @REQ(disconnect_named_pipe)
1776 obj_handle_t handle;
1777 @REPLY
1778 int fd; /* associated fd to close */
1779 @END
1782 @REQ(get_named_pipe_info)
1783 obj_handle_t handle;
1784 @REPLY
1785 unsigned int flags;
1786 unsigned int maxinstances;
1787 unsigned int instances;
1788 unsigned int outsize;
1789 unsigned int insize;
1790 @END
1793 /* Create a window */
1794 @REQ(create_window)
1795 user_handle_t parent; /* parent window */
1796 user_handle_t owner; /* owner window */
1797 atom_t atom; /* class atom */
1798 void* instance; /* module instance */
1799 @REPLY
1800 user_handle_t handle; /* created window */
1801 user_handle_t parent; /* full handle of parent */
1802 user_handle_t owner; /* full handle of owner */
1803 int extra; /* number of extra bytes */
1804 void* class_ptr; /* pointer to class in client address space */
1805 @END
1808 /* Destroy a window */
1809 @REQ(destroy_window)
1810 user_handle_t handle; /* handle to the window */
1811 @END
1814 /* Retrieve the desktop window for the current thread */
1815 @REQ(get_desktop_window)
1816 int force; /* force creation if it doesn't exist */
1817 @REPLY
1818 user_handle_t handle; /* handle to the desktop window */
1819 @END
1822 /* Set a window owner */
1823 @REQ(set_window_owner)
1824 user_handle_t handle; /* handle to the window */
1825 user_handle_t owner; /* new owner */
1826 @REPLY
1827 user_handle_t full_owner; /* full handle of new owner */
1828 user_handle_t prev_owner; /* full handle of previous owner */
1829 @END
1832 /* Get information from a window handle */
1833 @REQ(get_window_info)
1834 user_handle_t handle; /* handle to the window */
1835 @REPLY
1836 user_handle_t full_handle; /* full 32-bit handle */
1837 user_handle_t last_active; /* last active popup */
1838 process_id_t pid; /* process owning the window */
1839 thread_id_t tid; /* thread owning the window */
1840 atom_t atom; /* class atom */
1841 int is_unicode; /* ANSI or unicode */
1842 @END
1845 /* Set some information in a window */
1846 @REQ(set_window_info)
1847 user_handle_t handle; /* handle to the window */
1848 unsigned int flags; /* flags for fields to set (see below) */
1849 unsigned int style; /* window style */
1850 unsigned int ex_style; /* window extended style */
1851 unsigned int id; /* window id */
1852 void* instance; /* creator instance */
1853 int is_unicode; /* ANSI or unicode */
1854 void* user_data; /* user-specific data */
1855 int extra_offset; /* offset to set in extra bytes */
1856 data_size_t extra_size; /* size to set in extra bytes */
1857 unsigned int extra_value; /* value to set in extra bytes */
1858 @REPLY
1859 unsigned int old_style; /* old window style */
1860 unsigned int old_ex_style; /* old window extended style */
1861 unsigned int old_id; /* old window id */
1862 void* old_instance; /* old creator instance */
1863 void* old_user_data; /* old user-specific data */
1864 unsigned int old_extra_value; /* old value in extra bytes */
1865 @END
1866 #define SET_WIN_STYLE 0x01
1867 #define SET_WIN_EXSTYLE 0x02
1868 #define SET_WIN_ID 0x04
1869 #define SET_WIN_INSTANCE 0x08
1870 #define SET_WIN_USERDATA 0x10
1871 #define SET_WIN_EXTRA 0x20
1872 #define SET_WIN_UNICODE 0x40
1875 /* Set the parent of a window */
1876 @REQ(set_parent)
1877 user_handle_t handle; /* handle to the window */
1878 user_handle_t parent; /* handle to the parent */
1879 @REPLY
1880 user_handle_t old_parent; /* old parent window */
1881 user_handle_t full_parent; /* full handle of new parent */
1882 @END
1885 /* Get a list of the window parents, up to the root of the tree */
1886 @REQ(get_window_parents)
1887 user_handle_t handle; /* handle to the window */
1888 @REPLY
1889 int count; /* total count of parents */
1890 VARARG(parents,user_handles); /* parent handles */
1891 @END
1894 /* Get a list of the window children */
1895 @REQ(get_window_children)
1896 user_handle_t parent; /* parent window */
1897 atom_t atom; /* class atom for the listed children */
1898 thread_id_t tid; /* thread owning the listed children */
1899 @REPLY
1900 int count; /* total count of children */
1901 VARARG(children,user_handles); /* children handles */
1902 @END
1905 /* Get a list of the window children that contain a given point */
1906 @REQ(get_window_children_from_point)
1907 user_handle_t parent; /* parent window */
1908 int x; /* point in parent coordinates */
1909 int y;
1910 @REPLY
1911 int count; /* total count of children */
1912 VARARG(children,user_handles); /* children handles */
1913 @END
1916 /* Get window tree information from a window handle */
1917 @REQ(get_window_tree)
1918 user_handle_t handle; /* handle to the window */
1919 @REPLY
1920 user_handle_t parent; /* parent window */
1921 user_handle_t owner; /* owner window */
1922 user_handle_t next_sibling; /* next sibling in Z-order */
1923 user_handle_t prev_sibling; /* prev sibling in Z-order */
1924 user_handle_t first_sibling; /* first sibling in Z-order */
1925 user_handle_t last_sibling; /* last sibling in Z-order */
1926 user_handle_t first_child; /* first child */
1927 user_handle_t last_child; /* last child */
1928 @END
1930 /* Set the position and Z order of a window */
1931 @REQ(set_window_pos)
1932 user_handle_t handle; /* handle to the window */
1933 user_handle_t previous; /* previous window in Z order */
1934 unsigned int flags; /* SWP_* flags */
1935 rectangle_t window; /* window rectangle */
1936 rectangle_t client; /* client rectangle */
1937 VARARG(valid,rectangles); /* valid rectangles from WM_NCCALCSIZE */
1938 @REPLY
1939 unsigned int new_style; /* new window style */
1940 @END
1943 /* Get the window and client rectangles of a window */
1944 @REQ(get_window_rectangles)
1945 user_handle_t handle; /* handle to the window */
1946 @REPLY
1947 rectangle_t window; /* window rectangle */
1948 rectangle_t visible; /* visible part of the window rectangle */
1949 rectangle_t client; /* client rectangle */
1950 @END
1953 /* Get the window text */
1954 @REQ(get_window_text)
1955 user_handle_t handle; /* handle to the window */
1956 @REPLY
1957 VARARG(text,unicode_str); /* window text */
1958 @END
1961 /* Set the window text */
1962 @REQ(set_window_text)
1963 user_handle_t handle; /* handle to the window */
1964 VARARG(text,unicode_str); /* window text */
1965 @END
1968 /* Get the coordinates offset between two windows */
1969 @REQ(get_windows_offset)
1970 user_handle_t from; /* handle to the first window */
1971 user_handle_t to; /* handle to the second window */
1972 @REPLY
1973 int x; /* x coordinate offset */
1974 int y; /* y coordinate offset */
1975 @END
1978 /* Get the visible region of a window */
1979 @REQ(get_visible_region)
1980 user_handle_t window; /* handle to the window */
1981 unsigned int flags; /* DCX flags */
1982 @REPLY
1983 user_handle_t top_win; /* top window to clip against */
1984 int top_org_x; /* top window visible rect origin in screen coords */
1985 int top_org_y;
1986 int win_org_x; /* window rect origin in screen coords */
1987 int win_org_y;
1988 data_size_t total_size; /* total size of the resulting region */
1989 VARARG(region,rectangles); /* list of rectangles for the region (in screen coords) */
1990 @END
1993 /* Get the window region */
1994 @REQ(get_window_region)
1995 user_handle_t window; /* handle to the window */
1996 @REPLY
1997 data_size_t total_size; /* total size of the resulting region */
1998 VARARG(region,rectangles); /* list of rectangles for the region */
1999 @END
2002 /* Set the window region */
2003 @REQ(set_window_region)
2004 user_handle_t window; /* handle to the window */
2005 VARARG(region,rectangles); /* list of rectangles for the region */
2006 @END
2009 /* Get the window update region */
2010 @REQ(get_update_region)
2011 user_handle_t window; /* handle to the window */
2012 user_handle_t from_child; /* child to start searching from */
2013 unsigned int flags; /* update flags (see below) */
2014 @REPLY
2015 user_handle_t child; /* child to repaint (or window itself) */
2016 unsigned int flags; /* resulting update flags (see below) */
2017 data_size_t total_size; /* total size of the resulting region */
2018 VARARG(region,rectangles); /* list of rectangles for the region */
2019 @END
2020 #define UPDATE_NONCLIENT 0x01 /* get region for repainting non-client area */
2021 #define UPDATE_ERASE 0x02 /* get region for erasing client area */
2022 #define UPDATE_PAINT 0x04 /* get region for painting client area */
2023 #define UPDATE_INTERNALPAINT 0x08 /* get region if internal paint is pending */
2024 #define UPDATE_ALLCHILDREN 0x10 /* force repaint of all children */
2025 #define UPDATE_NOCHILDREN 0x20 /* don't try to repaint any children */
2026 #define UPDATE_NOREGION 0x40 /* don't return a region, only the flags */
2029 /* Update the z order of a window so that a given rectangle is fully visible */
2030 @REQ(update_window_zorder)
2031 user_handle_t window; /* handle to the window */
2032 rectangle_t rect; /* rectangle that must be visible */
2033 @END
2036 /* Mark parts of a window as needing a redraw */
2037 @REQ(redraw_window)
2038 user_handle_t window; /* handle to the window */
2039 unsigned int flags; /* RDW_* flags */
2040 VARARG(region,rectangles); /* list of rectangles for the region */
2041 @END
2044 /* Set a window property */
2045 @REQ(set_window_property)
2046 user_handle_t window; /* handle to the window */
2047 atom_t atom; /* property atom (if no name specified) */
2048 obj_handle_t handle; /* handle to store */
2049 VARARG(name,unicode_str); /* property name */
2050 @END
2053 /* Remove a window property */
2054 @REQ(remove_window_property)
2055 user_handle_t window; /* handle to the window */
2056 atom_t atom; /* property atom (if no name specified) */
2057 VARARG(name,unicode_str); /* property name */
2058 @REPLY
2059 obj_handle_t handle; /* handle stored in property */
2060 @END
2063 /* Get a window property */
2064 @REQ(get_window_property)
2065 user_handle_t window; /* handle to the window */
2066 atom_t atom; /* property atom (if no name specified) */
2067 VARARG(name,unicode_str); /* property name */
2068 @REPLY
2069 obj_handle_t handle; /* handle stored in property */
2070 @END
2073 /* Get the list of properties of a window */
2074 @REQ(get_window_properties)
2075 user_handle_t window; /* handle to the window */
2076 @REPLY
2077 int total; /* total number of properties */
2078 VARARG(props,properties); /* list of properties */
2079 @END
2082 /* Create a window station */
2083 @REQ(create_winstation)
2084 unsigned int flags; /* window station flags */
2085 unsigned int access; /* wanted access rights */
2086 unsigned int attributes; /* object attributes */
2087 VARARG(name,unicode_str); /* object name */
2088 @REPLY
2089 obj_handle_t handle; /* handle to the window station */
2090 @END
2093 /* Open a handle to a window station */
2094 @REQ(open_winstation)
2095 unsigned int access; /* wanted access rights */
2096 unsigned int attributes; /* object attributes */
2097 VARARG(name,unicode_str); /* object name */
2098 @REPLY
2099 obj_handle_t handle; /* handle to the window station */
2100 @END
2103 /* Close a window station */
2104 @REQ(close_winstation)
2105 obj_handle_t handle; /* handle to the window station */
2106 @END
2109 /* Get the process current window station */
2110 @REQ(get_process_winstation)
2111 @REPLY
2112 obj_handle_t handle; /* handle to the window station */
2113 @END
2116 /* Set the process current window station */
2117 @REQ(set_process_winstation)
2118 obj_handle_t handle; /* handle to the window station */
2119 @END
2122 /* Create a desktop */
2123 @REQ(create_desktop)
2124 unsigned int flags; /* desktop flags */
2125 unsigned int access; /* wanted access rights */
2126 unsigned int attributes; /* object attributes */
2127 VARARG(name,unicode_str); /* object name */
2128 @REPLY
2129 obj_handle_t handle; /* handle to the desktop */
2130 @END
2133 /* Open a handle to a desktop */
2134 @REQ(open_desktop)
2135 unsigned int flags; /* desktop flags */
2136 unsigned int access; /* wanted access rights */
2137 unsigned int attributes; /* object attributes */
2138 VARARG(name,unicode_str); /* object name */
2139 @REPLY
2140 obj_handle_t handle; /* handle to the desktop */
2141 @END
2144 /* Close a desktop */
2145 @REQ(close_desktop)
2146 obj_handle_t handle; /* handle to the desktop */
2147 @END
2150 /* Get the thread current desktop */
2151 @REQ(get_thread_desktop)
2152 thread_id_t tid; /* thread id */
2153 @REPLY
2154 obj_handle_t handle; /* handle to the desktop */
2155 @END
2158 /* Set the thread current desktop */
2159 @REQ(set_thread_desktop)
2160 obj_handle_t handle; /* handle to the desktop */
2161 @END
2164 /* Get/set information about a user object (window station or desktop) */
2165 @REQ(set_user_object_info)
2166 obj_handle_t handle; /* handle to the object */
2167 unsigned int flags; /* information to set */
2168 unsigned int obj_flags; /* new object flags */
2169 @REPLY
2170 int is_desktop; /* is object a desktop? */
2171 unsigned int old_obj_flags; /* old object flags */
2172 VARARG(name,unicode_str); /* object name */
2173 @END
2174 #define SET_USER_OBJECT_FLAGS 1
2177 /* Attach (or detach) thread inputs */
2178 @REQ(attach_thread_input)
2179 thread_id_t tid_from; /* thread to be attached */
2180 thread_id_t tid_to; /* thread to which tid_from should be attached */
2181 int attach; /* is it an attach? */
2182 @END
2185 /* Get input data for a given thread */
2186 @REQ(get_thread_input)
2187 thread_id_t tid; /* id of thread */
2188 @REPLY
2189 user_handle_t focus; /* handle to the focus window */
2190 user_handle_t capture; /* handle to the capture window */
2191 user_handle_t active; /* handle to the active window */
2192 user_handle_t foreground; /* handle to the global foreground window */
2193 user_handle_t menu_owner; /* handle to the menu owner */
2194 user_handle_t move_size; /* handle to the moving/resizing window */
2195 user_handle_t caret; /* handle to the caret window */
2196 rectangle_t rect; /* caret rectangle */
2197 @END
2200 /* Get the time of the last input event */
2201 @REQ(get_last_input_time)
2202 @REPLY
2203 unsigned int time;
2204 @END
2207 /* Retrieve queue keyboard state for a given thread */
2208 @REQ(get_key_state)
2209 thread_id_t tid; /* id of thread */
2210 int key; /* optional key code or -1 */
2211 @REPLY
2212 unsigned char state; /* state of specified key */
2213 VARARG(keystate,bytes); /* state array for all the keys */
2214 @END
2216 /* Set queue keyboard state for a given thread */
2217 @REQ(set_key_state)
2218 thread_id_t tid; /* id of thread */
2219 VARARG(keystate,bytes); /* state array for all the keys */
2220 @END
2222 /* Set the system foreground window */
2223 @REQ(set_foreground_window)
2224 user_handle_t handle; /* handle to the foreground window */
2225 @REPLY
2226 user_handle_t previous; /* handle to the previous foreground window */
2227 int send_msg_old; /* whether we have to send a msg to the old window */
2228 int send_msg_new; /* whether we have to send a msg to the new window */
2229 @END
2231 /* Set the current thread focus window */
2232 @REQ(set_focus_window)
2233 user_handle_t handle; /* handle to the focus window */
2234 @REPLY
2235 user_handle_t previous; /* handle to the previous focus window */
2236 @END
2238 /* Set the current thread active window */
2239 @REQ(set_active_window)
2240 user_handle_t handle; /* handle to the active window */
2241 @REPLY
2242 user_handle_t previous; /* handle to the previous active window */
2243 @END
2245 /* Set the current thread capture window */
2246 @REQ(set_capture_window)
2247 user_handle_t handle; /* handle to the capture window */
2248 unsigned int flags; /* capture flags (see below) */
2249 @REPLY
2250 user_handle_t previous; /* handle to the previous capture window */
2251 user_handle_t full_handle; /* full 32-bit handle of new capture window */
2252 @END
2253 #define CAPTURE_MENU 0x01 /* capture is for a menu */
2254 #define CAPTURE_MOVESIZE 0x02 /* capture is for moving/resizing */
2257 /* Set the current thread caret window */
2258 @REQ(set_caret_window)
2259 user_handle_t handle; /* handle to the caret window */
2260 int width; /* caret width */
2261 int height; /* caret height */
2262 @REPLY
2263 user_handle_t previous; /* handle to the previous caret window */
2264 rectangle_t old_rect; /* previous caret rectangle */
2265 int old_hide; /* previous hide count */
2266 int old_state; /* previous caret state (1=on, 0=off) */
2267 @END
2270 /* Set the current thread caret information */
2271 @REQ(set_caret_info)
2272 unsigned int flags; /* caret flags (see below) */
2273 user_handle_t handle; /* handle to the caret window */
2274 int x; /* caret x position */
2275 int y; /* caret y position */
2276 int hide; /* increment for hide count (can be negative to show it) */
2277 int state; /* caret state (1=on, 0=off, -1=toggle current state) */
2278 @REPLY
2279 user_handle_t full_handle; /* handle to the current caret window */
2280 rectangle_t old_rect; /* previous caret rectangle */
2281 int old_hide; /* previous hide count */
2282 int old_state; /* previous caret state (1=on, 0=off) */
2283 @END
2284 #define SET_CARET_POS 0x01 /* set the caret position from x,y */
2285 #define SET_CARET_HIDE 0x02 /* increment the caret hide count */
2286 #define SET_CARET_STATE 0x04 /* set the caret on/off state */
2289 /* Set a window hook */
2290 @REQ(set_hook)
2291 int id; /* id of the hook */
2292 process_id_t pid; /* id of process to set the hook into */
2293 thread_id_t tid; /* id of thread to set the hook into */
2294 int event_min;
2295 int event_max;
2296 int flags;
2297 void* proc; /* hook procedure */
2298 int unicode; /* is it a unicode hook? */
2299 VARARG(module,unicode_str); /* module name */
2300 @REPLY
2301 user_handle_t handle; /* handle to the hook */
2302 unsigned int active_hooks; /* active hooks bitmap */
2303 @END
2306 /* Remove a window hook */
2307 @REQ(remove_hook)
2308 user_handle_t handle; /* handle to the hook */
2309 int id; /* id of the hook if handle is 0 */
2310 void* proc; /* hook procedure if handle is 0 */
2311 @REPLY
2312 unsigned int active_hooks; /* active hooks bitmap */
2313 @END
2316 /* Start calling a hook chain */
2317 @REQ(start_hook_chain)
2318 int id; /* id of the hook */
2319 int event; /* signalled event */
2320 user_handle_t window; /* handle to the event window */
2321 int object_id; /* object id for out of context winevent */
2322 int child_id; /* child id for out of context winevent */
2323 @REPLY
2324 user_handle_t handle; /* handle to the next hook */
2325 process_id_t pid; /* process id for low-level keyboard/mouse hooks */
2326 thread_id_t tid; /* thread id for low-level keyboard/mouse hooks */
2327 void* proc; /* hook procedure */
2328 int unicode; /* is it a unicode hook? */
2329 unsigned int active_hooks; /* active hooks bitmap */
2330 VARARG(module,unicode_str); /* module name */
2331 @END
2334 /* Finished calling a hook chain */
2335 @REQ(finish_hook_chain)
2336 int id; /* id of the hook */
2337 @END
2340 /* Get the next hook to call */
2341 @REQ(get_next_hook)
2342 user_handle_t handle; /* handle to the current hook */
2343 int event; /* signalled event */
2344 user_handle_t window; /* handle to the event window */
2345 int object_id; /* object id for out of context winevent */
2346 int child_id; /* child id for out of context winevent */
2347 @REPLY
2348 user_handle_t next; /* handle to the next hook */
2349 int id; /* id of the next hook */
2350 process_id_t pid; /* process id for low-level keyboard/mouse hooks */
2351 thread_id_t tid; /* thread id for low-level keyboard/mouse hooks */
2352 void* proc; /* next hook procedure */
2353 int prev_unicode; /* was the previous a unicode hook? */
2354 int next_unicode; /* is the next a unicode hook? */
2355 VARARG(module,unicode_str); /* module name */
2356 @END
2359 /* Create a window class */
2360 @REQ(create_class)
2361 int local; /* is it a local class? */
2362 atom_t atom; /* class atom */
2363 unsigned int style; /* class style */
2364 void* instance; /* module instance */
2365 int extra; /* number of extra class bytes */
2366 int win_extra; /* number of window extra bytes */
2367 void* client_ptr; /* pointer to class in client address space */
2368 @END
2371 /* Destroy a window class */
2372 @REQ(destroy_class)
2373 atom_t atom; /* class atom */
2374 void* instance; /* module instance */
2375 @REPLY
2376 void* client_ptr; /* pointer to class in client address space */
2377 @END
2380 /* Set some information in a class */
2381 @REQ(set_class_info)
2382 user_handle_t window; /* handle to the window */
2383 unsigned int flags; /* flags for info to set (see below) */
2384 atom_t atom; /* class atom */
2385 unsigned int style; /* class style */
2386 int win_extra; /* number of window extra bytes */
2387 void* instance; /* module instance */
2388 int extra_offset; /* offset to set in extra bytes */
2389 data_size_t extra_size; /* size to set in extra bytes */
2390 unsigned long extra_value; /* value to set in extra bytes */
2391 @REPLY
2392 atom_t old_atom; /* previous class atom */
2393 unsigned int old_style; /* previous class style */
2394 int old_extra; /* previous number of class extra bytes */
2395 int old_win_extra; /* previous number of window extra bytes */
2396 void* old_instance; /* previous module instance */
2397 unsigned long old_extra_value; /* old value in extra bytes */
2398 @END
2399 #define SET_CLASS_ATOM 0x0001
2400 #define SET_CLASS_STYLE 0x0002
2401 #define SET_CLASS_WINEXTRA 0x0004
2402 #define SET_CLASS_INSTANCE 0x0008
2403 #define SET_CLASS_EXTRA 0x0010
2406 /* Set/get clipboard information */
2407 @REQ(set_clipboard_info)
2408 unsigned int flags; /* flags for fields to set (see below) */
2409 user_handle_t clipboard; /* clipboard window */
2410 user_handle_t owner; /* clipboard owner */
2411 user_handle_t viewer; /* first clipboard viewer */
2412 unsigned int seqno; /* change sequence number */
2413 @REPLY
2414 unsigned int flags; /* status flags (see below) */
2415 user_handle_t old_clipboard; /* old clipboard window */
2416 user_handle_t old_owner; /* old clipboard owner */
2417 user_handle_t old_viewer; /* old clipboard viewer */
2418 unsigned int seqno; /* current sequence number */
2419 @END
2421 #define SET_CB_OPEN 0x001
2422 #define SET_CB_OWNER 0x002
2423 #define SET_CB_VIEWER 0x004
2424 #define SET_CB_SEQNO 0x008
2425 #define SET_CB_RELOWNER 0x010
2426 #define SET_CB_CLOSE 0x020
2427 #define CB_OPEN 0x040
2428 #define CB_OWNER 0x080
2429 #define CB_PROCESS 0x100
2432 /* Open a security token */
2433 @REQ(open_token)
2434 obj_handle_t handle; /* handle to the thread or process */
2435 unsigned int access; /* access rights to the new token */
2436 unsigned int attributes;/* object attributes */
2437 unsigned int flags; /* flags (see below) */
2438 @REPLY
2439 obj_handle_t token; /* handle to the token */
2440 @END
2441 #define OPEN_TOKEN_THREAD 1
2442 #define OPEN_TOKEN_AS_SELF 2
2445 /* Set/get the global windows */
2446 @REQ(set_global_windows)
2447 unsigned int flags; /* flags for fields to set (see below) */
2448 user_handle_t shell_window; /* handle to the new shell window */
2449 user_handle_t shell_listview; /* handle to the new shell listview window */
2450 user_handle_t progman_window; /* handle to the new program manager window */
2451 user_handle_t taskman_window; /* handle to the new task manager window */
2452 @REPLY
2453 user_handle_t old_shell_window; /* handle to the shell window */
2454 user_handle_t old_shell_listview; /* handle to the shell listview window */
2455 user_handle_t old_progman_window; /* handle to the new program manager window */
2456 user_handle_t old_taskman_window; /* handle to the new task manager window */
2457 @END
2458 #define SET_GLOBAL_SHELL_WINDOWS 0x01 /* set both main shell and listview windows */
2459 #define SET_GLOBAL_PROGMAN_WINDOW 0x02
2460 #define SET_GLOBAL_TASKMAN_WINDOW 0x04
2462 /* Adjust the privileges held by a token */
2463 @REQ(adjust_token_privileges)
2464 obj_handle_t handle; /* handle to the token */
2465 int disable_all; /* disable all privileges? */
2466 int get_modified_state; /* get modified privileges? */
2467 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges to enable/disable/remove */
2468 @REPLY
2469 unsigned int len; /* total length in bytes required to store token privileges */
2470 VARARG(privileges,LUID_AND_ATTRIBUTES); /* modified privileges */
2471 @END
2473 /* Retrieves the set of privileges held by or available to a token */
2474 @REQ(get_token_privileges)
2475 obj_handle_t handle; /* handle to the token */
2476 @REPLY
2477 unsigned int len; /* total length in bytes required to store token privileges */
2478 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges held by or available to a token */
2479 @END
2481 /* Check the token has the required privileges */
2482 @REQ(check_token_privileges)
2483 obj_handle_t handle; /* handle to the token */
2484 int all_required; /* are all the privileges required for the check to succeed? */
2485 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges to check */
2486 @REPLY
2487 int has_privileges; /* does the token have the required privileges? */
2488 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges held by or available to a token */
2489 @END
2491 @REQ(duplicate_token)
2492 obj_handle_t handle; /* handle to the token to duplicate */
2493 unsigned int access; /* access rights to the new token */
2494 unsigned int attributes; /* object attributes */
2495 int primary; /* is the new token to be a primary one? */
2496 int impersonation_level; /* impersonation level of the new token */
2497 @REPLY
2498 obj_handle_t new_handle; /* duplicated handle */
2499 @END
2501 @REQ(access_check)
2502 obj_handle_t handle; /* handle to the token */
2503 unsigned int desired_access; /* desired access to the object */
2504 unsigned int mapping_read; /* mapping from generic read to specific rights */
2505 unsigned int mapping_write; /* mapping from generic write to specific rights */
2506 unsigned int mapping_execute; /* mapping from generic execute to specific rights */
2507 unsigned int mapping_all; /* mapping from generic all to specific rights */
2508 VARARG(sd,security_descriptor); /* security descriptor to check */
2509 @REPLY
2510 unsigned int access_granted; /* access rights actually granted */
2511 unsigned int access_status; /* was access granted? */
2512 unsigned int privileges_len; /* length needed to store privileges */
2513 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges used during access check */
2514 @END
2516 @REQ(get_token_user)
2517 obj_handle_t handle; /* handle to the token */
2518 @REPLY
2519 data_size_t user_len; /* length needed to store user */
2520 VARARG(user,SID); /* sid of the user the token represents */
2521 @END
2523 @REQ(get_token_groups)
2524 obj_handle_t handle; /* handle to the token */
2525 @REPLY
2526 data_size_t user_len; /* length needed to store user */
2527 VARARG(user,token_groups); /* groups the token's user belongs to */
2528 @END
2530 /* Create a mailslot */
2531 @REQ(create_mailslot)
2532 unsigned int access; /* wanted access rights */
2533 unsigned int attributes; /* object attributes */
2534 obj_handle_t rootdir; /* root directory */
2535 unsigned int max_msgsize;
2536 int read_timeout;
2537 VARARG(name,unicode_str); /* mailslot name */
2538 @REPLY
2539 obj_handle_t handle; /* handle to the mailslot */
2540 @END
2543 /* Open an existing mailslot */
2544 @REQ(open_mailslot)
2545 unsigned int access;
2546 unsigned int attributes; /* object attributes */
2547 obj_handle_t rootdir; /* root directory */
2548 unsigned int sharing; /* sharing mode */
2549 VARARG(name,unicode_str); /* mailslot name */
2550 @REPLY
2551 obj_handle_t handle; /* handle to the mailslot */
2552 @END
2555 /* Set mailslot information */
2556 @REQ(set_mailslot_info)
2557 obj_handle_t handle; /* handle to the mailslot */
2558 unsigned int flags;
2559 int read_timeout;
2560 @REPLY
2561 unsigned int max_msgsize;
2562 int read_timeout;
2563 unsigned int msg_count;
2564 unsigned int next_msgsize;
2565 @END
2566 #define MAILSLOT_SET_READ_TIMEOUT 1
2569 /* Create a directory object */
2570 @REQ(create_directory)
2571 unsigned int access; /* access flags */
2572 unsigned int attributes; /* object attributes */
2573 obj_handle_t rootdir; /* root directory */
2574 VARARG(directory_name,unicode_str); /* Directory name */
2575 @REPLY
2576 obj_handle_t handle; /* handle to the directory */
2577 @END
2580 /* Open a directory object */
2581 @REQ(open_directory)
2582 unsigned int access; /* access flags */
2583 unsigned int attributes; /* object attributes */
2584 obj_handle_t rootdir; /* root directory */
2585 VARARG(directory_name,unicode_str); /* Directory name */
2586 @REPLY
2587 obj_handle_t handle; /* handle to the directory */
2588 @END
2591 /* Create a symbolic link object */
2592 @REQ(create_symlink)
2593 unsigned int access; /* access flags */
2594 unsigned int attributes; /* object attributes */
2595 obj_handle_t rootdir; /* root directory */
2596 data_size_t name_len; /* length of the symlink name in bytes */
2597 VARARG(name,unicode_str,name_len); /* symlink name */
2598 VARARG(target_name,unicode_str); /* target name */
2599 @REPLY
2600 obj_handle_t handle; /* handle to the symlink */
2601 @END
2604 /* Open a symbolic link object */
2605 @REQ(open_symlink)
2606 unsigned int access; /* access flags */
2607 unsigned int attributes; /* object attributes */
2608 obj_handle_t rootdir; /* root directory */
2609 VARARG(name,unicode_str); /* symlink name */
2610 @REPLY
2611 obj_handle_t handle; /* handle to the symlink */
2612 @END
2615 /* Query a symbolic link object */
2616 @REQ(query_symlink)
2617 obj_handle_t handle; /* handle to the symlink */
2618 @REPLY
2619 VARARG(target_name,unicode_str); /* target name */
2620 @END