# checks for wayland only argument
dnl ========================================================================
if test "x${have_wayland_only}" = "xyes"; then
- PKG_CHECK_MODULES(WAYLAND, [wayland-server])
+ PKG_CHECK_MODULES(WAYLAND, [wayland-server, tizen-extension-server])
fi
release=$(pkg-config --variable=release enlightenment)
%endif
%if %{with wayland}
BuildRequires: pkgconfig(wayland-server)
+BuildRequires: pkgconfig(tizen-extension-server)
%endif
BuildRequires: pkgconfig(dlog)
%if "%{?profile}" == "common"
+++ /dev/null
-#include <stdlib.h>
-#include <stdint.h>
-#include "wayland-util.h"
-
-extern const struct wl_interface wl_surface_interface;
-
-static const struct wl_interface *types[] = {
- &wl_surface_interface,
- NULL,
- NULL,
- &wl_surface_interface,
- NULL,
- &wl_surface_interface,
- NULL,
- &wl_surface_interface,
- NULL,
- NULL,
- NULL,
-};
-
-static const struct wl_message wl_keyrouter_requests[] = {
- { "set_keygrab", "?ouu", types + 0 },
- { "unset_keygrab", "?ou", types + 3 },
- { "get_keygrab_status", "?ou", types + 5 },
-};
-
-static const struct wl_message wl_keyrouter_events[] = {
- { "keygrab_notify", "?ouuu", types + 7 },
-};
-
-WL_EXPORT const struct wl_interface wl_keyrouter_interface = {
- "wl_keyrouter", 1,
- 3, wl_keyrouter_requests,
- 1, wl_keyrouter_events,
-};
-
+++ /dev/null
-#ifndef KEYROUTER_SERVER_PROTOCOL_H
-#define KEYROUTER_SERVER_PROTOCOL_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <stdint.h>
-#include <stddef.h>
-#include "wayland-server.h"
-
-struct wl_client;
-struct wl_resource;
-
-struct wl_keyrouter;
-
-extern const struct wl_interface wl_keyrouter_interface;
-
-#ifndef WL_KEYROUTER_ERROR_ENUM
-#define WL_KEYROUTER_ERROR_ENUM
-enum wl_keyrouter_error {
- WL_KEYROUTER_ERROR_NONE = 0,
- WL_KEYROUTER_ERROR_INVALID_SURFACE = 1,
- WL_KEYROUTER_ERROR_INVALID_KEY = 2,
- WL_KEYROUTER_ERROR_INVALID_MODE = 3,
- WL_KEYROUTER_ERROR_GRABBED_ALREADY = 4,
- WL_KEYROUTER_ERROR_NO_PERMISSION = 5,
- WL_KEYROUTER_ERROR_NO_SYSTEM_RESOURCES = 6,
-};
-#endif /* WL_KEYROUTER_ERROR_ENUM */
-
-#ifndef WL_KEYROUTER_MODE_ENUM
-#define WL_KEYROUTER_MODE_ENUM
-/**
- * wl_keyrouter_mode - mode for a key grab
- * @WL_KEYROUTER_MODE_NONE: none
- * @WL_KEYROUTER_MODE_SHARED: mode to get a key grab with the other
- * client surfaces when the focused client surface gets the key
- * @WL_KEYROUTER_MODE_TOPMOST: mode to get a key grab when the client
- * surface is the top most surface
- * @WL_KEYROUTER_MODE_OVERRIDABLE_EXCLUSIVE: mode to get a key grab
- * exclusively, overridably regardless of the order in the surface stack
- * @WL_KEYROUTER_MODE_EXCLUSIVE: mode to get a key grab exclusively
- * regardless of the order in surface stack
- *
- * This value is used to set a mode for a key grab. With this mode and
- * the order of the surface between surfaces' stack, the compositor will
- * determine the destination client surface.
- */
-enum wl_keyrouter_mode {
- WL_KEYROUTER_MODE_NONE = 0,
- WL_KEYROUTER_MODE_SHARED = 1,
- WL_KEYROUTER_MODE_TOPMOST = 2,
- WL_KEYROUTER_MODE_OVERRIDABLE_EXCLUSIVE = 3,
- WL_KEYROUTER_MODE_EXCLUSIVE = 4,
-};
-#endif /* WL_KEYROUTER_MODE_ENUM */
-
-/**
- * wl_keyrouter - an interface to set each focus for each key
- * @set_keygrab: (none)
- * @unset_keygrab: (none)
- * @get_keygrab_status: (none)
- *
- * In tradition, all the keys in a keyboard and a device on which some
- * keys are attached will be sent to focus surface by default. Currently
- * it's possible to set up each focus for each key in a keyboard and a
- * device. Therefore, by setting a key grab for a surface, the owner of the
- * surface will get the key event when it has the key grab for the key.
- */
-struct wl_keyrouter_interface {
- /**
- * set_keygrab - (none)
- * @surface: (none)
- * @key: (none)
- * @mode: (none)
- */
- void (*set_keygrab)(struct wl_client *client,
- struct wl_resource *resource,
- struct wl_resource *surface,
- uint32_t key,
- uint32_t mode);
- /**
- * unset_keygrab - (none)
- * @surface: (none)
- * @key: (none)
- */
- void (*unset_keygrab)(struct wl_client *client,
- struct wl_resource *resource,
- struct wl_resource *surface,
- uint32_t key);
- /**
- * get_keygrab_status - (none)
- * @surface: (none)
- * @key: (none)
- */
- void (*get_keygrab_status)(struct wl_client *client,
- struct wl_resource *resource,
- struct wl_resource *surface,
- uint32_t key);
-};
-
-#define WL_KEYROUTER_KEYGRAB_NOTIFY 0
-
-#define WL_KEYROUTER_KEYGRAB_NOTIFY_SINCE_VERSION 1
-
-static inline void
-wl_keyrouter_send_keygrab_notify(struct wl_resource *resource_, struct wl_resource *surface, uint32_t key, uint32_t mode, uint32_t error)
-{
- wl_resource_post_event(resource_, WL_KEYROUTER_KEYGRAB_NOTIFY, surface, key, mode, error);
-}
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
+++ /dev/null
-<protocol name="wl_keyrouter">
- <interface name="wl_keyrouter" version="1">
- <description summary="an interface to set each focus for each key">
- In tradition, all the keys in a keyboard and a device on which
- some keys are attached will be sent to focus surface by default.
- Currently it's possible to set up each focus for each key in a keyboard and a device.
- Therefore, by setting a key grab for a surface, the owner of the
- surface will get the key event when it has the key grab for the key.
- </description>
-
- <enum name="error">
- <entry name="none" value="0" summary="no error"/>
- <entry name="invalid_surface" value="1" summary="Given surface is invalid."/>
- <entry name="invalid_key" value="2" summary="Given key is invalid."/>
- <entry name="invalid_mode" value="3" summary="Given mode is invalid."/>
- <entry name="grabbed_already" value="4" summary="The key has been grabbed already."/>
- <entry name="no_permission" value="5" summary="The wl client has no permission to grab the key."/>
- <entry name="no_system_resources" value="6" summary="System resources are insufficient."/>
- </enum>
-
- <enum name="mode">
- <description summary="mode for a key grab">
- This value is used to set a mode for a key grab. With this mode and
- the order of the surface between surfaces' stack, the compositor will determine the destination client
- surface.
- </description>
- <entry name="none" value="0" summary="none"/>
- <entry name="shared" value="1"
- summary="mode to get a key grab with the other client surfaces when the focused client surface gets the key"/>
- <entry name="topmost" value="2"
- summary="mode to get a key grab when the client surface is the top most surface"/>
- <entry name="overridable_exclusive" value="3"
- summary="mode to get a key grab exclusively, overridably regardless of the order in the surface stack"/>
- <entry name="exclusive" value="4"
- summary="mode to get a key grab exclusively regardless of the order in surface stack"/>
- </enum>
-
- <request name="set_keygrab">
- <arg name="surface" type="object" interface="wl_surface" allow-null="true"/>
- <arg name="key" type="uint"/>
- <arg name="mode" type="uint"/>
- </request>
-
- <request name="unset_keygrab">
- <arg name="surface" type="object" interface="wl_surface" allow-null="true"/>
- <arg name="key" type="uint"/>
- </request>
-
- <request name="get_keygrab_status">
- <arg name="surface" type="object" interface="wl_surface" allow-null="true"/>
- <arg name="key" type="uint"/>
- </request>
-
- <event name="keygrab_notify">
- <arg name="surface" type="object" interface="wl_surface" allow-null="true"/>
- <arg name="key" type="uint"/>
- <arg name="mode" type="uint"/>
- <arg name="error" type="uint"/>
- </event>
- </interface>
-</protocol>
-
pkg_LTLIBRARIES = module.la
if WAYLAND_ONLY
module_la_SOURCES = e_mod_main_wl.c \
- e_mod_main_wl.h \
- $(top_srcdir)/protocol/keyrouter-protocol.c \
- $(top_srcdir)/protocol/keyrouter-protocol.h
+ e_mod_main_wl.h
module_la_CFLAGS = @ENLIGHTENMENT_CFLAGS@ @WAYLAND_CFLAGS@ -DHAVE_WAYLAND_ONLY
module_la_LDFLAGS = -module -avoid-version @WAYLAND_LIBS@ @ENLIGHTENMENT_LIBS@
else
#define E_COMP_WL
#include "e.h"
#include "e_mod_main_wl.h"
-#include "protocol/keyrouter-protocol.h"
+#include <tizen-extension-server-protocol.h>
#include <string.h>
E_KeyrouterPtr krt;