static gint luaH_box_index(lua_State *L, widget_t *w, luakit_token_t token) { switch(token) { LUAKIT_WIDGET_INDEX_COMMON(w) LUAKIT_WIDGET_CONTAINER_INDEX_COMMON(w) /* push class methods */ PF_CASE(PACK, luaH_box_pack) PF_CASE(REORDER, luaH_box_reorder_child) /* push boolean properties */ PB_CASE(HOMOGENEOUS, gtk_box_get_homogeneous(GTK_BOX(w->widget))) /* push string properties */ PN_CASE(SPACING, gtk_box_get_spacing(GTK_BOX(w->widget))) PS_CASE(BG, g_object_get_data(G_OBJECT(w->widget), "bg")) default: break; } return 0; }
static gint luaH_box_index(lua_State *L, luapdf_token_t token) { widget_t *w = luaH_checkwidget(L, 1); switch(token) { LUAPDF_WIDGET_INDEX_COMMON LUAPDF_WIDGET_CONTAINER_INDEX_COMMON(w) /* push class methods */ PF_CASE(PACK, luaH_box_pack) PF_CASE(REORDER, luaH_box_reorder_child) /* push boolean properties */ PB_CASE(HOMOGENEOUS, gtk_box_get_homogeneous(GTK_BOX(w->widget))) /* push string properties */ PN_CASE(SPACING, gtk_box_get_spacing(GTK_BOX(w->widget))) default: break; } return 0; }