Initial commit
authorJavier Jardón <javier.jardon@codethink.co.uk>
Mon, 28 Mar 2011 17:19:21 +0000 (18:19 +0100)
committerJavier Jardón <jjardon@gnome.org>
Mon, 28 Mar 2011 17:19:21 +0000 (18:19 +0100)
Makefile.am [new file with mode: 0644]
autogen.sh [new file with mode: 0755]
configure.ac [new file with mode: 0644]
src/moonshot-window.vala [new file with mode: 0644]

diff --git a/Makefile.am b/Makefile.am
new file mode 100644 (file)
index 0000000..fdc3ce5
--- /dev/null
@@ -0,0 +1,17 @@
+ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
+
+bin_PROGRAMS = src/moonshot
+
+
+AM_CPPFLAGS = \
+       -include config.h \
+       $(moonshot_CFLAGS)
+
+AM_VALAFLAGS = \
+       --pkg gtk+-2.0
+
+src_moonshot_SOURCES = \
+        src/moonshot-window.vala
+
+src_moonshot_LDADD = \
+        $(moonshot_LIBS)
diff --git a/autogen.sh b/autogen.sh
new file mode 100755 (executable)
index 0000000..eaebcfa
--- /dev/null
@@ -0,0 +1,7 @@
+#! /bin/sh
+
+test -n "$srcdir" || srcdir=`dirname "$0"`
+test -n "$srcdir" || srcdir=.
+mkdir -p m4
+autoreconf --force --install --verbose "$srcdir"
+test -n "$NOCONFIGURE" || "$srcdir/configure" "$@"
diff --git a/configure.ac b/configure.ac
new file mode 100644 (file)
index 0000000..34f258e
--- /dev/null
@@ -0,0 +1,31 @@
+AC_PREREQ([2.66])
+AC_INIT([Moonshot],
+        [0.0.1],
+        [BUG-REPORT-ADDRESS],
+        [moonshot])
+
+AC_CONFIG_HEADERS([config.h])
+AC_CONFIG_SRCDIR([configure.ac])
+AC_CONFIG_MACRO_DIR([m4])
+AC_CONFIG_AUX_DIR([build-aux])
+
+AM_INIT_AUTOMAKE([1.11 -Wall foreign subdir-objects])
+AM_SILENT_RULES([yes])
+
+# Checks for programs.
+AC_PROG_CC
+AM_PROG_CC_C_O
+AM_PROG_VALAC([0.9])
+
+# Dependencies
+PKG_CHECK_MODULES(moonshot,[
+        glib-2.0 >= 2.26
+        gobject-2.0 >= 2.26
+        gtk+-2.0 >= 2.22
+])
+
+AC_CONFIG_FILES([
+        Makefile
+])
+
+AC_OUTPUT
diff --git a/src/moonshot-window.vala b/src/moonshot-window.vala
new file mode 100644 (file)
index 0000000..a403122
--- /dev/null
@@ -0,0 +1,29 @@
+using Gtk;
+
+class MoonshotWindow
+{
+    private Gtk.Window window;
+
+    public MoonshotWindow()
+    {
+        window = new Gtk.Window();
+        window.destroy.connect(Gtk.main_quit);
+    }
+
+    public void show()
+    {
+        window.show();
+    }
+
+    public static int main(string[] args)
+    {
+        Gtk.init(ref args);
+
+        var window = new MoonshotWindow();
+        window.show ();
+
+        Gtk.main();
+
+        return 0;
+    }
+}