[uicb] Stop autogenerating uicb list

Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
Julien Danjou 2008-05-03 15:39:15 +02:00
parent bc041145e6
commit 4c89bc0d0c
4 changed files with 50 additions and 27 deletions

1
.gitignore vendored
View File

@ -21,7 +21,6 @@ awesome-menu.1
awesome.1 awesome.1
awesomerc.5 awesomerc.5
awesomerc awesomerc
uicbgen.h
widgetgen.h widgetgen.h
layoutgen.h layoutgen.h
awesome-version-internal.h awesome-version-internal.h

View File

@ -66,13 +66,6 @@ defconfig.h: awesomerc
@$(SED) 's,\\,\\\\,g;s/$$/\\n\\/;s/"/\\"/g' "awesomerc" >> defconfig.h @$(SED) 's,\\,\\\\,g;s/$$/\\n\\/;s/"/\\"/g' "awesomerc" >> defconfig.h
@echo "\";" >> defconfig.h @echo "\";" >> defconfig.h
CLEANFILES += uicbgen.h
BUILT_SOURCES += uicbgen.h
EXTRA_DIST += build-utils/uicbgen.sh
uicbgen.h: $(awesome_SOURCES)
@echo "generating uicbgen.h from headers file"
$(top_srcdir)/build-utils/uicbgen.sh "$(top_srcdir)" > uicbgen.h
CLEANFILES += layoutgen.h CLEANFILES += layoutgen.h
BUILT_SOURCES += layoutgen.h BUILT_SOURCES += layoutgen.h
EXTRA_DIST += build-utils/layoutgen.sh EXTRA_DIST += build-utils/layoutgen.sh

View File

@ -1,18 +0,0 @@
#!/bin/sh
top_srcdir="${1-.}"
echo "/* This file is autogenerated by" $(basename $0) "*/"
echo
echo "const name_func_link_t UicbList[] ="
echo "{"
for file in ${top_srcdir}/*.h ${top_srcdir}/layouts/*.h
do
echo " /* $file */"
grep '^uicb_t uicb_' $file | cut -d' ' -f2 | cut -d\; -f1 | while read uicb
do
shortname=$(echo $uicb | cut -d _ -f2-)
echo " {\"$shortname\", $uicb},"
done
done
echo " {NULL, NULL}"
echo "};"

51
uicb.c
View File

@ -44,7 +44,56 @@
extern AwesomeConf globalconf; extern AwesomeConf globalconf;
#include "uicbgen.h" const name_func_link_t UicbList[] =
{
/* awesome.h */
{ "quit", uicb_quit },
/* client.h */
{ "client_kill", uicb_client_kill },
{ "client_moveresize", uicb_client_moveresize },
{ "client_settrans", uicb_client_settrans },
{ "client_swap", uicb_client_swap },
{ "client_togglemax", uicb_client_togglemax },
{ "client_focus", uicb_client_focus },
{ "client_setfloating", uicb_client_setfloating },
{ "client_togglescratch", uicb_client_togglescratch },
{ "client_setscratch", uicb_client_setscratch },
/* focus.h */
{ "focus_history", uicb_focus_history },
{ "focus_client_byname", uicb_focus_client_byname },
/* layout.h */
{ "tag_setlayout", uicb_tag_setlayout },
/* mouse.h */
{ "client_movemouse", uicb_client_movemouse },
{ "client_resizemouse", uicb_client_resizemouse },
/* screen.h */
{ "screen_focus", uicb_screen_focus },
{ "client_movetoscreen", uicb_client_movetoscreen },
/* statusbar.h */
{ "statusbar_toggle", uicb_statusbar_toggle },
/* tag.h */
{ "client_tag", uicb_client_tag },
{ "client_toggletag", uicb_client_toggletag },
{ "tag_toggleview", uicb_tag_toggleview },
{ "tag_view", uicb_tag_view },
{ "tag_prev_selected", uicb_tag_prev_selected },
{ "tag_viewnext", uicb_tag_viewnext },
{ "tag_viewprev", uicb_tag_viewprev },
{ "tag_create", uicb_tag_create },
/* titlebar.h */
{ "client_toggletitlebar", uicb_client_toggletitlebar },
/* uicb.h */
{ "restart", uicb_restart },
{ "exec", uicb_exec },
{ "spawn", uicb_spawn },
/* widget.h */
{ "widget_tell", uicb_widget_tell },
/* layouts/tile.h */
{ "tag_setnmaster", uicb_tag_setnmaster},
{ "tag_setncol", uicb_tag_setncol },
{ "tag_setmwfact", uicb_tag_setmwfact },
{ NULL, NULL }
};
/** Restart awesome with the current command line. /** Restart awesome with the current command line.
* \param screen The virtual screen number. * \param screen The virtual screen number.