summaryrefslogtreecommitdiffstats
path: root/src/ZYBus.h
diff options
context:
space:
mode:
authorPeng Wu <alexepico@gmail.com>2014-01-28 13:54:04 +0800
committerPeng Wu <alexepico@gmail.com>2014-01-28 13:54:04 +0800
commit1ce99e6ba90173efb2b32dcc1d0d34826b8c811c (patch)
treeeb1d9c9c788afd403496aadfcf8d9e4d2e39f48f /src/ZYBus.h
parent685d18ecc576c17924976ec6b5149f829aac3022 (diff)
downloadibus-libzhuyin-1ce99e6ba90173efb2b32dcc1d0d34826b8c811c.tar.gz
ibus-libzhuyin-1ce99e6ba90173efb2b32dcc1d0d34826b8c811c.tar.xz
ibus-libzhuyin-1ce99e6ba90173efb2b32dcc1d0d34826b8c811c.zip
import ZYBus.h
Diffstat (limited to 'src/ZYBus.h')
-rw-r--r--src/ZYBus.h45
1 files changed, 45 insertions, 0 deletions
diff --git a/src/ZYBus.h b/src/ZYBus.h
new file mode 100644
index 0000000..bb3294f
--- /dev/null
+++ b/src/ZYBus.h
@@ -0,0 +1,45 @@
+/* vim:set et ts=4 sts=4:
+ *
+ * ibus-libzhuyin - New Zhuyin engine based on libzhuyin for IBus
+ *
+ * Copyright (c) 2008-2010 Peng Huang <shawn.p.huang@gmail.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+#ifndef __ZY_BUS_H_
+#define __ZY_BUS_H_
+
+#include <ibus.h>
+#include "ZYObject.h"
+
+namespace ZY {
+
+class Bus : Object {
+public:
+ Bus (void) : Object (ibus_bus_new ()) { }
+
+ bool isConnected (void)
+ {
+ return ibus_bus_is_connected (*this);
+ }
+
+ operator IBusBus * (void) const
+ {
+ return get<IBusBus> ();
+ }
+};
+
+};
+#endif