Ansel 0.0
A darktable fork - bloat + design vision
Loading...
Searching...
No Matches
slideshow.c File Reference
#include "common/darktable.h"
#include "common/collection.h"
#include "common/selection.h"
#include "common/colorspaces.h"
#include "common/debug.h"
#include "common/dtpthread.h"
#include "common/imageio.h"
#include "common/imageio_module.h"
#include "control/conf.h"
#include "control/control.h"
#include "dtgtk/thumbtable.h"
#include "gui/gtk.h"
#include "views/view.h"
#include "views/view_api.h"
#include <gdk/gdkkeysyms.h>
#include <stdint.h>
+ Include dependency graph for slideshow.c:

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 Documentation

◆ dt_slideshow_buf_t

◆ dt_slideshow_cache_t

◆ dt_slideshow_event_t

◆ dt_slideshow_slot_t

◆ dt_slideshow_t

Enumeration Type Documentation

◆ dt_slideshow_event_t

Enumerator
S_REQUEST_STEP 
S_REQUEST_STEP_BACK 

◆ dt_slideshow_slot_t

Enumerator
S_LEFT 
S_CURRENT 
S_RIGHT 
S_SLOT_LAST 

Function Documentation

◆ _hide_mouse()

static gboolean _hide_mouse ( gpointer  user_data)
static

References d, dt_view_t::data, dt_control_change_cursor(), and FALSE.

Referenced by mouse_moved().

◆ _refresh_display()

static void _refresh_display ( dt_slideshow_t d)
static

◆ _set_delay()

static void _set_delay ( dt_slideshow_t d,
int  value 
)
static

◆ _slideshow_get_imgid_from_rank()

static int32_t _slideshow_get_imgid_from_rank ( const dt_slideshow_t d,
const int32_t  rank 
)
static

◆ _slideshow_request_slot()

◆ _slideshow_slow_down_accel()

static gboolean _slideshow_slow_down_accel ( GtkAccelGroup *  accel_group,
GObject *  accelerable,
guint  keyval,
GdkModifierType  mods,
gpointer  user_data 
)
static

Increase the slideshow delay and store it immediately so repeated keyboard adjustments persist across view changes.

References _set_delay(), d, dt_view_t::data, dt_control_log(), and TRUE.

Referenced by gui_init().

◆ _slideshow_speed_up_accel()

static gboolean _slideshow_speed_up_accel ( GtkAccelGroup *  accel_group,
GObject *  accelerable,
guint  keyval,
GdkModifierType  mods,
gpointer  user_data 
)
static

Decrease the slideshow delay and store it immediately so the current playback cadence matches the persisted preference.

References _set_delay(), d, dt_view_t::data, dt_control_log(), and TRUE.

Referenced by gui_init().

◆ _slideshow_start_stop_accel()

static gboolean _slideshow_start_stop_accel ( GtkAccelGroup *  accel_group,
GObject *  accelerable,
guint  keyval,
GdkModifierType  mods,
gpointer  user_data 
)
static

Toggle slideshow auto-advance using the same stepping code path as manual navigation, so pause/resume stays consistent with the current buffer state.

References auto_advance(), d, dt_view_t::data, dt_control_log(), FALSE, and TRUE.

Referenced by gui_init().

◆ _slideshow_step_back_accel()

static gboolean _slideshow_step_back_accel ( GtkAccelGroup *  accel_group,
GObject *  accelerable,
guint  keyval,
GdkModifierType  mods,
gpointer  user_data 
)
static

Step back in slideshow mode and keep the fullscreen image as the sole active image when the selection is temporarily cleared.

References _step_state(), d, dt_view_t::data, dt_control_log(), FALSE, S_REQUEST_STEP_BACK, and TRUE.

Referenced by gui_init().

◆ _slideshow_step_forward_accel()

static gboolean _slideshow_step_forward_accel ( GtkAccelGroup *  accel_group,
GObject *  accelerable,
guint  keyval,
GdkModifierType  mods,
gpointer  user_data 
)
static

Advance the slideshow while keeping auto-advance and global actions synced with the image currently displayed fullscreen.

References _step_state(), d, dt_view_t::data, dt_control_log(), FALSE, S_REQUEST_STEP, and TRUE.

Referenced by gui_init().

◆ _step_state()

◆ auto_advance()

◆ button_pressed()

int button_pressed ( dt_view_t self,
double  x,
double  y,
double  pressure,
int  which,
int  type,
uint32_t  state 
)

◆ button_released()

int button_released ( dt_view_t self,
double  x,
double  y,
int  which,
uint32_t  state 
)

◆ cleanup()

◆ enter()

◆ expose()

◆ gui_init()

◆ init()

◆ key_pressed()

int key_pressed ( dt_view_t self,
GdkEventKey *  event 
)

◆ leave()

◆ mouse_moved()

void mouse_moved ( dt_view_t self,
double  x,
double  y,
double  pressure,
int  which 
)

◆ name()

const char * name ( const dt_view_t self)

◆ shift_left()

static void shift_left ( dt_slideshow_t d)
static

References d, k, S_CURRENT, S_LEFT, S_RIGHT, TRUE, and UNKNOWN_IMAGE.

Referenced by _step_state().

◆ shift_right()

static void shift_right ( dt_slideshow_t d)
static

References d, k, S_CURRENT, S_LEFT, S_RIGHT, TRUE, and UNKNOWN_IMAGE.

Referenced by _step_state().

◆ try_enter()

◆ view()

uint32_t view ( const dt_view_t self)

References DT_VIEW_SLIDESHOW.