nemiver r859 - in branches/0.5: . tests
- From: dodji svn gnome org
- To: svn-commits-list gnome org
- Subject: nemiver r859 - in branches/0.5: . tests
- Date: Sat, 21 Jun 2008 12:39:14 +0000 (UTC)
Author: dodji
Date: Sat Jun 21 12:39:14 2008
New Revision: 859
URL: http://svn.gnome.org/viewvc/nemiver?rev=859&view=rev
Log:
* tests/Makefile.am:
* tests/gtkmm-test.cc: add a test which loops infinitely (e.g. a simple
gtkmm program) to make it easier to test state behaviors while the program
is running in an infinite loop
Added:
branches/0.5/tests/gtkmm-test.cc
Modified:
branches/0.5/ChangeLog
branches/0.5/tests/Makefile.am
Modified: branches/0.5/tests/Makefile.am
==============================================================================
--- branches/0.5/tests/Makefile.am (original)
+++ branches/0.5/tests/Makefile.am Sat Jun 21 12:39:14 2008
@@ -28,7 +28,8 @@
docore inout \
pointerderef \
fooprog \
-templatedvar
+templatedvar \
+gtkmm-test
runtestgdbmi_SOURCES=test-gdbmi.cc
runtestgdbmi_LDADD= @NEMIVERCOMMON_LIBS@ \
@@ -36,6 +37,10 @@
$(top_builddir)/src/common/libnemivercommon.la \
$(top_builddir)/src/dbgengine/libgdbmiparser.la
+gtkmm_test_SOURCES=gtkmm-test.cc
+gtkmm_test_CXXFLAGS= @LIBGTKMM_CFLAGS@
+gtkmm_test_LDADD= @LIBGTKMM_LIBS@
+
fooprog_SOURCES=fooprog.cc
fooprog_LDADD= NEMIVERCOMMON_LIBS@ \
$(top_builddir)/src/common/libnemivercommon.la
Added: branches/0.5/tests/gtkmm-test.cc
==============================================================================
--- (empty file)
+++ branches/0.5/tests/gtkmm-test.cc Sat Jun 21 12:39:14 2008
@@ -0,0 +1,41 @@
+/*******************************************************************************
+ *
+ * Copyright (c) 2008 Jonathon Jongsma
+ *
+ * This file is part of nemiver
+ *
+ * This program 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 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, see <http://www.gnu.org/licenses/>
+ *
+ *******************************************************************************/
+
+#include <gtkmm.h>
+#include <iostream>
+
+void on_button_clicked ()
+{
+ std::cout << "Hello, World" << std::endl;
+}
+
+int main (int argc, char** argv)
+{
+ Gtk::Main kit (argc, argv);
+ Gtk::Window win;
+ Gtk::Button button ("Click Me");
+ button.signal_clicked ().connect (sigc::ptr_fun (on_button_clicked));
+ win.add (button);
+ win.show_all ();
+ Gtk::Main::run (win);
+ return 0;
+}
+
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]