mirror of
https://github.com/WayfireWM/wf-osk.git
synced 2025-08-31 08:12:15 +02:00
Initial code
Note that numeric and shift layout don't work yet.
This commit is contained in:
37
proto/meson.build
Normal file
37
proto/meson.build
Normal file
@@ -0,0 +1,37 @@
|
||||
wl_protocol_dir = wayland_protos.get_pkgconfig_variable('pkgdatadir')
|
||||
|
||||
wayland_scanner = find_program('wayland-scanner')
|
||||
|
||||
wayland_scanner_code = generator(
|
||||
wayland_scanner,
|
||||
output: '@BASENAME@-protocol.c',
|
||||
arguments: ['private-code', '@INPUT@', '@OUTPUT@'],
|
||||
)
|
||||
|
||||
wayland_scanner_client = generator(
|
||||
wayland_scanner,
|
||||
output: '@BASENAME@-client-protocol.h',
|
||||
arguments: ['client-header', '@INPUT@', '@OUTPUT@'],
|
||||
)
|
||||
|
||||
client_protocols = [
|
||||
'wayfire-shell.xml',
|
||||
'virtual-keyboard-unstable-v1.xml'
|
||||
]
|
||||
|
||||
wl_protos_src = []
|
||||
wl_protos_headers = []
|
||||
|
||||
foreach p : client_protocols
|
||||
xml = join_paths(p)
|
||||
wl_protos_headers += wayland_scanner_client.process(xml)
|
||||
wl_protos_src += wayland_scanner_code.process(xml)
|
||||
endforeach
|
||||
|
||||
lib_wl_protos = static_library('wl_protos', wl_protos_src + wl_protos_headers,
|
||||
dependencies: [wayland_client]) # for the include directory
|
||||
|
||||
wf_protos = declare_dependency(
|
||||
link_with: lib_wl_protos,
|
||||
sources: wl_protos_headers,
|
||||
)
|
113
proto/virtual-keyboard-unstable-v1.xml
Normal file
113
proto/virtual-keyboard-unstable-v1.xml
Normal file
@@ -0,0 +1,113 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<protocol name="virtual_keyboard_unstable_v1">
|
||||
<copyright>
|
||||
Copyright © 2008-2011 Kristian Høgsberg
|
||||
Copyright © 2010-2013 Intel Corporation
|
||||
Copyright © 2012-2013 Collabora, Ltd.
|
||||
Copyright © 2018 Purism SPC
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a
|
||||
copy of this software and associated documentation files (the "Software"),
|
||||
to deal in the Software without restriction, including without limitation
|
||||
the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
and/or sell copies of the Software, and to permit persons to whom the
|
||||
Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice (including the next
|
||||
paragraph) shall be included in all copies or substantial portions of the
|
||||
Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
DEALINGS IN THE SOFTWARE.
|
||||
</copyright>
|
||||
|
||||
<interface name="zwp_virtual_keyboard_v1" version="1">
|
||||
<description summary="virtual keyboard">
|
||||
The virtual keyboard provides an application with requests which emulate
|
||||
the behaviour of a physical keyboard.
|
||||
|
||||
This interface can be used by clients on its own to provide raw input
|
||||
events, or it can accompany the input method protocol.
|
||||
</description>
|
||||
|
||||
<request name="keymap">
|
||||
<description summary="keyboard mapping">
|
||||
Provide a file descriptor to the compositor which can be
|
||||
memory-mapped to provide a keyboard mapping description.
|
||||
|
||||
Format carries a value from the keymap_format enumeration.
|
||||
</description>
|
||||
<arg name="format" type="uint" summary="keymap format"/>
|
||||
<arg name="fd" type="fd" summary="keymap file descriptor"/>
|
||||
<arg name="size" type="uint" summary="keymap size, in bytes"/>
|
||||
</request>
|
||||
|
||||
<enum name="error">
|
||||
<entry name="no_keymap" value="0" summary="No keymap was set"/>
|
||||
</enum>
|
||||
|
||||
<request name="key">
|
||||
<description summary="key event">
|
||||
A key was pressed or released.
|
||||
The time argument is a timestamp with millisecond granularity, with an
|
||||
undefined base. All requests regarding a single object must share the
|
||||
same clock.
|
||||
|
||||
Keymap must be set before issuing this request.
|
||||
|
||||
State carries a value from the key_state enumeration.
|
||||
</description>
|
||||
<arg name="time" type="uint" summary="timestamp with millisecond granularity"/>
|
||||
<arg name="key" type="uint" summary="key that produced the event"/>
|
||||
<arg name="state" type="uint" summary="physical state of the key"/>
|
||||
</request>
|
||||
|
||||
<request name="modifiers">
|
||||
<description summary="modifier and group state">
|
||||
Notifies the compositor that the modifier and/or group state has
|
||||
changed, and it should update state.
|
||||
|
||||
The client should use wl_keyboard.modifiers event to synchronize its
|
||||
internal state with seat state.
|
||||
|
||||
Keymap must be set before issuing this request.
|
||||
</description>
|
||||
<arg name="mods_depressed" type="uint" summary="depressed modifiers"/>
|
||||
<arg name="mods_latched" type="uint" summary="latched modifiers"/>
|
||||
<arg name="mods_locked" type="uint" summary="locked modifiers"/>
|
||||
<arg name="group" type="uint" summary="keyboard layout"/>
|
||||
</request>
|
||||
|
||||
<request name="destroy" type="destructor" since="1">
|
||||
<description summary="destroy the virtual keyboard keyboard object"/>
|
||||
</request>
|
||||
</interface>
|
||||
|
||||
<interface name="zwp_virtual_keyboard_manager_v1" version="1">
|
||||
<description summary="virtual keyboard manager">
|
||||
A virtual keyboard manager allows an application to provide keyboard
|
||||
input events as if they came from a physical keyboard.
|
||||
</description>
|
||||
|
||||
<enum name="error">
|
||||
<entry name="unauthorized" value="0" summary="client not authorized to use the interface"/>
|
||||
</enum>
|
||||
|
||||
<request name="create_virtual_keyboard">
|
||||
<description summary="Create a new virtual keyboard">
|
||||
Creates a new virtual keyboard associated to a seat.
|
||||
|
||||
If the compositor enables a keyboard to perform arbitrary actions, it
|
||||
should present an error when an untrusted client requests a new
|
||||
keyboard.
|
||||
</description>
|
||||
<arg name="seat" type="object" interface="wl_seat"/>
|
||||
<arg name="id" type="new_id" interface="zwp_virtual_keyboard_v1"/>
|
||||
</request>
|
||||
</interface>
|
||||
</protocol>
|
168
proto/wayfire-shell.xml
Normal file
168
proto/wayfire-shell.xml
Normal file
@@ -0,0 +1,168 @@
|
||||
<protocol name="wayfire_shell">
|
||||
<interface name="zwf_shell_manager_v1" version="1">
|
||||
<description summary="DE integration">
|
||||
The purpose of this protocol is to enable the creation of different
|
||||
desktop-interface windows like panels, backgrounds, docks,
|
||||
lockscreens, etc. It also aims to allow the creation of full-blown
|
||||
DEs using Wayfire.
|
||||
|
||||
Note that in contrast to some other efforts to create a similar
|
||||
protocol, such as wlr-layer-shell, this isn't a new "shell" for
|
||||
giving a role to wl_surfaces. This protocol can be used with any
|
||||
type of toplevel surface (xdg_toplevel, xdg_toplevel_v6, etc.)
|
||||
to give them to the corresponding WM role.
|
||||
</description>
|
||||
|
||||
<request name="get_wf_output">
|
||||
<description summary="Create a wf_output from the given output"/>
|
||||
<arg name="output" type="object" interface="wl_output"/>
|
||||
<arg name="id" type="new_id" interface="zwf_output_v1"/>
|
||||
</request>
|
||||
|
||||
<request name="get_wm_surface">
|
||||
<description summary="Assign a role">
|
||||
Assign the given role to the given surface and add it to the
|
||||
given output. A client can specify a null output, in which case
|
||||
the compositor will assign the surface to the focused output,
|
||||
if any such output.
|
||||
|
||||
The role cannot be changed later, and neither can the surface be
|
||||
moved to a different output, except by the compositor.
|
||||
</description>
|
||||
|
||||
<arg name="surface" type="object" interface="wl_surface"/>
|
||||
<arg name="role" type="uint" enum="zwf_wm_surface_v1.role"/>
|
||||
<arg name="output" type="object" interface="wl_output" allow-null="true"/>
|
||||
<arg name="id" type="new_id" interface="zwf_wm_surface_v1"/>
|
||||
</request>
|
||||
</interface>
|
||||
|
||||
<interface name="zwf_output_v1" version="1">
|
||||
<description summary="A wrapper for wl_output">
|
||||
Represents a single output.
|
||||
Each output is managed independently from the others.
|
||||
</description>
|
||||
<event name="output_hide_panels">
|
||||
<description summary="Autohide/Show signal">
|
||||
Panels are always rendered on top, even above fullscreen windows.
|
||||
If autohide is 1, the event indicates that the panels should hide
|
||||
itself, by for example unmapping or sliding outside of the output.
|
||||
If autohide is 0, this means that the reason for the last request
|
||||
with autohide == 1 is no longer valid, i.e the panels can show
|
||||
themselves.
|
||||
|
||||
The output_hide_panels can be called multiple times with
|
||||
autohide = 1, and the panel should show itself only when
|
||||
it has received a matching number of events with autohide = 0
|
||||
</description>
|
||||
|
||||
<arg name="autohide" type="uint"/>
|
||||
</event>
|
||||
|
||||
<request name="inhibit_output">
|
||||
<description summary="Don't render the output">
|
||||
Request the compositor to not render the output, so
|
||||
the output usually is cleared to black color.
|
||||
To enable output rendering again, call inhibit_output_done
|
||||
</description>
|
||||
</request>
|
||||
|
||||
<request name="inhibit_output_done">
|
||||
<description summary="Render the output">
|
||||
Stop inhibiting the output. This must be called as many times
|
||||
as inhibit_output was called to actually uninhibit rendering.
|
||||
|
||||
The inhibit/inhibit_done requests can be called multiple times,
|
||||
even from different apps, so don't assume that a call to
|
||||
inhibit_done would always mean actually starting the rendering process.
|
||||
</description>
|
||||
</request>
|
||||
</interface>
|
||||
|
||||
<interface name="zwf_wm_surface_v1" version="1">
|
||||
<description summary="Surface with a WM role">
|
||||
Represents a surface with a specific WM role.
|
||||
It belongs to the output which it was created for.
|
||||
</description>
|
||||
|
||||
<enum name="role">
|
||||
<entry name="background" value="1"/>
|
||||
<entry name="bottom" value="2"/>
|
||||
<entry name="panel" value="3"/>
|
||||
<entry name="overlay" value="4"/>
|
||||
</enum>
|
||||
|
||||
<request name="configure">
|
||||
<description summary="Move the surface to the given output-local coordinates."/>
|
||||
|
||||
<arg name="x" type="int"/>
|
||||
<arg name="y" type="int"/>
|
||||
</request>
|
||||
|
||||
<enum name="anchor_edge">
|
||||
<entry name="top" value="1"/>
|
||||
<entry name="bottom" value="2"/>
|
||||
<entry name="left" value="4"/>
|
||||
<entry name="right" value="8"/>
|
||||
</enum>
|
||||
|
||||
<request name="set_anchor">
|
||||
<description summary="set anchor position">
|
||||
Sets the position on the screen where the compositor should
|
||||
position the view. Can be reset by specifying anchor 0. If not
|
||||
set, the compositor will assume manual positioning via the
|
||||
configure request.
|
||||
|
||||
If one anchor edge is provided, the wm surface is "stuck" to
|
||||
that edge.
|
||||
If two anchor edges are provided, the wm surface is considered
|
||||
anchored to the corner of the screen between them.
|
||||
|
||||
Any other anchor edge configuration is considered invalid.
|
||||
</description>
|
||||
<arg name="anchors" type="uint"/>
|
||||
</request>
|
||||
|
||||
<request name="set_margin">
|
||||
<description summary="set margin respective to anchored edges">
|
||||
Set the offset from the anchored edges to the wm surface. This
|
||||
is an alternative to the configure request. Using both will
|
||||
result in undefined results.
|
||||
|
||||
Margin has effect only for edges the wm surface is anchored to.
|
||||
</description>
|
||||
|
||||
<arg name="top" type="int"/>
|
||||
<arg name="bottom" type="int"/>
|
||||
<arg name="left" type="int"/>
|
||||
<arg name="right" type="int"/>
|
||||
</request>
|
||||
|
||||
<enum name="keyboard_focus_mode">
|
||||
<entry name="no_focus" value="0"/>
|
||||
<entry name="click_to_focus" value="1"/>
|
||||
<entry name="exclusive_focus" value="2"/>
|
||||
</enum>
|
||||
|
||||
<request name="set_keyboard_mode">
|
||||
<description summary="Set keyboard focus mode">
|
||||
Sets how the wm surface will interact with keyboard focus.
|
||||
Setting no_focus means that the surface will never receive
|
||||
keyboard focus, click_to_focus means normal focus semantics (i.e
|
||||
what you expect from "normal" windows), and exclusive focus means
|
||||
that no other window can get keyboard focus.
|
||||
</description>
|
||||
<arg name="mode" type="uint" enum="keyboard_focus_mode"/>
|
||||
</request>
|
||||
|
||||
<request name="set_exclusive_zone">
|
||||
<description summary="Reserve pixels">
|
||||
Request the compositor to reserve the given amount of pixels
|
||||
for the wm surface(like STRUTS in X11). This has effect only
|
||||
if the surface is anchored to a single edge. Margin doesn't
|
||||
affect exclusive zone in any way.
|
||||
</description>
|
||||
<arg name="size" type="uint"/>
|
||||
</request>
|
||||
</interface>
|
||||
</protocol>
|
Reference in New Issue
Block a user