efl: Use Eina.Size2D for size hints base & step
This commit is contained in:
parent
a72f3ec64e
commit
6b5d155918
|
@ -22,8 +22,7 @@ interface Efl.Gfx.Size.Hint
|
|||
See also @.hint_step.
|
||||
]]
|
||||
values {
|
||||
w: int; [[The base width.]]
|
||||
h: int; [[The base height.]]
|
||||
sz: Eina.Size2D; [[Base size (hint) in pixels.]]
|
||||
}
|
||||
}
|
||||
@property hint_step {
|
||||
|
@ -38,8 +37,7 @@ interface Efl.Gfx.Size.Hint
|
|||
sizing restrictions.
|
||||
]]
|
||||
values {
|
||||
w: int; [[The stepping width (0 disables).]]
|
||||
h: int; [[The stepping height (0 disables).]]
|
||||
sz: Eina.Size2D; [[Step size (hint) in pixels.]]
|
||||
}
|
||||
}
|
||||
@property hint_aspect {
|
||||
|
|
|
@ -5963,29 +5963,28 @@ _efl_ui_win_efl_gfx_size_hint_hint_aspect_set(Eo *obj EINA_UNUSED, Efl_Ui_Win_Da
|
|||
}
|
||||
|
||||
EOLIAN static void
|
||||
_efl_ui_win_efl_gfx_size_hint_hint_base_set(Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *sd, int w, int h)
|
||||
_efl_ui_win_efl_gfx_size_hint_hint_base_set(Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *sd, Eina_Size2D sz)
|
||||
{
|
||||
sd->size_base_w = w;
|
||||
sd->size_base_h = h;
|
||||
TRAP(sd, size_base_set, w, h);
|
||||
sd->size_base_w = sz.w;
|
||||
sd->size_base_h = sz.h;
|
||||
TRAP(sd, size_base_set, sz.w, sz.h);
|
||||
#ifdef HAVE_ELEMENTARY_X
|
||||
_elm_win_xwin_update(sd);
|
||||
#endif
|
||||
}
|
||||
|
||||
EOLIAN static void
|
||||
_efl_ui_win_efl_gfx_size_hint_hint_base_get(Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *sd, int *w, int *h)
|
||||
EOLIAN static Eina_Size2D
|
||||
_efl_ui_win_efl_gfx_size_hint_hint_base_get(Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *sd)
|
||||
{
|
||||
if (w) *w = sd->size_base_w;
|
||||
if (h) *h = sd->size_base_h;
|
||||
return EINA_SIZE2D(sd->size_base_w, sd->size_base_h);
|
||||
}
|
||||
|
||||
EOLIAN static void
|
||||
_efl_ui_win_efl_gfx_size_hint_hint_step_set(Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *sd, int w, int h)
|
||||
_efl_ui_win_efl_gfx_size_hint_hint_step_set(Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *sd, Eina_Size2D sz)
|
||||
{
|
||||
sd->size_step_w = w;
|
||||
sd->size_step_h = h;
|
||||
TRAP(sd, size_step_set, w, h);
|
||||
sd->size_step_w = sz.w;
|
||||
sd->size_step_h = sz.h;
|
||||
TRAP(sd, size_step_set, sz.w, sz.h);
|
||||
#ifdef HAVE_ELEMENTARY_X
|
||||
_elm_win_xwin_update(sd);
|
||||
#endif
|
||||
|
@ -6008,11 +6007,10 @@ _efl_ui_win_efl_gfx_size_hint_hint_max_set(Eo *obj, Efl_Ui_Win_Data *sd, Eina_Si
|
|||
}
|
||||
}
|
||||
|
||||
EOLIAN static void
|
||||
_efl_ui_win_efl_gfx_size_hint_hint_step_get(Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *sd, int *w, int *h)
|
||||
EOLIAN static Eina_Size2D
|
||||
_efl_ui_win_efl_gfx_size_hint_hint_step_get(Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *sd)
|
||||
{
|
||||
if (w) *w = sd->size_step_w;
|
||||
if (h) *h = sd->size_step_h;
|
||||
return EINA_SIZE2D(sd->size_step_w, sd->size_step_h);
|
||||
}
|
||||
|
||||
EAPI void
|
||||
|
@ -7731,25 +7729,31 @@ elm_win_title_get(const Evas_Object *obj)
|
|||
EAPI void
|
||||
elm_win_size_base_set(Evas_Object *obj, int w, int h)
|
||||
{
|
||||
efl_gfx_size_hint_base_set(obj, w, h);
|
||||
efl_gfx_size_hint_base_set(obj, EINA_SIZE2D(w, h));
|
||||
}
|
||||
|
||||
EAPI void
|
||||
elm_win_size_base_get(const Evas_Object *obj, int *w, int *h)
|
||||
{
|
||||
efl_gfx_size_hint_base_get(obj, w, h);
|
||||
Eina_Size2D sz;
|
||||
sz = efl_gfx_size_hint_base_get(obj);
|
||||
if (w) *w = sz.w;
|
||||
if (h) *h = sz.h;
|
||||
}
|
||||
|
||||
EAPI void
|
||||
elm_win_size_step_set(Evas_Object *obj, int w, int h)
|
||||
{
|
||||
efl_gfx_size_hint_step_set(obj, w, h);
|
||||
efl_gfx_size_hint_step_set(obj, EINA_SIZE2D(w, h));
|
||||
}
|
||||
|
||||
EAPI void
|
||||
elm_win_size_step_get(const Evas_Object *obj, int *w, int *h)
|
||||
{
|
||||
efl_gfx_size_hint_step_get(obj, w, h);
|
||||
Eina_Size2D sz;
|
||||
sz = efl_gfx_size_hint_step_get(obj);
|
||||
if (w) *w = sz.w;
|
||||
if (h) *h = sz.h;
|
||||
}
|
||||
|
||||
EAPI void
|
||||
|
|
Loading…
Reference in New Issue