[widget] Rename WidgetConstructor to widget_constructor_t
Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
parent
083a4f13f7
commit
c822a9ccf1
|
@ -7,7 +7,7 @@ echo "{"
|
||||||
for file in ${top_srcdir}/widget.h
|
for file in ${top_srcdir}/widget.h
|
||||||
do
|
do
|
||||||
echo " /* $file */"
|
echo " /* $file */"
|
||||||
grep '^WidgetConstructor ' "$file" | cut -d' ' -f2 | cut -d\; -f1 | while read widget
|
grep '^widget_constructor_t ' "$file" | cut -d' ' -f2 | cut -d\; -f1 | while read widget
|
||||||
do
|
do
|
||||||
shortname=$(echo $widget | cut -d_ -f1)
|
shortname=$(echo $widget | cut -d_ -f1)
|
||||||
echo " {\"$shortname\", $widget},"
|
echo " {\"$shortname\", $widget},"
|
||||||
|
|
4
widget.c
4
widget.c
|
@ -168,7 +168,7 @@ luaA_widget_new(lua_State *L)
|
||||||
{
|
{
|
||||||
const char *type;
|
const char *type;
|
||||||
widget_t *w;
|
widget_t *w;
|
||||||
WidgetConstructor *wc;
|
widget_constructor_t *wc;
|
||||||
alignment_t align;
|
alignment_t align;
|
||||||
|
|
||||||
luaA_checktable(L, 1);
|
luaA_checktable(L, 1);
|
||||||
|
@ -176,7 +176,7 @@ luaA_widget_new(lua_State *L)
|
||||||
|
|
||||||
type = luaA_getopt_string(L, 1, "type", NULL);
|
type = luaA_getopt_string(L, 1, "type", NULL);
|
||||||
|
|
||||||
/* \todo use type to call the WidgetConstructor and set ->tell*/
|
/* \todo use type to call the widget_constructor_t and set ->tell*/
|
||||||
if((wc = name_func_lookup(type, WidgetList)))
|
if((wc = name_func_lookup(type, WidgetList)))
|
||||||
w = wc(align);
|
w = wc(align);
|
||||||
else
|
else
|
||||||
|
|
14
widget.h
14
widget.h
|
@ -30,7 +30,7 @@
|
||||||
#define WIDGET_CACHE_TAGS 1<<2
|
#define WIDGET_CACHE_TAGS 1<<2
|
||||||
#define WIDGET_CACHE_ALL (WIDGET_CACHE_CLIENTS | WIDGET_CACHE_LAYOUTS | WIDGET_CACHE_TAGS)
|
#define WIDGET_CACHE_ALL (WIDGET_CACHE_CLIENTS | WIDGET_CACHE_LAYOUTS | WIDGET_CACHE_TAGS)
|
||||||
|
|
||||||
typedef widget_t *(WidgetConstructor)(alignment_t);
|
typedef widget_t *(widget_constructor_t)(alignment_t);
|
||||||
|
|
||||||
void widget_invalidate_cache(int, int);
|
void widget_invalidate_cache(int, int);
|
||||||
int widget_calculate_offset(int, int, int, int);
|
int widget_calculate_offset(int, int, int, int);
|
||||||
|
@ -39,12 +39,12 @@ widget_t * widget_getbyname(const char *);
|
||||||
void widget_invalidate_statusbar_bywidget(widget_t *);
|
void widget_invalidate_statusbar_bywidget(widget_t *);
|
||||||
void widget_tell_managestatus(widget_t *, widget_tell_status_t, const char *);
|
void widget_tell_managestatus(widget_t *, widget_tell_status_t, const char *);
|
||||||
|
|
||||||
WidgetConstructor taglist_new;
|
widget_constructor_t taglist_new;
|
||||||
WidgetConstructor textbox_new;
|
widget_constructor_t textbox_new;
|
||||||
WidgetConstructor iconbox_new;
|
widget_constructor_t iconbox_new;
|
||||||
WidgetConstructor progressbar_new;
|
widget_constructor_t progressbar_new;
|
||||||
WidgetConstructor graph_new;
|
widget_constructor_t graph_new;
|
||||||
WidgetConstructor tasklist_new;
|
widget_constructor_t tasklist_new;
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue