Commit Graph

1868 Commits

Author SHA1 Message Date
Bill Spitzak
be8064d2d4 doc: compress the lists in the protocol docs some
Use simpara to remove the blank lines, and put the type/value and
the comment into the same line.

Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
2015-01-23 18:45:01 -08:00
Bill Spitzak
1f39fbf8d2 doc: made functions taking wl_event_queue arg belong to wl_event_queue
The fact that these functions take both a display and queue argument is
I think historical, and they really are methods on the queue.

Also added some docs for wl_display_prepare_read_queue.

Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
2015-01-23 18:44:57 -08:00
Bill Spitzak
d3770c0661 doc: Remove wl_map from documentation
This object is only in wayland-private.h so it's methods should not
be in the documentation.

Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
2015-01-23 18:44:56 -08:00
Bill Spitzak
074e120cb3 doc: Remove deprecated functions from documentation
Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
2015-01-23 18:44:55 -08:00
Bill Spitzak
594ec7e689 doc: add missing \memberof to wl_display_get_protocol_error
Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
2015-01-23 18:44:54 -08:00
Jonas Ådahl
ab3ee6f6d9 server: Use existing id variable when inserting created object
We already have the id variable there and it makes it slightly easier to
read.

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
2015-01-23 18:20:41 -08:00
Jonas Ådahl
5ce947bd90 protocol: Clarify selection data offer destruction requirement
Clarify that a client receiving a wl_data_device.selection event must
destroy the data_offer of the previous wl_data_device.selection event,
if any.

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
2015-01-23 18:20:35 -08:00
Jonas Ådahl
434d797d27 protocol: Fix typo in wl_data_offer
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
2015-01-23 18:20:29 -08:00
Bryce Harrington
b7f9925abc configure.ac: bump version to 1.6.91 for the alpha release 2015-01-17 03:39:05 -08:00
Bill Spitzak
2888e97d5d doc: make itemized lists from doxygen work
Not actually used currently but probably a good idea.

Acked-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2014-12-19 16:33:34 +02:00
Bill Spitzak
0d0a62c79a doc: Document structures and unions in addition to classes
This provides targets for some of the doxygen links, and some of
them have useful memberof function lists.

Added some if/else statements to reduce validation errors.

Tested-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2014-12-19 16:27:51 +02:00
Bill Spitzak
f980a60038 doc: Each class in doxygen output is a section
All the methods belonging to the class are listed with it, making
it much easier to find them.

I dumped all other functions into a section called "Functions" at
the end.

Tested-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2014-12-19 16:21:36 +02:00
Bill Spitzak
4abe5edf46 doc: removed the word "interface" from the link names
Just to make it slightly shorter.

Also add a dash to the doxygen links to make them look a bit more alike.

Tested-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2014-12-19 16:15:29 +02:00
Bill Spitzak
dfc64f9ffe doc: Reduce the validation errors of the docbook input
(this is different from previous version as it removes some
broken and irrelevant changes to the protocol appendix).

This removes all the validation errors except for missing link
targets. You can test this by removing the --skip-validation
from doc/publican/Makefile.am.

Main changes are to avoid nesting <para> commands. I also used
<simpara> in some places to reduce the amount of blank space.
And the reference id's are prefixed with the chapter name to
avoid collisions between libclient and libserver.

PS: it would be useful if somebody who actually knows something
about xslt would come up with a way to translate a block of text
makde of <para> commands unchanged, but add <para> around plain
text. Most of the difficulty is that doxygen's output is rather
inconsistent here.

Tested-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2014-12-19 16:10:36 +02:00
Bill Spitzak
75ec915da8 fixup doc: Make it easier to add a new doxygen page
This supersedes the previous one and fixes a typo where a slash was missing.

Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2014-12-18 15:23:03 +02:00
Bill Spitzak
6e3ad249ad doc: Make it easier to add a new doxygen page
The repetitive parts of generating the server and client documentation are
merged, so it is easier to add another doxygen chapter: add a new line to
$publican_sources in publican/Makefile.am, and a list of C source files to
doxygen/Makefile.am.

Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
2014-12-18 15:13:39 +02:00
Bill Spitzak
3f05c4ac4a doc: fix for parallel make
Move the *_8h.xml files to a per-chapter temporary file so two
chapters can be converted from doxygen at the same time. Tested
with make -j 9.

Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
2014-12-18 15:07:22 +02:00
Bill Spitzak
c985a17988 doc: Split libwayland-client and -server into different pages
This was suggested before to make it clearer that things like wl_display
are different objects in each of them. I made these into two appendixes
because the protocol spec was already an appendix.

Reviewed-by: Bryce Harrington <b.harrington@samsung.com>
[Bryce requested minor changes, not yet here.]

Acked-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2014-12-16 17:07:25 +02:00
Bill Spitzak
0b788154da doc: fix doxygen->man command line
It was telling it to scan the doxyfile as well as the C source, and
listing some source files more than once.

Reviewed-by: Bryce Harrington <b.harrington@samsung.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2014-12-16 17:05:23 +02:00
Jon A. Cruz
163ce87cd7 doc: Minor makefile cleanup.
Split out directory creation to leverage order only prerequisites.

Signed-off-by: Jon A. Cruz <jonc@osg.samsung.com>
Acked-by: Peter Hutterer <peter.hutterer@who-t.net>
Acked-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2014-12-16 16:52:12 +02:00
Jon A. Cruz
dec30252b0 doc: General makefile cleanup.
This is a general cleanup of the makefile in order to bring it more inline
with standard make practices. Cleanups included more use of automatic
variables, switching AM_V_GEN to AM_V_at to have one 'GEN' visible per file,
splitting copy operations to proper rules, and using order only dependencies
to properly create directories on-demand.

Changes also correct missing use of $(builddir) that has gone unnoticed as
it defaults to the current directory ('.').

Signed-off-by: Jon A. Cruz <jonc@osg.samsung.com>
Acked-by: Peter Hutterer <peter.hutterer@who-t.net>
Acked-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2014-12-16 16:48:32 +02:00
Marek Chalupa
434fd45e4b client: update documentation about threading
Remove out-dated documentation and add few more words
about this topic.

v2. replace a paragraph by better explanation from Pekka Paalanen
    fix other notes from reviewing

v3. fix typo

v4. fix flags for poll in an example

    add wl_display_cancel_read() to another example
    (so that user sees that it should be used)

    move proper use of wl_display_prepare_read
    before the explanation why it is wrong to use
    wl_display_displach

Signed-off-by: Marek Chalupa <mchqwerty@gmail.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
2014-12-09 18:05:04 +02:00
Marek Chalupa
77939736fb client: update obsolete comments
1) there is nothing like main thread since
   3c7e8bfbb4 anymore, so remove
   it from documentation and update the doc accordingly.

2) use calling 'default queue' instead of 'main queue'. In the code
   we use display->default_queue, so it'll be easier the understand.

3) update some obsolete or unprecise pieces of documentation

v2. Not only remove out-of-date comment, but fix/remove more
    things across the wayland-client.[ch]

v3. fixes (rephrasing unclear paragraphs etc.)
    according to Pakka Paalanen notes (thanks)

Signed-off-by: Marek Chalupa <mchqwerty@gmail.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
2014-12-09 18:03:35 +02:00
Jon A. Cruz
480b437cd8 doc: Add config check for doxygen 1.6.0+.
Add a config time check for a new enough (1.6.0+) version of doxygen.

v2. require 1.6.0+ instead of 1.8.0+

Signed-off-by: Jon A. Cruz <jonc@osg.samsung.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2014-12-08 10:07:35 +02:00
Bill Spitzak
9ca542db4e doc: Remove duplicated descriptions of wayland objects
This text is a duplicate of the text in the protocol documentation, but
the converter mangled it by removing the paragraph breaks and some other
errors. Instead replace it with a list of links to the protocol docs.

Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-12-05 16:58:28 +02:00
Bill Spitzak
0093164f85 doc: removed redundant dependency
The .tmp file dependency depends on the index.xml file so it does not need to
be repeated.

Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-12-05 16:56:39 +02:00
Jon A. Cruz
962de0d0cc doc: Invoke doxygen via the defined make variable.
Invoke doxygen via the autoconf-defined make variable instead of directly.
This brings it in line with standard makefile practices.

Signed-off-by: Jon A. Cruz <jonc@osg.samsung.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-12-05 16:16:05 +02:00
Jon A. Cruz
8cda738a68 doc: Removed redundant xslt output elements.
Removed <xsl:output> elements that were duplicated but with attributes in
a different order. Standard tools are required to ignore the order of
attributes in an element.

Signed-off-by: Jon A. Cruz <jonc@osg.samsung.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-12-01 15:21:25 +02:00
Marek Chalupa
e118c11178 tests: fix memory leak
We didn't free the struct client that we got from client_connect()

Signed-off-by: Marek Chalupa <mchqwerty@gmail.com>
Acked-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2014-12-01 12:34:23 +02:00
Marek Chalupa
fdb519be08 tests: split queue-test testcases
All the test-cases are in one test atm. It doesn't matter for the
outcome, but when it is split to more tests, the debugging and reading
the output is simpler.

Signed-off-by: Marek Chalupa <mchqwerty@gmail.com>
Acked-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2014-12-01 12:04:18 +02:00
Marek Chalupa
c3653f7f61 tests: detect if debugger is attached
Copy function from libinput/test/litest.c is_debugger_detached()
and use it in our test-runner. If debugger is attached, turn off
leak checks and timeouts automatically.

Revision of libinput: 028513a0a723e97941c39c4aeb17433198723913

v2. rebased to master

Signed-off-by: Marek Chalupa <mchqwerty@gmail.com>
Acked-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2014-12-01 11:49:45 +02:00
Marek Chalupa
0e1cc7aba7 tests: use color when printing on terminal
Colorize output of the tests when prinitng on terminal.

Signed-off-by: Marek Chalupa <mchqwerty@gmail.com>
Tested-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2014-11-28 15:50:51 +02:00
Marek Chalupa
57050589b6 test-runner: print separator line after each test-case
Who can read the output when it is a single piece of text?

Signed-off-by: Marek Chalupa <mchqwerty@gmail.com>
2014-11-28 14:04:13 +02:00
Marek Chalupa
bef2948348 tests: rename env vars for tests
Rename WAYLAND_TESTS_NO_TIMEOUTS to WAYLAND_TEST_NO_TIMEOUTS.
Further rename NO_ASSERT_LEAK_CHECK to WAYLAND_TEST_NO_LEAK_CHECK.
Now the naming is consistent not only here, in Wayland, but even with
naming of weston env varibles related to testing.

This is version 2 of the patch. The first version just renamed
NO_ASSERT_LEAK_CHECK to WAYLAND_TEST_NO_LEAK_CHECK.

Signed-off-by: Marek Chalupa <mchqwerty@gmail.com>
Acked-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Acked-by: Bryce Harrington <b.harrington@samsung.com>
2014-11-28 13:27:34 +02:00
Seedo Eldho Paul
93e352d058 scanner.c: Use WL_PRINTF instead of __attribute__((format(printf)))
Signed-off-by: Seedo Eldho Paul <seedoeldhopaul@gmail.com>
2014-11-28 12:37:20 +02:00
Derek Foreman
e36d0233ee doc: fixed grammar and a typo
Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
2014-11-27 16:00:16 +02:00
Bill Spitzak
266b7f06be doc: Removed extra indentation from wl_list code sample
This is a minor documentation fix. I did not see any asterisks in the
output as reported by Pekka Paalanen. Using doxygen 1.7.6.1.

Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2014-11-26 13:34:26 +02:00
Bill Spitzak
dfdb087826 doc: Removed \ref when it refers to the subject the text is attached to
This does not make a difference to doxygen output but may help other
document generators not make redundant links.

Reviewed-by: Bryce Harrington <b.harrington@samsung.com>
2014-11-25 16:38:59 +02:00
Bill Spitzak
f73f76775f doc: fixed a typo
Reviewed-by: Bryce Harrington <b.harrington@samsung.com>
2014-11-25 16:38:11 +02:00
Bill Spitzak
5e79171cf1 v4 doc: fixed reference to non-existent function
(Fixed to remove accidental commit of another change)

After some feedback from Marek Chalupa I decided to just remove this. There
were suggestions about warning about multiple threads but it appears this
would be true for many of these functions and thus it would be misleading to
mention multiple threads only here (as it would imply that multiple threads
work for other functions which is not true, I think).

Acked-by: Marek Chalupa <mchqwerty@gmail.com>
2014-11-25 16:36:57 +02:00
Bill Spitzak
40aa80a408 doc: Added \code tags around sample code in doxygen comments
Also removed \comment and used C++ comments. There does not appear
to be any other way to put comments into code samples.

Reviewed-by: Bryce Harrington <b.harrington@samsung.com>
2014-11-25 16:27:57 +02:00
Bill Spitzak
dd534a1fde doc: removed some unnecessary nested listing from doxygen output
This makes the lists of parameters slightly smaller and removes some
bullets from see-also and since.
2014-11-25 16:25:22 +02:00
Bill Spitzak
f2974c1115 doc: Don't print dash if doxygen brief description missing 2014-11-25 16:21:39 +02:00
Bill Spitzak
ba8ea938d2 doc: preserve links produced by Doxygen
These links are pretty useful for navigation, though sometimes excessive
(you can turn them off by putting % before the word in the comment).

I had to turn off validation because it failed on missing and duplicate
target id's, which this produces.
2014-11-25 16:14:51 +02:00
Bill Spitzak
c532b571e3 doc: Preserve spaces
Slight variation on Pekka's patch. It seems harmless to put this anywhere.
2014-11-25 16:04:42 +02:00
Bill Spitzak
d8f045ec1f doc: make rebuilds doxygen output on code changes
Reviewed-by: Bryce Harrington <b.harrington@samsung.com>
2014-11-25 15:45:03 +02:00
Imran Zaman
11560a8d15 server: increase listen queue to 128
This will allow more than 1 simultaneous client connections to the server
without the possibility of connection refused error.

Signed-off-by: Imran Zaman <imran.zaman@gmail.com>

http://utcc.utoronto.ca/~cks/space/blog/unix/ListenBacklogMeaning
http://stackoverflow.com/questions/19221105/connect-with-unix-domain-socket-and-full-backlog
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2014-11-24 16:32:35 +02:00
Marek Chalupa
59f255d66e client: read_events should return -1 after an error
When a thread is sleeping, waiting until another thread read
from the display, it always returns 0. Even when an error
occured. In documentation stands:

  "return 0 on success or -1 on error.  In case of error errno will
   be set accordingly"

So this is a fix for this.

Along with the read_events, fix a test so that it now complies
with this behaviour (and we have this tested)

Signed-off-by: Marek Chalupa <mchqwerty@gmail.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2014-11-21 13:59:42 +02:00
Olivier Blin
059220549c gitignore: adpat to scanner and protocol path changes
Since commit 4c163b9b00, wayland-scanner
is built in top builddir instead of src, and protocol files are
generated in protocol subdir instead of src.
Protocol files generated in the new path are already properly ignored
in the toplevel gitignore file.

Signed-off-by: Olivier Blin <olivier.blin@softathome.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2014-11-19 16:35:49 +02:00
Marek Chalupa
4d617b83a7 tests: don't print '\0' character
print "" (which results in no output) instead of
printing '\0' (which is not visible, but is there)

Signed-off-by: Marek Chalupa <mchqwerty@gmail.com>
2014-11-19 13:51:44 +02:00