Commit graph

1427 commits

Author SHA1 Message Date
José Bollo
84247b7513 protocol: Fix typo in documentation 2013-10-11 10:04:43 -07:00
Kristian Høgsberg
2c3dbb8903 configure.ac: Bump version to 1.3 2013-10-09 16:20:54 -07:00
Kristian Høgsberg
bb6f6faaa2 scanner: Handle unrecognized invocation mode
Print usage if we don't recognize the invocation mode.  Also fixes
uninitialized variable warning.
2013-10-07 21:36:31 -07:00
Kristian Høgsberg
260d73b449 configure.ac: Bump version to 1.2.92 2013-10-02 22:14:57 -07:00
Neil Roberts
799ea7206b client: Fix handling display->reader_count if poll fails
In wl_display_dispatch_queue, if poll fails then it would previously
return immediately and leak a reference in display->reader_count. Then
if the application ignores the error and tries to read again it will
block forever. This can happen for example if the poll fails with
EINTR which the application might consider to be a recoverable error.
This patch makes it cancel the read so the reader_count will be
decremented when poll fails.
2013-09-25 10:11:20 -07:00
Kristian Høgsberg
4125367f20 configure.ac: Bump version to 1.2.91 2013-09-22 14:12:26 -07:00
Jason Ekstrand
ba90497b87 Export the Wayland protocol XML file
Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
2013-09-21 21:48:56 -07:00
Marek Ch
b99edb8b7e tests: add wl_resource tests 2013-09-21 11:38:32 -07:00
Marek Ch
6f1569bd38 tests: add unit tests for wl_signal
Test wl_signal initialization, adding and getting listeners and emitting
2013-09-21 11:37:38 -07:00
Marek Ch
ec08c5c3e9 tests: extended message when leak in test is detected
When memory or fd leak is detected, print how many blocks of memory were
allocated and not freed, respectively how many files were opened/unclosed.
2013-09-21 11:36:33 -07:00
Chang Liu
5cf31443c5 client: fix an inconsistency in documentation
The errno is set to EAGAIN when there are undispatched events, according
to L1066 of wayland-client.c.
2013-09-21 11:34:57 -07:00
Aaron Faanes
5a92553237 doc: Slight tweaks to wl_listener
Prefer \comment over // in code blocks for consistency's sake and keep
variable definitions separated by a line from the rest of the body.
2013-09-21 11:31:50 -07:00
Aaron Faanes
8267f283dc utils: Document wl_container_of 2013-09-21 11:31:41 -07:00
Aaron Faanes
217909c18d doc: Create \comment alias for C-style comments
Since /* */ do not nest, documentation is forced to either use C++ style
// comments or some other foreign notation. This commit provides an alias
that allows C-style comments to be introduced in code blocks that support
aliases.

It should be noted that this macro will not work within \code blocks, as
Doxygen commands are ignored there. Instead, Doxygen's fenced code
blocks (created via ~~~) must be used for proper output. To demonstrate:

~~~
struct example_node {
        int id;
        \comment{Other members ...}
};
~~~

will roughly yield the following HTML (excluding syntax highlighting):

<pre>
struct example_node {
        int id;
        /* Other members ... */
};
</pre>
2013-09-21 11:29:08 -07:00
Aaron Faanes
2e3af5e5d7 doc: Include wayland-util.* for doxygen output
This commit creates a shared file list that is included by both the
client and the server for the XML Makefile targets, as classes within
util are used by both the client and the server.
2013-09-16 22:00:00 -07:00
Aaron Faanes
5197aa30c8 wayland-server: Improve wording for wl_signal_get's doc
The old description was a bit vague; this commit hopefully improves
describing what is returned.
2013-09-16 21:59:28 -07:00
Aaron Faanes
fffcdb25de utils: Add doxygen for wayland-util.h
This is needed for doxygen to generate output for macro definitions, such
as wl_container_of, that are contained by this file. Classes like
wl_list would be documented regardless.
2013-09-16 21:59:12 -07:00
Aaron Faanes
bc30c5eb8a utils: Reference some useful methods in wl_signal's doxygen
This commit adds a bit more detail on the lifecycle of a signal.
2013-09-16 21:59:00 -07:00
Aaron Faanes
f8b2730039 wayland-server: Document wl_listener
This patch takes Kristian's comments into account, adding a demonstration and
giving a more thorough idea of how wl_listener is used.
2013-09-16 21:47:52 -07:00
Chang Liu
9a5ed7877d gitignore: add ./compile
./compile is a GNU autotools helper script and should be ignored by git
2013-09-11 12:15:11 -07:00
Rob Bradford
656f3ea5b3 wayland-server: Add a wl_resource_for_each_safe macro
A version of wl_resource_for_each that is safe for iteration when items
in the list are removed.
2013-09-11 12:03:22 -07:00
Aaron Faanes
a27b730490 utils: tweak wl_list for better doxygen output 2013-09-11 10:53:39 -07:00
Aaron Faanes
660f2d7acc wayland-server: Document wl_signal 2013-09-11 10:52:41 -07:00
Aaron Faanes
cdea669858 wayland-server: Fix a uninitialized warning from clang
This warning is unnecessary, since the pointer in question is only used
for pointer arithmetic, but setting it explicitly to NULL doesn't hurt.
2013-09-11 10:42:37 -07:00
Kristian Høgsberg
10dcf86f7d configure.ac: Bump version to 1.2.90 for master branch 2013-08-30 15:53:55 -07:00
Kristian Høgsberg
b76a6968fc scanner: Emit wl_*_destroy stub even if interface has a destructor
If an interface has a destructor but no 'destroy' method we used to
not emit a destroy method.  Now with the fix for missing destroy
requests for wl_pointer etc we need to emit the local wl_*_destroy
always.
2013-08-30 15:53:55 -07:00
Kristian Høgsberg
ea1fb51aae protocol: Add release requests for wl_pointer, wl_keyboard, and wl_touch
We missed destroy requests in the 1.0 protocol and since the scanner
generates local-only *_destroy requests in that case we can't add
destroy requests without breaking protocol.  A client needs to verify
that the server provides a version 3 seat to use the protocol destructor
so the name needs to be something else than wl_*_destroy.

v2 (Rob Bradford): Rebased, bumped the protocol versions and added since
attributes to the requests.
2013-08-30 15:46:41 -07:00
Jason Ekstrand
eb947e9408 Add support for client-side language bindings
This commit adds support for language bindings on the client half of the
library.  The idea is the same as for server-side dispatchers.

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
2013-08-19 16:23:08 -07:00
Jason Ekstrand
c44090908d Add support for server-side language bindings
This commit adds support for server-side languages bindings.  This is done
in two ways:

1. Adding a wl_resource_set_dispatcher function that corresponds to
wl_resource_set_interface.  The only difference between the two functions
is that the new version takes a dispatcher along with the implementation,
data, and destructor.  This allows for runtime calling of native language
functions for callbacks instead of having to generate function pointers.

2. Adding versions of wl_resource_post_event and wl_resource_queue_event
that take an array of wl_argument instead of a variable argument list.
This allows for easier run-time argument conversion and removes the need
for libffi-based calling of variadic functions.

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
2013-08-19 16:23:08 -07:00
Jason Ekstrand
6b8eef962f doc: Add a section on interface and protocol object versioning
There have been a lot of questions asked lately about versioning of
interfaces and protocol objects.  This addition to the documentation should
clear up some of those questions.

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
2013-08-19 16:23:08 -07:00
Jason Ekstrand
52de023482 doc: Update the ID alocation section
The method described of alocation IDs has been wrong at least since version
1.0.  This commit updates it to correspond to the way IDs are chosen in
versions >= 1.0.

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
2013-08-19 16:23:02 -07:00
Peter Hutterer
2cc551b1ec publican: only split chapters and top-level sections onto separate pages
When generating HTML, don't split once we're into subjections. This
generates a single page for each protocol interface instead of the previous
separate pages for requests, events and enums.
No effect on the rest of the HTML configuration.
2013-08-15 14:42:44 -07:00
Bryce W. Harrington
f169614738 protocol: Improve a bit of grammar for wl_surface::attach description
Signed-off-by: Bryce Harrington <b.harrington@samsung.com>
2013-08-12 21:25:48 -07:00
Rob Bradford
4ad58fbb4a wayland-client: Add wl_proxy_get_listener
This is the mirror function to wl_proxy_add_listener and is useful
inside client libraries to differentiate events on listeners for which
multiple proxies have been created.
2013-08-12 16:26:36 -07:00
Rob Bradford
748c20c46f wayland-server: Add a wl_resource_for_each macro
This macro allows you to correctly iterate through a list of resources
handling the opaque nature of this type.
2013-08-12 16:26:36 -07:00
Bryce W. Harrington
dbc41f0344 protocol: Fix pluralization of user in popup_done description
Signed-off-by: Bryce Harrington <b.harrington@samsung.com>
2013-08-08 21:42:38 -07:00
Bryce W. Harrington
b5e7f9caef protocol: Improve grammar for set class description
Signed-off-by: Bryce Harrington <b.harrington@samsung.com>
2013-08-08 21:42:26 -07:00
Bryce W. Harrington
3d6470b1ef protocol: Add missing d to 'x an y'
Signed-off-by: Bryce Harrington <b.harrington@samsung.com>
2013-08-08 21:41:57 -07:00
Bryce W. Harrington
fecef1ca66 protocol: Fix typo by removing a redundant 'a'
Signed-off-by: Bryce Harrington <b.harrington@samsung.com>
2013-08-08 21:41:44 -07:00
Bryce W. Harrington
65efa2ed3a client: Improve spelling and grammar in comments
Signed-off-by: Bryce Harrington <b.harrington@samsung.com>
2013-08-08 21:41:33 -07:00
Bryce W. Harrington
eda474c779 publican: Fix grammar several places in Protocol docs
Signed-off-by: Bryce Harrington <b.harrington@samsung.com>
2013-08-08 21:39:25 -07:00
Bryce W. Harrington
9fc867060f publican: Drop unneeded 'of'
Signed-off-by: Bryce Harrington <b.harrington@samsung.com>
2013-08-08 21:38:28 -07:00
Bryce W. Harrington
c7d2c0b423 publican: Cleanup Preface's grammar.
Signed-off-by: Bryce Harrington <b.harrington@samsung.com>
2013-08-08 21:38:14 -07:00
Tomeu Vizoso
f26a322327 server: Release additional_shm_formats array at display destruction 2013-08-08 13:51:13 -07:00
Peter Hutterer
6dd0ba0e32 scanner: check for wayland-scanner.pc before using variables
If wayland-scanner.pc can't be found the variables end up being set
irrespectively, leaving the user with odd compiler errors about missing
headers, etc.
2013-08-07 16:25:10 -07:00
Peter Hutterer
2b26edb877 scanner: expand help string
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-08-07 16:24:55 -07:00
Peter Hutterer
2d1ed470d9 scanner: support help and --help
wayland-scanner without arguments prints out usage. With help or --help it
waits for stdin to supply something which isn't quite as informative as
printing out the help.

This patch also moves the strcmp for args up to have all of them in one
location.
2013-08-07 16:24:44 -07:00
Kristian Høgsberg
81555350af Don't include wayland-server.h in wayland-private.h
We just declare struct wl_display manually instead.
2013-08-07 09:17:24 -07:00
Tomeu Vizoso
d9883a6be1 shm: Add API for renderers to register additional pixel formats 2013-08-06 16:48:02 -07:00
Kristian Høgsberg
dbeb5134fa server: Set client->error when we fail to send a closure
We we're using wl_event_loop_add_idle() here, but if we're failing
because of OOM, that will typically also fail.  Instead, use the
existing client->error flag, which will break out of the event
handling loop and shut down the client.
2013-08-06 10:16:46 -07:00