Ansel 0.0
A darktable fork - bloat + design vision
Loading...
Searching...
No Matches
undo.c File Reference
#include "common/undo.h"
#include "common/collection.h"
#include "common/darktable.h"
#include "common/image.h"
#include "control/control.h"
#include <glib.h>
#include <stdlib.h>
#include <sys/time.h>
+ Include dependency graph for undo.c:

Data Structures

struct  dt_undo_item_t
 

Macros

#define LOCK    dt_pthread_mutex_lock(&self->mutex); self->locked = TRUE
 
#define UNLOCK    self->locked = FALSE; dt_pthread_mutex_unlock(&self->mutex)
 

Typedefs

typedef struct dt_undo_item_t dt_undo_item_t
 

Functions

dt_undo_tdt_undo_init (void)
 
void dt_undo_disable_next (dt_undo_t *self)
 
void dt_undo_cleanup (dt_undo_t *self)
 
static void _free_undo_data (void *p)
 
static void _undo_record (dt_undo_t *self, gpointer user_data, dt_undo_type_t type, dt_undo_data_t data, gboolean is_group, void(*undo)(gpointer user_data, dt_undo_type_t type, dt_undo_data_t item, dt_undo_action_t action, GList **imgs), void(*free_data)(gpointer data))
 
void dt_undo_start_group (dt_undo_t *self, dt_undo_type_t type)
 
void dt_undo_end_group (dt_undo_t *self)
 
void dt_undo_record (dt_undo_t *self, gpointer user_data, dt_undo_type_t type, dt_undo_data_t data, void(*undo)(gpointer user_data, dt_undo_type_t type, dt_undo_data_t item, dt_undo_action_t action, GList **imgs), void(*free_data)(gpointer data))
 
gint _images_list_cmp (gconstpointer a, gconstpointer b)
 
static void _undo_do_undo_redo (dt_undo_t *self, uint32_t filter, dt_undo_action_t action)
 
void dt_undo_do_redo (dt_undo_t *self, uint32_t filter)
 
void dt_undo_do_undo (dt_undo_t *self, uint32_t filter)
 
static gboolean _is_do_undo_list_populated (dt_undo_t *self, uint32_t filter, dt_undo_action_t action)
 
gboolean dt_is_undo_list_populated (dt_undo_t *self, uint32_t filter)
 
gboolean dt_is_redo_list_populated (dt_undo_t *self, uint32_t filter)
 
static void _undo_clear_list (GList **list, uint32_t filter)
 
void dt_undo_clear (dt_undo_t *self, uint32_t filter)
 
static void _undo_iterate (GList *list, uint32_t filter, gpointer user_data, void(*apply)(gpointer user_data, dt_undo_type_t type, dt_undo_data_t item))
 
void dt_undo_iterate_internal (dt_undo_t *self, uint32_t filter, gpointer user_data, void(*apply)(gpointer user_data, dt_undo_type_t type, dt_undo_data_t item))
 
void dt_undo_iterate (dt_undo_t *self, uint32_t filter, gpointer user_data, void(*apply)(gpointer user_data, dt_undo_type_t type, dt_undo_data_t item))
 

Variables

const double MAX_TIME_PERIOD = 0.5
 

Macro Definition Documentation

◆ LOCK

#define LOCK    dt_pthread_mutex_lock(&self->mutex); self->locked = TRUE

◆ UNLOCK

#define UNLOCK    self->locked = FALSE; dt_pthread_mutex_unlock(&self->mutex)

Typedef Documentation

◆ dt_undo_item_t

Function Documentation

◆ _free_undo_data()

static void _free_undo_data ( void p)
static

◆ _images_list_cmp()

gint _images_list_cmp ( gconstpointer  a,
gconstpointer  b 
)

Referenced by _undo_do_undo_redo().

◆ _is_do_undo_list_populated()

static gboolean _is_do_undo_list_populated ( dt_undo_t self,
uint32_t  filter,
dt_undo_action_t  action 
)
static

◆ _undo_clear_list()

static void _undo_clear_list ( GList **  list,
uint32_t  filter 
)
static

◆ _undo_do_undo_redo()

◆ _undo_iterate()

static void _undo_iterate ( GList *  list,
uint32_t  filter,
gpointer  user_data,
void(*)(gpointer user_data, dt_undo_type_t type, dt_undo_data_t item)  apply 
)
static

◆ _undo_record()

◆ dt_is_redo_list_populated()

gboolean dt_is_redo_list_populated ( dt_undo_t self,
uint32_t  filter 
)

◆ dt_is_undo_list_populated()

gboolean dt_is_undo_list_populated ( dt_undo_t self,
uint32_t  filter 
)

◆ dt_undo_cleanup()

void dt_undo_cleanup ( dt_undo_t self)

◆ dt_undo_clear()

◆ dt_undo_disable_next()

void dt_undo_disable_next ( dt_undo_t self)

◆ dt_undo_do_redo()

void dt_undo_do_redo ( dt_undo_t self,
uint32_t  filter 
)

References _undo_do_undo_redo(), and DT_ACTION_REDO.

Referenced by redo_callback().

◆ dt_undo_do_undo()

void dt_undo_do_undo ( dt_undo_t self,
uint32_t  filter 
)

References _undo_do_undo_redo(), and DT_ACTION_UNDO.

Referenced by undo_callback().

◆ dt_undo_end_group()

◆ dt_undo_init()

◆ dt_undo_iterate()

void dt_undo_iterate ( dt_undo_t self,
uint32_t  filter,
gpointer  user_data,
void(*)(gpointer user_data, dt_undo_type_t type, dt_undo_data_t item)  apply 
)

◆ dt_undo_iterate_internal()

void dt_undo_iterate_internal ( dt_undo_t self,
uint32_t  filter,
gpointer  user_data,
void(*)(gpointer user_data, dt_undo_type_t type, dt_undo_data_t item)  apply 
)

◆ dt_undo_record()

◆ dt_undo_start_group()

Variable Documentation

◆ MAX_TIME_PERIOD

const double MAX_TIME_PERIOD = 0.5

Referenced by _undo_do_undo_redo().