summaryrefslogtreecommitdiff
path: root/src/lib/eolian/eo_definitions.h
blob: fa08aadb55fd5e2491d626adf8e7e2a9d0ff2e12 (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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
#ifndef __EO_DEFINITIONS_H__
#define __EO_DEFINITIONS_H__

#include <Eina.h>
#include <Eolian.h>

/* RET */

typedef struct _eo_ret_def
{
   const char *type;
   const char *comment;
   const char *dflt_ret_val;
   Eina_Bool warn_unused:1;
   Eina_Bool own:1;
} Eo_Ret_Def;

/* PARAM */

typedef enum _param_way
{
   PARAM_IN,
   PARAM_OUT,
   PARAM_INOUT,
   PARAM_WAY_LAST
} Param_Way;

typedef struct _eo_param_def
{
   Param_Way way;
   const char *type;
   const char *name;
   const char *comment;
   Eina_Bool nonull:1;
   Eina_Bool own:1;
} Eo_Param_Def;

/* ACCESSOR */

typedef enum _eo_accessor_type
{
   SETTER,
   GETTER,
   ACCESSOR_TYPE_LAST
} Eo_Accessor_Type;

typedef struct _eo_accessor_param
{
   const char *name;
   const char *attrs;
} Eo_Accessor_Param;

typedef struct _eo_accessor_def
{
   Eo_Accessor_Type type;
   Eo_Ret_Def *ret;
   const char *comment;
   const char* legacy;
   Eina_List *params; /* List of Eo_Accessor_Param */
} Eo_Accessor_Def;

/* PROPERTY */

typedef struct _eo_property_def
{
   const char *name;
   Eina_List *keys;
   Eina_List *values;
   Eina_List *accessors;
} Eo_Property_Def;

/* METHOD */

typedef enum _eo_method_type {
     METH_REGULAR,
     METH_CONSTRUCTOR,
     METH_DESTRUCTOR,
     METH_TYPE_LAST
} Eo_Method_Type;

typedef struct _eo_method_def
{
   Eo_Ret_Def *ret;
   Eo_Method_Type type;
   const char *name;
   const char *comment;
   Eina_List *params;
   const char* legacy;
   Eina_Bool obj_const;
} Eo_Method_Def;

/* SIGNAL */

typedef struct _eo_event_def
{
   const char *name;
   const char *comment;
} Eo_Event_Def;

/* IMPLEMENT */

typedef struct _eo_implement_legacy_param_def
{
   const char *eo_name;
   const char *legacy_name;
   const char *comment;
} Eo_Implement_Legacy_Param_Def;

typedef struct _eo_implement_legacy_def
{
   const char *function_name;
   Eina_List *params; /* List of Eo_Implement_Legacy_Param_Def * */
   const char *ret_type;
   const char *ret_value;
} Eo_Implement_Legacy_Def;

typedef struct _eo_implement_def
{
   const char *meth_name;
   Eo_Implement_Legacy_Def *legacy;
} Eo_Implement_Def;

/* CLASS */

typedef struct _eo_class_def
{
   const char *name;
   Eolian_Class_Type type;
   const char *comment;
   const char *legacy_prefix;
   const char *eo_prefix;
   const char *data_type;
   Eina_List *inherits;
   Eina_List *implements;
   Eina_List *events;
   Eina_List *constructors;
   Eina_List *destructors;
   Eina_List *properties;
   Eina_List *methods;
} Eo_Class_Def;

void eo_definitions_class_def_free(Eo_Class_Def *kls);

#endif /* __EO_DEFINITIONS_H__ */