}
}
+void CSCLConnectionISF::get_surrounding_text(sclint maxlen_before, sclint maxlen_after, sclchar **text, int &cursor)
+{
+ if (m_initialized) {
+ scim::String surrounding_text;
+ m_helper_agent.get_surrounding_text(maxlen_before, maxlen_after, surrounding_text, cursor);
+
+ if (text)
+ *text = strdup(surrounding_text.c_str());
+ }
+}
+
void CSCLConnectionISF::delete_surrounding_text(sclint offset, sclint len) const
{
if (m_initialized) {
void get_keyboard_ise(const sclchar *uuid);
void set_selection(sclint start, sclint end);
void send_private_command(const char *command);
+ void get_surrounding_text(sclint maxlen_before, sclint maxlen_after, sclchar **text, int &cursor);
private:
sclboolean m_initialized;
}
}
+void CSCLConnection::get_surrounding_text(sclint maxlen_before, sclint maxlen_after, sclchar **text, int &cursor)
+{
+ if (m_impl) {
+ m_impl->get_surrounding_text(maxlen_before, maxlen_after, text, cursor);
+ }
+}
+
void CSCLConnection::delete_surrounding_text(sclint offset, sclint len) const
{
if (m_impl) {
virtual void get_keyboard_ise(const sclchar *uuid);
virtual void set_selection(sclint start, sclint end);
virtual void send_private_command(const sclchar *command);
+ virtual void get_surrounding_text(sclint maxlen_before, sclint maxlen_after, sclchar **text, int &cursor);
protected:
std::string m_backend_identifier;
}
}
+void CSCLCore::get_surrounding_text(sclint maxlen_before, sclint maxlen_after, sclchar **text, int &cursor) const
+{
+ if (m_impl) {
+ m_impl->get_surrounding_text(maxlen_before, maxlen_after, text, cursor);
+ }
+}
+
void CSCLCore::delete_surrounding_text(sclint offset, sclint len) const
{
if (m_impl) {
void update_geometry(sclint x, sclint y, sclint width, sclint height);
/**
- * @brief Request to get surrounding text.
+ * @brief Request to get surrounding text asynchronously.
*
* @param[in] ic_uuid The helper ISE UUID.
* @param[in] maxlen_before The max length of before.
void send_private_command(const sclchar *command);
+ /**
+ * @brief Request to get surrounding text synchronously.
+ *
+ * @param[in] maxlen_before The max length of before.
+ * @param[in] maxlen_after The max length of after.
+ * @param[out] text The surrounding text.
+ * @param[out] cursor The cursor position.
+ */
+ void get_surrounding_text(sclint maxlen_before, sclint maxlen_after, sclchar **text, int &cursor) const;
private:
CSCLCoreImpl *m_impl;
};
m_connection.get_surrounding_text(ic_uuid, maxlen_before, maxlen_after);
}
+void CSCLCoreImpl::get_surrounding_text(sclint maxlen_before, sclint maxlen_after, sclchar **text, int &cursor)
+{
+ m_connection.get_surrounding_text(maxlen_before, maxlen_after, text, cursor);
+}
+
void CSCLCoreImpl::delete_surrounding_text(sclint offset, sclint len) const
{
m_connection.delete_surrounding_text(offset, len);
void set_selection(sclint start, sclint end);
void send_private_command(const sclchar *command);
+ void get_surrounding_text(sclint maxlen_before, sclint maxlen_after, sclchar **text, int &cursor);
private:
ISCLCoreEventCallback *m_event_callback;