Logo Search packages:      
Sourcecode: libdesktop-agnostic version File versions  Download package

config-schema-option.h

/* 
 * Desktop Agnostic Library: Configuration Schema Abstract Type.
 *
 * Copyright (C) 2008, 2009 Mark Lee <libdesktop-agnostic@lazymalevolence.com>
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library 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
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
 *
 * Author : Mark Lee <libdesktop-agnostic@lazymalevolence.com>
 */

#ifndef __LIBDESKTOP_AGNOSTIC_CONFIG_SCHEMA_OPTION_H__
#define __LIBDESKTOP_AGNOSTIC_CONFIG_SCHEMA_OPTION_H__

#include <glib.h>
#include <glib-object.h>
#include <stdlib.h>
#include <string.h>

G_BEGIN_DECLS


#define DESKTOP_AGNOSTIC_CONFIG_TYPE_SCHEMA_OPTION (desktop_agnostic_config_schema_option_get_type ())
#define DESKTOP_AGNOSTIC_CONFIG_SCHEMA_OPTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DESKTOP_AGNOSTIC_CONFIG_TYPE_SCHEMA_OPTION, DesktopAgnosticConfigSchemaOption))
#define DESKTOP_AGNOSTIC_CONFIG_SCHEMA_OPTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DESKTOP_AGNOSTIC_CONFIG_TYPE_SCHEMA_OPTION, DesktopAgnosticConfigSchemaOptionClass))
#define DESKTOP_AGNOSTIC_CONFIG_IS_SCHEMA_OPTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DESKTOP_AGNOSTIC_CONFIG_TYPE_SCHEMA_OPTION))
#define DESKTOP_AGNOSTIC_CONFIG_IS_SCHEMA_OPTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DESKTOP_AGNOSTIC_CONFIG_TYPE_SCHEMA_OPTION))
#define DESKTOP_AGNOSTIC_CONFIG_SCHEMA_OPTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DESKTOP_AGNOSTIC_CONFIG_TYPE_SCHEMA_OPTION, DesktopAgnosticConfigSchemaOptionClass))

typedef struct _DesktopAgnosticConfigSchemaOption DesktopAgnosticConfigSchemaOption;
typedef struct _DesktopAgnosticConfigSchemaOptionClass DesktopAgnosticConfigSchemaOptionClass;
typedef struct _DesktopAgnosticConfigSchemaOptionPrivate DesktopAgnosticConfigSchemaOptionPrivate;
typedef struct _DesktopAgnosticConfigParamSpecSchemaOption DesktopAgnosticConfigParamSpecSchemaOption;

/**
   * A representation of one configuration option as defined by the schema.
   */
00049 struct _DesktopAgnosticConfigSchemaOption {
      GTypeInstance parent_instance;
      volatile int ref_count;
      DesktopAgnosticConfigSchemaOptionPrivate * priv;
};

struct _DesktopAgnosticConfigSchemaOptionClass {
      GTypeClass parent_class;
      void (*finalize) (DesktopAgnosticConfigSchemaOption *self);
};

struct _DesktopAgnosticConfigParamSpecSchemaOption {
      GParamSpec parent_instance;
};


DesktopAgnosticConfigSchemaOption* desktop_agnostic_config_schema_option_construct (GType object_type, GKeyFile** schema, const char* group, const char* key, GError** error);
DesktopAgnosticConfigSchemaOption* desktop_agnostic_config_schema_option_new (GKeyFile** schema, const char* group, const char* key, GError** error);
GType desktop_agnostic_config_schema_option_get_option_type (DesktopAgnosticConfigSchemaOption* self);
GType desktop_agnostic_config_schema_option_get_list_type (DesktopAgnosticConfigSchemaOption* self);
void desktop_agnostic_config_schema_option_get_default_value (DesktopAgnosticConfigSchemaOption* self, GValue* value);
const char* desktop_agnostic_config_schema_option_get_description (DesktopAgnosticConfigSchemaOption* self);
const char* desktop_agnostic_config_schema_option_get_summary (DesktopAgnosticConfigSchemaOption* self);
void desktop_agnostic_config_schema_option_get_lower_boundary (DesktopAgnosticConfigSchemaOption* self, GValue** value);
void desktop_agnostic_config_schema_option_get_upper_boundary (DesktopAgnosticConfigSchemaOption* self, GValue** value);
GValueArray* desktop_agnostic_config_schema_option_get_whitelist (DesktopAgnosticConfigSchemaOption* self);
GValueArray* desktop_agnostic_config_schema_option_get_blacklist (DesktopAgnosticConfigSchemaOption* self);
GParamSpec* desktop_agnostic_config_param_spec_schema_option (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
gpointer desktop_agnostic_config_value_get_schema_option (const GValue* value);
void desktop_agnostic_config_value_set_schema_option (GValue* value, gpointer v_object);
GType desktop_agnostic_config_schema_option_get_type (void);
gpointer desktop_agnostic_config_schema_option_ref (gpointer instance);
void desktop_agnostic_config_schema_option_unref (gpointer instance);


G_END_DECLS

#endif

Generated by  Doxygen 1.6.0   Back to index