Added process_id_t and thread_it_t types to the server interface
[wine/multimedia.git] / server / protocol.def
blob1aeb6c4b244dee01c8dca95687166075050f1313
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 <stdlib.h>
28 #include <time.h>
29 #include "winbase.h"
31 struct request_header
33 int req; /* request code */
34 size_t request_size; /* request variable part size */
35 size_t reply_size; /* reply variable part maximum size */
38 struct reply_header
40 unsigned int error; /* error result */
41 size_t reply_size; /* reply variable part size */
44 /* placeholder structure for the maximum allowed request size */
45 /* this is used to construct the generic_request union */
46 struct request_max_size
48 int pad[16]; /* the max request size is 16 ints */
51 typedef int obj_handle_t;
52 typedef unsigned short atom_t;
53 typedef unsigned int user_handle_t;
54 typedef unsigned int process_id_t;
55 typedef unsigned int thread_id_t;
57 #define FIRST_USER_HANDLE 0x0020 /* first possible value for low word of user handle */
58 #define LAST_USER_HANDLE 0xffef /* last possible value for low word of user handle */
61 /* definitions of the event data depending on the event code */
62 struct debug_event_exception
64 EXCEPTION_RECORD record; /* exception record */
65 int first; /* first chance exception? */
67 struct debug_event_create_thread
69 obj_handle_t handle; /* handle to the new thread */
70 void *teb; /* thread teb (in debugged process address space) */
71 void *start; /* thread startup routine */
73 struct debug_event_create_process
75 obj_handle_t file; /* handle to the process exe file */
76 obj_handle_t process; /* handle to the new process */
77 obj_handle_t thread; /* handle to the new thread */
78 void *base; /* base of executable image */
79 int dbg_offset; /* offset of debug info in file */
80 int dbg_size; /* size of debug info */
81 void *teb; /* thread teb (in debugged process address space) */
82 void *start; /* thread startup routine */
83 void *name; /* image name (optional) */
84 int unicode; /* is it Unicode? */
86 struct debug_event_exit
88 int exit_code; /* thread or process exit code */
90 struct debug_event_load_dll
92 obj_handle_t handle; /* file handle for the dll */
93 void *base; /* base address of the dll */
94 int dbg_offset; /* offset of debug info in file */
95 int dbg_size; /* size of debug info */
96 void *name; /* image name (optional) */
97 int unicode; /* is it Unicode? */
99 struct debug_event_unload_dll
101 void *base; /* base address of the dll */
103 struct debug_event_output_string
105 void *string; /* string to display (in debugged process address space) */
106 int unicode; /* is it Unicode? */
107 int length; /* string length */
109 struct debug_event_rip_info
111 int error; /* ??? */
112 int type; /* ??? */
114 union debug_event_data
116 struct debug_event_exception exception;
117 struct debug_event_create_thread create_thread;
118 struct debug_event_create_process create_process;
119 struct debug_event_exit exit;
120 struct debug_event_load_dll load_dll;
121 struct debug_event_unload_dll unload_dll;
122 struct debug_event_output_string output_string;
123 struct debug_event_rip_info rip_info;
126 /* debug event data */
127 typedef struct
129 int code; /* event code */
130 union debug_event_data info; /* event information */
131 } debug_event_t;
133 /* structure used in sending an fd from client to server */
134 struct send_fd
136 thread_id_t tid; /* thread id */
137 int fd; /* file descriptor on client-side */
140 /* structure sent by the server on the wait fifo */
141 struct wake_up_reply
143 void *cookie; /* magic cookie that was passed in select_request */
144 int signaled; /* wait result */
147 /* structure for process startup info */
148 typedef struct
150 size_t size; /* size of this structure */
151 size_t filename_len; /* length of filename */
152 size_t cmdline_len; /* length of cmd line */
153 size_t desktop_len; /* length of desktop name */
154 size_t title_len; /* length of title */
155 int x; /* window position */
156 int y;
157 int cx; /* window size */
158 int cy;
159 int x_chars; /* console size */
160 int y_chars;
161 int attribute; /* console attributes */
162 int cmd_show; /* main window show mode */
163 unsigned int flags; /* info flags */
164 /* char filename[...]; */
165 /* char cmdline[...]; */
166 /* char desktop[...]; */
167 /* char title[...]; */
168 } startup_info_t;
170 /* structure returned in the list of window properties */
171 typedef struct
173 atom_t atom; /* property atom */
174 short string; /* was atom a string originally? */
175 obj_handle_t handle; /* handle stored in property */
176 } property_data_t;
178 /* structure to specify window rectangles */
179 typedef struct
181 int left;
182 int top;
183 int right;
184 int bottom;
185 } rectangle_t;
187 /* structure for console char/attribute info */
188 typedef struct
190 WCHAR ch;
191 unsigned short attr;
192 } char_info_t;
194 /****************************************************************/
195 /* Request declarations */
197 /* Create a new process from the context of the parent */
198 @REQ(new_process)
199 int inherit_all; /* inherit all handles from parent */
200 int use_handles; /* use stdio handles */
201 int create_flags; /* creation flags */
202 obj_handle_t exe_file; /* file handle for main exe */
203 obj_handle_t hstdin; /* handle for stdin */
204 obj_handle_t hstdout; /* handle for stdout */
205 obj_handle_t hstderr; /* handle for stderr */
206 VARARG(info,startup_info); /* startup information */
207 @REPLY
208 obj_handle_t info; /* new process info handle */
209 @END
212 /* Retrieve information about a newly started process */
213 @REQ(get_new_process_info)
214 obj_handle_t info; /* info handle returned from new_process_request */
215 int pinherit; /* process handle inherit flag */
216 int tinherit; /* thread handle inherit flag */
217 @REPLY
218 process_id_t pid; /* process id */
219 obj_handle_t phandle; /* process handle (in the current process) */
220 thread_id_t tid; /* thread id */
221 obj_handle_t thandle; /* thread handle (in the current process) */
222 int success; /* did the process start successfully? */
223 @END
226 /* Create a new thread from the context of the parent */
227 @REQ(new_thread)
228 int suspend; /* new thread should be suspended on creation */
229 int inherit; /* inherit flag */
230 int request_fd; /* fd for request pipe */
231 @REPLY
232 thread_id_t tid; /* thread id */
233 obj_handle_t handle; /* thread handle (in the current process) */
234 @END
237 /* Signal that we are finished booting on the client side */
238 @REQ(boot_done)
239 int debug_level; /* new debug level */
240 @END
243 /* Initialize a process; called from the new process context */
244 @REQ(init_process)
245 void* ldt_copy; /* addr of LDT copy */
246 int ppid; /* parent Unix pid */
247 @REPLY
248 int create_flags; /* creation flags */
249 unsigned int server_start; /* server start time (GetTickCount) */
250 size_t info_size; /* total size of startup info */
251 obj_handle_t exe_file; /* file handle for main exe */
252 obj_handle_t hstdin; /* handle for stdin */
253 obj_handle_t hstdout; /* handle for stdout */
254 obj_handle_t hstderr; /* handle for stderr */
255 @END
258 /* Retrieve the new process startup info */
259 @REQ(get_startup_info)
260 @REPLY
261 VARARG(info,startup_info); /* startup information */
262 @END
265 /* Signal the end of the process initialization */
266 @REQ(init_process_done)
267 void* module; /* main module base address */
268 size_t module_size; /* main module size */
269 void* entry; /* process entry point */
270 void* name; /* ptr to ptr to name (in process addr space) */
271 obj_handle_t exe_file; /* file handle for main exe */
272 int gui; /* is it a GUI process? */
273 VARARG(filename,string); /* file name of main exe */
274 @REPLY
275 int debugged; /* being debugged? */
276 @END
279 /* Initialize a thread; called from the child after fork()/clone() */
280 @REQ(init_thread)
281 int unix_pid; /* Unix pid of new thread */
282 void* teb; /* TEB of new thread (in thread address space) */
283 void* entry; /* thread entry point (in thread address space) */
284 int reply_fd; /* fd for reply pipe */
285 int wait_fd; /* fd for blocking calls pipe */
286 @REPLY
287 process_id_t pid; /* process id of the new thread's process */
288 thread_id_t tid; /* thread id of the new thread */
289 int boot; /* is this the boot thread? */
290 int version; /* protocol version */
291 @END
294 /* Terminate a process */
295 @REQ(terminate_process)
296 obj_handle_t handle; /* process handle to terminate */
297 int exit_code; /* process exit code */
298 @REPLY
299 int self; /* suicide? */
300 @END
303 /* Terminate a thread */
304 @REQ(terminate_thread)
305 obj_handle_t handle; /* thread handle to terminate */
306 int exit_code; /* thread exit code */
307 @REPLY
308 int self; /* suicide? */
309 int last; /* last thread in this process? */
310 @END
313 /* Retrieve information about a process */
314 @REQ(get_process_info)
315 obj_handle_t handle; /* process handle */
316 @REPLY
317 process_id_t pid; /* server process id */
318 int debugged; /* debugged? */
319 int exit_code; /* process exit code */
320 int priority; /* priority class */
321 int process_affinity; /* process affinity mask */
322 int system_affinity; /* system affinity mask */
323 @END
326 /* Set a process informations */
327 @REQ(set_process_info)
328 obj_handle_t handle; /* process handle */
329 int mask; /* setting mask (see below) */
330 int priority; /* priority class */
331 int affinity; /* affinity mask */
332 @END
333 #define SET_PROCESS_INFO_PRIORITY 0x01
334 #define SET_PROCESS_INFO_AFFINITY 0x02
337 /* Retrieve information about a thread */
338 @REQ(get_thread_info)
339 obj_handle_t handle; /* thread handle */
340 thread_id_t tid_in; /* thread id (optional) */
341 @REPLY
342 thread_id_t tid; /* server thread id */
343 void* teb; /* thread teb pointer */
344 int exit_code; /* thread exit code */
345 int priority; /* thread priority level */
346 @END
349 /* Set a thread informations */
350 @REQ(set_thread_info)
351 obj_handle_t handle; /* thread handle */
352 int mask; /* setting mask (see below) */
353 int priority; /* priority class */
354 int affinity; /* affinity mask */
355 @END
356 #define SET_THREAD_INFO_PRIORITY 0x01
357 #define SET_THREAD_INFO_AFFINITY 0x02
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,string); /* 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* param; /* param for function to call */
400 @END
403 /* Get next APC to call */
404 @REQ(get_apc)
405 int alertable; /* is thread alertable? */
406 @REPLY
407 void* func; /* function to call */
408 int type; /* function type */
409 VARARG(args,ptrs); /* function arguments */
410 @END
411 enum apc_type { APC_NONE, APC_USER, APC_TIMER, APC_ASYNC, APC_ASYNC_IO };
414 /* Close a handle for the current process */
415 @REQ(close_handle)
416 obj_handle_t handle; /* handle to close */
417 @REPLY
418 int fd; /* associated fd to close */
419 @END
422 /* Set a handle information */
423 @REQ(set_handle_info)
424 obj_handle_t handle; /* handle we are interested in */
425 int flags; /* new handle flags */
426 int mask; /* mask for flags to set */
427 int fd; /* file descriptor or -1 */
428 @REPLY
429 int old_flags; /* old flag value */
430 int cur_fd; /* current file descriptor */
431 @END
434 /* Duplicate a handle */
435 @REQ(dup_handle)
436 obj_handle_t src_process; /* src process handle */
437 obj_handle_t src_handle; /* src handle to duplicate */
438 obj_handle_t dst_process; /* dst process handle */
439 unsigned int access; /* wanted access rights */
440 int inherit; /* inherit flag */
441 int options; /* duplicate options (see below) */
442 @REPLY
443 obj_handle_t handle; /* duplicated handle in dst process */
444 int fd; /* associated fd to close */
445 @END
446 #define DUP_HANDLE_CLOSE_SOURCE DUPLICATE_CLOSE_SOURCE
447 #define DUP_HANDLE_SAME_ACCESS DUPLICATE_SAME_ACCESS
448 #define DUP_HANDLE_MAKE_GLOBAL 0x80000000 /* Not a Windows flag */
451 /* Open a handle to a process */
452 @REQ(open_process)
453 process_id_t pid; /* process id to open */
454 unsigned int access; /* wanted access rights */
455 int inherit; /* inherit flag */
456 @REPLY
457 obj_handle_t handle; /* handle to the process */
458 @END
461 /* Open a handle to a thread */
462 @REQ(open_thread)
463 thread_id_t tid; /* thread id to open */
464 unsigned int access; /* wanted access rights */
465 int inherit; /* inherit flag */
466 @REPLY
467 obj_handle_t handle; /* handle to the thread */
468 @END
471 /* Wait for handles */
472 @REQ(select)
473 int flags; /* wait flags (see below) */
474 void* cookie; /* magic cookie to return to client */
475 int sec; /* absolute timeout */
476 int usec; /* absolute timeout */
477 VARARG(handles,handles); /* handles to select on */
478 @END
479 #define SELECT_ALL 1
480 #define SELECT_ALERTABLE 2
481 #define SELECT_INTERRUPTIBLE 4
482 #define SELECT_TIMEOUT 8
485 /* Create an event */
486 @REQ(create_event)
487 int manual_reset; /* manual reset event */
488 int initial_state; /* initial state of the event */
489 int inherit; /* inherit flag */
490 VARARG(name,unicode_str); /* object name */
491 @REPLY
492 obj_handle_t handle; /* handle to the event */
493 @END
495 /* Event operation */
496 @REQ(event_op)
497 obj_handle_t handle; /* handle to event */
498 int op; /* event operation (see below) */
499 @END
500 enum event_op { PULSE_EVENT, SET_EVENT, RESET_EVENT };
503 /* Open an event */
504 @REQ(open_event)
505 unsigned int access; /* wanted access rights */
506 int inherit; /* inherit flag */
507 VARARG(name,unicode_str); /* object name */
508 @REPLY
509 obj_handle_t handle; /* handle to the event */
510 @END
513 /* Create a mutex */
514 @REQ(create_mutex)
515 int owned; /* initially owned? */
516 int inherit; /* inherit flag */
517 VARARG(name,unicode_str); /* object name */
518 @REPLY
519 obj_handle_t handle; /* handle to the mutex */
520 @END
523 /* Release a mutex */
524 @REQ(release_mutex)
525 obj_handle_t handle; /* handle to the mutex */
526 @END
529 /* Open a mutex */
530 @REQ(open_mutex)
531 unsigned int access; /* wanted access rights */
532 int inherit; /* inherit flag */
533 VARARG(name,unicode_str); /* object name */
534 @REPLY
535 obj_handle_t handle; /* handle to the mutex */
536 @END
539 /* Create a semaphore */
540 @REQ(create_semaphore)
541 unsigned int initial; /* initial count */
542 unsigned int max; /* maximum count */
543 int inherit; /* inherit flag */
544 VARARG(name,unicode_str); /* object name */
545 @REPLY
546 obj_handle_t handle; /* handle to the semaphore */
547 @END
550 /* Release a semaphore */
551 @REQ(release_semaphore)
552 obj_handle_t handle; /* handle to the semaphore */
553 unsigned int count; /* count to add to semaphore */
554 @REPLY
555 unsigned int prev_count; /* previous semaphore count */
556 @END
559 /* Open a semaphore */
560 @REQ(open_semaphore)
561 unsigned int access; /* wanted access rights */
562 int inherit; /* inherit flag */
563 VARARG(name,unicode_str); /* object name */
564 @REPLY
565 obj_handle_t handle; /* handle to the semaphore */
566 @END
569 /* Create a file */
570 @REQ(create_file)
571 unsigned int access; /* wanted access rights */
572 int inherit; /* inherit flag */
573 unsigned int sharing; /* sharing flags */
574 int create; /* file create action */
575 unsigned int attrs; /* file attributes for creation */
576 int drive_type; /* type of drive the file is on */
577 VARARG(filename,string); /* file name */
578 @REPLY
579 obj_handle_t handle; /* handle to the file */
580 @END
583 /* Allocate a file handle for a Unix fd */
584 @REQ(alloc_file_handle)
585 unsigned int access; /* wanted access rights */
586 int inherit; /* inherit flag */
587 int fd; /* file descriptor on the client side */
588 @REPLY
589 obj_handle_t handle; /* handle to the file */
590 @END
593 /* Get a Unix fd to access a file */
594 @REQ(get_handle_fd)
595 obj_handle_t handle; /* handle to the file */
596 unsigned int access; /* wanted access rights */
597 @REPLY
598 int fd; /* file descriptor */
599 int type; /* the type of file (see below) */
600 int flags; /* file read/write flags (see below) */
601 @END
602 enum fd_type
604 FD_TYPE_INVALID,
605 FD_TYPE_DEFAULT,
606 FD_TYPE_CONSOLE,
607 FD_TYPE_SOCKET,
608 FD_TYPE_SMB
610 #define FD_FLAG_OVERLAPPED 0x01
611 #define FD_FLAG_TIMEOUT 0x02
612 #define FD_FLAG_RECV_SHUTDOWN 0x04
613 #define FD_FLAG_SEND_SHUTDOWN 0x08
615 /* Set a file current position */
616 @REQ(set_file_pointer)
617 obj_handle_t handle; /* handle to the file */
618 int low; /* position low word */
619 int high; /* position high word */
620 int whence; /* whence to seek */
621 @REPLY
622 int new_low; /* new position low word */
623 int new_high; /* new position high word */
624 @END
627 /* Truncate (or extend) a file */
628 @REQ(truncate_file)
629 obj_handle_t handle; /* handle to the file */
630 @END
633 /* Set a file access and modification times */
634 @REQ(set_file_time)
635 obj_handle_t handle; /* handle to the file */
636 time_t access_time; /* last access time */
637 time_t write_time; /* last write time */
638 @END
641 /* Flush a file buffers */
642 @REQ(flush_file)
643 obj_handle_t handle; /* handle to the file */
644 @END
647 /* Get information about a file */
648 @REQ(get_file_info)
649 obj_handle_t handle; /* handle to the file */
650 @REPLY
651 int type; /* file type */
652 int attr; /* file attributes */
653 time_t access_time; /* last access time */
654 time_t write_time; /* last write time */
655 int size_high; /* file size */
656 int size_low; /* file size */
657 int links; /* number of links */
658 int index_high; /* unique index */
659 int index_low; /* unique index */
660 unsigned int serial; /* volume serial number */
661 @END
664 /* Lock a region of a file */
665 @REQ(lock_file)
666 obj_handle_t handle; /* handle to the file */
667 unsigned int offset_low; /* offset of start of lock */
668 unsigned int offset_high; /* offset of start of lock */
669 unsigned int count_low; /* count of bytes to lock */
670 unsigned int count_high; /* count of bytes to lock */
671 @END
674 /* Unlock a region of a file */
675 @REQ(unlock_file)
676 obj_handle_t handle; /* handle to the file */
677 unsigned int offset_low; /* offset of start of unlock */
678 unsigned int offset_high; /* offset of start of unlock */
679 unsigned int count_low; /* count of bytes to unlock */
680 unsigned int count_high; /* count of bytes to unlock */
681 @END
684 /* Create an anonymous pipe */
685 @REQ(create_pipe)
686 int inherit; /* inherit flag */
687 @REPLY
688 obj_handle_t handle_read; /* handle to the read-side of the pipe */
689 obj_handle_t handle_write; /* handle to the write-side of the pipe */
690 @END
693 /* Create a socket */
694 @REQ(create_socket)
695 unsigned int access; /* wanted access rights */
696 int inherit; /* inherit flag */
697 int family; /* family, see socket manpage */
698 int type; /* type, see socket manpage */
699 int protocol; /* protocol, see socket manpage */
700 unsigned int flags; /* socket flags */
701 @REPLY
702 obj_handle_t handle; /* handle to the new socket */
703 @END
706 /* Accept a socket */
707 @REQ(accept_socket)
708 obj_handle_t lhandle; /* handle to the listening socket */
709 unsigned int access; /* wanted access rights */
710 int inherit; /* inherit flag */
711 @REPLY
712 obj_handle_t handle; /* handle to the new socket */
713 @END
716 /* Set socket event parameters */
717 @REQ(set_socket_event)
718 obj_handle_t handle; /* handle to the socket */
719 unsigned int mask; /* event mask */
720 obj_handle_t event; /* event object */
721 user_handle_t window; /* window to send the message to */
722 unsigned int msg; /* message to send */
723 @END
726 /* Get socket event parameters */
727 @REQ(get_socket_event)
728 obj_handle_t handle; /* handle to the socket */
729 int service; /* clear pending? */
730 obj_handle_t c_event; /* event to clear */
731 @REPLY
732 unsigned int mask; /* event mask */
733 unsigned int pmask; /* pending events */
734 unsigned int state; /* status bits */
735 VARARG(errors,ints); /* event errors */
736 @END
739 /* Reenable pending socket events */
740 @REQ(enable_socket_event)
741 obj_handle_t handle; /* handle to the socket */
742 unsigned int mask; /* events to re-enable */
743 unsigned int sstate; /* status bits to set */
744 unsigned int cstate; /* status bits to clear */
745 @END
747 @REQ(set_socket_deferred)
748 obj_handle_t handle; /* handle to the socket */
749 obj_handle_t deferred; /* handle to the socket for which accept() is deferred */
750 @END
752 /* Allocate a console (only used by a console renderer) */
753 @REQ(alloc_console)
754 unsigned int access; /* wanted access rights */
755 int inherit; /* inherit flag */
756 process_id_t pid; /* pid of process which shall be attached to the console */
757 @REPLY
758 obj_handle_t handle_in; /* handle to console input */
759 obj_handle_t event; /* handle to renderer events change notification */
760 @END
763 /* Free the console of the current process */
764 @REQ(free_console)
765 @END
768 #define CONSOLE_RENDERER_NONE_EVENT 0x00
769 #define CONSOLE_RENDERER_TITLE_EVENT 0x01
770 #define CONSOLE_RENDERER_ACTIVE_SB_EVENT 0x02
771 #define CONSOLE_RENDERER_SB_RESIZE_EVENT 0x03
772 #define CONSOLE_RENDERER_UPDATE_EVENT 0x04
773 #define CONSOLE_RENDERER_CURSOR_POS_EVENT 0x05
774 #define CONSOLE_RENDERER_CURSOR_GEOM_EVENT 0x06
775 #define CONSOLE_RENDERER_DISPLAY_EVENT 0x07
776 #define CONSOLE_RENDERER_EXIT_EVENT 0x08
777 struct console_renderer_event
779 short event;
780 union
782 struct update
784 short top;
785 short bottom;
786 } update;
787 struct resize
789 short width;
790 short height;
791 } resize;
792 struct cursor_pos
794 short x;
795 short y;
796 } cursor_pos;
797 struct cursor_geom
799 short visible;
800 short size;
801 } cursor_geom;
802 struct display
804 short left;
805 short top;
806 short width;
807 short height;
808 } display;
809 } u;
812 /* retrieve console events for the renderer */
813 @REQ(get_console_renderer_events)
814 obj_handle_t handle; /* handle to console input events */
815 @REPLY
816 VARARG(data,bytes); /* the various console_renderer_events */
817 @END
820 /* Open a handle to the process console */
821 @REQ(open_console)
822 int from; /* 0 (resp 1) input (resp output) of current process console */
823 /* otherwise console_in handle to get active screen buffer? */
824 unsigned int access; /* wanted access rights */
825 int inherit; /* inherit flag */
826 int share; /* share mask (only for output handles) */
827 @REPLY
828 obj_handle_t handle; /* handle to the console */
829 @END
832 /* Get a console mode (input or output) */
833 @REQ(get_console_mode)
834 obj_handle_t handle; /* handle to the console */
835 @REPLY
836 int mode; /* console mode */
837 @END
840 /* Set a console mode (input or output) */
841 @REQ(set_console_mode)
842 obj_handle_t handle; /* handle to the console */
843 int mode; /* console mode */
844 @END
847 /* Set info about a console (input only) */
848 @REQ(set_console_input_info)
849 obj_handle_t handle; /* handle to console input, or 0 for process' console */
850 int mask; /* setting mask (see below) */
851 obj_handle_t active_sb; /* active screen buffer */
852 int history_mode; /* whether we duplicate lines in history */
853 int history_size; /* number of lines in history */
854 VARARG(title,unicode_str); /* console title */
855 @END
856 #define SET_CONSOLE_INPUT_INFO_ACTIVE_SB 0x01
857 #define SET_CONSOLE_INPUT_INFO_TITLE 0x02
858 #define SET_CONSOLE_INPUT_INFO_HISTORY_MODE 0x04
859 #define SET_CONSOLE_INPUT_INFO_HISTORY_SIZE 0x08
862 /* Get info about a console (input only) */
863 @REQ(get_console_input_info)
864 obj_handle_t handle; /* handle to console input, or 0 for process' console */
865 @REPLY
866 int history_mode; /* whether we duplicate lines in history */
867 int history_size; /* number of lines in history */
868 int history_index; /* number of used lines in history */
869 VARARG(title,unicode_str); /* console title */
870 @END
873 /* appends a string to console's history */
874 @REQ(append_console_input_history)
875 obj_handle_t handle; /* handle to console input, or 0 for process' console */
876 VARARG(line,unicode_str); /* line to add */
877 @END
880 /* appends a string to console's history */
881 @REQ(get_console_input_history)
882 obj_handle_t handle; /* handle to console input, or 0 for process' console */
883 int index; /* index to get line from */
884 @REPLY
885 int total; /* total length of line in Unicode chars */
886 VARARG(line,unicode_str); /* line to add */
887 @END
890 /* creates a new screen buffer on process' console */
891 @REQ(create_console_output)
892 obj_handle_t handle_in; /* handle to console input, or 0 for process' console */
893 int access; /* wanted access rights */
894 int share; /* sharing credentials */
895 int inherit; /* inherit flag */
896 @REPLY
897 obj_handle_t handle_out; /* handle to the screen buffer */
898 @END
901 /* Set info about a console (output only) */
902 @REQ(set_console_output_info)
903 obj_handle_t handle; /* handle to the console */
904 int mask; /* setting mask (see below) */
905 short int cursor_size; /* size of cursor (percentage filled) */
906 short int cursor_visible;/* cursor visibility flag */
907 short int cursor_x; /* position of cursor (x, y) */
908 short int cursor_y;
909 short int width; /* width of the screen buffer */
910 short int height; /* height of the screen buffer */
911 short int attr; /* default attribute */
912 short int win_left; /* window actually displayed by renderer */
913 short int win_top; /* the rect area is expressed withing the */
914 short int win_right; /* boundaries of the screen buffer */
915 short int win_bottom;
916 short int max_width; /* maximum size (width x height) for the window */
917 short int max_height;
918 @END
919 #define SET_CONSOLE_OUTPUT_INFO_CURSOR_GEOM 0x01
920 #define SET_CONSOLE_OUTPUT_INFO_CURSOR_POS 0x02
921 #define SET_CONSOLE_OUTPUT_INFO_SIZE 0x04
922 #define SET_CONSOLE_OUTPUT_INFO_ATTR 0x08
923 #define SET_CONSOLE_OUTPUT_INFO_DISPLAY_WINDOW 0x10
924 #define SET_CONSOLE_OUTPUT_INFO_MAX_SIZE 0x20
927 /* Get info about a console (output only) */
928 @REQ(get_console_output_info)
929 obj_handle_t handle; /* handle to the console */
930 @REPLY
931 short int cursor_size; /* size of cursor (percentage filled) */
932 short int cursor_visible;/* cursor visibility flag */
933 short int cursor_x; /* position of cursor (x, y) */
934 short int cursor_y;
935 short int width; /* width of the screen buffer */
936 short int height; /* height of the screen buffer */
937 short int attr; /* default attribute */
938 short int win_left; /* window actually displayed by renderer */
939 short int win_top; /* the rect area is expressed withing the */
940 short int win_right; /* boundaries of the screen buffer */
941 short int win_bottom;
942 short int max_width; /* maximum size (width x height) for the window */
943 short int max_height;
944 @END
946 /* Add input records to a console input queue */
947 @REQ(write_console_input)
948 obj_handle_t handle; /* handle to the console input */
949 VARARG(rec,input_records); /* input records */
950 @REPLY
951 int written; /* number of records written */
952 @END
955 /* Fetch input records from a console input queue */
956 @REQ(read_console_input)
957 obj_handle_t handle; /* handle to the console input */
958 int flush; /* flush the retrieved records from the queue? */
959 @REPLY
960 int read; /* number of records read */
961 VARARG(rec,input_records); /* input records */
962 @END
965 /* write data (chars and/or attributes) in a screen buffer */
966 @REQ(write_console_output)
967 obj_handle_t handle; /* handle to the console output */
968 int x; /* position where to start writing */
969 int y;
970 int mode; /* char info (see below) */
971 int wrap; /* wrap around at end of line? */
972 VARARG(data,bytes); /* info to write */
973 @REPLY
974 int written; /* number of char infos actually written */
975 int width; /* width of screen buffer */
976 int height; /* height of screen buffer */
977 @END
978 enum char_info_mode
980 CHAR_INFO_MODE_TEXT, /* characters only */
981 CHAR_INFO_MODE_ATTR, /* attributes only */
982 CHAR_INFO_MODE_TEXTATTR, /* both characters and attributes */
983 CHAR_INFO_MODE_TEXTSTDATTR /* characters but use standard attributes */
987 /* fill a screen buffer with constant data (chars and/or attributes) */
988 @REQ(fill_console_output)
989 obj_handle_t handle; /* handle to the console output */
990 int x; /* position where to start writing */
991 int y;
992 int mode; /* char info mode */
993 int count; /* number to write */
994 int wrap; /* wrap around at end of line? */
995 char_info_t data; /* data to write */
996 @REPLY
997 int written; /* number of char infos actually written */
998 @END
1001 /* read data (chars and/or attributes) from a screen buffer */
1002 @REQ(read_console_output)
1003 obj_handle_t handle; /* handle to the console output */
1004 int x; /* position (x,y) where to start reading */
1005 int y;
1006 int mode; /* char info mode */
1007 int wrap; /* wrap around at end of line? */
1008 @REPLY
1009 int width; /* width of screen buffer */
1010 int height; /* height of screen buffer */
1011 VARARG(data,bytes);
1012 @END
1015 /* move a rect (of data) in screen buffer content */
1016 @REQ(move_console_output)
1017 obj_handle_t handle; /* handle to the console output */
1018 short int x_src; /* position (x, y) of rect to start moving from */
1019 short int y_src;
1020 short int x_dst; /* position (x, y) of rect to move to */
1021 short int y_dst;
1022 short int w; /* size of the rect (width, height) to move */
1023 short int h;
1024 @END
1027 /* Sends a signal to a process group */
1028 @REQ(send_console_signal)
1029 int signal; /* the signal to send */
1030 process_id_t group_id; /* the group to send the signal to */
1031 @END
1034 /* Create a change notification */
1035 @REQ(create_change_notification)
1036 int subtree; /* watch all the subtree */
1037 int filter; /* notification filter */
1038 @REPLY
1039 obj_handle_t handle; /* handle to the change notification */
1040 @END
1043 /* Create a file mapping */
1044 @REQ(create_mapping)
1045 int size_high; /* mapping size */
1046 int size_low; /* mapping size */
1047 int protect; /* protection flags (see below) */
1048 unsigned int access; /* wanted access rights */
1049 int inherit; /* inherit flag */
1050 obj_handle_t file_handle; /* file handle */
1051 VARARG(name,unicode_str); /* object name */
1052 @REPLY
1053 obj_handle_t handle; /* handle to the mapping */
1054 @END
1055 /* protection flags */
1056 #define VPROT_READ 0x01
1057 #define VPROT_WRITE 0x02
1058 #define VPROT_EXEC 0x04
1059 #define VPROT_WRITECOPY 0x08
1060 #define VPROT_GUARD 0x10
1061 #define VPROT_NOCACHE 0x20
1062 #define VPROT_COMMITTED 0x40
1063 #define VPROT_IMAGE 0x80
1066 /* Open a mapping */
1067 @REQ(open_mapping)
1068 unsigned int access; /* wanted access rights */
1069 int inherit; /* inherit flag */
1070 VARARG(name,unicode_str); /* object name */
1071 @REPLY
1072 obj_handle_t handle; /* handle to the mapping */
1073 @END
1076 /* Get information about a file mapping */
1077 @REQ(get_mapping_info)
1078 obj_handle_t handle; /* handle to the mapping */
1079 @REPLY
1080 int size_high; /* mapping size */
1081 int size_low; /* mapping size */
1082 int protect; /* protection flags */
1083 int header_size; /* header size (for VPROT_IMAGE mapping) */
1084 void* base; /* default base addr (for VPROT_IMAGE mapping) */
1085 obj_handle_t shared_file; /* shared mapping file handle */
1086 int shared_size; /* shared mapping size */
1087 int drive_type; /* type of drive the file is on */
1088 @END
1091 /* Create a device */
1092 @REQ(create_device)
1093 unsigned int access; /* wanted access rights */
1094 int inherit; /* inherit flag */
1095 int id; /* client private id */
1096 @REPLY
1097 obj_handle_t handle; /* handle to the device */
1098 @END
1101 /* Create a snapshot */
1102 @REQ(create_snapshot)
1103 int inherit; /* inherit flag */
1104 int flags; /* snapshot flags (TH32CS_*) */
1105 process_id_t pid; /* process id */
1106 @REPLY
1107 obj_handle_t handle; /* handle to the snapshot */
1108 @END
1111 /* Get the next process from a snapshot */
1112 @REQ(next_process)
1113 obj_handle_t handle; /* handle to the snapshot */
1114 int reset; /* reset snapshot position? */
1115 @REPLY
1116 int count; /* process usage count */
1117 process_id_t pid; /* process id */
1118 process_id_t ppid; /* parent process id */
1119 void* heap; /* heap base */
1120 void* module; /* main module */
1121 int threads; /* number of threads */
1122 int priority; /* process priority */
1123 VARARG(filename,string); /* file name of main exe */
1124 @END
1127 /* Get the next thread from a snapshot */
1128 @REQ(next_thread)
1129 obj_handle_t handle; /* handle to the snapshot */
1130 int reset; /* reset snapshot position? */
1131 @REPLY
1132 int count; /* thread usage count */
1133 process_id_t pid; /* process id */
1134 thread_id_t tid; /* thread id */
1135 int base_pri; /* base priority */
1136 int delta_pri; /* delta priority */
1137 @END
1140 /* Get the next module from a snapshot */
1141 @REQ(next_module)
1142 obj_handle_t handle; /* handle to the snapshot */
1143 int reset; /* reset snapshot position? */
1144 @REPLY
1145 process_id_t pid; /* process id */
1146 void* base; /* module base address */
1147 size_t size; /* module size */
1148 VARARG(filename,string); /* file name of module */
1149 @END
1152 /* Wait for a debug event */
1153 @REQ(wait_debug_event)
1154 int get_handle; /* should we alloc a handle for waiting? */
1155 @REPLY
1156 process_id_t pid; /* process id */
1157 thread_id_t tid; /* thread id */
1158 obj_handle_t wait; /* wait handle if no event ready */
1159 VARARG(event,debug_event); /* debug event data */
1160 @END
1163 /* Queue an exception event */
1164 @REQ(queue_exception_event)
1165 int first; /* first chance exception? */
1166 VARARG(record,exc_event); /* thread context followed by exception record */
1167 @REPLY
1168 obj_handle_t handle; /* handle to the queued event */
1169 @END
1172 /* Retrieve the status of an exception event */
1173 @REQ(get_exception_status)
1174 obj_handle_t handle; /* handle to the queued event */
1175 @REPLY
1176 int status; /* event continuation status */
1177 VARARG(context,context); /* modified thread context */
1178 @END
1181 /* Send an output string to the debugger */
1182 @REQ(output_debug_string)
1183 void* string; /* string to display (in debugged process address space) */
1184 int unicode; /* is it Unicode? */
1185 int length; /* string length */
1186 @END
1189 /* Continue a debug event */
1190 @REQ(continue_debug_event)
1191 process_id_t pid; /* process id to continue */
1192 thread_id_t tid; /* thread id to continue */
1193 int status; /* continuation status */
1194 @END
1197 /* Start/stop debugging an existing process */
1198 @REQ(debug_process)
1199 process_id_t pid; /* id of the process to debug */
1200 int attach; /* 1=attaching / 0=detaching from the process */
1201 @END
1204 /* Simulate a breakpoint in a process */
1205 @REQ(debug_break)
1206 obj_handle_t handle; /* process handle */
1207 @REPLY
1208 int self; /* was it the caller itself? */
1209 @END
1212 /* Set debugger kill on exit flag */
1213 @REQ(set_debugger_kill_on_exit)
1214 int kill_on_exit; /* 0=detach/1=kill debuggee when debugger dies */
1215 @END
1218 /* Read data from a process address space */
1219 @REQ(read_process_memory)
1220 obj_handle_t handle; /* process handle */
1221 void* addr; /* addr to read from */
1222 @REPLY
1223 VARARG(data,bytes); /* result data */
1224 @END
1227 /* Write data to a process address space */
1228 @REQ(write_process_memory)
1229 obj_handle_t handle; /* process handle */
1230 void* addr; /* addr to write to (must be int-aligned) */
1231 unsigned int first_mask; /* mask for first word */
1232 unsigned int last_mask; /* mask for last word */
1233 VARARG(data,bytes); /* data to write */
1234 @END
1237 /* Create a registry key */
1238 @REQ(create_key)
1239 obj_handle_t parent; /* handle to the parent key */
1240 unsigned int access; /* desired access rights */
1241 unsigned int options; /* creation options */
1242 time_t modif; /* last modification time */
1243 size_t namelen; /* length of key name in bytes */
1244 VARARG(name,unicode_str,namelen); /* key name */
1245 VARARG(class,unicode_str); /* class name */
1246 @REPLY
1247 obj_handle_t hkey; /* handle to the created key */
1248 int created; /* has it been newly created? */
1249 @END
1251 /* Open a registry key */
1252 @REQ(open_key)
1253 obj_handle_t parent; /* handle to the parent key */
1254 unsigned int access; /* desired access rights */
1255 VARARG(name,unicode_str); /* key name */
1256 @REPLY
1257 obj_handle_t hkey; /* handle to the open key */
1258 @END
1261 /* Delete a registry key */
1262 @REQ(delete_key)
1263 obj_handle_t hkey; /* handle to the key */
1264 @END
1267 /* Enumerate registry subkeys */
1268 @REQ(enum_key)
1269 obj_handle_t hkey; /* handle to registry key */
1270 int index; /* index of subkey (or -1 for current key) */
1271 int info_class; /* requested information class */
1272 @REPLY
1273 int subkeys; /* number of subkeys */
1274 int max_subkey; /* longest subkey name */
1275 int max_class; /* longest class name */
1276 int values; /* number of values */
1277 int max_value; /* longest value name */
1278 int max_data; /* longest value data */
1279 time_t modif; /* last modification time */
1280 size_t total; /* total length needed for full name and class */
1281 size_t namelen; /* length of key name in bytes */
1282 VARARG(name,unicode_str,namelen); /* key name */
1283 VARARG(class,unicode_str); /* class name */
1284 @END
1287 /* Set a value of a registry key */
1288 @REQ(set_key_value)
1289 obj_handle_t hkey; /* handle to registry key */
1290 int type; /* value type */
1291 size_t namelen; /* length of value name in bytes */
1292 VARARG(name,unicode_str,namelen); /* value name */
1293 VARARG(data,bytes); /* value data */
1294 @END
1297 /* Retrieve the value of a registry key */
1298 @REQ(get_key_value)
1299 obj_handle_t hkey; /* handle to registry key */
1300 VARARG(name,unicode_str); /* value name */
1301 @REPLY
1302 int type; /* value type */
1303 size_t total; /* total length needed for data */
1304 VARARG(data,bytes); /* value data */
1305 @END
1308 /* Enumerate a value of a registry key */
1309 @REQ(enum_key_value)
1310 obj_handle_t hkey; /* handle to registry key */
1311 int index; /* value index */
1312 int info_class; /* requested information class */
1313 @REPLY
1314 int type; /* value type */
1315 size_t total; /* total length needed for full name and data */
1316 size_t namelen; /* length of value name in bytes */
1317 VARARG(name,unicode_str,namelen); /* value name */
1318 VARARG(data,bytes); /* value data */
1319 @END
1322 /* Delete a value of a registry key */
1323 @REQ(delete_key_value)
1324 obj_handle_t hkey; /* handle to registry key */
1325 VARARG(name,unicode_str); /* value name */
1326 @END
1329 /* Load a registry branch from a file */
1330 @REQ(load_registry)
1331 obj_handle_t hkey; /* root key to load to */
1332 obj_handle_t file; /* file to load from */
1333 VARARG(name,unicode_str); /* subkey name */
1334 @END
1337 /* Save a registry branch to a file */
1338 @REQ(save_registry)
1339 obj_handle_t hkey; /* key to save */
1340 obj_handle_t file; /* file to save to */
1341 @END
1344 /* Save a registry branch at server exit */
1345 @REQ(save_registry_atexit)
1346 obj_handle_t hkey; /* key to save */
1347 VARARG(file,string); /* file to save to */
1348 @END
1351 /* Set the current and saving level for the registry */
1352 @REQ(set_registry_levels)
1353 int current; /* new current level */
1354 int saving; /* new saving level */
1355 int period; /* duration between periodic saves (milliseconds) */
1356 @END
1359 /* Create a waitable timer */
1360 @REQ(create_timer)
1361 int inherit; /* inherit flag */
1362 int manual; /* manual reset */
1363 VARARG(name,unicode_str); /* object name */
1364 @REPLY
1365 obj_handle_t handle; /* handle to the timer */
1366 @END
1369 /* Open a waitable timer */
1370 @REQ(open_timer)
1371 unsigned int access; /* wanted access rights */
1372 int inherit; /* inherit flag */
1373 VARARG(name,unicode_str); /* object name */
1374 @REPLY
1375 obj_handle_t handle; /* handle to the timer */
1376 @END
1378 /* Set a waitable timer */
1379 @REQ(set_timer)
1380 obj_handle_t handle; /* handle to the timer */
1381 int sec; /* next expiration absolute time */
1382 int usec; /* next expiration absolute time */
1383 int period; /* timer period in ms */
1384 void* callback; /* callback function */
1385 void* arg; /* callback argument */
1386 @END
1388 /* Cancel a waitable timer */
1389 @REQ(cancel_timer)
1390 obj_handle_t handle; /* handle to the timer */
1391 @END
1394 /* Retrieve the current context of a thread */
1395 @REQ(get_thread_context)
1396 obj_handle_t handle; /* thread handle */
1397 unsigned int flags; /* context flags */
1398 @REPLY
1399 VARARG(context,context); /* thread context */
1400 @END
1403 /* Set the current context of a thread */
1404 @REQ(set_thread_context)
1405 obj_handle_t handle; /* thread handle */
1406 unsigned int flags; /* context flags */
1407 VARARG(context,context); /* thread context */
1408 @END
1411 /* Fetch a selector entry for a thread */
1412 @REQ(get_selector_entry)
1413 obj_handle_t handle; /* thread handle */
1414 int entry; /* LDT entry */
1415 @REPLY
1416 unsigned int base; /* selector base */
1417 unsigned int limit; /* selector limit */
1418 unsigned char flags; /* selector flags */
1419 @END
1422 /* Add an atom */
1423 @REQ(add_atom)
1424 int local; /* is atom in local process table? */
1425 VARARG(name,unicode_str); /* atom name */
1426 @REPLY
1427 atom_t atom; /* resulting atom */
1428 @END
1431 /* Delete an atom */
1432 @REQ(delete_atom)
1433 atom_t atom; /* atom handle */
1434 int local; /* is atom in local process table? */
1435 @END
1438 /* Find an atom */
1439 @REQ(find_atom)
1440 int local; /* is atom in local process table? */
1441 VARARG(name,unicode_str); /* atom name */
1442 @REPLY
1443 atom_t atom; /* atom handle */
1444 @END
1447 /* Get an atom name */
1448 @REQ(get_atom_name)
1449 atom_t atom; /* atom handle */
1450 int local; /* is atom in local process table? */
1451 @REPLY
1452 int count; /* atom lock count */
1453 VARARG(name,unicode_str); /* atom name */
1454 @END
1457 /* Init the process atom table */
1458 @REQ(init_atom_table)
1459 int entries; /* number of entries */
1460 @END
1463 /* Get the message queue of the current thread */
1464 @REQ(get_msg_queue)
1465 @REPLY
1466 obj_handle_t handle; /* handle to the queue */
1467 @END
1470 /* Set the current message queue wakeup mask */
1471 @REQ(set_queue_mask)
1472 unsigned int wake_mask; /* wakeup bits mask */
1473 unsigned int changed_mask; /* changed bits mask */
1474 int skip_wait; /* will we skip waiting if signaled? */
1475 @REPLY
1476 unsigned int wake_bits; /* current wake bits */
1477 unsigned int changed_bits; /* current changed bits */
1478 @END
1481 /* Get the current message queue status */
1482 @REQ(get_queue_status)
1483 int clear; /* should we clear the change bits? */
1484 @REPLY
1485 unsigned int wake_bits; /* wake bits */
1486 unsigned int changed_bits; /* changed bits since last time */
1487 @END
1490 /* Wait for a process to start waiting on input */
1491 @REQ(wait_input_idle)
1492 obj_handle_t handle; /* process handle */
1493 int timeout; /* timeout */
1494 @REPLY
1495 obj_handle_t event; /* handle to idle event */
1496 @END
1499 /* Send a message to a thread queue */
1500 @REQ(send_message)
1501 thread_id_t id; /* thread id */
1502 int type; /* message type (see below) */
1503 user_handle_t win; /* window handle */
1504 unsigned int msg; /* message code */
1505 unsigned int wparam; /* parameters */
1506 unsigned int lparam; /* parameters */
1507 int x; /* x position */
1508 int y; /* y position */
1509 unsigned int time; /* message time */
1510 unsigned int info; /* extra info */
1511 int timeout; /* timeout for reply */
1512 VARARG(data,bytes); /* message data for sent messages */
1513 @END
1515 enum message_type
1517 MSG_ASCII, /* Ascii message (from SendMessageA) */
1518 MSG_UNICODE, /* Unicode message (from SendMessageW) */
1519 MSG_NOTIFY, /* notify message (from SendNotifyMessageW), always Unicode */
1520 MSG_CALLBACK, /* callback message (from SendMessageCallbackW), always Unicode */
1521 MSG_OTHER_PROCESS, /* sent from other process, may include vararg data, always Unicode */
1522 MSG_POSTED, /* posted message (from PostMessageW), always Unicode */
1523 MSG_HARDWARE_RAW, /* raw hardware message */
1524 MSG_HARDWARE_COOKED /* cooked hardware message */
1528 /* Get a message from the current queue */
1529 @REQ(get_message)
1530 int flags; /* see below */
1531 user_handle_t get_win; /* window handle to get */
1532 unsigned int get_first; /* first message code to get */
1533 unsigned int get_last; /* last message code to get */
1534 @REPLY
1535 int type; /* message type */
1536 user_handle_t win; /* window handle */
1537 unsigned int msg; /* message code */
1538 unsigned int wparam; /* parameters */
1539 unsigned int lparam; /* parameters */
1540 int x; /* x position */
1541 int y; /* y position */
1542 unsigned int time; /* message time */
1543 unsigned int info; /* extra info */
1544 size_t total; /* total size of extra data */
1545 VARARG(data,bytes); /* message data for sent messages */
1546 @END
1547 #define GET_MSG_REMOVE 1 /* remove the message */
1548 #define GET_MSG_SENT_ONLY 2 /* only get sent messages */
1549 #define GET_MSG_REMOVE_LAST 4 /* remove last message returned before checking for a new one */
1551 /* Reply to a sent message */
1552 @REQ(reply_message)
1553 unsigned int result; /* message result */
1554 int remove; /* should we remove the message? */
1555 VARARG(data,bytes); /* message data for sent messages */
1556 @END
1559 /* Retrieve the reply for the last message sent */
1560 @REQ(get_message_reply)
1561 int cancel; /* cancel message if not ready? */
1562 @REPLY
1563 unsigned int result; /* message result */
1564 VARARG(data,bytes); /* message data for sent messages */
1565 @END
1568 /* Set a window timer */
1569 @REQ(set_win_timer)
1570 user_handle_t win; /* window handle */
1571 unsigned int msg; /* message to post */
1572 unsigned int id; /* timer id */
1573 unsigned int rate; /* timer rate in ms */
1574 unsigned int lparam; /* message lparam (callback proc) */
1575 @END
1578 /* Kill a window timer */
1579 @REQ(kill_win_timer)
1580 user_handle_t win; /* window handle */
1581 unsigned int msg; /* message to post */
1582 unsigned int id; /* timer id */
1583 @END
1586 /* Open a serial port */
1587 @REQ(create_serial)
1588 unsigned int access; /* wanted access rights */
1589 int inherit; /* inherit flag */
1590 unsigned int attributes; /* eg. FILE_FLAG_OVERLAPPED */
1591 unsigned int sharing; /* sharing flags */
1592 VARARG(name,string); /* file name */
1593 @REPLY
1594 obj_handle_t handle; /* handle to the port */
1595 @END
1598 /* Retrieve info about a serial port */
1599 @REQ(get_serial_info)
1600 obj_handle_t handle; /* handle to comm port */
1601 @REPLY
1602 unsigned int readinterval;
1603 unsigned int readconst;
1604 unsigned int readmult;
1605 unsigned int writeconst;
1606 unsigned int writemult;
1607 unsigned int eventmask;
1608 unsigned int commerror;
1609 @END
1612 /* Set info about a serial port */
1613 @REQ(set_serial_info)
1614 obj_handle_t handle; /* handle to comm port */
1615 int flags; /* bitmask to set values (see below) */
1616 unsigned int readinterval;
1617 unsigned int readconst;
1618 unsigned int readmult;
1619 unsigned int writeconst;
1620 unsigned int writemult;
1621 unsigned int eventmask;
1622 unsigned int commerror;
1623 @END
1624 #define SERIALINFO_SET_TIMEOUTS 0x01
1625 #define SERIALINFO_SET_MASK 0x02
1626 #define SERIALINFO_SET_ERROR 0x04
1629 /* Create / reschedule an async I/O */
1630 @REQ(register_async)
1631 obj_handle_t handle; /* handle to comm port, socket or file */
1632 int type;
1633 void* overlapped;
1634 int count;
1635 unsigned int status;
1636 @END
1637 #define ASYNC_TYPE_NONE 0x00
1638 #define ASYNC_TYPE_READ 0x01
1639 #define ASYNC_TYPE_WRITE 0x02
1640 #define ASYNC_TYPE_WAIT 0x03
1643 /* Create a named pipe */
1644 @REQ(create_named_pipe)
1645 unsigned int openmode;
1646 unsigned int pipemode;
1647 unsigned int maxinstances;
1648 unsigned int outsize;
1649 unsigned int insize;
1650 unsigned int timeout;
1651 VARARG(name,unicode_str); /* pipe name */
1652 @REPLY
1653 obj_handle_t handle; /* handle to the pipe */
1654 @END
1657 /* Open an existing named pipe */
1658 @REQ(open_named_pipe)
1659 unsigned int access;
1660 VARARG(name,unicode_str); /* pipe name */
1661 @REPLY
1662 obj_handle_t handle; /* handle to the pipe */
1663 @END
1666 /* Connect to a named pipe */
1667 @REQ(connect_named_pipe)
1668 obj_handle_t handle;
1669 void* overlapped;
1670 void* func;
1671 @END
1674 /* Wait for a named pipe */
1675 @REQ(wait_named_pipe)
1676 unsigned int timeout;
1677 void* overlapped;
1678 void* func;
1679 VARARG(name,unicode_str); /* pipe name */
1680 @END
1683 /* Disconnect a named pipe */
1684 @REQ(disconnect_named_pipe)
1685 obj_handle_t handle;
1686 @END
1689 @REQ(get_named_pipe_info)
1690 obj_handle_t handle;
1691 @REPLY
1692 unsigned int flags;
1693 unsigned int maxinstances;
1694 unsigned int outsize;
1695 unsigned int insize;
1696 @END
1699 @REQ(create_smb)
1700 int fd;
1701 unsigned int tree_id;
1702 unsigned int user_id;
1703 unsigned int file_id;
1704 unsigned int dialect;
1705 @REPLY
1706 obj_handle_t handle;
1707 @END
1710 @REQ(get_smb_info)
1711 obj_handle_t handle;
1712 unsigned int flags;
1713 unsigned int offset;
1714 @REPLY
1715 unsigned int tree_id;
1716 unsigned int user_id;
1717 unsigned int dialect;
1718 unsigned int file_id;
1719 unsigned int offset;
1720 @END
1721 #define SMBINFO_SET_OFFSET 0x01
1724 /* Create a window */
1725 @REQ(create_window)
1726 user_handle_t parent; /* parent window */
1727 user_handle_t owner; /* owner window */
1728 atom_t atom; /* class atom */
1729 @REPLY
1730 user_handle_t handle; /* created window */
1731 @END
1734 /* Link a window into the tree */
1735 @REQ(link_window)
1736 user_handle_t handle; /* handle to the window */
1737 user_handle_t parent; /* handle to the parent */
1738 user_handle_t previous; /* previous child in Z-order */
1739 @REPLY
1740 user_handle_t full_parent; /* full handle of new parent */
1741 @END
1744 /* Destroy a window */
1745 @REQ(destroy_window)
1746 user_handle_t handle; /* handle to the window */
1747 @END
1750 /* Set a window owner */
1751 @REQ(set_window_owner)
1752 user_handle_t handle; /* handle to the window */
1753 user_handle_t owner; /* new owner */
1754 @REPLY
1755 user_handle_t full_owner; /* full handle of new owner */
1756 user_handle_t prev_owner; /* full handle of previous owner */
1757 @END
1760 /* Get information from a window handle */
1761 @REQ(get_window_info)
1762 user_handle_t handle; /* handle to the window */
1763 @REPLY
1764 user_handle_t full_handle; /* full 32-bit handle */
1765 process_id_t pid; /* process owning the window */
1766 thread_id_t tid; /* thread owning the window */
1767 atom_t atom; /* class atom */
1768 @END
1771 /* Set some information in a window */
1772 @REQ(set_window_info)
1773 user_handle_t handle; /* handle to the window */
1774 unsigned int flags; /* flags for fields to set (see below) */
1775 unsigned int style; /* window style */
1776 unsigned int ex_style; /* window extended style */
1777 unsigned int id; /* window id */
1778 void* instance; /* creator instance */
1779 void* user_data; /* user-specific data */
1780 @REPLY
1781 unsigned int old_style; /* old window style */
1782 unsigned int old_ex_style; /* old window extended style */
1783 unsigned int old_id; /* old window id */
1784 void* old_instance; /* old creator instance */
1785 void* old_user_data; /* old user-specific data */
1786 @END
1787 #define SET_WIN_STYLE 0x01
1788 #define SET_WIN_EXSTYLE 0x02
1789 #define SET_WIN_ID 0x04
1790 #define SET_WIN_INSTANCE 0x08
1791 #define SET_WIN_USERDATA 0x10
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