Back to index

libindicator  12.10.0
Classes | Defines | Typedefs | Functions
dummy-indicator-simple.c File Reference
#include <glib.h>
#include <glib-object.h>
#include "libindicator/indicator.h"
#include "libindicator/indicator-object.h"

Go to the source code of this file.

Classes

struct  _DummyIndicatorSimpleClass
struct  _DummyIndicatorSimple

Defines

#define DUMMY_INDICATOR_SIMPLE_TYPE   (dummy_indicator_simple_get_type ())
#define DUMMY_INDICATOR_SIMPLE(obj)   (G_TYPE_CHECK_INSTANCE_CAST ((obj), DUMMY_INDICATOR_SIMPLE_TYPE, DummyIndicatorSimple))
#define DUMMY_INDICATOR_SIMPLE_CLASS(klass)   (G_TYPE_CHECK_CLASS_CAST ((klass), DUMMY_INDICATOR_SIMPLE_TYPE, DummyIndicatorSimpleClass))
#define IS_DUMMY_INDICATOR_SIMPLE(obj)   (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DUMMY_INDICATOR_SIMPLE_TYPE))
#define IS_DUMMY_INDICATOR_SIMPLE_CLASS(klass)   (G_TYPE_CHECK_CLASS_TYPE ((klass), DUMMY_INDICATOR_SIMPLE_TYPE))
#define DUMMY_INDICATOR_SIMPLE_GET_CLASS(obj)   (G_TYPE_INSTANCE_GET_CLASS ((obj), DUMMY_INDICATOR_SIMPLE_TYPE, DummyIndicatorSimpleClass))

Typedefs

typedef struct _DummyIndicatorSimple
typedef struct _DummyIndicatorSimpleClass

Functions

GType dummy_indicator_simple_get_type (void)
INDICATOR_SET_VERSION GtkLabel * get_label (IndicatorObject *io)
GtkImage * get_icon (IndicatorObject *io)
GtkMenu * get_menu (IndicatorObject *io)
const gchar * get_accessible_desc (IndicatorObject *io)
static void dummy_indicator_simple_class_init (DummyIndicatorSimpleClass *klass)
static void dummy_indicator_simple_init (DummyIndicatorSimple *self)
static void dummy_indicator_simple_dispose (GObject *object)
static void dummy_indicator_simple_finalize (GObject *object)
 G_DEFINE_TYPE (DummyIndicatorSimple, dummy_indicator_simple, INDICATOR_OBJECT_TYPE)

Class Documentation

struct _DummyIndicatorSimpleClass

Definition at line 39 of file dummy-indicator-simple.c.

Class Members
IndicatorObjectClass parent_class
struct _DummyIndicatorSimple

Definition at line 43 of file dummy-indicator-simple.c.

Class Members
IndicatorObject parent

Define Documentation

#define DUMMY_INDICATOR_SIMPLE (   obj)    (G_TYPE_CHECK_INSTANCE_CAST ((obj), DUMMY_INDICATOR_SIMPLE_TYPE, DummyIndicatorSimple))

Definition at line 30 of file dummy-indicator-simple.c.

#define DUMMY_INDICATOR_SIMPLE_CLASS (   klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), DUMMY_INDICATOR_SIMPLE_TYPE, DummyIndicatorSimpleClass))

Definition at line 31 of file dummy-indicator-simple.c.

#define DUMMY_INDICATOR_SIMPLE_GET_CLASS (   obj)    (G_TYPE_INSTANCE_GET_CLASS ((obj), DUMMY_INDICATOR_SIMPLE_TYPE, DummyIndicatorSimpleClass))

Definition at line 34 of file dummy-indicator-simple.c.

Definition at line 29 of file dummy-indicator-simple.c.

#define IS_DUMMY_INDICATOR_SIMPLE (   obj)    (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DUMMY_INDICATOR_SIMPLE_TYPE))

Definition at line 32 of file dummy-indicator-simple.c.

#define IS_DUMMY_INDICATOR_SIMPLE_CLASS (   klass)    (G_TYPE_CHECK_CLASS_TYPE ((klass), DUMMY_INDICATOR_SIMPLE_TYPE))

Definition at line 33 of file dummy-indicator-simple.c.


Typedef Documentation

typedef struct _DummyIndicatorSimple

Definition at line 36 of file dummy-indicator-simple.c.

Definition at line 37 of file dummy-indicator-simple.c.


Function Documentation

static void dummy_indicator_simple_class_init ( DummyIndicatorSimpleClass *  klass) [static]

Definition at line 89 of file dummy-indicator-simple.c.

{
       GObjectClass *object_class = G_OBJECT_CLASS (klass);

       object_class->dispose = dummy_indicator_simple_dispose;
       object_class->finalize = dummy_indicator_simple_finalize;

       IndicatorObjectClass * io_class = INDICATOR_OBJECT_CLASS(klass);

       io_class->get_label = get_label;
       io_class->get_image = get_icon;
       io_class->get_menu = get_menu;
       io_class->get_accessible_desc = get_accessible_desc;

       return;
}

Here is the call graph for this function:

static void dummy_indicator_simple_dispose ( GObject *  object) [static]

Definition at line 114 of file dummy-indicator-simple.c.

{

       G_OBJECT_CLASS (dummy_indicator_simple_parent_class)->dispose (object);
       return;
}

Here is the caller graph for this function:

static void dummy_indicator_simple_finalize ( GObject *  object) [static]

Definition at line 122 of file dummy-indicator-simple.c.

{

       G_OBJECT_CLASS (dummy_indicator_simple_parent_class)->finalize (object);
       return;
}

Here is the caller graph for this function:

static void dummy_indicator_simple_init ( DummyIndicatorSimple *  self) [static]

Definition at line 107 of file dummy-indicator-simple.c.

{

       return;
}
G_DEFINE_TYPE ( DummyIndicatorSimple  ,
dummy_indicator_simple  ,
INDICATOR_OBJECT_TYPE   
)
const gchar* get_accessible_desc ( IndicatorObject *  io)

Definition at line 76 of file dummy-indicator-simple.c.

{
       return "Simple Item";
}
GtkImage* get_icon ( IndicatorObject *  io)

Definition at line 59 of file dummy-indicator-simple.c.

{
       return GTK_IMAGE(gtk_image_new());
}
INDICATOR_SET_VERSION GtkLabel* get_label ( IndicatorObject *  io)

Definition at line 53 of file dummy-indicator-simple.c.

{
       return GTK_LABEL(gtk_label_new("Simple Item"));
}
GtkMenu* get_menu ( IndicatorObject *  io)

Definition at line 65 of file dummy-indicator-simple.c.

{
       GtkMenu * main_menu = GTK_MENU(gtk_menu_new());
       GtkWidget * loading_item = gtk_menu_item_new_with_label("Loading...");
       gtk_menu_shell_append(GTK_MENU_SHELL(main_menu), loading_item);
       gtk_widget_show(GTK_WIDGET(loading_item));

       return main_menu;
}