utils/gtk.h file

GTK utils.

Contents

TODO merge with UI

Enums

enum ZGtkFill { Z_GTK_NO_FILL, Z_GTK_FILL }
For readability, instead of using 0s and 1s.

Functions

void z_gtk_container_remove_all_children(GtkContainer* container)
NOTE: bumps reference, must be decremented after calling.
auto z_gtk_message_dialog_get_label(GtkMessageDialog* self, const int secondary) -> GtkLabel*
Returns the primary or secondary label of the given GtkMessageDialog.
void z_gtk_configure_simple_combo_box(GtkComboBox* cb, GtkTreeModel* model)
Configures a simple value-text combo box using the given model.
auto z_gtk_button_new_with_icon(const char* name) -> GtkButton*
Creates a button with the given icon name.
auto z_gtk_toggle_button_new_with_icon(const char* name) -> GtkToggleButton*
Creates a toggle button with the given icon name.
auto z_gtk_button_new_with_resource(IconType icon_type, const char* name) -> GtkButton*
Creates a button with the given resource name as icon.
auto z_gtk_toggle_button_new_with_resource(IconType icon_type, const char* name) -> GtkToggleButton*
Creates a toggle button with the given resource name as icon.
auto z_gtk_create_menu_item(gchar* label_name, gchar* icon_name, IconType resource_icon_type, gchar* resource, int is_toggle, const char* action_name) -> GtkMenuItem*
TODO add description.
auto z_gtk_get_single_selection_pointer(GtkTreeView* tv, int column) -> void*
Returns a pointer stored at the given selection.
auto z_gtk_get_label_from_menu_item(GtkMenuItem* mi) -> GtkLabel*
Returns the label from a given GtkMenuItem.
void z_gtk_set_tooltip_for_actionable(GtkActionable* actionable, const char* tooltip)
Sets the tooltip and finds the accel keys and appends them to the tooltip in small text.
void z_gtk_widget_add_style_class(GtkWidget* widget, const gchar* class_name)
Adds the given style class to the GtkWidget.
static auto z_gtk_widget_get_device(GtkWidget* widget) -> GdkDevice*
Gets the GdkDevice for a GtkWidget.
static void z_gtk_widget_get_mask(GtkWidget* widget, GdkModifierType* mask)
Sets the GdkModifierType given for the widget.
static auto z_gtk_container_get_single_child(GtkContainer* container) -> GtkWidget*
Returns the single child of a container.
void z_gtk_setup_foldable_notebook(GtkNotebook* notebook)
Makes the given notebook foldable.