* Initialize ibus and assures it is connected. */
| 36 | * Initialize ibus and assures it is connected. |
| 37 | */ |
| 38 | IBusHandler::IBusHandler() : bus_(NULL), ibus_available_(false) { |
| 39 | const gchar* ibus_address = ibus_get_address(); |
| 40 | // The ibus_available_ field indicates whether ibus is available |
| 41 | // or not. Attempt to determine this by getting the address of |
| 42 | // the ibus engine. If it's null then no engine is running. |
| 43 | if (ibus_address == NULL) { |
| 44 | ibus_available_ = false; |
| 45 | } else { |
| 46 | ibus_init(); |
| 47 | bus_ = ibus_bus_new(); |
| 48 | assert(ibus_bus_is_connected(bus_)); |
| 49 | ibus_available_ = true; |
| 50 | } |
| 51 | } |
| 52 | |
| 53 | IBusHandler::~IBusHandler() { |
| 54 | } |
nothing calls this directly
no outgoing calls
no test coverage detected