elm_win_resize_object_add(win, o);
elm_icon_standard_set(o, "home");
-<<<<<<< HEAD
-elm_icon_scale_set(o, EINA_FALSE, EINA_FALSE);
-=======
elm_icon_resizable_set(o, EINA_FALSE, EINA_FALSE);
->>>>>>> remotes/origin/upstream
evas_object_show(o);
#include "widget_preview_tmpl_foot.c"
elm_win_resize_object_add(win, o);
elm_image_file_set(o, PACKAGE_DATA_DIR"/images/logo_small.png", NULL);
-<<<<<<< HEAD
-elm_image_scale_set(o, EINA_FALSE, EINA_FALSE);
-=======
elm_image_resizable_set(o, EINA_FALSE, EINA_FALSE);
->>>>>>> remotes/origin/upstream
evas_object_show(o);
#include "widget_preview_tmpl_foot.c"
#ifndef ELM_LIB_QUICKLAUNCH
static void
-<<<<<<< HEAD
-=======
_cb_size_radio_changed(void *data, Evas_Object *obj, void *event __UNUSED__)
{
Evas_Object *o_bg = data;
}
static void
->>>>>>> remotes/origin/upstream
_cb_radio_changed(void *data, Evas_Object *obj, void *event __UNUSED__)
{
Evas_Object *o_bg = data;
test_bg_image(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
{
Evas_Object *win, *bg;
-<<<<<<< HEAD
-=======
Evas_Object *box, *hbox, *o_bg;
Evas_Object *rd, *rdg;
->>>>>>> remotes/origin/upstream
char buf[PATH_MAX];
win = elm_win_add(NULL, "bg-image", ELM_WIN_BASIC);
elm_win_autodel_set(win, EINA_TRUE);
bg = elm_bg_add(win);
-<<<<<<< HEAD
- snprintf(buf, sizeof(buf), "%s/images/plant_01.jpg", elm_app_data_dir_get());
- elm_bg_file_set(bg, buf, NULL);
-=======
->>>>>>> remotes/origin/upstream
evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
elm_win_resize_object_add(win, bg);
evas_object_show(bg);
-<<<<<<< HEAD
-=======
box = elm_box_add(win);
evas_object_size_hint_weight_set(box, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
elm_win_resize_object_add(win, box);
evas_object_show(hbox);
evas_object_show(o_bg);
->>>>>>> remotes/origin/upstream
evas_object_size_hint_min_set(bg, 160, 160);
evas_object_size_hint_max_set(bg, 640, 640);
evas_object_resize(win, 320, 320);
# include "elementary_config.h"
#endif
#ifndef ELM_LIB_QUICKLAUNCH
-<<<<<<< HEAD
-=======
static void
aspect_fixed_cb(void *data, Evas_Object *obj, void *event_info __UNUSED__)
evas_object_show(win);
}
->>>>>>> remotes/origin/upstream
static void
icon_clicked(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
{
}
void
-<<<<<<< HEAD
-test_icon(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
-=======
test_icon_transparent(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
->>>>>>> remotes/origin/upstream
{
Evas_Object *win, *ic;
char buf[PATH_MAX];
ic = elm_icon_add(win);
snprintf(buf, sizeof(buf), "%s/images/logo.png", elm_app_data_dir_get());
elm_icon_file_set(ic, buf, NULL);
-<<<<<<< HEAD
- elm_icon_scale_set(ic, 0, 0);
-=======
elm_icon_resizable_set(ic, 0, 0);
->>>>>>> remotes/origin/upstream
elm_icon_no_scale_set(ic, 1);
evas_object_size_hint_weight_set(ic, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_fill_set(ic, 0.5, 0.5);
elm_icon_animated_set(ic, EINA_TRUE);
elm_icon_animated_play_set(ic, EINA_TRUE);
}
-<<<<<<< HEAD
- elm_icon_scale_set(ic, 0, 0);
-=======
elm_icon_resizable_set(ic, 0, 0);
->>>>>>> remotes/origin/upstream
elm_icon_no_scale_set(ic, 1);
evas_object_size_hint_weight_set(ic, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_fill_set(ic, 0.5, 0.5);
elm_photo_thumb_set(ph, buf, NULL);
else
elm_photo_file_set(ph, buf);
-<<<<<<< HEAD
- elm_photo_editable_set(ph, 1);
-=======
elm_photo_editable_set(ph, EINA_TRUE);
->>>>>>> remotes/origin/upstream
evas_object_size_hint_weight_set(ph, EVAS_HINT_EXPAND,
EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(ph, EVAS_HINT_FILL,
my_ph_scroll(void *data __UNUSED__, Evas_Object *obj, void *event_info __UNUSED__)
{
int x, y, w, h;
-<<<<<<< HEAD
- elm_photocam_region_get(obj, &x, &y, &w, &h);
-=======
elm_photocam_image_region_get(obj, &x, &y, &w, &h);
->>>>>>> remotes/origin/upstream
printf("scroll %i %i %ix%i\n", x, y, w, h);
}
}
static void
-<<<<<<< HEAD
-=======
my_bt_gesture(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
{
elm_photocam_gesture_enabled_set(data, !elm_photocam_gesture_enabled_get(data));
}
static void
->>>>>>> remotes/origin/upstream
_photocam_mouse_wheel_cb(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info)
{
Evas_Object *photocam = data;
elm_table_pack(tb2, bt, 2, 1, 1, 1);
evas_object_show(bt);
-<<<<<<< HEAD
-=======
box = elm_box_add(win);
elm_box_horizontal_set(box, EINA_TRUE);
evas_object_size_hint_weight_set(box, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
elm_table_pack(tb2, box, 0, 2, 1, 1);
evas_object_show(box);
->>>>>>> remotes/origin/upstream
bt = elm_button_add(win);
elm_object_text_set(bt, "Pause On/Off");
evas_object_smart_callback_add(bt, "clicked", my_bt_pause, ph);
evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
-<<<<<<< HEAD
- evas_object_size_hint_align_set(bt, 0.1, 0.9);
- elm_table_pack(tb2, bt, 0, 2, 1, 1);
-=======
elm_box_pack_end(box, bt);
evas_object_show(bt);
evas_object_smart_callback_add(bt, "clicked", my_bt_gesture, ph);
evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
elm_box_pack_end(box, bt);
->>>>>>> remotes/origin/upstream
evas_object_show(bt);
box = elm_box_add(win);
if (p->file)
{
elm_icon_file_set(obj, p->file, NULL);
-<<<<<<< HEAD
- param_icon->file = p->file;
-=======
param_icon->file = p->file;
->>>>>>> remotes/origin/upstream
}
if (p->smooth_exists)
{
elm_icon_smooth_set(obj, p->smooth);
-<<<<<<< HEAD
- param_icon->smooth = p->smooth;
-=======
param_icon->smooth = p->smooth;
->>>>>>> remotes/origin/upstream
}
if (p->no_scale_exists)
{
elm_icon_no_scale_set(obj, p->no_scale);
-<<<<<<< HEAD
- param_icon->no_scale = p->no_scale;
- }
- if (p->scale_up_exists && p->scale_down_exists)
- {
- elm_icon_scale_set(obj, p->scale_up, p->scale_down);
- param_icon->scale_up = p->scale_up;
- param_icon->scale_down = p->scale_down;
- }
- else if (p->scale_up_exists || p->scale_down_exists)
- {
- if (p->scale_up_exists)
- {
- elm_icon_scale_set(obj, p->scale_up, param_icon->scale_down);
- param_icon->scale_up = p->scale_up;
- }
- else
- {
- elm_icon_scale_set(obj, param_icon->scale_up, p->scale_down);
- param_icon->scale_down = p->scale_down;
- }
-=======
param_icon->no_scale = p->no_scale;
}
if (p->scale_up_exists && p->scale_down_exists)
elm_icon_resizable_set(obj, param_icon->scale_up, p->scale_down);
param_icon->scale_down = p->scale_down;
}
->>>>>>> remotes/origin/upstream
}
if (p->fill_outside_exists)
{
elm_icon_fill_outside_set(obj, p->fill_outside);
-<<<<<<< HEAD
- param_icon->fill_outside = p->fill_outside;
-=======
param_icon->fill_outside = p->fill_outside;
->>>>>>> remotes/origin/upstream
}
if (p->prescale_size_exists)
{
elm_icon_prescale_set(obj, p->prescale_size);
-<<<<<<< HEAD
- param_icon->prescale_size = p->prescale_size;
-=======
param_icon->prescale_size = p->prescale_size;
->>>>>>> remotes/origin/upstream
}
if (p->icon)
{
return ret;
}
else if (!strcmp(param->name, "smooth")
-<<<<<<< HEAD
- && param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
- {
- elm_icon_smooth_set(obj, param->i);
- param_icon->smooth = param->i;
- return EINA_TRUE;
- }
- else if (!strcmp(param->name, "no scale")
- && param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
- {
- elm_icon_no_scale_set(obj, param->i);
- param_icon->no_scale = param->i;
- return EINA_TRUE;
- }
- else if (!strcmp(param->name, "scale up")
- && param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
- {
- elm_icon_scale_set(obj, param->i, param_icon->scale_down);
- param_icon->scale_up = param->i;
- return EINA_TRUE;
- }
- else if (!strcmp(param->name, "scale down")
- && param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
- {
- elm_icon_scale_set(obj, param_icon->scale_up, param->i);
- param_icon->scale_down = param->i;
- return EINA_TRUE;
- }
- else if (!strcmp(param->name, "fill outside")
- && param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
- {
- elm_icon_fill_outside_set(obj, param->i);
- param_icon->fill_outside = param->i;
- return EINA_TRUE;
- }
- else if (!strcmp(param->name, "prescale")
- && param->type == EDJE_EXTERNAL_PARAM_TYPE_INT)
- {
- elm_icon_prescale_set(obj, param->i);
- param_icon->prescale_size = param->i;
- return EINA_TRUE;
-=======
&& param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
{
elm_icon_smooth_set(obj, param->i);
elm_icon_prescale_set(obj, param->i);
param_icon->prescale_size = param->i;
return EINA_TRUE;
->>>>>>> remotes/origin/upstream
}
else if (!strcmp(param->name, "icon"))
{
&& param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
{
param->s = param_icon->file;
-<<<<<<< HEAD
- return EINA_TRUE;
- }
- else if (!strcmp(param->name, "smooth")
- && param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
- {
- param->i = param_icon->smooth;
- return EINA_TRUE;
- }
- else if (!strcmp(param->name, "no scale")
- && param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
- {
- param->i = param_icon->no_scale;
- return EINA_TRUE;
- }
- else if (!strcmp(param->name, "scale up")
- && param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
- {
- param->i = param_icon->scale_up;
- return EINA_TRUE;
- }
- else if (!strcmp(param->name, "scale down")
- && param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
- {
- param->i = param_icon->scale_down;
- return EINA_TRUE;
- }
- else if (!strcmp(param->name, "fill outside")
- && param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
- {
- param->i = param_icon->fill_outside;
- return EINA_TRUE;
- }
- else if (!strcmp(param->name, "prescale")
- && param->type == EDJE_EXTERNAL_PARAM_TYPE_INT)
- {
- param->i = param_icon->prescale_size;
- return EINA_TRUE;
-=======
return EINA_TRUE;
}
else if (!strcmp(param->name, "smooth")
{
param->i = param_icon->prescale_size;
return EINA_TRUE;
->>>>>>> remotes/origin/upstream
}
else if (!strcmp(param->name, "icon"))
{
EINA_LIST_FOREACH(params, l, param)
{
if (!strcmp(param->name, "file"))
-<<<<<<< HEAD
- mem->file = eina_stringshare_add(param->s);
- else if (!strcmp(param->name, "smooth"))
- {
- mem->smooth = param->i;
- mem->smooth_exists = EINA_TRUE;
- }
- else if (!strcmp(param->name, "no scale"))
- {
- mem->no_scale = param->i;
- mem->no_scale_exists = EINA_TRUE;
- }
- else if (!strcmp(param->name, "scale up"))
- {
- mem->scale_up = param->i;
- mem->scale_up_exists = EINA_TRUE;
- }
- else if (!strcmp(param->name, "scale down"))
- {
- mem->scale_down = param->i;
- mem->scale_down_exists = EINA_TRUE;
- }
- else if (!strcmp(param->name, "fill outside"))
- {
- mem->fill_outside = param->i;
- mem->fill_outside_exists = EINA_TRUE;
- }
- else if (!strcmp(param->name, "prescale"))
- {
- mem->prescale_size = param->i;
- mem->prescale_size_exists = EINA_TRUE;
-=======
mem->file = eina_stringshare_add(param->s);
else if (!strcmp(param->name, "smooth"))
{
{
mem->prescale_size = param->i;
mem->prescale_size_exists = EINA_TRUE;
->>>>>>> remotes/origin/upstream
}
else if (!strcmp(param->name, "icon"))
{
printf("path = %s, group = %s, name = %s\n", path, group, name);
elm_icon_no_scale_set(icon, EINA_TRUE);
-<<<<<<< HEAD
- elm_icon_scale_set(icon, EINA_FALSE, EINA_TRUE);
-=======
elm_icon_resizable_set(icon, EINA_FALSE, EINA_TRUE);
->>>>>>> remotes/origin/upstream
elm_icon_smooth_set(icon, EINA_FALSE);
elm_icon_fill_outside_set(icon, EINA_TRUE);
}
elm_image_no_scale_set(image, EINA_TRUE);
-<<<<<<< HEAD
- elm_image_scale_set(image, EINA_FALSE, EINA_TRUE);
-=======
elm_image_resizable_set(image, EINA_FALSE, EINA_TRUE);
->>>>>>> remotes/origin/upstream
elm_image_smooth_set(image, EINA_FALSE);
elm_image_orient_set(image, ELM_IMAGE_FLIP_HORIZONTAL);
elm_image_aspect_fixed_set(image, EINA_TRUE);
_fit(void *data, Evas_Object *obj, void *event_info)
{
int x, y, w, h;
-<<<<<<< HEAD
- elm_photocam_region_get(data, &x, &y, &w, &h);
-=======
elm_photocam_image_region_get(data, &x, &y, &w, &h);
->>>>>>> remotes/origin/upstream
printf("region: {%d, %d, %d, %d}\n", x, y, w, h);
elm_photocam_zoom_mode_set(data, ELM_PHOTOCAM_ZOOM_MODE_AUTO_FIT);
}
return obj;
}
-<<<<<<< HEAD
-EAPI void
-elm_bg_file_set(Evas_Object *obj, const char *file, const char *group)
-{
- ELM_CHECK_WIDTYPE(obj, widtype);
-=======
EAPI Eina_Bool
elm_bg_file_set(Evas_Object *obj, const char *file, const char *group)
{
ELM_CHECK_WIDTYPE(obj, widtype) EINA_FALSE;
->>>>>>> remotes/origin/upstream
Widget_Data *wd = elm_widget_data_get(obj);
const char *p;
wd->file = NULL;
eina_stringshare_del(wd->group);
wd->group = NULL;
-<<<<<<< HEAD
- return;
-=======
return EINA_TRUE;
->>>>>>> remotes/origin/upstream
}
eina_stringshare_replace(&wd->file, file);
eina_stringshare_replace(&wd->group, group);
edje_object_part_swallow(wd->base, "elm.swallow.background", wd->img);
elm_widget_sub_object_add(obj, wd->img);
_custom_resize(wd, NULL, NULL, NULL);
-<<<<<<< HEAD
-=======
return EINA_TRUE;
->>>>>>> remotes/origin/upstream
}
EAPI void
Widget_Data *wd = elm_widget_data_get(obj);
if (file) *file = wd->file;
if (group) *group = wd->group;
-<<<<<<< HEAD
-=======
return;
->>>>>>> remotes/origin/upstream
}
EAPI void
wd = elm_widget_data_get(obj);
wd->option = option;
_custom_resize(wd, NULL, NULL, NULL);
-<<<<<<< HEAD
-=======
return;
->>>>>>> remotes/origin/upstream
}
EAPI Elm_Bg_Option
elm_bg_option_get(const Evas_Object *obj)
{
-<<<<<<< HEAD
- ELM_CHECK_WIDTYPE(obj, widtype) 0;
-=======
ELM_CHECK_WIDTYPE(obj, widtype) ELM_BG_OPTION_LAST;
->>>>>>> remotes/origin/upstream
Widget_Data *wd;
wd = elm_widget_data_get(obj);
_custom_resize(wd, NULL, NULL, NULL);
}
evas_object_color_set(wd->rect, r, g, b, 255);
-<<<<<<< HEAD
-=======
return;
->>>>>>> remotes/origin/upstream
}
EAPI void
wd = elm_widget_data_get(obj);
evas_object_color_get(wd->rect, r, g, b, NULL);
-<<<<<<< HEAD
-}
-
-EAPI void
-elm_bg_overlay_set(Evas_Object *obj, Evas_Object *overlay)
-{
- _content_set_hook(obj, "overlay", overlay);
-}
-
-EAPI Evas_Object *
-elm_bg_overlay_get(const Evas_Object *obj)
-{
- return _content_get_hook(obj, "overlay");
-}
-
-EAPI Evas_Object *
-elm_bg_overlay_unset(Evas_Object *obj)
-{
- return _content_unset_hook(obj, "overlay");
-=======
return;
->>>>>>> remotes/origin/upstream
}
EAPI void
if (!wd->img) return;
if (!(((p = strrchr(wd->file, '.'))) && (!strcasecmp(p, ".edj"))))
evas_object_image_load_size_set(wd->img, w, h);
-<<<<<<< HEAD
-=======
return;
->>>>>>> remotes/origin/upstream
}
* @image html img/widget/bg/preview-00.png
* @image latex img/widget/bg/preview-00.eps
*
-<<<<<<< HEAD
- * @brief Background object, used for setting a solid color, image or Edje
- * group as background to a window or any container object.
- *
- * The bg object is used for setting a solid background to a window or
- * packing into any container object. It works just like an image, but has
- * some properties useful to a background, like setting it to tiled,
- * centered, scaled or stretched.
- *
- * Default contents parts of the bg widget that you can use for are:
-=======
* @brief Background object, used for setting a solid color, image or
* Edje group as a background to a window or any container object.
*
* centered, scaled or stretched.
*
* Default content parts of the bg widget that you can use for are:
->>>>>>> remotes/origin/upstream
* @li "overlay" - overlay of the bg
*
* Supported elm_object common APIs.
* @li @ref bg_03_example_page
*/
-<<<<<<< HEAD
-/* bg */
-typedef enum
-{
- ELM_BG_OPTION_CENTER, /**< center the background */
- ELM_BG_OPTION_SCALE, /**< scale the background retaining aspect ratio */
- ELM_BG_OPTION_STRETCH, /**< stretch the background to fill */
- ELM_BG_OPTION_TILE /**< tile background at its original size */
-=======
/**
* Identifiers on how a background widget is to display its image --
* if it was tset to use an image file.
ELM_BG_OPTION_STRETCH, /**< stretch the background image to fill the widget's area */
ELM_BG_OPTION_TILE, /**< tile background image at its original size */
ELM_BG_OPTION_LAST /**< sentinel value, also used to indicate errors */
->>>>>>> remotes/origin/upstream
} Elm_Bg_Option;
/**
EAPI Evas_Object *elm_bg_add(Evas_Object *parent);
/**
-<<<<<<< HEAD
- * Set the file (image or edje) used for the background
- *
- * @param obj The bg object
- * @param file The file path
- * @param group Optional key (group in Edje) within the file
- *
- * This sets the image file used in the background object. The image (or edje)
- * will be stretched (retaining aspect if its an image file) to completely fill
- * the bg object. This may mean some parts are not visible.
- *
- * @note Once the image of @p obj is set, a previously set one will be deleted,
- * even if @p file is NULL.
- *
- * @ingroup Bg
- */
-EAPI void elm_bg_file_set(Evas_Object *obj, const char *file, const char *group);
-
-/**
- * Get the file (image or edje) used for the background
- *
- * @param obj The bg object
- * @param file The file path
- * @param group Optional key (group in Edje) within the file
-=======
* Set the file (image or edje collection) to give life for the
* background
*
*
* @note Use @c NULL pointers on the file components you're not
* interested in: they'll be ignored by the function.
->>>>>>> remotes/origin/upstream
*
* @ingroup Bg
*/
EAPI void elm_bg_file_get(const Evas_Object *obj, const char **file, const char **group);
/**
-<<<<<<< HEAD
- * Set the option used for the background image
- *
- * @param obj The bg object
- * @param option The desired background option (TILE, SCALE)
- *
- * This sets the option used for manipulating the display of the background
- * image. The image can be tiled or scaled.
-=======
* Set the mode of display for a given background widget's image
*
* @param obj The background object handle
* centered or stretched.
*
* @see elm_bg_option_get()
->>>>>>> remotes/origin/upstream
*
* @ingroup Bg
*/
EAPI void elm_bg_option_set(Evas_Object *obj, Elm_Bg_Option option);
/**
-<<<<<<< HEAD
- * Get the option used for the background image
- *
- * @param obj The bg object
- * @return The desired background option (CENTER, SCALE, STRETCH or TILE)
-=======
* Get the mode of display for a given background widget's image
*
* @param obj The background object handle
* #ELM_BG_OPTION_LAST, on errors.
*
* @see elm_bg_option_set() for more details
->>>>>>> remotes/origin/upstream
*
* @ingroup Bg
*/
EAPI Elm_Bg_Option elm_bg_option_get(const Evas_Object *obj);
-<<<<<<< HEAD
-/**
- * Set the option used for the background color
- *
- * @param obj The bg object
- * @param r
- * @param g
- * @param b
- *
- * This sets the color used for the background rectangle. Its range goes
- * from 0 to 255.
-=======
/**
* Set the color on a given background widget
* color background.
*
* @see elm_bg_color_get()
->>>>>>> remotes/origin/upstream
*
* @ingroup Bg
*/
EAPI void elm_bg_color_set(Evas_Object *obj, int r, int g, int b);
-<<<<<<< HEAD
-/**
- * Get the option used for the background color
- *
- * @param obj The bg object
- * @param r
- * @param g
- * @param b
-=======
/**
* Get the color set on a given background widget
* interested in: they'll be ignored by the function.
*
* @see elm_bg_color_get() for more details
->>>>>>> remotes/origin/upstream
*
* @ingroup Bg
*/
EAPI void elm_bg_color_get(const Evas_Object *obj, int *r, int *g, int *b);
/**
-<<<<<<< HEAD
- * Set the size of the pixmap representation of the image.
- *
- * This option just makes sense if an image is going to be set in the bg.
- *
- * @param obj The bg object
- * @param w The new width of the image pixmap representation.
- * @param h The new height of the image pixmap representation.
- *
- * This function sets a new size for pixmap representation of the given bg
- * image. It allows the image to be loaded already in the specified size,
- * reducing the memory usage and load time when loading a big image with load
- * size set to a smaller size.
- *
- * NOTE: this is just a hint, the real size of the pixmap may differ
- * depending on the type of image being loaded, being bigger than requested.
-=======
* Set the size of the pixmap representation of the image set on a
* given background widget.
*
* @note This is just a hint for the underlying system. The real size
* of the pixmap may differ depending on the type of image being
* loaded, being bigger than requested.
->>>>>>> remotes/origin/upstream
*
* @ingroup Bg
*/
eina_stringshare_replace(&wd->thumb.file.path, file);
eina_stringshare_replace(&wd->thumb.file.key, group);
-<<<<<<< HEAD
- if (elm_thumb_ethumb_client_connected())
-=======
if (elm_thumb_ethumb_client_connected_get())
->>>>>>> remotes/origin/upstream
{
_icon_thumb_apply(wd);
return ;
#endif
}
-<<<<<<< HEAD
-=======
->>>>>>> remotes/origin/upstream
EAPI Eina_Bool
elm_icon_animated_available_get(const Evas_Object *obj)
{
return wd->no_scale;
}
-<<<<<<< HEAD
-EAPI void
-elm_icon_scale_set(Evas_Object *obj, Eina_Bool scale_up, Eina_Bool scale_down)
-{
-=======
EINA_DEPRECATED EAPI void
elm_icon_scale_set(Evas_Object *obj, Eina_Bool scale_up, Eina_Bool scale_down)
{
EAPI void
elm_icon_resizable_set(Evas_Object *obj, Eina_Bool size_up, Eina_Bool size_down)
{
->>>>>>> remotes/origin/upstream
ELM_CHECK_WIDTYPE(obj, widtype);
Widget_Data *wd = elm_widget_data_get(obj);
if (!wd) return;
-<<<<<<< HEAD
- wd->scale_up = scale_up;
- wd->scale_down = scale_down;
-=======
wd->scale_up = size_up;
wd->scale_down = size_down;
->>>>>>> remotes/origin/upstream
if (!wd->in_eval) _sizing_eval(obj);
}
EAPI void
-<<<<<<< HEAD
-elm_icon_scale_get(const Evas_Object *obj, Eina_Bool *scale_up, Eina_Bool *scale_down)
-=======
elm_icon_resizable_get(const Evas_Object *obj, Eina_Bool *size_up, Eina_Bool *size_down)
->>>>>>> remotes/origin/upstream
{
ELM_CHECK_WIDTYPE(obj, widtype);
Widget_Data *wd = elm_widget_data_get(obj);
if (!wd) return;
-<<<<<<< HEAD
- if (scale_up) *scale_up = wd->scale_up;
- if (scale_down) *scale_down = wd->scale_down;
-=======
if (size_up) *size_up = wd->scale_up;
if (size_down) *size_down = wd->scale_down;
->>>>>>> remotes/origin/upstream
}
EAPI void
}
EAPI void
-<<<<<<< HEAD
-elm_icon_preload_set(Evas_Object *obj, Eina_Bool disable)
-=======
elm_icon_preload_disabled_set(Evas_Object *obj, Eina_Bool disabled)
->>>>>>> remotes/origin/upstream
{
ELM_CHECK_WIDTYPE(obj, widtype);
Widget_Data *wd = elm_widget_data_get(obj);
if (!wd) return;
-<<<<<<< HEAD
- _els_smart_icon_preload_set(wd->img, disable);
-=======
_els_smart_icon_preload_set(wd->img, !!disabled);
}
Widget_Data *wd = elm_widget_data_get(obj);
if (!wd) return EINA_FALSE;
return _els_smart_icon_aspect_fixed_get(wd->img);
->>>>>>> remotes/origin/upstream
}
* This function disables scaling of the icon object through the function
* elm_object_scale_set(). However, this does not affect the object
* size/resize in any way. For that effect, take a look at
-<<<<<<< HEAD
- * elm_icon_scale_set().
- *
- * @see elm_icon_no_scale_get()
- * @see elm_icon_scale_set()
-=======
* elm_icon_resizable_set().
*
* @see elm_icon_no_scale_get()
* @see elm_icon_resizable_set()
->>>>>>> remotes/origin/upstream
* @see elm_object_scale_set()
*
* @ingroup Icon
* Set if the object is (up/down) resizable.
*
* @param obj The icon object
-<<<<<<< HEAD
- * @param scale_up A bool to set if the object is resizable up. Default is
- * @c EINA_TRUE.
- * @param scale_down A bool to set if the object is resizable down. Default
- * is @c EINA_TRUE.
- *
- * This function limits the icon object resize ability. If @p scale_up is set to
- * @c EINA_FALSE, the object can't have its height or width resized to a value
- * higher than the original icon size. Same is valid for @p scale_down.
- *
- * @see elm_icon_scale_get()
- *
- * @ingroup Icon
- */
-EAPI void elm_icon_scale_set(Evas_Object *obj, Eina_Bool scale_up, Eina_Bool scale_down);
-=======
* @param size_up A bool to set if the object is resizable up. Default is
* @c EINA_TRUE.
* @param size_down A bool to set if the object is resizable down. Default
* @ingroup Icon
*/
EAPI void elm_icon_resizable_set(Evas_Object *obj, Eina_Bool size_up, Eina_Bool size_down);
->>>>>>> remotes/origin/upstream
/**
* Get if the object is (up/down) resizable.
*
* @param obj The icon object
-<<<<<<< HEAD
- * @param scale_up A bool to set if the object is resizable up
- * @param scale_down A bool to set if the object is resizable down
- *
- * @see elm_icon_scale_set()
- *
- * @ingroup Icon
- */
-EAPI void elm_icon_scale_get(const Evas_Object *obj, Eina_Bool *scale_up, Eina_Bool *scale_down);
-=======
* @param size_up A bool to set if the object is resizable up
* @param size_down A bool to set if the object is resizable down
*
* @ingroup Icon
*/
EAPI void elm_icon_resizable_get(const Evas_Object *obj, Eina_Bool *size_up, Eina_Bool *size_down);
->>>>>>> remotes/origin/upstream
/**
* Get the object's image size
* Enable or disable preloading of the icon
*
* @param obj The icon object
-<<<<<<< HEAD
- * @param disable If EINA_TRUE, preloading will be disabled
- * @ingroup Icon
- */
-EAPI void elm_icon_preload_set(Evas_Object *obj, Eina_Bool disable);
-=======
* @param disabled If EINA_TRUE, preloading will be disabled
* @ingroup Icon
*/
EAPI void elm_icon_preload_disabled_set(Evas_Object *obj, Eina_Bool disabled);
->>>>>>> remotes/origin/upstream
/**
* Get if the icon supports animation or not.
*
* Return if this elm icon's image can be animated. Currently Evas only
* supports gif animation. If the return value is EINA_FALSE, other
-<<<<<<< HEAD
- * elm_icon_animated_XXX APIs won't work.
-=======
* elm_icon_animated_xxx APIs won't work.
->>>>>>> remotes/origin/upstream
* @ingroup Icon
*/
EAPI Eina_Bool elm_icon_animated_available_get(const Evas_Object *obj);
* Set animation mode of the icon.
*
* @param obj The icon object
-<<<<<<< HEAD
- * @param anim @c EINA_TRUE if the object do animation job,
-=======
* @param animated @c EINA_TRUE if the object do animation job,
->>>>>>> remotes/origin/upstream
* @c EINA_FALSE otherwise. Default is @c EINA_FALSE.
*
* Since the default animation mode is set to EINA_FALSE,
* @param play @c EINA_TRUE the object play animation images,
* @c EINA_FALSE otherwise. Default is @c EINA_FALSE.
*
-<<<<<<< HEAD
- * To play elm icon's animation, set play to EINA_TURE.
-=======
* To play elm icon's animation, set play to EINA_TRUE.
->>>>>>> remotes/origin/upstream
* For example, you make gif player using this set/get API and click event.
* This literally lets you control current play or paused state. To have
* this work with animated GIF files for example, you first, before
* at all on the icon.
*
* 1. Click event occurs
-<<<<<<< HEAD
- * 2. Check play flag using elm_icon_animaged_play_get
-=======
* 2. Check play flag using elm_icon_animated_play_get
->>>>>>> remotes/origin/upstream
* 3. If elm icon was playing, set play to EINA_FALSE.
* Then animation will be stopped and vice versa
* @ingroup Icon
EAPI Eina_Bool elm_icon_animated_play_get(const Evas_Object *obj);
/**
-<<<<<<< HEAD
-=======
* Set whether the original aspect ratio of the icon should be kept on resize.
*
* @param obj The icon object.
EAPI Eina_Bool elm_icon_aspect_fixed_get(const Evas_Object *obj);
/**
->>>>>>> remotes/origin/upstream
* @}
*/
return wd->no_scale;
}
-<<<<<<< HEAD
-EAPI void
-elm_image_scale_set(Evas_Object *obj, Eina_Bool scale_up, Eina_Bool scale_down)
-{
-=======
EINA_DEPRECATED EAPI void
elm_image_scale_set(Evas_Object *obj, Eina_Bool scale_up, Eina_Bool scale_down)
{
EAPI void
elm_image_resizable_set(Evas_Object *obj, Eina_Bool size_up, Eina_Bool size_down)
{
->>>>>>> remotes/origin/upstream
ELM_CHECK_WIDTYPE(obj, widtype);
Widget_Data *wd = elm_widget_data_get(obj);
if (!wd) return;
-<<<<<<< HEAD
- wd->scale_up = scale_up;
- wd->scale_down = scale_down;
-=======
wd->scale_up = size_up;
wd->scale_down = size_down;
->>>>>>> remotes/origin/upstream
_sizing_eval(obj);
}
EAPI void
-<<<<<<< HEAD
-elm_image_scale_get(const Evas_Object *obj, Eina_Bool *scale_up, Eina_Bool *scale_down)
-=======
elm_image_resizable_get(const Evas_Object *obj, Eina_Bool *size_up, Eina_Bool *size_down)
->>>>>>> remotes/origin/upstream
{
ELM_CHECK_WIDTYPE(obj, widtype);
Widget_Data *wd = elm_widget_data_get(obj);
if (!wd) return;
-<<<<<<< HEAD
- if (scale_up) *scale_up = wd->scale_up;
- if (scale_down) *scale_down = wd->scale_down;
-=======
if (size_up) *size_up = wd->scale_up;
if (size_down) *size_down = wd->scale_down;
->>>>>>> remotes/origin/upstream
}
EAPI void
}
EAPI void
-<<<<<<< HEAD
-=======
elm_image_preload_disabled_set(Evas_Object *obj, Eina_Bool disabled)
{
ELM_CHECK_WIDTYPE(obj, widtype);
}
EAPI void
->>>>>>> remotes/origin/upstream
elm_image_prescale_set(Evas_Object *obj, int size)
{
ELM_CHECK_WIDTYPE(obj, widtype);
ELM_CHECK_WIDTYPE(obj, widtype);
Widget_Data *wd = elm_widget_data_get(obj);
if (!wd) return;
-<<<<<<< HEAD
- return _els_smart_icon_aspect_fixed_set(wd->img, fixed);
-=======
_els_smart_icon_aspect_fixed_set(wd->img, fixed);
->>>>>>> remotes/origin/upstream
}
EAPI Eina_Bool
*
* This is the real size of the image, not the size of the object.
*
-<<<<<<< HEAD
- * On error, neither w and h will be fileld with 0.
- *
-=======
->>>>>>> remotes/origin/upstream
* @ingroup Image
*/
EAPI void elm_image_object_size_get(const Evas_Object *obj, int *w, int *h);
* This function disables scaling of the elm_image widget through the
* function elm_object_scale_set(). However, this does not affect the widget
* size/resize in any way. For that effect, take a look at
-<<<<<<< HEAD
- * elm_image_scale_set().
- *
- * @see elm_image_no_scale_get()
- * @see elm_image_scale_set()
-=======
* elm_image_resizable_set().
*
* @see elm_image_no_scale_get()
* @see elm_image_resizable_set()
->>>>>>> remotes/origin/upstream
* @see elm_object_scale_set()
*
* @ingroup Image
* Set if the object is (up/down) resizable.
*
* @param obj The image object
-<<<<<<< HEAD
- * @param scale_up A bool to set if the object is resizable up. Default is
- * @c EINA_TRUE.
- * @param scale_down A bool to set if the object is resizable down. Default
- * is @c EINA_TRUE.
- *
- * This function limits the image resize ability. If @p scale_up is set to
- * @c EINA_FALSE, the object can't have its height or width resized to a value
- * higher than the original image size. Same is valid for @p scale_down.
- *
- * @see elm_image_scale_get()
- *
- * @ingroup Image
- */
-EAPI void elm_image_scale_set(Evas_Object *obj, Eina_Bool scale_up, Eina_Bool scale_down);
-=======
* @param size_up A bool to set if the object is resizable up. Default is
* @c EINA_TRUE.
* @param size_down A bool to set if the object is resizable down. Default
* @ingroup Image
*/
EAPI void elm_image_resizable_set(Evas_Object *obj, Eina_Bool size_up, Eina_Bool size_down);
->>>>>>> remotes/origin/upstream
/**
* Get if the object is (up/down) resizable.
*
* @param obj The image object
-<<<<<<< HEAD
- * @param scale_up A bool to set if the object is resizable up
- * @param scale_down A bool to set if the object is resizable down
- *
- * @see elm_image_scale_set()
- *
- * @ingroup Image
- */
-EAPI void elm_image_scale_get(const Evas_Object *obj, Eina_Bool *scale_up, Eina_Bool *scale_down);
-=======
* @param size_up A bool to set if the object is resizable up
* @param size_down A bool to set if the object is resizable down
*
* @ingroup Image
*/
EAPI void elm_image_resizable_get(const Evas_Object *obj, Eina_Bool *size_up, Eina_Bool *size_down);
->>>>>>> remotes/origin/upstream
/**
* Set if the image fills the entire object area, when keeping the aspect ratio.
EAPI Eina_Bool elm_image_fill_outside_get(const Evas_Object *obj);
/**
-<<<<<<< HEAD
-=======
* Enable or disable preloading of the image
*
* @param obj The image object
EAPI void elm_image_preload_disabled_set(Evas_Object *obj, Eina_Bool disabled);
/**
->>>>>>> remotes/origin/upstream
* Set the prescale size for the image
*
* @param obj The image object
EAPI void elm_image_editable_set(Evas_Object *obj, Eina_Bool set);
/**
-<<<<<<< HEAD
- * Check if the image 'editable'.
-=======
* Check if the image is 'editable'.
->>>>>>> remotes/origin/upstream
*
* @param obj Image object.
* @return Editability.
EAPI Eina_Bool elm_image_editable_get(const Evas_Object *obj);
/**
-<<<<<<< HEAD
- * Get the basic Evas_Image object from this object (widget).
-=======
* Get the inlined image object of the image widget.
->>>>>>> remotes/origin/upstream
*
* @param obj The image object to get the inlined image from
* @return The inlined image object, or NULL if none exists
eina_stringshare_replace(&wd->thumb.file.path, file);
eina_stringshare_replace(&wd->thumb.file.key, group);
-<<<<<<< HEAD
- if (elm_thumb_ethumb_client_connected())
-=======
if (elm_thumb_ethumb_client_connected_get())
->>>>>>> remotes/origin/upstream
{
_icon_thumb_apply(wd);
return ;
/**
* @defgroup Photo Photo
*
-<<<<<<< HEAD
- * For displaying the photo of a person (contact). Simple, yet
-=======
* For displaying a photo, for ex., a person (contact). Simple, yet
->>>>>>> remotes/origin/upstream
* with a very specific purpose.
*
* Signals that you can add callbacks for are:
*
* "clicked" - This is called when a user has clicked the photo
-<<<<<<< HEAD
- * "drag,start" - Someone started dragging the image out of the object
- * "drag,end" - Dragged item was dropped (somewhere)
-=======
* "drag,start" - dragging the image out of the photo object
* "drag,end" - Drop the dragged item
->>>>>>> remotes/origin/upstream
*
* @{
*/
* Set the file that will be used as thumbnail in the photo.
*
* @param obj The photo object.
-<<<<<<< HEAD
- * @param file The path to file that will be used as thumb.
-=======
* @param file The path to file that will be used as thumbnail.
->>>>>>> remotes/origin/upstream
* @param group The key used in case of an EET file.
*
* @ingroup Photo
* Set the size that will be used on the photo
*
* @param obj The photo object
-<<<<<<< HEAD
- * @param size The size that the photo will be
-=======
* @param size The size of the photo
->>>>>>> remotes/origin/upstream
*
* @ingroup Photo
*/
* the image will delete the existing content.
*
* @param obj The photo object.
-<<<<<<< HEAD
- * @param set To set of clear editablity.
-=======
* @param set To set of clear editability.
->>>>>>> remotes/origin/upstream
*/
EAPI void elm_photo_editable_set(Evas_Object *obj, Eina_Bool set);
EAPI void elm_photo_aspect_fixed_set(Evas_Object *obj, Eina_Bool fixed);
/**
-<<<<<<< HEAD
- * Get if the object fixes the original aspect ratio.
-=======
* Get if the object keeps the original aspect ratio.
->>>>>>> remotes/origin/upstream
*
* @param obj The photo object.
* @return @c EINA_TRUE if the object keeps the original aspect, @c EINA_FALSE
Evas_Object *obj;
Evas_Object *scr;
Evas_Object *pan_smart;
-<<<<<<< HEAD
-=======
Evas_Object *gest;
double gest_start;
->>>>>>> remotes/origin/upstream
Pan *pan;
Evas_Coord pan_x, pan_y, minw, minh;
double zoom;
Elm_Photocam_Zoom_Mode mode;
-<<<<<<< HEAD
-=======
Evas_Coord pvx, pvy, px, py, zoom_point_x, zoom_point_y;
struct
{
Ecore_Animator *animator;
} bounce;
} gzoom;
->>>>>>> remotes/origin/upstream
const char *file;
Ecore_Job *calc_job;
Eina_Bool on_hold : 1;
Eina_Bool paused : 1;
Eina_Bool do_region : 1;
-<<<<<<< HEAD
-=======
Eina_Bool do_gesture : 1;
Eina_Bool zoom_gest : 1;
->>>>>>> remotes/origin/upstream
};
struct _Pan
ay = 0;
gw = wd->size.w;
gh = wd->size.h;
-<<<<<<< HEAD
- if (ow > gw) ax = (ow - gw) / 2;
- if (oh > gh) ay = (oh - gh) / 2;
-=======
if (!wd->zoom_gest)
{
if (ow > gw) ax = (ow - gw) / 2;
if (oh > gh) ay = (oh - gh) / 2;
}
->>>>>>> remotes/origin/upstream
evas_object_move(wd->img, ox + 0 - px + ax, oy + 0 - py + ay);
evas_object_resize(wd->img, gw, gh);
ay = 0;
gw = wd->size.w;
gh = wd->size.h;
-<<<<<<< HEAD
- if (ow > gw) ax = (ow - gw) / 2;
- if (oh > gh) ay = (oh - gh) / 2;
-=======
if (!wd->zoom_gest)
{
if (ow > gw) ax = (ow - gw) / 2;
if (oh > gh) ay = (oh - gh) / 2;
}
->>>>>>> remotes/origin/upstream
for (y = 0; y < g->gh; y++)
{
for (x = 0; x < g->gw; x++)
if (wd->calc_job) ecore_job_del(wd->calc_job);
if (wd->scr_timer) ecore_timer_del(wd->scr_timer);
if (wd->zoom_animator) ecore_animator_del(wd->zoom_animator);
-<<<<<<< HEAD
-=======
if (wd->gzoom.bounce.animator) ecore_animator_del(wd->gzoom.bounce.animator);
->>>>>>> remotes/origin/upstream
if (wd->long_timer) ecore_timer_del(wd->long_timer);
free(wd);
}
Grid *g;
if (!sd) return;
evas_object_geometry_get(obj, &ox, &oy, &ow, &oh);
-<<<<<<< HEAD
- img_place(sd->wd->obj, sd->wd->pan_x, sd->wd->pan_y, ox, oy, ow, oh);
- EINA_LIST_FOREACH(sd->wd->grids, l, g)
- {
- grid_load(sd->wd->obj, g);
- grid_place(sd->wd->obj, g, sd->wd->pan_x, sd->wd->pan_y, ox, oy, ow, oh);
-=======
img_place(sd->wd->obj, sd->wd->pan_x, sd->wd->pan_y,
ox - sd->wd->gzoom.imx, oy - sd->wd->gzoom.imy, ow, oh);
EINA_LIST_FOREACH(sd->wd->grids, l, g)
grid_load(sd->wd->obj, g);
grid_place(sd->wd->obj, g, sd->wd->pan_x, sd->wd->pan_y,
ox - sd->wd->gzoom.imx, oy - sd->wd->gzoom.imy, ow, oh);
->>>>>>> remotes/origin/upstream
}
}
return EINA_TRUE;
}
-<<<<<<< HEAD
-=======
Eina_Bool
_bounce_eval(void *_wd)
{
return EVAS_EVENT_FLAG_NONE;
}
->>>>>>> remotes/origin/upstream
EAPI Evas_Object *
elm_photocam_add(Evas_Object *parent)
{
_pan_set, _pan_get, _pan_max_get,
_pan_min_get, _pan_child_size_get);
-<<<<<<< HEAD
- wd->zoom = 1;
- wd->mode = ELM_PHOTOCAM_ZOOM_MODE_MANUAL;
-
-=======
wd->zoom_gest = EINA_FALSE;
wd->gest_start = 1.0;
wd->zoom = 1;
wd->mode = ELM_PHOTOCAM_ZOOM_MODE_MANUAL;
->>>>>>> remotes/origin/upstream
wd->tsize = 512;
wd->img = evas_object_image_add(e);
wd->size.imh = h;
wd->size.w = wd->size.imw / wd->zoom;
wd->size.h = wd->size.imh / wd->zoom;
-<<<<<<< HEAD
-=======
if (wd->gzoom.bounce.animator)
{
ecore_animator_del(wd->gzoom.bounce.animator);
wd->gzoom.bounce.animator = NULL;
}
->>>>>>> remotes/origin/upstream
if (wd->zoom_animator)
{
wd->nosmooth--;
"elm,state,busy,start", "elm");
evas_object_smart_callback_call(obj, SIG_LOAD_DETAIL, NULL);
}
-<<<<<<< HEAD
- {
- double tz = wd->zoom;
- wd->zoom = 0.0;
- elm_photocam_zoom_set(wd->obj, tz);
- }
-=======
{
double tz = wd->zoom;
wd->zoom = 0.0;
elm_photocam_zoom_set(wd->obj, tz);
}
->>>>>>> remotes/origin/upstream
return evas_object_image_load_error_get(wd->img);
}
wd->size.nh = ph;
}
}
-<<<<<<< HEAD
-=======
else if (wd->mode == ELM_PHOTOCAM_ZOOM_MODE_AUTO_FIT_IN)
{
if ((wd->size.imw < 1) || (wd->size.imh < 1))
wd->size.nh = ph;
}
}
->>>>>>> remotes/origin/upstream
if (wd->main_load_pending)
{
wd->size.w = wd->size.nw;
free(g);
}
}
-<<<<<<< HEAD
-done:
-=======
done:
->>>>>>> remotes/origin/upstream
wd->t_start = ecore_loop_time_get();
wd->t_end = wd->t_start + _elm_config->zoom_friction;
if ((wd->size.w > 0) && (wd->size.h > 0))
if (!wd) return;
if (wd->mode == mode) return;
wd->mode = mode;
-<<<<<<< HEAD
- {
- double tz = wd->zoom;
- wd->zoom = 0.0;
- elm_photocam_zoom_set(wd->obj, tz);
- }
-=======
{
double tz = wd->zoom;
wd->zoom = 0.0;
elm_photocam_zoom_set(wd->obj, tz);
}
->>>>>>> remotes/origin/upstream
}
EAPI Elm_Photocam_Zoom_Mode
if (h) *h = wd->size.imh;
}
-<<<<<<< HEAD
-EAPI void
-elm_photocam_region_get(const Evas_Object *obj, int *x, int *y, int *w, int *h)
-{
-=======
EINA_DEPRECATED EAPI void
elm_photocam_region_get(const Evas_Object *obj, int *x, int *y, int *w, int *h)
{
EAPI void
elm_photocam_image_region_get(const Evas_Object *obj, int *x, int *y, int *w, int *h)
{
->>>>>>> remotes/origin/upstream
ELM_CHECK_WIDTYPE(obj, widtype);
Widget_Data *wd = elm_widget_data_get(obj);
Evas_Coord sx, sy, sw, sh;
if (rh < 1) rh = 1;
if ((rx + rw) > wd->size.w) rx = wd->size.w - rw;
if ((ry + rh) > wd->size.h) ry = wd->size.h - rh;
-<<<<<<< HEAD
-=======
if (wd->gzoom.bounce.animator)
{
ecore_animator_del(wd->gzoom.bounce.animator);
wd->gzoom.bounce.animator = NULL;
zoom_do(obj, 1.0);
}
->>>>>>> remotes/origin/upstream
if (wd->zoom_animator)
{
wd->nosmooth--;
if (rh < 1) rh = 1;
if ((rx + rw) > wd->size.w) rx = wd->size.w - rw;
if ((ry + rh) > wd->size.h) ry = wd->size.h - rh;
-<<<<<<< HEAD
-=======
if (wd->gzoom.bounce.animator)
{
ecore_animator_del(wd->gzoom.bounce.animator);
wd->gzoom.bounce.animator = NULL;
zoom_do(obj, 1.0);
}
->>>>>>> remotes/origin/upstream
if (wd->zoom_animator)
{
wd->nosmooth--;
wd->paused = paused;
if (wd->paused)
{
-<<<<<<< HEAD
-=======
if (wd->gzoom.bounce.animator)
{
ecore_animator_del(wd->gzoom.bounce.animator);
wd->gzoom.bounce.animator = NULL;
zoom_do(obj, 1.0);
}
->>>>>>> remotes/origin/upstream
if (wd->zoom_animator)
{
ecore_animator_del(wd->zoom_animator);
elm_smart_scroller_bounce_allow_get(wd->scr, h_bounce, v_bounce);
}
-<<<<<<< HEAD
-=======
EAPI void
elm_photocam_gesture_enabled_set(Evas_Object *obj, Eina_Bool gesture)
{
return wd->do_gesture;
}
->>>>>>> remotes/origin/upstream
ELM_PHOTOCAM_ZOOM_MODE_MANUAL = 0, /**< Zoom controlled normally by elm_photocam_zoom_set */
ELM_PHOTOCAM_ZOOM_MODE_AUTO_FIT, /**< Zoom until photo fits in photocam */
ELM_PHOTOCAM_ZOOM_MODE_AUTO_FILL, /**< Zoom until photo fills photocam */
-<<<<<<< HEAD
- ELM_PHOTOCAM_ZOOM_MODE_AUTO_FIT_IN, /**< Unzoom until photo fits in photocam */
-=======
ELM_PHOTOCAM_ZOOM_MODE_AUTO_FIT_IN, /**< Zoom in until photo fits in photocam */
->>>>>>> remotes/origin/upstream
ELM_PHOTOCAM_ZOOM_MODE_LAST
} Elm_Photocam_Zoom_Mode;
* This sets the zoom level. 1 will be 1:1 pixel for pixel. 2 will be 2:1
* (that is 2x2 photo pixels will display as 1 on-screen pixel). 4:1 will be
* 4x4 photo pixels as 1 screen pixel, and so on. The @p zoom parameter must
-<<<<<<< HEAD
- * be greater than 0. It is usggested to stick to powers of 2. (1, 2, 4, 8,
-=======
* be greater than 0. It is suggested to stick to powers of 2. (1, 2, 4, 8,
->>>>>>> remotes/origin/upstream
* 16, 32, etc.).
*/
EAPI void elm_photocam_zoom_set(Evas_Object *obj, double zoom);
* This returns the current zoom level of the photocam object. Note that if
* you set the fill mode to other than ELM_PHOTOCAM_ZOOM_MODE_MANUAL
* (which is the default), the zoom level may be changed at any time by the
-<<<<<<< HEAD
- * photocam object itself to account for photo size and photocam viewpoer
-=======
* photocam object itself to account for photo size and photocam viewport
->>>>>>> remotes/origin/upstream
* size.
*
* @see elm_photocam_zoom_set()
* modes will allow the photocam object to automatically adjust zoom mode
* based on properties. ELM_PHOTOCAM_ZOOM_MODE_AUTO_FIT) will adjust zoom so
* the photo fits EXACTLY inside the scroll frame with no pixels outside this
-<<<<<<< HEAD
- * area. ELM_PHOTOCAM_ZOOM_MODE_AUTO_FILL will be similar but ensure no
-=======
* region. ELM_PHOTOCAM_ZOOM_MODE_AUTO_FILL will be similar but ensure no
->>>>>>> remotes/origin/upstream
* pixels within the frame are left unfilled.
*/
EAPI void elm_photocam_zoom_mode_set(Evas_Object *obj, Elm_Photocam_Zoom_Mode mode);
EAPI void elm_photocam_image_size_get(const Evas_Object *obj, int *w, int *h);
/**
-<<<<<<< HEAD
- * @brief Get the area of the image that is currently shown
-=======
* @brief Get the region of the image that is currently shown
->>>>>>> remotes/origin/upstream
*
* @param obj
* @param x A pointer to the X-coordinate of region
* @see elm_photocam_image_region_show()
* @see elm_photocam_image_region_bring_in()
*/
-<<<<<<< HEAD
-EAPI void elm_photocam_region_get(const Evas_Object *obj, int *x, int *y, int *w, int *h);
-
-/**
- * @brief Set the viewed portion of the image
-=======
EAPI void elm_photocam_image_region_get(const Evas_Object *obj, int *x, int *y, int *w, int *h);
/**
* @brief Set the viewed region of the image
->>>>>>> remotes/origin/upstream
*
* @param obj The photocam object
* @param x X-coordinate of region in image original pixels
*
* This sets the paused state to on(EINA_TRUE) or off (EINA_FALSE) for
* photocam. The default is off. This will stop zooming using animation on
-<<<<<<< HEAD
- * zoom levels changes and change instantly. This will stop any existing
-=======
* zoom level changes and change instantly. This will stop any existing
->>>>>>> remotes/origin/upstream
* animations that are running.
*/
EAPI void elm_photocam_paused_set(Evas_Object *obj, Eina_Bool paused);
* @brief Set the photocam scrolling bouncing.
*
* @param obj The photocam object
-<<<<<<< HEAD
- * @param h_bounce bouncing for horizontal
- * @param v_bounce bouncing for vertical
-=======
* @param h_bounce set this to @c EINA_TRUE for horizontal bouncing
* @param v_bounce set this to @c EINA_TRUE for vertical bouncing
->>>>>>> remotes/origin/upstream
*/
EAPI void elm_photocam_bounce_set(Evas_Object *obj, Eina_Bool h_bounce, Eina_Bool v_bounce);
* @brief Get the photocam scrolling bouncing.
*
* @param obj The photocam object
-<<<<<<< HEAD
- * @param h_bounce bouncing for horizontal
- * @param v_bounce bouncing for vertical
-=======
* @param h_bounce horizontal bouncing
* @param v_bounce vertical bouncing
->>>>>>> remotes/origin/upstream
*
* @see elm_photocam_bounce_set()
*/
EAPI void elm_photocam_bounce_get(const Evas_Object *obj, Eina_Bool *h_bounce, Eina_Bool *v_bounce);
/**
-<<<<<<< HEAD
-=======
* @brief Set the gesture state for photocam.
*
* @param obj The photocam object
*/
EAPI Eina_Bool elm_photocam_gesture_enabled_get(const Evas_Object *obj);
/**
->>>>>>> remotes/origin/upstream
* @}
*/
sd = evas_object_smart_data_get(obj);
/* smart code here */
-<<<<<<< HEAD
/* NOTE: Do not merge upstream for the if (sd->edje) { } statements
But wonder whether the edje resource icons have no problem. */
if (!sd->edje) goto out;
-=======
->>>>>>> remotes/origin/upstream
if (sd->prev) evas_object_del(sd->prev);
pclip = evas_object_clip_get(sd->obj);
if (sd->obj) sd->prev = sd->obj;
evas_object_clip_set(sd->obj, pclip);
sd->edje = EINA_FALSE;
-<<<<<<< HEAD
out:
-=======
->>>>>>> remotes/origin/upstream
if (!sd->size)
evas_object_image_load_size_set(sd->obj, sd->size, sd->size);
_els_smart_icon_file_key_set(Evas_Object *obj, const char *file, const char *key)
{
Smart_Data *sd;
-<<<<<<< HEAD
-=======
- Evas_Coord w, h;
->>>>>>> remotes/origin/upstream
sd = evas_object_smart_data_get(obj);
if (!sd) return EINA_FALSE;
_els_smart_icon_file_helper(obj);
evas_object_image_file_set(sd->obj, file, key);
-<<<<<<< HEAD
// NOTE: Do not merge upstream for sd->preloading.
sd->preloading = EINA_FALSE; // by default preload off by seok.j.jeong
sd->show = EINA_TRUE;
// NOTE: Do not merge upstream for sd->preloading.
if (sd->preloading) // sd->preloading can be changed by above function. so add "if (sd->preloading)" as below
evas_object_hide(sd->obj);
-=======
- sd->preloading = EINA_TRUE;
- sd->show = EINA_TRUE;
- evas_object_hide(sd->obj);
- _els_smart_icon_size_get(obj, &w, &h);
- evas_object_image_load_size_set(sd->obj, w, h);
- evas_object_image_preload(sd->obj, EINA_FALSE);
->>>>>>> remotes/origin/upstream
if (evas_object_image_load_error_get(sd->obj) != EVAS_LOAD_ERROR_NONE)
{
ERR("Things are going bad for '%s' (%p)", file, sd->obj);
case ELM_IMAGE_FLIP_VERTICAL:
_els_smart_icon_flip_vertical(sd);
return;
-<<<<<<< HEAD
- case ELM_IMAGE_ROTATE_180_CW:
-=======
case ELM_IMAGE_ROTATE_180:
->>>>>>> remotes/origin/upstream
_els_smart_icon_rotate_180(sd);
return;
default:
w = -w;
hw = hw - 1;
break;
-<<<<<<< HEAD
- case ELM_IMAGE_ROTATE_90_CW:
- to = data + w - 1;
- hw = -hw - 1;
- break;
- case ELM_IMAGE_ROTATE_90_CCW:
-=======
case ELM_IMAGE_ROTATE_90:
to = data + w - 1;
hw = -hw - 1;
break;
case ELM_IMAGE_ROTATE_270:
->>>>>>> remotes/origin/upstream
to = data + hw - w;
w = -w;
hw = hw + 1;