Ansel 0.0
A darktable fork - bloat + design vision
Loading...
Searching...
No Matches
signal.h File Reference
#include <glib-object.h>
+ Include dependency graph for signal.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define DT_DEBUG_CONTROL_SIGNAL_RAISE(ctlsig, signal, ...)
 
#define DT_DEBUG_CONTROL_SIGNAL_CONNECT(ctlsig, signal, cb, user_data)
 
#define DT_DEBUG_CONTROL_SIGNAL_DISCONNECT(ctlsig, cb, user_data)
 

Typedefs

typedef G_BEGIN_DECLS enum dt_signal_t dt_signal_t
 enum of signals to listen for in darktable.
 
typedef enum dt_debug_signal_action_t dt_debug_signal_action_t
 

Enumerations

enum  dt_signal_t {
  DT_SIGNAL_MOUSE_OVER_IMAGE_CHANGE ,
  DT_SIGNAL_ACTIVE_IMAGES_CHANGE ,
  DT_SIGNAL_CONTROL_REDRAW_ALL ,
  DT_SIGNAL_CONTROL_REDRAW_CENTER ,
  DT_SIGNAL_VIEWMANAGER_VIEW_CHANGED ,
  DT_SIGNAL_VIEWMANAGER_VIEW_CANNOT_CHANGE ,
  DT_SIGNAL_VIEWMANAGER_THUMBTABLE_ACTIVATE ,
  DT_SIGNAL_COLLECTION_CHANGED ,
  DT_SIGNAL_SELECTION_CHANGED ,
  DT_SIGNAL_TAG_CHANGED ,
  DT_SIGNAL_GEOTAG_CHANGED ,
  DT_SIGNAL_METADATA_CHANGED ,
  DT_SIGNAL_IMAGE_INFO_CHANGED ,
  DT_SIGNAL_STYLE_CHANGED ,
  DT_SIGNAL_IMAGES_ORDER_CHANGE ,
  DT_SIGNAL_FILMROLLS_CHANGED ,
  DT_SIGNAL_FILMROLLS_REMOVED ,
  DT_SIGNAL_PRESETS_CHANGED ,
  DT_SIGNAL_DEVELOP_INITIALIZE ,
  DT_SIGNAL_DEVELOP_PREVIEW_PIPE_FINISHED ,
  DT_SIGNAL_DEVELOP_UI_PIPE_FINISHED ,
  DT_SIGNAL_DEVELOP_HISTORY_WILL_CHANGE ,
  DT_SIGNAL_DEVELOP_HISTORY_CHANGE ,
  DT_SIGNAL_DEVELOP_MODULE_REMOVE ,
  DT_SIGNAL_DEVELOP_MODULE_MOVED ,
  DT_SIGNAL_DEVELOP_IMAGE_CHANGED ,
  DT_SIGNAL_CONTROL_PROFILE_CHANGED ,
  DT_SIGNAL_CONTROL_PROFILE_USER_CHANGED ,
  DT_SIGNAL_IMAGE_IMPORT ,
  DT_SIGNAL_IMAGE_EXPORT_TMPFILE ,
  DT_SIGNAL_IMAGEIO_STORAGE_CHANGE ,
  DT_SIGNAL_PREFERENCES_CHANGE ,
  DT_SIGNAL_CONTROL_NAVIGATION_REDRAW ,
  DT_SIGNAL_CONTROL_LOG_REDRAW ,
  DT_SIGNAL_CONTROL_TOAST_REDRAW ,
  DT_SIGNAL_CONTROL_PICKERDATA_READY ,
  DT_SIGNAL_METADATA_UPDATE ,
  DT_SIGNAL_LOCATION_CHANGED ,
  DT_SIGNAL_MASK_SELECTION_CHANGED ,
  DT_SIGNAL_FILELIST_CHANGED ,
  DT_SIGNAL_COUNT
}
 enum of signals to listen for in darktable. More...
 
enum  dt_debug_signal_action_t {
  DT_DEBUG_SIGNAL_ACT_RAISE = 1 << 0 ,
  DT_DEBUG_SIGNAL_ACT_CONNECT = 1 << 1 ,
  DT_DEBUG_SIGNAL_ACT_DISCONNECT = 1 << 2 ,
  DT_DEBUG_SIGNAL_ACT_PRINT_TRACE = 1 << 3
}
 

Functions

struct dt_control_signal_tdt_control_signal_init ()
 
void dt_control_signal_raise (const struct dt_control_signal_t *ctlsig, const dt_signal_t signal,...)
 
void dt_control_signal_connect (const struct dt_control_signal_t *ctlsig, const dt_signal_t signal, GCallback cb, gpointer user_data)
 
void dt_control_signal_disconnect (const struct dt_control_signal_t *ctlsig, GCallback cb, gpointer user_data)
 
void dt_control_signal_block_by_func (const struct dt_control_signal_t *ctlsig, GCallback cb, gpointer user_data)
 
void dt_control_signal_unblock_by_func (const struct dt_control_signal_t *ctlsig, GCallback cb, gpointer user_data)
 

Macro Definition Documentation

◆ DT_DEBUG_CONTROL_SIGNAL_CONNECT

#define DT_DEBUG_CONTROL_SIGNAL_CONNECT (   ctlsig,
  signal,
  cb,
  user_data 
)
Value:
do \
{ \
{ \
dt_print(DT_DEBUG_SIGNAL, "[signal] %s:%d, function: %s() connect handler %s to signal %s\n", __FILE__, __LINE__, \
__FUNCTION__, #cb, #signal); \
} \
dt_control_signal_connect(ctlsig, signal, cb, user_data); \
} while (0)
darktable_t darktable
Definition darktable.c:111
@ DT_DEBUG_SIGNAL
Definition darktable.h:491
@ DT_DEBUG_SIGNAL_ACT_CONNECT
Definition signal.h:257
int32_t unmuted_signal_dbg_acts
Definition darktable.h:597
gboolean unmuted_signal_dbg[DT_SIGNAL_COUNT]
Definition darktable.h:598

◆ DT_DEBUG_CONTROL_SIGNAL_DISCONNECT

#define DT_DEBUG_CONTROL_SIGNAL_DISCONNECT (   ctlsig,
  cb,
  user_data 
)
Value:
do \
{ \
{ \
dt_print(DT_DEBUG_SIGNAL, "[signal] %s:%d, function: %s() disconnect handler %s\n", __FILE__, __LINE__, __FUNCTION__, #cb);\
} \
dt_control_signal_disconnect(ctlsig, cb, user_data); \
} while (0)
@ DT_DEBUG_SIGNAL_ACT_DISCONNECT
Definition signal.h:258

◆ DT_DEBUG_CONTROL_SIGNAL_RAISE

#define DT_DEBUG_CONTROL_SIGNAL_RAISE (   ctlsig,
  signal,
  ... 
)
Value:
do \
{ \
{ \
dt_print(DT_DEBUG_SIGNAL, "[signal] %s:%d, function %s(): raise signal %s\n", __FILE__, __LINE__, __FUNCTION__, #signal); \
} \
dt_control_signal_raise(ctlsig, signal, ##__VA_ARGS__); \
} while (0)
@ DT_DEBUG_SIGNAL_ACT_RAISE
Definition signal.h:256

Typedef Documentation

◆ dt_debug_signal_action_t

◆ dt_signal_t

typedef G_BEGIN_DECLS enum dt_signal_t dt_signal_t

enum of signals to listen for in darktable.

Note
To add a new signal, first off add a enum and document what it's used for, then add a matching signal string name to _strings in signal.c

Enumeration Type Documentation

◆ dt_debug_signal_action_t

Enumerator
DT_DEBUG_SIGNAL_ACT_RAISE 
DT_DEBUG_SIGNAL_ACT_CONNECT 
DT_DEBUG_SIGNAL_ACT_DISCONNECT 
DT_DEBUG_SIGNAL_ACT_PRINT_TRACE 

◆ dt_signal_t

enum of signals to listen for in darktable.

Note
To add a new signal, first off add a enum and document what it's used for, then add a matching signal string name to _strings in signal.c
Enumerator
DT_SIGNAL_MOUSE_OVER_IMAGE_CHANGE 

This signal is raised when mouse hovers over image thumbs both on lighttable and in the filmstrip. no param, no returned value.

DT_SIGNAL_ACTIVE_IMAGES_CHANGE 

This signal is raised when image shown in the main view change no param, no returned value.

DT_SIGNAL_CONTROL_REDRAW_ALL 

This signal is raised when dt_control_queue_redraw() is called. no param, no returned value.

DT_SIGNAL_CONTROL_REDRAW_CENTER 

This signal is raised when dt_control_queue_redraw_center() is called. no param, no returned value.

DT_SIGNAL_VIEWMANAGER_VIEW_CHANGED 

This signal is raised by viewmanager when a view has changed. 1 : dt_view_t * the old view 2 : dt_view_t * the new (current) view no returned value.

DT_SIGNAL_VIEWMANAGER_VIEW_CANNOT_CHANGE 

This signal is raised by viewmanager when a view has changed. 1 : dt_view_t * the old view 2 : dt_view_t * the new (current) view no returned value.

DT_SIGNAL_VIEWMANAGER_THUMBTABLE_ACTIVATE 

\bief This signal is raised when a thumb is doubleclicked in thumbtable (filemananger, filmstrip) 1 : int the imageid of the thumbnail no returned value

DT_SIGNAL_COLLECTION_CHANGED 

This signal is raised when collection changed. To avoid leaking the list, dt_collection_t is connected to this event and responsible of that. 1 : dt_collection_change_t the reason why the collection has changed 2 : dt_collection_properties_t the property that has changed 3 : GList of imageids that have changed (can be null if it's a global change) 4 : next untouched imgid in the list (-1 if no list) no returned value.

image list not to be freed by the caller, automatically freed

DT_SIGNAL_SELECTION_CHANGED 

This signal is raised when the selection is changed no param, no returned value.

DT_SIGNAL_TAG_CHANGED 

This signal is raised when a tag is added/deleted/changed

DT_SIGNAL_GEOTAG_CHANGED 

This signal is raised when a geotag is added/deleted/changed

DT_SIGNAL_METADATA_CHANGED 

This signal is raised when metadata status (shown/hidden) or value has changed.

DT_SIGNAL_IMAGE_INFO_CHANGED 

This signal is raised when any of image info has changed

image list not to be freed by the caller, automatically freed

Todo:
check if tag and metadata could be included there
DT_SIGNAL_STYLE_CHANGED 

This signal is raised when a style is added/deleted/changed

DT_SIGNAL_IMAGES_ORDER_CHANGE 

This signal is raised to request image order change.

DT_SIGNAL_FILMROLLS_CHANGED 

This signal is raised when a filmroll is deleted/changed but not imported.

Note
when a filmroll is imported, use DT_SIGNALS_FILMOLLS_IMPORTED, as the gui has to behave differently
DT_SIGNAL_FILMROLLS_REMOVED 

This signal is raised only when a filmroll is removed.

DT_SIGNAL_PRESETS_CHANGED 
DT_SIGNAL_DEVELOP_INITIALIZE 

This signal is raised when darktable.develop is initialized.

Note
any modules that wants to access darktable->develop should connect to this signal to be sure darktable.develop is initialized. no param, no returned value
DT_SIGNAL_DEVELOP_PREVIEW_PIPE_FINISHED 

This signal is raised when develop preview pipe process is finished no param, no returned value.

DT_SIGNAL_DEVELOP_UI_PIPE_FINISHED 

This signal is raised when pipe is finished and the gui is attached no param, no returned value.

DT_SIGNAL_DEVELOP_HISTORY_WILL_CHANGE 

This signal is raised when develop history is about to be changed 1 : GList * the current history 2 : uint32_t the correpsing history end 3 : GList * the current iop-order list no returned value.

DT_SIGNAL_DEVELOP_HISTORY_CHANGE 

This signal is raised when develop history is changed no param, no returned value.

DT_SIGNAL_DEVELOP_MODULE_REMOVE 

This signal is raised when a module is removed from the history stack 1 module no returned value.

DT_SIGNAL_DEVELOP_MODULE_MOVED 

This signal is raised when order of modules in pipeline is changed.

DT_SIGNAL_DEVELOP_IMAGE_CHANGED 

This signal is raised when image is changed in darkroom.

DT_SIGNAL_CONTROL_PROFILE_CHANGED 

This signal is raised when the screen profile has changed no param, no returned value.

DT_SIGNAL_CONTROL_PROFILE_USER_CHANGED 

This signal is raised when a profile is changed by the user 1 uint32_t : the profile type that has changed no return.

DT_SIGNAL_IMAGE_IMPORT 

This signal is raised when a new image is imported (not cloned) 1 uint32_t : the new image id no return.

DT_SIGNAL_IMAGE_EXPORT_TMPFILE 

This signal is raised after an image has been exported to a file, but before it is sent to facebook/picasa etc... export won't happen until this function returns 1 int : the imgid exported 2 char* : the filename we exported to 3 dt_imageio_module_format_t* : the format used for export 4 dt_imageio_module_data_t* : the format's data 5 dt_imageio_module_storage_t* : the storage used for export (can be NULL) 6 dt_imageio_module_data_t* : the storage's data (can be NULL) no return.

DT_SIGNAL_IMAGEIO_STORAGE_CHANGE 

This signal is raised when a new storage module is loaded noparameters no return.

DT_SIGNAL_PREFERENCES_CHANGE 

This signal is raised after preferences have been changed no parameters no return.

DT_SIGNAL_CONTROL_NAVIGATION_REDRAW 

This signal is raised when dt_control_navigation_redraw() is called. no param, no returned value.

DT_SIGNAL_CONTROL_LOG_REDRAW 

This signal is raised when dt_control_log_redraw() is called. no param, no returned value.

DT_SIGNAL_CONTROL_TOAST_REDRAW 

This signal is raised when dt_control_toast_redraw() is called. no param, no returned value.

DT_SIGNAL_CONTROL_PICKERDATA_READY 

This signal is raised when new color picker data are available in the pixelpipe. 1 module 2 piece no returned value.

DT_SIGNAL_METADATA_UPDATE 
DT_SIGNAL_LOCATION_CHANGED 
DT_SIGNAL_MASK_SELECTION_CHANGED 
DT_SIGNAL_FILELIST_CHANGED 

Raised when the recursive file crawler returns. no params, return :

  • GList* of filenames
  • int : length of GList
  • int : 1 if final update (crawling finished), 0 if intermediate result.
DT_SIGNAL_COUNT 

Function Documentation

◆ dt_control_signal_block_by_func()

◆ dt_control_signal_connect()

void dt_control_signal_connect ( const struct dt_control_signal_t ctlsig,
const dt_signal_t  signal,
GCallback  cb,
gpointer  user_data 
)

◆ dt_control_signal_disconnect()

void dt_control_signal_disconnect ( const struct dt_control_signal_t ctlsig,
GCallback  cb,
gpointer  user_data 
)

◆ dt_control_signal_init()

◆ dt_control_signal_raise()

void dt_control_signal_raise ( const struct dt_control_signal_t ctlsig,
const dt_signal_t  signal,
  ... 
)

◆ dt_control_signal_unblock_by_func()