IF (WITH_WAYLAND)
ADD_DEFINITIONS("-DWAYLAND")
- SET(dependents "${dependents} ecore-wayland wayland-client")
+ SET(dependents "${dependents} ecore-wayland wayland-client screenshooter-client tizen-extension-client")
ENDIF (WITH_WAYLAND)
INCLUDE(FindPkgConfig)
SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=${LIB_INSTALL_DIR}")
SET(SOURCES src/efl_util.c)
-IF (WITH_WAYLAND)
- SET(SOURCES ${SOURCES}
- src/tizen_notification-protocol.c
- src/tizen-buffer-pool-protocol.c
- src/tizen_window_screen-protocol.c
- src/screenshooter-protocol.c
- )
-ENDIF (WITH_WAYLAND)
ADD_LIBRARY(${fw_name} SHARED ${SOURCES})
%endif
%if %{with wayland}
BuildRequires: pkgconfig(wayland-client)
+BuildRequires: pkgconfig(screenshooter-client)
+BuildRequires: pkgconfig(tizen-extension-client)
BuildRequires: pkgconfig(ecore-wayland)
%endif
BuildRequires: pkgconfig(elementary)
#if WAYLAND
#include <Ecore_Wayland.h>
#include <wayland-client.h>
-#include "tizen_notification-client-protocol.h"
-#include "tizen_window_screen-client-protocol.h"
-#include "tizen-buffer-pool-client-protocol.h"
-#include "screenshooter-client-protocol.h"
+#include <tizen-extension-client-protocol.h>
+#include <screenshooter-client-protocol.h>
#endif /* end of WAYLAND */
/* callback handler index */
{
Eina_Bool init;
struct wl_display *dpy;
+
struct
{
- struct tizen_notification *proto;
- Eina_Hash *hash;
- } noti_lv;
- struct
- {
- struct tizen_window_screen *proto;
- Eina_Hash *hash;
- } scr_mode;
+ struct tizen_policy *proto;
+ Eina_Hash *hash_noti_lv;
+ Eina_Hash *hash_scr_mode;
+ } policy;
struct
{
struct screenshooter *screenshooter;
{
EINA_FALSE,
NULL,
- { NULL, NULL }, /* tizen_notification protocol */
- { NULL, NULL }, /* tizen_window_screen protocol */
+ { NULL, NULL, NULL }, /* tizen_policy protocol */
{ NULL, NULL, NULL } /* screenshooter protocol */
},
#endif /* end of WAYLAND */
static void _cb_wl_reg_global(void *data, struct wl_registry *reg, unsigned int name, const char *interface, unsigned int version);
static void _cb_wl_reg_global_remove(void *data, struct wl_registry *reg, unsigned int name);
static Efl_Util_Callback_Info *_cb_info_find_by_wlsurf(void *wlsurf, int idx);
-static void _cb_wl_tz_noti_lv_done(void *data, struct tizen_notification *proto, struct wl_surface *surface, int32_t level, uint32_t state);
-static void _cb_wl_tz_scr_mode_done(void *data, struct tizen_window_screen *proto, struct wl_surface *surface, uint32_t mode, uint32_t state);
+static void _cb_wl_tz_policy_conformant(void *data, struct tizen_policy *tizen_policy, struct wl_surface *surface, uint32_t is_conformant);
+static void _cb_wl_tz_policy_conformant_area(void *data, struct tizen_policy *tizen_policy, struct wl_surface *surface, uint32_t conformant_part, uint32_t state, int32_t x, int32_t y, int32_t w, int32_t h);
+static void _cb_wl_tz_policy_notification_done(void *data, struct tizen_policy *tizen_policy, struct wl_surface *surface, int32_t level, uint32_t state);
+static void _cb_wl_tz_policy_transient_for_done(void *data, struct tizen_policy *tizen_policy, uint32_t child_id);
+static void _cb_wl_tz_policy_scr_mode_done(void *data, struct tizen_policy *tizen_policy, struct wl_surface *surface, uint32_t mode, uint32_t state);
static const struct wl_registry_listener _wl_reg_listener =
{
_cb_wl_reg_global_remove
};
-struct tizen_notification_listener _wl_tz_noti_lv_listener =
-{
- _cb_wl_tz_noti_lv_done
-};
-
-struct tizen_window_screen_listener _wl_tz_scr_mode_listener =
+struct tizen_policy_listener _wl_tz_policy_listener =
{
- _cb_wl_tz_scr_mode_done
+ _cb_wl_tz_policy_conformant,
+ _cb_wl_tz_policy_conformant_area,
+ _cb_wl_tz_policy_notification_done,
+ _cb_wl_tz_policy_transient_for_done,
+ _cb_wl_tz_policy_scr_mode_done
};
#endif /* end of WAYLAND */
const char *interface,
unsigned int version)
{
- if (!strcmp(interface, "tizen_notification"))
- {
- struct tizen_notification *proto;
- proto = wl_registry_bind(reg,
- name,
- &tizen_notification_interface,
- 1);
- if (!proto) return;
-
- tizen_notification_add_listener(proto,
- &_wl_tz_noti_lv_listener,
- NULL);
-
- _eflutil.wl.noti_lv.hash = eina_hash_pointer_new(free);
- _eflutil.wl.noti_lv.proto = proto;
- }
- else if (!strcmp(interface, "tizen_window_screen"))
+ if (!strcmp(interface, "tizen_policy"))
{
- struct tizen_window_screen *proto;
+ struct tizen_policy *proto;
proto = wl_registry_bind(reg,
- name,
- &tizen_window_screen_interface,
- 1);
+ name,
+ &tizen_policy_interface,
+ 1);
if (!proto) return;
- tizen_window_screen_add_listener(proto,
- &_wl_tz_scr_mode_listener,
- NULL);
+ tizen_policy_add_listener(proto,
+ &_wl_tz_policy_listener,
+ NULL);
- _eflutil.wl.scr_mode.hash = eina_hash_pointer_new(free);
- _eflutil.wl.scr_mode.proto = proto;
+ _eflutil.wl.policy.hash_noti_lv = eina_hash_pointer_new(free);
+ _eflutil.wl.policy.hash_scr_mode = eina_hash_pointer_new(free);
+ _eflutil.wl.policy.proto = proto;
}
else if (strcmp(interface, "wl_output") == 0)
{
struct wl_registry *reg,
unsigned int name)
{
- _eflutil.wl.noti_lv.proto = NULL;
- eina_hash_free(_eflutil.wl.noti_lv.hash);
- _eflutil.wl.scr_mode.proto = NULL;
- eina_hash_free(_eflutil.wl.scr_mode.hash);
+ _eflutil.wl.policy.proto = NULL;
+ eina_hash_free(_eflutil.wl.policy.hash_noti_lv);
+ eina_hash_free(_eflutil.wl.policy.hash_scr_mode);
}
static Efl_Util_Callback_Info *
}
static void
-_cb_wl_tz_noti_lv_done(void *data,
- struct tizen_notification *proto,
- struct wl_surface *surface,
- int32_t level,
- uint32_t state)
+_cb_wl_tz_policy_conformant(void *data, struct tizen_policy *tizen_policy,
+ struct wl_surface *surface, uint32_t is_conformant)
+{
+}
+
+static void
+_cb_wl_tz_policy_conformant_area(void *data, struct tizen_policy *tizen_policy,
+ struct wl_surface *surface, uint32_t conformant_part,
+ uint32_t state, int32_t x, int32_t y, int32_t w, int32_t h)
+{
+}
+
+static void
+_cb_wl_tz_policy_notification_done(void *data,
+ struct tizen_policy *tizen_policy,
+ struct wl_surface *surface,
+ int32_t level,
+ uint32_t state)
{
Efl_Util_Wl_Surface_Lv_Info *lv_info;
Efl_Util_Callback_Info *cb_info;
- lv_info = eina_hash_find(_eflutil.wl.noti_lv.hash, &surface);
+ lv_info = eina_hash_find(_eflutil.wl.policy.hash_noti_lv, &surface);
if (lv_info)
{
lv_info->level = level;
lv_info->wait_for_done = EINA_FALSE;
}
- if (state != TIZEN_NOTIFICATION_ERROR_STATE_PERMISSION_DENIED) return;
+ if (state != TIZEN_POLICY_ERROR_STATE_PERMISSION_DENIED) return;
cb_info = _cb_info_find_by_wlsurf((void *)surface, CBH_NOTI_LEV);
if (!cb_info) return;
}
static void
-_cb_wl_tz_scr_mode_done(void *data,
- struct tizen_window_screen *proto,
- struct wl_surface *surface,
- uint32_t mode,
- uint32_t state)
+_cb_wl_tz_policy_transient_for_done(void *data, struct tizen_policy *tizen_policy, uint32_t child_id)
+{
+}
+
+static void
+_cb_wl_tz_policy_scr_mode_done(void *data,
+ struct tizen_policy *tizen_policy,
+ struct wl_surface *surface,
+ uint32_t mode,
+ uint32_t state)
{
Efl_Util_Wl_Surface_Scr_Mode_Info *scr_mode_info;
Efl_Util_Callback_Info *cb_info;
- scr_mode_info = eina_hash_find(_eflutil.wl.scr_mode.hash, &surface);
+ scr_mode_info = eina_hash_find(_eflutil.wl.policy.hash_scr_mode, &surface);
if (scr_mode_info)
{
scr_mode_info->mode = mode;
scr_mode_info->wait_for_done = EINA_FALSE;
}
- if (state != TIZEN_WINDOW_SCREEN_ERROR_STATE_PERMISSION_DENIED) return;
+ if (state != TIZEN_POLICY_ERROR_STATE_PERMISSION_DENIED) return;
cb_info = _cb_info_find_by_wlsurf((void *)surface, CBH_SCR_MODE);
if (!cb_info) return;
wlwin = elm_win_wl_window_get(window);
if (wlwin)
{
- while (!_eflutil.wl.noti_lv.proto)
+ while (!_eflutil.wl.policy.proto)
wl_display_dispatch(_eflutil.wl.dpy);
surface = ecore_wl_window_surface_get(wlwin);
EINA_SAFETY_ON_NULL_RETURN_VAL(surface,
EFL_UTIL_ERROR_NOT_SUPPORTED_WINDOW_TYPE);
- lv_info = eina_hash_find(_eflutil.wl.noti_lv.hash, &surface);
+ lv_info = eina_hash_find(_eflutil.wl.policy.hash_noti_lv, &surface);
if (!lv_info)
{
lv_info = calloc(1, sizeof(Efl_Util_Wl_Surface_Lv_Info));
lv_info->level = (int)level;
lv_info->wait_for_done = EINA_TRUE;
- eina_hash_add(_eflutil.wl.noti_lv.hash,
+ eina_hash_add(_eflutil.wl.policy.hash_noti_lv,
&surface,
lv_info);
}
lv_info->wait_for_done = EINA_TRUE;
}
- tizen_notification_set_level(_eflutil.wl.noti_lv.proto,
- surface,
- (int)level);
+ tizen_policy_set_notification_level(_eflutil.wl.policy.proto,
+ surface, (int)level);
return EFL_UTIL_ERROR_NONE;
}
wlwin = elm_win_wl_window_get(window);
if (wlwin)
{
- while (!_eflutil.wl.noti_lv.proto)
+ while (!_eflutil.wl.policy.proto)
wl_display_dispatch(_eflutil.wl.dpy);
surface = ecore_wl_window_surface_get(wlwin);
EINA_SAFETY_ON_NULL_RETURN_VAL(surface,
EFL_UTIL_ERROR_NOT_SUPPORTED_WINDOW_TYPE);
- lv_info = eina_hash_find(_eflutil.wl.noti_lv.hash, &surface);
+ lv_info = eina_hash_find(_eflutil.wl.policy.hash_noti_lv, &surface);
if (lv_info)
{
if (lv_info->wait_for_done)
switch (lv_info->level)
{
- case TIZEN_NOTIFICATION_LEVEL_1: *level = EFL_UTIL_NOTIFICATION_LEVEL_1; break;
- case TIZEN_NOTIFICATION_LEVEL_2: *level = EFL_UTIL_NOTIFICATION_LEVEL_2; break;
- case TIZEN_NOTIFICATION_LEVEL_3: *level = EFL_UTIL_NOTIFICATION_LEVEL_3; break;
- case TIZEN_NOTIFICATION_LEVEL_NONE: *level = EFL_UTIL_NOTIFICATION_LEVEL_NONE; break;
- case TIZEN_NOTIFICATION_LEVEL_DEFAULT: *level = EFL_UTIL_NOTIFICATION_LEVEL_DEFAULT; break;
- case TIZEN_NOTIFICATION_LEVEL_MEDIUM: *level = EFL_UTIL_NOTIFICATION_LEVEL_MEDIUM; break;
- case TIZEN_NOTIFICATION_LEVEL_HIGH: *level = EFL_UTIL_NOTIFICATION_LEVEL_HIGH; break;
- case TIZEN_NOTIFICATION_LEVEL_TOP: *level = EFL_UTIL_NOTIFICATION_LEVEL_TOP; break;
+ case TIZEN_POLICY_LEVEL_1: *level = EFL_UTIL_NOTIFICATION_LEVEL_1; break;
+ case TIZEN_POLICY_LEVEL_2: *level = EFL_UTIL_NOTIFICATION_LEVEL_2; break;
+ case TIZEN_POLICY_LEVEL_3: *level = EFL_UTIL_NOTIFICATION_LEVEL_3; break;
+ case TIZEN_POLICY_LEVEL_NONE: *level = EFL_UTIL_NOTIFICATION_LEVEL_NONE; break;
+ case TIZEN_POLICY_LEVEL_DEFAULT: *level = EFL_UTIL_NOTIFICATION_LEVEL_DEFAULT; break;
+ case TIZEN_POLICY_LEVEL_MEDIUM: *level = EFL_UTIL_NOTIFICATION_LEVEL_MEDIUM; break;
+ case TIZEN_POLICY_LEVEL_HIGH: *level = EFL_UTIL_NOTIFICATION_LEVEL_HIGH; break;
+ case TIZEN_POLICY_LEVEL_TOP: *level = EFL_UTIL_NOTIFICATION_LEVEL_TOP; break;
default: *level = EFL_UTIL_NOTIFICATION_LEVEL_DEFAULT;
return EFL_UTIL_ERROR_INVALID_PARAMETER;
}
wlwin = elm_win_wl_window_get(window);
if (wlwin)
{
- while (!_eflutil.wl.scr_mode.proto)
+ while (!_eflutil.wl.policy.proto)
wl_display_dispatch(_eflutil.wl.dpy);
surface = ecore_wl_window_surface_get(wlwin);
EINA_SAFETY_ON_NULL_RETURN_VAL(surface,
EFL_UTIL_ERROR_INVALID_PARAMETER);
- scr_mode_info = eina_hash_find(_eflutil.wl.scr_mode.hash, &surface);
+ scr_mode_info = eina_hash_find(_eflutil.wl.policy.hash_scr_mode, &surface);
if (!scr_mode_info)
{
scr_mode_info = calloc(1, sizeof(Efl_Util_Wl_Surface_Scr_Mode_Info));
scr_mode_info->mode = (unsigned int)mode;
scr_mode_info->wait_for_done = EINA_TRUE;
- eina_hash_add(_eflutil.wl.scr_mode.hash,
+ eina_hash_add(_eflutil.wl.policy.hash_scr_mode,
&surface,
scr_mode_info);
}
scr_mode_info->wait_for_done = EINA_TRUE;
}
- tizen_window_screen_set_mode(_eflutil.wl.scr_mode.proto,
- surface,
- (unsigned int)mode);
+ tizen_policy_set_window_screen_mode(_eflutil.wl.policy.proto,
+ surface, (unsigned int)mode);
return EFL_UTIL_ERROR_NONE;
}
wlwin = elm_win_wl_window_get(window);
if (wlwin)
{
- while (!_eflutil.wl.scr_mode.proto)
+ while (!_eflutil.wl.policy.proto)
wl_display_dispatch(_eflutil.wl.dpy);
surface = ecore_wl_window_surface_get(wlwin);
EINA_SAFETY_ON_NULL_RETURN_VAL(surface,
EFL_UTIL_ERROR_INVALID_PARAMETER);
- scr_mode_info = eina_hash_find(_eflutil.wl.scr_mode.hash, &surface);
+ scr_mode_info = eina_hash_find(_eflutil.wl.policy.hash_scr_mode, &surface);
if (scr_mode_info)
{
if (scr_mode_info->wait_for_done)
switch (scr_mode_info->mode)
{
- case TIZEN_WINDOW_SCREEN_MODE_DEFAULT: *mode = EFL_UTIL_SCREEN_MODE_DEFAULT; break;
- case TIZEN_WINDOW_SCREEN_MODE_ALWAYS_ON: *mode = EFL_UTIL_SCREEN_MODE_ALWAYS_ON; break;
- default: *mode = EFL_UTIL_SCREEN_MODE_DEFAULT;
+ case TIZEN_POLICY_MODE_DEFAULT: *mode = EFL_UTIL_SCREEN_MODE_DEFAULT; break;
+ case TIZEN_POLICY_MODE_ALWAYS_ON: *mode = EFL_UTIL_SCREEN_MODE_ALWAYS_ON; break;
+ default: *mode = EFL_UTIL_SCREEN_MODE_DEFAULT;
return EFL_UTIL_ERROR_INVALID_PARAMETER;
}
return EFL_UTIL_ERROR_NONE;
+++ /dev/null
-#ifndef SCREENSHOOTER_CLIENT_PROTOCOL_H
-#define SCREENSHOOTER_CLIENT_PROTOCOL_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <stdint.h>
-#include <stddef.h>
-#include "wayland-client.h"
-
-struct wl_client;
-struct wl_resource;
-
-struct screenshooter;
-
-extern const struct wl_interface screenshooter_interface;
-
-struct screenshooter_listener {
- /**
- * done - (none)
- */
- void (*done)(void *data,
- struct screenshooter *screenshooter);
-};
-
-static inline int
-screenshooter_add_listener(struct screenshooter *screenshooter,
- const struct screenshooter_listener *listener, void *data)
-{
- return wl_proxy_add_listener((struct wl_proxy *) screenshooter,
- (void (**)(void)) listener, data);
-}
-
-#define SCREENSHOOTER_SHOOT 0
-
-static inline void
-screenshooter_set_user_data(struct screenshooter *screenshooter, void *user_data)
-{
- wl_proxy_set_user_data((struct wl_proxy *) screenshooter, user_data);
-}
-
-static inline void *
-screenshooter_get_user_data(struct screenshooter *screenshooter)
-{
- return wl_proxy_get_user_data((struct wl_proxy *) screenshooter);
-}
-
-static inline void
-screenshooter_destroy(struct screenshooter *screenshooter)
-{
- wl_proxy_destroy((struct wl_proxy *) screenshooter);
-}
-
-static inline void
-screenshooter_shoot(struct screenshooter *screenshooter, struct wl_output *output, struct wl_buffer *buffer)
-{
- wl_proxy_marshal((struct wl_proxy *) screenshooter,
- SCREENSHOOTER_SHOOT, output, buffer);
-}
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
+++ /dev/null
-#include <stdlib.h>
-#include <stdint.h>
-#include "wayland-util.h"
-
-extern const struct wl_interface wl_buffer_interface;
-extern const struct wl_interface wl_output_interface;
-
-static const struct wl_interface *types[] = {
- &wl_output_interface,
- &wl_buffer_interface,
-};
-
-static const struct wl_message screenshooter_requests[] = {
- { "shoot", "oo", types + 0 },
-};
-
-static const struct wl_message screenshooter_events[] = {
- { "done", "", types + 0 },
-};
-
-WL_EXPORT const struct wl_interface screenshooter_interface = {
- "screenshooter", 1,
- 1, screenshooter_requests,
- 1, screenshooter_events,
-};
+++ /dev/null
-#ifndef TIZEN_BUFFER_POOL_CLIENT_PROTOCOL_H
-#define TIZEN_BUFFER_POOL_CLIENT_PROTOCOL_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <stdint.h>
-#include <stddef.h>
-#include "wayland-client.h"
-
-struct wl_client;
-struct wl_resource;
-
-struct tizen_buffer_pool;
-
-extern const struct wl_interface tizen_buffer_pool_interface;
-
-#ifndef TIZEN_BUFFER_POOL_ERROR_ENUM
-#define TIZEN_BUFFER_POOL_ERROR_ENUM
-enum tizen_buffer_pool_error {
- TIZEN_BUFFER_POOL_ERROR_INVALID_FORMAT = 0,
- TIZEN_BUFFER_POOL_ERROR_INVALID_NAME = 1,
-};
-#endif /* TIZEN_BUFFER_POOL_ERROR_ENUM */
-
-#ifndef TIZEN_BUFFER_POOL_CAPABILITY_ENUM
-#define TIZEN_BUFFER_POOL_CAPABILITY_ENUM
-enum tizen_buffer_pool_capability {
- TIZEN_BUFFER_POOL_CAPABILITY_DEFAULT = 0,
- TIZEN_BUFFER_POOL_CAPABILITY_VIDEO = 0x1,
- TIZEN_BUFFER_POOL_CAPABILITY_SCREENMIRROR = 0x2,
-};
-#endif /* TIZEN_BUFFER_POOL_CAPABILITY_ENUM */
-
-#ifndef TIZEN_BUFFER_POOL_FORMAT_ENUM
-#define TIZEN_BUFFER_POOL_FORMAT_ENUM
-enum tizen_buffer_pool_format {
- TIZEN_BUFFER_POOL_FORMAT_C8 = 0x20203843,
- TIZEN_BUFFER_POOL_FORMAT_RGB332 = 0x38424752,
- TIZEN_BUFFER_POOL_FORMAT_BGR233 = 0x38524742,
- TIZEN_BUFFER_POOL_FORMAT_XRGB4444 = 0x32315258,
- TIZEN_BUFFER_POOL_FORMAT_XBGR4444 = 0x32314258,
- TIZEN_BUFFER_POOL_FORMAT_RGBX4444 = 0x32315852,
- TIZEN_BUFFER_POOL_FORMAT_BGRX4444 = 0x32315842,
- TIZEN_BUFFER_POOL_FORMAT_ARGB4444 = 0x32315241,
- TIZEN_BUFFER_POOL_FORMAT_ABGR4444 = 0x32314241,
- TIZEN_BUFFER_POOL_FORMAT_RGBA4444 = 0x32314152,
- TIZEN_BUFFER_POOL_FORMAT_BGRA4444 = 0x32314142,
- TIZEN_BUFFER_POOL_FORMAT_XRGB1555 = 0x35315258,
- TIZEN_BUFFER_POOL_FORMAT_XBGR1555 = 0x35314258,
- TIZEN_BUFFER_POOL_FORMAT_RGBX5551 = 0x35315852,
- TIZEN_BUFFER_POOL_FORMAT_BGRX5551 = 0x35315842,
- TIZEN_BUFFER_POOL_FORMAT_ARGB1555 = 0x35315241,
- TIZEN_BUFFER_POOL_FORMAT_ABGR1555 = 0x35314241,
- TIZEN_BUFFER_POOL_FORMAT_RGBA5551 = 0x35314152,
- TIZEN_BUFFER_POOL_FORMAT_BGRA5551 = 0x35314142,
- TIZEN_BUFFER_POOL_FORMAT_RGB565 = 0x36314752,
- TIZEN_BUFFER_POOL_FORMAT_BGR565 = 0x36314742,
- TIZEN_BUFFER_POOL_FORMAT_RGB888 = 0x34324752,
- TIZEN_BUFFER_POOL_FORMAT_BGR888 = 0x34324742,
- TIZEN_BUFFER_POOL_FORMAT_XRGB8888 = 0x34325258,
- TIZEN_BUFFER_POOL_FORMAT_XBGR8888 = 0x34324258,
- TIZEN_BUFFER_POOL_FORMAT_RGBX8888 = 0x34325852,
- TIZEN_BUFFER_POOL_FORMAT_BGRX8888 = 0x34325842,
- TIZEN_BUFFER_POOL_FORMAT_ARGB8888 = 0x34325241,
- TIZEN_BUFFER_POOL_FORMAT_ABGR8888 = 0x34324241,
- TIZEN_BUFFER_POOL_FORMAT_RGBA8888 = 0x34324152,
- TIZEN_BUFFER_POOL_FORMAT_BGRA8888 = 0x34324142,
- TIZEN_BUFFER_POOL_FORMAT_XRGB2101010 = 0x30335258,
- TIZEN_BUFFER_POOL_FORMAT_XBGR2101010 = 0x30334258,
- TIZEN_BUFFER_POOL_FORMAT_RGBX1010102 = 0x30335852,
- TIZEN_BUFFER_POOL_FORMAT_BGRX1010102 = 0x30335842,
- TIZEN_BUFFER_POOL_FORMAT_ARGB2101010 = 0x30335241,
- TIZEN_BUFFER_POOL_FORMAT_ABGR2101010 = 0x30334241,
- TIZEN_BUFFER_POOL_FORMAT_RGBA1010102 = 0x30334152,
- TIZEN_BUFFER_POOL_FORMAT_BGRA1010102 = 0x30334142,
- TIZEN_BUFFER_POOL_FORMAT_YUYV = 0x56595559,
- TIZEN_BUFFER_POOL_FORMAT_YVYU = 0x55595659,
- TIZEN_BUFFER_POOL_FORMAT_UYVY = 0x59565955,
- TIZEN_BUFFER_POOL_FORMAT_VYUY = 0x59555956,
- TIZEN_BUFFER_POOL_FORMAT_AYUV = 0x56555941,
- TIZEN_BUFFER_POOL_FORMAT_NV12 = 0x3231564e,
- TIZEN_BUFFER_POOL_FORMAT_NV21 = 0x3132564e,
- TIZEN_BUFFER_POOL_FORMAT_NV16 = 0x3631564e,
- TIZEN_BUFFER_POOL_FORMAT_NV61 = 0x3136564e,
- TIZEN_BUFFER_POOL_FORMAT_YUV410 = 0x39565559,
- TIZEN_BUFFER_POOL_FORMAT_YVU410 = 0x39555659,
- TIZEN_BUFFER_POOL_FORMAT_YUV411 = 0x31315559,
- TIZEN_BUFFER_POOL_FORMAT_YVU411 = 0x31315659,
- TIZEN_BUFFER_POOL_FORMAT_YUV420 = 0x32315559,
- TIZEN_BUFFER_POOL_FORMAT_YVU420 = 0x32315659,
- TIZEN_BUFFER_POOL_FORMAT_YUV422 = 0x36315559,
- TIZEN_BUFFER_POOL_FORMAT_YVU422 = 0x36315659,
- TIZEN_BUFFER_POOL_FORMAT_YUV444 = 0x34325559,
- TIZEN_BUFFER_POOL_FORMAT_YVU444 = 0x34325659,
- TIZEN_BUFFER_POOL_FORMAT_ST12 = 0x32315453,
- TIZEN_BUFFER_POOL_FORMAT_SN12 = 0x32314e53,
-};
-#endif /* TIZEN_BUFFER_POOL_FORMAT_ENUM */
-
-struct tizen_buffer_pool_listener {
- /**
- * device - (none)
- * @name: (none)
- */
- void (*device)(void *data,
- struct tizen_buffer_pool *tizen_buffer_pool,
- const char *name);
- /**
- * authenticated - (none)
- */
- void (*authenticated)(void *data,
- struct tizen_buffer_pool *tizen_buffer_pool);
- /**
- * capabilities - (none)
- * @value: (none)
- */
- void (*capabilities)(void *data,
- struct tizen_buffer_pool *tizen_buffer_pool,
- uint32_t value);
- /**
- * format - (none)
- * @format: (none)
- */
- void (*format)(void *data,
- struct tizen_buffer_pool *tizen_buffer_pool,
- uint32_t format);
-};
-
-static inline int
-tizen_buffer_pool_add_listener(struct tizen_buffer_pool *tizen_buffer_pool,
- const struct tizen_buffer_pool_listener *listener, void *data)
-{
- return wl_proxy_add_listener((struct wl_proxy *) tizen_buffer_pool,
- (void (**)(void)) listener, data);
-}
-
-#define TIZEN_BUFFER_POOL_AUTHENTICATE 0
-#define TIZEN_BUFFER_POOL_CREATE_BUFFER 1
-#define TIZEN_BUFFER_POOL_CREATE_PLANAR_BUFFER 2
-
-static inline void
-tizen_buffer_pool_set_user_data(struct tizen_buffer_pool *tizen_buffer_pool, void *user_data)
-{
- wl_proxy_set_user_data((struct wl_proxy *) tizen_buffer_pool, user_data);
-}
-
-static inline void *
-tizen_buffer_pool_get_user_data(struct tizen_buffer_pool *tizen_buffer_pool)
-{
- return wl_proxy_get_user_data((struct wl_proxy *) tizen_buffer_pool);
-}
-
-static inline void
-tizen_buffer_pool_destroy(struct tizen_buffer_pool *tizen_buffer_pool)
-{
- wl_proxy_destroy((struct wl_proxy *) tizen_buffer_pool);
-}
-
-static inline void
-tizen_buffer_pool_authenticate(struct tizen_buffer_pool *tizen_buffer_pool, uint32_t id)
-{
- wl_proxy_marshal((struct wl_proxy *) tizen_buffer_pool,
- TIZEN_BUFFER_POOL_AUTHENTICATE, id);
-}
-
-static inline struct wl_buffer *
-tizen_buffer_pool_create_buffer(struct tizen_buffer_pool *tizen_buffer_pool, uint32_t name, int32_t width, int32_t height, uint32_t stride, uint32_t format)
-{
- struct wl_proxy *id;
-
- id = wl_proxy_marshal_constructor((struct wl_proxy *) tizen_buffer_pool,
- TIZEN_BUFFER_POOL_CREATE_BUFFER, &wl_buffer_interface, NULL, name, width, height, stride, format);
-
- return (struct wl_buffer *) id;
-}
-
-static inline struct wl_buffer *
-tizen_buffer_pool_create_planar_buffer(struct tizen_buffer_pool *tizen_buffer_pool, int32_t width, int32_t height, uint32_t format, uint32_t name0, int32_t offset0, int32_t stride0, uint32_t name1, int32_t offset1, int32_t stride1, uint32_t name2, int32_t offset2, int32_t stride2)
-{
- struct wl_proxy *id;
-
- id = wl_proxy_marshal_constructor((struct wl_proxy *) tizen_buffer_pool,
- TIZEN_BUFFER_POOL_CREATE_PLANAR_BUFFER, &wl_buffer_interface, NULL, width, height, format, name0, offset0, stride0, name1, offset1, stride1, name2, offset2, stride2);
-
- return (struct wl_buffer *) id;
-}
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
+++ /dev/null
-#include <stdlib.h>
-#include <stdint.h>
-#include "wayland-util.h"
-
-extern const struct wl_interface wl_buffer_interface;
-
-static const struct wl_interface *types[] = {
- NULL,
- &wl_buffer_interface,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- &wl_buffer_interface,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
-};
-
-static const struct wl_message tizen_buffer_pool_requests[] = {
- { "authenticate", "u", types + 0 },
- { "create_buffer", "nuiiuu", types + 1 },
- { "create_planar_buffer", "niiuuiiuiiuii", types + 7 },
-};
-
-static const struct wl_message tizen_buffer_pool_events[] = {
- { "device", "s", types + 0 },
- { "authenticated", "", types + 0 },
- { "capabilities", "u", types + 0 },
- { "format", "u", types + 0 },
-};
-
-WL_EXPORT const struct wl_interface tizen_buffer_pool_interface = {
- "tizen_buffer_pool", 1,
- 3, tizen_buffer_pool_requests,
- 4, tizen_buffer_pool_events,
-};
+++ /dev/null
-#ifndef TIZEN_NOTIFICATION_CLIENT_PROTOCOL_H
-#define TIZEN_NOTIFICATION_CLIENT_PROTOCOL_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <stdint.h>
-#include <stddef.h>
-#include "wayland-client.h"
-
-struct wl_client;
-struct wl_resource;
-
-struct tizen_notification;
-
-extern const struct wl_interface tizen_notification_interface;
-
-#ifndef TIZEN_NOTIFICATION_LEVEL_ENUM
-#define TIZEN_NOTIFICATION_LEVEL_ENUM
-enum tizen_notification_level {
- TIZEN_NOTIFICATION_LEVEL_1 = 0,
- TIZEN_NOTIFICATION_LEVEL_2 = 1,
- TIZEN_NOTIFICATION_LEVEL_3 = 2,
- TIZEN_NOTIFICATION_LEVEL_NONE = -1,
- TIZEN_NOTIFICATION_LEVEL_DEFAULT = 10,
- TIZEN_NOTIFICATION_LEVEL_MEDIUM = 20,
- TIZEN_NOTIFICATION_LEVEL_HIGH = 30,
- TIZEN_NOTIFICATION_LEVEL_TOP = 40,
-};
-#endif /* TIZEN_NOTIFICATION_LEVEL_ENUM */
-
-#ifndef TIZEN_NOTIFICATION_ERROR_STATE_ENUM
-#define TIZEN_NOTIFICATION_ERROR_STATE_ENUM
-enum tizen_notification_error_state {
- TIZEN_NOTIFICATION_ERROR_STATE_NONE = 0,
- TIZEN_NOTIFICATION_ERROR_STATE_PERMISSION_DENIED = 1,
-};
-#endif /* TIZEN_NOTIFICATION_ERROR_STATE_ENUM */
-
-struct tizen_notification_listener {
- /**
- * done - (none)
- * @surface: (none)
- * @level: (none)
- * @error_state: (none)
- */
- void (*done)(void *data,
- struct tizen_notification *tizen_notification,
- struct wl_surface *surface,
- int32_t level,
- uint32_t error_state);
-};
-
-static inline int
-tizen_notification_add_listener(struct tizen_notification *tizen_notification,
- const struct tizen_notification_listener *listener, void *data)
-{
- return wl_proxy_add_listener((struct wl_proxy *) tizen_notification,
- (void (**)(void)) listener, data);
-}
-
-#define TIZEN_NOTIFICATION_SET_LEVEL 0
-
-static inline void
-tizen_notification_set_user_data(struct tizen_notification *tizen_notification, void *user_data)
-{
- wl_proxy_set_user_data((struct wl_proxy *) tizen_notification, user_data);
-}
-
-static inline void *
-tizen_notification_get_user_data(struct tizen_notification *tizen_notification)
-{
- return wl_proxy_get_user_data((struct wl_proxy *) tizen_notification);
-}
-
-static inline void
-tizen_notification_destroy(struct tizen_notification *tizen_notification)
-{
- wl_proxy_destroy((struct wl_proxy *) tizen_notification);
-}
-
-static inline void
-tizen_notification_set_level(struct tizen_notification *tizen_notification, struct wl_surface *surface, int32_t level)
-{
- wl_proxy_marshal((struct wl_proxy *) tizen_notification,
- TIZEN_NOTIFICATION_SET_LEVEL, surface, level);
-}
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
+++ /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,
- &wl_surface_interface,
- NULL,
- NULL,
-};
-
-static const struct wl_message tizen_notification_requests[] = {
- { "set_level", "oi", types + 0 },
-};
-
-static const struct wl_message tizen_notification_events[] = {
- { "done", "oiu", types + 2 },
-};
-
-WL_EXPORT const struct wl_interface tizen_notification_interface = {
- "tizen_notification", 1,
- 1, tizen_notification_requests,
- 1, tizen_notification_events,
-};
-
+++ /dev/null
-#ifndef TIZEN_WINDOW_SCREEN_CLIENT_PROTOCOL_H
-#define TIZEN_WINDOW_SCREEN_CLIENT_PROTOCOL_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <stdint.h>
-#include <stddef.h>
-#include "wayland-client.h"
-
-struct wl_client;
-struct wl_resource;
-
-struct tizen_window_screen;
-
-extern const struct wl_interface tizen_window_screen_interface;
-
-#ifndef TIZEN_WINDOW_SCREEN_MODE_ENUM
-#define TIZEN_WINDOW_SCREEN_MODE_ENUM
-enum tizen_window_screen_mode {
- TIZEN_WINDOW_SCREEN_MODE_DEFAULT = 0,
- TIZEN_WINDOW_SCREEN_MODE_ALWAYS_ON = 1,
-};
-#endif /* TIZEN_WINDOW_SCREEN_MODE_ENUM */
-
-#ifndef TIZEN_WINDOW_SCREEN_ERROR_STATE_ENUM
-#define TIZEN_WINDOW_SCREEN_ERROR_STATE_ENUM
-enum tizen_window_screen_error_state {
- TIZEN_WINDOW_SCREEN_ERROR_STATE_NONE = 0,
- TIZEN_WINDOW_SCREEN_ERROR_STATE_PERMISSION_DENIED = 1,
-};
-#endif /* TIZEN_WINDOW_SCREEN_ERROR_STATE_ENUM */
-
-struct tizen_window_screen_listener {
- /**
- * done - (none)
- * @surface: (none)
- * @mode: (none)
- * @error_state: (none)
- */
- void (*done)(void *data,
- struct tizen_window_screen *tizen_window_screen,
- struct wl_surface *surface,
- uint32_t mode,
- uint32_t error_state);
-};
-
-static inline int
-tizen_window_screen_add_listener(struct tizen_window_screen *tizen_window_screen,
- const struct tizen_window_screen_listener *listener, void *data)
-{
- return wl_proxy_add_listener((struct wl_proxy *) tizen_window_screen,
- (void (**)(void)) listener, data);
-}
-
-#define TIZEN_WINDOW_SCREEN_SET_MODE 0
-
-static inline void
-tizen_window_screen_set_user_data(struct tizen_window_screen *tizen_window_screen, void *user_data)
-{
- wl_proxy_set_user_data((struct wl_proxy *) tizen_window_screen, user_data);
-}
-
-static inline void *
-tizen_window_screen_get_user_data(struct tizen_window_screen *tizen_window_screen)
-{
- return wl_proxy_get_user_data((struct wl_proxy *) tizen_window_screen);
-}
-
-static inline void
-tizen_window_screen_destroy(struct tizen_window_screen *tizen_window_screen)
-{
- wl_proxy_destroy((struct wl_proxy *) tizen_window_screen);
-}
-
-static inline void
-tizen_window_screen_set_mode(struct tizen_window_screen *tizen_window_screen, struct wl_surface *surface, uint32_t mode)
-{
- wl_proxy_marshal((struct wl_proxy *) tizen_window_screen,
- TIZEN_WINDOW_SCREEN_SET_MODE, surface, mode);
-}
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
+++ /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,
- &wl_surface_interface,
- NULL,
- NULL,
-};
-
-static const struct wl_message tizen_window_screen_requests[] = {
- { "set_mode", "ou", types + 0 },
-};
-
-static const struct wl_message tizen_window_screen_events[] = {
- { "done", "ouu", types + 2 },
-};
-
-WL_EXPORT const struct wl_interface tizen_window_screen_interface = {
- "tizen_window_screen", 1,
- 1, tizen_window_screen_requests,
- 1, tizen_window_screen_events,
-};
-