From a215500011290121925cfe929d71b80696732230 Mon Sep 17 00:00:00 2001 From: Javier Date: Sun, 18 Jan 2015 02:03:56 +0100 Subject: initial import --- test/mdock-standalone.c | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 test/mdock-standalone.c (limited to 'test/mdock-standalone.c') 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