if (!compositor)
return;
- wl_input_method::init(__compositor->display(), 1);
+ zwp_input_method_v1::init(__compositor->display(), 1);
}
DSWaylandInputMethodPrivate::~DSWaylandInputMethodPrivate()
return resource;
}
-void DSWaylandInputMethodPrivate::sendActivate(void *contextResource, int textInputId, bool focusInEvent)
+void DSWaylandInputMethodPrivate::sendActivate(void *contextResource, int textInputId)
{
DSWaylandInputMethodContextPrivate::Resource *resource = DSWaylandInputMethodContextPrivate::Resource::fromResource((struct ::wl_resource *)contextResource);
__contextMap.insert(std::pair<DSWaylandInputMethodContextPrivate::Resource*, int>(resource, textInputId));
- send_activate(__resource->handle, (struct ::wl_resource *)contextResource, textInputId, focusInEvent);
+ send_activate(__resource->handle, (struct ::wl_resource *)contextResource);
}
-void DSWaylandInputMethodPrivate::sendDeactivate(void *contextResource, bool focusInEvent)
+void DSWaylandInputMethodPrivate::sendDeactivate(void *contextResource)
{
DSWaylandInputMethodContextPrivate::Resource *resource = DSWaylandInputMethodContextPrivate::Resource::fromResource((struct ::wl_resource *)contextResource);
__contextMap.erase(resource);
- send_deactivate(__resource->handle, (struct ::wl_resource *)contextResource, focusInEvent);
+ send_deactivate(__resource->handle, (struct ::wl_resource *)contextResource);
}
void DSWaylandInputMethodPrivate::showInputPanel(void *contextResource, int textInputId)
send_hide_input_panel(__resource->handle, (struct ::wl_resource *)contextResource);
}
+void DSWaylandInputMethodPrivate::openConnection(void *contextResource)
+{
+ //Resource *resource = getResource(textInputId);
+ send_open_connection(__resource->handle, (struct ::wl_resource *)contextResource);
+}
+
+void DSWaylandInputMethodPrivate::closeConnection(void *contextResource)
+{
+ //Resource *resource = getResource(textInputId);
+ send_close_connection(__resource->handle, (struct ::wl_resource *)contextResource);
+}
+
+void DSWaylandInputMethodPrivate::setTextInputId(void *contextResource, int textInputId)
+{
+ //Resource *resource = getResource(textInputId);
+ send_set_text_input_id(__resource->handle, (struct ::wl_resource *)contextResource, textInputId);
+}
+
void DSWaylandInputMethodPrivate::input_method_bind_resource(Resource *resource)
{
__resource = resource;
}
if (__activateContext)
- priv->sendActivate(__activateContext, textInputId, true);
+ priv->sendActivate(__activateContext, textInputId);
}
void DSWaylandInputMethod::deactivate()
if (__activateContext)
{
- priv->sendDeactivate(__activateContext, true);
+ priv->sendDeactivate(__activateContext);
__activateContext = nullptr;
}
}
priv->hideInputPanel(__activateContext, textInputId);
}
+void DSWaylandInputMethod::openConnection()
+{
+ DS_GET_PRIV(DSWaylandInputMethod);
+
+ if (__activateContext)
+ priv->openConnection(__activateContext);
+}
+
+void DSWaylandInputMethod::closeConnection()
+{
+ DS_GET_PRIV(DSWaylandInputMethod);
+
+ if (__activateContext)
+ priv->closeConnection(__activateContext);
+}
+
+void DSWaylandInputMethod::setTextInputId(int textInputId)
+{
+ DS_GET_PRIV(DSWaylandInputMethod);
+
+ if (__activateContext)
+ priv->setTextInputId(__activateContext, textInputId);
+}
+
void DSWaylandInputMethod::resetTextInput()
{
__inputMethodContext->sendReset(__activateContext);
void deactivate();
void showInputPanel(int textInputId);
void hideInputPanel(int textInputId);
+ void openConnection();
+ void closeConnection();
+ void setTextInputId(int textInputId);
void resetTextInput();
void setContentType(unsigned int hint, unsigned int purpose);
void setPreferredLanguage(const std::string language);
#ifndef __DS_WAYLAND_INPUT_METHOD_CONTEXT_PRIVATE_H__
#define __DS_WAYLAND_INPUT_METHOD_CONTEXT_PRIVATE_H__
-#include "dswayland-server-input-method.h"
+#include "dswayland-server-input-method-unstable-v1.h"
#include "DSCore.h"
#include "DSObjectPrivate.h"
{
/*LCOV_EXCL_START*/
-class DS_DECL_EXPORT DSWaylandInputMethodContextPrivate : public DSObjectPrivate, public DSWaylandServer::wl_input_method_context
+class DS_DECL_EXPORT DSWaylandInputMethodContextPrivate : public DSObjectPrivate, public DSWaylandServer::zwp_input_method_context_v1
{
DS_PIMPL_USE_PUBLIC(DSWaylandInputMethodContext);
public:
#ifndef __DS_WAYLAND_INPUT_METHOD_PRIVATE_H__
#define __DS_WAYLAND_INPUT_METHOD_PRIVATE_H__
-#include "dswayland-server-input-method.h"
+#include "dswayland-server-input-method-unstable-v1.h"
#include "DSCore.h"
#include "DSObjectPrivate.h"
/*LCOV_EXCL_START*/
class DSWaylandInputMethodContextPrivate;
-class DS_DECL_EXPORT DSWaylandInputMethodPrivate : public DSObjectPrivate, public DSWaylandServer::wl_input_method
+class DS_DECL_EXPORT DSWaylandInputMethodPrivate : public DSObjectPrivate, public DSWaylandServer::zwp_input_method_v1
{
DS_PIMPL_USE_PUBLIC(DSWaylandInputMethod);
public:
DSWaylandInputMethodPrivate(DSWaylandInputMethod *p_ptr, DSWaylandCompositor *compositor);
~DSWaylandInputMethodPrivate() override;
- void sendActivate(void *contextResource, int textInputId, bool focusInEvent);
- void sendDeactivate(void *contextResource, bool focusInEvent);
+ void sendActivate(void *contextResource, int textInputId);
+ void sendDeactivate(void *contextResource);
void showInputPanel(void *contextResource, int textInputId);
void hideInputPanel(void *contextResource, int textInputId);
+ void openConnection(void *contextResource);
+ void closeConnection(void *contextResource);
+ void setTextInputId(void *contextResource, int textInputId);
int getResourceId(DSWaylandInputMethodContextPrivate::Resource *resource);
DSWaylandInputMethodContextPrivate::Resource* getResource(int id);
class DSWaylandInputPanelSurfaceData
{
public:
- DSWaylandInputPanelSurfaceData(DSWaylandServer::wl_input_panel_surface::Resource *resource, void *inputPanelResource)
+ DSWaylandInputPanelSurfaceData(DSWaylandServer::zwp_input_panel_surface_v1::Resource *resource, void *inputPanelResource)
: panel(false), showing(false), needShow(false), resizing(false),
__resource(resource),
__inputPanelResource(inputPanelResource), __wlSurface(nullptr) {}
- DSWaylandInputPanelSurfaceData(DSWaylandServer::wl_input_panel_surface::Resource *resource, void *inputPanelResource, void *surfaceResource)
+ DSWaylandInputPanelSurfaceData(DSWaylandServer::zwp_input_panel_surface_v1::Resource *resource, void *inputPanelResource, void *surfaceResource)
: panel(false), showing(false), needShow(false), resizing(false),
__resource(resource),
__inputPanelResource(inputPanelResource) { __wlSurface = DSWaylandSurface::fromWlResource((struct ::wl_resource *)surfaceResource); }
bool resizing;
private:
- DSWaylandServer::wl_input_panel_surface::Resource *__resource;
+ DSWaylandServer::zwp_input_panel_surface_v1::Resource *__resource;
void *__inputPanelResource;
DSWaylandSurface *__wlSurface;
};
if (!compositor)
return;
- wl_input_panel::init(__compositor->display(), 1);
+ zwp_input_panel_v1::init(__compositor->display(), 1);
}
DSWaylandInputPanelPrivate::~DSWaylandInputPanelPrivate()
#ifndef __DS_WAYLAND_INPUT_PANEL_PRIVATE_H__
#define __DS_WAYLAND_INPUT_PANEL_PRIVATE_H__
-#include "dswayland-server-input-method.h"
+#include "dswayland-server-input-method-unstable-v1.h"
#include "DSCore.h"
#include "DSObjectPrivate.h"
{
/*LCOV_EXCL_START*/
-class DS_DECL_EXPORT DSWaylandInputPanelPrivate : public DSObjectPrivate, public DSWaylandServer::wl_input_panel
+class DS_DECL_EXPORT DSWaylandInputPanelPrivate : public DSObjectPrivate, public DSWaylandServer::zwp_input_panel_v1
{
DS_PIMPL_USE_PUBLIC(DSWaylandInputPanel);
public:
#ifndef __DS_WAYLAND_INPUT_PANEL_SURFACE_PRIVATE_H__
#define __DS_WAYLAND_INPUT_PANEL_SURFACE_PRIVATE_H__
-#include "dswayland-server-input-method.h"
+#include "dswayland-server-input-method-unstable-v1.h"
#include "DSCore.h"
#include "DSObjectPrivate.h"
/*LCOV_EXCL_START*/
class DSWaylandInputPanelSurfaceData;
-class DS_DECL_EXPORT DSWaylandInputPanelSurfacePrivate : public DSObjectPrivate, public DSWaylandServer::wl_input_panel_surface
+class DS_DECL_EXPORT DSWaylandInputPanelSurfacePrivate : public DSObjectPrivate, public DSWaylandServer::zwp_input_panel_surface_v1
{
DS_PIMPL_USE_PUBLIC(DSWaylandInputPanelSurface);
public:
--- /dev/null
+/*LCOV_EXCL_START*/
+/* Protocol XML file : wayland-extension/input-method.xml */
+
+#include "dswayland-server-input-method-unstable-v1.h"
+
+#ifndef DS_UNLIKELY
+#define DS_UNLIKELY(X) X
+#endif
+#ifndef DS_UNUSED
+#define DS_UNUSED(X) (void)X
+#endif
+#ifndef DS_ASSERT
+#define DS_ASSERT(COND) assert(COND)
+#endif
+#ifndef DS_ASSERT_X
+#define DS_ASSERT_X(COND, ERR_TAG, ERR_MSG, X...) \
+ do {\
+ if (! (COND))\
+ {\
+ fprintf(stderr, "%s :: "#ERR_MSG, ERR_TAG, ##X);\
+ assert(COND);\
+ }\
+ } while(0)
+#endif
+#ifndef WRN
+#define WRN(X...) fprintf(stderr,##X)
+#endif
+
+namespace DSWaylandServer {
+ zwp_input_method_context_v1::zwp_input_method_context_v1(struct ::wl_client *client, uint32_t id, int version)
+ : m_resource_map()
+ , m_resource(NULL)
+ , m_global(NULL)
+ , m_globalVersion(0)
+ , m_displayDestroyedListener()
+ {
+ init(client, id, version);
+ }
+
+ zwp_input_method_context_v1::zwp_input_method_context_v1(struct ::wl_display *display, int version)
+ : m_resource_map()
+ , m_resource(NULL)
+ , m_global(NULL)
+ , m_globalVersion(0)
+ , m_displayDestroyedListener()
+ {
+ init(display, version);
+ }
+
+ zwp_input_method_context_v1::zwp_input_method_context_v1(struct ::wl_resource *resource)
+ : m_resource_map()
+ , m_resource(NULL)
+ , m_global(NULL)
+ , m_globalVersion(0)
+ , m_displayDestroyedListener()
+ {
+ init(resource);
+ }
+
+ zwp_input_method_context_v1::zwp_input_method_context_v1()
+ : m_resource_map()
+ , m_resource(NULL)
+ , m_global(NULL)
+ , m_globalVersion(0)
+ , m_displayDestroyedListener()
+ {
+ }
+
+ zwp_input_method_context_v1::~zwp_input_method_context_v1()
+ {
+ std::multimap<struct ::wl_client*, zwp_input_method_context_v1::Resource*>::iterator it;
+ for (it = m_resource_map.begin() ; it != m_resource_map.end() ; it++) {
+ zwp_input_method_context_v1::Resource *resource = (*it).second;
+ wl_resource_set_implementation(resource->handle, NULL, NULL, NULL);
+ }
+
+ if (m_global) {
+ wl_global_destroy(m_global);
+ wl_list_remove(&m_displayDestroyedListener.link);
+ }
+ }
+
+ void zwp_input_method_context_v1::init(struct ::wl_client *client, uint32_t id, int version)
+ {
+ m_resource = bind(client, id, version);
+ }
+
+ void zwp_input_method_context_v1::init(struct ::wl_resource *resource)
+ {
+ m_resource = bind(resource);
+ }
+
+ zwp_input_method_context_v1::Resource *zwp_input_method_context_v1::add(struct ::wl_client *client, int version)
+ {
+ Resource *resource = bind(client, 0, version);
+ m_resource_map.insert(std::pair<struct ::wl_client*, Resource*>(client, resource));
+ return resource;
+ }
+
+ zwp_input_method_context_v1::Resource *zwp_input_method_context_v1::add(struct ::wl_client *client, uint32_t id, int version)
+ {
+ Resource *resource = bind(client, id, version);
+ m_resource_map.insert(std::pair<struct ::wl_client*, Resource*>(client, resource));
+ return resource;
+ }
+
+ void zwp_input_method_context_v1::init(struct ::wl_display *display, int version)
+ {
+ m_global = wl_global_create(display, &::zwp_input_method_context_v1_interface, version, this, bind_func);
+ m_globalVersion = version;
+ m_displayDestroyedListener.notify = zwp_input_method_context_v1::display_destroy_func;
+ m_displayDestroyedListener.parent = this;
+ wl_display_add_destroy_listener(display, &m_displayDestroyedListener);
+ }
+
+ const struct wl_interface *zwp_input_method_context_v1::interface()
+ {
+ return &::zwp_input_method_context_v1_interface;
+ }
+
+ zwp_input_method_context_v1::Resource *zwp_input_method_context_v1::zwp_input_method_context_v1_allocate()
+ {
+ return new Resource;
+ }
+
+ void zwp_input_method_context_v1::zwp_input_method_context_v1_bind_resource(Resource *)
+ {
+ }
+
+ void zwp_input_method_context_v1::zwp_input_method_context_v1_destroy_resource(Resource *)
+ {
+ }
+
+ void zwp_input_method_context_v1::bind_func(struct ::wl_client *client, void *data, uint32_t version, uint32_t id)
+ {
+ zwp_input_method_context_v1 *that = static_cast<zwp_input_method_context_v1 *>(data);
+ that->add(client, id, std::min(that->m_globalVersion, version));
+ }
+
+ void zwp_input_method_context_v1::display_destroy_func(struct ::wl_listener *listener, void *data)
+ {
+ DS_UNUSED(data);
+ zwp_input_method_context_v1 *that = static_cast<zwp_input_method_context_v1::DisplayDestroyedListener *>(listener)->parent;
+ that->m_global = NULL;
+ }
+
+ void zwp_input_method_context_v1::destroy_func(struct ::wl_resource *client_resource)
+ {
+ Resource *resource = Resource::fromResource(client_resource);
+ DS_ASSERT(resource);
+ zwp_input_method_context_v1 *that = resource->zwp_input_method_context_v1_object;
+ that->m_resource_map.erase(resource->client());
+ that->zwp_input_method_context_v1_destroy_resource(resource);
+ delete resource;
+ }
+
+ zwp_input_method_context_v1::Resource *zwp_input_method_context_v1::bind(struct ::wl_client *client, uint32_t id, int version)
+ {
+ DS_ASSERT_X(!wl_client_get_object(client, id), "DSWaylandObject bind", "binding to object %u more than once", id);
+ struct ::wl_resource *handle = wl_resource_create(client, &::zwp_input_method_context_v1_interface, version, id);
+ return bind(handle);
+ }
+
+ zwp_input_method_context_v1::Resource *zwp_input_method_context_v1::bind(struct ::wl_resource *handle)
+ {
+ Resource *resource = zwp_input_method_context_v1_allocate();
+ resource->zwp_input_method_context_v1_object = this;
+
+ wl_resource_set_implementation(handle, &m_zwp_input_method_context_v1_interface, resource, destroy_func);
+ resource->handle = handle;
+ zwp_input_method_context_v1_bind_resource(resource);
+ return resource;
+ }
+ zwp_input_method_context_v1::Resource *zwp_input_method_context_v1::Resource::fromResource(struct ::wl_resource *resource)
+ {
+ if (DS_UNLIKELY(!resource))
+ return NULL;
+ if (wl_resource_instance_of(resource, &::zwp_input_method_context_v1_interface, &m_zwp_input_method_context_v1_interface))
+ return static_cast<Resource *>(wl_resource_get_user_data(resource));
+ return NULL;
+ }
+
+ const struct ::zwp_input_method_context_v1_interface zwp_input_method_context_v1::m_zwp_input_method_context_v1_interface = {
+ zwp_input_method_context_v1::handle_destroy,
+ zwp_input_method_context_v1::handle_commit_string,
+ zwp_input_method_context_v1::handle_preedit_string,
+ zwp_input_method_context_v1::handle_preedit_styling,
+ zwp_input_method_context_v1::handle_preedit_cursor,
+ zwp_input_method_context_v1::handle_delete_surrounding_text,
+ zwp_input_method_context_v1::handle_cursor_position,
+ zwp_input_method_context_v1::handle_modifiers_map,
+ zwp_input_method_context_v1::handle_keysym,
+ zwp_input_method_context_v1::handle_grab_keyboard,
+ zwp_input_method_context_v1::handle_key,
+ zwp_input_method_context_v1::handle_modifiers,
+ zwp_input_method_context_v1::handle_language,
+ zwp_input_method_context_v1::handle_text_direction,
+ zwp_input_method_context_v1::handle_selection_region,
+ zwp_input_method_context_v1::handle_private_command,
+ zwp_input_method_context_v1::handle_update_input_panel_data,
+ zwp_input_method_context_v1::handle_hide_input_panel,
+ zwp_input_method_context_v1::handle_get_selection_text,
+ zwp_input_method_context_v1::handle_get_surrounding_text,
+ zwp_input_method_context_v1::handle_filter_key_event_done,
+ zwp_input_method_context_v1::handle_update_ise_geometry,
+ zwp_input_method_context_v1::handle_recapture_string,
+ zwp_input_method_context_v1::handle_input_panel_event,
+ zwp_input_method_context_v1::handle_commit_content,
+ zwp_input_method_context_v1::handle_update_candidate_state,
+ zwp_input_method_context_v1::handle_reshow_input_panel,
+ zwp_input_method_context_v1::handle_set_floating_panel,
+ zwp_input_method_context_v1::handle_set_floating_drag_enabled
+ };
+
+ void zwp_input_method_context_v1::zwp_input_method_context_v1_destroy(Resource *)
+ {
+ }
+
+ void zwp_input_method_context_v1::zwp_input_method_context_v1_commit_string(Resource *, uint32_t , const std::string &)
+ {
+ }
+
+ void zwp_input_method_context_v1::zwp_input_method_context_v1_preedit_string(Resource *, uint32_t , const std::string &, const std::string &)
+ {
+ }
+
+ void zwp_input_method_context_v1::zwp_input_method_context_v1_preedit_styling(Resource *, uint32_t , uint32_t , uint32_t )
+ {
+ }
+
+ void zwp_input_method_context_v1::zwp_input_method_context_v1_preedit_cursor(Resource *, int32_t )
+ {
+ }
+
+ void zwp_input_method_context_v1::zwp_input_method_context_v1_delete_surrounding_text(Resource *, int32_t , uint32_t )
+ {
+ }
+
+ void zwp_input_method_context_v1::zwp_input_method_context_v1_cursor_position(Resource *, int32_t , int32_t )
+ {
+ }
+
+ void zwp_input_method_context_v1::zwp_input_method_context_v1_modifiers_map(Resource *, struct ::wl_array *)
+ {
+ }
+
+ void zwp_input_method_context_v1::zwp_input_method_context_v1_keysym(Resource *, uint32_t , uint32_t , uint32_t , uint32_t , uint32_t )
+ {
+ }
+
+ void zwp_input_method_context_v1::zwp_input_method_context_v1_grab_keyboard(Resource *, uint32_t)
+ {
+ }
+
+ void zwp_input_method_context_v1::zwp_input_method_context_v1_key(Resource *, uint32_t , uint32_t , uint32_t , uint32_t )
+ {
+ }
+
+ void zwp_input_method_context_v1::zwp_input_method_context_v1_modifiers(Resource *, uint32_t , uint32_t , uint32_t , uint32_t , uint32_t )
+ {
+ }
+
+ void zwp_input_method_context_v1::zwp_input_method_context_v1_language(Resource *, uint32_t , const std::string &)
+ {
+ }
+
+ void zwp_input_method_context_v1::zwp_input_method_context_v1_text_direction(Resource *, uint32_t , uint32_t )
+ {
+ }
+
+ void zwp_input_method_context_v1::zwp_input_method_context_v1_selection_region(Resource *, uint32_t , int32_t , int32_t )
+ {
+ }
+
+ void zwp_input_method_context_v1::zwp_input_method_context_v1_private_command(Resource *, uint32_t , const std::string &)
+ {
+ }
+
+ void zwp_input_method_context_v1::zwp_input_method_context_v1_update_input_panel_data(Resource *, uint32_t , const std::string &, uint32_t )
+ {
+ }
+
+ void zwp_input_method_context_v1::zwp_input_method_context_v1_hide_input_panel(Resource *, uint32_t )
+ {
+ }
+
+ void zwp_input_method_context_v1::zwp_input_method_context_v1_get_selection_text(Resource *, int32_t )
+ {
+ }
+
+ void zwp_input_method_context_v1::zwp_input_method_context_v1_get_surrounding_text(Resource *, uint32_t , uint32_t , int32_t )
+ {
+ }
+
+ void zwp_input_method_context_v1::zwp_input_method_context_v1_filter_key_event_done(Resource *, uint32_t , uint32_t )
+ {
+ }
+
+ void zwp_input_method_context_v1::zwp_input_method_context_v1_update_ise_geometry(Resource *, uint32_t , uint32_t , uint32_t , uint32_t , uint32_t )
+ {
+ }
+
+ void zwp_input_method_context_v1::zwp_input_method_context_v1_recapture_string(Resource *, uint32_t , int32_t , uint32_t , const std::string &, const std::string &, const std::string &)
+ {
+ }
+
+ void zwp_input_method_context_v1::zwp_input_method_context_v1_input_panel_event(Resource *, uint32_t , uint32_t , uint32_t )
+ {
+ }
+
+ void zwp_input_method_context_v1::zwp_input_method_context_v1_commit_content(Resource *, uint32_t , const std::string &, const std::string &, const std::string &)
+ {
+ }
+
+ void zwp_input_method_context_v1::zwp_input_method_context_v1_update_candidate_state(Resource *, uint32_t )
+ {
+ }
+
+ void zwp_input_method_context_v1::zwp_input_method_context_v1_reshow_input_panel(Resource *)
+ {
+ }
+
+ void zwp_input_method_context_v1::zwp_input_method_context_v1_set_floating_panel(Resource *, uint32_t )
+ {
+ }
+
+ void zwp_input_method_context_v1::zwp_input_method_context_v1_set_floating_drag_enabled(Resource *, uint32_t )
+ {
+ }
+
+
+ void zwp_input_method_context_v1::handle_destroy(
+ ::wl_client *client,
+ struct wl_resource *resource)
+ {
+ DS_UNUSED(client);
+ Resource *r = Resource::fromResource(resource);
+ static_cast<zwp_input_method_context_v1 *>(r->zwp_input_method_context_v1_object)->zwp_input_method_context_v1_destroy(
+ r);
+ }
+
+ void zwp_input_method_context_v1::handle_commit_string(
+ ::wl_client *client,
+ struct wl_resource *resource,
+ uint32_t serial,
+ const char *text)
+ {
+ DS_UNUSED(client);
+ Resource *r = Resource::fromResource(resource);
+ static_cast<zwp_input_method_context_v1 *>(r->zwp_input_method_context_v1_object)->zwp_input_method_context_v1_commit_string(
+ r,
+ serial,
+ std::string(text));
+ }
+
+ void zwp_input_method_context_v1::handle_preedit_string(
+ ::wl_client *client,
+ struct wl_resource *resource,
+ uint32_t serial,
+ const char *text,
+ const char *commit)
+ {
+ DS_UNUSED(client);
+ Resource *r = Resource::fromResource(resource);
+ static_cast<zwp_input_method_context_v1 *>(r->zwp_input_method_context_v1_object)->zwp_input_method_context_v1_preedit_string(
+ r,
+ serial,
+ std::string(text),
+ std::string(commit));
+ }
+
+ void zwp_input_method_context_v1::handle_preedit_styling(
+ ::wl_client *client,
+ struct wl_resource *resource,
+ uint32_t index,
+ uint32_t length,
+ uint32_t style)
+ {
+ DS_UNUSED(client);
+ Resource *r = Resource::fromResource(resource);
+ static_cast<zwp_input_method_context_v1 *>(r->zwp_input_method_context_v1_object)->zwp_input_method_context_v1_preedit_styling(
+ r,
+ index,
+ length,
+ style);
+ }
+
+ void zwp_input_method_context_v1::handle_preedit_cursor(
+ ::wl_client *client,
+ struct wl_resource *resource,
+ int32_t index)
+ {
+ DS_UNUSED(client);
+ Resource *r = Resource::fromResource(resource);
+ static_cast<zwp_input_method_context_v1 *>(r->zwp_input_method_context_v1_object)->zwp_input_method_context_v1_preedit_cursor(
+ r,
+ index);
+ }
+
+ void zwp_input_method_context_v1::handle_delete_surrounding_text(
+ ::wl_client *client,
+ struct wl_resource *resource,
+ int32_t index,
+ uint32_t length)
+ {
+ DS_UNUSED(client);
+ Resource *r = Resource::fromResource(resource);
+ static_cast<zwp_input_method_context_v1 *>(r->zwp_input_method_context_v1_object)->zwp_input_method_context_v1_delete_surrounding_text(
+ r,
+ index,
+ length);
+ }
+
+ void zwp_input_method_context_v1::handle_cursor_position(
+ ::wl_client *client,
+ struct wl_resource *resource,
+ int32_t index,
+ int32_t anchor)
+ {
+ DS_UNUSED(client);
+ Resource *r = Resource::fromResource(resource);
+ static_cast<zwp_input_method_context_v1 *>(r->zwp_input_method_context_v1_object)->zwp_input_method_context_v1_cursor_position(
+ r,
+ index,
+ anchor);
+ }
+
+ void zwp_input_method_context_v1::handle_modifiers_map(
+ ::wl_client *client,
+ struct wl_resource *resource,
+ struct ::wl_array *map)
+ {
+ DS_UNUSED(client);
+ Resource *r = Resource::fromResource(resource);
+ static_cast<zwp_input_method_context_v1 *>(r->zwp_input_method_context_v1_object)->zwp_input_method_context_v1_modifiers_map(
+ r,
+ map);
+ }
+
+ void zwp_input_method_context_v1::handle_keysym(
+ ::wl_client *client,
+ struct wl_resource *resource,
+ uint32_t serial,
+ uint32_t time,
+ uint32_t sym,
+ uint32_t state,
+ uint32_t modifiers)
+ {
+ DS_UNUSED(client);
+ Resource *r = Resource::fromResource(resource);
+ static_cast<zwp_input_method_context_v1 *>(r->zwp_input_method_context_v1_object)->zwp_input_method_context_v1_keysym(
+ r,
+ serial,
+ time,
+ sym,
+ state,
+ modifiers);
+ }
+
+ void zwp_input_method_context_v1::handle_grab_keyboard(
+ ::wl_client *client,
+ struct wl_resource *resource,
+ uint32_t keyboard)
+ {
+ DS_UNUSED(client);
+ Resource *r = Resource::fromResource(resource);
+ static_cast<zwp_input_method_context_v1 *>(r->zwp_input_method_context_v1_object)->zwp_input_method_context_v1_grab_keyboard(
+ r,
+ keyboard);
+ }
+
+ void zwp_input_method_context_v1::handle_key(
+ ::wl_client *client,
+ struct wl_resource *resource,
+ uint32_t serial,
+ uint32_t time,
+ uint32_t key,
+ uint32_t state)
+ {
+ DS_UNUSED(client);
+ Resource *r = Resource::fromResource(resource);
+ static_cast<zwp_input_method_context_v1 *>(r->zwp_input_method_context_v1_object)->zwp_input_method_context_v1_key(
+ r,
+ serial,
+ time,
+ key,
+ state);
+ }
+
+ void zwp_input_method_context_v1::handle_modifiers(
+ ::wl_client *client,
+ struct wl_resource *resource,
+ uint32_t serial,
+ uint32_t mods_depressed,
+ uint32_t mods_latched,
+ uint32_t mods_locked,
+ uint32_t group)
+ {
+ DS_UNUSED(client);
+ Resource *r = Resource::fromResource(resource);
+ static_cast<zwp_input_method_context_v1 *>(r->zwp_input_method_context_v1_object)->zwp_input_method_context_v1_modifiers(
+ r,
+ serial,
+ mods_depressed,
+ mods_latched,
+ mods_locked,
+ group);
+ }
+
+ void zwp_input_method_context_v1::handle_language(
+ ::wl_client *client,
+ struct wl_resource *resource,
+ uint32_t serial,
+ const char *language)
+ {
+ DS_UNUSED(client);
+ Resource *r = Resource::fromResource(resource);
+ static_cast<zwp_input_method_context_v1 *>(r->zwp_input_method_context_v1_object)->zwp_input_method_context_v1_language(
+ r,
+ serial,
+ std::string(language));
+ }
+
+ void zwp_input_method_context_v1::handle_text_direction(
+ ::wl_client *client,
+ struct wl_resource *resource,
+ uint32_t serial,
+ uint32_t direction)
+ {
+ DS_UNUSED(client);
+ Resource *r = Resource::fromResource(resource);
+ static_cast<zwp_input_method_context_v1 *>(r->zwp_input_method_context_v1_object)->zwp_input_method_context_v1_text_direction(
+ r,
+ serial,
+ direction);
+ }
+
+ void zwp_input_method_context_v1::handle_selection_region(
+ ::wl_client *client,
+ struct wl_resource *resource,
+ uint32_t serial,
+ int32_t start,
+ int32_t end)
+ {
+ DS_UNUSED(client);
+ Resource *r = Resource::fromResource(resource);
+ static_cast<zwp_input_method_context_v1 *>(r->zwp_input_method_context_v1_object)->zwp_input_method_context_v1_selection_region(
+ r,
+ serial,
+ start,
+ end);
+ }
+
+ void zwp_input_method_context_v1::handle_private_command(
+ ::wl_client *client,
+ struct wl_resource *resource,
+ uint32_t serial,
+ const char *command)
+ {
+ DS_UNUSED(client);
+ Resource *r = Resource::fromResource(resource);
+ static_cast<zwp_input_method_context_v1 *>(r->zwp_input_method_context_v1_object)->zwp_input_method_context_v1_private_command(
+ r,
+ serial,
+ std::string(command));
+ }
+
+ void zwp_input_method_context_v1::handle_update_input_panel_data(
+ ::wl_client *client,
+ struct wl_resource *resource,
+ uint32_t serial,
+ const char *input_panel_data,
+ uint32_t input_panel_data_length)
+ {
+ DS_UNUSED(client);
+ Resource *r = Resource::fromResource(resource);
+ static_cast<zwp_input_method_context_v1 *>(r->zwp_input_method_context_v1_object)->zwp_input_method_context_v1_update_input_panel_data(
+ r,
+ serial,
+ std::string(input_panel_data),
+ input_panel_data_length);
+ }
+
+ void zwp_input_method_context_v1::handle_hide_input_panel(
+ ::wl_client *client,
+ struct wl_resource *resource,
+ uint32_t serial)
+ {
+ DS_UNUSED(client);
+ Resource *r = Resource::fromResource(resource);
+ static_cast<zwp_input_method_context_v1 *>(r->zwp_input_method_context_v1_object)->zwp_input_method_context_v1_hide_input_panel(
+ r,
+ serial);
+ }
+
+ void zwp_input_method_context_v1::handle_get_selection_text(
+ ::wl_client *client,
+ struct wl_resource *resource,
+ int32_t fd)
+ {
+ DS_UNUSED(client);
+ Resource *r = Resource::fromResource(resource);
+ static_cast<zwp_input_method_context_v1 *>(r->zwp_input_method_context_v1_object)->zwp_input_method_context_v1_get_selection_text(
+ r,
+ fd);
+ }
+
+ void zwp_input_method_context_v1::handle_get_surrounding_text(
+ ::wl_client *client,
+ struct wl_resource *resource,
+ uint32_t maxlen_before,
+ uint32_t maxlen_after,
+ int32_t fd)
+ {
+ DS_UNUSED(client);
+ Resource *r = Resource::fromResource(resource);
+ static_cast<zwp_input_method_context_v1 *>(r->zwp_input_method_context_v1_object)->zwp_input_method_context_v1_get_surrounding_text(
+ r,
+ maxlen_before,
+ maxlen_after,
+ fd);
+ }
+
+ void zwp_input_method_context_v1::handle_filter_key_event_done(
+ ::wl_client *client,
+ struct wl_resource *resource,
+ uint32_t serial,
+ uint32_t state)
+ {
+ DS_UNUSED(client);
+ Resource *r = Resource::fromResource(resource);
+ static_cast<zwp_input_method_context_v1 *>(r->zwp_input_method_context_v1_object)->zwp_input_method_context_v1_filter_key_event_done(
+ r,
+ serial,
+ state);
+ }
+
+ void zwp_input_method_context_v1::handle_update_ise_geometry(
+ ::wl_client *client,
+ struct wl_resource *resource,
+ uint32_t serial,
+ uint32_t x,
+ uint32_t y,
+ uint32_t width,
+ uint32_t height)
+ {
+ DS_UNUSED(client);
+ Resource *r = Resource::fromResource(resource);
+ static_cast<zwp_input_method_context_v1 *>(r->zwp_input_method_context_v1_object)->zwp_input_method_context_v1_update_ise_geometry(
+ r,
+ serial,
+ x,
+ y,
+ width,
+ height);
+ }
+
+ void zwp_input_method_context_v1::handle_recapture_string(
+ ::wl_client *client,
+ struct wl_resource *resource,
+ uint32_t serial,
+ int32_t index,
+ uint32_t length,
+ const char *preedit,
+ const char *preedit_commit,
+ const char *commit)
+ {
+ DS_UNUSED(client);
+ Resource *r = Resource::fromResource(resource);
+ static_cast<zwp_input_method_context_v1 *>(r->zwp_input_method_context_v1_object)->zwp_input_method_context_v1_recapture_string(
+ r,
+ serial,
+ index,
+ length,
+ std::string(preedit),
+ std::string(preedit_commit),
+ std::string(commit));
+ }
+
+ void zwp_input_method_context_v1::handle_input_panel_event(
+ ::wl_client *client,
+ struct wl_resource *resource,
+ uint32_t serial,
+ uint32_t event_type,
+ uint32_t value)
+ {
+ DS_UNUSED(client);
+ Resource *r = Resource::fromResource(resource);
+ static_cast<zwp_input_method_context_v1 *>(r->zwp_input_method_context_v1_object)->zwp_input_method_context_v1_input_panel_event(
+ r,
+ serial,
+ event_type,
+ value);
+ }
+
+ void zwp_input_method_context_v1::handle_commit_content(
+ ::wl_client *client,
+ struct wl_resource *resource,
+ uint32_t serial,
+ const char *content,
+ const char *description,
+ const char *mime_types)
+ {
+ DS_UNUSED(client);
+ Resource *r = Resource::fromResource(resource);
+ static_cast<zwp_input_method_context_v1 *>(r->zwp_input_method_context_v1_object)->zwp_input_method_context_v1_commit_content(
+ r,
+ serial,
+ std::string(content),
+ std::string(description),
+ std::string(mime_types));
+ }
+
+ void zwp_input_method_context_v1::handle_update_candidate_state(
+ ::wl_client *client,
+ struct wl_resource *resource,
+ uint32_t state)
+ {
+ DS_UNUSED(client);
+ Resource *r = Resource::fromResource(resource);
+ static_cast<zwp_input_method_context_v1 *>(r->zwp_input_method_context_v1_object)->zwp_input_method_context_v1_update_candidate_state(
+ r,
+ state);
+ }
+
+ void zwp_input_method_context_v1::handle_reshow_input_panel(
+ ::wl_client *client,
+ struct wl_resource *resource)
+ {
+ DS_UNUSED(client);
+ Resource *r = Resource::fromResource(resource);
+ static_cast<zwp_input_method_context_v1 *>(r->zwp_input_method_context_v1_object)->zwp_input_method_context_v1_reshow_input_panel(
+ r);
+ }
+
+ void zwp_input_method_context_v1::handle_set_floating_panel(
+ ::wl_client *client,
+ struct wl_resource *resource,
+ uint32_t state)
+ {
+ DS_UNUSED(client);
+ Resource *r = Resource::fromResource(resource);
+ static_cast<zwp_input_method_context_v1 *>(r->zwp_input_method_context_v1_object)->zwp_input_method_context_v1_set_floating_panel(
+ r,
+ state);
+ }
+
+ void zwp_input_method_context_v1::handle_set_floating_drag_enabled(
+ ::wl_client *client,
+ struct wl_resource *resource,
+ uint32_t enabled)
+ {
+ DS_UNUSED(client);
+ Resource *r = Resource::fromResource(resource);
+ static_cast<zwp_input_method_context_v1 *>(r->zwp_input_method_context_v1_object)->zwp_input_method_context_v1_set_floating_drag_enabled(
+ r,
+ enabled);
+ }
+
+ void zwp_input_method_context_v1::send_surrounding_text(const std::string &text, uint32_t cursor, uint32_t anchor)
+ {
+ DS_ASSERT_X(m_resource, "zwp_input_method_context_v1::surrounding_text", "Uninitialised resource");
+ if (DS_UNLIKELY(!m_resource)) {
+ WRN("could not call zwp_input_method_context_v1::surrounding_text as it's not initialised");
+ return;
+ }
+ send_surrounding_text(
+ m_resource->handle,
+ text,
+ cursor,
+ anchor);
+ }
+
+ void zwp_input_method_context_v1::send_surrounding_text(struct ::wl_resource *resource, const std::string &text, uint32_t cursor, uint32_t anchor)
+ {
+ zwp_input_method_context_v1_send_surrounding_text(
+ resource,
+ text.c_str(),
+ cursor,
+ anchor);
+ }
+
+
+ void zwp_input_method_context_v1::send_reset()
+ {
+ DS_ASSERT_X(m_resource, "zwp_input_method_context_v1::reset", "Uninitialised resource");
+ if (DS_UNLIKELY(!m_resource)) {
+ WRN("could not call zwp_input_method_context_v1::reset as it's not initialised");
+ return;
+ }
+ send_reset(
+ m_resource->handle);
+ }
+
+ void zwp_input_method_context_v1::send_reset(struct ::wl_resource *resource)
+ {
+ zwp_input_method_context_v1_send_reset(
+ resource);
+ }
+
+
+ void zwp_input_method_context_v1::send_content_type(uint32_t hint, uint32_t purpose)
+ {
+ DS_ASSERT_X(m_resource, "zwp_input_method_context_v1::content_type", "Uninitialised resource");
+ if (DS_UNLIKELY(!m_resource)) {
+ WRN("could not call zwp_input_method_context_v1::content_type as it's not initialised");
+ return;
+ }
+ send_content_type(
+ m_resource->handle,
+ hint,
+ purpose);
+ }
+
+ void zwp_input_method_context_v1::send_content_type(struct ::wl_resource *resource, uint32_t hint, uint32_t purpose)
+ {
+ zwp_input_method_context_v1_send_content_type(
+ resource,
+ hint,
+ purpose);
+ }
+
+
+ void zwp_input_method_context_v1::send_invoke_action(uint32_t button, uint32_t index)
+ {
+ DS_ASSERT_X(m_resource, "zwp_input_method_context_v1::invoke_action", "Uninitialised resource");
+ if (DS_UNLIKELY(!m_resource)) {
+ WRN("could not call zwp_input_method_context_v1::invoke_action as it's not initialised");
+ return;
+ }
+ send_invoke_action(
+ m_resource->handle,
+ button,
+ index);
+ }
+
+ void zwp_input_method_context_v1::send_invoke_action(struct ::wl_resource *resource, uint32_t button, uint32_t index)
+ {
+ zwp_input_method_context_v1_send_invoke_action(
+ resource,
+ button,
+ index);
+ }
+
+
+ void zwp_input_method_context_v1::send_commit_state(uint32_t serial)
+ {
+ DS_ASSERT_X(m_resource, "zwp_input_method_context_v1::commit_state", "Uninitialised resource");
+ if (DS_UNLIKELY(!m_resource)) {
+ WRN("could not call zwp_input_method_context_v1::commit_state as it's not initialised");
+ return;
+ }
+ send_commit_state(
+ m_resource->handle,
+ serial);
+ }
+
+ void zwp_input_method_context_v1::send_commit_state(struct ::wl_resource *resource, uint32_t serial)
+ {
+ zwp_input_method_context_v1_send_commit_state(
+ resource,
+ serial);
+ }
+
+
+ void zwp_input_method_context_v1::send_preferred_language(const std::string &language)
+ {
+ DS_ASSERT_X(m_resource, "zwp_input_method_context_v1::preferred_language", "Uninitialised resource");
+ if (DS_UNLIKELY(!m_resource)) {
+ WRN("could not call zwp_input_method_context_v1::preferred_language as it's not initialised");
+ return;
+ }
+ send_preferred_language(
+ m_resource->handle,
+ language);
+ }
+
+ void zwp_input_method_context_v1::send_preferred_language(struct ::wl_resource *resource, const std::string &language)
+ {
+ zwp_input_method_context_v1_send_preferred_language(
+ resource,
+ language.c_str());
+ }
+
+
+ void zwp_input_method_context_v1::send_return_key_type(uint32_t return_key_type)
+ {
+ DS_ASSERT_X(m_resource, "zwp_input_method_context_v1::return_key_type", "Uninitialised resource");
+ if (DS_UNLIKELY(!m_resource)) {
+ WRN("could not call zwp_input_method_context_v1::return_key_type as it's not initialised");
+ return;
+ }
+ send_return_key_type(
+ m_resource->handle,
+ return_key_type);
+ }
+
+ void zwp_input_method_context_v1::send_return_key_type(struct ::wl_resource *resource, uint32_t return_key_type)
+ {
+ zwp_input_method_context_v1_send_return_key_type(
+ resource,
+ return_key_type);
+ }
+
+
+ void zwp_input_method_context_v1::send_return_key_disabled(uint32_t return_key_disabled)
+ {
+ DS_ASSERT_X(m_resource, "zwp_input_method_context_v1::return_key_disabled", "Uninitialised resource");
+ if (DS_UNLIKELY(!m_resource)) {
+ WRN("could not call zwp_input_method_context_v1::return_key_disabled as it's not initialised");
+ return;
+ }
+ send_return_key_disabled(
+ m_resource->handle,
+ return_key_disabled);
+ }
+
+ void zwp_input_method_context_v1::send_return_key_disabled(struct ::wl_resource *resource, uint32_t return_key_disabled)
+ {
+ zwp_input_method_context_v1_send_return_key_disabled(
+ resource,
+ return_key_disabled);
+ }
+
+
+ void zwp_input_method_context_v1::send_input_panel_data(const std::string &input_panel_data, uint32_t input_panel_data_length)
+ {
+ DS_ASSERT_X(m_resource, "zwp_input_method_context_v1::input_panel_data", "Uninitialised resource");
+ if (DS_UNLIKELY(!m_resource)) {
+ WRN("could not call zwp_input_method_context_v1::input_panel_data as it's not initialised");
+ return;
+ }
+ send_input_panel_data(
+ m_resource->handle,
+ input_panel_data,
+ input_panel_data_length);
+ }
+
+ void zwp_input_method_context_v1::send_input_panel_data(struct ::wl_resource *resource, const std::string &input_panel_data, uint32_t input_panel_data_length)
+ {
+ zwp_input_method_context_v1_send_input_panel_data(
+ resource,
+ input_panel_data.c_str(),
+ input_panel_data_length);
+ }
+
+
+ void zwp_input_method_context_v1::send_bidi_direction(uint32_t direction)
+ {
+ DS_ASSERT_X(m_resource, "zwp_input_method_context_v1::bidi_direction", "Uninitialised resource");
+ if (DS_UNLIKELY(!m_resource)) {
+ WRN("could not call zwp_input_method_context_v1::bidi_direction as it's not initialised");
+ return;
+ }
+ send_bidi_direction(
+ m_resource->handle,
+ direction);
+ }
+
+ void zwp_input_method_context_v1::send_bidi_direction(struct ::wl_resource *resource, uint32_t direction)
+ {
+ zwp_input_method_context_v1_send_bidi_direction(
+ resource,
+ direction);
+ }
+
+
+ void zwp_input_method_context_v1::send_cursor_position(uint32_t cursor_position)
+ {
+ DS_ASSERT_X(m_resource, "zwp_input_method_context_v1::cursor_position", "Uninitialised resource");
+ if (DS_UNLIKELY(!m_resource)) {
+ WRN("could not call zwp_input_method_context_v1::cursor_position as it's not initialised");
+ return;
+ }
+ send_cursor_position(
+ m_resource->handle,
+ cursor_position);
+ }
+
+ void zwp_input_method_context_v1::send_cursor_position(struct ::wl_resource *resource, uint32_t cursor_position)
+ {
+ zwp_input_method_context_v1_send_cursor_position(
+ resource,
+ cursor_position);
+ }
+
+
+ void zwp_input_method_context_v1::send_process_input_device_event(uint32_t event_type, const std::string &event_data, uint32_t event_length)
+ {
+ DS_ASSERT_X(m_resource, "zwp_input_method_context_v1::process_input_device_event", "Uninitialised resource");
+ if (DS_UNLIKELY(!m_resource)) {
+ WRN("could not call zwp_input_method_context_v1::process_input_device_event as it's not initialised");
+ return;
+ }
+ send_process_input_device_event(
+ m_resource->handle,
+ event_type,
+ event_data,
+ event_length);
+ }
+
+ void zwp_input_method_context_v1::send_process_input_device_event(struct ::wl_resource *resource, uint32_t event_type, const std::string &event_data, uint32_t event_length)
+ {
+ zwp_input_method_context_v1_send_process_input_device_event(
+ resource,
+ event_type,
+ event_data.c_str(),
+ event_length);
+ }
+
+
+ void zwp_input_method_context_v1::send_filter_key_event(uint32_t serial, uint32_t time, const std::string &keyname, uint32_t state, uint32_t modifiers, const std::string &dev_name, uint32_t dev_class, uint32_t dev_subclass, uint32_t keycode)
+ {
+ DS_ASSERT_X(m_resource, "zwp_input_method_context_v1::filter_key_event", "Uninitialised resource");
+ if (DS_UNLIKELY(!m_resource)) {
+ WRN("could not call zwp_input_method_context_v1::filter_key_event as it's not initialised");
+ return;
+ }
+ send_filter_key_event(
+ m_resource->handle,
+ serial,
+ time,
+ keyname,
+ state,
+ modifiers,
+ dev_name,
+ dev_class,
+ dev_subclass,
+ keycode);
+ }
+
+ void zwp_input_method_context_v1::send_filter_key_event(struct ::wl_resource *resource, uint32_t serial, uint32_t time, const std::string &keyname, uint32_t state, uint32_t modifiers, const std::string &dev_name, uint32_t dev_class, uint32_t dev_subclass, uint32_t keycode)
+ {
+ zwp_input_method_context_v1_send_filter_key_event(
+ resource,
+ serial,
+ time,
+ keyname.c_str(),
+ state,
+ modifiers,
+ dev_name.c_str(),
+ dev_class,
+ dev_subclass,
+ keycode);
+ }
+
+
+ void zwp_input_method_context_v1::send_capital_mode(uint32_t mode)
+ {
+ DS_ASSERT_X(m_resource, "zwp_input_method_context_v1::capital_mode", "Uninitialised resource");
+ if (DS_UNLIKELY(!m_resource)) {
+ WRN("could not call zwp_input_method_context_v1::capital_mode as it's not initialised");
+ return;
+ }
+ send_capital_mode(
+ m_resource->handle,
+ mode);
+ }
+
+ void zwp_input_method_context_v1::send_capital_mode(struct ::wl_resource *resource, uint32_t mode)
+ {
+ zwp_input_method_context_v1_send_capital_mode(
+ resource,
+ mode);
+ }
+
+
+ void zwp_input_method_context_v1::send_prediction_hint(const std::string &text)
+ {
+ DS_ASSERT_X(m_resource, "zwp_input_method_context_v1::prediction_hint", "Uninitialised resource");
+ if (DS_UNLIKELY(!m_resource)) {
+ WRN("could not call zwp_input_method_context_v1::prediction_hint as it's not initialised");
+ return;
+ }
+ send_prediction_hint(
+ m_resource->handle,
+ text);
+ }
+
+ void zwp_input_method_context_v1::send_prediction_hint(struct ::wl_resource *resource, const std::string &text)
+ {
+ zwp_input_method_context_v1_send_prediction_hint(
+ resource,
+ text.c_str());
+ }
+
+
+ void zwp_input_method_context_v1::send_mime_type(const std::string &type)
+ {
+ DS_ASSERT_X(m_resource, "zwp_input_method_context_v1::mime_type", "Uninitialised resource");
+ if (DS_UNLIKELY(!m_resource)) {
+ WRN("could not call zwp_input_method_context_v1::mime_type as it's not initialised");
+ return;
+ }
+ send_mime_type(
+ m_resource->handle,
+ type);
+ }
+
+ void zwp_input_method_context_v1::send_mime_type(struct ::wl_resource *resource, const std::string &type)
+ {
+ zwp_input_method_context_v1_send_mime_type(
+ resource,
+ type.c_str());
+ }
+
+
+ void zwp_input_method_context_v1::send_finalized_content(const std::string &text, uint32_t cursor_position)
+ {
+ DS_ASSERT_X(m_resource, "zwp_input_method_context_v1::finalized_content", "Uninitialised resource");
+ if (DS_UNLIKELY(!m_resource)) {
+ WRN("could not call zwp_input_method_context_v1::finalized_content as it's not initialised");
+ return;
+ }
+ send_finalized_content(
+ m_resource->handle,
+ text,
+ cursor_position);
+ }
+
+ void zwp_input_method_context_v1::send_finalized_content(struct ::wl_resource *resource, const std::string &text, uint32_t cursor_position)
+ {
+ zwp_input_method_context_v1_send_finalized_content(
+ resource,
+ text.c_str(),
+ cursor_position);
+ }
+
+
+ void zwp_input_method_context_v1::send_prediction_hint_data(const std::string &key, const std::string &value)
+ {
+ DS_ASSERT_X(m_resource, "zwp_input_method_context_v1::prediction_hint_data", "Uninitialised resource");
+ if (DS_UNLIKELY(!m_resource)) {
+ WRN("could not call zwp_input_method_context_v1::prediction_hint_data as it's not initialised");
+ return;
+ }
+ send_prediction_hint_data(
+ m_resource->handle,
+ key,
+ value);
+ }
+
+ void zwp_input_method_context_v1::send_prediction_hint_data(struct ::wl_resource *resource, const std::string &key, const std::string &value)
+ {
+ zwp_input_method_context_v1_send_prediction_hint_data(
+ resource,
+ key.c_str(),
+ value.c_str());
+ }
+
+
+ void zwp_input_method_context_v1::send_input_panel_enabled(uint32_t enabled)
+ {
+ DS_ASSERT_X(m_resource, "zwp_input_method_context_v1::input_panel_enabled", "Uninitialised resource");
+ if (DS_UNLIKELY(!m_resource)) {
+ WRN("could not call zwp_input_method_context_v1::input_panel_enabled as it's not initialised");
+ return;
+ }
+ send_input_panel_enabled(
+ m_resource->handle,
+ enabled);
+ }
+
+ void zwp_input_method_context_v1::send_input_panel_enabled(struct ::wl_resource *resource, uint32_t enabled)
+ {
+ zwp_input_method_context_v1_send_input_panel_enabled(
+ resource,
+ enabled);
+ }
+
+
+ zwp_input_method_v1::zwp_input_method_v1(struct ::wl_client *client, uint32_t id, int version)
+ : m_resource_map()
+ , m_resource(NULL)
+ , m_global(NULL)
+ , m_globalVersion(0)
+ , m_displayDestroyedListener()
+ {
+ init(client, id, version);
+ }
+
+ zwp_input_method_v1::zwp_input_method_v1(struct ::wl_display *display, int version)
+ : m_resource_map()
+ , m_resource(NULL)
+ , m_global(NULL)
+ , m_globalVersion(0)
+ , m_displayDestroyedListener()
+ {
+ init(display, version);
+ }
+
+ zwp_input_method_v1::zwp_input_method_v1(struct ::wl_resource *resource)
+ : m_resource_map()
+ , m_resource(NULL)
+ , m_global(NULL)
+ , m_globalVersion(0)
+ , m_displayDestroyedListener()
+ {
+ init(resource);
+ }
+
+ zwp_input_method_v1::zwp_input_method_v1()
+ : m_resource_map()
+ , m_resource(NULL)
+ , m_global(NULL)
+ , m_globalVersion(0)
+ , m_displayDestroyedListener()
+ {
+ }
+
+ zwp_input_method_v1::~zwp_input_method_v1()
+ {
+ std::multimap<struct ::wl_client*, zwp_input_method_v1::Resource*>::iterator it;
+ for (it = m_resource_map.begin() ; it != m_resource_map.end() ; it++) {
+ zwp_input_method_v1::Resource *resource = (*it).second;
+ wl_resource_set_implementation(resource->handle, NULL, NULL, NULL);
+ }
+
+ if (m_global) {
+ wl_global_destroy(m_global);
+ wl_list_remove(&m_displayDestroyedListener.link);
+ }
+ }
+
+ void zwp_input_method_v1::init(struct ::wl_client *client, uint32_t id, int version)
+ {
+ m_resource = bind(client, id, version);
+ }
+
+ void zwp_input_method_v1::init(struct ::wl_resource *resource)
+ {
+ m_resource = bind(resource);
+ }
+
+ zwp_input_method_v1::Resource *zwp_input_method_v1::add(struct ::wl_client *client, int version)
+ {
+ Resource *resource = bind(client, 0, version);
+ m_resource_map.insert(std::pair<struct ::wl_client*, Resource*>(client, resource));
+ return resource;
+ }
+
+ zwp_input_method_v1::Resource *zwp_input_method_v1::add(struct ::wl_client *client, uint32_t id, int version)
+ {
+ Resource *resource = bind(client, id, version);
+ m_resource_map.insert(std::pair<struct ::wl_client*, Resource*>(client, resource));
+ return resource;
+ }
+
+ void zwp_input_method_v1::init(struct ::wl_display *display, int version)
+ {
+ m_global = wl_global_create(display, &::zwp_input_method_v1_interface, version, this, bind_func);
+ m_globalVersion = version;
+ m_displayDestroyedListener.notify = zwp_input_method_v1::display_destroy_func;
+ m_displayDestroyedListener.parent = this;
+ wl_display_add_destroy_listener(display, &m_displayDestroyedListener);
+ }
+
+ const struct wl_interface *zwp_input_method_v1::interface()
+ {
+ return &::zwp_input_method_v1_interface;
+ }
+
+ zwp_input_method_v1::Resource *zwp_input_method_v1::zwp_input_method_v1_allocate()
+ {
+ return new Resource;
+ }
+
+ void zwp_input_method_v1::zwp_input_method_v1_bind_resource(Resource *)
+ {
+ }
+
+ void zwp_input_method_v1::zwp_input_method_v1_destroy_resource(Resource *)
+ {
+ }
+
+ void zwp_input_method_v1::bind_func(struct ::wl_client *client, void *data, uint32_t version, uint32_t id)
+ {
+ zwp_input_method_v1 *that = static_cast<zwp_input_method_v1 *>(data);
+ that->add(client, id, std::min(that->m_globalVersion, version));
+ }
+
+ void zwp_input_method_v1::display_destroy_func(struct ::wl_listener *listener, void *data)
+ {
+ DS_UNUSED(data);
+ zwp_input_method_v1 *that = static_cast<zwp_input_method_v1::DisplayDestroyedListener *>(listener)->parent;
+ that->m_global = NULL;
+ }
+
+ void zwp_input_method_v1::destroy_func(struct ::wl_resource *client_resource)
+ {
+ Resource *resource = Resource::fromResource(client_resource);
+ DS_ASSERT(resource);
+ zwp_input_method_v1 *that = resource->zwp_input_method_v1_object;
+ that->m_resource_map.erase(resource->client());
+ that->zwp_input_method_v1_destroy_resource(resource);
+ delete resource;
+ }
+
+ zwp_input_method_v1::Resource *zwp_input_method_v1::bind(struct ::wl_client *client, uint32_t id, int version)
+ {
+ DS_ASSERT_X(!wl_client_get_object(client, id), "DSWaylandObject bind", "binding to object %u more than once", id);
+ struct ::wl_resource *handle = wl_resource_create(client, &::zwp_input_method_v1_interface, version, id);
+ return bind(handle);
+ }
+
+ zwp_input_method_v1::Resource *zwp_input_method_v1::bind(struct ::wl_resource *handle)
+ {
+ Resource *resource = zwp_input_method_v1_allocate();
+ resource->zwp_input_method_v1_object = this;
+
+ wl_resource_set_implementation(handle, NULL, resource, destroy_func);
+ resource->handle = handle;
+ zwp_input_method_v1_bind_resource(resource);
+ return resource;
+ }
+ zwp_input_method_v1::Resource *zwp_input_method_v1::Resource::fromResource(struct ::wl_resource *resource)
+ {
+ if (DS_UNLIKELY(!resource))
+ return NULL;
+ if (wl_resource_instance_of(resource, &::zwp_input_method_v1_interface, NULL))
+ return static_cast<Resource *>(wl_resource_get_user_data(resource));
+ return NULL;
+ }
+
+ void zwp_input_method_v1::send_activate(struct ::wl_resource *id)
+ {
+ DS_ASSERT_X(m_resource, "zwp_input_method_v1::activate", "Uninitialised resource");
+ if (DS_UNLIKELY(!m_resource)) {
+ WRN("could not call zwp_input_method_v1::activate as it's not initialised");
+ return;
+ }
+ send_activate(
+ m_resource->handle,
+ id);
+ }
+
+ void zwp_input_method_v1::send_activate(struct ::wl_resource *resource, struct ::wl_resource *id)
+ {
+ zwp_input_method_v1_send_activate(
+ resource,
+ id);
+ }
+
+
+ void zwp_input_method_v1::send_deactivate(struct ::wl_resource *context)
+ {
+ DS_ASSERT_X(m_resource, "zwp_input_method_v1::deactivate", "Uninitialised resource");
+ if (DS_UNLIKELY(!m_resource)) {
+ WRN("could not call zwp_input_method_v1::deactivate as it's not initialised");
+ return;
+ }
+ send_deactivate(
+ m_resource->handle,
+ context);
+ }
+
+ void zwp_input_method_v1::send_deactivate(struct ::wl_resource *resource, struct ::wl_resource *context)
+ {
+ zwp_input_method_v1_send_deactivate(
+ resource,
+ context);
+ }
+
+
+ void zwp_input_method_v1::send_destroy(struct ::wl_resource *context)
+ {
+ DS_ASSERT_X(m_resource, "zwp_input_method_v1::destroy", "Uninitialised resource");
+ if (DS_UNLIKELY(!m_resource)) {
+ WRN("could not call zwp_input_method_v1::destroy as it's not initialised");
+ return;
+ }
+ send_destroy(
+ m_resource->handle,
+ context);
+ }
+
+ void zwp_input_method_v1::send_destroy(struct ::wl_resource *resource, struct ::wl_resource *context)
+ {
+ zwp_input_method_v1_send_destroy(
+ resource,
+ context);
+ }
+
+
+ void zwp_input_method_v1::send_show_input_panel(struct ::wl_resource *context, uint32_t degree)
+ {
+ DS_ASSERT_X(m_resource, "zwp_input_method_v1::show_input_panel", "Uninitialised resource");
+ if (DS_UNLIKELY(!m_resource)) {
+ WRN("could not call zwp_input_method_v1::show_input_panel as it's not initialised");
+ return;
+ }
+ send_show_input_panel(
+ m_resource->handle,
+ context,
+ degree);
+ }
+
+ void zwp_input_method_v1::send_show_input_panel(struct ::wl_resource *resource, struct ::wl_resource *context, uint32_t degree)
+ {
+ zwp_input_method_v1_send_show_input_panel(
+ resource,
+ context,
+ degree);
+ }
+
+
+ void zwp_input_method_v1::send_hide_input_panel(struct ::wl_resource *context)
+ {
+ DS_ASSERT_X(m_resource, "zwp_input_method_v1::hide_input_panel", "Uninitialised resource");
+ if (DS_UNLIKELY(!m_resource)) {
+ WRN("could not call zwp_input_method_v1::hide_input_panel as it's not initialised");
+ return;
+ }
+ send_hide_input_panel(
+ m_resource->handle,
+ context);
+ }
+
+ void zwp_input_method_v1::send_hide_input_panel(struct ::wl_resource *resource, struct ::wl_resource *context)
+ {
+ zwp_input_method_v1_send_hide_input_panel(
+ resource,
+ context);
+ }
+
+
+ void zwp_input_method_v1::send_open_connection(struct ::wl_resource *context)
+ {
+ DS_ASSERT_X(m_resource, "zwp_input_method_v1::open_connection", "Uninitialised resource");
+ if (DS_UNLIKELY(!m_resource)) {
+ WRN("could not call zwp_input_method_v1::open_connection as it's not initialised");
+ return;
+ }
+ send_open_connection(
+ m_resource->handle,
+ context);
+ }
+
+ void zwp_input_method_v1::send_open_connection(struct ::wl_resource *resource, struct ::wl_resource *context)
+ {
+ zwp_input_method_v1_send_open_connection(
+ resource,
+ context);
+ }
+
+
+ void zwp_input_method_v1::send_close_connection(struct ::wl_resource *context)
+ {
+ DS_ASSERT_X(m_resource, "zwp_input_method_v1::close_connection", "Uninitialised resource");
+ if (DS_UNLIKELY(!m_resource)) {
+ WRN("could not call zwp_input_method_v1::close_connection as it's not initialised");
+ return;
+ }
+ send_close_connection(
+ m_resource->handle,
+ context);
+ }
+
+ void zwp_input_method_v1::send_close_connection(struct ::wl_resource *resource, struct ::wl_resource *context)
+ {
+ zwp_input_method_v1_send_close_connection(
+ resource,
+ context);
+ }
+
+
+ void zwp_input_method_v1::send_set_text_input_id(struct ::wl_resource *context, uint32_t text_input_id)
+ {
+ DS_ASSERT_X(m_resource, "zwp_input_method_v1::set_text_input_id", "Uninitialised resource");
+ if (DS_UNLIKELY(!m_resource)) {
+ WRN("could not call zwp_input_method_v1::set_text_input_id as it's not initialised");
+ return;
+ }
+ send_set_text_input_id(
+ m_resource->handle,
+ context,
+ text_input_id);
+ }
+
+ void zwp_input_method_v1::send_set_text_input_id(struct ::wl_resource *resource, struct ::wl_resource *context, uint32_t text_input_id)
+ {
+ zwp_input_method_v1_send_set_text_input_id(
+ resource,
+ context,
+ text_input_id);
+ }
+
+
+ zwp_input_panel_v1::zwp_input_panel_v1(struct ::wl_client *client, uint32_t id, int version)
+ : m_resource_map()
+ , m_resource(NULL)
+ , m_global(NULL)
+ , m_globalVersion(0)
+ , m_displayDestroyedListener()
+ {
+ init(client, id, version);
+ }
+
+ zwp_input_panel_v1::zwp_input_panel_v1(struct ::wl_display *display, int version)
+ : m_resource_map()
+ , m_resource(NULL)
+ , m_global(NULL)
+ , m_globalVersion(0)
+ , m_displayDestroyedListener()
+ {
+ init(display, version);
+ }
+
+ zwp_input_panel_v1::zwp_input_panel_v1(struct ::wl_resource *resource)
+ : m_resource_map()
+ , m_resource(NULL)
+ , m_global(NULL)
+ , m_globalVersion(0)
+ , m_displayDestroyedListener()
+ {
+ init(resource);
+ }
+
+ zwp_input_panel_v1::zwp_input_panel_v1()
+ : m_resource_map()
+ , m_resource(NULL)
+ , m_global(NULL)
+ , m_globalVersion(0)
+ , m_displayDestroyedListener()
+ {
+ }
+
+ zwp_input_panel_v1::~zwp_input_panel_v1()
+ {
+ std::multimap<struct ::wl_client*, zwp_input_panel_v1::Resource*>::iterator it;
+ for (it = m_resource_map.begin() ; it != m_resource_map.end() ; it++) {
+ zwp_input_panel_v1::Resource *resource = (*it).second;
+ wl_resource_set_implementation(resource->handle, NULL, NULL, NULL);
+ }
+
+ if (m_global) {
+ wl_global_destroy(m_global);
+ wl_list_remove(&m_displayDestroyedListener.link);
+ }
+ }
+
+ void zwp_input_panel_v1::init(struct ::wl_client *client, uint32_t id, int version)
+ {
+ m_resource = bind(client, id, version);
+ }
+
+ void zwp_input_panel_v1::init(struct ::wl_resource *resource)
+ {
+ m_resource = bind(resource);
+ }
+
+ zwp_input_panel_v1::Resource *zwp_input_panel_v1::add(struct ::wl_client *client, int version)
+ {
+ Resource *resource = bind(client, 0, version);
+ m_resource_map.insert(std::pair<struct ::wl_client*, Resource*>(client, resource));
+ return resource;
+ }
+
+ zwp_input_panel_v1::Resource *zwp_input_panel_v1::add(struct ::wl_client *client, uint32_t id, int version)
+ {
+ Resource *resource = bind(client, id, version);
+ m_resource_map.insert(std::pair<struct ::wl_client*, Resource*>(client, resource));
+ return resource;
+ }
+
+ void zwp_input_panel_v1::init(struct ::wl_display *display, int version)
+ {
+ m_global = wl_global_create(display, &::zwp_input_panel_v1_interface, version, this, bind_func);
+ m_globalVersion = version;
+ m_displayDestroyedListener.notify = zwp_input_panel_v1::display_destroy_func;
+ m_displayDestroyedListener.parent = this;
+ wl_display_add_destroy_listener(display, &m_displayDestroyedListener);
+ }
+
+ const struct wl_interface *zwp_input_panel_v1::interface()
+ {
+ return &::zwp_input_panel_v1_interface;
+ }
+
+ zwp_input_panel_v1::Resource *zwp_input_panel_v1::zwp_input_panel_v1_allocate()
+ {
+ return new Resource;
+ }
+
+ void zwp_input_panel_v1::zwp_input_panel_v1_bind_resource(Resource *)
+ {
+ }
+
+ void zwp_input_panel_v1::zwp_input_panel_v1_destroy_resource(Resource *)
+ {
+ }
+
+ void zwp_input_panel_v1::bind_func(struct ::wl_client *client, void *data, uint32_t version, uint32_t id)
+ {
+ zwp_input_panel_v1 *that = static_cast<zwp_input_panel_v1 *>(data);
+ that->add(client, id, std::min(that->m_globalVersion, version));
+ }
+
+ void zwp_input_panel_v1::display_destroy_func(struct ::wl_listener *listener, void *data)
+ {
+ DS_UNUSED(data);
+ zwp_input_panel_v1 *that = static_cast<zwp_input_panel_v1::DisplayDestroyedListener *>(listener)->parent;
+ that->m_global = NULL;
+ }
+
+ void zwp_input_panel_v1::destroy_func(struct ::wl_resource *client_resource)
+ {
+ Resource *resource = Resource::fromResource(client_resource);
+ DS_ASSERT(resource);
+ zwp_input_panel_v1 *that = resource->zwp_input_panel_v1_object;
+ that->m_resource_map.erase(resource->client());
+ that->zwp_input_panel_v1_destroy_resource(resource);
+ delete resource;
+ }
+
+ zwp_input_panel_v1::Resource *zwp_input_panel_v1::bind(struct ::wl_client *client, uint32_t id, int version)
+ {
+ DS_ASSERT_X(!wl_client_get_object(client, id), "DSWaylandObject bind", "binding to object %u more than once", id);
+ struct ::wl_resource *handle = wl_resource_create(client, &::zwp_input_panel_v1_interface, version, id);
+ return bind(handle);
+ }
+
+ zwp_input_panel_v1::Resource *zwp_input_panel_v1::bind(struct ::wl_resource *handle)
+ {
+ Resource *resource = zwp_input_panel_v1_allocate();
+ resource->zwp_input_panel_v1_object = this;
+
+ wl_resource_set_implementation(handle, &m_zwp_input_panel_v1_interface, resource, destroy_func);
+ resource->handle = handle;
+ zwp_input_panel_v1_bind_resource(resource);
+ return resource;
+ }
+ zwp_input_panel_v1::Resource *zwp_input_panel_v1::Resource::fromResource(struct ::wl_resource *resource)
+ {
+ if (DS_UNLIKELY(!resource))
+ return NULL;
+ if (wl_resource_instance_of(resource, &::zwp_input_panel_v1_interface, &m_zwp_input_panel_v1_interface))
+ return static_cast<Resource *>(wl_resource_get_user_data(resource));
+ return NULL;
+ }
+
+ const struct ::zwp_input_panel_v1_interface zwp_input_panel_v1::m_zwp_input_panel_v1_interface = {
+ zwp_input_panel_v1::handle_get_input_panel_surface
+ };
+
+ void zwp_input_panel_v1::zwp_input_panel_v1_get_input_panel_surface(Resource *, uint32_t, struct ::wl_resource *)
+ {
+ }
+
+
+ void zwp_input_panel_v1::handle_get_input_panel_surface(
+ ::wl_client *client,
+ struct wl_resource *resource,
+ uint32_t id,
+ struct ::wl_resource *surface)
+ {
+ DS_UNUSED(client);
+ Resource *r = Resource::fromResource(resource);
+ static_cast<zwp_input_panel_v1 *>(r->zwp_input_panel_v1_object)->zwp_input_panel_v1_get_input_panel_surface(
+ r,
+ id,
+ surface);
+ }
+
+ zwp_input_panel_surface_v1::zwp_input_panel_surface_v1(struct ::wl_client *client, uint32_t id, int version)
+ : m_resource_map()
+ , m_resource(NULL)
+ , m_global(NULL)
+ , m_globalVersion(0)
+ , m_displayDestroyedListener()
+ {
+ init(client, id, version);
+ }
+
+ zwp_input_panel_surface_v1::zwp_input_panel_surface_v1(struct ::wl_display *display, int version)
+ : m_resource_map()
+ , m_resource(NULL)
+ , m_global(NULL)
+ , m_globalVersion(0)
+ , m_displayDestroyedListener()
+ {
+ init(display, version);
+ }
+
+ zwp_input_panel_surface_v1::zwp_input_panel_surface_v1(struct ::wl_resource *resource)
+ : m_resource_map()
+ , m_resource(NULL)
+ , m_global(NULL)
+ , m_globalVersion(0)
+ , m_displayDestroyedListener()
+ {
+ init(resource);
+ }
+
+ zwp_input_panel_surface_v1::zwp_input_panel_surface_v1()
+ : m_resource_map()
+ , m_resource(NULL)
+ , m_global(NULL)
+ , m_globalVersion(0)
+ , m_displayDestroyedListener()
+ {
+ }
+
+ zwp_input_panel_surface_v1::~zwp_input_panel_surface_v1()
+ {
+ std::multimap<struct ::wl_client*, zwp_input_panel_surface_v1::Resource*>::iterator it;
+ for (it = m_resource_map.begin() ; it != m_resource_map.end() ; it++) {
+ zwp_input_panel_surface_v1::Resource *resource = (*it).second;
+ wl_resource_set_implementation(resource->handle, NULL, NULL, NULL);
+ }
+
+ if (m_global) {
+ wl_global_destroy(m_global);
+ wl_list_remove(&m_displayDestroyedListener.link);
+ }
+ }
+
+ void zwp_input_panel_surface_v1::init(struct ::wl_client *client, uint32_t id, int version)
+ {
+ m_resource = bind(client, id, version);
+ }
+
+ void zwp_input_panel_surface_v1::init(struct ::wl_resource *resource)
+ {
+ m_resource = bind(resource);
+ }
+
+ zwp_input_panel_surface_v1::Resource *zwp_input_panel_surface_v1::add(struct ::wl_client *client, int version)
+ {
+ Resource *resource = bind(client, 0, version);
+ m_resource_map.insert(std::pair<struct ::wl_client*, Resource*>(client, resource));
+ return resource;
+ }
+
+ zwp_input_panel_surface_v1::Resource *zwp_input_panel_surface_v1::add(struct ::wl_client *client, uint32_t id, int version)
+ {
+ Resource *resource = bind(client, id, version);
+ m_resource_map.insert(std::pair<struct ::wl_client*, Resource*>(client, resource));
+ return resource;
+ }
+
+ void zwp_input_panel_surface_v1::init(struct ::wl_display *display, int version)
+ {
+ m_global = wl_global_create(display, &::zwp_input_panel_surface_v1_interface, version, this, bind_func);
+ m_globalVersion = version;
+ m_displayDestroyedListener.notify = zwp_input_panel_surface_v1::display_destroy_func;
+ m_displayDestroyedListener.parent = this;
+ wl_display_add_destroy_listener(display, &m_displayDestroyedListener);
+ }
+
+ const struct wl_interface *zwp_input_panel_surface_v1::interface()
+ {
+ return &::zwp_input_panel_surface_v1_interface;
+ }
+
+ zwp_input_panel_surface_v1::Resource *zwp_input_panel_surface_v1::zwp_input_panel_surface_v1_allocate()
+ {
+ return new Resource;
+ }
+
+ void zwp_input_panel_surface_v1::zwp_input_panel_surface_v1_bind_resource(Resource *)
+ {
+ }
+
+ void zwp_input_panel_surface_v1::zwp_input_panel_surface_v1_destroy_resource(Resource *)
+ {
+ }
+
+ void zwp_input_panel_surface_v1::bind_func(struct ::wl_client *client, void *data, uint32_t version, uint32_t id)
+ {
+ zwp_input_panel_surface_v1 *that = static_cast<zwp_input_panel_surface_v1 *>(data);
+ that->add(client, id, std::min(that->m_globalVersion, version));
+ }
+
+ void zwp_input_panel_surface_v1::display_destroy_func(struct ::wl_listener *listener, void *data)
+ {
+ DS_UNUSED(data);
+ zwp_input_panel_surface_v1 *that = static_cast<zwp_input_panel_surface_v1::DisplayDestroyedListener *>(listener)->parent;
+ that->m_global = NULL;
+ }
+
+ void zwp_input_panel_surface_v1::destroy_func(struct ::wl_resource *client_resource)
+ {
+ Resource *resource = Resource::fromResource(client_resource);
+ DS_ASSERT(resource);
+ zwp_input_panel_surface_v1 *that = resource->zwp_input_panel_surface_v1_object;
+ that->m_resource_map.erase(resource->client());
+ that->zwp_input_panel_surface_v1_destroy_resource(resource);
+ delete resource;
+ }
+
+ zwp_input_panel_surface_v1::Resource *zwp_input_panel_surface_v1::bind(struct ::wl_client *client, uint32_t id, int version)
+ {
+ DS_ASSERT_X(!wl_client_get_object(client, id), "DSWaylandObject bind", "binding to object %u more than once", id);
+ struct ::wl_resource *handle = wl_resource_create(client, &::zwp_input_panel_surface_v1_interface, version, id);
+ return bind(handle);
+ }
+
+ zwp_input_panel_surface_v1::Resource *zwp_input_panel_surface_v1::bind(struct ::wl_resource *handle)
+ {
+ Resource *resource = zwp_input_panel_surface_v1_allocate();
+ resource->zwp_input_panel_surface_v1_object = this;
+
+ wl_resource_set_implementation(handle, &m_zwp_input_panel_surface_v1_interface, resource, destroy_func);
+ resource->handle = handle;
+ zwp_input_panel_surface_v1_bind_resource(resource);
+ return resource;
+ }
+ zwp_input_panel_surface_v1::Resource *zwp_input_panel_surface_v1::Resource::fromResource(struct ::wl_resource *resource)
+ {
+ if (DS_UNLIKELY(!resource))
+ return NULL;
+ if (wl_resource_instance_of(resource, &::zwp_input_panel_surface_v1_interface, &m_zwp_input_panel_surface_v1_interface))
+ return static_cast<Resource *>(wl_resource_get_user_data(resource));
+ return NULL;
+ }
+
+ const struct ::zwp_input_panel_surface_v1_interface zwp_input_panel_surface_v1::m_zwp_input_panel_surface_v1_interface = {
+ zwp_input_panel_surface_v1::handle_set_toplevel,
+ zwp_input_panel_surface_v1::handle_set_overlay_panel,
+ zwp_input_panel_surface_v1::handle_set_ready
+ };
+
+ void zwp_input_panel_surface_v1::zwp_input_panel_surface_v1_set_toplevel(Resource *, struct ::wl_resource *, uint32_t )
+ {
+ }
+
+ void zwp_input_panel_surface_v1::zwp_input_panel_surface_v1_set_overlay_panel(Resource *)
+ {
+ }
+
+ void zwp_input_panel_surface_v1::zwp_input_panel_surface_v1_set_ready(Resource *, uint32_t )
+ {
+ }
+
+
+ void zwp_input_panel_surface_v1::handle_set_toplevel(
+ ::wl_client *client,
+ struct wl_resource *resource,
+ struct ::wl_resource *output,
+ uint32_t position)
+ {
+ DS_UNUSED(client);
+ Resource *r = Resource::fromResource(resource);
+ static_cast<zwp_input_panel_surface_v1 *>(r->zwp_input_panel_surface_v1_object)->zwp_input_panel_surface_v1_set_toplevel(
+ r,
+ output,
+ position);
+ }
+
+ void zwp_input_panel_surface_v1::handle_set_overlay_panel(
+ ::wl_client *client,
+ struct wl_resource *resource)
+ {
+ DS_UNUSED(client);
+ Resource *r = Resource::fromResource(resource);
+ static_cast<zwp_input_panel_surface_v1 *>(r->zwp_input_panel_surface_v1_object)->zwp_input_panel_surface_v1_set_overlay_panel(
+ r);
+ }
+
+ void zwp_input_panel_surface_v1::handle_set_ready(
+ ::wl_client *client,
+ struct wl_resource *resource,
+ uint32_t state)
+ {
+ DS_UNUSED(client);
+ Resource *r = Resource::fromResource(resource);
+ static_cast<zwp_input_panel_surface_v1 *>(r->zwp_input_panel_surface_v1_object)->zwp_input_panel_surface_v1_set_ready(
+ r,
+ state);
+ }
+
+ zwp_input_method_manager_v1::zwp_input_method_manager_v1(struct ::wl_client *client, uint32_t id, int version)
+ : m_resource_map()
+ , m_resource(NULL)
+ , m_global(NULL)
+ , m_globalVersion(0)
+ , m_displayDestroyedListener()
+ {
+ init(client, id, version);
+ }
+
+ zwp_input_method_manager_v1::zwp_input_method_manager_v1(struct ::wl_display *display, int version)
+ : m_resource_map()
+ , m_resource(NULL)
+ , m_global(NULL)
+ , m_globalVersion(0)
+ , m_displayDestroyedListener()
+ {
+ init(display, version);
+ }
+
+ zwp_input_method_manager_v1::zwp_input_method_manager_v1(struct ::wl_resource *resource)
+ : m_resource_map()
+ , m_resource(NULL)
+ , m_global(NULL)
+ , m_globalVersion(0)
+ , m_displayDestroyedListener()
+ {
+ init(resource);
+ }
+
+ zwp_input_method_manager_v1::zwp_input_method_manager_v1()
+ : m_resource_map()
+ , m_resource(NULL)
+ , m_global(NULL)
+ , m_globalVersion(0)
+ , m_displayDestroyedListener()
+ {
+ }
+
+ zwp_input_method_manager_v1::~zwp_input_method_manager_v1()
+ {
+ std::multimap<struct ::wl_client*, zwp_input_method_manager_v1::Resource*>::iterator it;
+ for (it = m_resource_map.begin() ; it != m_resource_map.end() ; it++) {
+ zwp_input_method_manager_v1::Resource *resource = (*it).second;
+ wl_resource_set_implementation(resource->handle, NULL, NULL, NULL);
+ }
+
+ if (m_global) {
+ wl_global_destroy(m_global);
+ wl_list_remove(&m_displayDestroyedListener.link);
+ }
+ }
+
+ void zwp_input_method_manager_v1::init(struct ::wl_client *client, uint32_t id, int version)
+ {
+ m_resource = bind(client, id, version);
+ }
+
+ void zwp_input_method_manager_v1::init(struct ::wl_resource *resource)
+ {
+ m_resource = bind(resource);
+ }
+
+ zwp_input_method_manager_v1::Resource *zwp_input_method_manager_v1::add(struct ::wl_client *client, int version)
+ {
+ Resource *resource = bind(client, 0, version);
+ m_resource_map.insert(std::pair<struct ::wl_client*, Resource*>(client, resource));
+ return resource;
+ }
+
+ zwp_input_method_manager_v1::Resource *zwp_input_method_manager_v1::add(struct ::wl_client *client, uint32_t id, int version)
+ {
+ Resource *resource = bind(client, id, version);
+ m_resource_map.insert(std::pair<struct ::wl_client*, Resource*>(client, resource));
+ return resource;
+ }
+
+ void zwp_input_method_manager_v1::init(struct ::wl_display *display, int version)
+ {
+ m_global = wl_global_create(display, &::zwp_input_method_manager_v1_interface, version, this, bind_func);
+ m_globalVersion = version;
+ m_displayDestroyedListener.notify = zwp_input_method_manager_v1::display_destroy_func;
+ m_displayDestroyedListener.parent = this;
+ wl_display_add_destroy_listener(display, &m_displayDestroyedListener);
+ }
+
+ const struct wl_interface *zwp_input_method_manager_v1::interface()
+ {
+ return &::zwp_input_method_manager_v1_interface;
+ }
+
+ zwp_input_method_manager_v1::Resource *zwp_input_method_manager_v1::zwp_input_method_manager_v1_allocate()
+ {
+ return new Resource;
+ }
+
+ void zwp_input_method_manager_v1::zwp_input_method_manager_v1_bind_resource(Resource *)
+ {
+ }
+
+ void zwp_input_method_manager_v1::zwp_input_method_manager_v1_destroy_resource(Resource *)
+ {
+ }
+
+ void zwp_input_method_manager_v1::bind_func(struct ::wl_client *client, void *data, uint32_t version, uint32_t id)
+ {
+ zwp_input_method_manager_v1 *that = static_cast<zwp_input_method_manager_v1 *>(data);
+ that->add(client, id, std::min(that->m_globalVersion, version));
+ }
+
+ void zwp_input_method_manager_v1::display_destroy_func(struct ::wl_listener *listener, void *data)
+ {
+ DS_UNUSED(data);
+ zwp_input_method_manager_v1 *that = static_cast<zwp_input_method_manager_v1::DisplayDestroyedListener *>(listener)->parent;
+ that->m_global = NULL;
+ }
+
+ void zwp_input_method_manager_v1::destroy_func(struct ::wl_resource *client_resource)
+ {
+ Resource *resource = Resource::fromResource(client_resource);
+ DS_ASSERT(resource);
+ zwp_input_method_manager_v1 *that = resource->zwp_input_method_manager_v1_object;
+ that->m_resource_map.erase(resource->client());
+ that->zwp_input_method_manager_v1_destroy_resource(resource);
+ delete resource;
+ }
+
+ zwp_input_method_manager_v1::Resource *zwp_input_method_manager_v1::bind(struct ::wl_client *client, uint32_t id, int version)
+ {
+ DS_ASSERT_X(!wl_client_get_object(client, id), "DSWaylandObject bind", "binding to object %u more than once", id);
+ struct ::wl_resource *handle = wl_resource_create(client, &::zwp_input_method_manager_v1_interface, version, id);
+ return bind(handle);
+ }
+
+ zwp_input_method_manager_v1::Resource *zwp_input_method_manager_v1::bind(struct ::wl_resource *handle)
+ {
+ Resource *resource = zwp_input_method_manager_v1_allocate();
+ resource->zwp_input_method_manager_v1_object = this;
+
+ wl_resource_set_implementation(handle, &m_zwp_input_method_manager_v1_interface, resource, destroy_func);
+ resource->handle = handle;
+ zwp_input_method_manager_v1_bind_resource(resource);
+ return resource;
+ }
+ zwp_input_method_manager_v1::Resource *zwp_input_method_manager_v1::Resource::fromResource(struct ::wl_resource *resource)
+ {
+ if (DS_UNLIKELY(!resource))
+ return NULL;
+ if (wl_resource_instance_of(resource, &::zwp_input_method_manager_v1_interface, &m_zwp_input_method_manager_v1_interface))
+ return static_cast<Resource *>(wl_resource_get_user_data(resource));
+ return NULL;
+ }
+
+ const struct ::zwp_input_method_manager_v1_interface zwp_input_method_manager_v1::m_zwp_input_method_manager_v1_interface = {
+ zwp_input_method_manager_v1::handle_set_transient_for
+ };
+
+ void zwp_input_method_manager_v1::zwp_input_method_manager_v1_set_transient_for(Resource *, uint32_t , uint32_t )
+ {
+ }
+
+
+ void zwp_input_method_manager_v1::handle_set_transient_for(
+ ::wl_client *client,
+ struct wl_resource *resource,
+ uint32_t parent_pid,
+ uint32_t child_pid)
+ {
+ DS_UNUSED(client);
+ Resource *r = Resource::fromResource(resource);
+ static_cast<zwp_input_method_manager_v1 *>(r->zwp_input_method_manager_v1_object)->zwp_input_method_manager_v1_set_transient_for(
+ r,
+ parent_pid,
+ child_pid);
+ }
+}
+
+/*LCOV_EXCL_STOP*/
\ No newline at end of file
/*LCOV_EXCL_START*/
/* Protocol XML file : wayland-extension/input-method.xml */
-#ifndef __DS_INPUT_METHOD_PROTOCOL_H__
-#define __DS_INPUT_METHOD_PROTOCOL_H__
+#ifndef __DS_INPUT_METHOD_UNSTABLE_V1_PROTOCOL_H__
+#define __DS_INPUT_METHOD_UNSTABLE_V1_PROTOCOL_H__
#include "wayland-server-core.h"
#include "input-method-server-protocol.h"
namespace DSWaylandServer {
- class wl_input_method_context
+ class zwp_input_method_context_v1
{
public:
- wl_input_method_context(struct ::wl_client *client, uint32_t id, int version);
- wl_input_method_context(struct ::wl_display *display, int version);
- wl_input_method_context(struct ::wl_resource *resource);
- wl_input_method_context();
+ zwp_input_method_context_v1(struct ::wl_client *client, uint32_t id, int version);
+ zwp_input_method_context_v1(struct ::wl_display *display, int version);
+ zwp_input_method_context_v1(struct ::wl_resource *resource);
+ zwp_input_method_context_v1();
- virtual ~wl_input_method_context();
+ virtual ~zwp_input_method_context_v1();
class Resource
{
public:
- Resource() : input_method_context_object(NULL), handle(NULL) {}
+ Resource() : zwp_input_method_context_v1_object(NULL), handle(NULL) {}
virtual ~Resource() {}
- wl_input_method_context *input_method_context_object;
- wl_input_method_context *object() { return input_method_context_object; }
+ zwp_input_method_context_v1 *zwp_input_method_context_v1_object;
+ zwp_input_method_context_v1 *object() { return zwp_input_method_context_v1_object; }
struct ::wl_resource *handle;
struct ::wl_client *client() const { return wl_resource_get_client(handle); }
static int interfaceVersion() { return interface()->version; }
+ void send_surrounding_text(const std::string &text, uint32_t cursor, uint32_t anchor);
+ void send_surrounding_text(struct ::wl_resource *resource, const std::string &text, uint32_t cursor, uint32_t anchor);
void send_reset();
void send_reset(struct ::wl_resource *resource);
void send_content_type(uint32_t hint, uint32_t purpose);
void send_input_panel_enabled(struct ::wl_resource *resource, uint32_t enabled);
protected:
- virtual Resource *input_method_context_allocate();
-
- virtual void input_method_context_bind_resource(Resource *resource);
- virtual void input_method_context_destroy_resource(Resource *resource);
-
- virtual void input_method_context_destroy(Resource *resource);
- virtual void input_method_context_commit_string(Resource *resource, uint32_t serial, const std::string &text);
- virtual void input_method_context_preedit_string(Resource *resource, uint32_t serial, const std::string &text, const std::string &commit);
- virtual void input_method_context_preedit_styling(Resource *resource, uint32_t index, uint32_t length, uint32_t style);
- virtual void input_method_context_preedit_cursor(Resource *resource, int32_t index);
- virtual void input_method_context_delete_surrounding_text(Resource *resource, int32_t index, uint32_t length);
- virtual void input_method_context_cursor_position(Resource *resource, int32_t index, int32_t anchor);
- virtual void input_method_context_modifiers_map(Resource *resource, struct ::wl_array *map);
- virtual void input_method_context_keysym(Resource *resource, uint32_t serial, uint32_t time, uint32_t sym, uint32_t state, uint32_t modifiers);
- virtual void input_method_context_grab_keyboard(Resource *resource, uint32_t keyboard);
- virtual void input_method_context_key(Resource *resource, uint32_t serial, uint32_t time, uint32_t key, uint32_t state);
- virtual void input_method_context_modifiers(Resource *resource, uint32_t serial, uint32_t mods_depressed, uint32_t mods_latched, uint32_t mods_locked, uint32_t group);
- virtual void input_method_context_language(Resource *resource, uint32_t serial, const std::string &language);
- virtual void input_method_context_text_direction(Resource *resource, uint32_t serial, uint32_t direction);
- virtual void input_method_context_selection_region(Resource *resource, uint32_t serial, int32_t start, int32_t end);
- virtual void input_method_context_private_command(Resource *resource, uint32_t serial, const std::string &command);
- virtual void input_method_context_update_input_panel_data(Resource *resource, uint32_t serial, const std::string &input_panel_data, uint32_t input_panel_data_length);
- virtual void input_method_context_hide_input_panel(Resource *resource, uint32_t serial);
- virtual void input_method_context_get_selection_text(Resource *resource, int32_t fd);
- virtual void input_method_context_get_surrounding_text(Resource *resource, uint32_t maxlen_before, uint32_t maxlen_after, int32_t fd);
- virtual void input_method_context_filter_key_event_done(Resource *resource, uint32_t serial, uint32_t state);
- virtual void input_method_context_update_ise_geometry(Resource *resource, uint32_t serial, uint32_t x, uint32_t y, uint32_t width, uint32_t height);
- virtual void input_method_context_recapture_string(Resource *resource, uint32_t serial, int32_t index, uint32_t length, const std::string &preedit, const std::string &preedit_commit, const std::string &commit);
- virtual void input_method_context_input_panel_event(Resource *resource, uint32_t serial, uint32_t event_type, uint32_t value);
- virtual void input_method_context_commit_content(Resource *resource, uint32_t serial, const std::string &content, const std::string &description, const std::string &mime_types);
- virtual void input_method_context_update_candidate_state(Resource *resource, uint32_t state);
- virtual void input_method_context_reshow_input_panel(Resource *resource);
- virtual void input_method_context_set_floating_panel(Resource *resource, uint32_t state);
- virtual void input_method_context_set_floating_drag_enabled(Resource *resource, uint32_t enabled);
+ virtual Resource *zwp_input_method_context_v1_allocate();
+
+ virtual void zwp_input_method_context_v1_bind_resource(Resource *resource);
+ virtual void zwp_input_method_context_v1_destroy_resource(Resource *resource);
+
+ virtual void zwp_input_method_context_v1_destroy(Resource *resource);
+ virtual void zwp_input_method_context_v1_commit_string(Resource *resource, uint32_t serial, const std::string &text);
+ virtual void zwp_input_method_context_v1_preedit_string(Resource *resource, uint32_t serial, const std::string &text, const std::string &commit);
+ virtual void zwp_input_method_context_v1_preedit_styling(Resource *resource, uint32_t index, uint32_t length, uint32_t style);
+ virtual void zwp_input_method_context_v1_preedit_cursor(Resource *resource, int32_t index);
+ virtual void zwp_input_method_context_v1_delete_surrounding_text(Resource *resource, int32_t index, uint32_t length);
+ virtual void zwp_input_method_context_v1_cursor_position(Resource *resource, int32_t index, int32_t anchor);
+ virtual void zwp_input_method_context_v1_modifiers_map(Resource *resource, struct ::wl_array *map);
+ virtual void zwp_input_method_context_v1_keysym(Resource *resource, uint32_t serial, uint32_t time, uint32_t sym, uint32_t state, uint32_t modifiers);
+ virtual void zwp_input_method_context_v1_grab_keyboard(Resource *resource, uint32_t keyboard);
+ virtual void zwp_input_method_context_v1_key(Resource *resource, uint32_t serial, uint32_t time, uint32_t key, uint32_t state);
+ virtual void zwp_input_method_context_v1_modifiers(Resource *resource, uint32_t serial, uint32_t mods_depressed, uint32_t mods_latched, uint32_t mods_locked, uint32_t group);
+ virtual void zwp_input_method_context_v1_language(Resource *resource, uint32_t serial, const std::string &language);
+ virtual void zwp_input_method_context_v1_text_direction(Resource *resource, uint32_t serial, uint32_t direction);
+ virtual void zwp_input_method_context_v1_selection_region(Resource *resource, uint32_t serial, int32_t start, int32_t end);
+ virtual void zwp_input_method_context_v1_private_command(Resource *resource, uint32_t serial, const std::string &command);
+ virtual void zwp_input_method_context_v1_update_input_panel_data(Resource *resource, uint32_t serial, const std::string &input_panel_data, uint32_t input_panel_data_length);
+ virtual void zwp_input_method_context_v1_hide_input_panel(Resource *resource, uint32_t serial);
+ virtual void zwp_input_method_context_v1_get_selection_text(Resource *resource, int32_t fd);
+ virtual void zwp_input_method_context_v1_get_surrounding_text(Resource *resource, uint32_t maxlen_before, uint32_t maxlen_after, int32_t fd);
+ virtual void zwp_input_method_context_v1_filter_key_event_done(Resource *resource, uint32_t serial, uint32_t state);
+ virtual void zwp_input_method_context_v1_update_ise_geometry(Resource *resource, uint32_t serial, uint32_t x, uint32_t y, uint32_t width, uint32_t height);
+ virtual void zwp_input_method_context_v1_recapture_string(Resource *resource, uint32_t serial, int32_t index, uint32_t length, const std::string &preedit, const std::string &preedit_commit, const std::string &commit);
+ virtual void zwp_input_method_context_v1_input_panel_event(Resource *resource, uint32_t serial, uint32_t event_type, uint32_t value);
+ virtual void zwp_input_method_context_v1_commit_content(Resource *resource, uint32_t serial, const std::string &content, const std::string &description, const std::string &mime_types);
+ virtual void zwp_input_method_context_v1_update_candidate_state(Resource *resource, uint32_t state);
+ virtual void zwp_input_method_context_v1_reshow_input_panel(Resource *resource);
+ virtual void zwp_input_method_context_v1_set_floating_panel(Resource *resource, uint32_t state);
+ virtual void zwp_input_method_context_v1_set_floating_drag_enabled(Resource *resource, uint32_t enabled);
private:
static void bind_func(struct ::wl_client *client, void *data, uint32_t version, uint32_t id);
Resource *bind(struct ::wl_client *client, uint32_t id, int version);
Resource *bind(struct ::wl_resource *handle);
- static const struct ::wl_input_method_context_interface m_wl_input_method_context_interface;
+ static const struct ::zwp_input_method_context_v1_interface m_zwp_input_method_context_v1_interface;
static void handle_destroy(
::wl_client *client,
struct ::wl_global *m_global;
uint32_t m_globalVersion;
struct DisplayDestroyedListener : ::wl_listener {
- wl_input_method_context *parent;
+ zwp_input_method_context_v1 *parent;
DisplayDestroyedListener(): parent(NULL) {}
};
DisplayDestroyedListener m_displayDestroyedListener;
};
- class wl_input_method
+ class zwp_input_method_v1
{
public:
- wl_input_method(struct ::wl_client *client, uint32_t id, int version);
- wl_input_method(struct ::wl_display *display, int version);
- wl_input_method(struct ::wl_resource *resource);
- wl_input_method();
+ zwp_input_method_v1(struct ::wl_client *client, uint32_t id, int version);
+ zwp_input_method_v1(struct ::wl_display *display, int version);
+ zwp_input_method_v1(struct ::wl_resource *resource);
+ zwp_input_method_v1();
- virtual ~wl_input_method();
+ virtual ~zwp_input_method_v1();
class Resource
{
public:
- Resource() : input_method_object(NULL), handle(NULL) {}
+ Resource() : zwp_input_method_v1_object(NULL), handle(NULL) {}
virtual ~Resource() {}
- wl_input_method *input_method_object;
- wl_input_method *object() { return input_method_object; }
+ zwp_input_method_v1 *zwp_input_method_v1_object;
+ zwp_input_method_v1 *object() { return zwp_input_method_v1_object; }
struct ::wl_resource *handle;
struct ::wl_client *client() const { return wl_resource_get_client(handle); }
static int interfaceVersion() { return interface()->version; }
- void send_activate(struct ::wl_resource *id, uint32_t text_input_id, uint32_t focus_in_event);
- void send_activate(struct ::wl_resource *resource, struct ::wl_resource *id, uint32_t text_input_id, uint32_t focus_in_event);
- void send_deactivate(struct ::wl_resource *context, uint32_t focus_out_event);
- void send_deactivate(struct ::wl_resource *resource, struct ::wl_resource *context, uint32_t focus_out_event);
+ void send_activate(struct ::wl_resource *id);
+ void send_activate(struct ::wl_resource *resource, struct ::wl_resource *id);
+ void send_deactivate(struct ::wl_resource *context);
+ void send_deactivate(struct ::wl_resource *resource, struct ::wl_resource *context);
void send_destroy(struct ::wl_resource *context);
void send_destroy(struct ::wl_resource *resource, struct ::wl_resource *context);
void send_show_input_panel(struct ::wl_resource *context, uint32_t degree);
void send_show_input_panel(struct ::wl_resource *resource, struct ::wl_resource *context, uint32_t degree);
void send_hide_input_panel(struct ::wl_resource *context);
void send_hide_input_panel(struct ::wl_resource *resource, struct ::wl_resource *context);
+ void send_open_connection(struct ::wl_resource *context);
+ void send_open_connection(struct ::wl_resource *resource, struct ::wl_resource *context);
+ void send_close_connection(struct ::wl_resource *context);
+ void send_close_connection(struct ::wl_resource *resource, struct ::wl_resource *context);
+ void send_set_text_input_id(struct ::wl_resource *context, uint32_t text_input_id);
+ void send_set_text_input_id(struct ::wl_resource *resource, struct ::wl_resource *context, uint32_t text_input_id);
protected:
- virtual Resource *input_method_allocate();
+ virtual Resource *zwp_input_method_v1_allocate();
- virtual void input_method_bind_resource(Resource *resource);
- virtual void input_method_destroy_resource(Resource *resource);
+ virtual void zwp_input_method_v1_bind_resource(Resource *resource);
+ virtual void zwp_input_method_v1_destroy_resource(Resource *resource);
private:
static void bind_func(struct ::wl_client *client, void *data, uint32_t version, uint32_t id);
struct ::wl_global *m_global;
uint32_t m_globalVersion;
struct DisplayDestroyedListener : ::wl_listener {
- wl_input_method *parent;
+ zwp_input_method_v1 *parent;
DisplayDestroyedListener(): parent(NULL) {}
};
DisplayDestroyedListener m_displayDestroyedListener;
};
- class wl_input_panel
+ class zwp_input_panel_v1
{
public:
- wl_input_panel(struct ::wl_client *client, uint32_t id, int version);
- wl_input_panel(struct ::wl_display *display, int version);
- wl_input_panel(struct ::wl_resource *resource);
- wl_input_panel();
+ zwp_input_panel_v1(struct ::wl_client *client, uint32_t id, int version);
+ zwp_input_panel_v1(struct ::wl_display *display, int version);
+ zwp_input_panel_v1(struct ::wl_resource *resource);
+ zwp_input_panel_v1();
- virtual ~wl_input_panel();
+ virtual ~zwp_input_panel_v1();
class Resource
{
public:
- Resource() : input_panel_object(NULL), handle(NULL) {}
+ Resource() : zwp_input_panel_v1_object(NULL), handle(NULL) {}
virtual ~Resource() {}
- wl_input_panel *input_panel_object;
- wl_input_panel *object() { return input_panel_object; }
+ zwp_input_panel_v1 *zwp_input_panel_v1_object;
+ zwp_input_panel_v1 *object() { return zwp_input_panel_v1_object; }
struct ::wl_resource *handle;
struct ::wl_client *client() const { return wl_resource_get_client(handle); }
protected:
- virtual Resource *input_panel_allocate();
+ virtual Resource *zwp_input_panel_v1_allocate();
- virtual void input_panel_bind_resource(Resource *resource);
- virtual void input_panel_destroy_resource(Resource *resource);
+ virtual void zwp_input_panel_v1_bind_resource(Resource *resource);
+ virtual void zwp_input_panel_v1_destroy_resource(Resource *resource);
- virtual void input_panel_get_input_panel_surface(Resource *resource, uint32_t id, struct ::wl_resource *surface);
+ virtual void zwp_input_panel_v1_get_input_panel_surface(Resource *resource, uint32_t id, struct ::wl_resource *surface);
private:
static void bind_func(struct ::wl_client *client, void *data, uint32_t version, uint32_t id);
Resource *bind(struct ::wl_client *client, uint32_t id, int version);
Resource *bind(struct ::wl_resource *handle);
- static const struct ::wl_input_panel_interface m_wl_input_panel_interface;
+ static const struct ::zwp_input_panel_v1_interface m_zwp_input_panel_v1_interface;
static void handle_get_input_panel_surface(
::wl_client *client,
struct ::wl_global *m_global;
uint32_t m_globalVersion;
struct DisplayDestroyedListener : ::wl_listener {
- wl_input_panel *parent;
+ zwp_input_panel_v1 *parent;
DisplayDestroyedListener(): parent(NULL) {}
};
DisplayDestroyedListener m_displayDestroyedListener;
};
- class wl_input_panel_surface
+ class zwp_input_panel_surface_v1
{
public:
- wl_input_panel_surface(struct ::wl_client *client, uint32_t id, int version);
- wl_input_panel_surface(struct ::wl_display *display, int version);
- wl_input_panel_surface(struct ::wl_resource *resource);
- wl_input_panel_surface();
+ zwp_input_panel_surface_v1(struct ::wl_client *client, uint32_t id, int version);
+ zwp_input_panel_surface_v1(struct ::wl_display *display, int version);
+ zwp_input_panel_surface_v1(struct ::wl_resource *resource);
+ zwp_input_panel_surface_v1();
- virtual ~wl_input_panel_surface();
+ virtual ~zwp_input_panel_surface_v1();
class Resource
{
public:
- Resource() : input_panel_surface_object(NULL), handle(NULL) {}
+ Resource() : zwp_input_panel_surface_v1_object(NULL), handle(NULL) {}
virtual ~Resource() {}
- wl_input_panel_surface *input_panel_surface_object;
- wl_input_panel_surface *object() { return input_panel_surface_object; }
+ zwp_input_panel_surface_v1 *zwp_input_panel_surface_v1_object;
+ zwp_input_panel_surface_v1 *object() { return zwp_input_panel_surface_v1_object; }
struct ::wl_resource *handle;
struct ::wl_client *client() const { return wl_resource_get_client(handle); }
};
protected:
- virtual Resource *input_panel_surface_allocate();
+ virtual Resource *zwp_input_panel_surface_v1_allocate();
- virtual void input_panel_surface_bind_resource(Resource *resource);
- virtual void input_panel_surface_destroy_resource(Resource *resource);
+ virtual void zwp_input_panel_surface_v1_bind_resource(Resource *resource);
+ virtual void zwp_input_panel_surface_v1_destroy_resource(Resource *resource);
- virtual void input_panel_surface_set_toplevel(Resource *resource, struct ::wl_resource *output, uint32_t position);
- virtual void input_panel_surface_set_overlay_panel(Resource *resource);
- virtual void input_panel_surface_set_ready(Resource *resource, uint32_t state);
+ virtual void zwp_input_panel_surface_v1_set_toplevel(Resource *resource, struct ::wl_resource *output, uint32_t position);
+ virtual void zwp_input_panel_surface_v1_set_overlay_panel(Resource *resource);
+ virtual void zwp_input_panel_surface_v1_set_ready(Resource *resource, uint32_t state);
private:
static void bind_func(struct ::wl_client *client, void *data, uint32_t version, uint32_t id);
Resource *bind(struct ::wl_client *client, uint32_t id, int version);
Resource *bind(struct ::wl_resource *handle);
- static const struct ::wl_input_panel_surface_interface m_wl_input_panel_surface_interface;
+ static const struct ::zwp_input_panel_surface_v1_interface m_zwp_input_panel_surface_v1_interface;
static void handle_set_toplevel(
::wl_client *client,
struct ::wl_global *m_global;
uint32_t m_globalVersion;
struct DisplayDestroyedListener : ::wl_listener {
- wl_input_panel_surface *parent;
+ zwp_input_panel_surface_v1 *parent;
DisplayDestroyedListener(): parent(NULL) {}
};
DisplayDestroyedListener m_displayDestroyedListener;
};
- class wl_input_method_manager
+ class zwp_input_method_manager_v1
{
public:
- wl_input_method_manager(struct ::wl_client *client, uint32_t id, int version);
- wl_input_method_manager(struct ::wl_display *display, int version);
- wl_input_method_manager(struct ::wl_resource *resource);
- wl_input_method_manager();
+ zwp_input_method_manager_v1(struct ::wl_client *client, uint32_t id, int version);
+ zwp_input_method_manager_v1(struct ::wl_display *display, int version);
+ zwp_input_method_manager_v1(struct ::wl_resource *resource);
+ zwp_input_method_manager_v1();
- virtual ~wl_input_method_manager();
+ virtual ~zwp_input_method_manager_v1();
class Resource
{
public:
- Resource() : input_method_manager_object(NULL), handle(NULL) {}
+ Resource() : zwp_input_method_manager_v1_object(NULL), handle(NULL) {}
virtual ~Resource() {}
- wl_input_method_manager *input_method_manager_object;
- wl_input_method_manager *object() { return input_method_manager_object; }
+ zwp_input_method_manager_v1 *zwp_input_method_manager_v1_object;
+ zwp_input_method_manager_v1 *object() { return zwp_input_method_manager_v1_object; }
struct ::wl_resource *handle;
struct ::wl_client *client() const { return wl_resource_get_client(handle); }
protected:
- virtual Resource *input_method_manager_allocate();
+ virtual Resource *zwp_input_method_manager_v1_allocate();
- virtual void input_method_manager_bind_resource(Resource *resource);
- virtual void input_method_manager_destroy_resource(Resource *resource);
+ virtual void zwp_input_method_manager_v1_bind_resource(Resource *resource);
+ virtual void zwp_input_method_manager_v1_destroy_resource(Resource *resource);
- virtual void input_method_manager_set_transient_for(Resource *resource, uint32_t parent_pid, uint32_t child_pid);
+ virtual void zwp_input_method_manager_v1_set_transient_for(Resource *resource, uint32_t parent_pid, uint32_t child_pid);
private:
static void bind_func(struct ::wl_client *client, void *data, uint32_t version, uint32_t id);
Resource *bind(struct ::wl_client *client, uint32_t id, int version);
Resource *bind(struct ::wl_resource *handle);
- static const struct ::wl_input_method_manager_interface m_wl_input_method_manager_interface;
+ static const struct ::zwp_input_method_manager_v1_interface m_zwp_input_method_manager_v1_interface;
static void handle_set_transient_for(
::wl_client *client,
struct ::wl_global *m_global;
uint32_t m_globalVersion;
struct DisplayDestroyedListener : ::wl_listener {
- wl_input_method_manager *parent;
+ zwp_input_method_manager_v1 *parent;
DisplayDestroyedListener(): parent(NULL) {}
};
DisplayDestroyedListener m_displayDestroyedListener;
}
#endif
-/*LCOV_EXCL_STOP*/
+/*LCOV_EXCL_STOP*/
\ No newline at end of file
+++ /dev/null
-/*LCOV_EXCL_START*/
-/* Protocol XML file : wayland-extension/input-method.xml */
-
-#include "dswayland-server-input-method.h"
-
-#ifndef DS_UNLIKELY
-#define DS_UNLIKELY(X) X
-#endif
-#ifndef DS_UNUSED
-#define DS_UNUSED(X) (void)X
-#endif
-#ifndef DS_ASSERT
-#define DS_ASSERT(COND) assert(COND)
-#endif
-#ifndef DS_ASSERT_X
-#define DS_ASSERT_X(COND, ERR_TAG, ERR_MSG, X...) \
- do {\
- if (! (COND))\
- {\
- fprintf(stderr, "%s :: "#ERR_MSG, ERR_TAG, ##X);\
- assert(COND);\
- }\
- } while(0)
-#endif
-#ifndef WRN
-#define WRN(X...) fprintf(stderr,##X)
-#endif
-
-namespace DSWaylandServer {
- wl_input_method_context::wl_input_method_context(struct ::wl_client *client, uint32_t id, int version)
- : m_resource_map()
- , m_resource(NULL)
- , m_global(NULL)
- , m_globalVersion(0)
- , m_displayDestroyedListener()
- {
- init(client, id, version);
- }
-
- wl_input_method_context::wl_input_method_context(struct ::wl_display *display, int version)
- : m_resource_map()
- , m_resource(NULL)
- , m_global(NULL)
- , m_globalVersion(0)
- , m_displayDestroyedListener()
- {
- init(display, version);
- }
-
- wl_input_method_context::wl_input_method_context(struct ::wl_resource *resource)
- : m_resource_map()
- , m_resource(NULL)
- , m_global(NULL)
- , m_globalVersion(0)
- , m_displayDestroyedListener()
- {
- init(resource);
- }
-
- wl_input_method_context::wl_input_method_context()
- : m_resource_map()
- , m_resource(NULL)
- , m_global(NULL)
- , m_globalVersion(0)
- , m_displayDestroyedListener()
- {
- }
-
- wl_input_method_context::~wl_input_method_context()
- {
- std::multimap<struct ::wl_client*, wl_input_method_context::Resource*>::iterator it;
- for (it = m_resource_map.begin() ; it != m_resource_map.end() ; it++) {
- wl_input_method_context::Resource *resource = (*it).second;
- wl_resource_set_implementation(resource->handle, NULL, NULL, NULL);
- }
-
- if (m_global) {
- wl_global_destroy(m_global);
- wl_list_remove(&m_displayDestroyedListener.link);
- }
- }
-
- void wl_input_method_context::init(struct ::wl_client *client, uint32_t id, int version)
- {
- m_resource = bind(client, id, version);
- }
-
- void wl_input_method_context::init(struct ::wl_resource *resource)
- {
- m_resource = bind(resource);
- }
-
- wl_input_method_context::Resource *wl_input_method_context::add(struct ::wl_client *client, int version)
- {
- Resource *resource = bind(client, 0, version);
- m_resource_map.insert(std::pair<struct ::wl_client*, Resource*>(client, resource));
- return resource;
- }
-
- wl_input_method_context::Resource *wl_input_method_context::add(struct ::wl_client *client, uint32_t id, int version)
- {
- Resource *resource = bind(client, id, version);
- m_resource_map.insert(std::pair<struct ::wl_client*, Resource*>(client, resource));
- return resource;
- }
-
- void wl_input_method_context::init(struct ::wl_display *display, int version)
- {
- m_global = wl_global_create(display, &::wl_input_method_context_interface, version, this, bind_func);
- m_globalVersion = version;
- m_displayDestroyedListener.notify = wl_input_method_context::display_destroy_func;
- m_displayDestroyedListener.parent = this;
- wl_display_add_destroy_listener(display, &m_displayDestroyedListener);
- }
-
- const struct wl_interface *wl_input_method_context::interface()
- {
- return &::wl_input_method_context_interface;
- }
-
- wl_input_method_context::Resource *wl_input_method_context::input_method_context_allocate()
- {
- return new Resource;
- }
-
- void wl_input_method_context::input_method_context_bind_resource(Resource *)
- {
- }
-
- void wl_input_method_context::input_method_context_destroy_resource(Resource *)
- {
- }
-
- void wl_input_method_context::bind_func(struct ::wl_client *client, void *data, uint32_t version, uint32_t id)
- {
- wl_input_method_context *that = static_cast<wl_input_method_context *>(data);
- that->add(client, id, std::min(that->m_globalVersion, version));
- }
-
- void wl_input_method_context::display_destroy_func(struct ::wl_listener *listener, void *data)
- {
- DS_UNUSED(data);
- wl_input_method_context *that = static_cast<wl_input_method_context::DisplayDestroyedListener *>(listener)->parent;
- that->m_global = NULL;
- }
-
- void wl_input_method_context::destroy_func(struct ::wl_resource *client_resource)
- {
- Resource *resource = Resource::fromResource(client_resource);
- DS_ASSERT(resource);
- wl_input_method_context *that = resource->input_method_context_object;
- that->m_resource_map.erase(resource->client());
- that->input_method_context_destroy_resource(resource);
- delete resource;
- }
-
- wl_input_method_context::Resource *wl_input_method_context::bind(struct ::wl_client *client, uint32_t id, int version)
- {
- DS_ASSERT_X(!wl_client_get_object(client, id), "DSWaylandObject bind", "binding to object %u more than once", id);
- struct ::wl_resource *handle = wl_resource_create(client, &::wl_input_method_context_interface, version, id);
- return bind(handle);
- }
-
- wl_input_method_context::Resource *wl_input_method_context::bind(struct ::wl_resource *handle)
- {
- Resource *resource = input_method_context_allocate();
- resource->input_method_context_object = this;
-
- wl_resource_set_implementation(handle, &m_wl_input_method_context_interface, resource, destroy_func);
- resource->handle = handle;
- input_method_context_bind_resource(resource);
- return resource;
- }
- wl_input_method_context::Resource *wl_input_method_context::Resource::fromResource(struct ::wl_resource *resource)
- {
- if (DS_UNLIKELY(!resource))
- return NULL;
- if (wl_resource_instance_of(resource, &::wl_input_method_context_interface, &m_wl_input_method_context_interface))
- return static_cast<Resource *>(wl_resource_get_user_data(resource));
- return NULL;
- }
-
- const struct ::wl_input_method_context_interface wl_input_method_context::m_wl_input_method_context_interface = {
- wl_input_method_context::handle_destroy,
- wl_input_method_context::handle_commit_string,
- wl_input_method_context::handle_preedit_string,
- wl_input_method_context::handle_preedit_styling,
- wl_input_method_context::handle_preedit_cursor,
- wl_input_method_context::handle_delete_surrounding_text,
- wl_input_method_context::handle_cursor_position,
- wl_input_method_context::handle_modifiers_map,
- wl_input_method_context::handle_keysym,
- wl_input_method_context::handle_grab_keyboard,
- wl_input_method_context::handle_key,
- wl_input_method_context::handle_modifiers,
- wl_input_method_context::handle_language,
- wl_input_method_context::handle_text_direction,
- wl_input_method_context::handle_selection_region,
- wl_input_method_context::handle_private_command,
- wl_input_method_context::handle_update_input_panel_data,
- wl_input_method_context::handle_hide_input_panel,
- wl_input_method_context::handle_get_selection_text,
- wl_input_method_context::handle_get_surrounding_text,
- wl_input_method_context::handle_filter_key_event_done,
- wl_input_method_context::handle_update_ise_geometry,
- wl_input_method_context::handle_recapture_string,
- wl_input_method_context::handle_input_panel_event,
- wl_input_method_context::handle_commit_content,
- wl_input_method_context::handle_update_candidate_state,
- wl_input_method_context::handle_reshow_input_panel,
- wl_input_method_context::handle_set_floating_panel,
- wl_input_method_context::handle_set_floating_drag_enabled
- };
-
- void wl_input_method_context::input_method_context_destroy(Resource *)
- {
- }
-
- void wl_input_method_context::input_method_context_commit_string(Resource *, uint32_t , const std::string &)
- {
- }
-
- void wl_input_method_context::input_method_context_preedit_string(Resource *, uint32_t , const std::string &, const std::string &)
- {
- }
-
- void wl_input_method_context::input_method_context_preedit_styling(Resource *, uint32_t , uint32_t , uint32_t )
- {
- }
-
- void wl_input_method_context::input_method_context_preedit_cursor(Resource *, int32_t )
- {
- }
-
- void wl_input_method_context::input_method_context_delete_surrounding_text(Resource *, int32_t , uint32_t )
- {
- }
-
- void wl_input_method_context::input_method_context_cursor_position(Resource *, int32_t , int32_t )
- {
- }
-
- void wl_input_method_context::input_method_context_modifiers_map(Resource *, struct ::wl_array *)
- {
- }
-
- void wl_input_method_context::input_method_context_keysym(Resource *, uint32_t , uint32_t , uint32_t , uint32_t , uint32_t )
- {
- }
-
- void wl_input_method_context::input_method_context_grab_keyboard(Resource *, uint32_t)
- {
- }
-
- void wl_input_method_context::input_method_context_key(Resource *, uint32_t , uint32_t , uint32_t , uint32_t )
- {
- }
-
- void wl_input_method_context::input_method_context_modifiers(Resource *, uint32_t , uint32_t , uint32_t , uint32_t , uint32_t )
- {
- }
-
- void wl_input_method_context::input_method_context_language(Resource *, uint32_t , const std::string &)
- {
- }
-
- void wl_input_method_context::input_method_context_text_direction(Resource *, uint32_t , uint32_t )
- {
- }
-
- void wl_input_method_context::input_method_context_selection_region(Resource *, uint32_t , int32_t , int32_t )
- {
- }
-
- void wl_input_method_context::input_method_context_private_command(Resource *, uint32_t , const std::string &)
- {
- }
-
- void wl_input_method_context::input_method_context_update_input_panel_data(Resource *, uint32_t , const std::string &, uint32_t )
- {
- }
-
- void wl_input_method_context::input_method_context_hide_input_panel(Resource *, uint32_t )
- {
- }
-
- void wl_input_method_context::input_method_context_get_selection_text(Resource *, int32_t )
- {
- }
-
- void wl_input_method_context::input_method_context_get_surrounding_text(Resource *, uint32_t , uint32_t , int32_t )
- {
- }
-
- void wl_input_method_context::input_method_context_filter_key_event_done(Resource *, uint32_t , uint32_t )
- {
- }
-
- void wl_input_method_context::input_method_context_update_ise_geometry(Resource *, uint32_t , uint32_t , uint32_t , uint32_t , uint32_t )
- {
- }
-
- void wl_input_method_context::input_method_context_recapture_string(Resource *, uint32_t , int32_t , uint32_t , const std::string &, const std::string &, const std::string &)
- {
- }
-
- void wl_input_method_context::input_method_context_input_panel_event(Resource *, uint32_t , uint32_t , uint32_t )
- {
- }
-
- void wl_input_method_context::input_method_context_commit_content(Resource *, uint32_t , const std::string &, const std::string &, const std::string &)
- {
- }
-
- void wl_input_method_context::input_method_context_update_candidate_state(Resource *, uint32_t )
- {
- }
-
- void wl_input_method_context::input_method_context_reshow_input_panel(Resource *)
- {
- }
-
- void wl_input_method_context::input_method_context_set_floating_panel(Resource *, uint32_t )
- {
- }
-
- void wl_input_method_context::input_method_context_set_floating_drag_enabled(Resource *, uint32_t )
- {
- }
-
-
- void wl_input_method_context::handle_destroy(
- ::wl_client *client,
- struct wl_resource *resource)
- {
- DS_UNUSED(client);
- Resource *r = Resource::fromResource(resource);
- static_cast<wl_input_method_context *>(r->input_method_context_object)->input_method_context_destroy(
- r);
- }
-
- void wl_input_method_context::handle_commit_string(
- ::wl_client *client,
- struct wl_resource *resource,
- uint32_t serial,
- const char *text)
- {
- DS_UNUSED(client);
- Resource *r = Resource::fromResource(resource);
- static_cast<wl_input_method_context *>(r->input_method_context_object)->input_method_context_commit_string(
- r,
- serial,
- std::string(text));
- }
-
- void wl_input_method_context::handle_preedit_string(
- ::wl_client *client,
- struct wl_resource *resource,
- uint32_t serial,
- const char *text,
- const char *commit)
- {
- DS_UNUSED(client);
- Resource *r = Resource::fromResource(resource);
- static_cast<wl_input_method_context *>(r->input_method_context_object)->input_method_context_preedit_string(
- r,
- serial,
- std::string(text),
- std::string(commit));
- }
-
- void wl_input_method_context::handle_preedit_styling(
- ::wl_client *client,
- struct wl_resource *resource,
- uint32_t index,
- uint32_t length,
- uint32_t style)
- {
- DS_UNUSED(client);
- Resource *r = Resource::fromResource(resource);
- static_cast<wl_input_method_context *>(r->input_method_context_object)->input_method_context_preedit_styling(
- r,
- index,
- length,
- style);
- }
-
- void wl_input_method_context::handle_preedit_cursor(
- ::wl_client *client,
- struct wl_resource *resource,
- int32_t index)
- {
- DS_UNUSED(client);
- Resource *r = Resource::fromResource(resource);
- static_cast<wl_input_method_context *>(r->input_method_context_object)->input_method_context_preedit_cursor(
- r,
- index);
- }
-
- void wl_input_method_context::handle_delete_surrounding_text(
- ::wl_client *client,
- struct wl_resource *resource,
- int32_t index,
- uint32_t length)
- {
- DS_UNUSED(client);
- Resource *r = Resource::fromResource(resource);
- static_cast<wl_input_method_context *>(r->input_method_context_object)->input_method_context_delete_surrounding_text(
- r,
- index,
- length);
- }
-
- void wl_input_method_context::handle_cursor_position(
- ::wl_client *client,
- struct wl_resource *resource,
- int32_t index,
- int32_t anchor)
- {
- DS_UNUSED(client);
- Resource *r = Resource::fromResource(resource);
- static_cast<wl_input_method_context *>(r->input_method_context_object)->input_method_context_cursor_position(
- r,
- index,
- anchor);
- }
-
- void wl_input_method_context::handle_modifiers_map(
- ::wl_client *client,
- struct wl_resource *resource,
- struct ::wl_array *map)
- {
- DS_UNUSED(client);
- Resource *r = Resource::fromResource(resource);
- static_cast<wl_input_method_context *>(r->input_method_context_object)->input_method_context_modifiers_map(
- r,
- map);
- }
-
- void wl_input_method_context::handle_keysym(
- ::wl_client *client,
- struct wl_resource *resource,
- uint32_t serial,
- uint32_t time,
- uint32_t sym,
- uint32_t state,
- uint32_t modifiers)
- {
- DS_UNUSED(client);
- Resource *r = Resource::fromResource(resource);
- static_cast<wl_input_method_context *>(r->input_method_context_object)->input_method_context_keysym(
- r,
- serial,
- time,
- sym,
- state,
- modifiers);
- }
-
- void wl_input_method_context::handle_grab_keyboard(
- ::wl_client *client,
- struct wl_resource *resource,
- uint32_t keyboard)
- {
- DS_UNUSED(client);
- Resource *r = Resource::fromResource(resource);
- static_cast<wl_input_method_context *>(r->input_method_context_object)->input_method_context_grab_keyboard(
- r,
- keyboard);
- }
-
- void wl_input_method_context::handle_key(
- ::wl_client *client,
- struct wl_resource *resource,
- uint32_t serial,
- uint32_t time,
- uint32_t key,
- uint32_t state)
- {
- DS_UNUSED(client);
- Resource *r = Resource::fromResource(resource);
- static_cast<wl_input_method_context *>(r->input_method_context_object)->input_method_context_key(
- r,
- serial,
- time,
- key,
- state);
- }
-
- void wl_input_method_context::handle_modifiers(
- ::wl_client *client,
- struct wl_resource *resource,
- uint32_t serial,
- uint32_t mods_depressed,
- uint32_t mods_latched,
- uint32_t mods_locked,
- uint32_t group)
- {
- DS_UNUSED(client);
- Resource *r = Resource::fromResource(resource);
- static_cast<wl_input_method_context *>(r->input_method_context_object)->input_method_context_modifiers(
- r,
- serial,
- mods_depressed,
- mods_latched,
- mods_locked,
- group);
- }
-
- void wl_input_method_context::handle_language(
- ::wl_client *client,
- struct wl_resource *resource,
- uint32_t serial,
- const char *language)
- {
- DS_UNUSED(client);
- Resource *r = Resource::fromResource(resource);
- static_cast<wl_input_method_context *>(r->input_method_context_object)->input_method_context_language(
- r,
- serial,
- std::string(language));
- }
-
- void wl_input_method_context::handle_text_direction(
- ::wl_client *client,
- struct wl_resource *resource,
- uint32_t serial,
- uint32_t direction)
- {
- DS_UNUSED(client);
- Resource *r = Resource::fromResource(resource);
- static_cast<wl_input_method_context *>(r->input_method_context_object)->input_method_context_text_direction(
- r,
- serial,
- direction);
- }
-
- void wl_input_method_context::handle_selection_region(
- ::wl_client *client,
- struct wl_resource *resource,
- uint32_t serial,
- int32_t start,
- int32_t end)
- {
- DS_UNUSED(client);
- Resource *r = Resource::fromResource(resource);
- static_cast<wl_input_method_context *>(r->input_method_context_object)->input_method_context_selection_region(
- r,
- serial,
- start,
- end);
- }
-
- void wl_input_method_context::handle_private_command(
- ::wl_client *client,
- struct wl_resource *resource,
- uint32_t serial,
- const char *command)
- {
- DS_UNUSED(client);
- Resource *r = Resource::fromResource(resource);
- static_cast<wl_input_method_context *>(r->input_method_context_object)->input_method_context_private_command(
- r,
- serial,
- std::string(command));
- }
-
- void wl_input_method_context::handle_update_input_panel_data(
- ::wl_client *client,
- struct wl_resource *resource,
- uint32_t serial,
- const char *input_panel_data,
- uint32_t input_panel_data_length)
- {
- DS_UNUSED(client);
- Resource *r = Resource::fromResource(resource);
- static_cast<wl_input_method_context *>(r->input_method_context_object)->input_method_context_update_input_panel_data(
- r,
- serial,
- std::string(input_panel_data),
- input_panel_data_length);
- }
-
- void wl_input_method_context::handle_hide_input_panel(
- ::wl_client *client,
- struct wl_resource *resource,
- uint32_t serial)
- {
- DS_UNUSED(client);
- Resource *r = Resource::fromResource(resource);
- static_cast<wl_input_method_context *>(r->input_method_context_object)->input_method_context_hide_input_panel(
- r,
- serial);
- }
-
- void wl_input_method_context::handle_get_selection_text(
- ::wl_client *client,
- struct wl_resource *resource,
- int32_t fd)
- {
- DS_UNUSED(client);
- Resource *r = Resource::fromResource(resource);
- static_cast<wl_input_method_context *>(r->input_method_context_object)->input_method_context_get_selection_text(
- r,
- fd);
- }
-
- void wl_input_method_context::handle_get_surrounding_text(
- ::wl_client *client,
- struct wl_resource *resource,
- uint32_t maxlen_before,
- uint32_t maxlen_after,
- int32_t fd)
- {
- DS_UNUSED(client);
- Resource *r = Resource::fromResource(resource);
- static_cast<wl_input_method_context *>(r->input_method_context_object)->input_method_context_get_surrounding_text(
- r,
- maxlen_before,
- maxlen_after,
- fd);
- }
-
- void wl_input_method_context::handle_filter_key_event_done(
- ::wl_client *client,
- struct wl_resource *resource,
- uint32_t serial,
- uint32_t state)
- {
- DS_UNUSED(client);
- Resource *r = Resource::fromResource(resource);
- static_cast<wl_input_method_context *>(r->input_method_context_object)->input_method_context_filter_key_event_done(
- r,
- serial,
- state);
- }
-
- void wl_input_method_context::handle_update_ise_geometry(
- ::wl_client *client,
- struct wl_resource *resource,
- uint32_t serial,
- uint32_t x,
- uint32_t y,
- uint32_t width,
- uint32_t height)
- {
- DS_UNUSED(client);
- Resource *r = Resource::fromResource(resource);
- static_cast<wl_input_method_context *>(r->input_method_context_object)->input_method_context_update_ise_geometry(
- r,
- serial,
- x,
- y,
- width,
- height);
- }
-
- void wl_input_method_context::handle_recapture_string(
- ::wl_client *client,
- struct wl_resource *resource,
- uint32_t serial,
- int32_t index,
- uint32_t length,
- const char *preedit,
- const char *preedit_commit,
- const char *commit)
- {
- DS_UNUSED(client);
- Resource *r = Resource::fromResource(resource);
- static_cast<wl_input_method_context *>(r->input_method_context_object)->input_method_context_recapture_string(
- r,
- serial,
- index,
- length,
- std::string(preedit),
- std::string(preedit_commit),
- std::string(commit));
- }
-
- void wl_input_method_context::handle_input_panel_event(
- ::wl_client *client,
- struct wl_resource *resource,
- uint32_t serial,
- uint32_t event_type,
- uint32_t value)
- {
- DS_UNUSED(client);
- Resource *r = Resource::fromResource(resource);
- static_cast<wl_input_method_context *>(r->input_method_context_object)->input_method_context_input_panel_event(
- r,
- serial,
- event_type,
- value);
- }
-
- void wl_input_method_context::handle_commit_content(
- ::wl_client *client,
- struct wl_resource *resource,
- uint32_t serial,
- const char *content,
- const char *description,
- const char *mime_types)
- {
- DS_UNUSED(client);
- Resource *r = Resource::fromResource(resource);
- static_cast<wl_input_method_context *>(r->input_method_context_object)->input_method_context_commit_content(
- r,
- serial,
- std::string(content),
- std::string(description),
- std::string(mime_types));
- }
-
- void wl_input_method_context::handle_update_candidate_state(
- ::wl_client *client,
- struct wl_resource *resource,
- uint32_t state)
- {
- DS_UNUSED(client);
- Resource *r = Resource::fromResource(resource);
- static_cast<wl_input_method_context *>(r->input_method_context_object)->input_method_context_update_candidate_state(
- r,
- state);
- }
-
- void wl_input_method_context::handle_reshow_input_panel(
- ::wl_client *client,
- struct wl_resource *resource)
- {
- DS_UNUSED(client);
- Resource *r = Resource::fromResource(resource);
- static_cast<wl_input_method_context *>(r->input_method_context_object)->input_method_context_reshow_input_panel(
- r);
- }
-
- void wl_input_method_context::handle_set_floating_panel(
- ::wl_client *client,
- struct wl_resource *resource,
- uint32_t state)
- {
- DS_UNUSED(client);
- Resource *r = Resource::fromResource(resource);
- static_cast<wl_input_method_context *>(r->input_method_context_object)->input_method_context_set_floating_panel(
- r,
- state);
- }
-
- void wl_input_method_context::handle_set_floating_drag_enabled(
- ::wl_client *client,
- struct wl_resource *resource,
- uint32_t enabled)
- {
- DS_UNUSED(client);
- Resource *r = Resource::fromResource(resource);
- static_cast<wl_input_method_context *>(r->input_method_context_object)->input_method_context_set_floating_drag_enabled(
- r,
- enabled);
- }
-
- void wl_input_method_context::send_reset()
- {
- DS_ASSERT_X(m_resource, "wl_input_method_context::reset", "Uninitialised resource");
- if (DS_UNLIKELY(!m_resource)) {
- WRN("could not call wl_input_method_context::reset as it's not initialised");
- return;
- }
- send_reset(
- m_resource->handle);
- }
-
- void wl_input_method_context::send_reset(struct ::wl_resource *resource)
- {
- wl_input_method_context_send_reset(
- resource);
- }
-
-
- void wl_input_method_context::send_content_type(uint32_t hint, uint32_t purpose)
- {
- DS_ASSERT_X(m_resource, "wl_input_method_context::content_type", "Uninitialised resource");
- if (DS_UNLIKELY(!m_resource)) {
- WRN("could not call wl_input_method_context::content_type as it's not initialised");
- return;
- }
- send_content_type(
- m_resource->handle,
- hint,
- purpose);
- }
-
- void wl_input_method_context::send_content_type(struct ::wl_resource *resource, uint32_t hint, uint32_t purpose)
- {
- wl_input_method_context_send_content_type(
- resource,
- hint,
- purpose);
- }
-
-
- void wl_input_method_context::send_invoke_action(uint32_t button, uint32_t index)
- {
- DS_ASSERT_X(m_resource, "wl_input_method_context::invoke_action", "Uninitialised resource");
- if (DS_UNLIKELY(!m_resource)) {
- WRN("could not call wl_input_method_context::invoke_action as it's not initialised");
- return;
- }
- send_invoke_action(
- m_resource->handle,
- button,
- index);
- }
-
- void wl_input_method_context::send_invoke_action(struct ::wl_resource *resource, uint32_t button, uint32_t index)
- {
- wl_input_method_context_send_invoke_action(
- resource,
- button,
- index);
- }
-
-
- void wl_input_method_context::send_commit_state(uint32_t serial)
- {
- DS_ASSERT_X(m_resource, "wl_input_method_context::commit_state", "Uninitialised resource");
- if (DS_UNLIKELY(!m_resource)) {
- WRN("could not call wl_input_method_context::commit_state as it's not initialised");
- return;
- }
- send_commit_state(
- m_resource->handle,
- serial);
- }
-
- void wl_input_method_context::send_commit_state(struct ::wl_resource *resource, uint32_t serial)
- {
- wl_input_method_context_send_commit_state(
- resource,
- serial);
- }
-
-
- void wl_input_method_context::send_preferred_language(const std::string &language)
- {
- DS_ASSERT_X(m_resource, "wl_input_method_context::preferred_language", "Uninitialised resource");
- if (DS_UNLIKELY(!m_resource)) {
- WRN("could not call wl_input_method_context::preferred_language as it's not initialised");
- return;
- }
- send_preferred_language(
- m_resource->handle,
- language);
- }
-
- void wl_input_method_context::send_preferred_language(struct ::wl_resource *resource, const std::string &language)
- {
- wl_input_method_context_send_preferred_language(
- resource,
- language.c_str());
- }
-
-
- void wl_input_method_context::send_return_key_type(uint32_t return_key_type)
- {
- DS_ASSERT_X(m_resource, "wl_input_method_context::return_key_type", "Uninitialised resource");
- if (DS_UNLIKELY(!m_resource)) {
- WRN("could not call wl_input_method_context::return_key_type as it's not initialised");
- return;
- }
- send_return_key_type(
- m_resource->handle,
- return_key_type);
- }
-
- void wl_input_method_context::send_return_key_type(struct ::wl_resource *resource, uint32_t return_key_type)
- {
- wl_input_method_context_send_return_key_type(
- resource,
- return_key_type);
- }
-
-
- void wl_input_method_context::send_return_key_disabled(uint32_t return_key_disabled)
- {
- DS_ASSERT_X(m_resource, "wl_input_method_context::return_key_disabled", "Uninitialised resource");
- if (DS_UNLIKELY(!m_resource)) {
- WRN("could not call wl_input_method_context::return_key_disabled as it's not initialised");
- return;
- }
- send_return_key_disabled(
- m_resource->handle,
- return_key_disabled);
- }
-
- void wl_input_method_context::send_return_key_disabled(struct ::wl_resource *resource, uint32_t return_key_disabled)
- {
- wl_input_method_context_send_return_key_disabled(
- resource,
- return_key_disabled);
- }
-
-
- void wl_input_method_context::send_input_panel_data(const std::string &input_panel_data, uint32_t input_panel_data_length)
- {
- DS_ASSERT_X(m_resource, "wl_input_method_context::input_panel_data", "Uninitialised resource");
- if (DS_UNLIKELY(!m_resource)) {
- WRN("could not call wl_input_method_context::input_panel_data as it's not initialised");
- return;
- }
- send_input_panel_data(
- m_resource->handle,
- input_panel_data,
- input_panel_data_length);
- }
-
- void wl_input_method_context::send_input_panel_data(struct ::wl_resource *resource, const std::string &input_panel_data, uint32_t input_panel_data_length)
- {
- wl_input_method_context_send_input_panel_data(
- resource,
- input_panel_data.c_str(),
- input_panel_data_length);
- }
-
-
- void wl_input_method_context::send_bidi_direction(uint32_t direction)
- {
- DS_ASSERT_X(m_resource, "wl_input_method_context::bidi_direction", "Uninitialised resource");
- if (DS_UNLIKELY(!m_resource)) {
- WRN("could not call wl_input_method_context::bidi_direction as it's not initialised");
- return;
- }
- send_bidi_direction(
- m_resource->handle,
- direction);
- }
-
- void wl_input_method_context::send_bidi_direction(struct ::wl_resource *resource, uint32_t direction)
- {
- wl_input_method_context_send_bidi_direction(
- resource,
- direction);
- }
-
-
- void wl_input_method_context::send_cursor_position(uint32_t cursor_position)
- {
- DS_ASSERT_X(m_resource, "wl_input_method_context::cursor_position", "Uninitialised resource");
- if (DS_UNLIKELY(!m_resource)) {
- WRN("could not call wl_input_method_context::cursor_position as it's not initialised");
- return;
- }
- send_cursor_position(
- m_resource->handle,
- cursor_position);
- }
-
- void wl_input_method_context::send_cursor_position(struct ::wl_resource *resource, uint32_t cursor_position)
- {
- wl_input_method_context_send_cursor_position(
- resource,
- cursor_position);
- }
-
-
- void wl_input_method_context::send_process_input_device_event(uint32_t event_type, const std::string &event_data, uint32_t event_length)
- {
- DS_ASSERT_X(m_resource, "wl_input_method_context::process_input_device_event", "Uninitialised resource");
- if (DS_UNLIKELY(!m_resource)) {
- WRN("could not call wl_input_method_context::process_input_device_event as it's not initialised");
- return;
- }
- send_process_input_device_event(
- m_resource->handle,
- event_type,
- event_data,
- event_length);
- }
-
- void wl_input_method_context::send_process_input_device_event(struct ::wl_resource *resource, uint32_t event_type, const std::string &event_data, uint32_t event_length)
- {
- wl_input_method_context_send_process_input_device_event(
- resource,
- event_type,
- event_data.c_str(),
- event_length);
- }
-
-
- void wl_input_method_context::send_filter_key_event(uint32_t serial, uint32_t time, const std::string &keyname, uint32_t state, uint32_t modifiers, const std::string &dev_name, uint32_t dev_class, uint32_t dev_subclass, uint32_t keycode)
- {
- DS_ASSERT_X(m_resource, "wl_input_method_context::filter_key_event", "Uninitialised resource");
- if (DS_UNLIKELY(!m_resource)) {
- WRN("could not call wl_input_method_context::filter_key_event as it's not initialised");
- return;
- }
- send_filter_key_event(
- m_resource->handle,
- serial,
- time,
- keyname,
- state,
- modifiers,
- dev_name,
- dev_class,
- dev_subclass,
- keycode);
- }
-
- void wl_input_method_context::send_filter_key_event(struct ::wl_resource *resource, uint32_t serial, uint32_t time, const std::string &keyname, uint32_t state, uint32_t modifiers, const std::string &dev_name, uint32_t dev_class, uint32_t dev_subclass, uint32_t keycode)
- {
- wl_input_method_context_send_filter_key_event(
- resource,
- serial,
- time,
- keyname.c_str(),
- state,
- modifiers,
- dev_name.c_str(),
- dev_class,
- dev_subclass,
- keycode);
- }
-
-
- void wl_input_method_context::send_capital_mode(uint32_t mode)
- {
- DS_ASSERT_X(m_resource, "wl_input_method_context::capital_mode", "Uninitialised resource");
- if (DS_UNLIKELY(!m_resource)) {
- WRN("could not call wl_input_method_context::capital_mode as it's not initialised");
- return;
- }
- send_capital_mode(
- m_resource->handle,
- mode);
- }
-
- void wl_input_method_context::send_capital_mode(struct ::wl_resource *resource, uint32_t mode)
- {
- wl_input_method_context_send_capital_mode(
- resource,
- mode);
- }
-
-
- void wl_input_method_context::send_prediction_hint(const std::string &text)
- {
- DS_ASSERT_X(m_resource, "wl_input_method_context::prediction_hint", "Uninitialised resource");
- if (DS_UNLIKELY(!m_resource)) {
- WRN("could not call wl_input_method_context::prediction_hint as it's not initialised");
- return;
- }
- send_prediction_hint(
- m_resource->handle,
- text);
- }
-
- void wl_input_method_context::send_prediction_hint(struct ::wl_resource *resource, const std::string &text)
- {
- wl_input_method_context_send_prediction_hint(
- resource,
- text.c_str());
- }
-
-
- void wl_input_method_context::send_mime_type(const std::string &type)
- {
- DS_ASSERT_X(m_resource, "wl_input_method_context::mime_type", "Uninitialised resource");
- if (DS_UNLIKELY(!m_resource)) {
- WRN("could not call wl_input_method_context::mime_type as it's not initialised");
- return;
- }
- send_mime_type(
- m_resource->handle,
- type);
- }
-
- void wl_input_method_context::send_mime_type(struct ::wl_resource *resource, const std::string &type)
- {
- wl_input_method_context_send_mime_type(
- resource,
- type.c_str());
- }
-
-
- void wl_input_method_context::send_finalized_content(const std::string &text, uint32_t cursor_position)
- {
- DS_ASSERT_X(m_resource, "wl_input_method_context::finalized_content", "Uninitialised resource");
- if (DS_UNLIKELY(!m_resource)) {
- WRN("could not call wl_input_method_context::finalized_content as it's not initialised");
- return;
- }
- send_finalized_content(
- m_resource->handle,
- text,
- cursor_position);
- }
-
- void wl_input_method_context::send_finalized_content(struct ::wl_resource *resource, const std::string &text, uint32_t cursor_position)
- {
- wl_input_method_context_send_finalized_content(
- resource,
- text.c_str(),
- cursor_position);
- }
-
-
- void wl_input_method_context::send_prediction_hint_data(const std::string &key, const std::string &value)
- {
- DS_ASSERT_X(m_resource, "wl_input_method_context::prediction_hint_data", "Uninitialised resource");
- if (DS_UNLIKELY(!m_resource)) {
- WRN("could not call wl_input_method_context::prediction_hint_data as it's not initialised");
- return;
- }
- send_prediction_hint_data(
- m_resource->handle,
- key,
- value);
- }
-
- void wl_input_method_context::send_prediction_hint_data(struct ::wl_resource *resource, const std::string &key, const std::string &value)
- {
- wl_input_method_context_send_prediction_hint_data(
- resource,
- key.c_str(),
- value.c_str());
- }
-
-
- void wl_input_method_context::send_input_panel_enabled(uint32_t enabled)
- {
- DS_ASSERT_X(m_resource, "wl_input_method_context::input_panel_enabled", "Uninitialised resource");
- if (DS_UNLIKELY(!m_resource)) {
- WRN("could not call wl_input_method_context::input_panel_enabled as it's not initialised");
- return;
- }
- send_input_panel_enabled(
- m_resource->handle,
- enabled);
- }
-
- void wl_input_method_context::send_input_panel_enabled(struct ::wl_resource *resource, uint32_t enabled)
- {
- wl_input_method_context_send_input_panel_enabled(
- resource,
- enabled);
- }
-
-
- wl_input_method::wl_input_method(struct ::wl_client *client, uint32_t id, int version)
- : m_resource_map()
- , m_resource(NULL)
- , m_global(NULL)
- , m_globalVersion(0)
- , m_displayDestroyedListener()
- {
- init(client, id, version);
- }
-
- wl_input_method::wl_input_method(struct ::wl_display *display, int version)
- : m_resource_map()
- , m_resource(NULL)
- , m_global(NULL)
- , m_globalVersion(0)
- , m_displayDestroyedListener()
- {
- init(display, version);
- }
-
- wl_input_method::wl_input_method(struct ::wl_resource *resource)
- : m_resource_map()
- , m_resource(NULL)
- , m_global(NULL)
- , m_globalVersion(0)
- , m_displayDestroyedListener()
- {
- init(resource);
- }
-
- wl_input_method::wl_input_method()
- : m_resource_map()
- , m_resource(NULL)
- , m_global(NULL)
- , m_globalVersion(0)
- , m_displayDestroyedListener()
- {
- }
-
- wl_input_method::~wl_input_method()
- {
- std::multimap<struct ::wl_client*, wl_input_method::Resource*>::iterator it;
- for (it = m_resource_map.begin() ; it != m_resource_map.end() ; it++) {
- wl_input_method::Resource *resource = (*it).second;
- wl_resource_set_implementation(resource->handle, NULL, NULL, NULL);
- }
-
- if (m_global) {
- wl_global_destroy(m_global);
- wl_list_remove(&m_displayDestroyedListener.link);
- }
- }
-
- void wl_input_method::init(struct ::wl_client *client, uint32_t id, int version)
- {
- m_resource = bind(client, id, version);
- }
-
- void wl_input_method::init(struct ::wl_resource *resource)
- {
- m_resource = bind(resource);
- }
-
- wl_input_method::Resource *wl_input_method::add(struct ::wl_client *client, int version)
- {
- Resource *resource = bind(client, 0, version);
- m_resource_map.insert(std::pair<struct ::wl_client*, Resource*>(client, resource));
- return resource;
- }
-
- wl_input_method::Resource *wl_input_method::add(struct ::wl_client *client, uint32_t id, int version)
- {
- Resource *resource = bind(client, id, version);
- m_resource_map.insert(std::pair<struct ::wl_client*, Resource*>(client, resource));
- return resource;
- }
-
- void wl_input_method::init(struct ::wl_display *display, int version)
- {
- m_global = wl_global_create(display, &::wl_input_method_interface, version, this, bind_func);
- m_globalVersion = version;
- m_displayDestroyedListener.notify = wl_input_method::display_destroy_func;
- m_displayDestroyedListener.parent = this;
- wl_display_add_destroy_listener(display, &m_displayDestroyedListener);
- }
-
- const struct wl_interface *wl_input_method::interface()
- {
- return &::wl_input_method_interface;
- }
-
- wl_input_method::Resource *wl_input_method::input_method_allocate()
- {
- return new Resource;
- }
-
- void wl_input_method::input_method_bind_resource(Resource *)
- {
- }
-
- void wl_input_method::input_method_destroy_resource(Resource *)
- {
- }
-
- void wl_input_method::bind_func(struct ::wl_client *client, void *data, uint32_t version, uint32_t id)
- {
- wl_input_method *that = static_cast<wl_input_method *>(data);
- that->add(client, id, std::min(that->m_globalVersion, version));
- }
-
- void wl_input_method::display_destroy_func(struct ::wl_listener *listener, void *data)
- {
- DS_UNUSED(data);
- wl_input_method *that = static_cast<wl_input_method::DisplayDestroyedListener *>(listener)->parent;
- that->m_global = NULL;
- }
-
- void wl_input_method::destroy_func(struct ::wl_resource *client_resource)
- {
- Resource *resource = Resource::fromResource(client_resource);
- DS_ASSERT(resource);
- wl_input_method *that = resource->input_method_object;
- that->m_resource_map.erase(resource->client());
- that->input_method_destroy_resource(resource);
- delete resource;
- }
-
- wl_input_method::Resource *wl_input_method::bind(struct ::wl_client *client, uint32_t id, int version)
- {
- DS_ASSERT_X(!wl_client_get_object(client, id), "DSWaylandObject bind", "binding to object %u more than once", id);
- struct ::wl_resource *handle = wl_resource_create(client, &::wl_input_method_interface, version, id);
- return bind(handle);
- }
-
- wl_input_method::Resource *wl_input_method::bind(struct ::wl_resource *handle)
- {
- Resource *resource = input_method_allocate();
- resource->input_method_object = this;
-
- wl_resource_set_implementation(handle, NULL, resource, destroy_func);
- resource->handle = handle;
- input_method_bind_resource(resource);
- return resource;
- }
- wl_input_method::Resource *wl_input_method::Resource::fromResource(struct ::wl_resource *resource)
- {
- if (DS_UNLIKELY(!resource))
- return NULL;
- if (wl_resource_instance_of(resource, &::wl_input_method_interface, NULL))
- return static_cast<Resource *>(wl_resource_get_user_data(resource));
- return NULL;
- }
-
- void wl_input_method::send_activate(struct ::wl_resource *id, uint32_t text_input_id, uint32_t focus_in_event)
- {
- DS_ASSERT_X(m_resource, "wl_input_method::activate", "Uninitialised resource");
- if (DS_UNLIKELY(!m_resource)) {
- WRN("could not call wl_input_method::activate as it's not initialised");
- return;
- }
- send_activate(
- m_resource->handle,
- id,
- text_input_id,
- focus_in_event);
- }
-
- void wl_input_method::send_activate(struct ::wl_resource *resource, struct ::wl_resource *id, uint32_t text_input_id, uint32_t focus_in_event)
- {
- wl_input_method_send_activate(
- resource,
- id,
- text_input_id,
- focus_in_event);
- }
-
-
- void wl_input_method::send_deactivate(struct ::wl_resource *context, uint32_t focus_out_event)
- {
- DS_ASSERT_X(m_resource, "wl_input_method::deactivate", "Uninitialised resource");
- if (DS_UNLIKELY(!m_resource)) {
- WRN("could not call wl_input_method::deactivate as it's not initialised");
- return;
- }
- send_deactivate(
- m_resource->handle,
- context,
- focus_out_event);
- }
-
- void wl_input_method::send_deactivate(struct ::wl_resource *resource, struct ::wl_resource *context, uint32_t focus_out_event)
- {
- wl_input_method_send_deactivate(
- resource,
- context,
- focus_out_event);
- }
-
-
- void wl_input_method::send_destroy(struct ::wl_resource *context)
- {
- DS_ASSERT_X(m_resource, "wl_input_method::destroy", "Uninitialised resource");
- if (DS_UNLIKELY(!m_resource)) {
- WRN("could not call wl_input_method::destroy as it's not initialised");
- return;
- }
- send_destroy(
- m_resource->handle,
- context);
- }
-
- void wl_input_method::send_destroy(struct ::wl_resource *resource, struct ::wl_resource *context)
- {
- wl_input_method_send_destroy(
- resource,
- context);
- }
-
-
- void wl_input_method::send_show_input_panel(struct ::wl_resource *context, uint32_t degree)
- {
- DS_ASSERT_X(m_resource, "wl_input_method::show_input_panel", "Uninitialised resource");
- if (DS_UNLIKELY(!m_resource)) {
- WRN("could not call wl_input_method::show_input_panel as it's not initialised");
- return;
- }
- send_show_input_panel(
- m_resource->handle,
- context,
- degree);
- }
-
- void wl_input_method::send_show_input_panel(struct ::wl_resource *resource, struct ::wl_resource *context, uint32_t degree)
- {
- wl_input_method_send_show_input_panel(
- resource,
- context,
- degree);
- }
-
-
- void wl_input_method::send_hide_input_panel(struct ::wl_resource *context)
- {
- DS_ASSERT_X(m_resource, "wl_input_method::hide_input_panel", "Uninitialised resource");
- if (DS_UNLIKELY(!m_resource)) {
- WRN("could not call wl_input_method::hide_input_panel as it's not initialised");
- return;
- }
- send_hide_input_panel(
- m_resource->handle,
- context);
- }
-
- void wl_input_method::send_hide_input_panel(struct ::wl_resource *resource, struct ::wl_resource *context)
- {
- wl_input_method_send_hide_input_panel(
- resource,
- context);
- }
-
-
- wl_input_panel::wl_input_panel(struct ::wl_client *client, uint32_t id, int version)
- : m_resource_map()
- , m_resource(NULL)
- , m_global(NULL)
- , m_globalVersion(0)
- , m_displayDestroyedListener()
- {
- init(client, id, version);
- }
-
- wl_input_panel::wl_input_panel(struct ::wl_display *display, int version)
- : m_resource_map()
- , m_resource(NULL)
- , m_global(NULL)
- , m_globalVersion(0)
- , m_displayDestroyedListener()
- {
- init(display, version);
- }
-
- wl_input_panel::wl_input_panel(struct ::wl_resource *resource)
- : m_resource_map()
- , m_resource(NULL)
- , m_global(NULL)
- , m_globalVersion(0)
- , m_displayDestroyedListener()
- {
- init(resource);
- }
-
- wl_input_panel::wl_input_panel()
- : m_resource_map()
- , m_resource(NULL)
- , m_global(NULL)
- , m_globalVersion(0)
- , m_displayDestroyedListener()
- {
- }
-
- wl_input_panel::~wl_input_panel()
- {
- std::multimap<struct ::wl_client*, wl_input_panel::Resource*>::iterator it;
- for (it = m_resource_map.begin() ; it != m_resource_map.end() ; it++) {
- wl_input_panel::Resource *resource = (*it).second;
- wl_resource_set_implementation(resource->handle, NULL, NULL, NULL);
- }
-
- if (m_global) {
- wl_global_destroy(m_global);
- wl_list_remove(&m_displayDestroyedListener.link);
- }
- }
-
- void wl_input_panel::init(struct ::wl_client *client, uint32_t id, int version)
- {
- m_resource = bind(client, id, version);
- }
-
- void wl_input_panel::init(struct ::wl_resource *resource)
- {
- m_resource = bind(resource);
- }
-
- wl_input_panel::Resource *wl_input_panel::add(struct ::wl_client *client, int version)
- {
- Resource *resource = bind(client, 0, version);
- m_resource_map.insert(std::pair<struct ::wl_client*, Resource*>(client, resource));
- return resource;
- }
-
- wl_input_panel::Resource *wl_input_panel::add(struct ::wl_client *client, uint32_t id, int version)
- {
- Resource *resource = bind(client, id, version);
- m_resource_map.insert(std::pair<struct ::wl_client*, Resource*>(client, resource));
- return resource;
- }
-
- void wl_input_panel::init(struct ::wl_display *display, int version)
- {
- m_global = wl_global_create(display, &::wl_input_panel_interface, version, this, bind_func);
- m_globalVersion = version;
- m_displayDestroyedListener.notify = wl_input_panel::display_destroy_func;
- m_displayDestroyedListener.parent = this;
- wl_display_add_destroy_listener(display, &m_displayDestroyedListener);
- }
-
- const struct wl_interface *wl_input_panel::interface()
- {
- return &::wl_input_panel_interface;
- }
-
- wl_input_panel::Resource *wl_input_panel::input_panel_allocate()
- {
- return new Resource;
- }
-
- void wl_input_panel::input_panel_bind_resource(Resource *)
- {
- }
-
- void wl_input_panel::input_panel_destroy_resource(Resource *)
- {
- }
-
- void wl_input_panel::bind_func(struct ::wl_client *client, void *data, uint32_t version, uint32_t id)
- {
- wl_input_panel *that = static_cast<wl_input_panel *>(data);
- that->add(client, id, std::min(that->m_globalVersion, version));
- }
-
- void wl_input_panel::display_destroy_func(struct ::wl_listener *listener, void *data)
- {
- DS_UNUSED(data);
- wl_input_panel *that = static_cast<wl_input_panel::DisplayDestroyedListener *>(listener)->parent;
- that->m_global = NULL;
- }
-
- void wl_input_panel::destroy_func(struct ::wl_resource *client_resource)
- {
- Resource *resource = Resource::fromResource(client_resource);
- DS_ASSERT(resource);
- wl_input_panel *that = resource->input_panel_object;
- that->m_resource_map.erase(resource->client());
- that->input_panel_destroy_resource(resource);
- delete resource;
- }
-
- wl_input_panel::Resource *wl_input_panel::bind(struct ::wl_client *client, uint32_t id, int version)
- {
- DS_ASSERT_X(!wl_client_get_object(client, id), "DSWaylandObject bind", "binding to object %u more than once", id);
- struct ::wl_resource *handle = wl_resource_create(client, &::wl_input_panel_interface, version, id);
- return bind(handle);
- }
-
- wl_input_panel::Resource *wl_input_panel::bind(struct ::wl_resource *handle)
- {
- Resource *resource = input_panel_allocate();
- resource->input_panel_object = this;
-
- wl_resource_set_implementation(handle, &m_wl_input_panel_interface, resource, destroy_func);
- resource->handle = handle;
- input_panel_bind_resource(resource);
- return resource;
- }
- wl_input_panel::Resource *wl_input_panel::Resource::fromResource(struct ::wl_resource *resource)
- {
- if (DS_UNLIKELY(!resource))
- return NULL;
- if (wl_resource_instance_of(resource, &::wl_input_panel_interface, &m_wl_input_panel_interface))
- return static_cast<Resource *>(wl_resource_get_user_data(resource));
- return NULL;
- }
-
- const struct ::wl_input_panel_interface wl_input_panel::m_wl_input_panel_interface = {
- wl_input_panel::handle_get_input_panel_surface
- };
-
- void wl_input_panel::input_panel_get_input_panel_surface(Resource *, uint32_t, struct ::wl_resource *)
- {
- }
-
-
- void wl_input_panel::handle_get_input_panel_surface(
- ::wl_client *client,
- struct wl_resource *resource,
- uint32_t id,
- struct ::wl_resource *surface)
- {
- DS_UNUSED(client);
- Resource *r = Resource::fromResource(resource);
- static_cast<wl_input_panel *>(r->input_panel_object)->input_panel_get_input_panel_surface(
- r,
- id,
- surface);
- }
-
- wl_input_panel_surface::wl_input_panel_surface(struct ::wl_client *client, uint32_t id, int version)
- : m_resource_map()
- , m_resource(NULL)
- , m_global(NULL)
- , m_globalVersion(0)
- , m_displayDestroyedListener()
- {
- init(client, id, version);
- }
-
- wl_input_panel_surface::wl_input_panel_surface(struct ::wl_display *display, int version)
- : m_resource_map()
- , m_resource(NULL)
- , m_global(NULL)
- , m_globalVersion(0)
- , m_displayDestroyedListener()
- {
- init(display, version);
- }
-
- wl_input_panel_surface::wl_input_panel_surface(struct ::wl_resource *resource)
- : m_resource_map()
- , m_resource(NULL)
- , m_global(NULL)
- , m_globalVersion(0)
- , m_displayDestroyedListener()
- {
- init(resource);
- }
-
- wl_input_panel_surface::wl_input_panel_surface()
- : m_resource_map()
- , m_resource(NULL)
- , m_global(NULL)
- , m_globalVersion(0)
- , m_displayDestroyedListener()
- {
- }
-
- wl_input_panel_surface::~wl_input_panel_surface()
- {
- std::multimap<struct ::wl_client*, wl_input_panel_surface::Resource*>::iterator it;
- for (it = m_resource_map.begin() ; it != m_resource_map.end() ; it++) {
- wl_input_panel_surface::Resource *resource = (*it).second;
- wl_resource_set_implementation(resource->handle, NULL, NULL, NULL);
- }
-
- if (m_global) {
- wl_global_destroy(m_global);
- wl_list_remove(&m_displayDestroyedListener.link);
- }
- }
-
- void wl_input_panel_surface::init(struct ::wl_client *client, uint32_t id, int version)
- {
- m_resource = bind(client, id, version);
- }
-
- void wl_input_panel_surface::init(struct ::wl_resource *resource)
- {
- m_resource = bind(resource);
- }
-
- wl_input_panel_surface::Resource *wl_input_panel_surface::add(struct ::wl_client *client, int version)
- {
- Resource *resource = bind(client, 0, version);
- m_resource_map.insert(std::pair<struct ::wl_client*, Resource*>(client, resource));
- return resource;
- }
-
- wl_input_panel_surface::Resource *wl_input_panel_surface::add(struct ::wl_client *client, uint32_t id, int version)
- {
- Resource *resource = bind(client, id, version);
- m_resource_map.insert(std::pair<struct ::wl_client*, Resource*>(client, resource));
- return resource;
- }
-
- void wl_input_panel_surface::init(struct ::wl_display *display, int version)
- {
- m_global = wl_global_create(display, &::wl_input_panel_surface_interface, version, this, bind_func);
- m_globalVersion = version;
- m_displayDestroyedListener.notify = wl_input_panel_surface::display_destroy_func;
- m_displayDestroyedListener.parent = this;
- wl_display_add_destroy_listener(display, &m_displayDestroyedListener);
- }
-
- const struct wl_interface *wl_input_panel_surface::interface()
- {
- return &::wl_input_panel_surface_interface;
- }
-
- wl_input_panel_surface::Resource *wl_input_panel_surface::input_panel_surface_allocate()
- {
- return new Resource;
- }
-
- void wl_input_panel_surface::input_panel_surface_bind_resource(Resource *)
- {
- }
-
- void wl_input_panel_surface::input_panel_surface_destroy_resource(Resource *)
- {
- }
-
- void wl_input_panel_surface::bind_func(struct ::wl_client *client, void *data, uint32_t version, uint32_t id)
- {
- wl_input_panel_surface *that = static_cast<wl_input_panel_surface *>(data);
- that->add(client, id, std::min(that->m_globalVersion, version));
- }
-
- void wl_input_panel_surface::display_destroy_func(struct ::wl_listener *listener, void *data)
- {
- DS_UNUSED(data);
- wl_input_panel_surface *that = static_cast<wl_input_panel_surface::DisplayDestroyedListener *>(listener)->parent;
- that->m_global = NULL;
- }
-
- void wl_input_panel_surface::destroy_func(struct ::wl_resource *client_resource)
- {
- Resource *resource = Resource::fromResource(client_resource);
- DS_ASSERT(resource);
- wl_input_panel_surface *that = resource->input_panel_surface_object;
- that->m_resource_map.erase(resource->client());
- that->input_panel_surface_destroy_resource(resource);
- delete resource;
- }
-
- wl_input_panel_surface::Resource *wl_input_panel_surface::bind(struct ::wl_client *client, uint32_t id, int version)
- {
- DS_ASSERT_X(!wl_client_get_object(client, id), "DSWaylandObject bind", "binding to object %u more than once", id);
- struct ::wl_resource *handle = wl_resource_create(client, &::wl_input_panel_surface_interface, version, id);
- return bind(handle);
- }
-
- wl_input_panel_surface::Resource *wl_input_panel_surface::bind(struct ::wl_resource *handle)
- {
- Resource *resource = input_panel_surface_allocate();
- resource->input_panel_surface_object = this;
-
- wl_resource_set_implementation(handle, &m_wl_input_panel_surface_interface, resource, destroy_func);
- resource->handle = handle;
- input_panel_surface_bind_resource(resource);
- return resource;
- }
- wl_input_panel_surface::Resource *wl_input_panel_surface::Resource::fromResource(struct ::wl_resource *resource)
- {
- if (DS_UNLIKELY(!resource))
- return NULL;
- if (wl_resource_instance_of(resource, &::wl_input_panel_surface_interface, &m_wl_input_panel_surface_interface))
- return static_cast<Resource *>(wl_resource_get_user_data(resource));
- return NULL;
- }
-
- const struct ::wl_input_panel_surface_interface wl_input_panel_surface::m_wl_input_panel_surface_interface = {
- wl_input_panel_surface::handle_set_toplevel,
- wl_input_panel_surface::handle_set_overlay_panel,
- wl_input_panel_surface::handle_set_ready
- };
-
- void wl_input_panel_surface::input_panel_surface_set_toplevel(Resource *, struct ::wl_resource *, uint32_t )
- {
- }
-
- void wl_input_panel_surface::input_panel_surface_set_overlay_panel(Resource *)
- {
- }
-
- void wl_input_panel_surface::input_panel_surface_set_ready(Resource *, uint32_t )
- {
- }
-
-
- void wl_input_panel_surface::handle_set_toplevel(
- ::wl_client *client,
- struct wl_resource *resource,
- struct ::wl_resource *output,
- uint32_t position)
- {
- DS_UNUSED(client);
- Resource *r = Resource::fromResource(resource);
- static_cast<wl_input_panel_surface *>(r->input_panel_surface_object)->input_panel_surface_set_toplevel(
- r,
- output,
- position);
- }
-
- void wl_input_panel_surface::handle_set_overlay_panel(
- ::wl_client *client,
- struct wl_resource *resource)
- {
- DS_UNUSED(client);
- Resource *r = Resource::fromResource(resource);
- static_cast<wl_input_panel_surface *>(r->input_panel_surface_object)->input_panel_surface_set_overlay_panel(
- r);
- }
-
- void wl_input_panel_surface::handle_set_ready(
- ::wl_client *client,
- struct wl_resource *resource,
- uint32_t state)
- {
- DS_UNUSED(client);
- Resource *r = Resource::fromResource(resource);
- static_cast<wl_input_panel_surface *>(r->input_panel_surface_object)->input_panel_surface_set_ready(
- r,
- state);
- }
-
- wl_input_method_manager::wl_input_method_manager(struct ::wl_client *client, uint32_t id, int version)
- : m_resource_map()
- , m_resource(NULL)
- , m_global(NULL)
- , m_globalVersion(0)
- , m_displayDestroyedListener()
- {
- init(client, id, version);
- }
-
- wl_input_method_manager::wl_input_method_manager(struct ::wl_display *display, int version)
- : m_resource_map()
- , m_resource(NULL)
- , m_global(NULL)
- , m_globalVersion(0)
- , m_displayDestroyedListener()
- {
- init(display, version);
- }
-
- wl_input_method_manager::wl_input_method_manager(struct ::wl_resource *resource)
- : m_resource_map()
- , m_resource(NULL)
- , m_global(NULL)
- , m_globalVersion(0)
- , m_displayDestroyedListener()
- {
- init(resource);
- }
-
- wl_input_method_manager::wl_input_method_manager()
- : m_resource_map()
- , m_resource(NULL)
- , m_global(NULL)
- , m_globalVersion(0)
- , m_displayDestroyedListener()
- {
- }
-
- wl_input_method_manager::~wl_input_method_manager()
- {
- std::multimap<struct ::wl_client*, wl_input_method_manager::Resource*>::iterator it;
- for (it = m_resource_map.begin() ; it != m_resource_map.end() ; it++) {
- wl_input_method_manager::Resource *resource = (*it).second;
- wl_resource_set_implementation(resource->handle, NULL, NULL, NULL);
- }
-
- if (m_global) {
- wl_global_destroy(m_global);
- wl_list_remove(&m_displayDestroyedListener.link);
- }
- }
-
- void wl_input_method_manager::init(struct ::wl_client *client, uint32_t id, int version)
- {
- m_resource = bind(client, id, version);
- }
-
- void wl_input_method_manager::init(struct ::wl_resource *resource)
- {
- m_resource = bind(resource);
- }
-
- wl_input_method_manager::Resource *wl_input_method_manager::add(struct ::wl_client *client, int version)
- {
- Resource *resource = bind(client, 0, version);
- m_resource_map.insert(std::pair<struct ::wl_client*, Resource*>(client, resource));
- return resource;
- }
-
- wl_input_method_manager::Resource *wl_input_method_manager::add(struct ::wl_client *client, uint32_t id, int version)
- {
- Resource *resource = bind(client, id, version);
- m_resource_map.insert(std::pair<struct ::wl_client*, Resource*>(client, resource));
- return resource;
- }
-
- void wl_input_method_manager::init(struct ::wl_display *display, int version)
- {
- m_global = wl_global_create(display, &::wl_input_method_manager_interface, version, this, bind_func);
- m_globalVersion = version;
- m_displayDestroyedListener.notify = wl_input_method_manager::display_destroy_func;
- m_displayDestroyedListener.parent = this;
- wl_display_add_destroy_listener(display, &m_displayDestroyedListener);
- }
-
- const struct wl_interface *wl_input_method_manager::interface()
- {
- return &::wl_input_method_manager_interface;
- }
-
- wl_input_method_manager::Resource *wl_input_method_manager::input_method_manager_allocate()
- {
- return new Resource;
- }
-
- void wl_input_method_manager::input_method_manager_bind_resource(Resource *)
- {
- }
-
- void wl_input_method_manager::input_method_manager_destroy_resource(Resource *)
- {
- }
-
- void wl_input_method_manager::bind_func(struct ::wl_client *client, void *data, uint32_t version, uint32_t id)
- {
- wl_input_method_manager *that = static_cast<wl_input_method_manager *>(data);
- that->add(client, id, std::min(that->m_globalVersion, version));
- }
-
- void wl_input_method_manager::display_destroy_func(struct ::wl_listener *listener, void *data)
- {
- DS_UNUSED(data);
- wl_input_method_manager *that = static_cast<wl_input_method_manager::DisplayDestroyedListener *>(listener)->parent;
- that->m_global = NULL;
- }
-
- void wl_input_method_manager::destroy_func(struct ::wl_resource *client_resource)
- {
- Resource *resource = Resource::fromResource(client_resource);
- DS_ASSERT(resource);
- wl_input_method_manager *that = resource->input_method_manager_object;
- that->m_resource_map.erase(resource->client());
- that->input_method_manager_destroy_resource(resource);
- delete resource;
- }
-
- wl_input_method_manager::Resource *wl_input_method_manager::bind(struct ::wl_client *client, uint32_t id, int version)
- {
- DS_ASSERT_X(!wl_client_get_object(client, id), "DSWaylandObject bind", "binding to object %u more than once", id);
- struct ::wl_resource *handle = wl_resource_create(client, &::wl_input_method_manager_interface, version, id);
- return bind(handle);
- }
-
- wl_input_method_manager::Resource *wl_input_method_manager::bind(struct ::wl_resource *handle)
- {
- Resource *resource = input_method_manager_allocate();
- resource->input_method_manager_object = this;
-
- wl_resource_set_implementation(handle, &m_wl_input_method_manager_interface, resource, destroy_func);
- resource->handle = handle;
- input_method_manager_bind_resource(resource);
- return resource;
- }
- wl_input_method_manager::Resource *wl_input_method_manager::Resource::fromResource(struct ::wl_resource *resource)
- {
- if (DS_UNLIKELY(!resource))
- return NULL;
- if (wl_resource_instance_of(resource, &::wl_input_method_manager_interface, &m_wl_input_method_manager_interface))
- return static_cast<Resource *>(wl_resource_get_user_data(resource));
- return NULL;
- }
-
- const struct ::wl_input_method_manager_interface wl_input_method_manager::m_wl_input_method_manager_interface = {
- wl_input_method_manager::handle_set_transient_for
- };
-
- void wl_input_method_manager::input_method_manager_set_transient_for(Resource *, uint32_t , uint32_t )
- {
- }
-
-
- void wl_input_method_manager::handle_set_transient_for(
- ::wl_client *client,
- struct wl_resource *resource,
- uint32_t parent_pid,
- uint32_t child_pid)
- {
- DS_UNUSED(client);
- Resource *r = Resource::fromResource(resource);
- static_cast<wl_input_method_manager *>(r->input_method_manager_object)->input_method_manager_set_transient_for(
- r,
- parent_pid,
- child_pid);
- }
-}
-
-/*LCOV_EXCL_STOP*/
tizen_policy::handle_has_video,
tizen_policy::handle_set_appid,
tizen_policy::handle_show,
- tizen_policy::handle_hide
+ tizen_policy::handle_hide,
+ tizen_policy::handle_set_transient_for_below,
+ tizen_policy::handle_set_parent_with_below
};
void tizen_policy::tizen_policy_get_visibility(Resource *, uint32_t, struct ::wl_resource *)
{
}
+ void tizen_policy::tizen_policy_set_transient_for_below(Resource *, uint32_t , uint32_t )
+ {
+ }
+
+ void tizen_policy::tizen_policy_set_parent_with_below(Resource *, struct ::wl_resource *, struct ::wl_resource *)
+ {
+ }
+
void tizen_policy::handle_get_visibility(
::wl_client *client,
surface);
}
+ void tizen_policy::handle_set_transient_for_below(
+ ::wl_client *client,
+ struct wl_resource *resource,
+ uint32_t child_id,
+ uint32_t parent_id)
+ {
+ DS_UNUSED(client);
+ Resource *r = Resource::fromResource(resource);
+ static_cast<tizen_policy *>(r->tizen_policy_object)->tizen_policy_set_transient_for_below(
+ r,
+ child_id,
+ parent_id);
+ }
+
+ void tizen_policy::handle_set_parent_with_below(
+ ::wl_client *client,
+ struct wl_resource *resource,
+ struct ::wl_resource *child,
+ struct ::wl_resource *parent)
+ {
+ DS_UNUSED(client);
+ Resource *r = Resource::fromResource(resource);
+ static_cast<tizen_policy *>(r->tizen_policy_object)->tizen_policy_set_parent_with_below(
+ r,
+ child,
+ parent);
+ }
+
void tizen_policy::send_conformant(struct ::wl_resource *surface, uint32_t is_conformant)
{
DS_ASSERT_X(m_resource, "tizen_policy::conformant", "Uninitialised resource");
}
+ void tizen_policy::send_interactive_move_done(struct ::wl_resource *surface, int32_t x, int32_t y, uint32_t w, uint32_t h)
+ {
+ DS_ASSERT_X(m_resource, "tizen_policy::interactive_move_done", "Uninitialised resource");
+ if (DS_UNLIKELY(!m_resource)) {
+ WRN("could not call tizen_policy::interactive_move_done as it's not initialised");
+ return;
+ }
+ send_interactive_move_done(
+ m_resource->handle,
+ surface,
+ x,
+ y,
+ w,
+ h);
+ }
+
+ void tizen_policy::send_interactive_move_done(struct ::wl_resource *resource, struct ::wl_resource *surface, int32_t x, int32_t y, uint32_t w, uint32_t h)
+ {
+ tizen_policy_send_interactive_move_done(
+ resource,
+ surface,
+ x,
+ y,
+ w,
+ h);
+ }
+
+
+ void tizen_policy::send_interactive_resize_done(struct ::wl_resource *surface, int32_t x, int32_t y, uint32_t w, uint32_t h)
+ {
+ DS_ASSERT_X(m_resource, "tizen_policy::interactive_resize_done", "Uninitialised resource");
+ if (DS_UNLIKELY(!m_resource)) {
+ WRN("could not call tizen_policy::interactive_resize_done as it's not initialised");
+ return;
+ }
+ send_interactive_resize_done(
+ m_resource->handle,
+ surface,
+ x,
+ y,
+ w,
+ h);
+ }
+
+ void tizen_policy::send_interactive_resize_done(struct ::wl_resource *resource, struct ::wl_resource *surface, int32_t x, int32_t y, uint32_t w, uint32_t h)
+ {
+ tizen_policy_send_interactive_resize_done(
+ resource,
+ surface,
+ x,
+ y,
+ w,
+ h);
+ }
+
+
tizen_visibility::tizen_visibility(struct ::wl_client *client, uint32_t id, int version)
: m_resource_map()
, m_resource(NULL)
tizen_screenmirror::handle_queue,
tizen_screenmirror::handle_dequeue,
tizen_screenmirror::handle_start,
- tizen_screenmirror::handle_stop
+ tizen_screenmirror::handle_stop,
+ tizen_screenmirror::handle_set_auto_rotation
};
void tizen_screenmirror::tizen_screenmirror_destroy(Resource *)
{
}
+ void tizen_screenmirror::tizen_screenmirror_set_auto_rotation(Resource *, uint32_t )
+ {
+ }
+
void tizen_screenmirror::handle_destroy(
::wl_client *client,
r);
}
+ void tizen_screenmirror::handle_set_auto_rotation(
+ ::wl_client *client,
+ struct wl_resource *resource,
+ uint32_t set)
+ {
+ DS_UNUSED(client);
+ Resource *r = Resource::fromResource(resource);
+ static_cast<tizen_screenmirror *>(r->tizen_screenmirror_object)->tizen_screenmirror_set_auto_rotation(
+ r,
+ set);
+ }
+
void tizen_screenmirror::send_dequeued(struct ::wl_resource *buffer)
{
DS_ASSERT_X(m_resource, "tizen_screenmirror::dequeued", "Uninitialised resource");
}
}
-/*LCOV_EXCL_STOP*/
+/*LCOV_EXCL_STOP*/
\ No newline at end of file
void send_aux_message(struct ::wl_resource *resource, struct ::wl_resource *surface, const std::string &key, const std::string &value, struct ::wl_array *options);
void send_conformant_region(struct ::wl_resource *surface, uint32_t conformant_part, uint32_t state, int32_t x, int32_t y, int32_t w, int32_t h, uint32_t serial);
void send_conformant_region(struct ::wl_resource *resource, struct ::wl_resource *surface, uint32_t conformant_part, uint32_t state, int32_t x, int32_t y, int32_t w, int32_t h, uint32_t serial);
+ void send_interactive_move_done(struct ::wl_resource *surface, int32_t x, int32_t y, uint32_t w, uint32_t h);
+ void send_interactive_move_done(struct ::wl_resource *resource, struct ::wl_resource *surface, int32_t x, int32_t y, uint32_t w, uint32_t h);
+ void send_interactive_resize_done(struct ::wl_resource *surface, int32_t x, int32_t y, uint32_t w, uint32_t h);
+ void send_interactive_resize_done(struct ::wl_resource *resource, struct ::wl_resource *surface, int32_t x, int32_t y, uint32_t w, uint32_t h);
protected:
virtual Resource *tizen_policy_allocate();
virtual void tizen_policy_set_appid(Resource *resource, int32_t pid, const std::string &appid);
virtual void tizen_policy_show(Resource *resource, struct ::wl_resource *surface);
virtual void tizen_policy_hide(Resource *resource, struct ::wl_resource *surface);
+ virtual void tizen_policy_set_transient_for_below(Resource *resource, uint32_t child_id, uint32_t parent_id);
+ virtual void tizen_policy_set_parent_with_below(Resource *resource, struct ::wl_resource *child, struct ::wl_resource *parent);
private:
static void bind_func(struct ::wl_client *client, void *data, uint32_t version, uint32_t id);
::wl_client *client,
struct wl_resource *resource,
struct ::wl_resource *surface);
+ static void handle_set_transient_for_below(
+ ::wl_client *client,
+ struct wl_resource *resource,
+ uint32_t child_id,
+ uint32_t parent_id);
+ static void handle_set_parent_with_below(
+ ::wl_client *client,
+ struct wl_resource *resource,
+ struct ::wl_resource *child,
+ struct ::wl_resource *parent);
std::multimap<struct ::wl_client*, Resource*> m_resource_map;
Resource *m_resource;
virtual void tizen_screenmirror_dequeue(Resource *resource, struct ::wl_resource *buffer);
virtual void tizen_screenmirror_start(Resource *resource);
virtual void tizen_screenmirror_stop(Resource *resource);
+ virtual void tizen_screenmirror_set_auto_rotation(Resource *resource, uint32_t set);
private:
static void bind_func(struct ::wl_client *client, void *data, uint32_t version, uint32_t id);
static void handle_stop(
::wl_client *client,
struct wl_resource *resource);
+ static void handle_set_auto_rotation(
+ ::wl_client *client,
+ struct wl_resource *resource,
+ uint32_t set);
std::multimap<struct ::wl_client*, Resource*> m_resource_map;
Resource *m_resource;
}
/*LCOV_EXCL_STOP*/
-#endif
+#endif
\ No newline at end of file
const struct ::tizen_hwc_interface tizen_hwc::m_tizen_hwc_interface = {
tizen_hwc::handle_destroy,
- tizen_hwc::handle_commit_feedback
+ tizen_hwc::handle_create_commit_feedback
};
void tizen_hwc::tizen_hwc_destroy(Resource *)
{
}
- void tizen_hwc::tizen_hwc_commit_feedback(Resource *, struct ::wl_resource *, uint32_t, uint32_t )
+ void tizen_hwc::tizen_hwc_create_commit_feedback(Resource *, struct ::wl_resource *, uint32_t, uint32_t )
{
}
r);
}
- void tizen_hwc::handle_commit_feedback(
+ void tizen_hwc::handle_create_commit_feedback(
::wl_client *client,
struct wl_resource *resource,
struct ::wl_resource *surface,
{
DS_UNUSED(client);
Resource *r = Resource::fromResource(resource);
- static_cast<tizen_hwc *>(r->tizen_hwc_object)->tizen_hwc_commit_feedback(
+ static_cast<tizen_hwc *>(r->tizen_hwc_object)->tizen_hwc_create_commit_feedback(
r,
surface,
id,
}
-/*LCOV_EXCL_STOP*/
+/*LCOV_EXCL_STOP*/
\ No newline at end of file
virtual void tizen_hwc_destroy_resource(Resource *resource);
virtual void tizen_hwc_destroy(Resource *resource);
- virtual void tizen_hwc_commit_feedback(Resource *resource, struct ::wl_resource *surface, uint32_t id, uint32_t serial);
+ virtual void tizen_hwc_create_commit_feedback(Resource *resource, struct ::wl_resource *surface, uint32_t id, uint32_t serial);
private:
static void bind_func(struct ::wl_client *client, void *data, uint32_t version, uint32_t id);
static void handle_destroy(
::wl_client *client,
struct wl_resource *resource);
- static void handle_commit_feedback(
+ static void handle_create_commit_feedback(
::wl_client *client,
struct wl_resource *resource,
struct ::wl_resource *surface,
}
#endif
-/*LCOV_EXCL_STOP*/
+/*LCOV_EXCL_STOP*/
\ No newline at end of file
'DSWaylandServer/dswayland-server-text.h',
'DSWaylandServer/dswayland-server-tizen-launch.cpp',
'DSWaylandServer/dswayland-server-tizen-launch.h',
- 'DSWaylandServer/dswayland-server-input-method.cpp',
- 'DSWaylandServer/dswayland-server-input-method.h',
+ 'DSWaylandServer/dswayland-server-input-method-unstable-v1.cpp',
+ 'DSWaylandServer/dswayland-server-input-method-unstable-v1.h',
'DSWaylandServer/dswayland-server-tizen-policy-ext.cpp',
'DSWaylandServer/dswayland-server-tizen-policy-ext.h',
'DSWaylandServer/DSWaylandCallback.cpp',