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

Go to the source code of this file.

Functions

 REQUIRED (const char *, name, struct dt_lib_module_t *self)
 
 REQUIRED (const char **, views, struct dt_lib_module_t *self)
 
 REQUIRED (uint32_t, container, struct dt_lib_module_t *self)
 
 DEFAULT (gboolean, expandable, struct dt_lib_module_t *self)
 
 DEFAULT (int, lib_focus, struct dt_gui_module_t *module, gboolean toggle)
 
 OPTIONAL (void, init, struct dt_lib_module_t *self)
 
 REQUIRED (void, gui_init, struct dt_lib_module_t *self)
 
 REQUIRED (void, gui_cleanup, struct dt_lib_module_t *self)
 
 OPTIONAL (void, gui_reset, struct dt_lib_module_t *self)
 
 OPTIONAL (void, view_enter, struct dt_lib_module_t *self, struct dt_view_t *old_view, struct dt_view_t *new_view)
 
 OPTIONAL (void, view_leave, struct dt_lib_module_t *self, struct dt_view_t *old_view, struct dt_view_t *new_view)
 
 OPTIONAL (void, gui_post_expose, struct dt_lib_module_t *self, cairo_t *cr, int32_t width, int32_t height, int32_t pointerx, int32_t pointery)
 
 OPTIONAL (int, mouse_leave, struct dt_lib_module_t *self)
 
 OPTIONAL (int, mouse_moved, struct dt_lib_module_t *self, double x, double y, double pressure, int which)
 
 OPTIONAL (int, button_released, struct dt_lib_module_t *self, double x, double y, int which, uint32_t state)
 
 OPTIONAL (int, button_pressed, struct dt_lib_module_t *self, double x, double y, double pressure, int which, int type, uint32_t state)
 
 OPTIONAL (int, key_pressed, struct dt_lib_module_t *self, GdkEventKey *event)
 
 OPTIONAL (int, scrolled, struct dt_lib_module_t *self, double x, double y, int up)
 
 OPTIONAL (void, configure, struct dt_lib_module_t *self, int width, int height)
 
 OPTIONAL (int, position,)
 
 OPTIONAL (void *, legacy_params, struct dt_lib_module_t *self, const void *const old_params, const size_t old_params_size, const int old_version, int *new_version, size_t *new_size)
 
 OPTIONAL (void *, get_params, struct dt_lib_module_t *self, int *size)
 
 OPTIONAL (int, set_params, struct dt_lib_module_t *self, const void *params, int size)
 
 OPTIONAL (void, init_presets, struct dt_lib_module_t *self)
 
 OPTIONAL (void, manage_presets, struct dt_lib_module_t *self)
 
 OPTIONAL (void, set_preferences, void *menu, struct dt_lib_module_t *self)
 
 DEFAULT (gboolean, preset_autoapply, struct dt_lib_module_t *self)
 

Function Documentation

◆ DEFAULT() [1/3]

DEFAULT ( gboolean  ,
expandable  ,
struct dt_lib_module_t self 
)

check if module should use a expander or not, default implementation will make the module expandable and storing the expanding state, if not the module will always be shown without the expander.

◆ DEFAULT() [2/3]

DEFAULT ( gboolean  ,
preset_autoapply  ,
struct dt_lib_module_t self 
)

check if the module can autoapply presets. Default is FALSE

◆ DEFAULT() [3/3]

DEFAULT ( int  ,
lib_focus  ,
struct dt_gui_module_t module,
gboolean  toggle 
)

give focus to the current module and adapt other parts of the GUI if needed

◆ OPTIONAL() [1/19]

OPTIONAL ( int  ,
button_pressed  ,
struct dt_lib_module_t self,
double  x,
double  y,
double  pressure,
int  which,
int  type,
uint32_t  state 
)

◆ OPTIONAL() [2/19]

OPTIONAL ( int  ,
button_released  ,
struct dt_lib_module_t self,
double  x,
double  y,
int  which,
uint32_t  state 
)

◆ OPTIONAL() [3/19]

OPTIONAL ( int  ,
key_pressed  ,
struct dt_lib_module_t self,
GdkEventKey *  event 
)

◆ OPTIONAL() [4/19]

OPTIONAL ( int  ,
mouse_leave  ,
struct dt_lib_module_t self 
)

◆ OPTIONAL() [5/19]

OPTIONAL ( int  ,
mouse_moved  ,
struct dt_lib_module_t self,
double  x,
double  y,
double  pressure,
int  which 
)

◆ OPTIONAL() [6/19]

OPTIONAL ( int  ,
position   
)

◆ OPTIONAL() [7/19]

OPTIONAL ( int  ,
scrolled  ,
struct dt_lib_module_t self,
double  x,
double  y,
int  up 
)

◆ OPTIONAL() [8/19]

OPTIONAL ( int  ,
set_params  ,
struct dt_lib_module_t self,
const void params,
int  size 
)

◆ OPTIONAL() [9/19]

OPTIONAL ( void ,
get_params  ,
struct dt_lib_module_t self,
int *  size 
)

◆ OPTIONAL() [10/19]

OPTIONAL ( void ,
legacy_params  ,
struct dt_lib_module_t self,
const void *const  old_params,
const size_t  old_params_size,
const int  old_version,
int *  new_version,
size_t *  new_size 
)

implement these three if you want customizable presets to be stored in db. legacy_params can run in iterations, just return to what version you updated the preset.

◆ OPTIONAL() [11/19]

OPTIONAL ( void  ,
configure  ,
struct dt_lib_module_t self,
int  width,
int  height 
)

◆ OPTIONAL() [12/19]

OPTIONAL ( void  ,
gui_post_expose  ,
struct dt_lib_module_t self,
cairo_t *  cr,
int32_t  width,
int32_t  height,
int32_t  pointerx,
int32_t  pointery 
)

optional event callbacks for big center widget. optional method called after lighttable expose.

◆ OPTIONAL() [13/19]

OPTIONAL ( void  ,
gui_reset  ,
struct dt_lib_module_t self 
)

reset to defaults.

◆ OPTIONAL() [14/19]

OPTIONAL ( void  ,
init  ,
struct dt_lib_module_t self 
)

constructor

◆ OPTIONAL() [15/19]

OPTIONAL ( void  ,
init_presets  ,
struct dt_lib_module_t self 
)

◆ OPTIONAL() [16/19]

OPTIONAL ( void  ,
manage_presets  ,
struct dt_lib_module_t self 
)

◆ OPTIONAL() [17/19]

OPTIONAL ( void  ,
set_preferences  ,
void menu,
struct dt_lib_module_t self 
)

◆ OPTIONAL() [18/19]

OPTIONAL ( void  ,
view_enter  ,
struct dt_lib_module_t self,
struct dt_view_t old_view,
struct dt_view_t new_view 
)

entering a view, only called if lib is displayed on the new view

◆ OPTIONAL() [19/19]

OPTIONAL ( void  ,
view_leave  ,
struct dt_lib_module_t self,
struct dt_view_t old_view,
struct dt_view_t new_view 
)

entering a view, only called if lib is displayed on the old view

◆ REQUIRED() [1/5]

REQUIRED ( const char **  ,
views  ,
struct dt_lib_module_t self 
)

get the views which the module should be loaded in.

◆ REQUIRED() [2/5]

REQUIRED ( const char *  ,
name  ,
struct dt_lib_module_t self 
)

get name of the module, to be translated.

◆ REQUIRED() [3/5]

REQUIRED ( uint32_t  ,
container  ,
struct dt_lib_module_t self 
)

get the container which the module should be placed in

◆ REQUIRED() [4/5]

REQUIRED ( void  ,
gui_cleanup  ,
struct dt_lib_module_t self 
)

destroy widget.

◆ REQUIRED() [5/5]

REQUIRED ( void  ,
gui_init  ,
struct dt_lib_module_t self 
)

callback methods for gui. construct widget.