Commit graph

1315 commits

Author SHA1 Message Date
Rob Bradford
9fbcc7ae7d wayland-client: Avoid null dereference when handling deletion
If an unknown id is deleted then the lookup in the map will return NULL and
so we should avoid dereferencing that.

As this is unexpected behaviour log a message about the problem too.
2013-04-04 12:39:57 -04:00
Kristian Høgsberg
477dcd84c7 docs: Use MIT for documentation license 2013-04-03 16:26:14 -04:00
Kristian Høgsberg
c42b09b4cb configure.ac: Fix publican version check
This sure is ugly - we feed output of publican -v into bc to compare
against minimum required version, 2.8.  That's bad enough, but when
publican suddenly report 3.0.0, bc starts complaining...

Use sed to filter out 3.0 from the 'version=3.0.0' output from publican
instead.  Seem a little more robust, but it's just a matter of time before
something else breaks this flaky setup.

Hey, publican, how about shipping .pc files?
2013-04-03 16:22:44 -04:00
Peter Hutterer
9d296fc73a doc: rename "Wayland" to "publican"
This directory was called Wayland during my early tries with publican where
the source layout was different and it needed to be set to the same name as
the publican output directory. This reason doesn't exist anymore, so re-name
it to publican to make it more obvious what's hiding in here.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-04-03 15:44:50 -04:00
Peter Hutterer
8ccab1ba62 doc: generate man pages from doxygen
Create client-side and server-side man pages from doxygen. The doxygen
config options are virtually the same as for the XML output, but we do pass
in the specific options via stdin.

WL_EXPORT is predefined to the empty string, it makes the man page look
confusing and provides no value here anyway. This applies for both xml and
man output.

JAVADOC_AUTOBRIEF is disabled for man pages, the formatting in the resulting
man page is IMO hard to read.

Most of the server man pages are virtually empty, there's just not enough
documentation in the source files.

Interesting issue: the usage of @code in the protocol to reference the
parameter breaks the expansion of WL_EXPORT, thus leaving us with WL_EXPORT
in all the man pages.
Presumably this is an issue with doxygen interpreting this as a @code
command, but I already wasted enough time narrowing this down.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-04-03 15:44:50 -04:00
Peter Hutterer
e5202f76b0 protocol: fix two protocol description 'typos'
Remove "mice, for example", it's described in the wl_pointer interface in
detail. And remove space before the full stop.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-04-03 15:44:50 -04:00
Peter Hutterer
9c0357af6e protocol: document wl_pointer, wl_keyboard, wl_touch
Most of this should be clear, but let's spell a few things out.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-04-03 15:44:50 -04:00
Peter Hutterer
4a599e029d protocol: use "summary", not "description" for xkb_v1 format
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-04-03 15:44:50 -04:00
Peter Hutterer
dfeef480ac doc: don't start a variable list if we have no sub-elements
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-04-03 15:44:50 -04:00
Peter Hutterer
b17e5e1615 doc: improve formatting of client-side documentation
A bunch of changes to the xsl transformation stylesheet to make Chapter 4
(Client API) look nicer and more readable.

Main changes:
- function synopsis listed
- lists for parameters and return values
- long function descriptions
- misc other hooks for "see also", "note", etc

The long description is a sore point. doxygen xml output is difficult to
parse with the output being in the form of
<detailed description>
  <para>
  	<parameterlist> .... </parameterlist>
	<simplesect kind="return">... </simplesect>
	First paragraph of long description
  </para>
  <para>
  	Second paragraph of long <sometag>description</sometag>
  </para>
</detaileddescription>

So we need to ignore parameterlist and simplesect, but extract the text from
everything else. Any improvements on that welcome.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-04-03 15:44:49 -04:00
Peter Hutterer
378caae828 doc: change wording in section introduction
If we don't have descriptions of classes, the "And" is awkward.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-04-03 15:44:49 -04:00
Peter Hutterer
ed2f8d389f doc: add wayland.doxygen as target dependency
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-04-03 15:44:49 -04:00
Peter Hutterer
8329c2680e Rename en_US to sources
The reason this directory exists is because we need to copy it into
$builddir so we can combine it with generated sources (we can't pass
multiple source paths into publican).

So instead of having en_US, renamed to en-US stop the confusion and rename
the sources to "sources". That gets copied to en-US which will then contain
the actual output.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-04-03 15:44:45 -04:00
Peter Hutterer
3cf8e67731 doc: explain the publican build process
This makefile is a bit hard to read due to some publican requirements and
the need to generate some files through XSLT. Explain the lot, so that those
looking at this roughly know what will hit them.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-04-03 14:57:50 -04:00
Peter Hutterer
ee569711ee doc: clarify how ClientAPI.xml is built
I found the comment a bit confusing and it's quite hard to read. re-explain
with a simple step-by-step list

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-04-03 14:57:37 -04:00
Tiago Vignatti
dcb402a2c2 doc: Format Chapter 4 paragraphs correctly
Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
2013-04-03 14:57:01 -04:00
Peter Hutterer
982128c1b5 doc: minor title wording fix
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-04-03 14:51:27 -04:00
Tiago Vignatti
0a45cdf798 doc: Change chapter title to a more descriptive one
Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-04-03 14:50:39 -04:00
Tiago Vignatti
cc57f3ebdc doc: Rename Overview.xml to Introduction.xml
Rename Overview.xml to Introduction.xml, reflecting the previous commit.
Organize also Wayland.xml order of the includes.

Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-04-03 14:48:27 -04:00
Tiago Vignatti
eb6618e593 doc: Improve the first chapter text and definitions
In the beginning of the chapter, it was defined what is the so called "X"
thing and was removed the "Wayland" and "Weston" definitions cause we're
defining later at 1.2 anyway.

"Introduction", "Motivation" and "Compositing manager as the display server"
names sound better a bit than "Overview", "Replacing X11" and "Make the
compositing manager the display server" respectively. That was changed also.

Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-04-03 14:45:39 -04:00
Tiago Vignatti
23ee67d485 doc: Set book edition number to the "1"
"1" sounds better when we mention about the "first" edition or say the
"publishing" edition.

If needed, we might want to increase the edition numbers automatically later,
for instance based on the micro version of the protocol or something like
that.

Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-04-03 14:45:12 -04:00
Tiago Vignatti
95bce664f9 doc: Add a Foreword and a Preface
In particular, the preface defines the scope of this document we're building
-- is the definition there enough with respect to what we want with this?

Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-04-03 14:44:55 -04:00
Peter Hutterer
bd63d331b9 doc: don't add a para for an empty summary
Removes enough empty lines to cut the PDF down by 4 pages.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-04-03 14:44:12 -04:00
Giulio Camuffo
4e9892478b utils: const-ify some function arguments 2013-04-03 12:46:57 -04:00
Rob Bradford
db19b443cc wayland-server: Listen for pointer current surface destruction
Add a destroy listener so that when the current surface associated with the
pointer is destroyed we can reset the pointer to the current surface. In order
to achieve this add a wl_pointer_set_current() which handles assigning the
surface and creating the listener.

This resolves a use-after-free error triggered with nested popup surfaces

Fixes: https://bugzilla.gnome.org/show_bug.cgi?id=696946
2013-04-03 12:46:57 -04:00
Kristian Høgsberg
858fcbde59 docs: Document non-blocking behaviour of wl_display_flush() 2013-04-02 21:31:02 -04:00
Giulio Camuffo
88d873ecb9 server: use void* instead of function pointer for wl_object.implementation
This is needed to make C++ programs that include wayland-server.h build:
C++ does not allow conversions from data pointers to function pointers.
2013-04-02 21:07:07 -04:00
Giulio Camuffo
6ca428edc8 server: use the right function pointer type in wl_signal_get
use the wl_notify_func type, and not void *, or else wl_signal_get
will not be usable by a c++ plugin because it will not cast
void * to a function pointer.
2013-04-02 17:11:44 -04:00
Matthias Clasen
3bda215130 docs: Add information about serials and timestamps
Add some information about serials, timestamps and their uses
to the Input section in the protocol overview.
2013-04-01 21:43:47 -04:00
Matthias Clasen
c110fbcb75 docs: Document granularity of timestamps
This information is necessary to make any use of these fields.
2013-04-01 21:43:17 -04:00
Kristian Høgsberg
c7639228b4 docs: Remove mention of touch focus
There is no focused surface for a touch screen.
2013-04-01 20:06:36 -04:00
Matthias Clasen
29ddfdd0df docs: Add details about grabs
Mention implicit grabs, (lack of) explicit grabs, and popup
windows.
2013-04-01 20:01:25 -04:00
Matthias Clasen
a4d2b00ae2 docs: Add details about surfaces
Mention some of the characteristic differences to X:
no global positions, no access to foreign windows.
2013-04-01 19:59:48 -04:00
Matthias Clasen
ab6d96c8c4 docs: Improve wl_region protocol docs
Just cosmetic changes, a few missing periods, and ID was
not capitalized.
2013-04-01 19:59:38 -04:00
Matthias Clasen
4c94024af5 docs: Improve the wl_output protocol docs
Some descriptions were missing.
2013-04-01 19:59:12 -04:00
Matthias Clasen
27eacf423a docs: Improve wl_touch protocol docs
Some descriptions were missing here.
2013-04-01 19:58:06 -04:00
Matthias Clasen
608d81bfd5 docs: Improve wl_keyboard protocol docs
Some descriptions were missing here.
2013-04-01 19:57:28 -04:00
Matthias Clasen
3f4008acb3 docs: Improve wl_pointer protocol docs
Some descriptions were missing here.
2013-04-01 19:56:41 -04:00
Matthias Clasen
53b57a63ee docs: Improve the wl_seat protocol docs
Expand the main description and tell if requests don't have
an effect.
2013-04-01 17:43:31 -04:00
Matthias Clasen
c63a59b802 docs: Improve wl_surface protocol docs
Use NULL consistently. And add some more information in a few
places.
2013-04-01 17:40:14 -04:00
Matthias Clasen
e38f433313 docs: Improve wl_shell/wl_shell_surface docs
Add missing summaries, expand descriptions.
2013-04-01 17:40:14 -04:00
Matthias Clasen
15ec6219e9 docs: Improve the wl_data_* procol docs
Add a few missing summaries and descriptions, spell out file
descriptor, use hyphens in drag-and-drop, don't use hyphens in
'mime type', and reword a few things.
2013-04-01 17:40:14 -04:00
Matthias Clasen
b02e58c718 docs: Improve wl_shm and wl_shm_pool protocol docs
Reword some paragraphs, and spell out 'file descriptor'.
2013-04-01 17:40:14 -04:00
Matthias Clasen
c84155d475 docs: Improve wl_callback protocol docs
Add some information about wl_callback and its done event.
2013-04-01 17:40:14 -04:00
Matthias Clasen
8aa7a690a5 docs: Improve the wl_registry protocol docs
Reword a few things, and add some details.
2013-04-01 17:40:14 -04:00
Matthias Clasen
a5cc5b32bb docs: Improve wl_display protocol docs
This adds a bit of information about in-order event delivery,
removes extraneous formatting, and adds a missing period.
2013-04-01 17:40:14 -04:00
Matthias Clasen
8d0b577310 docs: Consistency fixes
Say 'object ID' throughout.
2013-04-01 17:40:14 -04:00
Matthias Clasen
390e7a7a42 doc: Improve various sections of the documentation 2013-04-01 17:40:14 -04:00
Matthias Clasen
469c386338 docs: Improve the 'Connect time' section
Turn the bullet-point list into complete sentences.
2013-04-01 17:40:14 -04:00
Matthias Clasen
41d44af8c8 docs: Improve the 'Types of Compositors' section
Turn the bullet-point lists into full paragraphs.
2013-04-01 17:40:14 -04:00