Back to index

indicator-appmenu  12.10.0
Classes | Defines | Typedefs | Functions | Variables
hud-gtk.c File Reference
#include <glib.h>
#include <glib-object.h>
#include <gtk/gtk.h>
#include <gio/gio.h>
#include <stdlib.h>
#include <string.h>

Go to the source code of this file.

Classes

struct  _HudGtkCellRendererVariant
struct  _HudGtkCellRendererVariantClass
struct  _HudGtkWindow
struct  _HudGtkWindowClass
struct  _HudGtkWindowPrivate
struct  _HudGtkApplication
struct  _HudGtkApplicationClass

Defines

#define HUD_GTK_TYPE_CELL_RENDERER_VARIANT   (hud_gtk_cell_renderer_variant_get_type ())
#define HUD_GTK_CELL_RENDERER_VARIANT(obj)   (G_TYPE_CHECK_INSTANCE_CAST ((obj), HUD_GTK_TYPE_CELL_RENDERER_VARIANT, HudGtkCellRendererVariant))
#define HUD_GTK_CELL_RENDERER_VARIANT_CLASS(klass)   (G_TYPE_CHECK_CLASS_CAST ((klass), HUD_GTK_TYPE_CELL_RENDERER_VARIANT, HudGtkCellRendererVariantClass))
#define HUD_GTK_IS_CELL_RENDERER_VARIANT(obj)   (G_TYPE_CHECK_INSTANCE_TYPE ((obj), HUD_GTK_TYPE_CELL_RENDERER_VARIANT))
#define HUD_GTK_IS_CELL_RENDERER_VARIANT_CLASS(klass)   (G_TYPE_CHECK_CLASS_TYPE ((klass), HUD_GTK_TYPE_CELL_RENDERER_VARIANT))
#define HUD_GTK_CELL_RENDERER_VARIANT_GET_CLASS(obj)   (G_TYPE_INSTANCE_GET_CLASS ((obj), HUD_GTK_TYPE_CELL_RENDERER_VARIANT, HudGtkCellRendererVariantClass))
#define _g_free0(var)   (var = (g_free (var), NULL))
#define HUD_GTK_TYPE_WINDOW   (hud_gtk_window_get_type ())
#define HUD_GTK_WINDOW(obj)   (G_TYPE_CHECK_INSTANCE_CAST ((obj), HUD_GTK_TYPE_WINDOW, HudGtkWindow))
#define HUD_GTK_WINDOW_CLASS(klass)   (G_TYPE_CHECK_CLASS_CAST ((klass), HUD_GTK_TYPE_WINDOW, HudGtkWindowClass))
#define HUD_GTK_IS_WINDOW(obj)   (G_TYPE_CHECK_INSTANCE_TYPE ((obj), HUD_GTK_TYPE_WINDOW))
#define HUD_GTK_IS_WINDOW_CLASS(klass)   (G_TYPE_CHECK_CLASS_TYPE ((klass), HUD_GTK_TYPE_WINDOW))
#define HUD_GTK_WINDOW_GET_CLASS(obj)   (G_TYPE_INSTANCE_GET_CLASS ((obj), HUD_GTK_TYPE_WINDOW, HudGtkWindowClass))
#define _g_object_unref0(var)   ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_variant_unref0(var)   ((var == NULL) ? NULL : (var = (g_variant_unref (var), NULL)))
#define _g_variant_iter_free0(var)   ((var == NULL) ? NULL : (var = (g_variant_iter_free (var), NULL)))
#define _g_error_free0(var)   ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
#define _g_variant_type_free0(var)   ((var == NULL) ? NULL : (var = (g_variant_type_free (var), NULL)))
#define HUD_GTK_TYPE_APPLICATION   (hud_gtk_application_get_type ())
#define HUD_GTK_APPLICATION(obj)   (G_TYPE_CHECK_INSTANCE_CAST ((obj), HUD_GTK_TYPE_APPLICATION, HudGtkApplication))
#define HUD_GTK_APPLICATION_CLASS(klass)   (G_TYPE_CHECK_CLASS_CAST ((klass), HUD_GTK_TYPE_APPLICATION, HudGtkApplicationClass))
#define HUD_GTK_IS_APPLICATION(obj)   (G_TYPE_CHECK_INSTANCE_TYPE ((obj), HUD_GTK_TYPE_APPLICATION))
#define HUD_GTK_IS_APPLICATION_CLASS(klass)   (G_TYPE_CHECK_CLASS_TYPE ((klass), HUD_GTK_TYPE_APPLICATION))
#define HUD_GTK_APPLICATION_GET_CLASS(obj)   (G_TYPE_INSTANCE_GET_CLASS ((obj), HUD_GTK_TYPE_APPLICATION, HudGtkApplicationClass))
#define HUD_GTK_WINDOW_GET_PRIVATE(o)   (G_TYPE_INSTANCE_GET_PRIVATE ((o), HUD_GTK_TYPE_WINDOW, HudGtkWindowPrivate))

Typedefs

typedef struct _HudGtkCellRendererVariant
typedef struct _HudGtkCellRendererVariantClass
typedef struct _HudGtkCellRendererVariantPrivate
typedef struct _HudGtkWindow
typedef struct _HudGtkWindowClass
typedef struct _HudGtkWindowPrivate
typedef struct _HudGtkApplication
typedef struct _HudGtkApplicationClass
typedef struct _HudGtkApplicationPrivate

Functions

GType hud_gtk_cell_renderer_variant_get_type (void)
HudGtkCellRendererVariant * hud_gtk_cell_renderer_variant_new (void)
HudGtkCellRendererVariant * hud_gtk_cell_renderer_variant_construct (GType object_type)
void hud_gtk_cell_renderer_variant_set_value (HudGtkCellRendererVariant *self, GVariant *value)
static void _vala_hud_gtk_cell_renderer_variant_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec)
GType hud_gtk_window_get_type (void)
static void hud_gtk_window_populate_model (HudGtkWindow *self, GVariant *update)
static void hud_gtk_window_updated_query (HudGtkWindow *self, GDBusConnection *connection, const gchar *sender_name, const gchar *object_path, const gchar *interface_name, const gchar *signal_name, GVariant *parameters)
static void hud_gtk_window_entry_text_changed (HudGtkWindow *self, GObject *object, GParamSpec *pspec)
static void hud_gtk_window_view_activated (HudGtkWindow *self, GtkTreeView *view, GtkTreePath *path, GtkTreeViewColumn *column)
HudGtkWindow * hud_gtk_window_new (GtkApplication *application)
HudGtkWindow * hud_gtk_window_construct (GType object_type, GtkApplication *application)
static void _hud_gtk_window_updated_query_gd_bus_signal_callback (GDBusConnection *connection, const gchar *sender_name, const gchar *object_path, const gchar *interface_name, const gchar *signal_name, GVariant *parameters, gpointer self)
static void _hud_gtk_window_entry_text_changed_g_object_notify (GObject *_sender, GParamSpec *pspec, gpointer self)
static void _hud_gtk_window_view_activated_gtk_tree_view_row_activated (GtkTreeView *_sender, GtkTreePath *path, GtkTreeViewColumn *column, gpointer self)
static void hud_gtk_window_finalize (GObject *obj)
GType hud_gtk_application_get_type (void)
static void hud_gtk_application_real_activate (GApplication *base)
HudGtkApplication * hud_gtk_application_new (void)
HudGtkApplication * hud_gtk_application_construct (GType object_type)
gint _vala_main (gchar **args, int args_length1)
static void hud_gtk_cell_renderer_variant_class_init (HudGtkCellRendererVariantClass *klass)
static void hud_gtk_cell_renderer_variant_instance_init (HudGtkCellRendererVariant *self)
static gpointer _g_object_ref0 (gpointer self)
static void hud_gtk_window_class_init (HudGtkWindowClass *klass)
static void hud_gtk_window_instance_init (HudGtkWindow *self)
static void hud_gtk_application_class_init (HudGtkApplicationClass *klass)
static void hud_gtk_application_instance_init (HudGtkApplication *self)
int main (int argc, char **argv)

Variables

static gpointer hud_gtk_cell_renderer_variant_parent_class = NULL
static gpointer hud_gtk_window_parent_class = NULL
static gpointer hud_gtk_application_parent_class = NULL

Class Documentation

struct _HudGtkCellRendererVariant

Definition at line 52 of file hud-gtk.c.

Class Members
GtkCellRendererText parent_instance
HudGtkCellRendererVariantPrivate * priv
struct _HudGtkCellRendererVariantClass

Definition at line 57 of file hud-gtk.c.

Class Members
GtkCellRendererTextClass parent_class
struct _HudGtkWindow

Definition at line 61 of file hud-gtk.c.

Class Members
GtkApplicationWindow parent_instance
HudGtkWindowPrivate * priv
struct _HudGtkWindowClass

Definition at line 66 of file hud-gtk.c.

Class Members
GtkApplicationWindowClass parent_class
struct _HudGtkWindowPrivate

Definition at line 70 of file hud-gtk.c.

Class Members
GtkListStore * model
GVariant * query_key
GDBusConnection * session
struct _HudGtkApplication

Definition at line 76 of file hud-gtk.c.

Class Members
GtkApplication parent_instance
HudGtkApplicationPrivate * priv
struct _HudGtkApplicationClass

Definition at line 81 of file hud-gtk.c.

Class Members
GtkApplicationClass parent_class

Define Documentation

#define _g_error_free0 (   var)    ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))

Definition at line 38 of file hud-gtk.c.

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

Definition at line 23 of file hud-gtk.c.

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

Definition at line 35 of file hud-gtk.c.

#define _g_variant_iter_free0 (   var)    ((var == NULL) ? NULL : (var = (g_variant_iter_free (var), NULL)))

Definition at line 37 of file hud-gtk.c.

#define _g_variant_type_free0 (   var)    ((var == NULL) ? NULL : (var = (g_variant_type_free (var), NULL)))

Definition at line 39 of file hud-gtk.c.

#define _g_variant_unref0 (   var)    ((var == NULL) ? NULL : (var = (g_variant_unref (var), NULL)))

Definition at line 36 of file hud-gtk.c.

#define HUD_GTK_APPLICATION (   obj)    (G_TYPE_CHECK_INSTANCE_CAST ((obj), HUD_GTK_TYPE_APPLICATION, HudGtkApplication))

Definition at line 42 of file hud-gtk.c.

#define HUD_GTK_APPLICATION_CLASS (   klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), HUD_GTK_TYPE_APPLICATION, HudGtkApplicationClass))

Definition at line 43 of file hud-gtk.c.

#define HUD_GTK_APPLICATION_GET_CLASS (   obj)    (G_TYPE_INSTANCE_GET_CLASS ((obj), HUD_GTK_TYPE_APPLICATION, HudGtkApplicationClass))

Definition at line 46 of file hud-gtk.c.

#define HUD_GTK_CELL_RENDERER_VARIANT (   obj)    (G_TYPE_CHECK_INSTANCE_CAST ((obj), HUD_GTK_TYPE_CELL_RENDERER_VARIANT, HudGtkCellRendererVariant))

Definition at line 14 of file hud-gtk.c.

#define HUD_GTK_CELL_RENDERER_VARIANT_CLASS (   klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), HUD_GTK_TYPE_CELL_RENDERER_VARIANT, HudGtkCellRendererVariantClass))

Definition at line 15 of file hud-gtk.c.

#define HUD_GTK_CELL_RENDERER_VARIANT_GET_CLASS (   obj)    (G_TYPE_INSTANCE_GET_CLASS ((obj), HUD_GTK_TYPE_CELL_RENDERER_VARIANT, HudGtkCellRendererVariantClass))

Definition at line 18 of file hud-gtk.c.

#define HUD_GTK_IS_APPLICATION (   obj)    (G_TYPE_CHECK_INSTANCE_TYPE ((obj), HUD_GTK_TYPE_APPLICATION))

Definition at line 44 of file hud-gtk.c.

#define HUD_GTK_IS_APPLICATION_CLASS (   klass)    (G_TYPE_CHECK_CLASS_TYPE ((klass), HUD_GTK_TYPE_APPLICATION))

Definition at line 45 of file hud-gtk.c.

#define HUD_GTK_IS_CELL_RENDERER_VARIANT (   obj)    (G_TYPE_CHECK_INSTANCE_TYPE ((obj), HUD_GTK_TYPE_CELL_RENDERER_VARIANT))

Definition at line 16 of file hud-gtk.c.

#define HUD_GTK_IS_CELL_RENDERER_VARIANT_CLASS (   klass)    (G_TYPE_CHECK_CLASS_TYPE ((klass), HUD_GTK_TYPE_CELL_RENDERER_VARIANT))

Definition at line 17 of file hud-gtk.c.

#define HUD_GTK_IS_WINDOW (   obj)    (G_TYPE_CHECK_INSTANCE_TYPE ((obj), HUD_GTK_TYPE_WINDOW))

Definition at line 28 of file hud-gtk.c.

#define HUD_GTK_IS_WINDOW_CLASS (   klass)    (G_TYPE_CHECK_CLASS_TYPE ((klass), HUD_GTK_TYPE_WINDOW))

Definition at line 29 of file hud-gtk.c.

Definition at line 41 of file hud-gtk.c.

Definition at line 13 of file hud-gtk.c.

Definition at line 25 of file hud-gtk.c.

#define HUD_GTK_WINDOW (   obj)    (G_TYPE_CHECK_INSTANCE_CAST ((obj), HUD_GTK_TYPE_WINDOW, HudGtkWindow))

Definition at line 26 of file hud-gtk.c.

#define HUD_GTK_WINDOW_CLASS (   klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), HUD_GTK_TYPE_WINDOW, HudGtkWindowClass))

Definition at line 27 of file hud-gtk.c.

#define HUD_GTK_WINDOW_GET_CLASS (   obj)    (G_TYPE_INSTANCE_GET_CLASS ((obj), HUD_GTK_TYPE_WINDOW, HudGtkWindowClass))

Definition at line 30 of file hud-gtk.c.

#define HUD_GTK_WINDOW_GET_PRIVATE (   o)    (G_TYPE_INSTANCE_GET_PRIVATE ((o), HUD_GTK_TYPE_WINDOW, HudGtkWindowPrivate))

Typedef Documentation

typedef struct _HudGtkApplication

Definition at line 48 of file hud-gtk.c.

typedef struct _HudGtkApplicationClass

Definition at line 49 of file hud-gtk.c.

typedef struct _HudGtkApplicationPrivate

Definition at line 50 of file hud-gtk.c.

Definition at line 20 of file hud-gtk.c.

Definition at line 21 of file hud-gtk.c.

Definition at line 22 of file hud-gtk.c.

typedef struct _HudGtkWindow

Definition at line 32 of file hud-gtk.c.

typedef struct _HudGtkWindowClass

Definition at line 33 of file hud-gtk.c.

typedef struct _HudGtkWindowPrivate

Definition at line 34 of file hud-gtk.c.


Function Documentation

static gpointer _g_object_ref0 ( gpointer  self) [static]

Definition at line 340 of file hud-gtk.c.

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

Here is the caller graph for this function:

static void _hud_gtk_window_entry_text_changed_g_object_notify ( GObject *  _sender,
GParamSpec *  pspec,
gpointer  self 
) [static]

Definition at line 546 of file hud-gtk.c.

                                                                                                                    {
       hud_gtk_window_entry_text_changed (self, _sender, pspec);
}

Here is the call graph for this function:

Here is the caller graph for this function:

static void _hud_gtk_window_updated_query_gd_bus_signal_callback ( GDBusConnection *  connection,
const gchar *  sender_name,
const gchar *  object_path,
const gchar *  interface_name,
const gchar *  signal_name,
GVariant *  parameters,
gpointer  self 
) [static]

Definition at line 541 of file hud-gtk.c.

                                                                                                                                                                                                                                               {
       hud_gtk_window_updated_query (self, connection, sender_name, object_path, interface_name, signal_name, parameters);
}

Here is the call graph for this function:

Here is the caller graph for this function:

static void _hud_gtk_window_view_activated_gtk_tree_view_row_activated ( GtkTreeView *  _sender,
GtkTreePath *  path,
GtkTreeViewColumn *  column,
gpointer  self 
) [static]

Definition at line 551 of file hud-gtk.c.

                                                                                                                                                           {
       hud_gtk_window_view_activated (self, _sender, path, column);
}

Here is the call graph for this function:

Here is the caller graph for this function:

static void _vala_hud_gtk_cell_renderer_variant_set_property ( GObject *  object,
guint  property_id,
const GValue *  value,
GParamSpec *  pspec 
) [static]

Definition at line 179 of file hud-gtk.c.

                                                                                                                                             {
       HudGtkCellRendererVariant * self;
       self = HUD_GTK_CELL_RENDERER_VARIANT (object);
       switch (property_id) {
              case HUD_GTK_CELL_RENDERER_VARIANT_VALUE:
              hud_gtk_cell_renderer_variant_set_value (self, g_value_get_variant (value));
              break;
              default:
              G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
              break;
       }
}

Here is the call graph for this function:

Here is the caller graph for this function:

gint _vala_main ( gchar **  args,
int  args_length1 
)

Definition at line 724 of file hud-gtk.c.

                                                 {
       gint result = 0;
       HudGtkApplication* _tmp0_;
       HudGtkApplication* _tmp1_;
       gchar** _tmp2_;
       gint _tmp2__length1;
       gint _tmp3_ = 0;
       gint _tmp4_;
       _tmp0_ = hud_gtk_application_new ();
       _tmp1_ = _tmp0_;
       _tmp2_ = args;
       _tmp2__length1 = args_length1;
       _tmp3_ = g_application_run ((GApplication*) _tmp1_, _tmp2__length1, _tmp2_);
       _tmp4_ = _tmp3_;
       _g_object_unref0 (_tmp1_);
       result = _tmp4_;
       return result;
}

Here is the call graph for this function:

Here is the caller graph for this function:

static void hud_gtk_application_class_init ( HudGtkApplicationClass *  klass) [static]

Definition at line 702 of file hud-gtk.c.

                                                                            {
       hud_gtk_application_parent_class = g_type_class_peek_parent (klass);
       G_APPLICATION_CLASS (klass)->activate = hud_gtk_application_real_activate;
}

Here is the call graph for this function:

HudGtkApplication * hud_gtk_application_construct ( GType  object_type)

Definition at line 690 of file hud-gtk.c.

                                                                     {
       HudGtkApplication * self = NULL;
       self = (HudGtkApplication*) g_object_new (object_type, "application-id", "com.canonical.HudGtk", NULL);
       return self;
}

Here is the caller graph for this function:

GType hud_gtk_application_get_type ( void  )

Definition at line 114 of file hud-gtk.c.

      {
       HUD_GTK_APPLICATION_DUMMY_PROPERTY
};
static void hud_gtk_application_instance_init ( HudGtkApplication *  self) [static]

Definition at line 708 of file hud-gtk.c.

                                                                         {
}
HudGtkApplication * hud_gtk_application_new ( void  )

Definition at line 697 of file hud-gtk.c.

Here is the call graph for this function:

Here is the caller graph for this function:

static void hud_gtk_application_real_activate ( GApplication *  base) [static]

Definition at line 678 of file hud-gtk.c.

                                                                   {
       HudGtkApplication * self;
       HudGtkWindow* _tmp0_;
       HudGtkWindow* _tmp1_;
       self = (HudGtkApplication*) base;
       _tmp0_ = hud_gtk_window_new ((GtkApplication*) self);
       _tmp1_ = g_object_ref_sink (_tmp0_);
       gtk_widget_show_all ((GtkWidget*) _tmp1_);
       _g_object_unref0 (_tmp1_);
}

Here is the call graph for this function:

Here is the caller graph for this function:

static void hud_gtk_cell_renderer_variant_class_init ( HudGtkCellRendererVariantClass *  klass) [static]

Definition at line 156 of file hud-gtk.c.

                                                                                              {
       hud_gtk_cell_renderer_variant_parent_class = g_type_class_peek_parent (klass);
       G_OBJECT_CLASS (klass)->set_property = _vala_hud_gtk_cell_renderer_variant_set_property;
       g_object_class_install_property (G_OBJECT_CLASS (klass), HUD_GTK_CELL_RENDERER_VARIANT_VALUE, g_param_spec_variant ("value", "value", "value", G_VARIANT_TYPE_ANY, NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_WRITABLE));
}

Here is the call graph for this function:

HudGtkCellRendererVariant * hud_gtk_cell_renderer_variant_construct ( GType  object_type)

Definition at line 124 of file hud-gtk.c.

                                                                                       {
       HudGtkCellRendererVariant * self = NULL;
       self = (HudGtkCellRendererVariant*) g_object_new (object_type, NULL);
       return self;
}

Here is the caller graph for this function:

Definition at line 90 of file hud-gtk.c.

      {
       HUD_GTK_CELL_RENDERER_VARIANT_DUMMY_PROPERTY,
       HUD_GTK_CELL_RENDERER_VARIANT_VALUE
};
static void hud_gtk_cell_renderer_variant_instance_init ( HudGtkCellRendererVariant *  self) [static]

Definition at line 163 of file hud-gtk.c.

                                                                                           {
}
HudGtkCellRendererVariant * hud_gtk_cell_renderer_variant_new ( void  )

Definition at line 131 of file hud-gtk.c.

Here is the call graph for this function:

Here is the caller graph for this function:

void hud_gtk_cell_renderer_variant_set_value ( HudGtkCellRendererVariant *  self,
GVariant *  value 
)

Definition at line 136 of file hud-gtk.c.

                                                                                                {
       GVariant* _tmp0_;
       g_return_if_fail (self != NULL);
       _tmp0_ = value;
       if (_tmp0_ != NULL) {
              GVariant* _tmp1_;
              gchar* _tmp2_ = NULL;
              gchar* _tmp3_;
              _tmp1_ = value;
              _tmp2_ = g_variant_print (_tmp1_, FALSE);
              _tmp3_ = _tmp2_;
              g_object_set ((GtkCellRendererText*) self, "text", _tmp3_, NULL);
              _g_free0 (_tmp3_);
       } else {
              g_object_set ((GtkCellRendererText*) self, "text", "(null)", NULL);
       }
       g_object_notify ((GObject *) self, "value");
}

Here is the caller graph for this function:

static void hud_gtk_window_class_init ( HudGtkWindowClass *  klass) [static]

Definition at line 644 of file hud-gtk.c.

                                                                  {
       hud_gtk_window_parent_class = g_type_class_peek_parent (klass);
       g_type_class_add_private (klass, sizeof (HudGtkWindowPrivate));
       G_OBJECT_CLASS (klass)->finalize = hud_gtk_window_finalize;
}

Here is the call graph for this function:

HudGtkWindow * hud_gtk_window_construct ( GType  object_type,
GtkApplication *  application 
)

Definition at line 556 of file hud-gtk.c.

                                                                                        {
       HudGtkWindow * self = NULL;
       GtkApplication* _tmp0_;
       GtkBuilder* _tmp1_;
       GtkBuilder* builder;
       GDBusConnection* _tmp8_;
       GtkBuilder* _tmp9_;
       GObject* _tmp10_ = NULL;
       GtkListStore* _tmp11_;
       GtkBuilder* _tmp12_;
       GObject* _tmp13_ = NULL;
       GtkBuilder* _tmp14_;
       GObject* _tmp15_ = NULL;
       GtkBuilder* _tmp16_;
       GObject* _tmp17_ = NULL;
       GError * _inner_error_ = NULL;
       g_return_val_if_fail (application != NULL, NULL);
       _tmp0_ = application;
       self = (HudGtkWindow*) g_object_new (object_type, "application", _tmp0_, "title", "Hud", NULL);
       gtk_window_set_default_size ((GtkWindow*) self, 500, 300);
       _tmp1_ = gtk_builder_new ();
       builder = _tmp1_;
       {
              HudGtkCellRendererVariant* _tmp2_;
              HudGtkCellRendererVariant* _tmp3_;
              GDBusConnection* _tmp4_ = NULL;
              GDBusConnection* _tmp5_;
              GtkBuilder* _tmp6_;
              _tmp2_ = hud_gtk_cell_renderer_variant_new ();
              _tmp3_ = g_object_ref_sink (_tmp2_);
              _g_object_unref0 (_tmp3_);
              _tmp4_ = g_bus_get_sync (G_BUS_TYPE_SESSION, NULL, &_inner_error_);
              _tmp5_ = _tmp4_;
              if (_inner_error_ != NULL) {
                     goto __catch3_g_error;
              }
              _g_object_unref0 (self->priv->session);
              self->priv->session = _tmp5_;
              _tmp6_ = builder;
              gtk_builder_add_from_file (_tmp6_, HUD_GTK_DATADIR "/hud-gtk.ui", &_inner_error_);
              if (_inner_error_ != NULL) {
                     goto __catch3_g_error;
              }
       }
       goto __finally3;
       __catch3_g_error:
       {
              GError* e = NULL;
              const gchar* _tmp7_;
              e = _inner_error_;
              _inner_error_ = NULL;
              _tmp7_ = e->message;
              g_error ("hud-gtk.vala:96: %s", _tmp7_);
              _g_error_free0 (e);
       }
       __finally3:
       if (_inner_error_ != NULL) {
              _g_object_unref0 (builder);
              g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
              g_clear_error (&_inner_error_);
              return NULL;
       }
       _tmp8_ = self->priv->session;
       g_dbus_connection_signal_subscribe (_tmp8_, "com.canonical.hud", "com.canonical.hud", "UpdatedQuery", "/com/canonical/hud", NULL, G_DBUS_SIGNAL_FLAGS_NONE, _hud_gtk_window_updated_query_gd_bus_signal_callback, g_object_ref (self), g_object_unref);
       _tmp9_ = builder;
       _tmp10_ = gtk_builder_get_object (_tmp9_, "liststore");
       _tmp11_ = _g_object_ref0 (GTK_IS_LIST_STORE (_tmp10_) ? ((GtkListStore*) _tmp10_) : NULL);
       _g_object_unref0 (self->priv->model);
       self->priv->model = _tmp11_;
       _tmp12_ = builder;
       _tmp13_ = gtk_builder_get_object (_tmp12_, "entry");
       g_signal_connect_object (_tmp13_, "notify::text", (GCallback) _hud_gtk_window_entry_text_changed_g_object_notify, self, 0);
       _tmp14_ = builder;
       _tmp15_ = gtk_builder_get_object (_tmp14_, "treeview");
       g_signal_connect_object (GTK_IS_TREE_VIEW (_tmp15_) ? ((GtkTreeView*) _tmp15_) : NULL, "row-activated", (GCallback) _hud_gtk_window_view_activated_gtk_tree_view_row_activated, self, 0);
       _tmp16_ = builder;
       _tmp17_ = gtk_builder_get_object (_tmp16_, "grid");
       gtk_container_add ((GtkContainer*) self, GTK_IS_WIDGET (_tmp17_) ? ((GtkWidget*) _tmp17_) : NULL);
       _g_object_unref0 (builder);
       return self;
}

Here is the call graph for this function:

Here is the caller graph for this function:

static void hud_gtk_window_entry_text_changed ( HudGtkWindow *  self,
GObject *  object,
GParamSpec *  pspec 
) [static]

Definition at line 345 of file hud-gtk.c.

                                                                                                       {
       GObject* _tmp0_;
       GtkEntry* _tmp1_;
       GtkEntry* entry;
       GVariant* _tmp2_;
       GtkListStore* _tmp11_;
       GtkEntry* _tmp12_;
       const gchar* _tmp13_;
       const gchar* _tmp14_;
       GError * _inner_error_ = NULL;
       g_return_if_fail (self != NULL);
       g_return_if_fail (object != NULL);
       g_return_if_fail (pspec != NULL);
       _tmp0_ = object;
       _tmp1_ = _g_object_ref0 (GTK_IS_ENTRY (_tmp0_) ? ((GtkEntry*) _tmp0_) : NULL);
       entry = _tmp1_;
       _tmp2_ = self->priv->query_key;
       if (_tmp2_ != NULL) {
              {
                     GDBusConnection* _tmp3_;
                     GVariant* _tmp4_;
                     GVariant* _tmp5_;
                     GVariant* _tmp6_;
                     GVariant* _tmp7_ = NULL;
                     GVariant* _tmp8_;
                     _tmp3_ = self->priv->session;
                     _tmp4_ = self->priv->query_key;
                     _tmp5_ = g_variant_new ("(v)", _tmp4_, NULL);
                     _tmp6_ = g_variant_ref_sink (_tmp5_);
                     _tmp7_ = g_dbus_connection_call_sync (_tmp3_, "com.canonical.hud", "/com/canonical/hud", "com.canonical.hud", "CloseQuery", _tmp6_, NULL, 0, -1, NULL, &_inner_error_);
                     _tmp8_ = _tmp7_;
                     _g_variant_unref0 (_tmp8_);
                     _g_variant_unref0 (_tmp6_);
                     if (_inner_error_ != NULL) {
                            goto __catch0_g_error;
                     }
              }
              goto __finally0;
              __catch0_g_error:
              {
                     GError* e = NULL;
                     GError* _tmp9_;
                     const gchar* _tmp10_;
                     e = _inner_error_;
                     _inner_error_ = NULL;
                     _tmp9_ = e;
                     _tmp10_ = _tmp9_->message;
                     g_warning ("hud-gtk.vala:49: %s", _tmp10_);
                     _g_error_free0 (e);
              }
              __finally0:
              if (_inner_error_ != NULL) {
                     _g_object_unref0 (entry);
                     g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
                     g_clear_error (&_inner_error_);
                     return;
              }
       }
       _g_variant_unref0 (self->priv->query_key);
       self->priv->query_key = NULL;
       _tmp11_ = self->priv->model;
       gtk_list_store_clear (_tmp11_);
       _tmp12_ = entry;
       _tmp13_ = gtk_entry_get_text (_tmp12_);
       _tmp14_ = _tmp13_;
       if (g_strcmp0 (_tmp14_, "") == 0) {
              _g_object_unref0 (entry);
              return;
       }
       {
              GDBusConnection* _tmp15_ = NULL;
              GDBusConnection* session;
              GDBusConnection* _tmp16_;
              GtkEntry* _tmp17_;
              const gchar* _tmp18_;
              const gchar* _tmp19_;
              GVariant* _tmp20_;
              GVariant* _tmp21_;
              GVariantType* _tmp22_;
              GVariantType* _tmp23_;
              GVariant* _tmp24_ = NULL;
              GVariant* _tmp25_;
              GVariant* reply;
              GVariant* _tmp26_;
              _tmp15_ = g_bus_get_sync (G_BUS_TYPE_SESSION, NULL, &_inner_error_);
              session = _tmp15_;
              if (_inner_error_ != NULL) {
                     goto __catch1_g_error;
              }
              _tmp16_ = session;
              _tmp17_ = entry;
              _tmp18_ = gtk_entry_get_text (_tmp17_);
              _tmp19_ = _tmp18_;
              _tmp20_ = g_variant_new ("(si)", _tmp19_, 15, NULL);
              _tmp21_ = g_variant_ref_sink (_tmp20_);
              _tmp22_ = g_variant_type_new ("(sa(sssssv)v)");
              _tmp23_ = _tmp22_;
              _tmp24_ = g_dbus_connection_call_sync (_tmp16_, "com.canonical.hud", "/com/canonical/hud", "com.canonical.hud", "StartQuery", _tmp21_, _tmp23_, 0, -1, NULL, &_inner_error_);
              _tmp25_ = _tmp24_;
              _g_variant_type_free0 (_tmp23_);
              _g_variant_unref0 (_tmp21_);
              reply = _tmp25_;
              if (_inner_error_ != NULL) {
                     _g_object_unref0 (session);
                     goto __catch1_g_error;
              }
              _tmp26_ = reply;
              hud_gtk_window_populate_model (self, _tmp26_);
              _g_variant_unref0 (reply);
              _g_object_unref0 (session);
       }
       goto __finally1;
       __catch1_g_error:
       {
              GError* e = NULL;
              GError* _tmp27_;
              const gchar* _tmp28_;
              e = _inner_error_;
              _inner_error_ = NULL;
              _tmp27_ = e;
              _tmp28_ = _tmp27_->message;
              g_warning ("hud-gtk.vala:67: %s", _tmp28_);
              _g_error_free0 (e);
       }
       __finally1:
       if (_inner_error_ != NULL) {
              _g_object_unref0 (entry);
              g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
              g_clear_error (&_inner_error_);
              return;
       }
       _g_object_unref0 (entry);
}

Here is the call graph for this function:

Here is the caller graph for this function:

static void hud_gtk_window_finalize ( GObject *  obj) [static]

Definition at line 656 of file hud-gtk.c.

                                                   {
       HudGtkWindow * self;
       self = HUD_GTK_WINDOW (obj);
       _g_object_unref0 (self->priv->session);
       _g_object_unref0 (self->priv->model);
       _g_variant_unref0 (self->priv->query_key);
       G_OBJECT_CLASS (hud_gtk_window_parent_class)->finalize (obj);
}

Here is the caller graph for this function:

GType hud_gtk_window_get_type ( void  )

Definition at line 99 of file hud-gtk.c.

      {
       HUD_GTK_WINDOW_DUMMY_PROPERTY
};
static void hud_gtk_window_instance_init ( HudGtkWindow *  self) [static]

Definition at line 651 of file hud-gtk.c.

                                                               {
       self->priv = HUD_GTK_WINDOW_GET_PRIVATE (self);
}
HudGtkWindow * hud_gtk_window_new ( GtkApplication *  application)

Definition at line 639 of file hud-gtk.c.

                                                               {
       return hud_gtk_window_construct (HUD_GTK_TYPE_WINDOW, application);
}

Here is the call graph for this function:

Here is the caller graph for this function:

static void hud_gtk_window_populate_model ( HudGtkWindow *  self,
GVariant *  update 
) [static]

Definition at line 193 of file hud-gtk.c.

                                                                                 {
       GVariant* _tmp29_;
       GVariant* _tmp30_ = NULL;
       g_return_if_fail (self != NULL);
       g_return_if_fail (update != NULL);
       {
              GVariant* _tmp0_;
              GVariant* _tmp1_ = NULL;
              GVariant* _tmp2_;
              GVariantIter* _tmp3_ = NULL;
              GVariantIter* _tmp4_;
              GVariantIter* _result_it;
              GVariant* _result_ = NULL;
              _tmp0_ = update;
              _tmp1_ = g_variant_get_child_value (_tmp0_, (gsize) 1);
              _tmp2_ = _tmp1_;
              _tmp3_ = g_variant_iter_new (_tmp2_);
              _tmp4_ = _tmp3_;
              _g_variant_unref0 (_tmp2_);
              _result_it = _tmp4_;
              while (TRUE) {
                     GVariantIter* _tmp5_;
                     GVariant* _tmp6_ = NULL;
                     GVariant* _tmp7_;
                     GtkTreeIter iter = {0};
                     GtkListStore* _tmp8_;
                     GtkTreeIter _tmp9_ = {0};
                     GtkListStore* _tmp22_;
                     GtkTreeIter _tmp23_;
                     GVariant* _tmp24_;
                     GVariant* _tmp25_ = NULL;
                     GVariant* _tmp26_;
                     GVariant* _tmp27_ = NULL;
                     GVariant* _tmp28_;
                     _tmp5_ = _result_it;
                     _tmp6_ = g_variant_iter_next_value (_tmp5_);
                     _g_variant_unref0 (_result_);
                     _result_ = _tmp6_;
                     _tmp7_ = _result_;
                     if (!(_tmp7_ != NULL)) {
                            break;
                     }
                     _tmp8_ = self->priv->model;
                     gtk_list_store_append (_tmp8_, &_tmp9_);
                     iter = _tmp9_;
                     {
                            gint i;
                            i = 0;
                            {
                                   gboolean _tmp10_;
                                   _tmp10_ = TRUE;
                                   while (TRUE) {
                                          gboolean _tmp11_;
                                          gint _tmp13_;
                                          GtkListStore* _tmp14_;
                                          GtkTreeIter _tmp15_;
                                          gint _tmp16_;
                                          GVariant* _tmp17_;
                                          gint _tmp18_;
                                          GVariant* _tmp19_ = NULL;
                                          GVariant* _tmp20_;
                                          const gchar* _tmp21_ = NULL;
                                          _tmp11_ = _tmp10_;
                                          if (!_tmp11_) {
                                                 gint _tmp12_;
                                                 _tmp12_ = i;
                                                 i = _tmp12_ + 1;
                                          }
                                          _tmp10_ = FALSE;
                                          _tmp13_ = i;
                                          if (!(_tmp13_ < 5)) {
                                                 break;
                                          }
                                          _tmp14_ = self->priv->model;
                                          _tmp15_ = iter;
                                          _tmp16_ = i;
                                          _tmp17_ = _result_;
                                          _tmp18_ = i;
                                          _tmp19_ = g_variant_get_child_value (_tmp17_, (gsize) _tmp18_);
                                          _tmp20_ = _tmp19_;
                                          _tmp21_ = g_variant_get_string (_tmp20_, NULL);
                                          gtk_list_store_set (_tmp14_, &_tmp15_, _tmp16_, _tmp21_, -1);
                                          _g_variant_unref0 (_tmp20_);
                                   }
                            }
                     }
                     _tmp22_ = self->priv->model;
                     _tmp23_ = iter;
                     _tmp24_ = _result_;
                     _tmp25_ = g_variant_get_child_value (_tmp24_, (gsize) 5);
                     _tmp26_ = _tmp25_;
                     _tmp27_ = g_variant_get_variant (_tmp26_);
                     _tmp28_ = _tmp27_;
                     gtk_list_store_set (_tmp22_, &_tmp23_, 5, _tmp28_, -1);
                     _g_variant_unref0 (_tmp28_);
                     _g_variant_unref0 (_tmp26_);
              }
              _g_variant_unref0 (_result_);
              _g_variant_iter_free0 (_result_it);
       }
       _tmp29_ = update;
       _tmp30_ = g_variant_get_child_value (_tmp29_, (gsize) 2);
       _g_variant_unref0 (self->priv->query_key);
       self->priv->query_key = _tmp30_;
}

Here is the call graph for this function:

Here is the caller graph for this function:

static void hud_gtk_window_updated_query ( HudGtkWindow *  self,
GDBusConnection *  connection,
const gchar *  sender_name,
const gchar *  object_path,
const gchar *  interface_name,
const gchar *  signal_name,
GVariant *  parameters 
) [static]

Definition at line 300 of file hud-gtk.c.

                                                                                                                                                                                                                            {
       gboolean _tmp0_ = FALSE;
       GVariant* _tmp1_;
       gboolean _tmp7_;
       g_return_if_fail (self != NULL);
       g_return_if_fail (connection != NULL);
       g_return_if_fail (sender_name != NULL);
       g_return_if_fail (object_path != NULL);
       g_return_if_fail (interface_name != NULL);
       g_return_if_fail (signal_name != NULL);
       g_return_if_fail (parameters != NULL);
       _tmp1_ = self->priv->query_key;
       if (_tmp1_ != NULL) {
              GVariant* _tmp2_;
              GVariant* _tmp3_ = NULL;
              GVariant* _tmp4_;
              GVariant* _tmp5_;
              gboolean _tmp6_ = FALSE;
              _tmp2_ = parameters;
              _tmp3_ = g_variant_get_child_value (_tmp2_, (gsize) 2);
              _tmp4_ = _tmp3_;
              _tmp5_ = self->priv->query_key;
              _tmp6_ = g_variant_equal (_tmp4_, _tmp5_);
              _tmp0_ = _tmp6_;
              _g_variant_unref0 (_tmp4_);
       } else {
              _tmp0_ = FALSE;
       }
       _tmp7_ = _tmp0_;
       if (_tmp7_) {
              GtkListStore* _tmp8_;
              GVariant* _tmp9_;
              _tmp8_ = self->priv->model;
              gtk_list_store_clear (_tmp8_);
              _tmp9_ = parameters;
              hud_gtk_window_populate_model (self, _tmp9_);
       }
}

Here is the call graph for this function:

Here is the caller graph for this function:

static void hud_gtk_window_view_activated ( HudGtkWindow *  self,
GtkTreeView *  view,
GtkTreePath *  path,
GtkTreeViewColumn *  column 
) [static]

Definition at line 480 of file hud-gtk.c.

                                                                                                                                {
       GtkTreeIter iter = {0};
       GVariant* key = NULL;
       GtkListStore* _tmp0_;
       GtkTreePath* _tmp1_;
       GtkTreeIter _tmp2_ = {0};
       GtkListStore* _tmp3_;
       GtkTreeIter _tmp4_;
       GError * _inner_error_ = NULL;
       g_return_if_fail (self != NULL);
       g_return_if_fail (view != NULL);
       g_return_if_fail (path != NULL);
       g_return_if_fail (column != NULL);
       _tmp0_ = self->priv->model;
       _tmp1_ = path;
       gtk_tree_model_get_iter ((GtkTreeModel*) _tmp0_, &_tmp2_, _tmp1_);
       iter = _tmp2_;
       _tmp3_ = self->priv->model;
       _tmp4_ = iter;
       gtk_tree_model_get ((GtkTreeModel*) _tmp3_, &_tmp4_, 5, &key, -1);
       {
              GDBusConnection* _tmp5_;
              GVariant* _tmp6_;
              GVariant* _tmp7_;
              GVariant* _tmp8_ = NULL;
              GVariant* _tmp9_;
              _tmp5_ = self->priv->session;
              _tmp6_ = g_variant_new ("(vu)", key, 0, NULL);
              _tmp7_ = g_variant_ref_sink (_tmp6_);
              _tmp8_ = g_dbus_connection_call_sync (_tmp5_, "com.canonical.hud", "/com/canonical/hud", "com.canonical.hud", "ExecuteQuery", _tmp7_, NULL, 0, -1, NULL, &_inner_error_);
              _tmp9_ = _tmp8_;
              _g_variant_unref0 (_tmp9_);
              _g_variant_unref0 (_tmp7_);
              if (_inner_error_ != NULL) {
                     goto __catch2_g_error;
              }
       }
       goto __finally2;
       __catch2_g_error:
       {
              GError* e = NULL;
              GError* _tmp10_;
              const gchar* _tmp11_;
              e = _inner_error_;
              _inner_error_ = NULL;
              _tmp10_ = e;
              _tmp11_ = _tmp10_->message;
              g_warning ("hud-gtk.vala:82: %s", _tmp11_);
              _g_error_free0 (e);
       }
       __finally2:
       if (_inner_error_ != NULL) {
              _g_variant_unref0 (key);
              g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
              g_clear_error (&_inner_error_);
              return;
       }
       _g_variant_unref0 (key);
}

Here is the caller graph for this function:

int main ( int  argc,
char **  argv 
)

Definition at line 744 of file hud-gtk.c.

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

Here is the call graph for this function:


Variable Documentation

gpointer hud_gtk_application_parent_class = NULL [static]

Definition at line 88 of file hud-gtk.c.

Definition at line 86 of file hud-gtk.c.

gpointer hud_gtk_window_parent_class = NULL [static]

Definition at line 87 of file hud-gtk.c.