diff options
Diffstat (limited to 'intern/touch/intern/TOUCH_API.cpp')
-rw-r--r-- | intern/touch/intern/TOUCH_API.cpp | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/intern/touch/intern/TOUCH_API.cpp b/intern/touch/intern/TOUCH_API.cpp new file mode 100644 index 00000000000..8fe2e543b43 --- /dev/null +++ b/intern/touch/intern/TOUCH_API.cpp @@ -0,0 +1,56 @@ +/* + * ***** 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_API.cpp + * \ingroup TOUCH + */ + +#include "TOUCH_API.h" +#include "TOUCH_Manager.h" + +extern TOUCH_Handle TOUCH_InitManager() +{ + TOUCH_Manager::CreateManager(); + TOUCH_Manager * manager = TOUCH_Manager::GetManager(); + + return (TOUCH_Handle)manager; +} + +extern TOUCH_Handle TOUCH_GetManager() +{ + return (TOUCH_Handle)TOUCH_Manager::GetManager(); +} + +extern void TOUCH_DestroyManager(TOUCH_Handle* handle) { + delete handle; +} + +extern void TOUCH_AddTouchEvent(TOUCH_Handle* handle, void * event) +{ + TOUCH_Manager * manager = (TOUCH_Manager *) handle; + manager->AddTouchEvent(event); +} |