summaryrefslogtreecommitdiff
path: root/src/lib/ector/ector_renderer_generic_buffer.c
blob: 5359970867dbbb1de85831b8be33a0b8431aa305 (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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
#ifdef HAVE_CONFIG_H
# include "config.h"
#else
# define EFL_BETA_API_SUPPORT
#endif

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

#define MY_CLASS ECTOR_RENDERER_GENERIC_BUFFER_MIXIN

EOLIAN static Efl_Gfx_Fill_Spread
_ector_renderer_generic_buffer_efl_gfx_fill_fill_spread_get(Eo *obj EINA_UNUSED, Ector_Renderer_Generic_Buffer_Data *pd)
{
   return pd->fill.spread;
}

EOLIAN static void
_ector_renderer_generic_buffer_efl_gfx_fill_fill_spread_set(Eo *obj EINA_UNUSED, Ector_Renderer_Generic_Buffer_Data *pd, Efl_Gfx_Fill_Spread spread)
{
   pd->fill.spread = spread;
}

EOLIAN static void
_ector_renderer_generic_buffer_efl_gfx_fill_fill_get(Eo *obj EINA_UNUSED, Ector_Renderer_Generic_Buffer_Data *pd, int *x, int *y, int *w, int *h)
{
   if (x) *x = pd->fill.x;
   if (y) *y = pd->fill.y;
   if (w) *w = pd->fill.w;
   if (h) *h = pd->fill.h;
}

EOLIAN static void
_ector_renderer_generic_buffer_efl_gfx_fill_fill_set(Eo *obj EINA_UNUSED, Ector_Renderer_Generic_Buffer_Data *pd, int x, int y, int w, int h)
{
   if (w < 0) w = 0;
   if (h < 0) h = 0;
   pd->fill.x = x;
   pd->fill.y = y;
   pd->fill.w = w;
   pd->fill.h = h;
}

EOLIAN static void
_ector_renderer_generic_buffer_buffer_set(Eo *obj EINA_UNUSED, Ector_Renderer_Generic_Buffer_Data *pd, Ector_Generic_Buffer *buf)
{
   _eo_xrefplace(&pd->eo_buffer, buf, obj);
}

EOLIAN static Ector_Generic_Buffer *
_ector_renderer_generic_buffer_buffer_get(Eo *obj EINA_UNUSED, Ector_Renderer_Generic_Buffer_Data *pd)
{
   return pd->eo_buffer;
}

EOLIAN static Eo_Base *
_ector_renderer_generic_buffer_eo_base_constructor(Eo *obj, Ector_Renderer_Generic_Buffer_Data *pd)
{
   Eo_Base *ret;

   ret = eo_constructor(eo_super(obj, MY_CLASS));
   pd->fill.spread = EFL_GFX_FILL_REPEAT;

   return ret;
}

#include "ector_renderer_generic_buffer.eo.c"