Logo Search packages:      
Sourcecode: unity version File versions  Download package

bar-model.c

/* bar-model.c generated by valac, the Vala compiler
 * generated from bar-model.vala, do not modify */

/*
 * Copyright (C) 2009 Canonical Ltd
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 3 as
 * published by the Free Software Foundation.
 *
 * 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/>.
 *
 * Authored by Mirco "MacSlow" Müller <mirco.mueller@canonical.com>
 *
 */

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


#define UNITY_PLACES_BAR_TYPE_MODEL (unity_places_bar_model_get_type ())
#define UNITY_PLACES_BAR_MODEL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), UNITY_PLACES_BAR_TYPE_MODEL, UnityPlacesBarModel))
#define UNITY_PLACES_BAR_MODEL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), UNITY_PLACES_BAR_TYPE_MODEL, UnityPlacesBarModelClass))
#define UNITY_PLACES_BAR_IS_MODEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), UNITY_PLACES_BAR_TYPE_MODEL))
#define UNITY_PLACES_BAR_IS_MODEL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), UNITY_PLACES_BAR_TYPE_MODEL))
#define UNITY_PLACES_BAR_MODEL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), UNITY_PLACES_BAR_TYPE_MODEL, UnityPlacesBarModelClass))

typedef struct _UnityPlacesBarModel UnityPlacesBarModel;
typedef struct _UnityPlacesBarModelClass UnityPlacesBarModelClass;
typedef struct _UnityPlacesBarModelPrivate UnityPlacesBarModelPrivate;
#define _g_free0(var) (var = (g_free (var), NULL))

struct _UnityPlacesBarModel {
      GObject parent_instance;
      UnityPlacesBarModelPrivate * priv;
      char* name;
      char* icon_name;
      char* tooltip;
};

struct _UnityPlacesBarModelClass {
      GObjectClass parent_class;
};


static gpointer unity_places_bar_model_parent_class = NULL;

GType unity_places_bar_model_get_type (void);
enum  {
      UNITY_PLACES_BAR_MODEL_DUMMY_PROPERTY
};
UnityPlacesBarModel* unity_places_bar_model_new (const char* name, const char* icon_name, const char* tooltip);
UnityPlacesBarModel* unity_places_bar_model_construct (GType object_type, const char* name, const char* icon_name, const char* tooltip);
static GObject * unity_places_bar_model_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties);
static void unity_places_bar_model_finalize (GObject* obj);



UnityPlacesBarModel* unity_places_bar_model_construct (GType object_type, const char* name, const char* icon_name, const char* tooltip) {
      UnityPlacesBarModel * self;
      char* _tmp0_;
      char* _tmp1_;
      char* _tmp2_;
      g_return_val_if_fail (name != NULL, NULL);
      g_return_val_if_fail (icon_name != NULL, NULL);
      g_return_val_if_fail (tooltip != NULL, NULL);
      self = g_object_newv (object_type, 0, NULL);
      self->name = (_tmp0_ = g_strdup (name), _g_free0 (self->name), _tmp0_);
      self->icon_name = (_tmp1_ = g_strdup (icon_name), _g_free0 (self->icon_name), _tmp1_);
      self->tooltip = (_tmp2_ = g_strdup (tooltip), _g_free0 (self->tooltip), _tmp2_);
      return self;
}


UnityPlacesBarModel* unity_places_bar_model_new (const char* name, const char* icon_name, const char* tooltip) {
      return unity_places_bar_model_construct (UNITY_PLACES_BAR_TYPE_MODEL, name, icon_name, tooltip);
}


static GObject * unity_places_bar_model_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties) {
      GObject * obj;
      GObjectClass * parent_class;
      UnityPlacesBarModel * self;
      parent_class = G_OBJECT_CLASS (unity_places_bar_model_parent_class);
      obj = parent_class->constructor (type, n_construct_properties, construct_properties);
      self = UNITY_PLACES_BAR_MODEL (obj);
      {
      }
      return obj;
}


static void unity_places_bar_model_class_init (UnityPlacesBarModelClass * klass) {
      unity_places_bar_model_parent_class = g_type_class_peek_parent (klass);
      G_OBJECT_CLASS (klass)->constructor = unity_places_bar_model_constructor;
      G_OBJECT_CLASS (klass)->finalize = unity_places_bar_model_finalize;
}


static void unity_places_bar_model_instance_init (UnityPlacesBarModel * self) {
}


static void unity_places_bar_model_finalize (GObject* obj) {
      UnityPlacesBarModel * self;
      self = UNITY_PLACES_BAR_MODEL (obj);
      _g_free0 (self->name);
      _g_free0 (self->icon_name);
      _g_free0 (self->tooltip);
      G_OBJECT_CLASS (unity_places_bar_model_parent_class)->finalize (obj);
}


GType unity_places_bar_model_get_type (void) {
      static volatile gsize unity_places_bar_model_type_id__volatile = 0;
      if (g_once_init_enter (&unity_places_bar_model_type_id__volatile)) {
            static const GTypeInfo g_define_type_info = { sizeof (UnityPlacesBarModelClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) unity_places_bar_model_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (UnityPlacesBarModel), 0, (GInstanceInitFunc) unity_places_bar_model_instance_init, NULL };
            GType unity_places_bar_model_type_id;
            unity_places_bar_model_type_id = g_type_register_static (G_TYPE_OBJECT, "UnityPlacesBarModel", &g_define_type_info, 0);
            g_once_init_leave (&unity_places_bar_model_type_id__volatile, unity_places_bar_model_type_id);
      }
      return unity_places_bar_model_type_id__volatile;
}





Generated by  Doxygen 1.6.0   Back to index