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

gcm-classic-desktop.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-classic-desktop.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 */

#line 23 "gcm-classic-desktop.gob"

#include "gcm-application.h"

#line 28 "gcm-classic-desktop.c"
/* self casting macros */
#define SELF(x) GCM_CLASSIC_DESKTOP(x)
#define SELF_CONST(x) GCM_CLASSIC_DESKTOP_CONST(x)
#define IS_SELF(x) GCM_IS_CLASSIC_DESKTOP(x)
#define TYPE_SELF GCM_TYPE_CLASSIC_DESKTOP
#define SELF_CLASS(x) GCM_CLASSIC_DESKTOP_CLASS(x)

#define SELF_GET_CLASS(x) GCM_CLASSIC_DESKTOP_GET_CLASS(x)

/* self typedefs */
typedef GCMClassicDesktop Self;
typedef GCMClassicDesktopClass SelfClass;

struct _GCMClassicDesktopPrivate {
#line 29 "gcm-classic-desktop.gob"
      GCMApplication * window_manager;
#line 45 "gcm-classic-desktop.c"
};
/* here are local prototypes */
static void gcm_classic_desktop_init (GCMClassicDesktop * o) G_GNUC_UNUSED;
static void gcm_classic_desktop_class_init (GCMClassicDesktopClass * c) G_GNUC_UNUSED;

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

/* Short form macros */
#define self_new gcm_classic_desktop_new
#define self_start gcm_classic_desktop_start
#define self_stop gcm_classic_desktop_stop
GType
gcm_classic_desktop_get_type (void)
{
      static GType type = 0;

      if ___GOB_UNLIKELY(type == 0) {
            static const GTypeInfo info = {
                  sizeof (GCMClassicDesktopClass),
                  (GBaseInitFunc) NULL,
                  (GBaseFinalizeFunc) NULL,
                  (GClassInitFunc) gcm_classic_desktop_class_init,
                  (GClassFinalizeFunc) NULL,
                  NULL /* class_data */,
                  sizeof (GCMClassicDesktop),
                  0 /* n_preallocs */,
                  (GInstanceInitFunc) gcm_classic_desktop_init,
                  NULL
            };

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

      return type;
}

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

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


static void
___finalize(GObject *obj_self)
{
#define __GOB_FUNCTION__ "GCM:Classic:Desktop::finalize"
      GCMClassicDesktop *self G_GNUC_UNUSED = GCM_CLASSIC_DESKTOP (obj_self);
      gpointer priv G_GNUC_UNUSED = self->_priv;
      if(G_OBJECT_CLASS(parent_class)->finalize) \
            (* G_OBJECT_CLASS(parent_class)->finalize)(obj_self);
#line 30 "gcm-classic-desktop.gob"
      if(self->_priv->window_manager) { g_object_unref ((gpointer) self->_priv->window_manager); self->_priv->window_manager = NULL; }
#line 111 "gcm-classic-desktop.c"
}
#undef __GOB_FUNCTION__

static void 
gcm_classic_desktop_init (GCMClassicDesktop * o G_GNUC_UNUSED)
{
#define __GOB_FUNCTION__ "GCM:Classic:Desktop::init"
      o->_priv = G_TYPE_INSTANCE_GET_PRIVATE(o,GCM_TYPE_CLASSIC_DESKTOP,GCMClassicDesktopPrivate);
}
#undef __GOB_FUNCTION__
static void 
gcm_classic_desktop_class_init (GCMClassicDesktopClass * c G_GNUC_UNUSED)
{
#define __GOB_FUNCTION__ "GCM:Classic:Desktop::class_init"
      GObjectClass *g_object_class G_GNUC_UNUSED = (GObjectClass*) c;

      g_type_class_add_private(c,sizeof(GCMClassicDesktopPrivate));

      parent_class = g_type_class_ref (G_TYPE_OBJECT);

      g_object_class->finalize = ___finalize;
}
#undef __GOB_FUNCTION__



/**
 * gcm_classic_desktop_new:
 *
 * Create Classic Desktop object control
 *
 * Returns: #GCMClassicDesktop
 **/
#line 39 "gcm-classic-desktop.gob"
GCMClassicDesktop * 
gcm_classic_desktop_new (void)
#line 148 "gcm-classic-desktop.c"
{
#define __GOB_FUNCTION__ "GCM:Classic:Desktop::new"
{
#line 41 "gcm-classic-desktop.gob"
      
            GCMClassicDesktop * self = GET_NEW;
            
            selfp->window_manager = gcm_application_new(WINDOW_MANAGER, NULL, NULL);
                        
            return self;
      }}
#line 160 "gcm-classic-desktop.c"
#undef __GOB_FUNCTION__

/**
 * gcm_classic_desktop_start:
 * @self: #GCMClassicDesktop
 *
 * Start Classic Desktop
 *
 * Returns: FALSE when startup fail
 **/
#line 57 "gcm-classic-desktop.gob"
gboolean 
gcm_classic_desktop_start (GCMClassicDesktop * self)
#line 174 "gcm-classic-desktop.c"
{
#define __GOB_FUNCTION__ "GCM:Classic:Desktop::start"
#line 57 "gcm-classic-desktop.gob"
      g_return_val_if_fail (self != NULL, (gboolean )FALSE);
#line 57 "gcm-classic-desktop.gob"
      g_return_val_if_fail (GCM_IS_CLASSIC_DESKTOP (self), (gboolean )FALSE);
#line 181 "gcm-classic-desktop.c"
{
#line 59 "gcm-classic-desktop.gob"
      
            GList * argv = NULL;
            
            argv = g_list_append(argv, g_strdup("--replace"));
            gcm_application_set_argv(selfp->window_manager, argv);
            
            /* Start window manager */
            return gcm_application_start(selfp->window_manager);
      }}
#line 193 "gcm-classic-desktop.c"
#undef __GOB_FUNCTION__

/**
 * gcm_classic_desktop_stop:
 * @self: #GCMClassicDesktop
 *
 * Stop Classic Desktop
 **/
#line 75 "gcm-classic-desktop.gob"
void 
gcm_classic_desktop_stop (GCMClassicDesktop * self)
#line 205 "gcm-classic-desktop.c"
{
#define __GOB_FUNCTION__ "GCM:Classic:Desktop::stop"
#line 75 "gcm-classic-desktop.gob"
      g_return_if_fail (self != NULL);
#line 75 "gcm-classic-desktop.gob"
      g_return_if_fail (GCM_IS_CLASSIC_DESKTOP (self));
#line 212 "gcm-classic-desktop.c"
{
#line 77 "gcm-classic-desktop.gob"
      
            /* Stop Window manager */
            gcm_application_stop(selfp->window_manager);
      }}
#line 219 "gcm-classic-desktop.c"
#undef __GOB_FUNCTION__

Generated by  Doxygen 1.6.0   Back to index