Tizen(Headed) Native API  6.5
_Evas_Native_Surface Struct Reference

Public Attributes

int version
Evas_Native_Surface_Type type
union {
   struct {
      void *   visual
      unsigned long   pixmap
      unsigned int   multiple_buffer
   }   x11
   struct {
      unsigned int   texture_id
      unsigned int   framebuffer_id
      unsigned int   internal_format
      unsigned int   format
      unsigned int   h
   }   opengl
   struct {
      void *   legacy_buffer
   }   wl
   struct {
      void *   attr
      void *   resource
   }   wl_dmabuf
   struct {
      void *   buffer
      int   rot
      float   ratio
      int   flip
   }   tbm
   struct {
      void *   surface
   }   evasgl
data

Detailed Description

A generic datatype for engine specific native surface information.

Please fill up Evas_Native_Surface fields that regarded with current surface type. If you want to set the native surface type to EVAS_NATIVE_SURFACE_X11, you need to set union data with x11.visual or x11.pixmap. If you need to set the native surface as EVAS_NATIVE_SURFACE_OPENGL, on the other hand, you need to set union data with opengl.texture_id or opengl.framebuffer_id and so on. If you need to set the native surface as EVAS_NATIVE_SURFACE_WL, you need to set union data with wl.legacy_buffer. If you need to set the native surface as EVAS_NATIVE_SURFACE_TBM, you need to set union data with tbm surface. The version field should be set with EVAS_NATIVE_SURFACE_VERSION in order to check abi break in your application on the different efl library versions.

Warning:
Native surface types totally depend on the system. Please be aware that the types are supported on your system before using them.
Note:
The information stored in an Evas_Native_Surface returned by evas_gl_native_surface_get() is not meant to be used by applications except for passing it to evas_object_image_native_surface_set().
See also:
evas_object_image_native_surface_set()

Member Data Documentation

Pointer to dmabuf attributes - contents copied

tbm surface buffer to use

Since (EFL) :
1.14

Choose one union data according to your surface.

Set this struct fields if surface data is Evas GL based.

Since (EFL) :
1.14

flip (EVAS_IMAGE_FLIP_HORIZONTAL:horizontal, EVAS_IMAGE_FLIP_VERTICAL:vertical)

Since (EFL) :
1.14

same as 'format' for glTexImage2D()

0 if not a FBO, FBO id otherwise from glGenFramebuffers()

region inside the texture to use (image size is assumed as texture size, with 0, 0 being the top-left and co-ordinates working down to the right and bottom being positive)

same as 'internalFormat' for glTexImage2D()

wayland client buffer to use

From version 4. 1 if pixmap is multiple buffer pixmap such as named pixmap created by enlightenment. driver dependent.

Since (EFL) :
1.19

Set this struct fields if surface data is OpenGL based.

pixmap id to use (Pixmap)

width/height ratio of the source image

Since (EFL) :
1.14

Wayland resource pointer, kept as is

rotation (EVAS_IMAGE_ORIENT_NONE, EVAS_IMAGE_ORIENT_90, EVAS_IMAGE_ORIENT_180, EVAS_IMAGE_ORIENT_270)

Since (EFL) :
1.14

evas gl surface to use

Since (EFL) :
1.14
struct { ... } _Evas_Native_Surface::tbm

Set this struct fields if surface data is Tizen based.

Since (EFL) :
1.14

opengl texture id to use from glGenTextures()

Current Native Surface Version. Use EVAS_NATIVE_SURFACE_VERSION

visual of the pixmap to use (Visual)

struct { ... } _Evas_Native_Surface::wl

Set this struct fields if surface data is Wayland based.

Set this struct fields if surface data is Wayland dmabuf based.

Since (EFL) :
1.18
struct { ... } _Evas_Native_Surface::x11

Set this struct fields if surface data is X11 based.