MCPcopy Create free account
hub / github.com/SeleniumHQ/selenium / GetCurrentInputContext

Method GetCurrentInputContext

cpp/imehandler/linux/src/ibushandler.cpp:79–95  ·  view source on GitHub ↗

* Get the current input context for the current bus connection. */

Source from the content-addressed store, hash-verified

77 * Get the current input context for the current bus connection.
78 */
79IBusInputContext* IBusHandler::GetCurrentInputContext() const {
80 gchar* context_name = ibus_bus_current_input_context(bus_);
81 if (context_name == NULL) {
82 // This happens on systems where ibus-gtk integration is not properly
83 // installed (most notably with 32-bit Firefox on a 64-bit machine).
84 // return NULL context so the library can gracefully return false.
85 return NULL;
86 }
87
88 IBusConnection* conn = ibus_bus_get_connection(bus_);
89 assert(conn != NULL);
90 IBusInputContext* context = ibus_input_context_get_input_context(
91 context_name, conn);
92 // We don't need the context name anymore, we have to release it.
93 g_free(context_name);
94 return context;
95}
96
97/*
98 * returns true if IME input is active, false otherwise.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected