Changeset View
Changeset View
Standalone View
Standalone View
src/server/textinput_interface_v0.cpp
Show All 39 Lines | 35 | public: | |||
---|---|---|---|---|---|
40 | void deactivate(); | 40 | void deactivate(); | ||
41 | 41 | | |||
42 | void sendEnter(SurfaceInterface *surface, quint32 serial) override; | 42 | void sendEnter(SurfaceInterface *surface, quint32 serial) override; | ||
43 | void sendLeave(quint32 serial, SurfaceInterface *surface) override; | 43 | void sendLeave(quint32 serial, SurfaceInterface *surface) override; | ||
44 | void preEdit(const QByteArray &text, const QByteArray &commit) override; | 44 | void preEdit(const QByteArray &text, const QByteArray &commit) override; | ||
45 | void commit(const QByteArray &text) override; | 45 | void commit(const QByteArray &text) override; | ||
46 | void deleteSurroundingText(quint32 beforeLength, quint32 afterLength) override; | 46 | void deleteSurroundingText(quint32 beforeLength, quint32 afterLength) override; | ||
47 | void setTextDirection(Qt::LayoutDirection direction) override; | 47 | void setTextDirection(Qt::LayoutDirection direction) override; | ||
48 | void setPreEditCursor(qint32 index) override; | 48 | void setPreEditCursor(qint32 begin, qint32 end) override; | ||
49 | void setCursorPosition(qint32 index, qint32 anchor) override; | 49 | void setCursorPosition(qint32 index, qint32 anchor) override; | ||
50 | void keysymPressed(quint32 keysym, Qt::KeyboardModifiers modifiers) override; | 50 | void keysymPressed(quint32 keysym, Qt::KeyboardModifiers modifiers) override; | ||
51 | void keysymReleased(quint32 keysym, Qt::KeyboardModifiers modifiers) override; | 51 | void keysymReleased(quint32 keysym, Qt::KeyboardModifiers modifiers) override; | ||
52 | TextInputInterfaceVersion interfaceVersion() const override { | 52 | TextInputInterfaceVersion interfaceVersion() const override { | ||
53 | return TextInputInterfaceVersion::UnstableV0; | 53 | return TextInputInterfaceVersion::UnstableV0; | ||
54 | } | 54 | } | ||
55 | void sendInputPanelState() override; | 55 | void sendInputPanelState() override; | ||
56 | void sendLanguage() override; | 56 | void sendLanguage() override; | ||
▲ Show 20 Lines • Show All 136 Lines • ▼ Show 20 Line(s) | 191 | case Qt::LayoutDirectionAuto: | |||
193 | break; | 193 | break; | ||
194 | default: | 194 | default: | ||
195 | Q_UNREACHABLE(); | 195 | Q_UNREACHABLE(); | ||
196 | break; | 196 | break; | ||
197 | } | 197 | } | ||
198 | wl_text_input_send_text_direction(resource, latestState, wlDirection); | 198 | wl_text_input_send_text_direction(resource, latestState, wlDirection); | ||
199 | } | 199 | } | ||
200 | 200 | | |||
201 | void TextInputUnstableV0Interface::Private::setPreEditCursor(qint32 index) | 201 | void TextInputUnstableV0Interface::Private::setPreEditCursor(qint32 begin, qint32 end) | ||
202 | { | 202 | { | ||
203 | Q_UNUSED(end) | ||||
203 | if (!resource) { | 204 | if (!resource) { | ||
204 | return; | 205 | return; | ||
205 | } | 206 | } | ||
206 | wl_text_input_send_preedit_cursor(resource, index); | 207 | wl_text_input_send_preedit_cursor(resource, begin); | ||
207 | } | 208 | } | ||
208 | 209 | | |||
209 | void TextInputUnstableV0Interface::Private::sendInputPanelState() | 210 | void TextInputUnstableV0Interface::Private::sendInputPanelState() | ||
210 | { | 211 | { | ||
211 | if (!resource) { | 212 | if (!resource) { | ||
212 | return; | 213 | return; | ||
213 | } | 214 | } | ||
214 | wl_text_input_send_input_panel_state(resource, inputPanelVisible); | 215 | wl_text_input_send_input_panel_state(resource, inputPanelVisible); | ||
▲ Show 20 Lines • Show All 227 Lines • Show Last 20 Lines |