source: trunk/third/bonobo/bonobo/bonobo-item-handler.h @ 15579

Revision 15579, 2.5 KB checked in by ghudson, 24 years ago (diff)
This commit was generated by cvs2svn to compensate for changes in r15578, which included commits to RCS files with non-trunk default branches.
Line 
1/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
2/**
3 * bonobo-item-handler.h: a generic ItemContainer handler for monikers.
4 *
5 * Author:
6 *   Miguel de Icaza (miguel@kernel.org)
7 *
8 * Copyright 1999, 2000 Helix Code, Inc.
9 * Copyright 1999, 2000 Miguel de Icaza
10 */
11
12#ifndef _BONOBO_ITEM_HANDLER_H_
13#define _BONOBO_ITEM_HANDLER_H_
14
15#include <libgnome/gnome-defs.h>
16#include <gtk/gtkobject.h>
17#include <bonobo/bonobo-xobject.h>
18
19BEGIN_GNOME_DECLS
20 
21#define BONOBO_ITEM_HANDLER_TYPE        (bonobo_item_handler_get_type ())
22#define BONOBO_ITEM_HANDLER(o)          (GTK_CHECK_CAST ((o), BONOBO_ITEM_HANDLER_TYPE, BonoboItemHandler))
23#define BONOBO_ITEM_HANDLER_CLASS(k)    (GTK_CHECK_CLASS_CAST((k), BONOBO_ITEM_HANDLER_TYPE, BonoboItemHandlerClass))
24#define BONOBO_IS_ITEM_HANDLER(o)       (GTK_CHECK_TYPE ((o), BONOBO_ITEM_HANDLER_TYPE))
25#define BONOBO_IS_ITEM_HANDLER_CLASS(k) (GTK_CHECK_CLASS_TYPE ((k), BONOBO_ITEM_HANDLER_TYPE))
26
27typedef struct _BonoboItemHandlerPrivate BonoboItemHandlerPrivate;
28typedef struct _BonoboItemHandler        BonoboItemHandler;
29
30typedef Bonobo_ItemContainer_ObjectNames *(*BonoboItemHandlerEnumObjectsFn)
31        (BonoboItemHandler *h, gpointer data, CORBA_Environment *);
32
33typedef Bonobo_Unknown (*BonoboItemHandlerGetObjectFn)
34        (BonoboItemHandler *h, const char *item_name, gboolean only_if_exists,
35         gpointer data, CORBA_Environment *ev);
36
37struct _BonoboItemHandler {
38        BonoboXObject base;
39
40        POA_Bonobo_ItemContainer__epv epv;
41
42        BonoboItemHandlerEnumObjectsFn enum_objects;
43        BonoboItemHandlerGetObjectFn   get_object;
44        gpointer                       user_data;
45
46        BonoboItemHandlerPrivate      *priv;
47};
48
49typedef struct {
50        BonoboXObjectClass parent_class;
51
52        POA_Bonobo_ItemContainer__epv epv;
53} BonoboItemHandlerClass;
54
55GtkType              bonobo_item_handler_get_type    (void);
56BonoboItemHandler   *bonobo_item_handler_new         (BonoboItemHandlerEnumObjectsFn enum_objects,
57                                                      BonoboItemHandlerGetObjectFn   get_object,
58                                                      gpointer                       user_data);
59
60BonoboItemHandler   *bonobo_item_handler_construct   (BonoboItemHandler             *handler,
61                                                      BonoboItemHandlerEnumObjectsFn enum_objects,
62                                                      BonoboItemHandlerGetObjectFn   get_object,
63                                                      gpointer                       user_data);
64
65/* Utility functions that can be used by getObject routines */
66typedef struct {
67        char *key;
68        char *value;
69} BonoboItemOption;
70
71GSList *bonobo_item_option_parse (const char *option_string);
72void    bonobo_item_options_free (GSList *options);
73
74END_GNOME_DECLS
75
76#endif
77
Note: See TracBrowser for help on using the repository browser.