aboutsummaryrefslogtreecommitdiffstats
path: root/e-util/e-config.h
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2009-10-24 20:50:11 +0800
committerMatthew Barnes <mbarnes@redhat.com>2009-10-27 21:25:00 +0800
commit692df363ee1733517967cbba312a17e3cb390465 (patch)
tree98250c34b5ee32b1c2d5f5d6083c8b0080612956 /e-util/e-config.h
parent4370d47c8b50a04e5564577c2a980a368bd4d1d3 (diff)
downloadgsoc2013-evolution-692df363ee1733517967cbba312a17e3cb390465.tar.gz
gsoc2013-evolution-692df363ee1733517967cbba312a17e3cb390465.tar.zst
gsoc2013-evolution-692df363ee1733517967cbba312a17e3cb390465.zip
EConfig cleanup.
Diffstat (limited to 'e-util/e-config.h')
-rw-r--r--e-util/e-config.h41
1 files changed, 30 insertions, 11 deletions
diff --git a/e-util/e-config.h b/e-util/e-config.h
index 1550f8895c..dbc0585d85 100644
--- a/e-util/e-config.h
+++ b/e-util/e-config.h
@@ -21,11 +21,29 @@
*
*/
-#ifndef __E_CONFIG_H__
-#define __E_CONFIG_H__
+#ifndef E_CONFIG_H
+#define E_CONFIG_H
#include <gtk/gtk.h>
-#include <libedataserver/e-msgport.h>
+
+/* Standard GObject macros */
+#define E_TYPE_CONFIG \
+ (e_config_get_type ())
+#define E_CONFIG(obj) \
+ (G_TYPE_CHECK_INSTANCE_CAST \
+ ((obj), E_TYPE_CONFIG, EConfig))
+#define E_CONFIG_CLASS(cls) \
+ (G_TYPE_CHECK_CLASS_CAST \
+ ((cls), E_TYPE_CONFIG, EConfigClass))
+#define E_IS_CONFIG(obj) \
+ (G_TYPE_CHECK_INSTANCE_TYPE \
+ ((obj), E_TYPE_CONFIG))
+#define E_IS_CONFIG_CLASS(cls) \
+ (G_TYPE_CHECK_CLASS_TYPE \
+ ((cls), E_TYPE_CONFIG))
+#define E_CONFIG_GET_CLASS(obj) \
+ (G_TYPE_INSTANCE_GET_CLASS \
+ ((obj), E_TYPE_CONFIG, EConfigClass))
G_BEGIN_DECLS
@@ -33,6 +51,7 @@ G_BEGIN_DECLS
typedef struct _EConfig EConfig;
typedef struct _EConfigClass EConfigClass;
+typedef struct _EConfigPrivate EConfigPrivate;
typedef struct _EConfigItem EConfigItem;
typedef struct _EConfigFactory EConfigFactory;
@@ -185,8 +204,7 @@ struct _EConfigTarget {
**/
struct _EConfig {
GObject object;
-
- struct _EConfigPrivate *priv;
+ EConfigPrivate *priv;
gint type; /* E_CONFIG_BOOK or E_CONFIG_ASSISTANT */
@@ -214,17 +232,18 @@ struct _EConfig {
struct _EConfigClass {
GObjectClass object_class;
- EDList factories;
-
- void (*set_target)(EConfig *ep, EConfigTarget *t);
+ GList *factories;
- void (*target_free)(EConfig *ep, EConfigTarget *t);
+ void (*set_target) (EConfig *config,
+ EConfigTarget *target);
+ void (*target_free) (EConfig *config,
+ EConfigTarget *target);
};
GType e_config_get_type(void);
/* Static class methods */
-EConfigFactory *e_config_class_add_factory(EConfigClass *klass, const gchar *id, EConfigFactoryFunc func, gpointer data);
+EConfigFactory *e_config_class_add_factory(EConfigClass *klass, const gchar *id, EConfigFactoryFunc func, gpointer user_data);
void e_config_class_remove_factory(EConfigClass *klass, EConfigFactory *f);
EConfig *e_config_construct(EConfig *, gint type, const gchar *id);
@@ -383,4 +402,4 @@ void e_config_hook_class_add_target_map(EConfigHookClass *klass, const EConfigHo
G_END_DECLS
-#endif /* __E_CONFIG_H__ */
+#endif /* E_CONFIG_H */