File: bonobo-listener.h

package info (click to toggle)
bonobo 1.0.22-2.2
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 13,412 kB
  • ctags: 5,445
  • sloc: ansic: 51,714; sh: 7,733; makefile: 1,425; yacc: 318; xml: 266; sed: 16
file content (69 lines) | stat: -rw-r--r-- 2,178 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
/*
 * bonobo-listener.h: Generic listener interface for callbacks.
 *
 * Authors:
 *	Alex Graveley (alex@helixcode.com)
 *	Mike Kestner  (mkestner@ameritech.net)
 *
 * Copyright (C) 2000, Helix Code, Inc.
 */
#ifndef _BONOBO_LISTENER_H_
#define _BONOBO_LISTENER_H_

#include <bonobo/bonobo-arg.h>
#include <bonobo/bonobo-xobject.h>

BEGIN_GNOME_DECLS

#define BONOBO_LISTENER_TYPE        (bonobo_listener_get_type ())
#define BONOBO_LISTENER(o)          (GTK_CHECK_CAST ((o), BONOBO_LISTENER_TYPE, BonoboListener))
#define BONOBO_LISTENER_CLASS(k)    (GTK_CHECK_CLASS_CAST((k), BONOBO_LISTENER_TYPE, BonoboListenerClass))
#define BONOBO_IS_LISTENER(o)       (GTK_CHECK_TYPE ((o), BONOBO_LISTENER_TYPE))
#define BONOBO_IS_LISTENER_CLASS(k) (GTK_CHECK_CLASS_TYPE ((k), BONOBO_LISTENER_TYPE))

typedef struct _BonoboListenerPrivate BonoboListenerPrivate;

typedef struct {
        BonoboXObject          parent;

	BonoboListenerPrivate *priv;
} BonoboListener;

typedef struct {
	BonoboXObjectClass     parent_class;

	POA_Bonobo_Listener__epv epv;

	/* Signals */
	void (* event_notify) (BonoboListener    *listener, 
			       char              *event_name,
			       BonoboArg         *event_data, 
			       CORBA_Environment *ev);
} BonoboListenerClass;


typedef void (*BonoboListenerCallbackFn)  (BonoboListener    *listener,
					   char              *event_name, 
					   CORBA_any         *any,
					   CORBA_Environment *ev,
					   gpointer           user_data);

GtkType         bonobo_listener_get_type  (void);

BonoboListener *bonobo_listener_new       (BonoboListenerCallbackFn event_callback, 
					   gpointer                 user_data);

char           *bonobo_event_make_name    (const char *idl_path, 
					   const char *kind,
					   const char *subtype);

char           *bonobo_event_type         (const char *event_name);
char           *bonobo_event_subtype      (const char *event_name);
char           *bonobo_event_kind         (const char *event_name);
char           *bonobo_event_idl_path     (const char *event_name);

END_GNOME_DECLS

#endif /* _BONOBO_LISTENER_H_ */