Ephoto: Clean up/organize code to get ready for release. Use a pane widget for the thumbnail view. Use raise() to work around genlist bug.

master
Stephen okra Houston 7 years ago
parent c47ebd4c4a
commit a6aee9555b
  1. 7
      src/bin/ephoto.h
  2. 12
      src/bin/ephoto_bcg.c
  3. 10
      src/bin/ephoto_color.c
  4. 267
      src/bin/ephoto_config.c
  5. 44
      src/bin/ephoto_cropper.c
  6. 14
      src/bin/ephoto_filters.c
  7. 10
      src/bin/ephoto_hsv.c
  8. 5
      src/bin/ephoto_main.c
  9. 10
      src/bin/ephoto_red_eye.c
  10. 837
      src/bin/ephoto_single_browser.c
  11. 2
      src/bin/ephoto_thumb.c
  12. 3798
      src/bin/ephoto_thumb_browser.c

@ -76,9 +76,9 @@ void ephoto_single_browser_path_pending_set(Evas_Object *obj,
void ephoto_single_browser_path_pending_unset(Evas_Object *obj);
void ephoto_single_browser_path_created(Evas_Object *obj, Ephoto_Entry *entry);
void ephoto_single_browser_image_data_update(Evas_Object *main,
Evas_Object *image, unsigned int *image_data, int w, int h);
Evas_Object *image, unsigned int *image_data, Evas_Coord w, Evas_Coord h);
void ephoto_single_browser_image_data_done(Evas_Object *main,
unsigned int *image_data, int w, int h);
unsigned int *image_data, Evas_Coord w, Evas_Coord h);
void ephoto_single_browser_cancel_editing(Evas_Object *main);
/* smart callbacks called: "back" - the user wants to go back to the previous
* screen. */
@ -105,7 +105,7 @@ int e_thumb_init(void);
int e_thumb_shutdown(void);
Evas_Object *e_thumb_icon_add(Evas *evas);
void e_thumb_icon_file_set(Evas_Object *obj, const char *file, const char *key);
void e_thumb_icon_size_set(Evas_Object *obj, int w, int h);
void e_thumb_icon_size_set(Evas_Object *obj, Evas_Coord w, Evas_Coord h);
void e_thumb_icon_begin(Evas_Object *obj);
void e_thumb_icon_end(Evas_Object *obj);
void e_thumb_icon_rethumb(Evas_Object *obj);
@ -197,6 +197,7 @@ struct _Ephoto_Config
int window_height;
Eina_Bool fsel_hide;
Eina_Bool tool_hide;
double lpane_size;
const char *open;
Eina_Bool prompts;
Eina_Bool drop;

@ -14,7 +14,7 @@ struct _Ephoto_BCG
int contrast;
int brightness;
double gamma;
int w, h;
Evas_Coord w, h;
unsigned int *original_im_data;
};
@ -52,7 +52,7 @@ _ephoto_bcg_adjust_brightness(Ephoto_BCG *ebcg, int brightness,
unsigned int *image_data)
{
unsigned int *im_data, *im_data_new, *p1, *p2;
int x, y;
Evas_Coord x, y;
int a, r, g, b, bb, gg, rr;
im_data = malloc(sizeof(unsigned int) * ebcg->w * ebcg->h);
@ -103,8 +103,8 @@ _ephoto_bcg_adjust_contrast(Ephoto_BCG *ebcg, int contrast,
unsigned int *image_data)
{
unsigned int *im_data, *im_data_new, *p1, *p2;
int x, y, top, bottom;
int a, r, g, b, bb, gg, rr;
Evas_Coord x, y;
int top, bottom, a, r, g, b, bb, gg, rr;
float factor;
im_data = malloc(sizeof(unsigned int) * ebcg->w * ebcg->h);
@ -158,7 +158,7 @@ _ephoto_bcg_adjust_gamma(Ephoto_BCG *ebcg, double gamma,
unsigned int *image_data)
{
unsigned int *im_data, *im_data_new, *p1, *p2;
int x, y;
Evas_Coord x, y;
int a, r, g, b, bb, gg, rr;
im_data = malloc(sizeof(unsigned int) * ebcg->w * ebcg->h);
@ -272,7 +272,7 @@ _bcg_apply(void *data, int type EINA_UNUSED,
{
Ephoto_BCG *ebcg = data;
unsigned int *image_data;
int w, h;
Evas_Coord w, h;
image_data =
evas_object_image_data_get(elm_image_object_get(ebcg->image),

@ -14,7 +14,7 @@ struct _Ephoto_Color
int blue;
int green;
int red;
int w, h;
Evas_Coord w, h;
unsigned int *original_im_data;
};
@ -51,7 +51,7 @@ unsigned int *
_ephoto_color_adjust_red(Ephoto_Color *eco, int red, unsigned int *image_data)
{
unsigned int *im_data, *im_data_new, *p1, *p2;
int x, y;
Evas_Coord x, y;
int a, r, g, b, rr;
im_data = malloc(sizeof(unsigned int) * eco->w * eco->h);
@ -100,7 +100,7 @@ _ephoto_color_adjust_green(Ephoto_Color *eco, int green,
unsigned int *image_data)
{
unsigned int *im_data, *im_data_new, *p1, *p2;
int x, y;
Evas_Coord x, y;
int a, r, g, b, gg;
im_data = malloc(sizeof(unsigned int) * eco->w * eco->h);
@ -149,7 +149,7 @@ _ephoto_color_adjust_blue(Ephoto_Color *eco, int blue,
unsigned int *image_data)
{
unsigned int *im_data, *im_data_new, *p1, *p2;
int x, y;
Evas_Coord x, y;
int a, r, g, b, bb;
im_data = malloc(sizeof(unsigned int) * eco->w * eco->h);
@ -257,7 +257,7 @@ _color_apply(void *data, int type EINA_UNUSED,
{
Ephoto_Color *eco = data;
unsigned int *image_data;
int w, h;
Evas_Coord w, h;
image_data =
evas_object_image_data_get(elm_image_object_get(eco->image),

@ -1,83 +1,12 @@
#include "ephoto.h"
#define CONFIG_VERSION 14
#define CONFIG_VERSION 15
static int _ephoto_config_load(Ephoto *ephoto);
static Eina_Bool _ephoto_on_config_save(void *data);
static Eet_Data_Descriptor *edd = NULL;
Eina_Bool
ephoto_config_init(Ephoto *ephoto)
{
Eet_Data_Descriptor_Class eddc;
if (!eet_eina_stream_data_descriptor_class_set(&eddc, sizeof(eddc),
"Ephoto_Config", sizeof(Ephoto_Config)))
{
return EINA_FALSE;
}
if (!edd)
edd = eet_data_descriptor_stream_new(&eddc);
#undef T
#undef D
#define T Ephoto_Config
#define D edd
#define C_VAL(edd, type, member, dtype) \
EET_DATA_DESCRIPTOR_ADD_BASIC(edd, type, #member, member, dtype)
C_VAL(D, T, config_version, EET_T_INT);
C_VAL(D, T, thumb_size, EET_T_INT);
C_VAL(D, T, thumb_gen_size, EET_T_INT);
C_VAL(D, T, directory, EET_T_STRING);
C_VAL(D, T, slideshow_timeout, EET_T_DOUBLE);
C_VAL(D, T, slideshow_transition, EET_T_STRING);
C_VAL(D, T, window_width, EET_T_INT);
C_VAL(D, T, window_height, EET_T_INT);
C_VAL(D, T, fsel_hide, EET_T_INT);
C_VAL(D, T, tool_hide, EET_T_INT);
C_VAL(D, T, open, EET_T_STRING);
C_VAL(D, T, prompts, EET_T_INT);
C_VAL(D, T, drop, EET_T_INT);
switch (_ephoto_config_load(ephoto))
{
case 0:
/* Start a new config */
ephoto->config->config_version = CONFIG_VERSION;
ephoto->config->slideshow_timeout = 4.0;
ephoto->config->slideshow_transition = eina_stringshare_add("fade");
ephoto->config->window_width = 900;
ephoto->config->window_height = 600;
ephoto->config->fsel_hide = 0;
ephoto->config->tool_hide = 0;
ephoto->config->open = eina_stringshare_add(getenv("HOME"));
ephoto->config->prompts = 1;
ephoto->config->drop = 0;
break;
default:
return EINA_TRUE;
}
ephoto_config_save(ephoto);
return EINA_TRUE;
}
void
ephoto_config_save(Ephoto *ephoto)
{
_ephoto_on_config_save(ephoto);
}
void
ephoto_config_free(Ephoto *ephoto)
{
free(ephoto->config);
ephoto->config = NULL;
}
static void
_config_close_cb(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
{
@ -137,7 +66,7 @@ _open_hv_select(void *data, Evas_Object *obj, void *event_info)
}
static Evas_Object *
_ephoto_config_general(Ephoto *ephoto, Evas_Object *parent)
_config_general(Ephoto *ephoto, Evas_Object *parent)
{
Evas_Object *box, *table, *check, *hoversel, *entry;
@ -232,7 +161,7 @@ _spinner_changed(void *data EINA_UNUSED, Evas_Object *obj,
}
static Evas_Object *
_ephoto_config_slideshow(Ephoto *ephoto, Evas_Object *parent)
_config_slideshow(Ephoto *ephoto, Evas_Object *parent)
{
Evas_Object *box, *table, *label, *spinner, *hoversel;
const Eina_List *l;
@ -350,7 +279,7 @@ _link_anchor(void *data, Evas_Object *obj, void *event_info)
}
static Evas_Object *
_ephoto_config_bindings(Evas_Object *parent)
_config_bindings(Evas_Object *parent)
{
Evas_Object *box, *scroller, *entry;
Eina_Strbuf *sbuf = eina_strbuf_new();
@ -424,7 +353,7 @@ _ephoto_config_bindings(Evas_Object *parent)
}
static Evas_Object *
_ephoto_config_about(Evas_Object *parent)
_config_about(Evas_Object *parent)
{
Evas_Object *box, *entry, *img, *lbl;
Eina_Strbuf *sbuf = eina_strbuf_new();
@ -546,6 +475,71 @@ _segment_changed(void *data EINA_UNUSED, Evas_Object *o, void *event)
evas_object_show(page);
}
static int
_ephoto_config_load(Ephoto *ephoto)
{
Eet_File *ef;
char buf[4096], buf2[4096];
snprintf(buf2, sizeof(buf2), "%s/.config/ephoto", getenv("HOME"));
ecore_file_mkpath(buf2);
snprintf(buf, sizeof(buf), "%s/ephoto.cfg", buf2);
ef = eet_open(buf, EET_FILE_MODE_READ);
if (!ef)
{
ephoto_config_free(ephoto);
ephoto->config = calloc(1, sizeof(Ephoto_Config));
return 0;
}
ephoto->config = eet_data_read(ef, edd, "config");
eet_close(ef);
if (!ephoto->config || ephoto->config->config_version > CONFIG_VERSION)
{
ephoto_config_free(ephoto);
ephoto->config = calloc(1, sizeof(Ephoto_Config));
return 0;
}
if (ephoto->config->config_version < CONFIG_VERSION)
{
ecore_file_unlink(buf);
ephoto_config_free(ephoto);
ephoto->config = calloc(1, sizeof(Ephoto_Config));
return 0;
}
return 1;
}
static Eina_Bool
_ephoto_on_config_save(void *data)
{
Ephoto *ephoto = data;
Eet_File *ef;
char buf[4096], buf2[4096];
snprintf(buf, sizeof(buf), "%s/.config/ephoto/ephoto.cfg", getenv("HOME"));
snprintf(buf2, sizeof(buf2), "%s.tmp", buf);
ef = eet_open(buf2, EET_FILE_MODE_WRITE);
if (!ef)
goto save_end;
eet_data_write(ef, edd, "config", ephoto->config, 1);
if (eet_close(ef))
goto save_end;
if (!ecore_file_mv(buf2, buf))
goto save_end;
save_end:
ecore_file_unlink(buf2);
return ECORE_CALLBACK_CANCEL;
}
void
ephoto_config_main(Ephoto *ephoto)
{
@ -563,13 +557,13 @@ ephoto_config_main(Ephoto *ephoto)
evas_object_size_hint_weight_set(table, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(table, EVAS_HINT_FILL, EVAS_HINT_FILL);
gen = _ephoto_config_general(ephoto, table);
gen = _config_general(ephoto, table);
elm_table_pack(table, gen, 0, 2, 1, 1);
slide = _ephoto_config_slideshow(ephoto, table);
slide = _config_slideshow(ephoto, table);
elm_table_pack(table, slide, 0, 2, 1, 1);
kb = _ephoto_config_bindings(table);
kb = _config_bindings(table);
elm_table_pack(table, kb, 0, 2, 1, 1);
about = _ephoto_config_about(table);
about = _config_about(table);
elm_table_pack(table, about, 0, 2, 1, 1);
segment = elm_segment_control_add(table);
@ -661,67 +655,76 @@ ephoto_config_main(Ephoto *ephoto)
evas_object_show(popup);
}
static int
_ephoto_config_load(Ephoto *ephoto)
void
ephoto_config_save(Ephoto *ephoto)
{
Eet_File *ef;
char buf[4096], buf2[4096];
snprintf(buf2, sizeof(buf2), "%s/.config/ephoto", getenv("HOME"));
ecore_file_mkpath(buf2);
snprintf(buf, sizeof(buf), "%s/ephoto.cfg", buf2);
ef = eet_open(buf, EET_FILE_MODE_READ);
if (!ef)
{
ephoto_config_free(ephoto);
ephoto->config = calloc(1, sizeof(Ephoto_Config));
return 0;
}
ephoto->config = eet_data_read(ef, edd, "config");
eet_close(ef);
if (!ephoto->config || ephoto->config->config_version > CONFIG_VERSION)
{
ephoto_config_free(ephoto);
ephoto->config = calloc(1, sizeof(Ephoto_Config));
return 0;
}
_ephoto_on_config_save(ephoto);
}
if (ephoto->config->config_version < CONFIG_VERSION)
{
ecore_file_unlink(buf);
ephoto_config_free(ephoto);
ephoto->config = calloc(1, sizeof(Ephoto_Config));
return 0;
}
return 1;
void
ephoto_config_free(Ephoto *ephoto)
{
free(ephoto->config);
ephoto->config = NULL;
}
static Eina_Bool
_ephoto_on_config_save(void *data)
Eina_Bool
ephoto_config_init(Ephoto *ephoto)
{
Ephoto *ephoto = data;
Eet_File *ef;
char buf[4096], buf2[4096];
Eet_Data_Descriptor_Class eddc;
snprintf(buf, sizeof(buf), "%s/.config/ephoto/ephoto.cfg", getenv("HOME"));
snprintf(buf2, sizeof(buf2), "%s.tmp", buf);
if (!eet_eina_stream_data_descriptor_class_set(&eddc, sizeof(eddc),
"Ephoto_Config", sizeof(Ephoto_Config)))
{
return EINA_FALSE;
}
ef = eet_open(buf2, EET_FILE_MODE_WRITE);
if (!ef)
goto save_end;
if (!edd)
edd = eet_data_descriptor_stream_new(&eddc);
eet_data_write(ef, edd, "config", ephoto->config, 1);
if (eet_close(ef))
goto save_end;
#undef T
#undef D
#define T Ephoto_Config
#define D edd
#define C_VAL(edd, type, member, dtype) \
EET_DATA_DESCRIPTOR_ADD_BASIC(edd, type, #member, member, dtype)
if (!ecore_file_mv(buf2, buf))
goto save_end;
C_VAL(D, T, config_version, EET_T_INT);
C_VAL(D, T, thumb_size, EET_T_INT);
C_VAL(D, T, thumb_gen_size, EET_T_INT);
C_VAL(D, T, directory, EET_T_STRING);
C_VAL(D, T, slideshow_timeout, EET_T_DOUBLE);
C_VAL(D, T, slideshow_transition, EET_T_STRING);
C_VAL(D, T, window_width, EET_T_INT);
C_VAL(D, T, window_height, EET_T_INT);
C_VAL(D, T, fsel_hide, EET_T_INT);
C_VAL(D, T, tool_hide, EET_T_INT);
C_VAL(D, T, lpane_size, EET_T_DOUBLE);
C_VAL(D, T, open, EET_T_STRING);
C_VAL(D, T, prompts, EET_T_INT);
C_VAL(D, T, drop, EET_T_INT);
switch (_ephoto_config_load(ephoto))
{
case 0:
/* Start a new config */
ephoto->config->config_version = CONFIG_VERSION;
ephoto->config->slideshow_timeout = 4.0;
ephoto->config->slideshow_transition = eina_stringshare_add("fade");
ephoto->config->window_width = 900;
ephoto->config->window_height = 600;
ephoto->config->fsel_hide = 0;
ephoto->config->tool_hide = 0;
ephoto->config->lpane_size = .15;
ephoto->config->open = eina_stringshare_add(getenv("HOME"));
ephoto->config->prompts = 1;
ephoto->config->drop = 0;
break;
save_end:
ecore_file_unlink(buf2);
default:
return EINA_TRUE;
}
return ECORE_CALLBACK_CANCEL;
ephoto_config_save(ephoto);
return EINA_TRUE;
}

@ -14,10 +14,10 @@ struct _Ephoto_Cropper
Evas_Object *cropw;
Evas_Object *croph;
Eina_List *handlers;
int startx;
int starty;
int offsetx;
int offsety;
Evas_Coord startx;
Evas_Coord starty;
Evas_Coord offsetx;
Evas_Coord offsety;
Eina_Bool resizing;
};
@ -27,7 +27,7 @@ _calculate_cropper_size(void *data, Evas_Object *obj EINA_UNUSED,
{
Ephoto_Cropper *ec = data;
Edje_Message_Int_Set *msg;
int w, h, cw, ch, iw, ih, nw, nh;
Evas_Coord w, h, cw, ch, iw, ih, nw, nh;
double scalew, scaleh;
edje_object_part_geometry_get(elm_layout_edje_get(ec->layout),
@ -60,7 +60,7 @@ _cropper_changed_width(void *data, Evas_Object *obj EINA_UNUSED,
{
Ephoto_Cropper *ec = data;
Edje_Message_Int_Set *msgl, *msgr;
int mw, cx, cw, nw, lx, lw, iw, left, right;
Evas_Coord mw, cx, cw, nw, lx, lw, iw, left, right;
double scalew;
mw = elm_slider_value_get(ec->cropw);
@ -112,7 +112,7 @@ _cropper_changed_height(void *data, Evas_Object *obj EINA_UNUSED,
{
Ephoto_Cropper *ec = data;
Edje_Message_Int_Set *msgt, *msgb;
int mh, ch, cy, nh, lh, ly, ih, top, bottom;
Evas_Coord mh, ch, cy, nh, lh, ly, ih, top, bottom;
double scaleh;
mh = elm_slider_value_get(ec->croph);
@ -180,8 +180,8 @@ _apply_crop(void *data, Evas_Object *obj EINA_UNUSED,
Ephoto_Cropper *ec = data;
Evas_Object *edje = elm_layout_edje_get(ec->layout);
int x, y, w, h, cx, cy, cw, ch, iw, ih;
int nx, ny, nw, nh, i, j, tmpx, tmpy, ind, index;
Evas_Coord x, y, w, h, cx, cy, cw, ch, iw, ih;
Evas_Coord nx, ny, nw, nh, i, j, tmpx, tmpy, ind, index;
double scalex, scaley, scalew, scaleh;
unsigned int *idata, *idata_new;
@ -250,7 +250,7 @@ _cropper_both_mouse_move(void *data, Evas_Object *obj EINA_UNUSED,
{
Ephoto_Cropper *ec = data;
Edje_Message_Int_Set *msg;
int mx, my, cx, cy, cw, ch, nx, ny, lx, ly, lw, lh;
Evas_Coord mx, my, cx, cy, cw, ch, nx, ny, lx, ly, lw, lh;
evas_pointer_canvas_xy_get(evas_object_evas_get(ec->cropper), &mx, &my);
evas_object_geometry_get(ec->cropper, &cx, &cy, &cw, &ch);
@ -305,7 +305,7 @@ _cropper_resize_both(void *data, Evas_Object *obj EINA_UNUSED,
const char *emission EINA_UNUSED, const char *source)
{
Ephoto_Cropper *ec = data;
int mx, my, cx, cy;
Evas_Coord mx, my, cx, cy;
ec->resizing = 1;
evas_pointer_canvas_xy_get(evas_object_evas_get(ec->cropper), &mx, &my);
@ -327,7 +327,7 @@ _cropper_horiz_mouse_move(void *data, Evas_Object *obj EINA_UNUSED,
{
Ephoto_Cropper *ec = data;
Edje_Message_Int_Set *msg;
int mx, cx, cy, cw, ch, nx, lx, lw;
Evas_Coord mx, cx, cy, cw, ch, nx, lx, lw;
evas_pointer_canvas_xy_get(evas_object_evas_get(ec->cropper), &mx, 0);
evas_object_geometry_get(ec->cropper, &cx, &cy, &cw, &ch);
@ -371,7 +371,7 @@ _cropper_resize_horiz(void *data, Evas_Object *obj EINA_UNUSED,
const char *emission EINA_UNUSED, const char *source EINA_UNUSED)
{
Ephoto_Cropper *ec = data;
int mx, my, cx, cy;
Evas_Coord mx, my, cx, cy;
ec->resizing = 1;
evas_pointer_canvas_xy_get(evas_object_evas_get(ec->cropper), &mx, &my);
@ -393,7 +393,7 @@ _cropper_vert_mouse_move(void *data, Evas_Object *obj EINA_UNUSED,
{
Ephoto_Cropper *ec = data;
Edje_Message_Int_Set *msg;
int my, cx, cy, cw, ch, ny, ly, lh;
Evas_Coord my, cx, cy, cw, ch, ny, ly, lh;
evas_pointer_canvas_xy_get(evas_object_evas_get(ec->cropper), 0, &my);
evas_object_geometry_get(ec->cropper, &cx, &cy, &cw, &ch);
@ -437,7 +437,7 @@ _cropper_resize_vert(void *data, Evas_Object *obj EINA_UNUSED,
const char *emission EINA_UNUSED, const char *source EINA_UNUSED)
{
Ephoto_Cropper *ec = data;
int mx, my, cx, cy;
Evas_Coord mx, my, cx, cy;
ec->resizing = 1;
evas_pointer_canvas_xy_get(evas_object_evas_get(ec->cropper), &mx, &my);
@ -462,7 +462,7 @@ _cropper_mouse_move(void *data, Evas_Object *obj EINA_UNUSED,
if (!ec->resizing)
{
Edje_Message_Int_Set *msg;
int mx, my, cx, cy, cw, ch, nx, ny, lx, ly, lw, lh;
Evas_Coord mx, my, cx, cy, cw, ch, nx, ny, lx, ly, lw, lh;
evas_pointer_canvas_xy_get(evas_object_evas_get(ec->cropper),
&mx, &my);
@ -510,7 +510,7 @@ _cropper_move(void *data, Evas_Object *obj EINA_UNUSED,
const char *emission EINA_UNUSED, const char *source EINA_UNUSED)
{
Ephoto_Cropper *ec = data;
int mx, my, cx, cy;
Evas_Coord mx, my, cx, cy;
evas_pointer_canvas_xy_get(evas_object_evas_get(ec->cropper), &mx, &my);
evas_object_geometry_get(ec->cropper, &cx, &cy, 0, 0);
@ -532,12 +532,12 @@ _image_resize(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
Ephoto_Cropper *ec = data;
Edje_Message_Int_Set *msg;
int sx, sy, sw, sh, ix, iy, iw, ih, diffw, diffh;
Evas_Coord sx, sy, sw, sh, ix, iy, iw, ih, diffw, diffh;
evas_object_geometry_get(ec->layout, &sx, &sy, &sw, &sh);
evas_object_image_size_get(elm_image_object_get(ec->image), &iw, &ih);
int nw, nh;
Evas_Coord nw, nh;
if (sw > sh)
{
@ -545,7 +545,7 @@ _image_resize(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
nh = ih * ((double) sw / (double) iw);
if (nh > sh)
{
int onw, onh;
Evas_Coord onw, onh;
onw = nw;
onh = nh;
@ -559,7 +559,7 @@ _image_resize(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
nw = iw * ((double) sh / (double) ih);
if (nw > sw)
{
int onw, onh;
Evas_Coord onw, onh;
onw = nw;
onh = nh;
@ -631,7 +631,7 @@ ephoto_cropper_add(Evas_Object *main, Evas_Object *parent,
Evas_Object *image_parent, Evas_Object *image)
{
Ephoto_Cropper *ec;
int w, h;
Evas_Coord w, h;
EINA_SAFETY_ON_NULL_GOTO(image, error);

@ -34,7 +34,7 @@ ephoto_filter_blur(Evas_Object *main, Evas_Object *image)
{
unsigned int *im_data, *im_data_new, *p1, *p2;
int rad = 3;
int x, y, w, h, mx, my, mw, mh, mt, xx, yy;
Evas_Coord x, y, w, h, mx, my, mw, mh, mt, xx, yy;
int a, r, g, b;
int *as, *rs, *gs, *bs;
@ -128,7 +128,8 @@ void
ephoto_filter_sharpen(Evas_Object *main, Evas_Object *image)
{
unsigned int *im_data, *im_data_new, *p1, *p2;
int a, r, g, b, x, y, w, h;
int a, r, g, b;
Evas_Coord x, y, w, h;
im_data =
evas_object_image_data_get(elm_image_object_get(image), EINA_FALSE);
@ -183,7 +184,8 @@ void
ephoto_filter_black_and_white(Evas_Object *main, Evas_Object *image)
{
unsigned int *im_data, *im_data_new;
int gray, i, r, g, b, a, w, h;
int gray, i, r, g, b, a;
Evas_Coord w, h;
im_data =
evas_object_image_data_get(elm_image_object_get(image), EINA_FALSE);
@ -213,7 +215,8 @@ void
ephoto_filter_old_photo(Evas_Object *main, Evas_Object *image)
{
unsigned int *im_data, *im_data_new;
int i, r, rr, g, gg, b, bb, a, w, h;
int i, r, rr, g, gg, b, bb, a;
Evas_Coord w, h;
im_data =
evas_object_image_data_get(elm_image_object_get(image), EINA_FALSE);
@ -247,7 +250,8 @@ void
ephoto_filter_histogram_eq(Evas_Object *main, Evas_Object *image)
{
unsigned int *im_data, *im_data_new, *p1, *p2;
int x, y, w, h, i, hist[256], cdf[256];
Evas_Coord x, y, w, h;
int i, hist[256], cdf[256];
int a, r, g, b, bb, gg, rr, norm, total;
float hh, s, v, nv, sum;

@ -14,7 +14,7 @@ struct _Ephoto_HSV
double hue;
double saturation;
double value;
int w, h;
Evas_Coord w, h;
unsigned int *original_im_data;
};
@ -51,7 +51,7 @@ unsigned int *
_ephoto_hsv_adjust_hue(Ephoto_HSV *ehsv, double hue, unsigned int *image_data)
{
unsigned int *im_data, *im_data_new, *p1, *p2;
int x, y;
Evas_Coord x, y;
int a, r, g, b, bb, gg, rr;
float hh, s, v;
@ -107,7 +107,7 @@ _ephoto_hsv_adjust_saturation(Ephoto_HSV *ehsv, double saturation,
unsigned int *image_data)
{
unsigned int *im_data, *im_data_new, *p1, *p2;
int x, y;
Evas_Coord x, y;
int a, r, g, b, bb, gg, rr;
float hh, s, v;
@ -163,7 +163,7 @@ _ephoto_hsv_adjust_value(Ephoto_HSV *ehsv, double value,
unsigned int *image_data)
{
unsigned int *im_data, *im_data_new, *p1, *p2;
int x, y;
Evas_Coord x, y;
int a, r, g, b, bb, gg, rr;
float hh, s, v;
@ -279,7 +279,7 @@ _hsv_apply(void *data, int type EINA_UNUSED,
{
Ephoto_HSV *ehsv = data;
unsigned int *image_data;
int w, h;
Evas_Coord w, h;
image_data =
evas_object_image_data_get(elm_image_object_get(ehsv->image),

@ -193,7 +193,7 @@ _resize_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
void *event_info EINA_UNUSED)
{
Ephoto *ephoto = data;
int w, h;
Evas_Coord w, h;
evas_object_geometry_get(ephoto->win, 0, 0, &w, &h);
if (w && h)
@ -635,6 +635,9 @@ ephoto_directory_set(Ephoto *ephoto, const char *path, Evas_Object *expanded,
ed->dirs_only = dirs_only;
ed->thumbs_only = thumbs_only;
if (!ecore_file_can_read(path))
return;
ephoto_title_set(ephoto, NULL);
eina_stringshare_replace(&ephoto->config->directory,
ecore_file_realpath(path));

@ -10,7 +10,7 @@ struct _Ephoto_Reye
Evas_Object *rslider;
Eina_List *handlers;
int rad;
int w, h;
Evas_Coord w, h;
unsigned int *original_im_data;
unsigned int *edited_im_data;
};
@ -50,9 +50,9 @@ _reye_clicked(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
{
Ephoto_Reye *er = data;
unsigned int *im_data, *im_data_new, *p1, *p2;
int x, y, imx, imy, imw, imh;
int xpos, ypos, xadj, yadj;
int a, r, g, b, nx, ny;
Evas_Coord x, y, imx, imy, imw, imh;
Evas_Coord xpos, ypos, xadj, yadj, nx, ny;
int a, r, g, b;
double scalex, scaley;
evas_pointer_canvas_xy_get(evas_object_evas_get(er->image), &xpos, &ypos);
@ -151,7 +151,7 @@ _reye_apply(void *data, int type EINA_UNUSED,
{
Ephoto_Reye *er = data;
unsigned int *image_data;
int w, h;
Evas_Coord w, h;
image_data =
evas_object_image_data_get(elm_image_object_get(er->image),

File diff suppressed because it is too large Load Diff

@ -110,7 +110,7 @@ e_thumb_icon_file_set(Evas_Object *obj, const char *file, const char *key)
}
void
e_thumb_icon_size_set(Evas_Object *obj, int w, int h)
e_thumb_icon_size_set(Evas_Object *obj, Evas_Coord w, Evas_Coord h)
{
E_Thumb *eth;

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save