[ekiga/ds-gtk-application] GmCellRenderer: Updated widget so that it works with latest GTK+.
- From: Damien Sandras <dsandras src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [ekiga/ds-gtk-application] GmCellRenderer: Updated widget so that it works with latest GTK+.
- Date: Sun, 26 Oct 2014 13:10:07 +0000 (UTC)
commit 57a17e0467c10e6386b8afa7d290e0e3b00b34fb
Author: Damien Sandras <dsandras seconix com>
Date: Sat Oct 18 10:56:42 2014 +0200
GmCellRenderer: Updated widget so that it works with latest GTK+.
Ensure we use the theme size for the created expander.
lib/gui/gmcellrendererexpander.c | 556 ++++++++++++++++++++------------------
lib/gui/gmcellrendererexpander.h | 60 +++--
2 files changed, 328 insertions(+), 288 deletions(-)
---
diff --git a/lib/gui/gmcellrendererexpander.c b/lib/gui/gmcellrendererexpander.c
index 55e4531..e45795e 100644
--- a/lib/gui/gmcellrendererexpander.c
+++ b/lib/gui/gmcellrendererexpander.c
@@ -1,24 +1,40 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
+
+/* Ekiga -- A VoIP and Video-Conferencing application
+ * Copyright (C) 2000-2014 Damien Sandras <dsandras seconix com>
* Copyright (C) 2006-2007 Imendio AB
* Copyright (C) 2007-2011 Collabora Ltd.
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * You should have received a copy of the GNU General Public
- * License along with this program; if not, write to the
- * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
- * Boston, MA 02110-1301 USA
*
- * Authors: Kristian Rietveld <kris imendio com>
+ * Ekiga is licensed under the GPL license and as a special exception,
+ * you have permission to link or otherwise combine this program with the
+ * programs OPAL, OpenH323 and PWLIB, and distribute the combination,
+ * without applying the requirements of the GNU GPL to the OPAL, OpenH323
+ * and PWLIB programs, as long as you do follow the requirements of the
+ * GNU GPL for all the rest of the software thus combined.
+ */
+
+
+/*
+ * gm-cell-renderer-expander.c - description
+ * ------------------------------------------
+ * authors: : Kristian Rietveld <kris imendio com>
+ * Damien Sandras <dsandras beip be>
+ * description : Implementation of an Expander GtkCellRenderer
+ *
*/
#include <gtk/gtk.h>
@@ -26,320 +42,326 @@
#include "gmcellrendererexpander.h"
typedef struct {
- GtkExpanderStyle expander_style;
- gint expander_size;
-
- guint activatable : 1;
+ guint expander_size;
+ guint activatable : 1;
} GmCellRendererExpanderPriv;
enum {
PROP_0,
- PROP_EXPANDER_STYLE,
PROP_EXPANDER_SIZE,
PROP_ACTIVATABLE
};
-static void gm_cell_renderer_expander_get_property (GObject *object,
- guint param_id,
- GValue *value,
- GParamSpec *pspec);
-static void gm_cell_renderer_expander_set_property (GObject *object,
- guint param_id,
- const GValue *value,
- GParamSpec *pspec);
-static void gm_cell_renderer_expander_finalize (GObject *object);
-static void gm_cell_renderer_expander_get_size (GtkCellRenderer *cell,
- GtkWidget *widget,
- const GdkRectangle *cell_area,
- gint *x_offset,
- gint *y_offset,
- gint *width,
- gint *height);
-static void gm_cell_renderer_expander_render (GtkCellRenderer *cell,
- cairo_t *cr,
- GtkWidget *widget,
- const GdkRectangle *background_area,
- const GdkRectangle *cell_area,
- GtkCellRendererState flags);
-static gboolean gm_cell_renderer_expander_activate (GtkCellRenderer *cell,
- GdkEvent *event,
- GtkWidget *widget,
- const gchar *path,
- const GdkRectangle *background_area,
- const GdkRectangle *cell_area,
- GtkCellRendererState flags);
+static void gm_cell_renderer_expander_get_property (GObject *object,
+ guint param_id,
+ GValue *value,
+ GParamSpec *pspec);
+
+static void gm_cell_renderer_expander_set_property (GObject *object,
+ guint param_id,
+ const GValue *value,
+ GParamSpec *pspec);
+
+static void gm_cell_renderer_expander_finalize (GObject *object);
+
+static void gm_cell_renderer_expander_get_size (GtkCellRenderer *cell,
+ GtkWidget *widget,
+ const GdkRectangle *cell_area,
+ gint *x_offset,
+ gint *y_offset,
+ gint *width,
+ gint *height);
+
+static void gm_cell_renderer_expander_render (GtkCellRenderer *cell,
+ cairo_t *cr,
+ GtkWidget *widget,
+ const GdkRectangle *background_area,
+ const GdkRectangle *cell_area,
+ GtkCellRendererState flags);
+
+static gboolean gm_cell_renderer_expander_activate (GtkCellRenderer *cell,
+ GdkEvent *event,
+ GtkWidget *widget,
+ const gchar *path,
+ const GdkRectangle *background_area,
+ const GdkRectangle *cell_area,
+ GtkCellRendererState flags);
G_DEFINE_TYPE (GmCellRendererExpander, gm_cell_renderer_expander, GTK_TYPE_CELL_RENDERER)
static void
gm_cell_renderer_expander_init (GmCellRendererExpander *expander)
{
- GmCellRendererExpanderPriv *priv = G_TYPE_INSTANCE_GET_PRIVATE (expander,
- GM_TYPE_CELL_RENDERER_EXPANDER, GmCellRendererExpanderPriv);
-
- expander->priv = priv;
- priv->expander_style = GTK_EXPANDER_COLLAPSED;
- priv->expander_size = 12;
- priv->activatable = TRUE;
-
- g_object_set (expander,
- "xpad", 2,
- "ypad", 2,
- "mode", GTK_CELL_RENDERER_MODE_ACTIVATABLE,
- NULL);
+ GmCellRendererExpanderPriv *priv =
+ G_TYPE_INSTANCE_GET_PRIVATE (expander,
+ GM_TYPE_CELL_RENDERER_EXPANDER,
+ GmCellRendererExpanderPriv);
+
+ expander->priv = priv;
+ priv->expander_size = 0;
+ priv->activatable = TRUE;
+
+ g_object_set (expander,
+ "xpad", 6,
+ "ypad", 6,
+ "mode", GTK_CELL_RENDERER_MODE_ACTIVATABLE,
+ "is-expander", TRUE,
+ NULL);
}
+
static void
gm_cell_renderer_expander_class_init (GmCellRendererExpanderClass *klass)
{
- GObjectClass *object_class;
- GtkCellRendererClass *cell_class;
-
- object_class = G_OBJECT_CLASS (klass);
- cell_class = GTK_CELL_RENDERER_CLASS (klass);
-
- object_class->finalize = gm_cell_renderer_expander_finalize;
-
- object_class->get_property = gm_cell_renderer_expander_get_property;
- object_class->set_property = gm_cell_renderer_expander_set_property;
-
- cell_class->get_size = gm_cell_renderer_expander_get_size;
- cell_class->render = gm_cell_renderer_expander_render;
- cell_class->activate = gm_cell_renderer_expander_activate;
-
- g_object_class_install_property (object_class,
- PROP_EXPANDER_STYLE,
- g_param_spec_enum ("expander-style",
- "Expander Style",
- "Style to use when painting the expander",
- GTK_TYPE_EXPANDER_STYLE,
- GTK_EXPANDER_COLLAPSED,
- G_PARAM_READWRITE));
-
- g_object_class_install_property (object_class,
- PROP_EXPANDER_SIZE,
- g_param_spec_int ("expander-size",
- "Expander Size",
- "The size of the expander",
- 0,
- G_MAXINT,
- 12,
- G_PARAM_READWRITE));
-
- g_object_class_install_property (object_class,
- PROP_ACTIVATABLE,
- g_param_spec_boolean ("activatable",
- "Activatable",
- "The expander can be activated",
- TRUE,
- G_PARAM_READWRITE));
-
- g_type_class_add_private (object_class, sizeof (GmCellRendererExpanderPriv));
+ GObjectClass *object_class = NULL;
+ GtkCellRendererClass *cell_class = NULL;
+
+ object_class = G_OBJECT_CLASS (klass);
+ cell_class = GTK_CELL_RENDERER_CLASS (klass);
+
+ object_class->finalize = gm_cell_renderer_expander_finalize;
+
+ object_class->get_property = gm_cell_renderer_expander_get_property;
+ object_class->set_property = gm_cell_renderer_expander_set_property;
+
+ cell_class->get_size = gm_cell_renderer_expander_get_size;
+ cell_class->render = gm_cell_renderer_expander_render;
+ cell_class->activate = gm_cell_renderer_expander_activate;
+
+ g_object_class_install_property (object_class,
+ PROP_EXPANDER_SIZE,
+ g_param_spec_int ("expander-size",
+ "Expander Size",
+ "The size of the expander",
+ 0,
+ G_MAXINT,
+ 0,
+ G_PARAM_READWRITE));
+
+ g_object_class_install_property (object_class,
+ PROP_ACTIVATABLE,
+ g_param_spec_boolean ("activatable",
+ "Activatable",
+ "The expander can be activated",
+ TRUE,
+ G_PARAM_READWRITE));
+
+ g_type_class_add_private (object_class, sizeof (GmCellRendererExpanderPriv));
}
+
static void
-gm_cell_renderer_expander_get_property (GObject *object,
- guint param_id,
- GValue *value,
+gm_cell_renderer_expander_get_property (GObject *object,
+ guint param_id,
+ GValue *value,
GParamSpec *pspec)
{
- GmCellRendererExpander *expander;
- GmCellRendererExpanderPriv *priv;
-
- expander = GM_CELL_RENDERER_EXPANDER (object);
- priv = expander->priv;
+ GmCellRendererExpander *expander = NULL;
+ GmCellRendererExpanderPriv *priv = NULL;
- switch (param_id) {
- case PROP_EXPANDER_STYLE:
- g_value_set_enum (value, priv->expander_style);
- break;
+ expander = GM_CELL_RENDERER_EXPANDER (object);
+ priv = expander->priv;
- case PROP_EXPANDER_SIZE:
- g_value_set_int (value, priv->expander_size);
- break;
+ switch (param_id) {
+ case PROP_EXPANDER_SIZE:
+ g_value_set_int (value, priv->expander_size);
+ break;
- case PROP_ACTIVATABLE:
- g_value_set_boolean (value, priv->activatable);
- break;
+ case PROP_ACTIVATABLE:
+ g_value_set_boolean (value, priv->activatable);
+ break;
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, param_id, pspec);
- break;
- }
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, param_id, pspec);
+ break;
+ }
}
+
static void
-gm_cell_renderer_expander_set_property (GObject *object,
- guint param_id,
+gm_cell_renderer_expander_set_property (GObject *object,
+ guint param_id,
const GValue *value,
- GParamSpec *pspec)
+ GParamSpec *pspec)
{
- GmCellRendererExpander *expander;
- GmCellRendererExpanderPriv *priv;
-
- expander = GM_CELL_RENDERER_EXPANDER (object);
- priv = expander->priv;
+ GmCellRendererExpander *expander = NULL;
+ GmCellRendererExpanderPriv *priv = NULL;
- switch (param_id) {
- case PROP_EXPANDER_STYLE:
- priv->expander_style = g_value_get_enum (value);
- break;
+ expander = GM_CELL_RENDERER_EXPANDER (object);
+ priv = expander->priv;
- case PROP_EXPANDER_SIZE:
- priv->expander_size = g_value_get_int (value);
- break;
+ switch (param_id) {
+ case PROP_EXPANDER_SIZE:
+ priv->expander_size = g_value_get_int (value);
+ break;
- case PROP_ACTIVATABLE:
- priv->activatable = g_value_get_boolean (value);
- break;
+ case PROP_ACTIVATABLE:
+ priv->activatable = g_value_get_boolean (value);
+ break;
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, param_id, pspec);
- break;
- }
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, param_id, pspec);
+ break;
+ }
}
+
static void
gm_cell_renderer_expander_finalize (GObject *object)
{
- (* G_OBJECT_CLASS (gm_cell_renderer_expander_parent_class)->finalize) (object);
+ (* G_OBJECT_CLASS (gm_cell_renderer_expander_parent_class)->finalize) (object);
}
-GtkCellRenderer *
-gm_cell_renderer_expander_new (void)
-{
- return g_object_new (GM_TYPE_CELL_RENDERER_EXPANDER, NULL);
-}
static void
-gm_cell_renderer_expander_get_size (GtkCellRenderer *cell,
- G_GNUC_UNUSED GtkWidget *widget,
- const GdkRectangle *cell_area,
- gint *x_offset,
- gint *y_offset,
- gint *width,
- gint *height)
+gm_cell_renderer_expander_get_size (GtkCellRenderer *cell,
+ GtkWidget *widget,
+ const GdkRectangle *cell_area,
+ gint *x_offset,
+ gint *y_offset,
+ gint *width,
+ gint *height)
{
- GmCellRendererExpander *expander;
- GmCellRendererExpanderPriv *priv;
- gfloat xalign, yalign;
- guint xpad, ypad;
-
- expander = (GmCellRendererExpander *) cell;
- priv = expander->priv;
-
- g_object_get (cell,
- "xalign", &xalign,
- "yalign", &yalign,
- "xpad", &xpad,
- "ypad", &ypad,
- NULL);
-
- if (cell_area) {
- if (x_offset) {
- *x_offset = xalign * (cell_area->width - (priv->expander_size + (2 * xpad)));
- *x_offset = MAX (*x_offset, 0);
- }
-
- if (y_offset) {
- *y_offset = yalign * (cell_area->height - (priv->expander_size + (2 * ypad)));
- *y_offset = MAX (*y_offset, 0);
- }
- } else {
- if (x_offset)
- *x_offset = 0;
-
- if (y_offset)
- *y_offset = 0;
- }
-
- if (width)
- *width = xpad * 2 + priv->expander_size;
-
- if (height)
- *height = ypad * 2 + priv->expander_size;
+ GmCellRendererExpander *expander = NULL;
+ GmCellRendererExpanderPriv *priv = NULL;
+ gfloat xalign, yalign = 0;
+ guint xpad, ypad = 0;
+
+ expander = (GmCellRendererExpander *) cell;
+ priv = expander->priv;
+
+ if (priv->expander_size == 0)
+ gtk_widget_style_get (widget, "expander_size", &priv->expander_size, NULL);
+
+ g_object_get (cell,
+ "xalign", &xalign,
+ "yalign", &yalign,
+ "xpad", &xpad,
+ "ypad", &ypad,
+ NULL);
+
+ if (cell_area) {
+ if (x_offset) {
+ *x_offset = xalign * (cell_area->width - (priv->expander_size + (2 * xpad)));
+ *x_offset = MAX (*x_offset, 0);
+ }
+
+ if (y_offset) {
+ *y_offset = yalign * (cell_area->height - (priv->expander_size + (2 * ypad)));
+ *y_offset = MAX (*y_offset, 0);
+ }
+ } else {
+ if (x_offset)
+ *x_offset = 0;
+
+ if (y_offset)
+ *y_offset = 0;
+ }
+
+ if (width)
+ *width = xpad * 2 + priv->expander_size;
+
+ if (height)
+ *height = ypad * 2 + priv->expander_size;
}
+
static void
-gm_cell_renderer_expander_render (GtkCellRenderer *cell,
- cairo_t *cr,
- GtkWidget *widget,
- G_GNUC_UNUSED const GdkRectangle *background_area,
- const GdkRectangle *cell_area,
- GtkCellRendererState flags)
+gm_cell_renderer_expander_render (GtkCellRenderer *cell,
+ cairo_t *cr,
+ GtkWidget *widget,
+ G_GNUC_UNUSED const GdkRectangle *background_area,
+ const GdkRectangle *cell_area,
+ GtkCellRendererState flags)
{
- GmCellRendererExpander *expander;
- GmCellRendererExpanderPriv *priv;
- gint x_offset, y_offset;
- guint xpad, ypad;
- GtkStyleContext *style;
- GtkStateFlags state;
-
- expander = (GmCellRendererExpander *) cell;
- priv = expander->priv;
-
- gm_cell_renderer_expander_get_size (cell, widget,
- (GdkRectangle *) cell_area,
- &x_offset, &y_offset,
- NULL, NULL);
-
- g_object_get (cell,
- "xpad", &xpad,
- "ypad", &ypad,
- NULL);
-
- style = gtk_widget_get_style_context (widget);
-
- gtk_style_context_save (style);
- gtk_style_context_add_class (style, GTK_STYLE_CLASS_EXPANDER);
-
- state = gtk_cell_renderer_get_state (cell, widget, flags);
-
- if (priv->expander_style == GTK_EXPANDER_COLLAPSED)
- state |= GTK_STATE_FLAG_NORMAL;
- else
- state |= GTK_STATE_FLAG_ACTIVE;
-
- gtk_style_context_set_state (style, state);
-
- gtk_render_expander (style,
- cr,
- cell_area->x + x_offset + xpad,
- cell_area->y + y_offset + ypad,
- priv->expander_size,
- priv->expander_size);
-
- gtk_style_context_restore (style);
+ GmCellRendererExpander *expander = NULL;
+ GmCellRendererExpanderPriv *priv = NULL;
+ gint x_offset, y_offset;
+ guint xpad, ypad;
+ gboolean expanded;
+ GtkStyleContext *style;
+ GtkStateFlags state;
+
+ expander = (GmCellRendererExpander *) cell;
+ priv = expander->priv;
+ if (priv->expander_size == 0)
+ gtk_widget_style_get (widget, "expander_size", &priv->expander_size, NULL);
+
+ gm_cell_renderer_expander_get_size (cell, widget,
+ (GdkRectangle *) cell_area,
+ &x_offset, &y_offset,
+ NULL, NULL);
+
+ g_object_get (cell,
+ "is-expanded", &expanded,
+ "xpad", &xpad,
+ "ypad", &ypad,
+ NULL);
+
+ style = gtk_widget_get_style_context (widget);
+
+ gtk_style_context_save (style);
+ gtk_style_context_add_class (style, GTK_STYLE_CLASS_EXPANDER);
+
+ state = gtk_cell_renderer_get_state (cell, widget, flags);
+
+ if (!expanded)
+ state |= GTK_STATE_FLAG_NORMAL;
+ else
+#if GTK_CHECK_VERSION(3,13,7)
+ state |= GTK_STATE_FLAG_CHECKED;
+#else
+ state |= GTK_STATE_FLAG_ACTIVE;
+#endif
+
+ gtk_style_context_set_state (style, state);
+
+ gtk_render_expander (style,
+ cr,
+ cell_area->x + x_offset + xpad,
+ cell_area->y + y_offset + ypad,
+ priv->expander_size,
+ priv->expander_size);
+
+ gtk_style_context_restore (style);
}
+
static gboolean
-gm_cell_renderer_expander_activate (GtkCellRenderer *cell,
- G_GNUC_UNUSED GdkEvent *event,
- GtkWidget *widget,
- const gchar *path_string,
- G_GNUC_UNUSED const GdkRectangle *background_area,
- G_GNUC_UNUSED const GdkRectangle *cell_area,
+gm_cell_renderer_expander_activate (GtkCellRenderer *cell,
+ G_GNUC_UNUSED GdkEvent *event,
+ GtkWidget *widget,
+ const gchar *path_string,
+ G_GNUC_UNUSED const GdkRectangle *background_area,
+ G_GNUC_UNUSED const GdkRectangle *cell_area,
G_GNUC_UNUSED GtkCellRendererState flags)
{
- GmCellRendererExpander *expander;
- GmCellRendererExpanderPriv *priv;
- GtkTreePath *path;
+ GmCellRendererExpander *expander = NULL;
+ GmCellRendererExpanderPriv *priv = NULL;
+ GtkTreePath *path = NULL;
- expander = (GmCellRendererExpander *) cell;
- priv = expander->priv;
+ expander = (GmCellRendererExpander *) cell;
+ priv = expander->priv;
- if (!GTK_IS_TREE_VIEW (widget) || !priv->activatable)
- return FALSE;
+ if (!GTK_IS_TREE_VIEW (widget) || !priv->activatable)
+ return FALSE;
- path = gtk_tree_path_new_from_string (path_string);
+ path = gtk_tree_path_new_from_string (path_string);
- if (gtk_tree_view_row_expanded (GTK_TREE_VIEW (widget), path)) {
- gtk_tree_view_collapse_row (GTK_TREE_VIEW (widget), path);
- } else {
- gtk_tree_view_expand_row (GTK_TREE_VIEW (widget), path, FALSE);
- }
+ if (gtk_tree_view_row_expanded (GTK_TREE_VIEW (widget), path)) {
+ gtk_tree_view_collapse_row (GTK_TREE_VIEW (widget), path);
+ } else {
+ gtk_tree_view_expand_row (GTK_TREE_VIEW (widget), path, FALSE);
+ }
- gtk_tree_path_free (path);
+ gtk_tree_path_free (path);
+
+ return TRUE;
+}
- return TRUE;
+
+GtkCellRenderer *
+gm_cell_renderer_expander_new (void)
+{
+ return g_object_new (GM_TYPE_CELL_RENDERER_EXPANDER, NULL);
}
diff --git a/lib/gui/gmcellrendererexpander.h b/lib/gui/gmcellrendererexpander.h
index 2b4c224..92bf6b6 100644
--- a/lib/gui/gmcellrendererexpander.h
+++ b/lib/gui/gmcellrendererexpander.h
@@ -1,25 +1,43 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
+
+/* Ekiga -- A VoIP and Video-Conferencing application
+ * Copyright (C) 2000-2014 Damien Sandras <dsandras seconix com>
* Copyright (C) 2006-2007 Imendio AB
+ * Copyright (C) 2007-2011 Collabora Ltd.
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * You should have received a copy of the GNU General Public
- * License along with this program; if not, write to the
- * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
- * Boston, MA 02110-1301 USA
*
- * Authors: Kristian Rietveld <kris imendio com>
+ * Ekiga is licensed under the GPL license and as a special exception,
+ * you have permission to link or otherwise combine this program with the
+ * programs OPAL, OpenH323 and PWLIB, and distribute the combination,
+ * without applying the requirements of the GNU GPL to the OPAL, OpenH323
+ * and PWLIB programs, as long as you do follow the requirements of the
+ * GNU GPL for all the rest of the software thus combined.
*/
+
+/*
+ * gm-cell-renderer-expander.h - description
+ * ------------------------------------------
+ * authors: : Kristian Rietveld <kris imendio com>
+ * Damien Sandras <dsandras beip be>
+ * description : Implementation of an Expander GtkCellRenderer
+ *
+ */
+
+
#ifndef __GM_CELL_RENDERER_EXPANDER_H__
#define __GM_CELL_RENDERER_EXPANDER_H__
@@ -27,12 +45,12 @@
G_BEGIN_DECLS
-#define GM_TYPE_CELL_RENDERER_EXPANDER (gm_cell_renderer_expander_get_type ())
-#define GM_CELL_RENDERER_EXPANDER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj),
GM_TYPE_CELL_RENDERER_EXPANDER, GmCellRendererExpander))
-#define GM_CELL_RENDERER_EXPANDER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass),
GM_TYPE_CELL_RENDERER_EXPANDER, GmCellRendererExpanderClass))
-#define GM_IS_CELL_RENDERER_EXPANDER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj),
GM_TYPE_CELL_RENDERER_EXPANDER))
-#define GM_IS_CELL_RENDERER_EXPANDER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass),
GM_TYPE_CELL_RENDERER_EXPANDER))
-#define GM_CELL_RENDERER_EXPANDER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj),
GM_TYPE_CELL_RENDERER_EXPANDER, GmCellRendererExpanderClass))
+#define GM_TYPE_CELL_RENDERER_EXPANDER (gm_cell_renderer_expander_get_type ())
+#define GM_CELL_RENDERER_EXPANDER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GM_TYPE_CELL_RENDERER_EXPANDER,
GmCellRendererExpander))
+#define GM_CELL_RENDERER_EXPANDER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass),
GM_TYPE_CELL_RENDERER_EXPANDER, GmCellRendererExpanderClass))
+#define GM_IS_CELL_RENDERER_EXPANDER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj),
GM_TYPE_CELL_RENDERER_EXPANDER))
+#define GM_IS_CELL_RENDERER_EXPANDER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass),
GM_TYPE_CELL_RENDERER_EXPANDER))
+#define GM_CELL_RENDERER_EXPANDER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj),
GM_TYPE_CELL_RENDERER_EXPANDER, GmCellRendererExpanderClass))
typedef struct _GmCellRendererExpander GmCellRendererExpander;
typedef struct _GmCellRendererExpanderClass GmCellRendererExpanderClass;
@@ -52,8 +70,8 @@ struct _GmCellRendererExpanderClass {
void (*_gtk_reserved4) (void);
};
-GType gm_cell_renderer_expander_get_type (void) G_GNUC_CONST;
-GtkCellRenderer *gm_cell_renderer_expander_new (void);
+GType gm_cell_renderer_expander_get_type (void) G_GNUC_CONST;
+GtkCellRenderer *gm_cell_renderer_expander_new (void);
G_END_DECLS
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]