summaryrefslogtreecommitdiffstats
path: root/src/ZYZConfig.h
diff options
context:
space:
mode:
authorPeng Wu <alexepico@gmail.com>2014-04-04 13:21:40 +0800
committerPeng Wu <alexepico@gmail.com>2014-04-04 13:21:40 +0800
commita82f17c1df3a8f3f9a41042f9cb4603ee8a68062 (patch)
tree318ea3efdd454a58182320763b580d6bdeeaa48c /src/ZYZConfig.h
parent6f8fa23c407d14f00840b9622088e1c9699006d5 (diff)
downloadibus-libzhuyin-a82f17c1df3a8f3f9a41042f9cb4603ee8a68062.tar.gz
ibus-libzhuyin-a82f17c1df3a8f3f9a41042f9cb4603ee8a68062.tar.xz
ibus-libzhuyin-a82f17c1df3a8f3f9a41042f9cb4603ee8a68062.zip
declare class ZhuyinConfig
Diffstat (limited to 'src/ZYZConfig.h')
-rw-r--r--src/ZYZConfig.h68
1 files changed, 68 insertions, 0 deletions
diff --git a/src/ZYZConfig.h b/src/ZYZConfig.h
new file mode 100644
index 0000000..87ce8c4
--- /dev/null
+++ b/src/ZYZConfig.h
@@ -0,0 +1,68 @@
+/* vim:set et ts=4 sts=4:
+ *
+ * ibus-libzhuyin - New Zhuyin engine based on libzhuyin for IBus
+ *
+ * Copyright (c) 2014 Peng Wu <alexepico@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_LIB_ZHUYIN_ZHUYIN_CONFIG_H_
+#define __ZY_LIB_ZHUYIN_ZHUYIN_CONFIG_H_
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <glib.h>
+#include <ibus.h>
+#include "ZYConfig.h"
+
+namespace ZY {
+
+class Bus;
+
+class ZhuyinConfig : public Config {
+public:
+ static void init (Bus & bus);
+ static ZhuyinConfig & instance (void) { return *m_instance; }
+
+protected:
+ ZhuyinConfig (Bus & bus, const std::string & name);
+ virtual ~ZhuyinConfig (void);
+
+public:
+
+protected:
+ void initDefaultValues (void);
+
+ virtual void readDefaultValues (void);
+ virtual gboolean valueChanged (const std::string &section,
+ const std::string &name,
+ GVariant *value);
+private:
+ static void valueChangedCallback (IBusConfig *config,
+ const gchar *section,
+ const gchar *name,
+ GVariant *value,
+ ZhuyinConfig *self);
+
+private:
+ static std::unique_ptr<ZhuyinConfig> m_instance;
+};
+
+};
+
+#endif