This repository has been archived by the owner on Jun 16, 2020. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5563d6f
commit 0ed3c53
Showing
13 changed files
with
947 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
build/ | ||
subprojects/packagecache | ||
subprojects/*-* | ||
*.core |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<protocol name="wldip_compositor_manager"> | ||
|
||
<interface name="wldip_compositor_manager" version="1"> | ||
<description summary="privileged protocol for managing Weston compositor internals"> | ||
This protocol allows external privileged applications to get dumps of the important bits | ||
of the compositor state (as file descriptors to flatbuffer serializations), both | ||
on demand and as notifications for events, | ||
and to tell the compositor to change some bits of the state. | ||
</description> | ||
|
||
<enum name="topic" bitfield="true"> | ||
<entry name="surfaces" value="1" summary="notify on surface events"/> | ||
<entry name="outputs" value="2" summary="notify on output and head events"/> | ||
<entry name="inputdevs" value="4" summary="notify on input device and seat events"/> | ||
</enum> | ||
|
||
<request name="subscribe"> | ||
<description summary="subscribe to updates"> | ||
Requests the compositor to send update events when there's any event that | ||
corresponds to one of the topics selected via the topics bitfield. | ||
|
||
There is no way to unsubscribe currently, as the intended users of the protocol | ||
are simple daemons that synchronize the state a settings store like dconf, | ||
panels that always need to know current surfaces, etc. | ||
</description> | ||
<arg name="topics" type="uint" enum="topic"/> | ||
</request> | ||
|
||
<request name="get"> | ||
<description summary="request one update"> | ||
Requests one update event from the compositor. | ||
</description> | ||
</request> | ||
|
||
<event name="update"> | ||
<arg name="state" type="fd" summary="descriptor to a wlst format file"/> | ||
</event> | ||
|
||
<request name="desktop_surface_activate"> | ||
<arg name="surface_uid" type="uint" summary="uid of surface"/> | ||
</request> | ||
|
||
<request name="output_set_scale"> | ||
<arg name="output_id" type="uint" summary="id of the output"/> | ||
<arg name="scale" type="fixed" summary="desired scale"/> | ||
</request> | ||
|
||
<request name="device_set_natural_scrolling"> | ||
<arg name="seat_idx" type="uint" summary="index of the seat"/> | ||
<arg name="device_idx" type="uint" summary="index of the input device"/> | ||
<arg name="enable" type="uint" summary="desired state of natural scrolling (bool)"/> | ||
</request> | ||
|
||
</interface> | ||
|
||
</protocol> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,176 @@ | ||
namespace wldip.compositor_management; | ||
|
||
file_extension "wlst"; | ||
file_identifier "WLST"; | ||
|
||
table DesktopSurface { | ||
title: string; | ||
app_id: string; | ||
pid: uint64; | ||
activated: bool; | ||
maximized: bool; | ||
fullscreen: bool; | ||
resizing: bool; | ||
max_width: int32; | ||
max_height: int32; | ||
min_width: int32; | ||
min_height: int32; | ||
} | ||
|
||
enum Role : ubyte { | ||
Other, | ||
XdgToplevel, | ||
Lsh, | ||
} | ||
|
||
table Surface { | ||
uid: uint64; | ||
role: Role; | ||
other_role: string; | ||
label: string; | ||
width: int32; | ||
height: int32; | ||
desktop: DesktopSurface; // present when role == XdgToplevel | ||
primary_output_id: int32; | ||
} | ||
|
||
// We expose more details than wl_output: internal connection, head vs output.. | ||
|
||
table Head { | ||
name: string; | ||
output_id: int32; | ||
mm_width: int32; | ||
mm_height: int32; | ||
make: string; | ||
model: string; | ||
serial_number: string; | ||
subpixel: uint32; // TODO Enum? | ||
connection_internal: bool; | ||
connected: bool; | ||
non_desktop: bool; | ||
} | ||
|
||
table Output { | ||
id: uint32; | ||
name: string; | ||
x: int32; | ||
y: int32; | ||
width: int32; | ||
height: int32; | ||
current_scale: float = 1; | ||
original_scale: float = 1; | ||
} | ||
|
||
enum DeviceCapability : ubyte { | ||
Keyboard = 0, | ||
Pointer = 1, | ||
Touch = 2, | ||
TabletTool = 3, | ||
TabletPad = 4, | ||
Gesture = 5, | ||
Switch = 6, | ||
} | ||
|
||
enum TapButtonMap : uint32 { | ||
LeftRightMiddle = 0, | ||
LeftMiddleRight = 1, | ||
} | ||
|
||
enum SendEventsMode : uint32 { | ||
Enabled = 0, | ||
Disabled = 1, | ||
DisabledOnExternalMouse = 2, | ||
} | ||
|
||
enum AccelerationProfile : uint32 { | ||
None = 0, | ||
Flat = 1, | ||
Adaptive = 2, | ||
} | ||
|
||
enum ClickMethod : uint32 { | ||
None = 0, | ||
ButtonAreas = 1, | ||
ClickFinger = 2, | ||
} | ||
|
||
enum ScrollMethod : uint32 { | ||
None = 0, | ||
TwoFingers = 1, | ||
Edge = 2, | ||
OnButtonDown = 4, | ||
} | ||
|
||
table InputDevice { | ||
product_id: uint32; | ||
vendor_id: uint32; | ||
mm_width: double; | ||
mm_height: double; | ||
touch_count: int32; | ||
tap_finger_count: int32; | ||
tap_click_default: bool; | ||
tap_click: bool; | ||
tap_click_button_map: TapButtonMap; | ||
tap_click_button_map_default: TapButtonMap; | ||
tap_drag_default: bool; | ||
tap_drag: bool; | ||
drag_lock_default: bool; | ||
drag_lock: bool; | ||
send_events_mode_default: SendEventsMode; | ||
send_events_mode: SendEventsMode; | ||
acceleration_speed_default: double; | ||
acceleration_speed: double; | ||
acceleration_profile_default: AccelerationProfile; | ||
acceleration_profile: AccelerationProfile; | ||
natural_scrolling_available: bool; | ||
natural_scrolling_default: bool; | ||
natural_scrolling: bool; | ||
left_handed_mode_available: bool; | ||
left_handed_mode_default: bool; | ||
left_handed_mode: bool; | ||
available_click_methods: [ClickMethod]; | ||
click_method_default: ClickMethod; | ||
click_method: ClickMethod; | ||
middle_emulation_available: bool; | ||
middle_emulation_default: bool; | ||
middle_emulation: bool; | ||
available_scroll_methods: [ScrollMethod]; | ||
scroll_method_default: ScrollMethod; | ||
scroll_method: ScrollMethod; | ||
scroll_button_default: uint32; | ||
scroll_button: uint32; | ||
disable_while_typing_available: bool; | ||
disable_while_typing_default: bool; | ||
disable_while_typing: bool; | ||
rotation_available: bool; | ||
rotation_degrees_cw_default: uint32; | ||
rotation_degrees_cw: uint32; | ||
capabilites: [DeviceCapability]; | ||
name: string; | ||
system_name: string; | ||
} | ||
|
||
// table Keymap { | ||
// rules: string; | ||
// model: string; | ||
// layout: string; | ||
// variant: string; | ||
// options: string; | ||
// } | ||
|
||
table Seat { | ||
name: string; | ||
// keymap: Keymap; | ||
input_devices: [InputDevice]; | ||
} | ||
|
||
table CompositorState { | ||
kb_repeat_rate: int32; | ||
kb_repeat_delay: int32; | ||
heads: [Head]; | ||
outputs: [Output]; | ||
seats: [Seat]; | ||
surfaces: [Surface]; | ||
} | ||
|
||
root_type CompositorState; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
prog_flatc = find_program('flatc') | ||
flatc = generator(prog_flatc, | ||
output: '@BASENAME@_generated.h', | ||
arguments: ['--cpp', '-o', '@BUILD_DIR@', '@EXTRA_ARGS@', '@INPUT@']) | ||
|
||
compositor_management_fb = flatc.process('Management.fbs') |
Oops, something went wrong.