grim/guifications3

moved guifications-gtk to cmake
cmake
2010-12-13, Gary Kramlich
36e02fafe588
moved guifications-gtk to cmake
/*
* Guifications - The end-all, be-all notification framework
* Copyright (C) 2003-2009 Gary Kramlich <grim@reaperworld.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef GF_PREFERENCE_ENGINE_H
#define GF_PREFERENCE_ENGINE_H
#define GF_TYPE_PREFERENCE_ENGINE (gf_preference_engine_get_g_type())
#define GF_PREFERENCE_ENGINE(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), GF_TYPE_PREFERENCE_ENGINE, GfPreferenceEngine))
#define GF_PREFERENCE_ENGINE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), GF_TYPE_PREFERENCE_ENGINE, GfPreferenceEngineClass))
#define GF_IS_PREFERENCE_ENGINE(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), GF_TYPE_PREFERENCE_ENGINE))
#define GF_IS_PREFERENCE_ENGINE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), GF_TYPE_PREFERENCE_ENGINE))
#define GF_PREFERENCE_ENGINE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), GF_TYPE_PREFERENCE_ENGINE, GfPreferenceEngineClass))
typedef struct _GfPreferenceEngine GfPreferenceEngine;
typedef struct _GfPreferenceEngineClass GfPreferenceEngineClass;
#include <gflib/gf_enum.h>
#include <gflib/gf_named_object.h>
#include <gflib/gf_preference.h>
/**
* GfPreferenceEngine:
*
* The base class for all preference implementations.
*/
struct _GfPreferenceEngine {
/*< private >*/
GfNamedObject gparent;
};
struct _GfPreferenceEngineClass {
GfNamedObjectClass gparent;
void (*reload)(GfPreferenceEngine *engine);
void (*save)(const GfPreferenceEngine *engine);
gboolean (*modified_externally)(const GfPreferenceEngine *engine);
void (*add_section)(GfPreferenceEngine *engine, const gchar *path);
void (*add_string)(GfPreferenceEngine *engine, const gchar *name, const gchar *def);
void (*set_string)(GfPreferenceEngine *engine, const gchar *name, const gchar *value);
gchar *(*get_string)(const GfPreferenceEngine *engine, const gchar *name);
void (*add_int)(GfPreferenceEngine *engine, const gchar *name, gint def);
void (*set_int)(GfPreferenceEngine *engine, const gchar *name, gint value);
int (*get_int)(const GfPreferenceEngine *engine, const gchar *name);
void (*add_bool)(GfPreferenceEngine *engine, const gchar *name, gboolean def);
void (*set_bool)(GfPreferenceEngine *engine, const gchar *name, gboolean value);
gboolean (*get_bool)(const GfPreferenceEngine *engine, const gchar *name);
gboolean (*exists)(const GfPreferenceEngine *engine, const gchar *name);
GfPreferenceType (*get_type)(const GfPreferenceEngine *engine, const gchar *path);
gboolean (*rename)(GfPreferenceEngine *engine, const gchar *oldname, const gchar *newname);
gint (*remove)(GfPreferenceEngine *engine, const gchar *path);
GfPreference **(*query)(const GfPreferenceEngine *engine, const gchar *path, guint *num_prefs);
void (*changed)(GfPreferenceEngine *engine, const gchar *fullname, GfPreference *preference);
void (*removed)(GfPreferenceEngine *engine, GfPreference *preference);
void (*renamed)(GfPreferenceEngine *engine, const gchar *oldname, GfPreference *preference);
void (*_gf_reserved1)(void);
void (*_gf_reserved2)(void);
void (*_gf_reserved3)(void);
void (*_gf_reserved4)(void);
};
G_BEGIN_DECLS
GType gf_preference_engine_get_g_type(void);
void gf_preference_engine_reload(GfPreferenceEngine *engine);
void gf_preference_engine_save(const GfPreferenceEngine *engine);
void gf_preference_engine_add_section(GfPreferenceEngine *engine, const gchar *path);
void gf_preference_engine_add_string(GfPreferenceEngine *engine, const gchar *name, const gchar *def);
void gf_preference_engine_set_string(GfPreferenceEngine *engine, const gchar *name, const gchar *value);
gchar *gf_preference_engine_get_string(GfPreferenceEngine *engine, const gchar *name);
void gf_preference_engine_add_int(GfPreferenceEngine *engine, const gchar *name, gint def);
void gf_preference_engine_set_int(GfPreferenceEngine *engine, const gchar *name, gint value);
gint gf_preference_engine_get_int(GfPreferenceEngine *engine, const gchar *name);
void gf_preference_engine_add_bool(GfPreferenceEngine *engine, const gchar *name, gboolean def);
void gf_preference_engine_set_bool(GfPreferenceEngine *engine, const gchar *name, gboolean value);
gboolean gf_preference_engine_get_bool(GfPreferenceEngine *engine, const gchar *name);
gboolean gf_preference_engine_exists(GfPreferenceEngine *engine, const gchar *name);
gboolean gf_preference_engine_rename(GfPreferenceEngine *engine, const gchar *oldname, const gchar *newname);
gint gf_preference_engine_remove(GfPreferenceEngine *engine, const gchar *path);
GfPreference **gf_preference_engine_query(GfPreferenceEngine *engine, const gchar *path, guint *num_prefs);
GfPreferenceType gf_preference_engine_get_type(GfPreferenceEngine *engine, const gchar *path);
G_END_DECLS
#endif /* GF_PREFERENCE_ENGINE_H */