user: Implement scrolling in popup menus.
[wine/multimedia.git] / server / protocol.def
blob27630d1aa8a71fde547b7128cadde7b5f638eba5
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 obj_handle_t exe_file; /* file handle for main exe */
247 obj_handle_t hstdin; /* handle for stdin */
248 obj_handle_t hstdout; /* handle for stdout */
249 obj_handle_t hstderr; /* handle for stderr */
250 VARARG(info,startup_info); /* startup information */
251 VARARG(env,unicode_str); /* environment */
252 @END
255 /* Signal the end of the process initialization */
256 @REQ(init_process_done)
257 void* module; /* main module base address */
258 size_t module_size; /* main module size */
259 void* entry; /* process entry point */
260 void* name; /* ptr to ptr to name (in process addr space) */
261 int gui; /* is it a GUI process? */
262 VARARG(filename,unicode_str); /* file name of main exe */
263 @END
266 /* Initialize a thread; called from the child after fork()/clone() */
267 @REQ(init_thread)
268 int unix_pid; /* Unix pid of new thread */
269 int unix_tid; /* Unix tid of new thread */
270 void* teb; /* TEB of new thread (in thread address space) */
271 void* peb; /* address of PEB (in thread address space) */
272 void* entry; /* thread entry point (in thread address space) */
273 void* ldt_copy; /* address of LDT copy (in thread address space) */
274 int reply_fd; /* fd for reply pipe */
275 int wait_fd; /* fd for blocking calls pipe */
276 int debug_level; /* new debug level */
277 @REPLY
278 process_id_t pid; /* process id of the new thread's process */
279 thread_id_t tid; /* thread id of the new thread */
280 size_t info_size; /* total size of startup info */
281 time_t server_start; /* server start time */
282 int version; /* protocol version */
283 @END
286 /* Terminate a process */
287 @REQ(terminate_process)
288 obj_handle_t handle; /* process handle to terminate */
289 int exit_code; /* process exit code */
290 @REPLY
291 int self; /* suicide? */
292 @END
295 /* Terminate a thread */
296 @REQ(terminate_thread)
297 obj_handle_t handle; /* thread handle to terminate */
298 int exit_code; /* thread exit code */
299 @REPLY
300 int self; /* suicide? */
301 int last; /* last thread in this process? */
302 @END
305 /* Retrieve information about a process */
306 @REQ(get_process_info)
307 obj_handle_t handle; /* process handle */
308 @REPLY
309 process_id_t pid; /* server process id */
310 process_id_t ppid; /* server process id of parent */
311 int exit_code; /* process exit code */
312 int priority; /* priority class */
313 int affinity; /* process affinity mask */
314 void* peb; /* PEB address in process address space */
315 @END
318 /* Set a process informations */
319 @REQ(set_process_info)
320 obj_handle_t handle; /* process handle */
321 int mask; /* setting mask (see below) */
322 int priority; /* priority class */
323 int affinity; /* affinity mask */
324 @END
325 #define SET_PROCESS_INFO_PRIORITY 0x01
326 #define SET_PROCESS_INFO_AFFINITY 0x02
329 /* Retrieve information about a thread */
330 @REQ(get_thread_info)
331 obj_handle_t handle; /* thread handle */
332 thread_id_t tid_in; /* thread id (optional) */
333 @REPLY
334 process_id_t pid; /* server process id */
335 thread_id_t tid; /* server thread id */
336 void* teb; /* thread teb pointer */
337 int exit_code; /* thread exit code */
338 int priority; /* thread priority level */
339 int affinity; /* thread affinity mask */
340 time_t creation_time; /* thread creation time */
341 time_t exit_time; /* thread exit time */
342 @END
345 /* Set a thread informations */
346 @REQ(set_thread_info)
347 obj_handle_t handle; /* thread handle */
348 int mask; /* setting mask (see below) */
349 int priority; /* priority class */
350 int affinity; /* affinity mask */
351 obj_handle_t token; /* impersonation token */
352 @END
353 #define SET_THREAD_INFO_PRIORITY 0x01
354 #define SET_THREAD_INFO_AFFINITY 0x02
355 #define SET_THREAD_INFO_TOKEN 0x04
358 /* Retrieve information about a module */
359 @REQ(get_dll_info)
360 obj_handle_t handle; /* process handle */
361 void* base_address; /* base address of module */
362 @REPLY
363 size_t size; /* module size */
364 void* entry_point;
365 VARARG(filename,unicode_str); /* file name of module */
366 @END
369 /* Suspend a thread */
370 @REQ(suspend_thread)
371 obj_handle_t handle; /* thread handle */
372 @REPLY
373 int count; /* new suspend count */
374 @END
377 /* Resume a thread */
378 @REQ(resume_thread)
379 obj_handle_t handle; /* thread handle */
380 @REPLY
381 int count; /* new suspend count */
382 @END
385 /* Notify the server that a dll has been loaded */
386 @REQ(load_dll)
387 obj_handle_t handle; /* file handle */
388 void* base; /* base address */
389 size_t size; /* dll size */
390 int dbg_offset; /* debug info offset */
391 int dbg_size; /* debug info size */
392 void* name; /* ptr to ptr to name (in process addr space) */
393 VARARG(filename,unicode_str); /* file name of dll */
394 @END
397 /* Notify the server that a dll is being unloaded */
398 @REQ(unload_dll)
399 void* base; /* base address */
400 @END
403 /* Queue an APC for a thread */
404 @REQ(queue_apc)
405 obj_handle_t handle; /* thread handle */
406 int user; /* user or system apc? */
407 void* func; /* function to call */
408 void* arg1; /* params for function to call */
409 void* arg2;
410 void* arg3;
411 @END
414 /* Get next APC to call */
415 @REQ(get_apc)
416 int alertable; /* is thread alertable? */
417 @REPLY
418 void* func; /* function to call */
419 int type; /* function type */
420 void* arg1; /* function arguments */
421 void* arg2;
422 void* arg3;
423 @END
424 enum apc_type { APC_NONE, APC_USER, APC_TIMER, APC_ASYNC_IO };
427 /* Close a handle for the current process */
428 @REQ(close_handle)
429 obj_handle_t handle; /* handle to close */
430 @REPLY
431 int fd; /* associated fd to close */
432 @END
435 /* Set a handle information */
436 @REQ(set_handle_info)
437 obj_handle_t handle; /* handle we are interested in */
438 int flags; /* new handle flags */
439 int mask; /* mask for flags to set */
440 @REPLY
441 int old_flags; /* old flag value */
442 @END
445 /* Duplicate a handle */
446 @REQ(dup_handle)
447 obj_handle_t src_process; /* src process handle */
448 obj_handle_t src_handle; /* src handle to duplicate */
449 obj_handle_t dst_process; /* dst process handle */
450 unsigned int access; /* wanted access rights */
451 unsigned int attributes; /* object attributes */
452 unsigned int options; /* duplicate options (see below) */
453 @REPLY
454 obj_handle_t handle; /* duplicated handle in dst process */
455 int fd; /* associated fd to close */
456 @END
457 #define DUP_HANDLE_CLOSE_SOURCE DUPLICATE_CLOSE_SOURCE
458 #define DUP_HANDLE_SAME_ACCESS DUPLICATE_SAME_ACCESS
459 #define DUP_HANDLE_MAKE_GLOBAL 0x80000000 /* Not a Windows flag */
462 /* Open a handle to a process */
463 @REQ(open_process)
464 process_id_t pid; /* process id to open */
465 unsigned int access; /* wanted access rights */
466 unsigned int attributes; /* object attributes */
467 @REPLY
468 obj_handle_t handle; /* handle to the process */
469 @END
472 /* Open a handle to a thread */
473 @REQ(open_thread)
474 thread_id_t tid; /* thread id to open */
475 unsigned int access; /* wanted access rights */
476 unsigned int attributes; /* object attributes */
477 @REPLY
478 obj_handle_t handle; /* handle to the thread */
479 @END
482 /* Wait for handles */
483 @REQ(select)
484 int flags; /* wait flags (see below) */
485 void* cookie; /* magic cookie to return to client */
486 obj_handle_t signal; /* object to signal (0 if none) */
487 abs_time_t timeout; /* absolute timeout */
488 VARARG(handles,handles); /* handles to select on */
489 @END
490 #define SELECT_ALL 1
491 #define SELECT_ALERTABLE 2
492 #define SELECT_INTERRUPTIBLE 4
493 #define SELECT_TIMEOUT 8
496 /* Create an event */
497 @REQ(create_event)
498 unsigned int access; /* wanted access rights */
499 unsigned int attributes; /* object attributes */
500 obj_handle_t rootdir; /* root directory */
501 int manual_reset; /* manual reset event */
502 int initial_state; /* initial state of the event */
503 VARARG(name,unicode_str); /* object name */
504 @REPLY
505 obj_handle_t handle; /* handle to the event */
506 @END
508 /* Event operation */
509 @REQ(event_op)
510 obj_handle_t handle; /* handle to event */
511 int op; /* event operation (see below) */
512 @END
513 enum event_op { PULSE_EVENT, SET_EVENT, RESET_EVENT };
516 /* Open an event */
517 @REQ(open_event)
518 unsigned int access; /* wanted access rights */
519 unsigned int attributes; /* object attributes */
520 obj_handle_t rootdir; /* root directory */
521 VARARG(name,unicode_str); /* object name */
522 @REPLY
523 obj_handle_t handle; /* handle to the event */
524 @END
527 /* Create a mutex */
528 @REQ(create_mutex)
529 unsigned int access; /* wanted access rights */
530 unsigned int attributes; /* object attributes */
531 obj_handle_t rootdir; /* root directory */
532 int owned; /* initially owned? */
533 VARARG(name,unicode_str); /* object name */
534 @REPLY
535 obj_handle_t handle; /* handle to the mutex */
536 @END
539 /* Release a mutex */
540 @REQ(release_mutex)
541 obj_handle_t handle; /* handle to the mutex */
542 @REPLY
543 unsigned int prev_count; /* value of internal counter, before release */
544 @END
547 /* Open a mutex */
548 @REQ(open_mutex)
549 unsigned int access; /* wanted access rights */
550 unsigned int attributes; /* object attributes */
551 obj_handle_t rootdir; /* root directory */
552 VARARG(name,unicode_str); /* object name */
553 @REPLY
554 obj_handle_t handle; /* handle to the mutex */
555 @END
558 /* Create a semaphore */
559 @REQ(create_semaphore)
560 unsigned int access; /* wanted access rights */
561 unsigned int attributes; /* object attributes */
562 obj_handle_t rootdir; /* root directory */
563 unsigned int initial; /* initial count */
564 unsigned int max; /* maximum count */
565 VARARG(name,unicode_str); /* object name */
566 @REPLY
567 obj_handle_t handle; /* handle to the semaphore */
568 @END
571 /* Release a semaphore */
572 @REQ(release_semaphore)
573 obj_handle_t handle; /* handle to the semaphore */
574 unsigned int count; /* count to add to semaphore */
575 @REPLY
576 unsigned int prev_count; /* previous semaphore count */
577 @END
580 /* Open a semaphore */
581 @REQ(open_semaphore)
582 unsigned int access; /* wanted access rights */
583 unsigned int attributes; /* object attributes */
584 obj_handle_t rootdir; /* root directory */
585 VARARG(name,unicode_str); /* object name */
586 @REPLY
587 obj_handle_t handle; /* handle to the semaphore */
588 @END
591 /* Create a file */
592 @REQ(create_file)
593 unsigned int access; /* wanted access rights */
594 unsigned int attributes; /* object attributes */
595 unsigned int sharing; /* sharing flags */
596 int create; /* file create action */
597 unsigned int options; /* file options */
598 unsigned int attrs; /* file attributes for creation */
599 VARARG(filename,string); /* file name */
600 @REPLY
601 obj_handle_t handle; /* handle to the file */
602 @END
605 /* Open a file object */
606 @REQ(open_file_object)
607 unsigned int access; /* wanted access rights */
608 unsigned int attributes; /* open attributes */
609 obj_handle_t rootdir; /* root directory */
610 unsigned int sharing; /* sharing flags */
611 VARARG(filename,unicode_str); /* file name */
612 @REPLY
613 obj_handle_t handle; /* handle to the file */
614 @END
617 /* Allocate a file handle for a Unix fd */
618 @REQ(alloc_file_handle)
619 unsigned int access; /* wanted access rights */
620 unsigned int attributes; /* object attributes */
621 int fd; /* file descriptor on the client side */
622 @REPLY
623 obj_handle_t handle; /* handle to the file */
624 @END
627 /* Get a Unix fd to access a file */
628 @REQ(get_handle_fd)
629 obj_handle_t handle; /* handle to the file */
630 unsigned int access; /* wanted access rights */
631 @REPLY
632 int fd; /* file descriptor */
633 int removable; /* is device removable? (-1 if unknown) */
634 int flags; /* file read/write flags (see below) */
635 @END
636 #define FD_FLAG_OVERLAPPED 0x01 /* fd opened in overlapped mode */
637 #define FD_FLAG_TIMEOUT 0x02 /* read/write is synchronous */
638 #define FD_FLAG_RECV_SHUTDOWN 0x04
639 #define FD_FLAG_SEND_SHUTDOWN 0x08
640 #define FD_FLAG_AVAILABLE 0x10 /* in overlap read/write operation,
641 * only handle available data (don't wait) */
643 /* Set the cached file descriptor of a handle */
644 @REQ(set_handle_fd)
645 obj_handle_t handle; /* handle we are interested in */
646 int fd; /* file descriptor */
647 int removable; /* is device removable? (-1 if unknown) */
648 @REPLY
649 int cur_fd; /* current file descriptor */
650 @END
653 /* Flush a file buffers */
654 @REQ(flush_file)
655 obj_handle_t handle; /* handle to the file */
656 @REPLY
657 obj_handle_t event; /* event set when finished */
658 @END
661 /* Lock a region of a file */
662 @REQ(lock_file)
663 obj_handle_t handle; /* handle to the file */
664 unsigned int offset_low; /* offset of start of lock */
665 unsigned int offset_high; /* offset of start of lock */
666 unsigned int count_low; /* count of bytes to lock */
667 unsigned int count_high; /* count of bytes to lock */
668 int shared; /* shared or exclusive lock? */
669 int wait; /* do we want to wait? */
670 @REPLY
671 obj_handle_t handle; /* handle to wait on */
672 int overlapped; /* is it an overlapped I/O handle? */
673 @END
676 /* Unlock a region of a file */
677 @REQ(unlock_file)
678 obj_handle_t handle; /* handle to the file */
679 unsigned int offset_low; /* offset of start of unlock */
680 unsigned int offset_high; /* offset of start of unlock */
681 unsigned int count_low; /* count of bytes to unlock */
682 unsigned int count_high; /* count of bytes to unlock */
683 @END
686 /* Get ready to unmount a Unix device */
687 @REQ(unmount_device)
688 obj_handle_t handle; /* handle to a file on the device */
689 @END
692 /* Create a socket */
693 @REQ(create_socket)
694 unsigned int access; /* wanted access rights */
695 unsigned int attributes; /* object attributes */
696 int family; /* family, see socket manpage */
697 int type; /* type, see socket manpage */
698 int protocol; /* protocol, see socket manpage */
699 unsigned int flags; /* socket flags */
700 @REPLY
701 obj_handle_t handle; /* handle to the new socket */
702 @END
705 /* Accept a socket */
706 @REQ(accept_socket)
707 obj_handle_t lhandle; /* handle to the listening socket */
708 unsigned int access; /* wanted access rights */
709 unsigned int attributes; /* object attributes */
710 @REPLY
711 obj_handle_t handle; /* handle to the new socket */
712 @END
715 /* Set socket event parameters */
716 @REQ(set_socket_event)
717 obj_handle_t handle; /* handle to the socket */
718 unsigned int mask; /* event mask */
719 obj_handle_t event; /* event object */
720 user_handle_t window; /* window to send the message to */
721 unsigned int msg; /* message to send */
722 @END
725 /* Get socket event parameters */
726 @REQ(get_socket_event)
727 obj_handle_t handle; /* handle to the socket */
728 int service; /* clear pending? */
729 obj_handle_t c_event; /* event to clear */
730 @REPLY
731 unsigned int mask; /* event mask */
732 unsigned int pmask; /* pending events */
733 unsigned int state; /* status bits */
734 VARARG(errors,ints); /* event errors */
735 @END
738 /* Reenable pending socket events */
739 @REQ(enable_socket_event)
740 obj_handle_t handle; /* handle to the socket */
741 unsigned int mask; /* events to re-enable */
742 unsigned int sstate; /* status bits to set */
743 unsigned int cstate; /* status bits to clear */
744 @END
746 @REQ(set_socket_deferred)
747 obj_handle_t handle; /* handle to the socket */
748 obj_handle_t deferred; /* handle to the socket for which accept() is deferred */
749 @END
751 /* Allocate a console (only used by a console renderer) */
752 @REQ(alloc_console)
753 unsigned int access; /* wanted access rights */
754 unsigned int attributes; /* object attributes */
755 process_id_t pid; /* pid of process which shall be attached to the console */
756 @REPLY
757 obj_handle_t handle_in; /* handle to console input */
758 obj_handle_t event; /* handle to renderer events change notification */
759 @END
762 /* Free the console of the current process */
763 @REQ(free_console)
764 @END
767 #define CONSOLE_RENDERER_NONE_EVENT 0x00
768 #define CONSOLE_RENDERER_TITLE_EVENT 0x01
769 #define CONSOLE_RENDERER_ACTIVE_SB_EVENT 0x02
770 #define CONSOLE_RENDERER_SB_RESIZE_EVENT 0x03
771 #define CONSOLE_RENDERER_UPDATE_EVENT 0x04
772 #define CONSOLE_RENDERER_CURSOR_POS_EVENT 0x05
773 #define CONSOLE_RENDERER_CURSOR_GEOM_EVENT 0x06
774 #define CONSOLE_RENDERER_DISPLAY_EVENT 0x07
775 #define CONSOLE_RENDERER_EXIT_EVENT 0x08
776 struct console_renderer_event
778 short event;
779 union
781 struct update
783 short top;
784 short bottom;
785 } update;
786 struct resize
788 short width;
789 short height;
790 } resize;
791 struct cursor_pos
793 short x;
794 short y;
795 } cursor_pos;
796 struct cursor_geom
798 short visible;
799 short size;
800 } cursor_geom;
801 struct display
803 short left;
804 short top;
805 short width;
806 short height;
807 } display;
808 } u;
811 /* retrieve console events for the renderer */
812 @REQ(get_console_renderer_events)
813 obj_handle_t handle; /* handle to console input events */
814 @REPLY
815 VARARG(data,bytes); /* the various console_renderer_events */
816 @END
819 /* Open a handle to the process console */
820 @REQ(open_console)
821 int from; /* 0 (resp 1) input (resp output) of current process console */
822 /* otherwise console_in handle to get active screen buffer? */
823 unsigned int access; /* wanted access rights */
824 unsigned int attributes; /* object attributes */
825 int share; /* share mask (only for output handles) */
826 @REPLY
827 obj_handle_t handle; /* handle to the console */
828 @END
831 /* Get the input queue wait event */
832 @REQ(get_console_wait_event)
833 @REPLY
834 obj_handle_t handle;
835 @END
837 /* Get a console mode (input or output) */
838 @REQ(get_console_mode)
839 obj_handle_t handle; /* handle to the console */
840 @REPLY
841 int mode; /* console mode */
842 @END
845 /* Set a console mode (input or output) */
846 @REQ(set_console_mode)
847 obj_handle_t handle; /* handle to the console */
848 int mode; /* console mode */
849 @END
852 /* Set info about a console (input only) */
853 @REQ(set_console_input_info)
854 obj_handle_t handle; /* handle to console input, or 0 for process' console */
855 int mask; /* setting mask (see below) */
856 obj_handle_t active_sb; /* active screen buffer */
857 int history_mode; /* whether we duplicate lines in history */
858 int history_size; /* number of lines in history */
859 int edition_mode; /* index to the edition mode flavors */
860 VARARG(title,unicode_str); /* console title */
861 @END
862 #define SET_CONSOLE_INPUT_INFO_ACTIVE_SB 0x01
863 #define SET_CONSOLE_INPUT_INFO_TITLE 0x02
864 #define SET_CONSOLE_INPUT_INFO_HISTORY_MODE 0x04
865 #define SET_CONSOLE_INPUT_INFO_HISTORY_SIZE 0x08
866 #define SET_CONSOLE_INPUT_INFO_EDITION_MODE 0x10
869 /* Get info about a console (input only) */
870 @REQ(get_console_input_info)
871 obj_handle_t handle; /* handle to console input, or 0 for process' console */
872 @REPLY
873 int history_mode; /* whether we duplicate lines in history */
874 int history_size; /* number of lines in history */
875 int history_index; /* number of used lines in history */
876 int edition_mode; /* index to the edition mode flavors */
877 VARARG(title,unicode_str); /* console title */
878 @END
881 /* appends a string to console's history */
882 @REQ(append_console_input_history)
883 obj_handle_t handle; /* handle to console input, or 0 for process' console */
884 VARARG(line,unicode_str); /* line to add */
885 @END
888 /* appends a string to console's history */
889 @REQ(get_console_input_history)
890 obj_handle_t handle; /* handle to console input, or 0 for process' console */
891 int index; /* index to get line from */
892 @REPLY
893 int total; /* total length of line in Unicode chars */
894 VARARG(line,unicode_str); /* line to add */
895 @END
898 /* creates a new screen buffer on process' console */
899 @REQ(create_console_output)
900 obj_handle_t handle_in; /* handle to console input, or 0 for process' console */
901 unsigned int access; /* wanted access rights */
902 unsigned int attributes; /* object attributes */
903 unsigned int share; /* sharing credentials */
904 @REPLY
905 obj_handle_t handle_out; /* handle to the screen buffer */
906 @END
909 /* Set info about a console (output only) */
910 @REQ(set_console_output_info)
911 obj_handle_t handle; /* handle to the console */
912 int mask; /* setting mask (see below) */
913 short int cursor_size; /* size of cursor (percentage filled) */
914 short int cursor_visible;/* cursor visibility flag */
915 short int cursor_x; /* position of cursor (x, y) */
916 short int cursor_y;
917 short int width; /* width of the screen buffer */
918 short int height; /* height of the screen buffer */
919 short int attr; /* default attribute */
920 short int win_left; /* window actually displayed by renderer */
921 short int win_top; /* the rect area is expressed withing the */
922 short int win_right; /* boundaries of the screen buffer */
923 short int win_bottom;
924 short int max_width; /* maximum size (width x height) for the window */
925 short int max_height;
926 @END
927 #define SET_CONSOLE_OUTPUT_INFO_CURSOR_GEOM 0x01
928 #define SET_CONSOLE_OUTPUT_INFO_CURSOR_POS 0x02
929 #define SET_CONSOLE_OUTPUT_INFO_SIZE 0x04
930 #define SET_CONSOLE_OUTPUT_INFO_ATTR 0x08
931 #define SET_CONSOLE_OUTPUT_INFO_DISPLAY_WINDOW 0x10
932 #define SET_CONSOLE_OUTPUT_INFO_MAX_SIZE 0x20
935 /* Get info about a console (output only) */
936 @REQ(get_console_output_info)
937 obj_handle_t handle; /* handle to the console */
938 @REPLY
939 short int cursor_size; /* size of cursor (percentage filled) */
940 short int cursor_visible;/* cursor visibility flag */
941 short int cursor_x; /* position of cursor (x, y) */
942 short int cursor_y;
943 short int width; /* width of the screen buffer */
944 short int height; /* height of the screen buffer */
945 short int attr; /* default attribute */
946 short int win_left; /* window actually displayed by renderer */
947 short int win_top; /* the rect area is expressed withing the */
948 short int win_right; /* boundaries of the screen buffer */
949 short int win_bottom;
950 short int max_width; /* maximum size (width x height) for the window */
951 short int max_height;
952 @END
954 /* Add input records to a console input queue */
955 @REQ(write_console_input)
956 obj_handle_t handle; /* handle to the console input */
957 VARARG(rec,input_records); /* input records */
958 @REPLY
959 int written; /* number of records written */
960 @END
963 /* Fetch input records from a console input queue */
964 @REQ(read_console_input)
965 obj_handle_t handle; /* handle to the console input */
966 int flush; /* flush the retrieved records from the queue? */
967 @REPLY
968 int read; /* number of records read */
969 VARARG(rec,input_records); /* input records */
970 @END
973 /* write data (chars and/or attributes) in a screen buffer */
974 @REQ(write_console_output)
975 obj_handle_t handle; /* handle to the console output */
976 int x; /* position where to start writing */
977 int y;
978 int mode; /* char info (see below) */
979 int wrap; /* wrap around at end of line? */
980 VARARG(data,bytes); /* info to write */
981 @REPLY
982 int written; /* number of char infos actually written */
983 int width; /* width of screen buffer */
984 int height; /* height of screen buffer */
985 @END
986 enum char_info_mode
988 CHAR_INFO_MODE_TEXT, /* characters only */
989 CHAR_INFO_MODE_ATTR, /* attributes only */
990 CHAR_INFO_MODE_TEXTATTR, /* both characters and attributes */
991 CHAR_INFO_MODE_TEXTSTDATTR /* characters but use standard attributes */
995 /* fill a screen buffer with constant data (chars and/or attributes) */
996 @REQ(fill_console_output)
997 obj_handle_t handle; /* handle to the console output */
998 int x; /* position where to start writing */
999 int y;
1000 int mode; /* char info mode */
1001 int count; /* number to write */
1002 int wrap; /* wrap around at end of line? */
1003 char_info_t data; /* data to write */
1004 @REPLY
1005 int written; /* number of char infos actually written */
1006 @END
1009 /* read data (chars and/or attributes) from a screen buffer */
1010 @REQ(read_console_output)
1011 obj_handle_t handle; /* handle to the console output */
1012 int x; /* position (x,y) where to start reading */
1013 int y;
1014 int mode; /* char info mode */
1015 int wrap; /* wrap around at end of line? */
1016 @REPLY
1017 int width; /* width of screen buffer */
1018 int height; /* height of screen buffer */
1019 VARARG(data,bytes);
1020 @END
1023 /* move a rect (of data) in screen buffer content */
1024 @REQ(move_console_output)
1025 obj_handle_t handle; /* handle to the console output */
1026 short int x_src; /* position (x, y) of rect to start moving from */
1027 short int y_src;
1028 short int x_dst; /* position (x, y) of rect to move to */
1029 short int y_dst;
1030 short int w; /* size of the rect (width, height) to move */
1031 short int h;
1032 @END
1035 /* Sends a signal to a process group */
1036 @REQ(send_console_signal)
1037 int signal; /* the signal to send */
1038 process_id_t group_id; /* the group to send the signal to */
1039 @END
1042 /* enable directory change notifications */
1043 @REQ(read_directory_changes)
1044 obj_handle_t handle; /* handle to the directory */
1045 obj_handle_t event; /* handle to the event */
1046 unsigned int filter; /* notification filter */
1047 int want_data; /* flag indicating whether change data should be collected */
1048 void* io_apc; /* APC routine to queue upon end of async */
1049 void* io_sb; /* I/O status block (unique across all async on this handle) */
1050 void* io_user; /* data to pass back to caller */
1051 @END
1054 @REQ(read_change)
1055 obj_handle_t handle;
1056 @REPLY
1057 int action; /* type of change */
1058 VARARG(name,string); /* name of directory entry that changed */
1059 @END
1062 /* Create a file mapping */
1063 @REQ(create_mapping)
1064 unsigned int access; /* wanted access rights */
1065 unsigned int attributes; /* object attributes */
1066 obj_handle_t rootdir; /* root directory */
1067 int size_high; /* mapping size */
1068 int size_low; /* mapping size */
1069 int protect; /* protection flags (see below) */
1070 obj_handle_t file_handle; /* file handle */
1071 VARARG(name,unicode_str); /* object name */
1072 @REPLY
1073 obj_handle_t handle; /* handle to the mapping */
1074 @END
1075 /* protection flags */
1076 #define VPROT_READ 0x01
1077 #define VPROT_WRITE 0x02
1078 #define VPROT_EXEC 0x04
1079 #define VPROT_WRITECOPY 0x08
1080 #define VPROT_GUARD 0x10
1081 #define VPROT_NOCACHE 0x20
1082 #define VPROT_COMMITTED 0x40
1083 #define VPROT_IMAGE 0x80
1086 /* Open a mapping */
1087 @REQ(open_mapping)
1088 unsigned int access; /* wanted access rights */
1089 unsigned int attributes; /* object attributes */
1090 obj_handle_t rootdir; /* root directory */
1091 VARARG(name,unicode_str); /* object name */
1092 @REPLY
1093 obj_handle_t handle; /* handle to the mapping */
1094 @END
1097 /* Get information about a file mapping */
1098 @REQ(get_mapping_info)
1099 obj_handle_t handle; /* handle to the mapping */
1100 @REPLY
1101 int size_high; /* mapping size */
1102 int size_low; /* mapping size */
1103 int protect; /* protection flags */
1104 int header_size; /* header size (for VPROT_IMAGE mapping) */
1105 void* base; /* default base addr (for VPROT_IMAGE mapping) */
1106 obj_handle_t shared_file; /* shared mapping file handle */
1107 int shared_size; /* shared mapping size */
1108 @END
1111 #define SNAP_HEAPLIST 0x00000001
1112 #define SNAP_PROCESS 0x00000002
1113 #define SNAP_THREAD 0x00000004
1114 #define SNAP_MODULE 0x00000008
1115 /* Create a snapshot */
1116 @REQ(create_snapshot)
1117 unsigned int attributes; /* object attributes */
1118 int flags; /* snapshot flags (SNAP_*) */
1119 process_id_t pid; /* process id */
1120 @REPLY
1121 obj_handle_t handle; /* handle to the snapshot */
1122 @END
1125 /* Get the next process from a snapshot */
1126 @REQ(next_process)
1127 obj_handle_t handle; /* handle to the snapshot */
1128 int reset; /* reset snapshot position? */
1129 @REPLY
1130 int count; /* process usage count */
1131 process_id_t pid; /* process id */
1132 process_id_t ppid; /* parent process id */
1133 void* heap; /* heap base */
1134 void* module; /* main module */
1135 int threads; /* number of threads */
1136 int priority; /* process priority */
1137 int handles; /* number of handles */
1138 VARARG(filename,unicode_str); /* file name of main exe */
1139 @END
1142 /* Get the next thread from a snapshot */
1143 @REQ(next_thread)
1144 obj_handle_t handle; /* handle to the snapshot */
1145 int reset; /* reset snapshot position? */
1146 @REPLY
1147 int count; /* thread usage count */
1148 process_id_t pid; /* process id */
1149 thread_id_t tid; /* thread id */
1150 int base_pri; /* base priority */
1151 int delta_pri; /* delta priority */
1152 @END
1155 /* Get the next module from a snapshot */
1156 @REQ(next_module)
1157 obj_handle_t handle; /* handle to the snapshot */
1158 int reset; /* reset snapshot position? */
1159 @REPLY
1160 process_id_t pid; /* process id */
1161 void* base; /* module base address */
1162 size_t size; /* module size */
1163 VARARG(filename,unicode_str); /* file name of module */
1164 @END
1167 /* Wait for a debug event */
1168 @REQ(wait_debug_event)
1169 int get_handle; /* should we alloc a handle for waiting? */
1170 @REPLY
1171 process_id_t pid; /* process id */
1172 thread_id_t tid; /* thread id */
1173 obj_handle_t wait; /* wait handle if no event ready */
1174 VARARG(event,debug_event); /* debug event data */
1175 @END
1178 /* Queue an exception event */
1179 @REQ(queue_exception_event)
1180 int first; /* first chance exception? */
1181 VARARG(record,exc_event); /* thread context followed by exception record */
1182 @REPLY
1183 obj_handle_t handle; /* handle to the queued event */
1184 @END
1187 /* Retrieve the status of an exception event */
1188 @REQ(get_exception_status)
1189 obj_handle_t handle; /* handle to the queued event */
1190 @REPLY
1191 VARARG(context,context); /* modified thread context */
1192 @END
1195 /* Send an output string to the debugger */
1196 @REQ(output_debug_string)
1197 void* string; /* string to display (in debugged process address space) */
1198 int unicode; /* is it Unicode? */
1199 int length; /* string length */
1200 @END
1203 /* Continue a debug event */
1204 @REQ(continue_debug_event)
1205 process_id_t pid; /* process id to continue */
1206 thread_id_t tid; /* thread id to continue */
1207 int status; /* continuation status */
1208 @END
1211 /* Start/stop debugging an existing process */
1212 @REQ(debug_process)
1213 process_id_t pid; /* id of the process to debug */
1214 int attach; /* 1=attaching / 0=detaching from the process */
1215 @END
1218 /* Simulate a breakpoint in a process */
1219 @REQ(debug_break)
1220 obj_handle_t handle; /* process handle */
1221 @REPLY
1222 int self; /* was it the caller itself? */
1223 @END
1226 /* Set debugger kill on exit flag */
1227 @REQ(set_debugger_kill_on_exit)
1228 int kill_on_exit; /* 0=detach/1=kill debuggee when debugger dies */
1229 @END
1232 /* Read data from a process address space */
1233 @REQ(read_process_memory)
1234 obj_handle_t handle; /* process handle */
1235 void* addr; /* addr to read from */
1236 @REPLY
1237 VARARG(data,bytes); /* result data */
1238 @END
1241 /* Write data to a process address space */
1242 @REQ(write_process_memory)
1243 obj_handle_t handle; /* process handle */
1244 void* addr; /* addr to write to (must be int-aligned) */
1245 unsigned int first_mask; /* mask for first word */
1246 unsigned int last_mask; /* mask for last word */
1247 VARARG(data,bytes); /* data to write */
1248 @END
1251 /* Create a registry key */
1252 @REQ(create_key)
1253 obj_handle_t parent; /* handle to the parent key */
1254 unsigned int access; /* desired access rights */
1255 unsigned int attributes; /* object attributes */
1256 unsigned int options; /* creation options */
1257 time_t modif; /* last modification time */
1258 size_t namelen; /* length of key name in bytes */
1259 VARARG(name,unicode_str,namelen); /* key name */
1260 VARARG(class,unicode_str); /* class name */
1261 @REPLY
1262 obj_handle_t hkey; /* handle to the created key */
1263 int created; /* has it been newly created? */
1264 @END
1266 /* Open a registry key */
1267 @REQ(open_key)
1268 obj_handle_t parent; /* handle to the parent key */
1269 unsigned int access; /* desired access rights */
1270 unsigned int attributes; /* object attributes */
1271 VARARG(name,unicode_str); /* key name */
1272 @REPLY
1273 obj_handle_t hkey; /* handle to the open key */
1274 @END
1277 /* Delete a registry key */
1278 @REQ(delete_key)
1279 obj_handle_t hkey; /* handle to the key */
1280 @END
1283 /* Flush a registry key */
1284 @REQ(flush_key)
1285 obj_handle_t hkey; /* handle to the key */
1286 @END
1289 /* Enumerate registry subkeys */
1290 @REQ(enum_key)
1291 obj_handle_t hkey; /* handle to registry key */
1292 int index; /* index of subkey (or -1 for current key) */
1293 int info_class; /* requested information class */
1294 @REPLY
1295 int subkeys; /* number of subkeys */
1296 int max_subkey; /* longest subkey name */
1297 int max_class; /* longest class name */
1298 int values; /* number of values */
1299 int max_value; /* longest value name */
1300 int max_data; /* longest value data */
1301 time_t modif; /* last modification time */
1302 size_t total; /* total length needed for full name and class */
1303 size_t namelen; /* length of key name in bytes */
1304 VARARG(name,unicode_str,namelen); /* key name */
1305 VARARG(class,unicode_str); /* class name */
1306 @END
1309 /* Set a value of a registry key */
1310 @REQ(set_key_value)
1311 obj_handle_t hkey; /* handle to registry key */
1312 int type; /* value type */
1313 size_t namelen; /* length of value name in bytes */
1314 VARARG(name,unicode_str,namelen); /* value name */
1315 VARARG(data,bytes); /* value data */
1316 @END
1319 /* Retrieve the value of a registry key */
1320 @REQ(get_key_value)
1321 obj_handle_t hkey; /* handle to registry key */
1322 VARARG(name,unicode_str); /* value name */
1323 @REPLY
1324 int type; /* value type */
1325 size_t total; /* total length needed for data */
1326 VARARG(data,bytes); /* value data */
1327 @END
1330 /* Enumerate a value of a registry key */
1331 @REQ(enum_key_value)
1332 obj_handle_t hkey; /* handle to registry key */
1333 int index; /* value index */
1334 int info_class; /* requested information class */
1335 @REPLY
1336 int type; /* value type */
1337 size_t total; /* total length needed for full name and data */
1338 size_t namelen; /* length of value name in bytes */
1339 VARARG(name,unicode_str,namelen); /* value name */
1340 VARARG(data,bytes); /* value data */
1341 @END
1344 /* Delete a value of a registry key */
1345 @REQ(delete_key_value)
1346 obj_handle_t hkey; /* handle to registry key */
1347 VARARG(name,unicode_str); /* value name */
1348 @END
1351 /* Load a registry branch from a file */
1352 @REQ(load_registry)
1353 obj_handle_t hkey; /* root key to load to */
1354 obj_handle_t file; /* file to load from */
1355 VARARG(name,unicode_str); /* subkey name */
1356 @END
1359 /* UnLoad a registry branch from a file */
1360 @REQ(unload_registry)
1361 obj_handle_t hkey; /* root key to unload to */
1362 @END
1365 /* Save a registry branch to a file */
1366 @REQ(save_registry)
1367 obj_handle_t hkey; /* key to save */
1368 obj_handle_t file; /* file to save to */
1369 @END
1372 /* Add a registry key change notification */
1373 @REQ(set_registry_notification)
1374 obj_handle_t hkey; /* key to watch for changes */
1375 obj_handle_t event; /* event to set */
1376 int subtree; /* should we watch the whole subtree? */
1377 unsigned int filter; /* things to watch */
1378 @END
1381 /* Create a waitable timer */
1382 @REQ(create_timer)
1383 unsigned int access; /* wanted access rights */
1384 unsigned int attributes; /* object attributes */
1385 obj_handle_t rootdir; /* root directory */
1386 int manual; /* manual reset */
1387 VARARG(name,unicode_str); /* object name */
1388 @REPLY
1389 obj_handle_t handle; /* handle to the timer */
1390 @END
1393 /* Open a waitable timer */
1394 @REQ(open_timer)
1395 unsigned int access; /* wanted access rights */
1396 unsigned int attributes; /* object attributes */
1397 obj_handle_t rootdir; /* root directory */
1398 VARARG(name,unicode_str); /* object name */
1399 @REPLY
1400 obj_handle_t handle; /* handle to the timer */
1401 @END
1403 /* Set a waitable timer */
1404 @REQ(set_timer)
1405 obj_handle_t handle; /* handle to the timer */
1406 abs_time_t expire; /* next expiration absolute time */
1407 int period; /* timer period in ms */
1408 void* callback; /* callback function */
1409 void* arg; /* callback argument */
1410 @REPLY
1411 int signaled; /* was the timer signaled before this call ? */
1412 @END
1414 /* Cancel a waitable timer */
1415 @REQ(cancel_timer)
1416 obj_handle_t handle; /* handle to the timer */
1417 @REPLY
1418 int signaled; /* was the timer signaled before this calltime ? */
1419 @END
1421 /* Get information on a waitable timer */
1422 @REQ(get_timer_info)
1423 obj_handle_t handle; /* handle to the timer */
1424 @REPLY
1425 abs_time_t when; /* absolute time when the timer next expires */
1426 int signaled; /* is the timer signaled? */
1427 @END
1430 /* Retrieve the current context of a thread */
1431 @REQ(get_thread_context)
1432 obj_handle_t handle; /* thread handle */
1433 unsigned int flags; /* context flags */
1434 int suspend; /* if getting context during suspend */
1435 @REPLY
1436 int self; /* was it a handle to the current thread? */
1437 VARARG(context,context); /* thread context */
1438 @END
1441 /* Set the current context of a thread */
1442 @REQ(set_thread_context)
1443 obj_handle_t handle; /* thread handle */
1444 unsigned int flags; /* context flags */
1445 int suspend; /* if setting context during suspend */
1446 VARARG(context,context); /* thread context */
1447 @REPLY
1448 int self; /* was it a handle to the current thread? */
1449 @END
1452 /* Fetch a selector entry for a thread */
1453 @REQ(get_selector_entry)
1454 obj_handle_t handle; /* thread handle */
1455 int entry; /* LDT entry */
1456 @REPLY
1457 unsigned int base; /* selector base */
1458 unsigned int limit; /* selector limit */
1459 unsigned char flags; /* selector flags */
1460 @END
1463 /* Add an atom */
1464 @REQ(add_atom)
1465 obj_handle_t table; /* which table to add atom to */
1466 VARARG(name,unicode_str); /* atom name */
1467 @REPLY
1468 atom_t atom; /* resulting atom */
1469 @END
1472 /* Delete an atom */
1473 @REQ(delete_atom)
1474 obj_handle_t table; /* which table to delete atom from */
1475 atom_t atom; /* atom handle */
1476 @END
1479 /* Find an atom */
1480 @REQ(find_atom)
1481 obj_handle_t table; /* which table to find atom from */
1482 VARARG(name,unicode_str); /* atom name */
1483 @REPLY
1484 atom_t atom; /* atom handle */
1485 @END
1488 /* Get information about an atom */
1489 @REQ(get_atom_information)
1490 obj_handle_t table; /* which table to find atom from */
1491 atom_t atom; /* atom handle */
1492 @REPLY
1493 int count; /* atom lock count */
1494 int pinned; /* whether the atom has been pinned */
1495 size_t total; /* actual length of atom name */
1496 VARARG(name,unicode_str); /* atom name */
1497 @END
1500 /* Set information about an atom */
1501 @REQ(set_atom_information)
1502 obj_handle_t table; /* which table to find atom from */
1503 atom_t atom; /* atom handle */
1504 int pinned; /* whether to bump atom information */
1505 @END
1508 /* Empty an atom table */
1509 @REQ(empty_atom_table)
1510 obj_handle_t table; /* which table to find atom from */
1511 int if_pinned; /* whether to delete pinned atoms */
1512 @END
1515 /* Init an atom table */
1516 @REQ(init_atom_table)
1517 int entries; /* number of entries (only for local) */
1518 @REPLY
1519 obj_handle_t table; /* handle to the atom table */
1520 @END
1523 /* Get the message queue of the current thread */
1524 @REQ(get_msg_queue)
1525 @REPLY
1526 obj_handle_t handle; /* handle to the queue */
1527 @END
1530 /* Set the current message queue wakeup mask */
1531 @REQ(set_queue_mask)
1532 unsigned int wake_mask; /* wakeup bits mask */
1533 unsigned int changed_mask; /* changed bits mask */
1534 int skip_wait; /* will we skip waiting if signaled? */
1535 @REPLY
1536 unsigned int wake_bits; /* current wake bits */
1537 unsigned int changed_bits; /* current changed bits */
1538 @END
1541 /* Get the current message queue status */
1542 @REQ(get_queue_status)
1543 int clear; /* should we clear the change bits? */
1544 @REPLY
1545 unsigned int wake_bits; /* wake bits */
1546 unsigned int changed_bits; /* changed bits since last time */
1547 @END
1550 /* Wait for a process to start waiting on input */
1551 @REQ(wait_input_idle)
1552 obj_handle_t handle; /* process handle */
1553 int timeout; /* timeout */
1554 @REPLY
1555 obj_handle_t event; /* handle to idle event */
1556 @END
1559 /* Send a message to a thread queue */
1560 @REQ(send_message)
1561 thread_id_t id; /* thread id */
1562 int type; /* message type (see below) */
1563 int flags; /* message flags (see below) */
1564 user_handle_t win; /* window handle */
1565 unsigned int msg; /* message code */
1566 unsigned int wparam; /* parameters */
1567 unsigned int lparam; /* parameters */
1568 int x; /* x position */
1569 int y; /* y position */
1570 unsigned int time; /* message time */
1571 unsigned int info; /* extra info */
1572 int timeout; /* timeout for reply */
1573 void* callback; /* callback address */
1574 VARARG(data,bytes); /* message data for sent messages */
1575 @END
1577 @REQ(post_quit_message)
1578 int exit_code; /* exit code to return */
1579 @END
1581 enum message_type
1583 MSG_ASCII, /* Ascii message (from SendMessageA) */
1584 MSG_UNICODE, /* Unicode message (from SendMessageW) */
1585 MSG_NOTIFY, /* notify message (from SendNotifyMessageW), always Unicode */
1586 MSG_CALLBACK, /* callback message (from SendMessageCallbackW), always Unicode */
1587 MSG_CALLBACK_RESULT,/* result of a callback message */
1588 MSG_OTHER_PROCESS, /* sent from other process, may include vararg data, always Unicode */
1589 MSG_POSTED, /* posted message (from PostMessageW), always Unicode */
1590 MSG_HARDWARE, /* hardware message */
1591 MSG_WINEVENT /* winevent message */
1593 #define SEND_MSG_ABORT_IF_HUNG 0x01
1596 /* Get a message from the current queue */
1597 @REQ(get_message)
1598 int flags; /* see below */
1599 user_handle_t get_win; /* window handle to get */
1600 unsigned int get_first; /* first message code to get */
1601 unsigned int get_last; /* last message code to get */
1602 unsigned int hw_id; /* id of the previous hardware message (or 0) */
1603 @REPLY
1604 int type; /* message type */
1605 user_handle_t win; /* window handle */
1606 unsigned int msg; /* message code */
1607 unsigned int wparam; /* parameters (callback function for MSG_CALLBACK_RESULT) */
1608 unsigned int lparam; /* parameters (result for MSG_CALLBACK_RESULT) */
1609 int x; /* x position */
1610 int y; /* y position */
1611 user_handle_t hook; /* winevent hook handle */
1612 void* hook_proc; /* winevent hook proc address */
1613 unsigned int time; /* message time */
1614 unsigned int info; /* extra info (callback argument for MSG_CALLBACK_RESULT) */
1615 unsigned int hw_id; /* id if hardware message */
1616 unsigned int active_hooks; /* active hooks bitmap */
1617 size_t total; /* total size of extra data */
1618 VARARG(data,bytes); /* message data for sent messages */
1619 @END
1620 #define GET_MSG_REMOVE 1 /* remove the message */
1621 #define GET_MSG_SENT_ONLY 2 /* only get sent messages */
1623 /* Reply to a sent message */
1624 @REQ(reply_message)
1625 unsigned int result; /* message result */
1626 int remove; /* should we remove the message? */
1627 VARARG(data,bytes); /* message data for sent messages */
1628 @END
1631 /* Accept the current hardware message */
1632 @REQ(accept_hardware_message)
1633 unsigned int hw_id; /* id of the hardware message */
1634 int remove; /* should we remove the message? */
1635 user_handle_t new_win; /* new destination window for current message */
1636 @END
1639 /* Retrieve the reply for the last message sent */
1640 @REQ(get_message_reply)
1641 int cancel; /* cancel message if not ready? */
1642 @REPLY
1643 unsigned int result; /* message result */
1644 VARARG(data,bytes); /* message data for sent messages */
1645 @END
1648 /* Set a window timer */
1649 @REQ(set_win_timer)
1650 user_handle_t win; /* window handle */
1651 unsigned int msg; /* message to post */
1652 unsigned int id; /* timer id */
1653 unsigned int rate; /* timer rate in ms */
1654 unsigned int lparam; /* message lparam (callback proc) */
1655 @REPLY
1656 unsigned int id; /* timer id */
1657 @END
1660 /* Kill a window timer */
1661 @REQ(kill_win_timer)
1662 user_handle_t win; /* window handle */
1663 unsigned int msg; /* message to post */
1664 unsigned int id; /* timer id */
1665 @END
1668 /* Retrieve info about a serial port */
1669 @REQ(get_serial_info)
1670 obj_handle_t handle; /* handle to comm port */
1671 @REPLY
1672 unsigned int readinterval;
1673 unsigned int readconst;
1674 unsigned int readmult;
1675 unsigned int writeconst;
1676 unsigned int writemult;
1677 unsigned int eventmask;
1678 unsigned int commerror;
1679 @END
1682 /* Set info about a serial port */
1683 @REQ(set_serial_info)
1684 obj_handle_t handle; /* handle to comm port */
1685 int flags; /* bitmask to set values (see below) */
1686 unsigned int readinterval;
1687 unsigned int readconst;
1688 unsigned int readmult;
1689 unsigned int writeconst;
1690 unsigned int writemult;
1691 unsigned int eventmask;
1692 unsigned int commerror;
1693 @END
1694 #define SERIALINFO_SET_TIMEOUTS 0x01
1695 #define SERIALINFO_SET_MASK 0x02
1696 #define SERIALINFO_SET_ERROR 0x04
1699 /* Create an async I/O */
1700 @REQ(register_async)
1701 obj_handle_t handle; /* handle to comm port, socket or file */
1702 int type; /* type of queue to look after */
1703 void* io_apc; /* APC routine to queue upon end of async */
1704 void* io_sb; /* I/O status block (unique across all async on this handle) */
1705 void* io_user; /* data to pass back to caller */
1706 int count; /* count - usually # of bytes to be read/written */
1707 @END
1708 #define ASYNC_TYPE_READ 0x01
1709 #define ASYNC_TYPE_WRITE 0x02
1710 #define ASYNC_TYPE_WAIT 0x03
1713 /* Cancel all async op on a fd */
1714 @REQ(cancel_async)
1715 obj_handle_t handle; /* handle to comm port, socket or file */
1716 @END
1719 /* Create a named pipe */
1720 @REQ(create_named_pipe)
1721 unsigned int access;
1722 unsigned int attributes; /* object attributes */
1723 obj_handle_t rootdir; /* root directory */
1724 unsigned int options;
1725 unsigned int flags;
1726 unsigned int maxinstances;
1727 unsigned int outsize;
1728 unsigned int insize;
1729 unsigned int timeout;
1730 VARARG(name,unicode_str); /* pipe name */
1731 @REPLY
1732 obj_handle_t handle; /* handle to the pipe */
1733 @END
1735 /* flags in create_named_pipe and get_named_pipe_info */
1736 #define NAMED_PIPE_MESSAGE_STREAM_WRITE 0x0001
1737 #define NAMED_PIPE_MESSAGE_STREAM_READ 0x0002
1738 #define NAMED_PIPE_NONBLOCKING_MODE 0x0004
1741 /* Open an existing named pipe */
1742 @REQ(open_named_pipe)
1743 unsigned int access;
1744 unsigned int attributes; /* object attributes */
1745 obj_handle_t rootdir; /* root directory */
1746 unsigned int flags; /* file flags */
1747 VARARG(name,unicode_str); /* pipe name */
1748 @REPLY
1749 obj_handle_t handle; /* handle to the pipe */
1750 @END
1753 /* Connect to a named pipe */
1754 @REQ(connect_named_pipe)
1755 obj_handle_t handle;
1756 obj_handle_t event;
1757 void* func;
1758 @END
1761 /* Wait for a named pipe */
1762 @REQ(wait_named_pipe)
1763 obj_handle_t handle;
1764 unsigned int timeout;
1765 obj_handle_t event;
1766 void* func;
1767 VARARG(name,unicode_str); /* pipe name */
1768 @END
1771 /* Disconnect a named pipe */
1772 @REQ(disconnect_named_pipe)
1773 obj_handle_t handle;
1774 @REPLY
1775 int fd; /* associated fd to close */
1776 @END
1779 @REQ(get_named_pipe_info)
1780 obj_handle_t handle;
1781 @REPLY
1782 unsigned int flags;
1783 unsigned int maxinstances;
1784 unsigned int outsize;
1785 unsigned int insize;
1786 @END
1789 /* Create a window */
1790 @REQ(create_window)
1791 user_handle_t parent; /* parent window */
1792 user_handle_t owner; /* owner window */
1793 atom_t atom; /* class atom */
1794 void* instance; /* module instance */
1795 @REPLY
1796 user_handle_t handle; /* created window */
1797 int extra; /* number of extra bytes */
1798 void* class_ptr; /* pointer to class in client address space */
1799 @END
1802 /* Destroy a window */
1803 @REQ(destroy_window)
1804 user_handle_t handle; /* handle to the window */
1805 @END
1808 /* Retrieve the desktop window for the current thread */
1809 @REQ(get_desktop_window)
1810 @REPLY
1811 user_handle_t handle; /* handle to the desktop window */
1812 @END
1815 /* Set a window owner */
1816 @REQ(set_window_owner)
1817 user_handle_t handle; /* handle to the window */
1818 user_handle_t owner; /* new owner */
1819 @REPLY
1820 user_handle_t full_owner; /* full handle of new owner */
1821 user_handle_t prev_owner; /* full handle of previous owner */
1822 @END
1825 /* Get information from a window handle */
1826 @REQ(get_window_info)
1827 user_handle_t handle; /* handle to the window */
1828 @REPLY
1829 user_handle_t full_handle; /* full 32-bit handle */
1830 user_handle_t last_active; /* last active popup */
1831 process_id_t pid; /* process owning the window */
1832 thread_id_t tid; /* thread owning the window */
1833 atom_t atom; /* class atom */
1834 int is_unicode; /* ANSI or unicode */
1835 @END
1838 /* Set some information in a window */
1839 @REQ(set_window_info)
1840 user_handle_t handle; /* handle to the window */
1841 unsigned int flags; /* flags for fields to set (see below) */
1842 unsigned int style; /* window style */
1843 unsigned int ex_style; /* window extended style */
1844 unsigned int id; /* window id */
1845 void* instance; /* creator instance */
1846 int is_unicode; /* ANSI or unicode */
1847 void* user_data; /* user-specific data */
1848 int extra_offset; /* offset to set in extra bytes */
1849 size_t extra_size; /* size to set in extra bytes */
1850 unsigned int extra_value; /* value to set in extra bytes */
1851 @REPLY
1852 unsigned int old_style; /* old window style */
1853 unsigned int old_ex_style; /* old window extended style */
1854 unsigned int old_id; /* old window id */
1855 void* old_instance; /* old creator instance */
1856 void* old_user_data; /* old user-specific data */
1857 unsigned int old_extra_value; /* old value in extra bytes */
1858 @END
1859 #define SET_WIN_STYLE 0x01
1860 #define SET_WIN_EXSTYLE 0x02
1861 #define SET_WIN_ID 0x04
1862 #define SET_WIN_INSTANCE 0x08
1863 #define SET_WIN_USERDATA 0x10
1864 #define SET_WIN_EXTRA 0x20
1865 #define SET_WIN_UNICODE 0x40
1868 /* Set the parent of a window */
1869 @REQ(set_parent)
1870 user_handle_t handle; /* handle to the window */
1871 user_handle_t parent; /* handle to the parent */
1872 @REPLY
1873 user_handle_t old_parent; /* old parent window */
1874 user_handle_t full_parent; /* full handle of new parent */
1875 @END
1878 /* Get a list of the window parents, up to the root of the tree */
1879 @REQ(get_window_parents)
1880 user_handle_t handle; /* handle to the window */
1881 @REPLY
1882 int count; /* total count of parents */
1883 VARARG(parents,user_handles); /* parent handles */
1884 @END
1887 /* Get a list of the window children */
1888 @REQ(get_window_children)
1889 user_handle_t parent; /* parent window */
1890 atom_t atom; /* class atom for the listed children */
1891 thread_id_t tid; /* thread owning the listed children */
1892 @REPLY
1893 int count; /* total count of children */
1894 VARARG(children,user_handles); /* children handles */
1895 @END
1898 /* Get a list of the window children that contain a given point */
1899 @REQ(get_window_children_from_point)
1900 user_handle_t parent; /* parent window */
1901 int x; /* point in parent coordinates */
1902 int y;
1903 @REPLY
1904 int count; /* total count of children */
1905 VARARG(children,user_handles); /* children handles */
1906 @END
1909 /* Get window tree information from a window handle */
1910 @REQ(get_window_tree)
1911 user_handle_t handle; /* handle to the window */
1912 @REPLY
1913 user_handle_t parent; /* parent window */
1914 user_handle_t owner; /* owner window */
1915 user_handle_t next_sibling; /* next sibling in Z-order */
1916 user_handle_t prev_sibling; /* prev sibling in Z-order */
1917 user_handle_t first_sibling; /* first sibling in Z-order */
1918 user_handle_t last_sibling; /* last sibling in Z-order */
1919 user_handle_t first_child; /* first child */
1920 user_handle_t last_child; /* last child */
1921 @END
1923 /* Set the position and Z order of a window */
1924 @REQ(set_window_pos)
1925 user_handle_t handle; /* handle to the window */
1926 user_handle_t previous; /* previous window in Z order */
1927 unsigned int flags; /* SWP_* flags */
1928 rectangle_t window; /* window rectangle */
1929 rectangle_t client; /* client rectangle */
1930 VARARG(valid,rectangles); /* valid rectangles from WM_NCCALCSIZE */
1931 @REPLY
1932 unsigned int new_style; /* new window style */
1933 @END
1936 /* Get the window and client rectangles of a window */
1937 @REQ(get_window_rectangles)
1938 user_handle_t handle; /* handle to the window */
1939 @REPLY
1940 rectangle_t window; /* window rectangle */
1941 rectangle_t visible; /* visible part of the window rectangle */
1942 rectangle_t client; /* client rectangle */
1943 @END
1946 /* Get the window text */
1947 @REQ(get_window_text)
1948 user_handle_t handle; /* handle to the window */
1949 @REPLY
1950 VARARG(text,unicode_str); /* window text */
1951 @END
1954 /* Set the window text */
1955 @REQ(set_window_text)
1956 user_handle_t handle; /* handle to the window */
1957 VARARG(text,unicode_str); /* window text */
1958 @END
1961 /* Get the coordinates offset between two windows */
1962 @REQ(get_windows_offset)
1963 user_handle_t from; /* handle to the first window */
1964 user_handle_t to; /* handle to the second window */
1965 @REPLY
1966 int x; /* x coordinate offset */
1967 int y; /* y coordinate offset */
1968 @END
1971 /* Get the visible region of a window */
1972 @REQ(get_visible_region)
1973 user_handle_t window; /* handle to the window */
1974 unsigned int flags; /* DCX flags */
1975 @REPLY
1976 user_handle_t top_win; /* top window to clip against */
1977 int top_org_x; /* top window visible rect origin in screen coords */
1978 int top_org_y;
1979 int win_org_x; /* window rect origin in screen coords */
1980 int win_org_y;
1981 size_t total_size; /* total size of the resulting region */
1982 VARARG(region,rectangles); /* list of rectangles for the region (in screen coords) */
1983 @END
1986 /* Get the window region */
1987 @REQ(get_window_region)
1988 user_handle_t window; /* handle to the window */
1989 @REPLY
1990 size_t total_size; /* total size of the resulting region */
1991 VARARG(region,rectangles); /* list of rectangles for the region */
1992 @END
1995 /* Set the window region */
1996 @REQ(set_window_region)
1997 user_handle_t window; /* handle to the window */
1998 VARARG(region,rectangles); /* list of rectangles for the region */
1999 @END
2002 /* Get the window update region */
2003 @REQ(get_update_region)
2004 user_handle_t window; /* handle to the window */
2005 user_handle_t from_child; /* child to start searching from */
2006 unsigned int flags; /* update flags (see below) */
2007 @REPLY
2008 user_handle_t child; /* child to repaint (or window itself) */
2009 unsigned int flags; /* resulting update flags (see below) */
2010 size_t total_size; /* total size of the resulting region */
2011 VARARG(region,rectangles); /* list of rectangles for the region */
2012 @END
2013 #define UPDATE_NONCLIENT 0x01 /* get region for repainting non-client area */
2014 #define UPDATE_ERASE 0x02 /* get region for erasing client area */
2015 #define UPDATE_PAINT 0x04 /* get region for painting client area */
2016 #define UPDATE_INTERNALPAINT 0x08 /* get region if internal paint is pending */
2017 #define UPDATE_ALLCHILDREN 0x10 /* force repaint of all children */
2018 #define UPDATE_NOCHILDREN 0x20 /* don't try to repaint any children */
2019 #define UPDATE_NOREGION 0x40 /* don't return a region, only the flags */
2022 /* Update the z order of a window so that a given rectangle is fully visible */
2023 @REQ(update_window_zorder)
2024 user_handle_t window; /* handle to the window */
2025 rectangle_t rect; /* rectangle that must be visible */
2026 @END
2029 /* Mark parts of a window as needing a redraw */
2030 @REQ(redraw_window)
2031 user_handle_t window; /* handle to the window */
2032 unsigned int flags; /* RDW_* flags */
2033 VARARG(region,rectangles); /* list of rectangles for the region */
2034 @END
2037 /* Set a window property */
2038 @REQ(set_window_property)
2039 user_handle_t window; /* handle to the window */
2040 atom_t atom; /* property atom (if no name specified) */
2041 obj_handle_t handle; /* handle to store */
2042 VARARG(name,unicode_str); /* property name */
2043 @END
2046 /* Remove a window property */
2047 @REQ(remove_window_property)
2048 user_handle_t window; /* handle to the window */
2049 atom_t atom; /* property atom (if no name specified) */
2050 VARARG(name,unicode_str); /* property name */
2051 @REPLY
2052 obj_handle_t handle; /* handle stored in property */
2053 @END
2056 /* Get a window property */
2057 @REQ(get_window_property)
2058 user_handle_t window; /* handle to the window */
2059 atom_t atom; /* property atom (if no name specified) */
2060 VARARG(name,unicode_str); /* property name */
2061 @REPLY
2062 obj_handle_t handle; /* handle stored in property */
2063 @END
2066 /* Get the list of properties of a window */
2067 @REQ(get_window_properties)
2068 user_handle_t window; /* handle to the window */
2069 @REPLY
2070 int total; /* total number of properties */
2071 VARARG(props,properties); /* list of properties */
2072 @END
2075 /* Create a window station */
2076 @REQ(create_winstation)
2077 unsigned int flags; /* window station flags */
2078 unsigned int access; /* wanted access rights */
2079 unsigned int attributes; /* object attributes */
2080 VARARG(name,unicode_str); /* object name */
2081 @REPLY
2082 obj_handle_t handle; /* handle to the window station */
2083 @END
2086 /* Open a handle to a window station */
2087 @REQ(open_winstation)
2088 unsigned int access; /* wanted access rights */
2089 unsigned int attributes; /* object attributes */
2090 VARARG(name,unicode_str); /* object name */
2091 @REPLY
2092 obj_handle_t handle; /* handle to the window station */
2093 @END
2096 /* Close a window station */
2097 @REQ(close_winstation)
2098 obj_handle_t handle; /* handle to the window station */
2099 @END
2102 /* Get the process current window station */
2103 @REQ(get_process_winstation)
2104 @REPLY
2105 obj_handle_t handle; /* handle to the window station */
2106 @END
2109 /* Set the process current window station */
2110 @REQ(set_process_winstation)
2111 obj_handle_t handle; /* handle to the window station */
2112 @END
2115 /* Create a desktop */
2116 @REQ(create_desktop)
2117 unsigned int flags; /* desktop flags */
2118 unsigned int access; /* wanted access rights */
2119 unsigned int attributes; /* object attributes */
2120 VARARG(name,unicode_str); /* object name */
2121 @REPLY
2122 obj_handle_t handle; /* handle to the desktop */
2123 @END
2126 /* Open a handle to a desktop */
2127 @REQ(open_desktop)
2128 unsigned int flags; /* desktop flags */
2129 unsigned int access; /* wanted access rights */
2130 unsigned int attributes; /* object attributes */
2131 VARARG(name,unicode_str); /* object name */
2132 @REPLY
2133 obj_handle_t handle; /* handle to the desktop */
2134 @END
2137 /* Close a desktop */
2138 @REQ(close_desktop)
2139 obj_handle_t handle; /* handle to the desktop */
2140 @END
2143 /* Get the thread current desktop */
2144 @REQ(get_thread_desktop)
2145 thread_id_t tid; /* thread id */
2146 @REPLY
2147 obj_handle_t handle; /* handle to the desktop */
2148 @END
2151 /* Set the thread current desktop */
2152 @REQ(set_thread_desktop)
2153 obj_handle_t handle; /* handle to the desktop */
2154 @END
2157 /* Get/set information about a user object (window station or desktop) */
2158 @REQ(set_user_object_info)
2159 obj_handle_t handle; /* handle to the object */
2160 unsigned int flags; /* information to set */
2161 unsigned int obj_flags; /* new object flags */
2162 @REPLY
2163 int is_desktop; /* is object a desktop? */
2164 unsigned int old_obj_flags; /* old object flags */
2165 VARARG(name,unicode_str); /* object name */
2166 @END
2167 #define SET_USER_OBJECT_FLAGS 1
2170 /* Attach (or detach) thread inputs */
2171 @REQ(attach_thread_input)
2172 thread_id_t tid_from; /* thread to be attached */
2173 thread_id_t tid_to; /* thread to which tid_from should be attached */
2174 int attach; /* is it an attach? */
2175 @END
2178 /* Get input data for a given thread */
2179 @REQ(get_thread_input)
2180 thread_id_t tid; /* id of thread */
2181 @REPLY
2182 user_handle_t focus; /* handle to the focus window */
2183 user_handle_t capture; /* handle to the capture window */
2184 user_handle_t active; /* handle to the active window */
2185 user_handle_t foreground; /* handle to the global foreground window */
2186 user_handle_t menu_owner; /* handle to the menu owner */
2187 user_handle_t move_size; /* handle to the moving/resizing window */
2188 user_handle_t caret; /* handle to the caret window */
2189 rectangle_t rect; /* caret rectangle */
2190 @END
2193 /* Get the time of the last input event */
2194 @REQ(get_last_input_time)
2195 @REPLY
2196 unsigned int time;
2197 @END
2200 /* Retrieve queue keyboard state for a given thread */
2201 @REQ(get_key_state)
2202 thread_id_t tid; /* id of thread */
2203 int key; /* optional key code or -1 */
2204 @REPLY
2205 unsigned char state; /* state of specified key */
2206 VARARG(keystate,bytes); /* state array for all the keys */
2207 @END
2209 /* Set queue keyboard state for a given thread */
2210 @REQ(set_key_state)
2211 thread_id_t tid; /* id of thread */
2212 VARARG(keystate,bytes); /* state array for all the keys */
2213 @END
2215 /* Set the system foreground window */
2216 @REQ(set_foreground_window)
2217 user_handle_t handle; /* handle to the foreground window */
2218 @REPLY
2219 user_handle_t previous; /* handle to the previous foreground window */
2220 int send_msg_old; /* whether we have to send a msg to the old window */
2221 int send_msg_new; /* whether we have to send a msg to the new window */
2222 @END
2224 /* Set the current thread focus window */
2225 @REQ(set_focus_window)
2226 user_handle_t handle; /* handle to the focus window */
2227 @REPLY
2228 user_handle_t previous; /* handle to the previous focus window */
2229 @END
2231 /* Set the current thread active window */
2232 @REQ(set_active_window)
2233 user_handle_t handle; /* handle to the active window */
2234 @REPLY
2235 user_handle_t previous; /* handle to the previous active window */
2236 @END
2238 /* Set the current thread capture window */
2239 @REQ(set_capture_window)
2240 user_handle_t handle; /* handle to the capture window */
2241 unsigned int flags; /* capture flags (see below) */
2242 @REPLY
2243 user_handle_t previous; /* handle to the previous capture window */
2244 user_handle_t full_handle; /* full 32-bit handle of new capture window */
2245 @END
2246 #define CAPTURE_MENU 0x01 /* capture is for a menu */
2247 #define CAPTURE_MOVESIZE 0x02 /* capture is for moving/resizing */
2250 /* Set the current thread caret window */
2251 @REQ(set_caret_window)
2252 user_handle_t handle; /* handle to the caret window */
2253 int width; /* caret width */
2254 int height; /* caret height */
2255 @REPLY
2256 user_handle_t previous; /* handle to the previous caret window */
2257 rectangle_t old_rect; /* previous caret rectangle */
2258 int old_hide; /* previous hide count */
2259 int old_state; /* previous caret state (1=on, 0=off) */
2260 @END
2263 /* Set the current thread caret information */
2264 @REQ(set_caret_info)
2265 unsigned int flags; /* caret flags (see below) */
2266 user_handle_t handle; /* handle to the caret window */
2267 int x; /* caret x position */
2268 int y; /* caret y position */
2269 int hide; /* increment for hide count (can be negative to show it) */
2270 int state; /* caret state (1=on, 0=off, -1=toggle current state) */
2271 @REPLY
2272 user_handle_t full_handle; /* handle to the current caret window */
2273 rectangle_t old_rect; /* previous caret rectangle */
2274 int old_hide; /* previous hide count */
2275 int old_state; /* previous caret state (1=on, 0=off) */
2276 @END
2277 #define SET_CARET_POS 0x01 /* set the caret position from x,y */
2278 #define SET_CARET_HIDE 0x02 /* increment the caret hide count */
2279 #define SET_CARET_STATE 0x04 /* set the caret on/off state */
2282 /* Set a window hook */
2283 @REQ(set_hook)
2284 int id; /* id of the hook */
2285 process_id_t pid; /* id of process to set the hook into */
2286 thread_id_t tid; /* id of thread to set the hook into */
2287 int event_min;
2288 int event_max;
2289 int flags;
2290 void* proc; /* hook procedure */
2291 int unicode; /* is it a unicode hook? */
2292 VARARG(module,unicode_str); /* module name */
2293 @REPLY
2294 user_handle_t handle; /* handle to the hook */
2295 unsigned int active_hooks; /* active hooks bitmap */
2296 @END
2299 /* Remove a window hook */
2300 @REQ(remove_hook)
2301 user_handle_t handle; /* handle to the hook */
2302 int id; /* id of the hook if handle is 0 */
2303 void* proc; /* hook procedure if handle is 0 */
2304 @REPLY
2305 unsigned int active_hooks; /* active hooks bitmap */
2306 @END
2309 /* Start calling a hook chain */
2310 @REQ(start_hook_chain)
2311 int id; /* id of the hook */
2312 int event; /* signalled event */
2313 user_handle_t window; /* handle to the event window */
2314 int object_id; /* object id for out of context winevent */
2315 int child_id; /* child id for out of context winevent */
2316 @REPLY
2317 user_handle_t handle; /* handle to the next hook */
2318 process_id_t pid; /* process id for low-level keyboard/mouse hooks */
2319 thread_id_t tid; /* thread id for low-level keyboard/mouse hooks */
2320 void* proc; /* hook procedure */
2321 int unicode; /* is it a unicode hook? */
2322 unsigned int active_hooks; /* active hooks bitmap */
2323 VARARG(module,unicode_str); /* module name */
2324 @END
2327 /* Finished calling a hook chain */
2328 @REQ(finish_hook_chain)
2329 int id; /* id of the hook */
2330 @END
2333 /* Get the next hook to call */
2334 @REQ(get_next_hook)
2335 user_handle_t handle; /* handle to the current hook */
2336 int event; /* signalled event */
2337 user_handle_t window; /* handle to the event window */
2338 int object_id; /* object id for out of context winevent */
2339 int child_id; /* child id for out of context winevent */
2340 @REPLY
2341 user_handle_t next; /* handle to the next hook */
2342 int id; /* id of the next hook */
2343 process_id_t pid; /* process id for low-level keyboard/mouse hooks */
2344 thread_id_t tid; /* thread id for low-level keyboard/mouse hooks */
2345 void* proc; /* next hook procedure */
2346 int prev_unicode; /* was the previous a unicode hook? */
2347 int next_unicode; /* is the next a unicode hook? */
2348 VARARG(module,unicode_str); /* module name */
2349 @END
2352 /* Create a window class */
2353 @REQ(create_class)
2354 int local; /* is it a local class? */
2355 atom_t atom; /* class atom */
2356 unsigned int style; /* class style */
2357 void* instance; /* module instance */
2358 int extra; /* number of extra class bytes */
2359 int win_extra; /* number of window extra bytes */
2360 void* client_ptr; /* pointer to class in client address space */
2361 @END
2364 /* Destroy a window class */
2365 @REQ(destroy_class)
2366 atom_t atom; /* class atom */
2367 void* instance; /* module instance */
2368 @REPLY
2369 void* client_ptr; /* pointer to class in client address space */
2370 @END
2373 /* Set some information in a class */
2374 @REQ(set_class_info)
2375 user_handle_t window; /* handle to the window */
2376 unsigned int flags; /* flags for info to set (see below) */
2377 atom_t atom; /* class atom */
2378 unsigned int style; /* class style */
2379 int win_extra; /* number of window extra bytes */
2380 void* instance; /* module instance */
2381 int extra_offset; /* offset to set in extra bytes */
2382 size_t extra_size; /* size to set in extra bytes */
2383 unsigned int extra_value; /* value to set in extra bytes */
2384 @REPLY
2385 atom_t old_atom; /* previous class atom */
2386 unsigned int old_style; /* previous class style */
2387 int old_extra; /* previous number of class extra bytes */
2388 int old_win_extra; /* previous number of window extra bytes */
2389 void* old_instance; /* previous module instance */
2390 unsigned int old_extra_value; /* old value in extra bytes */
2391 @END
2392 #define SET_CLASS_ATOM 0x0001
2393 #define SET_CLASS_STYLE 0x0002
2394 #define SET_CLASS_WINEXTRA 0x0004
2395 #define SET_CLASS_INSTANCE 0x0008
2396 #define SET_CLASS_EXTRA 0x0010
2399 /* Set/get clipboard information */
2400 @REQ(set_clipboard_info)
2401 unsigned int flags; /* flags for fields to set (see below) */
2402 user_handle_t clipboard; /* clipboard window */
2403 user_handle_t owner; /* clipboard owner */
2404 user_handle_t viewer; /* first clipboard viewer */
2405 unsigned int seqno; /* change sequence number */
2406 @REPLY
2407 unsigned int flags; /* status flags (see below) */
2408 user_handle_t old_clipboard; /* old clipboard window */
2409 user_handle_t old_owner; /* old clipboard owner */
2410 user_handle_t old_viewer; /* old clipboard viewer */
2411 unsigned int seqno; /* current sequence number */
2412 @END
2414 #define SET_CB_OPEN 0x001
2415 #define SET_CB_OWNER 0x002
2416 #define SET_CB_VIEWER 0x004
2417 #define SET_CB_SEQNO 0x008
2418 #define SET_CB_RELOWNER 0x010
2419 #define SET_CB_CLOSE 0x020
2420 #define CB_OPEN 0x040
2421 #define CB_OWNER 0x080
2422 #define CB_PROCESS 0x100
2425 /* Open a security token */
2426 @REQ(open_token)
2427 obj_handle_t handle; /* handle to the thread or process */
2428 unsigned int access; /* access rights to the new token */
2429 unsigned int attributes;/* object attributes */
2430 unsigned int flags; /* flags (see below) */
2431 @REPLY
2432 obj_handle_t token; /* handle to the token */
2433 @END
2434 #define OPEN_TOKEN_THREAD 1
2435 #define OPEN_TOKEN_AS_SELF 2
2438 /* Set/get the global windows */
2439 @REQ(set_global_windows)
2440 unsigned int flags; /* flags for fields to set (see below) */
2441 user_handle_t shell_window; /* handle to the new shell window */
2442 user_handle_t shell_listview; /* handle to the new shell listview window */
2443 user_handle_t progman_window; /* handle to the new program manager window */
2444 user_handle_t taskman_window; /* handle to the new task manager window */
2445 @REPLY
2446 user_handle_t old_shell_window; /* handle to the shell window */
2447 user_handle_t old_shell_listview; /* handle to the shell listview window */
2448 user_handle_t old_progman_window; /* handle to the new program manager window */
2449 user_handle_t old_taskman_window; /* handle to the new task manager window */
2450 @END
2451 #define SET_GLOBAL_SHELL_WINDOWS 0x01 /* set both main shell and listview windows */
2452 #define SET_GLOBAL_PROGMAN_WINDOW 0x02
2453 #define SET_GLOBAL_TASKMAN_WINDOW 0x04
2455 /* Adjust the privileges held by a token */
2456 @REQ(adjust_token_privileges)
2457 obj_handle_t handle; /* handle to the token */
2458 int disable_all; /* disable all privileges? */
2459 int get_modified_state; /* get modified privileges? */
2460 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges to enable/disable/remove */
2461 @REPLY
2462 unsigned int len; /* total length in bytes required to store token privileges */
2463 VARARG(privileges,LUID_AND_ATTRIBUTES); /* modified privileges */
2464 @END
2466 /* Retrieves the set of privileges held by or available to a token */
2467 @REQ(get_token_privileges)
2468 obj_handle_t handle; /* handle to the token */
2469 @REPLY
2470 unsigned int len; /* total length in bytes required to store token privileges */
2471 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges held by or available to a token */
2472 @END
2474 /* Check the token has the required privileges */
2475 @REQ(check_token_privileges)
2476 obj_handle_t handle; /* handle to the token */
2477 int all_required; /* are all the privileges required for the check to succeed? */
2478 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges to check */
2479 @REPLY
2480 int has_privileges; /* does the token have the required privileges? */
2481 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges held by or available to a token */
2482 @END
2484 @REQ(duplicate_token)
2485 obj_handle_t handle; /* handle to the token to duplicate */
2486 unsigned int access; /* access rights to the new token */
2487 unsigned int attributes; /* object attributes */
2488 int primary; /* is the new token to be a primary one? */
2489 int impersonation_level; /* impersonation level of the new token */
2490 @REPLY
2491 obj_handle_t new_handle; /* duplicated handle */
2492 @END
2494 @REQ(access_check)
2495 obj_handle_t handle; /* handle to the token */
2496 unsigned int desired_access; /* desired access to the object */
2497 unsigned int mapping_read; /* mapping from generic read to specific rights */
2498 unsigned int mapping_write; /* mapping from generic write to specific rights */
2499 unsigned int mapping_execute; /* mapping from generic execute to specific rights */
2500 unsigned int mapping_all; /* mapping from generic all to specific rights */
2501 VARARG(sd,security_descriptor); /* security descriptor to check */
2502 @REPLY
2503 unsigned int access_granted; /* access rights actually granted */
2504 unsigned int access_status; /* was access granted? */
2505 unsigned int privileges_len; /* length needed to store privileges */
2506 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges used during access check */
2507 @END
2509 @REQ(get_token_user)
2510 obj_handle_t handle; /* handle to the token */
2511 @REPLY
2512 size_t user_len; /* length needed to store user */
2513 VARARG(user,SID); /* sid of the user the token represents */
2514 @END
2516 /* Create a mailslot */
2517 @REQ(create_mailslot)
2518 unsigned int access; /* wanted access rights */
2519 unsigned int attributes; /* object attributes */
2520 obj_handle_t rootdir; /* root directory */
2521 unsigned int max_msgsize;
2522 int read_timeout;
2523 VARARG(name,unicode_str); /* mailslot name */
2524 @REPLY
2525 obj_handle_t handle; /* handle to the mailslot */
2526 @END
2529 /* Open an existing mailslot */
2530 @REQ(open_mailslot)
2531 unsigned int access;
2532 unsigned int attributes; /* object attributes */
2533 obj_handle_t rootdir; /* root directory */
2534 unsigned int sharing; /* sharing mode */
2535 VARARG(name,unicode_str); /* mailslot name */
2536 @REPLY
2537 obj_handle_t handle; /* handle to the mailslot */
2538 @END
2541 /* Set mailslot information */
2542 @REQ(set_mailslot_info)
2543 obj_handle_t handle; /* handle to the mailslot */
2544 unsigned int flags;
2545 int read_timeout;
2546 @REPLY
2547 unsigned int max_msgsize;
2548 int read_timeout;
2549 unsigned int msg_count;
2550 unsigned int next_msgsize;
2551 @END
2552 #define MAILSLOT_SET_READ_TIMEOUT 1
2555 /* Create a directory object */
2556 @REQ(create_directory)
2557 unsigned int access; /* access flags */
2558 unsigned int attributes; /* object attributes */
2559 obj_handle_t rootdir; /* root directory */
2560 VARARG(directory_name,unicode_str); /* Directory name */
2561 @REPLY
2562 obj_handle_t handle; /* handle to the directory */
2563 @END
2566 /* Open a directory object */
2567 @REQ(open_directory)
2568 unsigned int access; /* access flags */
2569 unsigned int attributes; /* object attributes */
2570 obj_handle_t rootdir; /* root directory */
2571 VARARG(directory_name,unicode_str); /* Directory name */
2572 @REPLY
2573 obj_handle_t handle; /* handle to the directory */
2574 @END
2577 /* Create a symbolic link object */
2578 @REQ(create_symlink)
2579 unsigned int access; /* access flags */
2580 unsigned int attributes; /* object attributes */
2581 obj_handle_t rootdir; /* root directory */
2582 size_t name_len; /* length of the symlink name in bytes */
2583 VARARG(name,unicode_str,name_len); /* symlink name */
2584 VARARG(target_name,unicode_str); /* target name */
2585 @REPLY
2586 obj_handle_t handle; /* handle to the symlink */
2587 @END
2590 /* Open a symbolic link object */
2591 @REQ(open_symlink)
2592 unsigned int access; /* access flags */
2593 unsigned int attributes; /* object attributes */
2594 obj_handle_t rootdir; /* root directory */
2595 VARARG(name,unicode_str); /* symlink name */
2596 @REPLY
2597 obj_handle_t handle; /* handle to the symlink */
2598 @END
2601 /* Query a symbolic link object */
2602 @REQ(query_symlink)
2603 obj_handle_t handle; /* handle to the symlink */
2604 @REPLY
2605 VARARG(target_name,unicode_str); /* target name */
2606 @END