darktable.register_lib

function(
  plugin_name : string,
  name : string,
  expandable : boolean,
  resettable : boolean,
  containers : table of types.dt_lua_view_t => [ types.dt_ui_container_t, int ],
  widget : types.lua_widget,
  view_enter : function,
  view_leave : function
)

Register a new lib object. A lib is a graphical element of darktable’s user interface

  • plugin_name - string - A unique name for your library
  • name - string - A user-visible name for your library
  • expandable - boolean - whether this lib should be expandable or not
  • resettable - boolean - whether this lib has a reset button or not
  • containers - table of types.dt_lua_view_t => [ types.dt_ui_container_t, int ] - A table associating to each view containing the lib the corresponding container and position.
  • widget - types.lua_widget - The widget to display in the lib
  • view_enter - function - A callback called when a view displaying the lib is entered.
  • view_leave - function - A callback called when leaving a view displaying the lib.

🔗view_enter

self:function(
  old_view : types.dt_lua_view_t,
  new_view : types.dt_lua_view_t
)

A callback called when a view displaying the lib is entered

🔗view_leave

self:function(
  old_view : types.dt_lua_view_t,
  new_view : types.dt_lua_view_t
)

A callback called when leaving a view displaying the lib