elementary/glview - reviewed. changed trivials.

SVN revision: 68476
This commit is contained in:
ChunEon Park 2012-02-27 14:19:28 +00:00
parent 1e9399d794
commit ec00159a09
2 changed files with 17 additions and 14 deletions

View File

@ -381,28 +381,28 @@ elm_glview_render_policy_set(Evas_Object *obj, Elm_GLView_Render_Policy policy)
} }
EAPI void EAPI void
elm_glview_size_set(Evas_Object *obj, int width, int height) elm_glview_size_set(Evas_Object *obj, int w, int h)
{ {
ELM_CHECK_WIDTYPE(obj, widtype); ELM_CHECK_WIDTYPE(obj, widtype);
Widget_Data *wd = elm_widget_data_get(obj); Widget_Data *wd = elm_widget_data_get(obj);
if (!wd) return; if (!wd) return;
if ((width == wd->w) && (height == wd->h)) return; if ((w == wd->w) && (h == wd->h)) return;
wd->w = width; wd->w = w;
wd->h = height; wd->h = h;
_glview_update_surface(obj); _glview_update_surface(obj);
elm_glview_changed_set(obj); elm_glview_changed_set(obj);
} }
EAPI void EAPI void
elm_glview_size_get(const Evas_Object *obj, int *width, int *height) elm_glview_size_get(const Evas_Object *obj, int *w, int *h)
{ {
ELM_CHECK_WIDTYPE(obj, widtype); ELM_CHECK_WIDTYPE(obj, widtype);
Widget_Data *wd = elm_widget_data_get(obj); Widget_Data *wd = elm_widget_data_get(obj);
if (!wd) return; if (!wd) return;
if (width) *width = wd->w; if (w) *w = wd->w;
if (height) *height = wd->h; if (h) *h = wd->h;
} }
EAPI void EAPI void

View File

@ -50,19 +50,19 @@ EAPI Evas_Object *elm_glview_add(Evas_Object *parent);
* Sets the size of the glview * Sets the size of the glview
* *
* @param obj The glview object * @param obj The glview object
* @param width width of the glview object * @param w width of the glview object
* @param height height of the glview object * @param h height of the glview object
* *
* @ingroup GLView * @ingroup GLView
*/ */
EAPI void elm_glview_size_set(Evas_Object *obj, Evas_Coord width, Evas_Coord height); EAPI void elm_glview_size_set(Evas_Object *obj, Evas_Coord w, Evas_Coord h);
/** /**
* Gets the size of the glview. * Gets the size of the glview.
* *
* @param obj The glview object * @param obj The glview object
* @param width width of the glview object * @param w width of the glview object
* @param height height of the glview object * @param h height of the glview object
* *
* Note that this function returns the actual image size of the * Note that this function returns the actual image size of the
* glview. This means that when the scale policy is set to * glview. This means that when the scale policy is set to
@ -71,7 +71,7 @@ EAPI void elm_glview_size_set(Evas_Object *obj, Evas_Coord width, Evas_C
* *
* @ingroup GLView * @ingroup GLView
*/ */
EAPI void elm_glview_size_get(const Evas_Object *obj, Evas_Coord *width, Evas_Coord *height); EAPI void elm_glview_size_get(const Evas_Object *obj, Evas_Coord *w, Evas_Coord *h);
/** /**
* Gets the gl api struct for gl rendering * Gets the gl api struct for gl rendering
@ -84,7 +84,7 @@ EAPI void elm_glview_size_get(const Evas_Object *obj, Evas_Coord *width,
EAPI Evas_GL_API *elm_glview_gl_api_get(const Evas_Object *obj); EAPI Evas_GL_API *elm_glview_gl_api_get(const Evas_Object *obj);
/** /**
* Set the mode of the GLView. Supports Three simple modes. * Set the mode of the GLView. Supports alpha, depth, dencil, direct.
* *
* @param obj The glview object * @param obj The glview object
* @param mode The mode Options OR'ed enabling Alpha, Depth, Stencil. * @param mode The mode Options OR'ed enabling Alpha, Depth, Stencil.
@ -138,6 +138,7 @@ EAPI Eina_Bool elm_glview_render_policy_set(Evas_Object *obj, Elm_GLView_Rend
* *
* @ingroup GLView * @ingroup GLView
*/ */
//XXX: need more description why this API is provided. i.e) You can set the gl rendering options when this init function is called...
EAPI void elm_glview_init_func_set(Evas_Object *obj, Elm_GLView_Func_Cb func); EAPI void elm_glview_init_func_set(Evas_Object *obj, Elm_GLView_Func_Cb func);
/** /**
@ -150,6 +151,7 @@ EAPI void elm_glview_init_func_set(Evas_Object *obj, Elm_GLView_Func_Cb
* *
* @ingroup GLView * @ingroup GLView
*/ */
//XXX: is it problem if it uses evas_object_event_callback_add(.. , EVAS_CALLBACK_DEL, )
EAPI void elm_glview_del_func_set(Evas_Object *obj, Elm_GLView_Func_Cb func); EAPI void elm_glview_del_func_set(Evas_Object *obj, Elm_GLView_Func_Cb func);
/** /**
@ -160,6 +162,7 @@ EAPI void elm_glview_del_func_set(Evas_Object *obj, Elm_GLView_Func_Cb f
* *
* @ingroup GLView * @ingroup GLView
*/ */
//XXX: is it problem if it uses evas_object_event_callback_add(.. , EVAS_CALLBACK_RESIZE, )
EAPI void elm_glview_resize_func_set(Evas_Object *obj, Elm_GLView_Func_Cb func); EAPI void elm_glview_resize_func_set(Evas_Object *obj, Elm_GLView_Func_Cb func);
/** /**