[lua.api.manual] Converted from xml to markdown. Still needs work, but now we have a current reference on-line

This commit is contained in:
wpferguson 2020-12-21 13:18:08 -05:00
parent 263ecf9b48
commit f376660f22
103 changed files with 5358 additions and 0 deletions

View file

@ -0,0 +1,26 @@
---
title: attributes
id: attributes
weight: 50
draft: false
author: "people"
---
This section documents various attributes used throughout the documentation.
# write
This object is a variable that can be written to.
# has_tostring
This object has a specific reimplementation of the "tostring" method that allows pretty-printing it.
# implicit_yield
This call will release the Lua lock while executing, thus allowing other Lua callbacks to run.
# parent
This object inherits some methods from another object. You can call the methods from the parent on the child object

View file

@ -0,0 +1,7 @@
---
title: darktable
id: darktable
weight: 20
draft: false
author: "people"
---

View file

@ -0,0 +1,17 @@
---
title: darktable.collection
id: darktable.collection
weight: 180
draft: false
author: "people"
---
Allows to access the currently worked on images, i.e the ones selected by the collection
lib. Filtering (rating etc) does not change that collection.
# darktable.collection.#
[types.dt_lua_image_t](../../types/dt_lua_image_t)
Each image in the collection appears with a numerical index; you can iterate them using
ipairs.

View file

@ -0,0 +1,104 @@
---
title: darktable.configuration
id: darktable.configuration
weight: 140
draft: false
author: "people"
---
`table`
This table includes values that describe details of the configuration of darktable.
# darktable.configuration.version
`string`
The version number of darktable.
# darktable.configuration.has_gui
`boolean`
True if darktable has a GUI (launched through the main darktable command, not darktable-cli).
# darktable.configuration.verbose
`boolean`
True if the Lua logdomain is enabled.
# darktable.configuration.tmp_dir
`string`
The name of the directory where darktable will store temporary files.
# darktable.configuration.config_dir
`string`
The name of the directory where darktable will find its global configuration objects (modules).
# darktable.configuration.cache_dir
`string`
The name of the directory where darktable will store its mipmaps.
# darktable.configuration.api_version_major
`number`
The major version number of the lua API.
# darktable.configuration.api_version_minor
`number`
The minor version number of the lua API.
# darktable.configuration.api_version_patch
`number`
The patch version number of the lua API.
# darktable.configuration.api_version_suffix
`string`
The version suffix of the lua API.
# darktable.configuration.api_version_string
`string`
The version description of the lua API. This is a string compatible with the semantic versioning convention
# darktable.configuration.running_os
`string`
The name of the Operating system darktable is currently running on
# darktable.configuration.check_version
```
function(
module_name : string,
... : table...
)
```
Check that a module is compatible with the running version of darktable
Add the following line at the top of your module :
darktable.configuration.check(...,{M,m,p},{M2,m2,p2})
To document that your module has been tested with API version M.m.p and M2.m2.p2.
This will raise an error if the user is running a released version of DT and a warning if he
is running a development version
(the ... here will automatically expand to your module name if used at the top of your script
* **module_name** - _string_ - The name of the module to report on error
* **...** - _table_ - Tables of API versions that are known to work with the script

View file

@ -0,0 +1,71 @@
---
title: darktable.control
id: darktable.control
weight: 190
draft: false
author: "people"
---
This table contain function to manipulate the control flow of lua programs. It provides
ways to do background jobs and other related functions
# darktable.control.ending
`boolean`
TRUE when darktable is terminating
Use this variable to detect when you should finish long running jobs
# darktable.control.dispatch
```
function(
function : function,
... : anything
)
```
Runs a function in the background. This function will be run at a later point, after luarc has
finished running. If you do a loop in such a function, please check darktable.control.ending
in your loop to finish the function when DT exits
* **function** - _function_ - The call to dispatch
* **...** - _anything_ - extra parameters to pass to the function
# darktable.control.sleep
```
function(
delay : int
)
```
Suspends execution while not blocking darktable
* **delay** - _int_ - The delay in millisecond to sleep
# darktable.control.execute
```
function(
command : string
) : int
```
Run a command in a shell while not blocking darktable
* **command** - _string_ - The command to run, as in 'sh -c'
* **return** - _int_ - The result of the system call
# darktable.control.read
```
function(
file : file
)
```
Block until a file is readable while not blocking darktable
This function is not available on Windows builds
* **file** - _file_ - The file object to wait for

View file

@ -0,0 +1,93 @@
---
title: darktable.database
id: darktable.database
weight: 180
draft: false
author: "people"
---
Allows access to the database of images. Note that duplicate images (images with the
same RAW but different XMP) will appear multiple times with different duplicate indexes.
Also note that all images are here. This table is not influenced by any GUI filtering \(collections, stars etc...\).
# darktable.database.#
[types.dt_lua_image_t](../../types/dt_lua_image_t)
Each image in the database appears with a numerical index; you can iterate over them using
ipairs.
# darktable.database.duplicate
```
function(
image : types.dt_lua_image_t
) : types.dt_lua_image_t
```
Creates a duplicate of an image and returns it.
* **image** - _[types.dt_lua_image_t](../../types/dt_lua_image_t)_ - the image to duplicate
* **return** - _[types.dt_lua_image_t](../../types/dt_lua_image_t)_ - The new image object.
# darktable.database.import
```
function(
location : string
) : types.dt_lua_image_t
```
Imports new images into the database.
* **location** - _string_ - The filename or directory to import images from. NOTE: If the images are set to be
imported recursively in preferences only the toplevel film is returned \(the one whose
path was given as a parameter\). NOTE2: If the parameter is a directory the call is nonblocking; the film object will not have the newly imported images yet. Use a postimport-film filtering on that film to react when images are actually imported.
* **return** - _[types.dt_lua_image_t](../../types/dt_lua_image_t)_ - The created image if an image is imported or the toplevel film object if a film was
imported.
# darktable.database.move_image
```
function(
image : types.dt_lua_image_t,
film : types.dt_lua_film_t,
[newname : string]
)
```
Physically moves an image (and all its duplicates) to another film, and/or renames the image file.
This will move the image file, the related XMP and all XMP for the duplicates to the directory of the new film and rename them as specified.
Note that the order of the two required parameters is not relevant.
* **image** - _[types.dt_lua_image_t](../../types/dt_lua_image_t)_ - The image to move
* **film** - _[types.dt_lua_image_t](../../types/dt_lua_image_t)_ - The film to move to. To rename a file within the same film, set this to the image's
current film.
* **\[newname\]** - _string_ - \(Optional\) If provided, rename the file with this new name. Must not contain any path
separator characters.
# darktable.database.copy_image
```
function(
image : types.dt_lua_image_t,
film : types.dt_lua_film_t,
[newname : string]
) : types.dt_lua_image_t
```
Physically copies an image to another film.
This will copy the image file and the related XMP to the directory of the new film and
rename them as specified.
If there is already a file with the same name as the image file, it will create a duplicate
from that file instead.
Note that the order of the two required parameters is not relevant.
* **image** - _[types.dt_lua_image_t](../../types/dt_lua_image_t)_ - The image to copy
* **film** - _[types.dt_lua_image_t](../../types/dt_lua_image_t)_ - The film to copy to. To make a copy of a file within the same film, set this to the image's
current film.
* **\[newname\]** - _string_ - \(Optional\) If provided, give the copy this new filename. Must not contain any path separator characters.
* **return** - _[types.dt_lua_image_t](../../types/dt_lua_image_t)_ - The new image
# darktable.database.delete
see [types.dt_lua_image_t.delete](../../types/dt_lua_image_t.delete)

View file

@ -0,0 +1,63 @@
---
title: darktable.debug
id: darktable.debug
weight: 210
draft: false
author: "people"
---
`table`
This section must be activated separately by calling require `darktable.debug`
# darktable.debug.dump
```
function(
object : anything,
[name : string],
[known : table]
) : string
```
This will return a string describing everything Lua knows about an object, used to know
what an object is. This function is recursion-safe and can be used to dump \_G if needed.
* **object** - _anything_ - The object to dump.
* **\[name\]** - _string_ - A name to use for the object.
* **\[known\]** - _table_ - A table of object,string pairs. Any object in that table will not be dumped, the string
will be printed instead.
defaults to darktable.debug.known if not set
* **return** - _string_ - A string containing a text description of the object - can be very long.
# darktable.debug.debug
`boolean`
Initialized to false; set it to true to also dump information about metatables.
# darktable.debug.max_depth
`number`
Initialized to 10; The maximum depth to recursively dump content.
# darktable.debug.known
`table`
A table containing the default value of darktable.debug.dump.known
# darktable.debug.type
```
function(
object : anything
) : string
```
Similar to the system function type() but it will return the real type instead of _userdata_
for darktable specific objects.
* **object** - _anything_ - The object whose type must be reported.
* **return** - _string_ - A string describing the type of the object.

View file

@ -0,0 +1,36 @@
---
title: darktable.films
id: darktable.films
weight: 70
draft: false
author: "people"
---
A table containing all the film objects in the database.
# darktable.films.#
`types.dt_lua_film_t`
Each film has a numeric entry in the database. See [types.dt_lua_film_t](../../types/dt_lua_film_t).
# darktable.films.new
```
function(
directory : string
) : types.dt_lua_film_t
```
Creates a new empty film
see [darktable.database.import](../darktable/database#import) to import a directory with all its images and to add images
to a film
* **directory** - _string_ - The directory that the new film will represent. The directory must exist
* **return** - _[types.dt_lua_film_t](../../types/dt_lua_film_t)_ - The newly created film, or the existing film if the directory is already imported
# darktable.films.delete
see [types.dt_lua_film_t.delete](../../types/dt_lua_film_t.delete)

View file

@ -0,0 +1,90 @@
---
title: darktable.gettext
id: darktable.gettext
weight: 200
draft: false
author: "people"
---
`table`
This table contains functions related to translating lua scripts
# darktable.gettext.gettext
```
function(
msgid : string
) : string
```
Translate a string using the darktable textdomain
* **msgid** - _string_ - The string to translate
* **return** - _string_ - The translated string
# darktable.gettext.dgettext
```
function(
domainname : string,
msgid : string
) : string
```
Translate a string using the specified textdomain
* **domainname** - _string_ - The domain to use for that translation
* **msgid** - _string_ - The string to translate
* **return** - _string_ - The translated string
# darktable.gettext.ngettext
```
function(
msgid : string,
msgid_plural : string,
n : int
) : string
```
Translate a string depending on the number of objects using the darktable textdomain
* **msgid** - _string_ - The string to translate
* **msgid_plural** - _string_ - The string to translate in plural form
* **n** - _int_ - The number of objects
* **return** - _string_ - The translated string
# darktable.gettext.dngettext
```
function(
domainname : string,
msgid : string,
msgid_plural : string,
n : int
) : string
```
Translate a string depending on the number of objects using the specified textdomain
* **domainname** - _string_ - The domain to use for that translation
* **msgid** - _string_ - The string to translate
* **msgid_plural** - _string_ - The string to translate in plural form
* **n** - _int_ - The number of objects
* **return** - _string_ - The translated string
# darktable.gettext.bindtextdomain
```
function(
domainname : string,
dirname : string
)
```
Tell gettext where to find the .mo file translating messages for a particular domain
* **domainname** - _string_ - The domain to use for that translation
* **dirname** - _string_ - The base directory to look for the file. The file should be placed in dirname/locale
name/LC_MESSAGES/domain.mo

View file

@ -0,0 +1,846 @@
---
title: darktable.gui
id: darktable.gui
weight: 110
draft: false
author: "people"
---
This subtable contains function and data to manipulate the darktable user interface with
Lua.
Most of these function won't do anything if the GUI is not enabled (i.e you are using the
command line version darktable-cli instead of darktable).
# darktable.gui.action_images
`table`
A table of [types.dt_lua_image_t](../../types/dt_lua_image_t) on which the user expects UI actions to happen.
It is based on both the hovered image and the selection and is consistent with the way
darktable works.
It is recommended to use this table to implement Lua actions rather than [darktable.gui.hovered](#darktable.gui.hovered) or [darktable.gui.selection](#darktable.gui.selection) to be consistent with darktable's GUI.
# darktable.gui.hovered
`types.dt_lua_image_t`
The image under the cursor or nil if no image is hovered.
# darktable.gui.selection
```
function(
[selection : table of types.dt_lua_image_t]
) : table of types.dt_lua_image_t
```
Get or change the set of selected images.
Attributes: [implicit_yield](../Attributes#implicit_yield)
* **\[selection\]** - _table of [types.dt_lua_image_t](../../types/dt_lua_image_t)_ - A table of images which will define the selected images. If this parameter is not given
the selection will be untouched. If an empty table is given the selection will be emptied.
* **return** - _table of [types.dt_lua_image_t](../../types/dt_lua_image_t)_ - A table containing the selection as it was before the function was called.
# darktable.gui.current_view
```
function(
[view : types.dt_lua_view_t]
) : types.dt_lua_view_t
```
Get or change the current view.
* **\[view\]** - [_types.dt_lua_view_t](../../types/dt_lua_view_t)_ - The view to switch to. If empty the current view is unchanged
* **return** - [_types.dt_lua_view_t](../../types/dt_lua_view_t)_ - the current view
# darktable.gui.panel_visible
```
function(
panel : types.dt_ui_panel_t
) : boolean
```
Determines if the specified panel is visible.
* **panel** - _[types.dt_ui_panel_t](../../types/dt_ui_panel_t)_ - The panel to check.
* **return** - _boolean_ - true if the panel is visible, false if not
# darktable.gui.panel_hide
```
function(
panel : types.dt_ui_panel_t
)
```
Hides the specified panel.
* **panel** - _[types.dt_ui_panel_t](../../types/dt_ui_panel_t)_ - The panel to hide.
# darktable.gui.panel_show
```
function(
panel : types.dt_ui_panel_t
)
```
Shows the specified panel.
* **panel** - _[types.dt_ui_panel_t](../../types/dt_ui_panel_t)_ - The panel to show.
# darktable.gui.panel_hide_all
```
function(
)
```
Hide all panels.
# darktable.gui.panel_show_all
```
function(
)
```
Show all panels.
# darktable.gui.panel_get_size
```
function(
panel : types.dt_ui_panel_t
):int
```
Gets the size in pixels of the specified panel. This only works for the left, right, and bottom
panels.
* **panel** - _[types.dt_ui_panel_t](../../types/dt_ui_panel_t)_ - The panel to get the size of.
# darktable.gui.panel_set_size
```
function(
panel : types.dt_ui_panel_t
size : int
)
```
Sets the size in pixels of the specified panel. This only works for the left, right, and bottom
panels.
* **panel** - _[types.dt_ui_panel_t](../../types/dt_ui_panel_t)_ - The panel to set the size of.
* **size** - _int_ - The size to set the panel to.
# darktable.gui.create_job
```
function(
text : string,
[percentage : boolean],
[cancel_callback : function]
) : types.dt_lua_backgroundjob_t
```
Create a new progress_bar displayed in [darktable.gui.libs.backgroundjobs](#darktable.gui.libs.backgroundjobs)
* **text** - _string_ - The text to display in the job entry
* **\[percentage\]** - _boolean_ - Should a progress bar be displayed
* **\[cancel_callback\]** - _[function](#cancel_callback)_ - A function called when the cancel button for that job is pressed. Note: the job won't be destroyed automatically. You need to set [types.dt_lua_backgroundjob_t.valid](../../types/dt_lua_backgroundjob_t#valid) to false for that.
* **return** - _[types.dt_lua_backgroundjob_t](../../types/dt_lua_backgroundjob_t)_ - The newly created job object
## cancel_callback
```
function(
job : types.dt_lua_backgroundjob_t
)
```
* **job** - _[types.dt_lua_backgroundjob_t](../../types/dt_lua_backgroundjob_t)_ - The job who is being cancelled
# darktable.gui.views
The different views in darktable
## darktable.gui.views.map
The map view
Attributes:
* [has_tostring](../Attributes#has_tostring)
* [parent](../Attributes#paren) : [types.dt_lua_view_t](../../types/dt_lua_view_t)
### darktable.gui.views.map.latitude
* number - The latitude of the center of the map
Attributes:
* [write](../Attributes#write)
### darktable.gui.views.map.longitude
* number - The longitude of the center of the map
Attributes:
* [write](../Attributes#write)
### darktable.gui.views.map.zoom
* number - The current zoom level of the map
Attributes:
* [write](../Attributes#write)
## darktable.gui.views.darkroom
The darkroom view
Attributes:
* [has_tostring](../Attributes#has_tostring)
* [parent](../Attributes#parent) : [types.dt_lua_view_t](../../types/dt_lua_view_t)
### darktable.gui.views.darkroom.display_image
```
function(
[image : types.dt_lua_image_t]
) : types.dt_lua_image_t
```
Display an image in darkroom view.
* **\[image\] - _[types.dt_lua_image_t](../../types/dt_lua_image_t)_ - The image to be displayed. If the image is not given, nothing will be changed.
* **return** - _[types.dt_lua_image_t](../../types/dt_lua_image_t)_ - The image currently displayed.
## darktable.gui.views.lighttable
The lighttable view
Attributes:
* [has_tostring](../Attributes#has_tostring)
* [parent](../Attributes#parent) : [types.dt_lua_view_t](../../types/dt_lua_view_t)
### darktable.gui.views.lighttable.is_image_visible
```
function(
image : types.dt_lua_image_t
) : types.dt_lua_image_t
```
Check if the image is visible in lighttable view. The lighttable must be in file manager or
zoomable mode.
* **image** - _[types.dt_lua_image_t](../../types/dt_lua_image_t)_ - The image to be checked.
* **return** - _boolean_ - True if the image is displayed. False if the image is partially displayed or not displayed.
### darktable.gui.views.lighttable.set_image_visible
```
function(
image : types.dt_lua_image_t
) : types.dt_lua_image_t
```
Set the image visible in lighttable view. The lighttable must be in file manager or zoomable
mode.
* **image** - _[types.dt_lua_image_t](../../types/dt_lua_image_t)_ - The image to set visible.
* **return** - _int_ - An error is returned if no image is specified.
## darktable.gui.views.tethering
The tethering view
Attributes:
* [has_tostring](../Attributes#has_tostring)
* [parent](../Attributes#parent) : [types.dt_lua_view_t](../../types/dt_lua_view_t)
## darktable.gui.views.slideshow
The slideshow view
Attributes:
* [has_tostring](../Attributes#has_tostring)
* [parent](../Attributes#parent) : [types.dt_lua_view_t](../../types/dt_lua_view_t)
## darktable.gui.views.print
The print view
Attributes:
* [has_tostring](../Attributes#has_tostring)
* [parent](../Attributes#parent) : [types.dt_lua_view_t](../../types/dt_lua_view_t)
# darktable.gui.libs
This table allows referencing all lib objects.
lib objects are the graphical blocks within each view.
To quickly figure out which lib is which, you can use the following code, which will make a
given lib blink.
```
local dt = require "darktable"
local tested_module="global_toolbox"
dt.gui.libs[tested_module].visible=false
dt.control.sleep(2000)
while true do
dt.gui.libs[tested_module].visible = not dt.gui.libs[tested_module].visible
dt.control.sleep(2000)
end
```
### darktable.gui.libs.snapshots
The UI element that manipulates snapshots in darkroom
Attributes:
* [has_tostring](../Attributes#has_tostring)
* [parent](../Attributes#parent) : [types.dt_lua_lib_t](../../types/dt_lua_lib_t)
### darktable.gui.libs.snapshots.ratio
number - The place in the screen where the line separating the snapshot is. Between 0 and 1
Attributes:
* [write](../Attributes#write)
darktable.gui.libs.snapshots.direction
[types.snapshot_direction_t](../../types/snapshot_direction_t) - The direction of the snapshot overlay
Attributes:
* [write](../Attributes#write)
### darktable.gui.libs.snapshots.#
[types.snapshot_direction_t](../../types/snapshot_direction_t) - The different snapshots for the image
### darktable.gui.libs.snapshots.selected
[types.snapshot_direction_t](../../types/snapshot_direction_t) - The currently selected snapshot
### darktable.gui.libs.snapshots.take_snapshot
```
function(
)
```
Take a snapshot of the current image and add it to the UI
The snapshot file will be generated at the next redraw of the main window
### darktable.gui.libs.snapshots.max_snapshot
number - The maximum number of snapshots
## darktable.gui.libs.collect
The collection UI element that allows to filter images by collection
Attributes:
* [has_tostring](../Attributes#has_tostring)
* [parent](../Attributes#parent) : [types.dt_lua_lib_t](../../types/dt_lua_lib_t)
### darktable.gui.libs.collect.filter
```
function(
[rules : array of types.dt_lib_collect_params_rule_t]
) : array oftypes.dt_lib_collect_params_rule_t
```
Get or change the list of visible images
Attributes:
* [implicit_yield](../Attributes#implicit_yield)
* **\[rules\]** - _array of [types.dt_lib_collect_params_rule_t](../../types/dt_lib_collect_params_rule_t)_ - A table of rules describing the filter. These rules will be applied after this call
* **return** - _array of [types.dt_lib_collect_params_rule_t](../../types/dt_lib_collect_params_rule_t)_ - The rules that were applied before this call.
### darktable.gui.libs.collect.new_rule
```
function(
) : types.dt_lib_collect_params_rule_t
```
Returns a newly created rule object
* **return** - _[types.dt_lib_collect_params_rule_t](../../types/dt_lib_collect_params_rule_t)_ - The newly created rule
## darktable.gui.libs.import
The buttons to start importing images
Attributes:
* [has_tostring](../Attributes#has_tostring)
* [parent](../Attributes#parent) : [types.dt_lua_lib_t](../../types/dt_lua_lib_t)
### darktable.gui.libs.import.register_widget
```
function(
widget : types.lua_widget
)
```
Add a widget in the option expander of the import dialog
* **widget** - _[types.lua_widget](../../types/lua_widget)_ - The widget to add to the dialog. The reset callback of the widget will be called whenever the dialog is opened.
## darktable.gui.libs.styles
The style selection menu
Attributes:
* [has_tostring](../Attributes#has_tostring)
* [parent](../Attributes#parent) : [types.dt_lua_lib_t](../../types/dt_lua_lib_t)
## darktable.gui.libs.metadata_view
The widget displaying metadata about the current image
Attributes:
* [has_tostring](../Attributes#has_tostring)
* [parent](../Attributes#parent) : [types.dt_lua_lib_t](../../types/dt_lua_lib_t)
### darktable.gui.libs.metadata_view.register_info
```
function(
name : string,
callback : function
)
```
Register a function providing extra info to display in the widget
* **name** - _string_ - The name displayed for the new information
* **callback** - _function_ - The function providing the info
callback -
```
function(
image : types.dt_lua_image_t
) : string
```
* **image** - _[types.dt_lua_image_t](../../types/dt_lua_image_t)_ - The image to analyze
* **return** - _string_ - The extra information to display
## darktable.gui.libs.metadata
The widget allowing modification of metadata fields on the current image
Attributes:
* [has_tostring](../Attributes#has_tostring)
* [parent](../Attributes#parent) : [types.dt_lua_lib_t](../../types/dt_lua_lib_t)
## darktable.gui.libs.hinter
The small line of text at the top of the UI showing the number of selected images
Attributes:
* [has_tostring](../Attributes#has_tostring)
* [parent](../Attributes#parent) : [types.dt_lua_lib_t](../../types/dt_lua_lib_t)
## darktable.gui.libs.filmstrip
The filmstrip at the bottom of some views
Attributes:
* [has_tostring](../Attributes#has_tostring)
* [parent](../Attributes#parent) : [types.dt_lua_lib_t](../../types/dt_lua_lib_t)
## darktable.gui.libs.viewswitcher
The labels allowing to switch view
Attributes:
* [has_tostring](../Attributes#has_tostring)
* [parent](../Attributes#parent) : [types.dt_lua_lib_t](../../types/dt_lua_lib_t)
## darktable.gui.libs.darktable_label
The darktable logo in the upper left corner
Attributes:
* [has_tostring](../Attributes#has_tostring)
* [parent](../Attributes#parent) : [types.dt_lua_lib_t](../../types/dt_lua_lib_t)
## darktable.gui.libs.tagging
The tag manipulation UI
Attributes:
* [has_tostring](../Attributes#has_tostring)
* [parent](../Attributes#parent) : [types.dt_lua_lib_t](../../types/dt_lua_lib_t)
## darktable.gui.libs.geotagging
The geotagging time synchronisation UI
Attributes:
* [has_tostring](../Attributes#has_tostring)
* [parent](../Attributes#parent) : [types.dt_lua_lib_t](../../types/dt_lua_lib_t)
## darktable.gui.libs.recentcollect
The recent collection UI element
Attributes:
* [has_tostring](../Attributes#has_tostring)
* [parent](../Attributes#parent) : [types.dt_lua_lib_t](../../types/dt_lua_lib_t)
## darktable.gui.libs.global_toolbox
The common tools to all view \(settings, grouping...\)
Attributes:
* [has_tostring](../Attributes#has_tostring)
* [parent](../Attributes#parent) : [types.dt_lua_lib_t](../../types/dt_lua_lib_t)
### darktable.gui.libs.global_toolbox.grouping
boolean- The current status of the image grouping option
Attributes:
* [write](../Attributes#write)
### darktable.gui.libs.global_toolbox.show_overlays
boolean - the current status of the image overlays option
Attributes:
* [write](../Attributes#write)
## darktable.gui.libs.filter
The image-filter menus at the top of the UI
Attributes:
* [has_tostring](../Attributes#has_tostring)
* [parent](../Attributes#parent) : [types.dt_lua_lib_t](../../types/dt_lua_lib_t)
### darktable.gui.libs.filter.sort
```
function(
[sort : types.dt_collection_sort_t]
) : types.dt_collection_sort_t
```
Change the collection sort field.
* **\[sort\]** - _[types.dt_collection_sort_t](../../types/dt_collection_sort_t)_ - The new field to sort by. If empty the current sort field is unchanged
* **return** - _[types.dt_collection_sort_t](../../types/dt_collection_sort_t)_ = The current sort field.
### darktable.gui.libs.filter.sort_order
```
function(
[order : types.dt_collection_sort_order_t]
) : types.dt_collection_sort_order_t
```
Change the collection sort order.
* **\[order\]** - _[types.dt_collection_sort_order_t](../../types/dt_collection_sort_order_t)_ - The order to sort by. If empty the current sort order is unchanged.
* **return** - _[types.dt_collection_sort_order_t](../../types/dt_collection_sort_order_t)_ - The current sort order.
### darktable.gui.libs.filter.rating
```
function(
[rating : types.dt_collection_filter_t]
) : types.dt_collection_filter_t
```
Change the collection rating filter.
* **\[rating\]** - _[types.dt_collection_filter_t](../../types/dt_collection_filter_t)_ - The new rating field to filter by. If empty the current rating field is unchanged.
* **return** - [types.dt_collection_filter_t](../../types/dt_collection_filter_t) - The current rating field.
### darktable.gui.libs.filter.rating_comparator
```
function(
[comparator : types.dt_collection_rating_comperator_t]
) : types.dt_collection_rating_comperator_t
```
Change the collection filter comparison field.
* **\[comparator\]** - _[types.dt_collection_rating_comperator_t](../../types/dt_collection_rating_comperator_t)_ - The new comparison field to filter the rating by. If empty the current rating comparison field is unchanged
* **return** - _[types.dt_collection_rating_comperator_t](../../types/dt_collection_rating_comperator_t)_ - The current rating comparison field
## darktable.gui.libs.ratings
The stars to set the rating of an image
Attributes:
* [has_tostring](../Attributes#has_tostring)
* [parent](../Attributes#parent) : [types.dt_lua_lib_t](../../types/dt_lua_lib_t)
## darktable.gui.libs.select
The buttons that allow to quickly change the selection
Attributes:
* [has_tostring](../Attributes#has_tostring)
* [parent](../Attributes#parent) : [types.dt_lua_lib_t](../../types/dt_lua_lib_t)
### darktable.gui.libs.select.register_selection
```
function(
label : string,
callback : function,
[tooltip : string]
)
```
Add a new button and call a callback when it is clicked
* **label** - _string_ - The label to display on the button
* **callback** - _function_ - The function to call when the button is pressed
* **\[tooltip\]** - _string_ - The tooltip to use on the new button
callback -
```
function(
event : string,
images : table oftypes.dt_lua_image_t
) : table oftypes.dt_lua_image_t
```
The function to call when the button is pressed
* **event** - _string_ - The name of the button that was pressed
* **images** - _table of [types.dt_lua_image_t](../../types/dt_lua_image_t)_ - The images in the current collection. This is the same content asdarktable.collection
* **return** - _table of [types.dt_lua_image_t](../../types/dt_lua_image_t)_ - The images to set the selection to
## darktable.gui.libs.colorlabels
The color buttons that allow to set labels on an image
Attributes:
* [has_tostring](../Attributes#has_tostring)
* [parent](../Attributes#parent) : [types.dt_lua_lib_t](../../types/dt_lua_lib_t)
## darktable.gui.libs.lighttable_mode
The navigation and zoom level UI in lighttable
Attributes:
* [has_tostring](../Attributes#has_tostring)
* [parent](../Attributes#parent) : [types.dt_lua_lib_t](../../types/dt_lua_lib_t)
### darktable.gui.libs.lighttable_mode.layout
```
function(
[layout : types.dt_lighttable_layout_t]
) : types.dt_lighttable_layout_t
```
Change the lighttable layout.
* **\[layout\]** - _[types.dt_lighttable_layout_t](../../types/dt_lighttable_layout_t)_ - The layout to switch to. If empty the current layout is unchanged
* **return** - _[types.dt_lighttable_layout_t](../../types/dt_lighttable_layout_t)_ - the current layout
### darktable.gui.libs.lighttable_mode.zoom_level
```
function(
[level : int]
) : int
```
Change the lighttable zoom level.
* **\[level\]** - _int_ - The zoom level to switch to. If empty the current zoom level is unchanged
* **return** - _int_ - the current zoom level
## darktable.gui.libs.copy_history
The UI element that manipulates history
Attributes:
* [has_tostring](../Attributes#has_tostring)
* [parent](../Attributes#parent) : [types.dt_lua_lib_t](../../types/dt_lua_lib_t)
## darktable.gui.libs.image
The UI element that manipulates the current images
Attributes:
* [has_tostring](../Attributes#has_tostring)
* [parent](../Attributes#parent) : [types.dt_lua_lib_t](../../types/dt_lua_lib_t)
### darktable.gui.libs.image.register_action
```
function(
label : string,
callback : function,
[tooltip : string]
)
```
Add a new button and call a callback when it is clicked
* **label** - _string_ - The label to display on the button
* **callback** - _function_ - The function to call when the button is pressed
* **\[tooltip\]** - _string_ - The tooltip to use on the new button
callback -
```
function(
event : string,
images : table oftypes.dt_lua_image_t
)
```
The function to call when the button is pressed
* **event** - _string_ - The name of the button that was pressed
* **images** - _table of [types.dt_lua_image_t](../../types/dt_lua_image_t)_ - The images to act on when the button was clicked
## darktable.gui.libs.modulegroups
The icons describing the different iop groups
Attributes:
* [has_tostring](../Attributes#has_tostring)
* [parent](../Attributes#parent) : [types.dt_lua_lib_t](../../types/dt_lua_lib_t)
## darktable.gui.libs.module_toolbox
The tools on the bottom line of the UI (overexposure)
Attributes:
* [has_tostring](../Attributes#has_tostring)
* [parent](../Attributes#parent) : [types.dt_lua_lib_t](../../types/dt_lua_lib_t)
## darktable.gui.libs.session
The session UI when tethering
Attributes:
* [has_tostring](../Attributes#has_tostring)
* [parent](../Attributes#parent) : [types.dt_lua_lib_t](../../types/dt_lua_lib_t)
## darktable.gui.libs.histogram
The histogram widget
Attributes:
* [has_tostring](../Attributes#has_tostring)
* [parent](../Attributes#parent) : [types.dt_lua_lib_t](../../types/dt_lua_lib_t)
## darktable.gui.libs.export
The export menu
Attributes:
* [has_tostring](../Attributes#has_tostring)
* [parent](../Attributes#parent) : [types.dt_lua_lib_t](../../types/dt_lua_lib_t)
## darktable.gui.libs.history
The history manipulation menu
Attributes:
* [has_tostring](../Attributes#has_tostring)
* [parent](../Attributes#parent) : [types.dt_lua_lib_t](../../types/dt_lua_lib_t)
## darktable.gui.libs.colorpicker
The colorpicker menu
Attributes:
* [has_tostring](../Attributes#has_tostring)
* [parent](../Attributes#parent) : [types.dt_lua_lib_t](../../types/dt_lua_lib_t)
## darktable.gui.libs.navigation
The full image preview to allow navigation
Attributes:
* [has_tostring](../Attributes#has_tostring)
* [parent](../Attributes#parent) : [types.dt_lua_lib_t](../../types/dt_lua_lib_t)
## darktable.gui.libs.masks
The masks window
Attributes:
* [has_tostring](../Attributes#has_tostring)
* [parent](../Attributes#parent) : [types.dt_lua_lib_t](../../types/dt_lua_lib_t)
## darktable.gui.libs.view_toolbox
The view_toolbox window
Attributes:
* [has_tostring](../Attributes#has_tostring)
* [parent](../Attributes#parent) : [types.dt_lua_lib_t](../../types/dt_lua_lib_t)
## darktable.gui.libs.live_view
The liveview window
Attributes:
* [has_tostring](../Attributes#has_tostring)
* [parent](../Attributes#parent) : [types.dt_lua_lib_t](../../types/dt_lua_lib_t)
## darktable.gui.libs.map_settings
The map setting window
Attributes:
* [has_tostring](../Attributes#has_tostring)
* [parent](../Attributes#parent) : [types.dt_lua_lib_t](../../types/dt_lua_lib_t)
## darktable.gui.libs.camera
The camera selection UI
Attributes:
* [has_tostring](../Attributes#has_tostring)
* [parent](../Attributes#parent) : [types.dt_lua_lib_t](../../types/dt_lua_lib_t)
## darktable.gui.libs.location
The location ui
Attributes:
* [has_tostring](../Attributes#has_tostring)
* [parent](../Attributes#parent) : [types.dt_lua_lib_t](../../types/dt_lua_lib_t)
## darktable.gui.libs.backgroundjobs
The window displaying the currently running jobs
Attributes:
* [has_tostring](../Attributes#has_tostring)
* [parent](../Attributes#parent) : [types.dt_lua_lib_t](../../types/dt_lua_lib_t)
## darktable.gui.libs.print_settings
The settings window in the print view
Attributes:
* [has_tostring](../Attributes#has_tostring)
* [parent](../Attributes#parent) : [types.dt_lua_lib_t](../../types/dt_lua_lib_t)

View file

@ -0,0 +1,52 @@
---
title: darktable.guides
id: darktable.guides
weight: 120
draft: false
author: "people"
---
`table`
Guide lines to overlay over an image in crop and rotate.
All guides are clipped to the drawing area.
# darktable.guides.register_guide
```
function(
name : string,
draw_callback : function,
[gui_callback : function]
)
```
Register a new guide.
* **name** - _string_ - The name of the guide to show in the GUI.
* **draw_callback** - _function_ - The function to call to draw the guide lines.
* **\[gui_callback\]** - _function_ - A function returning a widget to show when the guide is selected. It takes no arguments.
draw_callback -
```
function(
cr : types.dt_lua_cairo_t,
x : float,
y : float,
width : float,
height : float,
zoom_scale : float
)
```
The function to call to draw the guide lines. The drawn lines will be stroked by darktable.
**THIS IS RUNNING IN THE GUI THREAD AND HAS TO BE FAST!**
* **cr** - _[types.dt_lua_cairo_t](../../types/dt_lua_cairo_t)_ - The cairo object used for drawing.
* **x** - _float_ - The x coordinate of the top left corner of the drawing area.
* **y** - _float_ - The y coordinate of the top left corner of the drawing area.
* **width** - _float_ - The width of the drawing area.
* **height** - _float_ - The height of the drawing area.
* **zoom_scale** - _float_ -The current zoom_scale. Only needed when setting the line thickness.

View file

@ -0,0 +1,29 @@
---
title: darktable.new_format
id: darktable.new_format
weight: 80
draft: false
author: "people"
---
```
function(
type : string
) : types.dt_imageio_module_format_t
```
Creates a new format object to export images
* **type** - _string_ - The type of format object to create, one of :
* copy
* exr
* j2k
* jpeg
* pdf
* pfm
* png
* ppm
* tiff
* webp
* **return** - _[types.dt_imageio_module_format_t](types.dt_imageio_module_format_t)_ - The newly created object. Exact type depends on the type passed

View file

@ -0,0 +1,26 @@
---
title: darktable.new_storage
id: darktable.new_storage
weight: 90
draft: false
author: "people"
---
```
function(
type : string
) : types.dt_imageio_module_storage_t
```
Creates a new storage object to export images.
* **type** - _string_ - The type of storage object to create, one of:
* disk
* email
* gallery
* latex
* piwigo
* \(Other, lua-defined, storage types may appear.\)
* **return** - _[types.dt_imageio_module_storage_t(../../types/dt_imageio_module_storage_t)]_ - The newly created object. Exact type depends on the type passed

View file

@ -0,0 +1,35 @@
---
title: darktable.new_widget
id: darktable.new_widget
weight: 100
draft: false
author: "people"
---
```
function(
type : string,
... : variable
) : types.lua_widget
```
Creates a new widget object to display in the UI.
* **type** - _string_ - The type of storage object to create, one of:
* box
* button
* check_button
* combobox
* container
* entry
* file_chooser_button
* label
* section_label
* separator
* slider
* stack
* text_view
* **...** - _variable_ - Extra parameters, exact value are documented with each type
* **return** - _[types.lua_widget](../../types/lua_widget)_ - The newly created object. Exact type depends on the type passed

View file

@ -0,0 +1,103 @@
---
title: darktable.preferences
id: darktable.preferences
weight: 150
draft: false
author: "people"
---
`table`
Lua allows you to manipulate preferences. Lua has its own namespace for preferences and
you can't access nor write normal darktable preferences.
Preference handling functions take a _script_ parameter. This is a string used to avoid
name collision in preferences (i.e namespace). Set it to something unique, usually the
name of the script handling the preference.
Preference handling functions can't guess the type of a parameter. You must pass the type
of the preference you are handling.
Note that the directory, enum, lua and file type preferences are stored internally as string.
The user can only select valid values, but a lua script can set it to any string
# darktable.preferences.register
```
function(
script : string,
name : string,
type : types.lua_pref_type,
label : string,
tooltip : string,
[default : depends on type],
[min : int or float],
[max : int or float],
[step : float],
[values : string...],
[widget : types.lua_widget],
[set_callback : function]
)
```
Creates a new preference entry in the Lua tab of the preference screen. If this function
is not called the preference can't be set by the user (you can still read and write invisible
preferences).
* **script** - _string_ - Invisible prefix to guarantee unicity of preferences.
* **name** - _string_ - A unique name used with the script part to identify the preference.
* **type** - _[types.lua_pref_type](../../types/lua_pref_type)_The type of the preference - one of the string values described above.
* **label** - _string_ - The label displayed in the preference screen.
* **tooltip** - _string_ - The tooltip to display in the preference menu.
* **\[default\]** - _Thedepends on type_ - Default value to use when not set explicitly or by the user.
For the enum type of pref, this is mandatory
* **\[mi\]** - _int or float_ - Minimum value \(integer and float preferences only\).
* **\[max\]** - _int or float_ - Maximum value \(integer and float preferences only\).
* **\[step\]** - _float_ - Step of the spinner \(float preferences only\).
* **\[values\]** - _string_ - Other allowed values \(enum preferences only\)
* **\[widget\]** - _[types.lua_widget](../../types/lua_widget)_ - The widget to use in preference \(lua preferences only\)
* **\[set_callback\]** - function_ - A function called when the widget needs to be updated from the preference
\[set_callback\] -
```
function(
widget : types.lua_widget
)
```
A function called when the widget needs to be updated from the preference
* **widget** - _[types.lua_widget](../../types/lua_widget)_ - The widget to update
# darktable.preferences.read
```
function(
script : string,
name : string,
type : types.lua_pref_type
) : depends on type
```
Reads a value from a Lua preference.
* **script** - _string_ - Invisible prefix to guarantee unicity of preferences.
* **name** - _string_ - The name of the preference displayed in the preference screen.
* **type** - _[types.lua_pref_type](../../types/lua_pref_type)_ - The type of the preference.
* **return** - _depends on type_ - The value of the preference.
# darktable.preferences.write
```
function(
script : string,
name : string,
type : types.lua_pref_type,
value : depends on type
)
```
Writes a value to a Lua preference.
* **script** - _string_ - Invisible prefix to guarantee unicity of preferences.
* **name** - _string_ - The name of the preference displayed in the preference screen.
* **type** - _[types.lua_pref_type](../../types/lua_pref_type)_ - The type of the preference.
* **value** - _depends on type_ - The value to set the preference to.

View file

@ -0,0 +1,18 @@
---
title: darktable.print
id: darktable.print
weight: 20
draft: false
author: "people"
---
```
function\(
message : string
\)
```
Will print a string to the darktable control log (the long overlaid window that appears over
the main panel).
* **message** - _string_ - The string to display which should be a single line.

View file

@ -0,0 +1,17 @@
---
title: darktable.print_error
id: darktable.print_error
weight: 40
draft: false
author: "people"
---
```
function(
message : string
)
```
This function is similar todarktable.print_log but adds an ERROR prefix for clarity.
* **message** - _string_ - The string to display.

View file

@ -0,0 +1,19 @@
---
title: darktable.print_log
id: darktable.print_log
weight: 30
draft: false
author: "people"
---
```
function(
message : string
)
```
This function will print its parameter if the Lua logdomain is activated. Start darktable
with the `"-d lua"` command line option to enable the Lua logdomain.
* **message** - _string_ - The string to display.

View file

@ -0,0 +1,23 @@
---
title: darktable.register_event
id: darktable.register_event
weight: 50
draft: false
author: "people"
---
```
function(
event_type : string,
callback : function,
... : variable
)
```
This function registers a callback to be called when a given event happens.
Events are documented in the [event](../events) section.
* **event_type** - _string_ - The name of the event to register to.
* **callback** - _function_ - The function to call on event. The signature of the function depends on the type of
event.
* **...** - _variable_ - Some events need extra parameters at registration time; these must be specified here.

View file

@ -0,0 +1,62 @@
---
title: darktable.register_lib
id: darktable.register_lib
weight: 60
draft: false
author: "people"
---
```
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_lua_view_t) => \[ [types.dt_ui_container_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](../../types/lua_widget_)_ - The widget to display in the lib
* **view_enter** - _[function](#view_enter)_ - A callback called when a view displaying the lib is entered.
* **view_leave** - _[function](#view_leave)_ - 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
* **self** - _[types.dt_lua_lib_t](types.dt_lua_lib_t)_ - The lib on which the callback is called
* **old_view** - _[types.dt_lua_lib_t](types.dt_lua_lib_t)_ - The view that we are leaving
* **new_view** - _[types.dt_lua_lib_t](types.dt_lua_lib_t)_ - The view that we are entering
# 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
* **self** - _[types.dt_lua_lib_t](types.dt_lua_lib_t)_ - The lib on which the callback is called
* **old_view** - _[types.dt_lua_lib_t](types.dt_lua_lib_t)_ - The view that we are leaving
* **new_view** - _[types.dt_lua_lib_t](types.dt_lua_lib_t)_ - The view that we are entering

View file

@ -0,0 +1,117 @@
---
title: darktable.register_storage
id: darktable.register_storage
weight: 50
draft: false
author: "people"
---
```
function(
plugin_name : string,
name : string,
[store : function],
[finalize : function],
[supported : function],
[initialize : function],
[widget : types.lua_widget]
)
```
This function will add a new storage implemented in Lua.
A storage is a module that is responsible for handling images once they have been generated during export. Examples of core storages include filesystem, e-mail, facebook...
* **plugin_name** - _string_ - A unique name for the plugin.
* **name** - _string_ - A human readable name for the plugin.
* **\[store\]** - _[function](#store)_ - This function is called once for each exported image.
* **\[finalize\]** - _[function](#finalize)_ - This function is called once all images are processed and all store calls are finished.
* **\[supported\]** - _[function](#supported)_ - A function called to check if a given image format is supported by the Lua storage.
* **\[initialize\]** - _[function](#initialize)_ - A function called before storage happens.
* **widget** - _[types.lua_widget](../../types/lua_widget)_ - A widget to display in the export section of darktable's UI.
# \[store\]
```
function(
storage : types.dt_imageio_module_storage_t,
image : types.dt_lua_image_t,
format : types.dt_imageio_module_format_t,
filename : string,
number : integer,
total : integer,
high_quality : boolean,
extra_data : table
)
```
This function is called once for each exported image. Images can be exported in parallel but the calls to this function will be serialized.
* **storage** - _[types.dt_imageio_module_storage_t](../../types/dt_imageio_module_storage_t)_ - The storage object used for the export.
* **image** - _[types.dt_lua_image_t](../../types/dt_lua_image_t)_ - The exported image object.
* **format** - _[types.dt_imageio_module_format_t](../../types/dt_imageio_module_format_t)_ - The format object used for the export.
* **filename** - _string_ - The name of a temporary file where the processed image is stored.
* **number** - _integer_ - The number of the image out of the export series.
* **total** - _integer_ - The total number of images in the export series.
* **high_quality** - _boolean_ - True if the export is high quality.
* **extra_data** - _table_- An empty Lua table to take extra data. This table is common to the initialize, store and finalize calls in an export series.
# \[finalize\]
```
function(
storage : types.dt_imageio_module_storage_t,
image_table : table,
extra_data : table
)
```
This function is called once all images are processed and all store calls are finished.
* **storage** - _[types.dt_imageio_module_storage_t](../../types/dt_imageio_module_storage_t)_ - The storage object used for the export.
* **image_table** - _table_ - A table keyed by the exported image objects and valued with the corresponding temporary export filename.
* **extra_data** - _table_ - An empty Lua table to store extra data. This table is common to all calls to store and the call to finalize in a given export series.
# \[supported\]
```
function(
storage : types.dt_imageio_module_storage_t,
format : types.dt_imageio_module_format_t
) : boolean
```
A function called to check if a given image format is supported by the Lua storage; this
is used to build the dropdown format list for the GUI.
Note that the parameters in the format are the ones currently set in the GUI; the user
might change them before export.
* **storage** - _[types.dt_imageio_module_storage_t](../../types/dt_imageio_module_storage_t)_ - The storage object tested.
* **format** - _[types.dt_imageio_module_format_t](../../types/dt_imageio_module_format_t)_ - The format object to report about.
* **return** - _boolean_ - True if the corresponding format is supported.
# \[initialize\]
```
function(
storage : types.dt_imageio_module_storage_t,
format : types.dt_imageio_module_format_t,
images : table of types.dt_lua_image_t,
high_quality : boolean,
extra_data : table
) : table or nil
```
A function called before storage happens
This function can change the list of exported functions
* **storage** - _[types.dt_imageio_module_storage_t](../../types/dt_imageio_module_storage_t)_ - The storage object tested.
* **format** - _[types.dt_imageio_module_format_t](../../types/dt_imageio_module_format_t)_ - The format object to report about.
* **images** - _table of [types.dt_lua_image_t](../../types/dt_lua_image_t)_ - A table containing images to be exported.
* **high_quality** - _boolean_ - True if the export is high quality.
* **extra_data** - _table_ - An empty Lua table to take extra data. This table is common to the initialize, store
and finalize calls in an export series.
* **return** - _table or nil_ - The modified table of images to export or nil
If nil (or nothing) is returned, the original list of images will be exported
If a table of images is returned, that table will be used instead. The table can be
empty. The images parameter can be modified and returned

View file

@ -0,0 +1,103 @@
---
title: darktable.styles
id: darktable.styles
weight: 160
draft: false
author: "people"
---
This pseudo table allows you to access and manipulate styles.
# darktable.styles.#
[types.dt_style_t](../../types/dt_style_t)
Each existing style has a numeric index; you can iterate them using ipairs.
# darktable.styles.create
```
function(
image : types.dt_lua_image_t,
name : string,
description : string
) : types.dt_style_t
```
Create a new style based on an image.
* **image** - _[types.dt_lua_image_t](../../types/dt_lua_image_t)_ - The image to create the style from.
* **name** - _string_ - The name to give to the new style.
* **description** - _string_ - The description of the new style.
* **return** - _[types.dt_style_t](../../types/dt_style_t)_ - The new style object.
# darktable.styles.delete
```
function(
style : types.dt_style_t
)
```
Deletes an existing style.
* **style** - _[types.dt_style_t](types.dt_style_t)_ - the style to delete
# darktable.styles.duplicate
```
function(
style : types.dt_style_t,
name : string,
description : string
) : types.dt_style_t
```
Create a new style based on an existing style.
* **style** - _[types.dt_style_t](../../types/dt_style_t)_ - The style to base the new style on.
* **name** - _string_ - The new style's name.
* **description** - _string_ - The new style's description.
* **return** - _[types.dt_style_t](../../types/dt_style_t)_ - The new style object.
# darktable.styles.apply
```
function(
style : types.dt_style_t,
image : types.dt_lua_image_t
)
```
Apply a style to an image. The order of parameters can be inverted.
* **style** - _[types.dt_style_t](../../types/dt_style_t)_ - The style to use.
* **image** - _[types.dt_lua_image_t](../../types/dt_lua_image_t)_ - The image to apply the style to.
# darktable.styles.import
```
function(
filename : string
)
```
Import a style from an external .dtstyle file
* **filename** - _string_ - The file to import
# darktable.styles.export
```
function(
style : types.dt_style_t,
directory : string,
overwrite : boolean
)
```
Export a style to an external .dtstyle file
* **style** - _[types.dt_style_t](../../types/dt_style_t)_ - The style to export
* **directory** - _string_ - The directory to export to
* **overwrite** - _boolean_ - Is overwriting an existing file allowed

View file

@ -0,0 +1,107 @@
---
title: darktable.tags
id: darktable.tags
weight: 130
draft: false
author: "people"
---
Allows access to all existing tags.
# darktable.tags.#
[types.dt_lua_tag_t](../../types/dt_lua_tag_t)
Each existing tag has a numeric entry in the tags table - use ipairs to iterate over them.
### darktable.tags.create
```
function(
name : string
)
```
Creates a new tag and return it. If the tag exists return the existing tag.
* **name** - _string_ - The name of the new tag.
# darktable.tags.find
```
function(
name : string
) : types.dt_lua_tag_t
```
Returns the tag object or nil if the tag doesn't exist.
* **name** - _string_ - The name of the tag to find.
* **return** - _
[types.dt_lua_tag_t](../../types/dt_lua_tag_t)_ - The tag object or nil.
# darktable.tags.delete
```
function(
tag : types.dt_lua_tag_t
)
```
Deletes the tag object, detaching it from all images.
* **tag** - _[types.dt_lua_tag_t](../../types/dt_lua_tag_t)_ - The tag to be deleted.
# darktable.tags.attach
```
function(
tag : types.dt_lua_tag_t,
image : types.dt_lua_image_t
)
```
Attach a tag to an image; the order of the parameters can be reversed.
* **tag** - _[types.dt_lua_tag_t](../../types/dt_lua_tag_t)_ - The tag to be attached.
* **image** - _[types.dt_lua_image_t](../../types/dt_lua_image_t)_ - The image to attach the tag to.
# darktable.tags.detach
```
function(
tag : types.dt_lua_tag_t,
image : types.dt_lua_image_t
)
```
Detach a tag from an image; the order of the parameters can be reversed.
* **tag** - _[types.dt_lua_tag_t](../../types/dt_lua_tag_t)_ - The tag to be detached.
* **image** - _[types.dt_lua_image_t](../../types/dt_lua_image_t)_ - The image to detach the tag from.
# darktable.tags.get_tags
```
function(
image : types.dt_lua_image_t
) : table of types.dt_lua_tag_t
```
Gets all tags attached to an image.
* **image** - _[types.dt_lua_image_t](../../types/dt_lua_image_t)_ - The image to get the tags from.
* **return** - _table of [types.dt_lua_tag_t](../../types/dt_lua_tag_t)_ - A table of tags that are attached to the image.
# darktable.tags.get_tagged_images
```
function(
tag : types.dt_lua_tag_t
) : table of types.dt_lua_image_t
```
Gets all images with the attached tag.
* **tag** - _[types.dt_lua_tag_t](../../types/dt_lua_tag_t)_ - The tag to search images for.
* **return** - _table of [types.dt_lua_image_t](../../types/dt_lua_image_t)_ - A table of images that have the tag attached.

View file

@ -0,0 +1,14 @@
---
title: overview
id: overview
weight: 10
draft: false
author: "people"
---
The darktable library is the main entry point for all access to the darktable internals.
To access the darktable specific functions you must load the darktable environment:
`darktable = require "darktable"`
All functions and data are accessed through the darktable module.

View file

@ -0,0 +1,7 @@
---
title: events
id: events
weight: 40
draft: false
author: "people"
---

View file

@ -0,0 +1,23 @@
---
title: exit
id: exit
weight: 100
draft: false
author: "people"
---
`event`
This event is triggered when darktable exits, it allows lua scripts to do cleanup jobs
# events.exit.callback
```
function(
)
```
# events.exit.extra registration parameters
This event has no extra registration parameters.

View file

@ -0,0 +1,26 @@
---
title: global_toolbox-grouping_toggle
id: global_toolbox-grouping_toggle
weight: 70
draft: false
author: "people"
---
`event`
This event is triggered after the user toggled the grouping button.
# global_toolbox-grouping_toggle.callback
```
function(
toggle : boolean
)
```
* **toggle** - _boolean_ - the new grouping status.
# global_toolbox-grouping_toggle.extra registration parameters
This event has no extra registration parameters.

View file

@ -0,0 +1,25 @@
---
title: global_toolbox-overlay_toggle
id: global_toolbox-overlay_toggle
weight: 80
draft: false
author: "people"
---
`event`
This event is triggered after the user toggled the overlay button.
# global_toolbox-overlay_toggle.callback
```
function(
toggle : boolean
)
```
* **toggle** - _boolean_ - the new overlay status.
# global_toolbox-overlay_toggle.extra registration parameters
This event has no extra registration parameters.

View file

@ -0,0 +1,36 @@
---
title: intermediate-export-image
id: intermediate-export-image
weight: 20
draft: false
author: "people"
---
`event`
This event is called each time an image is exported, once for each image after the image
has been processed to an image format but before the storage has moved the image to
its final destination. The call is blocking.
# intermediate-export-image.callback
```
function(
event : string,
image : types.dt_lua_image_t,
filename : string,
format : types.dt_imageio_module_format_t,
storage : types.dt_imageio_module_storage_t
)
```
* **event** - _string_ - The name of the event that triggered the callback.
* **image** - _[types.dt_lua_image_t](../types/dt_lua_image_t)_ - The image object that has been exported.
* **filename** - _string_ - The name of the file that is the result of the image being processed.
* **format** - _[types.dt_imageio_module_format_t](../types/dt_imageio_module_format_t)_ - The format used to export the image.
* **storage** - _[types.dt_imageio_module_storage_t](../types/dt_imageio_module_storage_t)_ - The storage used to export the image \(can be nil\).
# intermediate-export-image.extra registration parameters
This event has no extra registration parameters.

View file

@ -0,0 +1,28 @@
---
title: mouse-over-image-changed
id: mouse-over-image-changed
weight: 90
draft: false
author: "people"
---
`event`
This event is triggered whenever the image under the mouse changes
# mouse-over-image-changed.callback
```
function(
event : string,
image : types.dt_lua_image_t
)
```
* **event** - _string_ - The name of the event that triggered the callback.
* **image** - _[types.dt_lua_image_t](../types/dt_lua_image_t)_ - The new image under the mouse, can be nil if there is no image under the mouse
# mouse-over-image-changed.extra registration parameters
This event has no extra registration parameters.

View file

@ -0,0 +1,9 @@
---
title: overview
id: overview
weight: 10
draft: false
author: "people"
---
This section documents events that can be used to trigger Lua callbacks.

View file

@ -0,0 +1,29 @@
---
title: post-import-film
id: post-import-film
weight: 50
draft: false
author: "people"
---
`event`
This event is triggered when an film import is finished (all post-import-image callbacks
have already been triggered). This event can be registered multiple times.
# post-import-film.callback
```
function(
event : string,
film : types.dt_lua_film_t
)
```
* **event** - _string_ - The name of the event that triggered the callback.
* **film** - _[types.dt_lua_film_t](../types/dt_lua_film_t)_ - The new film that has been added. If multiple films were added recursively only the top level film is reported.
# post-import-film.extra registration parameters
This event has no extra registration parameters.

View file

@ -0,0 +1,29 @@
---
title: post-import-image
id: post-import-image
weight: 30
draft: false
author: "people"
---
`event`
This event is triggered whenever a new image is imported into the database. This event
can be registered multiple times, all callbacks will be called. The call is blocking.
# post-import-image.callback
```
function(
event : string,
image : types.dt_lua_image_t
)
```
* **event** - _string_ - The name of the event that triggered the callback.
* **image** - _[types.dt_lua_image_t](../types/dt_lua_image_t)_ - The image object that has been imported.
# post-import-image.extra registration parameters
This event has no extra registration parameters.

View file

@ -0,0 +1,28 @@
---
title: pre-import
id: pre-import
weight: 110
draft: false
author: "people"
---
`event`
This event is trigger before any import action
# pre-import.callback
```
function(
event : string,
images : table of string
)
```
* **event** - _string_ - The name of the event that triggered the callback.
* **images** - _table of string_ - The files that will be imported. Modifying this table will change the list of files that
will be imported.
# pre-import.extra registration parameters
This event has no extra registration parameters.

View file

@ -0,0 +1,29 @@
---
title: shortcut
id: shortcut
weight: 40
draft: false
author: "people"
---
`event`
This event registers a new keyboard shortcut. The shortcut isn't bound to any key until
the users does so in the preference panel. The event is triggered whenever the shortcut
is triggered. This event can only be registered once per value of shortcut.
# shortcut.callback
```
function(
event : string,
shortcut : string
)
```
* **event** - _string_ - The name of the event that triggered the callback.
* **shortcut** - _string_ - The tooltip string that was given at registration time.
# shortcut.extra registration parameters
* **tooltip** - _string_ - The string that will be displayed on the shortcut preference panel describing the
shortcut.

View file

@ -0,0 +1,30 @@
---
title: view_changed
id: view_changed
weight: 60
draft: false
author: "people"
---
`event`
This event is triggered after the user changed the active view
#view-changed.callback
```
function(
event : string,
old_view : types.dt_lua_view_t,
new_view : types.dt_lua_view_t
)
```
* **event** - _string_ - The name of the event that triggered the callback.
* **old_view** - _[types.dt_lua_view_t](../types/dt_lua_view_t)_ - The view that we just left
* **new_view** - _[types.dt_lua_view_t](../types/dt_lua_view_t)_ - The view we are now in
#view-changed.extra registration parameters
This event has no extra registration parameters.

View file

@ -0,0 +1,7 @@
---
title: types
id: types
weight: 30
draft: false
author: "people"
---

View file

@ -0,0 +1,18 @@
---
title: _pdf_mode_t
id: _pdf_mode_t
weight: 150
draft: false
author: "people"
---
`enum`
The export mode to use for PDF document
Values:
* normal
* draft
* debug

View file

@ -0,0 +1,17 @@
---
title: _pdf_pages_t
id: _pdf_pages_t
weight: 160
draft: false
author: "people"
---
`enum`
The different page types for PDF export
Values :
* all
* single
* contact

View file

@ -0,0 +1,16 @@
---
title: comp_type_t
id: comp_type_t
weight: 370
draft: false
author: "people"
---
`enum`
Type of compression for webp
Values:
* webp_lossy
* webp_lossless

View file

@ -0,0 +1,23 @@
---
title: dt_collection_filter_t
id: dt_collection_filter_t
weight: 450
draft: false
author: "people"
---
`enum`
The different elements on which a collection can be filtered
Values:
* DT_COLLECTION_FILTER_ALL
* DT_COLLECTION_FILTER_STAR_NO
* DT_COLLECTION_FILTER_STAR_1
* DT_COLLECTION_FILTER_STAR_2
* DT_COLLECTION_FILTER_STAR_3
* DT_COLLECTION_FILTER_STAR_4
* DT_COLLECTION_FILTER_STAR_5
* DT_COLLECTION_FILTER_REJECT
* DT_COLLECTION_FILTER_NOT_REJECT

View file

@ -0,0 +1,37 @@
---
title: dt_collection_properties_t
id: dt_collection_properties_t
weight: 420
draft: false
author: "people"
---
`enum`
The different elements on which a collection can be filtered
Values:
* DT_COLLECTION_PROP_FILMROLL
* DT_COLLECTION_PROP_FOLDERS
* DT_COLLECTION_PROP_CAMERA
* DT_COLLECTION_PROP_TAG
* DT_COLLECTION_PROP_DAY
* DT_COLLECTION_PROP_TIME
* DT_COLLECTION_PROP_IMPORT_TIMESTAMP
* DT_COLLECTION_PROP_CHANGE_TIMESTAMP
* DT_COLLECTION_PROP_EXPORT_TIMESTAMP
* DT_COLLECTION_PROP_PRINT_TIMESTAMP
* DT_COLLECTION_PROP_HISTORY
* DT_COLLECTION_PROP_COLORLABEL
* DT_COLLECTION_PROP_TITLE
* DT_COLLECTION_PROP_DESCRIPTION
* DT_COLLECTION_PROP_CREATOR
* DT_COLLECTION_PROP_PUBLISHER
* DT_COLLECTION_PROP_RIGHTS
* DT_COLLECTION_PROP_LENS
* DT_COLLECTION_PROP_FOCAL_LENGTH
* DT_COLLECTION_PROP_ISO
* DT_COLLECTION_PROP_APERTURE
* DT_COLLECTION_PROP_FILENAME
* DT_COLLECTION_PROP_GEOTAGGING

View file

@ -0,0 +1,21 @@
---
title: dt_collection_rating_comperator_t
id: dt_collection_rating_comperator_t
weight: 460
draft: false
author: "people"
---
`enum`
The different ways in which a collection filter can be compared
Values:
* DT_COLLECTION_RATING_COMP_LT
* DT_COLLECTION_RATING_COMP_LEQ
* DT_COLLECTION_RATING_COMP_EQ
* DT_COLLECTION_RATING_COMP_GEQ
* DT_COLLECTION_RATING_COMP_GT
* DT_COLLECTION_RATING_COMP_NE
* DT_COLLECTION_RATING_N_COMPS

View file

@ -0,0 +1,16 @@
---
title: dt_collection_sort_order_t
id: dt_collection_sort_order_t
weight: 440
draft: false
author: "people"
---
`enum`
The different orders that a collection can be sorted in
Values:
* DT_COLLECTION_SORT_ORDER_ASCENDING
* DT_COLLECTION_SORT_ORDER_DESCENDING

View file

@ -0,0 +1,27 @@
---
title: dt_collection_sort_t
id: dt_collection_sort_t
weight: 430
draft: false
author: "people"
---
`enum`
The different elements on which a collection can be sorted
Values:
* DT_COLLECTION_SORT_NONE
* DT_COLLECTION_SORT_FILENAME
* DT_COLLECTION_SORT_DATETIME
* DT_COLLECTION_SORT_RATING
* DT_COLLECTION_SORT_ID
* DT_COLLECTION_SORT_COLOR
* DT_COLLECTION_SORT_GROUP
* DT_COLLECTION_SORT_PATH
* DT_COLLECTION_SORT_CUSTOM_ORDER
* DT_COLLECTION_SORT_TITLE
* DT_COLLECTION_SORT_DESCRIPTION
* DT_COLLECTION_SORT_ASPECT_RATIO
* DT_COLLECTION_SORT_SHUFFLE

View file

@ -0,0 +1,23 @@
---
title: dt_imageio_exr_compression_t
id: dt_imageio_exr_compression_t
weight: 390
draft: false
author: "people"
---
`enum`
The type of compression to use for the EXR image
Values:
* off
* rle
* zips
* zip
* piz
* pxr24
* b44
* b44a

View file

@ -0,0 +1,17 @@
---
title: dt_imageio_j2k_format_t
id: dt_imageio_j2k_format_t
weight: 350
draft: false
author: "people"
---
`enum`
J2K format type
Values:
* j2k
* jp2

View file

@ -0,0 +1,19 @@
---
title: dt_imageio_j2k_preset_t
id: dt_imageio_j2k_preset_t
weight: 360
draft: false
author: "people"
---
`enum`
J2K preset type
Values:
* off
* cinema2k_24
* cinema2k_48
* cinema4k_24

View file

@ -0,0 +1,16 @@
---
title: dt_imageio_module_format_data_copy
id: dt_imageio_module_format_data_copy
weight: 80
draft: false
author: "people"
---
`dt_type`
Type object describing parameters to export to copy.
Attributes:
* [parent](../attributes#parent) : [types.dt_imageio_module_format_t](../types/dt_imageio_module_format_t)

View file

@ -0,0 +1,26 @@
---
title: dt_imageio_module_format_data_exr
id: dt_imageio_module_format_data_exr
weight: 70
draft: false
author: "people"
---
`dt_type`
Type object describing parameters to export to exr.
Attributes:
* [parent](../attributes#parent) : [types.dt_imageio_module_format_t](t../ypes/dt_imageio_module_format_t)
# dt_imageio_module_format_data_exr.compression
`string`
The compression parameter to use when exporting.
Attributes:
* [write](../attributes#write)

View file

@ -0,0 +1,56 @@
---
title: dt_imageio_module_format_data_j2k
id: dt_imageio_module_format_data_j2k
weight: 130
draft: false
author: "people"
---
`dt_type`
Type object describing parameters to export to jpeg2000.
Attributes:
* [parent](../attributes#parent) : [types.dt_imageio_module_format_t](../types/dt_imageio_module_format_t)
# dt_imageio_module_format_data_j2k.quality
`number`
The quality to use at export time.
Attributes:
* [write](../attributes#write)
# dt_imageio_module_format_data_j2k.bpp
`number`
The bpp parameter to use when exporting.
Attributes:
* [write](../attributes#write)
# dt_imageio_module_format_data_j2k.format
[types.dt_imageio_j2k_format_t](../types/dt_imageio_j2k_format_t)
The format to use.
Attributes:
* [write](../attributes#write)
# dt_imageio_module_format_data_j2k.preset
[types.dt_imageio_j2k_preset_t](../types/dt_imageio_j2k_preset_t)
The preset to use.
Attributes:
62
* [write](../attributes#write)

View file

@ -0,0 +1,26 @@
---
title: dt_imageio_module_format_data_jpeg
id: dt_imageio_module_format_data_jpeg
weight: 100
draft: false
author: "people"
---
`dt_type`
Type object describing parameters to export to jpeg.
Attributes:
* [parent](../attributes#parent) : [types.dt_imageio_module_format_t](../types/dt_imageio_module_format_t)
# dt_imageio_module_format_data_jpeg.quality
`number`
The quality to use at export time.
Attributes:
* [write](../attributes#write)

View file

@ -0,0 +1,116 @@
---
title: dt_imageio_module_format_data_pdf
id: dt_imageio_module_format_data_pdf
weight: 140
draft: false
author: "people"
---
`dt_type`
Type object describing parameters to export to pdf.
Attributes:
* [parent](../attributes#parent) : [types.dt_imageio_module_format_t](../types/dt_imageio_module_format_t)
# dt_imageio_module_format_data_pdf.dpi
`number`
The dot per inch value to use at export
Attributes:
* [write](../attributes#write)
# dt_imageio_module_format_data_pdf.icc
`boolean`
Should the images be tagged with their embedded profile
Attributes:
* [write](../attributes#write)
# dt_imageio_module_format_data_pdf.border
`string`
Empty space around the PDF images
Attributes:
* [write](../attributes#write)
# dt_imageio_module_format_data_pdf.orientation
`string`
Orientation of the pages in the document
Attributes:
* [write](../attributes#write)
# dt_imageio_module_format_data_pdf.title
`string`
The title for the document types.dt_imageio_module_format_data_pdf.rotate:set_text([[Should the images be rotated to match the PDF orientation
Attributes:
* [write](../attributes#write)
# dt_imageio_module_format_data_pdf.mode
`string`
The image mode to use at export time
Attributes:
* [write](../attributes#write)
# dt_imageio_module_format_data_pdf.size
`string`
The paper size to use
Attributes:
* [write](../attributes#write)
# dt_imageio_module_format_data_pdf.compression
`string`
Compression mode to use for images
Attributes:
* [write](../attributes#write)
# dt_imageio_module_format_data_pdf.pages
`string`
The page type to use
Attributes:
* [write](../attributes#write)
# dt_imageio_module_format_data_pdf.rotate
`boolean`
Should the images be rotated in the resulting PDF
Attributes:
* [write](../attributes#write)

View file

@ -0,0 +1,15 @@
---
title: dt_imageio_module_format_data_pfm
id: dt_imageio_module_format_data_pfm
weight: 90
draft: false
author: "people"
---
`dt_type`
Type object describing parameters to export to pfm.
Attributes:
* [parent](../attributes#parent) : [types.dt_imageio_module_format_t](../types/dt_imageio_module_format_t)

View file

@ -0,0 +1,26 @@
---
title: dt_imageio_module_format_data_png
id: dt_imageio_module_format_data_png
weight: 50
draft: false
author: "people"
---
`dt_type`
Type object describing parameters to export to png.
Attributes:
* [parent](../attributes#parent) : [types.dt_imageio_module_format_t]()../types/dt_imageio_module_format_t
# dt_imageio_module_format_data_png.bpp
`number`
The bpp parameter to use when exporting.
Attributes:
* [write](../attributes#write)

View file

@ -0,0 +1,15 @@
---
title: dt_imageio_module_format_data_ppm
id: dt_imageio_module_format_data_ppm
weight: 110
draft: false
author: "people"
---
`dt_type`
Type object describing parameters to export to ppm.
Attributes:
* [parent](../attributes#parent) : [types.dt_imageio_module_format_t](../types/dt_imageio_module_format_t)

View file

@ -0,0 +1,26 @@
---
title: dt_imageio_module_format_data_tiff
id: dt_imageio_module_format_data_tiff
weight: 60
draft: false
author: "people"
---
`dt_type`
Type object describing parameters to export to tiff.
Attributes:
* [parent](../attributes#parent) : [types.dt_imageio_module_format_t](../types/dt_imageio_module_format_t)
# dt_imageio_module_format_data_tiff.bpp
`number`
The bpp parameter to use when exporting.
Attributes:
* [write](../attributes#write)

View file

@ -0,0 +1,45 @@
---
title: dt_imageio_module_format_data_webp
id: dt_imageio_module_format_data_webp
weight: 120
draft: false
author: "people"
---
`dt_type`
Type object describing parameters to export to webp.
Attributes:
* [parent](../attributes#parent) : [types.dt_imageio_module_format_t](../types/dt_imageio_module_format_t)
# dt_imageio_module_format_data_webp.quality
`number`
The quality to use at export time.
Attributes:
* [write](../attributes#write)
# dt_imageio_module_format_data_webp.comp_type
[types.comp_type_t](../types/comp_type_t)
The overall quality to use; can be one of "webp_lossy" or "webp_lossless".
Attributes:
* [write](../attributes#write)
# dt_imageio_module_format_data_webp.hint
[types.hint_t](../types/hint_t)
A hint on the overall content of the image.
Attributes:
* [write](../attributes#write)

View file

@ -0,0 +1,77 @@
---
title: dt_imageio_module_format_t
id: dt_imageio_module_format_t
weight: 40
draft: false
author: "people"
---
`dt_type`
A virtual type representing all format types.
# dt_imageio_module_format_t.plugin_name
`string`
A unique name for the plugin.
# dt_imageio_module_format_t.name
`string`
A human readable name for the plugin.
# dt_imageio_module_format_t.extension
`string`
The typical filename extension for that format.
# dt_imageio_module_format_t.mime
`string`
The mime type associated with the format.
# dt_imageio_module_format_t.max_width
`number`
The max width allowed for the format \(0 = unlimited\).
Attributes:
* [write](../attributes#write)
2.3.6. dt_imageio_module_format_t.max_height
`number`
The max height allowed for the format \(0 = unlimited\).
Attributes:
* [write](../attributes#write)
2.3.7. dt_imageio_module_format_t.write_image
```
self:function(
image : types.dt_lua_image_t,
filename : string,
[allow_upscale : boolean]
) : boolean
```
Exports an image to a file. This is a blocking operation that will not return until the image
is exported.
* **self** - _[types.dt_imageio_module_format_t](../types/dt_imageio_module_format_t)_ - The format that will be used to export.
* **image** - _[types.dt_lua_image_t](../types/dt_lua_image_t)_ - The image object to export.
* **filename** - _string_ - The filename to export to.
* **\[allow_upscale\]** - _boolean_ - Set to true to allow upscaling of the image.
* **return** - _boolean_ - Returns true on success.
Attributes:
* [implicit_yield](../attributes#implicit_yield)

View file

@ -0,0 +1,26 @@
---
title: dt_imageio_module_storage_data_disk
id: dt_imageio_module_storage_data_disk
weight: 230
draft: false
author: "people"
---
`dt_type`
An object containing parameters to export to disk.
Attributes:
* [parent](../attributes#parent) : [types.dt_imageio_module_storage_t](../types/dt_imageio_module_storage_t)
# dt_imageio_module_storage_data_disk.filename
`string`
The filename to export to.
Attributes:
* [write](../attributes#write)

View file

@ -0,0 +1,16 @@
---
title: dt_imageio_module_storage_data_email
id: dt_imageio_module_storage_data_email
weight: 190
draft: false
author: "people"
---
`dt_type`
An object containing parameters to export to email.
Attributes:
* [parent](../attributes#parent) : [types.dt_imageio_module_storage_t](../types/dt_imageio_module_storage_t)

View file

@ -0,0 +1,36 @@
---
title: dt_imageio_module_storage_data_gallery
id: dt_imageio_module_storage_data_gallery
weight: 220
draft: false
author: "people"
---
`dt_type`
An object containing parameters to export to gallery.
Attributes:
* [parent](../attributes#parent) : [types.dt_imageio_module_storage_t](../types/dt_imageio_module_storage_t)
# dt_imageio_module_storage_data_gallery.filename
`string`
The filename to export to.
Attributes:
* [write](../attributes#write)
# dt_imageio_module_storage_data_gallery.title
`string`
The title to use for export.
Attributes:
* [write](../attributes#write)

View file

@ -0,0 +1,36 @@
---
title: dt_imageio_module_storage_data_latex
id: dt_imageio_module_storage_data_latex
weight: 200
draft: false
author: "people"
---
`dt_type`
An object containing parameters to export to latex.
Attributes:
* [parent](../attributes#parent) : [types.dt_imageio_module_storage_t](../types/dt_imageio_module_storage_t)
# dt_imageio_module_storage_data_latex.filename
`string`
The filename to export to.
Attributes:
* [write](../attributes#write)
# dt_imageio_module_storage_data_latex.title
`string`
The title to use for export.
Attributes:
* [write](../attributes#write)

View file

@ -0,0 +1,16 @@
---
title: dt_imageio_module_storage_data_piwigo
id: dt_imageio_module_storage_data_piwigo
weight: 210
draft: false
author: "people"
---
`dt_type`
An object containing parameters to export to piwigo.
Attributes:
* [parent](../attributes#parent) : [types.dt_imageio_module_storage_t](../types/dt_imageio_module_storage_t)

View file

@ -0,0 +1,83 @@
---
title: dt_imageio_module_storage_t
id: dt_imageio_module_storage_t
weight: 180
draft: false
author: "people"
---
`dt_type`
A virtual type representing all storage types.
# dt_imageio_module_storage_t.plugin_name
`string`
A unique name for the plugin.
Attributes:
* [write](../attributes#write)
# dt_imageio_module_storage_t.name
`string`
A human readable name for the plugin.
Attributes:
* [write](../attributes#write)
# dt_imageio_module_storage_t.width
`number`
The currently selected width for the plugin.
Attributes:
* [write](../attributes#write)
# dt_imageio_module_storage_t.height
`number`
The currently selected height for the plugin.
Attributes:
* [write](../attributes#write)
# dt_imageio_module_storage_t.recommended_width
`number`
The recommended width for the plugin.
Attributes:
* [write](../attributes#write)
# dt_imageio_module_storage_t.recommended_height
`number`
The recommended height for the plugin.
Attributes:
* [write](../attributes#write)
# dt_imageio_module_storage_t.supports_format
```
format : types.dt_imageio_module_format_t
) : boolean
```
Checks if a format is supported by this storage.
* **self** - _[types.dt_imageio_module_storage_t](../types/dt_imageio_module_storage_t)_ - The storage type to check against.
* **format** - _[types.dt_imageio_module_format_t](../types/dt_imageio_module_format_t)_ - The format type to check.
* **return** - _boolean_ - True if the format is supported by the storage.

View file

@ -0,0 +1,17 @@
---
title: dt_lib_collect_mode_t
id: dt_lib_collect_mode_t
weight: 410
draft: false
author: "people"
---
`enum`
The logical operators to apply between rulesAttributes:
Values:
* DT_LIB_COLLECT_MODE_AND
* DT_LIB_COLLECT_MODE_OR
* DT_LIB_COLLECT_MODE_AND_NOT

View file

@ -0,0 +1,42 @@
---
title: dt_lib_collect_params_rule_t
id: dt_lib_collect_params_rule_t
weight: 400
draft: false
author: "people"
---
`dt_type`
A single rule for filtering a collection
# dt_lib_collect_params_rule_t.mode
[types.dt_lib_collect_mode_t](../types/dt_lib_collect_mode_t)
How this rule is applied after the previous one. Unused for the first rule
Attributes:
* [write](../attributes#write)
# dt_lib_collect_params_rule_t.data
`string`
The text segment of the rule. Exact content depends on the type of rule
Attributes:
* [write](../attributes#write)
# dt_lib_collect_params_rule_t.item
[types.dt_collection_properties_t](../types/dt_collection_properties_t)
The item on which this rule filter. i.e the type of the rule
Attributes:
* [write](../attributes#write)

View file

@ -0,0 +1,19 @@
---
title: dt_lighttable_layout_t
id: dt_lighttable_layout_t
weight: 520
draft: false
author: "people"
---
`enum`
The different lighttable layouts
Values:
* DT_LIGHTTABLE_LAYOUT_FIRST
* DT_LIGHTTABLE_LAYOUT_ZOOMABLE
* DT_LIGHTTABLE_LAYOUT_FILEMANAGER
* DT_LIGHTTABLE_LAYOUT_CULLING
* DT_LIGHTTABLE_LAYOUT_LAST

View file

@ -0,0 +1,18 @@
---
title: dt_lua_align_t
id: dt_lua_align_t
weight: 480
draft: false
author: "people"
---
`enum`
The alignment of a label
Values:
* fill
* start
* end
* center
* baseline

View file

@ -0,0 +1,34 @@
---
title: dt_lua_backgroundjob_t
id: dt_lua_backgroundjob_t
weight: 300
draft: false
author: "people"
---
`dt_type`
A lua-managed entry in the backgroundjob lib
# dt_lua_backgroundjob_t.percent
`number`
The value of the progress bar, between 0 and 1. will return nil if there is no progress bar,
will raise an error if read or written on an invalid job
Attributes:
* [write](../attributes#write)
# dt_lua_backgroundjob_t.valid
`boolean`
True if the job is displayed, set it to false to destroy the entry
An invalid job cannot be made valid again
Attributes:
* [write](../attributes#write)

View file

@ -0,0 +1,189 @@
---
title: dt_lua_cairo_t
id: dt_lua_cairo_t
weight: 500
draft: false
author: "people"
---
`dt_type`
A wrapper around a cairo drawing context.
You probably shouldn't use this after the callback that got it passed returned.
For more details of the member functions have a look at the cairo documentation for
the [drawing context](http://www.cairographics.org/manual/cairo-cairo-t.html), [transformations](http://www.cairographics.org/manual/cairo-Transformations.html) and [paths](http://www.cairographics.org/manual/cairo-Paths.html).
# dt_lua_cairo_t.save
```
self:function(
)
```
Save the state of the drawing context.
* **self** - _[types.dt_lua_cairo_t](../types/dt_lua_cairo_t)_ - The context to modify.
# types.dt_lua_cairo_t.restore
```
self:function(
)
```
Restore a previously saved state.
* **self** - _[types.dt_lua_cairo_t](../types/dt_lua_cairo_t)_ - The context to modify.
# dt_lua_cairo_t.move_to
```
self:function(
x : float,
y : float
)
```
Begin a new sub-path.
* **self** - _[types.dt_lua_cairo_t](../types/dt_lua_cairo_t)_ - The context to modify
* **x** - _float_ - The x coordinate of the new position.
* **y** - _float_ - The y coordinate of the new position.
# dt_lua_cairo_t.line_to
```
self:function(
x : float,
y : float
)
```
Add a line to the path.
* **self** - _[types.dt_lua_cairo_t](../types/dt_lua_cairo_t)_ - The context to modify.
* **x** - _float_ - The x coordinate of the end of the new line.
* **y** - _float_ - The y coordinate of the end of the new line.
# types.dt_lua_cairo_t.rectangle
```
self:function(
x : float,
y : float,
width : float,
height : float
)
```
Add a closed sub-path rectangle.
* **self** - _[types.dt_lua_cairo_t](../types/dt_lua_cairo_t)_ - The context to modify.
* **x** - _float_ - The x coordinate of the top left corner of the rectangle.
* **y** - _float_ - The y coordinate of the top left corner of the rectangle.
* **width** - _float_ - The width of the rectangle.
* **height** - _float_ - The height of the rectangle.
# dt_lua_cairo_t.arc
```
self:function(
x : float,
y : float,
radius : float,
angle1 : float,
angle2 : float
)
```
Add a circular arc.
* **self** - _[types.dt_lua_cairo_t](../types/dt_lua_cairo_t)_ - The context to modify.
* **x** - _float_ - The x position of the center of the arc.
* **y** - _float_ - The y position of the center of the arc.
* **radius** - _float_ - The radius of the arc.
* **angle1** - _float_ - The start angle, in radians.
* **angle2** - _float_ - The end angle, in radians.
# dt_lua_cairo_t.arc_negative
```
self:function(
x : float,
y : float,
radius : float,
angle1 : float,
angle2 : float
)
```
Add a circular arc. It only differs in the direction from types.dt_lua_cairo_t.arc.
* **self** - _[types.dt_lua_cairo_t](../types/dt_lua_cairo_t)_ - The context to modify.
* **x** - _float_ - The x position of the center of the arc.
* **y** - _float_ - The y position of the center of the arc.
* **radius** - _float_ - The radius of the arc.
* **angle1** - _float_ - The start angle, in radians.
* **angle2** - _float_ - The end angle, in radians.
# dt_lua_cairo_t.rotate
```
self:function(
angle : float
)
```
Add a rotation to the transformation matrix.
* **self** - _[types.dt_lua_cairo_t](../types/dt_lua_cairo_t)_ - The context to modify.
* **angle** - _float_ - The angle (in radians) by which the user-space axes will be rotated.
# dt_lua_cairo_t.scale
```
self:function(
x : float,
y : float
)
```
Add a scaling to the transformation matrix.
self** - _[types.dt_lua_cairo_t](../types/dt_lua_cairo_t)_ - The context to modify.
* **x** - _float_ - The scale factor for the x dimension.
* **y** - _float_ - The scale factor for the y dimension.
# dt_lua_cairo_t.translate
```
self:function(
x : float,
y : float
)
```
Add a translation to the transformation matrix.
* **self** - _[types.dt_lua_cairo_t](../types/dt_lua_cairo_t)_ - The context to modify.
* **x** - _float_ - Amount to translate in the x direction
* **y** - _float_ - Amount to translate in the y direction
# dt_lua_cairo_t.new_sub_path
```
self:function(
)
```
Begin a new sub-path.
* **self** - _[types.dt_lua_cairo_t](../types/dt_lua_cairo_t)_ - The context to modify.
# dt_lua_cairo_t.draw_line
```
self:function(
x_start : float,
y_start : float,
x_end : float,
y_end : float
)
```
Helper function to draw a line with a given start and end.
* **self** - _[types.dt_lua_cairo_t](../types/dt_lua_cairo_t)_ - The context to modify.
* **x_start** - _float_ - The x coordinate of the start of the new line.
* **y_start** - _float_ - The y coordinate of the start of the new line.
* **x_end** - _float_ - The x coordinate of the end of the new line.
* **y_end** - _float_ - The y coordinate of the end of the new line.

View file

@ -0,0 +1,18 @@
---
title: dt_lua_ellipsize_mode_t
id: dt_lua_ellipsize_mode_t
weight: 490
draft: false
author: "people"
---
`enum`
The ellipsize mode of a label
Values:
* none
* start
* middle
* end

View file

@ -0,0 +1,59 @@
---
title: dt_lua_film_t
id: dt_lua_film_t
weight: 240
draft: false
author: "people"
---
`dt_type`
A film in darktable; this represents a directory containing imported images.
Attributes:
* [has_tostring](../attributes#has_tostring)
# dt_lua_film_t.move_image
see [darktable.database.move_image](../../darktable/darktable.database#darktabledatabasemove_image)
# dt_lua_film_t.copy_image
see [darktable.database.copy_image](../../darktable/darktable.database#darktabledatabasecopy_image)
# dt_lua_film_t.#
[types.dt_lua_image_t](../types/dt_lua_image_t)
The different images within the film.
# dt_lua_film_t.id
`number`
A unique numeric id used by this film.
Attributes:
* [write](../attributes#write)
# dt_lua_film_t.path
`string`
The path represented by this film.
Attributes:
* [write](../attributes#write)
# dt_lua_film_t.delete
```
self:function(
[force : boolean]
)
```
Removes the film from the database.
* **self** - _[types.dt_lua_film_t](../types/dt_lua_film_t)_ - The film to remove.
* **\[force\]** - _boolean_ - Force removal, even if the film is not empty.

View file

@ -0,0 +1,433 @@
---
title: dt_lua_image_t
id: dt_lua_image_t
weight: 30
draft: false
author: "people"
---
`dt_type`
Image objects represent an image in the database. This is slightly different from a file on
disk since a file can have multiple developments. Note that this is the real image object;
changing the value of a field will immediately change it in darktable and will be reflected
on any copy of that image object you may have kept.
Attributes:
* [has_tostring](../../attributes#has_tostring)
# dt_lua_image_t.attach_tag
see [darktable.tags.attach](../../darktable/darktable.tags#darktabletagsattach)
# dt_lua_image_t.detach_tag
see [darktable.tags.detach](../../darktable/darktable.tags#darktabletagsdetach)
# dt_lua_image_t.get_tags
see [darktable.tags.get_tags](../../darktable/darktable.tags#darktabletagsget_tags)
# dt_lua_image_t.create_style
see [darktable.styles.create](../../darktable/darktable.styles#darktablestylescreate)
# dt_lua_image_t.apply_style
see [darktable.styles.apply](../../darktable/darktable.styles#darktablestylesapply)
# dt_lua_image_t.duplicate
see [darktable.database.duplicate](../../darktable/darktable.database#darktabledatabaseduplicate)
# dt_lua_image_t.move
see [darktable.database.move_image](../../darktable/darktable.database#darktabledatabasemove_image)
# dt_lua_image_t.copy
see [darktable.database.copy_image](../../darktable/darktable.database#darktabledatabasecopy_image)
# dt_lua_image_t.id
`number`
A unique id identifying the image in the database.
# dt_lua_image_t.path
`string`
The file the directory containing the image.
# dt_lua_image_t.film
[types.dt_lua_film_t](../types/dt_lua_film_t)
The film object that contains this image.
# dt_lua_image_t.filename
`string`
The filename of the image.
# dt_lua_image_t.sidecar
`string`
The filename of the image's sidecar file.
# dt_lua_image_t.duplicate_index
`number`
If there are multiple images based on a same file, each will have a unique number, starting
from 0.
# dt_lua_image_t.publisher
`string`
The publisher field of the image.
Attributes:
* [write](../../attributes#write)
# dt_lua_image_t.title
`string`
The title field of the image.
Attributes:
* [write](../../attributes#write)
# dt_lua_image_t.creator
`string`
The creator field of the image.
Attributes:
* [write](../../attributes#write)
# dt_lua_image_t.rights
`string`
The rights field of the image.
Attributes:
* [write](../../attributes#write)
# dt_lua_image_t.description
`string`
The description field for the image.
Attributes:
* [write](../../attributes#write)
# dt_lua_image_t.notes
`string`
The notes field for the image.
Attributes:
* [write](../../attributes#write)
# dt_lua_image_t.version_name
`string`
The version_name field for the image.
Attributes:
* [write](../../attributes#write)
# dt_lua_image_t.exif_maker
`string`
The maker exif data.
Attributes:
* [write](../../attributes#write)
# dt_lua_image_t.exif_model
`string`
The camera model used.
Attributes:
* [write](../../attributes#write)
# dt_lua_image_t.exif_lens
`string`
The id string of the lens used.
Attributes:
* [write](../../attributes#write)
# dt_lua_image_t.exif_aperture
`number`
The aperture saved in the exif data.
Attributes:
* [write](../../attributes#write)
# dt_lua_image_t.exif_exposure
`number`
The exposure time of the image.
Attributes:
* [write](../../attributes#write)
# dt_lua_image_t.exif_focal_length
`number`
The focal length of the image.
Attributes:
* [write](../../attributes#write)
# dt_lua_image_t.exif_iso
`number`
The iso used on the image.
Attributes:
* [write](../../attributes#write)
# dt_lua_image_t.exif_datetime_taken
`string`
The date and time of the image.
Attributes:
* [write](../../attributes#write)
# dt_lua_image_t.exif_focus_distance
`number`
The distance of the subject.
Attributes:
* [write](../../attributes#write)
# dt_lua_image_t.exif_crop
`number`
The exif crop data.
Attributes:
* [write](../../attributes#write)
# dt_lua_image_t.latitude
`float or nil`
GPS latitude data of the image, nil if not set.
Attributes:
* [write](../../attributes#write)
# dt_lua_image_t.longitude
`float or nil`
GPS longitude data of the image, nil if not set.
Attributes:
* [write](../../attributes#write)
# dt_lua_image_t.elevation
`float or nil`
GPS altitude data of the image, nil if not set.
Attributes:
* [write](../../attributes#write)
# dt_lua_image_t.is_raw
`boolean`
True if the image is a RAW file.
WARNING: This is a flag that gets set the first time the image is opened, either by an edit
or thumbnail generation. If images are imported using darktable.database.import(), then
dt_lua_image_t.is_raw is not guaranteed to be correct.
# dt_lua_image_t.is_ldr
`boolean`
True if the image is a ldr image.
# dt_lua_image_t.is_hdr
`boolean`
True if the image is a hdr image.
# dt_lua_image_t.has_txt
`boolean`
True if the image has a txt sidecar file.
Attributes:
* [write](../../attributes#write)
# dt_lua_image_t.width
`number`
The width of the image.
# dt_lua_image_t.height
`number`
The height of the image.
# dt_lua_image_t.rating
`number`
The rating of the image (-1 for rejected).
Attributes:
* [write](../../attributes#write)
# dt_lua_image_t.red
`boolean`
True if the image has the corresponding colorlabel.
Attributes:
* [write](../../attributes#write)
# dt_lua_image_t.blue
see [types.dt_lua_image_t.red](../types/dt_lua_image_t#dt_lua_image_tred)
# dt_lua_image_t.green
see [types.dt_lua_image_t.red](../types/dt_lua_image_t#dt_lua_image_tred)
# dt_lua_image_t.yellow
see [types.dt_lua_image_t.red](../types/dt_lua_image_t#dt_lua_image_tred)
# dt_lua_image_t.purple
see [types.dt_lua_image_t.red](../types/dt_lua_image_t#dt_lua_image_tred)
# dt_lua_image_t.reset
```
self:function(
)
```
Removes all processing from the image, resetting it back to its original state
* **self** - _[types.dt_lua_image_t](../types/dt_lua_image_t)_ - The image whose history will be deleted
# dt_lua_image_t.delete
```
self:function(
)
```
Removes an image from the database
* **self** - _[types.dt_lua_image_t](../types/dt_lua_image_t)_ - The image to remove
# dt_lua_image_t.group_with
```
self:function(
[image : types.dt_lua_image_t]
)
```
Puts the first image in the same group as the second image. If no second image is provided
the image will be in its own group.
* **self** - _[types.dt_lua_image_t](../types/dt_lua_image_t)_ - The image whose group must be changed.
* **\[image\]** - _[types.dt_lua_image_t](../types/dt_lua_image_t)_ - The image we want to group with.
# dt_lua_image_t.make_group_leader
```
self:function(
)
```
Makes the image the leader of its group.
* **self** - _[types.dt_lua_image_t](../types/dt_lua_image_t)_ - The image we want as the leader.
# dt_lua_image_t.get_group_members
```
self:function(
) : table of types.dt_lua_image_t
```
Returns a table containing all types.dt_lua_image_t of the group. The group leader is both
at a numeric key and at the "leader" special key \(so you probably want to use ipairs to
iterate through that table\).
* **self** - _[types.dt_lua_image_t](../types/dt_lua_image_t)_ - The image whose group we are querying.
* **return** - _table of [types.dt_lua_image_t](../types/dt_lua_image_t)_ - A table of image objects containing all images that are in the same group as the image.
# dt_lua_image_t.group_leader
[types.dt_lua_image_t](../types/dt_lua_image_t)
The image which is the leader of the group this image is a member of.
# dt_lua_image_t.local_copy
`boolean`
True if the image has a copy in the local cache
Attributes:
* [write](../../attributes#write)
# dt_lua_image_t.drop_cache
```
self:function(
)
```
drops the cached version of this image.
This function should be called if an image is modified out of darktable to force DT to regenerate the thumbnail
darktable will regenerate the thumbnail by itself when it is needed
* **self** - _[types.dt_lua_image_t](../types/dt_lua_image_t)_ - The image whose cache must be dropped.

View file

@ -0,0 +1,92 @@
---
title: dt_lua_lib_t
id: dt_lua_lib_t
weight: 280
draft: false
author: "people"
---
`dt_type`
The type of a UI lib
# dt_lua_lib_t.id
`string`
A unit string identifying the lib
# dt_lua_lib_t.name
`string`
The translated title of the UI element
# dt_lua_lib_t.version
`number`
The version of the internal data of this lib
# dt_lua_lib_t.visible
`boolean`
Allow to make a lib module completely invisible to the user.
Note that if the module is invisible the user will have no way to restore it without lua
Attributes:
* [implicit_yield](../attributes#implicit_yield)
* [write](../attributes#write)
# dt_lua_lib_t.container
[types.dt_ui_container_t](../types/dt_ui_container_t)
The location of the lib in the darktable UI
# dt_lua_lib_t.expandable
`boolean`
True if the lib can be expanded/retracted
# dt_lua_lib_t.expanded
`boolean`
True if the lib is expanded
Attributes:
* [write](../attributes#write)
# dt_lua_lib_t.position
`number`
A value deciding the position of the lib within its container
# dt_lua_lib_t.views
`table`
A table of all the views that display this widget
# dt_lua_lib_t.reset
```
self:function(
)
```
A function to reset the lib to its default values
This function will do nothing if the lib is not visible or can't be reset
* **self** - _[types.dt_lua_lib_t](../types/dt_lua_lib_t)_ - The lib to reset
# dt_lua_lib_t.on_screen
`boolean`
True if the lib is currently visible on the screen

View file

@ -0,0 +1,16 @@
---
title: dt_lua_orientation_t
id: dt_lua_orientation_t
weight: 470
draft: false
author: "people"
---
`enum`
A possible orientation for a widget
Values:
* horizontal
* vertical

View file

@ -0,0 +1,38 @@
---
title: dt_lua_snapshot_t
id: dt_lua_snapshot_t
weight: 310
draft: false
author: "people"
---
`dt_type`
The description of a snapshot in the snapshot lib
Attributes:
[has_tostring](../attributes#has_tostring)
# dt_lua_snapshot_t.filename
`string`
The filename of an image containing the snapshot
# dt_lua_snapshot_t.select
```
self:function(
)
```
Activates this snapshot on the display. To deactivate all snapshot you need to call this
function on the active snapshot
* **self** - _[types.dt_lua_snapshot_t](../types/dt_lua_snapshot_t)_ - The snapshot to activate
# dt_lua_snapshot_t.name
`string`
The name of the snapshot, as seen in the UI

View file

@ -0,0 +1,37 @@
---
title: dt_lua_tag_t
id: dt_lua_tag_t
weight: 270
draft: false
author: "people"
---
`dt_type`
A tag that can be attached to an image.
Attributes:
[has_tostring](../attributes#has_tostring)
# dt_lua_tag_t.delete
see [darktable.tags.delete](../../darktable/darktable.tags#darktabletagsdelete)
# dt_lua_tag_t.attach
see [darktable.tags.attach](../../darktable/darktable.tags#darktabletagsattach)
# dt_lua_tag_t.detach
see [darktable.tags.detach](../../darktable/darktable.tags#darktabletagsdetach)
# dt_lua_tag_t.name
`string`
The name of the tag.
# dt_lua_tag_t.#
[types.dt_lua_image_t](../types/dt_lua_image_t)
The images that have that tag attached to them.

View file

@ -0,0 +1,24 @@
---
title: dt_lua_view_t
id: dt_lua_view_t
weight: 290
draft: false
author: "people"
---
`dt_type`
A darktable view
# dt_lua_view_t.id
`string`
A unique string identifying the view
# dt_lua_view_t.name
`string`
The name of the view

View file

@ -0,0 +1,17 @@
---
title: dt_pdf_stream_encoder_t
id: dt_pdf_stream_encoder_t
weight: 170
draft: false
author: "people"
---
`enum`
The compression mode for PDF document
Values:
* uncompressed
* deflate

View file

@ -0,0 +1,28 @@
---
title: dt_style_item_t
id: dt_style_item_t
weight: 260
draft: false
author: "people"
---
`dt_type`
An element that is part of a style.
Attributes:
* [has_tostring](../attributes#has_tostring)
# dt_style_item_t.name
`string`
The name of the style item.
# dt_style_item_t.num
`number`
The position of the style item within its style.

View file

@ -0,0 +1,44 @@
---
title: dt_style_t
id: dt_style_t
weight: 250
draft: false
author: "people"
---
`dt_type`
A style that can be applied to an image.
Attributes:
* [has_tostring](../attributes#has_tostring)
# dt_style_t.delete
see [darktable.styles.delete](../../darktable/darktable.styles#darktablestylesdelete)
# dt_style_t.duplicate
see [darktable.styles.duplicate](../../darktable/darktable.styles#darktablestylesduplicate)
# dt_style_t.apply
see [darktable.styles.apply](../../darktable/darktable.styles#darktablestylesapply)
# dt_style_t.export
see [darktable.styles.export](../../darktable/darktable.styles#darktablestylesexport)
# dt_style_t.name
`string`
The name of the style.
# dt_style_t.description
`string`
The description of the style.
# dt_style_t.#
[types.dt_style_item_t](../types/dt_style_item_t)
The different items that make the style.

View file

@ -0,0 +1,30 @@
---
title: dt_ui_container_t
id: dt_ui_container_t
weight: 330
draft: false
author: "people"
---
`enum`
A place in the darktable UI where a lib can be placed
Values:
* DT_UI_CONTAINER_PANEL_LEFT_TOP
* DT_UI_CONTAINER_PANEL_LEFT_CENTER
* DT_UI_CONTAINER_PANEL_LEFT_BOTTOM
* DT_UI_CONTAINER_PANEL_RIGHT_TOP
* DT_UI_CONTAINER_PANEL_RIGHT_CENTER
* DT_UI_CONTAINER_PANEL_RIGHT_BOTTOM
* DT_UI_CONTAINER_PANEL_TOP_LEFT
* DT_UI_CONTAINER_PANEL_TOP_CENTER
* DT_UI_CONTAINER_PANEL_TOP_RIGHT
* DT_UI_CONTAINER_PANEL_CENTER_TOP_LEFT
* DT_UI_CONTAINER_PANEL_CENTER_TOP_CENTER
* DT_UI_CONTAINER_PANEL_CENTER_TOP_RIGHT
* DT_UI_CONTAINER_PANEL_CENTER_BOTTOM_LEFT
* DT_UI_CONTAINER_PANEL_CENTER_BOTTOM_CENTER
* DT_UI_CONTAINER_PANEL_CENTER_BOTTOM_RIGHT
* DT_UI_CONTAINER_PANEL_BOTTOM

View file

@ -0,0 +1,21 @@
---
title: dt_ui_panel_t
id: dt_ui_panel_t
weight: 510
draft: false
author: "people"
---
`enum`
The different user interface panels
Values:
* DT_UI_PANEL_TOP
* DT_UI_PANEL_CENTER_TOP
* DT_UI_PANEL_CENTER_BOTTOM
* DT_UI_PANEL_LEFT
* DT_UI_PANEL_RIGHT
* DT_UI_PANEL_BOTTOM
* DT_UI_PANEL_SIZE

View file

@ -0,0 +1,19 @@
---
title: hint_t
id: hint_t
weight: 320
draft: false
author: "people"
---
`enum`
a hint on the way to encode a webp image
Values:
* hint_default
* hint_picture
* hint_photo
* hint_graphic

View file

@ -0,0 +1,32 @@
---
title: lua_box
id: lua_box
weight: 580
draft: false
author: "people"
---
`dt_type`
A container for widget in a horizontal or vertical list
Attributes:
* [has_tostring](../attributes#has_tostring)
* [parent](../attributes#parent) : [types.lua_widget](../types/lua_widget)
# lua_box.\_\_call
see [types.lua_widget.As a function](../types/lua_widget#lua_widgetas-a-function)
# lua_box.extra registration parameters
This widget has no extra registration parameters
# lua_box.orientation
[types.dt_lua_orientation_t](../types/dt_lua_orientation_t)
The orientation of the box.
Attributes:
* [write](../attributes#write)

View file

@ -0,0 +1,57 @@
---
title: lua_button
id: lua_button
weight: 570
draft: false
author: "people"
---
`dt_type`
A clickable button
Attributes:
* [has_tostring](../attributes#has_tostring)
* [parent](../attributes#parent) : [types.lua_widget](../types/lua_widget)
# lua_button.\_\_call
see [types.lua_widget.As a function](../types/lua_widget#lua_widgetas-a-function)
# lua_button.extra registration parameters
This widget has no extra registration parameters
# lua_button.label
`string`
The label displayed on the button
Attributes:
* [write](../attributes#write)
# lua_button.ellipsize
[types.dt_lua_ellipsize_mode_t](../types/dt_lua_ellipsize_mode_t)
The ellipsize mode of the button label
Attributes:
* [write](../attributes#write)
# lua_button.clicked_callback
```
function(
widget : types.lua_widget
)
```
A function to call on button click
* **widget** - _[types.lua_widget](../types/lua_widget)_ - The widget that triggered the callback
Attributes:
* [write](../attributes#write)

View file

@ -0,0 +1,58 @@
---
title: lua_check_button
id: lua_check_button
weight: 550
draft: false
author: "people"
---
`dt_type`
A checkable button with a label next to it
Attributes:
* [has_tostring](../attributes#has_tostring)
* [parent](../attributes#parent) : [types.lua_widget](../types/lua_widget)
# lua_check_button.\_\_call
see [types.lua_widget.As a function](../types/lua_widget#lua_widgetas-a-function)
# lua_check_button.extra registration parameters
This widget has no extra registration parameters
# lua_check_button.label
`string`
The label displayed next to the button
Attributes:
* [write](../attributes#write)
# lua_check_button.value
`boolean`
If the widget is checked or not
Attributes:
* [write](../attributes#write)
# lua_check_button.clicked_callback
```
function(
widget : types.lua_widget
)
```
A function to call on button click
* **widget** - _[types.lua_widget](../types/lua_widget)_ - The widget that triggered the callback
Attributes:
* [write](../attributes#write)

View file

@ -0,0 +1,97 @@
---
title: lua_combobox
id: lua_combobox
weight: 610
draft: false
author: "people"
---
`dt_type`
A widget with multiple text entries in a menu
This widget can be set as editable at construction time.
If it is editable the user can type a value and is not constrained by the values in the menu
Attributes:
* [has_tostring](../attributes#has_tostring)
* [parent](../attributes#parent) : [types.lua_widget](../types/lua_widget)
# lua_combobox.\_\_call
see [types.lua_widget.As a function](../types/lua_widget#lua_widgetas-a-function)
# lua_combobox.extra registration parameters
This widget has no extra registration parameters
# lua_combobox.value
`string`
The text content of the selected entry, can be nil
You can set it to a number to select the corresponding entry from the menu
If the combo box is editable, you can set it to any string
You can set it to nil to deselect all entries
Attributes:
* [write](../attributes#write)
# lua_combobox.selected
`integer`
The index of the selected entry, or 0 if nothing is selected
You can set it to a number to select the corresponding entry from the menu, or to 0 to
select nothing
You can set it to nil to deselect all entries
Attributes:
* [write](../attributes#write)
# lua_combobox.#
`string`
The various menu entries.
You can add new entries by writing to the first element beyond the end
You can removes entries by setting them to nil
Attributes:
* [write](../attributes#write)
# lua_combobox.changed_callback
```
function(
widget : types.lua_widget
)
```
A function to call when the value field changes (character entered or value selected)
* **widget** - _[types.lua_widget](../types/lua_widget)_ - The widget that triggered the callback
Attributes:
* [write](../attributes#write)
# lua_combobox.editable
`boolean`
True is the user is allowed to type a string in the combobox
Attributes:
* [write](../attributes#write)
# lua_combobox.label
`string`
The label displayed on the combobox
Attributes:
* [write](../attributes#write)

View file

@ -0,0 +1,36 @@
---
title: lua_container
id: lua_container
weight: 540
draft: false
author: "people"
---
`dt_type`
A widget containing other widgets
Attributes:
* [has_tostring](../attributes#has_tostring)
* [parent](../attributes#parent) : [types.lua_widget](../types/lua_widget)
# lua_container.\_\_call
see [types.lua_widget.As a function](../types/lua_widget#lua_widgetas-a-function)
# lua_container.extra registration parameters
This widget has no extra registration parameters
# lua_container.#
[types.lua_widget](../types/lua_widget)
The widgets contained by the box.
You can append widgets by adding them at the end of the list.
You can remove widgets by setting them to nil.
Attributes:
* [write](../attributes#write)

View file

@ -0,0 +1,63 @@
---
title: lua_entry
id: lua_entry
weight: 590
draft: false
author: "people"
---
`dt_type`
A widget in which the user can input text
Attributes:
* [has_tostring](../attributes#has_tostring)
* [parent](../attributes#parent) : [types.lua_widget](../types/lua_widget)
# lua_entry.\_\_call
see [types.lua_widget.As a function](../types/lua_widget#lua_widgetas-a-function)
# lua_entry.extra registration parameters
This widget has no extra registration parameters
# lua_entry.text
`string`
The content of the entry
Attributes:
* [write](../attributes#write)
# lua_entry.placeholder
`string`
The text to display when the entry is empty
Attributes:
* [write](../attributes#write)
# lua_entry.is_password
`boolean`
True if the text content should be hidden
Attributes:
* [write](../attributes#write)
# lua_entry.editable
`boolean`
False if the entry should be read-only
Attributes:
* [write](../attributes#write)

View file

@ -0,0 +1,67 @@
---
title: lua_file_chooser_button
id: lua_file_chooser_button
weight: 620
draft: false
author: "people"
---
`dt_type`
A button that allows the user to select an existing file
Attributes:
* [has_tostring](../attributes#has_tostring)
* [parent](../attributes#parent) : [types.lua_widget](../types/lua_widget)
# lua_file_chooser_button.\_\_call
see [types.lua_widget.As a function](../types/lua_widget#lua_widgetas-a-function)
# lua_file_chooser_button.extra registration parameters
This widget has no extra registration parameters
# lua_file_chooser_button.title
`string`
The title of the window when choosing a file
Attributes:
* [write](../attributes#write)
# lua_file_chooser_button.value
`string`
The currently selected file
Attributes:
* [write](../attributes#write)
# lua_file_chooser_button.changed_callback
```
function(
widget : types.lua_widget
)
```
A function to call when the value field changes \(character entered or value selected\)
* **widget** - _[types.lua_widget](../types/lua_widget)_ - The widget that triggered the callback
Attributes:
* [write](../attributes#write)
# lua_file_chooser_button.is_directory
`boolean`
True if the file chooser button only allows directories to be selected
Attributes:
* [write](../attributes#write)

View file

@ -0,0 +1,63 @@
---
title: lua_label
id: lua_label
weight: 560
draft: false
author: "people"
---
`dt_type`
A label containing some text
Attributes:
* [has_tostring](../attributes#has_tostring)
* [parent](../attributes#parent) : [types.lua_widget](../types/lua_widget)
# lua_label.\_\_call
see [types.lua_widget.As a function](../types/lua_widget#lua_widgetas-a-function)
# lua_label.extra registration parameters
This widget has no extra registration parameters
# lua_label.label
`string`
The label displayed
Attributes:
* [write](../attributes#write)
# lua_label.selectable
`boolean`
True if the label content should be selectable
Attributes:
* [write](../attributes#write)
# lua_label.halign
[types.dt_lua_align_t](../types/dt_lua_align_t)
The horizontal alignment of the label
Attributes:
* [write](../attributes#write)
# lua_label.ellipsize
[types.dt_lua_ellipsize_mode_t](../types/dt_lua_ellipsize_mode_t)
The ellipsize mode of the label
Attributes:
* [write](../attributes#write)

View file

@ -0,0 +1,18 @@
---
title: lua_os_type
id: lua_os_type
weight: 20
draft: false
author: "people"
---
enum
The type of OS we darktable can run on
Values :
* windows
* macos
* linux
* unix

View file

@ -0,0 +1,23 @@
---
title: lua_pref_type
id: lua_pref_type
weight: 380
draft: false
author: "people"
---
`enum`
The type of value to save in a preference
Values:
* enum
* directory
* file
* string
* bool
* integer
* float
* lua

View file

@ -0,0 +1,33 @@
---
title: lua_section_label
id: lua_section_label
weight: 660
draft: false
author: "people"
---
`dt_type`
A section label
Attributes:
* [has_tostring](../Attributes#has_tostring)
* [parent](../Attributes#paren) : [types.lua_widget](../types/lua_widget)
# lua_section_label.\_\_call
see [types.lua_widget.As a function](../types/lua_widget#lua_widgetas-a-function)
# types.lua_section_label.extra registration parameters
This widget has no extra registration parameters
# lua_section_label.label
`string`
The section name
Attributes:
* [write](../Attributes#write)

View file

@ -0,0 +1,32 @@
---
title: lua_separator
id: lua_separator
weight: 600
draft: false
author: "people"
---
`dt_type`
A widget providing a separation in the UI.
Attributes:
* [has_tostring](../attributes#has_tostring)
* [parent](../attributes#parent) : [types.lua_widget](../types/lua_widget)
# lua_separator.\_\_call
see [types.lua_widget.As a function](../types/lua_widget#lua_widgetas-a-function)
# lua_separator.extra registration parameters
This widget has no extra registration parameters
# lua_separator.orientation
`string`
The orientation of the separator.
Attributes:
* [write](../attributes#write)

View file

@ -0,0 +1,106 @@
---
title: lua_slider
id: lua_slider
weight: 640
draft: false
author: "people"
---
`dt_type`
A slider that can be set by the user
Attributes:
* [has_tostring](../attributes#has_tostring)
* [parent](../attributes#parent) : [types.lua_widget](../types/lua_widget)
2.63.1. types.lua_slider.\_\_call
see [types.lua_widget.As a function](../types/lua_widget#lua_widgetas-a-function)
2.63.2. types.lua_slider.extra registration parameters
This widget has no extra registration parameters
2.63.3. types.lua_slider.soft_min
`number`
The soft minimum value for the slider, the slider can't go beyond this point
Attributes:
* [write](../attributes#write)
2.63.4. types.lua_slider.soft_max
`number`
The soft maximum value for the slider, the slider can't go beyond this point
Attributes:
* [write](../attributes#write)
2.63.5. types.lua_slider.hard_min
`number`
The hard minimum value for the slider, the user can't manually enter a value beyond this
point
Attributes:
* [write](../attributes#write)
2.63.6. types.lua_slider.hard_max
`number`
The hard maximum value for the slider, the user can't manually enter a value beyond this
point
Attributes:
* [write](../attributes#write)
2.63.7. types.lua_slider.step
`number`
The step width of the slider
Attributes:
* [write](../attributes#write)
2.63.8. types.lua_slider.digits
`integer`
The number of decimal digits shown on the slider
Attributes:
* [write](../attributes#write)
2.63.9. types.lua_slider.value
`number`
The current value of the slider
Attributes:
* [write](../attributes#write)
2.63.10. types.lua_slider.label
`string`
The label next to the slider
Attributes:
* [write](../attributes#write)

View file

@ -0,0 +1,54 @@
---
title: lua_stack
id: lua_stack
weight: 630
draft: false
author: "people"
---
`dt_type`
A container that will only show one of its child at a time
Attributes:
* [has_tostring](../attributes#has_tostring)
* [parent](../attributes#parent) : [types.lua_widget](../types/lua_widget)
# lua_stack.\_\_call
see [types.lua_widget.As a function](../types/lua_widget#lua_widgetas-a-function)
# lua_stack.extra registration parameters
This widget has no extra registration parameters
# lua_stack.active
[types.lua_widget](../types/lua_widget) or nil
The currently selected child, can be nil if the container has no child, can be set to one of
the child widget or to an index in the child table
Attributes:
* [write](../attributes#write)
# lua_stack.h_size_fixed
`boolean`
True if horizontal size is fixed, false if stack can be resized horizontally.
Attributes:
* [write](../attributes#write)
# lua_stack.v_size_fixed
`boolean`
True if vertical size is fixed, false if stack can be resized vertically.
Attributes:
* [write](../attributes#write)

View file

@ -0,0 +1,41 @@
---
title: lua_text_view
id: lua_text_view
weight: 650
draft: false
author: "people"
---
`dt_type`
A multiline text input widget
Attributes:
* [has_tostring](../attributes#has_tostring)
* [parent](../attributes#parent) : [types.lua_widget](../types/lua_widget)
# lua_text_view.\_\_call
see [types.lua_widget.As a function](../types/lua_widget#lua_widgetas-a-function)
# lua_text_view.extra registration parameters
This widget has no extra registration parameters
# lua_text_view.text
`string`
The text in the widget
Attributes:
* [write](../attributes#write)
# lua_text_view.editable
`boolean`
False if the entry should be read-only
Attributes:
* [write](../attributes#write)

Some files were not shown because too many files have changed in this diff Show more