Only put 'pure' GL 1.2 calls in the 'opengl_norm.c' file.
[wine/wine64.git] / server / protocol.def
blob60c6399bc88b06288b403d6de3685d72dca917c0
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 void *obj_handle_t;
52 typedef void *user_handle_t;
53 typedef unsigned short atom_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 for absolute timeouts */
171 typedef struct
173 int sec; /* seconds since Unix epoch */
174 int usec; /* microseconds */
175 } abs_time_t;
177 /* structure returned in the list of window properties */
178 typedef struct
180 atom_t atom; /* property atom */
181 short string; /* was atom a string originally? */
182 obj_handle_t handle; /* handle stored in property */
183 } property_data_t;
185 /* structure to specify window rectangles */
186 typedef struct
188 int left;
189 int top;
190 int right;
191 int bottom;
192 } rectangle_t;
194 /* structure for console char/attribute info */
195 typedef struct
197 WCHAR ch;
198 unsigned short attr;
199 } char_info_t;
201 /****************************************************************/
202 /* Request declarations */
204 /* Create a new process from the context of the parent */
205 @REQ(new_process)
206 int inherit_all; /* inherit all handles from parent */
207 int use_handles; /* use stdio handles */
208 int create_flags; /* creation flags */
209 int unix_pid; /* Unix pid of new process */
210 obj_handle_t exe_file; /* file handle for main exe */
211 obj_handle_t hstdin; /* handle for stdin */
212 obj_handle_t hstdout; /* handle for stdout */
213 obj_handle_t hstderr; /* handle for stderr */
214 VARARG(info,startup_info); /* startup information */
215 @REPLY
216 obj_handle_t info; /* new process info handle */
217 @END
220 /* Retrieve information about a newly started process */
221 @REQ(get_new_process_info)
222 obj_handle_t info; /* info handle returned from new_process_request */
223 int pinherit; /* process handle inherit flag */
224 int tinherit; /* thread handle inherit flag */
225 @REPLY
226 process_id_t pid; /* process id */
227 obj_handle_t phandle; /* process handle (in the current process) */
228 thread_id_t tid; /* thread id */
229 obj_handle_t thandle; /* thread handle (in the current process) */
230 int success; /* did the process start successfully? */
231 @END
234 /* Create a new thread from the context of the parent */
235 @REQ(new_thread)
236 int suspend; /* new thread should be suspended on creation */
237 int inherit; /* inherit flag */
238 int request_fd; /* fd for request pipe */
239 @REPLY
240 thread_id_t tid; /* thread id */
241 obj_handle_t handle; /* thread handle (in the current process) */
242 @END
245 /* Signal that we are finished booting on the client side */
246 @REQ(boot_done)
247 int debug_level; /* new debug level */
248 @END
251 /* Initialize a process; called from the new process context */
252 @REQ(init_process)
253 void* ldt_copy; /* addr of LDT copy */
254 @REPLY
255 int create_flags; /* creation flags */
256 unsigned int server_start; /* server start time (GetTickCount) */
257 size_t info_size; /* total size of startup info */
258 obj_handle_t exe_file; /* file handle for main exe */
259 obj_handle_t hstdin; /* handle for stdin */
260 obj_handle_t hstdout; /* handle for stdout */
261 obj_handle_t hstderr; /* handle for stderr */
262 @END
265 /* Retrieve the new process startup info */
266 @REQ(get_startup_info)
267 @REPLY
268 VARARG(info,startup_info); /* startup information */
269 @END
272 /* Signal the end of the process initialization */
273 @REQ(init_process_done)
274 void* module; /* main module base address */
275 size_t module_size; /* main module size */
276 void* entry; /* process entry point */
277 void* name; /* ptr to ptr to name (in process addr space) */
278 obj_handle_t exe_file; /* file handle for main exe */
279 int gui; /* is it a GUI process? */
280 VARARG(filename,string); /* file name of main exe */
281 @REPLY
282 int debugged; /* being debugged? */
283 @END
286 /* Initialize a thread; called from the child after fork()/clone() */
287 @REQ(init_thread)
288 int unix_pid; /* Unix pid of new thread */
289 int unix_tid; /* Unix tid of new thread */
290 void* teb; /* TEB of new thread (in thread address space) */
291 void* entry; /* thread entry point (in thread address space) */
292 int reply_fd; /* fd for reply pipe */
293 int wait_fd; /* fd for blocking calls pipe */
294 @REPLY
295 process_id_t pid; /* process id of the new thread's process */
296 thread_id_t tid; /* thread id of the new thread */
297 int boot; /* is this the boot thread? */
298 int version; /* protocol version */
299 @END
302 /* Terminate a process */
303 @REQ(terminate_process)
304 obj_handle_t handle; /* process handle to terminate */
305 int exit_code; /* process exit code */
306 @REPLY
307 int self; /* suicide? */
308 @END
311 /* Terminate a thread */
312 @REQ(terminate_thread)
313 obj_handle_t handle; /* thread handle to terminate */
314 int exit_code; /* thread exit code */
315 @REPLY
316 int self; /* suicide? */
317 int last; /* last thread in this process? */
318 @END
321 /* Retrieve information about a process */
322 @REQ(get_process_info)
323 obj_handle_t handle; /* process handle */
324 @REPLY
325 process_id_t pid; /* server process id */
326 int debugged; /* debugged? */
327 int exit_code; /* process exit code */
328 int priority; /* priority class */
329 int process_affinity; /* process affinity mask */
330 int system_affinity; /* system affinity mask */
331 @END
334 /* Set a process informations */
335 @REQ(set_process_info)
336 obj_handle_t handle; /* process handle */
337 int mask; /* setting mask (see below) */
338 int priority; /* priority class */
339 int affinity; /* affinity mask */
340 @END
341 #define SET_PROCESS_INFO_PRIORITY 0x01
342 #define SET_PROCESS_INFO_AFFINITY 0x02
345 /* Retrieve information about a thread */
346 @REQ(get_thread_info)
347 obj_handle_t handle; /* thread handle */
348 thread_id_t tid_in; /* thread id (optional) */
349 @REPLY
350 thread_id_t tid; /* server thread id */
351 void* teb; /* thread teb pointer */
352 int exit_code; /* thread exit code */
353 int priority; /* thread priority level */
354 time_t creation_time; /* thread creation time */
355 time_t exit_time; /* thread exit time */
356 @END
359 /* Set a thread informations */
360 @REQ(set_thread_info)
361 obj_handle_t handle; /* thread handle */
362 int mask; /* setting mask (see below) */
363 int priority; /* priority class */
364 int affinity; /* affinity mask */
365 @END
366 #define SET_THREAD_INFO_PRIORITY 0x01
367 #define SET_THREAD_INFO_AFFINITY 0x02
370 /* Retrieve information about a module */
371 @REQ(get_dll_info)
372 obj_handle_t handle; /* process handle */
373 void* base_address; /* base address of module */
374 @REPLY
375 size_t size; /* module size */
376 void* entry_point;
377 VARARG(filename,string); /* file name of module */
378 @END
381 /* Suspend a thread */
382 @REQ(suspend_thread)
383 obj_handle_t handle; /* thread handle */
384 @REPLY
385 int count; /* new suspend count */
386 @END
389 /* Resume a thread */
390 @REQ(resume_thread)
391 obj_handle_t handle; /* thread handle */
392 @REPLY
393 int count; /* new suspend count */
394 @END
397 /* Notify the server that a dll has been loaded */
398 @REQ(load_dll)
399 obj_handle_t handle; /* file handle */
400 void* base; /* base address */
401 size_t size; /* dll size */
402 int dbg_offset; /* debug info offset */
403 int dbg_size; /* debug info size */
404 void* name; /* ptr to ptr to name (in process addr space) */
405 VARARG(filename,string); /* file name of dll */
406 @END
409 /* Notify the server that a dll is being unloaded */
410 @REQ(unload_dll)
411 void* base; /* base address */
412 @END
415 /* Queue an APC for a thread */
416 @REQ(queue_apc)
417 obj_handle_t handle; /* thread handle */
418 int user; /* user or system apc? */
419 void* func; /* function to call */
420 void* arg1; /* params for function to call */
421 void* arg2;
422 void* arg3;
423 @END
426 /* Get next APC to call */
427 @REQ(get_apc)
428 int alertable; /* is thread alertable? */
429 @REPLY
430 void* func; /* function to call */
431 int type; /* function type */
432 void* arg1; /* function arguments */
433 void* arg2;
434 void* arg3;
435 @END
436 enum apc_type { APC_NONE, APC_USER, APC_TIMER, APC_ASYNC, APC_ASYNC_IO };
439 /* Close a handle for the current process */
440 @REQ(close_handle)
441 obj_handle_t handle; /* handle to close */
442 @REPLY
443 int fd; /* associated fd to close */
444 @END
447 /* Set a handle information */
448 @REQ(set_handle_info)
449 obj_handle_t handle; /* handle we are interested in */
450 int flags; /* new handle flags */
451 int mask; /* mask for flags to set */
452 int fd; /* file descriptor or -1 */
453 @REPLY
454 int old_flags; /* old flag value */
455 int cur_fd; /* current file descriptor */
456 @END
459 /* Duplicate a handle */
460 @REQ(dup_handle)
461 obj_handle_t src_process; /* src process handle */
462 obj_handle_t src_handle; /* src handle to duplicate */
463 obj_handle_t dst_process; /* dst process handle */
464 unsigned int access; /* wanted access rights */
465 int inherit; /* inherit flag */
466 int options; /* duplicate options (see below) */
467 @REPLY
468 obj_handle_t handle; /* duplicated handle in dst process */
469 int fd; /* associated fd to close */
470 @END
471 #define DUP_HANDLE_CLOSE_SOURCE DUPLICATE_CLOSE_SOURCE
472 #define DUP_HANDLE_SAME_ACCESS DUPLICATE_SAME_ACCESS
473 #define DUP_HANDLE_MAKE_GLOBAL 0x80000000 /* Not a Windows flag */
476 /* Open a handle to a process */
477 @REQ(open_process)
478 process_id_t pid; /* process id to open */
479 unsigned int access; /* wanted access rights */
480 int inherit; /* inherit flag */
481 @REPLY
482 obj_handle_t handle; /* handle to the process */
483 @END
486 /* Open a handle to a thread */
487 @REQ(open_thread)
488 thread_id_t tid; /* thread id to open */
489 unsigned int access; /* wanted access rights */
490 int inherit; /* inherit flag */
491 @REPLY
492 obj_handle_t handle; /* handle to the thread */
493 @END
496 /* Wait for handles */
497 @REQ(select)
498 int flags; /* wait flags (see below) */
499 void* cookie; /* magic cookie to return to client */
500 abs_time_t timeout; /* absolute timeout */
501 VARARG(handles,handles); /* handles to select on */
502 @END
503 #define SELECT_ALL 1
504 #define SELECT_ALERTABLE 2
505 #define SELECT_INTERRUPTIBLE 4
506 #define SELECT_TIMEOUT 8
509 /* Create an event */
510 @REQ(create_event)
511 int manual_reset; /* manual reset event */
512 int initial_state; /* initial state of the event */
513 int inherit; /* inherit flag */
514 VARARG(name,unicode_str); /* object name */
515 @REPLY
516 obj_handle_t handle; /* handle to the event */
517 @END
519 /* Event operation */
520 @REQ(event_op)
521 obj_handle_t handle; /* handle to event */
522 int op; /* event operation (see below) */
523 @END
524 enum event_op { PULSE_EVENT, SET_EVENT, RESET_EVENT };
527 /* Open an event */
528 @REQ(open_event)
529 unsigned int access; /* wanted access rights */
530 int inherit; /* inherit flag */
531 VARARG(name,unicode_str); /* object name */
532 @REPLY
533 obj_handle_t handle; /* handle to the event */
534 @END
537 /* Create a mutex */
538 @REQ(create_mutex)
539 int owned; /* initially owned? */
540 int inherit; /* inherit flag */
541 VARARG(name,unicode_str); /* object name */
542 @REPLY
543 obj_handle_t handle; /* handle to the mutex */
544 @END
547 /* Release a mutex */
548 @REQ(release_mutex)
549 obj_handle_t handle; /* handle to the mutex */
550 @END
553 /* Open a mutex */
554 @REQ(open_mutex)
555 unsigned int access; /* wanted access rights */
556 int inherit; /* inherit flag */
557 VARARG(name,unicode_str); /* object name */
558 @REPLY
559 obj_handle_t handle; /* handle to the mutex */
560 @END
563 /* Create a semaphore */
564 @REQ(create_semaphore)
565 unsigned int initial; /* initial count */
566 unsigned int max; /* maximum count */
567 int inherit; /* inherit flag */
568 VARARG(name,unicode_str); /* object name */
569 @REPLY
570 obj_handle_t handle; /* handle to the semaphore */
571 @END
574 /* Release a semaphore */
575 @REQ(release_semaphore)
576 obj_handle_t handle; /* handle to the semaphore */
577 unsigned int count; /* count to add to semaphore */
578 @REPLY
579 unsigned int prev_count; /* previous semaphore count */
580 @END
583 /* Open a semaphore */
584 @REQ(open_semaphore)
585 unsigned int access; /* wanted access rights */
586 int inherit; /* inherit flag */
587 VARARG(name,unicode_str); /* object name */
588 @REPLY
589 obj_handle_t handle; /* handle to the semaphore */
590 @END
593 /* Create a file */
594 @REQ(create_file)
595 unsigned int access; /* wanted access rights */
596 int inherit; /* inherit flag */
597 unsigned int sharing; /* sharing flags */
598 int create; /* file create action */
599 unsigned int attrs; /* file attributes for creation */
600 int drive_type; /* type of drive the file is on */
601 VARARG(filename,string); /* file name */
602 @REPLY
603 obj_handle_t handle; /* handle to the file */
604 @END
607 /* Allocate a file handle for a Unix fd */
608 @REQ(alloc_file_handle)
609 unsigned int access; /* wanted access rights */
610 int inherit; /* inherit flag */
611 int fd; /* file descriptor on the client side */
612 @REPLY
613 obj_handle_t handle; /* handle to the file */
614 @END
617 /* Get a Unix fd to access a file */
618 @REQ(get_handle_fd)
619 obj_handle_t handle; /* handle to the file */
620 unsigned int access; /* wanted access rights */
621 @REPLY
622 int fd; /* file descriptor */
623 int type; /* the type of file (see below) */
624 int flags; /* file read/write flags (see below) */
625 @END
626 enum fd_type
628 FD_TYPE_INVALID,
629 FD_TYPE_DEFAULT,
630 FD_TYPE_SOCKET,
631 FD_TYPE_SMB
633 #define FD_FLAG_OVERLAPPED 0x01
634 #define FD_FLAG_TIMEOUT 0x02
635 #define FD_FLAG_RECV_SHUTDOWN 0x04
636 #define FD_FLAG_SEND_SHUTDOWN 0x08
638 /* Set a file current position */
639 @REQ(set_file_pointer)
640 obj_handle_t handle; /* handle to the file */
641 int low; /* position low word */
642 int high; /* position high word */
643 int whence; /* whence to seek */
644 @REPLY
645 int new_low; /* new position low word */
646 int new_high; /* new position high word */
647 @END
650 /* Truncate (or extend) a file */
651 @REQ(truncate_file)
652 obj_handle_t handle; /* handle to the file */
653 @END
656 /* Set a file access and modification times */
657 @REQ(set_file_time)
658 obj_handle_t handle; /* handle to the file */
659 time_t access_time; /* last access time */
660 time_t write_time; /* last write time */
661 @END
664 /* Flush a file buffers */
665 @REQ(flush_file)
666 obj_handle_t handle; /* handle to the file */
667 @REPLY
668 obj_handle_t event; /* event set when finished */
669 @END
672 /* Get information about a file */
673 @REQ(get_file_info)
674 obj_handle_t handle; /* handle to the file */
675 @REPLY
676 int type; /* file type */
677 int attr; /* file attributes */
678 time_t access_time; /* last access time */
679 time_t write_time; /* last write time */
680 time_t change_time; /* last change time */
681 int size_high; /* file size */
682 int size_low; /* file size */
683 int alloc_high; /* size used on disk */
684 int alloc_low; /* size used on disk */
685 int links; /* number of links */
686 int index_high; /* unique index */
687 int index_low; /* unique index */
688 unsigned int serial; /* volume serial number */
689 @END
692 /* Lock a region of a file */
693 @REQ(lock_file)
694 obj_handle_t handle; /* handle to the file */
695 unsigned int offset_low; /* offset of start of lock */
696 unsigned int offset_high; /* offset of start of lock */
697 unsigned int count_low; /* count of bytes to lock */
698 unsigned int count_high; /* count of bytes to lock */
699 int shared; /* shared or exclusive lock? */
700 int wait; /* do we want to wait? */
701 @REPLY
702 obj_handle_t handle; /* handle to wait on */
703 int overlapped; /* is it an overlapped I/O handle? */
704 @END
707 /* Unlock a region of a file */
708 @REQ(unlock_file)
709 obj_handle_t handle; /* handle to the file */
710 unsigned int offset_low; /* offset of start of unlock */
711 unsigned int offset_high; /* offset of start of unlock */
712 unsigned int count_low; /* count of bytes to unlock */
713 unsigned int count_high; /* count of bytes to unlock */
714 @END
717 /* Create a socket */
718 @REQ(create_socket)
719 unsigned int access; /* wanted access rights */
720 int inherit; /* inherit flag */
721 int family; /* family, see socket manpage */
722 int type; /* type, see socket manpage */
723 int protocol; /* protocol, see socket manpage */
724 unsigned int flags; /* socket flags */
725 @REPLY
726 obj_handle_t handle; /* handle to the new socket */
727 @END
730 /* Accept a socket */
731 @REQ(accept_socket)
732 obj_handle_t lhandle; /* handle to the listening socket */
733 unsigned int access; /* wanted access rights */
734 int inherit; /* inherit flag */
735 @REPLY
736 obj_handle_t handle; /* handle to the new socket */
737 @END
740 /* Set socket event parameters */
741 @REQ(set_socket_event)
742 obj_handle_t handle; /* handle to the socket */
743 unsigned int mask; /* event mask */
744 obj_handle_t event; /* event object */
745 user_handle_t window; /* window to send the message to */
746 unsigned int msg; /* message to send */
747 @END
750 /* Get socket event parameters */
751 @REQ(get_socket_event)
752 obj_handle_t handle; /* handle to the socket */
753 int service; /* clear pending? */
754 obj_handle_t c_event; /* event to clear */
755 @REPLY
756 unsigned int mask; /* event mask */
757 unsigned int pmask; /* pending events */
758 unsigned int state; /* status bits */
759 VARARG(errors,ints); /* event errors */
760 @END
763 /* Reenable pending socket events */
764 @REQ(enable_socket_event)
765 obj_handle_t handle; /* handle to the socket */
766 unsigned int mask; /* events to re-enable */
767 unsigned int sstate; /* status bits to set */
768 unsigned int cstate; /* status bits to clear */
769 @END
771 @REQ(set_socket_deferred)
772 obj_handle_t handle; /* handle to the socket */
773 obj_handle_t deferred; /* handle to the socket for which accept() is deferred */
774 @END
776 /* Allocate a console (only used by a console renderer) */
777 @REQ(alloc_console)
778 unsigned int access; /* wanted access rights */
779 int inherit; /* inherit flag */
780 process_id_t pid; /* pid of process which shall be attached to the console */
781 @REPLY
782 obj_handle_t handle_in; /* handle to console input */
783 obj_handle_t event; /* handle to renderer events change notification */
784 @END
787 /* Free the console of the current process */
788 @REQ(free_console)
789 @END
792 #define CONSOLE_RENDERER_NONE_EVENT 0x00
793 #define CONSOLE_RENDERER_TITLE_EVENT 0x01
794 #define CONSOLE_RENDERER_ACTIVE_SB_EVENT 0x02
795 #define CONSOLE_RENDERER_SB_RESIZE_EVENT 0x03
796 #define CONSOLE_RENDERER_UPDATE_EVENT 0x04
797 #define CONSOLE_RENDERER_CURSOR_POS_EVENT 0x05
798 #define CONSOLE_RENDERER_CURSOR_GEOM_EVENT 0x06
799 #define CONSOLE_RENDERER_DISPLAY_EVENT 0x07
800 #define CONSOLE_RENDERER_EXIT_EVENT 0x08
801 struct console_renderer_event
803 short event;
804 union
806 struct update
808 short top;
809 short bottom;
810 } update;
811 struct resize
813 short width;
814 short height;
815 } resize;
816 struct cursor_pos
818 short x;
819 short y;
820 } cursor_pos;
821 struct cursor_geom
823 short visible;
824 short size;
825 } cursor_geom;
826 struct display
828 short left;
829 short top;
830 short width;
831 short height;
832 } display;
833 } u;
836 /* retrieve console events for the renderer */
837 @REQ(get_console_renderer_events)
838 obj_handle_t handle; /* handle to console input events */
839 @REPLY
840 VARARG(data,bytes); /* the various console_renderer_events */
841 @END
844 /* Open a handle to the process console */
845 @REQ(open_console)
846 int from; /* 0 (resp 1) input (resp output) of current process console */
847 /* otherwise console_in handle to get active screen buffer? */
848 unsigned int access; /* wanted access rights */
849 int inherit; /* inherit flag */
850 int share; /* share mask (only for output handles) */
851 @REPLY
852 obj_handle_t handle; /* handle to the console */
853 @END
856 /* Get the input queue wait event */
857 @REQ(get_console_wait_event)
858 @REPLY
859 obj_handle_t handle;
860 @END
862 /* Get a console mode (input or output) */
863 @REQ(get_console_mode)
864 obj_handle_t handle; /* handle to the console */
865 @REPLY
866 int mode; /* console mode */
867 @END
870 /* Set a console mode (input or output) */
871 @REQ(set_console_mode)
872 obj_handle_t handle; /* handle to the console */
873 int mode; /* console mode */
874 @END
877 /* Set info about a console (input only) */
878 @REQ(set_console_input_info)
879 obj_handle_t handle; /* handle to console input, or 0 for process' console */
880 int mask; /* setting mask (see below) */
881 obj_handle_t active_sb; /* active screen buffer */
882 int history_mode; /* whether we duplicate lines in history */
883 int history_size; /* number of lines in history */
884 int edition_mode; /* index to the edition mode flavors */
885 VARARG(title,unicode_str); /* console title */
886 @END
887 #define SET_CONSOLE_INPUT_INFO_ACTIVE_SB 0x01
888 #define SET_CONSOLE_INPUT_INFO_TITLE 0x02
889 #define SET_CONSOLE_INPUT_INFO_HISTORY_MODE 0x04
890 #define SET_CONSOLE_INPUT_INFO_HISTORY_SIZE 0x08
891 #define SET_CONSOLE_INPUT_INFO_EDITION_MODE 0x10
894 /* Get info about a console (input only) */
895 @REQ(get_console_input_info)
896 obj_handle_t handle; /* handle to console input, or 0 for process' console */
897 @REPLY
898 int history_mode; /* whether we duplicate lines in history */
899 int history_size; /* number of lines in history */
900 int history_index; /* number of used lines in history */
901 int edition_mode; /* index to the edition mode flavors */
902 VARARG(title,unicode_str); /* console title */
903 @END
906 /* appends a string to console's history */
907 @REQ(append_console_input_history)
908 obj_handle_t handle; /* handle to console input, or 0 for process' console */
909 VARARG(line,unicode_str); /* line to add */
910 @END
913 /* appends a string to console's history */
914 @REQ(get_console_input_history)
915 obj_handle_t handle; /* handle to console input, or 0 for process' console */
916 int index; /* index to get line from */
917 @REPLY
918 int total; /* total length of line in Unicode chars */
919 VARARG(line,unicode_str); /* line to add */
920 @END
923 /* creates a new screen buffer on process' console */
924 @REQ(create_console_output)
925 obj_handle_t handle_in; /* handle to console input, or 0 for process' console */
926 int access; /* wanted access rights */
927 int share; /* sharing credentials */
928 int inherit; /* inherit flag */
929 @REPLY
930 obj_handle_t handle_out; /* handle to the screen buffer */
931 @END
934 /* Set info about a console (output only) */
935 @REQ(set_console_output_info)
936 obj_handle_t handle; /* handle to the console */
937 int mask; /* setting mask (see below) */
938 short int cursor_size; /* size of cursor (percentage filled) */
939 short int cursor_visible;/* cursor visibility flag */
940 short int cursor_x; /* position of cursor (x, y) */
941 short int cursor_y;
942 short int width; /* width of the screen buffer */
943 short int height; /* height of the screen buffer */
944 short int attr; /* default attribute */
945 short int win_left; /* window actually displayed by renderer */
946 short int win_top; /* the rect area is expressed withing the */
947 short int win_right; /* boundaries of the screen buffer */
948 short int win_bottom;
949 short int max_width; /* maximum size (width x height) for the window */
950 short int max_height;
951 @END
952 #define SET_CONSOLE_OUTPUT_INFO_CURSOR_GEOM 0x01
953 #define SET_CONSOLE_OUTPUT_INFO_CURSOR_POS 0x02
954 #define SET_CONSOLE_OUTPUT_INFO_SIZE 0x04
955 #define SET_CONSOLE_OUTPUT_INFO_ATTR 0x08
956 #define SET_CONSOLE_OUTPUT_INFO_DISPLAY_WINDOW 0x10
957 #define SET_CONSOLE_OUTPUT_INFO_MAX_SIZE 0x20
960 /* Get info about a console (output only) */
961 @REQ(get_console_output_info)
962 obj_handle_t handle; /* handle to the console */
963 @REPLY
964 short int cursor_size; /* size of cursor (percentage filled) */
965 short int cursor_visible;/* cursor visibility flag */
966 short int cursor_x; /* position of cursor (x, y) */
967 short int cursor_y;
968 short int width; /* width of the screen buffer */
969 short int height; /* height of the screen buffer */
970 short int attr; /* default attribute */
971 short int win_left; /* window actually displayed by renderer */
972 short int win_top; /* the rect area is expressed withing the */
973 short int win_right; /* boundaries of the screen buffer */
974 short int win_bottom;
975 short int max_width; /* maximum size (width x height) for the window */
976 short int max_height;
977 @END
979 /* Add input records to a console input queue */
980 @REQ(write_console_input)
981 obj_handle_t handle; /* handle to the console input */
982 VARARG(rec,input_records); /* input records */
983 @REPLY
984 int written; /* number of records written */
985 @END
988 /* Fetch input records from a console input queue */
989 @REQ(read_console_input)
990 obj_handle_t handle; /* handle to the console input */
991 int flush; /* flush the retrieved records from the queue? */
992 @REPLY
993 int read; /* number of records read */
994 VARARG(rec,input_records); /* input records */
995 @END
998 /* write data (chars and/or attributes) in a screen buffer */
999 @REQ(write_console_output)
1000 obj_handle_t handle; /* handle to the console output */
1001 int x; /* position where to start writing */
1002 int y;
1003 int mode; /* char info (see below) */
1004 int wrap; /* wrap around at end of line? */
1005 VARARG(data,bytes); /* info to write */
1006 @REPLY
1007 int written; /* number of char infos actually written */
1008 int width; /* width of screen buffer */
1009 int height; /* height of screen buffer */
1010 @END
1011 enum char_info_mode
1013 CHAR_INFO_MODE_TEXT, /* characters only */
1014 CHAR_INFO_MODE_ATTR, /* attributes only */
1015 CHAR_INFO_MODE_TEXTATTR, /* both characters and attributes */
1016 CHAR_INFO_MODE_TEXTSTDATTR /* characters but use standard attributes */
1020 /* fill a screen buffer with constant data (chars and/or attributes) */
1021 @REQ(fill_console_output)
1022 obj_handle_t handle; /* handle to the console output */
1023 int x; /* position where to start writing */
1024 int y;
1025 int mode; /* char info mode */
1026 int count; /* number to write */
1027 int wrap; /* wrap around at end of line? */
1028 char_info_t data; /* data to write */
1029 @REPLY
1030 int written; /* number of char infos actually written */
1031 @END
1034 /* read data (chars and/or attributes) from a screen buffer */
1035 @REQ(read_console_output)
1036 obj_handle_t handle; /* handle to the console output */
1037 int x; /* position (x,y) where to start reading */
1038 int y;
1039 int mode; /* char info mode */
1040 int wrap; /* wrap around at end of line? */
1041 @REPLY
1042 int width; /* width of screen buffer */
1043 int height; /* height of screen buffer */
1044 VARARG(data,bytes);
1045 @END
1048 /* move a rect (of data) in screen buffer content */
1049 @REQ(move_console_output)
1050 obj_handle_t handle; /* handle to the console output */
1051 short int x_src; /* position (x, y) of rect to start moving from */
1052 short int y_src;
1053 short int x_dst; /* position (x, y) of rect to move to */
1054 short int y_dst;
1055 short int w; /* size of the rect (width, height) to move */
1056 short int h;
1057 @END
1060 /* Sends a signal to a process group */
1061 @REQ(send_console_signal)
1062 int signal; /* the signal to send */
1063 process_id_t group_id; /* the group to send the signal to */
1064 @END
1067 /* Create a change notification */
1068 @REQ(create_change_notification)
1069 obj_handle_t handle; /* handle to the directory */
1070 int subtree; /* watch all the subtree */
1071 unsigned int filter; /* notification filter */
1072 @REPLY
1073 obj_handle_t handle; /* handle to the change notification */
1074 @END
1077 /* Move to the next change notification */
1078 @REQ(next_change_notification)
1079 obj_handle_t handle; /* handle to the change notification */
1080 @END
1082 /* Create a file mapping */
1083 @REQ(create_mapping)
1084 int size_high; /* mapping size */
1085 int size_low; /* mapping size */
1086 int protect; /* protection flags (see below) */
1087 unsigned int access; /* wanted access rights */
1088 int inherit; /* inherit flag */
1089 obj_handle_t file_handle; /* file handle */
1090 VARARG(name,unicode_str); /* object name */
1091 @REPLY
1092 obj_handle_t handle; /* handle to the mapping */
1093 @END
1094 /* protection flags */
1095 #define VPROT_READ 0x01
1096 #define VPROT_WRITE 0x02
1097 #define VPROT_EXEC 0x04
1098 #define VPROT_WRITECOPY 0x08
1099 #define VPROT_GUARD 0x10
1100 #define VPROT_NOCACHE 0x20
1101 #define VPROT_COMMITTED 0x40
1102 #define VPROT_IMAGE 0x80
1105 /* Open a mapping */
1106 @REQ(open_mapping)
1107 unsigned int access; /* wanted access rights */
1108 int inherit; /* inherit flag */
1109 VARARG(name,unicode_str); /* object name */
1110 @REPLY
1111 obj_handle_t handle; /* handle to the mapping */
1112 @END
1115 /* Get information about a file mapping */
1116 @REQ(get_mapping_info)
1117 obj_handle_t handle; /* handle to the mapping */
1118 @REPLY
1119 int size_high; /* mapping size */
1120 int size_low; /* mapping size */
1121 int protect; /* protection flags */
1122 int header_size; /* header size (for VPROT_IMAGE mapping) */
1123 void* base; /* default base addr (for VPROT_IMAGE mapping) */
1124 obj_handle_t shared_file; /* shared mapping file handle */
1125 int shared_size; /* shared mapping size */
1126 int drive_type; /* type of drive the file is on */
1127 @END
1130 /* Create a device */
1131 @REQ(create_device)
1132 unsigned int access; /* wanted access rights */
1133 int inherit; /* inherit flag */
1134 int id; /* client private id */
1135 @REPLY
1136 obj_handle_t handle; /* handle to the device */
1137 @END
1140 /* Retrieve the client private id for a device */
1141 @REQ(get_device_id)
1142 obj_handle_t handle; /* handle to the device */
1143 @REPLY
1144 int id; /* client private id */
1145 @END
1148 #define SNAP_HEAPLIST 0x00000001
1149 #define SNAP_PROCESS 0x00000002
1150 #define SNAP_THREAD 0x00000004
1151 #define SNAP_MODULE 0x00000008
1152 /* Create a snapshot */
1153 @REQ(create_snapshot)
1154 int inherit; /* inherit flag */
1155 int flags; /* snapshot flags (SNAP_*) */
1156 process_id_t pid; /* process id */
1157 @REPLY
1158 obj_handle_t handle; /* handle to the snapshot */
1159 @END
1162 /* Get the next process from a snapshot */
1163 @REQ(next_process)
1164 obj_handle_t handle; /* handle to the snapshot */
1165 int reset; /* reset snapshot position? */
1166 @REPLY
1167 int count; /* process usage count */
1168 process_id_t pid; /* process id */
1169 process_id_t ppid; /* parent process id */
1170 void* heap; /* heap base */
1171 void* module; /* main module */
1172 int threads; /* number of threads */
1173 int priority; /* process priority */
1174 VARARG(filename,string); /* file name of main exe */
1175 @END
1178 /* Get the next thread from a snapshot */
1179 @REQ(next_thread)
1180 obj_handle_t handle; /* handle to the snapshot */
1181 int reset; /* reset snapshot position? */
1182 @REPLY
1183 int count; /* thread usage count */
1184 process_id_t pid; /* process id */
1185 thread_id_t tid; /* thread id */
1186 int base_pri; /* base priority */
1187 int delta_pri; /* delta priority */
1188 @END
1191 /* Get the next module from a snapshot */
1192 @REQ(next_module)
1193 obj_handle_t handle; /* handle to the snapshot */
1194 int reset; /* reset snapshot position? */
1195 @REPLY
1196 process_id_t pid; /* process id */
1197 void* base; /* module base address */
1198 size_t size; /* module size */
1199 VARARG(filename,string); /* file name of module */
1200 @END
1203 /* Wait for a debug event */
1204 @REQ(wait_debug_event)
1205 int get_handle; /* should we alloc a handle for waiting? */
1206 @REPLY
1207 process_id_t pid; /* process id */
1208 thread_id_t tid; /* thread id */
1209 obj_handle_t wait; /* wait handle if no event ready */
1210 VARARG(event,debug_event); /* debug event data */
1211 @END
1214 /* Queue an exception event */
1215 @REQ(queue_exception_event)
1216 int first; /* first chance exception? */
1217 VARARG(record,exc_event); /* thread context followed by exception record */
1218 @REPLY
1219 obj_handle_t handle; /* handle to the queued event */
1220 @END
1223 /* Retrieve the status of an exception event */
1224 @REQ(get_exception_status)
1225 obj_handle_t handle; /* handle to the queued event */
1226 @REPLY
1227 int status; /* event continuation status */
1228 VARARG(context,context); /* modified thread context */
1229 @END
1232 /* Send an output string to the debugger */
1233 @REQ(output_debug_string)
1234 void* string; /* string to display (in debugged process address space) */
1235 int unicode; /* is it Unicode? */
1236 int length; /* string length */
1237 @END
1240 /* Continue a debug event */
1241 @REQ(continue_debug_event)
1242 process_id_t pid; /* process id to continue */
1243 thread_id_t tid; /* thread id to continue */
1244 int status; /* continuation status */
1245 @END
1248 /* Start/stop debugging an existing process */
1249 @REQ(debug_process)
1250 process_id_t pid; /* id of the process to debug */
1251 int attach; /* 1=attaching / 0=detaching from the process */
1252 @END
1255 /* Simulate a breakpoint in a process */
1256 @REQ(debug_break)
1257 obj_handle_t handle; /* process handle */
1258 @REPLY
1259 int self; /* was it the caller itself? */
1260 @END
1263 /* Set debugger kill on exit flag */
1264 @REQ(set_debugger_kill_on_exit)
1265 int kill_on_exit; /* 0=detach/1=kill debuggee when debugger dies */
1266 @END
1269 /* Read data from a process address space */
1270 @REQ(read_process_memory)
1271 obj_handle_t handle; /* process handle */
1272 void* addr; /* addr to read from */
1273 @REPLY
1274 VARARG(data,bytes); /* result data */
1275 @END
1278 /* Write data to a process address space */
1279 @REQ(write_process_memory)
1280 obj_handle_t handle; /* process handle */
1281 void* addr; /* addr to write to (must be int-aligned) */
1282 unsigned int first_mask; /* mask for first word */
1283 unsigned int last_mask; /* mask for last word */
1284 VARARG(data,bytes); /* data to write */
1285 @END
1288 /* Create a registry key */
1289 @REQ(create_key)
1290 obj_handle_t parent; /* handle to the parent key */
1291 unsigned int access; /* desired access rights */
1292 unsigned int options; /* creation options */
1293 time_t modif; /* last modification time */
1294 size_t namelen; /* length of key name in bytes */
1295 VARARG(name,unicode_str,namelen); /* key name */
1296 VARARG(class,unicode_str); /* class name */
1297 @REPLY
1298 obj_handle_t hkey; /* handle to the created key */
1299 int created; /* has it been newly created? */
1300 @END
1302 /* Open a registry key */
1303 @REQ(open_key)
1304 obj_handle_t parent; /* handle to the parent key */
1305 unsigned int access; /* desired access rights */
1306 VARARG(name,unicode_str); /* key name */
1307 @REPLY
1308 obj_handle_t hkey; /* handle to the open key */
1309 @END
1312 /* Delete a registry key */
1313 @REQ(delete_key)
1314 obj_handle_t hkey; /* handle to the key */
1315 @END
1318 /* Enumerate registry subkeys */
1319 @REQ(enum_key)
1320 obj_handle_t hkey; /* handle to registry key */
1321 int index; /* index of subkey (or -1 for current key) */
1322 int info_class; /* requested information class */
1323 @REPLY
1324 int subkeys; /* number of subkeys */
1325 int max_subkey; /* longest subkey name */
1326 int max_class; /* longest class name */
1327 int values; /* number of values */
1328 int max_value; /* longest value name */
1329 int max_data; /* longest value data */
1330 time_t modif; /* last modification time */
1331 size_t total; /* total length needed for full name and class */
1332 size_t namelen; /* length of key name in bytes */
1333 VARARG(name,unicode_str,namelen); /* key name */
1334 VARARG(class,unicode_str); /* class name */
1335 @END
1338 /* Set a value of a registry key */
1339 @REQ(set_key_value)
1340 obj_handle_t hkey; /* handle to registry key */
1341 int type; /* value type */
1342 size_t namelen; /* length of value name in bytes */
1343 VARARG(name,unicode_str,namelen); /* value name */
1344 VARARG(data,bytes); /* value data */
1345 @END
1348 /* Retrieve the value of a registry key */
1349 @REQ(get_key_value)
1350 obj_handle_t hkey; /* handle to registry key */
1351 VARARG(name,unicode_str); /* value name */
1352 @REPLY
1353 int type; /* value type */
1354 size_t total; /* total length needed for data */
1355 VARARG(data,bytes); /* value data */
1356 @END
1359 /* Enumerate a value of a registry key */
1360 @REQ(enum_key_value)
1361 obj_handle_t hkey; /* handle to registry key */
1362 int index; /* value index */
1363 int info_class; /* requested information class */
1364 @REPLY
1365 int type; /* value type */
1366 size_t total; /* total length needed for full name and data */
1367 size_t namelen; /* length of value name in bytes */
1368 VARARG(name,unicode_str,namelen); /* value name */
1369 VARARG(data,bytes); /* value data */
1370 @END
1373 /* Delete a value of a registry key */
1374 @REQ(delete_key_value)
1375 obj_handle_t hkey; /* handle to registry key */
1376 VARARG(name,unicode_str); /* value name */
1377 @END
1380 /* Load a registry branch from a file */
1381 @REQ(load_registry)
1382 obj_handle_t hkey; /* root key to load to */
1383 obj_handle_t file; /* file to load from */
1384 VARARG(name,unicode_str); /* subkey name */
1385 @END
1388 /* Save a registry branch to a file */
1389 @REQ(save_registry)
1390 obj_handle_t hkey; /* key to save */
1391 obj_handle_t file; /* file to save to */
1392 @END
1395 /* Save a registry branch at server exit */
1396 @REQ(save_registry_atexit)
1397 obj_handle_t hkey; /* key to save */
1398 VARARG(file,string); /* file to save to */
1399 @END
1402 /* Set the current and saving level for the registry */
1403 @REQ(set_registry_levels)
1404 int current; /* new current level */
1405 int saving; /* new saving level */
1406 int period; /* duration between periodic saves (milliseconds) */
1407 @END
1410 @REQ(set_registry_notification)
1411 obj_handle_t hkey; /* key to watch for changes */
1412 obj_handle_t event; /* event to set */
1413 int subtree; /* should we watch the whole subtree? */
1414 unsigned int filter; /* things to watch */
1415 @END
1418 /* Create a waitable timer */
1419 @REQ(create_timer)
1420 int inherit; /* inherit flag */
1421 int manual; /* manual reset */
1422 VARARG(name,unicode_str); /* object name */
1423 @REPLY
1424 obj_handle_t handle; /* handle to the timer */
1425 @END
1428 /* Open a waitable timer */
1429 @REQ(open_timer)
1430 unsigned int access; /* wanted access rights */
1431 int inherit; /* inherit flag */
1432 VARARG(name,unicode_str); /* object name */
1433 @REPLY
1434 obj_handle_t handle; /* handle to the timer */
1435 @END
1437 /* Set a waitable timer */
1438 @REQ(set_timer)
1439 obj_handle_t handle; /* handle to the timer */
1440 abs_time_t expire; /* next expiration absolute time */
1441 int period; /* timer period in ms */
1442 void* callback; /* callback function */
1443 void* arg; /* callback argument */
1444 @REPLY
1445 int signaled; /* was the timer signaled before this call ? */
1446 @END
1448 /* Cancel a waitable timer */
1449 @REQ(cancel_timer)
1450 obj_handle_t handle; /* handle to the timer */
1451 @REPLY
1452 int signaled; /* was the timer signaled before this calltime ? */
1453 @END
1456 /* Retrieve the current context of a thread */
1457 @REQ(get_thread_context)
1458 obj_handle_t handle; /* thread handle */
1459 unsigned int flags; /* context flags */
1460 @REPLY
1461 VARARG(context,context); /* thread context */
1462 @END
1465 /* Set the current context of a thread */
1466 @REQ(set_thread_context)
1467 obj_handle_t handle; /* thread handle */
1468 unsigned int flags; /* context flags */
1469 VARARG(context,context); /* thread context */
1470 @END
1473 /* Fetch a selector entry for a thread */
1474 @REQ(get_selector_entry)
1475 obj_handle_t handle; /* thread handle */
1476 int entry; /* LDT entry */
1477 @REPLY
1478 unsigned int base; /* selector base */
1479 unsigned int limit; /* selector limit */
1480 unsigned char flags; /* selector flags */
1481 @END
1484 /* Add an atom */
1485 @REQ(add_atom)
1486 int local; /* is atom in local process table? */
1487 VARARG(name,unicode_str); /* atom name */
1488 @REPLY
1489 atom_t atom; /* resulting atom */
1490 @END
1493 /* Delete an atom */
1494 @REQ(delete_atom)
1495 atom_t atom; /* atom handle */
1496 int local; /* is atom in local process table? */
1497 @END
1500 /* Find an atom */
1501 @REQ(find_atom)
1502 int local; /* is atom in local process table? */
1503 VARARG(name,unicode_str); /* atom name */
1504 @REPLY
1505 atom_t atom; /* atom handle */
1506 @END
1509 /* Get an atom name */
1510 @REQ(get_atom_name)
1511 atom_t atom; /* atom handle */
1512 int local; /* is atom in local process table? */
1513 @REPLY
1514 int count; /* atom lock count */
1515 VARARG(name,unicode_str); /* atom name */
1516 @END
1519 /* Init the process atom table */
1520 @REQ(init_atom_table)
1521 int entries; /* number of entries */
1522 @END
1525 /* Get the message queue of the current thread */
1526 @REQ(get_msg_queue)
1527 @REPLY
1528 obj_handle_t handle; /* handle to the queue */
1529 @END
1532 /* Set the current message queue wakeup mask */
1533 @REQ(set_queue_mask)
1534 unsigned int wake_mask; /* wakeup bits mask */
1535 unsigned int changed_mask; /* changed bits mask */
1536 int skip_wait; /* will we skip waiting if signaled? */
1537 @REPLY
1538 unsigned int wake_bits; /* current wake bits */
1539 unsigned int changed_bits; /* current changed bits */
1540 @END
1543 /* Get the current message queue status */
1544 @REQ(get_queue_status)
1545 int clear; /* should we clear the change bits? */
1546 @REPLY
1547 unsigned int wake_bits; /* wake bits */
1548 unsigned int changed_bits; /* changed bits since last time */
1549 @END
1552 /* Wait for a process to start waiting on input */
1553 @REQ(wait_input_idle)
1554 obj_handle_t handle; /* process handle */
1555 int timeout; /* timeout */
1556 @REPLY
1557 obj_handle_t event; /* handle to idle event */
1558 @END
1561 /* Send a message to a thread queue */
1562 @REQ(send_message)
1563 thread_id_t id; /* thread id */
1564 int type; /* message type (see below) */
1565 user_handle_t win; /* window handle */
1566 unsigned int msg; /* message code */
1567 unsigned int wparam; /* parameters */
1568 unsigned int lparam; /* parameters */
1569 int x; /* x position */
1570 int y; /* y position */
1571 unsigned int time; /* message time */
1572 unsigned int info; /* extra info */
1573 int timeout; /* timeout for reply */
1574 VARARG(data,bytes); /* message data for sent messages */
1575 @END
1577 enum message_type
1579 MSG_ASCII, /* Ascii message (from SendMessageA) */
1580 MSG_UNICODE, /* Unicode message (from SendMessageW) */
1581 MSG_NOTIFY, /* notify message (from SendNotifyMessageW), always Unicode */
1582 MSG_CALLBACK, /* callback message (from SendMessageCallbackW), always Unicode */
1583 MSG_OTHER_PROCESS, /* sent from other process, may include vararg data, always Unicode */
1584 MSG_POSTED, /* posted message (from PostMessageW), always Unicode */
1585 MSG_HARDWARE /* hardware message */
1589 /* Get a message from the current queue */
1590 @REQ(get_message)
1591 int flags; /* see below */
1592 user_handle_t get_win; /* window handle to get */
1593 unsigned int get_first; /* first message code to get */
1594 unsigned int get_last; /* last message code to get */
1595 @REPLY
1596 int type; /* message type */
1597 user_handle_t win; /* window handle */
1598 unsigned int msg; /* message code */
1599 unsigned int wparam; /* parameters */
1600 unsigned int lparam; /* parameters */
1601 int x; /* x position */
1602 int y; /* y position */
1603 unsigned int time; /* message time */
1604 unsigned int info; /* extra info */
1605 size_t total; /* total size of extra data */
1606 VARARG(data,bytes); /* message data for sent messages */
1607 @END
1608 #define GET_MSG_REMOVE 1 /* remove the message */
1609 #define GET_MSG_SENT_ONLY 2 /* only get sent messages */
1611 /* Reply to a sent message */
1612 @REQ(reply_message)
1613 int type; /* type of original message */
1614 unsigned int result; /* message result */
1615 int remove; /* should we remove the message? */
1616 VARARG(data,bytes); /* message data for sent messages */
1617 @END
1620 /* Retrieve the reply for the last message sent */
1621 @REQ(get_message_reply)
1622 int cancel; /* cancel message if not ready? */
1623 @REPLY
1624 unsigned int result; /* message result */
1625 VARARG(data,bytes); /* message data for sent messages */
1626 @END
1629 /* Set a window timer */
1630 @REQ(set_win_timer)
1631 user_handle_t win; /* window handle */
1632 unsigned int msg; /* message to post */
1633 unsigned int id; /* timer id */
1634 unsigned int rate; /* timer rate in ms */
1635 unsigned int lparam; /* message lparam (callback proc) */
1636 @END
1639 /* Kill a window timer */
1640 @REQ(kill_win_timer)
1641 user_handle_t win; /* window handle */
1642 unsigned int msg; /* message to post */
1643 unsigned int id; /* timer id */
1644 @END
1647 /* Open a serial port */
1648 @REQ(create_serial)
1649 unsigned int access; /* wanted access rights */
1650 int inherit; /* inherit flag */
1651 unsigned int attributes; /* eg. FILE_FLAG_OVERLAPPED */
1652 unsigned int sharing; /* sharing flags */
1653 VARARG(name,string); /* file name */
1654 @REPLY
1655 obj_handle_t handle; /* handle to the port */
1656 @END
1659 /* Retrieve info about a serial port */
1660 @REQ(get_serial_info)
1661 obj_handle_t handle; /* handle to comm port */
1662 @REPLY
1663 unsigned int readinterval;
1664 unsigned int readconst;
1665 unsigned int readmult;
1666 unsigned int writeconst;
1667 unsigned int writemult;
1668 unsigned int eventmask;
1669 unsigned int commerror;
1670 @END
1673 /* Set info about a serial port */
1674 @REQ(set_serial_info)
1675 obj_handle_t handle; /* handle to comm port */
1676 int flags; /* bitmask to set values (see below) */
1677 unsigned int readinterval;
1678 unsigned int readconst;
1679 unsigned int readmult;
1680 unsigned int writeconst;
1681 unsigned int writemult;
1682 unsigned int eventmask;
1683 unsigned int commerror;
1684 @END
1685 #define SERIALINFO_SET_TIMEOUTS 0x01
1686 #define SERIALINFO_SET_MASK 0x02
1687 #define SERIALINFO_SET_ERROR 0x04
1690 /* Create / reschedule an async I/O */
1691 @REQ(register_async)
1692 obj_handle_t handle; /* handle to comm port, socket or file */
1693 int type;
1694 void* overlapped;
1695 int count;
1696 unsigned int status;
1697 @END
1698 #define ASYNC_TYPE_NONE 0x00
1699 #define ASYNC_TYPE_READ 0x01
1700 #define ASYNC_TYPE_WRITE 0x02
1701 #define ASYNC_TYPE_WAIT 0x03
1704 /* Create a named pipe */
1705 @REQ(create_named_pipe)
1706 unsigned int openmode;
1707 unsigned int pipemode;
1708 unsigned int maxinstances;
1709 unsigned int outsize;
1710 unsigned int insize;
1711 unsigned int timeout;
1712 VARARG(name,unicode_str); /* pipe name */
1713 @REPLY
1714 obj_handle_t handle; /* handle to the pipe */
1715 @END
1718 /* Open an existing named pipe */
1719 @REQ(open_named_pipe)
1720 unsigned int access;
1721 int inherit; /* inherit flag */
1722 VARARG(name,unicode_str); /* pipe name */
1723 @REPLY
1724 obj_handle_t handle; /* handle to the pipe */
1725 @END
1728 /* Connect to a named pipe */
1729 @REQ(connect_named_pipe)
1730 obj_handle_t handle;
1731 void* overlapped;
1732 void* func;
1733 @END
1736 /* Wait for a named pipe */
1737 @REQ(wait_named_pipe)
1738 unsigned int timeout;
1739 void* overlapped;
1740 void* func;
1741 VARARG(name,unicode_str); /* pipe name */
1742 @END
1745 /* Disconnect a named pipe */
1746 @REQ(disconnect_named_pipe)
1747 obj_handle_t handle;
1748 @REPLY
1749 int fd; /* associated fd to close */
1750 @END
1753 @REQ(get_named_pipe_info)
1754 obj_handle_t handle;
1755 @REPLY
1756 unsigned int flags;
1757 unsigned int maxinstances;
1758 unsigned int outsize;
1759 unsigned int insize;
1760 @END
1763 @REQ(create_smb)
1764 int fd;
1765 unsigned int tree_id;
1766 unsigned int user_id;
1767 unsigned int file_id;
1768 unsigned int dialect;
1769 @REPLY
1770 obj_handle_t handle;
1771 @END
1774 @REQ(get_smb_info)
1775 obj_handle_t handle;
1776 unsigned int flags;
1777 unsigned int offset;
1778 @REPLY
1779 unsigned int tree_id;
1780 unsigned int user_id;
1781 unsigned int dialect;
1782 unsigned int file_id;
1783 unsigned int offset;
1784 @END
1785 #define SMBINFO_SET_OFFSET 0x01
1788 /* Create a window */
1789 @REQ(create_window)
1790 user_handle_t parent; /* parent window */
1791 user_handle_t owner; /* owner window */
1792 atom_t atom; /* class atom */
1793 @REPLY
1794 user_handle_t handle; /* created window */
1795 @END
1798 /* Link a window into the tree */
1799 @REQ(link_window)
1800 user_handle_t handle; /* handle to the window */
1801 user_handle_t parent; /* handle to the parent */
1802 user_handle_t previous; /* previous child in Z-order */
1803 @REPLY
1804 user_handle_t full_parent; /* full handle of new parent */
1805 @END
1808 /* Destroy a window */
1809 @REQ(destroy_window)
1810 user_handle_t handle; /* handle to the window */
1811 @END
1814 /* Set a window owner */
1815 @REQ(set_window_owner)
1816 user_handle_t handle; /* handle to the window */
1817 user_handle_t owner; /* new owner */
1818 @REPLY
1819 user_handle_t full_owner; /* full handle of new owner */
1820 user_handle_t prev_owner; /* full handle of previous owner */
1821 @END
1824 /* Get information from a window handle */
1825 @REQ(get_window_info)
1826 user_handle_t handle; /* handle to the window */
1827 @REPLY
1828 user_handle_t full_handle; /* full 32-bit handle */
1829 user_handle_t last_active; /* last active popup */
1830 process_id_t pid; /* process owning the window */
1831 thread_id_t tid; /* thread owning the window */
1832 atom_t atom; /* class atom */
1833 @END
1836 /* Set some information in a window */
1837 @REQ(set_window_info)
1838 user_handle_t handle; /* handle to the window */
1839 unsigned int flags; /* flags for fields to set (see below) */
1840 unsigned int style; /* window style */
1841 unsigned int ex_style; /* window extended style */
1842 unsigned int id; /* window id */
1843 void* instance; /* creator instance */
1844 void* user_data; /* user-specific data */
1845 @REPLY
1846 unsigned int old_style; /* old window style */
1847 unsigned int old_ex_style; /* old window extended style */
1848 unsigned int old_id; /* old window id */
1849 void* old_instance; /* old creator instance */
1850 void* old_user_data; /* old user-specific data */
1851 @END
1852 #define SET_WIN_STYLE 0x01
1853 #define SET_WIN_EXSTYLE 0x02
1854 #define SET_WIN_ID 0x04
1855 #define SET_WIN_INSTANCE 0x08
1856 #define SET_WIN_USERDATA 0x10
1859 /* Get a list of the window parents, up to the root of the tree */
1860 @REQ(get_window_parents)
1861 user_handle_t handle; /* handle to the window */
1862 @REPLY
1863 int count; /* total count of parents */
1864 VARARG(parents,user_handles); /* parent handles */
1865 @END
1868 /* Get a list of the window children */
1869 @REQ(get_window_children)
1870 user_handle_t parent; /* parent window */
1871 atom_t atom; /* class atom for the listed children */
1872 thread_id_t tid; /* thread owning the listed children */
1873 @REPLY
1874 int count; /* total count of children */
1875 VARARG(children,user_handles); /* children handles */
1876 @END
1879 /* Get window tree information from a window handle */
1880 @REQ(get_window_tree)
1881 user_handle_t handle; /* handle to the window */
1882 @REPLY
1883 user_handle_t parent; /* parent window */
1884 user_handle_t owner; /* owner window */
1885 user_handle_t next_sibling; /* next sibling in Z-order */
1886 user_handle_t prev_sibling; /* prev sibling in Z-order */
1887 user_handle_t first_sibling; /* first sibling in Z-order */
1888 user_handle_t last_sibling; /* last sibling in Z-order */
1889 user_handle_t first_child; /* first child */
1890 user_handle_t last_child; /* last child */
1891 @END
1893 /* Set the window and client rectangles of a window */
1894 @REQ(set_window_rectangles)
1895 user_handle_t handle; /* handle to the window */
1896 rectangle_t window; /* window rectangle */
1897 rectangle_t client; /* client rectangle */
1898 @END
1901 /* Get the window and client rectangles of a window */
1902 @REQ(get_window_rectangles)
1903 user_handle_t handle; /* handle to the window */
1904 @REPLY
1905 rectangle_t window; /* window rectangle */
1906 rectangle_t client; /* client rectangle */
1907 @END
1910 /* Get the window text */
1911 @REQ(get_window_text)
1912 user_handle_t handle; /* handle to the window */
1913 @REPLY
1914 VARARG(text,unicode_str); /* window text */
1915 @END
1918 /* Set the window text */
1919 @REQ(set_window_text)
1920 user_handle_t handle; /* handle to the window */
1921 VARARG(text,unicode_str); /* window text */
1922 @END
1925 /* Increment the window paint count */
1926 @REQ(inc_window_paint_count)
1927 user_handle_t handle; /* handle to the window */
1928 int incr; /* increment (can be negative) */
1929 @END
1932 /* Get the coordinates offset between two windows */
1933 @REQ(get_windows_offset)
1934 user_handle_t from; /* handle to the first window */
1935 user_handle_t to; /* handle to the second window */
1936 @REPLY
1937 int x; /* x coordinate offset */
1938 int y; /* y coordinate offset */
1939 @END
1942 /* Set a window property */
1943 @REQ(set_window_property)
1944 user_handle_t window; /* handle to the window */
1945 atom_t atom; /* property atom (high-word set if it was a string) */
1946 int string; /* was atom a string originally? */
1947 obj_handle_t handle; /* handle to store */
1948 @END
1951 /* Remove a window property */
1952 @REQ(remove_window_property)
1953 user_handle_t window; /* handle to the window */
1954 atom_t atom; /* property atom */
1955 @REPLY
1956 obj_handle_t handle; /* handle stored in property */
1957 @END
1960 /* Get a window property */
1961 @REQ(get_window_property)
1962 user_handle_t window; /* handle to the window */
1963 atom_t atom; /* property atom */
1964 @REPLY
1965 obj_handle_t handle; /* handle stored in property */
1966 @END
1969 /* Get the list of properties of a window */
1970 @REQ(get_window_properties)
1971 user_handle_t window; /* handle to the window */
1972 @REPLY
1973 int total; /* total number of properties */
1974 VARARG(props,properties); /* list of properties */
1975 @END
1978 /* Attach (or detach) thread inputs */
1979 @REQ(attach_thread_input)
1980 thread_id_t tid_from; /* thread to be attached */
1981 thread_id_t tid_to; /* thread to which tid_from should be attached */
1982 int attach; /* is it an attach? */
1983 @END
1986 /* Get input data for a given thread */
1987 @REQ(get_thread_input)
1988 thread_id_t tid; /* id of thread */
1989 @REPLY
1990 user_handle_t focus; /* handle to the focus window */
1991 user_handle_t capture; /* handle to the capture window */
1992 user_handle_t active; /* handle to the active window */
1993 user_handle_t foreground; /* handle to the global foreground window */
1994 user_handle_t menu_owner; /* handle to the menu owner */
1995 user_handle_t move_size; /* handle to the moving/resizing window */
1996 user_handle_t caret; /* handle to the caret window */
1997 rectangle_t rect; /* caret rectangle */
1998 @END
2000 /* Retrieve queue keyboard state for a given thread */
2001 @REQ(get_key_state)
2002 thread_id_t tid; /* id of thread */
2003 int key; /* optional key code or -1 */
2004 @REPLY
2005 unsigned char state; /* state of specified key */
2006 VARARG(keystate,bytes); /* state array for all the keys */
2007 @END
2009 /* Set queue keyboard state for a given thread */
2010 @REQ(set_key_state)
2011 thread_id_t tid; /* id of thread */
2012 VARARG(keystate,bytes); /* state array for all the keys */
2013 @END
2015 /* Set the system foreground window */
2016 @REQ(set_foreground_window)
2017 user_handle_t handle; /* handle to the foreground window */
2018 @REPLY
2019 user_handle_t previous; /* handle to the previous foreground window */
2020 int send_msg_old; /* whether we have to send a msg to the old window */
2021 int send_msg_new; /* whether we have to send a msg to the new window */
2022 @END
2024 /* Set the current thread focus window */
2025 @REQ(set_focus_window)
2026 user_handle_t handle; /* handle to the focus window */
2027 @REPLY
2028 user_handle_t previous; /* handle to the previous focus window */
2029 @END
2031 /* Set the current thread active window */
2032 @REQ(set_active_window)
2033 user_handle_t handle; /* handle to the active window */
2034 @REPLY
2035 user_handle_t previous; /* handle to the previous active window */
2036 @END
2038 /* Set the current thread capture window */
2039 @REQ(set_capture_window)
2040 user_handle_t handle; /* handle to the capture window */
2041 unsigned int flags; /* capture flags (see below) */
2042 @REPLY
2043 user_handle_t previous; /* handle to the previous capture window */
2044 user_handle_t full_handle; /* full 32-bit handle of new capture window */
2045 @END
2046 #define CAPTURE_MENU 0x01 /* capture is for a menu */
2047 #define CAPTURE_MOVESIZE 0x02 /* capture is for moving/resizing */
2050 /* Set the current thread caret window */
2051 @REQ(set_caret_window)
2052 user_handle_t handle; /* handle to the caret window */
2053 int width; /* caret width */
2054 int height; /* caret height */
2055 @REPLY
2056 user_handle_t previous; /* handle to the previous caret window */
2057 rectangle_t old_rect; /* previous caret rectangle */
2058 int old_hide; /* previous hide count */
2059 int old_state; /* previous caret state (1=on, 0=off) */
2060 @END
2063 /* Set the current thread caret information */
2064 @REQ(set_caret_info)
2065 unsigned int flags; /* caret flags (see below) */
2066 user_handle_t handle; /* handle to the caret window */
2067 int x; /* caret x position */
2068 int y; /* caret y position */
2069 int hide; /* increment for hide count (can be negative to show it) */
2070 int state; /* caret state (1=on, 0=off, -1=toggle current state) */
2071 @REPLY
2072 user_handle_t full_handle; /* handle to the current caret window */
2073 rectangle_t old_rect; /* previous caret rectangle */
2074 int old_hide; /* previous hide count */
2075 int old_state; /* previous caret state (1=on, 0=off) */
2076 @END
2077 #define SET_CARET_POS 0x01 /* set the caret position from x,y */
2078 #define SET_CARET_HIDE 0x02 /* increment the caret hide count */
2079 #define SET_CARET_STATE 0x04 /* set the caret on/off state */
2082 /* Set a window hook */
2083 @REQ(set_hook)
2084 int id; /* id of the hook */
2085 thread_id_t tid; /* id of thread to set the hook into */
2086 void* proc; /* hook procedure */
2087 int unicode; /* is it a unicode hook? */
2088 VARARG(module,unicode_str); /* module name */
2089 @REPLY
2090 user_handle_t handle; /* handle to the hook */
2091 @END
2094 /* Remove a window hook */
2095 @REQ(remove_hook)
2096 user_handle_t handle; /* handle to the hook */
2097 int id; /* id of the hook if handle is 0 */
2098 void* proc; /* hook procedure if handle is 0 */
2099 @END
2102 /* Start calling a hook chain */
2103 @REQ(start_hook_chain)
2104 int id; /* id of the hook */
2105 @REPLY
2106 user_handle_t handle; /* handle to the next hook */
2107 void* proc; /* hook procedure */
2108 int unicode; /* is it a unicode hook? */
2109 VARARG(module,unicode_str); /* module name */
2110 @END
2113 /* Finished calling a hook chain */
2114 @REQ(finish_hook_chain)
2115 int id; /* id of the hook */
2116 @END
2119 /* Get the next hook to call */
2120 @REQ(get_next_hook)
2121 user_handle_t handle; /* handle to the current hook */
2122 @REPLY
2123 user_handle_t next; /* handle to the next hook */
2124 int id; /* id of the next hook */
2125 void* proc; /* next hook procedure */
2126 int prev_unicode; /* was the previous a unicode hook? */
2127 int next_unicode; /* is the next a unicode hook? */
2128 VARARG(module,unicode_str); /* module name */
2129 @END
2132 /* Set/get clipboard information */
2133 @REQ(set_clipboard_info)
2134 unsigned int flags; /* flags for fields to set (see below) */
2135 user_handle_t clipboard; /* clipboard window */
2136 user_handle_t owner; /* clipboard owner */
2137 user_handle_t viewer; /* first clipboard viewer */
2138 unsigned int seqno; /* change sequence number */
2139 @REPLY
2140 unsigned int flags; /* status flags (see below) */
2141 user_handle_t old_clipboard; /* old clipboard window */
2142 user_handle_t old_owner; /* old clipboard owner */
2143 user_handle_t old_viewer; /* old clipboard viewer */
2144 unsigned int seqno; /* current sequence number */
2145 @END
2147 #define SET_CB_OPEN 0x001
2148 #define SET_CB_OWNER 0x002
2149 #define SET_CB_VIEWER 0x004
2150 #define SET_CB_SEQNO 0x008
2151 #define SET_CB_RELOWNER 0x010
2152 #define SET_CB_CLOSE 0x020
2153 #define CB_OPEN 0x040
2154 #define CB_OWNER 0x080