summaryrefslogtreecommitdiff
path: root/test/mdock-standalone.c
diff options
context:
space:
mode:
authorJavier <dev.git@javispedro.com>2015-01-18 02:03:56 +0100
committerJavier <dev.git@javispedro.com>2015-01-18 02:03:56 +0100
commita215500011290121925cfe929d71b80696732230 (patch)
treec7b9fb078c42d65c8fc72e2bafe1aecd32f3f388 /test/mdock-standalone.c
downloadmdock-a215500011290121925cfe929d71b80696732230.tar.gz
mdock-a215500011290121925cfe929d71b80696732230.zip
initial import
Diffstat (limited to 'test/mdock-standalone.c')
-rw-r--r--test/mdock-standalone.c46
1 files changed, 46 insertions, 0 deletions
diff --git a/test/mdock-standalone.c b/test/mdock-standalone.c
new file mode 100644
index 0000000..e164bea
--- /dev/null
+++ b/test/mdock-standalone.c
@@ -0,0 +1,46 @@
+/*
+ * Copyright 2015 Javier S. Pedro <dev.git@javispedro.com>
+ *
+ * This file is part of MDock.
+ *
+ * MDock 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 3 of the License, or
+ * (at your option) any later version.
+ *
+ * MDock 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with MDock. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <stdlib.h>
+#include <gtk/gtk.h>
+#include "../libmdock/mdock-widget.h"
+
+static GtkWindow *mainwin;
+static MDockWidget *mdock;
+
+static void construct_main_window()
+{
+ mainwin = GTK_WINDOW(gtk_window_new(GTK_WINDOW_TOPLEVEL));
+ mdock = MDOCK_WIDGET(mdock_widget_new());
+ gtk_container_add(GTK_CONTAINER(mainwin), GTK_WIDGET(mdock));
+}
+
+int main(int argc, char **argv)
+{
+ gtk_init(&argc, &argv);
+ gtk_main();
+
+ construct_main_window();
+
+ g_signal_connect(mainwin, "destroy", G_CALLBACK(gtk_main_quit), NULL);
+
+ gtk_widget_show_all(GTK_WIDGET(mainwin));
+
+ return EXIT_SUCCESS;
+}