r222 - trunk/src/target/OM-2007/openmoko-libs/libmokoui

mickey at gta01.hmw-consulting.de mickey at gta01.hmw-consulting.de
Mon Nov 13 19:47:30 CET 2006


Author: mickey
Date: 2006-11-13 18:47:30 +0000 (Mon, 13 Nov 2006)
New Revision: 222

Added:
   trunk/src/target/OM-2007/openmoko-libs/libmokoui/moko-finger-wheel.c
   trunk/src/target/OM-2007/openmoko-libs/libmokoui/moko-finger-wheel.h
Log:
mokoui: add new class MokoFingerWheel, representing the finger scroller wheel


Added: trunk/src/target/OM-2007/openmoko-libs/libmokoui/moko-finger-wheel.c
===================================================================
--- trunk/src/target/OM-2007/openmoko-libs/libmokoui/moko-finger-wheel.c	2006-11-13 18:46:51 UTC (rev 221)
+++ trunk/src/target/OM-2007/openmoko-libs/libmokoui/moko-finger-wheel.c	2006-11-13 18:47:30 UTC (rev 222)
@@ -0,0 +1,72 @@
+/*  moko-finger-wheel.c
+ *
+ *  Authored By Michael 'Mickey' Lauer <mlauer at vanille-media.de>
+ *
+ *  Copyright (C) 2006 Vanille-Media
+ *
+ *  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: 2006/10/05 17:38:14 $) [$Author: mickey $]
+ */
+
+#include "moko-finger-wheel.h"
+
+G_DEFINE_TYPE (MokoFingerWheel, moko_finger_wheel, MOKO_TYPE_FIXED)
+
+#define FINGER_WHEEL_PRIVATE(o)     (G_TYPE_INSTANCE_GET_PRIVATE ((o), MOKO_TYPE_FINGER_WHEEL, MokoFingerWheelPrivate))
+
+typedef struct _MokoFingerWheelPrivate
+{
+} MokoFingerWheelPrivate;
+
+/* forward declarations */
+/* ... */
+
+static void
+moko_finger_wheel_dispose (GObject *object)
+{
+    if (G_OBJECT_CLASS (moko_finger_wheel_parent_class)->dispose)
+        G_OBJECT_CLASS (moko_finger_wheel_parent_class)->dispose (object);
+}
+
+static void
+moko_finger_wheel_finalize (GObject *object)
+{
+    G_OBJECT_CLASS (moko_finger_wheel_parent_class)->finalize (object);
+}
+
+static void
+moko_finger_wheel_class_init (MokoFingerWheelClass *klass)
+{
+    GObjectClass *object_class = G_OBJECT_CLASS (klass);
+
+    /* register private data */
+    g_type_class_add_private (klass, sizeof (MokoFingerWheelPrivate));
+
+    /* hook virtual methods */
+    /* ... */
+
+    /* install properties */
+    /* ... */
+
+    object_class->dispose = moko_finger_wheel_dispose;
+    object_class->finalize = moko_finger_wheel_finalize;
+}
+
+static void
+moko_finger_wheel_init (MokoFingerWheel *self)
+{
+}
+
+MokoFingerWheel*
+moko_finger_wheel_new (void)
+{
+    return g_object_new (MOKO_TYPE_FINGER_WHEEL, NULL);
+}


Property changes on: trunk/src/target/OM-2007/openmoko-libs/libmokoui/moko-finger-wheel.c
___________________________________________________________________
Name: svn:eol-style
   + native

Added: trunk/src/target/OM-2007/openmoko-libs/libmokoui/moko-finger-wheel.h
===================================================================
--- trunk/src/target/OM-2007/openmoko-libs/libmokoui/moko-finger-wheel.h	2006-11-13 18:46:51 UTC (rev 221)
+++ trunk/src/target/OM-2007/openmoko-libs/libmokoui/moko-finger-wheel.h	2006-11-13 18:47:30 UTC (rev 222)
@@ -0,0 +1,50 @@
+/*  moko-finger-wheel.h
+ *
+ *  Authored By Michael 'Mickey' Lauer <mlauer at vanille-media.de>
+ *
+ *  Copyright (C) 2006 Vanille-Media
+ *
+ *  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: 2006/10/05 17:38:14 $) [$Author: mickey $]
+ */
+
+#ifndef _MOKO_FINGER_WHEEL_H_
+#define _MOKO_FINGER_WHEEL_H_
+
+#include "moko-fixed.h"
+
+#include <glib-object.h>
+
+G_BEGIN_DECLS
+
+#define MOKO_TYPE_FINGER_WHEEL moko_finger_wheel_get_type()
+#define MOKO_FINGER_WHEEL(obj)     (G_TYPE_CHECK_INSTANCE_CAST ((obj),     MOKO_TYPE_FINGER_WHEEL, MokoFingerWheel))
+#define MOKO_FINGER_WHEEL_CLASS(klass)     (G_TYPE_CHECK_CLASS_CAST ((klass),     MOKO_TYPE_FINGER_WHEEL, MokoFingerWheelClass))
+#define MOKO_IS_FINGER_WHEEL(obj)     (G_TYPE_CHECK_INSTANCE_TYPE ((obj),     MOKO_TYPE_FINGER_WHEEL))
+#define MOKO_IS_FINGER_WHEEL_CLASS(klass)     (G_TYPE_CHECK_CLASS_TYPE ((klass),     MOKO_TYPE_FINGER_WHEEL))
+#define MOKO_FINGER_WHEEL_GET_CLASS(obj)     (G_TYPE_INSTANCE_GET_CLASS ((obj),     MOKO_TYPE_FINGER_WHEEL, MokoFingerWheelClass))
+
+typedef struct {
+    MokoFixed parent;
+} MokoFingerWheel;
+
+typedef struct {
+    MokoFixedClass parent_class;
+} MokoFingerWheelClass;
+
+GType moko_finger_wheel_get_type (void);
+
+MokoFingerWheel* moko_finger_wheel_new (void);
+
+G_END_DECLS
+
+#endif // _MOKO_FINGER_WHEEL_H_
+


Property changes on: trunk/src/target/OM-2007/openmoko-libs/libmokoui/moko-finger-wheel.h
___________________________________________________________________
Name: svn:eol-style
   + native





More information about the commitlog mailing list