widget: Rename orientation_mode_disabled
Name is stupid and long, why not just invert this bool?
This commit is contained in:
parent
6296d3815f
commit
f312ed6db9
|
@ -3456,11 +3456,11 @@ elm_widget_display_mode_set(Evas_Object *obj, Evas_Display_Mode dispmode)
|
|||
}
|
||||
|
||||
EOLIAN static void
|
||||
_efl_ui_widget_orientation_mode_disabled_set(Eo *obj, Elm_Widget_Smart_Data *sd, Eina_Bool disabled)
|
||||
_efl_ui_widget_orientation_mode_set(Eo *obj, Elm_Widget_Smart_Data *sd, Eina_Bool enabled)
|
||||
{
|
||||
int orient_mode = -1;
|
||||
|
||||
if (!disabled)
|
||||
if (enabled)
|
||||
{
|
||||
//Get current orient mode from it's parent otherwise, 0.
|
||||
sd->orient_mode = 0;
|
||||
|
@ -3472,10 +3472,10 @@ _efl_ui_widget_orientation_mode_disabled_set(Eo *obj, Elm_Widget_Smart_Data *sd,
|
|||
}
|
||||
|
||||
EOLIAN static Eina_Bool
|
||||
_efl_ui_widget_orientation_mode_disabled_get(Eo *obj EINA_UNUSED, Elm_Widget_Smart_Data *sd)
|
||||
_efl_ui_widget_orientation_mode_get(Eo *obj EINA_UNUSED, Elm_Widget_Smart_Data *sd)
|
||||
{
|
||||
if (sd->orient_mode == -1) return EINA_TRUE;
|
||||
else return EINA_FALSE;
|
||||
if (sd->orient_mode == -1) return EINA_FALSE;
|
||||
else return EINA_TRUE;
|
||||
}
|
||||
|
||||
EOLIAN static void
|
||||
|
|
|
@ -112,8 +112,8 @@ abstract Efl.Ui.Widget (Efl.Canvas.Group, Efl.Access,
|
|||
return: bool; [[$true on success, $false otherwise]]
|
||||
legacy: null;
|
||||
}
|
||||
@property orientation_mode_disabled {
|
||||
[[Whether the widget's automatic orientation is disabled or not.
|
||||
@property orientation_mode {
|
||||
[[Whether the widget's automatic orientation is enabled or not.
|
||||
|
||||
Orientation mode is used for widgets to change their style or send
|
||||
signals based on the canvas rotation (i.e. the window orientation).
|
||||
|
@ -123,11 +123,10 @@ abstract Efl.Ui.Widget (Efl.Canvas.Group, Efl.Access,
|
|||
the theme in order to provide a different look for the widget based
|
||||
on the canvas orientation.
|
||||
|
||||
By default orientation mode is enabled, which means this property
|
||||
is $false.
|
||||
By default orientation mode is enabled, i.e. this is $true.
|
||||
]]
|
||||
values {
|
||||
disabled: bool(false); [[$true if the orientation mode is disabled.]]
|
||||
disabled: bool(true); [[$false if orientation mode is disabled.]]
|
||||
}
|
||||
}
|
||||
// FIXME: focus_allow? can_focus? focusable?
|
||||
|
@ -271,20 +270,18 @@ abstract Efl.Ui.Widget (Efl.Canvas.Group, Efl.Access,
|
|||
This method will be called recursively from the top widget (the
|
||||
window) to all the children objects whenever the window rotation
|
||||
is changed. The given $rotation will be one of 0, 90, 180, 270 or
|
||||
the special value -1 if @.orientation_mode_disabled is $true.
|
||||
the special value -1 if @.orientation_mode is $false.
|
||||
|
||||
If @.orientation_mode_disabled is $false, the default implementation
|
||||
If @.orientation_mode is $true, the default implementation
|
||||
will emit the signal "elm,state,orient,$R" will be emitted (where $R
|
||||
is the rotation angle in degrees).
|
||||
|
||||
Note: This function may be called even if the orientation has not
|
||||
actually changed, like when a widget needs to be reconfigured.
|
||||
|
||||
See also @Efl.Orientation.orientation.set.
|
||||
]]
|
||||
params {
|
||||
rotation: int; [[Orientation in degrees: 0, 90, 180, 270 or -1 if
|
||||
@.orientation_mode_disabled is $true.]]
|
||||
@.orientation_mode is $false.]]
|
||||
}
|
||||
}
|
||||
on_disabled_update @protected {
|
||||
|
|
|
@ -2051,13 +2051,13 @@ elm_object_name_find(const Evas_Object *obj, const char *name, int recurse)
|
|||
EAPI void
|
||||
elm_object_orientation_mode_disabled_set(Evas_Object *obj, Eina_Bool disabled)
|
||||
{
|
||||
elm_widget_orientation_mode_disabled_set(obj, disabled);
|
||||
efl_ui_widget_orientation_mode_set(obj, !disabled);
|
||||
}
|
||||
|
||||
EAPI Eina_Bool
|
||||
elm_object_orientation_mode_disabled_get(const Evas_Object *obj)
|
||||
{
|
||||
return elm_widget_orientation_mode_disabled_get(obj);
|
||||
return !efl_ui_widget_orientation_mode_get(obj);
|
||||
}
|
||||
|
||||
EAPI Elm_Object_Item *
|
||||
|
|
|
@ -736,8 +736,6 @@ EAPI Evas_Object *elm_widget_content_part_get(const Evas_Object *obj, const
|
|||
EAPI Evas_Object *elm_widget_content_part_unset(Evas_Object *obj, const char *part);
|
||||
EAPI void elm_widget_access_info_set(Evas_Object *obj, const char *txt);
|
||||
EAPI const char *elm_widget_access_info_get(const Evas_Object *obj);
|
||||
EAPI void elm_widget_orientation_mode_disabled_set(Evas_Object *obj, Eina_Bool disabled);
|
||||
EAPI Eina_Bool elm_widget_orientation_mode_disabled_get(const Evas_Object *obj);
|
||||
EAPI Eina_Rect elm_widget_focus_highlight_geometry_get(const Evas_Object *obj);
|
||||
void _elm_widget_item_highlight_in_theme(Evas_Object *obj, Elm_Object_Item *it);
|
||||
EAPI void elm_widget_focus_region_show_mode_set(Evas_Object *obj, Elm_Focus_Region_Show_Mode mode);
|
||||
|
|
Loading…
Reference in New Issue