aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/elementary/efl_page_indicator.c
blob: 86ea8511e58d8bab1880f2539bd8ef09b01337dc (plain) (blame)
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
#ifdef HAVE_CONFIG_H
# include "elementary_config.h"
#endif

#include <Elementary.h>
#include "elm_priv.h"

#include "efl_page_indicator.h"
#include "efl_ui_widget_pager.h"

#define MY_CLASS EFL_PAGE_INDICATOR_CLASS



EOLIAN static void
_efl_page_indicator_update(Eo *obj EINA_UNUSED,
                           Efl_Page_Indicator_Data *pd EINA_UNUSED,
                           double pos EINA_UNUSED)
{

}

EOLIAN static void
_efl_page_indicator_pack(Eo *obj EINA_UNUSED,
                         Efl_Page_Indicator_Data *pd,
                         int index EINA_UNUSED)
{
   pd->cnt++;
}

EOLIAN static void
_efl_page_indicator_bind(Eo *obj EINA_UNUSED,
                         Efl_Page_Indicator_Data *pd,
                         Eo *pager,
                         Efl_Canvas_Group *idbox)
{
   if (pd->pager.obj == pager) return;

   pd->pager.obj = pager;
   pd->idbox = idbox;

   if (pager)
     pd->cnt = efl_content_count(pd->pager.obj);
}


EOAPI EFL_VOID_FUNC_BODYV(efl_page_indicator_update,
                          EFL_FUNC_CALL(pos), double pos)
EOAPI EFL_VOID_FUNC_BODYV(efl_page_indicator_pack,
                          EFL_FUNC_CALL(index), int index)

#define EFL_PAGE_INDICATOR_EXTRA_OPS \
   EFL_OBJECT_OP_FUNC(efl_page_indicator_update, \
                      _efl_page_indicator_update), \
   EFL_OBJECT_OP_FUNC(efl_page_indicator_pack, \
                      _efl_page_indicator_pack)

#include "efl_page_indicator.eo.c"