enum Elm.GLView.Mode { [[ Selects the target surface properties An OR combination of Elm_GLView_Mode values should be passed to elm_glview_mode_set when setting up a GL widget. These flags will specify the properties of the rendering target surface; in particular, the mode can request the surface to support alpha, depth and stencil buffers. ELM_GLVIEW_CLIENT_SIDE_ROTATION is a special value that indicates to EFL that the application will handle the view rotation when the device is rotated. This is needed only when the application requests direct rendering. Please refer to Evas_GL for more information about direct rendering. See @Elm.Glview.mode.set See elm_opengl_page ]] legacy: elm_glview; none = 0, // 0x1 is reserved for future use alpha = (1<<1), [[Alpha channel enabled rendering mode]] depth = (1<<2), [[Depth buffer enabled rendering mode (24 bits by default)]] stencil = (1<<3), [[Stencil buffer enabled rendering mode (8 bits by default)]] direct = (1<<4), [[Request direct rendering, unless there must be a fallback]] client_side_rotation = (1<<5), [[Client will handle GL view rotation if direct rendering is enabled]] // Depth buffer sizes (3 bits) depth_8 = Elm.GLView.Mode.depth | (1 << 6), [[Request min. 8 bits for the depth buffer]] depth_16 = Elm.GLView.Mode.depth | (2 << 6), [[Request min. 16 bits for the depth buffer]] depth_24 = Elm.GLView.Mode.depth | (3 << 6), [[Request min. 24 bits for the depth buffer (default)]] depth_32 = Elm.GLView.Mode.depth | (4 << 6), [[Request min. 32 bits for the depth buffer]] // Stencil buffer sizes (3 bits) stencil_1 = Elm.GLView.Mode.stencil | (1 << 9), [[Request min. 1 bits for the stencil buffer]] stencil_2 = Elm.GLView.Mode.stencil | (2 << 9), [[Request min. 2 bits for the stencil buffer]] stencil_4 = Elm.GLView.Mode.stencil | (3 << 9), [[Request min. 4 bits for the stencil buffer]] stencil_8 = Elm.GLView.Mode.stencil | (4 << 9), [[Request min. 8 bits for the stencil buffer (default)]] stencil_16 = Elm.GLView.Mode.stencil | (5 << 9), [[Request min. 16 bits for the stencil buffer]] // MSAA params (2 bits) multisample_low = (1 << 12), [[MSAA with minimum number of samples]] multisample_med = (2 << 12), [[MSAA with half the number of maximum samples]] multisample_high = (3 << 12) [[MSAA with maximum number of samples]] } enum Elm.GLView.Resize.Policy { [[ Defines a policy for the glview resizing. The resizing policy tells glview what to do with the underlying surface when resize happens. ELM_GLVIEW_RESIZE_POLICY_RECREATE will destroy the current surface and recreate the surface to the new size. ELM_GLVIEW_RESIZE_POLICY_SCALE will instead keep the current surface but only display the result at the desired size scaled. Default is @Elm.GLView.Resize.Policy.recreate ]] recreate = 1, [[Resize the internal surface along with the image]] scale = 2 [[Only resize the internal image and not the surface]] } enum Elm.GLView.Render.Policy { [[ Defines a policy for gl rendering. The rendering policy tells glview where to run the gl rendering code. ELM_GLVIEW_RENDER_POLICY_ON_DEMAND tells glview to call the rendering calls on demand, which means that the rendering code gets called only when it is visible. Default is @Elm.GLView.Render.Policy.on_demand ]] on_demand = 1, [[Render only when there is a need for redrawing]] always = 2 [[Render always even when it is not visible]] } class Elm.Glview (Elm.Widget, Efl.Gfx.View) { eo_prefix: elm_obj_glview; methods { version_constructor { [[Constructor with context version number.]] legacy: null; params { @in version: Evas_GL_Context_Version; } } @property resize_policy { set { [[Set the resize policy for the glview object. By default, the resize policy is set to #ELM_GLVIEW_RESIZE_POLICY_RECREATE. When resize is called it destroys the previous surface and recreates the newly specified size. If the policy is set to #ELM_GLVIEW_RESIZE_POLICY_SCALE, however, glview only scales the image object and not the underlying GL Surface. ]] return: bool; } values { policy: Elm.GLView.Resize.Policy; [[The scaling policy.]] } } @property render_policy { set { [[Set the render policy for the glview object. By default, the render policy is set to #ELM_GLVIEW_RENDER_POLICY_ON_DEMAND. This policy is set such that during the render loop, glview is only redrawn if it needs to be redrawn. (i.e. when it is visible) If the policy is set to #ELM_GLVIEWW_RENDER_POLICY_ALWAYS, it redraws regardless of whether it is visible or needs redrawing. ]] return: bool; } values { policy: Elm.GLView.Render.Policy; [[The render policy.]] } } @property mode { set { [[Set the mode of the GLView. Supports alpha, depth, stencil. Direct is a hint for the elm_glview to render directly to the window given that the right conditions are met. Otherwise it falls back to rendering to an offscreen buffer before it gets composited to the window. ]] return: bool; } values { mode: Elm.GLView.Mode; [[The mode Options OR'ed enabling Alpha, Depth, Stencil, Direct.]] } } @property gl_api { get { [[Get the gl api struct for gl rendering.]] return: Evas_GL_API *; } } @property evas_gl { get { [[Get the internal Evas GL attached to this view. Note: The returned Evas_GL must not be destroyed as it is still owned by the view. But this pointer can be used then to call all the evas_gl_ functions. @since 1.12 ]] return: Evas_GL *; } } @property rotation { get { [[Get the current GL view's rotation when using direct rendering Note: This rotation can be different from the device orientation. This rotation value must be used in case of direct rendering and should be taken into account by the application when setting the internal rotation matrix for the view. @since 1.12 ]] return: int; [[A window rotation in degrees (0, 90, 180 or 270).]] } } draw_request { [[Notifies that there has been changes in the GLView.]] } } implements { class.constructor; Eo.Base.finalize; Evas.Object_Smart.add; Evas.Object_Smart.del; Evas.Object_Smart.resize; Elm.Widget.on_focus; Efl.Gfx.View.view_size.get; Efl.Gfx.View.view_size.set; } events { created; [[Event dispatched when first render happens. The callback function gets called once during the render loop. Callback function allows glview to hide all the rendering context/surface details and have the user just call GL calls that they desire for initialization GL calls. ]] destroyed; [[Event dispatched when GLView object is deleted. The registered destroyed function gets called when GLView object is deleted. Callback function allows glview to hide all the rendering context/surface details and have the user just call GL calls that they desire when delete happens. ]] resized; [[Event dispatched when resize happens. The resized event callback functions gets called during the render loop. The callback function allows glview to hide all the rendering context/surface details and have the user just call GL alls that they desire when resize happens. ]] render; [[Event dispatched when GLView is rendered. The callback function gets called in the main loop but whether it runs depends on the rendering policy and whether @.draw_request gets called. ]] } constructors { .version_constructor; } }