Extensions to Gtk

Extensions to Gtk — Miscelleanous extensions to the Gtk+ library.

Stability Level

Stable, unless otherwise indicated

Synopsis


#include <exo/exo.h>


gpointer    exo_gtk_object_ref_sink         (GtkObject *object);
void        exo_gtk_radio_action_set_current_value
                                            (GtkRadioAction *action,
                                             gint current_value);

Description

Details

exo_gtk_object_ref_sink ()

gpointer    exo_gtk_object_ref_sink         (GtkObject *object);

Helper function used to take a reference on object and droppping the floating reference to object (if any) atomically.

If libexo is compiled against Gtk+ 2.9.0 or newer, this function will use g_object_ref_sink(), since with newer Gtk+/GObject versions, the floating reference handling was moved to GObject. Else, this function will expand to

g_object_ref (G_OBJECT (object));
gtk_object_sink (GTK_OBJECT (object));

The caller is responsible to release the reference on object acquire by this function call using g_object_unref().

object : a GtkObject.
Returns : a reference to object.

exo_gtk_radio_action_set_current_value ()

void        exo_gtk_radio_action_set_current_value
                                            (GtkRadioAction *action,
                                             gint current_value);

Looks for all actions in the group to which action belongs and if any of the actions matches the current_value, it will become the new active action.

Else if none of the actions in action's radio group match the specified current_value, all actions will be deactivated and the radio group will have no active action afterwards.

action : A GtkRadioAction.
current_value : the value of the GtkRadioAction to activate.