Lumiera  0.pre.03
»edit your freedom«
interfaceregistry.h
Go to the documentation of this file.
1 /*
2  INTERFACEREGISTRY.h - Lumiera interface registry
3 
4  Copyright (C)
5  2008, Christian Thaeter <ct@pipapo.org>
6 
7   **Lumiera** is free software; you can redistribute it and/or modify it
8   under the terms of the GNU General Public License as published by the
9   Free Software Foundation; either version 2 of the License, or (at your
10   option) any later version. See the file COPYING for further details.
11 
12 */
13 
14 
22 #ifndef LUMIERA_INTERFACEREGISTRY_H
23 #define LUMIERA_INTERFACEREGISTRY_H
24 
25 #include "lib/mutex.h"
26 #include "lib/recmutex.h"
27 #include "lib/psplay.h"
28 
29 #include "common/interface.h"
30 #include "common/plugin.h"
31 
32 #include <nobug.h>
33 
34 
35 extern PSplay lumiera_interfaceregistry;
36 extern lumiera_recmutex lumiera_interface_mutex;
37 
38 
44 typedef struct lumiera_interfacenode_struct lumiera_interfacenode;
45 typedef lumiera_interfacenode* LumieraInterfacenode;
46 
48 {
50  psplaynode node;
51 
53  LumieraInterface interface;
54 
56  unsigned refcnt;
57 
59  LumieraPlugin plugin;
60 
62  LumieraInterfacenode lnk;
63 
65  size_t deps_size;
66 
68  LumieraInterfacenode* deps;
69 };
70 
71 
75 void
77 
78 void
79 lumiera_interfaceregistry_destroy (void);
80 
81 
82 void
83 lumiera_interfaceregistry_register_interface (LumieraInterface self, LumieraPlugin plugin);
84 
85 void
86 lumiera_interfaceregistry_bulkregister_interfaces (LumieraInterface* self, LumieraPlugin plugin);
87 
88 void
89 lumiera_interfaceregistry_remove_interface (LumieraInterface self);
90 
91 void
92 lumiera_interfaceregistry_bulkremove_interfaces (LumieraInterface* self);
93 
94 LumieraInterfacenode
95 lumiera_interfaceregistry_interfacenode_find (const char* interface, unsigned version, const char* name);
96 
97 LumieraInterface
98 lumiera_interfaceregistry_interface_find (const char* interface, unsigned version, const char* name);
99 
100 
101 
102 
103 #endif /* LUMIERA_INTERFACEREGISTRY_H */
104 /*
105 // Local Variables:
106 // mode: C
107 // c-file-style: "gnu"
108 // indent-tabs-mode: nil
109 // End:
110 */
LumieraInterface interface
the interface itself
Lumiera plugins define &#39;interfaces&#39; as shown in interface.h, the plugin system handles the loading of...
void lumiera_interfaceregistry_init(void)
Initialise the interface registry.
Mutual exclusion locking, header.
size_t deps_size
allocated size of the following dependency table
Lumiera interface macros and structures.
LumieraPlugin plugin
backreference to its plugin if it comes from a plugin, else NULL
Probabilistic splay tree.
psplaynode node
all known interfaces are registered in a tree
Mutual exclusion locking, header.
LumieraInterfacenode * deps
NULL terminated table of all dependencies (interfaces opened on initialisation)
LumieraInterfacenode lnk
temporary used to stack interfaces when recursively opening/closing them
Interface management node.
ElementBoxWidget::Config::Qualifier name(string id)
define the name-ID displayed in the caption
unsigned refcnt
reference counters and link used for internal reference management