Ansel 0.0
A darktable fork - bloat + design vision
Loading...
Searching...
No Matches
imageop_gui.c File Reference
#include "widgets/container.h"
#include "common/telemetry.h"
#include "common/sentry.h"
#include "widgets/gdkkeys.h"
#include "widgets/popup.h"
#include "gui/application.h"
#include "widgets/accelerators.h"
#include "common/collection.h"
#include "common/hash.h"
#include "common/module.h"
#include "common/module_versioning.h"
#include "common/usermanual_url.h"
#include "control/control.h"
#include "control/signal.h"
#include "database/history_repository.h"
#include "database/preset_repository.h"
#include "develop/blend.h"
#include "develop/blend_gui.h"
#include "develop/gui_throttle.h"
#include "develop/masks_gui.h"
#include "develop/dev_pixelpipe.h"
#include "gui/presets.h"
#include "widgets/expander.h"
#include "widgets/label.h"
#include "widgets/widget_settings.h"
#include "widgets/widget_style.h"
#include "history/notify.h"
#include "develop/imageop_gui.h"
#include "develop/dev_history.h"
#include "develop/develop.h"
#include "widgets/resetlabel.h"
#include "common/conf.h"
#include "develop/imageop.h"
#include "widgets/bauhaus.h"
#include "widgets/button.h"
#include "system/macros.h"
#include "system/mem_alloc.h"
#include "common/utility.h"
#include <assert.h>
#include <math.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include "widgets/togglebutton.h"
+ Include dependency graph for imageop_gui.c:

Go to the source code of this file.

Data Structures

struct  dt_module_param_t
 
struct  dt_iop_reset_label_t
 

Macros

#define DT_IOP_HEADER_MENU_OPEN   "dt-module-header-menu-open"
 
#define DT_IOP_HEADER_MENU_DISMISS_CLICK   "dt-module-header-menu-dismiss-click"
 
#define DT_IOP_HEADER_IGNORE_RELEASE   "dt-module-header-ignore-release"
 

Typedefs

typedef struct dt_module_param_t dt_module_param_t
 
typedef struct dt_iop_reset_label_t dt_iop_reset_label_t
 

Functions

static void _gui_set_single_expanded (dt_iop_module_t *module, gboolean expanded)
 
static gboolean _iop_plugin_header_button_release (GtkWidget *w, GdkEventButton *e, gpointer user_data)
 
static gboolean _iop_plugin_enable_accel (GtkAccelGroup *accel_group, GObject *accelerable, guint keyval, GdkModifierType modifier, gpointer data)
 
static gboolean _iop_plugin_focus_accel (GtkAccelGroup *accel_group, GObject *accelerable, guint keyval, GdkModifierType modifier, gpointer data)
 
static void _iop_toggle_callback (GtkWidget *togglebutton, dt_module_param_t *data)
 
static void _add_widget_to_module_list (dt_iop_module_t *self, GtkWidget *widget)
 
GtkWidget * dt_bauhaus_slider_from_params (dt_iop_module_t *self, const char *param)
 
GtkWidget * dt_bauhaus_combobox_from_params (dt_iop_module_t *self, const char *param)
 
GtkWidget * dt_bauhaus_toggle_from_params (dt_iop_module_t *self, const char *param)
 
GtkWidget * dt_iop_togglebutton_new (dt_iop_module_t *self, const char *section, const gchar *label, const gchar *ctrl_label, GCallback callback, gboolean local, guint accel_key, GdkModifierType mods, DTGTKCairoPaintIconFunc paint, GtkWidget *box)
 
GtkWidget * dt_iop_togglebutton_new_no_register (dt_iop_module_t *self, const char *section, const gchar *label, const gchar *ctrl_label, GCallback callback, gboolean local, guint accel_key, GdkModifierType mods, DTGTKCairoPaintIconFunc paint, GtkWidget *box)
 
GtkWidget * dt_iop_button_new (dt_iop_module_t *self, const gchar *label, GCallback callback, gboolean local, guint accel_key, GdkModifierType mods, DTGTKCairoPaintIconFunc paint, gint paintflags, GtkWidget *box)
 
gboolean dt_mask_scroll_increases (int up)
 
static void _iop_color_picker_data_ready_callback (gpointer instance, gpointer user_data)
 
static gboolean _iop_listens_to_picker_data (const dt_iop_module_t *module)
 
static void _gui_delete_callback (GtkButton *button, dt_iop_module_t *module)
 
gboolean dt_iop_gui_module_is_visible (dt_iop_module_t *module)
 
dt_iop_module_t * dt_iop_gui_get_previous_visible_module (dt_iop_module_t *module)
 
dt_iop_module_t * dt_iop_gui_get_next_visible_module (dt_iop_module_t *module)
 
dt_iop_module_t * dt_iop_gui_duplicate (dt_iop_module_t *base, gboolean copy_params)
 Create another instance of base, insert it into dev->iop and give it a GUI.
 
void dt_iop_gui_rename_module (dt_iop_module_t *module)
 
static gboolean _rename_module_idle (gpointer user_data)
 
static void _gui_copy_callback (GtkButton *button, gpointer user_data)
 
static void _gui_duplicate_callback (GtkButton *button, gpointer user_data)
 
static gboolean _rename_module_key_press (GtkWidget *entry, GdkEventKey *event, dt_iop_module_t *module)
 
static gboolean _rename_module_resize (GtkWidget *entry, GdkEventKey *event, dt_iop_module_t *module)
 
static void _gui_rename_callback (GtkButton *button, dt_iop_module_t *module)
 
static gboolean _iop_plugin_header_menu_dismiss_idle (gpointer user_data)
 
static void _iop_plugin_header_menu_deactivate (GtkWidget *menu, gpointer user_data)
 
static gboolean _gui_multiinstance_callback (GtkButton *button, GdkEventButton *event, gpointer user_data)
 
static void _gui_off_callback (GtkToggleButton *togglebutton, gpointer user_data)
 
gboolean dt_iop_is_visible (dt_iop_module_t *module)
 
static void _iop_panel_label (dt_iop_module_t *module)
 
void dt_iop_gui_update_header (dt_iop_module_t *module)
 
void dt_iop_gui_set_enable_button_icon (GtkWidget *w, dt_iop_module_t *module)
 
void dt_iop_gui_set_enable_button (dt_iop_module_t *module)
 
void dt_iop_gui_init (dt_iop_module_t *module)
 
static void _iop_gui_widget_gone (gpointer user_data, GObject *where_the_object_was)
 Clear GUI pointers that still reference one iop widget being finalized.
 
void dt_iop_gui_cleanup_module (dt_iop_module_t *module)
 
void dt_iop_gui_update (dt_iop_module_t *module)
 
static gboolean _gui_reset_callback (GtkButton *button, GdkEventButton *event, dt_iop_module_t *module)
 
static void _presets_popup_callback (GtkButton *button, dt_iop_module_t *module)
 
void dt_iop_request_focus (dt_iop_module_t *module)
 Move darkroom focus to module, or clear it with NULL.
 
void _iop_dim_all_but (dt_iop_module_t *module, gboolean dim)
 
void dt_iop_gui_set_expanded (dt_iop_module_t *module, gboolean expanded, gboolean collapse_others)
 
void dt_iop_gui_update_expanded (dt_iop_module_t *module)
 
static gboolean _iop_plugin_body_button_press (GtkWidget *w, GdkEventButton *e, gpointer user_data)
 
static gboolean _iop_plugin_header_activate (GtkWidget *self, gboolean group_cycling, gpointer user_data)
 
static gboolean _iop_plugin_header_child_button_press (GtkWidget *widget, GdkEventButton *event, gpointer user_data)
 
static gboolean _iop_plugin_header_button_press (GtkWidget *w, GdkEventButton *e, gpointer user_data)
 
static void _display_mask_indicator_callback (GtkToggleButton *bt, dt_iop_module_t *module)
 
static void _mask_indicator_get_usage (dt_iop_module_t *module, gboolean *top_enabled, gboolean *raster_used, gboolean *drawn_used, gboolean *parametric_used)
 
static gboolean _mask_indicator_tooltip (GtkWidget *treeview, gint x, gint y, gboolean kb_mode, GtkTooltip *tooltip, dt_iop_module_t *module)
 
void dt_iop_add_remove_mask_indicator (dt_iop_module_t *module)
 
gboolean _iop_tooltip_callback (GtkWidget *widget, gint x, gint y, gboolean keyboard_mode, GtkTooltip *tooltip, gpointer user_data)
 
void dt_iop_gui_set_expander (dt_iop_module_t *module)
 
GtkWidget * dt_iop_gui_get_widget (dt_iop_module_t *module)
 
GtkWidget * dt_iop_gui_get_pluginui (dt_iop_module_t *module)
 
void dt_iop_gui_changed (dt_iop_module_t *action, GtkWidget *widget, gpointer data)
 
void dt_bauhaus_update_module (dt_iop_module_t *self)
 
void dt_bauhaus_value_changed_default_callback (GtkWidget *widget)
 
void dt_iop_gui_enter_critical_section (dt_iop_module_t *const module)
 Take the module's GUI lock, serialising access to its dt_iop_gui_data_t.
 
void dt_iop_gui_leave_critical_section (dt_iop_module_t *const module)
 Release what dt_iop_gui_enter_critical_section() took. Also a no-op headless.
 
GtkWidget * dt_iop_gui_get_off (dt_iop_module_t *module)
 
gboolean dt_iop_gui_owns_widget (const dt_iop_module_t *module, const GtkWidget *target)
 
static void _iop_reset_label_reset (GtkWidget *widget, gpointer user_data)
 
GtkWidget * dt_iop_gui_reset_label_new (const gchar *label, dt_iop_module_t *module, void *param, int param_size)
 

Macro Definition Documentation

◆ DT_IOP_HEADER_IGNORE_RELEASE

#define DT_IOP_HEADER_IGNORE_RELEASE   "dt-module-header-ignore-release"

Definition at line 55 of file imageop_gui.c.

◆ DT_IOP_HEADER_MENU_DISMISS_CLICK

#define DT_IOP_HEADER_MENU_DISMISS_CLICK   "dt-module-header-menu-dismiss-click"

Definition at line 53 of file imageop_gui.c.

◆ DT_IOP_HEADER_MENU_OPEN

#define DT_IOP_HEADER_MENU_OPEN   "dt-module-header-menu-open"

Definition at line 52 of file imageop_gui.c.

Typedef Documentation

◆ dt_iop_reset_label_t

◆ dt_module_param_t

Function Documentation

◆ _add_widget_to_module_list()

static void _add_widget_to_module_list ( dt_iop_module_t *  self,
GtkWidget *  widget 
)
static

Definition at line 108 of file imageop_gui.c.

References IS_NULL_PTR, and L.

Referenced by dt_bauhaus_toggle_from_params(), dt_iop_button_new(), and dt_iop_togglebutton_new().

◆ _display_mask_indicator_callback()

◆ _gui_copy_callback()

static void _gui_copy_callback ( GtkButton *  button,
gpointer  user_data 
)
static

Definition at line 676 of file imageop_gui.c.

References _rename_module_idle(), IS_NULL_PTR, and L.

Referenced by _gui_multiinstance_callback().

◆ _gui_delete_callback()

◆ _gui_duplicate_callback()

static void _gui_duplicate_callback ( GtkButton *  button,
gpointer  user_data 
)
static

Definition at line 684 of file imageop_gui.c.

References _rename_module_idle(), IS_NULL_PTR, and L.

Referenced by _gui_multiinstance_callback().

◆ _gui_multiinstance_callback()

◆ _gui_off_callback()

static void _gui_off_callback ( GtkToggleButton *  togglebutton,
gpointer  user_data 
)
static

◆ _gui_rename_callback()

static void _gui_rename_callback ( GtkButton *  button,
dt_iop_module_t *  module 
)
static

Definition at line 795 of file imageop_gui.c.

References dt_iop_gui_rename_module(), and L.

Referenced by _gui_multiinstance_callback().

◆ _gui_reset_callback()

static gboolean _gui_reset_callback ( GtkButton *  button,
GdkEventButton *  event,
dt_iop_module_t *  module 
)
static

◆ _gui_set_single_expanded()

◆ _iop_color_picker_data_ready_callback()

static void _iop_color_picker_data_ready_callback ( gpointer  instance,
gpointer  user_data 
)
static

◆ _iop_dim_all_but()

void _iop_dim_all_but ( dt_iop_module_t *  module,
gboolean  dim 
)

Dim all modules except the one referenced, if any reference, or undim all

Definition at line 1426 of file imageop_gui.c.

References dt_dev_get_global(), dt_gui_add_class(), dt_gui_remove_class(), dt_iop_gui_get_pluginui(), IS_NULL_PTR, L, and m.

Referenced by dt_iop_gui_set_expanded().

◆ _iop_gui_widget_gone()

static void _iop_gui_widget_gone ( gpointer  user_data,
GObject *  where_the_object_was 
)
static

Clear GUI pointers that still reference one iop widget being finalized.

Parameters
user_dataiop module owner.
where_the_object_wasfinalized widget address.

Definition at line 1072 of file imageop_gui.c.

References dt_gui_get_global(), IS_NULL_PTR, L, dt_gui_gtk_t::scroll_to, and dt_gui_gtk_t::scroll_to_header_once.

Referenced by dt_iop_gui_set_expander().

◆ _iop_listens_to_picker_data()

static gboolean _iop_listens_to_picker_data ( const dt_iop_module_t *  module)
static

Definition at line 433 of file imageop_gui.c.

Referenced by dt_iop_gui_cleanup_module(), and dt_iop_gui_init().

◆ _iop_panel_label()

◆ _iop_plugin_body_button_press()

static gboolean _iop_plugin_body_button_press ( GtkWidget *  w,
GdkEventButton *  e,
gpointer  user_data 
)
static

◆ _iop_plugin_enable_accel()

static gboolean _iop_plugin_enable_accel ( GtkAccelGroup *  accel_group,
GObject *  accelerable,
guint  keyval,
GdkModifierType  modifier,
gpointer  data 
)
static
Todo:
: we should have a GUI callback that enables module and dispatches history instead,

Definition at line 1523 of file imageop_gui.c.

References dt_dev_add_history_item, dt_iop_gui_set_expanded(), dt_iop_request_focus(), FALSE, IS_NULL_PTR, L, and TRUE.

Referenced by dt_iop_gui_init().

◆ _iop_plugin_focus_accel()

static gboolean _iop_plugin_focus_accel ( GtkAccelGroup *  accel_group,
GObject *  accelerable,
guint  keyval,
GdkModifierType  modifier,
gpointer  data 
)
static

Definition at line 1507 of file imageop_gui.c.

References IS_NULL_PTR, L, and TRUE.

Referenced by _iop_panel_label(), and dt_iop_gui_init().

◆ _iop_plugin_header_activate()

static gboolean _iop_plugin_header_activate ( GtkWidget *  self,
gboolean  group_cycling,
gpointer  user_data 
)
static

Definition at line 1491 of file imageop_gui.c.

References FALSE, IS_NULL_PTR, and L.

Referenced by dt_iop_gui_set_expander().

◆ _iop_plugin_header_button_press()

◆ _iop_plugin_header_button_release()

static gboolean _iop_plugin_header_button_release ( GtkWidget *  w,
GdkEventButton *  e,
gpointer  user_data 
)
static

◆ _iop_plugin_header_child_button_press()

static gboolean _iop_plugin_header_child_button_press ( GtkWidget *  widget,
GdkEventButton *  event,
gpointer  user_data 
)
static

Definition at line 1498 of file imageop_gui.c.

References FALSE, L, and TRUE.

Referenced by dt_iop_gui_set_expander().

◆ _iop_plugin_header_menu_deactivate()

static void _iop_plugin_header_menu_deactivate ( GtkWidget *  menu,
gpointer  user_data 
)
static

Keep the dismiss-click marker until the next main-loop pass. GTK first deactivates the menu, then may deliver the same pointer event to the module header underneath. That event closes the menu only; it must not also toggle the expander state.

Definition at line 810 of file imageop_gui.c.

References _iop_plugin_header_menu_dismiss_idle(), DT_IOP_HEADER_MENU_DISMISS_CLICK, DT_IOP_HEADER_MENU_OPEN, L, and TRUE.

Referenced by _gui_multiinstance_callback(), and _presets_popup_callback().

◆ _iop_plugin_header_menu_dismiss_idle()

static gboolean _iop_plugin_header_menu_dismiss_idle ( gpointer  user_data)
static

Definition at line 800 of file imageop_gui.c.

References DT_IOP_HEADER_MENU_DISMISS_CLICK, and L.

Referenced by _iop_plugin_header_menu_deactivate().

◆ _iop_reset_label_reset()

static void _iop_reset_label_reset ( GtkWidget *  widget,
gpointer  user_data 
)
static

Definition at line 2223 of file imageop_gui.c.

References d, dt_dev_add_history_item, dt_dev_get_global(), FALSE, IS_NULL_PTR, L, and TRUE.

Referenced by dt_iop_gui_reset_label_new().

◆ _iop_toggle_callback()

static void _iop_toggle_callback ( GtkWidget *  togglebutton,
dt_module_param_t *  data 
)
static

◆ _iop_tooltip_callback()

gboolean _iop_tooltip_callback ( GtkWidget *  widget,
gint  x,
gint  y,
gboolean  keyboard_mode,
GtkTooltip *  tooltip,
gpointer  user_data 
)

◆ _mask_indicator_get_usage()

static void _mask_indicator_get_usage ( dt_iop_module_t *  module,
gboolean *  top_enabled,
gboolean *  raster_used,
gboolean *  drawn_used,
gboolean *  parametric_used 
)
static

◆ _mask_indicator_tooltip()

static gboolean _mask_indicator_tooltip ( GtkWidget *  treeview,
gint  x,
gint  y,
gboolean  kb_mode,
GtkTooltip *  tooltip,
dt_iop_module_t *  module 
)
static

◆ _presets_popup_callback()

◆ _rename_module_idle()

static gboolean _rename_module_idle ( gpointer  user_data)
static

Rename a freshly-created module after GTK has finished the menu activation.

The copy/duplicate actions create and show a new expander while the multi-instance menu is still unwinding its activation path. Starting the in-place editor immediately can lose the entry focus to the menu teardown, so we wait for the next main-loop idle before installing the entry in the new module header.

Definition at line 668 of file imageop_gui.c.

References dt_iop_gui_rename_module(), and L.

Referenced by _gui_copy_callback(), and _gui_duplicate_callback().

◆ _rename_module_key_press()

◆ _rename_module_resize()

static gboolean _rename_module_resize ( GtkWidget *  entry,
GdkEventKey *  event,
dt_iop_module_t *  module 
)
static

Definition at line 745 of file imageop_gui.c.

References L, state, TRUE, and width.

Referenced by dt_iop_gui_rename_module().

◆ dt_bauhaus_combobox_from_params()

◆ dt_bauhaus_slider_from_params()

◆ dt_bauhaus_toggle_from_params()

◆ dt_bauhaus_update_module()

◆ dt_bauhaus_value_changed_default_callback()

◆ dt_iop_add_remove_mask_indicator()

void dt_iop_add_remove_mask_indicator ( dt_iop_module_t *  module)

◆ dt_iop_button_new()

GtkWidget * dt_iop_button_new ( dt_iop_module_t *  self,
const gchar *  label,
GCallback  callback,
gboolean  local,
guint  accel_key,
GdkModifierType  mods,
DTGTKCairoPaintIconFunc  paint,
gint  paintflags,
GtkWidget *  box 
)

Definition at line 374 of file imageop_gui.c.

References _add_widget_to_module_list(), dtgtk_button_new(), L, and TRUE.

Referenced by gui_init().

◆ dt_iop_gui_changed()

◆ dt_iop_gui_cleanup_module()

◆ dt_iop_gui_duplicate()

dt_iop_module_t * dt_iop_gui_duplicate ( dt_iop_module_t *  base,
gboolean  copy_params 
)

Create another instance of base, insert it into dev->iop and give it a GUI.

Parameters
basethe module to duplicate.
copy_paramsTRUE to carry over base's current parameters and blending.
Returns
the new module, or NULL when loading it failed (dt_iop_load_module()); there is no cap on instances per family. Borrowed: owned by dev->iop, never freed by the caller.
Note
Commits the new instance to history and FLUSHES the pending-commit queue before returning, because the panel decides whether to show an extra instance from a g_idle that runs on the next main-loop turn and reads whether it is in history – see the comment at the flush. Any future path that creates an instance owes history the same synchronous commit.

Definition at line 581 of file imageop_gui.c.

References _gui_set_single_expanded(), dt_iop_module_t::blend_params, dt_iop_module_t::dev, dt_dev_add_history_item, dt_dev_history_flush_pending_commits(), dt_dev_pixelpipe_rebuild_all, dt_gui_freeze_begin, dt_gui_freeze_end, dt_gui_get_global(), dt_iop_commit_blend_params(), dt_iop_gui_init(), dt_iop_gui_set_expanded(), dt_iop_gui_set_expander(), dt_iop_gui_update(), dt_iop_gui_update_blending(), dt_iop_is_hidden(), dt_iop_reload_defaults(), dt_iop_request_focus(), dt_masks_iop_use_same_as(), dt_iop_module_gui_t::expander, FALSE, dt_iop_module_t::gui, IOP_FLAGS_SUPPORTS_BLENDING, IS_NULL_PTR, L, dt_develop_blend_params_t::mask_id, dt_iop_module_t::params, dt_gui_gtk_t::scroll_to_header_once, and TRUE.

Referenced by _menuitem_button_released_preset().

◆ dt_iop_gui_enter_critical_section()

void dt_iop_gui_enter_critical_section ( dt_iop_module_t *const  module)

Take the module's GUI lock, serialising access to its dt_iop_gui_data_t.

enter/leave a GUI critical section by acquiring gui->gui_lock. Implemented in imageop_gui.c; tolerate headless callers (no GUI, no GUI data to protect), so common/iop-autoset.c and friends can call them without seeing the gui struct.

Warning
A NO-OP when module->gui is NULL, which is every headless module – export, thumbnail generation, ansel-cli. It therefore protects GUI data only; it must not be used to serialise anything a non-GUI pipe also touches, because there it locks nothing and silently provides no mutual exclusion at all.

Must be paired with dt_iop_gui_leave_critical_section() on every path. The pair uses the BAD_ lock variants because the acquire and release routinely sit in different functions, which the thread-safety analyser cannot model.

Definition at line 2186 of file imageop_gui.c.

References dt_pthread_mutex_BAD_lock(), and L.

Referenced by __attribute__(), __attribute__(), _auto_levels_callback(), _auto_levels_callback(), _auto_set_exposure(), _auto_set_illuminant(), _develop_cacheline_ready_callback(), _develop_history_resync_callback(), _develop_ui_pipe_finished_callback(), _develop_ui_pipe_finished_callback(), _develop_ui_pipe_finished_callback(), _do_get_structure_auto(), _draw(), _event_draw(), _get_structure(), _history_resync_callback(), _preview_pipe_finished_callback(), _process_common_setup(), _refresh_module_histogram(), _select_region_toggled_callback(), _select_region_toggled_callback(), _spot_settings_changed_callback(), button_pressed(), button_pressed(), button_released(), button_released(), checker_changed_callback(), checker_color_changed_callback(), color_picker_apply(), commit_profile_callback(), dt_drawlayer_begin_gui_stroke_capture(), dt_drawlayer_commit_dabs(), dt_iop_autoset_advance(), dt_iop_levels_compute_levels_automatic(), dt_iop_zonesystem_preview_draw(), gui_cache_init(), gui_cleanup(), gui_focus(), gui_init(), gui_init(), gui_post_expose(), gui_post_expose(), gui_update(), gui_update(), invalidate_luminance_cache(), key_pressed(), masks_selection_changed(), mouse_moved(), mouse_moved(), optimize_changed_callback(), process(), process(), process(), process_cl(), process_cl(), process_clusters(), process_common_cleanup(), process_drago(), process_internal(), rt_auto_levels_callback(), rt_curr_scale_update(), rt_develop_ui_pipe_finished_callback(), rt_display_wavelet_scale_callback(), run_profile_callback(), run_validation_callback(), safety_changed_callback(), scrolled(), start_profiling_callback(), and update_histogram().

◆ dt_iop_gui_get_next_visible_module()

dt_iop_module_t * dt_iop_gui_get_next_visible_module ( dt_iop_module_t *  module)

returns the next visible module on the module list

Definition at line 567 of file imageop_gui.c.

References dt_iop_gui_module_is_visible(), and L.

◆ dt_iop_gui_get_off()

GtkWidget * dt_iop_gui_get_off ( dt_iop_module_t *  module)

widget-identity helpers for gui/ callers that must not see the gui struct through this header's forward declaration (the struct lives in imageop_gui.h, layer-wise above them until the T6 re-stratification). Implemented in imageop_gui.c; all NULL-safe.

Definition at line 2199 of file imageop_gui.c.

Referenced by _color_picker_callback_button_press().

◆ dt_iop_gui_get_pluginui()

GtkWidget * dt_iop_gui_get_pluginui ( dt_iop_module_t *  module)

get the eventbox of plugin ui in expander

Definition at line 2030 of file imageop_gui.c.

References DTGTK_EXPANDER, dtgtk_expander_get_frame(), IS_NULL_PTR, and L.

Referenced by _iop_dim_all_but(), and dt_iop_request_focus().

◆ dt_iop_gui_get_previous_visible_module()

dt_iop_module_t * dt_iop_gui_get_previous_visible_module ( dt_iop_module_t *  module)

returns the previous visible module on the module list

Definition at line 553 of file imageop_gui.c.

References dt_iop_gui_module_is_visible(), and L.

◆ dt_iop_gui_get_widget()

GtkWidget * dt_iop_gui_get_widget ( dt_iop_module_t *  module)

get the widget of plugin ui in expander

Definition at line 2023 of file imageop_gui.c.

References DTGTK_EXPANDER, dtgtk_expander_get_body(), IS_NULL_PTR, and L.

Referenced by dt_gui_presets_apply_preset().

◆ dt_iop_gui_init()

◆ dt_iop_gui_leave_critical_section()

void dt_iop_gui_leave_critical_section ( dt_iop_module_t *const  module)

Release what dt_iop_gui_enter_critical_section() took. Also a no-op headless.

Definition at line 2194 of file imageop_gui.c.

References dt_pthread_mutex_BAD_unlock(), and L.

Referenced by __attribute__(), __attribute__(), _auto_levels_callback(), _auto_levels_callback(), _auto_set_exposure(), _auto_set_illuminant(), _develop_cacheline_ready_callback(), _develop_history_resync_callback(), _develop_ui_pipe_finished_callback(), _develop_ui_pipe_finished_callback(), _develop_ui_pipe_finished_callback(), _do_get_structure_auto(), _draw(), _event_draw(), _get_structure(), _history_resync_callback(), _preview_pipe_finished_callback(), _process_common_setup(), _refresh_module_histogram(), _select_region_toggled_callback(), _select_region_toggled_callback(), _spot_settings_changed_callback(), button_pressed(), button_pressed(), button_released(), button_released(), checker_changed_callback(), checker_color_changed_callback(), color_picker_apply(), commit_profile_callback(), dt_drawlayer_begin_gui_stroke_capture(), dt_drawlayer_commit_dabs(), dt_iop_autoset_advance(), dt_iop_levels_compute_levels_automatic(), dt_iop_zonesystem_preview_draw(), gui_cache_init(), gui_cleanup(), gui_focus(), gui_init(), gui_init(), gui_post_expose(), gui_post_expose(), gui_update(), gui_update(), invalidate_luminance_cache(), key_pressed(), masks_selection_changed(), mouse_moved(), mouse_moved(), optimize_changed_callback(), process(), process(), process(), process_cl(), process_cl(), process_clusters(), process_common_cleanup(), process_drago(), process_internal(), rt_auto_levels_callback(), rt_curr_scale_update(), rt_develop_ui_pipe_finished_callback(), rt_display_wavelet_scale_callback(), run_profile_callback(), run_validation_callback(), safety_changed_callback(), scrolled(), start_profiling_callback(), and update_histogram().

◆ dt_iop_gui_module_is_visible()

gboolean dt_iop_gui_module_is_visible ( dt_iop_module_t *  module)

check if current module is visible

Definition at line 545 of file imageop_gui.c.

References dt_iop_is_hidden(), and L.

Referenced by _focus_module(), dt_dev_modules_update_multishow(), dt_iop_gui_get_next_visible_module(), and dt_iop_gui_get_previous_visible_module().

◆ dt_iop_gui_owns_widget()

gboolean dt_iop_gui_owns_widget ( const dt_iop_module_t *  module,
const GtkWidget *  target 
)

Definition at line 2204 of file imageop_gui.c.

Referenced by _ui_scroll_target_is_live_widget().

◆ dt_iop_gui_rename_module()

◆ dt_iop_gui_reset_label_new()

GtkWidget * dt_iop_gui_reset_label_new ( const gchar *  label,
dt_iop_module_t *  module,
void *  param,
int  param_size 
)

◆ dt_iop_gui_set_enable_button()

void dt_iop_gui_set_enable_button ( dt_iop_module_t *  module)

updates the enable button state. (take into account module->enabled and module->hide_enable_button

Definition at line 993 of file imageop_gui.c.

References dt_gui_add_class(), dt_gui_remove_class(), dt_iop_gui_set_enable_button_icon(), FALSE, IS_NULL_PTR, L, and TRUE.

Referenced by _commit_gui(), dt_iop_gui_changed(), and dt_iop_gui_update_header().

◆ dt_iop_gui_set_enable_button_icon()

◆ dt_iop_gui_set_expanded()

◆ dt_iop_gui_set_expander()

◆ dt_iop_gui_update()

◆ dt_iop_gui_update_expanded()

void dt_iop_gui_update_expanded ( dt_iop_module_t *  module)

refresh iop according to set expanded state

Definition at line 1459 of file imageop_gui.c.

References DTGTK_EXPANDER, dtgtk_expander_set_expanded(), IS_NULL_PTR, and L.

Referenced by dt_iop_gui_update(), and enter().

◆ dt_iop_gui_update_header()

◆ dt_iop_is_visible()

gboolean dt_iop_is_visible ( dt_iop_module_t *  module)

Check if the module is currently visible in GUI

Definition at line 916 of file imageop_gui.c.

References dt_iop_is_hidden(), IS_NULL_PTR, and L.

◆ dt_iop_request_focus()

void dt_iop_request_focus ( dt_iop_module_t *  module)

Move darkroom focus to module, or clear it with NULL.

requests the focus for this plugin (to draw overlays over the center image) NOTE: this sets the current module expander as the scroll reference, which is handled when the parent panel changes size, which happens when uncollapsing the module. So dt_iop_request_focus() needs to be called before expanding modules (dt_iop_set_expanded) for auto-scroll to work properly.

Not a passive setter. It calls the outgoing module's gui_focus(FALSE) and the incoming one's gui_focus(TRUE) – which modules use to enter and leave edit modes – asks the panel to scroll the module into view, and triggers a module-visibility refresh that runs later, on the GTK main loop. Callers that change other state in the same callback should assume that refresh observes whatever is committed by the time control returns, not what is true at the moment of this call.

No-op when the module already has focus, or while widgets are suppressed.

Definition at line 1276 of file imageop_gui.c.

References dt_collection_get_global(), dt_collection_hint_message(), dt_control_queue_cursor, dt_control_queue_redraw_center(), dt_control_signal_get_global(), DT_DEBUG_CONTROL_SIGNAL_RAISE, dt_dev_get_global(), dt_dev_modulegroups_switch_tab(), dt_gui_add_class(), dt_gui_get_global(), dt_gui_refocus_center(), dt_gui_remove_class(), dt_gui_widgets_suppressed(), dt_iop_color_picker_reset(), dt_iop_gui_blending_lose_focus(), dt_iop_gui_get_pluginui(), dt_masks_reset_form_gui(), DT_SIGNAL_DEVELOP_MASKS_GUI_CHANGED, dt_widget_scroll_focus(), dt_widget_set_scroll_focus(), FALSE, dt_develop_t::gui_module, IS_NULL_PTR, L, dt_gui_gtk_t::scroll_to, dt_gui_gtk_t::scroll_to_header_once, and TRUE.

Referenced by _add_shape(), _area_button_press_callback(), _area_scroll_callback(), _auto_levels_callback(), _auto_levels_callback(), _blendop_blendif_channel_display_toggled(), _blendop_blendif_key_press(), _blendop_blendif_showmask_clicked(), _blendop_masks_shape_can_start(), _blendop_masks_show_and_edit(), _color_picker_callback_button_press(), _custom_model_callback(), _darkroom_image_loaded_callback(), _display_mask_callback(), _display_mask_indicator_callback(), _edit_masks(), _enter_edit_mode(), _enter_edit_mode(), _event_fit_both_button_clicked(), _event_fit_h_button_clicked(), _event_fit_v_button_clicked(), _event_structure_auto_clicked(), _event_structure_lines_clicked(), _event_structure_quad_clicked(), _focus_module(), _gui_delete_callback(), _gui_set_single_expanded(), _history_show_module_for_end(), _iop_ensure_visible(), _iop_plugin_body_button_press(), _iop_plugin_enable_accel(), _iop_plugin_header_button_release(), _modulegroups_switch_tab_next(), _modulegroups_switch_tab_previous(), _raster_combo_populate(), _scroll_event(), _select_region_toggled_callback(), _select_region_toggled_callback(), _update_iop_visibility(), acquire_source_button_pressed(), acquire_target_button_pressed(), area_button_press(), area_button_press(), area_button_release(), btn_make_radio_callback(), button_pressed(), button_pressed(), default_iop_focus(), dt_dev_history_gui_update(), dt_iop_gui_duplicate(), dt_iop_levels_button_press(), dt_iop_levels_scroll(), dt_masks_creation_mode_enter(), dt_masks_iop_combo_populate(), gui_reset(), key_pressed(), mask_callback(), notebook_button_press(), profile_changed(), rt_auto_levels_callback(), rt_display_wavelet_scale_callback(), rt_edit_masks_callback(), rt_select_algorithm_callback(), rt_shape_buttons_can_start(), rt_showmask_callback(), rt_suppress_callback(), rt_wdbar_button_press(), rt_wdbar_scrolled(), show_luminance_mask_callback(), start_profiling_callback(), and workicc_changed().

◆ dt_iop_togglebutton_new()

GtkWidget * dt_iop_togglebutton_new ( dt_iop_module_t *  self,
const char *  section,
const gchar *  label,
const gchar *  ctrl_label,
GCallback  callback,
gboolean  local,
guint  accel_key,
GdkModifierType  mods,
DTGTKCairoPaintIconFunc  paint,
GtkWidget *  box 
)

◆ dt_iop_togglebutton_new_no_register()

GtkWidget * dt_iop_togglebutton_new_no_register ( dt_iop_module_t *  self,
const char *  section,
const gchar *  label,
const gchar *  ctrl_label,
GCallback  callback,
gboolean  local,
guint  accel_key,
GdkModifierType  mods,
DTGTKCairoPaintIconFunc  paint,
GtkWidget *  box 
)

Build an IOP toggle button without registering it for module GUI refresh.

Definition at line 351 of file imageop_gui.c.

References dt_free, dtgtk_togglebutton_new(), FALSE, IS_NULL_PTR, L, and tooltip.

Referenced by dt_iop_gui_init_blendif(), dt_iop_gui_init_blending_body(), dt_iop_gui_init_masks(), and dt_masks_shape_buttons_create().

◆ dt_mask_scroll_increases()

gboolean dt_mask_scroll_increases ( int  up)

Definition at line 399 of file imageop_gui.c.

References dt_conf_get_bool(), and L.

Referenced by dt_masks_events_mouse_scrolled(), scrolled(), and scrolled().