Back to index

libappindicator  12.10.0
Classes | Defines | Typedefs | Functions | Variables
simple-client-vala.c File Reference
#include <glib.h>
#include <glib-object.h>
#include <stdlib.h>
#include <string.h>
#include <gtk/gtk.h>
#include <gdk/gdk.h>
#include <gobject/gvaluecollector.h>

Go to the source code of this file.

Classes

struct  _SimpleClient
struct  _SimpleClientClass
struct  _SimpleClientPrivate
struct  _Block1Data
struct  _Block2Data
struct  _ParamSpecSimpleClient

Defines

#define TYPE_SIMPLE_CLIENT   (simple_client_get_type ())
#define SIMPLE_CLIENT(obj)   (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SIMPLE_CLIENT, SimpleClient))
#define SIMPLE_CLIENT_CLASS(klass)   (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SIMPLE_CLIENT, SimpleClientClass))
#define IS_SIMPLE_CLIENT(obj)   (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SIMPLE_CLIENT))
#define IS_SIMPLE_CLIENT_CLASS(klass)   (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SIMPLE_CLIENT))
#define SIMPLE_CLIENT_GET_CLASS(obj)   (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SIMPLE_CLIENT, SimpleClientClass))
#define _simple_client_unref0(var)   ((var == NULL) ? NULL : (var = (simple_client_unref (var), NULL)))
#define _g_object_unref0(var)   ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_free0(var)   (var = (g_free (var), NULL))
#define __g_slist_free__g_object_unref0_0(var)   ((var == NULL) ? NULL : (var = (_g_slist_free__g_object_unref0_ (var), NULL)))
#define SIMPLE_CLIENT_GET_PRIVATE(o)   (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_SIMPLE_CLIENT, SimpleClientPrivate))

Typedefs

typedef struct _SimpleClient
typedef struct _SimpleClientClass
typedef struct _SimpleClientPrivate
typedef struct _Block1Data
typedef struct _Block2Data
typedef struct _ParamSpecSimpleClient

Functions

gint _vala_main (gchar **args, int args_length1)
SimpleClient * simple_client_new (gchar **args, int args_length1)
SimpleClient * simple_client_construct (GType object_type, gchar **args, int args_length1)
gpointer simple_client_ref (gpointer instance)
void simple_client_unref (gpointer instance)
GParamSpec * param_spec_simple_client (const gchar *name, const gchar *nick, const gchar *blurb, GType object_type, GParamFlags flags)
void value_set_simple_client (GValue *value, gpointer v_object)
void value_take_simple_client (GValue *value, gpointer v_object)
gpointer value_get_simple_client (const GValue *value)
GType simple_client_get_type (void)
static void simple_client_toggle_sensitivity (SimpleClient *self, GtkWidget *widget)
static void simple_client_append_submenu (SimpleClient *self, GtkMenuItem *item)
static Block1Data * block1_data_ref (Block1Data *_data1_)
static void block1_data_unref (void *_userdata_)
static void __lambda2_ (SimpleClient *self)
static void ___lambda2__gtk_menu_item_activate (GtkMenuItem *_sender, gpointer self)
static void __lambda3_ (Block1Data *_data1_)
static void ___lambda3__gtk_menu_item_activate (GtkMenuItem *_sender, gpointer self)
static void __lambda4_ (SimpleClient *self)
static void ___lambda4__gtk_menu_item_activate (GtkMenuItem *_sender, gpointer self)
static void __lambda5_ (SimpleClient *self)
static void ___lambda5__gtk_menu_item_activate (GtkMenuItem *_sender, gpointer self)
static void simple_client_label_toggle (SimpleClient *self, GtkMenuItem *item)
static Block2Data * block2_data_ref (Block2Data *_data2_)
static void block2_data_unref (void *_userdata_)
static void __lambda6_ (SimpleClient *self, gint delta, GdkScrollDirection direction)
const gchar * gdk_scroll_direction_to_string (GdkScrollDirection self)
static void ___lambda6__app_indicator_scroll_event (AppIndicator *_sender, gint delta, GdkScrollDirection direction, gpointer self)
static gboolean __lambda7_ (SimpleClient *self)
static gboolean ___lambda7__gsource_func (gpointer self)
static void __lambda8_ (SimpleClient *self)
static void ___lambda8__gtk_menu_item_activate (GtkMenuItem *_sender, gpointer self)
static void _g_object_unref0_ (gpointer var)
static void _g_slist_free__g_object_unref0_ (GSList *self)
static void __lambda9_ (SimpleClient *self)
static void ___lambda9__gtk_menu_item_activate (GtkMenuItem *_sender, gpointer self)
static void __lambda10_ (Block2Data *_data2_)
static void ___lambda10__gtk_menu_item_activate (GtkMenuItem *_sender, gpointer self)
static void __lambda11_ (Block2Data *_data2_)
static void ___lambda11__gtk_menu_item_activate (GtkMenuItem *_sender, gpointer self)
static void __lambda12_ (Block2Data *_data2_)
static void ___lambda12__gtk_menu_item_activate (GtkMenuItem *_sender, gpointer self)
static void __lambda13_ (Block2Data *_data2_)
static void ___lambda13__gtk_menu_item_activate (GtkMenuItem *_sender, gpointer self)
static void __lambda14_ (Block2Data *_data2_)
static void ___lambda14__gtk_menu_item_activate (GtkMenuItem *_sender, gpointer self)
static void simple_client_finalize (SimpleClient *obj)
int main (int argc, char **argv)
static gpointer _g_object_ref0 (gpointer self)
void simple_client_run (SimpleClient *self)
static void value_simple_client_init (GValue *value)
static void value_simple_client_free_value (GValue *value)
static void value_simple_client_copy_value (const GValue *src_value, GValue *dest_value)
static gpointer value_simple_client_peek_pointer (const GValue *value)
static gchar * value_simple_client_collect_value (GValue *value, guint n_collect_values, GTypeCValue *collect_values, guint collect_flags)
static gchar * value_simple_client_lcopy_value (const GValue *value, guint n_collect_values, GTypeCValue *collect_values, guint collect_flags)
static void simple_client_class_init (SimpleClientClass *klass)
static void simple_client_instance_init (SimpleClient *self)

Variables

static gpointer simple_client_parent_class = NULL

Class Documentation

struct _SimpleClient

Definition at line 54 of file simple-client-vala.c.

Class Members
GTypeInstance parent_instance
SimpleClientPrivate * priv
volatile int ref_count
struct _SimpleClientPrivate

Definition at line 65 of file simple-client-vala.c.

Collaboration diagram for _SimpleClientPrivate:
Class Members
gboolean active
gboolean can_haz_label
AppIndicator * ci
GtkMenu * menu
gint percentage
struct _Block1Data

Definition at line 73 of file simple-client-vala.c.

Class Members
int _ref_count_
GtkMenuItem * prev_mi
SimpleClient * self
struct _Block2Data

Definition at line 79 of file simple-client-vala.c.

Class Members
int _ref_count_
GtkMenuItem * att
GtkCheckMenuItem * icon
GtkImageMenuItem * imgitem
SimpleClient * self
GtkMenuItem * show
GtkMenuItem * submenu
struct _ParamSpecSimpleClient

Definition at line 89 of file simple-client-vala.c.

Class Members
GParamSpec parent_instance

Define Documentation

#define __g_slist_free__g_object_unref0_0 (   var)    ((var == NULL) ? NULL : (var = (_g_slist_free__g_object_unref0_ (var), NULL)))

Definition at line 51 of file simple-client-vala.c.

#define _g_free0 (   var)    (var = (g_free (var), NULL))

Definition at line 50 of file simple-client-vala.c.

#define _g_object_unref0 (   var)    ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))

Definition at line 47 of file simple-client-vala.c.

#define _simple_client_unref0 (   var)    ((var == NULL) ? NULL : (var = (simple_client_unref (var), NULL)))

Definition at line 45 of file simple-client-vala.c.

#define IS_SIMPLE_CLIENT (   obj)    (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SIMPLE_CLIENT))

Definition at line 39 of file simple-client-vala.c.

#define IS_SIMPLE_CLIENT_CLASS (   klass)    (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SIMPLE_CLIENT))

Definition at line 40 of file simple-client-vala.c.

#define SIMPLE_CLIENT (   obj)    (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SIMPLE_CLIENT, SimpleClient))

Definition at line 37 of file simple-client-vala.c.

#define SIMPLE_CLIENT_CLASS (   klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SIMPLE_CLIENT, SimpleClientClass))

Definition at line 38 of file simple-client-vala.c.

#define SIMPLE_CLIENT_GET_CLASS (   obj)    (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SIMPLE_CLIENT, SimpleClientClass))

Definition at line 41 of file simple-client-vala.c.

#define SIMPLE_CLIENT_GET_PRIVATE (   o)    (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_SIMPLE_CLIENT, SimpleClientPrivate))

Definition at line 36 of file simple-client-vala.c.


Typedef Documentation

typedef struct _Block1Data

Definition at line 48 of file simple-client-vala.c.

typedef struct _Block2Data

Definition at line 49 of file simple-client-vala.c.

typedef struct _ParamSpecSimpleClient

Definition at line 52 of file simple-client-vala.c.

typedef struct _SimpleClient

Definition at line 43 of file simple-client-vala.c.

typedef struct _SimpleClientClass

Definition at line 44 of file simple-client-vala.c.

typedef struct _SimpleClientPrivate

Definition at line 46 of file simple-client-vala.c.


Function Documentation

static void ___lambda10__gtk_menu_item_activate ( GtkMenuItem *  _sender,
gpointer  self 
) [static]

Definition at line 525 of file simple-client-vala.c.

                                                                                      {
       __lambda10_ (self);
}

Here is the call graph for this function:

Here is the caller graph for this function:

static void ___lambda11__gtk_menu_item_activate ( GtkMenuItem *  _sender,
gpointer  self 
) [static]

Definition at line 544 of file simple-client-vala.c.

                                                                                      {
       __lambda11_ (self);
}

Here is the call graph for this function:

Here is the caller graph for this function:

static void ___lambda12__gtk_menu_item_activate ( GtkMenuItem *  _sender,
gpointer  self 
) [static]

Definition at line 570 of file simple-client-vala.c.

                                                                                      {
       __lambda12_ (self);
}

Here is the call graph for this function:

Here is the caller graph for this function:

static void ___lambda13__gtk_menu_item_activate ( GtkMenuItem *  _sender,
gpointer  self 
) [static]

Definition at line 582 of file simple-client-vala.c.

                                                                                      {
       __lambda13_ (self);
}

Here is the call graph for this function:

Here is the caller graph for this function:

static void ___lambda14__gtk_menu_item_activate ( GtkMenuItem *  _sender,
gpointer  self 
) [static]

Definition at line 604 of file simple-client-vala.c.

                                                                                      {
       __lambda14_ (self);
}

Here is the call graph for this function:

Here is the caller graph for this function:

static void ___lambda2__gtk_menu_item_activate ( GtkMenuItem *  _sender,
gpointer  self 
) [static]

Definition at line 241 of file simple-client-vala.c.

                                                                                     {
       __lambda2_ (self);
}

Here is the call graph for this function:

Here is the caller graph for this function:

static void ___lambda3__gtk_menu_item_activate ( GtkMenuItem *  _sender,
gpointer  self 
) [static]

Definition at line 258 of file simple-client-vala.c.

                                                                                     {
       __lambda3_ (self);
}

Here is the call graph for this function:

Here is the caller graph for this function:

static void ___lambda4__gtk_menu_item_activate ( GtkMenuItem *  _sender,
gpointer  self 
) [static]

Definition at line 268 of file simple-client-vala.c.

                                                                                     {
       __lambda4_ (self);
}

Here is the call graph for this function:

Here is the caller graph for this function:

static void ___lambda5__gtk_menu_item_activate ( GtkMenuItem *  _sender,
gpointer  self 
) [static]

Definition at line 290 of file simple-client-vala.c.

                                                                                     {
       __lambda5_ (self);
}

Here is the call graph for this function:

Here is the caller graph for this function:

static void ___lambda6__app_indicator_scroll_event ( AppIndicator *  _sender,
gint  delta,
GdkScrollDirection  direction,
gpointer  self 
) [static]

Definition at line 442 of file simple-client-vala.c.

                                                                                                                                    {
       __lambda6_ (self, delta, direction);
}

Here is the call graph for this function:

Here is the caller graph for this function:

static gboolean ___lambda7__gsource_func ( gpointer  self) [static]

Definition at line 480 of file simple-client-vala.c.

                                                         {
       gboolean result;
       result = __lambda7_ (self);
       return result;
}

Here is the call graph for this function:

Here is the caller graph for this function:

static void ___lambda8__gtk_menu_item_activate ( GtkMenuItem *  _sender,
gpointer  self 
) [static]

Definition at line 492 of file simple-client-vala.c.

                                                                                     {
       __lambda8_ (self);
}

Here is the call graph for this function:

Here is the caller graph for this function:

static void ___lambda9__gtk_menu_item_activate ( GtkMenuItem *  _sender,
gpointer  self 
) [static]

Definition at line 513 of file simple-client-vala.c.

                                                                                     {
       __lambda9_ (self);
}

Here is the call graph for this function:

Here is the caller graph for this function:

static void __lambda10_ ( Block2Data *  _data2_) [static]

Definition at line 518 of file simple-client-vala.c.

                                              {
       SimpleClient * self;
       self = _data2_->self;
       simple_client_toggle_sensitivity (self, (GtkWidget*) _data2_->submenu);
}

Here is the call graph for this function:

Here is the caller graph for this function:

static void __lambda11_ ( Block2Data *  _data2_) [static]

Definition at line 530 of file simple-client-vala.c.

                                              {
       SimpleClient * self;
       GtkWidget* _tmp0_ = NULL;
       GtkImage* _tmp1_;
       GtkImage* img;
       self = _data2_->self;
       _tmp0_ = gtk_image_menu_item_get_image (_data2_->imgitem);
       _tmp1_ = _g_object_ref0 (GTK_IMAGE (_tmp0_));
       img = _tmp1_;
       gtk_image_set_from_stock (img, GTK_STOCK_OPEN, GTK_ICON_SIZE_MENU);
       _g_object_unref0 (img);
}

Here is the call graph for this function:

Here is the caller graph for this function:

static void __lambda12_ ( Block2Data *  _data2_) [static]

Definition at line 549 of file simple-client-vala.c.

                                              {
       SimpleClient * self;
       gboolean _tmp0_;
       self = _data2_->self;
       _tmp0_ = self->priv->active;
       if (_tmp0_) {
              AppIndicator* _tmp1_;
              _tmp1_ = self->priv->ci;
              app_indicator_set_status (_tmp1_, APP_INDICATOR_STATUS_ATTENTION);
              gtk_menu_item_set_label (_data2_->att, "I'm okay now");
              self->priv->active = FALSE;
       } else {
              AppIndicator* _tmp2_;
              _tmp2_ = self->priv->ci;
              app_indicator_set_status (_tmp2_, APP_INDICATOR_STATUS_ACTIVE);
              gtk_menu_item_set_label (_data2_->att, "Get Attention");
              self->priv->active = FALSE;
       }
}

Here is the call graph for this function:

Here is the caller graph for this function:

static void __lambda13_ ( Block2Data *  _data2_) [static]

Definition at line 575 of file simple-client-vala.c.

                                              {
       SimpleClient * self;
       self = _data2_->self;
       simple_client_label_toggle (self, _data2_->show);
}

Here is the call graph for this function:

Here is the caller graph for this function:

static void __lambda14_ ( Block2Data *  _data2_) [static]

Definition at line 587 of file simple-client-vala.c.

                                              {
       SimpleClient * self;
       gboolean _tmp0_ = FALSE;
       self = _data2_->self;
       _tmp0_ = gtk_check_menu_item_get_active (_data2_->icon);
       if (_tmp0_) {
              AppIndicator* _tmp1_;
              _tmp1_ = self->priv->ci;
              app_indicator_set_icon (_tmp1_, "simple-client-test-icon.png");
       } else {
              AppIndicator* _tmp2_;
              _tmp2_ = self->priv->ci;
              app_indicator_set_icon (_tmp2_, "indicator-messages");
       }
}

Here is the call graph for this function:

Here is the caller graph for this function:

static void __lambda2_ ( SimpleClient *  self) [static]

Definition at line 236 of file simple-client-vala.c.

                                            {
       g_print ("Sub1\n");
}

Here is the caller graph for this function:

static void __lambda3_ ( Block1Data *  _data1_) [static]

Definition at line 251 of file simple-client-vala.c.

                                             {
       SimpleClient * self;
       self = _data1_->self;
       simple_client_toggle_sensitivity (self, (GtkWidget*) _data1_->prev_mi);
}

Here is the call graph for this function:

Here is the caller graph for this function:

static void __lambda4_ ( SimpleClient *  self) [static]

Definition at line 263 of file simple-client-vala.c.

                                            {
       g_print ("Sub3\n");
}

Here is the caller graph for this function:

static void __lambda5_ ( SimpleClient *  self) [static]

Definition at line 273 of file simple-client-vala.c.

                                            {
       AppIndicator* _tmp0_;
       AppIndicatorStatus _tmp1_ = 0;
       _tmp0_ = self->priv->ci;
       _tmp1_ = app_indicator_get_status (_tmp0_);
       if (_tmp1_ == APP_INDICATOR_STATUS_ATTENTION) {
              AppIndicator* _tmp2_;
              _tmp2_ = self->priv->ci;
              app_indicator_set_status (_tmp2_, APP_INDICATOR_STATUS_ACTIVE);
       } else {
              AppIndicator* _tmp3_;
              _tmp3_ = self->priv->ci;
              app_indicator_set_status (_tmp3_, APP_INDICATOR_STATUS_ATTENTION);
       }
}

Here is the call graph for this function:

Here is the caller graph for this function:

static void __lambda6_ ( SimpleClient *  self,
gint  delta,
GdkScrollDirection  direction 
) [static]

Definition at line 421 of file simple-client-vala.c.

                                                                                      {
       gint _tmp0_;
       gchar* _tmp1_ = NULL;
       gchar* _tmp2_;
       GdkScrollDirection _tmp3_;
       GEnumValue* _tmp4_;
       gchar* _tmp5_ = NULL;
       gchar* _tmp6_;
       _tmp0_ = delta;
       _tmp1_ = g_strdup_printf ("%i", _tmp0_);
       _tmp2_ = _tmp1_;
       _tmp3_ = direction;
       _tmp4_ = g_enum_get_value (g_type_class_ref (GDK_TYPE_SCROLL_DIRECTION), _tmp3_);
       _tmp5_ = g_strconcat ("Got scroll event! delta: ", _tmp2_, ", direction: ", (_tmp4_ != NULL) ? _tmp4_->value_name : NULL, "\n", NULL);
       _tmp6_ = _tmp5_;
       g_print ("%s", _tmp6_);
       _g_free0 (_tmp6_);
       _g_free0 (_tmp2_);
}

Here is the caller graph for this function:

static gboolean __lambda7_ ( SimpleClient *  self) [static]

Definition at line 447 of file simple-client-vala.c.

                                                {
       gboolean result = FALSE;
       gint _tmp0_;
       gboolean _tmp1_;
       _tmp0_ = self->priv->percentage;
       self->priv->percentage = (_tmp0_ + 1) % 100;
       _tmp1_ = self->priv->can_haz_label;
       if (_tmp1_) {
              AppIndicator* _tmp2_;
              gint _tmp3_;
              gchar* _tmp4_ = NULL;
              gchar* _tmp5_;
              gchar* _tmp6_ = NULL;
              gchar* _tmp7_;
              _tmp2_ = self->priv->ci;
              _tmp3_ = self->priv->percentage;
              _tmp4_ = g_strdup_printf ("%i", _tmp3_ + 1);
              _tmp5_ = _tmp4_;
              _tmp6_ = g_strconcat (_tmp5_, "%", NULL);
              _tmp7_ = _tmp6_;
              app_indicator_set_label (_tmp2_, _tmp7_, "");
              _g_free0 (_tmp7_);
              _g_free0 (_tmp5_);
       } else {
              AppIndicator* _tmp8_;
              _tmp8_ = self->priv->ci;
              app_indicator_set_label (_tmp8_, "", "");
       }
       result = TRUE;
       return result;
}

Here is the call graph for this function:

Here is the caller graph for this function:

static void __lambda8_ ( SimpleClient *  self) [static]

Definition at line 487 of file simple-client-vala.c.

                                            {
       g_print ("1\n");
}

Here is the caller graph for this function:

static void __lambda9_ ( SimpleClient *  self) [static]

Definition at line 508 of file simple-client-vala.c.

                                            {
       g_print ("2\n");
}

Here is the caller graph for this function:

static gpointer _g_object_ref0 ( gpointer  self) [static]

Definition at line 246 of file simple-client-vala.c.

                                               {
       return self ? g_object_ref (self) : NULL;
}

Here is the caller graph for this function:

static void _g_object_unref0_ ( gpointer  var) [static]

Definition at line 497 of file simple-client-vala.c.

                                             {
       (var == NULL) ? NULL : (var = (g_object_unref (var), NULL));
}

Here is the caller graph for this function:

static void _g_slist_free__g_object_unref0_ ( GSList *  self) [static]

Definition at line 502 of file simple-client-vala.c.

                                                           {
       g_slist_foreach (self, (GFunc) _g_object_unref0_, NULL);
       g_slist_free (self);
}

Here is the call graph for this function:

gint _vala_main ( gchar **  args,
int  args_length1 
)

Definition at line 150 of file simple-client-vala.c.

                                                 {
       gint result = 0;
       gchar** _tmp0_;
       gint _tmp0__length1;
       SimpleClient* _tmp1_;
       SimpleClient* sc;
       _tmp0_ = args;
       _tmp0__length1 = args_length1;
       _tmp1_ = simple_client_new (_tmp0_, _tmp0__length1);
       sc = _tmp1_;
       simple_client_run (sc);
       result = 0;
       _simple_client_unref0 (sc);
       return result;
}

Here is the call graph for this function:

Here is the caller graph for this function:

static Block1Data * block1_data_ref ( Block1Data *  _data1_) [static]

Definition at line 217 of file simple-client-vala.c.

                                                         {
       g_atomic_int_inc (&_data1_->_ref_count_);
       return _data1_;
}

Here is the caller graph for this function:

static void block1_data_unref ( void *  _userdata_) [static]

Definition at line 223 of file simple-client-vala.c.

                                                  {
       Block1Data* _data1_;
       _data1_ = (Block1Data*) _userdata_;
       if (g_atomic_int_dec_and_test (&_data1_->_ref_count_)) {
              SimpleClient * self;
              self = _data1_->self;
              _g_object_unref0 (_data1_->prev_mi);
              _simple_client_unref0 (self);
              g_slice_free (Block1Data, _data1_);
       }
}

Here is the caller graph for this function:

static Block2Data * block2_data_ref ( Block2Data *  _data2_) [static]

Definition at line 398 of file simple-client-vala.c.

                                                         {
       g_atomic_int_inc (&_data2_->_ref_count_);
       return _data2_;
}

Here is the caller graph for this function:

static void block2_data_unref ( void *  _userdata_) [static]

Definition at line 404 of file simple-client-vala.c.

                                                  {
       Block2Data* _data2_;
       _data2_ = (Block2Data*) _userdata_;
       if (g_atomic_int_dec_and_test (&_data2_->_ref_count_)) {
              SimpleClient * self;
              self = _data2_->self;
              _g_object_unref0 (_data2_->icon);
              _g_object_unref0 (_data2_->show);
              _g_object_unref0 (_data2_->att);
              _g_object_unref0 (_data2_->imgitem);
              _g_object_unref0 (_data2_->submenu);
              _simple_client_unref0 (self);
              g_slice_free (Block2Data, _data2_);
       }
}

Here is the caller graph for this function:

const gchar* gdk_scroll_direction_to_string ( GdkScrollDirection  self)
int main ( int  argc,
char **  argv 
)

Definition at line 167 of file simple-client-vala.c.

                                  {
       g_type_init ();
       return _vala_main (argv, argc);
}

Here is the call graph for this function:

GParamSpec * param_spec_simple_client ( const gchar *  name,
const gchar *  nick,
const gchar *  blurb,
GType  object_type,
GParamFlags  flags 
)

Definition at line 788 of file simple-client-vala.c.

                                                                                                                                      {
       ParamSpecSimpleClient* spec;
       g_return_val_if_fail (g_type_is_a (object_type, TYPE_SIMPLE_CLIENT), NULL);
       spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags);
       G_PARAM_SPEC (spec)->value_type = object_type;
       return G_PARAM_SPEC (spec);
}
static void simple_client_append_submenu ( SimpleClient *  self,
GtkMenuItem *  item 
) [static]

Definition at line 295 of file simple-client-vala.c.

                                                                                 {
       Block1Data* _data1_;
       GtkMenu* _tmp0_;
       GtkMenu* _tmp1_;
       GtkMenu* menu;
       GtkMenuItem* mi = NULL;
       GtkMenuItem* _tmp2_;
       GtkMenuItem* _tmp3_;
       GtkMenuItem* _tmp4_;
       GtkMenuItem* _tmp5_;
       GtkMenuItem* _tmp6_;
       GtkMenuItem* _tmp7_;
       GtkMenuItem* _tmp8_;
       GtkMenuItem* _tmp9_;
       GtkMenuItem* _tmp10_;
       GtkMenuItem* _tmp11_;
       GtkMenuItem* _tmp12_;
       GtkMenuItem* _tmp13_;
       GtkMenuItem* _tmp14_;
       GtkMenuItem* _tmp15_;
       GtkMenuItem* _tmp16_;
       GtkMenuItem* _tmp17_;
       GtkMenuItem* _tmp18_;
       GtkMenuItem* _tmp19_;
       AppIndicator* _tmp20_;
       GtkMenuItem* _tmp21_;
       GtkMenuItem* _tmp22_;
       g_return_if_fail (self != NULL);
       g_return_if_fail (item != NULL);
       _data1_ = g_slice_new0 (Block1Data);
       _data1_->_ref_count_ = 1;
       _data1_->self = simple_client_ref (self);
       _tmp0_ = (GtkMenu*) gtk_menu_new ();
       _tmp1_ = g_object_ref_sink (_tmp0_);
       menu = _tmp1_;
       _tmp2_ = (GtkMenuItem*) gtk_menu_item_new_with_label ("Sub 1");
       _tmp3_ = g_object_ref_sink (_tmp2_);
       _g_object_unref0 (mi);
       mi = _tmp3_;
       _tmp4_ = mi;
       gtk_menu_shell_append ((GtkMenuShell*) menu, (GtkWidget*) _tmp4_);
       _tmp5_ = mi;
       g_signal_connect (_tmp5_, "activate", (GCallback) ___lambda2__gtk_menu_item_activate, self);
       _tmp6_ = mi;
       _tmp7_ = _g_object_ref0 (_tmp6_);
       _data1_->prev_mi = _tmp7_;
       _tmp8_ = (GtkMenuItem*) gtk_menu_item_new_with_label ("Sub 2");
       _tmp9_ = g_object_ref_sink (_tmp8_);
       _g_object_unref0 (mi);
       mi = _tmp9_;
       _tmp10_ = mi;
       gtk_menu_shell_append ((GtkMenuShell*) menu, (GtkWidget*) _tmp10_);
       _tmp11_ = mi;
       g_signal_connect_data (_tmp11_, "activate", (GCallback) ___lambda3__gtk_menu_item_activate, block1_data_ref (_data1_), (GClosureNotify) block1_data_unref, 0);
       _tmp12_ = (GtkMenuItem*) gtk_menu_item_new_with_label ("Sub 3");
       _tmp13_ = g_object_ref_sink (_tmp12_);
       _g_object_unref0 (mi);
       mi = _tmp13_;
       _tmp14_ = mi;
       gtk_menu_shell_append ((GtkMenuShell*) menu, (GtkWidget*) _tmp14_);
       _tmp15_ = mi;
       g_signal_connect (_tmp15_, "activate", (GCallback) ___lambda4__gtk_menu_item_activate, self);
       _tmp16_ = (GtkMenuItem*) gtk_menu_item_new_with_label ("Toggle Attention");
       _tmp17_ = g_object_ref_sink (_tmp16_);
       _g_object_unref0 (mi);
       mi = _tmp17_;
       _tmp18_ = mi;
       gtk_menu_shell_append ((GtkMenuShell*) menu, (GtkWidget*) _tmp18_);
       _tmp19_ = mi;
       g_signal_connect (_tmp19_, "activate", (GCallback) ___lambda5__gtk_menu_item_activate, self);
       _tmp20_ = self->priv->ci;
       _tmp21_ = mi;
       app_indicator_set_secondary_activate_target (_tmp20_, (GtkWidget*) _tmp21_);
       gtk_widget_show_all ((GtkWidget*) menu);
       _tmp22_ = item;
       gtk_menu_item_set_submenu (_tmp22_, (GtkWidget*) menu);
       _g_object_unref0 (mi);
       _g_object_unref0 (menu);
       block1_data_unref (_data1_);
       _data1_ = NULL;
}

Here is the call graph for this function:

Here is the caller graph for this function:

static void simple_client_class_init ( SimpleClientClass *  klass) [static]

Definition at line 838 of file simple-client-vala.c.

                                                                 {
       simple_client_parent_class = g_type_class_peek_parent (klass);
       SIMPLE_CLIENT_CLASS (klass)->finalize = simple_client_finalize;
       g_type_class_add_private (klass, sizeof (SimpleClientPrivate));
}

Here is the call graph for this function:

SimpleClient * simple_client_construct ( GType  object_type,
gchar **  args,
int  args_length1 
)

Definition at line 173 of file simple-client-vala.c.

                                                                                          {
       SimpleClient* self = NULL;
       AppIndicator* _tmp0_;
       AppIndicator* _tmp1_;
       AppIndicator* _tmp2_;
       AppIndicator* _tmp3_;
       AppIndicator* _tmp4_;
       self = (SimpleClient*) g_type_create_instance (object_type);
       gtk_init (&args_length1, &args);
       _tmp0_ = app_indicator_new ("example-simple-client", "indicator-messages", APP_INDICATOR_CATEGORY_APPLICATION_STATUS);
       _g_object_unref0 (self->priv->ci);
       self->priv->ci = _tmp0_;
       _tmp1_ = self->priv->ci;
       app_indicator_set_status (_tmp1_, APP_INDICATOR_STATUS_ACTIVE);
       _tmp2_ = self->priv->ci;
       app_indicator_set_attention_icon (_tmp2_, "indicator-messages-new");
       _tmp3_ = self->priv->ci;
       app_indicator_set_label (_tmp3_, "1%", "100%");
       _tmp4_ = self->priv->ci;
       app_indicator_set_title (_tmp4_, "Test Indicator (vala)");
       self->priv->active = TRUE;
       self->priv->can_haz_label = TRUE;
       return self;
}

Here is the call graph for this function:

Here is the caller graph for this function:

static void simple_client_finalize ( SimpleClient *  obj) [static]

Definition at line 851 of file simple-client-vala.c.

                                                       {
       SimpleClient * self;
       self = SIMPLE_CLIENT (obj);
       _g_object_unref0 (self->priv->menu);
       _g_object_unref0 (self->priv->ci);
}

Here is the caller graph for this function:

GType simple_client_get_type ( void  )

Definition at line 105 of file simple-client-vala.c.

      {
       SIMPLE_CLIENT_DUMMY_PROPERTY
};
static void simple_client_instance_init ( SimpleClient *  self) [static]

Definition at line 845 of file simple-client-vala.c.

                                                              {
       self->priv = SIMPLE_CLIENT_GET_PRIVATE (self);
       self->ref_count = 1;
}
static void simple_client_label_toggle ( SimpleClient *  self,
GtkMenuItem *  item 
) [static]

Definition at line 378 of file simple-client-vala.c.

                                                                               {
       gboolean _tmp0_;
       gboolean _tmp1_;
       g_return_if_fail (self != NULL);
       g_return_if_fail (item != NULL);
       _tmp0_ = self->priv->can_haz_label;
       self->priv->can_haz_label = !_tmp0_;
       _tmp1_ = self->priv->can_haz_label;
       if (_tmp1_) {
              GtkMenuItem* _tmp2_;
              _tmp2_ = item;
              gtk_menu_item_set_label (_tmp2_, "Hide label");
       } else {
              GtkMenuItem* _tmp3_;
              _tmp3_ = item;
              gtk_menu_item_set_label (_tmp3_, "Show label");
       }
}

Here is the caller graph for this function:

SimpleClient * simple_client_new ( gchar **  args,
int  args_length1 
)

Definition at line 199 of file simple-client-vala.c.

                                                                 {
       return simple_client_construct (TYPE_SIMPLE_CLIENT, args, args_length1);
}

Here is the call graph for this function:

Here is the caller graph for this function:

gpointer simple_client_ref ( gpointer  instance)

Definition at line 873 of file simple-client-vala.c.

                                               {
       SimpleClient* self;
       self = instance;
       g_atomic_int_inc (&self->ref_count);
       return instance;
}

Here is the caller graph for this function:

void simple_client_run ( SimpleClient *  self)

Definition at line 609 of file simple-client-vala.c.

                                            {
       Block2Data* _data2_;
       AppIndicator* _tmp0_;
       GtkMenu* _tmp1_;
       GtkMenu* _tmp2_;
       GtkCheckMenuItem* _tmp3_;
       GtkCheckMenuItem* _tmp4_;
       GtkCheckMenuItem* chk;
       GtkMenu* _tmp5_;
       GSList* _tmp6_;
       GtkRadioMenuItem* _tmp7_;
       GtkRadioMenuItem* _tmp8_;
       GtkRadioMenuItem* _tmp9_;
       GtkRadioMenuItem* radio;
       GtkMenu* _tmp10_;
       GtkMenuItem* _tmp11_;
       GtkMenuItem* _tmp12_;
       GtkMenu* _tmp13_;
       GtkMenuItem* _tmp14_;
       GtkMenuItem* _tmp15_;
       GtkMenuItem* toggle_item;
       GtkMenu* _tmp16_;
       GtkImageMenuItem* _tmp17_;
       GtkImageMenuItem* _tmp18_;
       GtkMenu* _tmp19_;
       GtkMenuItem* _tmp20_;
       GtkMenuItem* _tmp21_;
       GtkMenu* _tmp22_;
       GtkMenuItem* _tmp23_;
       GtkMenuItem* _tmp24_;
       GtkMenu* _tmp25_;
       GtkCheckMenuItem* _tmp26_;
       GtkCheckMenuItem* _tmp27_;
       GtkMenu* _tmp28_;
       AppIndicator* _tmp29_;
       GtkMenu* _tmp30_;
       g_return_if_fail (self != NULL);
       _data2_ = g_slice_new0 (Block2Data);
       _data2_->_ref_count_ = 1;
       _data2_->self = simple_client_ref (self);
       _tmp0_ = self->priv->ci;
       g_signal_connect (_tmp0_, "scroll-event", (GCallback) ___lambda6__app_indicator_scroll_event, self);
       g_timeout_add_seconds_full (G_PRIORITY_DEFAULT, (guint) 1, ___lambda7__gsource_func, simple_client_ref (self), simple_client_unref);
       _tmp1_ = (GtkMenu*) gtk_menu_new ();
       _tmp2_ = g_object_ref_sink (_tmp1_);
       _g_object_unref0 (self->priv->menu);
       self->priv->menu = _tmp2_;
       _tmp3_ = (GtkCheckMenuItem*) gtk_check_menu_item_new_with_label ("1");
       _tmp4_ = g_object_ref_sink (_tmp3_);
       chk = _tmp4_;
       g_signal_connect ((GtkMenuItem*) chk, "activate", (GCallback) ___lambda8__gtk_menu_item_activate, self);
       _tmp5_ = self->priv->menu;
       gtk_menu_shell_append ((GtkMenuShell*) _tmp5_, (GtkWidget*) ((GtkMenuItem*) chk));
       gtk_widget_show ((GtkWidget*) chk);
       _tmp6_ = NULL;
       _tmp7_ = (GtkRadioMenuItem*) gtk_radio_menu_item_new_with_label (_tmp6_, "2");
       _tmp8_ = g_object_ref_sink (_tmp7_);
       _tmp9_ = _tmp8_;
       __g_slist_free__g_object_unref0_0 (_tmp6_);
       radio = _tmp9_;
       g_signal_connect ((GtkMenuItem*) radio, "activate", (GCallback) ___lambda9__gtk_menu_item_activate, self);
       _tmp10_ = self->priv->menu;
       gtk_menu_shell_append ((GtkMenuShell*) _tmp10_, (GtkWidget*) ((GtkMenuItem*) radio));
       gtk_widget_show ((GtkWidget*) radio);
       _tmp11_ = (GtkMenuItem*) gtk_menu_item_new_with_label ("3");
       _tmp12_ = g_object_ref_sink (_tmp11_);
       _data2_->submenu = _tmp12_;
       _tmp13_ = self->priv->menu;
       gtk_menu_shell_append ((GtkMenuShell*) _tmp13_, (GtkWidget*) _data2_->submenu);
       simple_client_append_submenu (self, _data2_->submenu);
       gtk_widget_show ((GtkWidget*) _data2_->submenu);
       _tmp14_ = (GtkMenuItem*) gtk_menu_item_new_with_label ("Toggle 3");
       _tmp15_ = g_object_ref_sink (_tmp14_);
       toggle_item = _tmp15_;
       g_signal_connect_data (toggle_item, "activate", (GCallback) ___lambda10__gtk_menu_item_activate, block2_data_ref (_data2_), (GClosureNotify) block2_data_unref, 0);
       _tmp16_ = self->priv->menu;
       gtk_menu_shell_append ((GtkMenuShell*) _tmp16_, (GtkWidget*) toggle_item);
       gtk_widget_show ((GtkWidget*) toggle_item);
       _tmp17_ = (GtkImageMenuItem*) gtk_image_menu_item_new_from_stock (GTK_STOCK_NEW, NULL);
       _tmp18_ = g_object_ref_sink (_tmp17_);
       _data2_->imgitem = _tmp18_;
       g_signal_connect_data ((GtkMenuItem*) _data2_->imgitem, "activate", (GCallback) ___lambda11__gtk_menu_item_activate, block2_data_ref (_data2_), (GClosureNotify) block2_data_unref, 0);
       _tmp19_ = self->priv->menu;
       gtk_menu_shell_append ((GtkMenuShell*) _tmp19_, (GtkWidget*) ((GtkMenuItem*) _data2_->imgitem));
       gtk_widget_show ((GtkWidget*) _data2_->imgitem);
       _tmp20_ = (GtkMenuItem*) gtk_menu_item_new_with_label ("Get Attention");
       _tmp21_ = g_object_ref_sink (_tmp20_);
       _data2_->att = _tmp21_;
       g_signal_connect_data (_data2_->att, "activate", (GCallback) ___lambda12__gtk_menu_item_activate, block2_data_ref (_data2_), (GClosureNotify) block2_data_unref, 0);
       _tmp22_ = self->priv->menu;
       gtk_menu_shell_append ((GtkMenuShell*) _tmp22_, (GtkWidget*) _data2_->att);
       gtk_widget_show ((GtkWidget*) _data2_->att);
       _tmp23_ = (GtkMenuItem*) gtk_menu_item_new_with_label ("Show Label");
       _tmp24_ = g_object_ref_sink (_tmp23_);
       _data2_->show = _tmp24_;
       simple_client_label_toggle (self, _data2_->show);
       g_signal_connect_data (_data2_->show, "activate", (GCallback) ___lambda13__gtk_menu_item_activate, block2_data_ref (_data2_), (GClosureNotify) block2_data_unref, 0);
       _tmp25_ = self->priv->menu;
       gtk_menu_shell_append ((GtkMenuShell*) _tmp25_, (GtkWidget*) _data2_->show);
       gtk_widget_show ((GtkWidget*) _data2_->show);
       _tmp26_ = (GtkCheckMenuItem*) gtk_check_menu_item_new_with_label ("Set Local Icon");
       _tmp27_ = g_object_ref_sink (_tmp26_);
       _data2_->icon = _tmp27_;
       g_signal_connect_data ((GtkMenuItem*) _data2_->icon, "activate", (GCallback) ___lambda14__gtk_menu_item_activate, block2_data_ref (_data2_), (GClosureNotify) block2_data_unref, 0);
       _tmp28_ = self->priv->menu;
       gtk_menu_shell_append ((GtkMenuShell*) _tmp28_, (GtkWidget*) ((GtkMenuItem*) _data2_->icon));
       gtk_widget_show ((GtkWidget*) _data2_->icon);
       _tmp29_ = self->priv->ci;
       _tmp30_ = self->priv->menu;
       app_indicator_set_menu (_tmp29_, _tmp30_);
       gtk_main ();
       _g_object_unref0 (toggle_item);
       _g_object_unref0 (radio);
       _g_object_unref0 (chk);
       block2_data_unref (_data2_);
       _data2_ = NULL;
}

Here is the call graph for this function:

Here is the caller graph for this function:

static void simple_client_toggle_sensitivity ( SimpleClient *  self,
GtkWidget *  widget 
) [static]

Definition at line 204 of file simple-client-vala.c.

                                                                                     {
       GtkWidget* _tmp0_;
       GtkWidget* _tmp1_;
       gboolean _tmp2_ = FALSE;
       g_return_if_fail (self != NULL);
       g_return_if_fail (widget != NULL);
       _tmp0_ = widget;
       _tmp1_ = widget;
       _tmp2_ = gtk_widget_is_sensitive (_tmp1_);
       gtk_widget_set_sensitive (_tmp0_, !_tmp2_);
}

Here is the caller graph for this function:

void simple_client_unref ( gpointer  instance)

Definition at line 881 of file simple-client-vala.c.

                                             {
       SimpleClient* self;
       self = instance;
       if (g_atomic_int_dec_and_test (&self->ref_count)) {
              SIMPLE_CLIENT_GET_CLASS (self)->finalize (self);
              g_type_free_instance ((GTypeInstance *) self);
       }
}

Here is the caller graph for this function:

gpointer value_get_simple_client ( const GValue *  value)

Definition at line 797 of file simple-client-vala.c.

                                                       {
       g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_SIMPLE_CLIENT), NULL);
       return value->data[0].v_pointer;
}
void value_set_simple_client ( GValue *  value,
gpointer  v_object 
)

Definition at line 803 of file simple-client-vala.c.

                                                                {
       SimpleClient* old;
       g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_SIMPLE_CLIENT));
       old = value->data[0].v_pointer;
       if (v_object) {
              g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TYPE_SIMPLE_CLIENT));
              g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
              value->data[0].v_pointer = v_object;
              simple_client_ref (value->data[0].v_pointer);
       } else {
              value->data[0].v_pointer = NULL;
       }
       if (old) {
              simple_client_unref (old);
       }
}

Here is the call graph for this function:

static gchar* value_simple_client_collect_value ( GValue *  value,
guint  n_collect_values,
GTypeCValue *  collect_values,
guint  collect_flags 
) [static]

Definition at line 754 of file simple-client-vala.c.

                                                                                                                                          {
       if (collect_values[0].v_pointer) {
              SimpleClient* object;
              object = collect_values[0].v_pointer;
              if (object->parent_instance.g_class == NULL) {
                     return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
              } else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) {
                     return g_strconcat ("invalid object type `", g_type_name (G_TYPE_FROM_INSTANCE (object)), "' for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
              }
              value->data[0].v_pointer = simple_client_ref (object);
       } else {
              value->data[0].v_pointer = NULL;
       }
       return NULL;
}

Here is the call graph for this function:

static void value_simple_client_copy_value ( const GValue *  src_value,
GValue *  dest_value 
) [static]

Definition at line 740 of file simple-client-vala.c.

                                                                                         {
       if (src_value->data[0].v_pointer) {
              dest_value->data[0].v_pointer = simple_client_ref (src_value->data[0].v_pointer);
       } else {
              dest_value->data[0].v_pointer = NULL;
       }
}

Here is the call graph for this function:

static void value_simple_client_free_value ( GValue *  value) [static]

Definition at line 733 of file simple-client-vala.c.

                                                           {
       if (value->data[0].v_pointer) {
              simple_client_unref (value->data[0].v_pointer);
       }
}

Here is the call graph for this function:

static void value_simple_client_init ( GValue *  value) [static]

Definition at line 728 of file simple-client-vala.c.

                                                     {
       value->data[0].v_pointer = NULL;
}
static gchar* value_simple_client_lcopy_value ( const GValue *  value,
guint  n_collect_values,
GTypeCValue *  collect_values,
guint  collect_flags 
) [static]

Definition at line 771 of file simple-client-vala.c.

                                                                                                                                              {
       SimpleClient** object_p;
       object_p = collect_values[0].v_pointer;
       if (!object_p) {
              return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value));
       }
       if (!value->data[0].v_pointer) {
              *object_p = NULL;
       } else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) {
              *object_p = value->data[0].v_pointer;
       } else {
              *object_p = simple_client_ref (value->data[0].v_pointer);
       }
       return NULL;
}

Here is the call graph for this function:

static gpointer value_simple_client_peek_pointer ( const GValue *  value) [static]

Definition at line 749 of file simple-client-vala.c.

                                                                       {
       return value->data[0].v_pointer;
}
void value_take_simple_client ( GValue *  value,
gpointer  v_object 
)

Definition at line 821 of file simple-client-vala.c.

                                                                 {
       SimpleClient* old;
       g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_SIMPLE_CLIENT));
       old = value->data[0].v_pointer;
       if (v_object) {
              g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TYPE_SIMPLE_CLIENT));
              g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
              value->data[0].v_pointer = v_object;
       } else {
              value->data[0].v_pointer = NULL;
       }
       if (old) {
              simple_client_unref (old);
       }
}

Here is the call graph for this function:


Variable Documentation

gpointer simple_client_parent_class = NULL [static]

Definition at line 94 of file simple-client-vala.c.