Back to index

libindicator  12.10.0
dummy-indicator-entry-func.c
Go to the documentation of this file.
00001 /*
00002 Test for libindicator
00003 
00004 Copyright 2012 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 #include "dummy-indicator-entry-func.h"
00024 
00025 
00026 GType dummy_indicator_entry_func_get_type (void);
00027 
00028 INDICATOR_SET_VERSION
00029 INDICATOR_SET_TYPE(DUMMY_INDICATOR_ENTRY_FUNC_TYPE)
00030 
00031 
00032 GtkLabel *
00033 get_label (IndicatorObject * io)
00034 {
00035        return NULL;
00036 }
00037 
00038 GtkImage *
00039 get_icon (IndicatorObject * io)
00040 {
00041        return NULL;
00042 }
00043 
00044 GtkMenu *
00045 get_menu (IndicatorObject * io)
00046 {
00047        return NULL;
00048 }
00049 const gchar *
00050 get_accessible_desc (IndicatorObject * io)
00051 {
00052        return NULL;
00053 }
00054 
00055 static void
00056 entry_activate (IndicatorObject * io, IndicatorObjectEntry * entry, guint timestamp)
00057 {
00058        DummyIndicatorEntryFunc * self = DUMMY_INDICATOR_ENTRY_FUNC(io);
00059        self->entry_activate_called = TRUE;
00060        return;
00061 }
00062 
00063 static void
00064 entry_activate_window (IndicatorObject * io, IndicatorObjectEntry * entry, guint windowid, guint timestamp)
00065 {
00066        DummyIndicatorEntryFunc * self = DUMMY_INDICATOR_ENTRY_FUNC(io);
00067        self->entry_activate_window_called = TRUE;
00068        return;
00069 }
00070 
00071 static void
00072 entry_close (IndicatorObject * io, IndicatorObjectEntry * entry, guint timestamp)
00073 {
00074        DummyIndicatorEntryFunc * self = DUMMY_INDICATOR_ENTRY_FUNC(io);
00075        self->entry_close_called = TRUE;
00076        return;
00077 }
00078 
00079 
00080 static void dummy_indicator_entry_func_class_init (DummyIndicatorEntryFuncClass *klass);
00081 static void dummy_indicator_entry_func_init       (DummyIndicatorEntryFunc *self);
00082 static void dummy_indicator_entry_func_dispose    (GObject *object);
00083 static void dummy_indicator_entry_func_finalize   (GObject *object);
00084 
00085 G_DEFINE_TYPE (DummyIndicatorEntryFunc, dummy_indicator_entry_func, INDICATOR_OBJECT_TYPE);
00086 
00087 static void
00088 dummy_indicator_entry_func_class_init (DummyIndicatorEntryFuncClass *klass)
00089 {
00090        GObjectClass *object_class = G_OBJECT_CLASS (klass);
00091 
00092        object_class->dispose = dummy_indicator_entry_func_dispose;
00093        object_class->finalize = dummy_indicator_entry_func_finalize;
00094 
00095        IndicatorObjectClass * io_class = INDICATOR_OBJECT_CLASS(klass);
00096 
00097        io_class->get_label = get_label;
00098        io_class->get_image = get_icon;
00099        io_class->get_menu = get_menu;
00100        io_class->get_accessible_desc = get_accessible_desc;
00101 
00102        io_class->entry_activate = entry_activate;
00103        io_class->entry_activate_window = entry_activate_window;
00104        io_class->entry_close = entry_close;
00105 
00106        return;
00107 }
00108 
00109 static void
00110 dummy_indicator_entry_func_init (DummyIndicatorEntryFunc *self)
00111 {
00112 
00113        return;
00114 }
00115 
00116 static void
00117 dummy_indicator_entry_func_dispose (GObject *object)
00118 {
00119 
00120        G_OBJECT_CLASS (dummy_indicator_entry_func_parent_class)->dispose (object);
00121        return;
00122 }
00123 
00124 static void
00125 dummy_indicator_entry_func_finalize (GObject *object)
00126 {
00127 
00128        G_OBJECT_CLASS (dummy_indicator_entry_func_parent_class)->finalize (object);
00129        return;
00130 }