Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qqnxinputcontext_imf.cpp File Reference

(4946982534d4d256590dffd44046fe642456703f)

#include "qqnxinputcontext_imf.h"
#include "qqnxabstractvirtualkeyboard.h"
#include "qqnxintegration.h"
#include "qqnxscreen.h"
#include "qqnxscreeneventhandler.h"
#include <QtGui/QGuiApplication>
#include <QtGui/QInputMethodEvent>
#include <QtGui/QTextCharFormat>
#include <QtCore/QDebug>
#include <QtCore/QMutex>
#include <QtCore/QVariant>
#include <QtCore/QVariantHash>
#include <QtCore/QWaitCondition>
#include <QtCore/QQueue>
#include <QtCore/QGlobalStatic>
#include <dlfcn.h>
#include "imf/imf_client.h"
#include "imf/input_control.h"
#include <process.h>
#include <sys/keycodes.h>
+ Include dependency graph for qqnxinputcontext_imf.cpp:

Go to the source code of this file.

Classes

struct  SpellCheckInfo
 
class  QQnxImfRequest
 

Enumerations

enum  ImfEventType {
  ImfCommitText , ImfDeleteSurroundingText , ImfFinishComposingText , ImfGetCursorPosition ,
  ImfGetTextAfterCursor , ImfGetTextBeforeCursor , ImfSendEvent , ImfSetComposingRegion ,
  ImfSetComposingText , ImfIsTextSelected , ImfIsAllTextSelected
}
 

Functions

 Q_LOGGING_CATEGORY (lcQpaInputMethods, "qt.qpa.input.methods")
 
static bool isSessionOkay (input_session_t *ic)
 
static void executeIMFRequest (QQnxImfRequest *event)
 
static void initEvent (event_t *pEvent, const input_session_t *pSession, EventType eventType, int eventId, int eventSize)
 
static spannable_string_t * toSpannableString (const QString &text)
 
static bool imfAvailable ()
 
static int adjustIndex (const QChar *text, int utf32Index, int utf16StartIndex, int *highSurrogateCount)
 

Variables

static QQnxInputContextsInputContextInstance
 
static QColor sSelectedColor (0, 0xb8, 0, 85)
 
static const input_session_t * sSpellCheckSession = nullptr
 
static const input_session_t * sInputSession = nullptr
 
static const input_session_t *(* p_ictrl_open_session )(connection_interface_t *) = nullptr
 
static void(* p_ictrl_close_session )(input_session_t *) = nullptr
 
static int32_t(* p_ictrl_dispatch_event )(event_t *) = nullptr
 
static int32_t(* p_imf_client_init )() = nullptr
 
static void(* p_imf_client_disconnect )() = nullptr
 
static int32_t(* p_vkb_init_selection_service )() = nullptr
 
static int32_t(* p_ictrl_get_num_active_sessions )() = nullptr
 
static bool s_imfInitFailed = false
 

Enumeration Type Documentation

◆ ImfEventType

Enumerator
ImfCommitText 
ImfDeleteSurroundingText 
ImfFinishComposingText 
ImfGetCursorPosition 
ImfGetTextAfterCursor 
ImfGetTextBeforeCursor 
ImfSendEvent 
ImfSetComposingRegion 
ImfSetComposingText 
ImfIsTextSelected 
ImfIsAllTextSelected 

Definition at line 40 of file qqnxinputcontext_imf.cpp.

Function Documentation

◆ adjustIndex()

static int adjustIndex ( const QChar * text,
int utf32Index,
int utf16StartIndex,
int * highSurrogateCount )
static

Definition at line 999 of file qqnxinputcontext_imf.cpp.

References text.

◆ executeIMFRequest()

static void executeIMFRequest ( QQnxImfRequest * event)
static

Definition at line 120 of file qqnxinputcontext_imf.cpp.

References Qt::BlockingQueuedConnection, QMetaObject::invokeMethod(), Q_ARG, and sInputContextInstance.

+ Here is the call graph for this function:

◆ imfAvailable()

static bool imfAvailable ( )
static

◆ initEvent()

static void initEvent ( event_t * pEvent,
const input_session_t * pSession,
EventType eventType,
int eventId,
int eventSize )
static

Definition at line 444 of file qqnxinputcontext_imf.cpp.

Referenced by QQnxInputContext::checkSpelling(), QQnxInputContext::handleKeyboardEvent(), and QQnxInputContext::update().

+ Here is the caller graph for this function:

◆ isSessionOkay()

static bool isSessionOkay ( input_session_t * ic)
static

Definition at line 35 of file qqnxinputcontext_imf.cpp.

References sInputSession.

◆ Q_LOGGING_CATEGORY()

Q_LOGGING_CATEGORY ( lcQpaInputMethods ,
"qt.qpa.input.methods"  )

◆ toSpannableString()

static spannable_string_t * toSpannableString ( const QString & text)
static

Definition at line 457 of file qqnxinputcontext_imf.cpp.

References QString::length(), Q_FUNC_INFO, qCDebug, text, and QString::toWCharArray().

+ Here is the call graph for this function:

Variable Documentation

◆ p_ictrl_close_session

void(* p_ictrl_close_session) (input_session_t *) ( input_session_t * ) = nullptr
static

Definition at line 473 of file qqnxinputcontext_imf.cpp.

Referenced by imfAvailable().

◆ p_ictrl_dispatch_event

int32_t(* p_ictrl_dispatch_event) (event_t *) ( event_t * ) = nullptr
static

◆ p_ictrl_get_num_active_sessions

int32_t(* p_ictrl_get_num_active_sessions) () ( ) = nullptr
static

Definition at line 478 of file qqnxinputcontext_imf.cpp.

Referenced by imfAvailable().

◆ p_ictrl_open_session

const input_session_t *(* p_ictrl_open_session) (connection_interface_t *) ( connection_interface_t * ) = nullptr
static

Definition at line 472 of file qqnxinputcontext_imf.cpp.

Referenced by QQnxInputContext::checkSpelling(), and imfAvailable().

◆ p_imf_client_disconnect

void(* p_imf_client_disconnect) () ( ) = nullptr
static

Definition at line 476 of file qqnxinputcontext_imf.cpp.

Referenced by QQnxInputContext::~QQnxInputContext(), and imfAvailable().

◆ p_imf_client_init

int32_t(* p_imf_client_init) () ( ) = nullptr
static

Definition at line 475 of file qqnxinputcontext_imf.cpp.

Referenced by QQnxInputContext::QQnxInputContext(), and imfAvailable().

◆ p_vkb_init_selection_service

int32_t(* p_vkb_init_selection_service) () ( ) = nullptr
static

Definition at line 477 of file qqnxinputcontext_imf.cpp.

Referenced by imfAvailable().

◆ s_imfInitFailed

bool s_imfInitFailed = false
static

Definition at line 479 of file qqnxinputcontext_imf.cpp.

Referenced by QQnxInputContext::QQnxInputContext(), and imfAvailable().

◆ sInputContextInstance

◆ sInputSession

const input_session_t* sInputSession = nullptr
static

◆ sSelectedColor

QColor sSelectedColor(0, 0xb8, 0, 85) ( 0 ,
0xb8 ,
0 ,
85  )
static

◆ sSpellCheckSession

const input_session_t* sSpellCheckSession = nullptr
static

Definition at line 33 of file qqnxinputcontext_imf.cpp.

Referenced by QQnxInputContext::checkSpelling().