1 | /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ |
---|
2 | /* |
---|
3 | * bonobo-event-source.h: Generic event emitter. |
---|
4 | * |
---|
5 | * Author: |
---|
6 | * Alex Graveley (alex@helixcode.com) |
---|
7 | * |
---|
8 | * Copyright (C) 2000, Helix Code, Inc. |
---|
9 | */ |
---|
10 | #ifndef _BONOBO_EVENT_SOURCE_H_ |
---|
11 | #define _BONOBO_EVENT_SOURCE_H_ |
---|
12 | |
---|
13 | #include <bonobo/bonobo-xobject.h> |
---|
14 | #include <bonobo/bonobo-listener.h> |
---|
15 | |
---|
16 | BEGIN_GNOME_DECLS |
---|
17 | |
---|
18 | #define BONOBO_EVENT_SOURCE_TYPE (bonobo_event_source_get_type ()) |
---|
19 | #define BONOBO_EVENT_SOURCE(o) (GTK_CHECK_CAST ((o), BONOBO_EVENT_SOURCE_TYPE, BonoboEventSource)) |
---|
20 | #define BONOBO_EVENT_SOURCE_CLASS(k) (GTK_CHECK_CLASS_CAST((k), BONOBO_EVENT_SOURCE_TYPE, BonoboEventSourceClass)) |
---|
21 | #define BONOBO_IS_EVENT_SOURCE(o) (GTK_CHECK_TYPE ((o), BONOBO_EVENT_SOURCE_TYPE)) |
---|
22 | #define BONOBO_IS_EVENT_SOURCE_CLASS(k) (GTK_CHECK_CLASS_TYPE ((k), BONOBO_EVENT_SOURCE_TYPE)) |
---|
23 | |
---|
24 | typedef struct _BonoboEventSourcePrivate BonoboEventSourcePrivate; |
---|
25 | |
---|
26 | typedef struct { |
---|
27 | BonoboXObject parent; |
---|
28 | BonoboEventSourcePrivate *priv; |
---|
29 | } BonoboEventSource; |
---|
30 | |
---|
31 | typedef struct { |
---|
32 | BonoboXObjectClass parent_class; |
---|
33 | |
---|
34 | POA_Bonobo_EventSource__epv epv; |
---|
35 | } BonoboEventSourceClass; |
---|
36 | |
---|
37 | GtkType bonobo_event_source_get_type (void); |
---|
38 | BonoboEventSource *bonobo_event_source_new (void); |
---|
39 | void bonobo_event_source_notify_listeners (BonoboEventSource *event_source, |
---|
40 | const char *event_name, |
---|
41 | const CORBA_any *value, |
---|
42 | CORBA_Environment *opt_ev); |
---|
43 | |
---|
44 | void bonobo_event_source_notify_listeners_full (BonoboEventSource *event_source, |
---|
45 | const char *path, |
---|
46 | const char *type, |
---|
47 | const char *subtype, |
---|
48 | const CORBA_any *value, |
---|
49 | CORBA_Environment *opt_ev); |
---|
50 | |
---|
51 | void bonobo_event_source_client_remove_listener (Bonobo_Unknown object, |
---|
52 | Bonobo_EventSource_ListenerId id, |
---|
53 | CORBA_Environment *opt_ev); |
---|
54 | |
---|
55 | Bonobo_EventSource_ListenerId |
---|
56 | bonobo_event_source_client_add_listener (Bonobo_Unknown object, |
---|
57 | BonoboListenerCallbackFn event_callback, |
---|
58 | const char *opt_mask, |
---|
59 | CORBA_Environment *opt_ev, |
---|
60 | gpointer user_data); |
---|
61 | |
---|
62 | /* You don't want this routine */ |
---|
63 | void bonobo_event_source_ignore_listeners (BonoboEventSource *event_source); |
---|
64 | |
---|
65 | END_GNOME_DECLS |
---|
66 | |
---|
67 | #endif /* _BONOBO_EVENT_SOURCE_H_ */ |
---|
68 | |
---|