[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [48880] branches/soc-2012-swiss_cheese/ intern: Adds Cmake includes for the touch library

Nicholas Rishel rishel.nick at gmail.com
Fri Jul 13 01:15:36 CEST 2012


Revision: 48880
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=48880
Author:   nicholas_rishel
Date:     2012-07-12 23:15:36 +0000 (Thu, 12 Jul 2012)
Log Message:
-----------
Adds Cmake includes for the touch library
Extends/cleans up the existing types
Other little setup things.

Modified Paths:
--------------
    branches/soc-2012-swiss_cheese/intern/CMakeLists.txt
    branches/soc-2012-swiss_cheese/intern/touch/TOUCH_API.h

Added Paths:
-----------
    branches/soc-2012-swiss_cheese/intern/touch/CMakeLists.txt
    branches/soc-2012-swiss_cheese/intern/touch/TOUCH_Types.h
    branches/soc-2012-swiss_cheese/intern/touch/TOUCH_touch.h
    branches/soc-2012-swiss_cheese/intern/touch/intern/
    branches/soc-2012-swiss_cheese/intern/touch/intern/TOUCH_touch.cpp

Removed Paths:
-------------
    branches/soc-2012-swiss_cheese/intern/touch/touch_types.h

Modified: branches/soc-2012-swiss_cheese/intern/CMakeLists.txt
===================================================================
--- branches/soc-2012-swiss_cheese/intern/CMakeLists.txt	2012-07-12 22:42:02 UTC (rev 48879)
+++ branches/soc-2012-swiss_cheese/intern/CMakeLists.txt	2012-07-12 23:15:36 UTC (rev 48880)
@@ -67,6 +67,10 @@
 	add_subdirectory(cycles)
 endif()
 
+if(WITH_INPUT_TOUCH)
+	add_subdirectory(touch)
+endif()
+
 # only windows needs utf16 converter
 if(WIN32)
 	add_subdirectory(utfconv)

Added: branches/soc-2012-swiss_cheese/intern/touch/CMakeLists.txt
===================================================================
--- branches/soc-2012-swiss_cheese/intern/touch/CMakeLists.txt	                        (rev 0)
+++ branches/soc-2012-swiss_cheese/intern/touch/CMakeLists.txt	2012-07-12 23:15:36 UTC (rev 48880)
@@ -0,0 +1,43 @@
+# ***** BEGIN GPL LICENSE BLOCK *****
+#
+# 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, write to the Free Software Foundation,
+# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+# The Original Code is Copyright (C) 2012, Blender Foundation
+# All rights reserved.
+#
+# The Original Code is: all of this file.
+#
+# Contributor(s): Nicholas Rishel
+#
+# ***** END GPL LICENSE BLOCK *****
+
+set(INC
+	.
+	../string
+)
+
+set(INC_SYS
+
+)
+
+set(SRC
+	intern/TOUCH_Touch.cpp
+
+	TOUCH_API.h
+	TOUCH_Types.h
+	TOUCH_touch.h
+)
+
+blender_add_lib(bf_intern_touch "${SRC}" "${INC}" "${INC_SYS}")

Modified: branches/soc-2012-swiss_cheese/intern/touch/TOUCH_API.h
===================================================================
--- branches/soc-2012-swiss_cheese/intern/touch/TOUCH_API.h	2012-07-12 22:42:02 UTC (rev 48879)
+++ branches/soc-2012-swiss_cheese/intern/touch/TOUCH_API.h	2012-07-12 23:15:36 UTC (rev 48880)
@@ -25,24 +25,26 @@
  * ***** END GPL LICENSE BLOCK *****
  */
 
-/** \file TOUCH_API.h
+/** \file touch/TOUCH_API.h
  *  \ingroup TOUCH
  */
 
 #ifndef __TOUCH_API_H__
 #define __TOUCH_API_H__
 
+#include "TOUCH_touch.h"
+
 #ifdef __cplusplus
 extern "C" {
 #endif
 
-#inlude STR_String.h
-
 extern void TOUCH_InitManager();
 
-extern void TOUCH_RegisterContext(const STR_String context);
+extern void TOUCH_RegisterArea(STR_String context);
+extern void TOUCH_RegisterRegion(STR_String context);
+extern void TOUCH_RegisterData(STR_String context);
 
-extern void TOUCH_AddEvent();
+extern void TOUCH_AddTouchEvent(TOUCH_event_info event);
 
 #ifdef __cplusplus
 }

Copied: branches/soc-2012-swiss_cheese/intern/touch/TOUCH_Types.h (from rev 48878, branches/soc-2012-swiss_cheese/intern/touch/touch_types.h)
===================================================================
--- branches/soc-2012-swiss_cheese/intern/touch/TOUCH_Types.h	                        (rev 0)
+++ branches/soc-2012-swiss_cheese/intern/touch/TOUCH_Types.h	2012-07-12 23:15:36 UTC (rev 48880)
@@ -0,0 +1,60 @@
+/*
+ * ***** BEGIN GPL LICENSE BLOCK *****
+ *
+ * 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, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * The Original Code is Copyright (C) 2012 Blender Foundation.
+ * All rights reserved.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s): Nicholas Rishel
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ */
+
+/** \file touch/touch_types.h
+ *  \ingroup TOUCH
+ */
+
+#ifndef __TOUCH_TYPES_H__
+#define __TOUCH_TYPES_H__
+
+#include "STR_String.h"
+
+typedef struct TOUCH_registered_context {
+	TOUCH_registered_context *prev, *next;
+	STR_String context;
+	char encoding;
+} TOUCH_registered_context;
+
+typedef struct TOUCH_registered_context TOUCH_area;
+typedef struct TOUCH_registered_context TOUCH_region;
+typedef struct TOUCH_registered_context TOUCH_data;
+
+typedef struct TOUCH_context_full {
+	TOUCH_area area;
+	TOUCH_region region;
+	TOUCH_data data;
+} TOUCH_context;
+
+typedef struct TOUCH_event_info {
+	TOUCH_event_info *prev, *next;
+	int position_x, position_y;
+	char id;
+	STR_String area, region, data;
+} TOUCH_event_info;
+
+#endif /* TOUCH_TYPES_H */

Added: branches/soc-2012-swiss_cheese/intern/touch/TOUCH_touch.h
===================================================================
--- branches/soc-2012-swiss_cheese/intern/touch/TOUCH_touch.h	                        (rev 0)
+++ branches/soc-2012-swiss_cheese/intern/touch/TOUCH_touch.h	2012-07-12 23:15:36 UTC (rev 48880)
@@ -0,0 +1,49 @@
+/*
+ * ***** BEGIN GPL LICENSE BLOCK *****
+ *
+ * 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, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * The Original Code is Copyright (C) 2012 Blender Foundation.
+ * All rights reserved.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s): Nicholas Rishel
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ */
+
+/** \file touch/TOUCH_touch.h
+ *  \ingroup TOUCH
+ */
+
+#ifndef __TOUCH_TOUCH_H__
+#define __TOUCH_TOUCH_H__
+
+#include "TOUCH_Types.h"
+
+void TOUCH_InitManager();
+
+void TOUCH_RegisterArea(STR_String context);
+void TOUCH_RegisterRegion(STR_String context);
+void TOUCH_RegisterData(STR_String context);
+
+void TOUCH_AddTouchEvent(TOUCH_event_info event);
+
+char checkRegisteredArea(STR_String area);
+char checkRegisteredRegion(STR_String region);
+char checkRegisteredData(STR_String data);
+
+#endif /* __TOUCH_TOUCH_H__ */

Added: branches/soc-2012-swiss_cheese/intern/touch/intern/TOUCH_touch.cpp
===================================================================
--- branches/soc-2012-swiss_cheese/intern/touch/intern/TOUCH_touch.cpp	                        (rev 0)
+++ branches/soc-2012-swiss_cheese/intern/touch/intern/TOUCH_touch.cpp	2012-07-12 23:15:36 UTC (rev 48880)
@@ -0,0 +1,40 @@
+/*
+ * ***** BEGIN GPL LICENSE BLOCK *****
+ *
+ * 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, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * The Original Code is Copyright (C) 2012 Blender Foundation.
+ * All rights reserved.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s): Nicholas Rishel
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ */
+
+/** \file touch/intern/TOUCH_touch.cpp
+ *  \ingroup TOUCH
+ */
+
+#include "TOUCH_touch.h"
+
+void TOUCH_InitManager(){};
+
+void TOUCH_RegisterArea(STR_String context){};
+void TOUCH_RegisterRegion(STR_String context){};
+void TOUCH_RegisterData(STR_String context){};
+
+void TOUCH_AddTouchEvent(TOUCH_event_info event){};

Deleted: branches/soc-2012-swiss_cheese/intern/touch/touch_types.h
===================================================================
--- branches/soc-2012-swiss_cheese/intern/touch/touch_types.h	2012-07-12 22:42:02 UTC (rev 48879)
+++ branches/soc-2012-swiss_cheese/intern/touch/touch_types.h	2012-07-12 23:15:36 UTC (rev 48880)
@@ -1,42 +0,0 @@
-/*
- * ***** BEGIN GPL LICENSE BLOCK *****
- *
- * 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, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * The Original Code is Copyright (C) 2012 Blender Foundation.
- * All rights reserved.
- *
- * The Original Code is: all of this file.
- *
- * Contributor(s): Nicholas Rishel
- *
- * ***** END GPL LICENSE BLOCK *****
- */
-
-/** \file touch_types.h
- *  \ingroup TOUCH
- */
-
-#ifndef __TOUCH_TYPES_H__
-#define __TOUCH_TYPES_H__
-
-#include STR_String.h
-
-typedef struct touchRegisteredContext {
-	STR_String AreaType;
-	SRT_String RegionType;
-} touchRegisteredContext;
-
-#endif // TOUCH_TYPES_H




More information about the Bf-blender-cvs mailing list