r72 - in trunk/src/target/OM-2007/examples: . openmoko-finger-demo

mickey at gta01.hmw-consulting.de mickey at gta01.hmw-consulting.de
Fri Oct 13 12:37:37 CEST 2006


Author: mickey
Date: 2006-10-13 10:37:36 +0000 (Fri, 13 Oct 2006)
New Revision: 72

Added:
   trunk/src/target/OM-2007/examples/openmoko-finger-demo/
   trunk/src/target/OM-2007/examples/openmoko-finger-demo/.svnignore
   trunk/src/target/OM-2007/examples/openmoko-finger-demo/README
   trunk/src/target/OM-2007/examples/openmoko-finger-demo/demo-main.c
   trunk/src/target/OM-2007/examples/openmoko-finger-demo/demo-main.h
   trunk/src/target/OM-2007/examples/openmoko-finger-demo/openmoko-finger-demo.pro
Log:
add openmoko-finger-demo skeleton


Added: trunk/src/target/OM-2007/examples/openmoko-finger-demo/.svnignore
===================================================================
--- trunk/src/target/OM-2007/examples/openmoko-finger-demo/.svnignore	2006-10-13 10:15:54 UTC (rev 71)
+++ trunk/src/target/OM-2007/examples/openmoko-finger-demo/.svnignore	2006-10-13 10:37:36 UTC (rev 72)
@@ -0,0 +1,3 @@
+Makefile
+*~
+

Added: trunk/src/target/OM-2007/examples/openmoko-finger-demo/README
===================================================================
--- trunk/src/target/OM-2007/examples/openmoko-finger-demo/README	2006-10-13 10:15:54 UTC (rev 71)
+++ trunk/src/target/OM-2007/examples/openmoko-finger-demo/README	2006-10-13 10:37:36 UTC (rev 72)
@@ -0,0 +1,4 @@
+This is a typical example of an OpenMoko Finger Application
+using the OpenMoko Application Framework.
+
+Feel free to use this as a template for your own finger applications.

Added: trunk/src/target/OM-2007/examples/openmoko-finger-demo/demo-main.c
===================================================================
--- trunk/src/target/OM-2007/examples/openmoko-finger-demo/demo-main.c	2006-10-13 10:15:54 UTC (rev 71)
+++ trunk/src/target/OM-2007/examples/openmoko-finger-demo/demo-main.c	2006-10-13 10:37:36 UTC (rev 72)
@@ -0,0 +1,70 @@
+/*
+ *  Finger-Demo -- OpenMoko Demo Application
+ *
+ *  Authored By Michael 'Mickey' Lauer <mlauer at vanille-media.de>
+ *
+ *  Copyright (C) 2006 First International Computer Inc.
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU Public License as published by
+ *  the Free Software Foundation; version 2.1 of the license.
+ *
+ *  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 Public License for more details.
+ *
+ *  Current Version: $Rev$ ($Date$) [$Author$]
+ */
+
+#include <mokoui/moko-application.h>
+#include <mokoui/moko-finger-window.h>
+
+#include <gtk/gtkactiongroup.h>
+#include <gtk/gtkbutton.h>
+#include <gtk/gtkcheckmenuitem.h>
+#include <gtk/gtkmain.h>
+#include <gtk/gtkmenu.h>
+#include <gtk/gtkmenutoolbutton.h>
+#include <gtk/gtkstock.h>
+#include <gtk/gtktoolbutton.h>
+#include <gtk/gtkuimanager.h>
+#include <gtk/gtkvbox.h>
+
+#include <stdlib.h>
+
+int main( int argc, char** argv )
+{
+    g_debug( "openmoko-finger-demo starting up" );
+    /* Initialize GTK+ */
+    gtk_init( &argc, &argv );
+
+    /* application object */
+    MokoApplication* app = MOKO_APPLICATION(moko_application_get_instance());
+    g_set_application_name( "OpenMoko-Finger-Demo" );
+
+    /* main window */
+    MokoFingerWindow* window = MOKO_FINGER_WINDOW(moko_finger_window_new());
+
+    /* application menu */
+    GtkMenu* appmenu = GTK_MENU(gtk_menu_new());
+    GtkMenuItem* closeitem = GTK_MENU_ITEM(gtk_menu_item_new_with_label( "Close" ));
+    g_signal_connect( G_OBJECT(closeitem), "activate", G_CALLBACK(gtk_main_quit), NULL );
+    gtk_menu_shell_append( appmenu, closeitem );
+    //moko_finger_window_set_application_menu( window, appmenu );
+
+    /* connect close event */
+    g_signal_connect( G_OBJECT(window), "delete_event", G_CALLBACK( gtk_main_quit ), NULL );
+
+    /* navigation area */
+    GtkButton* contents = gtk_button_new_with_label( "Hello Finger Area!" );
+    //moko_finger_window_set_contents( window, GTK_WIDGET(contents) );
+
+    /* show everything and run main loop */
+    gtk_widget_show_all( GTK_WIDGET(window) );
+    g_debug( "openmoko-finger-demo entering main loop" );
+    gtk_main();
+    g_debug( "openmoko-finger-demo left main loop" );
+
+    return 0;
+}


Property changes on: trunk/src/target/OM-2007/examples/openmoko-finger-demo/demo-main.c
___________________________________________________________________
Name: svn:eol-style
   + native

Added: trunk/src/target/OM-2007/examples/openmoko-finger-demo/demo-main.h
===================================================================
--- trunk/src/target/OM-2007/examples/openmoko-finger-demo/demo-main.h	2006-10-13 10:15:54 UTC (rev 71)
+++ trunk/src/target/OM-2007/examples/openmoko-finger-demo/demo-main.h	2006-10-13 10:37:36 UTC (rev 72)
@@ -0,0 +1,19 @@
+/*
+ *  Finger-Demo -- OpenMoko Demo Application
+ *
+ *  Authored By Michael 'Mickey' Lauer <mlauer at vanille-media.de>
+ *
+ *  Copyright (C) 2006 First International Computer Inc.
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU Public License as published by
+ *  the Free Software Foundation; version 2.1 of the license.
+ *
+ *  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 Public License for more details.
+ *
+ *  Current Version: $Rev$ ($Date$) [$Author$]
+ */
+


Property changes on: trunk/src/target/OM-2007/examples/openmoko-finger-demo/demo-main.h
___________________________________________________________________
Name: svn:eol-style
   + native

Added: trunk/src/target/OM-2007/examples/openmoko-finger-demo/openmoko-finger-demo.pro
===================================================================
--- trunk/src/target/OM-2007/examples/openmoko-finger-demo/openmoko-finger-demo.pro	2006-10-13 10:15:54 UTC (rev 71)
+++ trunk/src/target/OM-2007/examples/openmoko-finger-demo/openmoko-finger-demo.pro	2006-10-13 10:37:36 UTC (rev 72)
@@ -0,0 +1,6 @@
+MOKOCONFIG = mokoui
+
+HEADERS = demo-main.h
+SOURCES = demo-main.c
+
+include ( $(OPENMOKODIR)/qmake/openmoko-include.pro )





More information about the commitlog mailing list