8 GET_TAB2INTEGER (lbox_get_padding
, evas_object_box_padding_get
);
9 SET_TAB2INTEGER (lbox_set_padding
, evas_object_box_padding_set
);
11 GET_TAB2FLOAT (lbox_get_align
, evas_object_box_align_get
);
12 SET_TAB2FLOAT (lbox_set_align
, evas_object_box_align_set
);
14 FN_OBJ (lbox_fn_append
, evas_object_box_append
);
15 FN_OBJ (lbox_fn_prepend
, evas_object_box_prepend
);
16 FN_2OBJ (lbox_fn_insert_before
, evas_object_box_insert_before
);
19 lbox_fn_insert_at (lua_State
*L
)
21 luaobj_Object
*obj
= lua_touserdata (L
, 1);
22 luaobj_Object
*tar
= lua_touserdata (L
, 2);
23 evas_object_box_insert_at (
26 luaL_checkinteger (L
, 3));
30 FN_OBJ (lbox_fn_remove
, evas_object_box_remove
);
31 FN_INTEGER (lbox_fn_remove_at
, evas_object_box_remove_at
);
34 lbox_set_layout (lua_State
*L
)
36 luaobj_Object
*obj
= lua_touserdata (L
, 1);
37 const char *layout
= luaL_checkstring (L
, 2);
38 if (!strcmp (layout
, "horizontal"))
39 evas_object_box_layout_set (
41 evas_object_box_layout_horizontal
,
43 else if (!strcmp (layout
, "vertical"))
44 evas_object_box_layout_set (
46 evas_object_box_layout_vertical
,
48 else if (!strcmp (layout
, "homogeneous_horizontal"))
49 evas_object_box_layout_set (
51 evas_object_box_layout_homogeneous_horizontal
,
53 else if (!strcmp (layout
, "homogeneous_vertical"))
54 evas_object_box_layout_set (
56 evas_object_box_layout_homogeneous_vertical
,
58 else if (!strcmp (layout
, "homogeneous_max_size_horizontal"))
59 evas_object_box_layout_set (
61 evas_object_box_layout_homogeneous_max_size_horizontal
,
63 else if (!strcmp (layout
, "homogeneous_max_size_vertical"))
64 evas_object_box_layout_set (
66 evas_object_box_layout_homogeneous_max_size_vertical
,
68 else if (!strcmp (layout
, "flow_horizontal"))
69 evas_object_box_layout_set (
71 evas_object_box_layout_flow_horizontal
,
73 else if (!strcmp (layout
, "flow_vertical"))
74 evas_object_box_layout_set (
76 evas_object_box_layout_flow_vertical
,
78 else if (!strcmp (layout
, "stack"))
79 evas_object_box_layout_set (
81 evas_object_box_layout_stack
,
84 printf ("layout <%s> not found\n", layout
);
88 const struct luaL_Reg lBox_fn
[] = {
89 {"append", lbox_fn_append
},
90 {"prepend", lbox_fn_prepend
},
91 {"insert_before", lbox_fn_insert_before
},
92 {"insert_at", lbox_fn_insert_at
},
93 {"remove", lbox_fn_remove
},
94 {"remove_at", lbox_fn_remove_at
},
95 {NULL
, NULL
} // sentinel
98 const struct luaL_Reg lBox_get
[] = {
99 {"padding", lbox_get_padding
},
100 {"align", lbox_get_align
},
101 {NULL
, NULL
} // sentinel
104 const struct luaL_Reg lBox_set
[] = {
105 {"layout", lbox_set_layout
},
106 {"padding", lbox_set_padding
},
107 {"align", lbox_set_align
},
108 {NULL
, NULL
} // sentinel
110 const luaL_Reg lBox_nil
[] = {
111 {NULL
, NULL
} // sentinel
114 const luaobj_Reg mBox
= {
121 const luaobj_Reg
*cBox
[] = {