platform/upstream/wayland.git
7 years agotests: sync example.xml with wayland.xml
Peter Hutterer [Mon, 23 Jan 2017 23:56:36 +0000 (09:56 +1000)]
tests: sync example.xml with wayland.xml

These are the protocol.xml changes from:
66a26aeb2a: protocol: Remove inconsistent line breaks
a26ed0949e: protocol: indentation fixes
6a18a87727: protocol: Extend wl_touch with touchpoint shape and orientation

and a few other, smaller ones.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Yong Bakos <ybakos@humanoriented.com>
Tested-by: Yong Bakos <ybakos@humanoriented.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
7 years agoutil: Document wl_array and wl_list members
Yong Bakos [Tue, 6 Dec 2016 15:21:56 +0000 (07:21 -0800)]
util: Document wl_array and wl_list members

Despite their clear names, wl_array and wl_list members are undocumented,
resulting in doxygen warnings[1] when building documentation.

Document these members, suppressing the warnings.

[1] Warnings are visible when EXTRACT_ALL = NO.

Signed-off-by: Yong Bakos <ybakos@humanoriented.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
7 years agodoc: Remove wayland-util.c from file list
Yong Bakos [Fri, 25 Nov 2016 18:48:36 +0000 (10:48 -0800)]
doc: Remove wayland-util.c from file list

Documentation generation via doxygen includes wayland-util.c in its file
list. Although functions are documented in wayland-util.h, doxygen is
not automatically using the same documentation for functions in
wayland-util.c. In addition, everything listed in the doxygen page for
wayland-util.c is documented in the page for wayland-util.h and the
pages for corresponding structures. As such, the doxygen page for
wayland-util.c has no value, and is redundant.

Remove the doxygen page for wayland-util.c.

Signed-off-by: Yong Bakos <ybakos@humanoriented.com>
Acked-by: Peter Hutterer <peter.hutterer@who-t.net>
7 years agodoc: Remove display of WL_PRINTF attribute
Yong Bakos [Tue, 22 Nov 2016 16:13:43 +0000 (08:13 -0800)]
doc: Remove display of WL_PRINTF attribute

Doxygen truncates a WL_PRINTF function attribute, and there does not
seem to be any workaround[1]. When using the attribute like this:

typedef void (*wl_log_func_t)(const char *, va_list) WL_PRINTF(1, 0);

Doxygen generates something that looks like this:

typedef void (*wl_log_func_t)(const char *, va_list) WL_PRINTF(1,

Configure doxygen to consider WL_PRINTF(x,y) as predefined, so it does
not display the attribute at all in the generated documentation.

[1] https://bugzilla.gnome.org/show_bug.cgi?id=774741

Signed-off-by: Yong Bakos <ybakos@humanoriented.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
7 years agotests: add scanner tests
Pekka Paalanen [Fri, 30 Sep 2016 12:12:47 +0000 (15:12 +0300)]
tests: add scanner tests

Add tests that ensure that wayland-scanner output for a given input does
not change unexpectedly. This makes it very easy to review
wayland-scanner patches.

Before, when patches were proposed for wayland-scanner, I had to
build wayland without the patches, save the generated files into a
temporary directory, apply the patches, build again, and diff the old
vs. new generated file.

No more. Now whenever someone makes intentional changes to
wayland-scanner's output, he will also have to patch the example output
files to match. That means that reviewers see the diff of the generated
files straight from the patch itself. Verifying the diff is true is as
easy as 'make check'.

The tests use separate example XML files instead of wayland.xml
directly, so that wayland.xml can be updated without fixing scanner
tests, avoiding the churn.

example.xml starts as a copy of wayland.xml. If wayland.xml starts using
new wayland-scanner features, they should be copied into example.xml
again to be covered by the tests.

This patch relies on the previous patch to actually add all the data
files for input and reference output.

The scanner output is fed through sed to remove parts that are allowed
to vary: the scanner version string.

v2: no need for scanner-test.sh to depend on the test data

Task: https://phabricator.freedesktop.org/T3313
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Emilio Pozuelo Monfort <emilio.pozuelo@collabora.co.uk> (v1)
Reviewed-by: Yong Bakos <ybakos@humanoriented.com>
Tested-by: Yong Bakos <ybakos@humanoriented.com>
7 years agotests: add data files for future wayland-scanner test
Pekka Paalanen [Tue, 4 Oct 2016 14:26:40 +0000 (17:26 +0300)]
tests: add data files for future wayland-scanner test

This patch adds the input and reference output data files for the
wayland-scanner tests to be added by the following patch.

The data files are split into their own patch because they are extremely
uninteresting to review:
- example.xml is just a copy wayland.xml from 1.12.0
- small.xml is a tiny dummy definition used for testing scanner
  variations without causing lots of big output files
- the other files are wayland-scanner products from the xml files

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Emilio Pozuelo Monfort <emilio.pozuelo@collabora.co.uk>
v2: update output due to 2c6350beb92816eb9213c4944d197485e788ef6d
Acked-by: Yong Bakos <ybakos@humanoriented.com>
7 years agoutil: Clarify documentation of wl_dispatcher_func_t
Yong Bakos [Mon, 21 Nov 2016 13:44:44 +0000 (05:44 -0800)]
util: Clarify documentation of wl_dispatcher_func_t

Adjust the brief, clarify the behavior and arguments, correct a grammar
error, document the parameters, and document the return type.

Signed-off-by: Yong Bakos <ybakos@humanoriented.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
7 years agoprotocol: indentation fixes
Peter Hutterer [Mon, 21 Nov 2016 11:43:22 +0000 (11:43 +0000)]
protocol: indentation fixes

8 spaces changed to one tab

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Acked-by: Bryce Harrington <bryce@osg.samsung.com>
7 years agowayland-client: Require base 10 for WAYLAND_SOCKET, explicitly
Bryce Harrington [Fri, 8 Jul 2016 23:42:30 +0000 (16:42 -0700)]
wayland-client: Require base 10 for WAYLAND_SOCKET, explicitly

The third arg to strtol() specifies the base to assume for the number.
When 0 is passed, as is currently done in wayland-client.c, hexadecimal
and octal numbers are permitted and automatically detected and
converted.

I can find no indication that we would ever expect use of hexadecimal or
octal for socket fd's.  So be explicit about what base we're assuming
here and avoid any potential surprises.

Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
Reviewed-by: Yong Bakos <ybakos@humanoriented.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
7 years agoutil: Document wl_log_func_t
Yong Bakos [Sun, 20 Nov 2016 16:59:15 +0000 (08:59 -0800)]
util: Document wl_log_func_t

Add a doxygen comment for wl_log_func_t.

Signed-off-by: Yong Bakos <ybakos@humanoriented.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
7 years agobuildsystem: adjust uninstalled -client/server pkg-config infra
Reynaldo H. Verdejo Pinochet [Fri, 26 Aug 2016 21:04:02 +0000 (16:04 -0500)]
buildsystem: adjust uninstalled -client/server pkg-config infra

Add missing protocol dir to uninstalled include path.

Signed-off-by: Reynaldo H. Verdejo Pinochet <reynaldo@osg.samsung.com>
Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Acked-by: Bryce Harrington <bryce@osg.samsung.com>
Signed-off-by: Daniel Stone <daniels@collabora.com>
7 years agobuild: Fix scanner path in uninstalled pkg-config file
Derek Foreman [Fri, 26 Aug 2016 21:04:03 +0000 (16:04 -0500)]
build: Fix scanner path in uninstalled pkg-config file

this was generating a pkg-config file that said wayland-scanner was
wayland/src/wayland-scanner when it's actually wayland/wayland-scanner

Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Acked-by: Bryce Harrington <bryce@osg.samsung.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
7 years agoutil: Improve documentation of wl_iterator_result
Yong Bakos [Sun, 20 Nov 2016 17:26:08 +0000 (09:26 -0800)]
util: Improve documentation of wl_iterator_result

Use declarative voice, remove the unnecessary doxygen \enum tag, and add
two see-also's. This keeps the output the same but makes the comment
voice consistent, a little more readable, and refers to documented
functions that use this enum type.

Signed-off-by: Yong Bakos <ybakos@humanoriented.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
7 years agoprotocol: spell out that we're using linux/input-event-codes.h button codes
Peter Hutterer [Fri, 18 Nov 2016 02:35:27 +0000 (12:35 +1000)]
protocol: spell out that we're using linux/input-event-codes.h button codes

Because we already rely on it in the callers anyway. This is a retrofit, which
is not ideal but I'm not sure any compositor out there uses anything else.
Might as well define it.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
7 years agocursor: Remove "weston" from anonymous shm filenames
Derek Foreman [Wed, 27 Jul 2016 16:06:24 +0000 (11:06 -0500)]
cursor: Remove "weston" from anonymous shm filenames

This mildly confused me during some debugging, so I guess it wouldn't
hurt to make the filename more indicative of where it was actually
created.

Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Yong Bakos <ybakos@humanoriented.com>
Reviewed-by: Giulio Camuffo <giuliocamuffo@gmail.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
7 years agoutil: Improve documentation of wl_argument
Yong Bakos [Sat, 12 Nov 2016 18:11:21 +0000 (10:11 -0800)]
util: Improve documentation of wl_argument

Standardize the doxygen comment format, add clarity to the writing, decouple
the description from specifics of usage, add see-also's, and massage the union
member type comments.

Signed-off-by: Yong Bakos <ybakos@humanoriented.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
7 years agotests: Add nullable check to wl_message_count_arrays
Yong Bakos [Fri, 11 Nov 2016 15:08:09 +0000 (07:08 -0800)]
tests: Add nullable check to wl_message_count_arrays

Array argument symbols in a wl_message may be nullable, but the test for
wl_message_count_arrays did not test this. Add one more wl_message with
nullable array arguments.

Signed-off-by: Yong Bakos <ybakos@humanoriented.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
7 years agotests: Test wl_interface_equal
Yong Bakos [Tue, 8 Nov 2016 15:56:30 +0000 (07:56 -0800)]
tests: Test wl_interface_equal

The test suite did not cover wl_interface_equal, so add one test that
specifically tests this method. Add the new test to Makefile.am.

Signed-off-by: Yong Bakos <ybakos@humanoriented.com>
[Pekka: add assert(&wl_registry_interface != &copy);]
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
7 years agoutil: Document wl_interface
Yong Bakos [Mon, 7 Nov 2016 02:25:37 +0000 (18:25 -0800)]
util: Document wl_interface

Add doxygen comments for wl_interface.

Signed-off-by: Yong Bakos <ybakos@humanoriented.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
7 years agoMakefile: build also test programs during a normal build
Pekka Paalanen [Wed, 16 Nov 2016 11:42:21 +0000 (13:42 +0200)]
Makefile: build also test programs during a normal build

Put also test programs into noinst_PROGRAMS so that they get always
built. In check_PROGRAMS they are built for 'make check' but not for
'make'.

This makes it harder to accidentally break the test programs.

v2: also change check_LTLIBRARIES to noinst_LTLIBRARIES

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Daniel Stone <daniels@collabora.com>
7 years agodoc: Fix a typo in the client documentation
Moritz Kiefer [Sun, 6 Nov 2016 17:35:19 +0000 (18:35 +0100)]
doc: Fix a typo in the client documentation

Signed-off-by: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>
Reviewed-by: Yong Bakos <ybakos@humanoriented.com>
7 years agoprotocol: Extend wl_touch with touchpoint shape and orientation
Dennis Kempin [Fri, 11 Nov 2016 19:40:55 +0000 (11:40 -0800)]
protocol: Extend wl_touch with touchpoint shape and orientation

This CL updates the wl_touch interface with a shape and
orientation event.
The shape/orientation of a touch point is not relevant for most UI
applications, but allows a better experience in some cases
such as drawing apps.

The events are used by the compositor to inform the client
about changes in the shape and orientation of a touchpoint, which is
approximated by an ellipse and it's angle to the y-axis.

The event is optional and only sent when compositor and the
touch device support this type of information. The client is
responsible for making a reasonable assumption about the
touch shape if no shape is reported.

Signed-off-by: Dennis Kempin <denniskempin@google.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Yong Bakos <ybakos@humanoriented.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
7 years agoutil: Document wl_fixed_t
Yong Bakos [Fri, 11 Nov 2016 15:55:38 +0000 (07:55 -0800)]
util: Document wl_fixed_t

Add doxygen comments for wl_fixed_t and its methods.

Although wl_fixed_t can be thought of as an opaque struct, it is a typedef. As
such, doxygen does not provide an elegant means of documenting it as both a
'class' with members and as a typedef. In other words, documenting it as a class
gives us a nice doxygen page for wl_fixed_t and its related methods, but this
leaves the typedef documentation blank in the documentation for wayland-util,
and does not provide a link to the documentation for wl_fixed_t. Hence, this
patch does not treat wl_fixed_t as a class/struct, resulting in the typedef
being documented and keeping the functions listed in wayland-util, rather than a
separate unlinked page devoted to just wl_fixed_t.

Signed-off-by: Yong Bakos <ybakos@humanoriented.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Daniel Stone <daniels@collabora.com>
7 years agoutil: Remove stray space from function signature
Yong Bakos [Tue, 8 Nov 2016 16:02:12 +0000 (08:02 -0800)]
util: Remove stray space from function signature

wl_fixed_to_double had a stray space before the parameter list.
Remove this space.

Signed-off-by: Yong Bakos <ybakos@humanoriented.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
7 years agoscanner: Fixed doxygen group name for _add_listener
Bill Spitzak [Tue, 17 May 2016 06:18:06 +0000 (23:18 -0700)]
scanner: Fixed doxygen group name for _add_listener

Signed-off-by: Bill Spitzak <spitzak@gmail.com>
Acked-by: Yong Bakos <ybakos@humanoriented.com>
7 years agoMakefile: do not put TESTS into check_PROGRAMS
Pekka Paalanen [Wed, 9 Nov 2016 15:16:51 +0000 (17:16 +0200)]
Makefile: do not put TESTS into check_PROGRAMS

If you assign TESTS into check_PROGRAMS, you cannot add a test that is
not built from source files.

Instead, use a temporary variable built_test_programs to hold the names
that are both programs built from source files and tests to execute.

This change is required by the following patch adding wayland-scanner
test script.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Emilio Pozuelo Monfort <emilio.pozuelo@collabora.co.uk>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
7 years agotests: Test wl_message_count_arrays
Yong Bakos [Thu, 3 Nov 2016 20:42:54 +0000 (13:42 -0700)]
tests: Test wl_message_count_arrays

message-test.c did not cover wl_message_count_arrays, so add one test that
specifically tests this method. Note that this exposes wl_message_count_arrays
in a private header (wayland-private.h), and removes the `static` modifier of
the implementation.

Signed-off-by: Yong Bakos <ybakos@humanoriented.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
7 years agoprotocol: Remove inconsistent line breaks
Yong Bakos [Mon, 31 Oct 2016 13:46:18 +0000 (06:46 -0700)]
protocol: Remove inconsistent line breaks

Enum entries and message arguments are sometimes preceded by a blank line, but
often aren't.

Standardize the format of the protocol specification by removing blank lines
preceding a list of message arguments and enum entries.

Signed-off-by: Yong Bakos <ybakos@humanoriented.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
7 years agoutil: Document wl_message
Yong Bakos [Thu, 27 Oct 2016 15:55:01 +0000 (08:55 -0700)]
util: Document wl_message

Signed-off-by: Yong Bakos <ybakos@humanoriented.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
7 years agoscanner: Remove return doxygen annotation
Yong Bakos [Wed, 7 Sep 2016 13:25:27 +0000 (06:25 -0700)]
scanner: Remove return doxygen annotation

Replace \returns with just Returns, as this is not a doxygen comment block.
(Avoids differing with the existing convention of \return for return values.)

Signed-off-by: Yong Bakos <ybakos@humanoriented.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
7 years agotests: Use unique XDG_RUNTIME_DIR
Daniel Stone [Thu, 10 Nov 2016 11:14:03 +0000 (11:14 +0000)]
tests: Use unique XDG_RUNTIME_DIR

Rather than using a hardcoded 'wayland-tests' directory under
the existing XDG_RUNTIME_DIR to use as the new runtime dir, use mkdtemp
to guarantee uniqueness. This fixes make -jN check, as well as just
happening to run 'make check' twice from the same session.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Reported-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Tested-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
7 years agoprotocol: Use singleton global consistently
Yong Bakos [Sun, 2 Oct 2016 16:09:59 +0000 (09:09 -0700)]
protocol: Use singleton global consistently

The protocol describes wl_shm as a "global singleton" rather than
"singleton global," which is the order used throughout other protocol
object descriptions.

Re-order the terms for consistency.

Signed-off-by: Yong Bakos <ybakos@humanoriented.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
7 years agoprotocol: Describe wl_registry as singleton
Yong Bakos [Fri, 30 Sep 2016 06:59:58 +0000 (23:59 -0700)]
protocol: Describe wl_registry as singleton

Other singleton objects in the protocol are described as such.

Add a singleton adjective to the wl_registry description, making it
similar to other descriptions.

Signed-off-by: Yong Bakos <ybakos@humanoriented.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
7 years agoshm: Make shm_pool_interface static const
Yong Bakos [Fri, 12 Aug 2016 19:04:41 +0000 (12:04 -0700)]
shm: Make shm_pool_interface static const

Add static const modifiers to the shm_pool_interface definition,
making it consistent with the other wl_*_interface definitions and
mundanely safer.

Note that this does not affect the ABI, according to abi-dumper and
abi-compliance-checker[1]; and weston and its shm-backed clients still
run as expected.

[1]: http://lvc.github.io/abi-compliance-checker/

Signed-off-by: Yong Bakos <ybakos@humanoriented.com>
Tested-by: Yong Bakos <ybakos@humanoriented.com>
Acked-by: Bryce Harrington <bryce@osg.samsung.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
7 years agoutil: Document GCC attributes
Yong Bakos [Sat, 17 Sep 2016 22:04:32 +0000 (15:04 -0700)]
util: Document GCC attributes

Add doxygen comment blocks so these annotations are documented in the html
documentation.

Signed-off-by: Yong Bakos <ybakos@humanoriented.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
7 years agoarray-test: Include wayland-util.h and simplify init test
Yong Bakos [Tue, 27 Sep 2016 18:03:50 +0000 (13:03 -0500)]
array-test: Include wayland-util.h and simplify init test

Include wayland-util.h in addition to wayland-private.h, to be more explicit
about where wl_array is defined.

Remove the useless repeated testing of wl_array_init, because if it fails once
out of thousands of iterations we're all doomed anyway.

Signed-off-by: Yong Bakos <ybakos@humanoriented.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
[Pekka: add the memset]
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
7 years agotests: Test wl_array_release
Yong Bakos [Tue, 27 Sep 2016 18:03:49 +0000 (13:03 -0500)]
tests: Test wl_array_release

array-test.c did not cover wl_array_release, so add one test that specifically
tests this method.

Signed-off-by: Yong Bakos <ybakos@humanoriented.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
[Pekka: do not overwrite array.data]
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
7 years agowl_array: Set data to invalid address after free
Yong Bakos [Tue, 27 Sep 2016 18:03:48 +0000 (13:03 -0500)]
wl_array: Set data to invalid address after free

Explicitly set the data member to an invalid memory address during
wl_array_release, such that re-using a freed wl_array without re-initializing
causes a crash. In addition, this pointer assignment makes wl_array_release
testable.

Define a constant for the invalid memory address, and add documentation about
this behavior, starting at libwayland version 1.13.

See https://lists.freedesktop.org/archives/wayland-devel/2016-September/031116.html

Signed-off-by: Yong Bakos <ybakos@humanoriented.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
[Pekka: remove the doc about crashing]
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
7 years agoutil: Document wl_array
Yong Bakos [Tue, 27 Sep 2016 18:03:47 +0000 (13:03 -0500)]
util: Document wl_array

Add doxygen comments for wl_array and its methods.

Signed-off-by: Yong Bakos <ybakos@humanoriented.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
7 years agoutil: Document wl_list methods
Yong Bakos [Fri, 23 Sep 2016 02:59:37 +0000 (21:59 -0500)]
util: Document wl_list methods

Add doxygen comment blocks to all wl_list methods.

Signed-off-by: Yong Bakos <ybakos@humanoriented.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
[Pekka: removed "itself" as suggested by Bryce]
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
7 years agoconfigure.ac: bump version to 1.12.90 for open development
Bryce Harrington [Thu, 22 Sep 2016 17:31:53 +0000 (10:31 -0700)]
configure.ac: bump version to 1.12.90 for open development

Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
7 years agoconfigure.ac: bump to version 1.12.0 for the official release 1.12.0 upstream/1.12.0
Bryce Harrington [Tue, 20 Sep 2016 17:45:10 +0000 (10:45 -0700)]
configure.ac: bump to version 1.12.0 for the official release

7 years agoconfigure.ac: bump to version 1.11.94 for the RC2 release 1.11.94
Bryce Harrington [Tue, 13 Sep 2016 19:13:57 +0000 (12:13 -0700)]
configure.ac: bump to version 1.11.94 for the RC2 release

7 years agoserver: Document display parameter
Yong Bakos [Wed, 17 Aug 2016 23:08:17 +0000 (16:08 -0700)]
server: Document display parameter

Signed-off-by: Yong Bakos <ybakos@humanoriented.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
7 years agoprotocol: Replace '#defines' with 'macros'
Yong Bakos [Wed, 17 Aug 2016 23:03:31 +0000 (16:03 -0700)]
protocol: Replace '#defines' with 'macros'

The use of # within a description causes the documentation generator
to mistake C syntax with a documentation link.

Remove the # from the documentation, suppressing the warning.

Signed-off-by: Yong Bakos <ybakos@humanoriented.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
7 years agoconfigure.ac: bump to version 1.11.93 for the RC1 release 1.11.93
Bryce Harrington [Tue, 6 Sep 2016 21:22:03 +0000 (14:22 -0700)]
configure.ac: bump to version 1.11.93 for the RC1 release

7 years agotests: Add test for wl_list_length
Yong Bakos [Sun, 4 Sep 2016 20:23:05 +0000 (13:23 -0700)]
tests: Add test for wl_list_length

list-test.c did not cover wl_list_length, so add one test that specifically
tests this method.

Signed-off-by: Yong Bakos <ybakos@humanoriented.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
7 years agodoc: Correct docbook title
Yong Bakos [Sun, 4 Sep 2016 17:15:49 +0000 (10:15 -0700)]
doc: Correct docbook title

The docbook title was "The Wayland display server," which is inaccurate.

Change the title to "The Wayland Protocol".

Signed-off-by: Yong Bakos <ybakos@humanoriented.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
7 years agoconfigure.ac: bump to version 1.11.92 for the beta release 1.11.92
Bryce Harrington [Tue, 30 Aug 2016 18:40:23 +0000 (11:40 -0700)]
configure.ac: bump to version 1.11.92 for the beta release

7 years agoconfigure.ac: bump to version 1.11.91 for the alpha release 1.11.91
Bryce Harrington [Tue, 16 Aug 2016 18:25:12 +0000 (11:25 -0700)]
configure.ac: bump to version 1.11.91 for the alpha release

7 years agoprotocol: Specify upper left corner of damage rectangle
Yong Bakos [Thu, 11 Aug 2016 21:33:05 +0000 (14:33 -0700)]
protocol: Specify upper left corner of damage rectangle

Specify x and y args as the upper left corner of the surface / buffer
damage rectangle.

Signed-off-by: Yong Bakos <ybakos@humanoriented.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
7 years agoprotocol: Describe serial as serial number
Yong Bakos [Thu, 11 Aug 2016 21:33:04 +0000 (14:33 -0700)]
protocol: Describe serial as serial number

Change "serial" to "serial number" in arg summaries, for consistency
and clarity.

Signed-off-by: Yong Bakos <ybakos@humanoriented.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
7 years agoprotocol: Remove wl_ prefix from summary descriptions
Yong Bakos [Thu, 11 Aug 2016 21:33:03 +0000 (14:33 -0700)]
protocol: Remove wl_ prefix from summary descriptions

Summary attributes sometime describe objects using their wl-prefixed type,
but more often don't.

Remove the wl_ prefix from summary descriptions, since they tend to describe
concepts.

Signed-off-by: Yong Bakos <ybakos@humanoriented.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
7 years agoprotocol: Correct description indentation
Yong Bakos [Thu, 11 Aug 2016 21:33:02 +0000 (14:33 -0700)]
protocol: Correct description indentation

Signed-off-by: Yong Bakos <ybakos@humanoriented.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
7 years agoprotocol: Add missing line break
Yong Bakos [Thu, 11 Aug 2016 21:33:01 +0000 (14:33 -0700)]
protocol: Add missing line break

Signed-off-by: Yong Bakos <ybakos@humanoriented.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
7 years agoprotocol: Capitalize ID for consistency
Yong Bakos [Thu, 11 Aug 2016 21:33:00 +0000 (14:33 -0700)]
protocol: Capitalize ID for consistency

Signed-off-by: Yong Bakos <ybakos@humanoriented.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
7 years agoprotocol: Hyphenate subsurface
Yong Bakos [Thu, 11 Aug 2016 21:32:59 +0000 (14:32 -0700)]
protocol: Hyphenate subsurface

Signed-off-by: Yong Bakos <ybakos@humanoriented.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
7 years agoprotocol: Add summary attributes to request params and enum entries
Yong Bakos [Thu, 11 Aug 2016 21:32:58 +0000 (14:32 -0700)]
protocol: Add summary attributes to request params and enum entries

Signed-off-by: Yong Bakos <ybakos@humanoriented.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
7 years agoserver: Add doxygen comment for wl_client_for_each
Yong Bakos [Thu, 11 Aug 2016 19:13:37 +0000 (12:13 -0700)]
server: Add doxygen comment for wl_client_for_each

Commit 596024f728b0a1292ee69a80dd72a85167870936 includes a doc comment
with a link to the wl_client_for_each macro, causing an error when generating
documentation.

Add a doc comment to wl_client_for_each, enabling the hyperlink and removing
the error.

Signed-off-by: Yong Bakos <ybakos@humanoriented.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
7 years agoAdd API to install protocol loggers on the server wl_display
Giulio Camuffo [Fri, 12 Aug 2016 07:33:06 +0000 (09:33 +0200)]
Add API to install protocol loggers on the server wl_display

The new wl_display_add_protocol_logger allows to set a function as
a logger, which will get called when a new request is received or an
event is sent.
This is akin to setting WAYLAND_DEBUG=1, but more powerful because it
can be enabled at run time and allows to show the log e.g. in a UI view.
A test is added for the new functionality.

Signed-off-by: Giulio Camuffo <giulio.camuffo@kdab.com>
Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
Reviewed-by: Yong Bakos <ybakos@humanoriented.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
7 years agoAdd API to retrieve and iterate over the resources list of a client
Giulio Camuffo [Thu, 11 Aug 2016 15:23:10 +0000 (17:23 +0200)]
Add API to retrieve and iterate over the resources list of a client

To complement on the new resource created signal, this allows to
iterate over the existing resources of a client.

Signed-off-by: Giulio Camuffo <giulio.camuffo@kdab.com>
Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
[Pekka: added empty lines, init ret in for_each_helper()]
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
7 years agoAdd a resource creation signal
Giulio Camuffo [Thu, 11 Aug 2016 15:23:09 +0000 (17:23 +0200)]
Add a resource creation signal

This change allows to add a resource creation listener to a wl_client,
which will be notified when a new resource is created for that client.
The alternative would be to have a per wl_display listener, but i think
that resources are really client specific objects, so it makes sense
to use the wl_client as the context.

Signed-off-by: Giulio Camuffo <giulio.camuffo@kdab.com>
Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
[Pekka: added wl_list_remove() in TEST(new_resource).]
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
7 years agoAdd API to get the list of connected clients
Giulio Camuffo [Tue, 9 Aug 2016 10:46:53 +0000 (12:46 +0200)]
Add API to get the list of connected clients

This patch chooses the wl_list_for_each-style of iterating over
the clients, instead of using an iterator function, because i think
it is easier to use.

Signed-off-by: Giulio Camuffo <giulio.camuffo@kdab.com>
Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
7 years agoAdd API to retrieve the interface name of a wl_resource
Giulio Camuffo [Tue, 9 Aug 2016 10:46:52 +0000 (12:46 +0200)]
Add API to retrieve the interface name of a wl_resource

Signed-off-by: Giulio Camuffo <giulio.camuffo@kdab.com>
Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Yong Bakos <ybakos@humanoriented.com>
7 years agoserver: add listener API for new clients
Sungjae Park [Tue, 9 Aug 2016 10:46:51 +0000 (12:46 +0200)]
server: add listener API for new clients

Using display object, Emit a signal if a new client is created.

In the server-side, we can get the destroy event of a client,
But there is no way to get the created event of it.
Of course, we can get the client object from the global registry
binding callbacks.
But it can be called several times with same client object.
And even if A client creates display object,
(so there is a connection), The server could not know that.
There could be more use-cases not only for this.

Giulio: a test is added for the new functionality

Signed-off-by: Sung-jae Park <nicesj@nicesj.com>
Signed-off-by: Giulio Camuffo <giulio.camuffo@kdab.com>
Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
7 years agoscanner: Generate all SINCE_VERSION macros for everyone
Quentin Glidic [Tue, 5 Jul 2016 18:41:50 +0000 (20:41 +0200)]
scanner: Generate all SINCE_VERSION macros for everyone

Practical example: a client supporting version 2 of wl_output will wait
for the wl_output.done event before starting wl_output-related
operations. However, if the server only supports version 1, no event
will ever come, and it must fallback to use the wl_output.geometry event
alone.
Without this macro, it cannot check for that in a nice way.

This patch introduces the same #defines in both server and client
headers. We rely on both being generated from the same XML file and
https://gcc.gnu.org/onlinedocs/cpp/Undefining-and-Redefining-Macros.html
to not cause compiler errors or warning due to redefinitions. We also
assume that no-one uses the same name in the same interface for both a
request and an event.

If this patch does cause grief due to identical redefinitions, the
contingency plan is to change the generator to produce
 #ifndef/#define/#endif instead of just #define.

Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
[Pekka: add paragraphs to commit message.]

7 years agoprotocol: Add release (destructor) request to wl_output
Quentin Glidic [Tue, 5 Jul 2016 18:41:49 +0000 (20:41 +0200)]
protocol: Add release (destructor) request to wl_output

Outputs come and go, and this is needed to clean up wl_resources on the
server side. All protocol objects need a way to be destroyed.

Cc: Neil Roberts <neil@linux.intel.com>
Cc: Jason Ekstrand <jason@jlekstrand.net>
Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Yong Bakos <ybakos@humanoriented.com>
[Pekka: added commit message]

8 years agodisplay-test: Remove redundant stdbool include
Yong Bakos [Mon, 18 Jul 2016 17:46:00 +0000 (12:46 -0500)]
display-test: Remove redundant stdbool include

display-test.c includes stdbool.h twice. Remove the redundant include.

Signed-off-by: Yong Bakos <ybakos@humanoriented.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
8 years ago(multiple): Include stdint.h
Yong Bakos [Mon, 18 Jul 2016 17:42:25 +0000 (12:42 -0500)]
(multiple): Include stdint.h

Some headers and source files have been using types such as uint32_t
without explicitly including stdint.h.

Explicitly include stdint.h where appropriate.

Signed-off-by: Yong Bakos <ybakos@humanoriented.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
8 years agoscanner: Use uint32_t instead of uint
Khem Raj [Fri, 15 Jul 2016 23:23:48 +0000 (16:23 -0700)]
scanner: Use uint32_t instead of uint

uint32_t is C99 defined stdint type

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
8 years agoscanner: Improve documentation for strtouint()
Bryce Harrington [Fri, 8 Jul 2016 23:51:16 +0000 (16:51 -0700)]
scanner: Improve documentation for strtouint()

Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
Reviewed-by: Yong Bakos <ybakos@humanoriented.com>
8 years agotests: Require base 10 for the string specifying the number of open fd's
Bryce Harrington [Sat, 9 Jul 2016 02:00:20 +0000 (19:00 -0700)]
tests: Require base 10 for the string specifying the number of open fd's

The third arg to strtol() specifies the base to assume for the number.
When 0 is passed, as is currently done in wayland-client.c, hexadecimal
and octal numbers are permitted and automatically detected and
converted.

exec-fd-leak-checker's single argument is the count of file descriptors
it should expect to be open.  We should expect this to be specified only
as a decimal number, there's no reason why one would want to use octal
or hexadecimal for that.

Suggested by Yong Bakos.

Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
Reviewed-by: Yong Bakos <ybakos@humanoriented.com>
8 years agoscanner: Move PROGRAM_NAME define
Yong Bakos [Tue, 7 Jun 2016 15:19:39 +0000 (10:19 -0500)]
scanner: Move PROGRAM_NAME define

PROGRAM_NAME was defined within the if block of HAVE_LIBXML, causing a
compilation failure when libxml is not present.

Move the define of PROGRAM_NAME out of the if block.

Signed-off-by: Yong Bakos <ybakos@humanoriented.com>
Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
8 years agoserver-core, event-loop: Fix parameter alignment.
Yong Bakos [Tue, 24 May 2016 23:10:17 +0000 (17:10 -0600)]
server-core, event-loop: Fix parameter alignment.

Signed-off-by: Yong Bakos <ybakos@humanoriented.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
8 years agoscanner: Replace #define tab with space
Yong Bakos [Tue, 24 May 2016 19:55:12 +0000 (13:55 -0600)]
scanner: Replace #define tab with space

wayland-client-protocol.h and wayland-server-protocol.h use a tab
between the identifier and token of generated #defines for request/event
opcodes and versions. While this sometimes enables vertical alignment,
it more frequently doesn't, and leads to awkward spacing.

Replace the tab with a space, for consistency and readability.

Signed-off-by: Yong Bakos <ybakos@humanoriented.com>
Reviewed-by: Quentin Glidic <sardemff7+git@sardemff7.net>
Tested-by: Quentin Glidic <sardemff7+git@sardemff7.net>
8 years agoserver, server-core: Minimize fwd decs, use macro, and format
Yong Bakos [Mon, 23 May 2016 23:59:33 +0000 (17:59 -0600)]
server, server-core: Minimize fwd decs, use macro, and format

wayland-server.h: Adjust line breaks between prototypes.

wayland-server-core.h:
Adjust line breaks between prototypes.
Adjust space between splats and identifiers.
Remove unconventional linebreak before first parameter.
Add line breaks after return types.
Remove unnecessary forward declarations, and:
- move 'struct wl_client' declaration close to the dependent typedef
- tastefully move 'wl_shm_buffer_get' to leverage the return type
Replace explicit __attribute__ with WL_PRINTF macro.

Signed-off-by: Yong Bakos <ybakos@humanoriented.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
8 years agoclient-core: Add missing line breaks
Yong Bakos [Mon, 23 May 2016 23:06:09 +0000 (17:06 -0600)]
client-core: Add missing line breaks

Signed-off-by: Yong Bakos <ybakos@humanoriented.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
8 years agoevent-loop: Include wayland-util.h
Yong Bakos [Sat, 21 May 2016 04:23:58 +0000 (22:23 -0600)]
event-loop: Include wayland-util.h

event-loop.c uses WL_EXPORT and wl_list, which are defined in
wayland-util.h.

Include wayland-util.h explicitly, rather than transitively through
wayland-server-core.h.

Signed-off-by: Yong Bakos <ybakos@humanoriented.com>
Reviewed-by: Sam Spilsbury <smspillaz@gmail.com>
8 years agowayland-shm: Include wayland-util.h
Yong Bakos [Sat, 21 May 2016 04:18:36 +0000 (22:18 -0600)]
wayland-shm: Include wayland-util.h

wayland-shm.c uses WL_EXPORT and wl_array, which are defined in
wayland-util.h.

Include wayland-util.h explicitly, rather than transitively through
wayland-server.h.

Signed-off-by: Yong Bakos <ybakos@humanoriented.com>
Reviewed-by: Sam Spilsbury <smspillaz@gmail.com>
8 years agoscanner: Fix reported executable name to 'wayland-scanner'
Bryce Harrington [Mon, 6 Jun 2016 17:58:56 +0000 (10:58 -0700)]
scanner: Fix reported executable name to 'wayland-scanner'

'wayland-scanner -v' (correctly) reports the program as named
"wayland-scanner", but 'wayland-scanner -h' was inconsistent, referring
to it as './scanner'.

Also refactor this and other references to the program name to use a
common #define, PROGRAM_NAME.

Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
Reviewed-by: Yong Bakos <ybakos@humanoriented.com>
Tested-by: Yong Bakos <ybakos@humanoriented.com>
8 years agowayland-server: Clarify included header dependencies
Yong Bakos [Wed, 18 May 2016 03:02:01 +0000 (21:02 -0600)]
wayland-server: Clarify included header dependencies

wayland-server.c directly depends on wayland-util.h, and will include
wayland-server-protocol.h via wayland-server.h.

Explicitly include wayland-util.h, making this dependency clear.
Remove the redundant inclusion of wayland-server-protocol.h.

Signed-off-by: Yong Bakos <ybakos@humanoriented.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
8 years agoevent-loop: Make transitive include explicit
Yong Bakos [Mon, 16 May 2016 18:05:39 +0000 (12:05 -0600)]
event-loop: Make transitive include explicit

The explicit inclusion of wayland-server.h hides the real dependency, which
is wayland-server-core.h.

Signed-off-by: Yong Bakos <ybakos@humanoriented.com>
Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
8 years agodoc: Unpublish global_zombie_object and wl_interface_equal
Yong Bakos [Thu, 12 May 2016 20:52:39 +0000 (15:52 -0500)]
doc: Unpublish global_zombie_object and wl_interface_equal

Both global_zombie_object and wl_interface_equal are private, yet were
part of public documentation despite not being part of the public API.

Move these two definitions to the top of an existing doxygen \cond block,
which removes them from the public documentation.

Signed-off-by: Yong Bakos <ybakos@humanoriented.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
8 years agodoc: Unpublish wl_log* and wl_abort
Yong Bakos [Thu, 12 May 2016 20:52:38 +0000 (15:52 -0500)]
doc: Unpublish wl_log* and wl_abort

The public documentation included descriptions of wl_log_stderr_handler,
wl_log_func_t wl_log_handler, wl_log and wl_abort. These are not accessible
via the public API.

Move the doxygen \endcond command to wrap these definitions, removing them
from publication.

Signed-off-by: Yong Bakos <ybakos@humanoriented.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
8 years agodoc: Unpublish wl_display_get_additional_shm_formats
Yong Bakos [Thu, 12 May 2016 20:52:37 +0000 (15:52 -0500)]
doc: Unpublish wl_display_get_additional_shm_formats

The Wayland docbook and the doxygen html docs had been presenting
wl_display_get_additional_shm_formats as part of the public API, but the
prototype for this function is in wayland-private.h.

Add a \private annotation to the doc comment, preventing doxygen from
publishing this function as public.
Add logic to the publican xsl to only transform elements with a "prot"
attribute value of "public".

Signed-off-by: Yong Bakos <ybakos@humanoriented.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
8 years agoconfigure.ac: bump version to 1.11.90 for open development
Pekka Paalanen [Wed, 1 Jun 2016 08:08:02 +0000 (11:08 +0300)]
configure.ac: bump version to 1.11.90 for open development

As announced in 1.11.0 release notes, master is open again.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
8 years agoconfigure.ac: bump to version 1.11.0 for the official release 1.11.0
Bryce Harrington [Wed, 1 Jun 2016 00:11:20 +0000 (17:11 -0700)]
configure.ac: bump to version 1.11.0 for the official release

8 years agoconfigure.ac: bump to version 1.10.93 for the RC1 release 1.10.93
Bryce Harrington [Tue, 24 May 2016 19:29:59 +0000 (12:29 -0700)]
configure.ac: bump to version 1.10.93 for the RC1 release

8 years agoscanner: Remove unused forward decs from client protocol
Yong Bakos [Fri, 20 May 2016 02:31:16 +0000 (20:31 -0600)]
scanner: Remove unused forward decs from client protocol

wayland-client-protocol.h had forward declarations for wl_client and
wl_resource, yet nothing on the client side references these types.

Add a 'side' condition to only generate these forward declarations in the
server protocol header.

Signed-off-by: Yong Bakos <ybakos@humanoriented.com>
Reviewed-by: <pekka.paalanen@collabora.co.uk>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
8 years agodisplay-test: move a misplaced comment
Marek Chalupa [Fri, 13 May 2016 13:01:18 +0000 (15:01 +0200)]
display-test: move a misplaced comment

we split a function while refactoring in c643781 and now
the comment makes no sense

Signed-off-by: Marek Chalupa <mchqwerty@gmail.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
8 years agotests: Check for client/server-core.h inclusion
Yong Bakos [Thu, 19 May 2016 16:27:29 +0000 (10:27 -0600)]
tests: Check for client/server-core.h inclusion

The purpose of wayland-*-protocol-core.h is to mimc the
wayland-*-protocol.h generated by scanner --include-core-only.
The only difference being what wayland-*-protocol.h should include.

Add an include check in the headers-protocol-core-test, to be sure that
a wayland-*-protocol.h generated with the --include-core-only option
properly includes wayland-*-core.h.

Signed-off-by: Yong Bakos <ybakos@humanoriented.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
8 years agoconfigure.ac: bump to version 1.10.92 for the beta release 1.10.92
Bryce Harrington [Wed, 18 May 2016 05:07:48 +0000 (22:07 -0700)]
configure.ac: bump to version 1.10.92 for the beta release

8 years agoprivate: Remove unnecessary forward declarations
Yong Bakos [Sat, 7 May 2016 14:11:30 +0000 (09:11 -0500)]
private: Remove unnecessary forward declarations

Declarations for wl_connection and wl_closure are not needed here.
wl_closure already has a complete definition.
Removing these forward declarations results in a clean, warning-free compile.

Signed-off-by: Yong Bakos <ybakos@humanoriented.com>
Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
[Updated to apply to trunk]
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
8 years agoconnection: Move wl_interface_equal to util
Yong Bakos [Sun, 8 May 2016 13:44:08 +0000 (08:44 -0500)]
connection: Move wl_interface_equal to util

Move the wl_interface_equal prototype to the top of wayland-private, where
it is not buried in the middle of map, connection and closure functions.

Move the implementation out of connection and into util. This is a utility
function, not specific to connections, and has call sites within connection,
wayland-client and wayland-server.

Signed-off-by: Yong Bakos <ybakos@humanoriented.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
8 years agodoc: Formalize file comment in wayland-client.h, wayland-server.h
Yong Bakos [Sun, 8 May 2016 19:42:28 +0000 (14:42 -0500)]
doc: Formalize file comment in wayland-client.h, wayland-server.h

Publican was generating a subtle error during a build:
Error: no ID for constraint linkend: Server-wayland-server-core_8h.

This was caused by doxygen applying the doc comment at the top of
wayland-server.h as the documentation for struct wl_object. As such, the
generated documentation for wl_object was also very incorrect.

Make the file doc comments in wayland-client.h and wayland-server.h real
doxygen file doc comments with the \file command, add a \brief, make the
inclusion warning a \warning, correct the language of the comment in
wayland-server.h, and remove one unnecessary line break.

This squelches the publican error, removes the bad wl_object documentation,
and makes the comment appear in the generated html documentation.

References: d74a9c079b1aeb44f69b4132dc2c38362e21f281

Signed-off-by: Yong Bakos <ybakos@humanoriented.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
8 years agoprotocol: Remove double line break
Yong Bakos [Sat, 7 May 2016 23:14:11 +0000 (18:14 -0500)]
protocol: Remove double line break

All vertical whitespace should manifest as a single blank line, never two.

Signed-off-by: Yong Bakos <ybakos@humanoriented.com>
Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
8 years agoscanner: Add version argument to wayland-scanner
Armin Krezović [Thu, 5 May 2016 15:27:57 +0000 (17:27 +0200)]
scanner: Add version argument to wayland-scanner

This adds a command line argument to print wayland-scanner version.

It also makes wayland-scanner emit a comment with wayland library
version to every file it generates.

v2: separate variable definitions into their own lines and remove
    old style "version" argument

Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
Reviewed-by: Yong Bakos <ybakos@humanoriented.com>
Tested-by: Yong Bakos <ybakos@humanoriented.com>
Signed-off-by: Armin Krezović <krezovic.armin@gmail.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
8 years agoconfigure.ac: bump to version 1.10.91 for the alpha release 1.10.91
Bryce Harrington [Wed, 4 May 2016 00:56:22 +0000 (17:56 -0700)]
configure.ac: bump to version 1.10.91 for the alpha release

8 years agoprotocol: add support for cross-interface enum attributes
Auke Booij [Sat, 5 Dec 2015 12:39:12 +0000 (12:39 +0000)]
protocol: add support for cross-interface enum attributes

The enum attribute, for which scanner support was introduced in
1771299, can be used to link message arguments to <enum>s. However,
some arguments refer to <enum>s in a different <interface>.

This adds scanner support for referring to an <enum> in a different
<interface> using dot notation. It also sets the attributes in this
style in the wayland XML protocol (wl_shm_pool::create_buffer::format
to wl_shm::format, and wl_surface::set_buffer_transform::transform to
wl_output::transform), and updates the documentation XSL so that this
new style is supported.

Changes since v2:
 - add object:: prefix for all enumerations in the documentation
 - fix whitespace in scanner.c
 - minor code fixup to return early and avoid casts in scanner.c

Changes since v1:
 - several implementation bugs fixed

Signed-off-by: Auke Booij <auke@tulcod.com>
Reviewed-by: Nils Christopher Brause <nilschrbrause@googlemail.com>
Reviewed-by: Bill Spitzak <spitzak@gmail.com>
[Pekka: rebased across cde251a124d41977b447098cc530fcad2834a45f]
[Pekka: wrap lines and space fixes in scanner.c]
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
8 years agoprotocol: Add summaries to event parameters
Yong Bakos [Sat, 30 Apr 2016 12:35:50 +0000 (07:35 -0500)]
protocol: Add summaries to event parameters

All event arg elements now have an appropriate summary attribute.
This was conducted mostly in response to the undocumented parameter
warnings generated during 'make check'.

Signed-off-by: Yong Bakos <ybakos@humanoriented.com>
Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>