From b0d4f4eb0e375b61b347a9ba1a0a99a459fad9ba Mon Sep 17 00:00:00 2001 From: Heiko Becker Date: Sun, 7 Sep 2014 19:33:18 +0200 Subject: [PATCH 1/7] Use version agnostic FindLua from cmake-3.0.0 --- CMakeLists.txt | 2 +- awesomeConfig.cmake | 9 ++------- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index fc7b84c26..f8b518b84 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 2.8.0) +cmake_minimum_required(VERSION 3.0.0) set(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS TRUE) if(COMMAND cmake_policy) diff --git a/awesomeConfig.cmake b/awesomeConfig.cmake index 620c2b4b1..d95d9d33c 100644 --- a/awesomeConfig.cmake +++ b/awesomeConfig.cmake @@ -60,8 +60,8 @@ a_find_program(CONVERT_EXECUTABLE convert TRUE) include(FindDoxygen) # pkg-config include(FindPkgConfig) -# lua 5.1 -include(FindLua51) +# lua +include(FindLua) # }}} # {{{ Check if documentation can be build @@ -189,11 +189,6 @@ else() message(STATUS "checking for __builtin_clz -- no") endif() -# Error check -if(NOT LUA51_FOUND AND NOT LUA50_FOUND) # This is a workaround to a cmake bug - message(FATAL_ERROR "lua library not found") -endif() - set(AWESOME_REQUIRED_LDFLAGS ${AWESOME_COMMON_REQUIRED_LDFLAGS} ${AWESOME_REQUIRED_LDFLAGS} From 130504a3d07cbb77f2e0c83c114e9c71edac78b4 Mon Sep 17 00:00:00 2001 From: Julian Wollrath Date: Mon, 23 Mar 2015 17:44:34 +0100 Subject: [PATCH 2/7] Rip out useless Doxygen support Signed-off-by: Julian Wollrath --- CMakeLists.txt | 8 -- awesome.doxygen.in | 246 -------------------------------------------- awesomeConfig.cmake | 5 +- 3 files changed, 1 insertion(+), 258 deletions(-) delete mode 100644 awesome.doxygen.in diff --git a/CMakeLists.txt b/CMakeLists.txt index f8b518b84..03e10da22 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -225,14 +225,6 @@ if(GENERATE_MANPAGES) endif() # }}} -# {{{ Doxygen -if(DOXYGEN_EXECUTABLE) - add_custom_target(doc - COMMAND ${DOXYGEN_EXECUTABLE} awesome.doxygen - WORKING_DIRECTORY ${BUILD_DIR}) -endif() -# }}} - # {{{ Lua API Documentation if(GENERATE_DOC) if(NOT BUILD_DIR STREQUAL SOURCE_DIR) diff --git a/awesome.doxygen.in b/awesome.doxygen.in deleted file mode 100644 index c03bdc5ca..000000000 --- a/awesome.doxygen.in +++ /dev/null @@ -1,246 +0,0 @@ -DOXYFILE_ENCODING = UTF-8 -PROJECT_NAME = awesome -PROJECT_NUMBER = devel -OUTPUT_DIRECTORY = doc -CREATE_SUBDIRS = NO -OUTPUT_LANGUAGE = English -BRIEF_MEMBER_DESC = YES -REPEAT_BRIEF = YES -ABBREVIATE_BRIEF = "The $name class" \ - "The $name widget" \ - "The $name file" \ - is \ - provides \ - specifies \ - contains \ - represents \ - a \ - an \ - the -ALWAYS_DETAILED_SEC = NO -INLINE_INHERITED_MEMB = NO -FULL_PATH_NAMES = YES -STRIP_FROM_PATH = -STRIP_FROM_INC_PATH = -SHORT_NAMES = NO -JAVADOC_AUTOBRIEF = NO -QT_AUTOBRIEF = NO -MULTILINE_CPP_IS_BRIEF = NO -INHERIT_DOCS = YES -SEPARATE_MEMBER_PAGES = NO -TAB_SIZE = 4 -ALIASES = -OPTIMIZE_OUTPUT_FOR_C = YES -OPTIMIZE_OUTPUT_JAVA = NO -BUILTIN_STL_SUPPORT = NO -CPP_CLI_SUPPORT = NO -DISTRIBUTE_GROUP_DOC = NO -SUBGROUPING = YES - -ALIASES += luastack="\par Lua Stack:" -ALIASES += lvalue="- \em value " -ALIASES += lparam="- \em param " -ALIASES += lreturn="- \em returns " -ALIASES += lfield="- \em fields " - -#--------------------------------------------------------------------------- -# Build related configuration options -#--------------------------------------------------------------------------- -EXTRACT_ALL = YES -EXTRACT_PRIVATE = YES -EXTRACT_STATIC = YES -EXTRACT_LOCAL_CLASSES = YES -EXTRACT_LOCAL_METHODS = YES -EXTRACT_ANON_NSPACES = YES -HIDE_UNDOC_MEMBERS = NO -HIDE_UNDOC_CLASSES = NO -HIDE_FRIEND_COMPOUNDS = NO -HIDE_IN_BODY_DOCS = NO -INTERNAL_DOCS = NO -CASE_SENSE_NAMES = YES -HIDE_SCOPE_NAMES = NO -SHOW_INCLUDE_FILES = YES -INLINE_INFO = YES -SORT_MEMBER_DOCS = YES -SORT_BRIEF_DOCS = NO -SORT_BY_SCOPE_NAME = NO -GENERATE_TODOLIST = YES -GENERATE_TESTLIST = YES -GENERATE_BUGLIST = YES -GENERATE_DEPRECATEDLIST= YES -ENABLED_SECTIONS = -MAX_INITIALIZER_LINES = 30 -SHOW_USED_FILES = YES -FILE_VERSION_FILTER = -#--------------------------------------------------------------------------- -# configuration options related to warning and progress messages -#--------------------------------------------------------------------------- -QUIET = YES -WARNINGS = YES -WARN_IF_UNDOCUMENTED = YES -WARN_IF_DOC_ERROR = YES -WARN_NO_PARAMDOC = NO -WARN_FORMAT = "$file:$line: $text" -WARN_LOGFILE = -#--------------------------------------------------------------------------- -# configuration options related to the input files -#--------------------------------------------------------------------------- -INPUT = @awesome_SOURCE_DIR@ -INPUT_ENCODING = UTF-8 -FILE_PATTERNS = *.c \ - *.h \ - common/*.c \ - common/*.h \ - widgets/*.c \ - widgets/*.h \ -RECURSIVE = YES -EXCLUDE = -EXCLUDE_SYMLINKS = NO -EXCLUDE_PATTERNS = -EXCLUDE_SYMBOLS = -EXAMPLE_PATH = -EXAMPLE_PATTERNS = * -EXAMPLE_RECURSIVE = NO -IMAGE_PATH = -INPUT_FILTER = -FILTER_PATTERNS = -FILTER_SOURCE_FILES = NO -#--------------------------------------------------------------------------- -# configuration options related to source browsing -#--------------------------------------------------------------------------- -SOURCE_BROWSER = YES -INLINE_SOURCES = NO -STRIP_CODE_COMMENTS = NO -REFERENCED_BY_RELATION = YES -REFERENCES_RELATION = YES -REFERENCES_LINK_SOURCE = YES -USE_HTAGS = NO -VERBATIM_HEADERS = YES -#--------------------------------------------------------------------------- -# configuration options related to the alphabetical class index -#--------------------------------------------------------------------------- -ALPHABETICAL_INDEX = NO -COLS_IN_ALPHA_INDEX = 5 -IGNORE_PREFIX = -#--------------------------------------------------------------------------- -# configuration options related to the HTML output -#--------------------------------------------------------------------------- -GENERATE_HTML = YES -HTML_OUTPUT = html -HTML_FILE_EXTENSION = .html -HTML_HEADER = -HTML_FOOTER = -HTML_STYLESHEET = -GENERATE_HTMLHELP = NO -HTML_DYNAMIC_SECTIONS = NO -CHM_FILE = -HHC_LOCATION = -GENERATE_CHI = NO -BINARY_TOC = NO -TOC_EXPAND = NO -DISABLE_INDEX = NO -ENUM_VALUES_PER_LINE = 4 -GENERATE_TREEVIEW = YES -TREEVIEW_WIDTH = 250 -#--------------------------------------------------------------------------- -# configuration options related to the LaTeX output -#--------------------------------------------------------------------------- -GENERATE_LATEX = NO -LATEX_OUTPUT = latex -LATEX_CMD_NAME = latex -MAKEINDEX_CMD_NAME = makeindex -COMPACT_LATEX = NO -PAPER_TYPE = a4wide -EXTRA_PACKAGES = -LATEX_HEADER = -PDF_HYPERLINKS = NO -USE_PDFLATEX = NO -LATEX_BATCHMODE = NO -LATEX_HIDE_INDICES = NO -#--------------------------------------------------------------------------- -# configuration options related to the RTF output -#--------------------------------------------------------------------------- -GENERATE_RTF = NO -RTF_OUTPUT = rtf -COMPACT_RTF = NO -RTF_HYPERLINKS = NO -RTF_STYLESHEET_FILE = -RTF_EXTENSIONS_FILE = -#--------------------------------------------------------------------------- -# configuration options related to the man page output -#--------------------------------------------------------------------------- -GENERATE_MAN = NO -MAN_OUTPUT = man -MAN_EXTENSION = .3 -MAN_LINKS = NO -#--------------------------------------------------------------------------- -# configuration options related to the XML output -#--------------------------------------------------------------------------- -GENERATE_XML = NO -XML_OUTPUT = xml -XML_SCHEMA = -XML_DTD = -XML_PROGRAMLISTING = YES -#--------------------------------------------------------------------------- -# configuration options for the AutoGen Definitions output -#--------------------------------------------------------------------------- -GENERATE_AUTOGEN_DEF = NO -#--------------------------------------------------------------------------- -# configuration options related to the Perl module output -#--------------------------------------------------------------------------- -GENERATE_PERLMOD = NO -PERLMOD_LATEX = NO -PERLMOD_PRETTY = YES -PERLMOD_MAKEVAR_PREFIX = -#--------------------------------------------------------------------------- -# Configuration options related to the preprocessor -#--------------------------------------------------------------------------- -ENABLE_PREPROCESSING = YES -MACRO_EXPANSION = YES -EXPAND_ONLY_PREDEF = YES -SEARCH_INCLUDES = YES -INCLUDE_PATH = -INCLUDE_FILE_PATTERNS = -PREDEFINED = WITH_DBUS = \ - "__attribute__(x)=" -EXPAND_AS_DEFINED = -SKIP_FUNCTION_MACROS = YES -#--------------------------------------------------------------------------- -# Configuration::additions related to external references -#--------------------------------------------------------------------------- -TAGFILES = -GENERATE_TAGFILE = -ALLEXTERNALS = NO -EXTERNAL_GROUPS = YES -PERL_PATH = /usr/bin/perl -#--------------------------------------------------------------------------- -# Configuration options related to the dot tool -#--------------------------------------------------------------------------- -CLASS_DIAGRAMS = NO -MSCGEN_PATH = -HIDE_UNDOC_RELATIONS = YES -HAVE_DOT = YES -CLASS_GRAPH = YES -COLLABORATION_GRAPH = YES -GROUP_GRAPHS = YES -UML_LOOK = YES -TEMPLATE_RELATIONS = YES -INCLUDE_GRAPH = YES -INCLUDED_BY_GRAPH = YES -CALL_GRAPH = YES -CALLER_GRAPH = YES -GRAPHICAL_HIERARCHY = YES -DIRECTORY_GRAPH = YES -DOT_IMAGE_FORMAT = png -DOT_PATH = -DOTFILE_DIRS = -DOT_GRAPH_MAX_NODES = 50 -MAX_DOT_GRAPH_DEPTH = 1000 -DOT_TRANSPARENT = YES -DOT_MULTI_TARGETS = NO -GENERATE_LEGEND = YES -DOT_CLEANUP = YES -#--------------------------------------------------------------------------- -# Configuration::additions related to the search engine -#--------------------------------------------------------------------------- -SEARCHENGINE = NO diff --git a/awesomeConfig.cmake b/awesomeConfig.cmake index d95d9d33c..3a64a706c 100644 --- a/awesomeConfig.cmake +++ b/awesomeConfig.cmake @@ -56,8 +56,6 @@ if(NOT LDOC_EXECUTABLE) endif() # theme graphics a_find_program(CONVERT_EXECUTABLE convert TRUE) -# doxygen -include(FindDoxygen) # pkg-config include(FindPkgConfig) # lua @@ -290,8 +288,7 @@ set(AWESOME_CONFIGURE_FILES config.h.in docs/config.ld.in awesomerc.lua.in - awesome-version-internal.h.in - awesome.doxygen.in) + awesome-version-internal.h.in) macro(a_configure_file file) string(REGEX REPLACE ".in\$" "" outfile ${file}) From 6cc7be512c629ba2008c918a0778ea7eb27df158 Mon Sep 17 00:00:00 2001 From: Julian Wollrath Date: Fri, 27 Mar 2015 17:45:59 +0100 Subject: [PATCH 3/7] Remove the *.in from all files. Signed-off-b: Julian Wollrath --- CMakeLists.txt | 79 +++++++++---------- ...nternal.h.in => awesome-version-internal.h | 0 awesomeConfig.cmake | 49 +++++++----- awesomerc.lua.in => awesomerc.lua | 0 config.h.in => config.h | 0 docs/{config.ld.in => config.ld} | 0 lib/awful/{autofocus.lua.in => autofocus.lua} | 0 lib/awful/{button.lua.in => button.lua} | 0 lib/awful/{client.lua.in => client.lua} | 0 lib/awful/client/{shape.lua.in => shape.lua} | 0 .../{completion.lua.in => completion.lua} | 0 lib/awful/{dbus.lua.in => dbus.lua} | 0 lib/awful/{ewmh.lua.in => ewmh.lua} | 0 lib/awful/{init.lua.in => init.lua} | 0 lib/awful/{key.lua.in => key.lua} | 0 .../{keygrabber.lua.in => keygrabber.lua} | 0 lib/awful/layout/{init.lua.in => init.lua} | 0 .../layout/suit/{fair.lua.in => fair.lua} | 0 .../suit/{floating.lua.in => floating.lua} | 0 .../layout/suit/{init.lua.in => init.lua} | 0 .../suit/{magnifier.lua.in => magnifier.lua} | 0 lib/awful/layout/suit/{max.lua.in => max.lua} | 0 .../layout/suit/{spiral.lua.in => spiral.lua} | 0 .../layout/suit/{tile.lua.in => tile.lua} | 0 lib/awful/{menu.lua.in => menu.lua} | 0 lib/awful/mouse/{finder.lua.in => finder.lua} | 0 lib/awful/mouse/{init.lua.in => init.lua} | 0 lib/awful/{placement.lua.in => placement.lua} | 0 lib/awful/{prompt.lua.in => prompt.lua} | 0 lib/awful/{remote.lua.in => remote.lua} | 0 lib/awful/{rules.lua.in => rules.lua} | 0 lib/awful/{screen.lua.in => screen.lua} | 0 ...cation.lua.in => startup_notification.lua} | 0 lib/awful/{tag.lua.in => tag.lua} | 0 lib/awful/{titlebar.lua.in => titlebar.lua} | 0 lib/awful/{tooltip.lua.in => tooltip.lua} | 0 lib/awful/{util.lua.in => util.lua} | 0 lib/awful/{wibox.lua.in => wibox.lua} | 0 .../widget/{button.lua.in => button.lua} | 0 .../widget/{common.lua.in => common.lua} | 0 lib/awful/widget/{graph.lua.in => graph.lua} | 0 lib/awful/widget/{init.lua.in => init.lua} | 0 .../widget/{launcher.lua.in => launcher.lua} | 0 .../{layoutbox.lua.in => layoutbox.lua} | 0 .../{progressbar.lua.in => progressbar.lua} | 0 .../widget/{prompt.lua.in => prompt.lua} | 0 .../widget/{taglist.lua.in => taglist.lua} | 0 .../widget/{tasklist.lua.in => tasklist.lua} | 0 .../{textclock.lua.in => textclock.lua} | 0 lib/{beautiful.lua.in => beautiful.lua} | 0 lib/gears/{color.lua.in => color.lua} | 0 lib/gears/{debug.lua.in => debug.lua} | 0 lib/gears/{init.lua.in => init.lua} | 0 lib/gears/{object.lua.in => object.lua} | 0 lib/gears/{sort.lua.in => sort.lua} | 0 lib/gears/{surface.lua.in => surface.lua} | 0 lib/gears/{timer.lua.in => timer.lua} | 0 lib/gears/{wallpaper.lua.in => wallpaper.lua} | 0 lib/menubar/{init.lua.in => init.lua} | 0 lib/menubar/{menu_gen.lua.in => menu_gen.lua} | 0 lib/menubar/{utils.lua.in => utils.lua} | 0 lib/naughty/{core.lua.in => core.lua} | 0 lib/naughty/{dbus.lua.in => dbus.lua} | 0 lib/naughty/{init.lua.in => init.lua} | 0 lib/wibox/{drawable.lua.in => drawable.lua} | 0 lib/wibox/{init.lua.in => init.lua} | 0 lib/wibox/layout/{align.lua.in => align.lua} | 0 lib/wibox/layout/{base.lua.in => base.lua} | 0 .../{constraint.lua.in => constraint.lua} | 0 lib/wibox/layout/{fixed.lua.in => fixed.lua} | 0 lib/wibox/layout/{flex.lua.in => flex.lua} | 0 lib/wibox/layout/{init.lua.in => init.lua} | 0 .../layout/{margin.lua.in => margin.lua} | 0 .../layout/{mirror.lua.in => mirror.lua} | 0 .../layout/{rotate.lua.in => rotate.lua} | 0 .../{background.lua.in => background.lua} | 0 lib/wibox/widget/{base.lua.in => base.lua} | 0 .../widget/{imagebox.lua.in => imagebox.lua} | 0 lib/wibox/widget/{init.lua.in => init.lua} | 0 .../widget/{systray.lua.in => systray.lua} | 0 .../widget/{textbox.lua.in => textbox.lua} | 0 themes/default/{theme.lua.in => theme.lua} | 0 themes/sky/{theme.lua.in => theme.lua} | 0 themes/zenburn/{theme.lua.in => theme.lua} | 0 84 files changed, 70 insertions(+), 58 deletions(-) rename awesome-version-internal.h.in => awesome-version-internal.h (100%) rename awesomerc.lua.in => awesomerc.lua (100%) rename config.h.in => config.h (100%) rename docs/{config.ld.in => config.ld} (100%) rename lib/awful/{autofocus.lua.in => autofocus.lua} (100%) rename lib/awful/{button.lua.in => button.lua} (100%) rename lib/awful/{client.lua.in => client.lua} (100%) rename lib/awful/client/{shape.lua.in => shape.lua} (100%) rename lib/awful/{completion.lua.in => completion.lua} (100%) rename lib/awful/{dbus.lua.in => dbus.lua} (100%) rename lib/awful/{ewmh.lua.in => ewmh.lua} (100%) rename lib/awful/{init.lua.in => init.lua} (100%) rename lib/awful/{key.lua.in => key.lua} (100%) rename lib/awful/{keygrabber.lua.in => keygrabber.lua} (100%) rename lib/awful/layout/{init.lua.in => init.lua} (100%) rename lib/awful/layout/suit/{fair.lua.in => fair.lua} (100%) rename lib/awful/layout/suit/{floating.lua.in => floating.lua} (100%) rename lib/awful/layout/suit/{init.lua.in => init.lua} (100%) rename lib/awful/layout/suit/{magnifier.lua.in => magnifier.lua} (100%) rename lib/awful/layout/suit/{max.lua.in => max.lua} (100%) rename lib/awful/layout/suit/{spiral.lua.in => spiral.lua} (100%) rename lib/awful/layout/suit/{tile.lua.in => tile.lua} (100%) rename lib/awful/{menu.lua.in => menu.lua} (100%) rename lib/awful/mouse/{finder.lua.in => finder.lua} (100%) rename lib/awful/mouse/{init.lua.in => init.lua} (100%) rename lib/awful/{placement.lua.in => placement.lua} (100%) rename lib/awful/{prompt.lua.in => prompt.lua} (100%) rename lib/awful/{remote.lua.in => remote.lua} (100%) rename lib/awful/{rules.lua.in => rules.lua} (100%) rename lib/awful/{screen.lua.in => screen.lua} (100%) rename lib/awful/{startup_notification.lua.in => startup_notification.lua} (100%) rename lib/awful/{tag.lua.in => tag.lua} (100%) rename lib/awful/{titlebar.lua.in => titlebar.lua} (100%) rename lib/awful/{tooltip.lua.in => tooltip.lua} (100%) rename lib/awful/{util.lua.in => util.lua} (100%) rename lib/awful/{wibox.lua.in => wibox.lua} (100%) rename lib/awful/widget/{button.lua.in => button.lua} (100%) rename lib/awful/widget/{common.lua.in => common.lua} (100%) rename lib/awful/widget/{graph.lua.in => graph.lua} (100%) rename lib/awful/widget/{init.lua.in => init.lua} (100%) rename lib/awful/widget/{launcher.lua.in => launcher.lua} (100%) rename lib/awful/widget/{layoutbox.lua.in => layoutbox.lua} (100%) rename lib/awful/widget/{progressbar.lua.in => progressbar.lua} (100%) rename lib/awful/widget/{prompt.lua.in => prompt.lua} (100%) rename lib/awful/widget/{taglist.lua.in => taglist.lua} (100%) rename lib/awful/widget/{tasklist.lua.in => tasklist.lua} (100%) rename lib/awful/widget/{textclock.lua.in => textclock.lua} (100%) rename lib/{beautiful.lua.in => beautiful.lua} (100%) rename lib/gears/{color.lua.in => color.lua} (100%) rename lib/gears/{debug.lua.in => debug.lua} (100%) rename lib/gears/{init.lua.in => init.lua} (100%) rename lib/gears/{object.lua.in => object.lua} (100%) rename lib/gears/{sort.lua.in => sort.lua} (100%) rename lib/gears/{surface.lua.in => surface.lua} (100%) rename lib/gears/{timer.lua.in => timer.lua} (100%) rename lib/gears/{wallpaper.lua.in => wallpaper.lua} (100%) rename lib/menubar/{init.lua.in => init.lua} (100%) rename lib/menubar/{menu_gen.lua.in => menu_gen.lua} (100%) rename lib/menubar/{utils.lua.in => utils.lua} (100%) rename lib/naughty/{core.lua.in => core.lua} (100%) rename lib/naughty/{dbus.lua.in => dbus.lua} (100%) rename lib/naughty/{init.lua.in => init.lua} (100%) rename lib/wibox/{drawable.lua.in => drawable.lua} (100%) rename lib/wibox/{init.lua.in => init.lua} (100%) rename lib/wibox/layout/{align.lua.in => align.lua} (100%) rename lib/wibox/layout/{base.lua.in => base.lua} (100%) rename lib/wibox/layout/{constraint.lua.in => constraint.lua} (100%) rename lib/wibox/layout/{fixed.lua.in => fixed.lua} (100%) rename lib/wibox/layout/{flex.lua.in => flex.lua} (100%) rename lib/wibox/layout/{init.lua.in => init.lua} (100%) rename lib/wibox/layout/{margin.lua.in => margin.lua} (100%) rename lib/wibox/layout/{mirror.lua.in => mirror.lua} (100%) rename lib/wibox/layout/{rotate.lua.in => rotate.lua} (100%) rename lib/wibox/widget/{background.lua.in => background.lua} (100%) rename lib/wibox/widget/{base.lua.in => base.lua} (100%) rename lib/wibox/widget/{imagebox.lua.in => imagebox.lua} (100%) rename lib/wibox/widget/{init.lua.in => init.lua} (100%) rename lib/wibox/widget/{systray.lua.in => systray.lua} (100%) rename lib/wibox/widget/{textbox.lua.in => textbox.lua} (100%) rename themes/default/{theme.lua.in => theme.lua} (100%) rename themes/sky/{theme.lua.in => theme.lua} (100%) rename themes/zenburn/{theme.lua.in => theme.lua} (100%) diff --git a/CMakeLists.txt b/CMakeLists.txt index 03e10da22..41e5c3d14 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -15,7 +15,6 @@ endif() include(awesomeConfig.cmake) include_directories( - ${SOURCE_DIR} ${BUILD_DIR} ${AWESOME_COMMON_REQUIRED_INCLUDE_DIRS} ${AWESOME_REQUIRED_INCLUDE_DIRS} @@ -36,45 +35,45 @@ set(AWE_DOC_FILES ${SOURCE_DIR}/LICENSE) set(AWE_SRCS - ${SOURCE_DIR}/awesome.c - ${SOURCE_DIR}/banning.c - ${SOURCE_DIR}/color.c - ${SOURCE_DIR}/dbus.c - ${SOURCE_DIR}/draw.c - ${SOURCE_DIR}/event.c - ${SOURCE_DIR}/ewmh.c - ${SOURCE_DIR}/keygrabber.c - ${SOURCE_DIR}/luaa.c - ${SOURCE_DIR}/mouse.c - ${SOURCE_DIR}/mousegrabber.c - ${SOURCE_DIR}/property.c - ${SOURCE_DIR}/root.c - ${SOURCE_DIR}/selection.c - ${SOURCE_DIR}/spawn.c - ${SOURCE_DIR}/stack.c - ${SOURCE_DIR}/strut.c - ${SOURCE_DIR}/systray.c - ${SOURCE_DIR}/xwindow.c - ${SOURCE_DIR}/xkb.c - ${SOURCE_DIR}/common/atoms.c - ${SOURCE_DIR}/common/backtrace.c - ${SOURCE_DIR}/common/buffer.c - ${SOURCE_DIR}/common/luaclass.c - ${SOURCE_DIR}/common/lualib.c - ${SOURCE_DIR}/common/luaobject.c - ${SOURCE_DIR}/common/util.c - ${SOURCE_DIR}/common/version.c - ${SOURCE_DIR}/common/xcursor.c - ${SOURCE_DIR}/common/xembed.c - ${SOURCE_DIR}/common/xutil.c - ${SOURCE_DIR}/objects/button.c - ${SOURCE_DIR}/objects/client.c - ${SOURCE_DIR}/objects/drawable.c - ${SOURCE_DIR}/objects/drawin.c - ${SOURCE_DIR}/objects/key.c - ${SOURCE_DIR}/objects/screen.c - ${SOURCE_DIR}/objects/tag.c - ${SOURCE_DIR}/objects/window.c) + ${BUILD_DIR}/awesome.c + ${BUILD_DIR}/banning.c + ${BUILD_DIR}/color.c + ${BUILD_DIR}/dbus.c + ${BUILD_DIR}/draw.c + ${BUILD_DIR}/event.c + ${BUILD_DIR}/ewmh.c + ${BUILD_DIR}/keygrabber.c + ${BUILD_DIR}/luaa.c + ${BUILD_DIR}/mouse.c + ${BUILD_DIR}/mousegrabber.c + ${BUILD_DIR}/property.c + ${BUILD_DIR}/root.c + ${BUILD_DIR}/selection.c + ${BUILD_DIR}/spawn.c + ${BUILD_DIR}/stack.c + ${BUILD_DIR}/strut.c + ${BUILD_DIR}/systray.c + ${BUILD_DIR}/xwindow.c + ${BUILD_DIR}/xkb.c + ${BUILD_DIR}/common/atoms.c + ${BUILD_DIR}/common/backtrace.c + ${BUILD_DIR}/common/buffer.c + ${BUILD_DIR}/common/luaclass.c + ${BUILD_DIR}/common/lualib.c + ${BUILD_DIR}/common/luaobject.c + ${BUILD_DIR}/common/util.c + ${BUILD_DIR}/common/version.c + ${BUILD_DIR}/common/xcursor.c + ${BUILD_DIR}/common/xembed.c + ${BUILD_DIR}/common/xutil.c + ${BUILD_DIR}/objects/button.c + ${BUILD_DIR}/objects/client.c + ${BUILD_DIR}/objects/drawable.c + ${BUILD_DIR}/objects/drawin.c + ${BUILD_DIR}/objects/key.c + ${BUILD_DIR}/objects/screen.c + ${BUILD_DIR}/objects/tag.c + ${BUILD_DIR}/objects/window.c) set(AWE_MAN_SRCS ${SOURCE_DIR}/manpages/awesome.1.txt diff --git a/awesome-version-internal.h.in b/awesome-version-internal.h similarity index 100% rename from awesome-version-internal.h.in rename to awesome-version-internal.h diff --git a/awesomeConfig.cmake b/awesomeConfig.cmake index 3a64a706c..7a391b11d 100644 --- a/awesomeConfig.cmake +++ b/awesomeConfig.cmake @@ -277,31 +277,44 @@ set(AWESOME_THEMES_PATH ${AWESOME_DATA_PATH}/themes) # }}} # {{{ Configure files +file(GLOB_RECURSE awesome_c_configure_files RELATIVE + ${SOURCE_DIR} + ${SOURCE_DIR}/*.c + ${SOURCE_DIR}/*.h + ${SOURCE_DIR}/*/*.c + ${SOURCE_DIR}/*/*.h) file(GLOB_RECURSE awesome_lua_configure_files RELATIVE ${SOURCE_DIR} - ${SOURCE_DIR}/lib/*.lua.in - ${SOURCE_DIR}/docs/capi/*.lua.in - ${SOURCE_DIR}/docs/*.md - ${SOURCE_DIR}/themes/*/*.lua.in) + ${SOURCE_DIR}/lib/*.lua + ${SOURCE_DIR}/themes/*/*.lua) set(AWESOME_CONFIGURE_FILES ${awesome_lua_configure_files} - config.h.in - docs/config.ld.in - awesomerc.lua.in - awesome-version-internal.h.in) - -macro(a_configure_file file) - string(REGEX REPLACE ".in\$" "" outfile ${file}) - message(STATUS "Configuring ${outfile}") - configure_file(${SOURCE_DIR}/${file} - ${BUILD_DIR}/${outfile} - ESCAPE_QUOTE - @ONLY) -endmacro() + config.h + docs/config.ld + awesomerc.lua + awesome-version-internal.h) foreach(file ${AWESOME_CONFIGURE_FILES}) - a_configure_file(${file}) + configure_file(${SOURCE_DIR}/${file} + ${BUILD_DIR}/${file} + ESCAPE_QUOTE + @ONLY) endforeach() #}}} +# {{{ Copy additional files +file(GLOB_RECURSE awesome_md_docs RELATIVE + ${SOURCE_DIR} + ${SOURCE_DIR}/docs/*.md) +set(AWESOME_ADDITIONAL_FILES + ${awesome_md_docs}) + +foreach(file ${AWESOME_ADDITIONAL_FILES}) + configure_file(${SOURCE_DIR}/${file} + ${BUILD_DIR}/${file} + COPYONLY) +endforeach() +#}}} + + # vim: filetype=cmake:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80:foldmethod=marker diff --git a/awesomerc.lua.in b/awesomerc.lua similarity index 100% rename from awesomerc.lua.in rename to awesomerc.lua diff --git a/config.h.in b/config.h similarity index 100% rename from config.h.in rename to config.h diff --git a/docs/config.ld.in b/docs/config.ld similarity index 100% rename from docs/config.ld.in rename to docs/config.ld diff --git a/lib/awful/autofocus.lua.in b/lib/awful/autofocus.lua similarity index 100% rename from lib/awful/autofocus.lua.in rename to lib/awful/autofocus.lua diff --git a/lib/awful/button.lua.in b/lib/awful/button.lua similarity index 100% rename from lib/awful/button.lua.in rename to lib/awful/button.lua diff --git a/lib/awful/client.lua.in b/lib/awful/client.lua similarity index 100% rename from lib/awful/client.lua.in rename to lib/awful/client.lua diff --git a/lib/awful/client/shape.lua.in b/lib/awful/client/shape.lua similarity index 100% rename from lib/awful/client/shape.lua.in rename to lib/awful/client/shape.lua diff --git a/lib/awful/completion.lua.in b/lib/awful/completion.lua similarity index 100% rename from lib/awful/completion.lua.in rename to lib/awful/completion.lua diff --git a/lib/awful/dbus.lua.in b/lib/awful/dbus.lua similarity index 100% rename from lib/awful/dbus.lua.in rename to lib/awful/dbus.lua diff --git a/lib/awful/ewmh.lua.in b/lib/awful/ewmh.lua similarity index 100% rename from lib/awful/ewmh.lua.in rename to lib/awful/ewmh.lua diff --git a/lib/awful/init.lua.in b/lib/awful/init.lua similarity index 100% rename from lib/awful/init.lua.in rename to lib/awful/init.lua diff --git a/lib/awful/key.lua.in b/lib/awful/key.lua similarity index 100% rename from lib/awful/key.lua.in rename to lib/awful/key.lua diff --git a/lib/awful/keygrabber.lua.in b/lib/awful/keygrabber.lua similarity index 100% rename from lib/awful/keygrabber.lua.in rename to lib/awful/keygrabber.lua diff --git a/lib/awful/layout/init.lua.in b/lib/awful/layout/init.lua similarity index 100% rename from lib/awful/layout/init.lua.in rename to lib/awful/layout/init.lua diff --git a/lib/awful/layout/suit/fair.lua.in b/lib/awful/layout/suit/fair.lua similarity index 100% rename from lib/awful/layout/suit/fair.lua.in rename to lib/awful/layout/suit/fair.lua diff --git a/lib/awful/layout/suit/floating.lua.in b/lib/awful/layout/suit/floating.lua similarity index 100% rename from lib/awful/layout/suit/floating.lua.in rename to lib/awful/layout/suit/floating.lua diff --git a/lib/awful/layout/suit/init.lua.in b/lib/awful/layout/suit/init.lua similarity index 100% rename from lib/awful/layout/suit/init.lua.in rename to lib/awful/layout/suit/init.lua diff --git a/lib/awful/layout/suit/magnifier.lua.in b/lib/awful/layout/suit/magnifier.lua similarity index 100% rename from lib/awful/layout/suit/magnifier.lua.in rename to lib/awful/layout/suit/magnifier.lua diff --git a/lib/awful/layout/suit/max.lua.in b/lib/awful/layout/suit/max.lua similarity index 100% rename from lib/awful/layout/suit/max.lua.in rename to lib/awful/layout/suit/max.lua diff --git a/lib/awful/layout/suit/spiral.lua.in b/lib/awful/layout/suit/spiral.lua similarity index 100% rename from lib/awful/layout/suit/spiral.lua.in rename to lib/awful/layout/suit/spiral.lua diff --git a/lib/awful/layout/suit/tile.lua.in b/lib/awful/layout/suit/tile.lua similarity index 100% rename from lib/awful/layout/suit/tile.lua.in rename to lib/awful/layout/suit/tile.lua diff --git a/lib/awful/menu.lua.in b/lib/awful/menu.lua similarity index 100% rename from lib/awful/menu.lua.in rename to lib/awful/menu.lua diff --git a/lib/awful/mouse/finder.lua.in b/lib/awful/mouse/finder.lua similarity index 100% rename from lib/awful/mouse/finder.lua.in rename to lib/awful/mouse/finder.lua diff --git a/lib/awful/mouse/init.lua.in b/lib/awful/mouse/init.lua similarity index 100% rename from lib/awful/mouse/init.lua.in rename to lib/awful/mouse/init.lua diff --git a/lib/awful/placement.lua.in b/lib/awful/placement.lua similarity index 100% rename from lib/awful/placement.lua.in rename to lib/awful/placement.lua diff --git a/lib/awful/prompt.lua.in b/lib/awful/prompt.lua similarity index 100% rename from lib/awful/prompt.lua.in rename to lib/awful/prompt.lua diff --git a/lib/awful/remote.lua.in b/lib/awful/remote.lua similarity index 100% rename from lib/awful/remote.lua.in rename to lib/awful/remote.lua diff --git a/lib/awful/rules.lua.in b/lib/awful/rules.lua similarity index 100% rename from lib/awful/rules.lua.in rename to lib/awful/rules.lua diff --git a/lib/awful/screen.lua.in b/lib/awful/screen.lua similarity index 100% rename from lib/awful/screen.lua.in rename to lib/awful/screen.lua diff --git a/lib/awful/startup_notification.lua.in b/lib/awful/startup_notification.lua similarity index 100% rename from lib/awful/startup_notification.lua.in rename to lib/awful/startup_notification.lua diff --git a/lib/awful/tag.lua.in b/lib/awful/tag.lua similarity index 100% rename from lib/awful/tag.lua.in rename to lib/awful/tag.lua diff --git a/lib/awful/titlebar.lua.in b/lib/awful/titlebar.lua similarity index 100% rename from lib/awful/titlebar.lua.in rename to lib/awful/titlebar.lua diff --git a/lib/awful/tooltip.lua.in b/lib/awful/tooltip.lua similarity index 100% rename from lib/awful/tooltip.lua.in rename to lib/awful/tooltip.lua diff --git a/lib/awful/util.lua.in b/lib/awful/util.lua similarity index 100% rename from lib/awful/util.lua.in rename to lib/awful/util.lua diff --git a/lib/awful/wibox.lua.in b/lib/awful/wibox.lua similarity index 100% rename from lib/awful/wibox.lua.in rename to lib/awful/wibox.lua diff --git a/lib/awful/widget/button.lua.in b/lib/awful/widget/button.lua similarity index 100% rename from lib/awful/widget/button.lua.in rename to lib/awful/widget/button.lua diff --git a/lib/awful/widget/common.lua.in b/lib/awful/widget/common.lua similarity index 100% rename from lib/awful/widget/common.lua.in rename to lib/awful/widget/common.lua diff --git a/lib/awful/widget/graph.lua.in b/lib/awful/widget/graph.lua similarity index 100% rename from lib/awful/widget/graph.lua.in rename to lib/awful/widget/graph.lua diff --git a/lib/awful/widget/init.lua.in b/lib/awful/widget/init.lua similarity index 100% rename from lib/awful/widget/init.lua.in rename to lib/awful/widget/init.lua diff --git a/lib/awful/widget/launcher.lua.in b/lib/awful/widget/launcher.lua similarity index 100% rename from lib/awful/widget/launcher.lua.in rename to lib/awful/widget/launcher.lua diff --git a/lib/awful/widget/layoutbox.lua.in b/lib/awful/widget/layoutbox.lua similarity index 100% rename from lib/awful/widget/layoutbox.lua.in rename to lib/awful/widget/layoutbox.lua diff --git a/lib/awful/widget/progressbar.lua.in b/lib/awful/widget/progressbar.lua similarity index 100% rename from lib/awful/widget/progressbar.lua.in rename to lib/awful/widget/progressbar.lua diff --git a/lib/awful/widget/prompt.lua.in b/lib/awful/widget/prompt.lua similarity index 100% rename from lib/awful/widget/prompt.lua.in rename to lib/awful/widget/prompt.lua diff --git a/lib/awful/widget/taglist.lua.in b/lib/awful/widget/taglist.lua similarity index 100% rename from lib/awful/widget/taglist.lua.in rename to lib/awful/widget/taglist.lua diff --git a/lib/awful/widget/tasklist.lua.in b/lib/awful/widget/tasklist.lua similarity index 100% rename from lib/awful/widget/tasklist.lua.in rename to lib/awful/widget/tasklist.lua diff --git a/lib/awful/widget/textclock.lua.in b/lib/awful/widget/textclock.lua similarity index 100% rename from lib/awful/widget/textclock.lua.in rename to lib/awful/widget/textclock.lua diff --git a/lib/beautiful.lua.in b/lib/beautiful.lua similarity index 100% rename from lib/beautiful.lua.in rename to lib/beautiful.lua diff --git a/lib/gears/color.lua.in b/lib/gears/color.lua similarity index 100% rename from lib/gears/color.lua.in rename to lib/gears/color.lua diff --git a/lib/gears/debug.lua.in b/lib/gears/debug.lua similarity index 100% rename from lib/gears/debug.lua.in rename to lib/gears/debug.lua diff --git a/lib/gears/init.lua.in b/lib/gears/init.lua similarity index 100% rename from lib/gears/init.lua.in rename to lib/gears/init.lua diff --git a/lib/gears/object.lua.in b/lib/gears/object.lua similarity index 100% rename from lib/gears/object.lua.in rename to lib/gears/object.lua diff --git a/lib/gears/sort.lua.in b/lib/gears/sort.lua similarity index 100% rename from lib/gears/sort.lua.in rename to lib/gears/sort.lua diff --git a/lib/gears/surface.lua.in b/lib/gears/surface.lua similarity index 100% rename from lib/gears/surface.lua.in rename to lib/gears/surface.lua diff --git a/lib/gears/timer.lua.in b/lib/gears/timer.lua similarity index 100% rename from lib/gears/timer.lua.in rename to lib/gears/timer.lua diff --git a/lib/gears/wallpaper.lua.in b/lib/gears/wallpaper.lua similarity index 100% rename from lib/gears/wallpaper.lua.in rename to lib/gears/wallpaper.lua diff --git a/lib/menubar/init.lua.in b/lib/menubar/init.lua similarity index 100% rename from lib/menubar/init.lua.in rename to lib/menubar/init.lua diff --git a/lib/menubar/menu_gen.lua.in b/lib/menubar/menu_gen.lua similarity index 100% rename from lib/menubar/menu_gen.lua.in rename to lib/menubar/menu_gen.lua diff --git a/lib/menubar/utils.lua.in b/lib/menubar/utils.lua similarity index 100% rename from lib/menubar/utils.lua.in rename to lib/menubar/utils.lua diff --git a/lib/naughty/core.lua.in b/lib/naughty/core.lua similarity index 100% rename from lib/naughty/core.lua.in rename to lib/naughty/core.lua diff --git a/lib/naughty/dbus.lua.in b/lib/naughty/dbus.lua similarity index 100% rename from lib/naughty/dbus.lua.in rename to lib/naughty/dbus.lua diff --git a/lib/naughty/init.lua.in b/lib/naughty/init.lua similarity index 100% rename from lib/naughty/init.lua.in rename to lib/naughty/init.lua diff --git a/lib/wibox/drawable.lua.in b/lib/wibox/drawable.lua similarity index 100% rename from lib/wibox/drawable.lua.in rename to lib/wibox/drawable.lua diff --git a/lib/wibox/init.lua.in b/lib/wibox/init.lua similarity index 100% rename from lib/wibox/init.lua.in rename to lib/wibox/init.lua diff --git a/lib/wibox/layout/align.lua.in b/lib/wibox/layout/align.lua similarity index 100% rename from lib/wibox/layout/align.lua.in rename to lib/wibox/layout/align.lua diff --git a/lib/wibox/layout/base.lua.in b/lib/wibox/layout/base.lua similarity index 100% rename from lib/wibox/layout/base.lua.in rename to lib/wibox/layout/base.lua diff --git a/lib/wibox/layout/constraint.lua.in b/lib/wibox/layout/constraint.lua similarity index 100% rename from lib/wibox/layout/constraint.lua.in rename to lib/wibox/layout/constraint.lua diff --git a/lib/wibox/layout/fixed.lua.in b/lib/wibox/layout/fixed.lua similarity index 100% rename from lib/wibox/layout/fixed.lua.in rename to lib/wibox/layout/fixed.lua diff --git a/lib/wibox/layout/flex.lua.in b/lib/wibox/layout/flex.lua similarity index 100% rename from lib/wibox/layout/flex.lua.in rename to lib/wibox/layout/flex.lua diff --git a/lib/wibox/layout/init.lua.in b/lib/wibox/layout/init.lua similarity index 100% rename from lib/wibox/layout/init.lua.in rename to lib/wibox/layout/init.lua diff --git a/lib/wibox/layout/margin.lua.in b/lib/wibox/layout/margin.lua similarity index 100% rename from lib/wibox/layout/margin.lua.in rename to lib/wibox/layout/margin.lua diff --git a/lib/wibox/layout/mirror.lua.in b/lib/wibox/layout/mirror.lua similarity index 100% rename from lib/wibox/layout/mirror.lua.in rename to lib/wibox/layout/mirror.lua diff --git a/lib/wibox/layout/rotate.lua.in b/lib/wibox/layout/rotate.lua similarity index 100% rename from lib/wibox/layout/rotate.lua.in rename to lib/wibox/layout/rotate.lua diff --git a/lib/wibox/widget/background.lua.in b/lib/wibox/widget/background.lua similarity index 100% rename from lib/wibox/widget/background.lua.in rename to lib/wibox/widget/background.lua diff --git a/lib/wibox/widget/base.lua.in b/lib/wibox/widget/base.lua similarity index 100% rename from lib/wibox/widget/base.lua.in rename to lib/wibox/widget/base.lua diff --git a/lib/wibox/widget/imagebox.lua.in b/lib/wibox/widget/imagebox.lua similarity index 100% rename from lib/wibox/widget/imagebox.lua.in rename to lib/wibox/widget/imagebox.lua diff --git a/lib/wibox/widget/init.lua.in b/lib/wibox/widget/init.lua similarity index 100% rename from lib/wibox/widget/init.lua.in rename to lib/wibox/widget/init.lua diff --git a/lib/wibox/widget/systray.lua.in b/lib/wibox/widget/systray.lua similarity index 100% rename from lib/wibox/widget/systray.lua.in rename to lib/wibox/widget/systray.lua diff --git a/lib/wibox/widget/textbox.lua.in b/lib/wibox/widget/textbox.lua similarity index 100% rename from lib/wibox/widget/textbox.lua.in rename to lib/wibox/widget/textbox.lua diff --git a/themes/default/theme.lua.in b/themes/default/theme.lua similarity index 100% rename from themes/default/theme.lua.in rename to themes/default/theme.lua diff --git a/themes/sky/theme.lua.in b/themes/sky/theme.lua similarity index 100% rename from themes/sky/theme.lua.in rename to themes/sky/theme.lua diff --git a/themes/zenburn/theme.lua.in b/themes/zenburn/theme.lua similarity index 100% rename from themes/zenburn/theme.lua.in rename to themes/zenburn/theme.lua From 26f15a13f3c78babf1d448ac5608e8affcf4f6d8 Mon Sep 17 00:00:00 2001 From: Julian Wollrath Date: Fri, 27 Feb 2015 00:24:23 +0100 Subject: [PATCH 4/7] Document C API directly in the C source code v2: Add available signals to the docs. Signed-off-by: Julian Wollrath --- CMakeLists.txt | 2 +- awesomeConfig.cmake | 2 +- common/luaobject.c | 27 ++- dbus.c | 88 ++++----- docs/capi/awesome.lua.in | 90 --------- docs/capi/button.lua.in | 31 --- docs/capi/client.lua.in | 156 --------------- docs/capi/dbus.lua.in | 56 ------ docs/capi/drawable.lua.in | 43 ---- docs/capi/drawin.lua.in | 76 -------- docs/capi/key.lua.in | 39 ---- docs/capi/keygrabber.lua.in | 39 ---- docs/capi/mouse.lua.in | 25 --- docs/capi/mousegrabber.lua.in | 24 --- docs/capi/root.lua.in | 51 ----- docs/capi/screen.lua.in | 40 ---- docs/capi/selection.lua.in | 10 - docs/capi/tag.lua.in | 41 ---- docs/config.ld | 15 +- keygrabber.c | 47 +++-- luaa.c | 104 ++++++---- mouse.c | 37 +++- mousegrabber.c | 27 +-- objects/button.c | 42 ++++ objects/client.c | 355 +++++++++++++++++++++++++++++----- objects/drawable.c | 66 ++++++- objects/drawin.c | 92 ++++++++- objects/key.c | 45 +++++ objects/screen.c | 35 +++- objects/tag.c | 57 +++++- objects/window.c | 43 +++- root.c | 84 ++++---- selection.c | 13 ++ spawn.c | 39 +++- xkb.c | 36 ++-- 35 files changed, 991 insertions(+), 986 deletions(-) delete mode 100644 docs/capi/awesome.lua.in delete mode 100644 docs/capi/button.lua.in delete mode 100644 docs/capi/client.lua.in delete mode 100644 docs/capi/dbus.lua.in delete mode 100644 docs/capi/drawable.lua.in delete mode 100644 docs/capi/drawin.lua.in delete mode 100644 docs/capi/key.lua.in delete mode 100644 docs/capi/keygrabber.lua.in delete mode 100644 docs/capi/mouse.lua.in delete mode 100644 docs/capi/mousegrabber.lua.in delete mode 100644 docs/capi/root.lua.in delete mode 100644 docs/capi/screen.lua.in delete mode 100644 docs/capi/selection.lua.in delete mode 100644 docs/capi/tag.lua.in diff --git a/CMakeLists.txt b/CMakeLists.txt index 41e5c3d14..7554859c8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -230,7 +230,7 @@ if(GENERATE_DOC) file(MAKE_DIRECTORY ${BUILD_DIR}/lib) endif() - file(GLOB_RECURSE AWE_LUA_FILES ${BUILD_DIR}/lib/*.lua ${AWE_DOC_DIR}/capi/*.lua) + file(GLOB_RECURSE AWE_LUA_FILES ${BUILD_DIR}/lib/*.lua) file(GLOB_RECURSE AWE_MD_FILES ${AWE_DOC_DIR}/*.md) add_custom_target(ldoc ALL diff --git a/awesomeConfig.cmake b/awesomeConfig.cmake index 7a391b11d..c48d9e970 100644 --- a/awesomeConfig.cmake +++ b/awesomeConfig.cmake @@ -288,6 +288,7 @@ file(GLOB_RECURSE awesome_lua_configure_files RELATIVE ${SOURCE_DIR}/lib/*.lua ${SOURCE_DIR}/themes/*/*.lua) set(AWESOME_CONFIGURE_FILES + ${awesome_c_configure_files} ${awesome_lua_configure_files} config.h docs/config.ld @@ -316,5 +317,4 @@ foreach(file ${AWESOME_ADDITIONAL_FILES}) endforeach() #}}} - # vim: filetype=cmake:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80:foldmethod=marker diff --git a/common/luaobject.c b/common/luaobject.c index e8a1f7300..8c5a68b7c 100644 --- a/common/luaobject.c +++ b/common/luaobject.c @@ -19,6 +19,14 @@ * */ +/** Handling of signals. + * + * This can not be used as a standalone class, but is instead referenced + * explicitely in the classes, where it can be used. In the respective classes, + * it then can be used via `classname:connect_signal(...)` etc. + * @classmod signals + */ + #include "common/luaobject.h" #include "common/backtrace.h" @@ -160,6 +168,11 @@ luaA_settype(lua_State *L, lua_class_t *lua_class) return 1; } +/** Add a signal. + * @tparam string name A signal name. + * @tparam func func A function to call when the signal is emitted. + * @function connect_signal + */ void luaA_object_connect_signal(lua_State *L, int oud, const char *name, lua_CFunction fn) @@ -168,6 +181,11 @@ luaA_object_connect_signal(lua_State *L, int oud, luaA_object_connect_signal_from_stack(L, oud, name, -1); } +/** Remove a signal. + * @tparam string name A signal name. + * @tparam func func A function to remove. + * @function disconnect_signal + */ void luaA_object_disconnect_signal(lua_State *L, int oud, const char *name, lua_CFunction fn) @@ -242,11 +260,10 @@ signal_object_emit(lua_State *L, signal_array_t *arr, const char *name, int narg lua_pop(L, nargs); } -/** Emit a signal to an object. - * \param L The Lua VM state. - * \param oud The object index on the stack. - * \param name The name of the signal. - * \param nargs The number of arguments to pass to the called functions. +/** Emit a signal. + * @tparam string name A signal name. + * @param[opt] ... Various arguments. + * @function emit_signal */ void luaA_object_emit_signal(lua_State *L, int oud, diff --git a/dbus.c b/dbus.c index f606cd65f..afeaf914d 100644 --- a/dbus.c +++ b/dbus.c @@ -19,6 +19,13 @@ * */ +/** awesome D-Bus API + * @author Julien Danjou <julien@danjou.info> + * @copyright 2008-2009 Julien Danjou + * @release @AWESOME_VERSION@ + * @module dbus + */ + #include "config.h" #include "dbus.h" @@ -666,12 +673,11 @@ a_dbus_bus_getbyname(const char *name) } /** Register a D-Bus name to receive message from. - * \param L The Lua VM state. - * \return The number of elements pushed on stack. - * \luastack - * \lparam A string indicating if we are using system or session bus. - * \lparam A string with the name of the D-Bus name to register. - * \lreturn True if everything worked fine, false otherwise. + * + * @param bus A string indicating if we are using system or session bus. + * @param name A string with the name of the D-Bus name to register. + * @return True if everything worked fine, false otherwise. + * @function request_name */ static int luaA_dbus_request_name(lua_State *L) @@ -684,12 +690,11 @@ luaA_dbus_request_name(lua_State *L) } /** Release a D-Bus name. - * \param L The Lua VM state. - * \return The number of elements pushed on stack. - * \luastack - * \lparam A string indicating if we are using system or session bus. - * \lparam A string with the name of the D-Bus name to unregister. - * \lreturn True if everything worked fine, false otherwise. + * + * @param bus A string indicating if we are using system or session bus. + * @param name A string with the name of the D-Bus name to unregister. + * @return True if everything worked fine, false otherwise. + * @function release_name */ static int luaA_dbus_release_name(lua_State *L) @@ -702,11 +707,10 @@ luaA_dbus_release_name(lua_State *L) } /** Add a match rule to match messages going through the message bus. - * \param L The Lua VM state. - * \return The number of elements pushed on stack. - * \luastack - * \lparam A string indicating if we are using system or session bus. - * \lparam A string with the name of the match rule. + * + * @param bus A string indicating if we are using system or session bus. + * @param name A string with the name of the match rule. + * @function add_match */ static int luaA_dbus_add_match(lua_State *L) @@ -726,11 +730,10 @@ luaA_dbus_add_match(lua_State *L) /** Remove a previously added match rule "by value" * (the most recently-added identical rule gets removed). - * \param L The Lua VM state. - * \return The number of elements pushed on stack. - * \luastack - * \lparam A string indicating if we are using system or session bus. - * \lparam A string with the name of the match rule. + * + * @param bus A string indicating if we are using system or session bus. + * @param name A string with the name of the match rule. + * @function remove_match */ static int luaA_dbus_remove_match(lua_State *L) @@ -749,11 +752,10 @@ luaA_dbus_remove_match(lua_State *L) } /** Add a signal receiver on the D-Bus. - * \param L The Lua VM state. - * \return The number of elements pushed on stack. - * \luastack - * \lparam A string with the interface name. - * \lparam The function to call. + * + * @param interface A string with the interface name. + * @param func The function to call. + * @function connect_signal */ static int luaA_dbus_connect_signal(lua_State *L) @@ -772,12 +774,11 @@ luaA_dbus_connect_signal(lua_State *L) return 0; } -/** Add a signal receiver on the D-Bus. - * \param L The Lua VM state. - * \return The number of elements pushed on stack. - * \luastack - * \lparam A string with the interface name. - * \lparam The function to call. +/** Remove a signal receiver on the D-Bus. + * + * @param interface A string with the interface name. + * @param func The function to call. + * @function disconnect_signal */ static int luaA_dbus_disconnect_signal(lua_State *L) @@ -791,18 +792,17 @@ luaA_dbus_disconnect_signal(lua_State *L) } /** Emit a signal on the D-Bus. - * \param L The Lua VM state. - * \return The number of elements pushed on stack. - * \luastack - * \lparam A string indicating if we are using system or session bus. - * \lparam A string with the dbus path. - * \lparam A string with the dbus interface. - * \lparam A string with the dbus method name. - * \lparam type of 1st arg - * \lparam 1st arg value - * \lparam type of 2nd arg - * \lparam 2nd arg value + * + * @param bus A string indicating if we are using system or session bus. + * @param path A string with the dbus path. + * @param interface A string with the dbus interface. + * @param method A string with the dbus method name. + * @param type_1st_arg type of 1st argument + * @param value_1st_arg value of 1st argument + * @param type_2nd_arg type of 2nd argument + * @param value_2nd_arg value of 2nd argument * ... etc + * @function emit_signal */ static int luaA_dbus_emit_signal(lua_State *L) diff --git a/docs/capi/awesome.lua.in b/docs/capi/awesome.lua.in deleted file mode 100644 index 5afbcad75..000000000 --- a/docs/capi/awesome.lua.in +++ /dev/null @@ -1,90 +0,0 @@ ---- awesome core API --- @author Julien Danjou <julien@danjou.info> --- @copyright 2008-2009 Julien Danjou --- @release @AWESOME_VERSION@ --- @module awesome - ---- awesome global table. --- --- @field version The version of awesome. --- @field release The release name of awesome. --- @field conffile The configuration file which has been loaded. --- @field startup True if we are still in startup, false otherwise. --- @field startup_errors Error message for errors that occured during startup. --- @field composite_manager_running True if a composite manager is running. --- @table awesome - ---- Quit awesome. --- --- @function quit - ---- Execute another application, probably a window manager, to replace --- awesome. --- --- @param cmd The command line to execute. --- @function exec - ---- Restart awesome. --- --- @name restart --- @class function - ---- Spawn a program. --- --- @param cmd The command to launch. Either a string or a table of strings. --- @param use_sn Use startup-notification, true or false, default to true. --- @return Process ID if everything is OK, or an error string if an error occured. - ---- Load an image --- --- @param name The file name --- @return A cairo image surface as light user datum --- @function load_image - ---- Register a new xproperty. --- --- @param name The name of the X11 property --- @param type One of "string", "number" or "boolean" --- @function register_xproperty - ---- Change a xproperty. --- --- @param name The name of the X11 property --- @param value The new value for the property --- @function set_xproperty - ---- Get the value of a xproperty. --- --- @param name The name of the X11 property --- @function get_xproperty - ---- Add a global signal. --- --- @param name A string with the event name. --- @param func The function to call. --- @function connect_signal - ---- Remove a global signal. --- --- @param name A string with the event name. --- @param func The function to call. --- @function disconnect_signal - ---- Emit a global signal. --- --- @param name A string with the event name. --- @param ... Signal arguments. --- @function emit_signal - ---- Switch keyboard layout group. --- @param num keyboard layout number, integer from 0 to 3 --- @function xkb_set_layout_group - ---- Get current keyboard layout group. --- @return current keyboard layout number --- @function xkb_get_layout_group - - ---- Get description of configured layouts --- @return String with description of configured layouts --- @function xkb_get_group_names diff --git a/docs/capi/button.lua.in b/docs/capi/button.lua.in deleted file mode 100644 index 7c0c8beda..000000000 --- a/docs/capi/button.lua.in +++ /dev/null @@ -1,31 +0,0 @@ ---- awesome button API --- @author Julien Danjou <julien@danjou.info> --- @copyright 2008-2009 Julien Danjou --- @release @AWESOME_VERSION@ --- @classmod button - ---- Button object. --- --- @tfield int button The mouse button number, or 0 for any button. --- @tfield table modifiers The modifier key table that should be pressed while the --- button is pressed. --- @table button - ---- Add a signal. --- @tparam string name A signal name. --- @tparam func func A function to call when the signal is emitted. --- @function connect_signal - ---- Remove a signal. --- @tparam string name A signal name. --- @tparam func func A function to remove. --- @function disconnect_signal - ---- Emit a signal. --- @tparam string name A signal name. --- @param[opt] ... Various arguments. --- @function emit_signal - ---- Get the number of instances. --- @treturn int The number of button objects alive. --- @function instances diff --git a/docs/capi/client.lua.in b/docs/capi/client.lua.in deleted file mode 100644 index 522c54e40..000000000 --- a/docs/capi/client.lua.in +++ /dev/null @@ -1,156 +0,0 @@ ---- awesome client API --- @author Julien Danjou <julien@danjou.info> --- @copyright 2008-2009 Julien Danjou --- @release @AWESOME_VERSION@ --- @classmod client - ---- Client object. --- --- @field window The X window id. --- @field name The client title. --- @field skip_taskbar True if the client does not want to be in taskbar. --- @field type The window type (desktop, normal, dock, …). --- @field class The client class. --- @field instance The client instance. --- @field pid The client PID, if available. --- @field role The window role, if available. --- @field machine The machine client is running on. --- @field icon_name The client name when iconified. --- @field icon The client icon. --- @field screen Client screen. --- @field hidden Define if the client must be hidden, i.e. never mapped, --- invisible in taskbar. --- @field minimized Define it the client must be iconify, i.e. only visible in --- taskbar. --- @field size_hints_honor Honor size hints, i.e. respect size ratio. --- @field border_width The client border width. --- @field border_color The client border color. --- @field urgent The client urgent state. --- @field content An image representing the client window content (screenshot). --- @field focus The focused client. --- @field opacity The client opacity between 0 and 1. --- @field ontop The client is on top of every other windows. --- @field above The client is above normal windows. --- @field below The client is below normal windows. --- @field fullscreen The client is fullscreen or not. --- @field maximized The client is maximized (horizontally and vertically) or not. --- @field maximized_horizontal The client is maximized horizontally or not. --- @field maximized_vertical The client is maximized vertically or not. --- @field transient_for The client the window is transient for. --- @field group_window Window identification unique to a group of windows. --- @field leader_window Identification unique to windows spawned by the same command. --- @field size_hints A table with size hints of the client: user_position, --- user_size, program_position, program_size, etc. --- @field sticky Set the client sticky, i.e. available on all tags. --- @field modal Indicate if the client is modal. --- @field focusable True if the client can receive the input focus. --- @field shape_bounding The client's bounding shape as set by awesome as a (native) cairo surface. --- @field shape_clip The client's clip shape as set by awesome as a (native) cairo surface. --- @field shape_client_bounding The client's bounding shape as set by the program as a (native) cairo surface. --- @field shape_client_clip The client's clip shape as set by the program as a (native) cairo surface. --- @field startup_id The FreeDesktop StartId. --- @field valid If the client that this object refers to is still managed by awesome. --- @table client - ---- Get all clients into a table. --- --- @param[opt] screen A screen number. --- @return A table with all clients. --- @function get - ---- Check if a client is visible on its screen. --- --- @return A boolean value, true if the client is visible, false otherwise. --- @function isvisible - ---- Return client geometry. --- --- @param arg1 A table with new coordinates, or none. --- @return A table with client coordinates. --- @function geometry - ---- Apply size hints to a size. --- @param width Desired width of client --- @param height Desired height of client --- @return Actual width of client --- @return Actual height of client --- @name apply_size_hints --- @class function - ---- Return client struts (reserved space at the edge of the screen). --- --- @param struts A table with new strut values, or none. --- @return A table with strut values. --- @function struts - ---- Get or set mouse buttons bindings for a client. --- --- @param buttons_table An array of mouse button bindings objects, or nothing. --- @return A table with all buttons. --- @function buttons - ---- Get or set keys bindings for a client. --- --- @param keys_table An array of key bindings objects, or nothing. --- @return A table with all keys. --- @function keys - ---- Access or set the client tags. --- --- @param tags_table A table with tags to set, or none to get the current tags table. --- @return A table with all tags. --- @function tags - ---- Kill a client. --- --- @function kill - ---- Swap a client with another one in global client list. --- @client A client to swap with. --- @function swap - ---- Raise a client on top of others which are on the same layer. --- --- @function raise - ---- Lower a client on bottom of others which are on the same layer. --- --- @function lower - ---- Stop managing a client. --- --- @function unmanage - ---- Change a xproperty. --- --- @param name The name of the X11 property --- @param value The new value for the property --- @function set_xproperty - ---- Get the value of a xproperty. --- --- @param name The name of the X11 property --- @function get_xproperty - ---- Add a signal. --- --- @param name A signal name. --- @param func A function to call when the signal is emitted. --- @function connect_signal - ---- Remove a signal. --- --- @param name A signal name. --- @param func A function to remove. --- @function disconnect_signal - ---- Emit a signal. --- --- @param name A signal name. --- @param[opt] ... Various arguments. --- @function emit_signal - ---- Get the number of instances. --- --- @return The number of client objects alive. --- @function instances diff --git a/docs/capi/dbus.lua.in b/docs/capi/dbus.lua.in deleted file mode 100644 index a55f43b06..000000000 --- a/docs/capi/dbus.lua.in +++ /dev/null @@ -1,56 +0,0 @@ ---- awesome D-Bus API --- @author Julien Danjou <julien@danjou.info> --- @copyright 2008-2009 Julien Danjou --- @release @AWESOME_VERSION@ --- @module dbus - ---- Register a D-Bus name to receive message from. --- --- @param bus A string indicating if we are using system or session bus. --- @param name A string with the name of the D-Bus name to register. --- @return True if everything worked fine, false otherwise. --- @function request_name - ---- Release a D-Bus name. --- --- @param bus A string indicating if we are using system or session bus. --- @param name A string with the name of the D-Bus name to unregister. --- @return True if everything worked fine, false otherwise. --- @function release_name - ---- Add a match rule to match messages going through the message bus. --- --- @param bus A string indicating if we are using system or session bus. --- @param name A string with the name of the match rule. --- @function add_match - ---- Remove a previously added match rule "by value" --- (the most recently-added identical rule gets removed). --- --- @param bus A string indicating if we are using system or session bus. --- @param name A string with the name of the match rule. --- @function remove_match - ---- Add a signal receiver on the D-Bus. --- --- @param interface A string with the interface name. --- @param func The function to call. --- @function connect_signal - ---- Remove a signal receiver on the D-Bus. --- --- @param interface A string with the interface name. --- @param func The function to call. --- @function disconnect_signal - --- Emit a signal on the D-Bus. --- @param bus A string indicating if we are using system or session bus. --- @param path A string with the dbus path. --- @param interface A string with the dbus interface. --- @param method A string with the dbus method name. --- @param type_1st_arg type of 1st argument --- @param value_1st_arg value of 1st argument --- @param type_2nd_arg type of 2nd argument --- @param value_2nd_arg value of 2nd argument --- ... etc --- @function emit_signal diff --git a/docs/capi/drawable.lua.in b/docs/capi/drawable.lua.in deleted file mode 100644 index 2d322b250..000000000 --- a/docs/capi/drawable.lua.in +++ /dev/null @@ -1,43 +0,0 @@ ---- awesome drawable API --- @author Uli Schlachter <psychon@znc.in> --- @copyright 2012 Uli Schlachter --- @release @AWESOME_VERSION@ --- @classmod drawable - ---- Drawable object. --- --- @field surface The drawable's cairo surface. --- @function drawable - ---- Get drawable geometry. The geometry consists of x, y, width and height. --- --- @return A table with drawable coordinates and geometry. --- @function geometry - ---- Refresh the drawable. When you are drawing to the surface, you have --- call this function when you are done to make the result visible. --- --- @function refresh - ---- Add a signal. --- --- @param name A signal name. --- @param func A function to call when the signal is emitted. --- @function connect_signal - ---- Remove a signal. --- --- @param name A signal name. --- @param func A function to remove. --- @function disconnect_signal - ---- Emit a signal. --- --- @param name A signal name. --- @param[opt] ... Various arguments. --- @function emit_signal - ---- Get the number of instances. --- --- @return The number of drawable objects alive. --- @function instances diff --git a/docs/capi/drawin.lua.in b/docs/capi/drawin.lua.in deleted file mode 100644 index f100a8d35..000000000 --- a/docs/capi/drawin.lua.in +++ /dev/null @@ -1,76 +0,0 @@ ---- awesome drawin API --- @author Julien Danjou <julien@danjou.info> --- @copyright 2008-2009 Julien Danjou --- @release @AWESOME_VERSION@ --- @classmod drawin - ---- Drawin object. --- --- @field border_width Border width. --- @field border_color Border color. --- @field ontop On top of other windows. --- @field cursor The mouse cursor. --- @field visible Visibility. --- @field opacity The opacity of the drawin, between 0 and 1. --- @field type The window type (desktop, normal, dock, …). --- @field x The x coordinates. --- @field y The y coordinates. --- @field width The width of the drawin. --- @field height The height of the drawin. --- @field drawable The drawin's drawable. --- @field window The X window id. --- @field shape_bounding The drawin's bounding shape as a (native) cairo surface. --- @field shape_clip The drawin's clip shape as a (native) cairo surface. --- @table drawin - ---- Get or set mouse buttons bindings to a drawin. --- --- @param buttons_table A table of buttons objects, or nothing. --- @function buttons - ---- Get or set drawin struts. --- --- @param strut A table with new strut, or nothing --- @return The drawin strut in a table. --- @function struts - ---- Get or set drawin geometry. That's the same as accessing or setting the x, y, width or height --- properties of a drawin. --- --- @param A table with coordinates to modify. --- @return A table with drawin coordinates and geometry. --- @function geometry - ---- Change a xproperty. --- --- @param name The name of the X11 property --- @param value The new value for the property --- @function set_xproperty - ---- Get the value of a xproperty. --- --- @param name The name of the X11 property --- @function get_xproperty - ---- Add a signal. --- --- @param name A signal name. --- @param func A function to call when the signal is emitted. --- @function connect_signal - ---- Remove a signal. --- --- @param name A signal name. --- @param func A function to remove. --- @function disconnect_signal - ---- Emit a signal. --- --- @param name A signal name. --- @param[opt] ... Various arguments. --- @function emit_signal - ---- Get the number of instances. --- --- @return The number of drawin objects alive. --- @function instances diff --git a/docs/capi/key.lua.in b/docs/capi/key.lua.in deleted file mode 100644 index 6cd52e04c..000000000 --- a/docs/capi/key.lua.in +++ /dev/null @@ -1,39 +0,0 @@ ---- awesome key API --- @author Julien Danjou <julien@danjou.info> --- @copyright 2008-2009 Julien Danjou --- @release @AWESOME_VERSION@ --- @classmod key - ---- Key object. --- --- @tfield string key The key to trigger an event. --- @tfield string keysym Same as key, but return the name of the key symbol. It --- can be identical to key, but for characters like '.' it will return --- 'period'. --- @tfield table modifiers The modifier key that should be pressed while the --- key is pressed. An array with all the modifiers. Valid modifiers are: Any, --- Mod1, Mod2, Mod3, Mod4, Mod5, Shift, Lock and Control. --- @table key - ---- Add a signal. --- --- @tparam string name A signal name. --- @tparam function func A function to call when the signal is emitted. --- @function connect_signal - ---- Remove a signal. --- --- @tparam string name A signal name. --- @tparam function func A function to remove. --- @function disconnect_signal - ---- Emit a signal. --- --- @tparam string name A signal name. --- @param[opt] ... Various arguments. --- @function emit_signal - ---- Get the number of instances. --- --- @treturn number The number of key objects alive. --- @function instances diff --git a/docs/capi/keygrabber.lua.in b/docs/capi/keygrabber.lua.in deleted file mode 100644 index 00b082197..000000000 --- a/docs/capi/keygrabber.lua.in +++ /dev/null @@ -1,39 +0,0 @@ ---- awesome keygrabber API --- @author Julien Danjou <julien@danjou.info> --- @copyright 2008-2009 Julien Danjou --- @release @AWESOME_VERSION@ --- @module keygrabber - ---- --- Grab keyboard input and read pressed keys, calling a callback function at --- each keypress, until `keygrabber.stop` is called. --- The callback function receives three arguments: --- --- * a table containing modifiers keys --- * a string with the pressed key --- * a string with either "press" or "release" to indicate the event type. --- --- @param callback A callback function as described above. --- @function run --- @usage The following function can be bound to a key, and will be used to --- resize a client using keyboard. --- --- function resize(c) --- keygrabber.run(function(mod, key, event) --- if event == "release" then return end --- --- if key == 'Up' then awful.client.moveresize(0, 0, 0, 5, c) --- elseif key == 'Down' then awful.client.moveresize(0, 0, 0, -5, c) --- elseif key == 'Right' then awful.client.moveresize(0, 0, 5, 0, c) --- elseif key == 'Left' then awful.client.moveresize(0, 0, -5, 0, c) --- else keygrabber.stop() --- end --- end) --- end - ---- Stop grabbing the keyboard. --- @function stop - ---- Check if the keygrabber is running. --- @return A boolean value, true if running, false otherwise. --- @function isrunning diff --git a/docs/capi/mouse.lua.in b/docs/capi/mouse.lua.in deleted file mode 100644 index cc8aef9f5..000000000 --- a/docs/capi/mouse.lua.in +++ /dev/null @@ -1,25 +0,0 @@ ---- awesome mouse API --- @author Julien Danjou <julien@danjou.info> --- @copyright 2008-2009 Julien Danjou --- @release @AWESOME_VERSION@ --- @module mouse - ---- Mouse library. --- --- @field screen Mouse screen number. --- @table mouse - ---- A table with X and Y coordinates. --- @field x X coordinate. --- @field y Y coordinate. --- @table coords_table - ---- Get or set the mouse coords. --- @tparam coords_table coords_table None or a table with x and y keys as mouse coordinates. --- @tparam boolean silent Disable mouse::enter or mouse::leave events that could be triggered by the pointer when moving. --- @treturn coords_table A table with mouse coordinates. --- @function coords - ---- Get the client or any object which is under the pointer. --- @treturn client.client|nil A client or nil. --- @function object_under_pointer diff --git a/docs/capi/mousegrabber.lua.in b/docs/capi/mousegrabber.lua.in deleted file mode 100644 index 54a2586f3..000000000 --- a/docs/capi/mousegrabber.lua.in +++ /dev/null @@ -1,24 +0,0 @@ ---- awesome mousegrabber API --- @author Julien Danjou <julien@danjou.info> --- @copyright 2008-2009 Julien Danjou --- @release @AWESOME_VERSION@ --- @module mousegrabber - ---- Grab the mouse pointer and list motions, calling callback function at each --- motion. The callback function must return a boolean value: true to --- continue grabbing, false to stop. --- The function is called with one argument: --- a table containing modifiers pointer coordinates. --- --- @param func A callback function as described above. --- @param cursor The name of a X cursor to use while grabbing. --- @function run - ---- Stop grabbing the mouse pointer. --- --- @function stop - ---- Check if the mousegrabber is running. --- --- @return A boolean value, true if running, false otherwise. --- @function isrunning diff --git a/docs/capi/root.lua.in b/docs/capi/root.lua.in deleted file mode 100644 index 1f5f00950..000000000 --- a/docs/capi/root.lua.in +++ /dev/null @@ -1,51 +0,0 @@ ---- awesome root window API --- @author Julien Danjou <julien@danjou.info> --- @copyright 2008-2009 Julien Danjou --- @release @AWESOME_VERSION@ --- @module root - ---- Get or set global mouse bindings. --- This binding will be available when you'll click on root window. --- --- @param button_table An array of mouse button bindings objects, or nothing. --- @return The array of mouse button bindings objects. --- @function buttons - ---- Get or set global key bindings. --- These binding will be available when you press keys on the root window. --- @tparam table|nil keys_array An array of key binding objects, or nothing. --- @return The array of key bindings objects of this client. --- @function keys - ---- Set the root cursor. --- --- @param cursor_name A X cursor name. --- @function cursor - ---- Send fake events. Usually the current focused client will get it. --- --- @param event_type The event type: key_press, key_release, button_press, button_release --- or motion_notify. --- @param detail The detail: in case of a key event, this is the keycode to send, in --- case of a button event this is the number of the button. In case of a --- motion event, this is a boolean value which if true make the coordinates --- relatives. --- @param x In case of a motion event, this is the X coordinate. --- @param y In case of a motion event, this is the Y coordinate. --- @function fake_input - ---- Get the drawins attached to a screen. --- --- @return A table with all drawins. --- @function drawins - ---- Get the wallpaper as a cairo surface or set it as a cairo pattern. --- --- @param pattern A cairo pattern as light userdata --- @return A cairo surface or nothing. --- @function wallpaper - ---- Get the attached tags. --- --- @return A table with all tags. --- @function tags diff --git a/docs/capi/screen.lua.in b/docs/capi/screen.lua.in deleted file mode 100644 index 745d3a6eb..000000000 --- a/docs/capi/screen.lua.in +++ /dev/null @@ -1,40 +0,0 @@ ---- awesome screen API --- @author Julien Danjou <julien@danjou.info> --- @copyright 2008-2009 Julien Danjou --- @release @AWESOME_VERSION@ --- @classmod screen - ---- Screen is a table where indexes are screen numbers. You can use `screen[1]` --- to get access to the first screen, etc. Alternatively, if RANDR information --- is available, you can use output names for finding screen objects. --- Each screen has a set of properties. --- --- @tfield table geometry The screen coordinates. Immutable. --- @tfield table workarea The screen workarea. --- @tfield int index The screen number. --- @tfield table outputs If RANDR information is available, a list of outputs --- for this screen and their size in mm. --- @table screen - ---- Get the number of screens. --- --- @return The screen count, at least 1. --- @function count - ---- Add a signal to a screen. --- --- @string name A signal name. --- @func func A function to call when the signal is emitted. --- @function connect_signal - ---- Remove a signal to a screen. --- --- @string name A signal name. --- @func func A function to remove --- @function disconnect_signal - ---- Emit a signal to a screen. --- --- @string name A signal name. --- @param[opt] ... Various arguments. --- @function emit_signal diff --git a/docs/capi/selection.lua.in b/docs/capi/selection.lua.in deleted file mode 100644 index c5f13b7a2..000000000 --- a/docs/capi/selection.lua.in +++ /dev/null @@ -1,10 +0,0 @@ ---- awesome selection (clipboard) API --- @author Julien Danjou <julien@danjou.info> --- @copyright 2008-2009 Julien Danjou --- @release @AWESOME_VERSION@ --- @module selection - ---- Get the selection (clipboard) content. --- --- @return A string with the selection (clipboard) content. --- @function selection diff --git a/docs/capi/tag.lua.in b/docs/capi/tag.lua.in deleted file mode 100644 index 1bf4a7e9b..000000000 --- a/docs/capi/tag.lua.in +++ /dev/null @@ -1,41 +0,0 @@ ---- awesome tag API --- @author Julien Danjou <julien@danjou.info> --- @copyright 2008-2009 Julien Danjou --- @release @AWESOME_VERSION@ --- @classmod tag - ---- Tag object. --- --- @field name Tag name. --- @field selected True if the tag is selected to be viewed. --- @field activated True if the tag is active and can be used. --- @table tag - ---- Get or set the clients attached to this tag. --- --- @param clients_table None or a table of clients to set as being tagged with this tag. --- @return A table with the clients attached to this tags. --- @function clients - ---- Add a signal. --- --- @param name A signal name. --- @param func A function to call when the signal is emitted. --- @function connect_signal - ---- Remove a signal. --- --- @param name A signal name. --- @param func A function to remove. --- @function disconnect_signal - ---- Emit a signal. --- --- @param name A signal name. --- @param[opt] ... Various arguments. --- @function emit_signal - ---- Get the number of instances. --- --- @return The number of tag objects alive. --- @function instances diff --git a/docs/config.ld b/docs/config.ld index 707b99d14..c47faf55b 100644 --- a/docs/config.ld +++ b/docs/config.ld @@ -26,6 +26,8 @@ tparam_alias('client', 'client.client') tparam_alias('tag', 'tag') -- Should be default, but is not. Sets up "@tab" => "@tparam table". tparam_alias('tab', 'table') +-- New type for signals +new_type("signal", "Signals", false, "Arguments") -- More fitting section names kind_names={topic='Documentation', module='Libraries'} @@ -34,8 +36,19 @@ kind_names={topic='Documentation', module='Libraries'} sort_modules=true file = { + -- C parts of libraries + '../dbus.c', + '../keygrabber.c', + '../luaa.c', + '../mouse.c', + '../mousegrabber.c', + '../root.c', + '../selection.c', + '../spawn.c', + '../xkb.c', + '../common/luaobject.c', + '../objects/', -- LUA libraries - 'capi/', '../lib/', exclude = { -- exclude these modules, as they do not contain any written diff --git a/keygrabber.c b/keygrabber.c index caef91610..3cb361d18 100644 --- a/keygrabber.c +++ b/keygrabber.c @@ -19,6 +19,13 @@ * */ +/** awesome keygrabber API + * @author Julien Danjou <julien@danjou.info> + * @copyright 2008-2009 Julien Danjou + * @release @AWESOME_VERSION@ + * @module keygrabber + */ + #include #include #include @@ -106,18 +113,31 @@ keygrabber_handlekpress(lua_State *L, xcb_key_press_event_t *e) return true; } -/** Grab keyboard and read pressed keys, calling callback function at each key - * press, until keygrabber.stop is called. - * The function is called with 3 arguments: - * a table containing modifiers keys, a string with the key pressed and a - * string with either "press" or "release" to indicate the event type. +/** Grab keyboard input and read pressed keys, calling a callback function at + * each keypress, until `keygrabber.stop` is called. + * The callback function receives three arguments: * - * \param L The Lua VM state. - * \return The number of elements pushed on stack. + * * a table containing modifiers keys + * * a string with the pressed key + * * a string with either "press" or "release" to indicate the event type. * - * \luastack + * @param callback A callback function as described above. + * @function run + * @usage The following function can be bound to a key, and will be used to + * resize a client using keyboard. * - * \lparam A callback function as described above. + * function resize(c) + * keygrabber.run(function(mod, key, event) + * if event == "release" then return end + * + * if key == 'Up' then awful.client.moveresize(0, 0, 0, 5, c) + * elseif key == 'Down' then awful.client.moveresize(0, 0, 0, -5, c) + * elseif key == 'Right' then awful.client.moveresize(0, 0, 5, 0, c) + * elseif key == 'Left' then awful.client.moveresize(0, 0, -5, 0, c) + * else keygrabber.stop() + * end + * end) + * end */ static int luaA_keygrabber_run(lua_State *L) @@ -137,8 +157,7 @@ luaA_keygrabber_run(lua_State *L) } /** Stop grabbing the keyboard. - * \param L The Lua VM state. - * \return The number of elements pushed on stack. + * @function stop */ int luaA_keygrabber_stop(lua_State *L) @@ -149,10 +168,8 @@ luaA_keygrabber_stop(lua_State *L) } /** Check if keygrabber is running. - * \param L The Lua VM state. - * \return The number of elements pushed on stack. - * \luastack - * \lreturn A boolean value, true if keygrabber is running, false otherwise. + * @function isrunning + * @treturn bool A boolean value, true if keygrabber is running, false otherwise. */ static int luaA_keygrabber_isrunning(lua_State *L) diff --git a/luaa.c b/luaa.c index 2c16152c4..f441e7c7d 100644 --- a/luaa.c +++ b/luaa.c @@ -19,6 +19,14 @@ * */ +/** awesome core API + * + * @author Julien Danjou <julien@danjou.info> + * @copyright 2008-2009 Julien Danjou + * @release @AWESOME_VERSION@ + * @module awesome + */ + #define _GNU_SOURCE #include "luaa.h" @@ -97,8 +105,7 @@ composite_manager_running(void) } /** Quit awesome. - * \param L The Lua VM state. - * \return The number of elements pushed on stack. + * @function quit */ static int luaA_quit(lua_State *L) @@ -109,10 +116,9 @@ luaA_quit(lua_State *L) /** Execute another application, probably a window manager, to replace * awesome. - * \param L The Lua VM state. - * \return The number of elements pushed on stack. - * \luastack - * \lparam The command line to execute. + * + * @param cmd The command line to execute. + * @function exec */ static int luaA_exec(lua_State *L) @@ -126,6 +132,7 @@ luaA_exec(lua_State *L) } /** Restart awesome. + * @function restart */ static int luaA_restart(lua_State *L) @@ -135,10 +142,10 @@ luaA_restart(lua_State *L) } /** Load an image from a given path. - * \param L The Lua VM state. - * \return The number of elements pushed on stack. - * \luastack - * \lparam The command line to execute. + * + * @param name The file name. + * @return A cairo surface as light user datum. + * @function load_image */ static int luaA_load_image(lua_State *L) @@ -196,15 +203,14 @@ luaA_fixups(lua_State *L) } /** awesome global table. - * \param L The Lua VM state. - * \return The number of elements pushed on stack. - * \luastack - * \lfield conffile The configuration file which has been loaded. - * \lfield version The version of awesome. - * \lfield release The release name of awesome. - * \lfield startup True if we are still in startup, false otherwise. - * \lfield startup_errors Error message for errors that occured during startup. - * \lfield composite_manager_running True if a composite manager is running. + * @field version The version of awesome. + * @field release The release name of awesome. + * @field conffile The configuration file which has been loaded. + * @field startup True if we are still in startup, false otherwise. + * @field startup_errors Error message for errors that occured during + * startup. + * @field composite_manager_running True if a composite manager is running. + * @table awesome */ static int luaA_awesome_index(lua_State *L) @@ -256,11 +262,10 @@ luaA_awesome_index(lua_State *L) } /** Add a global signal. - * \param L The Lua VM state. - * \return The number of elements pushed on stack. - * \luastack - * \lparam A string with the event name. - * \lparam The function to call. + * + * @param name A string with the event name. + * @param func The function to call. + * @function connect_signal */ static int luaA_awesome_connect_signal(lua_State *L) @@ -272,11 +277,10 @@ luaA_awesome_connect_signal(lua_State *L) } /** Remove a global signal. - * \param L The Lua VM state. - * \return The number of elements pushed on stack. - * \luastack - * \lparam A string with the event name. - * \lparam The function to call. + * + * @param name A string with the event name. + * @param func The function to call. + * @function disconnect_signal */ static int luaA_awesome_disconnect_signal(lua_State *L) @@ -290,11 +294,10 @@ luaA_awesome_disconnect_signal(lua_State *L) } /** Emit a global signal. - * \param L The Lua VM state. - * \return The number of elements pushed on stack. - * \luastack - * \lparam A string with the event name. - * \lparam The function to call. + * + * @param name A string with the event name. + * @param ... The signal arguments. + * @function emit_signal */ static int luaA_awesome_emit_signal(lua_State *L) @@ -471,16 +474,49 @@ luaA_init(xdgHandle* xdg) lua_pop(L, 2); /* pop "package" and "package.loaded" */ + /** A call into the lua code aborted with an error + * @signal debug::error + */ signal_add(&global_signals, "debug::error"); + /** A deprecated lua function was called + * @signal debug::deprecation + */ signal_add(&global_signals, "debug::deprecation"); + /** An invalid key was read from an object (e.g. c.foo) + * @signal debug::index::miss + */ signal_add(&global_signals, "debug::index::miss"); + /** An invalid key was written to an object (e.g. c.foo = "bar") + * @signal debug::newindex::miss + */ signal_add(&global_signals, "debug::newindex::miss"); + /** + * @signal systray::update + */ signal_add(&global_signals, "systray::update"); + /** + * @signal wallpaper_changed + */ signal_add(&global_signals, "wallpaper_changed"); + /** + * @signal xkb::map_changed + */ signal_add(&global_signals, "xkb::map_changed"); + /** + * @signal xkb::group_changed + */ signal_add(&global_signals, "xkb::group_changed"); + /** + * @signal refresh + */ signal_add(&global_signals, "refresh"); + /** + * @signal startup + */ signal_add(&global_signals, "startup"); + /** + * @signal exit + */ signal_add(&global_signals, "exit"); } diff --git a/mouse.c b/mouse.c index 135bc19f8..0d876d1c0 100644 --- a/mouse.c +++ b/mouse.c @@ -19,6 +19,13 @@ * */ +/** awesome mouse API + * @author Julien Danjou <julien@danjou.info> + * @copyright 2008-2009 Julien Danjou + * @release @AWESOME_VERSION@ + * @module mouse + */ + #include "mouse.h" #include "common/util.h" #include "globalconf.h" @@ -26,6 +33,18 @@ #include "objects/drawin.h" #include "objects/screen.h" +/** Mouse library. + * + * @field screen Mouse screen number. + * @table mouse + */ + +/** A table with X and Y coordinates. + * @field x X coordinate. + * @field y Y coordinate. + * @table coords_table + */ + /** Get the pointer position. * \param window The window to get position on. * \param x will be set to the Pointer-x-coordinate relative to window @@ -174,8 +193,13 @@ luaA_mouse_pushstatus(lua_State *L, int x, int y, uint16_t mask) } /** Get or set the mouse coords. - * \param L The Lua VM state. - * \return The number of elements pushed on stack. + * + * @tparam coords_table coords_table None or a table with x and y keys as mouse + * coordinates. + * @tparam boolean silent Disable mouse::enter or mouse::leave events that + * could be triggered by the pointer when moving. + * @treturn coords_table A table with mouse coordinates. + * @function coords */ static int luaA_mouse_coords(lua_State *L) @@ -212,11 +236,10 @@ luaA_mouse_coords(lua_State *L) return luaA_mouse_pushstatus(L, mouse_x, mouse_y, mask); } -/** Get the client which is under the pointer. - * \param L The Lua VM state. - * \return The number of elements pushed on stack. - * \luastack - * \lreturn A client or nil. +/** Get the client or any object which is under the pointer. + * + * @treturn client.client|nil A client or nil. + * @function object_under_pointer */ static int luaA_mouse_object_under_pointer(lua_State *L) diff --git a/mousegrabber.c b/mousegrabber.c index 1df805de6..28e2b6290 100644 --- a/mousegrabber.c +++ b/mousegrabber.c @@ -19,6 +19,13 @@ * */ +/** awesome mousegrabber API + * @author Julien Danjou <julien@danjou.info> + * @copyright 2008-2009 Julien Danjou + * @release @AWESOME_VERSION@ + * @module mousegrabber + */ + #include "mousegrabber.h" #include "common/xcursor.h" #include "mouse.h" @@ -76,12 +83,9 @@ mousegrabber_handleevent(lua_State *L, int x, int y, uint16_t mask) * The function is called with one argument: * a table containing modifiers pointer coordinates. * - * \param L The Lua VM state. - * \return The number of elements pushed on stack. - * - * \luastack - * - * \lparam A callback function as described above. + * @param func A callback function as described above. + * @param cursor The name of a X cursor to use while grabbing. + * @function run */ static int luaA_mousegrabber_run(lua_State *L) @@ -110,8 +114,8 @@ luaA_mousegrabber_run(lua_State *L) } /** Stop grabbing the mouse pointer. - * \param L The Lua VM state. - * \return The number of elements pushed on stack. + * + * @function stop */ int luaA_mousegrabber_stop(lua_State *L) @@ -122,10 +126,9 @@ luaA_mousegrabber_stop(lua_State *L) } /** Check if mousegrabber is running. - * \param L The Lua VM state. - * \return The number of elements pushed on stack. - * \luastack - * \lreturn A boolean value, true if mousegrabber is running, false otherwise. + * + * @return A boolean value, true if running, false otherwise. + * function isrunning */ static int luaA_mousegrabber_isrunning(lua_State *L) diff --git a/objects/button.c b/objects/button.c index 67258f5b9..29ec2a48d 100644 --- a/objects/button.c +++ b/objects/button.c @@ -19,8 +19,36 @@ * */ +/** awesome button API + * + * Furthermore to the classes described here, one can also use signals as + * described in @{signals}. + * + * Some signal names are starting with a dot. These dots are artefacts from + * the documentation generation, you get the real signal name by + * removing the starting dot. + * + * @author Julien Danjou <julien@danjou.info> + * @copyright 2008-2009 Julien Danjou + * @release @AWESOME_VERSION@ + * @classmod button + */ + #include "button.h" +/** Button object. + * + * @tfield int button The mouse button number, or 0 for any button. + * @tfield table modifiers The modifier key table that should be pressed while the + * button is pressed. + * @table button + */ + +/** Get the number of instances. + * @treturn int The number of button objects alive. + * @function instances + */ + /** Create a new mouse button bindings. * \param L The Lua VM state. * \return The number of elements pushed on stack. @@ -123,9 +151,23 @@ button_class_setup(lua_State *L) (lua_class_propfunc_t) luaA_button_get_modifiers, (lua_class_propfunc_t) luaA_button_set_modifiers); + /** When bound mouse button + modifiers are pressed. + * @param ... One or more arguments are possible + * @signal .press + */ signal_add(&button_class.signals, "press"); + /** When property changes. + * @signal property::button + */ signal_add(&button_class.signals, "property::button"); + /** When property changes. + * @signal property::modifiers + */ signal_add(&button_class.signals, "property::modifiers"); + /** When bound mouse button + modifiers are pressed. + * @param ... One or more arguments are possible + * @signal .release + */ signal_add(&button_class.signals, "release"); } diff --git a/objects/client.c b/objects/client.c index 79230e02d..06bd1ad30 100644 --- a/objects/client.c +++ b/objects/client.c @@ -19,6 +19,21 @@ * */ +/** awesome client API + * + * Furthermore to the classes described here, one can also use signals as + * described in @{signals} and X properties as described in @{xproperties}. + * + * Some signal names are starting with a dot. These dots are artefacts from + * the documentation generation, you get the real signal name by + * removing the starting dot. + * + * @author Julien Danjou <julien@danjou.info> + * @copyright 2008-2009 Julien Danjou + * @release @AWESOME_VERSION@ + * @classmod client + */ + #include "objects/client.h" #include "common/atoms.h" #include "common/xutil.h" @@ -36,6 +51,75 @@ #include #include +/** Client object. + * + * @field window The X window id. + * @field name The client title. + * @field skip_taskbar True if the client does not want to be in taskbar. + * @field type The window type (desktop, normal, dock, …). + * @field class The client class. + * @field instance The client instance. + * @field pid The client PID, if available. + * @field role The window role, if available. + * @field machine The machine client is running on. + * @field icon_name The client name when iconified. + * @field icon The client icon. + * @field screen Client screen. + * @field hidden Define if the client must be hidden, i.e. never mapped, + * invisible in taskbar. + * @field minimized Define it the client must be iconify, i.e. only visible in + * taskbar. + * @field size_hints_honor Honor size hints, i.e. respect size ratio. + * @field border_width The client border width. + * @field border_color The client border color. + * @field urgent The client urgent state. + * @field content An image representing the client window content (screenshot). + * @field focus The focused client. + * @field opacity The client opacity between 0 and 1. + * @field ontop The client is on top of every other windows. + * @field above The client is above normal windows. + * @field below The client is below normal windows. + * @field fullscreen The client is fullscreen or not. + * @field maximized The client is maximized (horizontally and vertically) or not. + * @field maximized_horizontal The client is maximized horizontally or not. + * @field maximized_vertical The client is maximized vertically or not. + * @field transient_for The client the window is transient for. + * @field group_window Window identification unique to a group of windows. + * @field leader_window Identification unique to windows spawned by the same command. + * @field size_hints A table with size hints of the client: user_position, + * user_size, program_position, program_size, etc. + * @field sticky Set the client sticky, i.e. available on all tags. + * @field modal Indicate if the client is modal. + * @field focusable True if the client can receive the input focus. + * @field shape_bounding The client's bounding shape as set by awesome as a (native) cairo surface. + * @field shape_clip The client's clip shape as set by awesome as a (native) cairo surface. + * @field shape_client_bounding The client's bounding shape as set by the program as a (native) cairo surface. + * @field shape_client_clip The client's clip shape as set by the program as a (native) cairo surface. + * @field startup_id The FreeDesktop StartId. + * @field valid If the client that this object refers to is still managed by awesome. + * @table client + */ + +/** Return client struts (reserved space at the edge of the screen). + * + * @param struts A table with new strut values, or none. + * @return A table with strut values. + * @function struts + */ + +/** Get or set mouse buttons bindings for a client. + * + * @param buttons_table An array of mouse button bindings objects, or nothing. + * @return A table with all buttons. + * @function buttons + */ + +/** Get the number of instances. + * + * @return The number of client objects alive. + * @function instances + */ + static area_t titlebar_get_area(client_t *c, client_titlebar_t bar); static drawable_t *titlebar_get_drawable(lua_State *L, client_t *c, int cl_idx, client_titlebar_t bar); @@ -1305,11 +1389,10 @@ client_kill(client_t *c) } /** Get all clients into a table. - * \param L The Lua VM state. - * \return The number of elements pushed on stack. - * \luastack - * \lparam An optional screen number. - * \lreturn A table with all clients. + * + * @param[opt] screen A screen number. + * @return A table with all clients. + * @function get */ static int luaA_client_get(lua_State *L) @@ -1332,11 +1415,9 @@ luaA_client_get(lua_State *L) } /** Check if a client is visible on its screen. - * \param L The Lua VM state. - * \return The number of elements pushed on stack. - * \luastack - * \lvalue A client. - * \lreturn A boolean value, true if the client is visible, false otherwise. + * + * @return A boolean value, true if the client is visible, false otherwise. + * @function isvisible */ static int luaA_client_isvisible(lua_State *L) @@ -1433,10 +1514,8 @@ out: /** Kill a client. - * \param L The Lua VM state. * - * \luastack - * \lvalue A client. + * @function kill */ static int luaA_client_kill(lua_State *L) @@ -1446,11 +1525,9 @@ luaA_client_kill(lua_State *L) return 0; } -/** Swap a client with another one. - * \param L The Lua VM state. - * \luastack - * \lvalue A client. - * \lparam A client to swap with. +/** Swap a client with another one in global client list. + * @client A client to swap with. + * @function swap */ static int luaA_client_swap(lua_State *L) @@ -1481,10 +1558,11 @@ luaA_client_swap(lua_State *L) } /** Access or set the client tags. - * \param L The Lua VM state. - * \return The number of elements pushed on stack. - * \lparam A table with tags to set, or none to get the current tags table. - * \return The clients tag. + * + * @param tags_table A table with tags to set, or none to get the current tags + * table. + * @return A table with all tags. + * @function tags */ static int luaA_client_tags(lua_State *L) @@ -1534,9 +1612,8 @@ luaA_client_tags(lua_State *L) } /** Raise a client on top of others which are on the same layer. - * \param L The Lua VM state. - * \luastack - * \lvalue A client. + * + * @function raise */ static int luaA_client_raise(lua_State *L) @@ -1547,9 +1624,8 @@ luaA_client_raise(lua_State *L) } /** Lower a client on bottom of others which are on the same layer. - * \param L The Lua VM state. - * \luastack - * \lvalue A client. + * + * @function lower */ static int luaA_client_lower(lua_State *L) @@ -1566,10 +1642,8 @@ luaA_client_lower(lua_State *L) } /** Stop managing a client. - * \param L The Lua VM state. - * \return The number of elements pushed on stack. - * \luastack - * \lvalue A client. + * + * @function unmanage */ static int luaA_client_unmanage(lua_State *L) @@ -1783,11 +1857,10 @@ HANDLE_TITLEBAR(bottom, CLIENT_TITLEBAR_BOTTOM) HANDLE_TITLEBAR(left, CLIENT_TITLEBAR_LEFT) /** Return or set client geometry. - * \param L The Lua VM state. - * \return The number of elements pushed on stack. - * \luastack - * \lparam A table with new coordinates, or none. - * \lreturn A table with client coordinates. + * + * @param arg1 A table with new coordinates, or none. + * @return A table with client coordinates. + * @function geometry */ static int luaA_client_geometry(lua_State *L) @@ -1818,14 +1891,13 @@ luaA_client_geometry(lua_State *L) return luaA_pusharea(L, c->geometry); } -/** Apply size hints to a lua-specified geometry. - * \param L The Lua VM state. - * \return The number of elements pushed on stack. - * \luastack - * \lparam Desired width of client. - * \lparam Desired height of client. - * \lreturn Corrected width. - * \lreturn Corrected height. +/** Apply size hints to a size. + * + * @param width Desired width of client + * @param height Desired height of client + * @return Actual width of client + * @return Actual height of client + * @function apply_size_hints */ static int luaA_client_apply_size_hints(lua_State *L) @@ -2310,12 +2382,10 @@ luaA_client_set_shape_clip(lua_State *L, client_t *c) } /** Get or set keys bindings for a client. - * \param L The Lua VM state. - * \return The number of element pushed on stack. - * \luastack - * \lvalue A client. - * \lparam An array of key bindings objects, or nothing. - * \return The array of key bindings objects of this client. + * + * @param keys_table An array of key bindings objects, or nothing. + * @return A table with all keys. + * @function keys */ static int luaA_client_keys(lua_State *L) @@ -2570,66 +2640,249 @@ client_class_setup(lua_State *L) (lua_class_propfunc_t) luaA_client_get_client_shape_clip, NULL); + /** when a client gains focus + * @signal .focus + */ signal_add(&client_class.signals, "focus"); + /** Before manage, after unmanage, and when clients swap. + * @signal .list + */ signal_add(&client_class.signals, "list"); + /** + * @signal .manage + */ signal_add(&client_class.signals, "manage"); + /** + * @signal button::press + */ signal_add(&client_class.signals, "button::press"); + /** + * @signal button::release + */ signal_add(&client_class.signals, "button::release"); + /** + * @signal mouse::enter + */ signal_add(&client_class.signals, "mouse::enter"); + /** + * @signal mouse::leave + */ signal_add(&client_class.signals, "mouse::leave"); + /** + * @signal mouse::move + */ signal_add(&client_class.signals, "mouse::move"); + /** + * @signal property::above + */ signal_add(&client_class.signals, "property::above"); + /** + * @signal property::below + */ signal_add(&client_class.signals, "property::below"); + /** + * @signal property::class + */ signal_add(&client_class.signals, "property::class"); + /** + * @signal property::focusable + */ signal_add(&client_class.signals, "property::focusable"); + /** + * @signal property::fullscreen + */ signal_add(&client_class.signals, "property::fullscreen"); + /** + * @signal property::geometry + */ signal_add(&client_class.signals, "property::geometry"); + /** + * @signal property::group_window + */ signal_add(&client_class.signals, "property::group_window"); + /** + * @signal property::height + */ signal_add(&client_class.signals, "property::height"); + /** + * @signal property::hidden + */ signal_add(&client_class.signals, "property::hidden"); + /** + * @signal property::icon + */ signal_add(&client_class.signals, "property::icon"); + /** + * @signal property::icon_name + */ signal_add(&client_class.signals, "property::icon_name"); + /** + * @signal property::instance + */ signal_add(&client_class.signals, "property::instance"); + /** + * @signal property::keys + */ signal_add(&client_class.signals, "property::keys"); + /** + * @signal property::machine + */ signal_add(&client_class.signals, "property::machine"); + /** + * @signal property::maximized + */ signal_add(&client_class.signals, "property::maximized"); + /** + * @signal property::maximized_horizontal + */ signal_add(&client_class.signals, "property::maximized_horizontal"); + /** + * @signal property::maximized_vertical + */ signal_add(&client_class.signals, "property::maximized_vertical"); + /** + * @signal property::minimized + */ signal_add(&client_class.signals, "property::minimized"); + /** + * @signal property::modal + */ signal_add(&client_class.signals, "property::modal"); + /** + * @signal property::name + */ signal_add(&client_class.signals, "property::name"); + /** + * @signal property::ontop + */ signal_add(&client_class.signals, "property::ontop"); + /** + * @signal property::pid + */ signal_add(&client_class.signals, "property::pid"); + /** + * @signal property::role + */ signal_add(&client_class.signals, "property::role"); + /** + * @signal property::screen + */ signal_add(&client_class.signals, "property::screen"); + /** + * @signal property::shape_bounding + */ signal_add(&client_class.signals, "property::shape_bounding"); + /** + * @signal property::shape_client_bounding + */ signal_add(&client_class.signals, "property::shape_client_bounding"); + /** + * @signal property::shape_client_clip + */ signal_add(&client_class.signals, "property::shape_client_clip"); + /** + * @signal property::shape_clip + */ signal_add(&client_class.signals, "property::shape_clip"); + /** + * @signal property::size_hints_honor + */ signal_add(&client_class.signals, "property::size_hints_honor"); + /** + * @signal property::skip_taskbar + */ signal_add(&client_class.signals, "property::skip_taskbar"); + /** + * @signal property::sticky + */ signal_add(&client_class.signals, "property::sticky"); + /** + * @signal property::struts + */ signal_add(&client_class.signals, "property::struts"); + /** + * @signal property::titlebar_bottom + */ signal_add(&client_class.signals, "property::titlebar_bottom"); + /** + * @signal property::titlebar_left + */ signal_add(&client_class.signals, "property::titlebar_left"); + /** + * @signal property::titlebar_right + */ signal_add(&client_class.signals, "property::titlebar_right"); + /** + * @signal property::titlebar_top + */ signal_add(&client_class.signals, "property::titlebar_top"); + /** + * @signal property::transient_for + */ signal_add(&client_class.signals, "property::transient_for"); + /** + * @signal property::type + */ signal_add(&client_class.signals, "property::type"); + /** + * @signal property::urgent + */ signal_add(&client_class.signals, "property::urgent"); + /** + * @signal property::width + */ signal_add(&client_class.signals, "property::width"); + /** + * @signal property::window + */ signal_add(&client_class.signals, "property::window"); + /** + * @signal property::x + */ signal_add(&client_class.signals, "property::x"); + /** + * @signal property::y + */ signal_add(&client_class.signals, "property::y"); + /** + * @signal request::activate + */ signal_add(&client_class.signals, "request::activate"); + /** + * @signal request::fullscreen + */ signal_add(&client_class.signals, "request::fullscreen"); + /** + * @signal request::maximized_horizontal + */ signal_add(&client_class.signals, "request::maximized_horizontal"); + /** + * @signal request::maximized_vertical + */ signal_add(&client_class.signals, "request::maximized_vertical"); + /** + * @signal request::tag + */ signal_add(&client_class.signals, "request::tag"); + /** + * @signal request::urgent + */ signal_add(&client_class.signals, "request::urgent"); + /** when client is tagged + * @signal .tagged + */ signal_add(&client_class.signals, "tagged"); + /** when a client looses focus + * @signal .unfocus + */ signal_add(&client_class.signals, "unfocus"); + /** + * @signal .unmanage + */ signal_add(&client_class.signals, "unmanage"); + /** when client looses tag + * @signal .untagged + */ signal_add(&client_class.signals, "untagged"); } diff --git a/objects/drawable.c b/objects/drawable.c index e3536875f..dff780ecd 100644 --- a/objects/drawable.c +++ b/objects/drawable.c @@ -20,12 +20,35 @@ * */ +/** awesome drawable API + * + * Furthermore to the classes described here, one can also use signals as + * described in @{signals}. + * + * @author Uli Schlachter <psychon@znc.in> + * @copyright 2012 Uli Schlachter + * @release @AWESOME_VERSION@ + * @classmod drawable + */ + #include "drawable.h" #include "common/luaobject.h" #include "globalconf.h" #include +/** Drawable object. + * + * @field surface The drawable's cairo surface. + * @function drawable + */ + +/** Get the number of instances. + * + * @return The number of drawable objects alive. + * @function instances + */ + static lua_class_t drawable_class; LUA_OBJECT_FUNCS(drawable_class, drawable_t, drawable) @@ -106,8 +129,8 @@ luaA_drawable_get_surface(lua_State *L, drawable_t *drawable) /** Refresh a drawable's content. This has to be called whenever some drawing to * the drawable's surface has been done and should become visible. - * \param L The Lua VM state. - * \return The number of elements pushed on stack. + * + * @function refresh */ static int luaA_drawable_refresh(lua_State *L) @@ -119,11 +142,10 @@ luaA_drawable_refresh(lua_State *L) return 0; } -/** Return drawable geometry. - * \param L The Lua VM state. - * \return The number of elements pushed on stack. - * \luastack - * \lreturn A table with drawable coordinates. +/** Get drawable geometry. The geometry consists of x, y, width and height. + * + * @return A table with drawable coordinates and geometry. + * @function geometry */ static int luaA_drawable_geometry(lua_State *L) @@ -160,15 +182,45 @@ drawable_class_setup(lua_State *L) (lua_class_propfunc_t) luaA_drawable_get_surface, NULL); + /** + * @signal button::press + */ signal_add(&drawable_class.signals, "button::press"); + /** + * @signal button::release + */ signal_add(&drawable_class.signals, "button::release"); + /** + * @signal mouse::enter + */ signal_add(&drawable_class.signals, "mouse::enter"); + /** + * @signal mouse::leave + */ signal_add(&drawable_class.signals, "mouse::leave"); + /** + * @signal mouse::move + */ signal_add(&drawable_class.signals, "mouse::move"); + /** + * @signal property::height + */ signal_add(&drawable_class.signals, "property::height"); + /** + * @signal property::width + */ signal_add(&drawable_class.signals, "property::width"); + /** + * @signal property::x + */ signal_add(&drawable_class.signals, "property::x"); + /** + * @signal property::y + */ signal_add(&drawable_class.signals, "property::y"); + /** + * @signal property::surface + */ signal_add(&drawable_class.signals, "property::surface"); } diff --git a/objects/drawin.c b/objects/drawin.c index 078ef49a8..62c200290 100644 --- a/objects/drawin.c +++ b/objects/drawin.c @@ -20,6 +20,17 @@ * */ +/** awesome drawin API + * + * Furthermore to the classes described here, one can also use signals as + * described in @{signals} and X properties as described in @{xproperties}. + * + * @author Julien Danjou <julien@danjou.info> + * @copyright 2008-2009 Julien Danjou + * @release @AWESOME_VERSION@ + * @classmod drawin + */ + #include "drawin.h" #include "common/atoms.h" #include "common/xcursor.h" @@ -32,6 +43,45 @@ #include #include +/** Drawin object. + * + * @field border_width Border width. + * @field border_color Border color. + * @field ontop On top of other windows. + * @field cursor The mouse cursor. + * @field visible Visibility. + * @field opacity The opacity of the drawin, between 0 and 1. + * @field type The window type (desktop, normal, dock, …). + * @field x The x coordinates. + * @field y The y coordinates. + * @field width The width of the drawin. + * @field height The height of the drawin. + * @field drawable The drawin's drawable. + * @field window The X window id. + * @field shape_bounding The drawin's bounding shape as a (native) cairo surface. + * @field shape_clip The drawin's clip shape as a (native) cairo surface. + * @table drawin + */ + +/** Get or set mouse buttons bindings to a drawin. + * + * @param buttons_table A table of buttons objects, or nothing. + * @function buttons + */ + +/** Get or set drawin struts. + * + * @param strut A table with new strut, or nothing + * @return The drawin strut in a table. + * @function struts + */ + +/** Get the number of instances. + * + * @return The number of drawin objects alive. + * @function instances + */ + LUA_OBJECT_FUNCS(drawin_class, drawin_t, drawin) /** Kick out systray windows. @@ -313,12 +363,12 @@ luaA_drawin_new(lua_State *L) return 1; } -/* Set or get the drawin geometry. - * \param L The Lua VM state. - * \return The number of elements pushed on stack. - * \luastack - * \lparam An optional table with drawin geometry. - * \lreturn The drawin geometry. +/** Get or set drawin geometry. That's the same as accessing or setting the x, + * y, width or height properties of a drawin. + * + * @param A table with coordinates to modify. + * @return A table with drawin coordinates and geometry. + * @function geometry */ static int luaA_drawin_geometry(lua_State *L) @@ -624,15 +674,45 @@ drawin_class_setup(lua_State *L) (lua_class_propfunc_t) luaA_drawin_get_shape_clip, (lua_class_propfunc_t) luaA_drawin_set_shape_clip); + /** + * @signal property::shape_bounding + */ signal_add(&drawin_class.signals, "property::shape_bounding"); + /** + * @signal property::shape_clip + */ signal_add(&drawin_class.signals, "property::shape_clip"); + /** + * @signal property::border_width + */ signal_add(&drawin_class.signals, "property::border_width"); + /** + * @signal property::cursor + */ signal_add(&drawin_class.signals, "property::cursor"); + /** + * @signal property::height + */ signal_add(&drawin_class.signals, "property::height"); + /** + * @signal property::ontop + */ signal_add(&drawin_class.signals, "property::ontop"); + /** + * @signal property::visible + */ signal_add(&drawin_class.signals, "property::visible"); + /** + * @signal property::width + */ signal_add(&drawin_class.signals, "property::width"); + /** + * @signal property::x + */ signal_add(&drawin_class.signals, "property::x"); + /** + * @signal property::y + */ signal_add(&drawin_class.signals, "property::y"); } diff --git a/objects/key.c b/objects/key.c index 0e4819085..dc847a7af 100644 --- a/objects/key.c +++ b/objects/key.c @@ -20,6 +20,21 @@ * */ +/** awesome key API + * + * Furthermore to the classes described here, one can also use signals as + * described in @{signals}. + * + * Some signal names are starting with a dot. These dots are artefacts from + * the documentation generation, you get the real signal name by + * removing the starting dot. + * + * @author Julien Danjou <julien@danjou.info> + * @copyright 2008-2009 Julien Danjou + * @release @AWESOME_VERSION@ + * @classmod key + */ + #include "objects/key.h" #include "common/xutil.h" #include "xkb.h" @@ -28,6 +43,24 @@ #include #include +/** Key object. + * + * @tfield string key The key to trigger an event. + * @tfield string keysym Same as key, but return the name of the key symbol. It + * can be identical to key, but for characters like '.' it will return + * 'period'. + * @tfield table modifiers The modifier key that should be pressed while the + * key is pressed. An array with all the modifiers. Valid modifiers are: Any, + * Mod1, Mod2, Mod3, Mod4, Mod5, Shift, Lock and Control. + * @table key + */ + +/** Get the number of instances. + * + * @return The number of key objects alive. + * @function instances + */ + static void luaA_keystore(lua_State *L, int ud, const char *str, ssize_t len) { @@ -235,9 +268,21 @@ key_class_setup(lua_State *L) (lua_class_propfunc_t) luaA_key_get_modifiers, (lua_class_propfunc_t) luaA_key_set_modifiers); + /** + * @signal .press + */ signal_add(&key_class.signals, "press"); + /** + * @signal property::key + */ signal_add(&key_class.signals, "property::key"); + /** + * @signal property::modifiers + */ signal_add(&key_class.signals, "property::modifiers"); + /** + * @signal .release + */ signal_add(&key_class.signals, "release"); } diff --git a/objects/screen.c b/objects/screen.c index 3321bd0df..1865e2745 100644 --- a/objects/screen.c +++ b/objects/screen.c @@ -19,6 +19,17 @@ * */ +/** awesome screen API + * + * Furthermore to the classes described here, one can also use signals as + * described in @{signals}. + * + * @author Julien Danjou <julien@danjou.info> + * @copyright 2008-2009 Julien Danjou + * @release @AWESOME_VERSION@ + * @classmod screen + */ + #include "objects/screen.h" #include "banning.h" #include "objects/client.h" @@ -30,6 +41,19 @@ #include #include +/** Screen is a table where indexes are screen numbers. You can use `screen[1]` + * to get access to the first screen, etc. Alternatively, if RANDR information + * is available, you can use output names for finding screen objects. + * Each screen has a set of properties. + * + * @tfield table geometry The screen coordinates. Immutable. + * @tfield table workarea The screen workarea. + * @tfield int index The screen number. + * @tfield table outputs If RANDR information is available, a list of outputs + * for this screen and their size in mm. + * @table screen + */ + struct screen_output_t { /** The XRandR names of the output */ @@ -502,12 +526,10 @@ luaA_screen_get_workarea(lua_State *L, screen_t *s) return 1; } -/** Get the screen count. - * \param L The Lua VM state. - * \return The number of elements pushed on stack. +/** Get the number of screens. * - * \luastack - * \lreturn The screen count, at least 1. + * @return The screen count, at least 1. + * @function count */ static int luaA_screen_count(lua_State *L) @@ -557,6 +579,9 @@ screen_class_setup(lua_State *L) NULL, (lua_class_propfunc_t) luaA_screen_get_workarea, NULL); + /** + * @signal property::workarea + */ signal_add(&screen_class.signals, "property::workarea"); } diff --git a/objects/tag.c b/objects/tag.c index 096a784d4..b694079ab 100644 --- a/objects/tag.c +++ b/objects/tag.c @@ -19,12 +19,41 @@ * */ +/** awesome tag API + * + * Furthermore to the classes described here, one can also use signals as + * described in @{signals}. + * + * Some signal names are starting with a dot. These dots are artefacts from + * the documentation generation, you get the real signal name by + * removing the starting dot. + * + * @author Julien Danjou <julien@danjou.info> + * @copyright 2008-2009 Julien Danjou + * @release @AWESOME_VERSION@ + * @classmod tag + */ + #include "tag.h" #include "banning.h" #include "client.h" #include "ewmh.h" #include "luaa.h" +/** Tag object. + * + * @field name Tag name. + * @field selected True if the tag is selected to be viewed. + * @field activated True if the tag is active and can be used. + * @table tag + */ + +/** Get the number of instances. + * + * @return The number of tag objects alive. + * @function instances + */ + /** Tag type */ struct tag { @@ -179,11 +208,11 @@ luaA_tag_new(lua_State *L) } /** Get or set the clients attached to this tag. - * \param L The Lua VM state. - * \return The number of elements pushed on stack. - * \luastack - * \lparam None or a table of clients to set. - * \lreturn A table with the clients attached to this tags. + * + * @param clients_table None or a table of clients to set as being tagged with + * this tag. + * @return A table with the clients attached to this tags. + * @function clients */ static int luaA_tag_clients(lua_State *L) @@ -350,11 +379,29 @@ tag_class_setup(lua_State *L) (lua_class_propfunc_t) luaA_tag_get_activated, (lua_class_propfunc_t) luaA_tag_set_activated); + /** + * @signal property::name + */ signal_add(&tag_class.signals, "property::name"); + /** + * @signal property::selected + */ signal_add(&tag_class.signals, "property::selected"); + /** + * @signal property::activated + */ signal_add(&tag_class.signals, "property::activated"); + /** + * @signal request::select + */ signal_add(&tag_class.signals, "request::select"); + /** + * @signal tagged + */ signal_add(&tag_class.signals, "tagged"); + /** + * @signal untagged + */ signal_add(&tag_class.signals, "untagged"); } diff --git a/objects/window.c b/objects/window.c index 3f913ee9b..45077bbfd 100644 --- a/objects/window.c +++ b/objects/window.c @@ -19,6 +19,14 @@ * */ +/** Handling of X properties. + * + * This can not be used as a standalone class, but is instead referenced + * explicitely in the classes, where it can be used. In the respective + * classes,it then can be used via `classname:get_xproperty(...)` etc. + * @classmod xproperties + */ + #include "objects/window.h" #include "common/atoms.h" #include "ewmh.h" @@ -385,9 +393,11 @@ window_get_xproperty(lua_State *L, xcb_window_t window, int prop_idx) return 1; } -/** Set an xproperty. - * \param L The Lua VM state. - * \return The number of elements pushed on stack. +/** Change a xproperty. + * + * @param name The name of the X11 property + * @param value The new value for the property + * @function set_xproperty */ static int luaA_window_set_xproperty(lua_State *L) @@ -396,9 +406,10 @@ luaA_window_set_xproperty(lua_State *L) return window_set_xproperty(L, w->window, 2, 3); } -/** Get an xproperty. - * \param L The Lua VM state. - * \return The number of elements pushed on stack. +/** Get the value of a xproperty. + * + * @param name The name of the X11 property + * @function get_xproperty */ static int luaA_window_get_xproperty(lua_State *L) @@ -407,7 +418,7 @@ luaA_window_get_xproperty(lua_State *L) return window_get_xproperty(L, w->window, 2); } -/** Translate a window_type_t into the corresponding EWMH atom. +/* Translate a window_type_t into the corresponding EWMH atom. * @param type The type to return. * @return The EWMH atom for this type. */ @@ -498,11 +509,29 @@ window_class_setup(lua_State *L) (lua_class_propfunc_t) luaA_window_get_border_width, (lua_class_propfunc_t) luaA_window_set_border_width); + /** + * @signal property::border_color + */ signal_add(&window_class.signals, "property::border_color"); + /** + * @signal property::border_width + */ signal_add(&window_class.signals, "property::border_width"); + /** + * @signal property::buttons + */ signal_add(&window_class.signals, "property::buttons"); + /** + * @signal property::opacity + */ signal_add(&window_class.signals, "property::opacity"); + /** + * @signal property::struts + */ signal_add(&window_class.signals, "property::struts"); + /** + * @signal property::type + */ signal_add(&window_class.signals, "property::type"); } diff --git a/root.c b/root.c index e8bc08302..34a170963 100644 --- a/root.c +++ b/root.c @@ -19,6 +19,13 @@ * */ +/** awesome root window API + * @author Julien Danjou <julien@danjou.info> + * @copyright 2008-2009 Julien Danjou + * @release @AWESOME_VERSION@ + * @module root + */ + #include "globalconf.h" #include "common/atoms.h" @@ -133,18 +140,17 @@ _string_to_key_code(const char *s) } } -/** Send fake events. Usually the current focused client will get it. - * \param L The Lua VM state. - * \return The number of elements pushed on stack. - * \luastack - * \lparam The event type: key_press, key_release, button_press, button_release - * or motion_notify. - * \lparam The detail: in case of a key event, this is the keycode to send, in - * case of a button event this is the number of the button. In case of a motion - * event, this is a boolean value which if true make the coordinates relatives. - * \lparam In case of a motion event, this is the X coordinate. - * \lparam In case of a motion event, this is the Y coordinate. - * If not specified, the current one is used. +/** Send fake events. Usually the currently focused client will get it. + * + * @param event_type The event type: key_press, key_release, button_press, + * button_release or motion_notify. + * @param detail The detail: in case of a key event, this is the keycode + * to send, in case of a button event this is the number of the button. In + * case of a motion event, this is a boolean value which if true makes the + * coordinates relatives. + * @param x In case of a motion event, this is the X coordinate. + * @param y In case of a motion event, this is the Y coordinate. + * @function fake_input */ static int luaA_root_fake_input(lua_State *L) @@ -208,12 +214,11 @@ luaA_root_fake_input(lua_State *L) } /** Get or set global key bindings. - * This binding will be available when you'll press keys on the root window. - * \param L The Lua VM state. - * \return The number of elements pushed on stack. - * \luastack - * \lparam An array of key bindings objects, or nothing. - * \lreturn The array of key bindings objects of this client. + * These bindings will be available when you press keys on the root window. + * + * @tparam table|nil keys_array An array of key binding objects, or nothing. + * @return The array of key bindings objects of this client. + * @function keys */ static int luaA_root_keys(lua_State *L) @@ -250,12 +255,11 @@ luaA_root_keys(lua_State *L) } /** Get or set global mouse bindings. - * This binding will be available when you'll click on the root window. - * \param L The Lua VM state. - * \return The number of elements pushed on stack. - * \luastack - * \lparam An array of mouse button bindings objects, or nothing. - * \lreturn The array of mouse button bindings objects. + * This binding will be available when you click on the root window. + * + * @param button_table An array of mouse button bindings objects, or nothing. + * @return The array of mouse button bindings objects. + * @function buttons */ static int luaA_root_buttons(lua_State *L) @@ -288,10 +292,9 @@ luaA_root_buttons(lua_State *L) } /** Set the root cursor. - * \param L The Lua VM state. - * \return The number of elements pushed on stack. - * \luastack - * \lparam A X cursor name. + * + * @param cursor_name A X cursor name. + * @function cursor */ static int luaA_root_cursor(lua_State *L) @@ -315,10 +318,9 @@ luaA_root_cursor(lua_State *L) } /** Get the drawins attached to a screen. - * \param L The Lua VM state. - * \return The number of elements pushed on stack. - * \luastack - * \lreturn A table with all drawins. + * + * @return A table with all drawins. + * @function drawins */ static int luaA_root_drawins(lua_State *L) @@ -334,11 +336,11 @@ luaA_root_drawins(lua_State *L) return 1; } -/** Get the screen's wallpaper - * \param L The Lua VM state. - * \return The number of elements pushed on stack. - * \luastack - * \lreturn A cairo surface for the wallpaper. +/** Get the wallpaper as a cairo surface or set it as a cairo pattern. + * + * @param pattern A cairo pattern as light userdata + * @return A cairo surface or nothing. + * @function wallpaper */ static int luaA_root_wallpaper(lua_State *L) @@ -398,11 +400,9 @@ luaA_root_wallpaper(lua_State *L) return 1; } -/** Get the screen's wallpaper - * \param L The Lua VM state. - * \return The number of elements pushed on stack. - * \luastack - * \lreturn A cairo surface for the wallpaper. +/** Get the attached tags. + * @return A table with all tags. + * @function tags */ static int luaA_root_tags(lua_State *L) diff --git a/selection.c b/selection.c index 721001e45..6787c7ed8 100644 --- a/selection.c +++ b/selection.c @@ -20,6 +20,13 @@ * */ +/** awesome selection (clipboard) API + * @author Julien Danjou <julien@danjou.info> + * @copyright 2008-2009 Julien Danjou + * @release @AWESOME_VERSION@ + * @module selection + */ + #include "selection.h" #include "globalconf.h" #include "common/atoms.h" @@ -28,6 +35,12 @@ #include #include +/** Get the selection (clipboard) content. + * + * @return A string with the selection (clipboard) content. + * @function selection + */ + static xcb_window_t selection_window = XCB_NONE; /** Get the current X selection buffer. diff --git a/spawn.c b/spawn.c index 37dd3ba50..987f3e1f5 100644 --- a/spawn.c +++ b/spawn.c @@ -19,6 +19,14 @@ * */ +/** awesome core API + * + * @author Julien Danjou <julien@danjou.info> + * @copyright 2008-2009 Julien Danjou + * @release @AWESOME_VERSION@ + * @module awesome + */ + #include "spawn.h" #include @@ -237,10 +245,30 @@ spawn_init(void) spawn_monitor_event, NULL, NULL); + /** For some reason the application aborted startup + * @param arg Table which only got the "id" key set + * @signal spawn::canceled + */ signal_add(&global_signals, "spawn::canceled"); + /** When one of the fields from the @{spawn::initiated} table changes + * @param arg Table which describes the spawn event + * @signal spawn::change + */ signal_add(&global_signals, "spawn::change"); + /** An application finished starting + * @param arg Table which only got the "id" key set + * @signal spawn::completed + */ signal_add(&global_signals, "spawn::completed"); + /** When a new client is beginning to start + * @param arg Table which describes the spawn event + * @signal spawn::initiated + */ signal_add(&global_signals, "spawn::initiated"); + /** An application started a spawn event but didn't start in time. + * @param arg Table which only got the "id" key set + * @signal spawn::timeout + */ signal_add(&global_signals, "spawn::timeout"); } @@ -310,12 +338,11 @@ parse_command(lua_State *L, int idx, GError **error) /** Spawn a program. * This function is multi-head (Zaphod) aware and will set display to * the right screen according to mouse position. - * \param L The Lua VM state. - * \return The number of elements pushed on stack - * \luastack - * \lparam The command to launch. - * \lparam Use startup-notification, true or false, default to true. - * \lreturn Process ID if everything is OK, or an error string if an error occured. + * + * @param cmd The command to launch. + * @param use_sn Use startup-notification, true or false, default to true. + * @return Process ID if everything is OK, or an error string if an error occured. + * @function spawn */ int luaA_spawn(lua_State *L) diff --git a/xkb.c b/xkb.c index 3e1d62457..82db23bbd 100644 --- a/xkb.c +++ b/xkb.c @@ -19,17 +19,21 @@ * */ +/** + * @module awesome + */ + #include "xkb.h" #include "globalconf.h" #include #include #include -/* \brief switch keyboard layout - * \param L The Lua VM state. - * \return The number of elements pushed on stack. - * \luastack - * \lparam layout number, integer from 0 to 3 +/** + * Switch keyboard layout. + * + * @function xkb_set_layout_group + * @tparam integer num keyboard layout number, integer from 0 to 3 */ int luaA_xkb_set_layout_group(lua_State *L) @@ -40,11 +44,11 @@ luaA_xkb_set_layout_group(lua_State *L) return 0; } -/* \brief get current layout number - * \param L The Lua VM state. - * \return The number of elements pushed on stack. - * \luastack - * \lreturn current layout number, integer from 0 to 3 +/** + * Get current layout number. + * + * @function xkb_get_layout_group + * @treturn integer num Current layout number, integer from 0 to 3. */ int luaA_xkb_get_layout_group(lua_State *L) @@ -65,12 +69,12 @@ luaA_xkb_get_layout_group(lua_State *L) return 1; } -/* \brief get layout short names - * \param L The Lua VM state. - * \return The number of elements pushed on stack. - * \luastack - * \lreturn string describing current layout settings, \ - * example: 'pc+us+de:2+inet(evdev)+group(alt_shift_toggle)+ctrl(nocaps)' +/** + * Get layout short names. + * + * @function xkb_get_group_names + * @treturn string A string describing the current layout settings, + * e.g.: 'pc+us+de:2+inet(evdev)+group(alt_shift_toggle)+ctrl(nocaps)' */ int luaA_xkb_get_group_names(lua_State *L) From ba62665fd6f6b965221478088493444f7a1b958d Mon Sep 17 00:00:00 2001 From: Julian Wollrath Date: Sun, 29 Mar 2015 17:50:11 +0200 Subject: [PATCH 5/7] Remove some trailing whitespaces. --- lib/awful/layout/init.lua | 2 +- lib/awful/tag.lua | 2 +- luaa.h | 4 ++-- themes/default/theme.lua | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/awful/layout/init.lua b/lib/awful/layout/init.lua index a12dc9c95..cf55cfd59 100755 --- a/lib/awful/layout/init.lua +++ b/lib/awful/layout/init.lua @@ -64,7 +64,7 @@ end --- Change the layout of the current tag. -- @param i Relative index. --- @param s The screen number. +-- @param s The screen number. -- @param[opt] layouts A table of layouts. function layout.inc(i, s, layouts) if type(i) == "table" then diff --git a/lib/awful/tag.lua b/lib/awful/tag.lua index 7ceb41c0b..a1865b8e4 100644 --- a/lib/awful/tag.lua +++ b/lib/awful/tag.lua @@ -292,7 +292,7 @@ function tag.gettags(s) end table.sort(tags, function(a, b) - return (tag.getproperty(a, "index") or 9999) < (tag.getproperty(b, "index") or 9999) + return (tag.getproperty(a, "index") or 9999) < (tag.getproperty(b, "index") or 9999) end) return tags end diff --git a/luaa.h b/luaa.h index b84f1558d..6b6b38087 100644 --- a/luaa.h +++ b/luaa.h @@ -74,7 +74,7 @@ luaA_getuservalue(lua_State *L, int idx) #else lua_getfenv(L, idx); #endif -} +} static inline void luaA_setuservalue(lua_State *L, int idx) @@ -84,7 +84,7 @@ luaA_setuservalue(lua_State *L, int idx) #else lua_setfenv(L, idx); #endif -} +} static inline size_t luaA_rawlen(lua_State *L, int idx) diff --git a/themes/default/theme.lua b/themes/default/theme.lua index a707d1e21..64de0f4f3 100644 --- a/themes/default/theme.lua +++ b/themes/default/theme.lua @@ -95,7 +95,7 @@ theme.layout_cornerse = "@AWESOME_THEMES_PATH@/default/layouts/cornersew.png" theme.awesome_icon = "@AWESOME_ICON_PATH@/awesome16.png" --- Define the icon theme for application icons. If not set then the icons +-- Define the icon theme for application icons. If not set then the icons -- from /usr/share/icons and /usr/share/icons/hicolor will be used. theme.icon_theme = nil From 7989096cc22ac0edd8ec77cb6a3e2e88744c1eb8 Mon Sep 17 00:00:00 2001 From: Daniel Hahler Date: Sat, 20 Jun 2015 01:17:44 +0200 Subject: [PATCH 6/7] Travis: install CMake 3+ (for newer FindLua) --- .travis.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 7d760544a..cded0d7b6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -85,6 +85,11 @@ install: # Install ldoc for building docs. - sudo luarocks install ldoc + # Install CMake 3+, via http://www.cmake.org/download/#latest. + - wget http://www.cmake.org/files/v3.2/cmake-3.2.3-Linux-x86_64.tar.Z + - tar xf cmake-3.2.3-Linux-x86_64.tar.Z + - PATH=$PWD/cmake-3.2.3-Linux-x86_64/bin:$PATH + script: - export CMAKE_ARGS="-DLUA_LIBRARY=${LUALIB} -DLUA_INCLUDE_DIR=/usr/include/lua${LUAPKG}" - - make && sudo make install && awesome --version + - make && sudo env PATH=$PATH make install && awesome --version From d2e25c3594df451b20bea195e3057d8221f2ce07 Mon Sep 17 00:00:00 2001 From: Daniel Hahler Date: Sat, 20 Jun 2015 01:56:05 +0200 Subject: [PATCH 7/7] cmake: s/ESCAPE_QUOTE/ESCAPE_QUOTES This appears to be the correct name for 2.8.12 [1] already, but CMake 3.2.3 complains loud(er) now. 1: http://www.cmake.org/cmake/help/v2.8.12/cmake.html#command:configure_file --- awesomeConfig.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/awesomeConfig.cmake b/awesomeConfig.cmake index c48d9e970..5a434a16e 100644 --- a/awesomeConfig.cmake +++ b/awesomeConfig.cmake @@ -298,7 +298,7 @@ set(AWESOME_CONFIGURE_FILES foreach(file ${AWESOME_CONFIGURE_FILES}) configure_file(${SOURCE_DIR}/${file} ${BUILD_DIR}/${file} - ESCAPE_QUOTE + ESCAPE_QUOTES @ONLY) endforeach() #}}}