Back to index

libunity  5.92.0
Classes | Defines | Enumerations | Functions | Variables
unity-lens-activation.c File Reference
#include <glib.h>
#include <glib-object.h>
#include "unity.h"
#include <stdlib.h>
#include <string.h>
#include <dee.h>

Go to the source code of this file.

Classes

struct  _UnityActivationResponsePrivate

Defines

#define _g_free0(var)   (var = (g_free (var), NULL))
#define _g_object_unref0(var)   ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_hash_table_unref0(var)   ((var == NULL) ? NULL : (var = (g_hash_table_unref (var), NULL)))
#define UNITY_ACTIVATION_RESPONSE_GET_PRIVATE(o)   (G_TYPE_INSTANCE_GET_PRIVATE ((o), UNITY_TYPE_ACTIVATION_RESPONSE, UnityActivationResponsePrivate))

Enumerations

enum  { UNITY_ACTIVATION_RESPONSE_DUMMY_PROPERTY, UNITY_ACTIVATION_RESPONSE_HANDLED, UNITY_ACTIVATION_RESPONSE_GOTO_URI }

Functions

void unity_activation_response_set_preview (UnityActivationResponse *self, UnityPreview *preview)
GHashTable * unity_activation_response_get_hints (UnityActivationResponse *self)
static void _g_free0_ (gpointer var)
static void _g_variant_unref0_ (gpointer var)
static GVariant * _variant_new15 (const gchar *value)
UnityPreview * unity_activation_response_get_preview (UnityActivationResponse *self)
static void unity_activation_response_finalize (GObject *obj)
static void _vala_unity_activation_response_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec)
static void _vala_unity_activation_response_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec)
GType unity_handled_type_get_type (void)
UnityActivationResponse * unity_activation_response_construct (GType object_type, UnityHandledType handled, const gchar *goto_uri)
UnityActivationResponse * unity_activation_response_new (UnityHandledType handled, const gchar *goto_uri)
UnityActivationResponse * unity_activation_response_construct_with_preview (GType object_type, UnityPreview *preview)
UnityActivationResponse * unity_activation_response_new_with_preview (UnityPreview *preview)
static gpointer _g_object_ref0 (gpointer self)
UnityHandledType unity_activation_response_get_handled (UnityActivationResponse *self)
static void unity_activation_response_set_handled (UnityActivationResponse *self, UnityHandledType value)
const gchar * unity_activation_response_get_goto_uri (UnityActivationResponse *self)
void unity_activation_response_set_goto_uri (UnityActivationResponse *self, const gchar *value)
static void unity_activation_response_class_init (UnityActivationResponseClass *klass)
static void unity_activation_response_instance_init (UnityActivationResponse *self)
GType unity_activation_response_get_type (void)

Variables

static gpointer unity_activation_response_parent_class = NULL

Class Documentation

struct _UnityActivationResponsePrivate

Definition at line 35 of file unity-lens-activation.c.

Class Members
gchar * _goto_uri
UnityHandledType _handled
UnityPreview * _preview

Define Documentation

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

Definition at line 31 of file unity-lens-activation.c.

#define _g_hash_table_unref0 (   var)    ((var == NULL) ? NULL : (var = (g_hash_table_unref (var), NULL)))

Definition at line 33 of file unity-lens-activation.c.

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

Definition at line 32 of file unity-lens-activation.c.

#define UNITY_ACTIVATION_RESPONSE_GET_PRIVATE (   o)    (G_TYPE_INSTANCE_GET_PRIVATE ((o), UNITY_TYPE_ACTIVATION_RESPONSE, UnityActivationResponsePrivate))

Definition at line 44 of file unity-lens-activation.c.


Enumeration Type Documentation

anonymous enum
Enumerator:
UNITY_ACTIVATION_RESPONSE_DUMMY_PROPERTY 
UNITY_ACTIVATION_RESPONSE_HANDLED 
UNITY_ACTIVATION_RESPONSE_GOTO_URI 

Definition at line 45 of file unity-lens-activation.c.


Function Documentation

static void _g_free0_ ( gpointer  var) [static]

Definition at line 106 of file unity-lens-activation.c.

                                     {
       var = (g_free (var), NULL);
}

Here is the caller graph for this function:

static gpointer _g_object_ref0 ( gpointer  self) [static]

Definition at line 169 of file unity-lens-activation.c.

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

Here is the caller graph for this function:

static void _g_variant_unref0_ ( gpointer  var) [static]

Definition at line 111 of file unity-lens-activation.c.

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

Here is the caller graph for this function:

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

Definition at line 274 of file unity-lens-activation.c.

                                                                                                                                   {
       UnityActivationResponse * self;
       self = G_TYPE_CHECK_INSTANCE_CAST (object, UNITY_TYPE_ACTIVATION_RESPONSE, UnityActivationResponse);
       switch (property_id) {
              case UNITY_ACTIVATION_RESPONSE_HANDLED:
              g_value_set_enum (value, unity_activation_response_get_handled (self));
              break;
              case UNITY_ACTIVATION_RESPONSE_GOTO_URI:
              g_value_set_string (value, unity_activation_response_get_goto_uri (self));
              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:

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

Definition at line 291 of file unity-lens-activation.c.

                                                                                                                                         {
       UnityActivationResponse * self;
       self = G_TYPE_CHECK_INSTANCE_CAST (object, UNITY_TYPE_ACTIVATION_RESPONSE, UnityActivationResponse);
       switch (property_id) {
              case UNITY_ACTIVATION_RESPONSE_HANDLED:
              unity_activation_response_set_handled (self, g_value_get_enum (value));
              break;
              case UNITY_ACTIVATION_RESPONSE_GOTO_URI:
              unity_activation_response_set_goto_uri (self, g_value_get_string (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:

static GVariant * _variant_new15 ( const gchar *  value) [static]

Definition at line 116 of file unity-lens-activation.c.

                                                     {
       return g_variant_ref_sink (g_variant_new_string (value));
}

Here is the caller graph for this function:

static void unity_activation_response_class_init ( UnityActivationResponseClass *  klass) [static]

Definition at line 237 of file unity-lens-activation.c.

                                                                                        {
       unity_activation_response_parent_class = g_type_class_peek_parent (klass);
       g_type_class_add_private (klass, sizeof (UnityActivationResponsePrivate));
       G_OBJECT_CLASS (klass)->get_property = _vala_unity_activation_response_get_property;
       G_OBJECT_CLASS (klass)->set_property = _vala_unity_activation_response_set_property;
       G_OBJECT_CLASS (klass)->finalize = unity_activation_response_finalize;
       g_object_class_install_property (G_OBJECT_CLASS (klass), UNITY_ACTIVATION_RESPONSE_HANDLED, g_param_spec_enum ("handled", "handled", "handled", UNITY_TYPE_HANDLED_TYPE, 0, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
       g_object_class_install_property (G_OBJECT_CLASS (klass), UNITY_ACTIVATION_RESPONSE_GOTO_URI, g_param_spec_string ("goto-uri", "goto-uri", "goto-uri", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT));
}

Here is the call graph for this function:

Here is the caller graph for this function:

UnityActivationResponse* unity_activation_response_construct ( GType  object_type,
UnityHandledType  handled,
const gchar *  goto_uri 
)

Definition at line 73 of file unity-lens-activation.c.

                                                                                                                                  {
       UnityActivationResponse * self = NULL;
       UnityHandledType _tmp0_;
       const gchar* _tmp1_;
       g_return_val_if_fail (goto_uri != NULL, NULL);
       _tmp0_ = handled;
       _tmp1_ = goto_uri;
       self = (UnityActivationResponse*) g_object_new (object_type, "handled", _tmp0_, "goto-uri", _tmp1_, NULL);
       return self;
}

Here is the caller graph for this function:

UnityActivationResponse* unity_activation_response_construct_with_preview ( GType  object_type,
UnityPreview *  preview 
)

Definition at line 90 of file unity-lens-activation.c.

                                                                                                                     {
       UnityActivationResponse * self = NULL;
       UnityPreview* _tmp0_;
       g_return_val_if_fail (preview != NULL, NULL);
       self = (UnityActivationResponse*) g_object_new (object_type, "handled", UNITY_HANDLED_TYPE_SHOW_PREVIEW, NULL);
       _tmp0_ = preview;
       unity_activation_response_set_preview (self, _tmp0_);
       return self;
}

Here is the call graph for this function:

Here is the caller graph for this function:

static void unity_activation_response_finalize ( GObject *  obj) [static]

Definition at line 253 of file unity-lens-activation.c.

                                                              {
       UnityActivationResponse * self;
       self = G_TYPE_CHECK_INSTANCE_CAST (obj, UNITY_TYPE_ACTIVATION_RESPONSE, UnityActivationResponse);
       _g_free0 (self->priv->_goto_uri);
       _g_object_unref0 (self->priv->_preview);
       G_OBJECT_CLASS (unity_activation_response_parent_class)->finalize (obj);
}

Here is the caller graph for this function:

const gchar* unity_activation_response_get_goto_uri ( UnityActivationResponse *  self)

Definition at line 215 of file unity-lens-activation.c.

                                                                                    {
       const gchar* result;
       const gchar* _tmp0_;
       g_return_val_if_fail (self != NULL, NULL);
       _tmp0_ = self->priv->_goto_uri;
       result = _tmp0_;
       return result;
}

Here is the caller graph for this function:

UnityHandledType unity_activation_response_get_handled ( UnityActivationResponse *  self)

Definition at line 196 of file unity-lens-activation.c.

                                                                                       {
       UnityHandledType result;
       UnityHandledType _tmp0_;
       g_return_val_if_fail (self != NULL, 0);
       _tmp0_ = self->priv->_handled;
       result = _tmp0_;
       return result;
}

Here is the caller graph for this function:

GHashTable* unity_activation_response_get_hints ( UnityActivationResponse *  self)

Definition at line 121 of file unity-lens-activation.c.

                                                                                {
       GHashTable* result = NULL;
       GHashTable* _tmp0_;
       GHashTable* hash;
       gboolean _tmp1_ = FALSE;
       const gchar* _tmp2_;
       gboolean _tmp4_;
       UnityPreview* _tmp9_;
       g_return_val_if_fail (self != NULL, NULL);
       _tmp0_ = g_hash_table_new_full (NULL, NULL, _g_free0_, _g_variant_unref0_);
       hash = _tmp0_;
       _tmp2_ = self->priv->_goto_uri;
       if (_tmp2_ != NULL) {
              const gchar* _tmp3_;
              _tmp3_ = self->priv->_goto_uri;
              _tmp1_ = g_strcmp0 (_tmp3_, "") != 0;
       } else {
              _tmp1_ = FALSE;
       }
       _tmp4_ = _tmp1_;
       if (_tmp4_) {
              GHashTable* _tmp5_;
              gchar* _tmp6_;
              const gchar* _tmp7_;
              GVariant* _tmp8_;
              _tmp5_ = hash;
              _tmp6_ = g_strdup ("goto-uri");
              _tmp7_ = self->priv->_goto_uri;
              _tmp8_ = _variant_new15 (_tmp7_);
              g_hash_table_insert (_tmp5_, _tmp6_, _tmp8_);
       }
       _tmp9_ = self->priv->_preview;
       if (_tmp9_ != NULL) {
              GHashTable* _tmp10_;
              gchar* _tmp11_;
              UnityPreview* _tmp12_;
              GVariant* _tmp13_ = NULL;
              _tmp10_ = hash;
              _tmp11_ = g_strdup ("preview");
              _tmp12_ = self->priv->_preview;
              _tmp13_ = dee_serializable_serialize ((DeeSerializable*) _tmp12_);
              g_hash_table_insert (_tmp10_, _tmp11_, _tmp13_);
       }
       result = hash;
       return result;
}

Here is the call graph for this function:

Here is the caller graph for this function:

UnityPreview* unity_activation_response_get_preview ( UnityActivationResponse *  self)

Definition at line 186 of file unity-lens-activation.c.

                                                                                    {
       UnityPreview* result = NULL;
       UnityPreview* _tmp0_;
       g_return_val_if_fail (self != NULL, NULL);
       _tmp0_ = self->priv->_preview;
       result = _tmp0_;
       return result;
}

Here is the caller graph for this function:

Definition at line 262 of file unity-lens-activation.c.

                                                {
       static volatile gsize unity_activation_response_type_id__volatile = 0;
       if (g_once_init_enter (&unity_activation_response_type_id__volatile)) {
              static const GTypeInfo g_define_type_info = { sizeof (UnityActivationResponseClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) unity_activation_response_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (UnityActivationResponse), 0, (GInstanceInitFunc) unity_activation_response_instance_init, NULL };
              GType unity_activation_response_type_id;
              unity_activation_response_type_id = g_type_register_static (G_TYPE_INITIALLY_UNOWNED, "UnityActivationResponse", &g_define_type_info, 0);
              g_once_init_leave (&unity_activation_response_type_id__volatile, unity_activation_response_type_id);
       }
       return unity_activation_response_type_id__volatile;
}

Here is the call graph for this function:

static void unity_activation_response_instance_init ( UnityActivationResponse *  self) [static]

Definition at line 248 of file unity-lens-activation.c.

                                                                                     {
       self->priv = UNITY_ACTIVATION_RESPONSE_GET_PRIVATE (self);
}

Here is the caller graph for this function:

UnityActivationResponse* unity_activation_response_new ( UnityHandledType  handled,
const gchar *  goto_uri 
)

Definition at line 85 of file unity-lens-activation.c.

Here is the call graph for this function:

Here is the caller graph for this function:

UnityActivationResponse* unity_activation_response_new_with_preview ( UnityPreview *  preview)

Definition at line 101 of file unity-lens-activation.c.

Here is the call graph for this function:

void unity_activation_response_set_goto_uri ( UnityActivationResponse *  self,
const gchar *  value 
)

Definition at line 225 of file unity-lens-activation.c.

                                                                                                {
       const gchar* _tmp0_;
       gchar* _tmp1_;
       g_return_if_fail (self != NULL);
       _tmp0_ = value;
       _tmp1_ = g_strdup (_tmp0_);
       _g_free0 (self->priv->_goto_uri);
       self->priv->_goto_uri = _tmp1_;
       g_object_notify ((GObject *) self, "goto-uri");
}

Here is the caller graph for this function:

static void unity_activation_response_set_handled ( UnityActivationResponse *  self,
UnityHandledType  value 
) [static]

Definition at line 206 of file unity-lens-activation.c.

                                                                                                          {
       UnityHandledType _tmp0_;
       g_return_if_fail (self != NULL);
       _tmp0_ = value;
       self->priv->_handled = _tmp0_;
       g_object_notify ((GObject *) self, "handled");
}

Here is the caller graph for this function:

void unity_activation_response_set_preview ( UnityActivationResponse *  self,
UnityPreview *  preview 
)

Definition at line 174 of file unity-lens-activation.c.

                                                                                                  {
       UnityPreview* _tmp0_;
       UnityPreview* _tmp1_;
       g_return_if_fail (self != NULL);
       g_return_if_fail (preview != NULL);
       _tmp0_ = preview;
       _tmp1_ = _g_object_ref0 (_tmp0_);
       _g_object_unref0 (self->priv->_preview);
       self->priv->_preview = _tmp1_;
}

Here is the call graph for this function:

Here is the caller graph for this function:

GType unity_handled_type_get_type ( void  )

Definition at line 61 of file unity-lens-activation.c.

                                         {
       static volatile gsize unity_handled_type_type_id__volatile = 0;
       if (g_once_init_enter (&unity_handled_type_type_id__volatile)) {
              static const GEnumValue values[] = {{UNITY_HANDLED_TYPE_NOT_HANDLED, "UNITY_HANDLED_TYPE_NOT_HANDLED", "not-handled"}, {UNITY_HANDLED_TYPE_SHOW_DASH, "UNITY_HANDLED_TYPE_SHOW_DASH", "show-dash"}, {UNITY_HANDLED_TYPE_HIDE_DASH, "UNITY_HANDLED_TYPE_HIDE_DASH", "hide-dash"}, {UNITY_HANDLED_TYPE_GOTO_DASH_URI, "UNITY_HANDLED_TYPE_GOTO_DASH_URI", "goto-dash-uri"}, {UNITY_HANDLED_TYPE_SHOW_PREVIEW, "UNITY_HANDLED_TYPE_SHOW_PREVIEW", "show-preview"}, {0, NULL, NULL}};
              GType unity_handled_type_type_id;
              unity_handled_type_type_id = g_enum_register_static ("UnityHandledType", values);
              g_once_init_leave (&unity_handled_type_type_id__volatile, unity_handled_type_type_id);
       }
       return unity_handled_type_type_id__volatile;
}

Variable Documentation

gpointer unity_activation_response_parent_class = NULL [static]

Definition at line 42 of file unity-lens-activation.c.