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