![]() |
Ansel 0.0
A darktable fork - bloat + design vision
|
#include "bauhaus/bauhaus.h"
#include "develop/imageop.h"
#include "develop/imageop_gui.h"
#include "gui/color_picker_proxy.h"
#include "gui/gtk.h"
#include "iop/iop_api.h"
#include <gtk/gtk.h>
#include <stdlib.h>
Data Structures | |
struct | dt_iop_useless_params_t |
struct | dt_iop_useless_gui_data_t |
struct | dt_iop_useless_global_data_t |
Typedefs | |
typedef enum dt_iop_useless_type_t | dt_iop_useless_type_t |
typedef struct dt_iop_useless_params_t | dt_iop_useless_params_t |
typedef struct dt_iop_useless_gui_data_t | dt_iop_useless_gui_data_t |
typedef struct dt_iop_useless_global_data_t | dt_iop_useless_global_data_t |
Enumerations | |
enum | dt_iop_useless_type_t { DT_USELESS_NONE = 0 , DT_USELESS_FIRST = 1 , DT_USELESS_SECOND = 2 } |
Variables | |
static const int | mask_id = 1 |
static const char * | mask_name = "useless checkerboard" |
typedef struct dt_iop_useless_global_data_t dt_iop_useless_global_data_t |
typedef struct dt_iop_useless_gui_data_t dt_iop_useless_gui_data_t |
typedef struct dt_iop_useless_params_t dt_iop_useless_params_t |
typedef enum dt_iop_useless_type_t dt_iop_useless_type_t |
Enumerator | |
---|---|
DT_USELESS_NONE | |
DT_USELESS_FIRST | |
DT_USELESS_SECOND |
void cleanup | ( | dt_iop_module_t * | module | ) |
References dt_iop_module_t::default_params, and dt_iop_module_t::params.
void cleanup_global | ( | dt_iop_module_so_t * | module | ) |
References dt_iop_module_so_t::data.
void color_picker_apply | ( | dt_iop_module_t * | self, |
GtkWidget * | picker, | ||
dt_dev_pixelpipe_iop_t * | piece | ||
) |
void commit_params | ( | dt_iop_module_t * | self, |
dt_iop_params_t * | p1, | ||
dt_dev_pixelpipe_t * | pipe, | ||
dt_dev_pixelpipe_iop_t * | piece | ||
) |
int default_colorspace | ( | dt_iop_module_t * | self, |
dt_dev_pixelpipe_t * | pipe, | ||
dt_dev_pixelpipe_iop_t * | piece | ||
) |
References IOP_CS_RGB.
int default_group | ( | ) |
References IOP_GROUP_TECHNICAL.
|
static |
Put your local callbacks here, be sure to make them static so they won't be visible outside this file!
References darktable, darktable_t::develop, dt_bauhaus_slider_get(), dt_bauhaus_slider_set(), dt_dev_add_history_item, darktable_t::gui, dt_iop_module_t::gui_data, dt_iop_module_t::params, dt_gui_gtk_t::reset, and TRUE.
Referenced by gui_init().
int flags | ( | ) |
References IOP_FLAGS_INCLUDE_IN_STYLES, and IOP_FLAGS_SUPPORTS_BLENDING.
gboolean force_enable | ( | struct dt_iop_module_t * | self, |
const gboolean | current_state | ||
) |
Optional: if this module is required to handle some type of image or incompatible with some other, here is the opportunity to forcefully enable/disable it to protect users from themselves when applying styles or copy-pasting histories. Return corrected enabled state, which might be the unaffected current_state if valid.
References dt_iop_module_t::dev, dt_image_is_raw(), dt_iop_module_t::enabled, FALSE, dt_develop_t::image_storage, and TRUE.
void gui_changed | ( | dt_iop_module_t * | self, |
GtkWidget * | w, | ||
void * | previous | ||
) |
optional gui callbacks.
References DT_USELESS_SECOND, dt_iop_module_t::gui_data, and dt_iop_module_t::params.
Referenced by gui_update().
void gui_cleanup | ( | dt_iop_module_t * | self | ) |
References IOP_GUI_FREE.
void gui_init | ( | dt_iop_module_t * | self | ) |
References darktable_t::bauhaus, darktable, dt_bauhaus_combobox_from_params(), dt_bauhaus_slider_from_params(), dt_bauhaus_slider_new_with_range(), dt_bauhaus_slider_set_digits(), dt_bauhaus_slider_set_factor(), dt_bauhaus_slider_set_format(), dt_bauhaus_slider_set_offset(), dt_bauhaus_slider_set_soft_range(), dt_bauhaus_slider_set_step(), DT_BAUHAUS_SPACE, dt_bauhaus_toggle_from_params(), dt_bauhaus_widget_set_label(), DT_COLOR_PICKER_AREA, dt_color_picker_new(), DT_GUI_MODULE, extra_callback(), IOP_GUI_ALLOC, TRUE, and dt_iop_module_t::widget.
void gui_update | ( | dt_iop_module_t * | self | ) |
gui setup and update, these are needed.
References dt_bauhaus_combobox_set_from_value(), dt_bauhaus_slider_set(), gui_changed(), dt_iop_module_t::gui_data, and dt_iop_module_t::params.
void init | ( | dt_iop_module_t * | module | ) |
Optional init and cleanup
References dt_iop_default_init().
void init_global | ( | dt_iop_module_so_t * | module | ) |
int legacy_params | ( | dt_iop_module_t * | self, |
const void *const | old_params, | ||
const int | old_version, | ||
void * | new_params, | ||
const int | new_version | ||
) |
References DT_USELESS_SECOND, factor, and FALSE.
const char * name | ( | ) |
void process | ( | struct dt_iop_module_t * | self, |
dt_dev_pixelpipe_iop_t * | piece, | ||
const void *const | ivoid, | ||
void *const | ovoid, | ||
const dt_iop_roi_t *const | roi_in, | ||
const dt_iop_roi_t *const | roi_out | ||
) |
modify regions of interest (optional, per pixel ops don't need this) modify a mask according to the pixel shifts the module applies (optional, per-pixel ops don't need this) process, all real work is done here. NOTE: process() must never use the Gtk+ API. All GUI modifications must be done in the Gtk+ thread. This is to be conducted in gui_update or gui_changed. If process detect a state and something it to be change on the UI a signal should be used (raise a signal here) and a corresponding callback must be connected to this signal.
References dt_iop_useless_params_t::checker_scale, dt_dev_pixelpipe_iop_t::colors, copy_pixel(), dt_dev_pixelpipe_iop_t::data, DT_IMGSZ_CLEARBUF, DT_IMGSZ_FULL, DT_IMGSZ_OUTPUT, dt_iop_alloc_image_buffers(), dt_iop_copy_image_roi(), dt_iop_have_required_input_format(), dt_iop_is_raster_mask_used(), dt_iop_useless_params_t::factor, for_each_channel, dt_iop_module_t::gui_data, dt_iop_roi_t::height, dt_dev_pixelpipe_iop_t::iscale, mask_id, dt_dev_pixelpipe_iop_t::pipe, dt_dev_pixelpipe_iop_t::raster_masks, dt_iop_roi_t::scale, TRUE, dt_iop_roi_t::width, dt_iop_roi_t::x, and dt_iop_roi_t::y.
void reload_defaults | ( | dt_iop_module_t * | module | ) |
optional: if this exists, it will be called to init new defaults if a new image is loaded from film strip mode.
References dt_iop_useless_params_t::checker_scale, dt_iop_module_t::default_params, dt_iop_module_t::dev, dt_bauhaus_slider_set_default(), dt_image_is_raw(), dt_iop_module_t::gui_data, and dt_develop_t::image_storage.
|
static |
Referenced by add_mask_entries_to_db(), commit_params(), dt_develop_blend_legacy_params(), dt_set_xmp_dt_history(), process(), and read_masks().
|
static |
Referenced by commit_params(), dt_set_xmp_dt_history(), and read_masks().