Back to index

libindicator  12.10.0
dummy-indicator-null.c
Go to the documentation of this file.
00001 /*
00002 Test for libindicator
00003 
00004 Copyright 2009 Canonical Ltd.
00005 
00006 Authors:
00007     Ted Gould <ted@canonical.com>
00008 
00009 This library is free software; you can redistribute it and/or
00010 modify it under the terms of the GNU General Public License
00011 version 3.0 as published by the Free Software Foundation.
00012 
00013 This library is distributed in the hope that it will be useful,
00014 but WITHOUT ANY WARRANTY; without even the implied warranty of
00015 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00016 GNU General Public License version 3.0 for more details.
00017 
00018 You should have received a copy of the GNU General Public
00019 License along with this library. If not, see
00020 <http://www.gnu.org/licenses/>.
00021 */
00022 
00023 
00024 #include <glib.h>
00025 #include <glib-object.h>
00026 
00027 #include "libindicator/indicator.h"
00028 #include "libindicator/indicator-object.h"
00029 
00030 #define DUMMY_INDICATOR_NULL_TYPE            (dummy_indicator_null_get_type ())
00031 #define DUMMY_INDICATOR_NULL(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), DUMMY_INDICATOR_NULL_TYPE, DummyIndicatorNull))
00032 #define DUMMY_INDICATOR_NULL_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), DUMMY_INDICATOR_NULL_TYPE, DummyIndicatorNullClass))
00033 #define IS_DUMMY_INDICATOR_NULL(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DUMMY_INDICATOR_NULL_TYPE))
00034 #define IS_DUMMY_INDICATOR_NULL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DUMMY_INDICATOR_NULL_TYPE))
00035 #define DUMMY_INDICATOR_NULL_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), DUMMY_INDICATOR_NULL_TYPE, DummyIndicatorNullClass))
00036 
00037 typedef struct _DummyIndicatorNull      DummyIndicatorNull;
00038 typedef struct _DummyIndicatorNullClass DummyIndicatorNullClass;
00039 
00040 struct _DummyIndicatorNullClass {
00041        IndicatorObjectClass parent_class;
00042 };
00043 
00044 struct _DummyIndicatorNull {
00045        IndicatorObject parent;
00046 };
00047 
00048 GType dummy_indicator_null_get_type (void);
00049 
00050 INDICATOR_SET_VERSION
00051 INDICATOR_SET_TYPE(DUMMY_INDICATOR_NULL_TYPE)
00052 
00053 
00054 GtkLabel *
00055 get_label (IndicatorObject * io)
00056 {
00057        return NULL;
00058 }
00059 
00060 GtkImage *
00061 get_icon (IndicatorObject * io)
00062 {
00063        return NULL;
00064 }
00065 
00066 GtkMenu *
00067 get_menu (IndicatorObject * io)
00068 {
00069        return NULL;
00070 }
00071 const gchar *
00072 get_accessible_desc (IndicatorObject * io)
00073 {
00074        return NULL;
00075 }
00076 
00077 static void dummy_indicator_null_class_init (DummyIndicatorNullClass *klass);
00078 static void dummy_indicator_null_init       (DummyIndicatorNull *self);
00079 static void dummy_indicator_null_dispose    (GObject *object);
00080 static void dummy_indicator_null_finalize   (GObject *object);
00081 
00082 G_DEFINE_TYPE (DummyIndicatorNull, dummy_indicator_null, INDICATOR_OBJECT_TYPE);
00083 
00084 static void
00085 dummy_indicator_null_class_init (DummyIndicatorNullClass *klass)
00086 {
00087        GObjectClass *object_class = G_OBJECT_CLASS (klass);
00088 
00089        object_class->dispose = dummy_indicator_null_dispose;
00090        object_class->finalize = dummy_indicator_null_finalize;
00091 
00092        IndicatorObjectClass * io_class = INDICATOR_OBJECT_CLASS(klass);
00093 
00094        io_class->get_label = get_label;
00095        io_class->get_image = get_icon;
00096        io_class->get_menu = get_menu;
00097        io_class->get_accessible_desc = get_accessible_desc;
00098 
00099        return;
00100 }
00101 
00102 static void
00103 dummy_indicator_null_init (DummyIndicatorNull *self)
00104 {
00105 
00106        return;
00107 }
00108 
00109 static void
00110 dummy_indicator_null_dispose (GObject *object)
00111 {
00112 
00113        G_OBJECT_CLASS (dummy_indicator_null_parent_class)->dispose (object);
00114        return;
00115 }
00116 
00117 static void
00118 dummy_indicator_null_finalize (GObject *object)
00119 {
00120 
00121        G_OBJECT_CLASS (dummy_indicator_null_parent_class)->finalize (object);
00122        return;
00123 }