![]() |
Ansel 0.0
A darktable fork - bloat + design vision
|
Go to the source code of this file.
Data Structures | |
| struct | dt_scroll_latch_t |
Macros | |
| #define | DT_SCROLL_LATCH_REST_MS 500 |
| #define | DT_SCROLL_LATCH_DRIFT_PX 4.0 |
| #define | DT_SCROLL_LATCH_KEY "dt-scroll-latch" |
Typedefs | |
| typedef struct dt_scroll_latch_t | dt_scroll_latch_t |
Functions | |
| static void | _latch_release (dt_scroll_latch_t *latch) |
| static gboolean | _latch_rested (gpointer data) |
| static gboolean | _window_step (GtkWidget *widget, const GdkEventScroll *event, dt_scroll_latch_t *latch) |
| static void | _window_moved (GtkAdjustment *adjustment __attribute__((unused)), gpointer scrolled_window) |
| static void | _step_to_window (dt_scroll_latch_t *latch) |
| static void | _step (GtkEventControllerScroll *controller __attribute__((unused)), gdouble dx __attribute__((unused)), gdouble dy __attribute__((unused)), dt_scroll_latch_t *latch) |
| static void | _step_end (GtkEventControllerScroll *controller __attribute__((unused)), dt_scroll_latch_t *latch) |
| static void | _pointer_moved (GtkEventControllerMotion *controller __attribute__((unused)), gdouble x __attribute__((unused)), gdouble y __attribute__((unused)), dt_scroll_latch_t *latch) |
| static void | _latch_free (gpointer data) |
| void | dt_ui_scroll_latch (GtkWidget *scrolled_window) |
Keep the mouse wheel on scrolled_window once it has started scrolling. | |
| #define DT_SCROLL_LATCH_DRIFT_PX 4.0 |
Definition at line 26 of file scroll_latch.c.
Referenced by _pointer_moved().
| #define DT_SCROLL_LATCH_KEY "dt-scroll-latch" |
Definition at line 28 of file scroll_latch.c.
Referenced by _window_moved(), and dt_ui_scroll_latch().
| #define DT_SCROLL_LATCH_REST_MS 500 |
Definition at line 24 of file scroll_latch.c.
Referenced by _window_moved(), and _window_step().
| typedef struct dt_scroll_latch_t dt_scroll_latch_t |
|
static |
Definition at line 120 of file scroll_latch.c.
References data, dt_free, dt_scroll_latch_t::motion, dt_scroll_latch_t::rest, and dt_scroll_latch_t::steps.
Referenced by dt_ui_scroll_latch().
|
static |
Definition at line 40 of file scroll_latch.c.
References dt_scroll_latch_t::motion, dt_scroll_latch_t::rest, and dt_scroll_latch_t::steps.
Referenced by _latch_rested(), and _pointer_moved().
|
static |
Definition at line 48 of file scroll_latch.c.
References _latch_release(), data, and dt_scroll_latch_t::rest.
Referenced by _window_moved(), and _window_step().
|
static |
Definition at line 105 of file scroll_latch.c.
References _latch_release(), DT_SCROLL_LATCH_DRIFT_PX, IS_NULL_PTR, x, dt_scroll_latch_t::x_root, and dt_scroll_latch_t::y_root.
Referenced by dt_ui_scroll_latch().
|
static |
Definition at line 92 of file scroll_latch.c.
References _step_to_window().
Referenced by dt_ui_scroll_latch().
|
static |
Definition at line 99 of file scroll_latch.c.
References _step_to_window().
Referenced by dt_ui_scroll_latch().
|
static |
Definition at line 84 of file scroll_latch.c.
References IS_NULL_PTR, and dt_scroll_latch_t::scrolled_window.
Referenced by _step(), and _step_end().
|
static |
Definition at line 75 of file scroll_latch.c.
References _latch_rested(), DT_SCROLL_LATCH_KEY, DT_SCROLL_LATCH_REST_MS, and dt_scroll_latch_t::rest.
Referenced by dt_ui_scroll_latch().
|
static |
Definition at line 57 of file scroll_latch.c.
References _latch_rested(), DT_SCROLL_LATCH_REST_MS, FALSE, dt_scroll_latch_t::motion, dt_scroll_latch_t::rest, dt_scroll_latch_t::steps, window, dt_scroll_latch_t::x_root, and dt_scroll_latch_t::y_root.
Referenced by dt_ui_scroll_latch().
Keep the mouse wheel on scrolled_window once it has started scrolling.
GTK gives each wheel step to the deepest widget under the pointer. While a scrolled window scrolls, its content moves under a still pointer, and the first child that takes the wheel (a graph, a list, a focused slider) stops the scroll and takes the steps that follow. Once scrolled_window has taken a step, every step over its content goes to it, until the wheel rests or the pointer moves.
| scrolled_window | a GtkScrolledWindow that already has its child: the latch is held on that child. |
Definition at line 129 of file scroll_latch.c.
References _latch_free(), _pointer_moved(), _step(), _step_end(), _window_moved(), _window_step(), DT_SCROLL_LATCH_KEY, dt_scroll_latch_t::motion, dt_scroll_latch_t::scrolled_window, and dt_scroll_latch_t::steps.
Referenced by _ui_init_panel_container_center().