summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDerek Foreman <derekf@osg.samsung.com>2017-01-18 10:52:45 -0600
committerDerek Foreman <derekf@osg.samsung.com>2017-01-18 13:21:01 -0600
commit05124250c51212a1e48900a8156e643636e763c6 (patch)
tree3115dd1714c7c7815a23172c04a0e54b02716286
parentf162f47297db9c6191a54aa9540ddb4801ec07d7 (diff)
downloadefl-05124250c51212a1e48900a8156e643636e763c6.tar.gz
ecore_imf/wayland: Auto generate wayland text-input protocol
Needed to do some fairly invasive changes because naming conventions changed since we checked in the header. Also, since I'm done converting protocol, change the gitignore to use wildcards for wayland protocol. This fixes a long standing bug in text-input binding and restores previous OSK behaviour.
-rw-r--r--.gitignore16
-rw-r--r--src/Makefile_Ecore_IMF.am10
-rw-r--r--src/modules/ecore_imf/wayland/text-client-protocol.h540
-rw-r--r--src/modules/ecore_imf/wayland/text-protocol.c94
-rw-r--r--src/modules/ecore_imf/wayland/wayland_imcontext.c132
-rw-r--r--src/modules/ecore_imf/wayland/wayland_imcontext.h4
-rw-r--r--src/modules/ecore_imf/wayland/wayland_module.c8
7 files changed, 83 insertions, 721 deletions
diff --git a/.gitignore b/.gitignore
index 445848295a..ac86fdc280 100644
--- a/.gitignore
+++ b/.gitignore
@@ -78,16 +78,6 @@ Session.vim
/src/scripts/eo/eo_debug
/src/bin/ecore_con/efl_net_proxy_helper
-#Once all protocols are generated these will use wildcards
-/src/lib/ecore_wl2/www-client-protocol.h
-/src/lib/ecore_wl2/www-protocol.c
-/src/lib/ecore_wl2/teamwork-client-protocol.h
-/src/lib/ecore_wl2/teamwork-protocol.c
-/src/lib/ecore_wl2/linux-dmabuf-unstable-v1-client-protocol.h
-/src/lib/ecore_wl2/linux-dmabuf-unstable-v1-protocol.c
-/src/lib/ecore_wl2/xdg-shell-unstable-v5-client-protocol.h
-/src/lib/ecore_wl2/xdg-shell-unstable-v5-protocol.c
-/src/lib/ecore_wl2/xdg-shell-unstable-v6-client-protocol.h
-/src/lib/ecore_wl2/xdg-shell-unstable-v6-protocol.c
-/src/lib/ecore_wl2/session-recovery-client-protocol.h
-/src/lib/ecore_wl2/session-recovery-protocol.c
+#wayland generated protocol - some legacy headers will be ignored
+*-protocol.h
+*-protocol.c
diff --git a/src/Makefile_Ecore_IMF.am b/src/Makefile_Ecore_IMF.am
index 87d0f63fab..5a07d609b9 100644
--- a/src/Makefile_Ecore_IMF.am
+++ b/src/Makefile_Ecore_IMF.am
@@ -134,9 +134,15 @@ modules_ecore_imf_wayland_module_la_SOURCES = \
modules/ecore_imf/wayland/wayland_module.c \
modules/ecore_imf/wayland/wayland_imcontext.c \
modules/ecore_imf/wayland/wayland_imcontext.h \
-modules/ecore_imf/wayland/text-client-protocol.h \
-modules/ecore_imf/wayland/text-protocol.c
+modules/ecore_imf/wayland/text-input-unstable-v1-client-protocol.h \
+modules/ecore_imf/wayland/text-input-unstable-v1-protocol.c
+
+BUILT_SOURCES += \
+modules/ecore_imf/wayland/text-input-unstable-v1-client-protocol.h \
+modules/ecore_imf/wayland/text-input-unstable-v1-protocol.c
+
modules_ecore_imf_wayland_module_la_CPPFLAGS = -I$(top_builddir)/src/lib/efl \
+-I$(top_builddir)/src/modules/ecore_imf/wayland \
@ECORE_IMF_CFLAGS@ \
@ECORE_EVAS_CFLAGS@ \
@ECORE_WL2_CFLAGS@
diff --git a/src/modules/ecore_imf/wayland/text-client-protocol.h b/src/modules/ecore_imf/wayland/text-client-protocol.h
deleted file mode 100644
index bcad325fce..0000000000
--- a/src/modules/ecore_imf/wayland/text-client-protocol.h
+++ /dev/null
@@ -1,540 +0,0 @@
-/*
- * Copyright © 2012, 2013 Intel Corporation
- *
- * Permission to use, copy, modify, distribute, and sell this
- * software and its documentation for any purpose is hereby granted
- * without fee, provided that the above copyright notice appear in
- * all copies and that both that copyright notice and this permission
- * notice appear in supporting documentation, and that the name of
- * the copyright holders not be used in advertising or publicity
- * pertaining to distribution of the software without specific,
- * written prior permission. The copyright holders make no
- * representations about the suitability of this software for any
- * purpose. It is provided "as is" without express or implied
- * warranty.
- *
- * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS
- * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
- * FITNESS, IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY
- * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
- * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
- * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
- * THIS SOFTWARE.
- */
-
-#ifndef TEXT_CLIENT_PROTOCOL_H
-#define TEXT_CLIENT_PROTOCOL_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <stdint.h>
-#include <stddef.h>
-#include "wayland-client.h"
-
-struct wl_client;
-struct wl_resource;
-
-struct wl_text_input;
-struct wl_text_input_manager;
-
-extern const struct wl_interface wl_text_input_interface;
-extern const struct wl_interface wl_text_input_manager_interface;
-
-#ifndef WL_TEXT_INPUT_CONTENT_HINT_ENUM
-#define WL_TEXT_INPUT_CONTENT_HINT_ENUM
-/**
- * wl_text_input_content_hint - content hint
- * @WL_TEXT_INPUT_CONTENT_HINT_NONE: no special behaviour
- * @WL_TEXT_INPUT_CONTENT_HINT_DEFAULT: auto completion, correction and
- * capitalization
- * @WL_TEXT_INPUT_CONTENT_HINT_PASSWORD: hidden and sensitive text
- * @WL_TEXT_INPUT_CONTENT_HINT_AUTO_COMPLETION: suggest word completions
- * @WL_TEXT_INPUT_CONTENT_HINT_AUTO_CORRECTION: suggest word corrections
- * @WL_TEXT_INPUT_CONTENT_HINT_AUTO_CAPITALIZATION: switch to uppercase
- * letters at the start of a sentence
- * @WL_TEXT_INPUT_CONTENT_HINT_LOWERCASE: prefer lowercase letters
- * @WL_TEXT_INPUT_CONTENT_HINT_UPPERCASE: prefer uppercase letters
- * @WL_TEXT_INPUT_CONTENT_HINT_TITLECASE: prefer casing for titles and
- * headings (can be language dependent)
- * @WL_TEXT_INPUT_CONTENT_HINT_HIDDEN_TEXT: characters should be hidden
- * @WL_TEXT_INPUT_CONTENT_HINT_SENSITIVE_DATA: typed text should not be
- * stored
- * @WL_TEXT_INPUT_CONTENT_HINT_LATIN: just latin characters should be
- * entered
- * @WL_TEXT_INPUT_CONTENT_HINT_MULTILINE: the text input is multiline
- *
- * Content hint is a bitmask to allow to modify the behavior of the text
- * input.
- */
-enum wl_text_input_content_hint
-{
- WL_TEXT_INPUT_CONTENT_HINT_NONE = 0x0,
- WL_TEXT_INPUT_CONTENT_HINT_DEFAULT = 0x7,
- WL_TEXT_INPUT_CONTENT_HINT_PASSWORD = 0xc0,
- WL_TEXT_INPUT_CONTENT_HINT_AUTO_COMPLETION = 0x1,
- WL_TEXT_INPUT_CONTENT_HINT_AUTO_CORRECTION = 0x2,
- WL_TEXT_INPUT_CONTENT_HINT_AUTO_CAPITALIZATION = 0x4,
- WL_TEXT_INPUT_CONTENT_HINT_LOWERCASE = 0x8,
- WL_TEXT_INPUT_CONTENT_HINT_UPPERCASE = 0x10,
- WL_TEXT_INPUT_CONTENT_HINT_TITLECASE = 0x20,
- WL_TEXT_INPUT_CONTENT_HINT_HIDDEN_TEXT = 0x40,
- WL_TEXT_INPUT_CONTENT_HINT_SENSITIVE_DATA = 0x80,
- WL_TEXT_INPUT_CONTENT_HINT_LATIN = 0x100,
- WL_TEXT_INPUT_CONTENT_HINT_MULTILINE = 0x200,
-};
-#endif /* WL_TEXT_INPUT_CONTENT_HINT_ENUM */
-
-#ifndef WL_TEXT_INPUT_CONTENT_PURPOSE_ENUM
-#define WL_TEXT_INPUT_CONTENT_PURPOSE_ENUM
-/**
- * wl_text_input_content_purpose - content purpose
- * @WL_TEXT_INPUT_CONTENT_PURPOSE_NORMAL: default input, allowing all
- * characters
- * @WL_TEXT_INPUT_CONTENT_PURPOSE_ALPHA: allow only alphabetic characters
- * @WL_TEXT_INPUT_CONTENT_PURPOSE_DIGITS: allow only digits
- * @WL_TEXT_INPUT_CONTENT_PURPOSE_NUMBER: input a number (including
- * decimal separator and sign)
- * @WL_TEXT_INPUT_CONTENT_PURPOSE_PHONE: input a phone number
- * @WL_TEXT_INPUT_CONTENT_PURPOSE_URL: input an URL
- * @WL_TEXT_INPUT_CONTENT_PURPOSE_EMAIL: input an email address
- * @WL_TEXT_INPUT_CONTENT_PURPOSE_NAME: input a name of a person
- * @WL_TEXT_INPUT_CONTENT_PURPOSE_PASSWORD: input a password (combine
- * with password or sensitive_data hint)
- * @WL_TEXT_INPUT_CONTENT_PURPOSE_DATE: input a date
- * @WL_TEXT_INPUT_CONTENT_PURPOSE_TIME: input a time
- * @WL_TEXT_INPUT_CONTENT_PURPOSE_DATETIME: input a date and time
- * @WL_TEXT_INPUT_CONTENT_PURPOSE_TERMINAL: input for a terminal
- *
- * The content purpose allows to specify the primary purpose of a text
- * input.
- *
- * This allows an input method to show special purpose input panels with
- * extra characters or to disallow some characters.
- */
-enum wl_text_input_content_purpose
-{
- WL_TEXT_INPUT_CONTENT_PURPOSE_NORMAL = 0,
- WL_TEXT_INPUT_CONTENT_PURPOSE_ALPHA = 1,
- WL_TEXT_INPUT_CONTENT_PURPOSE_DIGITS = 2,
- WL_TEXT_INPUT_CONTENT_PURPOSE_NUMBER = 3,
- WL_TEXT_INPUT_CONTENT_PURPOSE_PHONE = 4,
- WL_TEXT_INPUT_CONTENT_PURPOSE_URL = 5,
- WL_TEXT_INPUT_CONTENT_PURPOSE_EMAIL = 6,
- WL_TEXT_INPUT_CONTENT_PURPOSE_NAME = 7,
- WL_TEXT_INPUT_CONTENT_PURPOSE_PASSWORD = 8,
- WL_TEXT_INPUT_CONTENT_PURPOSE_DATE = 9,
- WL_TEXT_INPUT_CONTENT_PURPOSE_TIME = 10,
- WL_TEXT_INPUT_CONTENT_PURPOSE_DATETIME = 11,
- WL_TEXT_INPUT_CONTENT_PURPOSE_TERMINAL = 12,
-};
-#endif /* WL_TEXT_INPUT_CONTENT_PURPOSE_ENUM */
-
-#ifndef WL_TEXT_INPUT_PREEDIT_STYLE_ENUM
-#define WL_TEXT_INPUT_PREEDIT_STYLE_ENUM
-enum wl_text_input_preedit_style
-{
- WL_TEXT_INPUT_PREEDIT_STYLE_DEFAULT = 0,
- WL_TEXT_INPUT_PREEDIT_STYLE_NONE = 1,
- WL_TEXT_INPUT_PREEDIT_STYLE_ACTIVE = 2,
- WL_TEXT_INPUT_PREEDIT_STYLE_INACTIVE = 3,
- WL_TEXT_INPUT_PREEDIT_STYLE_HIGHLIGHT = 4,
- WL_TEXT_INPUT_PREEDIT_STYLE_UNDERLINE = 5,
- WL_TEXT_INPUT_PREEDIT_STYLE_SELECTION = 6,
- WL_TEXT_INPUT_PREEDIT_STYLE_INCORRECT = 7,
-};
-#endif /* WL_TEXT_INPUT_PREEDIT_STYLE_ENUM */
-
-#ifndef WL_TEXT_INPUT_TEXT_DIRECTION_ENUM
-#define WL_TEXT_INPUT_TEXT_DIRECTION_ENUM
-enum wl_text_input_text_direction
-{
- WL_TEXT_INPUT_TEXT_DIRECTION_AUTO = 0,
- WL_TEXT_INPUT_TEXT_DIRECTION_LTR = 1,
- WL_TEXT_INPUT_TEXT_DIRECTION_RTL = 2,
-};
-#endif /* WL_TEXT_INPUT_TEXT_DIRECTION_ENUM */
-
-/**
- * wl_text_input - text input
- * @enter: enter event
- * @leave: leave event
- * @modifiers_map: modifiers map
- * @input_panel_state: state of the input panel
- * @preedit_string: pre-edit
- * @preedit_styling: pre-edit styling
- * @preedit_cursor: pre-edit cursor
- * @commit_string: commit
- * @cursor_position: set cursor to new position
- * @delete_surrounding_text: delete surrounding text
- * @keysym: keysym
- * @language: language
- * @text_direction: text direction
- *
- * An object used for text input. Adds support for text input and input
- * methods to applications. A text-input object is created from a
- * wl_text_input_manager and corresponds typically to a text entry in an
- * application. Requests are used to activate/deactivate the text-input
- * object and set state information like surrounding and selected text or
- * the content type. The information about entered text is sent to the
- * text-input object via the pre-edit and commit events. Using this
- * interface removes the need for applications to directly process hardware
- * key events and compose text out of them.
- *
- * Text is generally UTF-8 encoded, indices and lengths are in Unicode
- * characters.
- *
- * Serials are used to synchronize the state between the text input and an
- * input method. New serials are sent by the text input in the commit_state
- * request and are used by the input method to indicate the known text
- * input state in events like preedit_string, commit_string, and keysym.
- * The text input can then ignore events from the input method which are
- * based on an outdated state (for example after a reset).
- */
-struct wl_text_input_listener
-{
- /**
- * enter - enter event
- * @surface: (none)
- *
- * Notify the text-input object when it received focus. Typically
- * in response to an activate request.
- */
- void (*enter)(void *data, struct wl_text_input *wl_text_input, struct wl_surface *surface);
-
- /**
- * leave - leave event
- *
- * Notify the text-input object when it lost focus. Either in
- * response to a deactivate request or when the assigned surface
- * lost focus or was destroyed.
- */
- void (*leave)(void *data, struct wl_text_input *wl_text_input);
-
- /**
- * modifiers_map - modifiers map
- * @map: (none)
- *
- * Transfer an array of 0-terminated modifiers names. The
- * position in the array is the index of the modifier as used in
- * the modifiers bitmask in the keysym event.
- */
- void (*modifiers_map)(void *data, struct wl_text_input *wl_text_input, struct wl_array *map);
-
- /**
- * input_panel_state - state of the input panel
- * @state: (none)
- *
- * Notify when the visibility state of the input panel changed.
- */
- void (*input_panel_state)(void *data, struct wl_text_input *wl_text_input, uint32_t state);
-
- /**
- * preedit_string - pre-edit
- * @serial: serial of the latest known text input state
- * @text: (none)
- * @commit: (none)
- *
- * Notify when a new composing text (pre-edit) should be set
- * around the current cursor position. Any previously set composing
- * text should be removed.
- *
- * The commit text can be used to replace the preedit text on reset
- * (for example on unfocus).
- *
- * The text input should also handle all preedit_style and
- * preedit_cursor events occuring directly before preedit_string.
- */
- void (*preedit_string)(void *data, struct wl_text_input *wl_text_input, uint32_t serial, const char *text, const char *commit);
-
- /**
- * preedit_styling - pre-edit styling
- * @index: (none)
- * @length: (none)
- * @style: (none)
- *
- * Sets styling information on composing text. The style is
- * applied for length Unicode characters from index relative to the
- * beginning of the composing text (as Unicode character offset).
- * Multiple styles can be applied to a composing text by sending
- * multiple preedit_styling events.
- *
- * This event is handled as part of a following preedit_string
- * event.
- */
- void (*preedit_styling)(void *data, struct wl_text_input *wl_text_input, uint32_t index, uint32_t length, uint32_t style);
-
- /**
- * preedit_cursor - pre-edit cursor
- * @index: (none)
- *
- * Sets the cursor position inside the composing text (as Unicode
- * character offset) relative to the start of the composing text.
- * When index is a negative number no cursor is shown.
- *
- * This event is handled as part of a following preedit_string
- * event.
- */
- void (*preedit_cursor)(void *data, struct wl_text_input *wl_text_input, int32_t index);
-
- /**
- * commit_string - commit
- * @serial: serial of the latest known text input state
- * @text: (none)
- *
- * Notify when text should be inserted into the editor widget.
- * The text to commit could be either just a single character after
- * a key press or the result of some composing (pre-edit). It could
- * be also an empty text when some text should be removed (see
- * delete_surrounding_text) or when the input cursor should be
- * moved (see cursor_position).
- *
- * Any previously set composing text should be removed.
- */
- void (*commit_string)(void *data, struct wl_text_input *wl_text_input, uint32_t serial, const char *text);
-
- /**
- * cursor_position - set cursor to new position
- * @index: (none)
- * @anchor: (none)
- *
- * Notify when the cursor or anchor position should be modified.
- *
- * This event should be handled as part of a following
- * commit_string event.
- */
- void (*cursor_position)(void *data, struct wl_text_input *wl_text_input, int32_t index, int32_t anchor);
-
- /**
- * delete_surrounding_text - delete surrounding text
- * @index: (none)
- * @length: (none)
- *
- * Notify when the text around the current cursor position should
- * be deleted.
- *
- * Index is relative to the current cursor (in Unicode characters).
- * Length is the length of deleted text (in Unicode characters).
- *
- * This event should be handled as part of a following
- * commit_string event.
- */
- void (*delete_surrounding_text)(void *data, struct wl_text_input *wl_text_input, int32_t index, uint32_t length);
-
- /**
- * keysym - keysym
- * @serial: serial of the latest known text input state
- * @time: (none)
- * @sym: (none)
- * @state: (none)
- * @modifiers: (none)
- *
- * Notify when a key event was sent. Key events should not be
- * used for normal text input operations, which should be done with
- * commit_string, delete_surrounding_text, etc. The key event
- * follows the wl_keyboard key event convention. Sym is a XKB
- * keysym, state a wl_keyboard key_state. Modifiers are a mask for
- * effective modifiers (where the modifier indices are set by the
- * modifiers_map event)
- */
- void (*keysym)(void *data, struct wl_text_input *wl_text_input, uint32_t serial, uint32_t time, uint32_t sym, uint32_t state, uint32_t modifiers);
-
- /**
- * language - language
- * @serial: serial of the latest known text input state
- * @language: (none)
- *
- * Sets the language of the input text. The "language" argument
- * is a RFC-3066 format language tag.
- */
- void (*language)(void *data, struct wl_text_input *wl_text_input, uint32_t serial, const char *language);
-
- /**
- * text_direction - text direction
- * @serial: serial of the latest known text input state
- * @direction: (none)
- *
- * Sets the text direction of input text.
- *
- * It is mainly needed for showing input cursor on correct side of
- * the editor when there is no input yet done and making sure
- * neutral direction text is laid out properly.
- */
- void (*text_direction)(void *data, struct wl_text_input *wl_text_input, uint32_t serial, uint32_t direction);
-};
-
-static inline int
-wl_text_input_add_listener(struct wl_text_input *wl_text_input, const struct wl_text_input_listener *listener, void *data)
-{
- return wl_proxy_add_listener((struct wl_proxy *) wl_text_input,
- (void (**)(void)) listener, data);
-}
-
-#define WL_TEXT_INPUT_ACTIVATE 0
-#define WL_TEXT_INPUT_DEACTIVATE 1
-#define WL_TEXT_INPUT_SHOW_INPUT_PANEL 2
-#define WL_TEXT_INPUT_HIDE_INPUT_PANEL 3
-#define WL_TEXT_INPUT_RESET 4
-#define WL_TEXT_INPUT_SET_SURROUNDING_TEXT 5
-#define WL_TEXT_INPUT_SET_CONTENT_TYPE 6
-#define WL_TEXT_INPUT_SET_CURSOR_RECTANGLE 7
-#define WL_TEXT_INPUT_SET_PREFERRED_LANGUAGE 8
-#define WL_TEXT_INPUT_COMMIT_STATE 9
-#define WL_TEXT_INPUT_INVOKE_ACTION 10
-
-static inline void
-wl_text_input_set_user_data(struct wl_text_input *wl_text_input, void *user_data)
-{
- if (!wl_text_input) return;
- wl_proxy_set_user_data((struct wl_proxy *) wl_text_input, user_data);
-}
-
-static inline void *
-wl_text_input_get_user_data(struct wl_text_input *wl_text_input)
-{
- if (!wl_text_input) return NULL;
- return wl_proxy_get_user_data((struct wl_proxy *) wl_text_input);
-}
-
-static inline void
-wl_text_input_destroy(struct wl_text_input *wl_text_input)
-{
- if (!wl_text_input) return;
- wl_proxy_destroy((struct wl_proxy *) wl_text_input);
-}
-
-static inline void
-wl_text_input_activate(struct wl_text_input *wl_text_input, struct wl_seat *seat, struct wl_surface *surface)
-{
- if (!wl_text_input) return;
- wl_proxy_marshal((struct wl_proxy *) wl_text_input,
- WL_TEXT_INPUT_ACTIVATE, seat, surface);
-}
-
-static inline void
-wl_text_input_deactivate(struct wl_text_input *wl_text_input, struct wl_seat *seat)
-{
- if (!wl_text_input) return;
- wl_proxy_marshal((struct wl_proxy *) wl_text_input,
- WL_TEXT_INPUT_DEACTIVATE, seat);
-}
-
-static inline void
-wl_text_input_show_input_panel(struct wl_text_input *wl_text_input)
-{
- if (!wl_text_input) return;
- wl_proxy_marshal((struct wl_proxy *) wl_text_input,
- WL_TEXT_INPUT_SHOW_INPUT_PANEL);
-}
-
-static inline void
-wl_text_input_hide_input_panel(struct wl_text_input *wl_text_input)
-{
- if (!wl_text_input) return;
- wl_proxy_marshal((struct wl_proxy *) wl_text_input,
- WL_TEXT_INPUT_HIDE_INPUT_PANEL);
-}
-
-static inline void
-wl_text_input_reset(struct wl_text_input *wl_text_input)
-{
- if (!wl_text_input) return;
- wl_proxy_marshal((struct wl_proxy *) wl_text_input, WL_TEXT_INPUT_RESET);
-}
-
-static inline void
-wl_text_input_set_surrounding_text(struct wl_text_input *wl_text_input, const char *text, uint32_t cursor, uint32_t anchor)
-{
- if (!wl_text_input) return;
- wl_proxy_marshal((struct wl_proxy *) wl_text_input,
- WL_TEXT_INPUT_SET_SURROUNDING_TEXT, text, cursor, anchor);
-}
-
-static inline void
-wl_text_input_set_content_type(struct wl_text_input *wl_text_input, uint32_t hint, uint32_t purpose)
-{
- if (!wl_text_input) return;
- wl_proxy_marshal((struct wl_proxy *) wl_text_input,
- WL_TEXT_INPUT_SET_CONTENT_TYPE, hint, purpose);
-}
-
-static inline void
-wl_text_input_set_cursor_rectangle(struct wl_text_input *wl_text_input, int32_t x, int32_t y, int32_t width, int32_t height)
-{
- if (!wl_text_input) return;
- wl_proxy_marshal((struct wl_proxy *) wl_text_input,
- WL_TEXT_INPUT_SET_CURSOR_RECTANGLE, x, y, width, height);
-}
-
-static inline void
-wl_text_input_set_preferred_language(struct wl_text_input *wl_text_input, const char *language)
-{
- if (!wl_text_input) return;
- wl_proxy_marshal((struct wl_proxy *) wl_text_input,
- WL_TEXT_INPUT_SET_PREFERRED_LANGUAGE, language);
-}
-
-static inline void
-wl_text_input_commit_state(struct wl_text_input *wl_text_input, uint32_t serial)
-{
- if (!wl_text_input) return;
- wl_proxy_marshal((struct wl_proxy *) wl_text_input,
- WL_TEXT_INPUT_COMMIT_STATE, serial);
-}
-
-static inline void
-wl_text_input_invoke_action(struct wl_text_input *wl_text_input, uint32_t button, uint32_t index)
-{
- if (!wl_text_input) return;
- wl_proxy_marshal((struct wl_proxy *) wl_text_input,
- WL_TEXT_INPUT_INVOKE_ACTION, button, index);
-}
-
-#define WL_TEXT_INPUT_MANAGER_CREATE_TEXT_INPUT 0
-
-static inline void
-wl_text_input_manager_set_user_data(struct wl_text_input_manager *wl_text_input_manager, void *user_data)
-{
- if (!wl_text_input_manager) return;
- wl_proxy_set_user_data((struct wl_proxy *) wl_text_input_manager,
- user_data);
-}
-
-static inline void *
-wl_text_input_manager_get_user_data(struct wl_text_input_manager *wl_text_input_manager)
-{
- if (!wl_text_input_manager) return NULL;
- return wl_proxy_get_user_data((struct wl_proxy *) wl_text_input_manager);
-}
-
-static inline void
-wl_text_input_manager_destroy(struct wl_text_input_manager *wl_text_input_manager)
-{
- if (!wl_text_input_manager) return;
- wl_proxy_destroy((struct wl_proxy *) wl_text_input_manager);
-}
-
-static inline struct wl_text_input *
-wl_text_input_manager_create_text_input(struct wl_text_input_manager *wl_text_input_manager)
-{
- struct wl_proxy *id;
-
- if (!wl_text_input_manager) return NULL;
-
- id = wl_proxy_create((struct wl_proxy *) wl_text_input_manager,
- &wl_text_input_interface);
- if (!id) return NULL;
-
- wl_proxy_marshal((struct wl_proxy *) wl_text_input_manager,
- WL_TEXT_INPUT_MANAGER_CREATE_TEXT_INPUT, id);
-
- return (struct wl_text_input *) id;
-}
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/src/modules/ecore_imf/wayland/text-protocol.c b/src/modules/ecore_imf/wayland/text-protocol.c
deleted file mode 100644
index af549d5866..0000000000
--- a/src/modules/ecore_imf/wayland/text-protocol.c
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
- * Copyright © 2012, 2013 Intel Corporation
- *
- * Permission to use, copy, modify, distribute, and sell this
- * software and its documentation for any purpose is hereby granted
- * without fee, provided that the above copyright notice appear in
- * all copies and that both that copyright notice and this permission
- * notice appear in supporting documentation, and that the name of
- * the copyright holders not be used in advertising or publicity
- * pertaining to distribution of the software without specific,
- * written prior permission. The copyright holders make no
- * representations about the suitability of this software for any
- * purpose. It is provided "as is" without express or implied
- * warranty.
- *
- * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS
- * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
- * FITNESS, IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY
- * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
- * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
- * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
- * THIS SOFTWARE.
- */
-
-#include <stdlib.h>
-#include <stdint.h>
-#include "wayland-util.h"
-
-extern const struct wl_interface wl_seat_interface;
-extern const struct wl_interface wl_surface_interface;
-extern const struct wl_interface wl_seat_interface;
-extern const struct wl_interface wl_surface_interface;
-extern const struct wl_interface wl_text_input_interface;
-
-static const struct wl_interface *types[] = {
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- &wl_seat_interface,
- &wl_surface_interface,
- &wl_seat_interface,
- &wl_surface_interface,
- &wl_text_input_interface,
-};
-
-static const struct wl_message wl_text_input_requests[] = {
- { "activate", "oo", types + 5 },
- { "deactivate", "o", types + 7 },
- { "show_input_panel", "", types + 0 },
- { "hide_input_panel", "", types + 0 },
- { "reset", "", types + 0 },
- { "set_surrounding_text", "suu", types + 0 },
- { "set_content_type", "uu", types + 0 },
- { "set_cursor_rectangle", "iiii", types + 0 },
- { "set_preferred_language", "s", types + 0 },
- { "commit_state", "u", types + 0 },
- { "invoke_action", "uu", types + 0 },
-};
-
-static const struct wl_message wl_text_input_events[] = {
- { "enter", "o", types + 8 },
- { "leave", "", types + 0 },
- { "modifiers_map", "a", types + 0 },
- { "input_panel_state", "u", types + 0 },
- { "preedit_string", "uss", types + 0 },
- { "preedit_styling", "uuu", types + 0 },
- { "preedit_cursor", "i", types + 0 },
- { "commit_string", "us", types + 0 },
- { "cursor_position", "ii", types + 0 },
- { "delete_surrounding_text", "iu", types + 0 },
- { "keysym", "uuuuu", types + 0 },
- { "language", "us", types + 0 },
- { "text_direction", "uu", types + 0 },
-};
-
-WL_EXPORT const struct wl_interface wl_text_input_interface = {
- "wl_text_input", 1,
- 11, wl_text_input_requests,
- 13, wl_text_input_events,
-};
-
-static const struct wl_message wl_text_input_manager_requests[] = {
- { "create_text_input", "n", types + 9 },
-};
-
-WL_EXPORT const struct wl_interface wl_text_input_manager_interface = {
- "wl_text_input_manager", 1,
- 1, wl_text_input_manager_requests,
- 0, NULL,
-};
-
diff --git a/src/modules/ecore_imf/wayland/wayland_imcontext.c b/src/modules/ecore_imf/wayland/wayland_imcontext.c
index cbe69a2707..a70c24f2b4 100644
--- a/src/modules/ecore_imf/wayland/wayland_imcontext.c
+++ b/src/modules/ecore_imf/wayland/wayland_imcontext.c
@@ -40,8 +40,8 @@ struct _WaylandIMContext
{
Ecore_IMF_Context *ctx;
- struct wl_text_input_manager *text_input_manager;
- struct wl_text_input *text_input;
+ struct zwp_text_input_manager_v1 *text_input_manager;
+ struct zwp_text_input_v1 *text_input;
Ecore_Wl2_Window *window;
Ecore_Wl2_Input *input;
@@ -115,7 +115,7 @@ update_state(WaylandIMContext *imcontext)
if (ecore_imf_context_surrounding_get(imcontext->ctx, &surrounding, &cursor_pos))
{
if (imcontext->text_input)
- wl_text_input_set_surrounding_text(imcontext->text_input, surrounding,
+ zwp_text_input_v1_set_surrounding_text(imcontext->text_input, surrounding,
cursor_pos, cursor_pos);
if (surrounding)
@@ -134,13 +134,13 @@ update_state(WaylandIMContext *imcontext)
if (imcontext->text_input)
{
- wl_text_input_set_cursor_rectangle(imcontext->text_input,
+ zwp_text_input_v1_set_cursor_rectangle(imcontext->text_input,
imcontext->cursor_location.x + canvas_x,
imcontext->cursor_location.y + canvas_y,
imcontext->cursor_location.width,
imcontext->cursor_location.height);
- wl_text_input_commit_state(imcontext->text_input, ++imcontext->serial);
+ zwp_text_input_v1_commit_state(imcontext->text_input, ++imcontext->serial);
}
_clear_hide_timer();
@@ -162,7 +162,7 @@ static void _send_input_panel_hide_request(Ecore_IMF_Context *ctx)
{
WaylandIMContext *imcontext = (WaylandIMContext *)ecore_imf_context_data_get(ctx);
if (imcontext && imcontext->text_input)
- wl_text_input_hide_input_panel(imcontext->text_input);
+ zwp_text_input_v1_hide_input_panel(imcontext->text_input);
}
static Eina_Bool _hide_timer_handler(void *data)
@@ -255,7 +255,7 @@ clear_preedit(WaylandIMContext *imcontext)
static void
text_input_commit_string(void *data,
- struct wl_text_input *text_input EINA_UNUSED,
+ struct zwp_text_input_v1 *text_input EINA_UNUSED,
uint32_t serial,
const char *text)
{
@@ -366,7 +366,7 @@ set_focus(Ecore_IMF_Context *ctx)
imcontext->input = input;
- wl_text_input_activate(imcontext->text_input, seat,
+ zwp_text_input_v1_activate(imcontext->text_input, seat,
ecore_wl2_window_surface_get(imcontext->window));
}
@@ -385,14 +385,14 @@ show_input_panel(Ecore_IMF_Context *ctx)
_clear_hide_timer();
- wl_text_input_set_content_type(imcontext->text_input,
+ zwp_text_input_v1_set_content_type(imcontext->text_input,
imcontext->content_hint,
imcontext->content_purpose);
if (ecore_imf_context_surrounding_get(imcontext->ctx, &surrounding, &cursor_pos))
{
if (imcontext->text_input)
- wl_text_input_set_surrounding_text(imcontext->text_input, surrounding,
+ zwp_text_input_v1_set_surrounding_text(imcontext->text_input, surrounding,
cursor_pos, cursor_pos);
if (surrounding)
@@ -402,14 +402,14 @@ show_input_panel(Ecore_IMF_Context *ctx)
}
}
- wl_text_input_show_input_panel(imcontext->text_input);
+ zwp_text_input_v1_show_input_panel(imcontext->text_input);
return EINA_TRUE;
}
static void
text_input_preedit_string(void *data,
- struct wl_text_input *text_input EINA_UNUSED,
+ struct zwp_text_input_v1 *text_input EINA_UNUSED,
uint32_t serial,
const char *text,
const char *commit)
@@ -462,7 +462,7 @@ text_input_preedit_string(void *data,
static void
text_input_delete_surrounding_text(void *data,
- struct wl_text_input *text_input EINA_UNUSED,
+ struct zwp_text_input_v1 *text_input EINA_UNUSED,
int32_t index,
uint32_t length)
{
@@ -481,7 +481,7 @@ text_input_delete_surrounding_text(void *data,
static void
text_input_cursor_position(void *data,
- struct wl_text_input *text_input EINA_UNUSED,
+ struct zwp_text_input_v1 *text_input EINA_UNUSED,
int32_t index,
int32_t anchor)
{
@@ -497,7 +497,7 @@ text_input_cursor_position(void *data,
static void
text_input_preedit_styling(void *data,
- struct wl_text_input *text_input EINA_UNUSED,
+ struct zwp_text_input_v1 *text_input EINA_UNUSED,
uint32_t index,
uint32_t length,
uint32_t style)
@@ -507,15 +507,15 @@ text_input_preedit_styling(void *data,
switch (style)
{
- case WL_TEXT_INPUT_PREEDIT_STYLE_DEFAULT:
- case WL_TEXT_INPUT_PREEDIT_STYLE_UNDERLINE:
- case WL_TEXT_INPUT_PREEDIT_STYLE_INCORRECT:
- case WL_TEXT_INPUT_PREEDIT_STYLE_HIGHLIGHT:
- case WL_TEXT_INPUT_PREEDIT_STYLE_ACTIVE:
- case WL_TEXT_INPUT_PREEDIT_STYLE_INACTIVE:
+ case ZWP_TEXT_INPUT_V1_PREEDIT_STYLE_DEFAULT:
+ case ZWP_TEXT_INPUT_V1_PREEDIT_STYLE_UNDERLINE:
+ case ZWP_TEXT_INPUT_V1_PREEDIT_STYLE_INCORRECT:
+ case ZWP_TEXT_INPUT_V1_PREEDIT_STYLE_HIGHLIGHT:
+ case ZWP_TEXT_INPUT_V1_PREEDIT_STYLE_ACTIVE:
+ case ZWP_TEXT_INPUT_V1_PREEDIT_STYLE_INACTIVE:
attr->preedit_type = ECORE_IMF_PREEDIT_TYPE_SUB1;
break;
- case WL_TEXT_INPUT_PREEDIT_STYLE_SELECTION:
+ case ZWP_TEXT_INPUT_V1_PREEDIT_STYLE_SELECTION:
attr->preedit_type = ECORE_IMF_PREEDIT_TYPE_SUB2;
break;
default:
@@ -532,7 +532,7 @@ text_input_preedit_styling(void *data,
static void
text_input_preedit_cursor(void *data,
- struct wl_text_input *text_input EINA_UNUSED,
+ struct zwp_text_input_v1 *text_input EINA_UNUSED,
int32_t index)
{
WaylandIMContext *imcontext = (WaylandIMContext *)data;
@@ -571,7 +571,7 @@ modifiers_get_mask(struct wl_array *modifiers_map,
}
static void
text_input_modifiers_map(void *data,
- struct wl_text_input *text_input EINA_UNUSED,
+ struct zwp_text_input_v1 *text_input EINA_UNUSED,
struct wl_array *map)
{
WaylandIMContext *imcontext = (WaylandIMContext *)data;
@@ -583,7 +583,7 @@ text_input_modifiers_map(void *data,
static void
text_input_keysym(void *data,
- struct wl_text_input *text_input EINA_UNUSED,
+ struct zwp_text_input_v1 *text_input EINA_UNUSED,
uint32_t serial EINA_UNUSED,
uint32_t time,
uint32_t sym,
@@ -644,7 +644,7 @@ text_input_keysym(void *data,
static void
text_input_enter(void *data,
- struct wl_text_input *text_input EINA_UNUSED,
+ struct zwp_text_input_v1 *text_input EINA_UNUSED,
struct wl_surface *surface EINA_UNUSED)
{
WaylandIMContext *imcontext = (WaylandIMContext *)data;
@@ -656,7 +656,7 @@ text_input_enter(void *data,
static void
text_input_leave(void *data,
- struct wl_text_input *text_input EINA_UNUSED)
+ struct zwp_text_input_v1 *text_input EINA_UNUSED)
{
WaylandIMContext *imcontext = (WaylandIMContext *)data;
@@ -667,14 +667,14 @@ text_input_leave(void *data,
static void
text_input_input_panel_state(void *data EINA_UNUSED,
- struct wl_text_input *text_input EINA_UNUSED,
+ struct zwp_text_input_v1 *text_input EINA_UNUSED,
uint32_t state EINA_UNUSED)
{
}
static void
text_input_language(void *data,
- struct wl_text_input *text_input EINA_UNUSED,
+ struct zwp_text_input_v1 *text_input EINA_UNUSED,
uint32_t serial EINA_UNUSED,
const char *language)
{
@@ -705,13 +705,13 @@ text_input_language(void *data,
static void
text_input_text_direction(void *data EINA_UNUSED,
- struct wl_text_input *text_input EINA_UNUSED,
+ struct zwp_text_input_v1 *text_input EINA_UNUSED,
uint32_t serial EINA_UNUSED,
uint32_t direction EINA_UNUSED)
{
}
-static const struct wl_text_input_listener text_input_listener =
+static const struct zwp_text_input_v1_listener text_input_listener =
{
text_input_enter,
text_input_leave,
@@ -738,9 +738,9 @@ wayland_im_context_add(Ecore_IMF_Context *ctx)
imcontext->ctx = ctx;
imcontext->text_input =
- wl_text_input_manager_create_text_input(imcontext->text_input_manager);
+ zwp_text_input_manager_v1_create_text_input(imcontext->text_input_manager);
if (imcontext->text_input)
- wl_text_input_add_listener(imcontext->text_input,
+ zwp_text_input_v1_add_listener(imcontext->text_input,
&text_input_listener, imcontext);
}
@@ -758,7 +758,7 @@ wayland_im_context_del(Ecore_IMF_Context *ctx)
}
if (imcontext->text_input)
- wl_text_input_destroy(imcontext->text_input);
+ zwp_text_input_v1_destroy(imcontext->text_input);
clear_preedit(imcontext);
}
@@ -772,7 +772,7 @@ wayland_im_context_reset(Ecore_IMF_Context *ctx)
clear_preedit(imcontext);
if (imcontext->text_input)
- wl_text_input_reset(imcontext->text_input);
+ zwp_text_input_v1_reset(imcontext->text_input);
update_state(imcontext);
@@ -805,7 +805,7 @@ wayland_im_context_focus_out(Ecore_IMF_Context *ctx)
if (ecore_imf_context_input_panel_enabled_get(ctx))
_input_panel_hide(ctx, EINA_FALSE);
- wl_text_input_deactivate(imcontext->text_input,
+ zwp_text_input_v1_deactivate(imcontext->text_input,
ecore_wl2_input_seat_get(imcontext->input));
}
@@ -965,16 +965,16 @@ void wayland_im_context_autocapital_type_set(Ecore_IMF_Context *ctx,
{
WaylandIMContext *imcontext = (WaylandIMContext *)ecore_imf_context_data_get(ctx);
- imcontext->content_hint &= ~(WL_TEXT_INPUT_CONTENT_HINT_AUTO_CAPITALIZATION |
- WL_TEXT_INPUT_CONTENT_HINT_UPPERCASE |
- WL_TEXT_INPUT_CONTENT_HINT_LOWERCASE);
+ imcontext->content_hint &= ~(ZWP_TEXT_INPUT_V1_CONTENT_HINT_AUTO_CAPITALIZATION |
+ ZWP_TEXT_INPUT_V1_CONTENT_HINT_UPPERCASE |
+ ZWP_TEXT_INPUT_V1_CONTENT_HINT_LOWERCASE);
if (autocapital_type == ECORE_IMF_AUTOCAPITAL_TYPE_SENTENCE)
- imcontext->content_hint |= WL_TEXT_INPUT_CONTENT_HINT_AUTO_CAPITALIZATION;
+ imcontext->content_hint |= ZWP_TEXT_INPUT_V1_CONTENT_HINT_AUTO_CAPITALIZATION;
else if (autocapital_type == ECORE_IMF_AUTOCAPITAL_TYPE_ALLCHARACTER)
- imcontext->content_hint |= WL_TEXT_INPUT_CONTENT_HINT_UPPERCASE;
+ imcontext->content_hint |= ZWP_TEXT_INPUT_V1_CONTENT_HINT_UPPERCASE;
else
- imcontext->content_hint |= WL_TEXT_INPUT_CONTENT_HINT_LOWERCASE;
+ imcontext->content_hint |= ZWP_TEXT_INPUT_V1_CONTENT_HINT_LOWERCASE;
}
void
@@ -984,37 +984,37 @@ wayland_im_context_input_panel_layout_set(Ecore_IMF_Context *ctx, Ecore_IMF_Inpu
switch (layout) {
case ECORE_IMF_INPUT_PANEL_LAYOUT_NUMBER:
- imcontext->content_purpose = WL_TEXT_INPUT_CONTENT_PURPOSE_NUMBER;
+ imcontext->content_purpose = ZWP_TEXT_INPUT_V1_CONTENT_PURPOSE_NUMBER;
break;
case ECORE_IMF_INPUT_PANEL_LAYOUT_EMAIL:
- imcontext->content_purpose = WL_TEXT_INPUT_CONTENT_PURPOSE_EMAIL;
+ imcontext->content_purpose = ZWP_TEXT_INPUT_V1_CONTENT_PURPOSE_EMAIL;
break;
case ECORE_IMF_INPUT_PANEL_LAYOUT_URL:
- imcontext->content_purpose = WL_TEXT_INPUT_CONTENT_PURPOSE_URL;
+ imcontext->content_purpose = ZWP_TEXT_INPUT_V1_CONTENT_PURPOSE_URL;
break;
case ECORE_IMF_INPUT_PANEL_LAYOUT_PHONENUMBER:
- imcontext->content_purpose = WL_TEXT_INPUT_CONTENT_PURPOSE_PHONE;
+ imcontext->content_purpose = ZWP_TEXT_INPUT_V1_CONTENT_PURPOSE_PHONE;
break;
case ECORE_IMF_INPUT_PANEL_LAYOUT_IP:
- imcontext->content_purpose = WL_TEXT_INPUT_CONTENT_PURPOSE_NUMBER;
+ imcontext->content_purpose = ZWP_TEXT_INPUT_V1_CONTENT_PURPOSE_NUMBER;
break;
case ECORE_IMF_INPUT_PANEL_LAYOUT_MONTH:
- imcontext->content_purpose = WL_TEXT_INPUT_CONTENT_PURPOSE_DATE;
+ imcontext->content_purpose = ZWP_TEXT_INPUT_V1_CONTENT_PURPOSE_DATE;
break;
case ECORE_IMF_INPUT_PANEL_LAYOUT_NUMBERONLY:
- imcontext->content_purpose = WL_TEXT_INPUT_CONTENT_PURPOSE_DIGITS;
+ imcontext->content_purpose = ZWP_TEXT_INPUT_V1_CONTENT_PURPOSE_DIGITS;
break;
case ECORE_IMF_INPUT_PANEL_LAYOUT_TERMINAL:
- imcontext->content_purpose = WL_TEXT_INPUT_CONTENT_PURPOSE_TERMINAL;
+ imcontext->content_purpose = ZWP_TEXT_INPUT_V1_CONTENT_PURPOSE_TERMINAL;
break;
case ECORE_IMF_INPUT_PANEL_LAYOUT_PASSWORD:
- imcontext->content_purpose = WL_TEXT_INPUT_CONTENT_PURPOSE_PASSWORD;
+ imcontext->content_purpose = ZWP_TEXT_INPUT_V1_CONTENT_PURPOSE_PASSWORD;
break;
case ECORE_IMF_INPUT_PANEL_LAYOUT_DATETIME:
- imcontext->content_purpose = WL_TEXT_INPUT_CONTENT_PURPOSE_DATETIME;
+ imcontext->content_purpose = ZWP_TEXT_INPUT_V1_CONTENT_PURPOSE_DATETIME;
break;
default:
- imcontext->content_purpose = WL_TEXT_INPUT_CONTENT_PURPOSE_NORMAL;
+ imcontext->content_purpose = ZWP_TEXT_INPUT_V1_CONTENT_PURPOSE_NORMAL;
break;
}
}
@@ -1026,9 +1026,9 @@ wayland_im_context_input_mode_set(Ecore_IMF_Context *ctx,
WaylandIMContext *imcontext = (WaylandIMContext *)ecore_imf_context_data_get(ctx);
if (input_mode & ECORE_IMF_INPUT_MODE_INVISIBLE)
- imcontext->content_hint |= WL_TEXT_INPUT_CONTENT_HINT_PASSWORD;
+ imcontext->content_hint |= ZWP_TEXT_INPUT_V1_CONTENT_HINT_PASSWORD;
else
- imcontext->content_hint &= ~WL_TEXT_INPUT_CONTENT_HINT_PASSWORD;
+ imcontext->content_hint &= ~ZWP_TEXT_INPUT_V1_CONTENT_HINT_PASSWORD;
}
void
@@ -1038,19 +1038,19 @@ wayland_im_context_input_hint_set(Ecore_IMF_Context *ctx,
WaylandIMContext *imcontext = (WaylandIMContext *)ecore_imf_context_data_get(ctx);
if (input_hints & ECORE_IMF_INPUT_HINT_AUTO_COMPLETE)
- imcontext->content_hint |= WL_TEXT_INPUT_CONTENT_HINT_AUTO_COMPLETION;
+ imcontext->content_hint |= ZWP_TEXT_INPUT_V1_CONTENT_HINT_AUTO_COMPLETION;
else
- imcontext->content_hint &= ~WL_TEXT_INPUT_CONTENT_HINT_AUTO_COMPLETION;
+ imcontext->content_hint &= ~ZWP_TEXT_INPUT_V1_CONTENT_HINT_AUTO_COMPLETION;
if (input_hints & ECORE_IMF_INPUT_HINT_SENSITIVE_DATA)
- imcontext->content_hint |= WL_TEXT_INPUT_CONTENT_HINT_SENSITIVE_DATA;
+ imcontext->content_hint |= ZWP_TEXT_INPUT_V1_CONTENT_HINT_SENSITIVE_DATA;
else
- imcontext->content_hint &= ~WL_TEXT_INPUT_CONTENT_HINT_SENSITIVE_DATA;
+ imcontext->content_hint &= ~ZWP_TEXT_INPUT_V1_CONTENT_HINT_SENSITIVE_DATA;
if (input_hints & ECORE_IMF_INPUT_HINT_MULTILINE)
- imcontext->content_hint |= WL_TEXT_INPUT_CONTENT_HINT_MULTILINE;
+ imcontext->content_hint |= ZWP_TEXT_INPUT_V1_CONTENT_HINT_MULTILINE;
else
- imcontext->content_hint &= ~WL_TEXT_INPUT_CONTENT_HINT_MULTILINE;
+ imcontext->content_hint &= ~ZWP_TEXT_INPUT_V1_CONTENT_HINT_MULTILINE;
}
void
@@ -1060,9 +1060,9 @@ wayland_im_context_input_panel_language_set(Ecore_IMF_Context *ctx,
WaylandIMContext *imcontext = (WaylandIMContext *)ecore_imf_context_data_get(ctx);
if (lang == ECORE_IMF_INPUT_PANEL_LANG_ALPHABET)
- imcontext->content_hint |= WL_TEXT_INPUT_CONTENT_HINT_LATIN;
+ imcontext->content_hint |= ZWP_TEXT_INPUT_V1_CONTENT_HINT_LATIN;
else
- imcontext->content_hint &= ~WL_TEXT_INPUT_CONTENT_HINT_LATIN;
+ imcontext->content_hint &= ~ZWP_TEXT_INPUT_V1_CONTENT_HINT_LATIN;
}
void
@@ -1082,12 +1082,12 @@ wayland_im_context_prediction_allow_set(Ecore_IMF_Context *ctx,
WaylandIMContext *imcontext = (WaylandIMContext *)ecore_imf_context_data_get(ctx);
if (prediction)
- imcontext->content_hint |= WL_TEXT_INPUT_CONTENT_HINT_AUTO_COMPLETION;
+ imcontext->content_hint |= ZWP_TEXT_INPUT_V1_CONTENT_HINT_AUTO_COMPLETION;
else
- imcontext->content_hint &= ~WL_TEXT_INPUT_CONTENT_HINT_AUTO_COMPLETION;
+ imcontext->content_hint &= ~ZWP_TEXT_INPUT_V1_CONTENT_HINT_AUTO_COMPLETION;
}
-WaylandIMContext *wayland_im_context_new (struct wl_text_input_manager *text_input_manager)
+WaylandIMContext *wayland_im_context_new (struct zwp_text_input_manager_v1 *text_input_manager)
{
WaylandIMContext *context = calloc(1, sizeof(WaylandIMContext));
diff --git a/src/modules/ecore_imf/wayland/wayland_imcontext.h b/src/modules/ecore_imf/wayland/wayland_imcontext.h
index 45c2933b41..55048622f7 100644
--- a/src/modules/ecore_imf/wayland/wayland_imcontext.h
+++ b/src/modules/ecore_imf/wayland/wayland_imcontext.h
@@ -26,7 +26,7 @@
#include <Ecore_IMF.h>
#include <Ecore_Wl2.h>
-#include "text-client-protocol.h"
+#include "text-input-unstable-v1-client-protocol.h"
extern Ecore_Wl2_Display *ewd;
@@ -87,7 +87,7 @@ void
wayland_im_context_prediction_allow_set(Ecore_IMF_Context *ctx,
Eina_Bool prediction);
-WaylandIMContext *wayland_im_context_new (struct wl_text_input_manager *text_input_manager);
+WaylandIMContext *wayland_im_context_new (struct zwp_text_input_manager_v1 *text_input_manager);
extern int _ecore_imf_wayland_log_dom;
diff --git a/src/modules/ecore_imf/wayland/wayland_module.c b/src/modules/ecore_imf/wayland/wayland_module.c
index a47aaeeac9..57b1117ee1 100644
--- a/src/modules/ecore_imf/wayland/wayland_module.c
+++ b/src/modules/ecore_imf/wayland/wayland_module.c
@@ -30,7 +30,7 @@
#include <stdio.h>
#include "wayland_imcontext.h"
-#include "text-client-protocol.h"
+#include "text-input-unstable-v1-client-protocol.h"
int _ecore_imf_wayland_log_dom = -1;
Ecore_Wl2_Display *ewd;
@@ -85,7 +85,7 @@ static Ecore_IMF_Context_Class wayland_imf_class =
NULL /* bidi_direction_set */
};
-static struct wl_text_input_manager *text_input_manager = NULL;
+static struct zwp_text_input_manager_v1 *text_input_manager = NULL;
static Ecore_IMF_Context *
im_module_exit(void)
@@ -112,11 +112,11 @@ im_module_create()
registry = ecore_wl2_display_registry_get(ewd);
EINA_ITERATOR_FOREACH(itr, global)
{
- if (!strcmp(global->interface, "wl_text_input_manager"))
+ if (!strcmp(global->interface, "zwp_text_input_manager_v1"))
{
text_input_manager =
wl_registry_bind(registry, global->id,
- &wl_text_input_manager_interface, 1);
+ &zwp_text_input_manager_v1_interface, 1);
EINA_LOG_DOM_INFO(_ecore_imf_wayland_log_dom,
"bound wl_text_input_manager interface");
break;