summaryrefslogtreecommitdiff
path: root/src/lib/ector/ector_generic_buffer.c
blob: ba5955bfd266e7c1a586c2b5f10ee02ee53a8d08 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#ifdef HAVE_CONFIG_H
# include "config.h"
#else
# define EFL_BETA_API_SUPPORT
#endif

#include <Eo.h>
#include "ector_private.h"
#include "ector_generic_buffer.eo.h"

#define MY_CLASS ECTOR_GENERIC_BUFFER_CLASS

EOLIAN static Efl_Gfx_Colorspace
_ector_generic_buffer_cspace_get(Eo *obj EINA_UNUSED, Ector_Generic_Buffer_Data *pd)
{
   return pd->cspace;
}

EOLIAN static void
_ector_generic_buffer_border_get(Eo *obj EINA_UNUSED, Ector_Generic_Buffer_Data *pd EINA_UNUSED, int *l, int *r, int *t, int *b)
{
   if (l) *l = pd->l;
   if (r) *r = pd->r;
   if (t) *t = pd->t;
   if (b) *b = pd->b;
}

EOLIAN static void
_ector_generic_buffer_size_get(Eo *obj EINA_UNUSED, Ector_Generic_Buffer_Data *pd, int *w, int *h)
{
   if (w) *w = pd->w;
   if (h) *h = pd->h;
}

EOLIAN static Ector_Buffer_Flag
_ector_generic_buffer_flags_get(Eo *obj EINA_UNUSED, Ector_Generic_Buffer_Data *pd EINA_UNUSED)
{
   return ECTOR_BUFFER_FLAG_NONE;
}

EOLIAN static Eo_Base *
_ector_generic_buffer_eo_base_constructor(Eo *obj, Ector_Generic_Buffer_Data *pd)
{
   eo_do_super(obj, MY_CLASS, obj = eo_constructor());
   pd->eo = obj;

   return obj;
}

#include "ector_generic_buffer.eo.c"