|
Packit Service |
1d8f1c |
/* iconwidget.c generated by valac 0.40.8, the Vala compiler
|
|
Packit Service |
1d8f1c |
* generated from iconwidget.vala, do not modify */
|
|
Packit Service |
1d8f1c |
|
|
Packit Service |
1d8f1c |
/* vim:set et sts=4 sw=4:
|
|
Packit Service |
1d8f1c |
*
|
|
Packit Service |
1d8f1c |
* ibus - The Input Bus
|
|
Packit Service |
1d8f1c |
*
|
|
Packit Service |
1d8f1c |
* Copyright(c) 2011-2014 Peng Huang <shawn.p.huang@gmail.com>
|
|
Packit Service |
1d8f1c |
* Copyright(c) 2018 Takao Fujiwara <takao.fujiwara1@gmail.com>
|
|
Packit Service |
1d8f1c |
*
|
|
Packit Service |
1d8f1c |
* This library is free software; you can redistribute it and/or
|
|
Packit Service |
1d8f1c |
* modify it under the terms of the GNU Lesser General Public
|
|
Packit Service |
1d8f1c |
* License as published by the Free Software Foundation; either
|
|
Packit Service |
1d8f1c |
* version 2.1 of the License, or (at your option) any later version.
|
|
Packit Service |
1d8f1c |
*
|
|
Packit Service |
1d8f1c |
* This library is distributed in the hope that it will be useful,
|
|
Packit Service |
1d8f1c |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
Packit Service |
1d8f1c |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
Packit Service |
1d8f1c |
* Lesser General Public License for more details.
|
|
Packit Service |
1d8f1c |
*
|
|
Packit Service |
1d8f1c |
* You should have received a copy of the GNU Lesser General Public
|
|
Packit Service |
1d8f1c |
* License along with this library; if not, write to the Free Software
|
|
Packit Service |
1d8f1c |
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
|
|
Packit Service |
1d8f1c |
* USA
|
|
Packit Service |
1d8f1c |
*/
|
|
Packit Service |
1d8f1c |
|
|
Packit Service |
1d8f1c |
|
|
Packit Service |
1d8f1c |
#include <glib.h>
|
|
Packit Service |
1d8f1c |
#include <glib-object.h>
|
|
Packit Service |
1d8f1c |
#include <gdk/gdk.h>
|
|
Packit Service |
1d8f1c |
#include <gtk/gtk.h>
|
|
Packit Service |
1d8f1c |
#include <stdlib.h>
|
|
Packit Service |
1d8f1c |
#include <string.h>
|
|
Packit Service |
1d8f1c |
#include <gdk-pixbuf/gdk-pixbuf.h>
|
|
Packit Service |
1d8f1c |
#include <float.h>
|
|
Packit Service |
1d8f1c |
#include <math.h>
|
|
Packit Service |
1d8f1c |
#include <gobject/gvaluecollector.h>
|
|
Packit Service |
1d8f1c |
|
|
Packit Service |
1d8f1c |
|
|
Packit Service |
1d8f1c |
#define TYPE_THEMED_RGBA (themed_rgba_get_type ())
|
|
Packit Service |
1d8f1c |
#define THEMED_RGBA(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_THEMED_RGBA, ThemedRGBA))
|
|
Packit Service |
1d8f1c |
#define THEMED_RGBA_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_THEMED_RGBA, ThemedRGBAClass))
|
|
Packit Service |
1d8f1c |
#define IS_THEMED_RGBA(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_THEMED_RGBA))
|
|
Packit Service |
1d8f1c |
#define IS_THEMED_RGBA_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_THEMED_RGBA))
|
|
Packit Service |
1d8f1c |
#define THEMED_RGBA_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_THEMED_RGBA, ThemedRGBAClass))
|
|
Packit Service |
1d8f1c |
|
|
Packit Service |
1d8f1c |
typedef struct _ThemedRGBA ThemedRGBA;
|
|
Packit Service |
1d8f1c |
typedef struct _ThemedRGBAClass ThemedRGBAClass;
|
|
Packit Service |
1d8f1c |
typedef struct _ThemedRGBAPrivate ThemedRGBAPrivate;
|
|
Packit Service |
1d8f1c |
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
|
|
Packit Service |
1d8f1c |
#define _gtk_widget_path_unref0(var) ((var == NULL) ? NULL : (var = (gtk_widget_path_unref (var), NULL)))
|
|
Packit Service |
1d8f1c |
#define _g_free0(var) (var = (g_free (var), NULL))
|
|
Packit Service |
1d8f1c |
typedef struct _ParamSpecThemedRGBA ParamSpecThemedRGBA;
|
|
Packit Service |
1d8f1c |
|
|
Packit Service |
1d8f1c |
#define TYPE_ICON_WIDGET (icon_widget_get_type ())
|
|
Packit Service |
1d8f1c |
#define ICON_WIDGET(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_ICON_WIDGET, IconWidget))
|
|
Packit Service |
1d8f1c |
#define ICON_WIDGET_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_ICON_WIDGET, IconWidgetClass))
|
|
Packit Service |
1d8f1c |
#define IS_ICON_WIDGET(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_ICON_WIDGET))
|
|
Packit Service |
1d8f1c |
#define IS_ICON_WIDGET_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_ICON_WIDGET))
|
|
Packit Service |
1d8f1c |
#define ICON_WIDGET_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_ICON_WIDGET, IconWidgetClass))
|
|
Packit Service |
1d8f1c |
|
|
Packit Service |
1d8f1c |
typedef struct _IconWidget IconWidget;
|
|
Packit Service |
1d8f1c |
typedef struct _IconWidgetClass IconWidgetClass;
|
|
Packit Service |
1d8f1c |
typedef struct _IconWidgetPrivate IconWidgetPrivate;
|
|
Packit Service |
1d8f1c |
enum {
|
|
Packit Service |
1d8f1c |
ICON_WIDGET_0_PROPERTY,
|
|
Packit Service |
1d8f1c |
ICON_WIDGET_NUM_PROPERTIES
|
|
Packit Service |
1d8f1c |
};
|
|
Packit Service |
1d8f1c |
static GParamSpec* icon_widget_properties[ICON_WIDGET_NUM_PROPERTIES];
|
|
Packit Service |
1d8f1c |
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
|
|
Packit Service |
1d8f1c |
|
|
Packit Service |
1d8f1c |
struct _ThemedRGBA {
|
|
Packit Service |
1d8f1c |
GTypeInstance parent_instance;
|
|
Packit Service |
1d8f1c |
volatile int ref_count;
|
|
Packit Service |
1d8f1c |
ThemedRGBAPrivate * priv;
|
|
Packit Service |
1d8f1c |
};
|
|
Packit Service |
1d8f1c |
|
|
Packit Service |
1d8f1c |
struct _ThemedRGBAClass {
|
|
Packit Service |
1d8f1c |
GTypeClass parent_class;
|
|
Packit Service |
1d8f1c |
void (*finalize) (ThemedRGBA *self);
|
|
Packit Service |
1d8f1c |
};
|
|
Packit Service |
1d8f1c |
|
|
Packit Service |
1d8f1c |
struct _ThemedRGBAPrivate {
|
|
Packit Service |
1d8f1c |
GdkRGBA* _normal_fg;
|
|
Packit Service |
1d8f1c |
GdkRGBA* _normal_bg;
|
|
Packit Service |
1d8f1c |
GdkRGBA* _selected_fg;
|
|
Packit Service |
1d8f1c |
GdkRGBA* _selected_bg;
|
|
Packit Service |
1d8f1c |
GtkStyleContext* m_style_context;
|
|
Packit Service |
1d8f1c |
};
|
|
Packit Service |
1d8f1c |
|
|
Packit Service |
1d8f1c |
struct _ParamSpecThemedRGBA {
|
|
Packit Service |
1d8f1c |
GParamSpec parent_instance;
|
|
Packit Service |
1d8f1c |
};
|
|
Packit Service |
1d8f1c |
|
|
Packit Service |
1d8f1c |
struct _IconWidget {
|
|
Packit Service |
1d8f1c |
GtkImage parent_instance;
|
|
Packit Service |
1d8f1c |
IconWidgetPrivate * priv;
|
|
Packit Service |
1d8f1c |
};
|
|
Packit Service |
1d8f1c |
|
|
Packit Service |
1d8f1c |
struct _IconWidgetClass {
|
|
Packit Service |
1d8f1c |
GtkImageClass parent_class;
|
|
Packit Service |
1d8f1c |
};
|
|
Packit Service |
1d8f1c |
|
|
Packit Service |
1d8f1c |
|
|
Packit Service |
1d8f1c |
static gpointer themed_rgba_parent_class = NULL;
|
|
Packit Service |
1d8f1c |
static gpointer icon_widget_parent_class = NULL;
|
|
Packit Service |
1d8f1c |
|
|
Packit Service |
1d8f1c |
gpointer themed_rgba_ref (gpointer instance);
|
|
Packit Service |
1d8f1c |
void themed_rgba_unref (gpointer instance);
|
|
Packit Service |
1d8f1c |
GParamSpec* param_spec_themed_rgba (const gchar* name,
|
|
Packit Service |
1d8f1c |
const gchar* nick,
|
|
Packit Service |
1d8f1c |
const gchar* blurb,
|
|
Packit Service |
1d8f1c |
GType object_type,
|
|
Packit Service |
1d8f1c |
GParamFlags flags);
|
|
Packit Service |
1d8f1c |
void value_set_themed_rgba (GValue* value,
|
|
Packit Service |
1d8f1c |
gpointer v_object);
|
|
Packit Service |
1d8f1c |
void value_take_themed_rgba (GValue* value,
|
|
Packit Service |
1d8f1c |
gpointer v_object);
|
|
Packit Service |
1d8f1c |
gpointer value_get_themed_rgba (const GValue* value);
|
|
Packit Service |
1d8f1c |
GType themed_rgba_get_type (void) G_GNUC_CONST;
|
|
Packit Service |
1d8f1c |
#define THEMED_RGBA_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_THEMED_RGBA, ThemedRGBAPrivate))
|
|
Packit Service |
1d8f1c |
static void themed_rgba_reset_rgba (ThemedRGBA* self);
|
|
Packit Service |
1d8f1c |
ThemedRGBA* themed_rgba_new (GtkWidget* widget);
|
|
Packit Service |
1d8f1c |
ThemedRGBA* themed_rgba_construct (GType object_type,
|
|
Packit Service |
1d8f1c |
GtkWidget* widget);
|
|
Packit Service |
1d8f1c |
void themed_rgba_set_normal_fg (ThemedRGBA* self,
|
|
Packit Service |
1d8f1c |
GdkRGBA* value);
|
|
Packit Service |
1d8f1c |
void themed_rgba_set_normal_bg (ThemedRGBA* self,
|
|
Packit Service |
1d8f1c |
GdkRGBA* value);
|
|
Packit Service |
1d8f1c |
void themed_rgba_set_selected_fg (ThemedRGBA* self,
|
|
Packit Service |
1d8f1c |
GdkRGBA* value);
|
|
Packit Service |
1d8f1c |
void themed_rgba_set_selected_bg (ThemedRGBA* self,
|
|
Packit Service |
1d8f1c |
GdkRGBA* value);
|
|
Packit Service |
1d8f1c |
static void themed_rgba_get_rgba (ThemedRGBA* self);
|
|
Packit Service |
1d8f1c |
static void __lambda4_ (ThemedRGBA* self);
|
|
Packit Service |
1d8f1c |
static void ___lambda4__gtk_style_context_changed (GtkStyleContext* _sender,
|
|
Packit Service |
1d8f1c |
gpointer self);
|
|
Packit Service |
1d8f1c |
GdkRGBA* themed_rgba_get_normal_fg (ThemedRGBA* self);
|
|
Packit Service |
1d8f1c |
GdkRGBA* themed_rgba_get_normal_bg (ThemedRGBA* self);
|
|
Packit Service |
1d8f1c |
GdkRGBA* themed_rgba_get_selected_fg (ThemedRGBA* self);
|
|
Packit Service |
1d8f1c |
GdkRGBA* themed_rgba_get_selected_bg (ThemedRGBA* self);
|
|
Packit Service |
1d8f1c |
static void themed_rgba_finalize (ThemedRGBA * obj);
|
|
Packit Service |
1d8f1c |
GType icon_widget_get_type (void) G_GNUC_CONST;
|
|
Packit Service |
1d8f1c |
IconWidget* icon_widget_new (const gchar* icon_name_or_path,
|
|
Packit Service |
1d8f1c |
GtkIconSize size);
|
|
Packit Service |
1d8f1c |
IconWidget* icon_widget_construct (GType object_type,
|
|
Packit Service |
1d8f1c |
const gchar* icon_name_or_path,
|
|
Packit Service |
1d8f1c |
GtkIconSize size);
|
|
Packit Service |
1d8f1c |
|
|
Packit Service |
1d8f1c |
|
|
Packit Service |
1d8f1c |
static void
|
|
Packit Service |
1d8f1c |
__lambda4_ (ThemedRGBA* self)
|
|
Packit Service |
1d8f1c |
{
|
|
Packit Service |
1d8f1c |
themed_rgba_get_rgba (self);
|
|
Packit Service |
1d8f1c |
}
|
|
Packit Service |
1d8f1c |
|
|
Packit Service |
1d8f1c |
|
|
Packit Service |
1d8f1c |
static void
|
|
Packit Service |
1d8f1c |
___lambda4__gtk_style_context_changed (GtkStyleContext* _sender,
|
|
Packit Service |
1d8f1c |
gpointer self)
|
|
Packit Service |
1d8f1c |
{
|
|
Packit Service |
1d8f1c |
__lambda4_ ((ThemedRGBA*) self);
|
|
Packit Service |
1d8f1c |
}
|
|
Packit Service |
1d8f1c |
|
|
Packit Service |
1d8f1c |
|
|
Packit Service |
1d8f1c |
ThemedRGBA*
|
|
Packit Service |
1d8f1c |
themed_rgba_construct (GType object_type,
|
|
Packit Service |
1d8f1c |
GtkWidget* widget)
|
|
Packit Service |
1d8f1c |
{
|
|
Packit Service |
1d8f1c |
ThemedRGBA* self = NULL;
|
|
Packit Service |
1d8f1c |
GtkWidgetPath* widget_path = NULL;
|
|
Packit Service |
1d8f1c |
GtkWidgetPath* _tmp0_;
|
|
Packit Service |
1d8f1c |
GtkStyleContext* _tmp1_;
|
|
Packit Service |
1d8f1c |
GtkStyleContext* _tmp2_;
|
|
Packit Service |
1d8f1c |
GtkStyleContext* _tmp3_;
|
|
Packit Service |
1d8f1c |
GtkStyleContext* _tmp4_;
|
|
Packit Service |
1d8f1c |
GtkStyleContext* _tmp5_;
|
|
Packit Service |
1d8f1c |
GtkStyleContext* _tmp6_;
|
|
Packit Service |
1d8f1c |
g_return_val_if_fail (widget != NULL, NULL);
|
|
Packit Service |
1d8f1c |
self = (ThemedRGBA*) g_type_create_instance (object_type);
|
|
Packit Service |
1d8f1c |
themed_rgba_set_normal_fg (self, NULL);
|
|
Packit Service |
1d8f1c |
themed_rgba_set_normal_bg (self, NULL);
|
|
Packit Service |
1d8f1c |
themed_rgba_set_selected_fg (self, NULL);
|
|
Packit Service |
1d8f1c |
themed_rgba_set_selected_bg (self, NULL);
|
|
Packit Service |
1d8f1c |
_tmp0_ = gtk_widget_path_new ();
|
|
Packit Service |
1d8f1c |
widget_path = _tmp0_;
|
|
Packit Service |
1d8f1c |
gtk_widget_path_append_type (widget_path, gtk_text_view_get_type ());
|
|
Packit Service |
1d8f1c |
_tmp1_ = gtk_style_context_new ();
|
|
Packit Service |
1d8f1c |
_g_object_unref0 (self->priv->m_style_context);
|
|
Packit Service |
1d8f1c |
self->priv->m_style_context = _tmp1_;
|
|
Packit Service |
1d8f1c |
_tmp2_ = self->priv->m_style_context;
|
|
Packit Service |
1d8f1c |
gtk_style_context_set_path (_tmp2_, widget_path);
|
|
Packit Service |
1d8f1c |
_tmp3_ = self->priv->m_style_context;
|
|
Packit Service |
1d8f1c |
gtk_style_context_add_class (_tmp3_, GTK_STYLE_CLASS_VIEW);
|
|
Packit Service |
1d8f1c |
_tmp4_ = self->priv->m_style_context;
|
|
Packit Service |
1d8f1c |
_tmp5_ = gtk_widget_get_style_context (widget);
|
|
Packit Service |
1d8f1c |
gtk_style_context_set_parent (_tmp4_, _tmp5_);
|
|
Packit Service |
1d8f1c |
themed_rgba_get_rgba (self);
|
|
Packit Service |
1d8f1c |
_tmp6_ = self->priv->m_style_context;
|
|
Packit Service |
1d8f1c |
g_signal_connect (_tmp6_, "changed", (GCallback) ___lambda4__gtk_style_context_changed, self);
|
|
Packit Service |
1d8f1c |
_gtk_widget_path_unref0 (widget_path);
|
|
Packit Service |
1d8f1c |
return self;
|
|
Packit Service |
1d8f1c |
}
|
|
Packit Service |
1d8f1c |
|
|
Packit Service |
1d8f1c |
|
|
Packit Service |
1d8f1c |
ThemedRGBA*
|
|
Packit Service |
1d8f1c |
themed_rgba_new (GtkWidget* widget)
|
|
Packit Service |
1d8f1c |
{
|
|
Packit Service |
1d8f1c |
return themed_rgba_construct (TYPE_THEMED_RGBA, widget);
|
|
Packit Service |
1d8f1c |
}
|
|
Packit Service |
1d8f1c |
|
|
Packit Service |
1d8f1c |
|
|
Packit Service |
1d8f1c |
static void
|
|
Packit Service |
1d8f1c |
themed_rgba_reset_rgba (ThemedRGBA* self)
|
|
Packit Service |
1d8f1c |
{
|
|
Packit Service |
1d8f1c |
GdkRGBA* _tmp0_;
|
|
Packit Service |
1d8f1c |
GdkRGBA* _tmp2_;
|
|
Packit Service |
1d8f1c |
GdkRGBA* _tmp4_;
|
|
Packit Service |
1d8f1c |
GdkRGBA* _tmp6_;
|
|
Packit Service |
1d8f1c |
g_return_if_fail (self != NULL);
|
|
Packit Service |
1d8f1c |
_tmp0_ = self->priv->_normal_fg;
|
|
Packit Service |
1d8f1c |
if (_tmp0_ != NULL) {
|
|
Packit Service |
1d8f1c |
GdkRGBA* _tmp1_;
|
|
Packit Service |
1d8f1c |
_tmp1_ = self->priv->_normal_fg;
|
|
Packit Service |
1d8f1c |
gdk_rgba_free (_tmp1_);
|
|
Packit Service |
1d8f1c |
themed_rgba_set_normal_fg (self, NULL);
|
|
Packit Service |
1d8f1c |
}
|
|
Packit Service |
1d8f1c |
_tmp2_ = self->priv->_normal_bg;
|
|
Packit Service |
1d8f1c |
if (_tmp2_ != NULL) {
|
|
Packit Service |
1d8f1c |
GdkRGBA* _tmp3_;
|
|
Packit Service |
1d8f1c |
_tmp3_ = self->priv->_normal_bg;
|
|
Packit Service |
1d8f1c |
gdk_rgba_free (_tmp3_);
|
|
Packit Service |
1d8f1c |
themed_rgba_set_normal_bg (self, NULL);
|
|
Packit Service |
1d8f1c |
}
|
|
Packit Service |
1d8f1c |
_tmp4_ = self->priv->_selected_fg;
|
|
Packit Service |
1d8f1c |
if (_tmp4_ != NULL) {
|
|
Packit Service |
1d8f1c |
GdkRGBA* _tmp5_;
|
|
Packit Service |
1d8f1c |
_tmp5_ = self->priv->_selected_fg;
|
|
Packit Service |
1d8f1c |
gdk_rgba_free (_tmp5_);
|
|
Packit Service |
1d8f1c |
themed_rgba_set_selected_fg (self, NULL);
|
|
Packit Service |
1d8f1c |
}
|
|
Packit Service |
1d8f1c |
_tmp6_ = self->priv->_selected_bg;
|
|
Packit Service |
1d8f1c |
if (_tmp6_ != NULL) {
|
|
Packit Service |
1d8f1c |
GdkRGBA* _tmp7_;
|
|
Packit Service |
1d8f1c |
_tmp7_ = self->priv->_selected_bg;
|
|
Packit Service |
1d8f1c |
gdk_rgba_free (_tmp7_);
|
|
Packit Service |
1d8f1c |
themed_rgba_set_selected_bg (self, NULL);
|
|
Packit Service |
1d8f1c |
}
|
|
Packit Service |
1d8f1c |
}
|
|
Packit Service |
1d8f1c |
|
|
Packit Service |
1d8f1c |
|
|
Packit Service |
1d8f1c |
static void
|
|
Packit Service |
1d8f1c |
themed_rgba_get_rgba (ThemedRGBA* self)
|
|
Packit Service |
1d8f1c |
{
|
|
Packit Service |
1d8f1c |
GdkRGBA* normal_fg = NULL;
|
|
Packit Service |
1d8f1c |
GdkRGBA* normal_bg = NULL;
|
|
Packit Service |
1d8f1c |
GdkRGBA* selected_fg = NULL;
|
|
Packit Service |
1d8f1c |
GdkRGBA* selected_bg = NULL;
|
|
Packit Service |
1d8f1c |
GtkStyleContext* _tmp0_;
|
|
Packit Service |
1d8f1c |
GtkStyleContext* _tmp1_;
|
|
Packit Service |
1d8f1c |
gchar* bg_prop = NULL;
|
|
Packit Service |
1d8f1c |
gchar* _tmp2_;
|
|
Packit Service |
1d8f1c |
GtkStyleContext* _tmp3_;
|
|
Packit Service |
1d8f1c |
const gchar* _tmp4_;
|
|
Packit Service |
1d8f1c |
GtkStyleContext* _tmp5_;
|
|
Packit Service |
1d8f1c |
const gchar* _tmp6_;
|
|
Packit Service |
1d8f1c |
gboolean _tmp7_ = FALSE;
|
|
Packit Service |
1d8f1c |
gboolean _tmp8_ = FALSE;
|
|
Packit Service |
1d8f1c |
gboolean _tmp9_ = FALSE;
|
|
Packit Service |
1d8f1c |
GdkRGBA* _tmp10_;
|
|
Packit Service |
1d8f1c |
gdouble _tmp11_;
|
|
Packit Service |
1d8f1c |
GdkRGBA* _tmp12_;
|
|
Packit Service |
1d8f1c |
gdouble _tmp13_;
|
|
Packit Service |
1d8f1c |
GdkRGBA* _tmp31_;
|
|
Packit Service |
1d8f1c |
GdkRGBA* _tmp32_;
|
|
Packit Service |
1d8f1c |
GdkRGBA* _tmp33_;
|
|
Packit Service |
1d8f1c |
GdkRGBA* _tmp34_;
|
|
Packit Service |
1d8f1c |
g_return_if_fail (self != NULL);
|
|
Packit Service |
1d8f1c |
themed_rgba_reset_rgba (self);
|
|
Packit Service |
1d8f1c |
normal_fg = NULL;
|
|
Packit Service |
1d8f1c |
normal_bg = NULL;
|
|
Packit Service |
1d8f1c |
selected_fg = NULL;
|
|
Packit Service |
1d8f1c |
selected_bg = NULL;
|
|
Packit Service |
1d8f1c |
_tmp0_ = self->priv->m_style_context;
|
|
Packit Service |
1d8f1c |
gtk_style_context_get (_tmp0_, GTK_STATE_FLAG_NORMAL, "color", &normal_fg, NULL);
|
|
Packit Service |
1d8f1c |
_tmp1_ = self->priv->m_style_context;
|
|
Packit Service |
1d8f1c |
gtk_style_context_get (_tmp1_, GTK_STATE_FLAG_SELECTED, "color", &selected_fg, NULL);
|
|
Packit Service |
1d8f1c |
_tmp2_ = g_strdup ("background-color");
|
|
Packit Service |
1d8f1c |
bg_prop = _tmp2_;
|
|
Packit Service |
1d8f1c |
_tmp3_ = self->priv->m_style_context;
|
|
Packit Service |
1d8f1c |
_tmp4_ = bg_prop;
|
|
Packit Service |
1d8f1c |
gtk_style_context_get (_tmp3_, GTK_STATE_FLAG_NORMAL, _tmp4_, &normal_bg, NULL);
|
|
Packit Service |
1d8f1c |
_tmp5_ = self->priv->m_style_context;
|
|
Packit Service |
1d8f1c |
_tmp6_ = bg_prop;
|
|
Packit Service |
1d8f1c |
gtk_style_context_get (_tmp5_, GTK_STATE_FLAG_SELECTED, _tmp6_, &selected_bg, NULL);
|
|
Packit Service |
1d8f1c |
_tmp10_ = normal_bg;
|
|
Packit Service |
1d8f1c |
_tmp11_ = (*_tmp10_).red;
|
|
Packit Service |
1d8f1c |
_tmp12_ = selected_bg;
|
|
Packit Service |
1d8f1c |
_tmp13_ = (*_tmp12_).red;
|
|
Packit Service |
1d8f1c |
if (_tmp11_ == _tmp13_) {
|
|
Packit Service |
1d8f1c |
GdkRGBA* _tmp14_;
|
|
Packit Service |
1d8f1c |
gdouble _tmp15_;
|
|
Packit Service |
1d8f1c |
GdkRGBA* _tmp16_;
|
|
Packit Service |
1d8f1c |
gdouble _tmp17_;
|
|
Packit Service |
1d8f1c |
_tmp14_ = normal_bg;
|
|
Packit Service |
1d8f1c |
_tmp15_ = (*_tmp14_).green;
|
|
Packit Service |
1d8f1c |
_tmp16_ = selected_bg;
|
|
Packit Service |
1d8f1c |
_tmp17_ = (*_tmp16_).green;
|
|
Packit Service |
1d8f1c |
_tmp9_ = _tmp15_ == _tmp17_;
|
|
Packit Service |
1d8f1c |
} else {
|
|
Packit Service |
1d8f1c |
_tmp9_ = FALSE;
|
|
Packit Service |
1d8f1c |
}
|
|
Packit Service |
1d8f1c |
if (_tmp9_) {
|
|
Packit Service |
1d8f1c |
GdkRGBA* _tmp18_;
|
|
Packit Service |
1d8f1c |
gdouble _tmp19_;
|
|
Packit Service |
1d8f1c |
GdkRGBA* _tmp20_;
|
|
Packit Service |
1d8f1c |
gdouble _tmp21_;
|
|
Packit Service |
1d8f1c |
_tmp18_ = normal_bg;
|
|
Packit Service |
1d8f1c |
_tmp19_ = (*_tmp18_).blue;
|
|
Packit Service |
1d8f1c |
_tmp20_ = selected_bg;
|
|
Packit Service |
1d8f1c |
_tmp21_ = (*_tmp20_).blue;
|
|
Packit Service |
1d8f1c |
_tmp8_ = _tmp19_ == _tmp21_;
|
|
Packit Service |
1d8f1c |
} else {
|
|
Packit Service |
1d8f1c |
_tmp8_ = FALSE;
|
|
Packit Service |
1d8f1c |
}
|
|
Packit Service |
1d8f1c |
if (_tmp8_) {
|
|
Packit Service |
1d8f1c |
GdkRGBA* _tmp22_;
|
|
Packit Service |
1d8f1c |
gdouble _tmp23_;
|
|
Packit Service |
1d8f1c |
GdkRGBA* _tmp24_;
|
|
Packit Service |
1d8f1c |
gdouble _tmp25_;
|
|
Packit Service |
1d8f1c |
_tmp22_ = normal_bg;
|
|
Packit Service |
1d8f1c |
_tmp23_ = (*_tmp22_).alpha;
|
|
Packit Service |
1d8f1c |
_tmp24_ = selected_bg;
|
|
Packit Service |
1d8f1c |
_tmp25_ = (*_tmp24_).alpha;
|
|
Packit Service |
1d8f1c |
_tmp7_ = _tmp23_ == _tmp25_;
|
|
Packit Service |
1d8f1c |
} else {
|
|
Packit Service |
1d8f1c |
_tmp7_ = FALSE;
|
|
Packit Service |
1d8f1c |
}
|
|
Packit Service |
1d8f1c |
if (_tmp7_) {
|
|
Packit Service |
1d8f1c |
gchar* _tmp26_;
|
|
Packit Service |
1d8f1c |
GtkStyleContext* _tmp27_;
|
|
Packit Service |
1d8f1c |
const gchar* _tmp28_;
|
|
Packit Service |
1d8f1c |
GtkStyleContext* _tmp29_;
|
|
Packit Service |
1d8f1c |
const gchar* _tmp30_;
|
|
Packit Service |
1d8f1c |
gdk_rgba_free (normal_bg);
|
|
Packit Service |
1d8f1c |
normal_bg = NULL;
|
|
Packit Service |
1d8f1c |
gdk_rgba_free (normal_bg);
|
|
Packit Service |
1d8f1c |
normal_bg = NULL;
|
|
Packit Service |
1d8f1c |
_tmp26_ = g_strdup ("-gtk-secondary-caret-color");
|
|
Packit Service |
1d8f1c |
_g_free0 (bg_prop);
|
|
Packit Service |
1d8f1c |
bg_prop = _tmp26_;
|
|
Packit Service |
1d8f1c |
_tmp27_ = self->priv->m_style_context;
|
|
Packit Service |
1d8f1c |
_tmp28_ = bg_prop;
|
|
Packit Service |
1d8f1c |
gtk_style_context_get (_tmp27_, GTK_STATE_FLAG_NORMAL, _tmp28_, &normal_bg, NULL);
|
|
Packit Service |
1d8f1c |
_tmp29_ = self->priv->m_style_context;
|
|
Packit Service |
1d8f1c |
_tmp30_ = bg_prop;
|
|
Packit Service |
1d8f1c |
gtk_style_context_get (_tmp29_, GTK_STATE_FLAG_SELECTED, _tmp30_, &selected_bg, NULL);
|
|
Packit Service |
1d8f1c |
}
|
|
Packit Service |
1d8f1c |
_tmp31_ = normal_fg;
|
|
Packit Service |
1d8f1c |
themed_rgba_set_normal_fg (self, _tmp31_);
|
|
Packit Service |
1d8f1c |
_tmp32_ = normal_bg;
|
|
Packit Service |
1d8f1c |
themed_rgba_set_normal_bg (self, _tmp32_);
|
|
Packit Service |
1d8f1c |
_tmp33_ = selected_fg;
|
|
Packit Service |
1d8f1c |
themed_rgba_set_selected_fg (self, _tmp33_);
|
|
Packit Service |
1d8f1c |
_tmp34_ = selected_bg;
|
|
Packit Service |
1d8f1c |
themed_rgba_set_selected_bg (self, _tmp34_);
|
|
Packit Service |
1d8f1c |
_g_free0 (bg_prop);
|
|
Packit Service |
1d8f1c |
}
|
|
Packit Service |
1d8f1c |
|
|
Packit Service |
1d8f1c |
|
|
Packit Service |
1d8f1c |
GdkRGBA*
|
|
Packit Service |
1d8f1c |
themed_rgba_get_normal_fg (ThemedRGBA* self)
|
|
Packit Service |
1d8f1c |
{
|
|
Packit Service |
1d8f1c |
GdkRGBA* result;
|
|
Packit Service |
1d8f1c |
GdkRGBA* _tmp0_;
|
|
Packit Service |
1d8f1c |
g_return_val_if_fail (self != NULL, NULL);
|
|
Packit Service |
1d8f1c |
_tmp0_ = self->priv->_normal_fg;
|
|
Packit Service |
1d8f1c |
result = _tmp0_;
|
|
Packit Service |
1d8f1c |
return result;
|
|
Packit Service |
1d8f1c |
}
|
|
Packit Service |
1d8f1c |
|
|
Packit Service |
1d8f1c |
|
|
Packit Service |
1d8f1c |
void
|
|
Packit Service |
1d8f1c |
themed_rgba_set_normal_fg (ThemedRGBA* self,
|
|
Packit Service |
1d8f1c |
GdkRGBA* value)
|
|
Packit Service |
1d8f1c |
{
|
|
Packit Service |
1d8f1c |
g_return_if_fail (self != NULL);
|
|
Packit Service |
1d8f1c |
self->priv->_normal_fg = value;
|
|
Packit Service |
1d8f1c |
}
|
|
Packit Service |
1d8f1c |
|
|
Packit Service |
1d8f1c |
|
|
Packit Service |
1d8f1c |
GdkRGBA*
|
|
Packit Service |
1d8f1c |
themed_rgba_get_normal_bg (ThemedRGBA* self)
|
|
Packit Service |
1d8f1c |
{
|
|
Packit Service |
1d8f1c |
GdkRGBA* result;
|
|
Packit Service |
1d8f1c |
GdkRGBA* _tmp0_;
|
|
Packit Service |
1d8f1c |
g_return_val_if_fail (self != NULL, NULL);
|
|
Packit Service |
1d8f1c |
_tmp0_ = self->priv->_normal_bg;
|
|
Packit Service |
1d8f1c |
result = _tmp0_;
|
|
Packit Service |
1d8f1c |
return result;
|
|
Packit Service |
1d8f1c |
}
|
|
Packit Service |
1d8f1c |
|
|
Packit Service |
1d8f1c |
|
|
Packit Service |
1d8f1c |
void
|
|
Packit Service |
1d8f1c |
themed_rgba_set_normal_bg (ThemedRGBA* self,
|
|
Packit Service |
1d8f1c |
GdkRGBA* value)
|
|
Packit Service |
1d8f1c |
{
|
|
Packit Service |
1d8f1c |
g_return_if_fail (self != NULL);
|
|
Packit Service |
1d8f1c |
self->priv->_normal_bg = value;
|
|
Packit Service |
1d8f1c |
}
|
|
Packit Service |
1d8f1c |
|
|
Packit Service |
1d8f1c |
|
|
Packit Service |
1d8f1c |
GdkRGBA*
|
|
Packit Service |
1d8f1c |
themed_rgba_get_selected_fg (ThemedRGBA* self)
|
|
Packit Service |
1d8f1c |
{
|
|
Packit Service |
1d8f1c |
GdkRGBA* result;
|
|
Packit Service |
1d8f1c |
GdkRGBA* _tmp0_;
|
|
Packit Service |
1d8f1c |
g_return_val_if_fail (self != NULL, NULL);
|
|
Packit Service |
1d8f1c |
_tmp0_ = self->priv->_selected_fg;
|
|
Packit Service |
1d8f1c |
result = _tmp0_;
|
|
Packit Service |
1d8f1c |
return result;
|
|
Packit Service |
1d8f1c |
}
|
|
Packit Service |
1d8f1c |
|
|
Packit Service |
1d8f1c |
|
|
Packit Service |
1d8f1c |
void
|
|
Packit Service |
1d8f1c |
themed_rgba_set_selected_fg (ThemedRGBA* self,
|
|
Packit Service |
1d8f1c |
GdkRGBA* value)
|
|
Packit Service |
1d8f1c |
{
|
|
Packit Service |
1d8f1c |
g_return_if_fail (self != NULL);
|
|
Packit Service |
1d8f1c |
self->priv->_selected_fg = value;
|
|
Packit Service |
1d8f1c |
}
|
|
Packit Service |
1d8f1c |
|
|
Packit Service |
1d8f1c |
|
|
Packit Service |
1d8f1c |
GdkRGBA*
|
|
Packit Service |
1d8f1c |
themed_rgba_get_selected_bg (ThemedRGBA* self)
|
|
Packit Service |
1d8f1c |
{
|
|
Packit Service |
1d8f1c |
GdkRGBA* result;
|
|
Packit Service |
1d8f1c |
GdkRGBA* _tmp0_;
|
|
Packit Service |
1d8f1c |
g_return_val_if_fail (self != NULL, NULL);
|
|
Packit Service |
1d8f1c |
_tmp0_ = self->priv->_selected_bg;
|
|
Packit Service |
1d8f1c |
result = _tmp0_;
|
|
Packit Service |
1d8f1c |
return result;
|
|
Packit Service |
1d8f1c |
}
|
|
Packit Service |
1d8f1c |
|
|
Packit Service |
1d8f1c |
|
|
Packit Service |
1d8f1c |
void
|
|
Packit Service |
1d8f1c |
themed_rgba_set_selected_bg (ThemedRGBA* self,
|
|
Packit Service |
1d8f1c |
GdkRGBA* value)
|
|
Packit Service |
1d8f1c |
{
|
|
Packit Service |
1d8f1c |
g_return_if_fail (self != NULL);
|
|
Packit Service |
1d8f1c |
self->priv->_selected_bg = value;
|
|
Packit Service |
1d8f1c |
}
|
|
Packit Service |
1d8f1c |
|
|
Packit Service |
1d8f1c |
|
|
Packit Service |
1d8f1c |
static void
|
|
Packit Service |
1d8f1c |
value_themed_rgba_init (GValue* value)
|
|
Packit Service |
1d8f1c |
{
|
|
Packit Service |
1d8f1c |
value->data[0].v_pointer = NULL;
|
|
Packit Service |
1d8f1c |
}
|
|
Packit Service |
1d8f1c |
|
|
Packit Service |
1d8f1c |
|
|
Packit Service |
1d8f1c |
static void
|
|
Packit Service |
1d8f1c |
value_themed_rgba_free_value (GValue* value)
|
|
Packit Service |
1d8f1c |
{
|
|
Packit Service |
1d8f1c |
if (value->data[0].v_pointer) {
|
|
Packit Service |
1d8f1c |
themed_rgba_unref (value->data[0].v_pointer);
|
|
Packit Service |
1d8f1c |
}
|
|
Packit Service |
1d8f1c |
}
|
|
Packit Service |
1d8f1c |
|
|
Packit Service |
1d8f1c |
|
|
Packit Service |
1d8f1c |
static void
|
|
Packit Service |
1d8f1c |
value_themed_rgba_copy_value (const GValue* src_value,
|
|
Packit Service |
1d8f1c |
GValue* dest_value)
|
|
Packit Service |
1d8f1c |
{
|
|
Packit Service |
1d8f1c |
if (src_value->data[0].v_pointer) {
|
|
Packit Service |
1d8f1c |
dest_value->data[0].v_pointer = themed_rgba_ref (src_value->data[0].v_pointer);
|
|
Packit Service |
1d8f1c |
} else {
|
|
Packit Service |
1d8f1c |
dest_value->data[0].v_pointer = NULL;
|
|
Packit Service |
1d8f1c |
}
|
|
Packit Service |
1d8f1c |
}
|
|
Packit Service |
1d8f1c |
|
|
Packit Service |
1d8f1c |
|
|
Packit Service |
1d8f1c |
static gpointer
|
|
Packit Service |
1d8f1c |
value_themed_rgba_peek_pointer (const GValue* value)
|
|
Packit Service |
1d8f1c |
{
|
|
Packit Service |
1d8f1c |
return value->data[0].v_pointer;
|
|
Packit Service |
1d8f1c |
}
|
|
Packit Service |
1d8f1c |
|
|
Packit Service |
1d8f1c |
|
|
Packit Service |
1d8f1c |
static gchar*
|
|
Packit Service |
1d8f1c |
value_themed_rgba_collect_value (GValue* value,
|
|
Packit Service |
1d8f1c |
guint n_collect_values,
|
|
Packit Service |
1d8f1c |
GTypeCValue* collect_values,
|
|
Packit Service |
1d8f1c |
guint collect_flags)
|
|
Packit Service |
1d8f1c |
{
|
|
Packit Service |
1d8f1c |
if (collect_values[0].v_pointer) {
|
|
Packit Service |
1d8f1c |
ThemedRGBA * object;
|
|
Packit Service |
1d8f1c |
object = collect_values[0].v_pointer;
|
|
Packit Service |
1d8f1c |
if (object->parent_instance.g_class == NULL) {
|
|
Packit Service |
1d8f1c |
return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
|
|
Packit Service |
1d8f1c |
} else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) {
|
|
Packit Service |
1d8f1c |
return g_strconcat ("invalid object type `", g_type_name (G_TYPE_FROM_INSTANCE (object)), "' for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
|
|
Packit Service |
1d8f1c |
}
|
|
Packit Service |
1d8f1c |
value->data[0].v_pointer = themed_rgba_ref (object);
|
|
Packit Service |
1d8f1c |
} else {
|
|
Packit Service |
1d8f1c |
value->data[0].v_pointer = NULL;
|
|
Packit Service |
1d8f1c |
}
|
|
Packit Service |
1d8f1c |
return NULL;
|
|
Packit Service |
1d8f1c |
}
|
|
Packit Service |
1d8f1c |
|
|
Packit Service |
1d8f1c |
|
|
Packit Service |
1d8f1c |
static gchar*
|
|
Packit Service |
1d8f1c |
value_themed_rgba_lcopy_value (const GValue* value,
|
|
Packit Service |
1d8f1c |
guint n_collect_values,
|
|
Packit Service |
1d8f1c |
GTypeCValue* collect_values,
|
|
Packit Service |
1d8f1c |
guint collect_flags)
|
|
Packit Service |
1d8f1c |
{
|
|
Packit Service |
1d8f1c |
ThemedRGBA ** object_p;
|
|
Packit Service |
1d8f1c |
object_p = collect_values[0].v_pointer;
|
|
Packit Service |
1d8f1c |
if (!object_p) {
|
|
Packit Service |
1d8f1c |
return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value));
|
|
Packit Service |
1d8f1c |
}
|
|
Packit Service |
1d8f1c |
if (!value->data[0].v_pointer) {
|
|
Packit Service |
1d8f1c |
*object_p = NULL;
|
|
Packit Service |
1d8f1c |
} else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) {
|
|
Packit Service |
1d8f1c |
*object_p = value->data[0].v_pointer;
|
|
Packit Service |
1d8f1c |
} else {
|
|
Packit Service |
1d8f1c |
*object_p = themed_rgba_ref (value->data[0].v_pointer);
|
|
Packit Service |
1d8f1c |
}
|
|
Packit Service |
1d8f1c |
return NULL;
|
|
Packit Service |
1d8f1c |
}
|
|
Packit Service |
1d8f1c |
|
|
Packit Service |
1d8f1c |
|
|
Packit Service |
1d8f1c |
GParamSpec*
|
|
Packit Service |
1d8f1c |
param_spec_themed_rgba (const gchar* name,
|
|
Packit Service |
1d8f1c |
const gchar* nick,
|
|
Packit Service |
1d8f1c |
const gchar* blurb,
|
|
Packit Service |
1d8f1c |
GType object_type,
|
|
Packit Service |
1d8f1c |
GParamFlags flags)
|
|
Packit Service |
1d8f1c |
{
|
|
Packit Service |
1d8f1c |
ParamSpecThemedRGBA* spec;
|
|
Packit Service |
1d8f1c |
g_return_val_if_fail (g_type_is_a (object_type, TYPE_THEMED_RGBA), NULL);
|
|
Packit Service |
1d8f1c |
spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags);
|
|
Packit Service |
1d8f1c |
G_PARAM_SPEC (spec)->value_type = object_type;
|
|
Packit Service |
1d8f1c |
return G_PARAM_SPEC (spec);
|
|
Packit Service |
1d8f1c |
}
|
|
Packit Service |
1d8f1c |
|
|
Packit Service |
1d8f1c |
|
|
Packit Service |
1d8f1c |
gpointer
|
|
Packit Service |
1d8f1c |
value_get_themed_rgba (const GValue* value)
|
|
Packit Service |
1d8f1c |
{
|
|
Packit Service |
1d8f1c |
g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_THEMED_RGBA), NULL);
|
|
Packit Service |
1d8f1c |
return value->data[0].v_pointer;
|
|
Packit Service |
1d8f1c |
}
|
|
Packit Service |
1d8f1c |
|
|
Packit Service |
1d8f1c |
|
|
Packit Service |
1d8f1c |
void
|
|
Packit Service |
1d8f1c |
value_set_themed_rgba (GValue* value,
|
|
Packit Service |
1d8f1c |
gpointer v_object)
|
|
Packit Service |
1d8f1c |
{
|
|
Packit Service |
1d8f1c |
ThemedRGBA * old;
|
|
Packit Service |
1d8f1c |
g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_THEMED_RGBA));
|
|
Packit Service |
1d8f1c |
old = value->data[0].v_pointer;
|
|
Packit Service |
1d8f1c |
if (v_object) {
|
|
Packit Service |
1d8f1c |
g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TYPE_THEMED_RGBA));
|
|
Packit Service |
1d8f1c |
g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
|
|
Packit Service |
1d8f1c |
value->data[0].v_pointer = v_object;
|
|
Packit Service |
1d8f1c |
themed_rgba_ref (value->data[0].v_pointer);
|
|
Packit Service |
1d8f1c |
} else {
|
|
Packit Service |
1d8f1c |
value->data[0].v_pointer = NULL;
|
|
Packit Service |
1d8f1c |
}
|
|
Packit Service |
1d8f1c |
if (old) {
|
|
Packit Service |
1d8f1c |
themed_rgba_unref (old);
|
|
Packit Service |
1d8f1c |
}
|
|
Packit Service |
1d8f1c |
}
|
|
Packit Service |
1d8f1c |
|
|
Packit Service |
1d8f1c |
|
|
Packit Service |
1d8f1c |
void
|
|
Packit Service |
1d8f1c |
value_take_themed_rgba (GValue* value,
|
|
Packit Service |
1d8f1c |
gpointer v_object)
|
|
Packit Service |
1d8f1c |
{
|
|
Packit Service |
1d8f1c |
ThemedRGBA * old;
|
|
Packit Service |
1d8f1c |
g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_THEMED_RGBA));
|
|
Packit Service |
1d8f1c |
old = value->data[0].v_pointer;
|
|
Packit Service |
1d8f1c |
if (v_object) {
|
|
Packit Service |
1d8f1c |
g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TYPE_THEMED_RGBA));
|
|
Packit Service |
1d8f1c |
g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
|
|
Packit Service |
1d8f1c |
value->data[0].v_pointer = v_object;
|
|
Packit Service |
1d8f1c |
} else {
|
|
Packit Service |
1d8f1c |
value->data[0].v_pointer = NULL;
|
|
Packit Service |
1d8f1c |
}
|
|
Packit Service |
1d8f1c |
if (old) {
|
|
Packit Service |
1d8f1c |
themed_rgba_unref (old);
|
|
Packit Service |
1d8f1c |
}
|
|
Packit Service |
1d8f1c |
}
|
|
Packit Service |
1d8f1c |
|
|
Packit Service |
1d8f1c |
|
|
Packit Service |
1d8f1c |
static void
|
|
Packit Service |
1d8f1c |
themed_rgba_class_init (ThemedRGBAClass * klass)
|
|
Packit Service |
1d8f1c |
{
|
|
Packit Service |
1d8f1c |
themed_rgba_parent_class = g_type_class_peek_parent (klass);
|
|
Packit Service |
1d8f1c |
((ThemedRGBAClass *) klass)->finalize = themed_rgba_finalize;
|
|
Packit Service |
1d8f1c |
g_type_class_add_private (klass, sizeof (ThemedRGBAPrivate));
|
|
Packit Service |
1d8f1c |
}
|
|
Packit Service |
1d8f1c |
|
|
Packit Service |
1d8f1c |
|
|
Packit Service |
1d8f1c |
static void
|
|
Packit Service |
1d8f1c |
themed_rgba_instance_init (ThemedRGBA * self)
|
|
Packit Service |
1d8f1c |
{
|
|
Packit Service |
1d8f1c |
self->priv = THEMED_RGBA_GET_PRIVATE (self);
|
|
Packit Service |
1d8f1c |
self->ref_count = 1;
|
|
Packit Service |
1d8f1c |
}
|
|
Packit Service |
1d8f1c |
|
|
Packit Service |
1d8f1c |
|
|
Packit Service |
1d8f1c |
static void
|
|
Packit Service |
1d8f1c |
themed_rgba_finalize (ThemedRGBA * obj)
|
|
Packit Service |
1d8f1c |
{
|
|
Packit Service |
1d8f1c |
ThemedRGBA * self;
|
|
Packit Service |
1d8f1c |
self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_THEMED_RGBA, ThemedRGBA);
|
|
Packit Service |
1d8f1c |
g_signal_handlers_destroy (self);
|
|
Packit Service |
1d8f1c |
themed_rgba_reset_rgba (self);
|
|
Packit Service |
1d8f1c |
_g_object_unref0 (self->priv->m_style_context);
|
|
Packit Service |
1d8f1c |
}
|
|
Packit Service |
1d8f1c |
|
|
Packit Service |
1d8f1c |
|
|
Packit Service |
1d8f1c |
GType
|
|
Packit Service |
1d8f1c |
themed_rgba_get_type (void)
|
|
Packit Service |
1d8f1c |
{
|
|
Packit Service |
1d8f1c |
static volatile gsize themed_rgba_type_id__volatile = 0;
|
|
Packit Service |
1d8f1c |
if (g_once_init_enter (&themed_rgba_type_id__volatile)) {
|
|
Packit Service |
1d8f1c |
static const GTypeValueTable g_define_type_value_table = { value_themed_rgba_init, value_themed_rgba_free_value, value_themed_rgba_copy_value, value_themed_rgba_peek_pointer, "p", value_themed_rgba_collect_value, "p", value_themed_rgba_lcopy_value };
|
|
Packit Service |
1d8f1c |
static const GTypeInfo g_define_type_info = { sizeof (ThemedRGBAClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) themed_rgba_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ThemedRGBA), 0, (GInstanceInitFunc) themed_rgba_instance_init, &g_define_type_value_table };
|
|
Packit Service |
1d8f1c |
static const GTypeFundamentalInfo g_define_type_fundamental_info = { (G_TYPE_FLAG_CLASSED | G_TYPE_FLAG_INSTANTIATABLE | G_TYPE_FLAG_DERIVABLE | G_TYPE_FLAG_DEEP_DERIVABLE) };
|
|
Packit Service |
1d8f1c |
GType themed_rgba_type_id;
|
|
Packit Service |
1d8f1c |
themed_rgba_type_id = g_type_register_fundamental (g_type_fundamental_next (), "ThemedRGBA", &g_define_type_info, &g_define_type_fundamental_info, 0);
|
|
Packit Service |
1d8f1c |
g_once_init_leave (&themed_rgba_type_id__volatile, themed_rgba_type_id);
|
|
Packit Service |
1d8f1c |
}
|
|
Packit Service |
1d8f1c |
return themed_rgba_type_id__volatile;
|
|
Packit Service |
1d8f1c |
}
|
|
Packit Service |
1d8f1c |
|
|
Packit Service |
1d8f1c |
|
|
Packit Service |
1d8f1c |
gpointer
|
|
Packit Service |
1d8f1c |
themed_rgba_ref (gpointer instance)
|
|
Packit Service |
1d8f1c |
{
|
|
Packit Service |
1d8f1c |
ThemedRGBA * self;
|
|
Packit Service |
1d8f1c |
self = instance;
|
|
Packit Service |
1d8f1c |
g_atomic_int_inc (&self->ref_count);
|
|
Packit Service |
1d8f1c |
return instance;
|
|
Packit Service |
1d8f1c |
}
|
|
Packit Service |
1d8f1c |
|
|
Packit Service |
1d8f1c |
|
|
Packit Service |
1d8f1c |
void
|
|
Packit Service |
1d8f1c |
themed_rgba_unref (gpointer instance)
|
|
Packit Service |
1d8f1c |
{
|
|
Packit Service |
1d8f1c |
ThemedRGBA * self;
|
|
Packit Service |
1d8f1c |
self = instance;
|
|
Packit Service |
1d8f1c |
if (g_atomic_int_dec_and_test (&self->ref_count)) {
|
|
Packit Service |
1d8f1c |
THEMED_RGBA_GET_CLASS (self)->finalize (self);
|
|
Packit Service |
1d8f1c |
g_type_free_instance ((GTypeInstance *) self);
|
|
Packit Service |
1d8f1c |
}
|
|
Packit Service |
1d8f1c |
}
|
|
Packit Service |
1d8f1c |
|
|
Packit Service |
1d8f1c |
|
|
Packit Service |
1d8f1c |
/**
|
|
Packit Service |
1d8f1c |
* IconWidget:
|
|
Packit Service |
1d8f1c |
* @icon_name_or_path: Can be a name or path but not stock id
|
|
Packit Service |
1d8f1c |
* because gtk_icon_theme_load_icon() cannot fallback the
|
|
Packit Service |
1d8f1c |
* stock id to a real file name against
|
|
Packit Service |
1d8f1c |
* gtk_image_new_from_stock().
|
|
Packit Service |
1d8f1c |
* @size: #Gtk.IconSize
|
|
Packit Service |
1d8f1c |
*/
|
|
Packit Service |
1d8f1c |
static gchar
|
|
Packit Service |
1d8f1c |
string_get (const gchar* self,
|
|
Packit Service |
1d8f1c |
glong index)
|
|
Packit Service |
1d8f1c |
{
|
|
Packit Service |
1d8f1c |
gchar result = '\0';
|
|
Packit Service |
1d8f1c |
gchar _tmp0_;
|
|
Packit Service |
1d8f1c |
g_return_val_if_fail (self != NULL, '\0');
|
|
Packit Service |
1d8f1c |
_tmp0_ = ((gchar*) self)[index];
|
|
Packit Service |
1d8f1c |
result = _tmp0_;
|
|
Packit Service |
1d8f1c |
return result;
|
|
Packit Service |
1d8f1c |
}
|
|
Packit Service |
1d8f1c |
|
|
Packit Service |
1d8f1c |
|
|
Packit Service |
1d8f1c |
static gpointer
|
|
Packit Service |
1d8f1c |
_g_object_ref0 (gpointer self)
|
|
Packit Service |
1d8f1c |
{
|
|
Packit Service |
1d8f1c |
return self ? g_object_ref (self) : NULL;
|
|
Packit Service |
1d8f1c |
}
|
|
Packit Service |
1d8f1c |
|
|
Packit Service |
1d8f1c |
|
|
Packit Service |
1d8f1c |
IconWidget*
|
|
Packit Service |
1d8f1c |
icon_widget_construct (GType object_type,
|
|
Packit Service |
1d8f1c |
const gchar* icon_name_or_path,
|
|
Packit Service |
1d8f1c |
GtkIconSize size)
|
|
Packit Service |
1d8f1c |
{
|
|
Packit Service |
1d8f1c |
IconWidget * self = NULL;
|
|
Packit Service |
1d8f1c |
GdkPixbuf* pixbuf = NULL;
|
|
Packit Service |
1d8f1c |
gint fixed_width = 0;
|
|
Packit Service |
1d8f1c |
gint fixed_height = 0;
|
|
Packit Service |
1d8f1c |
gint _tmp0_ = 0;
|
|
Packit Service |
1d8f1c |
gint _tmp1_ = 0;
|
|
Packit Service |
1d8f1c |
GdkPixbuf* _tmp19_;
|
|
Packit Service |
1d8f1c |
gfloat width = 0.0F;
|
|
Packit Service |
1d8f1c |
GdkPixbuf* _tmp20_;
|
|
Packit Service |
1d8f1c |
gfloat height = 0.0F;
|
|
Packit Service |
1d8f1c |
GdkPixbuf* _tmp21_;
|
|
Packit Service |
1d8f1c |
gfloat _tmp22_ = 0.0F;
|
|
Packit Service |
1d8f1c |
gfloat _tmp23_;
|
|
Packit Service |
1d8f1c |
gfloat _tmp24_;
|
|
Packit Service |
1d8f1c |
gfloat scale = 0.0F;
|
|
Packit Service |
1d8f1c |
gint _tmp27_;
|
|
Packit Service |
1d8f1c |
gfloat _tmp28_;
|
|
Packit Service |
1d8f1c |
gfloat _tmp29_;
|
|
Packit Service |
1d8f1c |
gfloat _tmp30_;
|
|
Packit Service |
1d8f1c |
gfloat _tmp31_;
|
|
Packit Service |
1d8f1c |
GdkPixbuf* _tmp32_;
|
|
Packit Service |
1d8f1c |
gfloat _tmp33_;
|
|
Packit Service |
1d8f1c |
gfloat _tmp34_;
|
|
Packit Service |
1d8f1c |
GdkPixbuf* _tmp35_;
|
|
Packit Service |
1d8f1c |
GdkPixbuf* _tmp36_;
|
|
Packit Service |
1d8f1c |
GError * _inner_error_ = NULL;
|
|
Packit Service |
1d8f1c |
g_return_val_if_fail (icon_name_or_path != NULL, NULL);
|
|
Packit Service |
1d8f1c |
self = (IconWidget*) g_object_new (object_type, NULL);
|
|
Packit Service |
1d8f1c |
pixbuf = NULL;
|
|
Packit Service |
1d8f1c |
gtk_icon_size_lookup (size, &_tmp0_, &_tmp1_);
|
|
Packit Service |
1d8f1c |
fixed_width = _tmp0_;
|
|
Packit Service |
1d8f1c |
fixed_height = _tmp1_;
|
|
Packit Service |
1d8f1c |
{
|
|
Packit Service |
1d8f1c |
if (string_get (icon_name_or_path, (glong) 0) == '/') {
|
|
Packit Service |
1d8f1c |
GdkPixbuf* _tmp2_ = NULL;
|
|
Packit Service |
1d8f1c |
GdkPixbuf* _tmp3_;
|
|
Packit Service |
1d8f1c |
GdkPixbuf* _tmp4_;
|
|
Packit Service |
1d8f1c |
_tmp3_ = gdk_pixbuf_new_from_file (icon_name_or_path, &_inner_error_);
|
|
Packit Service |
1d8f1c |
_tmp2_ = _tmp3_;
|
|
Packit Service |
1d8f1c |
if (G_UNLIKELY (_inner_error_ != NULL)) {
|
|
Packit Service |
1d8f1c |
goto __catch2_g_error;
|
|
Packit Service |
1d8f1c |
}
|
|
Packit Service |
1d8f1c |
_tmp4_ = _tmp2_;
|
|
Packit Service |
1d8f1c |
_tmp2_ = NULL;
|
|
Packit Service |
1d8f1c |
_g_object_unref0 (pixbuf);
|
|
Packit Service |
1d8f1c |
pixbuf = _tmp4_;
|
|
Packit Service |
1d8f1c |
_g_object_unref0 (_tmp2_);
|
|
Packit Service |
1d8f1c |
} else {
|
|
Packit Service |
1d8f1c |
GtkIconTheme* theme = NULL;
|
|
Packit Service |
1d8f1c |
GtkIconTheme* _tmp5_;
|
|
Packit Service |
1d8f1c |
GtkIconTheme* _tmp6_;
|
|
Packit Service |
1d8f1c |
GdkPixbuf* _tmp7_ = NULL;
|
|
Packit Service |
1d8f1c |
GtkIconTheme* _tmp8_;
|
|
Packit Service |
1d8f1c |
gint _tmp9_;
|
|
Packit Service |
1d8f1c |
GdkPixbuf* _tmp10_;
|
|
Packit Service |
1d8f1c |
GdkPixbuf* _tmp11_;
|
|
Packit Service |
1d8f1c |
_tmp5_ = gtk_icon_theme_get_default ();
|
|
Packit Service |
1d8f1c |
_tmp6_ = _g_object_ref0 (_tmp5_);
|
|
Packit Service |
1d8f1c |
theme = _tmp6_;
|
|
Packit Service |
1d8f1c |
_tmp8_ = theme;
|
|
Packit Service |
1d8f1c |
_tmp9_ = fixed_width;
|
|
Packit Service |
1d8f1c |
_tmp10_ = gtk_icon_theme_load_icon (_tmp8_, icon_name_or_path, _tmp9_, 0, &_inner_error_);
|
|
Packit Service |
1d8f1c |
_tmp7_ = _tmp10_;
|
|
Packit Service |
1d8f1c |
if (G_UNLIKELY (_inner_error_ != NULL)) {
|
|
Packit Service |
1d8f1c |
_g_object_unref0 (theme);
|
|
Packit Service |
1d8f1c |
goto __catch2_g_error;
|
|
Packit Service |
1d8f1c |
}
|
|
Packit Service |
1d8f1c |
_tmp11_ = _tmp7_;
|
|
Packit Service |
1d8f1c |
_tmp7_ = NULL;
|
|
Packit Service |
1d8f1c |
_g_object_unref0 (pixbuf);
|
|
Packit Service |
1d8f1c |
pixbuf = _tmp11_;
|
|
Packit Service |
1d8f1c |
_g_object_unref0 (_tmp7_);
|
|
Packit Service |
1d8f1c |
_g_object_unref0 (theme);
|
|
Packit Service |
1d8f1c |
}
|
|
Packit Service |
1d8f1c |
}
|
|
Packit Service |
1d8f1c |
goto __finally2;
|
|
Packit Service |
1d8f1c |
__catch2_g_error:
|
|
Packit Service |
1d8f1c |
{
|
|
Packit Service |
1d8f1c |
GError* e = NULL;
|
|
Packit Service |
1d8f1c |
e = _inner_error_;
|
|
Packit Service |
1d8f1c |
_inner_error_ = NULL;
|
|
Packit Service |
1d8f1c |
{
|
|
Packit Service |
1d8f1c |
GtkIconTheme* theme = NULL;
|
|
Packit Service |
1d8f1c |
GtkIconTheme* _tmp12_;
|
|
Packit Service |
1d8f1c |
GtkIconTheme* _tmp13_;
|
|
Packit Service |
1d8f1c |
GdkPixbuf* _tmp14_ = NULL;
|
|
Packit Service |
1d8f1c |
GtkIconTheme* _tmp15_;
|
|
Packit Service |
1d8f1c |
gint _tmp16_;
|
|
Packit Service |
1d8f1c |
GdkPixbuf* _tmp17_;
|
|
Packit Service |
1d8f1c |
GdkPixbuf* _tmp18_;
|
|
Packit Service |
1d8f1c |
_tmp12_ = gtk_icon_theme_get_default ();
|
|
Packit Service |
1d8f1c |
_tmp13_ = _g_object_ref0 (_tmp12_);
|
|
Packit Service |
1d8f1c |
theme = _tmp13_;
|
|
Packit Service |
1d8f1c |
_tmp15_ = theme;
|
|
Packit Service |
1d8f1c |
_tmp16_ = fixed_width;
|
|
Packit Service |
1d8f1c |
_tmp17_ = gtk_icon_theme_load_icon (_tmp15_, "ibus-engine", _tmp16_, 0, &_inner_error_);
|
|
Packit Service |
1d8f1c |
_tmp14_ = _tmp17_;
|
|
Packit Service |
1d8f1c |
if (G_UNLIKELY (_inner_error_ != NULL)) {
|
|
Packit Service |
1d8f1c |
_g_object_unref0 (theme);
|
|
Packit Service |
1d8f1c |
goto __catch3_g_error;
|
|
Packit Service |
1d8f1c |
}
|
|
Packit Service |
1d8f1c |
_tmp18_ = _tmp14_;
|
|
Packit Service |
1d8f1c |
_tmp14_ = NULL;
|
|
Packit Service |
1d8f1c |
_g_object_unref0 (pixbuf);
|
|
Packit Service |
1d8f1c |
pixbuf = _tmp18_;
|
|
Packit Service |
1d8f1c |
_g_object_unref0 (_tmp14_);
|
|
Packit Service |
1d8f1c |
_g_object_unref0 (theme);
|
|
Packit Service |
1d8f1c |
}
|
|
Packit Service |
1d8f1c |
goto __finally3;
|
|
Packit Service |
1d8f1c |
__catch3_g_error:
|
|
Packit Service |
1d8f1c |
{
|
|
Packit Service |
1d8f1c |
GError* e = NULL;
|
|
Packit Service |
1d8f1c |
e = _inner_error_;
|
|
Packit Service |
1d8f1c |
_inner_error_ = NULL;
|
|
Packit Service |
1d8f1c |
gtk_image_set_from_icon_name ((GtkImage*) self, "image-missing", (GtkIconSize) size);
|
|
Packit Service |
1d8f1c |
_g_error_free0 (e);
|
|
Packit Service |
1d8f1c |
_g_error_free0 (e);
|
|
Packit Service |
1d8f1c |
_g_object_unref0 (pixbuf);
|
|
Packit Service |
1d8f1c |
return self;
|
|
Packit Service |
1d8f1c |
}
|
|
Packit Service |
1d8f1c |
__finally3:
|
|
Packit Service |
1d8f1c |
if (G_UNLIKELY (_inner_error_ != NULL)) {
|
|
Packit Service |
1d8f1c |
_g_error_free0 (e);
|
|
Packit Service |
1d8f1c |
_g_error_free0 (e);
|
|
Packit Service |
1d8f1c |
_g_object_unref0 (pixbuf);
|
|
Packit Service |
1d8f1c |
g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
|
|
Packit Service |
1d8f1c |
g_clear_error (&_inner_error_);
|
|
Packit Service |
1d8f1c |
return NULL;
|
|
Packit Service |
1d8f1c |
}
|
|
Packit Service |
1d8f1c |
_g_error_free0 (e);
|
|
Packit Service |
1d8f1c |
}
|
|
Packit Service |
1d8f1c |
__finally2:
|
|
Packit Service |
1d8f1c |
if (G_UNLIKELY (_inner_error_ != NULL)) {
|
|
Packit Service |
1d8f1c |
_g_object_unref0 (pixbuf);
|
|
Packit Service |
1d8f1c |
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);
|
|
Packit Service |
1d8f1c |
g_clear_error (&_inner_error_);
|
|
Packit Service |
1d8f1c |
return NULL;
|
|
Packit Service |
1d8f1c |
}
|
|
Packit Service |
1d8f1c |
_tmp19_ = pixbuf;
|
|
Packit Service |
1d8f1c |
if (_tmp19_ == NULL) {
|
|
Packit Service |
1d8f1c |
_g_object_unref0 (pixbuf);
|
|
Packit Service |
1d8f1c |
return self;
|
|
Packit Service |
1d8f1c |
}
|
|
Packit Service |
1d8f1c |
_tmp20_ = pixbuf;
|
|
Packit Service |
1d8f1c |
width = (gfloat) gdk_pixbuf_get_width (_tmp20_);
|
|
Packit Service |
1d8f1c |
_tmp21_ = pixbuf;
|
|
Packit Service |
1d8f1c |
height = (gfloat) gdk_pixbuf_get_height (_tmp21_);
|
|
Packit Service |
1d8f1c |
_tmp23_ = width;
|
|
Packit Service |
1d8f1c |
_tmp24_ = height;
|
|
Packit Service |
1d8f1c |
if (_tmp23_ > _tmp24_) {
|
|
Packit Service |
1d8f1c |
gfloat _tmp25_;
|
|
Packit Service |
1d8f1c |
_tmp25_ = width;
|
|
Packit Service |
1d8f1c |
_tmp22_ = _tmp25_;
|
|
Packit Service |
1d8f1c |
} else {
|
|
Packit Service |
1d8f1c |
gfloat _tmp26_;
|
|
Packit Service |
1d8f1c |
_tmp26_ = height;
|
|
Packit Service |
1d8f1c |
_tmp22_ = _tmp26_;
|
|
Packit Service |
1d8f1c |
}
|
|
Packit Service |
1d8f1c |
_tmp27_ = fixed_width;
|
|
Packit Service |
1d8f1c |
scale = _tmp27_ / _tmp22_;
|
|
Packit Service |
1d8f1c |
_tmp28_ = width;
|
|
Packit Service |
1d8f1c |
_tmp29_ = scale;
|
|
Packit Service |
1d8f1c |
width = _tmp28_ * _tmp29_;
|
|
Packit Service |
1d8f1c |
_tmp30_ = height;
|
|
Packit Service |
1d8f1c |
_tmp31_ = scale;
|
|
Packit Service |
1d8f1c |
height = _tmp30_ * _tmp31_;
|
|
Packit Service |
1d8f1c |
_tmp32_ = pixbuf;
|
|
Packit Service |
1d8f1c |
_tmp33_ = width;
|
|
Packit Service |
1d8f1c |
_tmp34_ = height;
|
|
Packit Service |
1d8f1c |
_tmp35_ = gdk_pixbuf_scale_simple (_tmp32_, (gint) _tmp33_, (gint) _tmp34_, GDK_INTERP_BILINEAR);
|
|
Packit Service |
1d8f1c |
_g_object_unref0 (pixbuf);
|
|
Packit Service |
1d8f1c |
pixbuf = _tmp35_;
|
|
Packit Service |
1d8f1c |
_tmp36_ = pixbuf;
|
|
Packit Service |
1d8f1c |
gtk_image_set_from_pixbuf ((GtkImage*) self, _tmp36_);
|
|
Packit Service |
1d8f1c |
gtk_widget_show ((GtkWidget*) self);
|
|
Packit Service |
1d8f1c |
_g_object_unref0 (pixbuf);
|
|
Packit Service |
1d8f1c |
return self;
|
|
Packit Service |
1d8f1c |
}
|
|
Packit Service |
1d8f1c |
|
|
Packit Service |
1d8f1c |
|
|
Packit Service |
1d8f1c |
IconWidget*
|
|
Packit Service |
1d8f1c |
icon_widget_new (const gchar* icon_name_or_path,
|
|
Packit Service |
1d8f1c |
GtkIconSize size)
|
|
Packit Service |
1d8f1c |
{
|
|
Packit Service |
1d8f1c |
return icon_widget_construct (TYPE_ICON_WIDGET, icon_name_or_path, size);
|
|
Packit Service |
1d8f1c |
}
|
|
Packit Service |
1d8f1c |
|
|
Packit Service |
1d8f1c |
|
|
Packit Service |
1d8f1c |
static void
|
|
Packit Service |
1d8f1c |
icon_widget_class_init (IconWidgetClass * klass)
|
|
Packit Service |
1d8f1c |
{
|
|
Packit Service |
1d8f1c |
icon_widget_parent_class = g_type_class_peek_parent (klass);
|
|
Packit Service |
1d8f1c |
}
|
|
Packit Service |
1d8f1c |
|
|
Packit Service |
1d8f1c |
|
|
Packit Service |
1d8f1c |
static void
|
|
Packit Service |
1d8f1c |
icon_widget_instance_init (IconWidget * self)
|
|
Packit Service |
1d8f1c |
{
|
|
Packit Service |
1d8f1c |
}
|
|
Packit Service |
1d8f1c |
|
|
Packit Service |
1d8f1c |
|
|
Packit Service |
1d8f1c |
GType
|
|
Packit Service |
1d8f1c |
icon_widget_get_type (void)
|
|
Packit Service |
1d8f1c |
{
|
|
Packit Service |
1d8f1c |
static volatile gsize icon_widget_type_id__volatile = 0;
|
|
Packit Service |
1d8f1c |
if (g_once_init_enter (&icon_widget_type_id__volatile)) {
|
|
Packit Service |
1d8f1c |
static const GTypeInfo g_define_type_info = { sizeof (IconWidgetClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) icon_widget_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (IconWidget), 0, (GInstanceInitFunc) icon_widget_instance_init, NULL };
|
|
Packit Service |
1d8f1c |
GType icon_widget_type_id;
|
|
Packit Service |
1d8f1c |
icon_widget_type_id = g_type_register_static (gtk_image_get_type (), "IconWidget", &g_define_type_info, 0);
|
|
Packit Service |
1d8f1c |
g_once_init_leave (&icon_widget_type_id__volatile, icon_widget_type_id);
|
|
Packit Service |
1d8f1c |
}
|
|
Packit Service |
1d8f1c |
return icon_widget_type_id__volatile;
|
|
Packit Service |
1d8f1c |
}
|
|
Packit Service |
1d8f1c |
|
|
Packit Service |
1d8f1c |
|
|
Packit Service |
1d8f1c |
|