user: Moved GetMonitorInfo and EnumDisplayMonitors to the display driver.
[wine.git] / server / protocol.def
blob3acf366180d3fced996d419dd957ab6b63670ac0
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 /* structures for extra message data */
177 struct callback_msg_data
179 void *callback; /* callback function */
180 unsigned long data; /* user data for callback */
181 unsigned long result; /* message result */
184 struct winevent_msg_data
186 user_handle_t hook; /* hook handle */
187 thread_id_t tid; /* thread id */
188 void *hook_proc; /* hook proc address */
189 /* followed by module name if any */
192 typedef union
194 unsigned char bytes[1]; /* raw data for sent messages */
195 struct callback_msg_data callback;
196 struct winevent_msg_data winevent;
197 } message_data_t;
199 /* structure for console char/attribute info */
200 typedef struct
202 WCHAR ch;
203 unsigned short attr;
204 } char_info_t;
206 #define MAX_ACL_LEN 65535
208 struct security_descriptor
210 unsigned int control; /* SE_ flags */
211 data_size_t owner_len;
212 data_size_t group_len;
213 data_size_t sacl_len;
214 data_size_t dacl_len;
215 /* VARARGS(owner,SID); */
216 /* VARARGS(group,SID); */
217 /* VARARGS(sacl,ACL); */
218 /* VARARGS(dacl,ACL); */
221 struct token_groups
223 unsigned int count;
224 /* unsigned int attributes[count]; */
225 /* VARARGS(sids,SID); */
228 /****************************************************************/
229 /* Request declarations */
231 /* Create a new process from the context of the parent */
232 @REQ(new_process)
233 int inherit_all; /* inherit all handles from parent */
234 unsigned int create_flags; /* creation flags */
235 int socket_fd; /* file descriptor for process socket */
236 obj_handle_t exe_file; /* file handle for main exe */
237 obj_handle_t hstdin; /* handle for stdin */
238 obj_handle_t hstdout; /* handle for stdout */
239 obj_handle_t hstderr; /* handle for stderr */
240 unsigned int process_access; /* access rights for process object */
241 unsigned int process_attr; /* attributes for process object */
242 unsigned int thread_access; /* access rights for thread object */
243 unsigned int thread_attr; /* attributes for thread object */
244 VARARG(info,startup_info); /* startup information */
245 VARARG(env,unicode_str); /* environment for new process */
246 @REPLY
247 obj_handle_t info; /* new process info handle */
248 process_id_t pid; /* process id */
249 obj_handle_t phandle; /* process handle (in the current process) */
250 thread_id_t tid; /* thread id */
251 obj_handle_t thandle; /* thread handle (in the current process) */
252 @END
255 /* Retrieve information about a newly started process */
256 @REQ(get_new_process_info)
257 obj_handle_t info; /* info handle returned from new_process_request */
258 @REPLY
259 int success; /* did the process start successfully? */
260 int exit_code; /* process exit code if failed */
261 @END
264 /* Create a new thread from the context of the parent */
265 @REQ(new_thread)
266 unsigned int access; /* wanted access rights */
267 unsigned int attributes; /* object attributes */
268 int suspend; /* new thread should be suspended on creation */
269 int request_fd; /* fd for request pipe */
270 @REPLY
271 thread_id_t tid; /* thread id */
272 obj_handle_t handle; /* thread handle (in the current process) */
273 @END
276 /* Retrieve the new process startup info */
277 @REQ(get_startup_info)
278 @REPLY
279 obj_handle_t exe_file; /* file handle for main exe */
280 obj_handle_t hstdin; /* handle for stdin */
281 obj_handle_t hstdout; /* handle for stdout */
282 obj_handle_t hstderr; /* handle for stderr */
283 VARARG(info,startup_info); /* startup information */
284 VARARG(env,unicode_str); /* environment */
285 @END
288 /* Signal the end of the process initialization */
289 @REQ(init_process_done)
290 void* module; /* main module base address */
291 void* entry; /* process entry point */
292 int gui; /* is it a GUI process? */
293 @END
296 /* Initialize a thread; called from the child after fork()/clone() */
297 @REQ(init_thread)
298 int unix_pid; /* Unix pid of new thread */
299 int unix_tid; /* Unix tid of new thread */
300 int debug_level; /* new debug level */
301 void* teb; /* TEB of new thread (in thread address space) */
302 void* peb; /* address of PEB (in thread address space) */
303 void* entry; /* thread entry point (in thread address space) */
304 void* ldt_copy; /* address of LDT copy (in thread address space) */
305 int reply_fd; /* fd for reply pipe */
306 int wait_fd; /* fd for blocking calls pipe */
307 @REPLY
308 process_id_t pid; /* process id of the new thread's process */
309 thread_id_t tid; /* thread id of the new thread */
310 data_size_t info_size; /* total size of startup info */
311 abs_time_t server_start; /* server start time */
312 int version; /* protocol version */
313 @END
316 /* Terminate a process */
317 @REQ(terminate_process)
318 obj_handle_t handle; /* process handle to terminate */
319 int exit_code; /* process exit code */
320 @REPLY
321 int self; /* suicide? */
322 @END
325 /* Terminate a thread */
326 @REQ(terminate_thread)
327 obj_handle_t handle; /* thread handle to terminate */
328 int exit_code; /* thread exit code */
329 @REPLY
330 int self; /* suicide? */
331 int last; /* last thread in this process? */
332 @END
335 /* Retrieve information about a process */
336 @REQ(get_process_info)
337 obj_handle_t handle; /* process handle */
338 @REPLY
339 process_id_t pid; /* server process id */
340 process_id_t ppid; /* server process id of parent */
341 int exit_code; /* process exit code */
342 int priority; /* priority class */
343 int affinity; /* process affinity mask */
344 void* peb; /* PEB address in process address space */
345 abs_time_t start_time; /* process start time */
346 abs_time_t end_time; /* process end time */
347 @END
350 /* Set a process informations */
351 @REQ(set_process_info)
352 obj_handle_t handle; /* process handle */
353 int mask; /* setting mask (see below) */
354 int priority; /* priority class */
355 int affinity; /* affinity mask */
356 @END
357 #define SET_PROCESS_INFO_PRIORITY 0x01
358 #define SET_PROCESS_INFO_AFFINITY 0x02
361 /* Retrieve information about a thread */
362 @REQ(get_thread_info)
363 obj_handle_t handle; /* thread handle */
364 thread_id_t tid_in; /* thread id (optional) */
365 @REPLY
366 process_id_t pid; /* server process id */
367 thread_id_t tid; /* server thread id */
368 void* teb; /* thread teb pointer */
369 int exit_code; /* thread exit code */
370 int priority; /* thread priority level */
371 int affinity; /* thread affinity mask */
372 abs_time_t creation_time; /* thread creation time */
373 abs_time_t exit_time; /* thread exit time */
374 int last; /* last thread in process */
375 @END
378 /* Set a thread informations */
379 @REQ(set_thread_info)
380 obj_handle_t handle; /* thread handle */
381 int mask; /* setting mask (see below) */
382 int priority; /* priority class */
383 int affinity; /* affinity mask */
384 obj_handle_t token; /* impersonation token */
385 @END
386 #define SET_THREAD_INFO_PRIORITY 0x01
387 #define SET_THREAD_INFO_AFFINITY 0x02
388 #define SET_THREAD_INFO_TOKEN 0x04
391 /* Retrieve information about a module */
392 @REQ(get_dll_info)
393 obj_handle_t handle; /* process handle */
394 void* base_address; /* base address of module */
395 @REPLY
396 size_t size; /* module size */
397 void* entry_point;
398 VARARG(filename,unicode_str); /* file name of module */
399 @END
402 /* Suspend a thread */
403 @REQ(suspend_thread)
404 obj_handle_t handle; /* thread handle */
405 @REPLY
406 int count; /* new suspend count */
407 @END
410 /* Resume a thread */
411 @REQ(resume_thread)
412 obj_handle_t handle; /* thread handle */
413 @REPLY
414 int count; /* new suspend count */
415 @END
418 /* Notify the server that a dll has been loaded */
419 @REQ(load_dll)
420 obj_handle_t handle; /* file handle */
421 void* base; /* base address */
422 size_t size; /* dll size */
423 int dbg_offset; /* debug info offset */
424 int dbg_size; /* debug info size */
425 void* name; /* ptr to ptr to name (in process addr space) */
426 VARARG(filename,unicode_str); /* file name of dll */
427 @END
430 /* Notify the server that a dll is being unloaded */
431 @REQ(unload_dll)
432 void* base; /* base address */
433 @END
436 /* Queue an APC for a thread */
437 @REQ(queue_apc)
438 obj_handle_t handle; /* thread handle */
439 int user; /* user or system apc? */
440 void* func; /* function to call */
441 void* arg1; /* params for function to call */
442 void* arg2;
443 void* arg3;
444 @END
447 /* Get next APC to call */
448 @REQ(get_apc)
449 int alertable; /* is thread alertable? */
450 @REPLY
451 void* func; /* function to call */
452 int type; /* function type */
453 void* arg1; /* function arguments */
454 void* arg2;
455 void* arg3;
456 @END
457 enum apc_type { APC_NONE, APC_USER, APC_TIMER, APC_ASYNC_IO };
460 /* Close a handle for the current process */
461 @REQ(close_handle)
462 obj_handle_t handle; /* handle to close */
463 @REPLY
464 int fd; /* associated fd to close */
465 @END
468 /* Set a handle information */
469 @REQ(set_handle_info)
470 obj_handle_t handle; /* handle we are interested in */
471 int flags; /* new handle flags */
472 int mask; /* mask for flags to set */
473 @REPLY
474 int old_flags; /* old flag value */
475 @END
478 /* Duplicate a handle */
479 @REQ(dup_handle)
480 obj_handle_t src_process; /* src process handle */
481 obj_handle_t src_handle; /* src handle to duplicate */
482 obj_handle_t dst_process; /* dst process handle */
483 unsigned int access; /* wanted access rights */
484 unsigned int attributes; /* object attributes */
485 unsigned int options; /* duplicate options (see below) */
486 @REPLY
487 obj_handle_t handle; /* duplicated handle in dst process */
488 int fd; /* associated fd to close */
489 @END
490 #define DUP_HANDLE_CLOSE_SOURCE DUPLICATE_CLOSE_SOURCE
491 #define DUP_HANDLE_SAME_ACCESS DUPLICATE_SAME_ACCESS
492 #define DUP_HANDLE_MAKE_GLOBAL 0x80000000 /* Not a Windows flag */
495 /* Open a handle to a process */
496 @REQ(open_process)
497 process_id_t pid; /* process id to open */
498 unsigned int access; /* wanted access rights */
499 unsigned int attributes; /* object attributes */
500 @REPLY
501 obj_handle_t handle; /* handle to the process */
502 @END
505 /* Open a handle to a thread */
506 @REQ(open_thread)
507 thread_id_t tid; /* thread id to open */
508 unsigned int access; /* wanted access rights */
509 unsigned int attributes; /* object attributes */
510 @REPLY
511 obj_handle_t handle; /* handle to the thread */
512 @END
515 /* Wait for handles */
516 @REQ(select)
517 int flags; /* wait flags (see below) */
518 void* cookie; /* magic cookie to return to client */
519 obj_handle_t signal; /* object to signal (0 if none) */
520 abs_time_t timeout; /* absolute timeout */
521 VARARG(handles,handles); /* handles to select on */
522 @END
523 #define SELECT_ALL 1
524 #define SELECT_ALERTABLE 2
525 #define SELECT_INTERRUPTIBLE 4
526 #define SELECT_TIMEOUT 8
529 /* Create an event */
530 @REQ(create_event)
531 unsigned int access; /* wanted access rights */
532 unsigned int attributes; /* object attributes */
533 obj_handle_t rootdir; /* root directory */
534 int manual_reset; /* manual reset event */
535 int initial_state; /* initial state of the event */
536 VARARG(name,unicode_str); /* object name */
537 @REPLY
538 obj_handle_t handle; /* handle to the event */
539 @END
541 /* Event operation */
542 @REQ(event_op)
543 obj_handle_t handle; /* handle to event */
544 int op; /* event operation (see below) */
545 @END
546 enum event_op { PULSE_EVENT, SET_EVENT, RESET_EVENT };
549 /* Open an event */
550 @REQ(open_event)
551 unsigned int access; /* wanted access rights */
552 unsigned int attributes; /* object attributes */
553 obj_handle_t rootdir; /* root directory */
554 VARARG(name,unicode_str); /* object name */
555 @REPLY
556 obj_handle_t handle; /* handle to the event */
557 @END
560 /* Create a mutex */
561 @REQ(create_mutex)
562 unsigned int access; /* wanted access rights */
563 unsigned int attributes; /* object attributes */
564 obj_handle_t rootdir; /* root directory */
565 int owned; /* initially owned? */
566 VARARG(name,unicode_str); /* object name */
567 @REPLY
568 obj_handle_t handle; /* handle to the mutex */
569 @END
572 /* Release a mutex */
573 @REQ(release_mutex)
574 obj_handle_t handle; /* handle to the mutex */
575 @REPLY
576 unsigned int prev_count; /* value of internal counter, before release */
577 @END
580 /* Open a mutex */
581 @REQ(open_mutex)
582 unsigned int access; /* wanted access rights */
583 unsigned int attributes; /* object attributes */
584 obj_handle_t rootdir; /* root directory */
585 VARARG(name,unicode_str); /* object name */
586 @REPLY
587 obj_handle_t handle; /* handle to the mutex */
588 @END
591 /* Create a semaphore */
592 @REQ(create_semaphore)
593 unsigned int access; /* wanted access rights */
594 unsigned int attributes; /* object attributes */
595 obj_handle_t rootdir; /* root directory */
596 unsigned int initial; /* initial count */
597 unsigned int max; /* maximum count */
598 VARARG(name,unicode_str); /* object name */
599 @REPLY
600 obj_handle_t handle; /* handle to the semaphore */
601 @END
604 /* Release a semaphore */
605 @REQ(release_semaphore)
606 obj_handle_t handle; /* handle to the semaphore */
607 unsigned int count; /* count to add to semaphore */
608 @REPLY
609 unsigned int prev_count; /* previous semaphore count */
610 @END
613 /* Open a semaphore */
614 @REQ(open_semaphore)
615 unsigned int access; /* wanted access rights */
616 unsigned int attributes; /* object attributes */
617 obj_handle_t rootdir; /* root directory */
618 VARARG(name,unicode_str); /* object name */
619 @REPLY
620 obj_handle_t handle; /* handle to the semaphore */
621 @END
624 /* Create a file */
625 @REQ(create_file)
626 unsigned int access; /* wanted access rights */
627 unsigned int attributes; /* object attributes */
628 unsigned int sharing; /* sharing flags */
629 int create; /* file create action */
630 unsigned int options; /* file options */
631 unsigned int attrs; /* file attributes for creation */
632 VARARG(filename,string); /* file name */
633 @REPLY
634 obj_handle_t handle; /* handle to the file */
635 @END
638 /* Open a file object */
639 @REQ(open_file_object)
640 unsigned int access; /* wanted access rights */
641 unsigned int attributes; /* open attributes */
642 obj_handle_t rootdir; /* root directory */
643 unsigned int sharing; /* sharing flags */
644 VARARG(filename,unicode_str); /* file name */
645 @REPLY
646 obj_handle_t handle; /* handle to the file */
647 @END
650 /* Allocate a file handle for a Unix fd */
651 @REQ(alloc_file_handle)
652 unsigned int access; /* wanted access rights */
653 unsigned int attributes; /* object attributes */
654 int fd; /* file descriptor on the client side */
655 @REPLY
656 obj_handle_t handle; /* handle to the file */
657 @END
660 /* Get a Unix fd to access a file */
661 @REQ(get_handle_fd)
662 obj_handle_t handle; /* handle to the file */
663 unsigned int access; /* wanted access rights */
664 @REPLY
665 int fd; /* file descriptor */
666 int removable; /* is device removable? (-1 if unknown) */
667 int flags; /* file read/write flags (see below) */
668 @END
669 #define FD_FLAG_OVERLAPPED 0x01 /* fd opened in overlapped mode */
670 #define FD_FLAG_TIMEOUT 0x02 /* read/write is synchronous */
671 #define FD_FLAG_RECV_SHUTDOWN 0x04
672 #define FD_FLAG_SEND_SHUTDOWN 0x08
673 #define FD_FLAG_AVAILABLE 0x10 /* in overlap read/write operation,
674 * only handle available data (don't wait) */
676 /* Set the cached file descriptor of a handle */
677 @REQ(set_handle_fd)
678 obj_handle_t handle; /* handle we are interested in */
679 int fd; /* file descriptor */
680 int removable; /* is device removable? (-1 if unknown) */
681 @REPLY
682 int cur_fd; /* current file descriptor */
683 @END
686 /* Flush a file buffers */
687 @REQ(flush_file)
688 obj_handle_t handle; /* handle to the file */
689 @REPLY
690 obj_handle_t event; /* event set when finished */
691 @END
694 /* Lock a region of a file */
695 @REQ(lock_file)
696 obj_handle_t handle; /* handle to the file */
697 unsigned int offset_low; /* offset of start of lock */
698 unsigned int offset_high; /* offset of start of lock */
699 unsigned int count_low; /* count of bytes to lock */
700 unsigned int count_high; /* count of bytes to lock */
701 int shared; /* shared or exclusive lock? */
702 int wait; /* do we want to wait? */
703 @REPLY
704 obj_handle_t handle; /* handle to wait on */
705 int overlapped; /* is it an overlapped I/O handle? */
706 @END
709 /* Unlock a region of a file */
710 @REQ(unlock_file)
711 obj_handle_t handle; /* handle to the file */
712 unsigned int offset_low; /* offset of start of unlock */
713 unsigned int offset_high; /* offset of start of unlock */
714 unsigned int count_low; /* count of bytes to unlock */
715 unsigned int count_high; /* count of bytes to unlock */
716 @END
719 /* Get ready to unmount a Unix device */
720 @REQ(unmount_device)
721 obj_handle_t handle; /* handle to a file on the device */
722 @END
725 /* Create a socket */
726 @REQ(create_socket)
727 unsigned int access; /* wanted access rights */
728 unsigned int attributes; /* object attributes */
729 int family; /* family, see socket manpage */
730 int type; /* type, see socket manpage */
731 int protocol; /* protocol, see socket manpage */
732 unsigned int flags; /* socket flags */
733 @REPLY
734 obj_handle_t handle; /* handle to the new socket */
735 @END
738 /* Accept a socket */
739 @REQ(accept_socket)
740 obj_handle_t lhandle; /* handle to the listening socket */
741 unsigned int access; /* wanted access rights */
742 unsigned int attributes; /* object attributes */
743 @REPLY
744 obj_handle_t handle; /* handle to the new socket */
745 @END
748 /* Set socket event parameters */
749 @REQ(set_socket_event)
750 obj_handle_t handle; /* handle to the socket */
751 unsigned int mask; /* event mask */
752 obj_handle_t event; /* event object */
753 user_handle_t window; /* window to send the message to */
754 unsigned int msg; /* message to send */
755 @END
758 /* Get socket event parameters */
759 @REQ(get_socket_event)
760 obj_handle_t handle; /* handle to the socket */
761 int service; /* clear pending? */
762 obj_handle_t c_event; /* event to clear */
763 @REPLY
764 unsigned int mask; /* event mask */
765 unsigned int pmask; /* pending events */
766 unsigned int state; /* status bits */
767 VARARG(errors,ints); /* event errors */
768 @END
771 /* Reenable pending socket events */
772 @REQ(enable_socket_event)
773 obj_handle_t handle; /* handle to the socket */
774 unsigned int mask; /* events to re-enable */
775 unsigned int sstate; /* status bits to set */
776 unsigned int cstate; /* status bits to clear */
777 @END
779 @REQ(set_socket_deferred)
780 obj_handle_t handle; /* handle to the socket */
781 obj_handle_t deferred; /* handle to the socket for which accept() is deferred */
782 @END
784 /* Allocate a console (only used by a console renderer) */
785 @REQ(alloc_console)
786 unsigned int access; /* wanted access rights */
787 unsigned int attributes; /* object attributes */
788 process_id_t pid; /* pid of process which shall be attached to the console */
789 @REPLY
790 obj_handle_t handle_in; /* handle to console input */
791 obj_handle_t event; /* handle to renderer events change notification */
792 @END
795 /* Free the console of the current process */
796 @REQ(free_console)
797 @END
800 #define CONSOLE_RENDERER_NONE_EVENT 0x00
801 #define CONSOLE_RENDERER_TITLE_EVENT 0x01
802 #define CONSOLE_RENDERER_ACTIVE_SB_EVENT 0x02
803 #define CONSOLE_RENDERER_SB_RESIZE_EVENT 0x03
804 #define CONSOLE_RENDERER_UPDATE_EVENT 0x04
805 #define CONSOLE_RENDERER_CURSOR_POS_EVENT 0x05
806 #define CONSOLE_RENDERER_CURSOR_GEOM_EVENT 0x06
807 #define CONSOLE_RENDERER_DISPLAY_EVENT 0x07
808 #define CONSOLE_RENDERER_EXIT_EVENT 0x08
809 struct console_renderer_event
811 short event;
812 union
814 struct update
816 short top;
817 short bottom;
818 } update;
819 struct resize
821 short width;
822 short height;
823 } resize;
824 struct cursor_pos
826 short x;
827 short y;
828 } cursor_pos;
829 struct cursor_geom
831 short visible;
832 short size;
833 } cursor_geom;
834 struct display
836 short left;
837 short top;
838 short width;
839 short height;
840 } display;
841 } u;
844 /* retrieve console events for the renderer */
845 @REQ(get_console_renderer_events)
846 obj_handle_t handle; /* handle to console input events */
847 @REPLY
848 VARARG(data,bytes); /* the various console_renderer_events */
849 @END
852 /* Open a handle to the process console */
853 @REQ(open_console)
854 obj_handle_t from; /* 0 (resp 1) input (resp output) of current process console */
855 /* otherwise console_in handle to get active screen buffer? */
856 unsigned int access; /* wanted access rights */
857 unsigned int attributes; /* object attributes */
858 int share; /* share mask (only for output handles) */
859 @REPLY
860 obj_handle_t handle; /* handle to the console */
861 @END
864 /* Get the input queue wait event */
865 @REQ(get_console_wait_event)
866 @REPLY
867 obj_handle_t handle;
868 @END
870 /* Get a console mode (input or output) */
871 @REQ(get_console_mode)
872 obj_handle_t handle; /* handle to the console */
873 @REPLY
874 int mode; /* console mode */
875 @END
878 /* Set a console mode (input or output) */
879 @REQ(set_console_mode)
880 obj_handle_t handle; /* handle to the console */
881 int mode; /* console mode */
882 @END
885 /* Set info about a console (input only) */
886 @REQ(set_console_input_info)
887 obj_handle_t handle; /* handle to console input, or 0 for process' console */
888 int mask; /* setting mask (see below) */
889 obj_handle_t active_sb; /* active screen buffer */
890 int history_mode; /* whether we duplicate lines in history */
891 int history_size; /* number of lines in history */
892 int edition_mode; /* index to the edition mode flavors */
893 VARARG(title,unicode_str); /* console title */
894 @END
895 #define SET_CONSOLE_INPUT_INFO_ACTIVE_SB 0x01
896 #define SET_CONSOLE_INPUT_INFO_TITLE 0x02
897 #define SET_CONSOLE_INPUT_INFO_HISTORY_MODE 0x04
898 #define SET_CONSOLE_INPUT_INFO_HISTORY_SIZE 0x08
899 #define SET_CONSOLE_INPUT_INFO_EDITION_MODE 0x10
902 /* Get info about a console (input only) */
903 @REQ(get_console_input_info)
904 obj_handle_t handle; /* handle to console input, or 0 for process' console */
905 @REPLY
906 int history_mode; /* whether we duplicate lines in history */
907 int history_size; /* number of lines in history */
908 int history_index; /* number of used lines in history */
909 int edition_mode; /* index to the edition mode flavors */
910 VARARG(title,unicode_str); /* console title */
911 @END
914 /* appends a string to console's history */
915 @REQ(append_console_input_history)
916 obj_handle_t handle; /* handle to console input, or 0 for process' console */
917 VARARG(line,unicode_str); /* line to add */
918 @END
921 /* appends a string to console's history */
922 @REQ(get_console_input_history)
923 obj_handle_t handle; /* handle to console input, or 0 for process' console */
924 int index; /* index to get line from */
925 @REPLY
926 int total; /* total length of line in Unicode chars */
927 VARARG(line,unicode_str); /* line to add */
928 @END
931 /* creates a new screen buffer on process' console */
932 @REQ(create_console_output)
933 obj_handle_t handle_in; /* handle to console input, or 0 for process' console */
934 unsigned int access; /* wanted access rights */
935 unsigned int attributes; /* object attributes */
936 unsigned int share; /* sharing credentials */
937 @REPLY
938 obj_handle_t handle_out; /* handle to the screen buffer */
939 @END
942 /* Set info about a console (output only) */
943 @REQ(set_console_output_info)
944 obj_handle_t handle; /* handle to the console */
945 int mask; /* setting mask (see below) */
946 short int cursor_size; /* size of cursor (percentage filled) */
947 short int cursor_visible;/* cursor visibility flag */
948 short int cursor_x; /* position of cursor (x, y) */
949 short int cursor_y;
950 short int width; /* width of the screen buffer */
951 short int height; /* height of the screen buffer */
952 short int attr; /* default attribute */
953 short int win_left; /* window actually displayed by renderer */
954 short int win_top; /* the rect area is expressed withing the */
955 short int win_right; /* boundaries of the screen buffer */
956 short int win_bottom;
957 short int max_width; /* maximum size (width x height) for the window */
958 short int max_height;
959 @END
960 #define SET_CONSOLE_OUTPUT_INFO_CURSOR_GEOM 0x01
961 #define SET_CONSOLE_OUTPUT_INFO_CURSOR_POS 0x02
962 #define SET_CONSOLE_OUTPUT_INFO_SIZE 0x04
963 #define SET_CONSOLE_OUTPUT_INFO_ATTR 0x08
964 #define SET_CONSOLE_OUTPUT_INFO_DISPLAY_WINDOW 0x10
965 #define SET_CONSOLE_OUTPUT_INFO_MAX_SIZE 0x20
968 /* Get info about a console (output only) */
969 @REQ(get_console_output_info)
970 obj_handle_t handle; /* handle to the console */
971 @REPLY
972 short int cursor_size; /* size of cursor (percentage filled) */
973 short int cursor_visible;/* cursor visibility flag */
974 short int cursor_x; /* position of cursor (x, y) */
975 short int cursor_y;
976 short int width; /* width of the screen buffer */
977 short int height; /* height of the screen buffer */
978 short int attr; /* default attribute */
979 short int win_left; /* window actually displayed by renderer */
980 short int win_top; /* the rect area is expressed withing the */
981 short int win_right; /* boundaries of the screen buffer */
982 short int win_bottom;
983 short int max_width; /* maximum size (width x height) for the window */
984 short int max_height;
985 @END
987 /* Add input records to a console input queue */
988 @REQ(write_console_input)
989 obj_handle_t handle; /* handle to the console input */
990 VARARG(rec,input_records); /* input records */
991 @REPLY
992 int written; /* number of records written */
993 @END
996 /* Fetch input records from a console input queue */
997 @REQ(read_console_input)
998 obj_handle_t handle; /* handle to the console input */
999 int flush; /* flush the retrieved records from the queue? */
1000 @REPLY
1001 int read; /* number of records read */
1002 VARARG(rec,input_records); /* input records */
1003 @END
1006 /* write data (chars and/or attributes) in a screen buffer */
1007 @REQ(write_console_output)
1008 obj_handle_t handle; /* handle to the console output */
1009 int x; /* position where to start writing */
1010 int y;
1011 int mode; /* char info (see below) */
1012 int wrap; /* wrap around at end of line? */
1013 VARARG(data,bytes); /* info to write */
1014 @REPLY
1015 int written; /* number of char infos actually written */
1016 int width; /* width of screen buffer */
1017 int height; /* height of screen buffer */
1018 @END
1019 enum char_info_mode
1021 CHAR_INFO_MODE_TEXT, /* characters only */
1022 CHAR_INFO_MODE_ATTR, /* attributes only */
1023 CHAR_INFO_MODE_TEXTATTR, /* both characters and attributes */
1024 CHAR_INFO_MODE_TEXTSTDATTR /* characters but use standard attributes */
1028 /* fill a screen buffer with constant data (chars and/or attributes) */
1029 @REQ(fill_console_output)
1030 obj_handle_t handle; /* handle to the console output */
1031 int x; /* position where to start writing */
1032 int y;
1033 int mode; /* char info mode */
1034 int count; /* number to write */
1035 int wrap; /* wrap around at end of line? */
1036 char_info_t data; /* data to write */
1037 @REPLY
1038 int written; /* number of char infos actually written */
1039 @END
1042 /* read data (chars and/or attributes) from a screen buffer */
1043 @REQ(read_console_output)
1044 obj_handle_t handle; /* handle to the console output */
1045 int x; /* position (x,y) where to start reading */
1046 int y;
1047 int mode; /* char info mode */
1048 int wrap; /* wrap around at end of line? */
1049 @REPLY
1050 int width; /* width of screen buffer */
1051 int height; /* height of screen buffer */
1052 VARARG(data,bytes);
1053 @END
1056 /* move a rect (of data) in screen buffer content */
1057 @REQ(move_console_output)
1058 obj_handle_t handle; /* handle to the console output */
1059 short int x_src; /* position (x, y) of rect to start moving from */
1060 short int y_src;
1061 short int x_dst; /* position (x, y) of rect to move to */
1062 short int y_dst;
1063 short int w; /* size of the rect (width, height) to move */
1064 short int h;
1065 @END
1068 /* Sends a signal to a process group */
1069 @REQ(send_console_signal)
1070 int signal; /* the signal to send */
1071 process_id_t group_id; /* the group to send the signal to */
1072 @END
1075 /* enable directory change notifications */
1076 @REQ(read_directory_changes)
1077 unsigned int filter; /* notification filter */
1078 obj_handle_t handle; /* handle to the directory */
1079 obj_handle_t event; /* handle to the event */
1080 int subtree; /* watch the subtree? */
1081 int want_data; /* flag indicating whether change data should be collected */
1082 void* io_apc; /* APC routine to queue upon end of async */
1083 void* io_sb; /* I/O status block (unique across all async on this handle) */
1084 void* io_user; /* data to pass back to caller */
1085 @END
1088 @REQ(read_change)
1089 obj_handle_t handle;
1090 @REPLY
1091 int action; /* type of change */
1092 VARARG(name,string); /* name of directory entry that changed */
1093 @END
1096 /* Create a file mapping */
1097 @REQ(create_mapping)
1098 unsigned int access; /* wanted access rights */
1099 unsigned int attributes; /* object attributes */
1100 obj_handle_t rootdir; /* root directory */
1101 int size_high; /* mapping size */
1102 int size_low; /* mapping size */
1103 int protect; /* protection flags (see below) */
1104 obj_handle_t file_handle; /* file handle */
1105 VARARG(name,unicode_str); /* object name */
1106 @REPLY
1107 obj_handle_t handle; /* handle to the mapping */
1108 @END
1109 /* protection flags */
1110 #define VPROT_READ 0x01
1111 #define VPROT_WRITE 0x02
1112 #define VPROT_EXEC 0x04
1113 #define VPROT_WRITECOPY 0x08
1114 #define VPROT_GUARD 0x10
1115 #define VPROT_NOCACHE 0x20
1116 #define VPROT_COMMITTED 0x40
1117 #define VPROT_IMAGE 0x80
1120 /* Open a mapping */
1121 @REQ(open_mapping)
1122 unsigned int access; /* wanted access rights */
1123 unsigned int attributes; /* object attributes */
1124 obj_handle_t rootdir; /* root directory */
1125 VARARG(name,unicode_str); /* object name */
1126 @REPLY
1127 obj_handle_t handle; /* handle to the mapping */
1128 @END
1131 /* Get information about a file mapping */
1132 @REQ(get_mapping_info)
1133 obj_handle_t handle; /* handle to the mapping */
1134 @REPLY
1135 int size_high; /* mapping size */
1136 int size_low; /* mapping size */
1137 int protect; /* protection flags */
1138 int header_size; /* header size (for VPROT_IMAGE mapping) */
1139 void* base; /* default base addr (for VPROT_IMAGE mapping) */
1140 obj_handle_t shared_file; /* shared mapping file handle */
1141 int shared_size; /* shared mapping size */
1142 @END
1145 #define SNAP_HEAPLIST 0x00000001
1146 #define SNAP_PROCESS 0x00000002
1147 #define SNAP_THREAD 0x00000004
1148 #define SNAP_MODULE 0x00000008
1149 /* Create a snapshot */
1150 @REQ(create_snapshot)
1151 unsigned int attributes; /* object attributes */
1152 int flags; /* snapshot flags (SNAP_*) */
1153 process_id_t pid; /* process id */
1154 @REPLY
1155 obj_handle_t handle; /* handle to the snapshot */
1156 @END
1159 /* Get the next process from a snapshot */
1160 @REQ(next_process)
1161 obj_handle_t handle; /* handle to the snapshot */
1162 int reset; /* reset snapshot position? */
1163 @REPLY
1164 int count; /* process usage count */
1165 process_id_t pid; /* process id */
1166 process_id_t ppid; /* parent process id */
1167 void* heap; /* heap base */
1168 void* module; /* main module */
1169 int threads; /* number of threads */
1170 int priority; /* process priority */
1171 int handles; /* number of handles */
1172 VARARG(filename,unicode_str); /* file name of main exe */
1173 @END
1176 /* Get the next thread from a snapshot */
1177 @REQ(next_thread)
1178 obj_handle_t handle; /* handle to the snapshot */
1179 int reset; /* reset snapshot position? */
1180 @REPLY
1181 int count; /* thread usage count */
1182 process_id_t pid; /* process id */
1183 thread_id_t tid; /* thread id */
1184 int base_pri; /* base priority */
1185 int delta_pri; /* delta priority */
1186 @END
1189 /* Get the next module from a snapshot */
1190 @REQ(next_module)
1191 obj_handle_t handle; /* handle to the snapshot */
1192 int reset; /* reset snapshot position? */
1193 @REPLY
1194 process_id_t pid; /* process id */
1195 void* base; /* module base address */
1196 size_t size; /* module size */
1197 VARARG(filename,unicode_str); /* file name of module */
1198 @END
1201 /* Wait for a debug event */
1202 @REQ(wait_debug_event)
1203 int get_handle; /* should we alloc a handle for waiting? */
1204 @REPLY
1205 process_id_t pid; /* process id */
1206 thread_id_t tid; /* thread id */
1207 obj_handle_t wait; /* wait handle if no event ready */
1208 VARARG(event,debug_event); /* debug event data */
1209 @END
1212 /* Queue an exception event */
1213 @REQ(queue_exception_event)
1214 int first; /* first chance exception? */
1215 VARARG(record,exc_event); /* thread context followed by exception record */
1216 @REPLY
1217 obj_handle_t handle; /* handle to the queued event */
1218 @END
1221 /* Retrieve the status of an exception event */
1222 @REQ(get_exception_status)
1223 obj_handle_t handle; /* handle to the queued event */
1224 @REPLY
1225 VARARG(context,context); /* modified thread context */
1226 @END
1229 /* Send an output string to the debugger */
1230 @REQ(output_debug_string)
1231 void* string; /* string to display (in debugged process address space) */
1232 int unicode; /* is it Unicode? */
1233 int length; /* string length */
1234 @END
1237 /* Continue a debug event */
1238 @REQ(continue_debug_event)
1239 process_id_t pid; /* process id to continue */
1240 thread_id_t tid; /* thread id to continue */
1241 int status; /* continuation status */
1242 @END
1245 /* Start/stop debugging an existing process */
1246 @REQ(debug_process)
1247 process_id_t pid; /* id of the process to debug */
1248 int attach; /* 1=attaching / 0=detaching from the process */
1249 @END
1252 /* Simulate a breakpoint in a process */
1253 @REQ(debug_break)
1254 obj_handle_t handle; /* process handle */
1255 @REPLY
1256 int self; /* was it the caller itself? */
1257 @END
1260 /* Set debugger kill on exit flag */
1261 @REQ(set_debugger_kill_on_exit)
1262 int kill_on_exit; /* 0=detach/1=kill debuggee when debugger dies */
1263 @END
1266 /* Read data from a process address space */
1267 @REQ(read_process_memory)
1268 obj_handle_t handle; /* process handle */
1269 void* addr; /* addr to read from */
1270 @REPLY
1271 VARARG(data,bytes); /* result data */
1272 @END
1275 /* Write data to a process address space */
1276 @REQ(write_process_memory)
1277 obj_handle_t handle; /* process handle */
1278 void* addr; /* addr to write to */
1279 VARARG(data,bytes); /* data to write */
1280 @END
1283 /* Create a registry key */
1284 @REQ(create_key)
1285 obj_handle_t parent; /* handle to the parent key */
1286 unsigned int access; /* desired access rights */
1287 unsigned int attributes; /* object attributes */
1288 unsigned int options; /* creation options */
1289 time_t modif; /* last modification time */
1290 data_size_t namelen; /* length of key name in bytes */
1291 VARARG(name,unicode_str,namelen); /* key name */
1292 VARARG(class,unicode_str); /* class name */
1293 @REPLY
1294 obj_handle_t hkey; /* handle to the created key */
1295 int created; /* has it been newly created? */
1296 @END
1298 /* Open a registry key */
1299 @REQ(open_key)
1300 obj_handle_t parent; /* handle to the parent key */
1301 unsigned int access; /* desired access rights */
1302 unsigned int attributes; /* object attributes */
1303 VARARG(name,unicode_str); /* key name */
1304 @REPLY
1305 obj_handle_t hkey; /* handle to the open key */
1306 @END
1309 /* Delete a registry key */
1310 @REQ(delete_key)
1311 obj_handle_t hkey; /* handle to the key */
1312 @END
1315 /* Flush a registry key */
1316 @REQ(flush_key)
1317 obj_handle_t hkey; /* handle to the key */
1318 @END
1321 /* Enumerate registry subkeys */
1322 @REQ(enum_key)
1323 obj_handle_t hkey; /* handle to registry key */
1324 int index; /* index of subkey (or -1 for current key) */
1325 int info_class; /* requested information class */
1326 @REPLY
1327 int subkeys; /* number of subkeys */
1328 int max_subkey; /* longest subkey name */
1329 int max_class; /* longest class name */
1330 int values; /* number of values */
1331 int max_value; /* longest value name */
1332 int max_data; /* longest value data */
1333 time_t modif; /* last modification time */
1334 data_size_t total; /* total length needed for full name and class */
1335 data_size_t namelen; /* length of key name in bytes */
1336 VARARG(name,unicode_str,namelen); /* key name */
1337 VARARG(class,unicode_str); /* class name */
1338 @END
1341 /* Set a value of a registry key */
1342 @REQ(set_key_value)
1343 obj_handle_t hkey; /* handle to registry key */
1344 int type; /* value type */
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 /* Retrieve the value of a registry key */
1352 @REQ(get_key_value)
1353 obj_handle_t hkey; /* handle to registry key */
1354 VARARG(name,unicode_str); /* value name */
1355 @REPLY
1356 int type; /* value type */
1357 data_size_t total; /* total length needed for data */
1358 VARARG(data,bytes); /* value data */
1359 @END
1362 /* Enumerate a value of a registry key */
1363 @REQ(enum_key_value)
1364 obj_handle_t hkey; /* handle to registry key */
1365 int index; /* value index */
1366 int info_class; /* requested information class */
1367 @REPLY
1368 int type; /* value type */
1369 data_size_t total; /* total length needed for full name and data */
1370 data_size_t namelen; /* length of value name in bytes */
1371 VARARG(name,unicode_str,namelen); /* value name */
1372 VARARG(data,bytes); /* value data */
1373 @END
1376 /* Delete a value of a registry key */
1377 @REQ(delete_key_value)
1378 obj_handle_t hkey; /* handle to registry key */
1379 VARARG(name,unicode_str); /* value name */
1380 @END
1383 /* Load a registry branch from a file */
1384 @REQ(load_registry)
1385 obj_handle_t hkey; /* root key to load to */
1386 obj_handle_t file; /* file to load from */
1387 VARARG(name,unicode_str); /* subkey name */
1388 @END
1391 /* UnLoad a registry branch from a file */
1392 @REQ(unload_registry)
1393 obj_handle_t hkey; /* root key to unload to */
1394 @END
1397 /* Save a registry branch to a file */
1398 @REQ(save_registry)
1399 obj_handle_t hkey; /* key to save */
1400 obj_handle_t file; /* file to save to */
1401 @END
1404 /* Add a registry key change notification */
1405 @REQ(set_registry_notification)
1406 obj_handle_t hkey; /* key to watch for changes */
1407 obj_handle_t event; /* event to set */
1408 int subtree; /* should we watch the whole subtree? */
1409 unsigned int filter; /* things to watch */
1410 @END
1413 /* Create a waitable timer */
1414 @REQ(create_timer)
1415 unsigned int access; /* wanted access rights */
1416 unsigned int attributes; /* object attributes */
1417 obj_handle_t rootdir; /* root directory */
1418 int manual; /* manual reset */
1419 VARARG(name,unicode_str); /* object name */
1420 @REPLY
1421 obj_handle_t handle; /* handle to the timer */
1422 @END
1425 /* Open a waitable timer */
1426 @REQ(open_timer)
1427 unsigned int access; /* wanted access rights */
1428 unsigned int attributes; /* object attributes */
1429 obj_handle_t rootdir; /* root directory */
1430 VARARG(name,unicode_str); /* object name */
1431 @REPLY
1432 obj_handle_t handle; /* handle to the timer */
1433 @END
1435 /* Set a waitable timer */
1436 @REQ(set_timer)
1437 obj_handle_t handle; /* handle to the timer */
1438 abs_time_t expire; /* next expiration absolute time */
1439 int period; /* timer period in ms */
1440 void* callback; /* callback function */
1441 void* arg; /* callback argument */
1442 @REPLY
1443 int signaled; /* was the timer signaled before this call ? */
1444 @END
1446 /* Cancel a waitable timer */
1447 @REQ(cancel_timer)
1448 obj_handle_t handle; /* handle to the timer */
1449 @REPLY
1450 int signaled; /* was the timer signaled before this calltime ? */
1451 @END
1453 /* Get information on a waitable timer */
1454 @REQ(get_timer_info)
1455 obj_handle_t handle; /* handle to the timer */
1456 @REPLY
1457 abs_time_t when; /* absolute time when the timer next expires */
1458 int signaled; /* is the timer signaled? */
1459 @END
1462 /* Retrieve the current context of a thread */
1463 @REQ(get_thread_context)
1464 obj_handle_t handle; /* thread handle */
1465 unsigned int flags; /* context flags */
1466 int suspend; /* if getting context during suspend */
1467 @REPLY
1468 int self; /* was it a handle to the current thread? */
1469 VARARG(context,context); /* thread context */
1470 @END
1473 /* Set the current context of a thread */
1474 @REQ(set_thread_context)
1475 obj_handle_t handle; /* thread handle */
1476 unsigned int flags; /* context flags */
1477 int suspend; /* if setting context during suspend */
1478 VARARG(context,context); /* thread context */
1479 @REPLY
1480 int self; /* was it a handle to the current thread? */
1481 @END
1484 /* Fetch a selector entry for a thread */
1485 @REQ(get_selector_entry)
1486 obj_handle_t handle; /* thread handle */
1487 int entry; /* LDT entry */
1488 @REPLY
1489 unsigned int base; /* selector base */
1490 unsigned int limit; /* selector limit */
1491 unsigned char flags; /* selector flags */
1492 @END
1495 /* Add an atom */
1496 @REQ(add_atom)
1497 obj_handle_t table; /* which table to add atom to */
1498 VARARG(name,unicode_str); /* atom name */
1499 @REPLY
1500 atom_t atom; /* resulting atom */
1501 @END
1504 /* Delete an atom */
1505 @REQ(delete_atom)
1506 obj_handle_t table; /* which table to delete atom from */
1507 atom_t atom; /* atom handle */
1508 @END
1511 /* Find an atom */
1512 @REQ(find_atom)
1513 obj_handle_t table; /* which table to find atom from */
1514 VARARG(name,unicode_str); /* atom name */
1515 @REPLY
1516 atom_t atom; /* atom handle */
1517 @END
1520 /* Get information about an atom */
1521 @REQ(get_atom_information)
1522 obj_handle_t table; /* which table to find atom from */
1523 atom_t atom; /* atom handle */
1524 @REPLY
1525 int count; /* atom lock count */
1526 int pinned; /* whether the atom has been pinned */
1527 data_size_t total; /* actual length of atom name */
1528 VARARG(name,unicode_str); /* atom name */
1529 @END
1532 /* Set information about an atom */
1533 @REQ(set_atom_information)
1534 obj_handle_t table; /* which table to find atom from */
1535 atom_t atom; /* atom handle */
1536 int pinned; /* whether to bump atom information */
1537 @END
1540 /* Empty an atom table */
1541 @REQ(empty_atom_table)
1542 obj_handle_t table; /* which table to find atom from */
1543 int if_pinned; /* whether to delete pinned atoms */
1544 @END
1547 /* Init an atom table */
1548 @REQ(init_atom_table)
1549 int entries; /* number of entries (only for local) */
1550 @REPLY
1551 obj_handle_t table; /* handle to the atom table */
1552 @END
1555 /* Get the message queue of the current thread */
1556 @REQ(get_msg_queue)
1557 @REPLY
1558 obj_handle_t handle; /* handle to the queue */
1559 @END
1562 /* Set the current message queue wakeup mask */
1563 @REQ(set_queue_mask)
1564 unsigned int wake_mask; /* wakeup bits mask */
1565 unsigned int changed_mask; /* changed bits mask */
1566 int skip_wait; /* will we skip waiting if signaled? */
1567 @REPLY
1568 unsigned int wake_bits; /* current wake bits */
1569 unsigned int changed_bits; /* current changed bits */
1570 @END
1573 /* Get the current message queue status */
1574 @REQ(get_queue_status)
1575 int clear; /* should we clear the change bits? */
1576 @REPLY
1577 unsigned int wake_bits; /* wake bits */
1578 unsigned int changed_bits; /* changed bits since last time */
1579 @END
1582 /* Retrieve the process idle event */
1583 @REQ(get_process_idle_event)
1584 obj_handle_t handle; /* process handle */
1585 @REPLY
1586 obj_handle_t event; /* handle to idle event */
1587 @END
1590 /* Send a message to a thread queue */
1591 @REQ(send_message)
1592 thread_id_t id; /* thread id */
1593 int type; /* message type (see below) */
1594 int flags; /* message flags (see below) */
1595 user_handle_t win; /* window handle */
1596 unsigned int msg; /* message code */
1597 unsigned long wparam; /* parameters */
1598 unsigned long lparam; /* parameters */
1599 int timeout; /* timeout for reply */
1600 VARARG(data,message_data); /* message data for sent messages */
1601 @END
1603 @REQ(post_quit_message)
1604 int exit_code; /* exit code to return */
1605 @END
1607 enum message_type
1609 MSG_ASCII, /* Ascii message (from SendMessageA) */
1610 MSG_UNICODE, /* Unicode message (from SendMessageW) */
1611 MSG_NOTIFY, /* notify message (from SendNotifyMessageW), always Unicode */
1612 MSG_CALLBACK, /* callback message (from SendMessageCallbackW), always Unicode */
1613 MSG_CALLBACK_RESULT,/* result of a callback message */
1614 MSG_OTHER_PROCESS, /* sent from other process, may include vararg data, always Unicode */
1615 MSG_POSTED, /* posted message (from PostMessageW), always Unicode */
1616 MSG_HARDWARE, /* hardware message */
1617 MSG_WINEVENT /* winevent message */
1619 #define SEND_MSG_ABORT_IF_HUNG 0x01
1622 /* Send a hardware message to a thread queue */
1623 @REQ(send_hardware_message)
1624 thread_id_t id; /* thread id */
1625 user_handle_t win; /* window handle */
1626 unsigned int msg; /* message code */
1627 unsigned int time; /* message time */
1628 unsigned long wparam; /* parameters */
1629 unsigned long lparam; /* parameters */
1630 unsigned long info; /* extra info */
1631 int x; /* x position */
1632 int y; /* y position */
1633 @END
1636 /* Get a message from the current queue */
1637 @REQ(get_message)
1638 int flags; /* see below */
1639 user_handle_t get_win; /* window handle to get */
1640 unsigned int get_first; /* first message code to get */
1641 unsigned int get_last; /* last message code to get */
1642 unsigned int hw_id; /* id of the previous hardware message (or 0) */
1643 @REPLY
1644 user_handle_t win; /* window handle */
1645 int type; /* message type */
1646 unsigned int msg; /* message code */
1647 unsigned long wparam; /* parameters */
1648 unsigned long lparam; /* parameters */
1649 unsigned long info; /* extra info */
1650 int x; /* x position */
1651 int y; /* y position */
1652 unsigned int time; /* message time */
1653 unsigned int hw_id; /* id if hardware message */
1654 unsigned int active_hooks; /* active hooks bitmap */
1655 data_size_t total; /* total size of extra data */
1656 VARARG(data,message_data); /* message data for sent messages */
1657 @END
1658 #define GET_MSG_REMOVE 1 /* remove the message */
1659 #define GET_MSG_SENT_ONLY 2 /* only get sent messages */
1661 /* Reply to a sent message */
1662 @REQ(reply_message)
1663 unsigned int result; /* message result */
1664 int remove; /* should we remove the message? */
1665 VARARG(data,bytes); /* message data for sent messages */
1666 @END
1669 /* Accept the current hardware message */
1670 @REQ(accept_hardware_message)
1671 unsigned int hw_id; /* id of the hardware message */
1672 int remove; /* should we remove the message? */
1673 user_handle_t new_win; /* new destination window for current message */
1674 @END
1677 /* Retrieve the reply for the last message sent */
1678 @REQ(get_message_reply)
1679 int cancel; /* cancel message if not ready? */
1680 @REPLY
1681 unsigned int result; /* message result */
1682 VARARG(data,bytes); /* message data for sent messages */
1683 @END
1686 /* Set a window timer */
1687 @REQ(set_win_timer)
1688 user_handle_t win; /* window handle */
1689 unsigned int msg; /* message to post */
1690 unsigned int rate; /* timer rate in ms */
1691 unsigned long id; /* timer id */
1692 unsigned long lparam; /* message lparam (callback proc) */
1693 @REPLY
1694 unsigned long id; /* timer id */
1695 @END
1698 /* Kill a window timer */
1699 @REQ(kill_win_timer)
1700 user_handle_t win; /* window handle */
1701 unsigned int msg; /* message to post */
1702 unsigned long id; /* timer id */
1703 @END
1706 /* Retrieve info about a serial port */
1707 @REQ(get_serial_info)
1708 obj_handle_t handle; /* handle to comm port */
1709 @REPLY
1710 unsigned int readinterval;
1711 unsigned int readconst;
1712 unsigned int readmult;
1713 unsigned int writeconst;
1714 unsigned int writemult;
1715 unsigned int eventmask;
1716 @END
1719 /* Set info about a serial port */
1720 @REQ(set_serial_info)
1721 obj_handle_t handle; /* handle to comm port */
1722 int flags; /* bitmask to set values (see below) */
1723 unsigned int readinterval;
1724 unsigned int readconst;
1725 unsigned int readmult;
1726 unsigned int writeconst;
1727 unsigned int writemult;
1728 unsigned int eventmask;
1729 @END
1730 #define SERIALINFO_SET_TIMEOUTS 0x01
1731 #define SERIALINFO_SET_MASK 0x02
1734 /* Create an async I/O */
1735 @REQ(register_async)
1736 obj_handle_t handle; /* handle to comm port, socket or file */
1737 int type; /* type of queue to look after */
1738 void* io_apc; /* APC routine to queue upon end of async */
1739 void* io_sb; /* I/O status block (unique across all async on this handle) */
1740 void* io_user; /* data to pass back to caller */
1741 int count; /* count - usually # of bytes to be read/written */
1742 @END
1743 #define ASYNC_TYPE_READ 0x01
1744 #define ASYNC_TYPE_WRITE 0x02
1745 #define ASYNC_TYPE_WAIT 0x03
1748 /* Cancel all async op on a fd */
1749 @REQ(cancel_async)
1750 obj_handle_t handle; /* handle to comm port, socket or file */
1751 @END
1754 /* Create a named pipe */
1755 @REQ(create_named_pipe)
1756 unsigned int access;
1757 unsigned int attributes; /* object attributes */
1758 obj_handle_t rootdir; /* root directory */
1759 unsigned int options;
1760 unsigned int flags;
1761 unsigned int maxinstances;
1762 unsigned int outsize;
1763 unsigned int insize;
1764 unsigned int timeout;
1765 VARARG(name,unicode_str); /* pipe name */
1766 @REPLY
1767 obj_handle_t handle; /* handle to the pipe */
1768 @END
1770 /* flags in create_named_pipe and get_named_pipe_info */
1771 #define NAMED_PIPE_MESSAGE_STREAM_WRITE 0x0001
1772 #define NAMED_PIPE_MESSAGE_STREAM_READ 0x0002
1773 #define NAMED_PIPE_NONBLOCKING_MODE 0x0004
1774 #define NAMED_PIPE_SERVER_END 0x8000
1776 /* Open an existing named pipe */
1777 @REQ(open_named_pipe)
1778 unsigned int access;
1779 unsigned int attributes; /* object attributes */
1780 obj_handle_t rootdir; /* root directory */
1781 unsigned int flags; /* file flags */
1782 VARARG(name,unicode_str); /* pipe name */
1783 @REPLY
1784 obj_handle_t handle; /* handle to the pipe */
1785 @END
1788 /* Connect to a named pipe */
1789 @REQ(connect_named_pipe)
1790 obj_handle_t handle;
1791 obj_handle_t event;
1792 void* func;
1793 @END
1796 /* Wait for a named pipe */
1797 @REQ(wait_named_pipe)
1798 obj_handle_t handle;
1799 unsigned int timeout;
1800 obj_handle_t event;
1801 void* func;
1802 VARARG(name,unicode_str); /* pipe name */
1803 @END
1806 /* Disconnect a named pipe */
1807 @REQ(disconnect_named_pipe)
1808 obj_handle_t handle;
1809 @REPLY
1810 int fd; /* associated fd to close */
1811 @END
1814 @REQ(get_named_pipe_info)
1815 obj_handle_t handle;
1816 @REPLY
1817 unsigned int flags;
1818 unsigned int maxinstances;
1819 unsigned int instances;
1820 unsigned int outsize;
1821 unsigned int insize;
1822 @END
1825 /* Create a window */
1826 @REQ(create_window)
1827 user_handle_t parent; /* parent window */
1828 user_handle_t owner; /* owner window */
1829 atom_t atom; /* class atom */
1830 void* instance; /* module instance */
1831 @REPLY
1832 user_handle_t handle; /* created window */
1833 user_handle_t parent; /* full handle of parent */
1834 user_handle_t owner; /* full handle of owner */
1835 int extra; /* number of extra bytes */
1836 void* class_ptr; /* pointer to class in client address space */
1837 @END
1840 /* Destroy a window */
1841 @REQ(destroy_window)
1842 user_handle_t handle; /* handle to the window */
1843 @END
1846 /* Retrieve the desktop window for the current thread */
1847 @REQ(get_desktop_window)
1848 int force; /* force creation if it doesn't exist */
1849 @REPLY
1850 user_handle_t handle; /* handle to the desktop window */
1851 @END
1854 /* Set a window owner */
1855 @REQ(set_window_owner)
1856 user_handle_t handle; /* handle to the window */
1857 user_handle_t owner; /* new owner */
1858 @REPLY
1859 user_handle_t full_owner; /* full handle of new owner */
1860 user_handle_t prev_owner; /* full handle of previous owner */
1861 @END
1864 /* Get information from a window handle */
1865 @REQ(get_window_info)
1866 user_handle_t handle; /* handle to the window */
1867 @REPLY
1868 user_handle_t full_handle; /* full 32-bit handle */
1869 user_handle_t last_active; /* last active popup */
1870 process_id_t pid; /* process owning the window */
1871 thread_id_t tid; /* thread owning the window */
1872 atom_t atom; /* class atom */
1873 int is_unicode; /* ANSI or unicode */
1874 @END
1877 /* Set some information in a window */
1878 @REQ(set_window_info)
1879 unsigned int flags; /* flags for fields to set (see below) */
1880 user_handle_t handle; /* handle to the window */
1881 unsigned int style; /* window style */
1882 unsigned int ex_style; /* window extended style */
1883 unsigned int id; /* window id */
1884 int is_unicode; /* ANSI or unicode */
1885 void* instance; /* creator instance */
1886 unsigned long user_data; /* user-specific data */
1887 int extra_offset; /* offset to set in extra bytes */
1888 data_size_t extra_size; /* size to set in extra bytes */
1889 unsigned long extra_value; /* value to set in extra bytes */
1890 @REPLY
1891 unsigned int old_style; /* old window style */
1892 unsigned int old_ex_style; /* old window extended style */
1893 unsigned int old_id; /* old window id */
1894 void* old_instance; /* old creator instance */
1895 unsigned long old_user_data; /* old user-specific data */
1896 unsigned long old_extra_value; /* old value in extra bytes */
1897 @END
1898 #define SET_WIN_STYLE 0x01
1899 #define SET_WIN_EXSTYLE 0x02
1900 #define SET_WIN_ID 0x04
1901 #define SET_WIN_INSTANCE 0x08
1902 #define SET_WIN_USERDATA 0x10
1903 #define SET_WIN_EXTRA 0x20
1904 #define SET_WIN_UNICODE 0x40
1907 /* Set the parent of a window */
1908 @REQ(set_parent)
1909 user_handle_t handle; /* handle to the window */
1910 user_handle_t parent; /* handle to the parent */
1911 @REPLY
1912 user_handle_t old_parent; /* old parent window */
1913 user_handle_t full_parent; /* full handle of new parent */
1914 @END
1917 /* Get a list of the window parents, up to the root of the tree */
1918 @REQ(get_window_parents)
1919 user_handle_t handle; /* handle to the window */
1920 @REPLY
1921 int count; /* total count of parents */
1922 VARARG(parents,user_handles); /* parent handles */
1923 @END
1926 /* Get a list of the window children */
1927 @REQ(get_window_children)
1928 user_handle_t parent; /* parent window */
1929 atom_t atom; /* class atom for the listed children */
1930 thread_id_t tid; /* thread owning the listed children */
1931 @REPLY
1932 int count; /* total count of children */
1933 VARARG(children,user_handles); /* children handles */
1934 @END
1937 /* Get a list of the window children that contain a given point */
1938 @REQ(get_window_children_from_point)
1939 user_handle_t parent; /* parent window */
1940 int x; /* point in parent coordinates */
1941 int y;
1942 @REPLY
1943 int count; /* total count of children */
1944 VARARG(children,user_handles); /* children handles */
1945 @END
1948 /* Get window tree information from a window handle */
1949 @REQ(get_window_tree)
1950 user_handle_t handle; /* handle to the window */
1951 @REPLY
1952 user_handle_t parent; /* parent window */
1953 user_handle_t owner; /* owner window */
1954 user_handle_t next_sibling; /* next sibling in Z-order */
1955 user_handle_t prev_sibling; /* prev sibling in Z-order */
1956 user_handle_t first_sibling; /* first sibling in Z-order */
1957 user_handle_t last_sibling; /* last sibling in Z-order */
1958 user_handle_t first_child; /* first child */
1959 user_handle_t last_child; /* last child */
1960 @END
1962 /* Set the position and Z order of a window */
1963 @REQ(set_window_pos)
1964 unsigned int flags; /* SWP_* flags */
1965 user_handle_t handle; /* handle to the window */
1966 user_handle_t previous; /* previous window in Z order */
1967 rectangle_t window; /* window rectangle */
1968 rectangle_t client; /* client rectangle */
1969 VARARG(valid,rectangles); /* valid rectangles from WM_NCCALCSIZE */
1970 @REPLY
1971 unsigned int new_style; /* new window style */
1972 @END
1975 /* Get the window and client rectangles of a window */
1976 @REQ(get_window_rectangles)
1977 user_handle_t handle; /* handle to the window */
1978 @REPLY
1979 rectangle_t window; /* window rectangle */
1980 rectangle_t visible; /* visible part of the window rectangle */
1981 rectangle_t client; /* client rectangle */
1982 @END
1985 /* Get the window text */
1986 @REQ(get_window_text)
1987 user_handle_t handle; /* handle to the window */
1988 @REPLY
1989 VARARG(text,unicode_str); /* window text */
1990 @END
1993 /* Set the window text */
1994 @REQ(set_window_text)
1995 user_handle_t handle; /* handle to the window */
1996 VARARG(text,unicode_str); /* window text */
1997 @END
2000 /* Get the coordinates offset between two windows */
2001 @REQ(get_windows_offset)
2002 user_handle_t from; /* handle to the first window */
2003 user_handle_t to; /* handle to the second window */
2004 @REPLY
2005 int x; /* x coordinate offset */
2006 int y; /* y coordinate offset */
2007 @END
2010 /* Get the visible region of a window */
2011 @REQ(get_visible_region)
2012 user_handle_t window; /* handle to the window */
2013 unsigned int flags; /* DCX flags */
2014 @REPLY
2015 user_handle_t top_win; /* top window to clip against */
2016 int top_org_x; /* top window visible rect origin in screen coords */
2017 int top_org_y;
2018 int win_org_x; /* window rect origin in screen coords */
2019 int win_org_y;
2020 data_size_t total_size; /* total size of the resulting region */
2021 VARARG(region,rectangles); /* list of rectangles for the region (in screen coords) */
2022 @END
2025 /* Get the window region */
2026 @REQ(get_window_region)
2027 user_handle_t window; /* handle to the window */
2028 @REPLY
2029 data_size_t total_size; /* total size of the resulting region */
2030 VARARG(region,rectangles); /* list of rectangles for the region */
2031 @END
2034 /* Set the window region */
2035 @REQ(set_window_region)
2036 user_handle_t window; /* handle to the window */
2037 VARARG(region,rectangles); /* list of rectangles for the region */
2038 @END
2041 /* Get the window update region */
2042 @REQ(get_update_region)
2043 user_handle_t window; /* handle to the window */
2044 user_handle_t from_child; /* child to start searching from */
2045 unsigned int flags; /* update flags (see below) */
2046 @REPLY
2047 user_handle_t child; /* child to repaint (or window itself) */
2048 unsigned int flags; /* resulting update flags (see below) */
2049 data_size_t total_size; /* total size of the resulting region */
2050 VARARG(region,rectangles); /* list of rectangles for the region */
2051 @END
2052 #define UPDATE_NONCLIENT 0x01 /* get region for repainting non-client area */
2053 #define UPDATE_ERASE 0x02 /* get region for erasing client area */
2054 #define UPDATE_PAINT 0x04 /* get region for painting client area */
2055 #define UPDATE_INTERNALPAINT 0x08 /* get region if internal paint is pending */
2056 #define UPDATE_ALLCHILDREN 0x10 /* force repaint of all children */
2057 #define UPDATE_NOCHILDREN 0x20 /* don't try to repaint any children */
2058 #define UPDATE_NOREGION 0x40 /* don't return a region, only the flags */
2061 /* Update the z order of a window so that a given rectangle is fully visible */
2062 @REQ(update_window_zorder)
2063 user_handle_t window; /* handle to the window */
2064 rectangle_t rect; /* rectangle that must be visible */
2065 @END
2068 /* Mark parts of a window as needing a redraw */
2069 @REQ(redraw_window)
2070 user_handle_t window; /* handle to the window */
2071 unsigned int flags; /* RDW_* flags */
2072 VARARG(region,rectangles); /* list of rectangles for the region */
2073 @END
2076 /* Set a window property */
2077 @REQ(set_window_property)
2078 user_handle_t window; /* handle to the window */
2079 atom_t atom; /* property atom (if no name specified) */
2080 obj_handle_t handle; /* handle to store */
2081 VARARG(name,unicode_str); /* property name */
2082 @END
2085 /* Remove a window property */
2086 @REQ(remove_window_property)
2087 user_handle_t window; /* handle to the window */
2088 atom_t atom; /* property atom (if no name specified) */
2089 VARARG(name,unicode_str); /* property name */
2090 @REPLY
2091 obj_handle_t handle; /* handle stored in property */
2092 @END
2095 /* Get a window property */
2096 @REQ(get_window_property)
2097 user_handle_t window; /* handle to the window */
2098 atom_t atom; /* property atom (if no name specified) */
2099 VARARG(name,unicode_str); /* property name */
2100 @REPLY
2101 obj_handle_t handle; /* handle stored in property */
2102 @END
2105 /* Get the list of properties of a window */
2106 @REQ(get_window_properties)
2107 user_handle_t window; /* handle to the window */
2108 @REPLY
2109 int total; /* total number of properties */
2110 VARARG(props,properties); /* list of properties */
2111 @END
2114 /* Create a window station */
2115 @REQ(create_winstation)
2116 unsigned int flags; /* window station flags */
2117 unsigned int access; /* wanted access rights */
2118 unsigned int attributes; /* object attributes */
2119 VARARG(name,unicode_str); /* object name */
2120 @REPLY
2121 obj_handle_t handle; /* handle to the window station */
2122 @END
2125 /* Open a handle to a window station */
2126 @REQ(open_winstation)
2127 unsigned int access; /* wanted access rights */
2128 unsigned int attributes; /* object attributes */
2129 VARARG(name,unicode_str); /* object name */
2130 @REPLY
2131 obj_handle_t handle; /* handle to the window station */
2132 @END
2135 /* Close a window station */
2136 @REQ(close_winstation)
2137 obj_handle_t handle; /* handle to the window station */
2138 @END
2141 /* Get the process current window station */
2142 @REQ(get_process_winstation)
2143 @REPLY
2144 obj_handle_t handle; /* handle to the window station */
2145 @END
2148 /* Set the process current window station */
2149 @REQ(set_process_winstation)
2150 obj_handle_t handle; /* handle to the window station */
2151 @END
2154 /* Create a desktop */
2155 @REQ(create_desktop)
2156 unsigned int flags; /* desktop flags */
2157 unsigned int access; /* wanted access rights */
2158 unsigned int attributes; /* object attributes */
2159 VARARG(name,unicode_str); /* object name */
2160 @REPLY
2161 obj_handle_t handle; /* handle to the desktop */
2162 @END
2165 /* Open a handle to a desktop */
2166 @REQ(open_desktop)
2167 unsigned int flags; /* desktop flags */
2168 unsigned int access; /* wanted access rights */
2169 unsigned int attributes; /* object attributes */
2170 VARARG(name,unicode_str); /* object name */
2171 @REPLY
2172 obj_handle_t handle; /* handle to the desktop */
2173 @END
2176 /* Close a desktop */
2177 @REQ(close_desktop)
2178 obj_handle_t handle; /* handle to the desktop */
2179 @END
2182 /* Get the thread current desktop */
2183 @REQ(get_thread_desktop)
2184 thread_id_t tid; /* thread id */
2185 @REPLY
2186 obj_handle_t handle; /* handle to the desktop */
2187 @END
2190 /* Set the thread current desktop */
2191 @REQ(set_thread_desktop)
2192 obj_handle_t handle; /* handle to the desktop */
2193 @END
2196 /* Get/set information about a user object (window station or desktop) */
2197 @REQ(set_user_object_info)
2198 obj_handle_t handle; /* handle to the object */
2199 unsigned int flags; /* information to set */
2200 unsigned int obj_flags; /* new object flags */
2201 @REPLY
2202 int is_desktop; /* is object a desktop? */
2203 unsigned int old_obj_flags; /* old object flags */
2204 VARARG(name,unicode_str); /* object name */
2205 @END
2206 #define SET_USER_OBJECT_FLAGS 1
2209 /* Attach (or detach) thread inputs */
2210 @REQ(attach_thread_input)
2211 thread_id_t tid_from; /* thread to be attached */
2212 thread_id_t tid_to; /* thread to which tid_from should be attached */
2213 int attach; /* is it an attach? */
2214 @END
2217 /* Get input data for a given thread */
2218 @REQ(get_thread_input)
2219 thread_id_t tid; /* id of thread */
2220 @REPLY
2221 user_handle_t focus; /* handle to the focus window */
2222 user_handle_t capture; /* handle to the capture window */
2223 user_handle_t active; /* handle to the active window */
2224 user_handle_t foreground; /* handle to the global foreground window */
2225 user_handle_t menu_owner; /* handle to the menu owner */
2226 user_handle_t move_size; /* handle to the moving/resizing window */
2227 user_handle_t caret; /* handle to the caret window */
2228 rectangle_t rect; /* caret rectangle */
2229 @END
2232 /* Get the time of the last input event */
2233 @REQ(get_last_input_time)
2234 @REPLY
2235 unsigned int time;
2236 @END
2239 /* Retrieve queue keyboard state for a given thread */
2240 @REQ(get_key_state)
2241 thread_id_t tid; /* id of thread */
2242 int key; /* optional key code or -1 */
2243 @REPLY
2244 unsigned char state; /* state of specified key */
2245 VARARG(keystate,bytes); /* state array for all the keys */
2246 @END
2248 /* Set queue keyboard state for a given thread */
2249 @REQ(set_key_state)
2250 thread_id_t tid; /* id of thread */
2251 VARARG(keystate,bytes); /* state array for all the keys */
2252 @END
2254 /* Set the system foreground window */
2255 @REQ(set_foreground_window)
2256 user_handle_t handle; /* handle to the foreground window */
2257 @REPLY
2258 user_handle_t previous; /* handle to the previous foreground window */
2259 int send_msg_old; /* whether we have to send a msg to the old window */
2260 int send_msg_new; /* whether we have to send a msg to the new window */
2261 @END
2263 /* Set the current thread focus window */
2264 @REQ(set_focus_window)
2265 user_handle_t handle; /* handle to the focus window */
2266 @REPLY
2267 user_handle_t previous; /* handle to the previous focus window */
2268 @END
2270 /* Set the current thread active window */
2271 @REQ(set_active_window)
2272 user_handle_t handle; /* handle to the active window */
2273 @REPLY
2274 user_handle_t previous; /* handle to the previous active window */
2275 @END
2277 /* Set the current thread capture window */
2278 @REQ(set_capture_window)
2279 user_handle_t handle; /* handle to the capture window */
2280 unsigned int flags; /* capture flags (see below) */
2281 @REPLY
2282 user_handle_t previous; /* handle to the previous capture window */
2283 user_handle_t full_handle; /* full 32-bit handle of new capture window */
2284 @END
2285 #define CAPTURE_MENU 0x01 /* capture is for a menu */
2286 #define CAPTURE_MOVESIZE 0x02 /* capture is for moving/resizing */
2289 /* Set the current thread caret window */
2290 @REQ(set_caret_window)
2291 user_handle_t handle; /* handle to the caret window */
2292 int width; /* caret width */
2293 int height; /* caret height */
2294 @REPLY
2295 user_handle_t previous; /* handle to the previous caret window */
2296 rectangle_t old_rect; /* previous caret rectangle */
2297 int old_hide; /* previous hide count */
2298 int old_state; /* previous caret state (1=on, 0=off) */
2299 @END
2302 /* Set the current thread caret information */
2303 @REQ(set_caret_info)
2304 unsigned int flags; /* caret flags (see below) */
2305 user_handle_t handle; /* handle to the caret window */
2306 int x; /* caret x position */
2307 int y; /* caret y position */
2308 int hide; /* increment for hide count (can be negative to show it) */
2309 int state; /* caret state (1=on, 0=off, -1=toggle current state) */
2310 @REPLY
2311 user_handle_t full_handle; /* handle to the current caret window */
2312 rectangle_t old_rect; /* previous caret rectangle */
2313 int old_hide; /* previous hide count */
2314 int old_state; /* previous caret state (1=on, 0=off) */
2315 @END
2316 #define SET_CARET_POS 0x01 /* set the caret position from x,y */
2317 #define SET_CARET_HIDE 0x02 /* increment the caret hide count */
2318 #define SET_CARET_STATE 0x04 /* set the caret on/off state */
2321 /* Set a window hook */
2322 @REQ(set_hook)
2323 int id; /* id of the hook */
2324 process_id_t pid; /* id of process to set the hook into */
2325 thread_id_t tid; /* id of thread to set the hook into */
2326 int event_min;
2327 int event_max;
2328 int flags;
2329 void* proc; /* hook procedure */
2330 int unicode; /* is it a unicode hook? */
2331 VARARG(module,unicode_str); /* module name */
2332 @REPLY
2333 user_handle_t handle; /* handle to the hook */
2334 unsigned int active_hooks; /* active hooks bitmap */
2335 @END
2338 /* Remove a window hook */
2339 @REQ(remove_hook)
2340 user_handle_t handle; /* handle to the hook */
2341 int id; /* id of the hook if handle is 0 */
2342 void* proc; /* hook procedure if handle is 0 */
2343 @REPLY
2344 unsigned int active_hooks; /* active hooks bitmap */
2345 @END
2348 /* Start calling a hook chain */
2349 @REQ(start_hook_chain)
2350 int id; /* id of the hook */
2351 int event; /* signalled event */
2352 user_handle_t window; /* handle to the event window */
2353 int object_id; /* object id for out of context winevent */
2354 int child_id; /* child id for out of context winevent */
2355 @REPLY
2356 user_handle_t handle; /* handle to the next hook */
2357 process_id_t pid; /* process id for low-level keyboard/mouse hooks */
2358 thread_id_t tid; /* thread id for low-level keyboard/mouse hooks */
2359 void* proc; /* hook procedure */
2360 int unicode; /* is it a unicode hook? */
2361 unsigned int active_hooks; /* active hooks bitmap */
2362 VARARG(module,unicode_str); /* module name */
2363 @END
2366 /* Finished calling a hook chain */
2367 @REQ(finish_hook_chain)
2368 int id; /* id of the hook */
2369 @END
2372 /* Get the hook information */
2373 @REQ(get_hook_info)
2374 user_handle_t handle; /* handle to the current hook */
2375 int get_next; /* do we want info about current or next hook? */
2376 int event; /* signalled event */
2377 user_handle_t window; /* handle to the event window */
2378 int object_id; /* object id for out of context winevent */
2379 int child_id; /* child id for out of context winevent */
2380 @REPLY
2381 user_handle_t handle; /* handle to the hook */
2382 int id; /* id of the hook */
2383 process_id_t pid; /* process id for low-level keyboard/mouse hooks */
2384 thread_id_t tid; /* thread id for low-level keyboard/mouse hooks */
2385 void* proc; /* hook procedure */
2386 int unicode; /* is it a unicode hook? */
2387 VARARG(module,unicode_str); /* module name */
2388 @END
2391 /* Create a window class */
2392 @REQ(create_class)
2393 int local; /* is it a local class? */
2394 atom_t atom; /* class atom */
2395 unsigned int style; /* class style */
2396 void* instance; /* module instance */
2397 int extra; /* number of extra class bytes */
2398 int win_extra; /* number of window extra bytes */
2399 void* client_ptr; /* pointer to class in client address space */
2400 @END
2403 /* Destroy a window class */
2404 @REQ(destroy_class)
2405 atom_t atom; /* class atom */
2406 void* instance; /* module instance */
2407 @REPLY
2408 void* client_ptr; /* pointer to class in client address space */
2409 @END
2412 /* Set some information in a class */
2413 @REQ(set_class_info)
2414 user_handle_t window; /* handle to the window */
2415 unsigned int flags; /* flags for info to set (see below) */
2416 atom_t atom; /* class atom */
2417 unsigned int style; /* class style */
2418 int win_extra; /* number of window extra bytes */
2419 void* instance; /* module instance */
2420 int extra_offset; /* offset to set in extra bytes */
2421 data_size_t extra_size; /* size to set in extra bytes */
2422 unsigned long extra_value; /* value to set in extra bytes */
2423 @REPLY
2424 atom_t old_atom; /* previous class atom */
2425 unsigned int old_style; /* previous class style */
2426 int old_extra; /* previous number of class extra bytes */
2427 int old_win_extra; /* previous number of window extra bytes */
2428 void* old_instance; /* previous module instance */
2429 unsigned long old_extra_value; /* old value in extra bytes */
2430 @END
2431 #define SET_CLASS_ATOM 0x0001
2432 #define SET_CLASS_STYLE 0x0002
2433 #define SET_CLASS_WINEXTRA 0x0004
2434 #define SET_CLASS_INSTANCE 0x0008
2435 #define SET_CLASS_EXTRA 0x0010
2438 /* Set/get clipboard information */
2439 @REQ(set_clipboard_info)
2440 unsigned int flags; /* flags for fields to set (see below) */
2441 user_handle_t clipboard; /* clipboard window */
2442 user_handle_t owner; /* clipboard owner */
2443 user_handle_t viewer; /* first clipboard viewer */
2444 unsigned int seqno; /* change sequence number */
2445 @REPLY
2446 unsigned int flags; /* status flags (see below) */
2447 user_handle_t old_clipboard; /* old clipboard window */
2448 user_handle_t old_owner; /* old clipboard owner */
2449 user_handle_t old_viewer; /* old clipboard viewer */
2450 unsigned int seqno; /* current sequence number */
2451 @END
2453 #define SET_CB_OPEN 0x001
2454 #define SET_CB_OWNER 0x002
2455 #define SET_CB_VIEWER 0x004
2456 #define SET_CB_SEQNO 0x008
2457 #define SET_CB_RELOWNER 0x010
2458 #define SET_CB_CLOSE 0x020
2459 #define CB_OPEN 0x040
2460 #define CB_OWNER 0x080
2461 #define CB_PROCESS 0x100
2464 /* Open a security token */
2465 @REQ(open_token)
2466 obj_handle_t handle; /* handle to the thread or process */
2467 unsigned int access; /* access rights to the new token */
2468 unsigned int attributes;/* object attributes */
2469 unsigned int flags; /* flags (see below) */
2470 @REPLY
2471 obj_handle_t token; /* handle to the token */
2472 @END
2473 #define OPEN_TOKEN_THREAD 1
2474 #define OPEN_TOKEN_AS_SELF 2
2477 /* Set/get the global windows */
2478 @REQ(set_global_windows)
2479 unsigned int flags; /* flags for fields to set (see below) */
2480 user_handle_t shell_window; /* handle to the new shell window */
2481 user_handle_t shell_listview; /* handle to the new shell listview window */
2482 user_handle_t progman_window; /* handle to the new program manager window */
2483 user_handle_t taskman_window; /* handle to the new task manager window */
2484 @REPLY
2485 user_handle_t old_shell_window; /* handle to the shell window */
2486 user_handle_t old_shell_listview; /* handle to the shell listview window */
2487 user_handle_t old_progman_window; /* handle to the new program manager window */
2488 user_handle_t old_taskman_window; /* handle to the new task manager window */
2489 @END
2490 #define SET_GLOBAL_SHELL_WINDOWS 0x01 /* set both main shell and listview windows */
2491 #define SET_GLOBAL_PROGMAN_WINDOW 0x02
2492 #define SET_GLOBAL_TASKMAN_WINDOW 0x04
2494 /* Adjust the privileges held by a token */
2495 @REQ(adjust_token_privileges)
2496 obj_handle_t handle; /* handle to the token */
2497 int disable_all; /* disable all privileges? */
2498 int get_modified_state; /* get modified privileges? */
2499 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges to enable/disable/remove */
2500 @REPLY
2501 unsigned int len; /* total length in bytes required to store token privileges */
2502 VARARG(privileges,LUID_AND_ATTRIBUTES); /* modified privileges */
2503 @END
2505 /* Retrieves the set of privileges held by or available to a token */
2506 @REQ(get_token_privileges)
2507 obj_handle_t handle; /* handle to the token */
2508 @REPLY
2509 unsigned int len; /* total length in bytes required to store token privileges */
2510 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges held by or available to a token */
2511 @END
2513 /* Check the token has the required privileges */
2514 @REQ(check_token_privileges)
2515 obj_handle_t handle; /* handle to the token */
2516 int all_required; /* are all the privileges required for the check to succeed? */
2517 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges to check */
2518 @REPLY
2519 int has_privileges; /* does the token have the required privileges? */
2520 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges held by or available to a token */
2521 @END
2523 @REQ(duplicate_token)
2524 obj_handle_t handle; /* handle to the token to duplicate */
2525 unsigned int access; /* access rights to the new token */
2526 unsigned int attributes; /* object attributes */
2527 int primary; /* is the new token to be a primary one? */
2528 int impersonation_level; /* impersonation level of the new token */
2529 @REPLY
2530 obj_handle_t new_handle; /* duplicated handle */
2531 @END
2533 @REQ(access_check)
2534 obj_handle_t handle; /* handle to the token */
2535 unsigned int desired_access; /* desired access to the object */
2536 unsigned int mapping_read; /* mapping from generic read to specific rights */
2537 unsigned int mapping_write; /* mapping from generic write to specific rights */
2538 unsigned int mapping_execute; /* mapping from generic execute to specific rights */
2539 unsigned int mapping_all; /* mapping from generic all to specific rights */
2540 VARARG(sd,security_descriptor); /* security descriptor to check */
2541 @REPLY
2542 unsigned int access_granted; /* access rights actually granted */
2543 unsigned int access_status; /* was access granted? */
2544 unsigned int privileges_len; /* length needed to store privileges */
2545 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges used during access check */
2546 @END
2548 @REQ(get_token_user)
2549 obj_handle_t handle; /* handle to the token */
2550 @REPLY
2551 data_size_t user_len; /* length needed to store user */
2552 VARARG(user,SID); /* sid of the user the token represents */
2553 @END
2555 @REQ(get_token_groups)
2556 obj_handle_t handle; /* handle to the token */
2557 @REPLY
2558 data_size_t user_len; /* length needed to store user */
2559 VARARG(user,token_groups); /* groups the token's user belongs to */
2560 @END
2562 /* Create a mailslot */
2563 @REQ(create_mailslot)
2564 unsigned int access; /* wanted access rights */
2565 unsigned int attributes; /* object attributes */
2566 obj_handle_t rootdir; /* root directory */
2567 unsigned int max_msgsize;
2568 int read_timeout;
2569 VARARG(name,unicode_str); /* mailslot name */
2570 @REPLY
2571 obj_handle_t handle; /* handle to the mailslot */
2572 @END
2575 /* Open an existing mailslot */
2576 @REQ(open_mailslot)
2577 unsigned int access;
2578 unsigned int attributes; /* object attributes */
2579 obj_handle_t rootdir; /* root directory */
2580 unsigned int sharing; /* sharing mode */
2581 VARARG(name,unicode_str); /* mailslot name */
2582 @REPLY
2583 obj_handle_t handle; /* handle to the mailslot */
2584 @END
2587 /* Set mailslot information */
2588 @REQ(set_mailslot_info)
2589 obj_handle_t handle; /* handle to the mailslot */
2590 unsigned int flags;
2591 int read_timeout;
2592 @REPLY
2593 unsigned int max_msgsize;
2594 int read_timeout;
2595 unsigned int msg_count;
2596 unsigned int next_msgsize;
2597 @END
2598 #define MAILSLOT_SET_READ_TIMEOUT 1
2601 /* Create a directory object */
2602 @REQ(create_directory)
2603 unsigned int access; /* access flags */
2604 unsigned int attributes; /* object attributes */
2605 obj_handle_t rootdir; /* root directory */
2606 VARARG(directory_name,unicode_str); /* Directory name */
2607 @REPLY
2608 obj_handle_t handle; /* handle to the directory */
2609 @END
2612 /* Open a directory object */
2613 @REQ(open_directory)
2614 unsigned int access; /* access flags */
2615 unsigned int attributes; /* object attributes */
2616 obj_handle_t rootdir; /* root directory */
2617 VARARG(directory_name,unicode_str); /* Directory name */
2618 @REPLY
2619 obj_handle_t handle; /* handle to the directory */
2620 @END
2623 /* Create a symbolic link object */
2624 @REQ(create_symlink)
2625 unsigned int access; /* access flags */
2626 unsigned int attributes; /* object attributes */
2627 obj_handle_t rootdir; /* root directory */
2628 data_size_t name_len; /* length of the symlink name in bytes */
2629 VARARG(name,unicode_str,name_len); /* symlink name */
2630 VARARG(target_name,unicode_str); /* target name */
2631 @REPLY
2632 obj_handle_t handle; /* handle to the symlink */
2633 @END
2636 /* Open a symbolic link object */
2637 @REQ(open_symlink)
2638 unsigned int access; /* access flags */
2639 unsigned int attributes; /* object attributes */
2640 obj_handle_t rootdir; /* root directory */
2641 VARARG(name,unicode_str); /* symlink name */
2642 @REPLY
2643 obj_handle_t handle; /* handle to the symlink */
2644 @END
2647 /* Query a symbolic link object */
2648 @REQ(query_symlink)
2649 obj_handle_t handle; /* handle to the symlink */
2650 @REPLY
2651 VARARG(target_name,unicode_str); /* target name */
2652 @END