diff options
author | Javier <dev.git@javispedro.com> | 2015-01-18 02:03:56 +0100 |
---|---|---|
committer | Javier <dev.git@javispedro.com> | 2015-01-18 02:03:56 +0100 |
commit | a215500011290121925cfe929d71b80696732230 (patch) | |
tree | c7b9fb078c42d65c8fc72e2bafe1aecd32f3f388 /test | |
download | mdock-a215500011290121925cfe929d71b80696732230.tar.gz mdock-a215500011290121925cfe929d71b80696732230.zip |
initial import
Diffstat (limited to 'test')
-rw-r--r-- | test/Makefile.am | 8 | ||||
-rw-r--r-- | test/mdock-standalone.c | 46 |
2 files changed, 54 insertions, 0 deletions
diff --git a/test/Makefile.am b/test/Makefile.am new file mode 100644 index 0000000..6ac6987 --- /dev/null +++ b/test/Makefile.am @@ -0,0 +1,8 @@ +noinst_PROGRAMS = mdock-standalone + +AM_CPPFLAGS = $(GTK_CFLAGS) +AM_LDFLAGS = $(GTK_LIBS) + +mdock_standalone_SOURCES = mdock-standalone.c +mdock_standalone_CPPFLAGS = $(GTK_CFLAGS) +mdock_standalone_LDADD = $(GTK_LIBS) ../libmdock/libmdock.la 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; +} |