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

gcm-page.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-page.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 */
/* self casting macros */
#define SELF(x) GCM_PAGE(x)
#define SELF_CONST(x) GCM_PAGE_CONST(x)
#define IS_SELF(x) GCM_IS_PAGE(x)
#define TYPE_SELF GCM_TYPE_PAGE
#define SELF_CLASS(x) GCM_PAGE_CLASS(x)

#define SELF_GET_CLASS(x) GCM_PAGE_GET_CLASS(x)

/* self typedefs */
typedef GCMPage Self;
typedef GCMPageClass SelfClass;

/* here are local prototypes */
static void ___object_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec);
static void gcm_page_init (GCMPage * o) G_GNUC_UNUSED;
static void gcm_page_class_init (GCMPageClass * c) G_GNUC_UNUSED;

enum {
      PROP_0,
      PROP_GL_DESKTOP
};

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

/* Short form macros */
#define self_construct gcm_page_construct
#define self_compare_pos gcm_page_compare_pos
GType
gcm_page_get_type (void)
{
      static GType type = 0;

      if ___GOB_UNLIKELY(type == 0) {
            static const GTypeInfo info = {
                  sizeof (GCMPageClass),
                  (GBaseInitFunc) NULL,
                  (GBaseFinalizeFunc) NULL,
                  (GClassInitFunc) gcm_page_class_init,
                  (GClassFinalizeFunc) NULL,
                  NULL /* class_data */,
                  sizeof (GCMPage),
                  0 /* n_preallocs */,
                  (GInstanceInitFunc) gcm_page_init,
                  NULL
            };

            type = g_type_register_static (GTK_TYPE_FRAME, "GCMPage", &info, (GTypeFlags)0);
      }

      return type;
}

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

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


static void
___finalize(GObject *obj_self)
{
#define __GOB_FUNCTION__ "GCM:Page::finalize"
      GCMPage *self G_GNUC_UNUSED = GCM_PAGE (obj_self);
      if(G_OBJECT_CLASS(parent_class)->finalize) \
            (* G_OBJECT_CLASS(parent_class)->finalize)(obj_self);
#line 34 "gcm-page.gob"
      if(self->label) { g_free ((gpointer) self->label); self->label = NULL; }
#line 104 "gcm-page.c"
#line 37 "gcm-page.gob"
      if(self->gl_desktop) { g_object_unref ((gpointer) self->gl_desktop); self->gl_desktop = NULL; }
#line 107 "gcm-page.c"
}
#undef __GOB_FUNCTION__

static void 
gcm_page_init (GCMPage * o G_GNUC_UNUSED)
{
#define __GOB_FUNCTION__ "GCM:Page::init"
}
#undef __GOB_FUNCTION__
static void 
gcm_page_class_init (GCMPageClass * c G_GNUC_UNUSED)
{
#define __GOB_FUNCTION__ "GCM:Page::class_init"
      GObjectClass *g_object_class G_GNUC_UNUSED = (GObjectClass*) c;

      parent_class = g_type_class_ref (GTK_TYPE_FRAME);

      c->construct = NULL;
      g_object_class->finalize = ___finalize;
      g_object_class->set_property = ___object_set_property;
    {
      GParamSpec   *param_spec;

      param_spec = g_param_spec_pointer
            ("gl_desktop" /* name */,
             "GLDesktop" /* nick */,
             "GL Desktop" /* blurb */,
             (GParamFlags)(G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
      g_object_class_install_property (g_object_class,
            PROP_GL_DESKTOP,
            param_spec);
    }
}
#undef __GOB_FUNCTION__

static void
___object_set_property (GObject *object,
      guint property_id,
      const GValue *VAL G_GNUC_UNUSED,
      GParamSpec *pspec G_GNUC_UNUSED)
#define __GOB_FUNCTION__ "GCM:Page::set_property"
{
      GCMPage *self G_GNUC_UNUSED;

      self = GCM_PAGE (object);

      switch (property_id) {
      case PROP_GL_DESKTOP:
            {
#line 44 "gcm-page.gob"

                  self->gl_desktop = GCM_GL_DESKTOP(g_value_get_pointer(VAL));
            
#line 161 "gcm-page.c"
            }
            break;
      default:
/* Apparently in g++ this is needed, glib is b0rk */
#ifndef __PRETTY_FUNCTION__
#  undef G_STRLOC
#  define G_STRLOC      __FILE__ ":" G_STRINGIFY (__LINE__)
#endif
            G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
            break;
      }
}
#undef __GOB_FUNCTION__



#line 48 "gcm-page.gob"
gboolean 
gcm_page_construct (GCMPage * self)
#line 181 "gcm-page.c"
{
      GCMPageClass *klass;
#line 48 "gcm-page.gob"
      g_return_val_if_fail (self != NULL, (gboolean )FALSE);
#line 48 "gcm-page.gob"
      g_return_val_if_fail (GCM_IS_PAGE (self), (gboolean )FALSE);
#line 188 "gcm-page.c"
      klass = GCM_PAGE_GET_CLASS(self);

      if(klass->construct)
            return (*klass->construct)(self);
      else
            return (gboolean )(FALSE);
}

#line 51 "gcm-page.gob"
gint 
gcm_page_compare_pos (GCMPage * self, GCMPage * other)
#line 200 "gcm-page.c"
{
#define __GOB_FUNCTION__ "GCM:Page::compare_pos"
#line 51 "gcm-page.gob"
      g_return_val_if_fail (self != NULL, (gint )0);
#line 51 "gcm-page.gob"
      g_return_val_if_fail (GCM_IS_PAGE (self), (gint )0);
#line 51 "gcm-page.gob"
      g_return_val_if_fail (other != NULL, (gint )0);
#line 209 "gcm-page.c"
{
#line 53 "gcm-page.gob"
      
            if (!self->tab_num && !other->tab_num)
                  return 0;
            if (!self->tab_num && other->tab_num)
                  return 1;
            if (self->tab_num && !other->tab_num)
                  return -1;
            return self->tab_num - other->tab_num;
      }}
#line 221 "gcm-page.c"
#undef __GOB_FUNCTION__

Generated by  Doxygen 1.6.0   Back to index