Commit Graph

1759 Commits

Author SHA1 Message Date
Derek Foreman
de1489564c build: Build libwayland-private
This splits the bulk of libwayland-util into libwayland-private.

libwayland-util (which is just wayland-util.c) is for use with the scanner.

libwayland-private is everything else.

Most things will want to link both libs.

Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2015-07-23 14:23:58 -07:00
Ross Burton
21f80b8982 build: always build wayland-scanner
The previous idiom for building a cross-compiled Wayland is to build once for
the build host (with --enable-scanner --disable-libraries) to get a
wayland-scanner binary that can then be used in a cross-compile (with
--disable-scanner).  The problem with this is that the cross wayland is missing
a wayland-scanner binary, which means you then can't do any Wayland development
on the target.

Instead, always build wayland-scanner for the target and change
--enable/disable-scanner to --with/without-host-scanner.  Normal builds use the
default of --without-host-scanner and run the wayland-scanner it just built, and
cross-compiled builds pass --with-host-scanner to use a previously built host
scanner but still get a wayland-scanner to install.

(a theoretically neater solution would be to build two scanners if required (one
to run and one to install), but automake makes this overly complicated)

[daniels: Bikeshedded naming with Ross's OK.]

Signed-off-by: Ross Burton <ross.burton@intel.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
2015-07-17 12:19:08 +01:00
Marek Chalupa
ba731f951c fixed-benchmark: remove unused arguments in main
Fixed benchmark uses main(int argc, char *argv[])
but does not use the arguments, so we can replace them with void

Signed-off-by: Marek Chalupa <mchqwerty@gmail.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
2015-07-10 17:17:46 -07:00
Bryce Harrington
c2547c70a7 tests: Don't increment variables inside an assert()
Addresses this warning found by Denis Denisov:

  [tests/array-test.c:137]: (warning) Assert statement modifies 'i'.

Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
Reviewed-by: Jon A. Cruz <jonc@osg.samsung.com>
2015-07-10 00:12:36 -07:00
Derek Foreman
ab254f7efe cosmetic: gratuitous whitespace changes in event-loop.c
Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Jon A. Cruz <jonc@osg.samsung.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2015-06-23 10:27:23 +03:00
Derek Foreman
4cdc51034c build: Use AM_CFLAGS instead of GCC_CFLAGS everywhere
This will make it easier if we ever want to add new flags to everything
in the future.

Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Jon A. Cruz <jonc@osg.samsung.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2015-06-23 10:07:40 +03:00
Bryce Harrington
a8a86010a6 cursor: Update printed license from MIT "X11" to MIT "Expat"
The code generates a cursor-data.h file, with licensing information.
Change this from the MIT "X11" license to MIT "Expat" license for
consistency with the rest of Wayland.

Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2015-06-22 14:50:20 +03:00
Bryce Harrington
40925634e6 publican: Update docs license from MIT "X11" to MIT "Expat" style
Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2015-06-22 14:50:10 +03:00
Peter Hutterer
82a6fec962 doc: drop the default doxygen tags
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2015-06-18 15:43:58 +03:00
Peter Hutterer
356a48fcfb doc: move project-specific doxygen settings to the end of the doxygen file
Rather than having the settings hidden in the file somewhere move them to the
end so it's clear which settings we intentionally override.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2015-06-18 15:43:46 +03:00
Derek Foreman
bc3b66d5c1 build: Don't depend on libffi unless we're building libraries
When building just the scanner or docs it's not required.

This can reduce requirements for a host cross compiling wayland,
since only the scanner needs to be built natively.

Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2015-06-18 14:06:32 +03:00
Derek Foreman
0e979d82d2 build: Build a subset of libwayland_util when not building libraries
The scanner doesn't need anything but wayland-util.c/.h so we can
shrink wayland-util when not building the main libraries.

Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2015-06-18 14:06:24 +03:00
Derek Foreman
5cfdbef3d2 build: Allow disabling building of wayland libraries
When cross-compiling it may be useful to build only the wayland-scanner
natively.  This patch makes it possible to disable build of the libraries.

Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2015-06-18 14:06:16 +03:00
Derek Foreman
aeeca31696 build: Stop putting FFI_CFLAGS in AM_CFLAGS
AM_CFLAGS are the defaults passed to anything that doesn't specify its own
_CFLAGS, so instead of putting FFI_CFLAGS there, let's just add that to
anything that actually needs it.

The only thing that needs it but didn't have it specifically was
libwayland_util (for connection.c)

Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2015-06-18 14:06:08 +03:00
Derek Foreman
e06f88cf91 build: Move AM_CFLAGS and AM_CPPFLAGS to the top of Makefile.am
AM_CFLAGS and AM_CPPFLAGS aren't positional, so putting them at a
random place in Makefile.am can be misleading.

Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2015-06-18 14:05:24 +03:00
Bryce Harrington
1faeb7ff48 xcursor: Change keithp licensed code from X11 to Expat license
The license text for this file mentions Keith Packard specifically,
however it is otherwise identical to all the other MIT X11 licensed code
in Wayland, and so can be changed to the substantially identical MIT
Expat license.

Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Acked-by: Keith Packard <keithp@keithp.com>
2015-06-12 15:51:38 -07:00
Bryce Harrington
c78a0a62c6 cursor-data.h: Change SuSE licensed code from X11 to Expat
The license text for this file mentions SuSE specifically, however it is
otherwise identical to all the other MIT X11 licensed code in Wayland,
and so can be changed to the substantially identical MIT Expat license.

Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Acked-by: Keith Packard <keithp@keithp.com>
2015-06-12 15:51:38 -07:00
Bryce Harrington
3540ea2b9f cursor: Update boilerplate from MIT X11 license to MIT Expat license
Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2015-06-12 15:51:38 -07:00
Bryce Harrington
541b0cf24e protocol: Update boilerplate from MIT X11 license to MIT Expat license
Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2015-06-12 15:51:38 -07:00
Bryce Harrington
68402a53dc wayland-server: Fix style on multi-line comment
Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
2015-06-12 15:35:13 -07:00
Bryce Harrington
3c91b0878d src: Update boilerplate from MIT X11 license to MIT Expat license
Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2015-06-12 15:31:24 -07:00
Bryce Harrington
d21ba735ee test-runner: Add copyright boilerplate for .h, same as the .c
Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2015-06-12 15:31:24 -07:00
Bryce Harrington
724b6e4ebe socket-test: Fix style on multi-line comment
Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2015-06-12 15:31:24 -07:00
Bryce Harrington
773babedfc tests: Update boilerplate from MIT X11 license to MIT Expat license
Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2015-06-12 15:31:24 -07:00
Bryce Harrington
2e6e0fc811 Contributing: Specify use of MIT Expat for new code files
Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2015-06-12 15:31:23 -07:00
Bryce Harrington
c4bad43425 COPYING: Update to MIT Expat License rather than MIT X License
MIT has released software under several slightly different licenses,
including the old 'X11 License' or 'MIT License'.  Some code under this
license was in fact included in X.org's Xserver in the past.  However,
X.org now prefers the MIT Expat License as the standard (which,
confusingly, is also referred to as the 'MIT License').  See
http://cgit.freedesktop.org/xorg/xserver/tree/COPYING

When Wayland started, it was Kristian Høgsberg's intent to license it
compatibly with X.org.  "I wanted Wayland to be usable (license-wise)
whereever X was usable."  But, the text of the older X11 License was
taken for Wayland, rather than X11's current standard.  This patch
corrects this by swapping in the intended text.

In practical terms, the most notable change is the dropping of the
no-advertising clause.

Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2015-06-12 15:31:21 -07:00
Derek Foreman
56a5a890b5 docs: remove and ignore doc/doxygen_sqlite3.db
Some newer versions of doxygen are generating this file now, and if
we don't clean it up distcheck will fail.

Known to affect doxygen 1.8.8 from debian jessie.

Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Jon A. Cruz <jonc@osg.samsung.com>
Tested-by: Jon A. Cruz <jonc@osg.samsung.com>
2015-06-04 17:21:25 -07:00
Bryce Harrington
baed4b0a2f configure.ac: bump version to 1.8.90
Master is open for new features again

Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
2015-06-03 00:12:49 -07:00
Bryce Harrington
60024af597 configure.ac: bump to version 1.8.0 for the official release 2015-06-02 16:06:02 -07:00
Giulio Camuffo
f0be757bfa scanner: don't emit the extern declarations for external types
We were emitting the extern declarations of all types used in the protocol,
even if not defined in it. This caused warnings to be produced when using
the -Wredundant-decls compiler flag when building an extension that uses
e.g. wl_surface. However we only need the extern declarations if the
protocol defines a factory for those external interfaces. That is a
bad design and can be however done by including the dependent protocol
header first.
So only emit the extern declarations for the types that the protocol
actually defines, this restoring the behavior we were using in 1.7.

Fixes https://bugs.freedesktop.org/show_bug.cgi?id=90677

Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Tested-by: Arnaud Vrac <rawoul@gmail.com>
2015-06-01 11:47:39 +03:00
Bryce Harrington
c19d5e1867 publish-doc: Add script for publishing docs to the website
Adapted from same-named script from libinput.
2015-05-27 15:34:20 -07:00
Bryce Harrington
6ffd998a98 configure.ac: bump to version 1.7.93 for the RC2 release 2015-05-26 19:10:15 -07:00
Bryce Harrington
8e8699789c gitignore: Bulk ignore all *-test files 2015-05-26 19:01:00 -07:00
Bryce Harrington
5339e21f65 gitignore: ignore recently added headers-test 2015-05-26 18:59:25 -07:00
Giulio Camuffo
1fab2e7ba9 tests: add an headers test
This test checks that the protocol and library headers include only what
they are supposed to include. That is, that the core headers do not
include the protocol headers and that the core protocol headers do not
include the non core library headers.
The build process now generates core protocol headers, but they are only
used in the test and don't get installed.

Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
2015-05-21 16:00:31 -07:00
Bryce Harrington
12cab2c4df configure.ac: bump to version 1.7.92 for the RC1 release 2015-05-15 17:53:29 -07:00
Michael Vetter
b409c919a2 remove trailing whitespaces
Remove trailing whitespaces because they are not needed and jumping to
the end of al ine should do just that and not jump to the whitespace.
2015-05-15 13:10:15 -07:00
Pekka Paalanen
d08c079739 scanner: simplify the getopt logic
Use the same retvals for both short and long options.

Whitespace fixes.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2015-05-08 14:21:55 -07:00
Bryce Harrington
8877a349e7 configure.ac: bump to version 1.7.91 for the alpha release 2015-05-06 18:59:59 -07:00
Giulio Camuffo
e799b1fa9c scanner: add a new --include-core-only option
When using this new option the generated code will include the new
core headers instead of the old ones. The default needs to remain
unchanged for backward compatibility with old code.
With this change the generated headers will now forward declare all
types and interfaces it uses; that is needed when generating headers
for a my-extension.xml with --include-core-only, since it may use
types defined in wayland.xml.
The same is done also without --include-core-only, since it is an
harmless change.
getopt_long() is used for the option handling.

Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2015-04-30 15:18:45 +03:00
Giulio Camuffo
ea73cb00bc wayland-egl: add a core header
The new core header doesn't include any other header, since it really
is not needed.

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2015-04-30 14:30:08 +03:00
Giulio Camuffo
d74a9c079b introduce new headers wayland-client-core.h and wayland-server-core.h
wayland-client.h and wayland-server.h include the protocol headers generated
at build time. This means that a libwayland user cannot generate and use
protocol code created from a wayland.xml newer than the installed libwayland,
because it is not possible to only include the API header.

Another use case is language bindings, which would generate their own protocol
code and which only need to use the library ABI, not the generated C code.

This commit adds wayland-client-core.h and wayland-server-core.h which do not
include the protocol headers or any deprecated code.

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2015-04-30 14:11:25 +03:00
Bryce Harrington
70d3c0fe8a tests: Typo in a comment
(Spotted by Silvan)

Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
2015-04-15 15:07:54 -07:00
Jonas Ådahl
0583ce741e scanner: Fail on empty enumerations
Without this patch, the scanner would generate invalid C which wouldn't
compile anyway, so lets be nice and fail earlier and point out where the
error is.

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: David Fort <contact@hardening-consulting.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2015-04-08 17:38:10 +08:00
Bill Spitzak
313b26f415 config: use simpler regexp syntax to get dot version
I wasted a lot of time before I figured out that I needed to add those
square brackets to get this to work. Sigh...
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
2015-04-07 15:48:25 -07:00
Marek Chalupa
c45be3d21e protocol: add better description of wl_pointer.release
Add note about what all wl_pointer.release does. Mainly that
it destroys the proxy object, so programmer must not call
wl_pointer_destroy() on the pointer any further.

Signed-off-by: Marek Chalupa <mchqwerty@gmail.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2015-03-30 14:23:18 +03:00
Jussi Pakkanen
2d46da10d8 Add support for direct file reading and writing in wayland-scanner.
Add support for direct file reading and writing in wayland-scanner.

Signed-off-by: Jussi Pakkanen <jpakkane@gmail.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Acked-by: David Fort <rdp.effort@gmail.com>
2015-03-27 15:02:38 +02:00
Bryce Harrington
439b0a3863 Spelling fixes (cosmetic)
A few typos in comments and protocol docs, no code changes.

./src/wayland-util.h:281: recieved  ==> received
./src/wayland-client.c:115: occured  ==> occurred
./src/wayland-client.c:156: occured  ==> occurred
./tests/test-compositor.c:76: parallely  ==> parallelly
./tests/test-compositor.c:474: recieve  ==> receive
./protocol/wayland.xml:1767: layed  ==> laid
./protocol/wayland.xml:2112: dependant  ==> dependent
./doc/publican/sources/Client.xml:25: recieved  ==> received

Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
Reviewed-by: Bill Spitzak <spitzak@gmail.com>
2015-03-19 16:56:17 +02:00
Marek Chalupa
e16ee74e47 server: give more precise error message
There are two same error messages with different cause.
Let user know what is the cause of the error.

Signed-off-by: Marek Chalupa <mchqwerty@gmail.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2015-03-19 16:11:21 +02:00
Emmanuel Gil Peyrot
c770b84658 cursor: free the array from which images are linked 2015-03-18 16:01:19 -07:00