Commit Graph

266 Commits

Author SHA1 Message Date
Emmanuel Lepage Vallee cf0385af80 widget: Add an `:add_button()` method.
This is done now because a lot of code in `lib/` add buttons by manually
extracting buttons from awful.button. Instead of adding ugly code to
prevent using the legacy API, do this.
2019-10-05 22:57:05 -04:00
Emmanuel Lepage Vallee 3d918258e2 widget: Turn `:buttons()` into a normal property. 2019-10-05 18:06:51 -04:00
Emmanuel Lepage Vallee 0cb22fd203 awful: Move the backward compatibility code into its own file.
The reason for this is that as more of CAPI is brought in line with the
current API guidelines, it is more and more likely the tests will hit
APIs shims (either to test them or because the prototype remains the
same and only the implementation moved to Lua).
2019-10-05 18:06:50 -04:00
Emmanuel Lepage Vallee 96c4d001f1 doc: Remove capi.button/capi.key from the official doc.
`awful.button` is always the one used and it's confusing.
2019-10-05 18:06:50 -04:00
Emmanuel Lepage Vallee 585e321578 doc: Fix a regression from a recent commit.
There was an off-by-one in the substring for the parameter names.
2019-10-05 17:20:29 -04:00
Emmanuel Lepage Vallee 271e2822a7 build: Allow Awesome to be built with luarock LGI. 2019-10-05 17:16:22 -04:00
Emmanuel Lepage Vallée 74410e9490
Merge pull request #2890 from Elv13/doc_args
Improve (and fix) the doc.
2019-10-02 13:42:03 -04:00
Emmanuel Lepage Vallée 6dd8daa2ce
doc: Add bacj an accidently removed section. (#2885)
This was probably due to copy pasting from the preprocessed file
back to the raw file.

Fix #2882
2019-10-01 12:49:28 -04:00
Emmanuel Lepage Vallee 5de1e36007 doc: Use braces for names function arguments.
Use {} for all functions with take `args` as sole parameters instead
of (). Also color them differently to highlight this isn't a typo.
2019-10-01 02:03:12 -04:00
Emmanuel Lepage Vallee 8704b8d89a doc: Move the core components to the top of the doc index.
They are the most important, they should be the most visible.
2019-10-01 01:18:15 -04:00
Emmanuel Lepage Vallee dcdbc679f7 doc: Add a file to ldoc blacklist before addint it.
Add `dpi.lua` to config.ld even if it isn't added yet. This is
because the way the test run has it cached in the build dir. A full
rebuild would take too long and timeout on travis for semi-large PRs.
2019-09-29 18:19:45 -04:00
Emmanuel Lepage Vallee b40083780e matcher: Add a "every" and "every_any" sections to the rules.
So far the "any" rules had a "OR" and "NOT" logic "gates", but not
an "AND".
2019-08-03 18:26:06 -04:00
Emmanuel Lepage Vallee f3f9e4a4b5 matcher: Allow rules to be addressed using an identifier. 2019-08-03 18:26:06 -04:00
Uli Schlachter 6101ef5186 Add libRSVG to the list of optional dependencies (#2837)
Since commit 3295e9f33d, the imagebox tries to use libRSVG via
lgi.Rsvg to load SVG files without rasterising them immediately.
Instead, they are directly drawn at the expected size.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2019-07-28 17:23:44 -04:00
Emmanuel Lepage Vallee b34cc6b896 doc: Fix autogenerated table links.
Update for the new URL scheme.
2019-07-09 17:17:58 -04:00
Emmanuel Lepage Vallee bd5e557a60 doc: Fix links in the "AwesomeWM widget system" page.
The URLs just changed again.
2019-07-09 17:00:48 -04:00
Emmanuel Lepage Vallee 8038f8124e doc: Do not mix spaces and tabs for indentation in the generated HTML. 2019-07-09 17:00:20 -04:00
Emmanuel Lepage Vallee 7cba838067 doc: Prevent ldoc from generating URLs with spaces.
For dubious reasons, ldoc uses the human readable name for the URLs
instead of the machine readable one. If the name has multiple words,
this causes the URLs to have spaces or %20 in them.

This commits remove all spaces from the "kinds" and then use `:gsub()`
in the template to convert underscores to spaces.

**WARNING** This breaks all URLs again. But this is necessary to prevent
broken links when the user paste them with spaces instead of %20.
2019-07-09 16:28:42 -04:00
Emmanuel Lepage Vallée f459296747
doc: Fix index links. (#2803)
Fixes #2797
2019-06-28 09:34:32 -04:00
Emmanuel Lepage Vallée d699968475
doc: Fix the "Returns" section for @staticfct. (#2801)
It wasn't displayed. Another hack based on undocumented APIs, but
whatever, ldoc is dead.
2019-06-22 18:00:40 -04:00
mergify[bot] 9865f4592b
Merge pull request #2787 from alfunx/readme-fixes
Fix minor stuff in README
2019-06-10 12:07:05 +00:00
DrEuler 184de0ab82 Update 01-readme.md (#2786)
Fixed a spelling error
2019-06-09 16:11:11 -04:00
Alphonse Mariya a64e82d43e
Fix minor stuff in README 2019-06-09 19:47:31 +02:00
Emmanuel Lepage Vallee 47750f62b2 doc: Hide the empty notifications modules 2019-06-08 18:56:08 -04:00
Emmanuel Lepage Vallee 9be03b528c doc: Mentions the notifications in the widget page. 2019-06-08 18:56:08 -04:00
Emmanuel Lepage Vallee 9acc452b1e naughty: Set an action table even if the notification has none.
Less `if` in the code.
2019-06-08 18:56:08 -04:00
Emmanuel Lepage Vallee 8951b88095 doc: Document the new template widget delegate system. 2019-06-08 18:56:08 -04:00
Emmanuel Lepage Vallee 3e3a298a33 doc: Shape the methods and functions arguments in the summary.
Given the full prototype can be quite long with all the optional
argument definition, better help the eyes focus on the important
part.
2019-06-08 18:14:14 -04:00
Emmanuel Lepage Vallee 90a29f92eb doc: Fix all the property, theme and field types. 2019-06-08 18:14:14 -04:00
Emmanuel Lepage Vallee 12a7236e2b doc: Add support for property types to ldoc.
Rather that abusing of how the arguments are displayed to convey the
type, add native support.

It still uses the @param for the doc, so this doesn't cause a million
little noisy changes, but the rendered HTML now have a real section for
the type. This is added to both the summary and the expanded description.

Additionally, if the type has a description string, a second is added.
2019-06-08 18:14:14 -04:00
Emmanuel Lepage Vallee 43799aec02 doc: Hardcode the header instead of using "machine readable".
"classmod" is not useful for a humain.
2019-06-08 18:14:14 -04:00
Emmanuel Lepage Vallee 4ce6179d78 doc: Standardize how the @field are dsiplayed.
Always add the module name. Until now some had it and some didn't.
2019-06-08 18:14:14 -04:00
Emmanuel Lepage Vallee b4ece0f053 doc: Use an explicit tag for all static functions.
This way their name doesn't get mangle by the broken magic. It will also
eventually allow to `error()` in the template when the implicit
`@function` is used.

This commit also fixes a large number of issues found while
proof-reading everything.
2019-06-08 18:14:13 -04:00
Emmanuel Lepage Vallee 11d7a614d9 doc: Add a constructor stereotype for everything.
This forces the constructor functions to be at the top of the API
documentation rather than in a random position.
2019-06-08 18:13:42 -04:00
Emmanuel Lepage Vallee 63ca0f0d8f doc: Use an explicit @method stereotype for all methods.
ldoc has a magical `@classmod` module type which tries to detect
what is a method and what is a static function. It fails about as
often as it works. This commit makes everything explicit to remove
such issues.

Fixes #2640
Ref #1373
2019-06-08 18:13:42 -04:00
Emmanuel Lepage Vallee 6ce4fa6802 doc: Remove the old module alias hack.
The module names for also have their alias. The commit also remove 2
deprecated module that were forgotton in the previous "get rid of the
deprecated modules in the doc" PR.
2019-06-08 18:13:42 -04:00
Emmanuel Lepage Vallee cdeafeff94 doc: Add a section for theme related libraries 2019-06-08 18:13:42 -04:00
Emmanuel Lepage Vallee ded35502d5 doc: Add a section for utility libraries
Dedicated for the modules extensions developers will need, but that the
general "I only edit rc.lua" user wont.
2019-06-08 18:13:42 -04:00
Emmanuel Lepage Vallee f1dceb02f6 doc: Move all popups to a section. 2019-06-08 18:13:42 -04:00
Emmanuel Lepage Vallee 9d0c2200b2 doc: Add a section for the important classes.
The choice is very subjective, but at least they stand out.
2019-06-08 18:13:28 -04:00
Emmanuel Lepage Vallee d00ac0be93 doc: Add a widget, container and layout section to the index. 2019-06-08 17:49:14 -04:00
Emmanuel Lepage Vallee 6a2b8abe11 doc: Do not mess with the <a> in the deprecated definiton.
It worked fine for the table in the header, but the name is also used in
the "main" documentation below. This caused the while text to be within
the "<a>" section.
2019-06-08 17:49:14 -04:00
Emmanuel Lepage Vallee c0e8660ca0 doc: Display the `Parameters:` <h3> in the doc.
It was displayed for most sections, but not the functions. This is
problem when the doc already contains a bullet list just before the
parameter section. The two looked as if they were a single list.
2019-06-08 17:49:14 -04:00
Emmanuel Lepage Vallee 89a02ac6cd doc: Standardize the function name.
There was some issues like `gears.shape.circle` being called
`module.circle`.

There is also a disparity between how the constructor and "normal"
functions are called.

This commit attempts to force everything to have the full module name.
2019-06-08 17:49:14 -04:00
Emmanuel Lepage Vallee d92fda78c4 doc: Cleanup how methods are rendered in the doc.
Previously, there was some `module:foo()` or `gears.object:foo()`
because the doc used the "raw" name and/or, in some undefined and
race condition prone (due to `pairs()` order), the formatted
"classmod" name.

Now, just display `:foo()` and be done with it.
2019-06-08 17:49:14 -04:00
Emmanuel Lepage Vallee 43c851798b doc: Update the parser for the next commits.
Otherwise the CI will fail.
2019-06-08 17:49:14 -04:00
Emmanuel Lepage Vallée 7ff635bde0
Merge pull request #2507 from Elv13/xmas_2k18_1
New theme API groundwork
2019-04-18 13:00:58 -04:00
Uli Schlachter 7a31296387 Update NEWS again (#2750)
Signed-off-by: Uli Schlachter <psychon@znc.in>
2019-04-16 21:26:28 -04:00
Emmanuel Lepage Vallee 1c0eedfe9f doc: Update the news for this pull request 2019-04-15 15:26:50 -04:00
Emmanuel Lepage Vallée df0cdbed61
Merge pull request #2600 from Elv13/extract_rules
Extract the awful.rules logic into a gears module
2019-04-15 13:28:48 -04:00