Some missing getters...

I'm working on edje_externals param_get/param_set and they will need
these functions.



SVN revision: 47450
This commit is contained in:
Gustavo Sverzut Barbieri 2010-03-25 17:27:00 +00:00
parent 59961838f1
commit f48ba4fb22
5 changed files with 201 additions and 2 deletions

View File

@ -465,6 +465,7 @@ extern "C" {
EAPI void elm_toggle_icon_set(Evas_Object *obj, Evas_Object *icon);
EAPI Evas_Object *elm_toggle_icon_get(const Evas_Object *obj);
EAPI void elm_toggle_states_labels_set(Evas_Object *obj, const char *onlabel, const char *offlabel);
EAPI void elm_toggle_states_labels_get(const Evas_Object *obj, const char **onlabel, const char **offlabel);
EAPI void elm_toggle_state_set(Evas_Object *obj, Eina_Bool state);
EAPI Eina_Bool elm_toggle_state_get(const Evas_Object *obj);
EAPI void elm_toggle_state_pointer_set(Evas_Object *obj, Eina_Bool *statep);
@ -572,7 +573,9 @@ extern "C" {
typedef struct _Elm_Hoversel_Item Elm_Hoversel_Item;
EAPI Evas_Object *elm_entry_add(Evas_Object *parent);
EAPI void elm_entry_single_line_set(Evas_Object *obj, Eina_Bool single_line);
EAPI Eina_Bool elm_entry_single_line_get(const Evas_Object *obj);
EAPI void elm_entry_password_set(Evas_Object *obj, Eina_Bool password);
EAPI Eina_Bool elm_entry_password_get(const Evas_Object *obj);
EAPI void elm_entry_entry_set(Evas_Object *obj, const char *entry);
EAPI const char *elm_entry_entry_get(const Evas_Object *obj);
EAPI const char *elm_entry_selection_get(const Evas_Object *obj);
@ -580,6 +583,7 @@ extern "C" {
EAPI void elm_entry_line_wrap_set(Evas_Object *obj, Eina_Bool wrap);
EAPI void elm_entry_line_char_wrap_set(Evas_Object *obj, Eina_Bool wrap);
EAPI void elm_entry_editable_set(Evas_Object *obj, Eina_Bool editable);
EAPI Eina_Bool elm_entry_editable_get(const Evas_Object *obj);
EAPI void elm_entry_select_none(Evas_Object *obj);
EAPI void elm_entry_select_all(Evas_Object *obj);
EAPI Eina_Bool elm_entry_cursor_next(Evas_Object *obj);
@ -856,14 +860,20 @@ extern "C" {
EAPI void elm_slider_icon_set(Evas_Object *obj, Evas_Object *icon);
EAPI Evas_Object *elm_slider_icon_get(const Evas_Object *obj);
EAPI void elm_slider_span_size_set(Evas_Object *obj, Evas_Coord size);
EAPI int elm_slider_span_size_get(const Evas_Object *obj);
EAPI void elm_slider_unit_format_set(Evas_Object *obj, const char *format);
EAPI const char *elm_slider_unit_format_get(const Evas_Object *obj);
EAPI void elm_slider_indicator_format_set(Evas_Object *obj, const char *indicator);
EAPI const char *elm_slider_indicator_format_get(const Evas_Object *obj);
EAPI void elm_slider_indicator_format_function_set(Evas_Object *obj, const char *(*func)(double val));
EAPI void elm_slider_horizontal_set(Evas_Object *obj, Eina_Bool horizontal);
EAPI Eina_Bool elm_slider_horizontal_get(const Evas_Object *obj);
EAPI void elm_slider_min_max_set(Evas_Object *obj, double min, double max);
EAPI void elm_slider_min_max_get(const Evas_Object *obj, double *min, double *max);
EAPI void elm_slider_value_set(Evas_Object *obj, double val);
EAPI double elm_slider_value_get(const Evas_Object *obj);
EAPI void elm_slider_inverted_set(Evas_Object *obj, Eina_Bool inverted);
EAPI Eina_Bool elm_slider_inverted_get(const Evas_Object *obj);
typedef enum _Elm_Genlist_Item_Flags
{
@ -1268,7 +1278,9 @@ extern "C" {
EAPI Evas_Object *elm_scrolled_entry_add(Evas_Object *parent);
EAPI void elm_scrolled_entry_single_line_set(Evas_Object *obj, Eina_Bool single_line);
EAPI Eina_Bool elm_scrolled_entry_single_line_get(const Evas_Object *obj);
EAPI void elm_scrolled_entry_password_set(Evas_Object *obj, Eina_Bool password);
EAPI Eina_Bool elm_scrolled_entry_password_get(const Evas_Object *obj);
EAPI void elm_scrolled_entry_entry_set(Evas_Object *obj, const char *entry);
EAPI const char *elm_scrolled_entry_entry_get(const Evas_Object *obj);
EAPI const char *elm_scrolled_entry_selection_get(const Evas_Object *obj);
@ -1276,6 +1288,7 @@ extern "C" {
EAPI void elm_scrolled_entry_line_wrap_set(Evas_Object *obj, Eina_Bool wrap);
EAPI void elm_scrolled_entry_line_char_wrap_set(Evas_Object *obj, Eina_Bool wrap);
EAPI void elm_scrolled_entry_editable_set(Evas_Object *obj, Eina_Bool editable);
EAPI Eina_Bool elm_scrolled_entry_editable_get(const Evas_Object *obj);
EAPI void elm_scrolled_entry_select_none(Evas_Object *obj);
EAPI void elm_scrolled_entry_select_all(Evas_Object *obj);
EAPI Eina_Bool elm_scrolled_entry_cursor_next(Evas_Object *obj);

View File

@ -209,6 +209,15 @@ elm_scrolled_entry_single_line_set(Evas_Object *obj, Eina_Bool single_line)
}
}
EAPI Eina_Bool
elm_scrolled_entry_single_line_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 elm_entry_single_line_get(wd->entry);
}
EAPI void
elm_scrolled_entry_password_set(Evas_Object *obj, Eina_Bool password)
{
@ -218,6 +227,15 @@ elm_scrolled_entry_password_set(Evas_Object *obj, Eina_Bool password)
elm_entry_password_set(wd->entry, password);
}
EAPI Eina_Bool
elm_scrolled_entry_password_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 elm_entry_password_get(wd->entry);
}
EAPI void
elm_scrolled_entry_entry_set(Evas_Object *obj, const char *entry)
{
@ -281,6 +299,15 @@ elm_scrolled_entry_editable_set(Evas_Object *obj, Eina_Bool editable)
elm_entry_editable_set(wd->entry, editable);
}
EAPI Eina_Bool
elm_scrolled_entry_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 elm_entry_editable_get(wd->entry);
}
EAPI void
elm_scrolled_entry_select_none(Evas_Object *obj)
{

View File

@ -1197,6 +1197,15 @@ elm_entry_single_line_set(Evas_Object *obj, Eina_Bool single_line)
_sizing_eval(obj);
}
EAPI Eina_Bool
elm_entry_single_line_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->single_line;
}
EAPI void
elm_entry_password_set(Evas_Object *obj, Eina_Bool password)
{
@ -1216,6 +1225,15 @@ elm_entry_password_set(Evas_Object *obj, Eina_Bool password)
_sizing_eval(obj);
}
EAPI Eina_Bool
elm_entry_password_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->password;
}
EAPI void
elm_entry_entry_set(Evas_Object *obj, const char *entry)
{
@ -1320,6 +1338,15 @@ elm_entry_editable_set(Evas_Object *obj, Eina_Bool editable)
_sizing_eval(obj);
}
EAPI Eina_Bool
elm_entry_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 wd->editable;
}
EAPI void
elm_entry_select_none(Evas_Object *obj)
{

View File

@ -414,7 +414,7 @@ elm_slider_icon_get(const Evas_Object *obj)
/**
* Set the length of the dragable region of the slider
*
* Thois sets the minimum width or height (depending on orientation) of the
* This sets the minimum width or height (depending on orientation) of the
* area of the slider that allows the slider to be dragged around. This in
* turn affects the objects minimum size (along with icon label and unit
* text). Note that this will also get multiplied by the scale factor.
@ -440,6 +440,28 @@ elm_slider_span_size_set(Evas_Object *obj, Evas_Coord size)
_sizing_eval(obj);
}
/**
* Get the length of the dragable region of the slider
*
* This gets the minimum width or height (depending on orientation) of
* the area of the slider that allows the slider to be dragged
* around. Note that this will also get multiplied by the scale
* factor.
*
* @param obj The slider object
* @return The length of the slider area
*
* @ingroup Slider
*/
EAPI int
elm_slider_span_size_get(const Evas_Object *obj)
{
ELM_CHECK_WIDTYPE(obj, widtype) 0;
Widget_Data *wd = elm_widget_data_get(obj);
if (!wd) return 0;
return wd->size;
}
/**
* Set the format string of the unit area
*
@ -475,7 +497,29 @@ elm_slider_unit_format_set(Evas_Object *obj, const char *units)
}
/**
* Set the format string for the inducator area
* Get the format string for the unit area
*
* The slider may also display a value (the value of the slider) somewhere
* (for example above the slider knob that is dragged around). This sets the
* format string for this. See elm_slider_unit_format_set() for more
* information on how this works.
*
* @param obj The slider object
* @return The format string for the unit display.
*
* @ingroup Slider
*/
EAPI const char *
elm_slider_unit_format_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->units;
}
/**
* Set the format string for the indicator area
*
* The slider may also display a value (the value of the slider) somewhere
* (for example above the slider knob that is dragged around). This sets the
@ -497,6 +541,28 @@ elm_slider_indicator_format_set(Evas_Object *obj, const char *indicator)
_indicator_set(obj);
}
/**
* Get the format string for the indicator area
*
* The slider may also display a value (the value of the slider) somewhere
* (for example above the slider knob that is dragged around). This sets the
* format string for this. See elm_slider_indicator_format_set() for more
* information on how this works.
*
* @param obj The slider object
* @return The format string for the indicator display.
*
* @ingroup Slider
*/
EAPI const char *
elm_slider_indicator_format_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->indicator;
}
/**
* Set orientation of the slider
*
@ -517,6 +583,23 @@ elm_slider_horizontal_set(Evas_Object *obj, Eina_Bool horizontal)
_theme_hook(obj);
}
/**
* Get orientation of the slider
*
* @param obj The slider object
* @return If @c EINA_TRUE the slider will be horizontal, else it is
* vertical.
* @ingroup Slider
*/
EAPI Eina_Bool
elm_slider_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 the minimum and maximum values for the slider
*
@ -544,6 +627,27 @@ elm_slider_min_max_set(Evas_Object *obj, double min, double max)
_indicator_set(obj);
}
/**
* Get the minimum and maximum values for the slider
*
* @param obj The slider object
* @param min The pointer to store minimum value, may be @c NULL.
* @param max The pointer to store maximum value, may be @c NULL.
*
* @ingroup Slider
*/
EAPI void
elm_slider_min_max_get(const Evas_Object *obj, double *min, double *max)
{
if (min) *min = 0.0;
if (max) *max = 0.0;
ELM_CHECK_WIDTYPE(obj, widtype);
Widget_Data *wd = elm_widget_data_get(obj);
if (!wd) return;
if (min) *min = wd->val_min;
if (max) *max = wd->val_max;
}
/**
* Set the value the slider indicates
*
@ -616,6 +720,22 @@ elm_slider_inverted_set(Evas_Object *obj, Eina_Bool inverted)
_indicator_set(obj);
}
/**
* Get if the slider display is inverted (backwards)
*
* @param obj The slider object
* @return If @c EINA_TRUE the slider will be inverted.
* @ingroup Slider
*/
EAPI Eina_Bool
elm_slider_inverted_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->inverted;
}
/**
* Set the format function pointer for the inducator area
*

View File

@ -231,6 +231,18 @@ elm_toggle_states_labels_set(Evas_Object *obj, const char *onlabel, const char *
_sizing_eval(obj);
}
EAPI void
elm_toggle_states_labels_get(const Evas_Object *obj, const char **onlabel, const char **offlabel)
{
if (onlabel) *onlabel = NULL;
if (offlabel) *offlabel = NULL;
ELM_CHECK_WIDTYPE(obj, widtype);
Widget_Data *wd = elm_widget_data_get(obj);
if (!wd) return;
if (onlabel) *onlabel = wd->ontext;
if (offlabel) *offlabel = wd->offtext;
}
EAPI void
elm_toggle_state_set(Evas_Object *obj, Eina_Bool state)
{