[gtk+] Add API for sealed member "visible"
- From: Michael Natterer <mitch src gnome org>
- To: svn-commits-list gnome org
- Subject: [gtk+] Add API for sealed member "visible"
- Date: Wed, 15 Jul 2009 01:23:17 +0000 (UTC)
commit 548f3a8c69660d43d3fdbd6878b65bf521aa95f1
Author: Michael Natterer <mitch gimp org>
Date: Wed Jul 15 03:22:22 2009 +0200
Add API for sealed member "visible"
gtk/gtk.symbols | 2 ++
gtk/gtkcellrenderer.c | 38 ++++++++++++++++++++++++++++++++++++++
gtk/gtkcellrenderer.h | 4 ++++
3 files changed, 44 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtk.symbols b/gtk/gtk.symbols
index a6ee554..5941cc3 100644
--- a/gtk/gtk.symbols
+++ b/gtk/gtk.symbols
@@ -630,11 +630,13 @@ gtk_cell_renderer_get_padding
gtk_cell_renderer_get_sensitive
gtk_cell_renderer_get_size
gtk_cell_renderer_get_type G_GNUC_CONST
+gtk_cell_renderer_get_visible
gtk_cell_renderer_render
gtk_cell_renderer_set_alignment
gtk_cell_renderer_set_fixed_size
gtk_cell_renderer_set_padding
gtk_cell_renderer_set_sensitive
+gtk_cell_renderer_set_visible
gtk_cell_renderer_start_editing
gtk_cell_renderer_stop_editing
#endif
diff --git a/gtk/gtkcellrenderer.c b/gtk/gtkcellrenderer.c
index 01acc7a..f7bc8cd 100644
--- a/gtk/gtkcellrenderer.c
+++ b/gtk/gtkcellrenderer.c
@@ -860,6 +860,44 @@ gtk_cell_renderer_get_padding (GtkCellRenderer *cell,
}
/**
+ * gtk_cell_renderer_set_visible:
+ * @cell: A #GtkCellRenderer
+ * @visible: the visibility of the cell
+ *
+ * Sets the cell renderer's visibility.
+ *
+ * Since: 2.18
+ **/
+void
+gtk_cell_renderer_set_visible (GtkCellRenderer *cell,
+ gboolean visible)
+{
+ g_return_if_fail (GTK_IS_CELL_RENDERER (cell));
+
+ if (cell->visible != visible)
+ {
+ cell->visible = visible ? TRUE : FALSE;
+ g_object_notify (G_OBJECT (cell), "visible");
+ }
+}
+
+/**
+ * gtk_cell_renderer_get_visible:
+ * @cell: A #GtkCellRenderer
+ *
+ * Returns the cell renderer's visibility.
+ *
+ * Since: 2.18
+ **/
+gboolean
+gtk_cell_renderer_get_visible (GtkCellRenderer *cell)
+{
+ g_return_val_if_fail (GTK_IS_CELL_RENDERER (cell), FALSE);
+
+ return cell->visible;
+}
+
+/**
* gtk_cell_renderer_set_sensitive:
* @cell: A #GtkCellRenderer
* @sensitive: the sensitivity of the cell
diff --git a/gtk/gtkcellrenderer.h b/gtk/gtkcellrenderer.h
index 3d4b1ee..aece202 100644
--- a/gtk/gtkcellrenderer.h
+++ b/gtk/gtkcellrenderer.h
@@ -174,6 +174,10 @@ void gtk_cell_renderer_get_padding (GtkCellRenderer *cell,
gint *xpad,
gint *ypad);
+void gtk_cell_renderer_set_visible (GtkCellRenderer *cell,
+ gboolean visible);
+gboolean gtk_cell_renderer_get_visible (GtkCellRenderer *cell);
+
void gtk_cell_renderer_set_sensitive (GtkCellRenderer *cell,
gboolean sensitive);
gboolean gtk_cell_renderer_get_sensitive (GtkCellRenderer *cell);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]