From a215500011290121925cfe929d71b80696732230 Mon Sep 17 00:00:00 2001 From: Javier Date: Sun, 18 Jan 2015 02:03:56 +0100 Subject: initial import --- test/Makefile.am | 8 ++++++++ test/mdock-standalone.c | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 54 insertions(+) create mode 100644 test/Makefile.am create mode 100644 test/mdock-standalone.c (limited to 'test') 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 + * + * 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 . + */ + +#include +#include +#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; +} -- cgit v1.2.3