Commit 66ae394e authored by Michael Natterer's avatar Michael Natterer 😴

Add API for the sealed member "activatable"

parent dffc1bf1
......@@ -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
......
......@@ -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"
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment