summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Makefile.am25
-rw-r--r--src/config.vapi9
-rw-r--r--src/main.vala40
3 files changed, 74 insertions, 0 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
new file mode 100644
index 0000000..6ad7fb5
--- /dev/null
+++ b/src/Makefile.am
@@ -0,0 +1,25 @@
+## Process this file with automake to produce Makefile.in
+
+AM_CPPFLAGS = \
+ -DPACKAGE_LOCALE_DIR=\""$(localedir)"\" \
+ -DPACKAGE_SRC_DIR=\""$(srcdir)"\" \
+ -DPACKAGE_DATA_DIR=\""$(pkgdatadir)"\" \
+ $(IBUS_LIBZHUYIN_CFLAGS)
+
+AM_CFLAGS =\
+ -Wall\
+ -g
+
+bin_PROGRAMS = ibus_engine_libzhuyin
+
+ibus_engine_libzhuyin_SOURCES = \
+ main.vala config.vapi
+
+ibus_engine_libzhuyin_VALAFLAGS = \
+ --pkg gtk+-3.0
+
+
+ibus_engine_libzhuyin_LDFLAGS = \
+ -Wl,--export-dynamic
+
+ibus_engine_libzhuyin_LDADD = $(IBUS_LIBZHUYIN_LIBS)
diff --git a/src/config.vapi b/src/config.vapi
new file mode 100644
index 0000000..4e239cb
--- /dev/null
+++ b/src/config.vapi
@@ -0,0 +1,9 @@
+[CCode (cprefix = "", lower_case_cprefix = "", cheader_filename = "config.h")]
+namespace Config {
+ public const string GETTEXT_PACKAGE;
+ public const string PACKAGE_DATA_DIR;
+ public const string PACKAGE_LOCALE_DIR;
+ public const string PACKAGE_NAME;
+ public const string PACKAGE_VERSION;
+ public const string VERSION;
+}
diff --git a/src/main.vala b/src/main.vala
new file mode 100644
index 0000000..57ba79f
--- /dev/null
+++ b/src/main.vala
@@ -0,0 +1,40 @@
+/*
+ * main.vala
+ * Copyright (C) 2013 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.
+ */
+
+using GLib;
+using Gtk;
+using IBus;
+
+public class Main : Object
+{
+
+
+ static int main (string[] args)
+ {
+ IBus.init ();
+ Gtk.init (ref args);
+
+ var app = new Main ();
+
+ Gtk.main ();
+
+ return 0;
+ }
+}
+