Implemented mode setting things as well as VESA additions and other
[wine.git] / server / change.c
blobbae2f235505c3994982363f2f2bc912b72d71726
1 /*
2 * Server-side change notification management
4 * Copyright (C) 1998 Alexandre Julliard
5 */
7 #include <assert.h>
8 #include <stdio.h>
9 #include <stdlib.h>
11 #include "winerror.h"
12 #include "winnt.h"
13 #include "server/thread.h"
15 struct change
17 struct object obj; /* object header */
18 int subtree; /* watch all the subtree */
19 int filter; /* notification filter */
22 static void change_dump( struct object *obj, int verbose );
23 static int change_signaled( struct object *obj, struct thread *thread );
24 static void change_destroy( struct object *obj );
26 static const struct object_ops change_ops =
28 change_dump,
29 add_queue,
30 remove_queue,
31 change_signaled,
32 no_satisfied,
33 no_read_fd,
34 no_write_fd,
35 no_flush,
36 no_get_file_info,
37 change_destroy
41 struct object *create_change_notification( int subtree, int filter )
43 struct change *change;
44 if (!(change = mem_alloc( sizeof(*change) ))) return NULL;
45 init_object( &change->obj, &change_ops, NULL );
46 change->subtree = subtree;
47 change->filter = filter;
48 return &change->obj;
51 static void change_dump( struct object *obj, int verbose )
53 struct change *change = (struct change *)obj;
54 assert( obj->ops == &change_ops );
55 fprintf( stderr, "Change notification sub=%d filter=%08x\n",
56 change->subtree, change->filter );
59 static int change_signaled( struct object *obj, struct thread *thread )
61 /* struct change *change = (struct change *)obj;*/
62 assert( obj->ops == &change_ops );
63 return 0; /* never signaled for now */
66 static void change_destroy( struct object *obj )
68 struct change *change = (struct change *)obj;
69 assert( obj->ops == &change_ops );
70 free( change );