msi: Apply any MSI transforms specified by the TRANSFORMS property.
[wine/multimedia.git] / server / protocol.def
blob65d18b9e18d7a3e91844c5692190aa3ce796ab88
1 /* -*- C -*-
3 * Wine server protocol definition
5 * Copyright (C) 2001 Alexandre Julliard
7 * This file is used by tools/make_requests to build the
8 * protocol structures in include/wine/server_protocol.h
10 * This library is free software; you can redistribute it and/or
11 * modify it under the terms of the GNU Lesser General Public
12 * License as published by the Free Software Foundation; either
13 * version 2.1 of the License, or (at your option) any later version.
15 * This library is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 * Lesser General Public License for more details.
20 * You should have received a copy of the GNU Lesser General Public
21 * License along with this library; if not, write to the Free Software
22 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
25 @HEADER /* start of C declarations */
27 #include <stdarg.h>
28 #include <stdlib.h>
29 #include <time.h>
31 #include <windef.h>
32 #include <winbase.h>
34 struct request_header
36 int req; /* request code */
37 size_t request_size; /* request variable part size */
38 size_t reply_size; /* reply variable part maximum size */
41 struct reply_header
43 unsigned int error; /* error result */
44 size_t reply_size; /* reply variable part size */
47 /* placeholder structure for the maximum allowed request size */
48 /* this is used to construct the generic_request union */
49 struct request_max_size
51 int pad[16]; /* the max request size is 16 ints */
54 typedef void *obj_handle_t;
55 typedef void *user_handle_t;
56 typedef unsigned short atom_t;
57 typedef unsigned int process_id_t;
58 typedef unsigned int thread_id_t;
60 #define FIRST_USER_HANDLE 0x0020 /* first possible value for low word of user handle */
61 #define LAST_USER_HANDLE 0xffef /* last possible value for low word of user handle */
64 /* definitions of the event data depending on the event code */
65 struct debug_event_exception
67 EXCEPTION_RECORD record; /* exception record */
68 int first; /* first chance exception? */
70 struct debug_event_create_thread
72 obj_handle_t handle; /* handle to the new thread */
73 void *teb; /* thread teb (in debugged process address space) */
74 void *start; /* thread startup routine */
76 struct debug_event_create_process
78 obj_handle_t file; /* handle to the process exe file */
79 obj_handle_t process; /* handle to the new process */
80 obj_handle_t thread; /* handle to the new thread */
81 void *base; /* base of executable image */
82 int dbg_offset; /* offset of debug info in file */
83 int dbg_size; /* size of debug info */
84 void *teb; /* thread teb (in debugged process address space) */
85 void *start; /* thread startup routine */
86 void *name; /* image name (optional) */
87 int unicode; /* is it Unicode? */
89 struct debug_event_exit
91 int exit_code; /* thread or process exit code */
93 struct debug_event_load_dll
95 obj_handle_t handle; /* file handle for the dll */
96 void *base; /* base address of the dll */
97 int dbg_offset; /* offset of debug info in file */
98 int dbg_size; /* size of debug info */
99 void *name; /* image name (optional) */
100 int unicode; /* is it Unicode? */
102 struct debug_event_unload_dll
104 void *base; /* base address of the dll */
106 struct debug_event_output_string
108 void *string; /* string to display (in debugged process address space) */
109 int unicode; /* is it Unicode? */
110 int length; /* string length */
112 struct debug_event_rip_info
114 int error; /* ??? */
115 int type; /* ??? */
117 union debug_event_data
119 struct debug_event_exception exception;
120 struct debug_event_create_thread create_thread;
121 struct debug_event_create_process create_process;
122 struct debug_event_exit exit;
123 struct debug_event_load_dll load_dll;
124 struct debug_event_unload_dll unload_dll;
125 struct debug_event_output_string output_string;
126 struct debug_event_rip_info rip_info;
129 /* debug event data */
130 typedef struct
132 int code; /* event code */
133 union debug_event_data info; /* event information */
134 } debug_event_t;
136 /* structure used in sending an fd from client to server */
137 struct send_fd
139 thread_id_t tid; /* thread id */
140 int fd; /* file descriptor on client-side */
143 /* structure sent by the server on the wait fifo */
144 struct wake_up_reply
146 void *cookie; /* magic cookie that was passed in select_request */
147 int signaled; /* wait result */
150 /* structure for absolute timeouts */
151 typedef struct
153 int sec; /* seconds since Unix epoch */
154 int usec; /* microseconds */
155 } abs_time_t;
157 /* structure returned in the list of window properties */
158 typedef struct
160 atom_t atom; /* property atom */
161 short string; /* was atom a string originally? */
162 obj_handle_t handle; /* handle stored in property */
163 } property_data_t;
165 /* structure to specify window rectangles */
166 typedef struct
168 int left;
169 int top;
170 int right;
171 int bottom;
172 } rectangle_t;
174 /* structure for console char/attribute info */
175 typedef struct
177 WCHAR ch;
178 unsigned short attr;
179 } char_info_t;
181 #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 /****************************************************************/
197 /* Request declarations */
199 /* Create a new process from the context of the parent */
200 @REQ(new_process)
201 int inherit_all; /* inherit all handles from parent */
202 unsigned int create_flags; /* creation flags */
203 int unix_pid; /* Unix pid of new process */
204 obj_handle_t exe_file; /* file handle for main exe */
205 obj_handle_t hstdin; /* handle for stdin */
206 obj_handle_t hstdout; /* handle for stdout */
207 obj_handle_t hstderr; /* handle for stderr */
208 VARARG(info,startup_info); /* startup information */
209 VARARG(env,unicode_str); /* environment for new process */
210 @REPLY
211 obj_handle_t info; /* new process info handle */
212 @END
215 /* Retrieve information about a newly started process */
216 @REQ(get_new_process_info)
217 obj_handle_t info; /* info handle returned from new_process_request */
218 unsigned int process_access; /* access rights for process object */
219 unsigned int process_attr; /* attributes for process object */
220 unsigned int thread_access; /* access rights for thread object */
221 unsigned int thread_attr; /* attributes for thread object */
222 @REPLY
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 int success; /* did the process start successfully? */
228 @END
231 /* Create a new thread from the context of the parent */
232 @REQ(new_thread)
233 unsigned int access; /* wanted access rights */
234 unsigned int attributes; /* object attributes */
235 int suspend; /* new thread should be suspended on creation */
236 int request_fd; /* fd for request pipe */
237 @REPLY
238 thread_id_t tid; /* thread id */
239 obj_handle_t handle; /* thread handle (in the current process) */
240 @END
243 /* Retrieve the new process startup info */
244 @REQ(get_startup_info)
245 @REPLY
246 unsigned int create_flags; /* creation flags */
247 obj_handle_t exe_file; /* file handle for main exe */
248 obj_handle_t hstdin; /* handle for stdin */
249 obj_handle_t hstdout; /* handle for stdout */
250 obj_handle_t hstderr; /* handle for stderr */
251 VARARG(info,startup_info); /* startup information */
252 VARARG(env,unicode_str); /* environment */
253 @END
256 /* Signal the end of the process initialization */
257 @REQ(init_process_done)
258 void* module; /* main module base address */
259 size_t module_size; /* main module size */
260 void* entry; /* process entry point */
261 void* name; /* ptr to ptr to name (in process addr space) */
262 obj_handle_t exe_file; /* file handle for main exe */
263 int gui; /* is it a GUI process? */
264 VARARG(filename,unicode_str); /* file name of main exe */
265 @END
268 /* Initialize a thread; called from the child after fork()/clone() */
269 @REQ(init_thread)
270 int unix_pid; /* Unix pid of new thread */
271 int unix_tid; /* Unix tid of new thread */
272 void* teb; /* TEB of new thread (in thread address space) */
273 void* peb; /* address of PEB (in thread address space) */
274 void* entry; /* thread entry point (in thread address space) */
275 void* ldt_copy; /* address of LDT copy (in thread address space) */
276 int reply_fd; /* fd for reply pipe */
277 int wait_fd; /* fd for blocking calls pipe */
278 int debug_level; /* new debug level */
279 @REPLY
280 process_id_t pid; /* process id of the new thread's process */
281 thread_id_t tid; /* thread id of the new thread */
282 size_t info_size; /* total size of startup info */
283 time_t server_start; /* server start time */
284 int version; /* protocol version */
285 @END
288 /* Terminate a process */
289 @REQ(terminate_process)
290 obj_handle_t handle; /* process handle to terminate */
291 int exit_code; /* process exit code */
292 @REPLY
293 int self; /* suicide? */
294 @END
297 /* Terminate a thread */
298 @REQ(terminate_thread)
299 obj_handle_t handle; /* thread handle to terminate */
300 int exit_code; /* thread exit code */
301 @REPLY
302 int self; /* suicide? */
303 int last; /* last thread in this process? */
304 @END
307 /* Retrieve information about a process */
308 @REQ(get_process_info)
309 obj_handle_t handle; /* process handle */
310 @REPLY
311 process_id_t pid; /* server process id */
312 process_id_t ppid; /* server process id of parent */
313 int exit_code; /* process exit code */
314 int priority; /* priority class */
315 int affinity; /* process affinity mask */
316 void* peb; /* PEB address in process address space */
317 @END
320 /* Set a process informations */
321 @REQ(set_process_info)
322 obj_handle_t handle; /* process handle */
323 int mask; /* setting mask (see below) */
324 int priority; /* priority class */
325 int affinity; /* affinity mask */
326 @END
327 #define SET_PROCESS_INFO_PRIORITY 0x01
328 #define SET_PROCESS_INFO_AFFINITY 0x02
331 /* Retrieve information about a thread */
332 @REQ(get_thread_info)
333 obj_handle_t handle; /* thread handle */
334 thread_id_t tid_in; /* thread id (optional) */
335 @REPLY
336 process_id_t pid; /* server process id */
337 thread_id_t tid; /* server thread id */
338 void* teb; /* thread teb pointer */
339 int exit_code; /* thread exit code */
340 int priority; /* thread priority level */
341 int affinity; /* thread affinity mask */
342 time_t creation_time; /* thread creation time */
343 time_t exit_time; /* thread exit time */
344 @END
347 /* Set a thread informations */
348 @REQ(set_thread_info)
349 obj_handle_t handle; /* thread handle */
350 int mask; /* setting mask (see below) */
351 int priority; /* priority class */
352 int affinity; /* affinity mask */
353 obj_handle_t token; /* impersonation token */
354 @END
355 #define SET_THREAD_INFO_PRIORITY 0x01
356 #define SET_THREAD_INFO_AFFINITY 0x02
357 #define SET_THREAD_INFO_TOKEN 0x04
360 /* Retrieve information about a module */
361 @REQ(get_dll_info)
362 obj_handle_t handle; /* process handle */
363 void* base_address; /* base address of module */
364 @REPLY
365 size_t size; /* module size */
366 void* entry_point;
367 VARARG(filename,unicode_str); /* file name of module */
368 @END
371 /* Suspend a thread */
372 @REQ(suspend_thread)
373 obj_handle_t handle; /* thread handle */
374 @REPLY
375 int count; /* new suspend count */
376 @END
379 /* Resume a thread */
380 @REQ(resume_thread)
381 obj_handle_t handle; /* thread handle */
382 @REPLY
383 int count; /* new suspend count */
384 @END
387 /* Notify the server that a dll has been loaded */
388 @REQ(load_dll)
389 obj_handle_t handle; /* file handle */
390 void* base; /* base address */
391 size_t size; /* dll size */
392 int dbg_offset; /* debug info offset */
393 int dbg_size; /* debug info size */
394 void* name; /* ptr to ptr to name (in process addr space) */
395 VARARG(filename,unicode_str); /* file name of dll */
396 @END
399 /* Notify the server that a dll is being unloaded */
400 @REQ(unload_dll)
401 void* base; /* base address */
402 @END
405 /* Queue an APC for a thread */
406 @REQ(queue_apc)
407 obj_handle_t handle; /* thread handle */
408 int user; /* user or system apc? */
409 void* func; /* function to call */
410 void* arg1; /* params for function to call */
411 void* arg2;
412 void* arg3;
413 @END
416 /* Get next APC to call */
417 @REQ(get_apc)
418 int alertable; /* is thread alertable? */
419 @REPLY
420 void* func; /* function to call */
421 int type; /* function type */
422 void* arg1; /* function arguments */
423 void* arg2;
424 void* arg3;
425 @END
426 enum apc_type { APC_NONE, APC_USER, APC_TIMER, APC_ASYNC_IO };
429 /* Close a handle for the current process */
430 @REQ(close_handle)
431 obj_handle_t handle; /* handle to close */
432 @REPLY
433 int fd; /* associated fd to close */
434 @END
437 /* Set a handle information */
438 @REQ(set_handle_info)
439 obj_handle_t handle; /* handle we are interested in */
440 int flags; /* new handle flags */
441 int mask; /* mask for flags to set */
442 @REPLY
443 int old_flags; /* old flag value */
444 @END
447 /* Duplicate a handle */
448 @REQ(dup_handle)
449 obj_handle_t src_process; /* src process handle */
450 obj_handle_t src_handle; /* src handle to duplicate */
451 obj_handle_t dst_process; /* dst process handle */
452 unsigned int access; /* wanted access rights */
453 unsigned int attributes; /* object attributes */
454 unsigned int options; /* duplicate options (see below) */
455 @REPLY
456 obj_handle_t handle; /* duplicated handle in dst process */
457 int fd; /* associated fd to close */
458 @END
459 #define DUP_HANDLE_CLOSE_SOURCE DUPLICATE_CLOSE_SOURCE
460 #define DUP_HANDLE_SAME_ACCESS DUPLICATE_SAME_ACCESS
461 #define DUP_HANDLE_MAKE_GLOBAL 0x80000000 /* Not a Windows flag */
464 /* Open a handle to a process */
465 @REQ(open_process)
466 process_id_t pid; /* process id to open */
467 unsigned int access; /* wanted access rights */
468 unsigned int attributes; /* object attributes */
469 @REPLY
470 obj_handle_t handle; /* handle to the process */
471 @END
474 /* Open a handle to a thread */
475 @REQ(open_thread)
476 thread_id_t tid; /* thread id to open */
477 unsigned int access; /* wanted access rights */
478 unsigned int attributes; /* object attributes */
479 @REPLY
480 obj_handle_t handle; /* handle to the thread */
481 @END
484 /* Wait for handles */
485 @REQ(select)
486 int flags; /* wait flags (see below) */
487 void* cookie; /* magic cookie to return to client */
488 obj_handle_t signal; /* object to signal (0 if none) */
489 abs_time_t timeout; /* absolute timeout */
490 VARARG(handles,handles); /* handles to select on */
491 @END
492 #define SELECT_ALL 1
493 #define SELECT_ALERTABLE 2
494 #define SELECT_INTERRUPTIBLE 4
495 #define SELECT_TIMEOUT 8
498 /* Create an event */
499 @REQ(create_event)
500 unsigned int access; /* wanted access rights */
501 unsigned int attributes; /* object attributes */
502 obj_handle_t rootdir; /* root directory */
503 int manual_reset; /* manual reset event */
504 int initial_state; /* initial state of the event */
505 VARARG(name,unicode_str); /* object name */
506 @REPLY
507 obj_handle_t handle; /* handle to the event */
508 @END
510 /* Event operation */
511 @REQ(event_op)
512 obj_handle_t handle; /* handle to event */
513 int op; /* event operation (see below) */
514 @END
515 enum event_op { PULSE_EVENT, SET_EVENT, RESET_EVENT };
518 /* Open an event */
519 @REQ(open_event)
520 unsigned int access; /* wanted access rights */
521 unsigned int attributes; /* object attributes */
522 obj_handle_t rootdir; /* root directory */
523 VARARG(name,unicode_str); /* object name */
524 @REPLY
525 obj_handle_t handle; /* handle to the event */
526 @END
529 /* Create a mutex */
530 @REQ(create_mutex)
531 unsigned int access; /* wanted access rights */
532 unsigned int attributes; /* object attributes */
533 obj_handle_t rootdir; /* root directory */
534 int owned; /* initially owned? */
535 VARARG(name,unicode_str); /* object name */
536 @REPLY
537 obj_handle_t handle; /* handle to the mutex */
538 @END
541 /* Release a mutex */
542 @REQ(release_mutex)
543 obj_handle_t handle; /* handle to the mutex */
544 @REPLY
545 unsigned int prev_count; /* value of internal counter, before release */
546 @END
549 /* Open a mutex */
550 @REQ(open_mutex)
551 unsigned int access; /* wanted access rights */
552 unsigned int attributes; /* object attributes */
553 obj_handle_t rootdir; /* root directory */
554 VARARG(name,unicode_str); /* object name */
555 @REPLY
556 obj_handle_t handle; /* handle to the mutex */
557 @END
560 /* Create a semaphore */
561 @REQ(create_semaphore)
562 unsigned int access; /* wanted access rights */
563 unsigned int attributes; /* object attributes */
564 obj_handle_t rootdir; /* root directory */
565 unsigned int initial; /* initial count */
566 unsigned int max; /* maximum count */
567 VARARG(name,unicode_str); /* object name */
568 @REPLY
569 obj_handle_t handle; /* handle to the semaphore */
570 @END
573 /* Release a semaphore */
574 @REQ(release_semaphore)
575 obj_handle_t handle; /* handle to the semaphore */
576 unsigned int count; /* count to add to semaphore */
577 @REPLY
578 unsigned int prev_count; /* previous semaphore count */
579 @END
582 /* Open a semaphore */
583 @REQ(open_semaphore)
584 unsigned int access; /* wanted access rights */
585 unsigned int attributes; /* object attributes */
586 obj_handle_t rootdir; /* root directory */
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 unsigned int attributes; /* object attributes */
597 unsigned int sharing; /* sharing flags */
598 int create; /* file create action */
599 unsigned int options; /* file options */
600 unsigned int attrs; /* file attributes for creation */
601 VARARG(filename,string); /* file name */
602 @REPLY
603 obj_handle_t handle; /* handle to the file */
604 @END
607 /* Open a file object */
608 @REQ(open_file_object)
609 unsigned int access; /* wanted access rights */
610 unsigned int attributes; /* open attributes */
611 obj_handle_t rootdir; /* root directory */
612 unsigned int sharing; /* sharing flags */
613 VARARG(filename,unicode_str); /* file name */
614 @REPLY
615 obj_handle_t handle; /* handle to the file */
616 @END
619 /* Allocate a file handle for a Unix fd */
620 @REQ(alloc_file_handle)
621 unsigned int access; /* wanted access rights */
622 unsigned int attributes; /* object attributes */
623 int fd; /* file descriptor on the client side */
624 @REPLY
625 obj_handle_t handle; /* handle to the file */
626 @END
629 /* Get a Unix fd to access a file */
630 @REQ(get_handle_fd)
631 obj_handle_t handle; /* handle to the file */
632 unsigned int access; /* wanted access rights */
633 @REPLY
634 int fd; /* file descriptor */
635 int removable; /* is device removable? (-1 if unknown) */
636 int flags; /* file read/write flags (see below) */
637 @END
638 #define FD_FLAG_OVERLAPPED 0x01 /* fd opened in overlapped mode */
639 #define FD_FLAG_TIMEOUT 0x02 /* read/write is synchronous */
640 #define FD_FLAG_RECV_SHUTDOWN 0x04
641 #define FD_FLAG_SEND_SHUTDOWN 0x08
642 #define FD_FLAG_AVAILABLE 0x10 /* in overlap read/write operation,
643 * only handle available data (don't wait) */
645 /* Set the cached file descriptor of a handle */
646 @REQ(set_handle_fd)
647 obj_handle_t handle; /* handle we are interested in */
648 int fd; /* file descriptor */
649 int removable; /* is device removable? (-1 if unknown) */
650 @REPLY
651 int cur_fd; /* current file descriptor */
652 @END
655 /* Flush a file buffers */
656 @REQ(flush_file)
657 obj_handle_t handle; /* handle to the file */
658 @REPLY
659 obj_handle_t event; /* event set when finished */
660 @END
663 /* Lock a region of a file */
664 @REQ(lock_file)
665 obj_handle_t handle; /* handle to the file */
666 unsigned int offset_low; /* offset of start of lock */
667 unsigned int offset_high; /* offset of start of lock */
668 unsigned int count_low; /* count of bytes to lock */
669 unsigned int count_high; /* count of bytes to lock */
670 int shared; /* shared or exclusive lock? */
671 int wait; /* do we want to wait? */
672 @REPLY
673 obj_handle_t handle; /* handle to wait on */
674 int overlapped; /* is it an overlapped I/O handle? */
675 @END
678 /* Unlock a region of a file */
679 @REQ(unlock_file)
680 obj_handle_t handle; /* handle to the file */
681 unsigned int offset_low; /* offset of start of unlock */
682 unsigned int offset_high; /* offset of start of unlock */
683 unsigned int count_low; /* count of bytes to unlock */
684 unsigned int count_high; /* count of bytes to unlock */
685 @END
688 /* Get ready to unmount a Unix device */
689 @REQ(unmount_device)
690 obj_handle_t handle; /* handle to a file on the device */
691 @END
694 /* Create a socket */
695 @REQ(create_socket)
696 unsigned int access; /* wanted access rights */
697 unsigned int attributes; /* object attributes */
698 int family; /* family, see socket manpage */
699 int type; /* type, see socket manpage */
700 int protocol; /* protocol, see socket manpage */
701 unsigned int flags; /* socket flags */
702 @REPLY
703 obj_handle_t handle; /* handle to the new socket */
704 @END
707 /* Accept a socket */
708 @REQ(accept_socket)
709 obj_handle_t lhandle; /* handle to the listening socket */
710 unsigned int access; /* wanted access rights */
711 unsigned int attributes; /* object attributes */
712 @REPLY
713 obj_handle_t handle; /* handle to the new socket */
714 @END
717 /* Set socket event parameters */
718 @REQ(set_socket_event)
719 obj_handle_t handle; /* handle to the socket */
720 unsigned int mask; /* event mask */
721 obj_handle_t event; /* event object */
722 user_handle_t window; /* window to send the message to */
723 unsigned int msg; /* message to send */
724 @END
727 /* Get socket event parameters */
728 @REQ(get_socket_event)
729 obj_handle_t handle; /* handle to the socket */
730 int service; /* clear pending? */
731 obj_handle_t c_event; /* event to clear */
732 @REPLY
733 unsigned int mask; /* event mask */
734 unsigned int pmask; /* pending events */
735 unsigned int state; /* status bits */
736 VARARG(errors,ints); /* event errors */
737 @END
740 /* Reenable pending socket events */
741 @REQ(enable_socket_event)
742 obj_handle_t handle; /* handle to the socket */
743 unsigned int mask; /* events to re-enable */
744 unsigned int sstate; /* status bits to set */
745 unsigned int cstate; /* status bits to clear */
746 @END
748 @REQ(set_socket_deferred)
749 obj_handle_t handle; /* handle to the socket */
750 obj_handle_t deferred; /* handle to the socket for which accept() is deferred */
751 @END
753 /* Allocate a console (only used by a console renderer) */
754 @REQ(alloc_console)
755 unsigned int access; /* wanted access rights */
756 unsigned int attributes; /* object attributes */
757 process_id_t pid; /* pid of process which shall be attached to the console */
758 @REPLY
759 obj_handle_t handle_in; /* handle to console input */
760 obj_handle_t event; /* handle to renderer events change notification */
761 @END
764 /* Free the console of the current process */
765 @REQ(free_console)
766 @END
769 #define CONSOLE_RENDERER_NONE_EVENT 0x00
770 #define CONSOLE_RENDERER_TITLE_EVENT 0x01
771 #define CONSOLE_RENDERER_ACTIVE_SB_EVENT 0x02
772 #define CONSOLE_RENDERER_SB_RESIZE_EVENT 0x03
773 #define CONSOLE_RENDERER_UPDATE_EVENT 0x04
774 #define CONSOLE_RENDERER_CURSOR_POS_EVENT 0x05
775 #define CONSOLE_RENDERER_CURSOR_GEOM_EVENT 0x06
776 #define CONSOLE_RENDERER_DISPLAY_EVENT 0x07
777 #define CONSOLE_RENDERER_EXIT_EVENT 0x08
778 struct console_renderer_event
780 short event;
781 union
783 struct update
785 short top;
786 short bottom;
787 } update;
788 struct resize
790 short width;
791 short height;
792 } resize;
793 struct cursor_pos
795 short x;
796 short y;
797 } cursor_pos;
798 struct cursor_geom
800 short visible;
801 short size;
802 } cursor_geom;
803 struct display
805 short left;
806 short top;
807 short width;
808 short height;
809 } display;
810 } u;
813 /* retrieve console events for the renderer */
814 @REQ(get_console_renderer_events)
815 obj_handle_t handle; /* handle to console input events */
816 @REPLY
817 VARARG(data,bytes); /* the various console_renderer_events */
818 @END
821 /* Open a handle to the process console */
822 @REQ(open_console)
823 int from; /* 0 (resp 1) input (resp output) of current process console */
824 /* otherwise console_in handle to get active screen buffer? */
825 unsigned int access; /* wanted access rights */
826 unsigned int attributes; /* object attributes */
827 int share; /* share mask (only for output handles) */
828 @REPLY
829 obj_handle_t handle; /* handle to the console */
830 @END
833 /* Get the input queue wait event */
834 @REQ(get_console_wait_event)
835 @REPLY
836 obj_handle_t handle;
837 @END
839 /* Get a console mode (input or output) */
840 @REQ(get_console_mode)
841 obj_handle_t handle; /* handle to the console */
842 @REPLY
843 int mode; /* console mode */
844 @END
847 /* Set a console mode (input or output) */
848 @REQ(set_console_mode)
849 obj_handle_t handle; /* handle to the console */
850 int mode; /* console mode */
851 @END
854 /* Set info about a console (input only) */
855 @REQ(set_console_input_info)
856 obj_handle_t handle; /* handle to console input, or 0 for process' console */
857 int mask; /* setting mask (see below) */
858 obj_handle_t active_sb; /* active screen buffer */
859 int history_mode; /* whether we duplicate lines in history */
860 int history_size; /* number of lines in history */
861 int edition_mode; /* index to the edition mode flavors */
862 VARARG(title,unicode_str); /* console title */
863 @END
864 #define SET_CONSOLE_INPUT_INFO_ACTIVE_SB 0x01
865 #define SET_CONSOLE_INPUT_INFO_TITLE 0x02
866 #define SET_CONSOLE_INPUT_INFO_HISTORY_MODE 0x04
867 #define SET_CONSOLE_INPUT_INFO_HISTORY_SIZE 0x08
868 #define SET_CONSOLE_INPUT_INFO_EDITION_MODE 0x10
871 /* Get info about a console (input only) */
872 @REQ(get_console_input_info)
873 obj_handle_t handle; /* handle to console input, or 0 for process' console */
874 @REPLY
875 int history_mode; /* whether we duplicate lines in history */
876 int history_size; /* number of lines in history */
877 int history_index; /* number of used lines in history */
878 int edition_mode; /* index to the edition mode flavors */
879 VARARG(title,unicode_str); /* console title */
880 @END
883 /* appends a string to console's history */
884 @REQ(append_console_input_history)
885 obj_handle_t handle; /* handle to console input, or 0 for process' console */
886 VARARG(line,unicode_str); /* line to add */
887 @END
890 /* appends a string to console's history */
891 @REQ(get_console_input_history)
892 obj_handle_t handle; /* handle to console input, or 0 for process' console */
893 int index; /* index to get line from */
894 @REPLY
895 int total; /* total length of line in Unicode chars */
896 VARARG(line,unicode_str); /* line to add */
897 @END
900 /* creates a new screen buffer on process' console */
901 @REQ(create_console_output)
902 obj_handle_t handle_in; /* handle to console input, or 0 for process' console */
903 unsigned int access; /* wanted access rights */
904 unsigned int attributes; /* object attributes */
905 unsigned int share; /* sharing credentials */
906 @REPLY
907 obj_handle_t handle_out; /* handle to the screen buffer */
908 @END
911 /* Set info about a console (output only) */
912 @REQ(set_console_output_info)
913 obj_handle_t handle; /* handle to the console */
914 int mask; /* setting mask (see below) */
915 short int cursor_size; /* size of cursor (percentage filled) */
916 short int cursor_visible;/* cursor visibility flag */
917 short int cursor_x; /* position of cursor (x, y) */
918 short int cursor_y;
919 short int width; /* width of the screen buffer */
920 short int height; /* height of the screen buffer */
921 short int attr; /* default attribute */
922 short int win_left; /* window actually displayed by renderer */
923 short int win_top; /* the rect area is expressed withing the */
924 short int win_right; /* boundaries of the screen buffer */
925 short int win_bottom;
926 short int max_width; /* maximum size (width x height) for the window */
927 short int max_height;
928 @END
929 #define SET_CONSOLE_OUTPUT_INFO_CURSOR_GEOM 0x01
930 #define SET_CONSOLE_OUTPUT_INFO_CURSOR_POS 0x02
931 #define SET_CONSOLE_OUTPUT_INFO_SIZE 0x04
932 #define SET_CONSOLE_OUTPUT_INFO_ATTR 0x08
933 #define SET_CONSOLE_OUTPUT_INFO_DISPLAY_WINDOW 0x10
934 #define SET_CONSOLE_OUTPUT_INFO_MAX_SIZE 0x20
937 /* Get info about a console (output only) */
938 @REQ(get_console_output_info)
939 obj_handle_t handle; /* handle to the console */
940 @REPLY
941 short int cursor_size; /* size of cursor (percentage filled) */
942 short int cursor_visible;/* cursor visibility flag */
943 short int cursor_x; /* position of cursor (x, y) */
944 short int cursor_y;
945 short int width; /* width of the screen buffer */
946 short int height; /* height of the screen buffer */
947 short int attr; /* default attribute */
948 short int win_left; /* window actually displayed by renderer */
949 short int win_top; /* the rect area is expressed withing the */
950 short int win_right; /* boundaries of the screen buffer */
951 short int win_bottom;
952 short int max_width; /* maximum size (width x height) for the window */
953 short int max_height;
954 @END
956 /* Add input records to a console input queue */
957 @REQ(write_console_input)
958 obj_handle_t handle; /* handle to the console input */
959 VARARG(rec,input_records); /* input records */
960 @REPLY
961 int written; /* number of records written */
962 @END
965 /* Fetch input records from a console input queue */
966 @REQ(read_console_input)
967 obj_handle_t handle; /* handle to the console input */
968 int flush; /* flush the retrieved records from the queue? */
969 @REPLY
970 int read; /* number of records read */
971 VARARG(rec,input_records); /* input records */
972 @END
975 /* write data (chars and/or attributes) in a screen buffer */
976 @REQ(write_console_output)
977 obj_handle_t handle; /* handle to the console output */
978 int x; /* position where to start writing */
979 int y;
980 int mode; /* char info (see below) */
981 int wrap; /* wrap around at end of line? */
982 VARARG(data,bytes); /* info to write */
983 @REPLY
984 int written; /* number of char infos actually written */
985 int width; /* width of screen buffer */
986 int height; /* height of screen buffer */
987 @END
988 enum char_info_mode
990 CHAR_INFO_MODE_TEXT, /* characters only */
991 CHAR_INFO_MODE_ATTR, /* attributes only */
992 CHAR_INFO_MODE_TEXTATTR, /* both characters and attributes */
993 CHAR_INFO_MODE_TEXTSTDATTR /* characters but use standard attributes */
997 /* fill a screen buffer with constant data (chars and/or attributes) */
998 @REQ(fill_console_output)
999 obj_handle_t handle; /* handle to the console output */
1000 int x; /* position where to start writing */
1001 int y;
1002 int mode; /* char info mode */
1003 int count; /* number to write */
1004 int wrap; /* wrap around at end of line? */
1005 char_info_t data; /* data to write */
1006 @REPLY
1007 int written; /* number of char infos actually written */
1008 @END
1011 /* read data (chars and/or attributes) from a screen buffer */
1012 @REQ(read_console_output)
1013 obj_handle_t handle; /* handle to the console output */
1014 int x; /* position (x,y) where to start reading */
1015 int y;
1016 int mode; /* char info mode */
1017 int wrap; /* wrap around at end of line? */
1018 @REPLY
1019 int width; /* width of screen buffer */
1020 int height; /* height of screen buffer */
1021 VARARG(data,bytes);
1022 @END
1025 /* move a rect (of data) in screen buffer content */
1026 @REQ(move_console_output)
1027 obj_handle_t handle; /* handle to the console output */
1028 short int x_src; /* position (x, y) of rect to start moving from */
1029 short int y_src;
1030 short int x_dst; /* position (x, y) of rect to move to */
1031 short int y_dst;
1032 short int w; /* size of the rect (width, height) to move */
1033 short int h;
1034 @END
1037 /* Sends a signal to a process group */
1038 @REQ(send_console_signal)
1039 int signal; /* the signal to send */
1040 process_id_t group_id; /* the group to send the signal to */
1041 @END
1044 /* Create a change notification */
1045 @REQ(create_change_notification)
1046 unsigned int access; /* wanted access rights */
1047 unsigned int attributes; /* object attributes */
1048 obj_handle_t handle; /* handle to the directory */
1049 int subtree; /* watch all the subtree */
1050 unsigned int filter; /* notification filter */
1051 @REPLY
1052 obj_handle_t handle; /* handle to the change notification */
1053 @END
1056 /* Move to the next change notification */
1057 @REQ(next_change_notification)
1058 obj_handle_t handle; /* handle to the change notification */
1059 @END
1061 /* Create a file mapping */
1062 @REQ(create_mapping)
1063 unsigned int access; /* wanted access rights */
1064 unsigned int attributes; /* object attributes */
1065 obj_handle_t rootdir; /* root directory */
1066 int size_high; /* mapping size */
1067 int size_low; /* mapping size */
1068 int protect; /* protection flags (see below) */
1069 obj_handle_t file_handle; /* file handle */
1070 VARARG(name,unicode_str); /* object name */
1071 @REPLY
1072 obj_handle_t handle; /* handle to the mapping */
1073 @END
1074 /* protection flags */
1075 #define VPROT_READ 0x01
1076 #define VPROT_WRITE 0x02
1077 #define VPROT_EXEC 0x04
1078 #define VPROT_WRITECOPY 0x08
1079 #define VPROT_GUARD 0x10
1080 #define VPROT_NOCACHE 0x20
1081 #define VPROT_COMMITTED 0x40
1082 #define VPROT_IMAGE 0x80
1085 /* Open a mapping */
1086 @REQ(open_mapping)
1087 unsigned int access; /* wanted access rights */
1088 unsigned int attributes; /* object attributes */
1089 obj_handle_t rootdir; /* root directory */
1090 VARARG(name,unicode_str); /* object name */
1091 @REPLY
1092 obj_handle_t handle; /* handle to the mapping */
1093 @END
1096 /* Get information about a file mapping */
1097 @REQ(get_mapping_info)
1098 obj_handle_t handle; /* handle to the mapping */
1099 @REPLY
1100 int size_high; /* mapping size */
1101 int size_low; /* mapping size */
1102 int protect; /* protection flags */
1103 int header_size; /* header size (for VPROT_IMAGE mapping) */
1104 void* base; /* default base addr (for VPROT_IMAGE mapping) */
1105 obj_handle_t shared_file; /* shared mapping file handle */
1106 int shared_size; /* shared mapping size */
1107 @END
1110 #define SNAP_HEAPLIST 0x00000001
1111 #define SNAP_PROCESS 0x00000002
1112 #define SNAP_THREAD 0x00000004
1113 #define SNAP_MODULE 0x00000008
1114 /* Create a snapshot */
1115 @REQ(create_snapshot)
1116 unsigned int attributes; /* object attributes */
1117 int flags; /* snapshot flags (SNAP_*) */
1118 process_id_t pid; /* process id */
1119 @REPLY
1120 obj_handle_t handle; /* handle to the snapshot */
1121 @END
1124 /* Get the next process from a snapshot */
1125 @REQ(next_process)
1126 obj_handle_t handle; /* handle to the snapshot */
1127 int reset; /* reset snapshot position? */
1128 @REPLY
1129 int count; /* process usage count */
1130 process_id_t pid; /* process id */
1131 process_id_t ppid; /* parent process id */
1132 void* heap; /* heap base */
1133 void* module; /* main module */
1134 int threads; /* number of threads */
1135 int priority; /* process priority */
1136 int handles; /* number of handles */
1137 VARARG(filename,unicode_str); /* file name of main exe */
1138 @END
1141 /* Get the next thread from a snapshot */
1142 @REQ(next_thread)
1143 obj_handle_t handle; /* handle to the snapshot */
1144 int reset; /* reset snapshot position? */
1145 @REPLY
1146 int count; /* thread usage count */
1147 process_id_t pid; /* process id */
1148 thread_id_t tid; /* thread id */
1149 int base_pri; /* base priority */
1150 int delta_pri; /* delta priority */
1151 @END
1154 /* Get the next module from a snapshot */
1155 @REQ(next_module)
1156 obj_handle_t handle; /* handle to the snapshot */
1157 int reset; /* reset snapshot position? */
1158 @REPLY
1159 process_id_t pid; /* process id */
1160 void* base; /* module base address */
1161 size_t size; /* module size */
1162 VARARG(filename,unicode_str); /* file name of module */
1163 @END
1166 /* Wait for a debug event */
1167 @REQ(wait_debug_event)
1168 int get_handle; /* should we alloc a handle for waiting? */
1169 @REPLY
1170 process_id_t pid; /* process id */
1171 thread_id_t tid; /* thread id */
1172 obj_handle_t wait; /* wait handle if no event ready */
1173 VARARG(event,debug_event); /* debug event data */
1174 @END
1177 /* Queue an exception event */
1178 @REQ(queue_exception_event)
1179 int first; /* first chance exception? */
1180 VARARG(record,exc_event); /* thread context followed by exception record */
1181 @REPLY
1182 obj_handle_t handle; /* handle to the queued event */
1183 @END
1186 /* Retrieve the status of an exception event */
1187 @REQ(get_exception_status)
1188 obj_handle_t handle; /* handle to the queued event */
1189 @REPLY
1190 VARARG(context,context); /* modified thread context */
1191 @END
1194 /* Send an output string to the debugger */
1195 @REQ(output_debug_string)
1196 void* string; /* string to display (in debugged process address space) */
1197 int unicode; /* is it Unicode? */
1198 int length; /* string length */
1199 @END
1202 /* Continue a debug event */
1203 @REQ(continue_debug_event)
1204 process_id_t pid; /* process id to continue */
1205 thread_id_t tid; /* thread id to continue */
1206 int status; /* continuation status */
1207 @END
1210 /* Start/stop debugging an existing process */
1211 @REQ(debug_process)
1212 process_id_t pid; /* id of the process to debug */
1213 int attach; /* 1=attaching / 0=detaching from the process */
1214 @END
1217 /* Simulate a breakpoint in a process */
1218 @REQ(debug_break)
1219 obj_handle_t handle; /* process handle */
1220 @REPLY
1221 int self; /* was it the caller itself? */
1222 @END
1225 /* Set debugger kill on exit flag */
1226 @REQ(set_debugger_kill_on_exit)
1227 int kill_on_exit; /* 0=detach/1=kill debuggee when debugger dies */
1228 @END
1231 /* Read data from a process address space */
1232 @REQ(read_process_memory)
1233 obj_handle_t handle; /* process handle */
1234 void* addr; /* addr to read from */
1235 @REPLY
1236 VARARG(data,bytes); /* result data */
1237 @END
1240 /* Write data to a process address space */
1241 @REQ(write_process_memory)
1242 obj_handle_t handle; /* process handle */
1243 void* addr; /* addr to write to (must be int-aligned) */
1244 unsigned int first_mask; /* mask for first word */
1245 unsigned int last_mask; /* mask for last word */
1246 VARARG(data,bytes); /* data to write */
1247 @END
1250 /* Create a registry key */
1251 @REQ(create_key)
1252 obj_handle_t parent; /* handle to the parent key */
1253 unsigned int access; /* desired access rights */
1254 unsigned int attributes; /* object attributes */
1255 unsigned int options; /* creation options */
1256 time_t modif; /* last modification time */
1257 size_t namelen; /* length of key name in bytes */
1258 VARARG(name,unicode_str,namelen); /* key name */
1259 VARARG(class,unicode_str); /* class name */
1260 @REPLY
1261 obj_handle_t hkey; /* handle to the created key */
1262 int created; /* has it been newly created? */
1263 @END
1265 /* Open a registry key */
1266 @REQ(open_key)
1267 obj_handle_t parent; /* handle to the parent key */
1268 unsigned int access; /* desired access rights */
1269 unsigned int attributes; /* object attributes */
1270 VARARG(name,unicode_str); /* key name */
1271 @REPLY
1272 obj_handle_t hkey; /* handle to the open key */
1273 @END
1276 /* Delete a registry key */
1277 @REQ(delete_key)
1278 obj_handle_t hkey; /* handle to the key */
1279 @END
1282 /* Flush a registry key */
1283 @REQ(flush_key)
1284 obj_handle_t hkey; /* handle to the key */
1285 @END
1288 /* Enumerate registry subkeys */
1289 @REQ(enum_key)
1290 obj_handle_t hkey; /* handle to registry key */
1291 int index; /* index of subkey (or -1 for current key) */
1292 int info_class; /* requested information class */
1293 @REPLY
1294 int subkeys; /* number of subkeys */
1295 int max_subkey; /* longest subkey name */
1296 int max_class; /* longest class name */
1297 int values; /* number of values */
1298 int max_value; /* longest value name */
1299 int max_data; /* longest value data */
1300 time_t modif; /* last modification time */
1301 size_t total; /* total length needed for full name and class */
1302 size_t namelen; /* length of key name in bytes */
1303 VARARG(name,unicode_str,namelen); /* key name */
1304 VARARG(class,unicode_str); /* class name */
1305 @END
1308 /* Set a value of a registry key */
1309 @REQ(set_key_value)
1310 obj_handle_t hkey; /* handle to registry key */
1311 int type; /* value type */
1312 size_t namelen; /* length of value name in bytes */
1313 VARARG(name,unicode_str,namelen); /* value name */
1314 VARARG(data,bytes); /* value data */
1315 @END
1318 /* Retrieve the value of a registry key */
1319 @REQ(get_key_value)
1320 obj_handle_t hkey; /* handle to registry key */
1321 VARARG(name,unicode_str); /* value name */
1322 @REPLY
1323 int type; /* value type */
1324 size_t total; /* total length needed for data */
1325 VARARG(data,bytes); /* value data */
1326 @END
1329 /* Enumerate a value of a registry key */
1330 @REQ(enum_key_value)
1331 obj_handle_t hkey; /* handle to registry key */
1332 int index; /* value index */
1333 int info_class; /* requested information class */
1334 @REPLY
1335 int type; /* value type */
1336 size_t total; /* total length needed for full name and data */
1337 size_t namelen; /* length of value name in bytes */
1338 VARARG(name,unicode_str,namelen); /* value name */
1339 VARARG(data,bytes); /* value data */
1340 @END
1343 /* Delete a value of a registry key */
1344 @REQ(delete_key_value)
1345 obj_handle_t hkey; /* handle to registry key */
1346 VARARG(name,unicode_str); /* value name */
1347 @END
1350 /* Load a registry branch from a file */
1351 @REQ(load_registry)
1352 obj_handle_t hkey; /* root key to load to */
1353 obj_handle_t file; /* file to load from */
1354 VARARG(name,unicode_str); /* subkey name */
1355 @END
1358 /* UnLoad a registry branch from a file */
1359 @REQ(unload_registry)
1360 obj_handle_t hkey; /* root key to unload to */
1361 @END
1364 /* Save a registry branch to a file */
1365 @REQ(save_registry)
1366 obj_handle_t hkey; /* key to save */
1367 obj_handle_t file; /* file to save to */
1368 @END
1371 /* Add a registry key change notification */
1372 @REQ(set_registry_notification)
1373 obj_handle_t hkey; /* key to watch for changes */
1374 obj_handle_t event; /* event to set */
1375 int subtree; /* should we watch the whole subtree? */
1376 unsigned int filter; /* things to watch */
1377 @END
1380 /* Create a waitable timer */
1381 @REQ(create_timer)
1382 unsigned int access; /* wanted access rights */
1383 unsigned int attributes; /* object attributes */
1384 obj_handle_t rootdir; /* root directory */
1385 int manual; /* manual reset */
1386 VARARG(name,unicode_str); /* object name */
1387 @REPLY
1388 obj_handle_t handle; /* handle to the timer */
1389 @END
1392 /* Open a waitable timer */
1393 @REQ(open_timer)
1394 unsigned int access; /* wanted access rights */
1395 unsigned int attributes; /* object attributes */
1396 obj_handle_t rootdir; /* root directory */
1397 VARARG(name,unicode_str); /* object name */
1398 @REPLY
1399 obj_handle_t handle; /* handle to the timer */
1400 @END
1402 /* Set a waitable timer */
1403 @REQ(set_timer)
1404 obj_handle_t handle; /* handle to the timer */
1405 abs_time_t expire; /* next expiration absolute time */
1406 int period; /* timer period in ms */
1407 void* callback; /* callback function */
1408 void* arg; /* callback argument */
1409 @REPLY
1410 int signaled; /* was the timer signaled before this call ? */
1411 @END
1413 /* Cancel a waitable timer */
1414 @REQ(cancel_timer)
1415 obj_handle_t handle; /* handle to the timer */
1416 @REPLY
1417 int signaled; /* was the timer signaled before this calltime ? */
1418 @END
1420 /* Get information on a waitable timer */
1421 @REQ(get_timer_info)
1422 obj_handle_t handle; /* handle to the timer */
1423 @REPLY
1424 abs_time_t when; /* absolute time when the timer next expires */
1425 int signaled; /* is the timer signaled? */
1426 @END
1429 /* Retrieve the current context of a thread */
1430 @REQ(get_thread_context)
1431 obj_handle_t handle; /* thread handle */
1432 unsigned int flags; /* context flags */
1433 int suspend; /* if getting context during suspend */
1434 @REPLY
1435 VARARG(context,context); /* thread context */
1436 @END
1439 /* Set the current context of a thread */
1440 @REQ(set_thread_context)
1441 obj_handle_t handle; /* thread handle */
1442 unsigned int flags; /* context flags */
1443 int suspend; /* if setting context during suspend */
1444 VARARG(context,context); /* thread context */
1445 @END
1448 /* Fetch a selector entry for a thread */
1449 @REQ(get_selector_entry)
1450 obj_handle_t handle; /* thread handle */
1451 int entry; /* LDT entry */
1452 @REPLY
1453 unsigned int base; /* selector base */
1454 unsigned int limit; /* selector limit */
1455 unsigned char flags; /* selector flags */
1456 @END
1459 /* Add an atom */
1460 @REQ(add_atom)
1461 obj_handle_t table; /* which table to add atom to */
1462 VARARG(name,unicode_str); /* atom name */
1463 @REPLY
1464 atom_t atom; /* resulting atom */
1465 @END
1468 /* Delete an atom */
1469 @REQ(delete_atom)
1470 obj_handle_t table; /* which table to delete atom from */
1471 atom_t atom; /* atom handle */
1472 @END
1475 /* Find an atom */
1476 @REQ(find_atom)
1477 obj_handle_t table; /* which table to find atom from */
1478 VARARG(name,unicode_str); /* atom name */
1479 @REPLY
1480 atom_t atom; /* atom handle */
1481 @END
1484 /* Get information about an atom */
1485 @REQ(get_atom_information)
1486 obj_handle_t table; /* which table to find atom from */
1487 atom_t atom; /* atom handle */
1488 @REPLY
1489 int count; /* atom lock count */
1490 int pinned; /* whether the atom has been pinned */
1491 size_t total; /* actual length of atom name */
1492 VARARG(name,unicode_str); /* atom name */
1493 @END
1496 /* Set information about an atom */
1497 @REQ(set_atom_information)
1498 obj_handle_t table; /* which table to find atom from */
1499 atom_t atom; /* atom handle */
1500 int pinned; /* whether to bump atom information */
1501 @END
1504 /* Empty an atom table */
1505 @REQ(empty_atom_table)
1506 obj_handle_t table; /* which table to find atom from */
1507 int if_pinned; /* whether to delete pinned atoms */
1508 @END
1511 /* Init an atom table */
1512 @REQ(init_atom_table)
1513 int entries; /* number of entries (only for local) */
1514 @REPLY
1515 obj_handle_t table; /* handle to the atom table */
1516 @END
1519 /* Get the message queue of the current thread */
1520 @REQ(get_msg_queue)
1521 @REPLY
1522 obj_handle_t handle; /* handle to the queue */
1523 @END
1526 /* Set the current message queue wakeup mask */
1527 @REQ(set_queue_mask)
1528 unsigned int wake_mask; /* wakeup bits mask */
1529 unsigned int changed_mask; /* changed bits mask */
1530 int skip_wait; /* will we skip waiting if signaled? */
1531 @REPLY
1532 unsigned int wake_bits; /* current wake bits */
1533 unsigned int changed_bits; /* current changed bits */
1534 @END
1537 /* Get the current message queue status */
1538 @REQ(get_queue_status)
1539 int clear; /* should we clear the change bits? */
1540 @REPLY
1541 unsigned int wake_bits; /* wake bits */
1542 unsigned int changed_bits; /* changed bits since last time */
1543 @END
1546 /* Wait for a process to start waiting on input */
1547 @REQ(wait_input_idle)
1548 obj_handle_t handle; /* process handle */
1549 int timeout; /* timeout */
1550 @REPLY
1551 obj_handle_t event; /* handle to idle event */
1552 @END
1555 /* Send a message to a thread queue */
1556 @REQ(send_message)
1557 thread_id_t id; /* thread id */
1558 int type; /* message type (see below) */
1559 int flags; /* message flags (see below) */
1560 user_handle_t win; /* window handle */
1561 unsigned int msg; /* message code */
1562 unsigned int wparam; /* parameters */
1563 unsigned int lparam; /* parameters */
1564 int x; /* x position */
1565 int y; /* y position */
1566 unsigned int time; /* message time */
1567 unsigned int info; /* extra info */
1568 int timeout; /* timeout for reply */
1569 void* callback; /* callback address */
1570 VARARG(data,bytes); /* message data for sent messages */
1571 @END
1573 enum message_type
1575 MSG_ASCII, /* Ascii message (from SendMessageA) */
1576 MSG_UNICODE, /* Unicode message (from SendMessageW) */
1577 MSG_NOTIFY, /* notify message (from SendNotifyMessageW), always Unicode */
1578 MSG_CALLBACK, /* callback message (from SendMessageCallbackW), always Unicode */
1579 MSG_CALLBACK_RESULT,/* result of a callback message */
1580 MSG_OTHER_PROCESS, /* sent from other process, may include vararg data, always Unicode */
1581 MSG_POSTED, /* posted message (from PostMessageW), always Unicode */
1582 MSG_HARDWARE, /* hardware message */
1583 MSG_WINEVENT /* winevent message */
1585 #define SEND_MSG_ABORT_IF_HUNG 0x01
1588 /* Get a message from the current queue */
1589 @REQ(get_message)
1590 int flags; /* see below */
1591 user_handle_t get_win; /* window handle to get */
1592 unsigned int get_first; /* first message code to get */
1593 unsigned int get_last; /* last message code to get */
1594 unsigned int hw_id; /* id of the previous hardware message (or 0) */
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 (callback function for MSG_CALLBACK_RESULT) */
1600 unsigned int lparam; /* parameters (result for MSG_CALLBACK_RESULT) */
1601 int x; /* x position */
1602 int y; /* y position */
1603 user_handle_t hook; /* winevent hook handle */
1604 void* hook_proc; /* winevent hook proc address */
1605 unsigned int time; /* message time */
1606 unsigned int info; /* extra info (callback argument for MSG_CALLBACK_RESULT) */
1607 unsigned int hw_id; /* id if hardware message */
1608 unsigned int active_hooks; /* active hooks bitmap */
1609 size_t total; /* total size of extra data */
1610 VARARG(data,bytes); /* message data for sent messages */
1611 @END
1612 #define GET_MSG_REMOVE 1 /* remove the message */
1613 #define GET_MSG_SENT_ONLY 2 /* only get sent messages */
1615 /* Reply to a sent message */
1616 @REQ(reply_message)
1617 unsigned int result; /* message result */
1618 int remove; /* should we remove the message? */
1619 VARARG(data,bytes); /* message data for sent messages */
1620 @END
1623 /* Accept the current hardware message */
1624 @REQ(accept_hardware_message)
1625 unsigned int hw_id; /* id of the hardware message */
1626 int remove; /* should we remove the message? */
1627 user_handle_t new_win; /* new destination window for current message */
1628 @END
1631 /* Retrieve the reply for the last message sent */
1632 @REQ(get_message_reply)
1633 int cancel; /* cancel message if not ready? */
1634 @REPLY
1635 unsigned int result; /* message result */
1636 VARARG(data,bytes); /* message data for sent messages */
1637 @END
1640 /* Set a window timer */
1641 @REQ(set_win_timer)
1642 user_handle_t win; /* window handle */
1643 unsigned int msg; /* message to post */
1644 unsigned int id; /* timer id */
1645 unsigned int rate; /* timer rate in ms */
1646 unsigned int lparam; /* message lparam (callback proc) */
1647 @REPLY
1648 unsigned int id; /* timer id */
1649 @END
1652 /* Kill a window timer */
1653 @REQ(kill_win_timer)
1654 user_handle_t win; /* window handle */
1655 unsigned int msg; /* message to post */
1656 unsigned int id; /* timer id */
1657 @END
1660 /* Retrieve info about a serial port */
1661 @REQ(get_serial_info)
1662 obj_handle_t handle; /* handle to comm port */
1663 @REPLY
1664 unsigned int readinterval;
1665 unsigned int readconst;
1666 unsigned int readmult;
1667 unsigned int writeconst;
1668 unsigned int writemult;
1669 unsigned int eventmask;
1670 unsigned int commerror;
1671 @END
1674 /* Set info about a serial port */
1675 @REQ(set_serial_info)
1676 obj_handle_t handle; /* handle to comm port */
1677 int flags; /* bitmask to set values (see below) */
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 unsigned int commerror;
1685 @END
1686 #define SERIALINFO_SET_TIMEOUTS 0x01
1687 #define SERIALINFO_SET_MASK 0x02
1688 #define SERIALINFO_SET_ERROR 0x04
1691 /* Create an async I/O */
1692 @REQ(register_async)
1693 obj_handle_t handle; /* handle to comm port, socket or file */
1694 int type; /* type of queue to look after */
1695 void* io_apc; /* APC routine to queue upon end of async */
1696 void* io_sb; /* I/O status block (unique across all async on this handle) */
1697 void* io_user; /* data to pass back to caller */
1698 int count; /* count - usually # of bytes to be read/written */
1699 @END
1700 #define ASYNC_TYPE_READ 0x01
1701 #define ASYNC_TYPE_WRITE 0x02
1702 #define ASYNC_TYPE_WAIT 0x03
1705 /* Cancel all async op on a fd */
1706 @REQ(cancel_async)
1707 obj_handle_t handle; /* handle to comm port, socket or file */
1708 @END
1711 /* Create a named pipe */
1712 @REQ(create_named_pipe)
1713 unsigned int access;
1714 unsigned int attributes; /* object attributes */
1715 obj_handle_t rootdir; /* root directory */
1716 unsigned int options;
1717 unsigned int flags;
1718 unsigned int maxinstances;
1719 unsigned int outsize;
1720 unsigned int insize;
1721 unsigned int timeout;
1722 VARARG(name,unicode_str); /* pipe name */
1723 @REPLY
1724 obj_handle_t handle; /* handle to the pipe */
1725 @END
1727 /* flags in create_named_pipe and get_named_pipe_info */
1728 #define NAMED_PIPE_MESSAGE_STREAM_WRITE 0x0001
1729 #define NAMED_PIPE_MESSAGE_STREAM_READ 0x0002
1730 #define NAMED_PIPE_NONBLOCKING_MODE 0x0004
1733 /* Open an existing named pipe */
1734 @REQ(open_named_pipe)
1735 unsigned int access;
1736 unsigned int attributes; /* object attributes */
1737 obj_handle_t rootdir; /* root directory */
1738 unsigned int flags; /* file flags */
1739 VARARG(name,unicode_str); /* pipe name */
1740 @REPLY
1741 obj_handle_t handle; /* handle to the pipe */
1742 @END
1745 /* Connect to a named pipe */
1746 @REQ(connect_named_pipe)
1747 obj_handle_t handle;
1748 obj_handle_t event;
1749 void* func;
1750 @END
1753 /* Wait for a named pipe */
1754 @REQ(wait_named_pipe)
1755 obj_handle_t handle;
1756 unsigned int timeout;
1757 obj_handle_t event;
1758 void* func;
1759 VARARG(name,unicode_str); /* pipe name */
1760 @END
1763 /* Disconnect a named pipe */
1764 @REQ(disconnect_named_pipe)
1765 obj_handle_t handle;
1766 @REPLY
1767 int fd; /* associated fd to close */
1768 @END
1771 @REQ(get_named_pipe_info)
1772 obj_handle_t handle;
1773 @REPLY
1774 unsigned int flags;
1775 unsigned int maxinstances;
1776 unsigned int outsize;
1777 unsigned int insize;
1778 @END
1781 /* Create a window */
1782 @REQ(create_window)
1783 user_handle_t parent; /* parent window */
1784 user_handle_t owner; /* owner window */
1785 atom_t atom; /* class atom */
1786 void* instance; /* module instance */
1787 @REPLY
1788 user_handle_t handle; /* created window */
1789 int extra; /* number of extra bytes */
1790 void* class_ptr; /* pointer to class in client address space */
1791 @END
1794 /* Destroy a window */
1795 @REQ(destroy_window)
1796 user_handle_t handle; /* handle to the window */
1797 @END
1800 /* Retrieve the desktop window for the current thread */
1801 @REQ(get_desktop_window)
1802 @REPLY
1803 user_handle_t handle; /* handle to the desktop window */
1804 @END
1807 /* Set a window owner */
1808 @REQ(set_window_owner)
1809 user_handle_t handle; /* handle to the window */
1810 user_handle_t owner; /* new owner */
1811 @REPLY
1812 user_handle_t full_owner; /* full handle of new owner */
1813 user_handle_t prev_owner; /* full handle of previous owner */
1814 @END
1817 /* Get information from a window handle */
1818 @REQ(get_window_info)
1819 user_handle_t handle; /* handle to the window */
1820 @REPLY
1821 user_handle_t full_handle; /* full 32-bit handle */
1822 user_handle_t last_active; /* last active popup */
1823 process_id_t pid; /* process owning the window */
1824 thread_id_t tid; /* thread owning the window */
1825 atom_t atom; /* class atom */
1826 int is_unicode; /* ANSI or unicode */
1827 @END
1830 /* Set some information in a window */
1831 @REQ(set_window_info)
1832 user_handle_t handle; /* handle to the window */
1833 unsigned int flags; /* flags for fields to set (see below) */
1834 unsigned int style; /* window style */
1835 unsigned int ex_style; /* window extended style */
1836 unsigned int id; /* window id */
1837 void* instance; /* creator instance */
1838 int is_unicode; /* ANSI or unicode */
1839 void* user_data; /* user-specific data */
1840 int extra_offset; /* offset to set in extra bytes */
1841 size_t extra_size; /* size to set in extra bytes */
1842 unsigned int extra_value; /* value to set in extra bytes */
1843 @REPLY
1844 unsigned int old_style; /* old window style */
1845 unsigned int old_ex_style; /* old window extended style */
1846 unsigned int old_id; /* old window id */
1847 void* old_instance; /* old creator instance */
1848 void* old_user_data; /* old user-specific data */
1849 unsigned int old_extra_value; /* old value in extra bytes */
1850 @END
1851 #define SET_WIN_STYLE 0x01
1852 #define SET_WIN_EXSTYLE 0x02
1853 #define SET_WIN_ID 0x04
1854 #define SET_WIN_INSTANCE 0x08
1855 #define SET_WIN_USERDATA 0x10
1856 #define SET_WIN_EXTRA 0x20
1857 #define SET_WIN_UNICODE 0x40
1860 /* Set the parent of a window */
1861 @REQ(set_parent)
1862 user_handle_t handle; /* handle to the window */
1863 user_handle_t parent; /* handle to the parent */
1864 @REPLY
1865 user_handle_t old_parent; /* old parent window */
1866 user_handle_t full_parent; /* full handle of new parent */
1867 @END
1870 /* Get a list of the window parents, up to the root of the tree */
1871 @REQ(get_window_parents)
1872 user_handle_t handle; /* handle to the window */
1873 @REPLY
1874 int count; /* total count of parents */
1875 VARARG(parents,user_handles); /* parent handles */
1876 @END
1879 /* Get a list of the window children */
1880 @REQ(get_window_children)
1881 user_handle_t parent; /* parent window */
1882 atom_t atom; /* class atom for the listed children */
1883 thread_id_t tid; /* thread owning the listed children */
1884 @REPLY
1885 int count; /* total count of children */
1886 VARARG(children,user_handles); /* children handles */
1887 @END
1890 /* Get a list of the window children that contain a given point */
1891 @REQ(get_window_children_from_point)
1892 user_handle_t parent; /* parent window */
1893 int x; /* point in parent coordinates */
1894 int y;
1895 @REPLY
1896 int count; /* total count of children */
1897 VARARG(children,user_handles); /* children handles */
1898 @END
1901 /* Get window tree information from a window handle */
1902 @REQ(get_window_tree)
1903 user_handle_t handle; /* handle to the window */
1904 @REPLY
1905 user_handle_t parent; /* parent window */
1906 user_handle_t owner; /* owner window */
1907 user_handle_t next_sibling; /* next sibling in Z-order */
1908 user_handle_t prev_sibling; /* prev sibling in Z-order */
1909 user_handle_t first_sibling; /* first sibling in Z-order */
1910 user_handle_t last_sibling; /* last sibling in Z-order */
1911 user_handle_t first_child; /* first child */
1912 user_handle_t last_child; /* last child */
1913 @END
1915 /* Set the position and Z order of a window */
1916 @REQ(set_window_pos)
1917 user_handle_t handle; /* handle to the window */
1918 user_handle_t previous; /* previous window in Z order */
1919 unsigned int flags; /* SWP_* flags */
1920 rectangle_t window; /* window rectangle */
1921 rectangle_t client; /* client rectangle */
1922 VARARG(valid,rectangles); /* valid rectangles from WM_NCCALCSIZE */
1923 @REPLY
1924 unsigned int new_style; /* new window style */
1925 @END
1928 /* Get the window and client rectangles of a window */
1929 @REQ(get_window_rectangles)
1930 user_handle_t handle; /* handle to the window */
1931 @REPLY
1932 rectangle_t window; /* window rectangle */
1933 rectangle_t visible; /* visible part of the window rectangle */
1934 rectangle_t client; /* client rectangle */
1935 @END
1938 /* Get the window text */
1939 @REQ(get_window_text)
1940 user_handle_t handle; /* handle to the window */
1941 @REPLY
1942 VARARG(text,unicode_str); /* window text */
1943 @END
1946 /* Set the window text */
1947 @REQ(set_window_text)
1948 user_handle_t handle; /* handle to the window */
1949 VARARG(text,unicode_str); /* window text */
1950 @END
1953 /* Get the coordinates offset between two windows */
1954 @REQ(get_windows_offset)
1955 user_handle_t from; /* handle to the first window */
1956 user_handle_t to; /* handle to the second window */
1957 @REPLY
1958 int x; /* x coordinate offset */
1959 int y; /* y coordinate offset */
1960 @END
1963 /* Get the visible region of a window */
1964 @REQ(get_visible_region)
1965 user_handle_t window; /* handle to the window */
1966 unsigned int flags; /* DCX flags */
1967 @REPLY
1968 user_handle_t top_win; /* top window to clip against */
1969 int top_org_x; /* top window visible rect origin in screen coords */
1970 int top_org_y;
1971 int win_org_x; /* window rect origin in screen coords */
1972 int win_org_y;
1973 size_t total_size; /* total size of the resulting region */
1974 VARARG(region,rectangles); /* list of rectangles for the region (in screen coords) */
1975 @END
1978 /* Get the window region */
1979 @REQ(get_window_region)
1980 user_handle_t window; /* handle to the window */
1981 @REPLY
1982 size_t total_size; /* total size of the resulting region */
1983 VARARG(region,rectangles); /* list of rectangles for the region */
1984 @END
1987 /* Set the window region */
1988 @REQ(set_window_region)
1989 user_handle_t window; /* handle to the window */
1990 VARARG(region,rectangles); /* list of rectangles for the region */
1991 @END
1994 /* Get the window update region */
1995 @REQ(get_update_region)
1996 user_handle_t window; /* handle to the window */
1997 user_handle_t from_child; /* child to start searching from */
1998 unsigned int flags; /* update flags (see below) */
1999 @REPLY
2000 user_handle_t child; /* child to repaint (or window itself) */
2001 unsigned int flags; /* resulting update flags (see below) */
2002 size_t total_size; /* total size of the resulting region */
2003 VARARG(region,rectangles); /* list of rectangles for the region */
2004 @END
2005 #define UPDATE_NONCLIENT 0x01 /* get region for repainting non-client area */
2006 #define UPDATE_ERASE 0x02 /* get region for erasing client area */
2007 #define UPDATE_PAINT 0x04 /* get region for painting client area */
2008 #define UPDATE_INTERNALPAINT 0x08 /* get region if internal paint is pending */
2009 #define UPDATE_ALLCHILDREN 0x10 /* force repaint of all children */
2010 #define UPDATE_NOCHILDREN 0x20 /* don't try to repaint any children */
2011 #define UPDATE_NOREGION 0x40 /* don't return a region, only the flags */
2014 /* Update the z order of a window so that a given rectangle is fully visible */
2015 @REQ(update_window_zorder)
2016 user_handle_t window; /* handle to the window */
2017 rectangle_t rect; /* rectangle that must be visible */
2018 @END
2021 /* Mark parts of a window as needing a redraw */
2022 @REQ(redraw_window)
2023 user_handle_t window; /* handle to the window */
2024 unsigned int flags; /* RDW_* flags */
2025 VARARG(region,rectangles); /* list of rectangles for the region */
2026 @END
2029 /* Set a window property */
2030 @REQ(set_window_property)
2031 user_handle_t window; /* handle to the window */
2032 atom_t atom; /* property atom (if no name specified) */
2033 obj_handle_t handle; /* handle to store */
2034 VARARG(name,unicode_str); /* property name */
2035 @END
2038 /* Remove a window property */
2039 @REQ(remove_window_property)
2040 user_handle_t window; /* handle to the window */
2041 atom_t atom; /* property atom (if no name specified) */
2042 VARARG(name,unicode_str); /* property name */
2043 @REPLY
2044 obj_handle_t handle; /* handle stored in property */
2045 @END
2048 /* Get a window property */
2049 @REQ(get_window_property)
2050 user_handle_t window; /* handle to the window */
2051 atom_t atom; /* property atom (if no name specified) */
2052 VARARG(name,unicode_str); /* property name */
2053 @REPLY
2054 obj_handle_t handle; /* handle stored in property */
2055 @END
2058 /* Get the list of properties of a window */
2059 @REQ(get_window_properties)
2060 user_handle_t window; /* handle to the window */
2061 @REPLY
2062 int total; /* total number of properties */
2063 VARARG(props,properties); /* list of properties */
2064 @END
2067 /* Create a window station */
2068 @REQ(create_winstation)
2069 unsigned int flags; /* window station flags */
2070 unsigned int access; /* wanted access rights */
2071 unsigned int attributes; /* object attributes */
2072 VARARG(name,unicode_str); /* object name */
2073 @REPLY
2074 obj_handle_t handle; /* handle to the window station */
2075 @END
2078 /* Open a handle to a window station */
2079 @REQ(open_winstation)
2080 unsigned int access; /* wanted access rights */
2081 unsigned int attributes; /* object attributes */
2082 VARARG(name,unicode_str); /* object name */
2083 @REPLY
2084 obj_handle_t handle; /* handle to the window station */
2085 @END
2088 /* Close a window station */
2089 @REQ(close_winstation)
2090 obj_handle_t handle; /* handle to the window station */
2091 @END
2094 /* Get the process current window station */
2095 @REQ(get_process_winstation)
2096 @REPLY
2097 obj_handle_t handle; /* handle to the window station */
2098 @END
2101 /* Set the process current window station */
2102 @REQ(set_process_winstation)
2103 obj_handle_t handle; /* handle to the window station */
2104 @END
2107 /* Create a desktop */
2108 @REQ(create_desktop)
2109 unsigned int flags; /* desktop flags */
2110 unsigned int access; /* wanted access rights */
2111 unsigned int attributes; /* object attributes */
2112 VARARG(name,unicode_str); /* object name */
2113 @REPLY
2114 obj_handle_t handle; /* handle to the desktop */
2115 @END
2118 /* Open a handle to a desktop */
2119 @REQ(open_desktop)
2120 unsigned int flags; /* desktop flags */
2121 unsigned int access; /* wanted access rights */
2122 unsigned int attributes; /* object attributes */
2123 VARARG(name,unicode_str); /* object name */
2124 @REPLY
2125 obj_handle_t handle; /* handle to the desktop */
2126 @END
2129 /* Close a desktop */
2130 @REQ(close_desktop)
2131 obj_handle_t handle; /* handle to the desktop */
2132 @END
2135 /* Get the thread current desktop */
2136 @REQ(get_thread_desktop)
2137 thread_id_t tid; /* thread id */
2138 @REPLY
2139 obj_handle_t handle; /* handle to the desktop */
2140 @END
2143 /* Set the thread current desktop */
2144 @REQ(set_thread_desktop)
2145 obj_handle_t handle; /* handle to the desktop */
2146 @END
2149 /* Get/set information about a user object (window station or desktop) */
2150 @REQ(set_user_object_info)
2151 obj_handle_t handle; /* handle to the object */
2152 unsigned int flags; /* information to set */
2153 unsigned int obj_flags; /* new object flags */
2154 @REPLY
2155 int is_desktop; /* is object a desktop? */
2156 unsigned int old_obj_flags; /* old object flags */
2157 VARARG(name,unicode_str); /* object name */
2158 @END
2159 #define SET_USER_OBJECT_FLAGS 1
2162 /* Attach (or detach) thread inputs */
2163 @REQ(attach_thread_input)
2164 thread_id_t tid_from; /* thread to be attached */
2165 thread_id_t tid_to; /* thread to which tid_from should be attached */
2166 int attach; /* is it an attach? */
2167 @END
2170 /* Get input data for a given thread */
2171 @REQ(get_thread_input)
2172 thread_id_t tid; /* id of thread */
2173 @REPLY
2174 user_handle_t focus; /* handle to the focus window */
2175 user_handle_t capture; /* handle to the capture window */
2176 user_handle_t active; /* handle to the active window */
2177 user_handle_t foreground; /* handle to the global foreground window */
2178 user_handle_t menu_owner; /* handle to the menu owner */
2179 user_handle_t move_size; /* handle to the moving/resizing window */
2180 user_handle_t caret; /* handle to the caret window */
2181 rectangle_t rect; /* caret rectangle */
2182 @END
2185 /* Get the time of the last input event */
2186 @REQ(get_last_input_time)
2187 @REPLY
2188 unsigned int time;
2189 @END
2192 /* Retrieve queue keyboard state for a given thread */
2193 @REQ(get_key_state)
2194 thread_id_t tid; /* id of thread */
2195 int key; /* optional key code or -1 */
2196 @REPLY
2197 unsigned char state; /* state of specified key */
2198 VARARG(keystate,bytes); /* state array for all the keys */
2199 @END
2201 /* Set queue keyboard state for a given thread */
2202 @REQ(set_key_state)
2203 thread_id_t tid; /* id of thread */
2204 VARARG(keystate,bytes); /* state array for all the keys */
2205 @END
2207 /* Set the system foreground window */
2208 @REQ(set_foreground_window)
2209 user_handle_t handle; /* handle to the foreground window */
2210 @REPLY
2211 user_handle_t previous; /* handle to the previous foreground window */
2212 int send_msg_old; /* whether we have to send a msg to the old window */
2213 int send_msg_new; /* whether we have to send a msg to the new window */
2214 @END
2216 /* Set the current thread focus window */
2217 @REQ(set_focus_window)
2218 user_handle_t handle; /* handle to the focus window */
2219 @REPLY
2220 user_handle_t previous; /* handle to the previous focus window */
2221 @END
2223 /* Set the current thread active window */
2224 @REQ(set_active_window)
2225 user_handle_t handle; /* handle to the active window */
2226 @REPLY
2227 user_handle_t previous; /* handle to the previous active window */
2228 @END
2230 /* Set the current thread capture window */
2231 @REQ(set_capture_window)
2232 user_handle_t handle; /* handle to the capture window */
2233 unsigned int flags; /* capture flags (see below) */
2234 @REPLY
2235 user_handle_t previous; /* handle to the previous capture window */
2236 user_handle_t full_handle; /* full 32-bit handle of new capture window */
2237 @END
2238 #define CAPTURE_MENU 0x01 /* capture is for a menu */
2239 #define CAPTURE_MOVESIZE 0x02 /* capture is for moving/resizing */
2242 /* Set the current thread caret window */
2243 @REQ(set_caret_window)
2244 user_handle_t handle; /* handle to the caret window */
2245 int width; /* caret width */
2246 int height; /* caret height */
2247 @REPLY
2248 user_handle_t previous; /* handle to the previous caret window */
2249 rectangle_t old_rect; /* previous caret rectangle */
2250 int old_hide; /* previous hide count */
2251 int old_state; /* previous caret state (1=on, 0=off) */
2252 @END
2255 /* Set the current thread caret information */
2256 @REQ(set_caret_info)
2257 unsigned int flags; /* caret flags (see below) */
2258 user_handle_t handle; /* handle to the caret window */
2259 int x; /* caret x position */
2260 int y; /* caret y position */
2261 int hide; /* increment for hide count (can be negative to show it) */
2262 int state; /* caret state (1=on, 0=off, -1=toggle current state) */
2263 @REPLY
2264 user_handle_t full_handle; /* handle to the current caret window */
2265 rectangle_t old_rect; /* previous caret rectangle */
2266 int old_hide; /* previous hide count */
2267 int old_state; /* previous caret state (1=on, 0=off) */
2268 @END
2269 #define SET_CARET_POS 0x01 /* set the caret position from x,y */
2270 #define SET_CARET_HIDE 0x02 /* increment the caret hide count */
2271 #define SET_CARET_STATE 0x04 /* set the caret on/off state */
2274 /* Set a window hook */
2275 @REQ(set_hook)
2276 int id; /* id of the hook */
2277 process_id_t pid; /* id of process to set the hook into */
2278 thread_id_t tid; /* id of thread to set the hook into */
2279 int event_min;
2280 int event_max;
2281 int flags;
2282 void* proc; /* hook procedure */
2283 int unicode; /* is it a unicode hook? */
2284 VARARG(module,unicode_str); /* module name */
2285 @REPLY
2286 user_handle_t handle; /* handle to the hook */
2287 unsigned int active_hooks; /* active hooks bitmap */
2288 @END
2291 /* Remove a window hook */
2292 @REQ(remove_hook)
2293 user_handle_t handle; /* handle to the hook */
2294 int id; /* id of the hook if handle is 0 */
2295 void* proc; /* hook procedure if handle is 0 */
2296 @REPLY
2297 unsigned int active_hooks; /* active hooks bitmap */
2298 @END
2301 /* Start calling a hook chain */
2302 @REQ(start_hook_chain)
2303 int id; /* id of the hook */
2304 int event; /* signalled event */
2305 user_handle_t window; /* handle to the event window */
2306 int object_id; /* object id for out of context winevent */
2307 int child_id; /* child id for out of context winevent */
2308 @REPLY
2309 user_handle_t handle; /* handle to the next hook */
2310 process_id_t pid; /* process id for low-level keyboard/mouse hooks */
2311 thread_id_t tid; /* thread id for low-level keyboard/mouse hooks */
2312 void* proc; /* hook procedure */
2313 int unicode; /* is it a unicode hook? */
2314 unsigned int active_hooks; /* active hooks bitmap */
2315 VARARG(module,unicode_str); /* module name */
2316 @END
2319 /* Finished calling a hook chain */
2320 @REQ(finish_hook_chain)
2321 int id; /* id of the hook */
2322 @END
2325 /* Get the next hook to call */
2326 @REQ(get_next_hook)
2327 user_handle_t handle; /* handle to the current hook */
2328 int event; /* signalled event */
2329 user_handle_t window; /* handle to the event window */
2330 int object_id; /* object id for out of context winevent */
2331 int child_id; /* child id for out of context winevent */
2332 @REPLY
2333 user_handle_t next; /* handle to the next hook */
2334 int id; /* id of the next hook */
2335 process_id_t pid; /* process id for low-level keyboard/mouse hooks */
2336 thread_id_t tid; /* thread id for low-level keyboard/mouse hooks */
2337 void* proc; /* next hook procedure */
2338 int prev_unicode; /* was the previous a unicode hook? */
2339 int next_unicode; /* is the next a unicode hook? */
2340 VARARG(module,unicode_str); /* module name */
2341 @END
2344 /* Create a window class */
2345 @REQ(create_class)
2346 int local; /* is it a local class? */
2347 atom_t atom; /* class atom */
2348 unsigned int style; /* class style */
2349 void* instance; /* module instance */
2350 int extra; /* number of extra class bytes */
2351 int win_extra; /* number of window extra bytes */
2352 void* client_ptr; /* pointer to class in client address space */
2353 @END
2356 /* Destroy a window class */
2357 @REQ(destroy_class)
2358 atom_t atom; /* class atom */
2359 void* instance; /* module instance */
2360 @REPLY
2361 void* client_ptr; /* pointer to class in client address space */
2362 @END
2365 /* Set some information in a class */
2366 @REQ(set_class_info)
2367 user_handle_t window; /* handle to the window */
2368 unsigned int flags; /* flags for info to set (see below) */
2369 atom_t atom; /* class atom */
2370 unsigned int style; /* class style */
2371 int win_extra; /* number of window extra bytes */
2372 void* instance; /* module instance */
2373 int extra_offset; /* offset to set in extra bytes */
2374 size_t extra_size; /* size to set in extra bytes */
2375 unsigned int extra_value; /* value to set in extra bytes */
2376 @REPLY
2377 atom_t old_atom; /* previous class atom */
2378 unsigned int old_style; /* previous class style */
2379 int old_extra; /* previous number of class extra bytes */
2380 int old_win_extra; /* previous number of window extra bytes */
2381 void* old_instance; /* previous module instance */
2382 unsigned int old_extra_value; /* old value in extra bytes */
2383 @END
2384 #define SET_CLASS_ATOM 0x0001
2385 #define SET_CLASS_STYLE 0x0002
2386 #define SET_CLASS_WINEXTRA 0x0004
2387 #define SET_CLASS_INSTANCE 0x0008
2388 #define SET_CLASS_EXTRA 0x0010
2391 /* Set/get clipboard information */
2392 @REQ(set_clipboard_info)
2393 unsigned int flags; /* flags for fields to set (see below) */
2394 user_handle_t clipboard; /* clipboard window */
2395 user_handle_t owner; /* clipboard owner */
2396 user_handle_t viewer; /* first clipboard viewer */
2397 unsigned int seqno; /* change sequence number */
2398 @REPLY
2399 unsigned int flags; /* status flags (see below) */
2400 user_handle_t old_clipboard; /* old clipboard window */
2401 user_handle_t old_owner; /* old clipboard owner */
2402 user_handle_t old_viewer; /* old clipboard viewer */
2403 unsigned int seqno; /* current sequence number */
2404 @END
2406 #define SET_CB_OPEN 0x001
2407 #define SET_CB_OWNER 0x002
2408 #define SET_CB_VIEWER 0x004
2409 #define SET_CB_SEQNO 0x008
2410 #define SET_CB_RELOWNER 0x010
2411 #define SET_CB_CLOSE 0x020
2412 #define CB_OPEN 0x040
2413 #define CB_OWNER 0x080
2414 #define CB_PROCESS 0x100
2417 /* Open a security token */
2418 @REQ(open_token)
2419 obj_handle_t handle; /* handle to the thread or process */
2420 unsigned int access; /* access rights to the new token */
2421 unsigned int attributes;/* object attributes */
2422 unsigned int flags; /* flags (see below) */
2423 @REPLY
2424 obj_handle_t token; /* handle to the token */
2425 @END
2426 #define OPEN_TOKEN_THREAD 1
2427 #define OPEN_TOKEN_AS_SELF 2
2430 /* Set/get the global windows */
2431 @REQ(set_global_windows)
2432 unsigned int flags; /* flags for fields to set (see below) */
2433 user_handle_t shell_window; /* handle to the new shell window */
2434 user_handle_t shell_listview; /* handle to the new shell listview window */
2435 user_handle_t progman_window; /* handle to the new program manager window */
2436 user_handle_t taskman_window; /* handle to the new task manager window */
2437 @REPLY
2438 user_handle_t old_shell_window; /* handle to the shell window */
2439 user_handle_t old_shell_listview; /* handle to the shell listview window */
2440 user_handle_t old_progman_window; /* handle to the new program manager window */
2441 user_handle_t old_taskman_window; /* handle to the new task manager window */
2442 @END
2443 #define SET_GLOBAL_SHELL_WINDOWS 0x01 /* set both main shell and listview windows */
2444 #define SET_GLOBAL_PROGMAN_WINDOW 0x02
2445 #define SET_GLOBAL_TASKMAN_WINDOW 0x04
2447 /* Adjust the privileges held by a token */
2448 @REQ(adjust_token_privileges)
2449 obj_handle_t handle; /* handle to the token */
2450 int disable_all; /* disable all privileges? */
2451 int get_modified_state; /* get modified privileges? */
2452 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges to enable/disable/remove */
2453 @REPLY
2454 unsigned int len; /* total length in bytes required to store token privileges */
2455 VARARG(privileges,LUID_AND_ATTRIBUTES); /* modified privileges */
2456 @END
2458 /* Retrieves the set of privileges held by or available to a token */
2459 @REQ(get_token_privileges)
2460 obj_handle_t handle; /* handle to the token */
2461 @REPLY
2462 unsigned int len; /* total length in bytes required to store token privileges */
2463 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges held by or available to a token */
2464 @END
2466 /* Check the token has the required privileges */
2467 @REQ(check_token_privileges)
2468 obj_handle_t handle; /* handle to the token */
2469 int all_required; /* are all the privileges required for the check to succeed? */
2470 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges to check */
2471 @REPLY
2472 int has_privileges; /* does the token have the required privileges? */
2473 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges held by or available to a token */
2474 @END
2476 @REQ(duplicate_token)
2477 obj_handle_t handle; /* handle to the token to duplicate */
2478 unsigned int access; /* access rights to the new token */
2479 unsigned int attributes; /* object attributes */
2480 int primary; /* is the new token to be a primary one? */
2481 int impersonation_level; /* impersonation level of the new token */
2482 @REPLY
2483 obj_handle_t new_handle; /* duplicated handle */
2484 @END
2486 @REQ(access_check)
2487 obj_handle_t handle; /* handle to the token */
2488 unsigned int desired_access; /* desired access to the object */
2489 unsigned int mapping_read; /* mapping from generic read to specific rights */
2490 unsigned int mapping_write; /* mapping from generic write to specific rights */
2491 unsigned int mapping_execute; /* mapping from generic execute to specific rights */
2492 unsigned int mapping_all; /* mapping from generic all to specific rights */
2493 VARARG(sd,security_descriptor); /* security descriptor to check */
2494 @REPLY
2495 unsigned int access_granted; /* access rights actually granted */
2496 unsigned int access_status; /* was access granted? */
2497 unsigned int privileges_len; /* length needed to store privileges */
2498 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges used during access check */
2499 @END
2501 @REQ(get_token_user)
2502 obj_handle_t handle; /* handle to the token */
2503 @REPLY
2504 size_t user_len; /* length needed to store user */
2505 VARARG(user,SID); /* sid of the user the token represents */
2506 @END
2508 /* Create a mailslot */
2509 @REQ(create_mailslot)
2510 unsigned int access; /* wanted access rights */
2511 unsigned int attributes; /* object attributes */
2512 obj_handle_t rootdir; /* root directory */
2513 unsigned int max_msgsize;
2514 int read_timeout;
2515 VARARG(name,unicode_str); /* mailslot name */
2516 @REPLY
2517 obj_handle_t handle; /* handle to the mailslot */
2518 @END
2521 /* Open an existing mailslot */
2522 @REQ(open_mailslot)
2523 unsigned int access;
2524 unsigned int attributes; /* object attributes */
2525 obj_handle_t rootdir; /* root directory */
2526 unsigned int sharing; /* sharing mode */
2527 VARARG(name,unicode_str); /* mailslot name */
2528 @REPLY
2529 obj_handle_t handle; /* handle to the mailslot */
2530 @END
2533 /* Set mailslot information */
2534 @REQ(set_mailslot_info)
2535 obj_handle_t handle; /* handle to the mailslot */
2536 unsigned int flags;
2537 int read_timeout;
2538 @REPLY
2539 unsigned int max_msgsize;
2540 int read_timeout;
2541 unsigned int msg_count;
2542 unsigned int next_msgsize;
2543 @END
2544 #define MAILSLOT_SET_READ_TIMEOUT 1
2547 /* Create a directory object */
2548 @REQ(create_directory)
2549 unsigned int access; /* access flags */
2550 unsigned int attributes; /* object attributes */
2551 obj_handle_t rootdir; /* root directory */
2552 VARARG(directory_name,unicode_str); /* Directory name */
2553 @REPLY
2554 obj_handle_t handle; /* handle to the directory */
2555 @END
2558 /* Open a directory object */
2559 @REQ(open_directory)
2560 unsigned int access; /* access flags */
2561 unsigned int attributes; /* object attributes */
2562 obj_handle_t rootdir; /* root directory */
2563 VARARG(directory_name,unicode_str); /* Directory name */
2564 @REPLY
2565 obj_handle_t handle; /* handle to the directory */
2566 @END
2569 /* Create a symbolic link object */
2570 @REQ(create_symlink)
2571 unsigned int access; /* access flags */
2572 unsigned int attributes; /* object attributes */
2573 obj_handle_t rootdir; /* root directory */
2574 size_t name_len; /* length of the symlink name in bytes */
2575 VARARG(name,unicode_str,name_len); /* symlink name */
2576 VARARG(target_name,unicode_str); /* target name */
2577 @REPLY
2578 obj_handle_t handle; /* handle to the symlink */
2579 @END
2582 /* Open a symbolic link object */
2583 @REQ(open_symlink)
2584 unsigned int access; /* access flags */
2585 unsigned int attributes; /* object attributes */
2586 obj_handle_t rootdir; /* root directory */
2587 VARARG(name,unicode_str); /* symlink name */
2588 @REPLY
2589 obj_handle_t handle; /* handle to the symlink */
2590 @END
2593 /* Query a symbolic link object */
2594 @REQ(query_symlink)
2595 obj_handle_t handle; /* handle to the symlink */
2596 @REPLY
2597 VARARG(target_name,unicode_str); /* target name */
2598 @END