Logo Search packages:      
Sourcecode: gnome-compiz-manager version File versions

gcm-gl-option.c

/* Generated by GOB (v2.0.14)   (do not edit directly) */

/* End world hunger, donate to the World Food Programme, http://www.wfp.org */

#define GOB_VERSION_MAJOR 2
#define GOB_VERSION_MINOR 0
#define GOB_VERSION_PATCHLEVEL 14

#define selfp (self->_priv)

#include <string.h> /* memset() */

#include "gcm-gl-option.h"

#ifdef G_LIKELY
#define ___GOB_LIKELY(expr) G_LIKELY(expr)
#define ___GOB_UNLIKELY(expr) G_UNLIKELY(expr)
#else /* ! G_LIKELY */
#define ___GOB_LIKELY(expr) (expr)
#define ___GOB_UNLIKELY(expr) (expr)
#endif /* G_LIKELY */
static const GEnumValue _gcm_gl_option_screen_values[] = {
      { GCM_GL_OPTION_SCREEN_NONE, (char *)"GCM_GL_OPTION_SCREEN_NONE", (char *)"none" },
      { GCM_GL_OPTION_SCREEN_ALL, (char *)"GCM_GL_OPTION_SCREEN_ALL", (char *)"all" },
      { GCM_GL_OPTION_SCREEN_ONE, (char *)"GCM_GL_OPTION_SCREEN_ONE", (char *)"one" },
      { GCM_GL_OPTION_SCREEN_TWO, (char *)"GCM_GL_OPTION_SCREEN_TWO", (char *)"two" },
      { 0, NULL, NULL }
};

GType
gcm_gl_option_screen_get_type (void)
{
      static GType type = 0;
      if ___GOB_UNLIKELY(type == 0)
            type = g_enum_register_static ("GCMGLOptionScreen", _gcm_gl_option_screen_values);
      return type;
}

/* self casting macros */
#define SELF(x) GCM_GL_OPTION(x)
#define SELF_CONST(x) GCM_GL_OPTION_CONST(x)
#define IS_SELF(x) GCM_IS_GL_OPTION(x)
#define TYPE_SELF GCM_TYPE_GL_OPTION
#define SELF_CLASS(x) GCM_GL_OPTION_CLASS(x)

#define SELF_GET_CLASS(x) GCM_GL_OPTION_GET_CLASS(x)

/* self typedefs */
typedef GCMGLOption Self;
typedef GCMGLOptionClass SelfClass;

/* here are local prototypes */
static void gcm_gl_option_init (GCMGLOption * o) G_GNUC_UNUSED;
static void gcm_gl_option_class_init (GCMGLOptionClass * c) G_GNUC_UNUSED;

/*
 * Signal connection wrapper macro shortcuts
 */
#define self_connect__changed(object,func,data) gcm_gl_option_connect__changed((object),(func),(data))
#define self_connect_after__changed(object,func,data) gcm_gl_option_connect_after__changed((object),(func),(data))
#define self_connect_data__changed(object,func,data,destroy_data,flags) gcm_gl_option_connect_data__changed((object),(func),(data),(destroy_data),(flags))

enum {
      CHANGED_SIGNAL,
      LAST_SIGNAL
};

static guint object_signals[LAST_SIGNAL] = {0};

/* pointer to the class of our parent */
static GObjectClass *parent_class = NULL;

/* Short form macros */
#define self_changed gcm_gl_option_changed
#define self_get_boolean gcm_gl_option_get_boolean
#define self_set_boolean gcm_gl_option_set_boolean
#define self_get_integer gcm_gl_option_get_integer
#define self_set_integer gcm_gl_option_set_integer
#define self_get_float gcm_gl_option_get_float
#define self_set_float gcm_gl_option_set_float
#define self_get_string gcm_gl_option_get_string
#define self_set_string gcm_gl_option_set_string
#define self_get_string_list gcm_gl_option_get_string_list
#define self_set_string_list gcm_gl_option_set_string_list
#define self_notification_add gcm_gl_option_notification_add
#define self_get_description gcm_gl_option_get_description
#define self_get_color gcm_gl_option_get_color
#define self_set_color gcm_gl_option_set_color
GType
gcm_gl_option_get_type (void)
{
      static GType type = 0;

      if ___GOB_UNLIKELY(type == 0) {
            static const GTypeInfo info = {
                  sizeof (GCMGLOptionClass),
                  (GBaseInitFunc) NULL,
                  (GBaseFinalizeFunc) NULL,
                  (GClassInitFunc) gcm_gl_option_class_init,
                  (GClassFinalizeFunc) NULL,
                  NULL /* class_data */,
                  sizeof (GCMGLOption),
                  0 /* n_preallocs */,
                  (GInstanceInitFunc) gcm_gl_option_init,
                  NULL
            };

            type = g_type_register_static (G_TYPE_OBJECT, "GCMGLOption", &info, (GTypeFlags)0);
      }

      return type;
}

/* a macro for creating a new object of our type */
#define GET_NEW ((GCMGLOption *)g_object_new(gcm_gl_option_get_type(), NULL))

/* a function for creating a new object of our type */
#include <stdarg.h>
static GCMGLOption * GET_NEW_VARG (const char *first, ...) G_GNUC_UNUSED;
static GCMGLOption *
GET_NEW_VARG (const char *first, ...)
{
      GCMGLOption *ret;
      va_list ap;
      va_start (ap, first);
      ret = (GCMGLOption *)g_object_new_valist (gcm_gl_option_get_type (), first, ap);
      va_end (ap);
      return ret;
}


static void
___finalize(GObject *obj_self)
{
#define __GOB_FUNCTION__ "GCM:GL:Option::finalize"
      GCMGLOption *self G_GNUC_UNUSED = GCM_GL_OPTION (obj_self);
      if(G_OBJECT_CLASS(parent_class)->finalize) \
            (* G_OBJECT_CLASS(parent_class)->finalize)(obj_self);
#line 38 "gcm-gl-option.gob"
      if(self->owner) { g_free ((gpointer) self->owner); self->owner = NULL; }
#line 142 "gcm-gl-option.c"
#line 40 "gcm-gl-option.gob"
      if(self->name) { g_free ((gpointer) self->name); self->name = NULL; }
#line 145 "gcm-gl-option.c"
}
#undef __GOB_FUNCTION__

static void 
gcm_gl_option_init (GCMGLOption * o G_GNUC_UNUSED)
{
#define __GOB_FUNCTION__ "GCM:GL:Option::init"
}
#undef __GOB_FUNCTION__
static void 
gcm_gl_option_class_init (GCMGLOptionClass * c G_GNUC_UNUSED)
{
#define __GOB_FUNCTION__ "GCM:GL:Option::class_init"
      GObjectClass *g_object_class G_GNUC_UNUSED = (GObjectClass*) c;

      parent_class = g_type_class_ref (G_TYPE_OBJECT);

      object_signals[CHANGED_SIGNAL] =
            g_signal_new ("changed",
                  G_TYPE_FROM_CLASS (g_object_class),
                  (GSignalFlags)(G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION),
                  G_STRUCT_OFFSET (GCMGLOptionClass, changed),
                  NULL, NULL,
                  g_cclosure_marshal_VOID__VOID,
                  G_TYPE_NONE, 0);

      c->changed = NULL;
      c->get_boolean = NULL;
      c->set_boolean = NULL;
      c->get_integer = NULL;
      c->set_integer = NULL;
      c->get_float = NULL;
      c->set_float = NULL;
      c->get_string = NULL;
      c->set_string = NULL;
      c->get_string_list = NULL;
      c->set_string_list = NULL;
      c->notification_add = NULL;
      c->get_description = NULL;
      g_object_class->finalize = ___finalize;
}
#undef __GOB_FUNCTION__



#line 43 "gcm-gl-option.gob"
void 
gcm_gl_option_changed (GCMGLOption * self)
#line 194 "gcm-gl-option.c"
{
      GValue ___param_values[1];
      GValue ___return_val;

memset (&___return_val, 0, sizeof (___return_val));
memset (&___param_values, 0, sizeof (___param_values));

#line 43 "gcm-gl-option.gob"
      g_return_if_fail (self != NULL);
#line 43 "gcm-gl-option.gob"
      g_return_if_fail (GCM_IS_GL_OPTION (self));
#line 206 "gcm-gl-option.c"

      ___param_values[0].g_type = 0;
      g_value_init (&___param_values[0], G_TYPE_FROM_INSTANCE (self));
      g_value_set_instance (&___param_values[0], (gpointer) self);

      g_signal_emitv (___param_values,
            object_signals[CHANGED_SIGNAL],
            0 /* detail */,
            &___return_val);

      g_value_unset (&___param_values[0]);
}

/**
 * gcm_gl_option_get_boolean:
 * @self: #GCMGLOption
 *
 * Requests the boolean value of option
 *
 * Returns: the boolean option value
 **/
#line 54 "gcm-gl-option.gob"
gboolean 
gcm_gl_option_get_boolean (GCMGLOption * self)
#line 231 "gcm-gl-option.c"
{
      GCMGLOptionClass *klass;
#line 54 "gcm-gl-option.gob"
      g_return_val_if_fail (self != NULL, (gboolean )0);
#line 54 "gcm-gl-option.gob"
      g_return_val_if_fail (GCM_IS_GL_OPTION (self), (gboolean )0);
#line 238 "gcm-gl-option.c"
      klass = GCM_GL_OPTION_GET_CLASS(self);

      if(klass->get_boolean)
            return (*klass->get_boolean)(self);
      else
            return (gboolean )(0);
}

/**
 * gcm_gl_option_set_boolean:
 * @self: #GCMGLOption
 * @value: new val
 *
 * Change the boolean option value
 **/
#line 64 "gcm-gl-option.gob"
void 
gcm_gl_option_set_boolean (GCMGLOption * self, gboolean value)
#line 257 "gcm-gl-option.c"
{
      GCMGLOptionClass *klass;
#line 64 "gcm-gl-option.gob"
      g_return_if_fail (self != NULL);
#line 64 "gcm-gl-option.gob"
      g_return_if_fail (GCM_IS_GL_OPTION (self));
#line 264 "gcm-gl-option.c"
      klass = GCM_GL_OPTION_GET_CLASS(self);

      if(klass->set_boolean)
            (*klass->set_boolean)(self,value);
}

/**
 * gcm_gl_option_get_integer:
 * @self: #GCMGLOption
 *
 * Requests the integer value of option
 *
 * Returns: the integer option value
 **/
#line 75 "gcm-gl-option.gob"
gint 
gcm_gl_option_get_integer (GCMGLOption * self)
#line 282 "gcm-gl-option.c"
{
      GCMGLOptionClass *klass;
#line 75 "gcm-gl-option.gob"
      g_return_val_if_fail (self != NULL, (gint )0);
#line 75 "gcm-gl-option.gob"
      g_return_val_if_fail (GCM_IS_GL_OPTION (self), (gint )0);
#line 289 "gcm-gl-option.c"
      klass = GCM_GL_OPTION_GET_CLASS(self);

      if(klass->get_integer)
            return (*klass->get_integer)(self);
      else
            return (gint )(0);
}

/**
 * gcm_gl_option_set_integer:
 * @self: #GCMGLOption
 * @value: new val
 *
 * Change the integer option value
 **/
#line 85 "gcm-gl-option.gob"
void 
gcm_gl_option_set_integer (GCMGLOption * self, gint value)
#line 308 "gcm-gl-option.c"
{
      GCMGLOptionClass *klass;
#line 85 "gcm-gl-option.gob"
      g_return_if_fail (self != NULL);
#line 85 "gcm-gl-option.gob"
      g_return_if_fail (GCM_IS_GL_OPTION (self));
#line 315 "gcm-gl-option.c"
      klass = GCM_GL_OPTION_GET_CLASS(self);

      if(klass->set_integer)
            (*klass->set_integer)(self,value);
}

/**
 * gcm_gl_option_get_float:
 * @self: #GCMGLOption
 *
 * Requests the float value of option
 *
 * Returns: the float option value
 **/
#line 96 "gcm-gl-option.gob"
gfloat 
gcm_gl_option_get_float (GCMGLOption * self)
#line 333 "gcm-gl-option.c"
{
      GCMGLOptionClass *klass;
#line 96 "gcm-gl-option.gob"
      g_return_val_if_fail (self != NULL, (gfloat )0);
#line 96 "gcm-gl-option.gob"
      g_return_val_if_fail (GCM_IS_GL_OPTION (self), (gfloat )0);
#line 340 "gcm-gl-option.c"
      klass = GCM_GL_OPTION_GET_CLASS(self);

      if(klass->get_float)
            return (*klass->get_float)(self);
      else
            return (gfloat )(0);
}

/**
 * gcm_gl_option_set_float:
 * @self: #GCMGLOption
 * @value: new val
 *
 * Change the float option value
 **/
#line 106 "gcm-gl-option.gob"
void 
gcm_gl_option_set_float (GCMGLOption * self, gfloat value)
#line 359 "gcm-gl-option.c"
{
      GCMGLOptionClass *klass;
#line 106 "gcm-gl-option.gob"
      g_return_if_fail (self != NULL);
#line 106 "gcm-gl-option.gob"
      g_return_if_fail (GCM_IS_GL_OPTION (self));
#line 366 "gcm-gl-option.c"
      klass = GCM_GL_OPTION_GET_CLASS(self);

      if(klass->set_float)
            (*klass->set_float)(self,value);
}

/**
 * gcm_gl_option_get_string:
 * @self: #GCMGLOption
 *
 * Requests the string value of option
 *
 * Returns: the string option value
 **/
#line 117 "gcm-gl-option.gob"
gchar * 
gcm_gl_option_get_string (GCMGLOption * self)
#line 384 "gcm-gl-option.c"
{
      GCMGLOptionClass *klass;
#line 117 "gcm-gl-option.gob"
      g_return_val_if_fail (self != NULL, (gchar * )0);
#line 117 "gcm-gl-option.gob"
      g_return_val_if_fail (GCM_IS_GL_OPTION (self), (gchar * )0);
#line 391 "gcm-gl-option.c"
      klass = GCM_GL_OPTION_GET_CLASS(self);

      if(klass->get_string)
            return (*klass->get_string)(self);
      else
            return (gchar * )(0);
}

/**
 * gcm_gl_option_set_string:
 * @self: #GCMGLOption
 * @value: new val
 *
 * Change the string option value
 **/
#line 127 "gcm-gl-option.gob"
void 
gcm_gl_option_set_string (GCMGLOption * self, gchar * value)
#line 410 "gcm-gl-option.c"
{
      GCMGLOptionClass *klass;
#line 127 "gcm-gl-option.gob"
      g_return_if_fail (self != NULL);
#line 127 "gcm-gl-option.gob"
      g_return_if_fail (GCM_IS_GL_OPTION (self));
#line 417 "gcm-gl-option.c"
      klass = GCM_GL_OPTION_GET_CLASS(self);

      if(klass->set_string)
            (*klass->set_string)(self,value);
}

/**
 * gcm_gl_option_get_string_list:
 * @self: #GCMGLOption
 *
 * Requests the string list value of option
 *
 * Returns: the string list option value
 **/
#line 138 "gcm-gl-option.gob"
GSList * 
gcm_gl_option_get_string_list (GCMGLOption * self)
#line 435 "gcm-gl-option.c"
{
      GCMGLOptionClass *klass;
#line 138 "gcm-gl-option.gob"
      g_return_val_if_fail (self != NULL, (GSList * )0);
#line 138 "gcm-gl-option.gob"
      g_return_val_if_fail (GCM_IS_GL_OPTION (self), (GSList * )0);
#line 442 "gcm-gl-option.c"
      klass = GCM_GL_OPTION_GET_CLASS(self);

      if(klass->get_string_list)
            return (*klass->get_string_list)(self);
      else
            return (GSList * )(0);
}

/**
 * gcm_gl_option_set_string_list:
 * @self: #GCMGLOption
 * @value: new val
 *
 * Change the string list option value
 **/
#line 148 "gcm-gl-option.gob"
void 
gcm_gl_option_set_string_list (GCMGLOption * self, GSList * value)
#line 461 "gcm-gl-option.c"
{
      GCMGLOptionClass *klass;
#line 148 "gcm-gl-option.gob"
      g_return_if_fail (self != NULL);
#line 148 "gcm-gl-option.gob"
      g_return_if_fail (GCM_IS_GL_OPTION (self));
#line 468 "gcm-gl-option.c"
      klass = GCM_GL_OPTION_GET_CLASS(self);

      if(klass->set_string_list)
            (*klass->set_string_list)(self,value);
}

/**
 * gcm_gl_option_notification_add:
 * @self: #GCMGLOption
 *
 * Add notification on value, when the value changed signal #changed
 * is emitted
 **/
#line 158 "gcm-gl-option.gob"
void 
gcm_gl_option_notification_add (GCMGLOption * self)
#line 485 "gcm-gl-option.c"
{
      GCMGLOptionClass *klass;
#line 158 "gcm-gl-option.gob"
      g_return_if_fail (self != NULL);
#line 158 "gcm-gl-option.gob"
      g_return_if_fail (GCM_IS_GL_OPTION (self));
#line 492 "gcm-gl-option.c"
      klass = GCM_GL_OPTION_GET_CLASS(self);

      if(klass->notification_add)
            (*klass->notification_add)(self);
}

/**
 * gcm_gl_option_get_description:
 * @self: #GCMGLOption
 *
 * Get description of option
 *
 * Returns: description
 **/
#line 169 "gcm-gl-option.gob"
gchar * 
gcm_gl_option_get_description (GCMGLOption * self)
#line 510 "gcm-gl-option.c"
{
      GCMGLOptionClass *klass;
#line 169 "gcm-gl-option.gob"
      g_return_val_if_fail (self != NULL, (gchar * )0);
#line 169 "gcm-gl-option.gob"
      g_return_val_if_fail (GCM_IS_GL_OPTION (self), (gchar * )0);
#line 517 "gcm-gl-option.c"
      klass = GCM_GL_OPTION_GET_CLASS(self);

      if(klass->get_description)
            return (*klass->get_description)(self);
      else
            return (gchar * )(0);
}

/**
 * gcm_gl_option_get_color:
 * @self: #GCMGLOption
 *
 * Requests the color value of option
 *
 * Returns: the #GCMGLColor option value
 **/
#line 180 "gcm-gl-option.gob"
GCMGLColor * 
gcm_gl_option_get_color (GCMGLOption * self)
#line 537 "gcm-gl-option.c"
{
#define __GOB_FUNCTION__ "GCM:GL:Option::get_color"
#line 180 "gcm-gl-option.gob"
      g_return_val_if_fail (self != NULL, (GCMGLColor * )0);
#line 180 "gcm-gl-option.gob"
      g_return_val_if_fail (GCM_IS_GL_OPTION (self), (GCMGLColor * )0);
#line 544 "gcm-gl-option.c"
{
#line 182 "gcm-gl-option.gob"
      
            gchar * val;
            
            if ((val = gcm_gl_option_get_string(self)) != NULL)
            {
                  GCMGLColor * color = gcm_gl_color_new_with_string(val);
                  g_free(val);
                  return color;
            }
            
            return NULL;
      }}
#line 559 "gcm-gl-option.c"
#undef __GOB_FUNCTION__

/**
 * gcm_gl_option_set_color:
 * @self: #GCMGLOption
 * @value: new #GCMGLColor
 *
 * Change the color option value
 **/
#line 202 "gcm-gl-option.gob"
void 
gcm_gl_option_set_color (GCMGLOption * self, GCMGLColor * value)
#line 572 "gcm-gl-option.c"
{
#define __GOB_FUNCTION__ "GCM:GL:Option::set_color"
#line 202 "gcm-gl-option.gob"
      g_return_if_fail (self != NULL);
#line 202 "gcm-gl-option.gob"
      g_return_if_fail (GCM_IS_GL_OPTION (self));
#line 579 "gcm-gl-option.c"
{
#line 204 "gcm-gl-option.gob"
      
            gchar * val;
            
            if ((val = gcm_gl_color_to_string(value)) != NULL)
            {
                  gcm_gl_option_set_string(self, val);
                  g_free(val);
            }
      }}
#line 591 "gcm-gl-option.c"
#undef __GOB_FUNCTION__

Generated by  Doxygen 1.6.0   Back to index