Setters/Getters fix 1.

Setters can't receive const pointers.
All setter need corresponding getter.

In this patch, i adjust getter in: Bg, Box, Icon, Image, Win and Main.

SVN revision: 53917
This commit is contained in:
Tiago Rezende Campos Falcao 2010-10-27 14:38:37 +00:00
parent f8f377cd5f
commit 116cd3c6dc
8 changed files with 559 additions and 12 deletions

View File

@ -258,7 +258,7 @@ _profile_use(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED_
li = data;
selection = elm_list_item_data_get(elm_list_selected_item_get(li));
if (!strcmp(elm_profile_current_get(), selection))
if (!strcmp(elm_profile_get(), selection))
return;
elm_profile_all_set(selection);
@ -695,7 +695,7 @@ _profiles_list_selected_cb(void *data, Evas_Object *obj, void *event_info __UNUS
if (!sel_profile)
return;
cur_profile = elm_profile_current_get();
cur_profile = elm_profile_get();
cur_selected = !strcmp(cur_profile, sel_profile);
elm_object_disabled_set(evas_object_data_get(obj, "prof_del_btn"),
@ -744,7 +744,7 @@ _profiles_list_fill(Evas_Object *l_widget, Eina_List *p_names)
elm_list_clear(l_widget);
efreet_init();
cur_profile = elm_profile_current_get();
cur_profile = elm_profile_get();
EINA_LIST_FOREACH(p_names, l, profile)
{

View File

@ -296,6 +296,7 @@ extern "C" {
EAPI void elm_exit(void);
EAPI void elm_quicklaunch_mode_set(Eina_Bool ql_on);
EAPI Eina_Bool elm_quicklaunch_mode_get(void);
EAPI int elm_quicklaunch_init(int argc, char **argv);
EAPI int elm_quicklaunch_sub_init(int argc, char **argv);
EAPI int elm_quicklaunch_sub_shutdown(void);
@ -332,7 +333,7 @@ extern "C" {
EAPI void elm_scale_set(double scale);
EAPI void elm_scale_all_set(double scale);
EAPI const char *elm_profile_current_get(void);
EAPI const char *elm_profile_get(void);
EAPI char *elm_profile_dir_get(const char *profile);
EAPI Eina_List *elm_profile_list_get(void);
EAPI void elm_profile_list_free(Eina_List *l);
@ -402,7 +403,9 @@ extern "C" {
EAPI void elm_win_resize_object_add(Evas_Object *obj, Evas_Object *subobj);
EAPI void elm_win_resize_object_del(Evas_Object *obj, Evas_Object *subobj);
EAPI void elm_win_title_set(Evas_Object *obj, const char *title);
EAPI const char *elm_win_title_get(const Evas_Object *obj);
EAPI void elm_win_autodel_set(Evas_Object *obj, Eina_Bool autodel);
EAPI Eina_Bool elm_win_autodel_get(const Evas_Object *obj);
EAPI void elm_win_activate(Evas_Object *obj);
EAPI void elm_win_lower(Evas_Object *obj);
EAPI void elm_win_raise(Evas_Object *obj);
@ -438,6 +441,7 @@ extern "C" {
EAPI void elm_win_quickpanel_priority_minor_set(Evas_Object *obj, int priority);
EAPI int elm_win_quickpanel_priority_minor_get(const Evas_Object *obj);
EAPI void elm_win_quickpanel_zone_set(Evas_Object *obj, int zone);
EAPI int elm_win_quickpanel_zone_get(const Evas_Object *obj);
EAPI void elm_win_focus_highlight_enabled_set(Evas_Object *obj, Eina_Bool enabled);
EAPI Eina_Bool elm_win_focus_highlight_enabled_get(const Evas_Object *obj);
EAPI void elm_win_focus_highlight_style_set(Evas_Object *obj, const char *style);
@ -457,7 +461,9 @@ extern "C" {
*
*/
EAPI void elm_win_keyboard_mode_set(Evas_Object *obj, Elm_Win_Keyboard_Mode mode);
EAPI Elm_Win_Keyboard_Mode elm_win_keyboard_mode_get(const Evas_Object *obj);
EAPI void elm_win_keyboard_win_set(Evas_Object *obj, Eina_Bool is_keyboard);
EAPI Eina_Bool elm_win_keyboard_win_get(const Evas_Object *obj);
EAPI void elm_win_screen_position_get(const Evas_Object *obj, int *x, int *y);
@ -482,6 +488,7 @@ extern "C" {
*/
typedef enum _Elm_Bg_Option
{
ELM_BG_OPTION_INVALID = -1,
ELM_BG_OPTION_CENTER,
ELM_BG_OPTION_SCALE,
ELM_BG_OPTION_STRETCH,
@ -490,8 +497,11 @@ extern "C" {
EAPI Evas_Object *elm_bg_add(Evas_Object *parent);
EAPI void elm_bg_file_set(Evas_Object *obj, const char *file, const char *group);
EAPI void elm_bg_file_get(const Evas_Object *obj, const char **file, const char **group);
EAPI void elm_bg_option_set(Evas_Object *obj, Elm_Bg_Option option);
EAPI Elm_Bg_Option elm_bg_option_get(const Evas_Object *obj);
EAPI void elm_bg_color_set(Evas_Object *obj, int r, int g, int b);
EAPI void elm_bg_color_get(const Evas_Object *obj, int *r, int *g, int *b);
EAPI void elm_bg_overlay_set(Evas_Object *obj, Evas_Object *overlay);
EAPI Evas_Object *elm_bg_overlay_get(const Evas_Object *obj);
EAPI Evas_Object *elm_bg_overlay_unset(Evas_Object *obj);
@ -501,12 +511,19 @@ extern "C" {
EAPI Evas_Object *elm_icon_add(Evas_Object *parent);
EAPI Eina_Bool elm_icon_file_set(Evas_Object *obj, const char *file, const char *group);
EAPI void elm_icon_file_get(const Evas_Object *obj, const char **file, const char **group);
EAPI Eina_Bool elm_icon_standard_set(Evas_Object *obj, const char *name);
EAPI const char *elm_icon_standard_get(const Evas_Object *obj);
EAPI void elm_icon_smooth_set(Evas_Object *obj, Eina_Bool smooth);
EAPI Eina_Bool elm_icon_smooth_get(const Evas_Object *obj);
EAPI void elm_icon_no_scale_set(Evas_Object *obj, Eina_Bool no_scale);
EAPI Eina_Bool elm_icon_no_scale_get(const Evas_Object *obj);
EAPI void elm_icon_scale_set(Evas_Object *obj, Eina_Bool scale_up, Eina_Bool scale_down);
EAPI void elm_icon_scale_get(const Evas_Object *obj, Eina_Bool *scale_up, Eina_Bool *scale_down);
EAPI void elm_icon_fill_outside_set(Evas_Object *obj, Eina_Bool fill_outside);
EAPI Eina_Bool elm_icon_fill_outside_get(const Evas_Object *obj);
EAPI void elm_icon_prescale_set(Evas_Object *obj, int size);
EAPI int elm_icon_prescale_get(const Evas_Object *obj);
EAPI void elm_icon_order_lookup_set(Evas_Object *obj, Elm_Icon_Lookup_Order order);
EAPI Elm_Icon_Lookup_Order elm_icon_order_lookup_get(const Evas_Object *obj);
/* smart callbacks called:
@ -527,14 +544,22 @@ extern "C" {
EAPI Evas_Object *elm_image_add(Evas_Object *parent);
EAPI Eina_Bool elm_image_file_set(Evas_Object *obj, const char *file, const char *group);
EAPI void elm_image_file_get(const Evas_Object *obj, const char **file, const char **group);
EAPI void elm_image_smooth_set(Evas_Object *obj, Eina_Bool smooth);
EAPI Eina_Bool elm_image_smooth_get(const Evas_Object *obj);
EAPI void elm_image_object_size_get(const Evas_Object *obj, int *w, int *h);
EAPI void elm_image_no_scale_set(Evas_Object *obj, Eina_Bool no_scale);
EAPI Eina_Bool elm_image_no_scale_get(const Evas_Object *obj);
EAPI void elm_image_scale_set(Evas_Object *obj, Eina_Bool scale_up, Eina_Bool scale_down);
EAPI void elm_image_scale_get(const Evas_Object *obj, Eina_Bool *scale_up, Eina_Bool *scale_down);
EAPI void elm_image_fill_outside_set(Evas_Object *obj, Eina_Bool fill_outside);
EAPI Eina_Bool elm_image_fill_outside_get(const Evas_Object *obj);
EAPI void elm_image_prescale_set(Evas_Object *obj, int size);
EAPI int elm_image_prescale_get(const Evas_Object *obj);
EAPI void elm_image_orient_set(Evas_Object *obj, Elm_Image_Orient orient);
EAPI Elm_Image_Orient elm_image_orient_get(const Evas_Object *obj);
EAPI void elm_image_editable_set(Evas_Object *obj, Eina_Bool set);
EAPI Eina_Bool elm_image_editable_get(const Evas_Object *obj);
/* smart callbacks called:
* "clicked" - the user clicked the image
*/
@ -543,7 +568,9 @@ extern "C" {
EAPI Evas_Object *elm_box_add(Evas_Object *parent);
EAPI void elm_box_horizontal_set(Evas_Object *obj, Eina_Bool horizontal);
EAPI Eina_Bool elm_box_horizontal_get(const Evas_Object *obj);
EAPI void elm_box_homogenous_set(Evas_Object *obj, Eina_Bool homogenous);
EAPI Eina_Bool elm_box_homogenous_get(const Evas_Object *obj);
EAPI void elm_box_pack_start(Evas_Object *obj, Evas_Object *subobj);
EAPI void elm_box_pack_end(Evas_Object *obj, Evas_Object *subobj);
EAPI void elm_box_pack_before(Evas_Object *obj, Evas_Object *subobj, Evas_Object *before);
@ -552,8 +579,10 @@ extern "C" {
EAPI void elm_box_unpack(Evas_Object *obj, Evas_Object *subobj);
EAPI void elm_box_unpack_all(Evas_Object *obj);
EAPI const Eina_List *elm_box_children_get(const Evas_Object *obj);
EAPI void elm_box_padding_set(const Evas_Object *obj, Evas_Coord horizontal, Evas_Coord vertical);
EAPI void elm_box_align_set(const Evas_Object *obj, double horizontal, double vertical);
EAPI void elm_box_padding_set(Evas_Object *obj, Evas_Coord horizontal, Evas_Coord vertical);
EAPI void elm_box_padding_get(const Evas_Object *obj, Evas_Coord *horizontal, Evas_Coord *vertical);
EAPI void elm_box_align_set(Evas_Object *obj, double horizontal, double vertical);
EAPI void elm_box_align_get(const Evas_Object *obj, double *horizontal, double *vertical);
EAPI void elm_box_layout_set(Evas_Object *obj, Evas_Object_Box_Layout cb, const void *data, void (*free_data)(void *data));
EAPI void elm_box_layout_transition(Evas_Object *obj, Evas_Object_Box_Data *priv, void *data);

View File

@ -198,6 +198,25 @@ elm_bg_file_set(Evas_Object *obj, const char *file, const char *group)
_custom_resize(wd, NULL, NULL, NULL);
}
/**
* 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
*
* @ingroup Bg
*/
EAPI void
elm_bg_file_get(const Evas_Object *obj, const char **file, const char **group)
{
ELM_CHECK_WIDTYPE(obj, widtype);
Widget_Data *wd = elm_widget_data_get(obj);
if (!file) return;
if (file) *file = wd->file;
if (group) *group = wd->group;
}
/**
* Set the option used for the background image
*
@ -220,6 +239,24 @@ elm_bg_option_set(Evas_Object *obj, Elm_Bg_Option option)
_custom_resize(wd, NULL, NULL, NULL);
}
/**
* Get the option used for the background image
*
* @param obj The bg object
* @return The desired background option (TILE, SCALE)
*
* @ingroup Bg
*/
EAPI Elm_Bg_Option
elm_bg_option_get(const Evas_Object *obj)
{
ELM_CHECK_WIDTYPE(obj, widtype) ELM_BG_OPTION_INVALID;
Widget_Data *wd;
wd = elm_widget_data_get(obj);
return wd->option;
}
/**
* Set the option used for the background color
*
@ -249,6 +286,26 @@ elm_bg_color_set(Evas_Object *obj, int r, int g, int b)
evas_object_color_set(wd->rect, r, g, b, 255);
}
/**
* Get the option used for the background color
*
* @param obj The bg object
* @param r
* @param g
* @param b
*
* @ingroup Bg
*/
EAPI void
elm_bg_color_get(const Evas_Object *obj, int *r, int *g, int *b)
{
ELM_CHECK_WIDTYPE(obj, widtype);
Widget_Data *wd;
wd = elm_widget_data_get(obj);
evas_object_color_get(wd->rect, r, g, b, NULL);
}
/**
* Set the overlay object used for the background object.
*

View File

@ -407,6 +407,23 @@ elm_box_horizontal_set(Evas_Object *obj, Eina_Bool horizontal)
}*/
}
/**
* Get the horizontal orientation
*
* @param obj The box object
* @return If is horizontal
*
* @ingroup Box
*/
EAPI Eina_Bool
elm_box_horizontal_get(const Evas_Object *obj)
{
ELM_CHECK_WIDTYPE(obj, widtype) EINA_FALSE;
Widget_Data *wd = elm_widget_data_get(obj);
if (!wd) return EINA_FALSE;
return wd->horizontal;
}
/**
* Set homogenous layout
*
@ -446,6 +463,23 @@ elm_box_homogenous_set(Evas_Object *obj, Eina_Bool homogenous)
}*/
}
/**
* Get homogenous layout
*
* @param obj The box object
* @return If is homogenous
*
* @ingroup Box
*/
EAPI Eina_Bool
elm_box_homogenous_get(const Evas_Object *obj)
{
ELM_CHECK_WIDTYPE(obj, widtype) EINA_FALSE;
Widget_Data *wd = elm_widget_data_get(obj);
if (!wd) return EINA_FALSE;
return wd->homogeneous;
}
/**
* This adds a box at the start of the box (top or left based on orientation)
*
@ -787,8 +821,8 @@ elm_box_children_get(const Evas_Object *obj)
*
* @ingroup Box
*/
EAPI void
elm_box_padding_set(const Evas_Object *obj, Evas_Coord horizontal, Evas_Coord vertical)
EAPI void
elm_box_padding_set(Evas_Object *obj, Evas_Coord horizontal, Evas_Coord vertical)
{
ELM_CHECK_WIDTYPE(obj, widtype);
Widget_Data *wd = elm_widget_data_get(obj);
@ -796,6 +830,24 @@ elm_box_padding_set(const Evas_Object *obj, Evas_Coord horizontal, Evas_Coord ve
evas_object_box_padding_set(wd->box, horizontal, vertical);
}
/**
* Get the space (padding) between the box's elements.
*
* @param obj The Elm_Box
* @param horizontal The horizontal space between elements
* @param vertical The vertical space between elements
*
* @ingroup Box
*/
EAPI void
elm_box_padding_get(const Evas_Object *obj, Evas_Coord *horizontal, Evas_Coord *vertical)
{
ELM_CHECK_WIDTYPE(obj, widtype);
Widget_Data *wd = elm_widget_data_get(obj);
if (!wd) return;
evas_object_box_padding_get(wd->box, horizontal, vertical);
}
/**
* Set the alignment of the whole bouding box of contents.
*
@ -805,11 +857,29 @@ elm_box_padding_set(const Evas_Object *obj, Evas_Coord horizontal, Evas_Coord ve
*
* @ingroup Box
*/
EAPI void
elm_box_align_set(const Evas_Object *obj, double horizontal, double vertical)
EAPI void
elm_box_align_set(Evas_Object *obj, double horizontal, double vertical)
{
ELM_CHECK_WIDTYPE(obj, widtype);
Widget_Data *wd = elm_widget_data_get(obj);
if (!wd) return;
evas_object_box_align_set(wd->box, horizontal, vertical);
}
/**
* Get the alignment of the whole bouding box of contents.
*
* @param obj The Elm_Box
* @param horizontal The horizontal alignment of elements
* @param vertical The vertical alignment of elements
*
* @ingroup Box
*/
EAPI void
elm_box_align_get(const Evas_Object *obj, double *horizontal, double *vertical)
{
ELM_CHECK_WIDTYPE(obj, widtype);
Widget_Data *wd = elm_widget_data_get(obj);
if (!wd) return;
evas_object_box_align_get(wd->box, horizontal, vertical);
}

View File

@ -188,6 +188,24 @@ elm_icon_file_set(Evas_Object *obj, const char *file, const char *group)
return ret;
}
/**
* Get the file that will be used as icon
*
* @param obj The icon object
* @param file The path to file that will be used as icon
* @param group The group that the icon belongs in edje file
*
* @ingroup Icon
*/
EAPI void
elm_icon_file_get(const Evas_Object *obj, const char **file, const char **group)
{
ELM_CHECK_WIDTYPE(obj, widtype);
Widget_Data *wd = elm_widget_data_get(obj);
if (!wd) return;
_els_smart_icon_file_get(wd->img, file, group);
}
static Eina_Bool
_icon_standard_set(Widget_Data *wd, Evas_Object *obj, const char *name)
{
@ -295,6 +313,23 @@ elm_icon_standard_set(Evas_Object *obj, const char *name)
return EINA_FALSE;
}
/**
* Get the theme, as standard, for a icon
*
* @param obj The icon object
* @return The theme name
*
* @ingroup Icon
*/
EAPI const char *
elm_icon_standard_get(const Evas_Object *obj)
{
ELM_CHECK_WIDTYPE(obj, widtype) NULL;
Widget_Data *wd = elm_widget_data_get(obj);
if (!wd) return NULL;
return wd->stdicon;
}
/**
* Sets icon lookup order, used by elm_icon_standard_set().
*
@ -348,6 +383,24 @@ elm_icon_smooth_set(Evas_Object *obj, Eina_Bool smooth)
_sizing_eval(obj);
}
/**
* Get the smooth effect for a icon
*
* @param obj The icon object
* @return If setted smooth effect
*
* @ingroup Icon
*/
EAPI Eina_Bool
elm_icon_smooth_get(const Evas_Object *obj)
{
ELM_CHECK_WIDTYPE(obj, widtype) EINA_FALSE;
Widget_Data *wd = elm_widget_data_get(obj);
if (!wd) return EINA_FALSE;
return wd->smooth;
}
/**
* Set if the object is scalable
*
@ -368,6 +421,23 @@ elm_icon_no_scale_set(Evas_Object *obj, Eina_Bool no_scale)
_sizing_eval(obj);
}
/**
* Get if the object isn't scalable
*
* @param obj The icon object
* @return If isn't scalable
*
* @ingroup Icon
*/
EAPI Eina_Bool
elm_icon_no_scale_get(const Evas_Object *obj)
{
ELM_CHECK_WIDTYPE(obj, widtype) EINA_FALSE;
Widget_Data *wd = elm_widget_data_get(obj);
if (!wd) return EINA_FALSE;
return wd->no_scale;
}
/**
* Set if the object is (up/down) scalable
*
@ -389,6 +459,25 @@ elm_icon_scale_set(Evas_Object *obj, Eina_Bool scale_up, Eina_Bool scale_down)
_sizing_eval(obj);
}
/**
* Get if the object is (up/down) scalable
*
* @param obj The icon object
* @param scale_up A bool to set if the object is scalable up
* @param scale_down A bool to set if the object is scalable down
*
* @ingroup Icon
*/
EAPI void
elm_icon_scale_get(const Evas_Object *obj, Eina_Bool *scale_up, Eina_Bool *scale_down)
{
ELM_CHECK_WIDTYPE(obj, widtype);
Widget_Data *wd = elm_widget_data_get(obj);
if (!wd) return;
if (scale_up) *scale_up = wd->scale_up;
if (scale_down) *scale_down = wd->scale_down;
}
/**
* Set if the object is filled outside
*
@ -409,6 +498,23 @@ elm_icon_fill_outside_set(Evas_Object *obj, Eina_Bool fill_outside)
_sizing_eval(obj);
}
/**
* Get if the object is filled outside
*
* @param obj The icon object
* @return If the object is filled outside
*
* @ingroup Icon
*/
EAPI Eina_Bool
elm_icon_fill_outside_get(const Evas_Object *obj)
{
ELM_CHECK_WIDTYPE(obj, widtype) EINA_FALSE;
Widget_Data *wd = elm_widget_data_get(obj);
if (!wd) return EINA_FALSE;
return wd->fill_outside;
}
/**
* Set the prescale size for the icon
@ -428,4 +534,20 @@ elm_icon_prescale_set(Evas_Object *obj, int size)
_els_smart_icon_scale_size_set(wd->img, size);
}
/**
* Get the prescale size for the icon
*
* @param obj The icon object
* @return The prescale size
*
* @ingroup Icon
*/
EAPI int
elm_icon_prescale_get(const Evas_Object *obj)
{
ELM_CHECK_WIDTYPE(obj, widtype) 0;
Widget_Data *wd = elm_widget_data_get(obj);
if (!wd) return 0;
return _els_smart_icon_scale_size_get(wd->img);
}

View File

@ -170,6 +170,24 @@ elm_image_file_set(Evas_Object *obj, const char *file, const char *group)
return ret;
}
/**
* Get the file that will be used as image
*
* @param obj The image object
* @param file The path to file
* @param group The group that the image belongs in edje file
*
* @ingroup Image
*/
EAPI void
elm_image_file_get(const Evas_Object *obj, const char **file, const char **group)
{
ELM_CHECK_WIDTYPE(obj, widtype);
Widget_Data *wd = elm_widget_data_get(obj);
if (!wd) return;
_els_smart_icon_file_get(wd->img, file, group);
}
/**
* Set the smooth effect for a image
*
@ -190,6 +208,24 @@ elm_image_smooth_set(Evas_Object *obj, Eina_Bool smooth)
_sizing_eval(obj);
}
/**
* Get the smooth effect for a image
*
* @param obj The image object
* @return If setted smooth effect
*
* @ingroup Image
*/
EAPI Eina_Bool
elm_image_smooth_get(const Evas_Object *obj)
{
ELM_CHECK_WIDTYPE(obj, widtype) EINA_FALSE;
Widget_Data *wd = elm_widget_data_get(obj);
if (!wd) return EINA_FALSE;
return wd->smooth;
}
/**
* Gets the current size of the image.
*
@ -232,6 +268,23 @@ elm_image_no_scale_set(Evas_Object *obj, Eina_Bool no_scale)
}
/**
* Get if the object isn't scalable
*
* @param obj The image object
* @return If isn't scalable
*
* @ingroup Image
*/
EAPI Eina_Bool
elm_image_no_scale_get(const Evas_Object *obj)
{
ELM_CHECK_WIDTYPE(obj, widtype) EINA_FALSE;
Widget_Data *wd = elm_widget_data_get(obj);
if (!wd) return EINA_FALSE;
return wd->no_scale;
}
/**
* Set if the object is (up/down) scalable
*
@ -253,6 +306,25 @@ elm_image_scale_set(Evas_Object *obj, Eina_Bool scale_up, Eina_Bool scale_down)
_sizing_eval(obj);
}
/**
* Get if the object is (up/down) scalable
*
* @param obj The image object
* @param scale_up A bool to set if the object is scalable up
* @param scale_down A bool to set if the object is scalable down
*
* @ingroup Image
*/
EAPI void
elm_image_scale_get(const Evas_Object *obj, Eina_Bool *scale_up, Eina_Bool *scale_down)
{
ELM_CHECK_WIDTYPE(obj, widtype);
Widget_Data *wd = elm_widget_data_get(obj);
if (!wd) return;
if (scale_up) *scale_up = wd->scale_up;
if (scale_down) *scale_down = wd->scale_down;
}
/**
* Set if the object is filled outside
*
@ -273,6 +345,24 @@ elm_image_fill_outside_set(Evas_Object *obj, Eina_Bool fill_outside)
_sizing_eval(obj);
}
/**
* Get if the object is filled outside
*
* @param obj The image object
* @return If the object is filled outside
*
* @ingroup Image
*/
EAPI Eina_Bool
elm_image_fill_outside_get(const Evas_Object *obj)
{
ELM_CHECK_WIDTYPE(obj, widtype) EINA_FALSE;
Widget_Data *wd = elm_widget_data_get(obj);
if (!wd) return EINA_FALSE;
return wd->fill_outside;
}
/**
* Set the prescale size for the image
*
@ -291,6 +381,24 @@ elm_image_prescale_set(Evas_Object *obj, int size)
_els_smart_icon_scale_size_set(wd->img, size);
}
/**
* Get the prescale size for the image
*
* @param obj The image object
* @return The prescale size
*
* @ingroup Image
*/
EAPI int
elm_image_prescale_get(const Evas_Object *obj)
{
ELM_CHECK_WIDTYPE(obj, widtype) 0;
Widget_Data *wd = elm_widget_data_get(obj);
if (!wd) return 0;
return _els_smart_icon_scale_size_get(wd->img);
}
/**
* Set the image orient
*
@ -313,6 +421,27 @@ elm_image_orient_set(Evas_Object *obj, Elm_Image_Orient orient)
_els_smart_icon_orient_set(wd->img, orient);
}
/**
* Get the image orient
*
* @param obj The image object
* @return The image orient
* (ELM_IMAGE_ORIENT_NONE, ELM_IMAGE_ROTATE_90_CW,
* ELM_IMAGE_ROTATE_180_CW, ELM_IMAGE_ROTATE_90_CCW,
* ELM_IMAGE_FLIP_HORIZONTAL,ELM_IMAGE_FLIP_VERTICAL,
* ELM_IMAGE_FLIP_TRANSPOSE, ELM_IMAGE_FLIP_TRANSVERSE)
*
* @ingroup Image
*/
EAPI Elm_Image_Orient
elm_image_orient_get(const Evas_Object *obj)
{
ELM_CHECK_WIDTYPE(obj, widtype) ELM_IMAGE_ORIENT_NONE;
Widget_Data *wd = elm_widget_data_get(obj);
if (!wd) return ELM_IMAGE_ORIENT_NONE;
return _els_smart_icon_orient_get(wd->img);
}
/**
* Make the image 'editable'.
*
@ -328,9 +457,27 @@ elm_image_editable_set(Evas_Object *obj, Eina_Bool set)
ELM_CHECK_WIDTYPE(obj, widtype);
Widget_Data *wd = elm_widget_data_get(obj);
if (!wd) return;;
if (!wd) return;
_els_smart_icon_edit_set(wd->img, set, obj);
}
/**
* Make the image 'editable'.
*
* This means the image is a valid drag target for drag and drop, and can be
* cut or pasted too.
*
* @param obj Image object.
* @return Editability.
*/
EAPI Eina_Bool
elm_image_editable_get(const Evas_Object *obj)
{
ELM_CHECK_WIDTYPE(obj, widtype) EINA_FALSE;
Widget_Data *wd = elm_widget_data_get(obj);
if (!wd) return EINA_FALSE;
return _els_smart_icon_edit_get(wd->img);
}
/* vim:set ts=8 sw=3 sts=3 expandtab cino=>5n-2f0^-2{2(0W1st0 :*/

View File

@ -432,6 +432,12 @@ elm_quicklaunch_mode_set(Eina_Bool ql_on)
quicklaunch_on = ql_on;
}
EAPI Eina_Bool
elm_quicklaunch_mode_get(void)
{
return quicklaunch_on;
}
EAPI int
elm_quicklaunch_init(int argc, char **argv)
{
@ -1220,7 +1226,7 @@ elm_scale_all_set(double scale)
* @ingroup Profile
*/
EAPI const char *
elm_profile_current_get(void)
elm_profile_get(void)
{
return _elm_config_current_profile_get();
}

View File

@ -1178,6 +1178,24 @@ elm_win_title_set(Evas_Object *obj, const char *title)
ecore_evas_title_set(win->ee, title);
}
/**
* Get the title of the window
*
* @param obj The window object
* @return The title
*
* @ingroup Win
*/
EAPI const char *
elm_win_title_get(const Evas_Object *obj)
{
Elm_Win *win;
ELM_CHECK_WIDTYPE(obj, widtype) NULL;
win = elm_widget_data_get(obj);
if (!win) return NULL;
return ecore_evas_title_get(win->ee);
}
/**
* Set the window's autodel state.
*
@ -1196,6 +1214,24 @@ elm_win_autodel_set(Evas_Object *obj, Eina_Bool autodel)
win->autodel = autodel;
}
/**
* Get the window's autodel state.
*
* @param obj The window object
* @return If the window will automatically delete itself when closed
*
* @ingroup Win
*/
EAPI Eina_Bool
elm_win_autodel_get(const Evas_Object *obj)
{
Elm_Win *win;
ELM_CHECK_WIDTYPE(obj, widtype) EINA_FALSE;
win = elm_widget_data_get(obj);
if (!win) return EINA_FALSE;
return win->autodel;
}
/**
* Activate a window object.
*
@ -1790,6 +1826,40 @@ elm_win_keyboard_mode_set(Evas_Object *obj, Elm_Win_Keyboard_Mode mode)
#endif
}
/**
* Gets the keyboard mode of the window.
*
* @param obj The window object
* @return The mode; one of:
* ELM_WIN_KEYBOARD_UNKNOWN
* ELM_WIN_KEYBOARD_OFF
* ELM_WIN_KEYBOARD_ON
* ELM_WIN_KEYBOARD_ALPHA
* ELM_WIN_KEYBOARD_NUMERIC
* ELM_WIN_KEYBOARD_PIN
* ELM_WIN_KEYBOARD_PHONE_NUMBER
* ELM_WIN_KEYBOARD_HEX
* ELM_WIN_KEYBOARD_TERMINAL
* ELM_WIN_KEYBOARD_PASSWORD
* ELM_WIN_KEYBOARD_IP
* ELM_WIN_KEYBOARD_HOST
* ELM_WIN_KEYBOARD_FILE
* ELM_WIN_KEYBOARD_URL
* ELM_WIN_KEYBOARD_KEYPAD
* ELM_WIN_KEYBOARD_J2ME
*
* @ingroup Win
*/
EAPI Elm_Win_Keyboard_Mode
elm_win_keyboard_mode_get(const Evas_Object *obj)
{
Elm_Win *win;
ELM_CHECK_WIDTYPE(obj, widtype) ELM_WIN_KEYBOARD_UNKNOWN;
win = elm_widget_data_get(obj);
if (!win) return ELM_WIN_KEYBOARD_UNKNOWN;
return win->kbdmode;
}
/**
* Sets whether the window is a keyboard.
*
@ -1812,6 +1882,29 @@ elm_win_keyboard_win_set(Evas_Object *obj, Eina_Bool is_keyboard)
#endif
}
/**
* Gets whether the window is a keyboard.
*
* @param obj The window object
* @return If the window is a virtual keyboard
*
* @ingroup Win
*/
EAPI Eina_Bool
elm_win_keyboard_win_get(const Evas_Object *obj)
{
Elm_Win *win;
ELM_CHECK_WIDTYPE(obj, widtype) EINA_FALSE;
win = elm_widget_data_get(obj);
if (!win) return EINA_FALSE;
#ifdef HAVE_ELEMENTARY_X
_elm_win_xwindow_get(win);
if (win->xwin)
return ecore_x_e_virtual_keyboard_get(win->xwin);
#endif
return EINA_FALSE;
}
/**
* Get the screen position of a window.
*
@ -2047,6 +2140,29 @@ elm_win_quickpanel_zone_set(Evas_Object *obj, int zone)
#endif
}
/**
* Get which zone this quickpanel should appear in
*
* @param obj The window object
* @return The requested zone for this quickpanel
*
* @ingroup Win
*/
EAPI int
elm_win_quickpanel_zone_get(const Evas_Object *obj)
{
Elm_Win *win;
ELM_CHECK_WIDTYPE(obj, widtype) 0;
win = elm_widget_data_get(obj);
if (!win) return 0;
#ifdef HAVE_ELEMENTARY_X
_elm_win_xwindow_get(win);
if (win->xwin)
return ecore_x_e_illume_quickpanel_zone_get(win->xwin);
#endif
return 0;
}
/**
* Set the enabled status for the focus highlight in a window
*