* Returns the name of the global engine currently set. */
| 57 | * Returns the name of the global engine currently set. |
| 58 | */ |
| 59 | std::string IBusHandler::GetActiveEngine() const { |
| 60 | std::string engine_name = ""; |
| 61 | |
| 62 | if (! ibus_available_) { |
| 63 | return engine_name; |
| 64 | } |
| 65 | |
| 66 | // Get the descriptor of the current global engine. |
| 67 | IBusEngineDesc* desc = ibus_bus_get_global_engine(bus_); |
| 68 | if (desc) { |
| 69 | // We copy the name of the global engine. |
| 70 | engine_name = std::string(desc->name); |
| 71 | g_object_unref(desc); |
| 72 | } |
| 73 | return engine_name; |
| 74 | } |
| 75 | |
| 76 | /* |
| 77 | * Get the current input context for the current bus connection. |
nothing calls this directly
no outgoing calls
no test coverage detected