Ansel 0.0
A darktable fork - bloat + design vision
Loading...
Searching...
No Matches
monochrome.c File Reference
#include "bauhaus/bauhaus.h"
#include "common/bilateral.h"
#include "common/bilateralcl.h"
#include "common/colorspaces.h"
#include "common/math.h"
#include "common/opencl.h"
#include "control/control.h"
#include "develop/develop.h"
#include "develop/imageop.h"
#include "develop/imageop_gui.h"
#include "develop/tiling.h"
#include "dtgtk/drawingarea.h"
#include "gui/color_picker_proxy.h"
#include "gui/gtk.h"
#include "gui/presets.h"
#include "iop/iop_api.h"
#include <assert.h>
#include <stdlib.h>
#include <string.h>
+ Include dependency graph for monochrome.c:

Go to the source code of this file.

Data Structures

struct  dt_iop_monochrome_params_t
 
struct  dt_iop_monochrome_data_t
 
struct  dt_iop_monochrome_gui_data_t
 

Macros

#define DT_COLORCORRECTION_INSET   DT_PIXEL_APPLY_DPI(5)
 
#define DT_COLORCORRECTION_MAX   40.
 
#define PANEL_WIDTH   256.0f
 

Typedefs

typedef struct dt_iop_monochrome_params_t dt_iop_monochrome_params_t
 
typedef struct dt_iop_monochrome_data_t dt_iop_monochrome_data_t
 
typedef struct dt_iop_monochrome_gui_data_t dt_iop_monochrome_gui_data_t
 

Functions

const char * name ()
 
int default_group ()
 
int flags ()
 
int default_colorspace (dt_iop_module_t *self, dt_dev_pixelpipe_t *pipe, const dt_dev_pixelpipe_iop_t *piece)
 
void input_format (dt_iop_module_t *self, dt_dev_pixelpipe_t *pipe, dt_dev_pixelpipe_iop_t *piece, dt_iop_buffer_dsc_t *dsc)
 
const char ** description (struct dt_iop_module_t *self)
 
int legacy_params (dt_iop_module_t *self, const void *const old_params, const int old_version, void *new_params, const int new_version)
 
void init_presets (dt_iop_module_so_t *self)
 
static __attribute__ ((always_inline))
 
__DT_CLONE_TARGETS__ int process (struct dt_iop_module_t *self, const dt_dev_pixelpipe_t *pipe, const dt_dev_pixelpipe_iop_t *piece, const void *const i, void *const o)
 
void tiling_callback (struct dt_iop_module_t *self, const struct dt_dev_pixelpipe_t *pipe, const struct dt_dev_pixelpipe_iop_t *piece, struct dt_develop_tiling_t *tiling)
 
void commit_params (struct dt_iop_module_t *self, dt_iop_params_t *p1, dt_dev_pixelpipe_t *pipe, dt_dev_pixelpipe_iop_t *piece)
 
void gui_update (struct dt_iop_module_t *self)
 Refresh GUI controls from current params and configuration.
 
void init_pipe (struct dt_iop_module_t *self, dt_dev_pixelpipe_t *pipe, dt_dev_pixelpipe_iop_t *piece)
 
void cleanup_pipe (struct dt_iop_module_t *self, dt_dev_pixelpipe_t *pipe, dt_dev_pixelpipe_iop_t *piece)
 
static gboolean dt_iop_monochrome_draw (GtkWidget *widget, cairo_t *crf, gpointer user_data)
 
void color_picker_apply (dt_iop_module_t *self, GtkWidget *picker, dt_dev_pixelpipe_t *pipe, dt_dev_pixelpipe_iop_t *piece)
 
static gboolean dt_iop_monochrome_motion_notify (GtkWidget *widget, GdkEventMotion *event, gpointer user_data)
 
static gboolean dt_iop_monochrome_button_press (GtkWidget *widget, GdkEventButton *event, gpointer user_data)
 
static gboolean dt_iop_monochrome_button_release (GtkWidget *widget, GdkEventButton *event, gpointer user_data)
 
static gboolean dt_iop_monochrome_leave_notify (GtkWidget *widget, GdkEventCrossing *event, gpointer user_data)
 
static gboolean dt_iop_monochrome_scrolled (GtkWidget *widget, GdkEventScroll *event, gpointer user_data)
 
void gui_init (struct dt_iop_module_t *self)
 
void gui_cleanup (struct dt_iop_module_t *self)
 

Macro Definition Documentation

◆ DT_COLORCORRECTION_INSET

#define DT_COLORCORRECTION_INSET   DT_PIXEL_APPLY_DPI(5)

Definition at line 77 of file monochrome.c.

◆ DT_COLORCORRECTION_MAX

#define DT_COLORCORRECTION_MAX   40.

Definition at line 78 of file monochrome.c.

◆ PANEL_WIDTH

#define PANEL_WIDTH   256.0f

Definition at line 79 of file monochrome.c.

Typedef Documentation

◆ dt_iop_monochrome_data_t

◆ dt_iop_monochrome_gui_data_t

◆ dt_iop_monochrome_params_t

Function Documentation

◆ __attribute__()

static __attribute__ ( (always_inline)  )
inlinestatic

Definition at line 178 of file monochrome.c.

References CLAMPS, and size.

◆ cleanup_pipe()

void cleanup_pipe ( struct dt_iop_module_t self,
dt_dev_pixelpipe_t pipe,
dt_dev_pixelpipe_iop_t piece 
)

Definition at line 302 of file monochrome.c.

References dt_dev_pixelpipe_iop_t::data, and dt_free_align.

◆ color_picker_apply()

◆ commit_params()

◆ default_colorspace()

int default_colorspace ( dt_iop_module_t self,
dt_dev_pixelpipe_t pipe,
const dt_dev_pixelpipe_iop_t piece 
)

Definition at line 117 of file monochrome.c.

References IOP_CS_LAB.

◆ default_group()

int default_group ( )

Definition at line 107 of file monochrome.c.

References IOP_GROUP_EFFECTS.

◆ description()

const char ** description ( struct dt_iop_module_t self)

Definition at line 130 of file monochrome.c.

References dt_iop_set_description().

◆ dt_iop_monochrome_button_press()

static gboolean dt_iop_monochrome_button_press ( GtkWidget widget,
GdkEventButton *  event,
gpointer  user_data 
)
static

◆ dt_iop_monochrome_button_release()

static gboolean dt_iop_monochrome_button_release ( GtkWidget widget,
GdkEventButton *  event,
gpointer  user_data 
)
static

◆ dt_iop_monochrome_draw()

static gboolean dt_iop_monochrome_draw ( GtkWidget widget,
cairo_t *  crf,
gpointer  user_data 
)
static

◆ dt_iop_monochrome_leave_notify()

static gboolean dt_iop_monochrome_leave_notify ( GtkWidget widget,
GdkEventCrossing *  event,
gpointer  user_data 
)
static

Definition at line 463 of file monochrome.c.

References g, dt_iop_module_t::gui_data, TRUE, and dt_iop_module_t::widget.

Referenced by gui_init().

◆ dt_iop_monochrome_motion_notify()

static gboolean dt_iop_monochrome_motion_notify ( GtkWidget widget,
GdkEventMotion *  event,
gpointer  user_data 
)
static

◆ dt_iop_monochrome_scrolled()

static gboolean dt_iop_monochrome_scrolled ( GtkWidget widget,
GdkEventScroll *  event,
gpointer  user_data 
)
static

◆ flags()

◆ gui_cleanup()

void gui_cleanup ( struct dt_iop_module_t self)

Definition at line 525 of file monochrome.c.

References g, dt_iop_module_t::gui_data, and IOP_GUI_FREE.

◆ gui_init()

◆ gui_update()

void gui_update ( struct dt_iop_module_t self)

Refresh GUI controls from current params and configuration.

Todo:
check why needed
Todo:
by hand

Definition at line 290 of file monochrome.c.

References FALSE, g, and dt_iop_module_t::gui_data.

◆ init_pipe()

void init_pipe ( struct dt_iop_module_t self,
dt_dev_pixelpipe_t pipe,
dt_dev_pixelpipe_iop_t piece 
)

◆ init_presets()

◆ input_format()

◆ legacy_params()

int legacy_params ( dt_iop_module_t self,
const void *const  old_params,
const int  old_version,
void new_params,
const int  new_version 
)

Definition at line 139 of file monochrome.c.

References dt_iop_monochrome_params_t::highlights.

◆ name()

const char * name ( )

Definition at line 102 of file monochrome.c.

◆ process()

◆ tiling_callback()

void tiling_callback ( struct dt_iop_module_t self,
const struct dt_dev_pixelpipe_t pipe,
const struct dt_dev_pixelpipe_iop_t piece,
struct dt_develop_tiling_t tiling 
)