r51 - in trunk/src/target/OM-2007: . templates

mickey at gta01.hmw-consulting.de mickey at gta01.hmw-consulting.de
Mon Sep 25 15:53:57 CEST 2006


Author: mickey
Date: 2006-09-25 13:53:57 +0000 (Mon, 25 Sep 2006)
New Revision: 51

Added:
   trunk/src/target/OM-2007/templates/
   trunk/src/target/OM-2007/templates/gpl-header.h
   trunk/src/target/OM-2007/templates/gtk-derived-class.c
   trunk/src/target/OM-2007/templates/gtk-derived-class.h
   trunk/src/target/OM-2007/templates/lgpl-header.h
Log:
add template interfaces and implementations for OpenMoko 


Added: trunk/src/target/OM-2007/templates/gpl-header.h
===================================================================
--- trunk/src/target/OM-2007/templates/gpl-header.h	2006-09-25 12:50:20 UTC (rev 50)
+++ trunk/src/target/OM-2007/templates/gpl-header.h	2006-09-25 13:53:57 UTC (rev 51)
@@ -0,0 +1,18 @@
+/*
+ *  <AppName> -- <Purpose of the Application>
+ *
+ *  Authored By <Add your Name here>
+ *
+ *  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 General Public License as published by
+ *  the Free Software Foundation; version 2 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 General Public License for more details.
+ *
+ *  Current Version: $Rev$ ($Date$) [$Author$]
+ */


Property changes on: trunk/src/target/OM-2007/templates/gpl-header.h
___________________________________________________________________
Name: svn:eol-style
   + native

Added: trunk/src/target/OM-2007/templates/gtk-derived-class.c
===================================================================
--- trunk/src/target/OM-2007/templates/gtk-derived-class.c	2006-09-25 12:50:20 UTC (rev 50)
+++ trunk/src/target/OM-2007/templates/gtk-derived-class.c	2006-09-25 13:53:57 UTC (rev 51)
@@ -0,0 +1,67 @@
+#include "myobject.h"
+
+/* add your signals here */
+enum {
+    MYOBJECT_SIGNAL,
+    LAST_SIGNAL
+};
+
+static void myobject_class_init          (MyobjectClass *klass);
+static void myobject_init                (Myobject      *f);
+
+static guint myobject_signals[LAST_SIGNAL] = { 0 };
+
+GType myobject_get_type (void) /* Typechecking */
+{
+    static GType f_type = 0;
+
+    if (!f_type)
+    {
+        static const GTypeInfo f_info =
+        {
+            sizeof (MyobjectClass),
+            NULL, /* base_init */
+            NULL, /* base_finalize */
+            (GClassInitFunc) myobject_class_init,
+            NULL, /* class_finalize */
+            NULL, /* class_data */
+            sizeof (Myobject),
+            0,
+            (GInstanceInitFunc) myobject_init,
+        };
+
+        /* add the type of your parent class here */
+        f_type = g_type_register_static(MYOBJECT_PARENT, "Myobject", &f_info, 0);
+    }
+
+    return f_type;
+}
+
+static void myobject_class_init (MyobjectClass *klass) /* Class Initialization */
+{
+    myobject_signals[MYOBJECT_SIGNAL] = g_signal_new ("myobject",
+            G_TYPE_FROM_CLASS (klass),
+            G_SIGNAL_RUN_FIRST | G_SIGNAL_ACTION,
+            G_STRUCT_OFFSET (MyobjectClass, myobject),
+            NULL,
+            NULL,
+            g_cclosure_marshal_VOID__VOID,
+            G_TYPE_NONE, 0);
+}
+
+static void myobject_init (Myobject *f) /* Instance Construction */
+{
+    /* populate your widget here */
+}
+
+GtkWidget* myobject_new() /* Construction */
+{
+    return GTK_WIDGET(g_object_new(myobject_get_type(), NULL));
+}
+
+void myobject_clear(Myobject *f) /* Destruction */
+{
+    /* destruct your widgets here */
+}
+
+/* add new methods here */
\ No newline at end of file


Property changes on: trunk/src/target/OM-2007/templates/gtk-derived-class.c
___________________________________________________________________
Name: svn:eol-style
   + native

Added: trunk/src/target/OM-2007/templates/gtk-derived-class.h
===================================================================
--- trunk/src/target/OM-2007/templates/gtk-derived-class.h	2006-09-25 12:50:20 UTC (rev 50)
+++ trunk/src/target/OM-2007/templates/gtk-derived-class.h	2006-09-25 13:53:57 UTC (rev 51)
@@ -0,0 +1,42 @@
+#ifndef OPENMOKO_MYOBJECT_H
+#define OPENMOKO_MYOBJECT_H
+
+#include <glib.h>
+#include <glib-object.h>
+/* include your parent object here */
+
+G_BEGIN_DECLS
+
+#define MYOBJECT_TYPE            (myobject_get_type())
+#define MYOBJECT(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), MYOBJECT_TYPE, Myobject))
+#define MYOBJECT_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), MYOBJECT_TYPE, MyobjectClass))
+#define IS_MYOBJECT(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), MYOBJECT_TYPE))
+#define IS_MYOBJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), MYOBJECT_TYPE))
+
+typedef struct _Myobject       Myobject;
+typedef struct _MyobjectClass  MyobjectClass;
+
+struct _Myobject
+{
+    /* add your parent type here */
+    MyObjectParent parent;
+    /* add pointers to new members here */
+
+};
+
+struct _MyobjectClass
+{
+    /* add your parent class here */
+    MyObjectParentClass parent_class;
+    void (*myobject) (Myobject *f);
+};
+
+GType          myobject_get_type        (void);
+GtkWidget*     myobject_new             (void);
+void           myobject_clear           (Myobject *f);
+
+/* add additional methods here */
+
+G_END_DECLS
+
+#endif /* OPENMOKO_MYOBJECT_H */


Property changes on: trunk/src/target/OM-2007/templates/gtk-derived-class.h
___________________________________________________________________
Name: svn:eol-style
   + native

Added: trunk/src/target/OM-2007/templates/lgpl-header.h
===================================================================
--- trunk/src/target/OM-2007/templates/lgpl-header.h	2006-09-25 12:50:20 UTC (rev 50)
+++ trunk/src/target/OM-2007/templates/lgpl-header.h	2006-09-25 13:53:57 UTC (rev 51)
@@ -0,0 +1,18 @@
+/*
+ *  <LibName> -- <Purpose of the Library>
+ *
+ *  Authored By <Add your Name here>
+ *
+ *  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 Library Public License as published by
+ *  the Free Software Foundation; version 2 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 Library Public License for more details.
+ *
+ *  Current Version: $Rev$ ($Date$) [$Author$]
+ */


Property changes on: trunk/src/target/OM-2007/templates/lgpl-header.h
___________________________________________________________________
Name: svn:eol-style
   + native





More information about the commitlog mailing list