Back to index

libindicator  12.10.0
Classes | Defines | Typedefs | Functions
dummy-indicator-visible.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  _DummyIndicatorVisibleClass
struct  _DummyIndicatorVisible

Defines

#define DUMMY_INDICATOR_VISIBLE_TYPE   (dummy_indicator_visible_get_type ())
#define DUMMY_INDICATOR_VISIBLE(obj)   (G_TYPE_CHECK_INSTANCE_CAST ((obj), DUMMY_INDICATOR_VISIBLE_TYPE, DummyIndicatorVisible))
#define DUMMY_INDICATOR_VISIBLE_CLASS(klass)   (G_TYPE_CHECK_CLASS_CAST ((klass), DUMMY_INDICATOR_VISIBLE_TYPE, DummyIndicatorVisibleClass))
#define IS_DUMMY_INDICATOR_VISIBLE(obj)   (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DUMMY_INDICATOR_VISIBLE_TYPE))
#define IS_DUMMY_INDICATOR_VISIBLE_CLASS(klass)   (G_TYPE_CHECK_CLASS_TYPE ((klass), DUMMY_INDICATOR_VISIBLE_TYPE))
#define DUMMY_INDICATOR_VISIBLE_GET_CLASS(obj)   (G_TYPE_INSTANCE_GET_CLASS ((obj), DUMMY_INDICATOR_VISIBLE_TYPE, DummyIndicatorVisibleClass))

Typedefs

typedef struct _DummyIndicatorVisible
typedef struct _DummyIndicatorVisibleClass

Functions

GType dummy_indicator_visible_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_visible_class_init (DummyIndicatorVisibleClass *klass)
static void dummy_indicator_visible_init (DummyIndicatorVisible *self)
static void dummy_indicator_visible_dispose (GObject *object)
static void dummy_indicator_visible_finalize (GObject *object)
 G_DEFINE_TYPE (DummyIndicatorVisible, dummy_indicator_visible, INDICATOR_OBJECT_TYPE)
static void dummy_indicator_entry_being_removed (IndicatorObject *io, IndicatorObjectEntry *entry)
static void dummy_indicator_entry_was_added (IndicatorObject *io, IndicatorObjectEntry *entry)

Class Documentation

struct _DummyIndicatorVisibleClass

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

Class Members
IndicatorObjectClass parent_class
struct _DummyIndicatorVisible

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

Class Members
IndicatorObject parent

Define Documentation

#define DUMMY_INDICATOR_VISIBLE (   obj)    (G_TYPE_CHECK_INSTANCE_CAST ((obj), DUMMY_INDICATOR_VISIBLE_TYPE, DummyIndicatorVisible))

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

#define DUMMY_INDICATOR_VISIBLE_CLASS (   klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), DUMMY_INDICATOR_VISIBLE_TYPE, DummyIndicatorVisibleClass))

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

#define DUMMY_INDICATOR_VISIBLE_GET_CLASS (   obj)    (G_TYPE_INSTANCE_GET_CLASS ((obj), DUMMY_INDICATOR_VISIBLE_TYPE, DummyIndicatorVisibleClass))

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

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

#define IS_DUMMY_INDICATOR_VISIBLE (   obj)    (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DUMMY_INDICATOR_VISIBLE_TYPE))

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

#define IS_DUMMY_INDICATOR_VISIBLE_CLASS (   klass)    (G_TYPE_CHECK_CLASS_TYPE ((klass), DUMMY_INDICATOR_VISIBLE_TYPE))

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


Typedef Documentation

typedef struct _DummyIndicatorVisible

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

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


Function Documentation

static void dummy_indicator_entry_being_removed ( IndicatorObject *  io,
IndicatorObjectEntry *  entry 
) [static]

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

{
       g_object_set_data(G_OBJECT(entry->label), "is-hidden", GINT_TO_POINTER(1));

        INDICATOR_OBJECT_CLASS(dummy_indicator_visible_parent_class)->entry_being_removed (io, entry);
}

Here is the caller graph for this function:

static void dummy_indicator_entry_was_added ( IndicatorObject *  io,
IndicatorObjectEntry *  entry 
) [static]

Definition at line 97 of file dummy-indicator-visible.c.

{
       g_object_steal_data(G_OBJECT(entry->label), "is-hidden");

        INDICATOR_OBJECT_CLASS(dummy_indicator_visible_parent_class)->entry_was_added (io, entry);
}

Here is the caller graph for this function:

static void dummy_indicator_visible_class_init ( DummyIndicatorVisibleClass *  klass) [static]

Definition at line 105 of file dummy-indicator-visible.c.

{
       GObjectClass *object_class = G_OBJECT_CLASS (klass);

       object_class->dispose = dummy_indicator_visible_dispose;
       object_class->finalize = dummy_indicator_visible_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;
       io_class->entry_being_removed = dummy_indicator_entry_being_removed;
       io_class->entry_was_added = dummy_indicator_entry_was_added;
}

Here is the call graph for this function:

static void dummy_indicator_visible_dispose ( GObject *  object) [static]

Definition at line 128 of file dummy-indicator-visible.c.

{

       G_OBJECT_CLASS (dummy_indicator_visible_parent_class)->dispose (object);
}

Here is the caller graph for this function:

static void dummy_indicator_visible_finalize ( GObject *  object) [static]

Definition at line 135 of file dummy-indicator-visible.c.

{

       G_OBJECT_CLASS (dummy_indicator_visible_parent_class)->finalize (object);
}

Here is the caller graph for this function:

static void dummy_indicator_visible_init ( DummyIndicatorVisible *  self) [static]

Definition at line 123 of file dummy-indicator-visible.c.

{
}
G_DEFINE_TYPE ( DummyIndicatorVisible  ,
dummy_indicator_visible  ,
INDICATOR_OBJECT_TYPE   
)
const gchar* get_accessible_desc ( IndicatorObject *  io)

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

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

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

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

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

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

Definition at line 65 of file dummy-indicator-visible.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;
}