forked from enlightenment/efl
Efl.Gfx.Size.Hint: add Efl.Gfx.Size.Hint skeletton
create Efl.Gfx.Size.Hint skeletton and change elm_win eo. remove size_step and size_base API from elm_win and inherit from Efl.Gfx.Size.hint
This commit is contained in:
parent
014295fbc9
commit
2bf508836d
|
@ -23,6 +23,7 @@ efl_eolian_files = \
|
|||
lib/efl/interfaces/efl_gfx_gradient_linear.eo \
|
||||
lib/efl/interfaces/efl_gfx_gradient_radial.eo \
|
||||
lib/efl/interfaces/efl_gfx_filter.eo \
|
||||
lib/efl/interfaces/efl_gfx_size_hint.eo \
|
||||
lib/efl/interfaces/efl_model.eo \
|
||||
lib/efl/interfaces/efl_animator.eo \
|
||||
lib/efl/interfaces/efl_orientation.eo \
|
||||
|
|
|
@ -106,6 +106,7 @@ EAPI extern const Eo_Event_Description _EFL_GFX_PATH_CHANGED;
|
|||
#include "interfaces/efl_gfx_gradient_linear.eo.h"
|
||||
#include "interfaces/efl_gfx_gradient_radial.eo.h"
|
||||
#include "interfaces/efl_gfx_filter.eo.h"
|
||||
#include "interfaces/efl_gfx_size_hint.eo.h"
|
||||
|
||||
#define EFL_GFX_COLOR_SET(value) (value << 8)
|
||||
#define EFL_GFX_COLOR16_SET(value) (value)
|
||||
|
|
|
@ -25,6 +25,7 @@ interfaces/efl_gfx_gradient.eo \
|
|||
interfaces/efl_gfx_gradient_linear.eo \
|
||||
interfaces/efl_gfx_gradient_radial.eo \
|
||||
interfaces/efl_gfx_filter.eo \
|
||||
interfaces/efl_gfx_size_hint.eo \
|
||||
interfaces/efl_model.eo \
|
||||
interfaces/efl_animator.eo \
|
||||
interfaces/efl_orientation.eo \
|
||||
|
|
|
@ -0,0 +1,42 @@
|
|||
interface Efl.Gfx.Size.Hint {
|
||||
methods {
|
||||
@property base {
|
||||
set {
|
||||
[[Set the hint for an object's base size used with stepping calculation
|
||||
|
||||
Base size + stepping is what is calculated for object sizing
|
||||
restrictions.
|
||||
|
||||
]]
|
||||
}
|
||||
get {
|
||||
[[Get the base size of an object.
|
||||
|
||||
]]
|
||||
}
|
||||
values {
|
||||
w: int; [[The base width.]]
|
||||
h: int; [[The base height.]]
|
||||
}
|
||||
}
|
||||
@property step {
|
||||
set {
|
||||
[[Set the hint for an object stepping used with sizing calculation.
|
||||
|
||||
Base size + stepping is what is calculated for object sizing
|
||||
restrictions.
|
||||
|
||||
]]
|
||||
}
|
||||
get {
|
||||
[[Get the stepping of an object.
|
||||
|
||||
]]
|
||||
}
|
||||
values {
|
||||
w: int; [[The stepping width (0 disables).]]
|
||||
h: int; [[The stepping height (0 disables).]]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -26,6 +26,8 @@
|
|||
|
||||
#include "interfaces/efl_gfx_filter.eo.c"
|
||||
|
||||
#include "interfaces/efl_gfx_size_hint.eo.c"
|
||||
|
||||
#include "interfaces/efl_vpath.eo.c"
|
||||
|
||||
#include "interfaces/efl_screen.eo.c"
|
||||
|
|
|
@ -4735,7 +4735,7 @@ _elm_win_aspect_get(Eo *obj EINA_UNUSED, Elm_Win_Data *sd)
|
|||
}
|
||||
|
||||
EOLIAN static void
|
||||
_elm_win_size_base_set(Eo *obj EINA_UNUSED, Elm_Win_Data *sd, int w, int h)
|
||||
_elm_win_efl_gfx_size_hint_base_set(Eo *obj EINA_UNUSED, Elm_Win_Data *sd, int w, int h)
|
||||
{
|
||||
sd->size_base_w = w;
|
||||
sd->size_base_h = h;
|
||||
|
@ -4746,14 +4746,14 @@ _elm_win_size_base_set(Eo *obj EINA_UNUSED, Elm_Win_Data *sd, int w, int h)
|
|||
}
|
||||
|
||||
EOLIAN static void
|
||||
_elm_win_size_base_get(Eo *obj EINA_UNUSED, Elm_Win_Data *sd, int *w, int *h)
|
||||
_elm_win_efl_gfx_size_hint_base_get(Eo *obj EINA_UNUSED, Elm_Win_Data *sd, int *w, int *h)
|
||||
{
|
||||
if (w) *w = sd->size_base_w;
|
||||
if (h) *h = sd->size_base_h;
|
||||
}
|
||||
|
||||
EOLIAN static void
|
||||
_elm_win_size_step_set(Eo *obj EINA_UNUSED, Elm_Win_Data *sd, int w, int h)
|
||||
_elm_win_efl_gfx_size_hint_step_set(Eo *obj EINA_UNUSED, Elm_Win_Data *sd, int w, int h)
|
||||
{
|
||||
sd->size_step_w = w;
|
||||
sd->size_step_h = h;
|
||||
|
@ -4764,7 +4764,7 @@ _elm_win_size_step_set(Eo *obj EINA_UNUSED, Elm_Win_Data *sd, int w, int h)
|
|||
}
|
||||
|
||||
EOLIAN static void
|
||||
_elm_win_size_step_get(Eo *obj EINA_UNUSED, Elm_Win_Data *sd, int *w, int *h)
|
||||
_elm_win_efl_gfx_size_hint_step_get(Eo *obj EINA_UNUSED, Elm_Win_Data *sd, int *w, int *h)
|
||||
{
|
||||
if (w) *w = sd->size_step_w;
|
||||
if (h) *h = sd->size_step_h;
|
||||
|
@ -6336,4 +6336,28 @@ elm_win_title_get(const Evas_Object *obj)
|
|||
return sd->title;
|
||||
}
|
||||
|
||||
EAPI void
|
||||
elm_win_size_base_set(Evas_Object *obj, int w, int h)
|
||||
{
|
||||
efl_gfx_size_hint_base_set(obj, 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);
|
||||
}
|
||||
|
||||
EAPI void
|
||||
elm_win_size_step_set(Evas_Object *obj, int w, int h)
|
||||
{
|
||||
efl_gfx_size_hint_step_set(obj, 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);
|
||||
}
|
||||
|
||||
#include "elm_win.eo.c"
|
||||
|
|
|
@ -162,7 +162,8 @@ enum Elm.Win.Urgent_Mode
|
|||
|
||||
class Elm.Win (Elm.Widget, Elm.Interface.Atspi.Window,
|
||||
Elm.Interface.Atspi_Widget_Action, Efl.Pack,
|
||||
Efl.Input.State, Efl.Input.Interface, Efl.Screen)
|
||||
Efl.Input.State, Efl.Input.Interface, Efl.Screen,
|
||||
Efl.Gfx.Size.Hint)
|
||||
{
|
||||
legacy_prefix: elm_win;
|
||||
eo_prefix: elm_obj_win;
|
||||
|
@ -582,27 +583,6 @@ class Elm.Win (Elm.Widget, Elm.Interface.Atspi.Window,
|
|||
name: string @nullable;
|
||||
}
|
||||
}
|
||||
@property size_step {
|
||||
set {
|
||||
[[Set the window stepping used with sizing calculation.
|
||||
|
||||
Base size + stepping is what is calculated for window sizing
|
||||
restrictions.
|
||||
|
||||
@since 1.7
|
||||
]]
|
||||
}
|
||||
get {
|
||||
[[Get the stepping of a window.
|
||||
|
||||
@since 1.7
|
||||
]]
|
||||
}
|
||||
values {
|
||||
w: int; [[The stepping width (0 disables).]]
|
||||
h: int; [[The stepping height (0 disables).]]
|
||||
}
|
||||
}
|
||||
@property available_profiles {
|
||||
set {
|
||||
[[Set the array of available profiles to a window.
|
||||
|
@ -701,27 +681,6 @@ class Elm.Win (Elm.Widget, Elm.Interface.Atspi.Window,
|
|||
profile: string; [[The string value of a window profile.]]
|
||||
}
|
||||
}
|
||||
@property size_base {
|
||||
set {
|
||||
[[Set the base window size used with stepping calculation
|
||||
|
||||
Base size + stepping is what is calculated for window sizing
|
||||
restrictions.
|
||||
|
||||
@since 1.7
|
||||
]]
|
||||
}
|
||||
get {
|
||||
[[Get the base size of a window.
|
||||
|
||||
@since 1.7
|
||||
]]
|
||||
}
|
||||
values {
|
||||
w: int; [[The base width.]]
|
||||
h: int; [[The base height.]]
|
||||
}
|
||||
}
|
||||
@property main_menu {
|
||||
get {
|
||||
[[Get the Main Menu of a window.]]
|
||||
|
@ -947,6 +906,10 @@ class Elm.Win (Elm.Widget, Elm.Interface.Atspi.Window,
|
|||
Efl.Screen.dpi.get;
|
||||
Efl.Screen.rotation.get;
|
||||
Efl.Screen.size.get;
|
||||
Efl.Gfx.Size.Hint.base.set;
|
||||
Efl.Gfx.Size.Hint.base.get;
|
||||
Efl.Gfx.Size.Hint.step.set;
|
||||
Efl.Gfx.Size.Hint.step.get;
|
||||
}
|
||||
constructors {
|
||||
.name;
|
||||
|
|
|
@ -852,3 +852,55 @@ EAPI void elm_win_title_set(Evas_Object *obj, const char *title);
|
|||
*/
|
||||
EAPI const char *elm_win_title_get(const Evas_Object *obj);
|
||||
|
||||
/**
|
||||
* @brief Set the base window size used with stepping calculation
|
||||
*
|
||||
* Base size + stepping is what is calculated for window sizing restrictions.
|
||||
*
|
||||
* @param[in] w The base width.
|
||||
* @param[in] h The base height.
|
||||
*
|
||||
* @since 1.7
|
||||
*
|
||||
* @ingroup Elm_Win
|
||||
*/
|
||||
EAPI void elm_win_size_base_set(Evas_Object *obj, int w, int h);
|
||||
|
||||
/**
|
||||
* @brief Get the base size of a window.
|
||||
*
|
||||
* @param[out] w The base width.
|
||||
* @param[out] h The base height.
|
||||
*
|
||||
* @since 1.7
|
||||
*
|
||||
* @ingroup Elm_Win
|
||||
*/
|
||||
EAPI void elm_win_size_base_get(const Evas_Object *obj, int *w, int *h);
|
||||
|
||||
/**
|
||||
* @brief Set the window stepping used with sizing calculation.
|
||||
*
|
||||
* Base size + stepping is what is calculated for window sizing restrictions.
|
||||
*
|
||||
* @param[in] w The stepping width (0 disables).
|
||||
* @param[in] h The stepping height (0 disables).
|
||||
*
|
||||
* @since 1.7
|
||||
*
|
||||
* @ingroup Elm_Win
|
||||
*/
|
||||
EAPI void elm_win_size_step_set(Evas_Object *obj, int w, int h);
|
||||
|
||||
/**
|
||||
* @brief Get the stepping of a window.
|
||||
*
|
||||
* @param[out] w The stepping width (0 disables).
|
||||
* @param[out] h The stepping height (0 disables).
|
||||
*
|
||||
* @since 1.7
|
||||
*
|
||||
* @ingroup Elm_Win
|
||||
*/
|
||||
EAPI void elm_win_size_step_get(const Evas_Object *obj, int *w, int *h);
|
||||
|
||||
|
|
Loading…
Reference in New Issue