Removed todo_wine from some tests that succeed now.
[wine/multimedia.git] / server / protocol.def
blob847eb9e71e663f70440b4bc82c5e982bbf3d70fa
1 /* -*- C -*-
3 * Wine server protocol definition
5 * Copyright (C) 2001 Alexandre Julliard
7 * This file is used by tools/make_requests to build the
8 * protocol structures in include/wine/server_protocol.h
10 * This library is free software; you can redistribute it and/or
11 * modify it under the terms of the GNU Lesser General Public
12 * License as published by the Free Software Foundation; either
13 * version 2.1 of the License, or (at your option) any later version.
15 * This library is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 * Lesser General Public License for more details.
20 * You should have received a copy of the GNU Lesser General Public
21 * License along with this library; if not, write to the Free Software
22 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
25 @HEADER /* start of C declarations */
27 #include <stdarg.h>
28 #include <stdlib.h>
29 #include <time.h>
31 #include <windef.h>
32 #include <winbase.h>
34 struct request_header
36 int req; /* request code */
37 size_t request_size; /* request variable part size */
38 size_t reply_size; /* reply variable part maximum size */
41 struct reply_header
43 unsigned int error; /* error result */
44 size_t reply_size; /* reply variable part size */
47 /* placeholder structure for the maximum allowed request size */
48 /* this is used to construct the generic_request union */
49 struct request_max_size
51 int pad[16]; /* the max request size is 16 ints */
54 typedef void *obj_handle_t;
55 typedef void *user_handle_t;
56 typedef unsigned short atom_t;
57 typedef unsigned int process_id_t;
58 typedef unsigned int thread_id_t;
60 #define FIRST_USER_HANDLE 0x0020 /* first possible value for low word of user handle */
61 #define LAST_USER_HANDLE 0xffef /* last possible value for low word of user handle */
64 /* definitions of the event data depending on the event code */
65 struct debug_event_exception
67 EXCEPTION_RECORD record; /* exception record */
68 int first; /* first chance exception? */
70 struct debug_event_create_thread
72 obj_handle_t handle; /* handle to the new thread */
73 void *teb; /* thread teb (in debugged process address space) */
74 void *start; /* thread startup routine */
76 struct debug_event_create_process
78 obj_handle_t file; /* handle to the process exe file */
79 obj_handle_t process; /* handle to the new process */
80 obj_handle_t thread; /* handle to the new thread */
81 void *base; /* base of executable image */
82 int dbg_offset; /* offset of debug info in file */
83 int dbg_size; /* size of debug info */
84 void *teb; /* thread teb (in debugged process address space) */
85 void *start; /* thread startup routine */
86 void *name; /* image name (optional) */
87 int unicode; /* is it Unicode? */
89 struct debug_event_exit
91 int exit_code; /* thread or process exit code */
93 struct debug_event_load_dll
95 obj_handle_t handle; /* file handle for the dll */
96 void *base; /* base address of the dll */
97 int dbg_offset; /* offset of debug info in file */
98 int dbg_size; /* size of debug info */
99 void *name; /* image name (optional) */
100 int unicode; /* is it Unicode? */
102 struct debug_event_unload_dll
104 void *base; /* base address of the dll */
106 struct debug_event_output_string
108 void *string; /* string to display (in debugged process address space) */
109 int unicode; /* is it Unicode? */
110 int length; /* string length */
112 struct debug_event_rip_info
114 int error; /* ??? */
115 int type; /* ??? */
117 union debug_event_data
119 struct debug_event_exception exception;
120 struct debug_event_create_thread create_thread;
121 struct debug_event_create_process create_process;
122 struct debug_event_exit exit;
123 struct debug_event_load_dll load_dll;
124 struct debug_event_unload_dll unload_dll;
125 struct debug_event_output_string output_string;
126 struct debug_event_rip_info rip_info;
129 /* debug event data */
130 typedef struct
132 int code; /* event code */
133 union debug_event_data info; /* event information */
134 } debug_event_t;
136 /* structure used in sending an fd from client to server */
137 struct send_fd
139 thread_id_t tid; /* thread id */
140 int fd; /* file descriptor on client-side */
143 /* structure sent by the server on the wait fifo */
144 struct wake_up_reply
146 void *cookie; /* magic cookie that was passed in select_request */
147 int signaled; /* wait result */
150 /* structure for absolute timeouts */
151 typedef struct
153 int sec; /* seconds since Unix epoch */
154 int usec; /* microseconds */
155 } abs_time_t;
157 /* structure returned in the list of window properties */
158 typedef struct
160 atom_t atom; /* property atom */
161 short string; /* was atom a string originally? */
162 obj_handle_t handle; /* handle stored in property */
163 } property_data_t;
165 /* structure to specify window rectangles */
166 typedef struct
168 int left;
169 int top;
170 int right;
171 int bottom;
172 } rectangle_t;
174 /* structure for console char/attribute info */
175 typedef struct
177 WCHAR ch;
178 unsigned short attr;
179 } char_info_t;
181 /****************************************************************/
182 /* Request declarations */
184 /* Create a new process from the context of the parent */
185 @REQ(new_process)
186 int inherit_all; /* inherit all handles from parent */
187 int create_flags; /* creation flags */
188 int unix_pid; /* Unix pid of new process */
189 obj_handle_t exe_file; /* file handle for main exe */
190 obj_handle_t hstdin; /* handle for stdin */
191 obj_handle_t hstdout; /* handle for stdout */
192 obj_handle_t hstderr; /* handle for stderr */
193 VARARG(info,startup_info); /* startup information */
194 @REPLY
195 obj_handle_t info; /* new process info handle */
196 @END
199 /* Retrieve information about a newly started process */
200 @REQ(get_new_process_info)
201 obj_handle_t info; /* info handle returned from new_process_request */
202 int pinherit; /* process handle inherit flag */
203 int tinherit; /* thread handle inherit flag */
204 @REPLY
205 process_id_t pid; /* process id */
206 obj_handle_t phandle; /* process handle (in the current process) */
207 thread_id_t tid; /* thread id */
208 obj_handle_t thandle; /* thread handle (in the current process) */
209 int success; /* did the process start successfully? */
210 @END
213 /* Create a new thread from the context of the parent */
214 @REQ(new_thread)
215 int suspend; /* new thread should be suspended on creation */
216 int inherit; /* inherit flag */
217 int request_fd; /* fd for request pipe */
218 @REPLY
219 thread_id_t tid; /* thread id */
220 obj_handle_t handle; /* thread handle (in the current process) */
221 @END
224 /* Signal that we are finished booting on the client side */
225 @REQ(boot_done)
226 int debug_level; /* new debug level */
227 @END
230 /* Initialize a process; called from the new process context */
231 @REQ(init_process)
232 void* peb; /* addr of PEB */
233 void* ldt_copy; /* addr of LDT copy */
234 @REPLY
235 int create_flags; /* creation flags */
236 unsigned int server_start; /* server start time (GetTickCount) */
237 size_t info_size; /* total size of startup info */
238 obj_handle_t exe_file; /* file handle for main exe */
239 obj_handle_t hstdin; /* handle for stdin */
240 obj_handle_t hstdout; /* handle for stdout */
241 obj_handle_t hstderr; /* handle for stderr */
242 @END
245 /* Retrieve the new process startup info */
246 @REQ(get_startup_info)
247 @REPLY
248 VARARG(info,startup_info); /* startup information */
249 @END
252 /* Signal the end of the process initialization */
253 @REQ(init_process_done)
254 void* module; /* main module base address */
255 size_t module_size; /* main module size */
256 void* entry; /* process entry point */
257 void* name; /* ptr to ptr to name (in process addr space) */
258 obj_handle_t exe_file; /* file handle for main exe */
259 int gui; /* is it a GUI process? */
260 VARARG(filename,unicode_str); /* file name of main exe */
261 @END
264 /* Initialize a thread; called from the child after fork()/clone() */
265 @REQ(init_thread)
266 int unix_pid; /* Unix pid of new thread */
267 int unix_tid; /* Unix tid of new thread */
268 void* teb; /* TEB of new thread (in thread address space) */
269 void* entry; /* thread entry point (in thread address space) */
270 int reply_fd; /* fd for reply pipe */
271 int wait_fd; /* fd for blocking calls pipe */
272 @REPLY
273 process_id_t pid; /* process id of the new thread's process */
274 thread_id_t tid; /* thread id of the new thread */
275 int boot; /* is this the boot thread? */
276 int version; /* protocol version */
277 @END
280 /* Terminate a process */
281 @REQ(terminate_process)
282 obj_handle_t handle; /* process handle to terminate */
283 int exit_code; /* process exit code */
284 @REPLY
285 int self; /* suicide? */
286 @END
289 /* Terminate a thread */
290 @REQ(terminate_thread)
291 obj_handle_t handle; /* thread handle to terminate */
292 int exit_code; /* thread exit code */
293 @REPLY
294 int self; /* suicide? */
295 int last; /* last thread in this process? */
296 @END
299 /* Retrieve information about a process */
300 @REQ(get_process_info)
301 obj_handle_t handle; /* process handle */
302 @REPLY
303 process_id_t pid; /* server process id */
304 int exit_code; /* process exit code */
305 int priority; /* priority class */
306 int process_affinity; /* process affinity mask */
307 int system_affinity; /* system affinity mask */
308 @END
311 /* Set a process informations */
312 @REQ(set_process_info)
313 obj_handle_t handle; /* process handle */
314 int mask; /* setting mask (see below) */
315 int priority; /* priority class */
316 int affinity; /* affinity mask */
317 @END
318 #define SET_PROCESS_INFO_PRIORITY 0x01
319 #define SET_PROCESS_INFO_AFFINITY 0x02
322 /* Retrieve information about a thread */
323 @REQ(get_thread_info)
324 obj_handle_t handle; /* thread handle */
325 thread_id_t tid_in; /* thread id (optional) */
326 @REPLY
327 process_id_t pid; /* server process id */
328 thread_id_t tid; /* server thread id */
329 void* teb; /* thread teb pointer */
330 int exit_code; /* thread exit code */
331 int priority; /* thread priority level */
332 int affinity; /* thread affinity mask */
333 time_t creation_time; /* thread creation time */
334 time_t exit_time; /* thread exit time */
335 @END
338 /* Set a thread informations */
339 @REQ(set_thread_info)
340 obj_handle_t handle; /* thread handle */
341 int mask; /* setting mask (see below) */
342 int priority; /* priority class */
343 int affinity; /* affinity mask */
344 @END
345 #define SET_THREAD_INFO_PRIORITY 0x01
346 #define SET_THREAD_INFO_AFFINITY 0x02
349 /* Retrieve information about a module */
350 @REQ(get_dll_info)
351 obj_handle_t handle; /* process handle */
352 void* base_address; /* base address of module */
353 @REPLY
354 size_t size; /* module size */
355 void* entry_point;
356 VARARG(filename,unicode_str); /* file name of module */
357 @END
360 /* Suspend a thread */
361 @REQ(suspend_thread)
362 obj_handle_t handle; /* thread handle */
363 @REPLY
364 int count; /* new suspend count */
365 @END
368 /* Resume a thread */
369 @REQ(resume_thread)
370 obj_handle_t handle; /* thread handle */
371 @REPLY
372 int count; /* new suspend count */
373 @END
376 /* Notify the server that a dll has been loaded */
377 @REQ(load_dll)
378 obj_handle_t handle; /* file handle */
379 void* base; /* base address */
380 size_t size; /* dll size */
381 int dbg_offset; /* debug info offset */
382 int dbg_size; /* debug info size */
383 void* name; /* ptr to ptr to name (in process addr space) */
384 VARARG(filename,unicode_str); /* file name of dll */
385 @END
388 /* Notify the server that a dll is being unloaded */
389 @REQ(unload_dll)
390 void* base; /* base address */
391 @END
394 /* Queue an APC for a thread */
395 @REQ(queue_apc)
396 obj_handle_t handle; /* thread handle */
397 int user; /* user or system apc? */
398 void* func; /* function to call */
399 void* arg1; /* params for function to call */
400 void* arg2;
401 void* arg3;
402 @END
405 /* Get next APC to call */
406 @REQ(get_apc)
407 int alertable; /* is thread alertable? */
408 @REPLY
409 void* func; /* function to call */
410 int type; /* function type */
411 void* arg1; /* function arguments */
412 void* arg2;
413 void* arg3;
414 @END
415 enum apc_type { APC_NONE, APC_USER, APC_TIMER, APC_ASYNC, APC_ASYNC_IO };
418 /* Close a handle for the current process */
419 @REQ(close_handle)
420 obj_handle_t handle; /* handle to close */
421 @REPLY
422 int fd; /* associated fd to close */
423 @END
426 /* Set a handle information */
427 @REQ(set_handle_info)
428 obj_handle_t handle; /* handle we are interested in */
429 int flags; /* new handle flags */
430 int mask; /* mask for flags to set */
431 int fd; /* file descriptor or -1 */
432 @REPLY
433 int old_flags; /* old flag value */
434 int cur_fd; /* current file descriptor */
435 @END
438 /* Duplicate a handle */
439 @REQ(dup_handle)
440 obj_handle_t src_process; /* src process handle */
441 obj_handle_t src_handle; /* src handle to duplicate */
442 obj_handle_t dst_process; /* dst process handle */
443 unsigned int access; /* wanted access rights */
444 int inherit; /* inherit flag */
445 int options; /* duplicate options (see below) */
446 @REPLY
447 obj_handle_t handle; /* duplicated handle in dst process */
448 int fd; /* associated fd to close */
449 @END
450 #define DUP_HANDLE_CLOSE_SOURCE DUPLICATE_CLOSE_SOURCE
451 #define DUP_HANDLE_SAME_ACCESS DUPLICATE_SAME_ACCESS
452 #define DUP_HANDLE_MAKE_GLOBAL 0x80000000 /* Not a Windows flag */
455 /* Open a handle to a process */
456 @REQ(open_process)
457 process_id_t pid; /* process id to open */
458 unsigned int access; /* wanted access rights */
459 int inherit; /* inherit flag */
460 @REPLY
461 obj_handle_t handle; /* handle to the process */
462 @END
465 /* Open a handle to a thread */
466 @REQ(open_thread)
467 thread_id_t tid; /* thread id to open */
468 unsigned int access; /* wanted access rights */
469 int inherit; /* inherit flag */
470 @REPLY
471 obj_handle_t handle; /* handle to the thread */
472 @END
475 /* Wait for handles */
476 @REQ(select)
477 int flags; /* wait flags (see below) */
478 void* cookie; /* magic cookie to return to client */
479 abs_time_t timeout; /* absolute timeout */
480 VARARG(handles,handles); /* handles to select on */
481 @END
482 #define SELECT_ALL 1
483 #define SELECT_ALERTABLE 2
484 #define SELECT_INTERRUPTIBLE 4
485 #define SELECT_TIMEOUT 8
488 /* Create an event */
489 @REQ(create_event)
490 int manual_reset; /* manual reset event */
491 int initial_state; /* initial state of the event */
492 int inherit; /* inherit flag */
493 VARARG(name,unicode_str); /* object name */
494 @REPLY
495 obj_handle_t handle; /* handle to the event */
496 @END
498 /* Event operation */
499 @REQ(event_op)
500 obj_handle_t handle; /* handle to event */
501 int op; /* event operation (see below) */
502 @END
503 enum event_op { PULSE_EVENT, SET_EVENT, RESET_EVENT };
506 /* Open an event */
507 @REQ(open_event)
508 unsigned int access; /* wanted access rights */
509 int inherit; /* inherit flag */
510 VARARG(name,unicode_str); /* object name */
511 @REPLY
512 obj_handle_t handle; /* handle to the event */
513 @END
516 /* Create a mutex */
517 @REQ(create_mutex)
518 int owned; /* initially owned? */
519 int inherit; /* inherit flag */
520 VARARG(name,unicode_str); /* object name */
521 @REPLY
522 obj_handle_t handle; /* handle to the mutex */
523 @END
526 /* Release a mutex */
527 @REQ(release_mutex)
528 obj_handle_t handle; /* handle to the mutex */
529 @END
532 /* Open a mutex */
533 @REQ(open_mutex)
534 unsigned int access; /* wanted access rights */
535 int inherit; /* inherit flag */
536 VARARG(name,unicode_str); /* object name */
537 @REPLY
538 obj_handle_t handle; /* handle to the mutex */
539 @END
542 /* Create a semaphore */
543 @REQ(create_semaphore)
544 unsigned int initial; /* initial count */
545 unsigned int max; /* maximum count */
546 int inherit; /* inherit flag */
547 VARARG(name,unicode_str); /* object name */
548 @REPLY
549 obj_handle_t handle; /* handle to the semaphore */
550 @END
553 /* Release a semaphore */
554 @REQ(release_semaphore)
555 obj_handle_t handle; /* handle to the semaphore */
556 unsigned int count; /* count to add to semaphore */
557 @REPLY
558 unsigned int prev_count; /* previous semaphore count */
559 @END
562 /* Open a semaphore */
563 @REQ(open_semaphore)
564 unsigned int access; /* wanted access rights */
565 int inherit; /* inherit flag */
566 VARARG(name,unicode_str); /* object name */
567 @REPLY
568 obj_handle_t handle; /* handle to the semaphore */
569 @END
572 /* Create a file */
573 @REQ(create_file)
574 unsigned int access; /* wanted access rights */
575 int inherit; /* inherit flag */
576 unsigned int sharing; /* sharing flags */
577 int create; /* file create action */
578 unsigned int options; /* file options */
579 unsigned int attrs; /* file attributes for creation */
580 VARARG(filename,string); /* file name */
581 @REPLY
582 obj_handle_t handle; /* handle to the file */
583 @END
586 /* Allocate a file handle for a Unix fd */
587 @REQ(alloc_file_handle)
588 unsigned int access; /* wanted access rights */
589 int inherit; /* inherit flag */
590 int fd; /* file descriptor on the client side */
591 @REPLY
592 obj_handle_t handle; /* handle to the file */
593 @END
596 /* Get a Unix fd to access a file */
597 @REQ(get_handle_fd)
598 obj_handle_t handle; /* handle to the file */
599 unsigned int access; /* wanted access rights */
600 @REPLY
601 int fd; /* file descriptor */
602 int type; /* the type of file (see below) */
603 int flags; /* file read/write flags (see below) */
604 @END
605 enum fd_type
607 FD_TYPE_INVALID,
608 FD_TYPE_DEFAULT,
609 FD_TYPE_SOCKET,
610 FD_TYPE_SMB
612 #define FD_FLAG_OVERLAPPED 0x01
613 #define FD_FLAG_TIMEOUT 0x02
614 #define FD_FLAG_RECV_SHUTDOWN 0x04
615 #define FD_FLAG_SEND_SHUTDOWN 0x08
618 /* Truncate (or extend) a file */
619 @REQ(truncate_file)
620 obj_handle_t handle; /* handle to the file */
621 @END
624 /* Flush a file buffers */
625 @REQ(flush_file)
626 obj_handle_t handle; /* handle to the file */
627 @REPLY
628 obj_handle_t event; /* event set when finished */
629 @END
632 /* Lock a region of a file */
633 @REQ(lock_file)
634 obj_handle_t handle; /* handle to the file */
635 unsigned int offset_low; /* offset of start of lock */
636 unsigned int offset_high; /* offset of start of lock */
637 unsigned int count_low; /* count of bytes to lock */
638 unsigned int count_high; /* count of bytes to lock */
639 int shared; /* shared or exclusive lock? */
640 int wait; /* do we want to wait? */
641 @REPLY
642 obj_handle_t handle; /* handle to wait on */
643 int overlapped; /* is it an overlapped I/O handle? */
644 @END
647 /* Unlock a region of a file */
648 @REQ(unlock_file)
649 obj_handle_t handle; /* handle to the file */
650 unsigned int offset_low; /* offset of start of unlock */
651 unsigned int offset_high; /* offset of start of unlock */
652 unsigned int count_low; /* count of bytes to unlock */
653 unsigned int count_high; /* count of bytes to unlock */
654 @END
657 /* Create a socket */
658 @REQ(create_socket)
659 unsigned int access; /* wanted access rights */
660 int inherit; /* inherit flag */
661 int family; /* family, see socket manpage */
662 int type; /* type, see socket manpage */
663 int protocol; /* protocol, see socket manpage */
664 unsigned int flags; /* socket flags */
665 @REPLY
666 obj_handle_t handle; /* handle to the new socket */
667 @END
670 /* Accept a socket */
671 @REQ(accept_socket)
672 obj_handle_t lhandle; /* handle to the listening socket */
673 unsigned int access; /* wanted access rights */
674 int inherit; /* inherit flag */
675 @REPLY
676 obj_handle_t handle; /* handle to the new socket */
677 @END
680 /* Set socket event parameters */
681 @REQ(set_socket_event)
682 obj_handle_t handle; /* handle to the socket */
683 unsigned int mask; /* event mask */
684 obj_handle_t event; /* event object */
685 user_handle_t window; /* window to send the message to */
686 unsigned int msg; /* message to send */
687 @END
690 /* Get socket event parameters */
691 @REQ(get_socket_event)
692 obj_handle_t handle; /* handle to the socket */
693 int service; /* clear pending? */
694 obj_handle_t c_event; /* event to clear */
695 @REPLY
696 unsigned int mask; /* event mask */
697 unsigned int pmask; /* pending events */
698 unsigned int state; /* status bits */
699 VARARG(errors,ints); /* event errors */
700 @END
703 /* Reenable pending socket events */
704 @REQ(enable_socket_event)
705 obj_handle_t handle; /* handle to the socket */
706 unsigned int mask; /* events to re-enable */
707 unsigned int sstate; /* status bits to set */
708 unsigned int cstate; /* status bits to clear */
709 @END
711 @REQ(set_socket_deferred)
712 obj_handle_t handle; /* handle to the socket */
713 obj_handle_t deferred; /* handle to the socket for which accept() is deferred */
714 @END
716 /* Allocate a console (only used by a console renderer) */
717 @REQ(alloc_console)
718 unsigned int access; /* wanted access rights */
719 int inherit; /* inherit flag */
720 process_id_t pid; /* pid of process which shall be attached to the console */
721 @REPLY
722 obj_handle_t handle_in; /* handle to console input */
723 obj_handle_t event; /* handle to renderer events change notification */
724 @END
727 /* Free the console of the current process */
728 @REQ(free_console)
729 @END
732 #define CONSOLE_RENDERER_NONE_EVENT 0x00
733 #define CONSOLE_RENDERER_TITLE_EVENT 0x01
734 #define CONSOLE_RENDERER_ACTIVE_SB_EVENT 0x02
735 #define CONSOLE_RENDERER_SB_RESIZE_EVENT 0x03
736 #define CONSOLE_RENDERER_UPDATE_EVENT 0x04
737 #define CONSOLE_RENDERER_CURSOR_POS_EVENT 0x05
738 #define CONSOLE_RENDERER_CURSOR_GEOM_EVENT 0x06
739 #define CONSOLE_RENDERER_DISPLAY_EVENT 0x07
740 #define CONSOLE_RENDERER_EXIT_EVENT 0x08
741 struct console_renderer_event
743 short event;
744 union
746 struct update
748 short top;
749 short bottom;
750 } update;
751 struct resize
753 short width;
754 short height;
755 } resize;
756 struct cursor_pos
758 short x;
759 short y;
760 } cursor_pos;
761 struct cursor_geom
763 short visible;
764 short size;
765 } cursor_geom;
766 struct display
768 short left;
769 short top;
770 short width;
771 short height;
772 } display;
773 } u;
776 /* retrieve console events for the renderer */
777 @REQ(get_console_renderer_events)
778 obj_handle_t handle; /* handle to console input events */
779 @REPLY
780 VARARG(data,bytes); /* the various console_renderer_events */
781 @END
784 /* Open a handle to the process console */
785 @REQ(open_console)
786 int from; /* 0 (resp 1) input (resp output) of current process console */
787 /* otherwise console_in handle to get active screen buffer? */
788 unsigned int access; /* wanted access rights */
789 int inherit; /* inherit flag */
790 int share; /* share mask (only for output handles) */
791 @REPLY
792 obj_handle_t handle; /* handle to the console */
793 @END
796 /* Get the input queue wait event */
797 @REQ(get_console_wait_event)
798 @REPLY
799 obj_handle_t handle;
800 @END
802 /* Get a console mode (input or output) */
803 @REQ(get_console_mode)
804 obj_handle_t handle; /* handle to the console */
805 @REPLY
806 int mode; /* console mode */
807 @END
810 /* Set a console mode (input or output) */
811 @REQ(set_console_mode)
812 obj_handle_t handle; /* handle to the console */
813 int mode; /* console mode */
814 @END
817 /* Set info about a console (input only) */
818 @REQ(set_console_input_info)
819 obj_handle_t handle; /* handle to console input, or 0 for process' console */
820 int mask; /* setting mask (see below) */
821 obj_handle_t active_sb; /* active screen buffer */
822 int history_mode; /* whether we duplicate lines in history */
823 int history_size; /* number of lines in history */
824 int edition_mode; /* index to the edition mode flavors */
825 VARARG(title,unicode_str); /* console title */
826 @END
827 #define SET_CONSOLE_INPUT_INFO_ACTIVE_SB 0x01
828 #define SET_CONSOLE_INPUT_INFO_TITLE 0x02
829 #define SET_CONSOLE_INPUT_INFO_HISTORY_MODE 0x04
830 #define SET_CONSOLE_INPUT_INFO_HISTORY_SIZE 0x08
831 #define SET_CONSOLE_INPUT_INFO_EDITION_MODE 0x10
834 /* Get info about a console (input only) */
835 @REQ(get_console_input_info)
836 obj_handle_t handle; /* handle to console input, or 0 for process' console */
837 @REPLY
838 int history_mode; /* whether we duplicate lines in history */
839 int history_size; /* number of lines in history */
840 int history_index; /* number of used lines in history */
841 int edition_mode; /* index to the edition mode flavors */
842 VARARG(title,unicode_str); /* console title */
843 @END
846 /* appends a string to console's history */
847 @REQ(append_console_input_history)
848 obj_handle_t handle; /* handle to console input, or 0 for process' console */
849 VARARG(line,unicode_str); /* line to add */
850 @END
853 /* appends a string to console's history */
854 @REQ(get_console_input_history)
855 obj_handle_t handle; /* handle to console input, or 0 for process' console */
856 int index; /* index to get line from */
857 @REPLY
858 int total; /* total length of line in Unicode chars */
859 VARARG(line,unicode_str); /* line to add */
860 @END
863 /* creates a new screen buffer on process' console */
864 @REQ(create_console_output)
865 obj_handle_t handle_in; /* handle to console input, or 0 for process' console */
866 int access; /* wanted access rights */
867 int share; /* sharing credentials */
868 int inherit; /* inherit flag */
869 @REPLY
870 obj_handle_t handle_out; /* handle to the screen buffer */
871 @END
874 /* Set info about a console (output only) */
875 @REQ(set_console_output_info)
876 obj_handle_t handle; /* handle to the console */
877 int mask; /* setting mask (see below) */
878 short int cursor_size; /* size of cursor (percentage filled) */
879 short int cursor_visible;/* cursor visibility flag */
880 short int cursor_x; /* position of cursor (x, y) */
881 short int cursor_y;
882 short int width; /* width of the screen buffer */
883 short int height; /* height of the screen buffer */
884 short int attr; /* default attribute */
885 short int win_left; /* window actually displayed by renderer */
886 short int win_top; /* the rect area is expressed withing the */
887 short int win_right; /* boundaries of the screen buffer */
888 short int win_bottom;
889 short int max_width; /* maximum size (width x height) for the window */
890 short int max_height;
891 @END
892 #define SET_CONSOLE_OUTPUT_INFO_CURSOR_GEOM 0x01
893 #define SET_CONSOLE_OUTPUT_INFO_CURSOR_POS 0x02
894 #define SET_CONSOLE_OUTPUT_INFO_SIZE 0x04
895 #define SET_CONSOLE_OUTPUT_INFO_ATTR 0x08
896 #define SET_CONSOLE_OUTPUT_INFO_DISPLAY_WINDOW 0x10
897 #define SET_CONSOLE_OUTPUT_INFO_MAX_SIZE 0x20
900 /* Get info about a console (output only) */
901 @REQ(get_console_output_info)
902 obj_handle_t handle; /* handle to the console */
903 @REPLY
904 short int cursor_size; /* size of cursor (percentage filled) */
905 short int cursor_visible;/* cursor visibility flag */
906 short int cursor_x; /* position of cursor (x, y) */
907 short int cursor_y;
908 short int width; /* width of the screen buffer */
909 short int height; /* height of the screen buffer */
910 short int attr; /* default attribute */
911 short int win_left; /* window actually displayed by renderer */
912 short int win_top; /* the rect area is expressed withing the */
913 short int win_right; /* boundaries of the screen buffer */
914 short int win_bottom;
915 short int max_width; /* maximum size (width x height) for the window */
916 short int max_height;
917 @END
919 /* Add input records to a console input queue */
920 @REQ(write_console_input)
921 obj_handle_t handle; /* handle to the console input */
922 VARARG(rec,input_records); /* input records */
923 @REPLY
924 int written; /* number of records written */
925 @END
928 /* Fetch input records from a console input queue */
929 @REQ(read_console_input)
930 obj_handle_t handle; /* handle to the console input */
931 int flush; /* flush the retrieved records from the queue? */
932 @REPLY
933 int read; /* number of records read */
934 VARARG(rec,input_records); /* input records */
935 @END
938 /* write data (chars and/or attributes) in a screen buffer */
939 @REQ(write_console_output)
940 obj_handle_t handle; /* handle to the console output */
941 int x; /* position where to start writing */
942 int y;
943 int mode; /* char info (see below) */
944 int wrap; /* wrap around at end of line? */
945 VARARG(data,bytes); /* info to write */
946 @REPLY
947 int written; /* number of char infos actually written */
948 int width; /* width of screen buffer */
949 int height; /* height of screen buffer */
950 @END
951 enum char_info_mode
953 CHAR_INFO_MODE_TEXT, /* characters only */
954 CHAR_INFO_MODE_ATTR, /* attributes only */
955 CHAR_INFO_MODE_TEXTATTR, /* both characters and attributes */
956 CHAR_INFO_MODE_TEXTSTDATTR /* characters but use standard attributes */
960 /* fill a screen buffer with constant data (chars and/or attributes) */
961 @REQ(fill_console_output)
962 obj_handle_t handle; /* handle to the console output */
963 int x; /* position where to start writing */
964 int y;
965 int mode; /* char info mode */
966 int count; /* number to write */
967 int wrap; /* wrap around at end of line? */
968 char_info_t data; /* data to write */
969 @REPLY
970 int written; /* number of char infos actually written */
971 @END
974 /* read data (chars and/or attributes) from a screen buffer */
975 @REQ(read_console_output)
976 obj_handle_t handle; /* handle to the console output */
977 int x; /* position (x,y) where to start reading */
978 int y;
979 int mode; /* char info mode */
980 int wrap; /* wrap around at end of line? */
981 @REPLY
982 int width; /* width of screen buffer */
983 int height; /* height of screen buffer */
984 VARARG(data,bytes);
985 @END
988 /* move a rect (of data) in screen buffer content */
989 @REQ(move_console_output)
990 obj_handle_t handle; /* handle to the console output */
991 short int x_src; /* position (x, y) of rect to start moving from */
992 short int y_src;
993 short int x_dst; /* position (x, y) of rect to move to */
994 short int y_dst;
995 short int w; /* size of the rect (width, height) to move */
996 short int h;
997 @END
1000 /* Sends a signal to a process group */
1001 @REQ(send_console_signal)
1002 int signal; /* the signal to send */
1003 process_id_t group_id; /* the group to send the signal to */
1004 @END
1007 /* Create a change notification */
1008 @REQ(create_change_notification)
1009 obj_handle_t handle; /* handle to the directory */
1010 int subtree; /* watch all the subtree */
1011 unsigned int filter; /* notification filter */
1012 @REPLY
1013 obj_handle_t handle; /* handle to the change notification */
1014 @END
1017 /* Move to the next change notification */
1018 @REQ(next_change_notification)
1019 obj_handle_t handle; /* handle to the change notification */
1020 @END
1022 /* Create a file mapping */
1023 @REQ(create_mapping)
1024 int size_high; /* mapping size */
1025 int size_low; /* mapping size */
1026 int protect; /* protection flags (see below) */
1027 unsigned int access; /* wanted access rights */
1028 int inherit; /* inherit flag */
1029 obj_handle_t file_handle; /* file handle */
1030 VARARG(name,unicode_str); /* object name */
1031 @REPLY
1032 obj_handle_t handle; /* handle to the mapping */
1033 @END
1034 /* protection flags */
1035 #define VPROT_READ 0x01
1036 #define VPROT_WRITE 0x02
1037 #define VPROT_EXEC 0x04
1038 #define VPROT_WRITECOPY 0x08
1039 #define VPROT_GUARD 0x10
1040 #define VPROT_NOCACHE 0x20
1041 #define VPROT_COMMITTED 0x40
1042 #define VPROT_IMAGE 0x80
1045 /* Open a mapping */
1046 @REQ(open_mapping)
1047 unsigned int access; /* wanted access rights */
1048 int inherit; /* inherit flag */
1049 VARARG(name,unicode_str); /* object name */
1050 @REPLY
1051 obj_handle_t handle; /* handle to the mapping */
1052 @END
1055 /* Get information about a file mapping */
1056 @REQ(get_mapping_info)
1057 obj_handle_t handle; /* handle to the mapping */
1058 @REPLY
1059 int size_high; /* mapping size */
1060 int size_low; /* mapping size */
1061 int protect; /* protection flags */
1062 int header_size; /* header size (for VPROT_IMAGE mapping) */
1063 void* base; /* default base addr (for VPROT_IMAGE mapping) */
1064 obj_handle_t shared_file; /* shared mapping file handle */
1065 int shared_size; /* shared mapping size */
1066 @END
1069 #define SNAP_HEAPLIST 0x00000001
1070 #define SNAP_PROCESS 0x00000002
1071 #define SNAP_THREAD 0x00000004
1072 #define SNAP_MODULE 0x00000008
1073 /* Create a snapshot */
1074 @REQ(create_snapshot)
1075 int inherit; /* inherit flag */
1076 int flags; /* snapshot flags (SNAP_*) */
1077 process_id_t pid; /* process id */
1078 @REPLY
1079 obj_handle_t handle; /* handle to the snapshot */
1080 @END
1083 /* Get the next process from a snapshot */
1084 @REQ(next_process)
1085 obj_handle_t handle; /* handle to the snapshot */
1086 int reset; /* reset snapshot position? */
1087 @REPLY
1088 int count; /* process usage count */
1089 process_id_t pid; /* process id */
1090 process_id_t ppid; /* parent process id */
1091 void* heap; /* heap base */
1092 void* module; /* main module */
1093 int threads; /* number of threads */
1094 int priority; /* process priority */
1095 int handles; /* number of handles */
1096 VARARG(filename,unicode_str); /* file name of main exe */
1097 @END
1100 /* Get the next thread from a snapshot */
1101 @REQ(next_thread)
1102 obj_handle_t handle; /* handle to the snapshot */
1103 int reset; /* reset snapshot position? */
1104 @REPLY
1105 int count; /* thread usage count */
1106 process_id_t pid; /* process id */
1107 thread_id_t tid; /* thread id */
1108 int base_pri; /* base priority */
1109 int delta_pri; /* delta priority */
1110 @END
1113 /* Get the next module from a snapshot */
1114 @REQ(next_module)
1115 obj_handle_t handle; /* handle to the snapshot */
1116 int reset; /* reset snapshot position? */
1117 @REPLY
1118 process_id_t pid; /* process id */
1119 void* base; /* module base address */
1120 size_t size; /* module size */
1121 VARARG(filename,unicode_str); /* file name of module */
1122 @END
1125 /* Wait for a debug event */
1126 @REQ(wait_debug_event)
1127 int get_handle; /* should we alloc a handle for waiting? */
1128 @REPLY
1129 process_id_t pid; /* process id */
1130 thread_id_t tid; /* thread id */
1131 obj_handle_t wait; /* wait handle if no event ready */
1132 VARARG(event,debug_event); /* debug event data */
1133 @END
1136 /* Queue an exception event */
1137 @REQ(queue_exception_event)
1138 int first; /* first chance exception? */
1139 VARARG(record,exc_event); /* thread context followed by exception record */
1140 @REPLY
1141 obj_handle_t handle; /* handle to the queued event */
1142 @END
1145 /* Retrieve the status of an exception event */
1146 @REQ(get_exception_status)
1147 obj_handle_t handle; /* handle to the queued event */
1148 @REPLY
1149 int status; /* event continuation status */
1150 VARARG(context,context); /* modified thread context */
1151 @END
1154 /* Send an output string to the debugger */
1155 @REQ(output_debug_string)
1156 void* string; /* string to display (in debugged process address space) */
1157 int unicode; /* is it Unicode? */
1158 int length; /* string length */
1159 @END
1162 /* Continue a debug event */
1163 @REQ(continue_debug_event)
1164 process_id_t pid; /* process id to continue */
1165 thread_id_t tid; /* thread id to continue */
1166 int status; /* continuation status */
1167 @END
1170 /* Start/stop debugging an existing process */
1171 @REQ(debug_process)
1172 process_id_t pid; /* id of the process to debug */
1173 int attach; /* 1=attaching / 0=detaching from the process */
1174 @END
1177 /* Simulate a breakpoint in a process */
1178 @REQ(debug_break)
1179 obj_handle_t handle; /* process handle */
1180 @REPLY
1181 int self; /* was it the caller itself? */
1182 @END
1185 /* Set debugger kill on exit flag */
1186 @REQ(set_debugger_kill_on_exit)
1187 int kill_on_exit; /* 0=detach/1=kill debuggee when debugger dies */
1188 @END
1191 /* Read data from a process address space */
1192 @REQ(read_process_memory)
1193 obj_handle_t handle; /* process handle */
1194 void* addr; /* addr to read from */
1195 @REPLY
1196 VARARG(data,bytes); /* result data */
1197 @END
1200 /* Write data to a process address space */
1201 @REQ(write_process_memory)
1202 obj_handle_t handle; /* process handle */
1203 void* addr; /* addr to write to (must be int-aligned) */
1204 unsigned int first_mask; /* mask for first word */
1205 unsigned int last_mask; /* mask for last word */
1206 VARARG(data,bytes); /* data to write */
1207 @END
1210 /* Create a registry key */
1211 @REQ(create_key)
1212 obj_handle_t parent; /* handle to the parent key */
1213 unsigned int access; /* desired access rights */
1214 unsigned int options; /* creation options */
1215 time_t modif; /* last modification time */
1216 size_t namelen; /* length of key name in bytes */
1217 VARARG(name,unicode_str,namelen); /* key name */
1218 VARARG(class,unicode_str); /* class name */
1219 @REPLY
1220 obj_handle_t hkey; /* handle to the created key */
1221 int created; /* has it been newly created? */
1222 @END
1224 /* Open a registry key */
1225 @REQ(open_key)
1226 obj_handle_t parent; /* handle to the parent key */
1227 unsigned int access; /* desired access rights */
1228 VARARG(name,unicode_str); /* key name */
1229 @REPLY
1230 obj_handle_t hkey; /* handle to the open key */
1231 @END
1234 /* Delete a registry key */
1235 @REQ(delete_key)
1236 obj_handle_t hkey; /* handle to the key */
1237 @END
1240 /* Flush a registry key */
1241 @REQ(flush_key)
1242 obj_handle_t hkey; /* handle to the key */
1243 @END
1246 /* Enumerate registry subkeys */
1247 @REQ(enum_key)
1248 obj_handle_t hkey; /* handle to registry key */
1249 int index; /* index of subkey (or -1 for current key) */
1250 int info_class; /* requested information class */
1251 @REPLY
1252 int subkeys; /* number of subkeys */
1253 int max_subkey; /* longest subkey name */
1254 int max_class; /* longest class name */
1255 int values; /* number of values */
1256 int max_value; /* longest value name */
1257 int max_data; /* longest value data */
1258 time_t modif; /* last modification time */
1259 size_t total; /* total length needed for full name and class */
1260 size_t namelen; /* length of key name in bytes */
1261 VARARG(name,unicode_str,namelen); /* key name */
1262 VARARG(class,unicode_str); /* class name */
1263 @END
1266 /* Set a value of a registry key */
1267 @REQ(set_key_value)
1268 obj_handle_t hkey; /* handle to registry key */
1269 int type; /* value type */
1270 size_t namelen; /* length of value name in bytes */
1271 VARARG(name,unicode_str,namelen); /* value name */
1272 VARARG(data,bytes); /* value data */
1273 @END
1276 /* Retrieve the value of a registry key */
1277 @REQ(get_key_value)
1278 obj_handle_t hkey; /* handle to registry key */
1279 VARARG(name,unicode_str); /* value name */
1280 @REPLY
1281 int type; /* value type */
1282 size_t total; /* total length needed for data */
1283 VARARG(data,bytes); /* value data */
1284 @END
1287 /* Enumerate a value of a registry key */
1288 @REQ(enum_key_value)
1289 obj_handle_t hkey; /* handle to registry key */
1290 int index; /* value index */
1291 int info_class; /* requested information class */
1292 @REPLY
1293 int type; /* value type */
1294 size_t total; /* total length needed for full name and data */
1295 size_t namelen; /* length of value name in bytes */
1296 VARARG(name,unicode_str,namelen); /* value name */
1297 VARARG(data,bytes); /* value data */
1298 @END
1301 /* Delete a value of a registry key */
1302 @REQ(delete_key_value)
1303 obj_handle_t hkey; /* handle to registry key */
1304 VARARG(name,unicode_str); /* value name */
1305 @END
1308 /* Load a registry branch from a file */
1309 @REQ(load_registry)
1310 obj_handle_t hkey; /* root key to load to */
1311 obj_handle_t file; /* file to load from */
1312 VARARG(name,unicode_str); /* subkey name */
1313 @END
1316 /* UnLoad a registry branch from a file */
1317 @REQ(unload_registry)
1318 obj_handle_t hkey; /* root key to unload to */
1319 @END
1322 /* Save a registry branch to a file */
1323 @REQ(save_registry)
1324 obj_handle_t hkey; /* key to save */
1325 obj_handle_t file; /* file to save to */
1326 @END
1329 /* Save a registry branch at server exit */
1330 @REQ(save_registry_atexit)
1331 obj_handle_t hkey; /* key to save */
1332 VARARG(file,string); /* file to save to */
1333 @END
1336 /* Set the current and saving level for the registry */
1337 @REQ(set_registry_levels)
1338 int current; /* new current level */
1339 int saving; /* new saving level */
1340 int period; /* duration between periodic saves (milliseconds) */
1341 @END
1344 @REQ(set_registry_notification)
1345 obj_handle_t hkey; /* key to watch for changes */
1346 obj_handle_t event; /* event to set */
1347 int subtree; /* should we watch the whole subtree? */
1348 unsigned int filter; /* things to watch */
1349 @END
1352 /* Create a waitable timer */
1353 @REQ(create_timer)
1354 int inherit; /* inherit flag */
1355 int manual; /* manual reset */
1356 VARARG(name,unicode_str); /* object name */
1357 @REPLY
1358 obj_handle_t handle; /* handle to the timer */
1359 @END
1362 /* Open a waitable timer */
1363 @REQ(open_timer)
1364 unsigned int access; /* wanted access rights */
1365 int inherit; /* inherit flag */
1366 VARARG(name,unicode_str); /* object name */
1367 @REPLY
1368 obj_handle_t handle; /* handle to the timer */
1369 @END
1371 /* Set a waitable timer */
1372 @REQ(set_timer)
1373 obj_handle_t handle; /* handle to the timer */
1374 abs_time_t expire; /* next expiration absolute time */
1375 int period; /* timer period in ms */
1376 void* callback; /* callback function */
1377 void* arg; /* callback argument */
1378 @REPLY
1379 int signaled; /* was the timer signaled before this call ? */
1380 @END
1382 /* Cancel a waitable timer */
1383 @REQ(cancel_timer)
1384 obj_handle_t handle; /* handle to the timer */
1385 @REPLY
1386 int signaled; /* was the timer signaled before this calltime ? */
1387 @END
1390 /* Retrieve the current context of a thread */
1391 @REQ(get_thread_context)
1392 obj_handle_t handle; /* thread handle */
1393 unsigned int flags; /* context flags */
1394 @REPLY
1395 VARARG(context,context); /* thread context */
1396 @END
1399 /* Set the current context of a thread */
1400 @REQ(set_thread_context)
1401 obj_handle_t handle; /* thread handle */
1402 unsigned int flags; /* context flags */
1403 VARARG(context,context); /* thread context */
1404 @END
1407 /* Fetch a selector entry for a thread */
1408 @REQ(get_selector_entry)
1409 obj_handle_t handle; /* thread handle */
1410 int entry; /* LDT entry */
1411 @REPLY
1412 unsigned int base; /* selector base */
1413 unsigned int limit; /* selector limit */
1414 unsigned char flags; /* selector flags */
1415 @END
1418 /* Add an atom */
1419 @REQ(add_atom)
1420 int local; /* is atom in local process table? */
1421 VARARG(name,unicode_str); /* atom name */
1422 @REPLY
1423 atom_t atom; /* resulting atom */
1424 @END
1427 /* Delete an atom */
1428 @REQ(delete_atom)
1429 atom_t atom; /* atom handle */
1430 int local; /* is atom in local process table? */
1431 @END
1434 /* Find an atom */
1435 @REQ(find_atom)
1436 int local; /* is atom in local process table? */
1437 VARARG(name,unicode_str); /* atom name */
1438 @REPLY
1439 atom_t atom; /* atom handle */
1440 @END
1443 /* Get an atom name */
1444 @REQ(get_atom_name)
1445 atom_t atom; /* atom handle */
1446 int local; /* is atom in local process table? */
1447 @REPLY
1448 int count; /* atom lock count */
1449 VARARG(name,unicode_str); /* atom name */
1450 @END
1453 /* Init the process atom table */
1454 @REQ(init_atom_table)
1455 int entries; /* number of entries */
1456 @END
1459 /* Get the message queue of the current thread */
1460 @REQ(get_msg_queue)
1461 @REPLY
1462 obj_handle_t handle; /* handle to the queue */
1463 @END
1466 /* Set the current message queue wakeup mask */
1467 @REQ(set_queue_mask)
1468 unsigned int wake_mask; /* wakeup bits mask */
1469 unsigned int changed_mask; /* changed bits mask */
1470 int skip_wait; /* will we skip waiting if signaled? */
1471 @REPLY
1472 unsigned int wake_bits; /* current wake bits */
1473 unsigned int changed_bits; /* current changed bits */
1474 @END
1477 /* Get the current message queue status */
1478 @REQ(get_queue_status)
1479 int clear; /* should we clear the change bits? */
1480 @REPLY
1481 unsigned int wake_bits; /* wake bits */
1482 unsigned int changed_bits; /* changed bits since last time */
1483 @END
1486 /* Wait for a process to start waiting on input */
1487 @REQ(wait_input_idle)
1488 obj_handle_t handle; /* process handle */
1489 int timeout; /* timeout */
1490 @REPLY
1491 obj_handle_t event; /* handle to idle event */
1492 @END
1495 /* Send a message to a thread queue */
1496 @REQ(send_message)
1497 thread_id_t id; /* thread id */
1498 int type; /* message type (see below) */
1499 int flags; /* message flags (see below) */
1500 user_handle_t win; /* window handle */
1501 unsigned int msg; /* message code */
1502 unsigned int wparam; /* parameters */
1503 unsigned int lparam; /* parameters */
1504 int x; /* x position */
1505 int y; /* y position */
1506 unsigned int time; /* message time */
1507 unsigned int info; /* extra info */
1508 int timeout; /* timeout for reply */
1509 void* callback; /* callback address */
1510 VARARG(data,bytes); /* message data for sent messages */
1511 @END
1513 enum message_type
1515 MSG_ASCII, /* Ascii message (from SendMessageA) */
1516 MSG_UNICODE, /* Unicode message (from SendMessageW) */
1517 MSG_NOTIFY, /* notify message (from SendNotifyMessageW), always Unicode */
1518 MSG_CALLBACK, /* callback message (from SendMessageCallbackW), always Unicode */
1519 MSG_CALLBACK_RESULT,/* result of a callback message */
1520 MSG_OTHER_PROCESS, /* sent from other process, may include vararg data, always Unicode */
1521 MSG_POSTED, /* posted message (from PostMessageW), always Unicode */
1522 MSG_HARDWARE /* hardware message */
1524 #define SEND_MSG_ABORT_IF_HUNG 0x01
1527 /* Get a message from the current queue */
1528 @REQ(get_message)
1529 int flags; /* see below */
1530 user_handle_t get_win; /* window handle to get */
1531 unsigned int get_first; /* first message code to get */
1532 unsigned int get_last; /* last message code to get */
1533 @REPLY
1534 int type; /* message type */
1535 user_handle_t win; /* window handle */
1536 unsigned int msg; /* message code */
1537 unsigned int wparam; /* parameters (callback function for MSG_CALLBACK_RESULT) */
1538 unsigned int lparam; /* parameters (result for MSG_CALLBACK_RESULT) */
1539 int x; /* x position */
1540 int y; /* y position */
1541 unsigned int time; /* message time */
1542 unsigned int info; /* extra info (callback argument for MSG_CALLBACK_RESULT) */
1543 size_t total; /* total size of extra data */
1544 VARARG(data,bytes); /* message data for sent messages */
1545 @END
1546 #define GET_MSG_REMOVE 1 /* remove the message */
1547 #define GET_MSG_SENT_ONLY 2 /* only get sent messages */
1549 /* Reply to a sent message */
1550 @REQ(reply_message)
1551 int type; /* type of original message */
1552 unsigned int result; /* message result */
1553 int remove; /* should we remove the message? */
1554 VARARG(data,bytes); /* message data for sent messages */
1555 @END
1558 /* Retrieve the reply for the last message sent */
1559 @REQ(get_message_reply)
1560 int cancel; /* cancel message if not ready? */
1561 @REPLY
1562 unsigned int result; /* message result */
1563 VARARG(data,bytes); /* message data for sent messages */
1564 @END
1567 /* Set a window timer */
1568 @REQ(set_win_timer)
1569 user_handle_t win; /* window handle */
1570 unsigned int msg; /* message to post */
1571 unsigned int id; /* timer id */
1572 unsigned int rate; /* timer rate in ms */
1573 unsigned int lparam; /* message lparam (callback proc) */
1574 @END
1577 /* Kill a window timer */
1578 @REQ(kill_win_timer)
1579 user_handle_t win; /* window handle */
1580 unsigned int msg; /* message to post */
1581 unsigned int id; /* timer id */
1582 @END
1585 /* Retrieve info about a serial port */
1586 @REQ(get_serial_info)
1587 obj_handle_t handle; /* handle to comm port */
1588 @REPLY
1589 unsigned int readinterval;
1590 unsigned int readconst;
1591 unsigned int readmult;
1592 unsigned int writeconst;
1593 unsigned int writemult;
1594 unsigned int eventmask;
1595 unsigned int commerror;
1596 @END
1599 /* Set info about a serial port */
1600 @REQ(set_serial_info)
1601 obj_handle_t handle; /* handle to comm port */
1602 int flags; /* bitmask to set values (see below) */
1603 unsigned int readinterval;
1604 unsigned int readconst;
1605 unsigned int readmult;
1606 unsigned int writeconst;
1607 unsigned int writemult;
1608 unsigned int eventmask;
1609 unsigned int commerror;
1610 @END
1611 #define SERIALINFO_SET_TIMEOUTS 0x01
1612 #define SERIALINFO_SET_MASK 0x02
1613 #define SERIALINFO_SET_ERROR 0x04
1616 /* Create / reschedule an async I/O */
1617 @REQ(register_async)
1618 obj_handle_t handle; /* handle to comm port, socket or file */
1619 int type;
1620 void* overlapped;
1621 int count;
1622 unsigned int status;
1623 @END
1624 #define ASYNC_TYPE_NONE 0x00
1625 #define ASYNC_TYPE_READ 0x01
1626 #define ASYNC_TYPE_WRITE 0x02
1627 #define ASYNC_TYPE_WAIT 0x03
1630 /* Create a named pipe */
1631 @REQ(create_named_pipe)
1632 unsigned int openmode;
1633 unsigned int pipemode;
1634 unsigned int maxinstances;
1635 unsigned int outsize;
1636 unsigned int insize;
1637 unsigned int timeout;
1638 int inherit; /* inherit flag */
1639 VARARG(name,unicode_str); /* pipe name */
1640 @REPLY
1641 obj_handle_t handle; /* handle to the pipe */
1642 @END
1645 /* Open an existing named pipe */
1646 @REQ(open_named_pipe)
1647 unsigned int access;
1648 int inherit; /* inherit flag */
1649 VARARG(name,unicode_str); /* pipe name */
1650 @REPLY
1651 obj_handle_t handle; /* handle to the pipe */
1652 @END
1655 /* Connect to a named pipe */
1656 @REQ(connect_named_pipe)
1657 obj_handle_t handle;
1658 void* overlapped;
1659 void* func;
1660 @END
1663 /* Wait for a named pipe */
1664 @REQ(wait_named_pipe)
1665 unsigned int timeout;
1666 void* overlapped;
1667 void* func;
1668 VARARG(name,unicode_str); /* pipe name */
1669 @END
1672 /* Disconnect a named pipe */
1673 @REQ(disconnect_named_pipe)
1674 obj_handle_t handle;
1675 @REPLY
1676 int fd; /* associated fd to close */
1677 @END
1680 @REQ(get_named_pipe_info)
1681 obj_handle_t handle;
1682 @REPLY
1683 unsigned int flags;
1684 unsigned int maxinstances;
1685 unsigned int outsize;
1686 unsigned int insize;
1687 @END
1690 @REQ(create_smb)
1691 int fd;
1692 unsigned int tree_id;
1693 unsigned int user_id;
1694 unsigned int file_id;
1695 unsigned int dialect;
1696 @REPLY
1697 obj_handle_t handle;
1698 @END
1701 @REQ(get_smb_info)
1702 obj_handle_t handle;
1703 unsigned int flags;
1704 unsigned int offset;
1705 @REPLY
1706 unsigned int tree_id;
1707 unsigned int user_id;
1708 unsigned int dialect;
1709 unsigned int file_id;
1710 unsigned int offset;
1711 @END
1712 #define SMBINFO_SET_OFFSET 0x01
1715 /* Create a window */
1716 @REQ(create_window)
1717 user_handle_t parent; /* parent window */
1718 user_handle_t owner; /* owner window */
1719 atom_t atom; /* class atom */
1720 void* instance; /* module instance */
1721 @REPLY
1722 user_handle_t handle; /* created window */
1723 int extra; /* number of extra bytes */
1724 void* class_ptr; /* pointer to class in client address space */
1725 @END
1728 /* Link a window into the tree */
1729 @REQ(link_window)
1730 user_handle_t handle; /* handle to the window */
1731 user_handle_t parent; /* handle to the parent */
1732 user_handle_t previous; /* previous child in Z-order */
1733 @REPLY
1734 user_handle_t full_parent; /* full handle of new parent */
1735 @END
1738 /* Destroy a window */
1739 @REQ(destroy_window)
1740 user_handle_t handle; /* handle to the window */
1741 @END
1744 /* Set a window owner */
1745 @REQ(set_window_owner)
1746 user_handle_t handle; /* handle to the window */
1747 user_handle_t owner; /* new owner */
1748 @REPLY
1749 user_handle_t full_owner; /* full handle of new owner */
1750 user_handle_t prev_owner; /* full handle of previous owner */
1751 @END
1754 /* Get information from a window handle */
1755 @REQ(get_window_info)
1756 user_handle_t handle; /* handle to the window */
1757 @REPLY
1758 user_handle_t full_handle; /* full 32-bit handle */
1759 user_handle_t last_active; /* last active popup */
1760 process_id_t pid; /* process owning the window */
1761 thread_id_t tid; /* thread owning the window */
1762 atom_t atom; /* class atom */
1763 @END
1766 /* Set some information in a window */
1767 @REQ(set_window_info)
1768 user_handle_t handle; /* handle to the window */
1769 unsigned int flags; /* flags for fields to set (see below) */
1770 unsigned int style; /* window style */
1771 unsigned int ex_style; /* window extended style */
1772 unsigned int id; /* window id */
1773 void* instance; /* creator instance */
1774 void* user_data; /* user-specific data */
1775 int extra_offset; /* offset to set in extra bytes */
1776 size_t extra_size; /* size to set in extra bytes */
1777 unsigned int extra_value; /* value to set in extra bytes */
1778 @REPLY
1779 unsigned int old_style; /* old window style */
1780 unsigned int old_ex_style; /* old window extended style */
1781 unsigned int old_id; /* old window id */
1782 void* old_instance; /* old creator instance */
1783 void* old_user_data; /* old user-specific data */
1784 unsigned int old_extra_value; /* old value in extra bytes */
1785 @END
1786 #define SET_WIN_STYLE 0x01
1787 #define SET_WIN_EXSTYLE 0x02
1788 #define SET_WIN_ID 0x04
1789 #define SET_WIN_INSTANCE 0x08
1790 #define SET_WIN_USERDATA 0x10
1791 #define SET_WIN_EXTRA 0x20
1794 /* Get a list of the window parents, up to the root of the tree */
1795 @REQ(get_window_parents)
1796 user_handle_t handle; /* handle to the window */
1797 @REPLY
1798 int count; /* total count of parents */
1799 VARARG(parents,user_handles); /* parent handles */
1800 @END
1803 /* Get a list of the window children */
1804 @REQ(get_window_children)
1805 user_handle_t parent; /* parent window */
1806 atom_t atom; /* class atom for the listed children */
1807 thread_id_t tid; /* thread owning the listed children */
1808 @REPLY
1809 int count; /* total count of children */
1810 VARARG(children,user_handles); /* children handles */
1811 @END
1814 /* Get window tree information from a window handle */
1815 @REQ(get_window_tree)
1816 user_handle_t handle; /* handle to the window */
1817 @REPLY
1818 user_handle_t parent; /* parent window */
1819 user_handle_t owner; /* owner window */
1820 user_handle_t next_sibling; /* next sibling in Z-order */
1821 user_handle_t prev_sibling; /* prev sibling in Z-order */
1822 user_handle_t first_sibling; /* first sibling in Z-order */
1823 user_handle_t last_sibling; /* last sibling in Z-order */
1824 user_handle_t first_child; /* first child */
1825 user_handle_t last_child; /* last child */
1826 @END
1828 /* Set the window and client rectangles of a window */
1829 @REQ(set_window_rectangles)
1830 user_handle_t handle; /* handle to the window */
1831 rectangle_t window; /* window rectangle */
1832 rectangle_t client; /* client rectangle */
1833 @END
1836 /* Get the window and client rectangles of a window */
1837 @REQ(get_window_rectangles)
1838 user_handle_t handle; /* handle to the window */
1839 @REPLY
1840 rectangle_t window; /* window rectangle */
1841 rectangle_t client; /* client rectangle */
1842 @END
1845 /* Get the window text */
1846 @REQ(get_window_text)
1847 user_handle_t handle; /* handle to the window */
1848 @REPLY
1849 VARARG(text,unicode_str); /* window text */
1850 @END
1853 /* Set the window text */
1854 @REQ(set_window_text)
1855 user_handle_t handle; /* handle to the window */
1856 VARARG(text,unicode_str); /* window text */
1857 @END
1860 /* Increment the window paint count */
1861 @REQ(inc_window_paint_count)
1862 user_handle_t handle; /* handle to the window */
1863 int incr; /* increment (can be negative) */
1864 @END
1867 /* Get the coordinates offset between two windows */
1868 @REQ(get_windows_offset)
1869 user_handle_t from; /* handle to the first window */
1870 user_handle_t to; /* handle to the second window */
1871 @REPLY
1872 int x; /* x coordinate offset */
1873 int y; /* y coordinate offset */
1874 @END
1877 /* Set a window property */
1878 @REQ(set_window_property)
1879 user_handle_t window; /* handle to the window */
1880 atom_t atom; /* property atom (high-word set if it was a string) */
1881 int string; /* was atom a string originally? */
1882 obj_handle_t handle; /* handle to store */
1883 @END
1886 /* Remove a window property */
1887 @REQ(remove_window_property)
1888 user_handle_t window; /* handle to the window */
1889 atom_t atom; /* property atom */
1890 @REPLY
1891 obj_handle_t handle; /* handle stored in property */
1892 @END
1895 /* Get a window property */
1896 @REQ(get_window_property)
1897 user_handle_t window; /* handle to the window */
1898 atom_t atom; /* property atom */
1899 @REPLY
1900 obj_handle_t handle; /* handle stored in property */
1901 @END
1904 /* Get the list of properties of a window */
1905 @REQ(get_window_properties)
1906 user_handle_t window; /* handle to the window */
1907 @REPLY
1908 int total; /* total number of properties */
1909 VARARG(props,properties); /* list of properties */
1910 @END
1913 /* Attach (or detach) thread inputs */
1914 @REQ(attach_thread_input)
1915 thread_id_t tid_from; /* thread to be attached */
1916 thread_id_t tid_to; /* thread to which tid_from should be attached */
1917 int attach; /* is it an attach? */
1918 @END
1921 /* Get input data for a given thread */
1922 @REQ(get_thread_input)
1923 thread_id_t tid; /* id of thread */
1924 @REPLY
1925 user_handle_t focus; /* handle to the focus window */
1926 user_handle_t capture; /* handle to the capture window */
1927 user_handle_t active; /* handle to the active window */
1928 user_handle_t foreground; /* handle to the global foreground window */
1929 user_handle_t menu_owner; /* handle to the menu owner */
1930 user_handle_t move_size; /* handle to the moving/resizing window */
1931 user_handle_t caret; /* handle to the caret window */
1932 rectangle_t rect; /* caret rectangle */
1933 @END
1935 /* Retrieve queue keyboard state for a given thread */
1936 @REQ(get_key_state)
1937 thread_id_t tid; /* id of thread */
1938 int key; /* optional key code or -1 */
1939 @REPLY
1940 unsigned char state; /* state of specified key */
1941 VARARG(keystate,bytes); /* state array for all the keys */
1942 @END
1944 /* Set queue keyboard state for a given thread */
1945 @REQ(set_key_state)
1946 thread_id_t tid; /* id of thread */
1947 VARARG(keystate,bytes); /* state array for all the keys */
1948 @END
1950 /* Set the system foreground window */
1951 @REQ(set_foreground_window)
1952 user_handle_t handle; /* handle to the foreground window */
1953 @REPLY
1954 user_handle_t previous; /* handle to the previous foreground window */
1955 int send_msg_old; /* whether we have to send a msg to the old window */
1956 int send_msg_new; /* whether we have to send a msg to the new window */
1957 @END
1959 /* Set the current thread focus window */
1960 @REQ(set_focus_window)
1961 user_handle_t handle; /* handle to the focus window */
1962 @REPLY
1963 user_handle_t previous; /* handle to the previous focus window */
1964 @END
1966 /* Set the current thread active window */
1967 @REQ(set_active_window)
1968 user_handle_t handle; /* handle to the active window */
1969 @REPLY
1970 user_handle_t previous; /* handle to the previous active window */
1971 @END
1973 /* Set the current thread capture window */
1974 @REQ(set_capture_window)
1975 user_handle_t handle; /* handle to the capture window */
1976 unsigned int flags; /* capture flags (see below) */
1977 @REPLY
1978 user_handle_t previous; /* handle to the previous capture window */
1979 user_handle_t full_handle; /* full 32-bit handle of new capture window */
1980 @END
1981 #define CAPTURE_MENU 0x01 /* capture is for a menu */
1982 #define CAPTURE_MOVESIZE 0x02 /* capture is for moving/resizing */
1985 /* Set the current thread caret window */
1986 @REQ(set_caret_window)
1987 user_handle_t handle; /* handle to the caret window */
1988 int width; /* caret width */
1989 int height; /* caret height */
1990 @REPLY
1991 user_handle_t previous; /* handle to the previous caret window */
1992 rectangle_t old_rect; /* previous caret rectangle */
1993 int old_hide; /* previous hide count */
1994 int old_state; /* previous caret state (1=on, 0=off) */
1995 @END
1998 /* Set the current thread caret information */
1999 @REQ(set_caret_info)
2000 unsigned int flags; /* caret flags (see below) */
2001 user_handle_t handle; /* handle to the caret window */
2002 int x; /* caret x position */
2003 int y; /* caret y position */
2004 int hide; /* increment for hide count (can be negative to show it) */
2005 int state; /* caret state (1=on, 0=off, -1=toggle current state) */
2006 @REPLY
2007 user_handle_t full_handle; /* handle to the current caret window */
2008 rectangle_t old_rect; /* previous caret rectangle */
2009 int old_hide; /* previous hide count */
2010 int old_state; /* previous caret state (1=on, 0=off) */
2011 @END
2012 #define SET_CARET_POS 0x01 /* set the caret position from x,y */
2013 #define SET_CARET_HIDE 0x02 /* increment the caret hide count */
2014 #define SET_CARET_STATE 0x04 /* set the caret on/off state */
2017 /* Set a window hook */
2018 @REQ(set_hook)
2019 int id; /* id of the hook */
2020 thread_id_t tid; /* id of thread to set the hook into */
2021 void* proc; /* hook procedure */
2022 int unicode; /* is it a unicode hook? */
2023 VARARG(module,unicode_str); /* module name */
2024 @REPLY
2025 user_handle_t handle; /* handle to the hook */
2026 @END
2029 /* Remove a window hook */
2030 @REQ(remove_hook)
2031 user_handle_t handle; /* handle to the hook */
2032 int id; /* id of the hook if handle is 0 */
2033 void* proc; /* hook procedure if handle is 0 */
2034 @END
2037 /* Start calling a hook chain */
2038 @REQ(start_hook_chain)
2039 int id; /* id of the hook */
2040 @REPLY
2041 user_handle_t handle; /* handle to the next hook */
2042 process_id_t pid; /* process id for low-level keyboard/mouse hooks */
2043 thread_id_t tid; /* thread id for low-level keyboard/mouse hooks */
2044 void* proc; /* hook procedure */
2045 int unicode; /* is it a unicode hook? */
2046 VARARG(module,unicode_str); /* module name */
2047 @END
2050 /* Finished calling a hook chain */
2051 @REQ(finish_hook_chain)
2052 int id; /* id of the hook */
2053 @END
2056 /* Get the next hook to call */
2057 @REQ(get_next_hook)
2058 user_handle_t handle; /* handle to the current hook */
2059 @REPLY
2060 user_handle_t next; /* handle to the next hook */
2061 int id; /* id of the next hook */
2062 process_id_t pid; /* process id for low-level keyboard/mouse hooks */
2063 thread_id_t tid; /* thread id for low-level keyboard/mouse hooks */
2064 void* proc; /* next hook procedure */
2065 int prev_unicode; /* was the previous a unicode hook? */
2066 int next_unicode; /* is the next a unicode hook? */
2067 VARARG(module,unicode_str); /* module name */
2068 @END
2071 /* Create a window class */
2072 @REQ(create_class)
2073 int local; /* is it a local class? */
2074 atom_t atom; /* class atom */
2075 unsigned int style; /* class style */
2076 void* instance; /* module instance */
2077 int extra; /* number of extra class bytes */
2078 int win_extra; /* number of window extra bytes */
2079 void* client_ptr; /* pointer to class in client address space */
2080 @END
2083 /* Destroy a window class */
2084 @REQ(destroy_class)
2085 atom_t atom; /* class atom */
2086 void* instance; /* module instance */
2087 @REPLY
2088 void* client_ptr; /* pointer to class in client address space */
2089 @END
2092 /* Set some information in a class */
2093 @REQ(set_class_info)
2094 user_handle_t window; /* handle to the window */
2095 unsigned int flags; /* flags for info to set (see below) */
2096 atom_t atom; /* class atom */
2097 unsigned int style; /* class style */
2098 int win_extra; /* number of window extra bytes */
2099 void* instance; /* module instance */
2100 int extra_offset; /* offset to set in extra bytes */
2101 size_t extra_size; /* size to set in extra bytes */
2102 unsigned int extra_value; /* value to set in extra bytes */
2103 @REPLY
2104 atom_t old_atom; /* previous class atom */
2105 unsigned int old_style; /* previous class style */
2106 int old_extra; /* previous number of class extra bytes */
2107 int old_win_extra; /* previous number of window extra bytes */
2108 void* old_instance; /* previous module instance */
2109 unsigned int old_extra_value; /* old value in extra bytes */
2110 @END
2111 #define SET_CLASS_ATOM 0x0001
2112 #define SET_CLASS_STYLE 0x0002
2113 #define SET_CLASS_WINEXTRA 0x0004
2114 #define SET_CLASS_INSTANCE 0x0008
2115 #define SET_CLASS_EXTRA 0x0010
2118 /* Set/get clipboard information */
2119 @REQ(set_clipboard_info)
2120 unsigned int flags; /* flags for fields to set (see below) */
2121 user_handle_t clipboard; /* clipboard window */
2122 user_handle_t owner; /* clipboard owner */
2123 user_handle_t viewer; /* first clipboard viewer */
2124 unsigned int seqno; /* change sequence number */
2125 @REPLY
2126 unsigned int flags; /* status flags (see below) */
2127 user_handle_t old_clipboard; /* old clipboard window */
2128 user_handle_t old_owner; /* old clipboard owner */
2129 user_handle_t old_viewer; /* old clipboard viewer */
2130 unsigned int seqno; /* current sequence number */
2131 @END
2133 #define SET_CB_OPEN 0x001
2134 #define SET_CB_OWNER 0x002
2135 #define SET_CB_VIEWER 0x004
2136 #define SET_CB_SEQNO 0x008
2137 #define SET_CB_RELOWNER 0x010
2138 #define SET_CB_CLOSE 0x020
2139 #define CB_OPEN 0x040
2140 #define CB_OWNER 0x080
2143 /* Open a security token */
2144 @REQ(open_token)
2145 obj_handle_t handle; /* handle to the thread or process */
2146 unsigned int flags; /* flags (see below) */
2147 @REPLY
2148 obj_handle_t token; /* handle to the token */
2149 @END
2150 #define OPEN_TOKEN_THREAD 1
2151 #define OPEN_TOKEN_AS_SELF 2
2154 /* Set/get the global windows */
2155 @REQ(set_global_windows)
2156 unsigned int flags; /* flags for fields to set (see below) */
2157 user_handle_t shell_window; /* handle to the new shell window */
2158 user_handle_t shell_listview; /* handle to the new shell listview window */
2159 user_handle_t progman_window; /* handle to the new program manager window */
2160 user_handle_t taskman_window; /* handle to the new task manager window */
2161 @REPLY
2162 user_handle_t old_shell_window; /* handle to the shell window */
2163 user_handle_t old_shell_listview; /* handle to the shell listview window */
2164 user_handle_t old_progman_window; /* handle to the new program manager window */
2165 user_handle_t old_taskman_window; /* handle to the new task manager window */
2166 @END
2167 #define SET_GLOBAL_SHELL_WINDOWS 0x01 /* set both main shell and listview windows */
2168 #define SET_GLOBAL_PROGMAN_WINDOW 0x02
2169 #define SET_GLOBAL_TASKMAN_WINDOW 0x04