38 if(!
dev->gui_attached)
return;
43 GList *removed = NULL;
53 for(GList *l = removed; l; l = g_list_next(l))
67 for(GList *module = g_list_first(
dev->iop); module; module = g_list_next(module))
96 const int request_mask_display)
106 module->request_mask_display = request_mask_display;
111 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(bd->
showmask),
194 GQueue ready = G_QUEUE_INIT;
200 while(!g_queue_is_empty(&ready))
207 return G_SOURCE_REMOVE;
217 GdkEvent *
event = gtk_get_current_event();
218 const GdkEventType
type =
IS_NULL_PTR(event) ? GDK_NOTHING : gdk_event_get_event_type(event);
219 const gboolean toggle_click = (
type == GDK_BUTTON_PRESS ||
type == GDK_BUTTON_RELEASE)
220 && GTK_IS_TOGGLE_BUTTON(gtk_get_event_widget(event));
222 const guint32 choice_time =
IS_NULL_PTR(event) ? 0 : gdk_event_get_time(event);
223 g_clear_pointer(&event, gdk_event_free);
224 const gboolean switched = choice
225 && (
type == GDK_NOTHING
293 GList *next = g_list_next(iter);
320 GList *next = g_list_next(iter);
void dt_iop_gui_update_blendif(dt_iop_module_t *module)
The blending panel's GUI state and API, cut out of develop/blend.h.
typedef void((*dt_cache_allocate_t)(void *userdata, dt_cache_entry_t *entry))
void dt_dev_history_set_commit_gui_handler(dt_dev_history_commit_gui_handler_t handler)
void dt_dev_history_commit_item_now(dt_develop_t *dev, dt_iop_module_t *module, gboolean enable, gboolean switched)
Commit one history item immediately – record undo, take history_mutex as writer, write through,...
void dt_dev_history_set_undo_restore_gui_handler(dt_dev_history_undo_restore_gui_handler_t handler)
int dt_dev_history_refresh_nodes_ext(dt_develop_t *dev, GList **iop, GList *history, GList **removed_gui_modules)
Refresh GUI module nodes to match history state.
void dt_dev_add_history_item_real(dt_develop_t *dev, dt_iop_module_t *module, gboolean enable, gboolean redraw)
Thread-safe wrapper around dt_dev_add_history_item_ext().
void dt_dev_history_drop_pending_commits(dt_develop_t *dev)
Discard every history commit still queued for dev, without running it.
static gboolean _drain_pending_commits(gpointer user_data)
void dt_dev_history_flush_pending_commits(dt_develop_t *dev)
Run every history commit still queued for dev, now.
static GQueue _pending_commits
static guint32 _last_choice_time
void dt_dev_history_gui_init(void)
Install the history engine's GUI handlers. Called once from dt_init() beside the other handler instal...
static guint _pending_commit_source
static void _history_gui_refresh(dt_develop_t *dev)
static void _commit_gui(dt_develop_t *dev, dt_iop_module_t *module)
static void _queue_pending_commit(dt_develop_t *dev, dt_iop_module_t *module, const gboolean enable)
void dt_dev_history_gui_update(dt_develop_t *dev)
Apply history-loaded params to module GUIs.
static gboolean _request_is_switch(void)
static void _undo_restore_gui(dt_develop_t *dev, const int mask_edit_mode, const int request_mask_display)
void dt_dev_history_commit_item_from_gui(dt_develop_t *dev, dt_iop_module_t *module, const gboolean enable)
Commit one history item from a GUI control now, after the commits queued before it.
The GTK half of the history engine, following the blend.c/blend_gui.c pattern.
dt_atomic_set_uint64 & dev
void dt_dev_signal_modules_moved(dt_develop_t *dev)
void dt_dev_masks_list_change(dt_develop_t *dev)
int dt_dev_get_thumbnail_size(dt_develop_t *dev)
@ DT_DEV_PIXELPIPE_DISPLAY_MASK
static int dt_pthread_rwlock_wrlock(dt_pthread_rwlock_t *rwlock) ACQUIRE(rwlock) NO_THREAD_SAFETY_ANALYSIS
static int dt_pthread_rwlock_unlock(dt_pthread_rwlock_t *rwlock) RELEASE_GENERIC(rwlock) NO_THREAD_SAFETY_ANALYSIS
guint dt_gui_throttle_get_user_timeout_ms(void)
guint dt_gui_throttle_get_timeout_ms(void)
static gboolean enable(const dt_image_t *image)
gboolean dt_iop_is_hidden(dt_iop_module_t *module)
void dt_iop_gui_cleanup_module(dt_iop_module_t *module)
void dt_iop_gui_set_expander(dt_iop_module_t *module)
void dt_iop_gui_init(dt_iop_module_t *module)
void dt_iop_gui_update(dt_iop_module_t *module)
void dt_iop_gui_set_enable_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.
_lib_location_type_t type
#define IS_NULL_PTR(p)
C is way too permissive with !=, == and if(var) checks, which can mean too many things depending on w...
void dt_masks_set_edit_mode(struct dt_iop_module_t *module, dt_masks_edit_mode_t value)
gboolean dt_masks_form_exit_creation(dt_iop_module_t *module, dt_masks_form_gui_t *mask_gui)
The interactive half of the masks subsystem: the editing state (dt_masks_form_gui_t),...
#define dt_free(ptr)
g_free() ptr and set it to NULL, skipping both if it is already NULL.
struct dt_iop_module_gui_t * gui
void(* modify_roi_out)(struct dt_iop_module_t *self, const struct dt_dev_pixelpipe_t *pipe, struct dt_dev_pixelpipe_iop_t *piece, struct dt_iop_roi_t *roi_out, const struct dt_iop_roi_t *roi_in)
void(* modify_roi_in)(struct dt_iop_module_t *self, const struct dt_dev_pixelpipe_t *pipe, struct dt_dev_pixelpipe_iop_t *piece, const struct dt_iop_roi_t *roi_out, struct dt_iop_roi_t *roi_in)