forked from enlightenment/efl
Elm_glview: remove elm_glview_size_set.
move elm_glview_size_set to legacy wrapper
This commit is contained in:
parent
e2efc6d6d1
commit
47172d7274
|
@ -308,14 +308,6 @@ elm_glview_version_add(Evas_Object *parent, Evas_GL_Context_Version version)
|
||||||
return obj;
|
return obj;
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI void
|
|
||||||
elm_glview_changed_set(Evas_Object *obj)
|
|
||||||
{
|
|
||||||
ELM_GLVIEW_CHECK(obj);
|
|
||||||
|
|
||||||
elm_glview_draw_request(obj);
|
|
||||||
}
|
|
||||||
|
|
||||||
EOLIAN static void
|
EOLIAN static void
|
||||||
_elm_glview_version_constructor(Eo *obj, Elm_Glview_Data *sd,
|
_elm_glview_version_constructor(Eo *obj, Elm_Glview_Data *sd,
|
||||||
Evas_GL_Context_Version version)
|
Evas_GL_Context_Version version)
|
||||||
|
@ -470,7 +462,7 @@ _elm_glview_render_policy_set(Eo *obj, Elm_Glview_Data *sd, Elm_GLView_Render_Po
|
||||||
}
|
}
|
||||||
|
|
||||||
EOLIAN static void
|
EOLIAN static void
|
||||||
_elm_glview_size_set(Eo *obj, Elm_Glview_Data *sd, int w, int h)
|
_elm_glview_efl_gfx_view_view_size_set(Eo *obj, Elm_Glview_Data *sd, int w, int h)
|
||||||
{
|
{
|
||||||
if ((w == sd->w) && (h == sd->h)) return;
|
if ((w == sd->w) && (h == sd->h)) return;
|
||||||
|
|
||||||
|
@ -482,7 +474,7 @@ _elm_glview_size_set(Eo *obj, Elm_Glview_Data *sd, int w, int h)
|
||||||
}
|
}
|
||||||
|
|
||||||
EOLIAN static void
|
EOLIAN static void
|
||||||
_elm_glview_size_get(Eo *obj EINA_UNUSED, Elm_Glview_Data *sd, int *w, int *h)
|
_elm_glview_efl_gfx_view_view_size_get(Eo *obj EINA_UNUSED, Elm_Glview_Data *sd, int *w, int *h)
|
||||||
{
|
{
|
||||||
if (w) *w = sd->w;
|
if (w) *w = sd->w;
|
||||||
if (h) *h = sd->h;
|
if (h) *h = sd->h;
|
||||||
|
@ -545,4 +537,25 @@ _elm_glview_class_constructor(Eo_Class *klass)
|
||||||
evas_smart_legacy_type_register(MY_CLASS_NAME_LEGACY, klass);
|
evas_smart_legacy_type_register(MY_CLASS_NAME_LEGACY, klass);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Legacy wrappers */
|
||||||
|
|
||||||
|
EAPI void
|
||||||
|
elm_glview_changed_set(Evas_Object *obj)
|
||||||
|
{
|
||||||
|
ELM_GLVIEW_CHECK(obj);
|
||||||
|
|
||||||
|
elm_glview_draw_request(obj);
|
||||||
|
}
|
||||||
|
|
||||||
|
EAPI void
|
||||||
|
elm_glview_size_get(const Elm_Glview *obj, int *w, int *h)
|
||||||
|
{
|
||||||
|
efl_gfx_view_size_get(obj, w, h);
|
||||||
|
}
|
||||||
|
|
||||||
|
EAPI void
|
||||||
|
elm_glview_size_set(Elm_Glview *obj, int w, int h)
|
||||||
|
{
|
||||||
|
efl_gfx_view_size_set(obj, w, h);
|
||||||
|
}
|
||||||
#include "elm_glview.eo.c"
|
#include "elm_glview.eo.c"
|
||||||
|
|
|
@ -76,7 +76,7 @@ enum Elm.GLView.Render.Policy
|
||||||
always = 2 [[Render always even when it is not visible]]
|
always = 2 [[Render always even when it is not visible]]
|
||||||
}
|
}
|
||||||
|
|
||||||
class Elm.Glview (Elm.Widget)
|
class Elm.Glview (Elm.Widget, Efl.Gfx.View)
|
||||||
{
|
{
|
||||||
eo_prefix: elm_obj_glview;
|
eo_prefix: elm_obj_glview;
|
||||||
methods {
|
methods {
|
||||||
|
@ -87,24 +87,6 @@ class Elm.Glview (Elm.Widget)
|
||||||
@in version: Evas_GL_Context_Version;
|
@in version: Evas_GL_Context_Version;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@property size {
|
|
||||||
set {
|
|
||||||
[[Sets the size of the glview.]]
|
|
||||||
}
|
|
||||||
get {
|
|
||||||
[[Get the size of the glview.
|
|
||||||
|
|
||||||
Note: This function returns the actual image size of the
|
|
||||||
glview. This means that when the scale policy is set to
|
|
||||||
#ELM_GLVIEW_RESIZE_POLICY_SCALE, it'll return the non-scaled
|
|
||||||
size.
|
|
||||||
]]
|
|
||||||
}
|
|
||||||
values {
|
|
||||||
w: int; [[Width of the glview object.]]
|
|
||||||
h: int; [[Height of the glview object.]]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@property resize_policy {
|
@property resize_policy {
|
||||||
set {
|
set {
|
||||||
[[Set the resize policy for the glview object.
|
[[Set the resize policy for the glview object.
|
||||||
|
@ -255,6 +237,8 @@ class Elm.Glview (Elm.Widget)
|
||||||
Evas.Object_Smart.del;
|
Evas.Object_Smart.del;
|
||||||
Evas.Object_Smart.resize;
|
Evas.Object_Smart.resize;
|
||||||
Elm.Widget.on_focus;
|
Elm.Widget.on_focus;
|
||||||
|
Efl.Gfx.View.view_size.get;
|
||||||
|
Efl.Gfx.View.view_size.set;
|
||||||
}
|
}
|
||||||
events {
|
events {
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue