![]() |
Ansel 0.0
A darktable fork - bloat + design vision
|
#include "database/database.h"#include "database/collection_query.h"#include "widgets/widget_settings.h"#include "common/image.h"#include "system/macros.h"#include "system/mem_alloc.h"#include "common/module_versioning.h"#include "common/collection.h"#include "common/selection.h"#include "system/dtpthread.h"#include "common/conf.h"#include "control/control.h"#include "gui/dtgtk/thumbtable.h"#include "gui/application.h"#include "views/view.h"#include "views/view_api.h"#include <gdk/gdkkeysyms.h>#include <stdint.h>
Include dependency graph for slideshow.c:Go to the source code of this file.
Data Structures | |
| struct | _slideshow_buf_t |
| struct | dt_slideshow_cache_t |
| struct | dt_slideshow_t |
Typedefs | |
| typedef enum dt_slideshow_event_t | dt_slideshow_event_t |
| typedef enum dt_slideshow_slot_t | dt_slideshow_slot_t |
| typedef struct _slideshow_buf_t | dt_slideshow_buf_t |
| typedef struct dt_slideshow_cache_t | dt_slideshow_cache_t |
| typedef struct dt_slideshow_t | dt_slideshow_t |
Enumerations | |
| enum | dt_slideshow_event_t { S_REQUEST_STEP , S_REQUEST_STEP_BACK } |
| enum | dt_slideshow_slot_t { S_LEFT = 0 , S_CURRENT = 1 , S_RIGHT = 2 , S_SLOT_LAST = 3 } |
Functions | |
| static void | _step_state (dt_slideshow_t *d, dt_slideshow_event_t event) |
| static void | shift_left (dt_slideshow_t *d) |
| static void | shift_right (dt_slideshow_t *d) |
| static void | _set_delay (dt_slideshow_t *d, int value) |
| static int32_t | _slideshow_get_imgid_from_rank (const dt_slideshow_t *d, const int32_t rank) |
| static dt_view_surface_value_t | _slideshow_request_slot (dt_slideshow_t *d, const dt_slideshow_slot_t slot) |
| static gboolean | auto_advance (gpointer user_data) |
| static void | _refresh_display (dt_slideshow_t *d) |
| const char * | name (const dt_view_t *self) |
| uint32_t | view (const dt_view_t *self) |
| void | init (dt_view_t *self) |
| void | cleanup (dt_view_t *self) |
| int | try_enter (dt_view_t *self) |
| void | enter (dt_view_t *self) |
| void | leave (dt_view_t *self) |
| void | expose (dt_view_t *self, cairo_t *cr, int32_t width, int32_t height, int32_t pointerx, int32_t pointery) |
| int | key_pressed (dt_view_t *self, GdkEventKey *event) |
| static gboolean | _slideshow_start_stop_accel (GtkAccelGroup *accel_group, GObject *accelerable, guint keyval, GdkModifierType mods, gpointer user_data) |
| Toggle slideshow auto-advance using the same stepping code path as manual navigation, so pause/resume stays consistent with the current buffer state. | |
| static gboolean | _slideshow_slow_down_accel (GtkAccelGroup *accel_group, GObject *accelerable, guint keyval, GdkModifierType mods, gpointer user_data) |
| Increase the slideshow delay and store it immediately so repeated keyboard adjustments persist across view changes. | |
| static gboolean | _slideshow_speed_up_accel (GtkAccelGroup *accel_group, GObject *accelerable, guint keyval, GdkModifierType mods, gpointer user_data) |
| Decrease the slideshow delay and store it immediately so the current playback cadence matches the persisted preference. | |
| static gboolean | _slideshow_step_forward_accel (GtkAccelGroup *accel_group, GObject *accelerable, guint keyval, GdkModifierType mods, gpointer user_data) |
| Advance the slideshow while keeping auto-advance and global actions synced with the image currently displayed fullscreen. | |
| static gboolean | _slideshow_step_back_accel (GtkAccelGroup *accel_group, GObject *accelerable, guint keyval, GdkModifierType mods, gpointer user_data) |
| Step back in slideshow mode and keep the fullscreen image as the sole active image when the selection is temporarily cleared. | |
| static gboolean | _hide_mouse (gpointer user_data) |
| void | mouse_moved (dt_view_t *self, double x, double y, double pressure, int which) |
| int | button_released (dt_view_t *self, double x, double y, int which, uint32_t state) |
| int | button_pressed (dt_view_t *self, double x, double y, double pressure, int which, int type, uint32_t state) |
| void | gui_init (dt_view_t *self) |
| typedef struct _slideshow_buf_t dt_slideshow_buf_t |
| typedef struct dt_slideshow_cache_t dt_slideshow_cache_t |
| typedef enum dt_slideshow_event_t dt_slideshow_event_t |
| typedef enum dt_slideshow_slot_t dt_slideshow_slot_t |
| typedef struct dt_slideshow_t dt_slideshow_t |
| enum dt_slideshow_event_t |
| Enumerator | |
|---|---|
| S_REQUEST_STEP | |
| S_REQUEST_STEP_BACK | |
Definition at line 58 of file slideshow.c.
| enum dt_slideshow_slot_t |
| Enumerator | |
|---|---|
| S_LEFT | |
| S_CURRENT | |
| S_RIGHT | |
| S_SLOT_LAST | |
Definition at line 64 of file slideshow.c.
|
static |
Definition at line 604 of file slideshow.c.
References d, dt_view_t::data, dt_control_change_cursor, and FALSE.
Referenced by mouse_moved().
|
static |
Definition at line 224 of file slideshow.c.
References _slideshow_request_slot(), d, dt_control_queue_redraw_center(), S_CURRENT, S_LEFT, and S_RIGHT.
Referenced by _step_state(), and enter().
|
static |
Definition at line 145 of file slideshow.c.
References d, dt_conf_set_int(), and value.
Referenced by _slideshow_slow_down_accel(), and _slideshow_speed_up_accel().
|
static |
Definition at line 151 of file slideshow.c.
References d, dt_collection_query_get_nth(), and UNKNOWN_IMAGE.
Referenced by _slideshow_request_slot(), _step_state(), and enter().
|
static |
Definition at line 165 of file slideshow.c.
References _slideshow_get_imgid_from_rank(), _slideshow_buf_t::cache, d, dt_gui_center_widget(), DT_THUMBTABLE_ZOOM_FIT, dt_view_image_get_surface_async(), dt_view_image_surface_fetcher_invalidate(), DT_VIEW_SURFACE_KO, DT_VIEW_SURFACE_OK, FALSE, dt_slideshow_cache_t::fetcher, height, _slideshow_buf_t::imgid, _slideshow_buf_t::invalidated, MAX, _slideshow_buf_t::rank, res, dt_slideshow_cache_t::surface, TRUE, UNKNOWN_IMAGE, and width.
Referenced by _refresh_display(), auto_advance(), and expose().
|
static |
Increase the slideshow delay and store it immediately so repeated keyboard adjustments persist across view changes.
Definition at line 544 of file slideshow.c.
References _set_delay(), d, dt_view_t::data, dt_control_log(), and TRUE.
Referenced by gui_init().
|
static |
Decrease the slideshow delay and store it immediately so the current playback cadence matches the persisted preference.
Definition at line 559 of file slideshow.c.
References _set_delay(), d, dt_view_t::data, dt_control_log(), and TRUE.
Referenced by gui_init().
|
static |
Toggle slideshow auto-advance using the same stepping code path as manual navigation, so pause/resume stays consistent with the current buffer state.
Definition at line 518 of file slideshow.c.
References auto_advance(), d, dt_view_t::data, dt_control_log(), FALSE, and TRUE.
Referenced by gui_init().
|
static |
Step back in slideshow mode and keep the fullscreen image as the sole active image when the selection is temporarily cleared.
Definition at line 591 of file slideshow.c.
References _step_state(), d, dt_view_t::data, dt_control_log(), FALSE, S_REQUEST_STEP_BACK, and TRUE.
Referenced by gui_init().
|
static |
Advance the slideshow while keeping auto-advance and global actions synced with the image currently displayed fullscreen.
Definition at line 574 of file slideshow.c.
References _step_state(), d, dt_view_t::data, dt_control_log(), FALSE, S_REQUEST_STEP, and TRUE.
Referenced by gui_init().
|
static |
Definition at line 233 of file slideshow.c.
References _refresh_display(), _slideshow_get_imgid_from_rank(), auto_advance(), d, dt_control_log(), dt_pthread_mutex_lock(), dt_pthread_mutex_unlock(), dt_view_active_images_add(), dt_view_active_images_reset(), FALSE, S_CURRENT, S_LEFT, S_REQUEST_STEP, S_REQUEST_STEP_BACK, S_RIGHT, shift_left(), shift_right(), and UNKNOWN_IMAGE.
Referenced by _slideshow_step_back_accel(), _slideshow_step_forward_accel(), auto_advance(), and button_pressed().
|
static |
Definition at line 195 of file slideshow.c.
References _slideshow_request_slot(), _step_state(), auto_advance(), dt_slideshow_t::auto_advance_timeout, d, dt_control_queue_redraw_center(), dt_pthread_mutex_lock(), dt_pthread_mutex_unlock(), FALSE, S_CURRENT, S_LEFT, S_REQUEST_STEP, and S_RIGHT.
Referenced by _slideshow_start_stop_accel(), _step_state(), and auto_advance().
| int button_pressed | ( | dt_view_t * | self, |
| double | x, | ||
| double | y, | ||
| double | pressure, | ||
| int | which, | ||
| int | type, | ||
| uint32_t | state | ||
| ) |
Definition at line 630 of file slideshow.c.
References _step_state(), d, dt_view_t::data, S_REQUEST_STEP, and S_REQUEST_STEP_BACK.
Definition at line 624 of file slideshow.c.
Definition at line 317 of file slideshow.c.
References dt_slideshow_t::auto_advance_timeout, dt_slideshow_t::cache, dt_view_t::data, dt_free, dt_pthread_mutex_destroy(), dt_view_image_surface_fetcher_cleanup(), dt_slideshow_cache_t::fetcher, dt_slideshow_t::incoming_selection, k, dt_slideshow_t::lock, dt_slideshow_t::mouse_timeout, dt_slideshow_t::playlist, S_LEFT, and S_SLOT_LAST.
Definition at line 344 of file slideshow.c.
References _refresh_display(), _slideshow_get_imgid_from_rank(), d, dt_view_t::data, dt_accels_connect_accels(), dt_accels_connect_active_group(), dt_collection_get_count(), dt_collection_get_global(), dt_conf_get_int(), dt_control_change_cursor, dt_control_log(), dt_control_queue_redraw(), dt_gui_get_accels(), dt_gui_get_ui(), dt_gui_main_window(), dt_gui_refocus_center(), dt_pthread_mutex_lock(), dt_pthread_mutex_unlock(), dt_selection_clear(), dt_selection_get_global(), DT_UI_PANEL_BOTTOM, DT_UI_PANEL_LEFT, DT_UI_PANEL_RIGHT, dt_ui_panel_show(), DT_UI_PANEL_TOP, dt_view_active_images_add(), dt_view_active_images_get_all(), dt_view_active_images_reset(), dt_view_active_images_set(), dt_view_image_surface_fetcher_invalidate(), FALSE, k, mon, S_CURRENT, S_LEFT, S_RIGHT, S_SLOT_LAST, TRUE, UNKNOWN_IMAGE, rect::width, and window.
| void expose | ( | dt_view_t * | self, |
| cairo_t * | cr, | ||
| int32_t | width, | ||
| int32_t | height, | ||
| int32_t | pointerx, | ||
| int32_t | pointery | ||
| ) |
Definition at line 455 of file slideshow.c.
References _slideshow_request_slot(), _slideshow_buf_t::cache, d, dt_view_t::data, dt_control_draw_busy_msg(), dt_pthread_mutex_lock(), dt_pthread_mutex_unlock(), dt_widget_image_filter(), height, _slideshow_buf_t::invalidated, _slideshow_buf_t::rank, S_CURRENT, S_LEFT, S_RIGHT, dt_slideshow_cache_t::surface, and width.
Definition at line 644 of file slideshow.c.
References _slideshow_slow_down_accel(), _slideshow_speed_up_accel(), _slideshow_start_stop_accel(), _slideshow_step_back_accel(), _slideshow_step_forward_accel(), and dt_accels_new_slideshow_action.
Definition at line 301 of file slideshow.c.
References dt_slideshow_t::buf, _slideshow_buf_t::cache, dt_slideshow_t::cache, dt_view_t::data, dt_pthread_mutex_init(), dt_view_image_surface_fetcher_init(), dt_slideshow_cache_t::fetcher, _slideshow_buf_t::imgid, _slideshow_buf_t::invalidated, k, dt_slideshow_t::lock, _slideshow_buf_t::rank, S_LEFT, S_SLOT_LAST, TRUE, and UNKNOWN_IMAGE.
| int key_pressed | ( | dt_view_t * | self, |
| GdkEventKey * | event | ||
| ) |
Definition at line 497 of file slideshow.c.
References dt_ctl_switch_mode_to(), dt_gui_get_ui(), FALSE, and TRUE.
Definition at line 426 of file slideshow.c.
References d, dt_view_t::data, dt_accels_disconnect_active_group(), dt_control_change_cursor, dt_gui_get_accels(), dt_selection_clear(), dt_selection_get_global(), dt_selection_select_list(), dt_view_active_images_get_all(), dt_view_active_images_reset(), dt_view_image_surface_fetcher_invalidate(), FALSE, k, S_LEFT, S_SLOT_LAST, TRUE, and UNKNOWN_IMAGE.
Definition at line 614 of file slideshow.c.
References _hide_mouse(), d, dt_view_t::data, and dt_control_change_cursor.
| const char * name | ( | const dt_view_t * | self | ) |
Definition at line 291 of file slideshow.c.
|
static |
Definition at line 111 of file slideshow.c.
References d, k, S_CURRENT, S_LEFT, S_RIGHT, TRUE, and UNKNOWN_IMAGE.
Referenced by _step_state().
|
static |
Definition at line 128 of file slideshow.c.
References d, k, S_CURRENT, S_LEFT, S_RIGHT, TRUE, and UNKNOWN_IMAGE.
Referenced by _step_state().
| int try_enter | ( | dt_view_t * | self | ) |
Definition at line 330 of file slideshow.c.
References d, dt_view_t::data, dt_collection_get_count(), dt_collection_get_global(), dt_control_log(), dt_selection_get_global(), dt_selection_get_list(), and dt_view_active_images_get_all().
| uint32_t view | ( | const dt_view_t * | self | ) |
Definition at line 296 of file slideshow.c.
References DT_VIEW_SLIDESHOW.