summaryrefslogtreecommitdiff
path: root/protocol
AgeCommit message (Collapse)AuthorFilesLines
2013-07-29protocol: Copy missing pixel formats from wl_drm to wl_shmTomeu Vizoso1-1/+64
2013-06-28protocol: add no_keymap format to keymap formatsRob Bradford1-0/+2
This format is used to specify that the key button events received are not in relation to any key map and that the codes should be interpreted directly. v2: Use zero for the no keymap enum value and enhance the documentation for the enum entry.
2013-06-14protocol: Add missing since attribute for name event on wl_seatRob Bradford1-1/+1
This event was added in version 2 of the protocol.
2013-06-05protocol: Move new name event below existing requests and events and version itKristian Høgsberg1-9/+12
Missed v2 of Robs patch that already did this based on feedback from Ander and Daniel.
2013-06-05protocol: Add a name event to give seat nameRob Bradford1-1/+10
This provides the ability for a client to differentiate events from different seats in a multiple seat environment.
2013-05-28protocol: Modes are specified in HW pixelsAlexander Larsson1-9/+21
Modes are mainly meant to be used in coordination with fullscreen in DRIVER mode, by e.g. games. For such games what they generally want is to match some hardware mode and resize their window for that. We don't really need to complicate this with the scaling. So, we keep the resolutions in HW pixels, and drop the SCALED flag (as it is now useless). This lets you just create e.g an 800x600 buffer of scale 1 and fullscreen that, ignoring the output scaling factor (although you can of course also respect it and create a 400x300 surface at scale 2). Conceptually the mode change is treated like a scaling which overrides the normal output scale. The only complexity is the FILL mode where it can happen that the user specifies a buffer of the same size as the screen, but the output has scale 2 and the buffer scale 1. Just scanning out this buffer will work, but effectively this is a downscaling operation, as the "real" size of the surface in pels is twice the size of the output. We solve this by allowing FILL to downscale (but still not upscale).
2013-05-28protocol: Use signed int for scale valuesAlexander Larsson1-2/+2
We usually use signed ints for things like this, to avoid issues C sign coersion.
2013-05-22protocol: Support scaled outputs and surfacesAlexander Larsson1-14/+93
This adds the wl_surface.set_buffer_scale request, and a wl_output.scale event. These together lets us support automatic upscaling of "old" clients on very high resolution monitors, while allowing "new" clients to take advantage of this to render at the higher resolution when the surface is displayed on the scaled output. It is similar to set_buffer_transform in that the buffer is stored in a transformed pixels (in this case scaled). This means that if an output is scaled we can directly use the pre-scaled buffer with additional data, rather than having to scale it. Additionally this adds a "scaled" flag to the wl_output.mode flags so that clients know which resolutions are native and which are scaled. Also, in places where the documentation was previously not clear as to what coordinate system was used this was fleshed out. It also adds a scaling_factor event to wl_output that specifies the scaling of an output. This is meant to be used for outputs with a very high DPI to tell the client that this particular output has subpixel precision. Coordinates in other parts of the protocol, like input events, relative window positioning and output positioning are still in the compositor space rather than the scaled space. However, input has subpixel precision so you can still get input at full resolution. This setup means global properties like mouse acceleration/speed, pointer size, monitor geometry, etc can be specified in a "mostly similar" resolution even on a multimonitor setup where some monitors are low dpi and some are e.g. retina-class outputs.
2013-05-22protocol: Allow output changes to be treated atomicallyAlexander Larsson1-1/+11
This add a wl_output.done event which is send after every group of events caused by some property change. This allows clients to treat changes touching multiple events in an atomic fashion.
2013-04-18protocol: revert hotspot_x/y in set_cursor back to intPeter Hutterer1-2/+2
copy/paste error introduced in 9c0357af6ee42c318ce37b458ae7bdb7d51316cb Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-04-18protocol: Make it clear that returned "one-shot" objects are destroyedRob Bradford1-0/+8
The objects returned by the frame and sync request are destroyed by the compositor after the "done" event on the wl_callback interface is fired.
2013-04-04protocol: input documentation fixesPeter Hutterer1-4/+4
Fix summary for wl_touch::motion, extend summary for wl_touch::down to match up/motion a bit better. Fix a typo in wl_touch, and claim that it's zero or more update events, not one or more. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-04-03protocol: fix two protocol description 'typos'Peter Hutterer1-4/+4
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-03protocol: document wl_pointer, wl_keyboard, wl_touchPeter Hutterer1-21/+27
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-03protocol: use "summary", not "description" for xkb_v1 formatPeter Hutterer1-1/+1
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-04-01docs: Document granularity of timestampsMatthias Clasen1-8/+12
This information is necessary to make any use of these fields.
2013-04-01docs: Remove mention of touch focusKristian Høgsberg1-2/+1
There is no focused surface for a touch screen.
2013-04-01docs: Improve wl_region protocol docsMatthias Clasen1-4/+7
Just cosmetic changes, a few missing periods, and ID was not capitalized.
2013-04-01docs: Improve the wl_output protocol docsMatthias Clasen1-6/+18
Some descriptions were missing.
2013-04-01docs: Improve wl_touch protocol docsMatthias Clasen1-9/+27
Some descriptions were missing here.
2013-04-01docs: Improve wl_keyboard protocol docsMatthias Clasen1-6/+19
Some descriptions were missing here.
2013-04-01docs: Improve wl_pointer protocol docsMatthias Clasen1-10/+33
Some descriptions were missing here.
2013-04-01docs: Improve the wl_seat protocol docsMatthias Clasen1-13/+22
Expand the main description and tell if requests don't have an effect.
2013-04-01docs: Improve wl_surface protocol docsMatthias Clasen1-54/+69
Use NULL consistently. And add some more information in a few places.
2013-04-01docs: Improve wl_shell/wl_shell_surface docsMatthias Clasen1-84/+149
Add missing summaries, expand descriptions.
2013-04-01docs: Improve the wl_data_* procol docsMatthias Clasen1-30/+65
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-01docs: Improve wl_shm and wl_shm_pool protocol docsMatthias Clasen1-24/+49
Reword some paragraphs, and spell out 'file descriptor'.
2013-04-01docs: Improve wl_callback protocol docsMatthias Clasen1-1/+8
Add some information about wl_callback and its done event.
2013-04-01docs: Improve the wl_registry protocol docsMatthias Clasen1-18/+26
Reword a few things, and add some details.
2013-04-01docs: Improve wl_display protocol docsMatthias Clasen1-8/+9
This adds a bit of information about in-order event delivery, removes extraneous formatting, and adds a missing period.
2013-03-19protocol: remove implicit attach semanticsPekka Paalanen1-11/+8
To match the Weston commit e7144fd175d1d68b91aa0cec7ab63381b79385a9: Author: Kristian Høgsberg <krh@bitplanet.net> Date: Mon Mar 4 12:11:41 2013 -0500 compositor: Only send release event in response to wl_surface.attach Remove the implicit attach semantics from wl_surface.commit and .attach. Before, if you did this on a wl_surface: attach, commit, commit, you would receive wl_buffer.release for both commits. After this change, you will only receive wl_buffer.release for the first commit. To get a second release, the same buffer must be attached again. There is no need for the implicit attach on the second commit. If the compositor needs the wl_buffer for repainting, it will not release it to begin with. If the compositor does not need to keep the wl_buffer around for repainting, it will not need it for a new commit either. Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2012-11-27protocol: Add a wl_surface request for setting buffer transformationAnder Conselvan de Oliveira1-3/+31
This request allows a client to render its contents according to the output transform, enabling the compositor to use optimizations such as overlays, hardware cursors, scan out of a client buffer for fullscreen surface, etc, even if the output is rotated.
2012-11-23doc: Fix typosTiago Vignatti1-1/+1
Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
2012-11-19Fix distcheck by adding back protocol/Makefile.amKristian Høgsberg1-0/+1
5909dddc78573774bd3a93c280831a7d18d82994 removed protocol/Makefile.am which meant protocol/wayland.xml no longer got included in the tarball. Add back protocol/Makefile.am and configure.ac bits and add protocol to subdirs in Makefile.am to fix this.
2012-11-19protocol: Fix copy and paste summaryKristian Høgsberg1-1/+1
2012-11-19protocol: Add summary description for wl_data_device_managerKristian Høgsberg1-0/+8
2012-11-12doc: Remove unused css and xslt for the protocolTiago Vignatti3-254/+0
This was added previously (commit 015c42e1) when we didn't have docbook formatted documentation. Now it became quite useless. Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
2012-10-21wayland: Add protocol documentation for various interfacesKristian Høgsberg1-13/+94
2012-10-16protocol: try to clarify wl_buffer docPekka Paalanen1-15/+13
Fix few typos in wl_buffer description. Mention backing storage in wl_buffer.destroy. Try to clarify the wl_buffer.release semantics by not explaining what *might* happen. It is important to not suggest, that if release does not come before frame callback, it will not come before attaching a new buffer to the surface. We want to allow the following scenario: The compositor is able to texture from wl_buffers directly, but it also keeps a copy of the surface contents. The copy is updated when the compositor is idle, to avoid the performance hit on wl_surface.attach/commit. When the copy completes some time later, the server sends the release event. If the client has not yet allocated a second buffer (e.g. it updates rarely), it can reuse the old buffer. Reported-by: John Kåre Alsaker <john.kare.alsaker@gmail.com> Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2012-10-16protocol: say update instead of repaintPekka Paalanen1-2/+2
wl_surface.commit itself does not force any repainting unless there is damage, so change the wording to not imply repainting. Reported-by: John Kåre Alsaker <john.kare.alsaker@gmail.com> Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2012-10-16protocol: Clarify pointer axis eventJonas Ådahl1-4/+16
Pointer axis events are in the same coordinate space as motion events. Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
2012-10-15protocol: Clarify pointer axis eventJonas Ådahl1-1/+4
Pointer axis events are in the same coordinate space as motion events. Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
2012-10-11protocol: clarify multiple wl_surface.attachPekka Paalanen1-1/+3
Explicitly say what happens with the wl_buffer.release event, if you attach several wl_buffers without a commit in between. Reported-by: David Herrmann <dh.herrmann@googlemail.com> Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2012-10-11protocol: fix clarification of input region on drags and pointersPekka Paalanen1-7/+11
The previous clarification did not follow the current implementation in Weston, where when a surface stops being a cursor or an icon, it becomes a plain unmapped surface again. Rewrite the related paragraphs, and fix some typos while at it. For start drag, make it explicit of which surface argument we are talking about. v2: Make the input region undefined when the use ends. Most likely no-one will re-use these surfaces for anything else than the same use case, so leave some slack for the implementations to avoid useless work on resetting the regions. Reported-by: Ander Conselvan de Oliveira <conselvan2@gmail.com> Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2012-10-10protocol: elaborate on wl_bufferPekka Paalanen1-1/+17
Spell out exactly when a client may re-use a wl_buffer or its backing storage. Mention the optimization for GL-compositor with wl_shm-clients. Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2012-10-10protocol: wl_surface.frame needs wl_surface.commitPekka Paalanen1-1/+11
Clarify, when frame request takes effect. Explain when to send/receive the callback. Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2012-10-10protocol: clarify input region on drags and pointersPekka Paalanen1-4/+16
Drag icon and cursor surfaces must never receive input, so their input region is always empty. Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2012-10-10protocol: double-buffered state for wl_surfacePekka Paalanen1-23/+98
This change breaks the protocol. The current protocol is racy in that updates to surface content and surface state (e.g. damage, input and opaque regions) are not guaranteed to happen at the same time. Due to protocol buffering and handling practices, the issues are very hard to trigger. Committing damage to a surface at arbitrary times makes it hard to track when the wl_buffer is being read by the server, and when it is safe to overwrite (the case of wl_shm with a single buffer reused constantly). This protocol change introduces the concept of double-buffered state. Such state is accumulated and cached in the server, unused, until the final commit request. The surface will receive its new content and apply its new state atomically. A wl_surface.commit request is added to the protocol. This is thought to be more clear, than having wl_surface.attach committing implicitly, and then having another request to commit without attaching, as would be required for a GL app that wants to change e.g. input region without redrawing. When these changes are implemented, clients do not have to worry about ordering damage vs. input region vs. attach vs. ... anymore. Clients set the state in any order they want, and kick it all in with a commit. The interactions between wl_surface.attach, (wl_surface.commit,) wl_buffer.release, and wl_buffer.destroy have been undocumented. Only careful inspection of the compositor code has told when a wl_buffer is free for re-use, especially for wl_shm and wrt. wl_surface.damage. Try to clarify how it all should work, and what happens if the wl_buffer gets destroyed. An additional minor fix: allow NULL argument to wl_surface.set_opaque_region. The wording in the documentation already implied that a nil region is allowed. Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2012-10-10Split the global registry into its own wl_registry objectKristian Høgsberg1-15/+22
The only way to make the global object listener interface thread safe is to make it its own interface and make different listeners different wl_proxies. The core of the problem is the callback we do when a global show up or disappears, which we can't do with a lock held. On the other hand we can't iterate the global list or the listener list without a lock held as new globals or listeners may come and go during the iteration. Making a copy of the list under the lock and then iterating after dropping the lock wont work either. In case of the listener list, once we drop the lock another thread may unregister a listener and destroy the callbackk data, which means that when we eventually call that listener we'll pass it free memory and break everything. We did already solve the thread-safe callback problem, however. It's what we do for all protocol events. So we can just make the global registry functionality its own new interface and give each thread its own proxy. That way, the thread will do its own callbacks (with no locks held) and destroy the proxy when it's no longer interested in wl_registry events.
2012-10-10scanner: Send interface name and version for types new_id argsKristian Høgsberg1-4/+2
This makes the scanner generate the code and meta data to send the interface name and version when we pass a typeless new_id. This way, the generic factory mechanism provided by wl_display.bind can be provided by any interface.