Ansel 0.0
A darktable fork - bloat + design vision
Loading...
Searching...
No Matches
notebook.c File Reference
#include "widgets/notebook.h"
#include "system/macros.h"
#include "widgets/widget_style.h"
#include "widgets/widget_settings.h"
#include <glib/gi18n.h>
#include "system/mem_alloc.h"
+ Include dependency graph for notebook.c:

Go to the source code of this file.

Functions

static void _notebook_size_callback (GtkNotebook *notebook, GdkRectangle *allocation, gpointer *data)
 
static gboolean _notebook_motion_notify_callback (GtkWidget *widget, GdkEventMotion *event, gpointer user_data)
 
GtkNotebookdt_ui_notebook_new ()
 
GtkWidgetdt_ui_notebook_page (GtkNotebook *notebook, const char *text, const char *tooltip)
 
static void _notebook_switch_page_signal_relay (GtkNotebook *notebook, GtkWidget *page, guint page_num, gpointer user_data)
 
void dt_ui_notebook_set_picker_owner (GtkNotebook *notebook, gpointer owner)
 Register an opaque owner for a GtkNotebook's page switches, and report every "switch_page" to the host through dt_widget_notebook_page_changed().
 

Function Documentation

◆ _notebook_motion_notify_callback()

static gboolean _notebook_motion_notify_callback ( GtkWidget widget,
GdkEventMotion event,
gpointer  user_data 
)
static

Definition at line 68 of file notebook.c.

References FALSE, i, L, n, and notebook.

Referenced by dt_ui_notebook_page().

◆ _notebook_size_callback()

static void _notebook_size_callback ( GtkNotebook notebook,
GdkRectangle allocation,
gpointer *  data 
)
static

Definition at line 28 of file notebook.c.

References dt_free, i, L, n, and notebook.

Referenced by dt_ui_notebook_page().

◆ _notebook_switch_page_signal_relay()

static void _notebook_switch_page_signal_relay ( GtkNotebook notebook,
GtkWidget page,
guint  page_num,
gpointer  user_data 
)
static

Definition at line 112 of file notebook.c.

References dt_widget_notebook_page_changed().

Referenced by dt_ui_notebook_set_picker_owner().

◆ dt_ui_notebook_new()

GtkNotebook * dt_ui_notebook_new ( void  )

Definition at line 83 of file notebook.c.

References L.

Referenced by gui_init(), gui_init(), and gui_init().

◆ dt_ui_notebook_page()

GtkWidget * dt_ui_notebook_page ( GtkNotebook notebook,
const char *  text,
const char *  tooltip 
)

◆ dt_ui_notebook_set_picker_owner()

void dt_ui_notebook_set_picker_owner ( GtkNotebook notebook,
gpointer  owner 
)

Register an opaque owner for a GtkNotebook's page switches, and report every "switch_page" to the host through dt_widget_notebook_page_changed().

This layer does not know or care what owner is: it is carried through as-is. Any interested listener (e.g. the color picker, which resets a picker left active on a page the user just switched away from) casts the payload back to whatever type it registered here. Works on any GtkNotebook, whether created via dt_ui_notebook_new() or gtk_notebook_new().

Definition at line 118 of file notebook.c.

References _notebook_switch_page_signal_relay(), IS_NULL_PTR, L, and notebook.

Referenced by gui_init(), and gui_init().