[gtk+] Add API for the sealed member "activatable"
- From: Michael Natterer <mitch src gnome org>
- To: svn-commits-list gnome org
- Subject: [gtk+] Add API for the sealed member "activatable"
- Date: Mon, 13 Jul 2009 23:54:23 +0000 (UTC)
commit 66ae394eb5681f16b8c47a88fccc9f0136438726
Author: Michael Natterer <mitch gimp org>
Date: Tue Jul 14 01:53:56 2009 +0200
Add API for the sealed member "activatable"
gtk/gtk.symbols | 2 ++
gtk/gtkcellrenderertoggle.c | 41 +++++++++++++++++++++++++++++++++++++++++
gtk/gtkcellrenderertoggle.h | 20 ++++++++++++--------
3 files changed, 55 insertions(+), 8 deletions(-)
---
diff --git a/gtk/gtk.symbols b/gtk/gtk.symbols
index ba2dd08..aa0e34f 100644
--- a/gtk/gtk.symbols
+++ b/gtk/gtk.symbols
@@ -685,10 +685,12 @@ gtk_cell_renderer_text_set_fixed_height_from_font
#if IN_HEADER(__GTK_CELL_RENDERER_TOGGLE_H__)
#if IN_FILE(__GTK_CELL_RENDERER_TOGGLE_C__)
+gtk_cell_renderer_toggle_get_activatable
gtk_cell_renderer_toggle_get_active
gtk_cell_renderer_toggle_get_radio
gtk_cell_renderer_toggle_get_type G_GNUC_CONST
gtk_cell_renderer_toggle_new
+gtk_cell_renderer_toggle_set_activatable
gtk_cell_renderer_toggle_set_active
gtk_cell_renderer_toggle_set_radio
#endif
diff --git a/gtk/gtkcellrenderertoggle.c b/gtk/gtkcellrenderertoggle.c
index 5cc826c..008c841 100644
--- a/gtk/gtkcellrenderertoggle.c
+++ b/gtk/gtkcellrenderertoggle.c
@@ -482,5 +482,46 @@ gtk_cell_renderer_toggle_set_active (GtkCellRendererToggle *toggle,
g_object_set (toggle, "active", setting ? TRUE : FALSE, NULL);
}
+/**
+ * gtk_cell_renderer_toggle_get_activatable:
+ * @toggle: a #GtkCellRendererToggle
+ *
+ * Returns whether the cell renderer is activatable. See
+ * gtk_cell_renderer_toggle_set_activatable().
+ *
+ * Return value: %TRUE if the cell renderer is activatable.
+ *
+ * Since: 2.18
+ **/
+gboolean
+gtk_cell_renderer_toggle_get_activatable (GtkCellRendererToggle *toggle)
+{
+ g_return_val_if_fail (GTK_IS_CELL_RENDERER_TOGGLE (toggle), FALSE);
+
+ return toggle->activatable;
+}
+
+/**
+ * gtk_cell_renderer_toggle_set_activatable:
+ * @toggle: a #GtkCellRendererToggle.
+ * @setting: the value to set.
+ *
+ * Makes the cell renderer activatable.
+ *
+ * Since: 2.18
+ **/
+void
+gtk_cell_renderer_toggle_set_activatable (GtkCellRendererToggle *toggle,
+ gboolean setting)
+{
+ g_return_if_fail (GTK_IS_CELL_RENDERER_TOGGLE (toggle));
+
+ if (toggle->activatable != setting)
+ {
+ toggle->activatable = setting ? TRUE : FALSE;
+ g_object_notify (G_OBJECT (toggle), "activatable");
+ }
+}
+
#define __GTK_CELL_RENDERER_TOGGLE_C__
#include "gtkaliasdef.c"
diff --git a/gtk/gtkcellrenderertoggle.h b/gtk/gtkcellrenderertoggle.h
index c9b85a1..cf6a3c2 100644
--- a/gtk/gtkcellrenderertoggle.h
+++ b/gtk/gtkcellrenderertoggle.h
@@ -64,16 +64,20 @@ struct _GtkCellRendererToggleClass
void (*_gtk_reserved4) (void);
};
-GType gtk_cell_renderer_toggle_get_type (void) G_GNUC_CONST;
-GtkCellRenderer *gtk_cell_renderer_toggle_new (void);
+GType gtk_cell_renderer_toggle_get_type (void) G_GNUC_CONST;
+GtkCellRenderer *gtk_cell_renderer_toggle_new (void);
-gboolean gtk_cell_renderer_toggle_get_radio (GtkCellRendererToggle *toggle);
-void gtk_cell_renderer_toggle_set_radio (GtkCellRendererToggle *toggle,
- gboolean radio);
+gboolean gtk_cell_renderer_toggle_get_radio (GtkCellRendererToggle *toggle);
+void gtk_cell_renderer_toggle_set_radio (GtkCellRendererToggle *toggle,
+ gboolean radio);
-gboolean gtk_cell_renderer_toggle_get_active (GtkCellRendererToggle *toggle);
-void gtk_cell_renderer_toggle_set_active (GtkCellRendererToggle *toggle,
- gboolean setting);
+gboolean gtk_cell_renderer_toggle_get_active (GtkCellRendererToggle *toggle);
+void gtk_cell_renderer_toggle_set_active (GtkCellRendererToggle *toggle,
+ gboolean setting);
+
+gboolean gtk_cell_renderer_toggle_get_activatable (GtkCellRendererToggle *toggle);
+void gtk_cell_renderer_toggle_set_activatable (GtkCellRendererToggle *toggle,
+ gboolean setting);
G_END_DECLS
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]