コード例 #1
0
ファイル: colorcontrast.c プロジェクト: munialabs/openPablo
/** gui callbacks, these are needed. */
void gui_update    (dt_iop_module_t *self)
{
  // let gui slider match current parameters:
  dt_iop_colorcontrast_gui_data_t *g = (dt_iop_colorcontrast_gui_data_t *)self->gui_data;
  dt_iop_colorcontrast_params_t *p = (dt_iop_colorcontrast_params_t *)self->params;
  dtgtk_slider_set_value(g->a_scale, p->a_steepness);
  dtgtk_slider_set_value(g->b_scale, p->b_steepness);
}
コード例 #2
0
ファイル: profile_gamma.c プロジェクト: amitkr/darktable
void gui_update(struct dt_iop_module_t *self)
{
  dt_iop_module_t *module = (dt_iop_module_t *)self;
  dt_iop_profile_gamma_gui_data_t *g = (dt_iop_profile_gamma_gui_data_t *)self->gui_data;
  dt_iop_profile_gamma_params_t *p = (dt_iop_profile_gamma_params_t *)module->params;
  dtgtk_slider_set_value(g->scale1, p->linear);
  dtgtk_slider_set_value(g->scale2, p->gamma);
}
コード例 #3
0
ファイル: clahe.c プロジェクト: AntonSh/darktable
void gui_update(struct dt_iop_module_t *self)
{
  dt_iop_module_t *module = (dt_iop_module_t *)self;
  dt_iop_rlce_gui_data_t *g = (dt_iop_rlce_gui_data_t *)self->gui_data;
  dt_iop_rlce_params_t *p = (dt_iop_rlce_params_t *)module->params;
  dtgtk_slider_set_value(g->scale1, p->radius);
  dtgtk_slider_set_value(g->scale2, p->slope);
}
コード例 #4
0
ファイル: grain.c プロジェクト: munialabs/openPablo
void gui_update(struct dt_iop_module_t *self)
{
  dt_iop_module_t *module = (dt_iop_module_t *)self;
  dt_iop_grain_gui_data_t *g = (dt_iop_grain_gui_data_t *)self->gui_data;
  dt_iop_grain_params_t *p = (dt_iop_grain_params_t *)module->params;

  dtgtk_slider_set_value(g->scale1, p->scale*53.3);
  dtgtk_slider_set_value(g->scale2, p->strength);
}
コード例 #5
0
void gui_update(struct dt_iop_module_t *self)
{
  dt_iop_module_t *module = (dt_iop_module_t *)self;
  dt_iop_exposure_gui_data_t *g = (dt_iop_exposure_gui_data_t *)self->gui_data;
  dt_iop_exposure_params_t *p = (dt_iop_exposure_params_t *)module->params;
  dtgtk_slider_set_value(g->black, p->black);
  dtgtk_slider_set_value(g->exposure, p->exposure);
  // dtgtk_slider_set_value(g->scale3, p->gain);
}
コード例 #6
0
ファイル: anlfyeni.c プロジェクト: rharrison10/darktable
/** gui callbacks, these are needed. */
void gui_update    (dt_iop_module_t *self)
{
    // let gui slider match current parameters:
    dt_iop_anlfyeni_gui_data_t *g = (dt_iop_anlfyeni_gui_data_t *)self->gui_data;
    dt_iop_anlfyeni_params_t *p = (dt_iop_anlfyeni_params_t *)self->params;
    dtgtk_slider_set_value(g->scale1, p->alpha);
    dtgtk_slider_set_value(g->scale2, p->scale);
    dtgtk_slider_set_value(g->scale3, p->strength);
}
コード例 #7
0
ファイル: shrecovery.c プロジェクト: jimmy1977/darktable
void gui_update(struct dt_iop_module_t *self)
{
  dt_iop_module_t *module = (dt_iop_module_t *)self;
  dt_iop_shrecovery_gui_data_t *g = (dt_iop_shrecovery_gui_data_t *)self->gui_data;
  dt_iop_shrecovery_params_t *p = (dt_iop_shrecovery_params_t *)module->params;
  dtgtk_slider_set_value(g->scale1, p->strength);
  dtgtk_slider_set_value(g->scale2, p->mu);
  dtgtk_slider_set_value(g->scale3, p->sigma);
  dtgtk_slider_set_value(g->scale4, p->size_limit);
}
コード例 #8
0
ファイル: channelmixer.c プロジェクト: munialabs/openPablo
void gui_update(struct dt_iop_module_t *self)
{
  dt_iop_module_t *module = (dt_iop_module_t *)self;
  dt_iop_channelmixer_gui_data_t *g = (dt_iop_channelmixer_gui_data_t *)self->gui_data;
  dt_iop_channelmixer_params_t *p = (dt_iop_channelmixer_params_t *)module->params;
// gtk_combo_box_set_active(g->combo1, p->output_channel);
  dtgtk_slider_set_value(g->scale1, p->red[ gtk_combo_box_get_active( g->combo1 ) ] );
  dtgtk_slider_set_value(g->scale2, p->green[ gtk_combo_box_get_active( g->combo1 ) ] );
  dtgtk_slider_set_value(g->scale3, p->blue[ gtk_combo_box_get_active( g->combo1 ) ] );
}
コード例 #9
0
ファイル: watermark.c プロジェクト: bgK/darktable
void gui_update(struct dt_iop_module_t *self)
{
  dt_iop_module_t *module = (dt_iop_module_t *)self;
  dt_iop_watermark_gui_data_t *g = (dt_iop_watermark_gui_data_t *)self->gui_data;
  dt_iop_watermark_params_t *p = (dt_iop_watermark_params_t *)module->params;
  dtgtk_slider_set_value(g->scale1, p->opacity);
  dtgtk_slider_set_value(g->scale2, p->scale);
  dtgtk_slider_set_value(g->scale3, p->xoffset);
  dtgtk_slider_set_value(g->scale4, p->yoffset);
  gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON(g->dtba[ p->alignment ]), TRUE);
  _combo_box_set_active_text( g->combobox1, p->filename );
}
コード例 #10
0
ファイル: channelmixer.c プロジェクト: munialabs/openPablo
static void
output_callback(GtkComboBox *combo, gpointer user_data)
{
  dt_iop_module_t *self = (dt_iop_module_t *)user_data;
  if(self->dt->gui->reset) return;
  dt_iop_channelmixer_params_t *p = (dt_iop_channelmixer_params_t *)self->params;
  dt_iop_channelmixer_gui_data_t *g = (dt_iop_channelmixer_gui_data_t *)self->gui_data;

  // p->output_channel= gtk_combo_box_get_active(combo);
  dtgtk_slider_set_value( g->scale1, p->red[ gtk_combo_box_get_active( g->combo1 ) ] );
  dtgtk_slider_set_value( g->scale2, p->green[ gtk_combo_box_get_active( g->combo1 ) ] );
  dtgtk_slider_set_value( g->scale3, p->blue[ gtk_combo_box_get_active( g->combo1 ) ] );
  //dt_dev_add_history_item(darktable.develop, self, TRUE);
}
コード例 #11
0
ファイル: relight.c プロジェクト: munialabs/openPablo
void gui_update(struct dt_iop_module_t *self)
{
  dt_iop_module_t *module = (dt_iop_module_t *)self;

  self->request_color_pick = 0;
  self->color_picker_box[0] = self->color_picker_box[1] = .25f;
  self->color_picker_box[2] = self->color_picker_box[3] = .75f;
  self->color_picker_point[0] = self->color_picker_point[1] = 0.5f;


  dt_iop_relight_gui_data_t *g = (dt_iop_relight_gui_data_t *)self->gui_data;
  dt_iop_relight_params_t *p = (dt_iop_relight_params_t *)module->params;
  dtgtk_slider_set_value (g->scale1, p->ev);
  dtgtk_slider_set_value (g->scale2, p->width);
  dtgtk_gradient_slider_set_value(g->gslider1,p->center);
}
コード例 #12
0
ファイル: lowlight.c プロジェクト: munialabs/openPablo
void gui_update(struct dt_iop_module_t *self)
{
  dt_iop_lowlight_gui_data_t *g = (dt_iop_lowlight_gui_data_t *)self->gui_data;
  dt_iop_lowlight_params_t *p = (dt_iop_lowlight_params_t *)self->params;
  dtgtk_slider_set_value(g->scale_blueness, p->blueness);
  gtk_widget_queue_draw(self->widget);
}
コード例 #13
0
ファイル: vibrance.c プロジェクト: munialabs/openPablo
void gui_update(struct dt_iop_module_t *self)
{
  dt_iop_module_t *module = (dt_iop_module_t *)self;
  dt_iop_vibrance_gui_data_t *g = (dt_iop_vibrance_gui_data_t *)self->gui_data;
  dt_iop_vibrance_params_t *p = (dt_iop_vibrance_params_t *)module->params;
  dtgtk_slider_set_value(g->amount_scale, p->amount);
}
コード例 #14
0
ファイル: useless.c プロジェクト: munialabs/openPablo
/** gui callbacks, these are needed. */
void gui_update    (dt_iop_module_t *self)
{
  // let gui slider match current parameters:
  dt_iop_useless_gui_data_t *g = (dt_iop_useless_gui_data_t *)self->gui_data;
  dt_iop_useless_params_t *p = (dt_iop_useless_params_t *)self->params;
  dtgtk_slider_set_value(g->scale, p->checker_scale);
}
コード例 #15
0
ファイル: slider.c プロジェクト: angryziber/darktable
static void _slider_entry_commit(GtkDarktableSlider *slider)
{
  gtk_widget_hide( slider->entry );
  gdouble value=atof(gtk_entry_get_text(GTK_ENTRY(slider->entry)));
  slider->is_entry_active=FALSE;
  dtgtk_slider_set_value(slider,value);
  gtk_widget_queue_draw(GTK_WIDGET(slider));
}
コード例 #16
0
ファイル: jpeg.c プロジェクト: CaptainSifff/darktable
int set_params(dt_imageio_module_format_t *self, const void *params, const int size)
{
  if(size != self->params_size(self)) return 1;
  dt_imageio_jpeg_t *d = (dt_imageio_jpeg_t *)params;
  dt_imageio_jpeg_gui_data_t *g = (dt_imageio_jpeg_gui_data_t *)self->gui_data;
  dtgtk_slider_set_value(g->quality, d->quality);
  return 0;
}
コード例 #17
0
ファイル: j2k.c プロジェクト: bleader/darktable
int
set_params(dt_imageio_module_format_t *self, void *params, int size)
{
  if(size != sizeof(dt_imageio_j2k_t)) return 1;
  dt_imageio_j2k_t *d = (dt_imageio_j2k_t *)params;
  dt_imageio_j2k_gui_t *g = (dt_imageio_j2k_gui_t *)self->gui_data;
  if(d->format == JP2_CFMT) gtk_toggle_button_set_active(g->jp2, TRUE);
  else                      gtk_toggle_button_set_active(g->j2k, TRUE);
  gtk_combo_box_set_active(g->preset, d->preset);
  dtgtk_slider_set_value(g->quality, d->quality);
  return 0;
}
コード例 #18
0
ファイル: colorize.c プロジェクト: bgK/darktable
void gui_update(struct dt_iop_module_t *self)
{
  dt_iop_module_t *module = (dt_iop_module_t *)self;
  dt_iop_colorize_gui_data_t *g = (dt_iop_colorize_gui_data_t *)self->gui_data;
  dt_iop_colorize_params_t *p = (dt_iop_colorize_params_t *)module->params;

  dtgtk_gradient_slider_set_value(g->gslider1,p->hue);
  dtgtk_gradient_slider_set_value(g->gslider2,p->saturation);
  dtgtk_slider_set_value(g->scale1, p->lightness);
  dtgtk_slider_set_value(g->scale2, p->source_lightness_mix);

  float color[3];
  hsl2rgb(color,p->hue,p->saturation,0.5);

  GdkColor c;
  c.red=color[0]*65535.0;
  c.green=color[1]*65535.0;
  c.blue=color[2]*65535.0;

  gtk_widget_modify_fg(GTK_WIDGET(g->colorpick1),GTK_STATE_NORMAL,&c);
}
コード例 #19
0
ファイル: j2k.c プロジェクト: bleader/darktable
// TODO: some quality/compression stuff in case "off" is selected
void gui_init(dt_imageio_module_format_t *self)
{
  dt_imageio_j2k_gui_t *gui = (dt_imageio_j2k_gui_t *)malloc(sizeof(dt_imageio_j2k_gui_t));
  self->gui_data = (void *)gui;
  self->widget = gtk_vbox_new(TRUE, 5);
  GtkWidget *hbox = gtk_hbox_new(TRUE, 5);
  gtk_box_pack_start(GTK_BOX(self->widget), hbox, TRUE, TRUE, 0);

  int format_last  = dt_conf_get_int("plugins/imageio/format/j2k/format");
  int preset_last  = dt_conf_get_int("plugins/imageio/format/j2k/preset");
  int quality_last = dt_conf_get_int("plugins/imageio/format/j2k/quality");

  GtkWidget *radiobutton = gtk_radio_button_new_with_label(NULL, _("jp2"));
  gui->jp2 = GTK_TOGGLE_BUTTON(radiobutton);
  gtk_box_pack_start(GTK_BOX(hbox), radiobutton, TRUE, TRUE, 0);
  g_signal_connect(G_OBJECT(radiobutton), "toggled", G_CALLBACK(radiobutton_changed), (gpointer)JP2_CFMT);
  if(format_last == JP2_CFMT) gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(radiobutton), TRUE);
  radiobutton = gtk_radio_button_new_with_label_from_widget(GTK_RADIO_BUTTON(radiobutton), _("j2k"));
  gui->j2k = GTK_TOGGLE_BUTTON(radiobutton);
  gtk_box_pack_start(GTK_BOX(hbox), radiobutton, TRUE, TRUE, 0);
  g_signal_connect(G_OBJECT(radiobutton), "toggled", G_CALLBACK(radiobutton_changed), (gpointer)J2K_CFMT);
  if(format_last == J2K_CFMT) gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(radiobutton), TRUE);

  gui->quality = DTGTK_SLIDER(dtgtk_slider_new_with_range(DARKTABLE_SLIDER_BAR, 1, 100, 1, 97, 0));
  dtgtk_slider_set_label(gui->quality,_("quality"));
  dtgtk_slider_set_default_value(gui->quality, 97);
  if(quality_last > 0 && quality_last <= 100)
    dtgtk_slider_set_value(gui->quality, quality_last);
  gtk_box_pack_start(GTK_BOX(self->widget), GTK_WIDGET(gui->quality), TRUE, TRUE, 0);
  g_signal_connect (G_OBJECT (gui->quality), "value-changed", G_CALLBACK (quality_changed), (gpointer)0);

  hbox = gtk_hbox_new(FALSE, 5);
  gtk_box_pack_start(GTK_BOX(self->widget), hbox, TRUE, TRUE, 0);
  GtkWidget *label = gtk_label_new(_("dcp mode"));
  gtk_misc_set_alignment(GTK_MISC(label), 0.0, 0.5);
  gtk_box_pack_start(GTK_BOX(hbox), label, TRUE, TRUE, 0);
  GtkWidget *combo = gtk_combo_box_new_text();
  gui->preset = GTK_COMBO_BOX(combo);
  gtk_combo_box_append_text(GTK_COMBO_BOX(combo), _("off"));
  gtk_combo_box_append_text(GTK_COMBO_BOX(combo), _("cinema2k, 24fps"));
  gtk_combo_box_append_text(GTK_COMBO_BOX(combo), _("cinema2k, 48fps"));
  gtk_combo_box_append_text(GTK_COMBO_BOX(combo), _("cinema4k, 24fps"));
  gtk_combo_box_set_active(GTK_COMBO_BOX(combo), preset_last);
  gtk_box_pack_start(GTK_BOX(hbox), combo, TRUE, TRUE, 0);
  g_signal_connect(G_OBJECT(combo), "changed", G_CALLBACK(combobox_changed), NULL);

  // TODO: options for "off"
}
コード例 #20
0
static void exposure_set_white(struct dt_iop_module_t *self, const float white)
{
  dt_iop_exposure_params_t *p = (dt_iop_exposure_params_t *)self->params;

  float exposure = white2exposure(white);
  if (p->exposure == exposure) return;

  p->exposure = exposure;
  if (p->black >= white) exposure_set_black(self, white-0.01);

  dt_iop_exposure_gui_data_t *g = (dt_iop_exposure_gui_data_t *)self->gui_data;

  darktable.gui->reset = 1;
  dtgtk_slider_set_value(DTGTK_SLIDER(g->exposure), p->exposure);
  darktable.gui->reset = 0;
  dt_dev_add_history_item(darktable.develop, self, TRUE);
}
コード例 #21
0
static void exposure_set_black(struct dt_iop_module_t *self, const float black)
{
  dt_iop_exposure_params_t *p = (dt_iop_exposure_params_t *)self->params;

  float b = black;
  if (p->black == b) return;

  p->black = b;
  if (p->black >= exposure2white(p->exposure))
  {
    exposure_set_white(self, p->black+0.01);
  }

  dt_iop_exposure_gui_data_t *g = (dt_iop_exposure_gui_data_t *)self->gui_data;
  darktable.gui->reset = 1;
  dtgtk_slider_set_value(DTGTK_SLIDER(g->black), p->black);
  darktable.gui->reset = 0;
  dt_dev_add_history_item(darktable.develop, self, TRUE);
}
コード例 #22
0
ファイル: jpeg.c プロジェクト: fgrollier/darktable
void gui_reset (dt_imageio_module_format_t *self)
{
  dt_imageio_jpeg_gui_data_t *g = (dt_imageio_jpeg_gui_data_t *)self->gui_data;
  dtgtk_slider_set_value(g->quality, dt_conf_get_int("plugins/imageio/format/jpeg/quality"));
}