grim/guifications3

moved gflib-gtk to the new cmake module
cmake
2010-12-15, Gary Kramlich
b6418db658c1
moved gflib-gtk to the new cmake module
/*
* 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/>.
*/
#if HAVE_CONFIG_H
# include <config.h>
#endif /* HAVE_CONFIG_H */
#include <gflib/gf_preference_engine_null.h>
/******************************************************************************
* Globals
*****************************************************************************/
/******************************************************************************
* Preference Engine Stuff
*****************************************************************************/
static void
gf_preference_engine_null_reload(GfPreferenceEngine *engine) {
}
static void
gf_preference_engine_null_save(const GfPreferenceEngine *engine) {
}
static void
gf_preference_engine_null_add_section(GfPreferenceEngine *engine,
const gchar *path)
{
}
static void
gf_preference_engine_null_add_string(GfPreferenceEngine *engine,
const gchar *name, const gchar *def)
{
}
static void
gf_preference_engine_null_set_string(GfPreferenceEngine *engine,
const gchar *name, const gchar *value)
{
}
static gchar *
gf_preference_engine_null_get_string(const GfPreferenceEngine *engine,
const gchar *name)
{
return NULL;
}
static void
gf_preference_engine_null_add_int(GfPreferenceEngine *engine,
const gchar *name, gint def)
{
}
static void
gf_preference_engine_null_set_int(GfPreferenceEngine *engine,
const gchar *name, gint value)
{
}
static int
gf_preference_engine_null_get_int(const GfPreferenceEngine *engine,
const gchar *name)
{
return 0;
}
static void
gf_preference_engine_null_add_bool(GfPreferenceEngine *engine,
const gchar *name, gboolean def)
{
}
static void
gf_preference_engine_null_set_bool(GfPreferenceEngine *engine,
const gchar *name, gboolean value)
{
}
static gboolean
gf_preference_engine_null_get_bool(const GfPreferenceEngine *engine,
const gchar *name)
{
return FALSE;
}
static gboolean
gf_preference_engine_null_exists(const GfPreferenceEngine *engine,
const gchar *name)
{
return FALSE;
}
static GfPreferenceType
gf_preference_engine_null_get_type(const GfPreferenceEngine *engine,
const gchar *path)
{
return GF_PREFERENCE_TYPE_UNKNOWN;
}
static gboolean
gf_preference_engine_null_rename(GfPreferenceEngine *engine,
const gchar *oldname, const gchar *newname)
{
return FALSE;
}
static gint
gf_preference_engine_null_remove(GfPreferenceEngine *engine,
const gchar *path)
{
return 0;
}
static GfPreference **
gf_preference_engine_null_query(const GfPreferenceEngine *engine,
const gchar *path, guint *num_prefs)
{
if(num_prefs)
*num_prefs = 0;
return NULL;
}
/******************************************************************************
* Object stuff
*****************************************************************************/
static void
gf_preference_engine_null_class_init(GfPreferenceEngineNullClass *klass) {
GfPreferenceEngineClass *engine_class = GF_PREFERENCE_ENGINE_CLASS(klass);
GfNamedObjectClass *gfno_class = GF_NAMED_OBJECT_CLASS(klass);
engine_class->reload = gf_preference_engine_null_reload;
engine_class->save = gf_preference_engine_null_save;
engine_class->add_section = gf_preference_engine_null_add_section;
engine_class->add_string = gf_preference_engine_null_add_string;
engine_class->set_string = gf_preference_engine_null_set_string;
engine_class->get_string = gf_preference_engine_null_get_string;
engine_class->add_int = gf_preference_engine_null_add_int;
engine_class->set_int = gf_preference_engine_null_set_int;
engine_class->get_int = gf_preference_engine_null_get_int;
engine_class->add_bool = gf_preference_engine_null_add_bool;
engine_class->set_bool = gf_preference_engine_null_set_bool;
engine_class->get_bool = gf_preference_engine_null_get_bool;
engine_class->exists = gf_preference_engine_null_exists;
engine_class->rename = gf_preference_engine_null_rename;
engine_class->remove = gf_preference_engine_null_remove;
engine_class->query = gf_preference_engine_null_query;
engine_class->get_type = gf_preference_engine_null_get_type;
gfno_class->name = "Null Preferences";
}
/******************************************************************************
* GfPreferenceEngine API
*****************************************************************************/
GType
gf_preference_engine_null_get_g_type(void) {
static GType type = 0;
if(type == 0) {
static const GTypeInfo info = {
sizeof(GfPreferenceEngineNullClass),
NULL,
NULL,
(GClassInitFunc)gf_preference_engine_null_class_init,
NULL,
NULL,
sizeof(GfPreferenceEngine),
0,
NULL,
};
type = g_type_register_static(GF_TYPE_PREFERENCE_ENGINE,
"GfPreferenceEngineNull",
&info, 0);
}
return type;
}
GfPreferenceEngine *
gf_preference_engine_null_new(void) {
return g_object_new(GF_TYPE_PREFERENCE_ENGINE_NULL, NULL);
}