Commit graph

183 commits

Author SHA1 Message Date
Derek Foreman 45641affe2 text: Fix some typos
Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
2014-12-15 17:26:16 +02:00
Nobuhiko Tanibata 68cfabb89b protocol: ivi hmi controller protocol to set up IVI style UI
- introduces ivi-hmi-controller.xml

This protocol realizes following features,
- UI ready
- changing modes; tiling, side by side, full_screen, and random
- Give control a surface; workspace to be controlled by using ivi layout
  APIs
- Display/undisplay a surface; home contains sevaral workspaces to
  launch applications

Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
Acked-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2014-12-04 17:13:41 +02:00
Nobuhiko Tanibata bff1b4a596 protocol: add interface ivi_application extension
- introduces ivi-application.xml

Many applications in an IVI-system are special single-purpose
applications that have a very specific role in the whole IVI UI, for
example a rear camera, speedometer, map, etc. The IVI system vendor
specifies what these are and how they integrate into the UI. They also
vary between particular IVI systems. This is why we use (system-)global,
unique, pre-determined ID numbers to tell what wl_surface is which
application, instead of writing specific shell requests for each one.
Using ID numbers allows vendors to easily invent new component
applications without extending or breaking the actual Wayland protocol.
In IVI-systems, the ID is a standard concept already used in several
APIs, with a vendor-specified global definition of ID assignments.

Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2014-12-04 17:13:41 +02:00
Seedo Eldho Paul 95292f22f4 protocol: Fix some typos in protocol files
Signed-off-by: Seedo Eldho Paul <seedoeldhopaul@gmail.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2014-11-19 13:55:00 +02:00
Pekka Paalanen d7cd1480d4 protocol: add role error code to xdg_shell
Needed for properly reporting role violations from
xdg_shell.get_xdg_surface and .get_xdg_popup.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Jasper St. Pierre <jstpierre@mecheye.net>
Acked-by: Jason Ekstrand <jason.ekstrand@intel.com>
2014-10-08 13:15:45 +03:00
Pekka Paalanen 7e62d25257 protocol: add presentation extension v5
Add accurate presentation timing features to Wayland: queueing and
feedback.

This specification is based on the draft written by Frederic Plourde
<frederic.plourde@collabora.co.uk> and redesigned by Pekka Paalanen.

The RFC v2 version is from
http://lists.freedesktop.org/archives/wayland-devel/2014-January/012988.html

Changes in v3:

* associate presentation time to current surface contents

This implements the suggestion from
http://lists.freedesktop.org/archives/wayland-devel/2014-February/013066.html

which prevents surface content from jumping backwards in time if a
client retroactively queues an update with a target time in the past.

* use 64-bit tv_sec in presentation

The time_t type used in struct timespec could be almost anything. POSIX
probably defines it to be an integer, but not the size. Apparently it is
usually 'long', which makes it 64-bit on x86_64.

To be able to fully represent timespec values returned by clock_gettime,
change the protocol to use 64 bits for the tv_sec part.

* define an error for invalid tv_nsec

This allow us to rely on the normalized timestamp form.

* define some interactions with sub-surfaces

Sub-surface cached state updates (synchronized mode) are designed
especially for resizing. As queued updates are not meant to produce any
resizing-like effects, they also do not trigger any sub-surface
operations.

* add sub-headings as xml comments

* queued update cannot map

Because before mapping, the surface has no main output assigned. An
immediate commit is needed anyway, to be able to set all the surface
state, which a queued update cannot touch.

* frame callbacks are not queued

It is not known when queueing frame callbacks would be useful.

Changes in v4:

* remove mentions of the queuing feature

The specification has been split and the queuing feature will be added
back in another version of the extension.

* add flags argument to 'presented' event

Describe the nature of how the update was presented to screen and the
characteristics of the feedback information. No flags have been
defined for now.

* add a protocol error code for invalid flags

Changes in v5:

* remove the destroy method for the feedback object

The protocol object should instead be automatically destroyed after
a 'presented' or 'discarded' event has been triggered.

* some grammatical corrections to the specification

[Louis-Francis Ratté-Boulianne: split the spec in two parts]

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Signed-off-by: Louis-Francis Ratté-Boulianne <lfrb@collabora.com>
v3 Reviewed-by: Mario Kleiner <mario.kleiner.de@gmail.com>
2014-09-30 11:35:38 +03:00
Pekka Paalanen ca3626074a protocol: fix a wrong word in wl_viewport.set_source
Obvious this affects the source, not destination.

Reported-by: Jasper St. Pierre <jstpierre@mecheye.net>
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2014-08-27 15:46:22 +03:00
Pekka Paalanen 71182aed84 xdg-shell: bump experimental protocol version
The experimental versioning has not been updated when it was supposed
to. Let's try to be better at it now, as xdg-shell is close to have its
first stable version.

Bump the version now to bring the world into the same exact version.

There may be some protocol changes still coming, but we try to land them
before 1.6 gets out. Those changes will bump the experimental version
again as needed.

When 1.6.0 is released, the experimental version will no longer be
bumped, and no incompatible protocol changes will be made. Xdg-shell.xml
file will move to Wayland in 1.7.0, drop the experimental versioning,
and become stable.

Cc: Jasper St. Pierre <jstpierre@mecheye.net>
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2014-08-21 17:47:20 +03:00
Jonny Lamb 765760dc71 desktop-shell: add set_panel_position to help place views onscreen
Panels are always assumed to be on the top edge of the output. If this
is not the case views will be placed under the panel, wherever it is,
and maximize doesn't use the correct space allocated for views.

By telling the server on which edge the panel is located, it can
correctly calculate where to put new views and how big maximized views
should be.

[Pekka Paalanen: the user of this protocol so far is Maynard.]

Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2014-08-20 17:06:19 +03:00
Jasper St. Pierre e7d7468521 xdg-shell: Fix documentation
request_change_state has been folded into the configure event.
2014-07-17 14:50:51 -07:00
Jasper St. Pierre ccf48fb4f9 shell: Replace set_margin with set_window_geometry
Currently, there is a fun flicker when toggling maximization or
fullscreen on a window in mutter or more sophisicated compositors
and WMs.

What happens is that the client want so go maximized, so we
calculate the size that we want the window to resize to (640x480),
and then add on its margins to find the buffer size (+10 = 660x500),
and then send out a configure event for that size. The client
renders to that size, realizes that it's maximized, and then
says "oh hey, my margins are actually 0 now!", and so the compositor
has to send out another configure event.

In order to fix this, make the the configure request correspond to
the window geometry we'd like the window to be at. At the same time,
replace set_margin with set_window_geometry, where we specify a rect
rather than a border around the window.
2014-07-17 13:59:01 -07:00
Boyan Ding 1478ea54ca xdg-shell: Fix a typo in description
Signed-off-by: Boyan Ding <stu_dby@126.com>
2014-06-24 10:19:03 -07:00
Jasper St. Pierre 81ff075bf4 xdg-shell: Add show_window_menu request 2014-05-23 09:43:17 -07:00
Jasper St. Pierre 973d7879e3 xdg-shell: Turn "activated" into a state
This drops two events, and makes new window decorations race-free with
an attach in-flight.
2014-05-12 23:34:05 -07:00
Jasper St. Pierre 5befdda84f xdg-shell: Turn the resizing heuristics into an explicit state
Currently, there's a race condition. When resizing from the left, and
a client attaches a buffer after the resize ends, you suddenly see the
buffer jump to the right, because the resize ended while multiple
attaches were in-flight. Making resize a state can fix this, as the
server can now know exactly when the resize ended, and whether a commit
was before or after that place.

We don't implement the correct tracking in this commit; that's left as
an exercise to the reader.

Additionally, clients like terminals might want to display resize popups
to display the number of cells when in a resize. They can use the hint
here to figure out whether they are resizing.
2014-05-12 23:34:05 -07:00
Jasper St. Pierre ab2c108137 xdg-shell: Rework the state system
The states system, so far, has been a complicated mix of weird APIs
that solved a real race condition, but have been particularly ugly
for both compositors and clients to implement.
2014-05-12 23:33:59 -07:00
Jasper St. Pierre c815d62b85 xdg-shell: Rename set_transient_for to set_parent
It's a confusing name that comes from the ICCCM. The ICCCM is best
forgotten about.

With the addition of the potential new "transient" role meaning a
parent-relative toplevel like a long-lived popup, used for e.g.
tooltips, the set_transient_for name will become even more confusing.
2014-05-13 00:35:30 -04:00
Jonas Ådahl 9b05909954 desktop-shell: Fix order of desktop_shell messages
There was a bug in wayland-scanner that failed to detect when an
message with implicitly set version (i.e. version 1) came after a
message with a newer version. This patch fixes the weston desktop shell
protocol to pass again.

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
2014-05-12 10:05:28 -07:00
Bryce W. Harrington 13600c02af protocol: Correct typo 'suppot'
Signed-off-by: Bryce Harrington <b.harrington@samsung.com>
2014-04-10 11:59:30 -07:00
Pekka Paalanen 2c8b5f534b protocol: unify wl_viewport src and dst size rules
Let's make the source and destination size rules consistent: neither can
have zero, {-1, -1} disables it, and other negatives are not allowed.

The sanity of allowing zero sized source rectangle as debatable. Now the
minimum becomes 1/256x1/256, and with output_scale the actual samples
may be even smaller. That should be enough.

On not allowed values, raise a protocol error. This should help catch
bugs in clients that accidentally send garbage values.

The old wl_viewport.set request remains the same, and can still produce
zero sized source rectangle.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2014-04-06 22:38:15 -07:00
Kristian Høgsberg 757d8aff27 xwayland: Use new Xwayland DDX 2014-04-06 22:32:24 -07:00
Jason Ekstrand ca6f73b636 Add a fullscreen shell protocol
Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
2014-04-02 21:24:34 -07:00
Giulio Camuffo 0ea14f51e5 xdg-shell: rename the xdg_surface.delete event to close.
'close' is more consistent with the purpose of the event than
'delete', and it is also c++ friendly, since 'delete' is a keyword.

Reviewed-by: Jasper St. Pierre <jstpierre@mecheye.net>
2014-04-01 16:46:41 -07:00
Pekka Paalanen 0b4c535d73 protocol,compositor: split wl_viewport setters
Bump wl_scaler and wl_viewport versions to 2. Add new requests
wl_viewport.set_source and .set_destination, which are meant to replace
wl_viewport.set request.

Now a client can set and unset just one of source rectangle and
destination size. Define the semantics when one of these is unset.

Implement these semantics changes in compositor and pixman renderer.
GL-renderer does not need changes.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2014-04-01 16:46:40 -07:00
Kristian Høgsberg 97b52203aa xdg-shell: Improve documentation for use_unstable_version request
Clarify that this is for catching protocol mismatch while the protocol
is under development.
2014-02-19 10:24:46 -08:00
Kristian Høgsberg c7680b09dd xdg-shell: Bump unstable version to 3 2014-02-19 10:14:46 -08:00
Jasper St. Pierre 8c6aa45f97 xdg-shell: Replace the set_* atrocity with a new approach
Rather than require that the client implement two methods for every state,
simply have one global request, change_state, and one global event,
request_change_state.
2014-02-19 09:50:40 -08:00
Jasper St. Pierre b223a72147 xdg-shell: Rename focused_set / focused_unset to activated / deactivated
To try and make the distinction between this event and keyboard focus.
2014-02-18 16:39:01 -08:00
Jasper St. Pierre 981aad5b7e xdg-shell: Remove "edges" from description
The parameter was dropped...
2014-02-18 14:08:05 -08:00
Kristian Høgsberg 239902b323 client: Fix shell unstable version check
Use a static assert to catch mismatch between implementation and
interface version.  Fix window.c to not use XDG_SHELL_VERSION_CURRENT,
which will fail to catch version mismatches.  The implementation version
must updated manually when the implementation is updated to use the new
interface.
2014-02-11 16:22:10 -08:00
Kristian Høgsberg 2bff94e057 xdg-shell: Move "ping" and "pong" to xdg_shell, not xdg_surface
Responsivenes is a per-client thing so we move the ping/pong functionality
to xdg_shell.  Having this per-window was carries over from the EWMH
protocol, where the WM has no other way to do this.  In wayland, the
compositor can directly ping the client that owns the surface.
2014-02-11 16:22:10 -08:00
Jasper St. Pierre 7407345446 xdg-shell: Add set_margin request
This is used to figure out the size of "invisible" decorations, which we'll
use to better know the visible extents of the surface, which we can use for
constraining, titlebars, and more.
2014-02-06 13:05:03 -08:00
Jasper St. Pierre 2097fe12d4 xdg-shell: Add a "delete" event
This is equivalent to WM_DELETE_WINDOW request under X11, or equivalent
to pressing the "close" button under CSD. Weston currently doesn't have
a compositor-side way to close the window, so no new code is needed on
its side.
2014-02-06 13:05:03 -08:00
Kristian Høgsberg 44cd1968f2 xdg-shell: Drop edges arg from xdg_surface configure event 2014-02-05 21:37:58 -08:00
Kristian Høgsberg f9bc6f63fb build: Move protocol/Makefile.am into toplevel Makefile.am 2014-02-01 00:08:39 -08:00
Pekka Paalanen b0420aeb3d protocol: rename wl_surface_scaler to wl_viewport
This seems like a better name, and will not conflict if someone later
extends wl_surface with a request scaler_set (yeah, unlikely).

This code was written by Jonny Lamb, I just diffed his branches and made
a patch for Weston.

Cc: Jonny Lamb <jonny.lamb@collabora.co.uk>
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2014-01-08 21:33:19 -08:00
Pekka Paalanen f565d80ff5 protocol: crop & scale RFC v3
Add cropping and scaling to wl_surface.

Add a global factory interface wl_scaler, which creates
wl_scaler_surface objects tied to a given wl_surface. The
wl_scaler_surface object can be used to set a cropping and scaling
transformation to change how a wl_buffer maps to wl_surface contents.

Changes in v2:

Take into account buffer_transform and buffer_scale, and try to explain
more clearly how the coordinate transformations work and what their
order is. Add, that crop and scale state is double-buffered. Explain
missing dst_x, dst_y.  Clarify that undefined content still is some
content, but NULL buffer implies no content nor size.

Changes in v3:

Disallow zero values for dst_width and dst_height.

Open issues:

Should this be a separate interface like here, or just a wl_surface
request?

If we keep this as a separate interface, rename wl_surface_scaler to
wl_viewport.
2013-12-16 22:35:56 -08:00
Neil Roberts 40c0c3f91e tests: Test whether a simple EGL main loop uses too many buffers
This adds a test that tries to simulate a simple game loop that would
be like this:

while (1) {
        draw_something();
        eglSwapBuffers();
}

In this case the test is relying on eglSwapBuffers to throttle to a
sensible frame rate.

The test then verifies that only 2 EGL buffers are used. This is done
via a new request and event in the wayland-test protocol.

Currently this causes 3 buffers to be created because the release
event generated by the swap buffers is not processed by Mesa until it
blocks for the frame complete event in the next swap buffers call, but
that is too late.

This can be fixed in Mesa by issuing a sync request after the swap
buffers and blocking on it before deciding whether to allocate a new
buffer.
2013-12-07 22:26:23 -08:00
Kristian Høgsberg 873b515aee tablet-shell: Remove
The tablet-shell is unmaintained and unused.  It is currently
dead-weight and a burden when we make changes to weston.  Let's
drop it for now, we can pull it out of git if we find a need for it later.
2013-12-04 10:18:29 -08:00
Rafael Antognolli 3c4dc74ceb xdg_shell: Adding a new shell protocol.
xdg_shell is a protocol aimed to substitute wl_shell in the long term,
but will not be part of the wayland core protocol. It starts as a
non-stable API, aimed to be used as a development place at first, and
once features are defined as required by several desktop shells, we can
finally make it stable.

It provides mainly two new interfaces: xdg_surface and xdg_popup.

The xdg_surface interface implements a desktop-style window, that can be
moved, resized, maximized, etc. It provides a request for creating
child/parent relationship, called xdg_surface.set_transient_for.

The xdg_popup interface implements a desktop-style popup/menu. A
xdg_popup is always transient for another surface, and also has implicit
grab.
2013-12-03 11:35:24 -08:00
Pekka Paalanen a662206e71 protocol: move sub-surfaces to Wayland
This reverts commit 2396aec684.

This exact version of the sub-surface protocol has been copied into
Wayland core. Therefore it must be removed from here to avoid build
conflicts and useless duplication.

No other changes to sub-surface protocol consumers are needed, the
identical API is now offered by libwayland-client and libwayland-server.

The commit adding sub-surfaces to Wayland is:
Author: Pekka Paalanen <pekka.paalanen@collabora.co.uk>

    protocol: add sub-surfaces to the core

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2013-11-15 16:23:17 -08:00
Peter Hutterer 64db37e53c protocol: hook up xmllint to check validity 2013-10-25 10:58:15 -07:00
Kristian Høgsberg 31b4a0dcc0 protocol: Add missing xml files to EXTRA_DIST
Reported by Sven Joachim <svenjoac@gmx.de>
2012-02-26 22:29:18 -05:00
Pekka Paalanen 79346ab3a5 shell: wait for desktop-shell init before fade in
On Raspberry Pi, weston-desktop-shell is so slow to start, that the
compositor has time to run the fade-in before the wallpaper is up. The
user launching Weston sees the screen flipping to black, the fbcon
fading in, and then the desktop popping up.

To fix this, wait for the weston-desktop-shell to draw
everything before starting the initial fade-in. A new request is
added to the private desktop-shell protocol to signal it. If a
desktop-shell client does not support the new request, the fade-in
happens already at bind time.

If weston-desktop-shell crashes, or does not send the 'desktop_ready'
request in 15 seconds, the compositor will fade in anyway. This should
avoid a blocked screen in case weston-desktop-shell malfunction.

shell_fade_startup() does not directly start the fade-in but schedules
an idle callback, so that the compositor can process all pending events
before starting the fade clock. Otherwise (on RPi) we risk skipping part
of the animation. Yes, it is a hack, that should have been done in
window.c and weston-desktop-shell instead.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2013-05-22 18:07:30 -04:00
Pekka Paalanen 419e2bae92 protocol: improve sub-surface spec wording
Mention, that sub-surfaces are not clipped to the parent.
Be more accurate on surface commit vs. apply state.
Mention the initial stacking order.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2013-05-20 10:30:58 -04:00
Pekka Paalanen 5545320c36 protocol: remove an unused sub-surface error code
This was left over from allowing nesting.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2013-05-17 16:22:24 -04:00
Pekka Paalanen 16abf6a4d4 protocol: set_desync should flush
wl_subsurface.set_desync should apply the cached wl_surface state.
Otherwise, the sub-surface may be stuck: a commit on the parent surface,
if desynchronized, will not commit the sub-surface because it is
desynchronized, too. A commit on the sub-surface may not happen, if it
is waiting for the frame callback from the previous commit.

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2013-05-17 16:21:50 -04:00
Pekka Paalanen 2396aec684 protocol: add sub-surfaces
Add protocol for sub-surfaces, wl_subcompositor as the global interface,
and wl_subsurface as the per-surface interface extension.

This patch is meant to be reverted, once sub-surfaces are moved into
Wayland core.

Changes in v2:

- Rewrite wl_subcompositor.get_subsurface description, and move mapping
  and commit details into wl_subsurface description. Check the wording
  in wl_subsurface.set_position description.

- Add wl_subsurface.set_commit_mode request, and document it, with the
  commit_mode enum. Add bad_value error code for wl_subsurface.

- Moved the protocol into Weston repository so we can land it upstream
  sooner for public exposure. It is to be moved into Wayland core later.

- Add destroy requests to both wl_subcompositor and wl_subsurface, and
  document them. Experience has showed, that interfaces should always
  have a destructor unless there is a good and future-proof reason to not
  have it.

Changes in v3:

- Specify, that wl_subsurface will become inert, if the corresponding
  wl_surface is destroyed, instead of requiring a certain destruction
  order.

- Replaced wl_subsurface.set_commit_mode with wl_subsurface.set_sync and
  wl_subsurface.set_desync. Parent-cached commit mode is now called
  synchronized, and independent mode is desynchronized. Removed
  commit_mode enum, and bad_value error.

- Added support for nested sub-surfaces.

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2013-05-10 14:05:59 -04:00
Jan Arne Petersen cc75ec11ca text: Rename input_method to wl_input_method
Also rename input_method_context to wl_input_method_context,
input_panel to wl_input_panel and input_panel_surface to
wl_input_panel_surface.

Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>
2013-05-02 17:18:46 -04:00
Jan Arne Petersen 2f51d8a2ff text: Improve protocol documentation.
Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>
2013-05-02 17:12:21 -04:00
Jan Arne Petersen 70d942b4d7 text: Rename ::set_panel to ::set_overlay_panel
Also add documentation to input_panel_surface::set_overlay_panel.

Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>
2013-05-02 17:12:02 -04:00
Jan Arne Petersen 62ece76b1e text: Rename text_input to wl_text_input
Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>
2013-05-02 17:06:27 -04:00
Jan Arne Petersen 00191c7c4a text: Fix serial handling
Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>
2013-05-02 16:41:48 -04:00
Jan Arne Petersen 7cd29e199a text: Add output argument to set_toplevel
Allow to specify an output for a toplevel  input panel surface.

Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>
2013-05-02 16:41:47 -04:00
Jan Arne Petersen 14da96bf81 text: Add support for panels following the cursor
Add input_panel_surface::set_panel to specify input panel surfaces which
are overlaying the application and are following the input cursor.

Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>
2013-05-02 16:41:47 -04:00
Jan Arne Petersen 85ecaa5d75 text: Add "none" preedit-style
Use "default" preedit style as default. "None" is used when the
composing text should look like non-composing text.

Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>
2013-05-02 16:23:46 -04:00
Jan Arne Petersen 78d00e45cc text: Rename text_model to text_input
Also rename text_model_factory to text_input_manager.

Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>
2013-05-02 16:23:35 -04:00
Jan Arne Petersen 7ef8effca5 text: Order requests and events in a nice way
Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>
2013-05-02 16:23:14 -04:00
Jan Arne Petersen fa3573852d text: rename text_model::commit to commit_state
Use ::commit_state as a request name to make clear what is commited.

Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>
2013-05-02 16:22:36 -04:00
Krzesimir Nowak 8418a0cc8d text: Fix some text and input-method docs
Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>
2013-05-02 16:22:22 -04:00
Krzesimir Nowak f62e8cfae7 text: Fix password content hint value
0xc in this case was a combination of "autocapitalization" (0x4) and
"lowercase" (0x8) instead of "hidden_text" (0x40) and "sensitive_data"
(0x80).

Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>
2013-05-02 16:22:07 -04:00
Jan Arne Petersen ece6b5af51 text: Add language and text-direction to protocol
Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>
2013-05-02 16:21:18 -04:00
Jan Arne Petersen 1cc9e08d2f text: Split out cursor_position
Add an extra cursor_position, which also allows to change the anchor
(for slections). Change the index type to int to allow setting it before
the beginning of a commited string.

The cursor should not be moved as a direct repsonse to this event but
atomically on the next commit_string event.

Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>
2013-02-15 17:08:01 -05:00
Jan Arne Petersen 964b517c9b text: Rename set_micro_focus request
Rename set_micro_focus to set_cursor_rectangle to make more clear, what
it refers to.

Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>
2013-02-15 17:07:42 -05:00
Jan Arne Petersen 6138197337 text: Add show/hide_input_panel requests
Allows to show/hide the input panel (virtual keyboard) more independent
of focus (some applications might to require additionaly click on a
focused entry to show the input panel).

Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>
2013-02-15 17:07:35 -05:00
Jan Arne Petersen 0eabcaafae text: Add commit request
Allows for atomic state changes. Updated surrounding text, content type
and micro focus is taken into account all at once at commit.

Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>
2013-02-15 17:07:03 -05:00
Jan Arne Petersen f255165bd4 text: Remove unused requests/events
Put them back in, when we know what arguments they will have.

Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>
2013-02-15 17:06:48 -05:00
Jan Arne Petersen ffbb20f730 text: Move input_panel interface to input-method
Move the input_panel interface from desktop-shell to input-method (since
it is not really tied to desktop-shell).

Add an input_panel_surface interface like wl_shell_surface to make it
easier to extend it. Also add a parameter to the set_toplevel request to
be able to specify where to show an input panel surface on the screen.

Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>
2013-02-15 17:05:04 -05:00
Jan Arne Petersen 8746ba0d29 doc: add some more text protocol documentation
Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>
2013-02-15 17:02:42 -05:00
Jan Arne Petersen adfedc1965 text: add support for invoke_action request
Add a request to be called by the client when the word currently being
composed is tapped by the user. Input methods often use this information
to offer more word suggestions to the user.

Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>
2013-02-15 17:00:46 -05:00
Jan Arne Petersen 26ffa814d9 text: Add content type support to text protocol
Support content types in text protocol. Content is defined by a hint
bitmask and a purpose field.

Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>
2013-02-15 17:00:15 -05:00
Jan Arne Petersen c7d2a9839b text: add serial argument to text protocol
The serial argument will allow to ignore outdated events from before a
reset request.

Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>
2013-02-15 16:55:37 -05:00
Jan Arne Petersen 4653531e7a text: add pre-edit styling support to protocol
Also add a separate preedit-cursor event and add a commit argument to
preedit-string to allow to support commit on reset. Fix editor and
keyboard example to adapt to the protocol changes.

Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>
2013-02-15 16:55:27 -05:00
U. Artie Eoff 65e7e7a65b tests: Define and implement a test protocol extension.
The weston test extension, called weston-test.so, can be loaded
from the "modules" configuration option on the command line
or in the .ini file.

Clients can bind to the "wl_test" interface to interact with
the weston test extension.

Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
2012-12-11 15:29:52 -05:00
Jan Arne Petersen 337df952f8 text: Add support for forwarding key events
Allow an input method to forward (unfiltered) key and modifier events
from the hardware keyboard to the client.

Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>
2012-11-27 13:10:10 -05:00
Jan Arne Petersen 466b9c1047 text: Add support for grabbing the keyboard
Add support for requesting hardware input into an input method.

Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>
2012-11-27 13:09:07 -05:00
Jan Arne Petersen d9be93b964 text: Rename and extend text_model key event
Rename the key event in text_model to keysym and add serial, time and
modifiers arguments. Add a modifiers_map event to transfer an array of
0-terminated modifier names, so that a mapping of modifiers to the
modifier bit mask is possible.

Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>
2012-11-27 13:02:26 -05:00
Martin Olsson 3b132e358f Fix spelling errors 2012-10-04 11:24:50 -04:00
Jan Arne Petersen 680275fbf1 text: Rename de/activate to enter/leave
Also add a surface argument to the enter event.
2012-09-25 11:24:49 -04:00
Jan Arne Petersen 7bbdffabc7 text: Improve text protocol documentation
Add some missing descriptions to the text protocol file.
2012-09-13 16:34:18 -04:00
Jan Arne Petersen c1e481efb1 text: Add reset requets to protocol
Add a reset request to the text_model interface and a reset event to the
input_method_context interface. Use it to reset the pre-edit buffers in
the example keyboard when the cursor is moved in the example editor
client.

Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>
2012-09-12 16:52:53 -04:00
Jan Arne Petersen ce8a4433f5 text: Add support for control keys to the protocol
Add key event to the text_model interface and a key request to the
input_method_context interface. Implement it in the example editor
client and the example keyboard.

Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>
2012-09-12 16:52:41 -04:00
Jan Arne Petersen e202bae9d3 text: Add delete_surrounding_text to protocol
Add delete_surrounding_text event in the text_model interface and the
request in the input_method_context interface. Implement it in the
example editor client and in the example keyboard so that the backspace
key works with it.

Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>
2012-09-12 16:51:08 -04:00
Jan Arne Petersen 43f4aa8cab text: Add support for pre-edit string
Add support of preedit-string to the example editor client. Also add a
preedit_string request to the input_method_context interface and use
that in the example weston keyboard to first create a pre-edit string
when entering keys and commit it on space.

Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>
2012-09-12 16:50:44 -04:00
Jan Arne Petersen 30b66ef1fd text: Split text and input-method protocols
It makes sense to split the interfaces in a text and a input-method
protocol for now (only the text protocol needs to be used in toolkits).

Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>
2012-09-12 16:48:59 -04:00
Jan Arne Petersen cb08f4d844 text: Fix set_surrounding_text request
Add cursor and anchor positions as arguments to the set_surrounding_text
request. The cursor and anchor positions are relative to the surrounded
text, so it does not make sense to have that separate. Remove the
separate set_cursor_index and set_selected_text requests. Also update
the corresponding event in input-method-context and add support for it
in the weston example keyboard.

Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>
2012-09-12 16:38:00 -04:00
Jan Arne Petersen ae92a7a1a0 text: Add some documentation to the text protocol
Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>
2012-09-12 16:35:07 -04:00
Jan Arne Petersen 620cd62cbd text: Introduce input_method_context interface
Add an input_method_context interface which is the representation of a
text_model on input_method side.

Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>
2012-09-12 16:34:59 -04:00
Jan Arne Petersen 4c26518ad1 text: Remove surface arg in create_text_model
Remove the wl_surface argument from create_text_model request. The
wl_surface is specified as an argument in the activate request instead.

Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>
2012-09-12 16:28:04 -04:00
Jonas Ådahl e9d2250549 shell: Introduce workspace manager interface
The workspace manager interface purpose is to provide clients with
control and knowledge about the current workspace state. Initially only
one function and one event exists; moving a surface and state updated
event. A workspace is represented as an index in a 1 dimensional array.

A client keeps track of the state by being broadcasted events when the
state changes, currently limited to current workspace or number of
workspaces available.

A client can send an asynchronous request to the manager asking to move
a surface to workspace identified by an index. It is up to the shell to
actually move it.

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
2012-08-31 19:51:49 -04:00
Jan Arne Petersen e829adc514 text: Assign text_model to a wl_seat
Add a wl_seat argument to the activate and deactivate requests of
text_method.

On activation a text_model gets assigned to the input_method of the
wl_seat specified in the activate request.
2012-08-10 13:00:52 -04:00
Jan Arne Petersen de3b6a15c0 text: Add activate/deactivate events
Let the client know when a text model gets activated or deactiavted.
2012-08-10 13:00:52 -04:00
Jan Arne Petersen 5196374218 text: Rename text_model_manager to factory
The text_model_manager interface is just used to create text_model
instances. It is more a factory than a manager so rename it to
text_model_factory.
2012-08-10 13:00:52 -04:00
Philipp Brüschweiler f25602bdc0 Extract the text_model_manager interface from input_method
This is necessary because all clients need a way to create
text_models, but only one client at a time can be bound to
the input_method global (else we don't know to whom we are
supposed to send events).
2012-07-22 12:06:10 -04:00
Ander Conselvan de Oliveira b9d2a0fc0a shell: Show approprite cursors during move and resize grabs
This patch expands the busy cursor mechanism so that it is possible for
the desktop-shell client to show the appropriate cursor during grabs.
2012-06-28 14:13:57 -04:00
Kristian Høgsberg 0636ac307e shell: Make input_panel just a regular wl_surface 2012-06-27 10:24:21 -04:00
Kristian Høgsberg 1a73a6335d shell: Make screensaver just a wl_surface 2012-06-27 10:24:21 -04:00
Kristian Høgsberg 730c94d62e shell: Make the lock surface just a plain wl_surface too 2012-06-27 10:24:21 -04:00
Kristian Høgsberg af7b1ffaf4 shell: Make panel just a wl_surface too 2012-06-27 10:24:21 -04:00
Kristian Høgsberg 962342cb8e shell: Don't make desktop_shell background a wl_shell_surface
We don't gain anything from taking a wl_shell_surface in
desktop_surface.set_background, except making wl_shell_surface
gratuitously dependent on wl_shell.  In shell.c we can also handle
backgrounds in their own background_configure function which simplifies
the mapping and placement logic.
2012-06-26 16:29:53 -04:00