Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2009-04-20 19:06:46 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2009-04-20 19:06:46 +0400
commit874c29cea8e6f9bc411fccf2d6f4cb07e94328d0 (patch)
tree5971e577cf7c02e05a1e37b5ad058c71a6744877 /source/gameengine/GameLogic/SCA_KeyboardSensor.h
parent7555bfa793a2b0fc187c6211c56986f35b2d7b09 (diff)
parentc5bc4e4fb1a33eda8c31f2ea02e91f32f74c8fa5 (diff)
2.50: svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r19323:HEAD
Notes: * blenderbuttons and ICON_SNAP_PEEL_OBJECT were not merged.
Diffstat (limited to 'source/gameengine/GameLogic/SCA_KeyboardSensor.h')
-rw-r--r--source/gameengine/GameLogic/SCA_KeyboardSensor.h58
1 files changed, 32 insertions, 26 deletions
diff --git a/source/gameengine/GameLogic/SCA_KeyboardSensor.h b/source/gameengine/GameLogic/SCA_KeyboardSensor.h
index bc2f86327a5..073b3e6dbe0 100644
--- a/source/gameengine/GameLogic/SCA_KeyboardSensor.h
+++ b/source/gameengine/GameLogic/SCA_KeyboardSensor.h
@@ -82,22 +82,6 @@ class SCA_KeyboardSensor : public SCA_ISensor
void AddToTargetProp(int keyIndex);
/**
- * Determine whether this character can be printed. We cannot use
- * the library functions here, because we need to test our own
- * keycodes. */
- bool IsPrintable(int keyIndex);
-
- /**
- * Transform keycodes to something printable.
- */
- char ToCharacter(int keyIndex, bool shifted);
-
- /**
- * Tests whether this is a delete key.
- */
- bool IsDelete(int keyIndex);
-
- /**
* Tests whether shift is pressed.
*/
bool IsShifted(void);
@@ -126,33 +110,55 @@ public:
/* Python interface ---------------------------------------------------- */
/* --------------------------------------------------------------------- */
- virtual PyObject* _getattr(const char *attr);
- virtual int _setattr(const char *attr, PyObject *value);
+ virtual PyObject* py_getattro(PyObject *attr);
+ virtual int py_setattro(PyObject *attr, PyObject *value);
//Deprecated functions ----->
/** 1. GetKey : check which key this sensor looks at */
- KX_PYMETHOD_DOC(SCA_KeyboardSensor,GetKey);
+ KX_PYMETHOD_DOC_NOARGS(SCA_KeyboardSensor,GetKey);
/** 2. SetKey: change the key to look at */
- KX_PYMETHOD_DOC(SCA_KeyboardSensor,SetKey);
+ KX_PYMETHOD_DOC_VARARGS(SCA_KeyboardSensor,SetKey);
/** 3. GetHold1 : set the first bucky bit */
- KX_PYMETHOD_DOC(SCA_KeyboardSensor,GetHold1);
+ KX_PYMETHOD_DOC_NOARGS(SCA_KeyboardSensor,GetHold1);
/** 4. SetHold1: change the first bucky bit */
- KX_PYMETHOD_DOC(SCA_KeyboardSensor,SetHold1);
+ KX_PYMETHOD_DOC_VARARGS(SCA_KeyboardSensor,SetHold1);
/** 5. GetHold2 : set the second bucky bit */
- KX_PYMETHOD_DOC(SCA_KeyboardSensor,GetHold2);
+ KX_PYMETHOD_DOC_NOARGS(SCA_KeyboardSensor,GetHold2);
/** 6. SetHold2: change the second bucky bit */
- KX_PYMETHOD_DOC(SCA_KeyboardSensor,SetHold2);
+ KX_PYMETHOD_DOC_VARARGS(SCA_KeyboardSensor,SetHold2);
/** 9. GetPressedKeys: */
- KX_PYMETHOD_DOC(SCA_KeyboardSensor,GetPressedKeys);
+ KX_PYMETHOD_DOC_NOARGS(SCA_KeyboardSensor,GetPressedKeys);
/** 9. GetCurrrentlyPressedKeys: */
- KX_PYMETHOD_DOC(SCA_KeyboardSensor,GetCurrentlyPressedKeys);
+ KX_PYMETHOD_DOC_NOARGS(SCA_KeyboardSensor,GetCurrentlyPressedKeys);
// <------
// KeyEvents:
KX_PYMETHOD_DOC_NOARGS(SCA_KeyboardSensor,getEventList);
// KeyStatus:
KX_PYMETHOD_DOC_O(SCA_KeyboardSensor,getKeyStatus);
+
+ static PyObject* pyattr_get_events(void* self_v, const KX_PYATTRIBUTE_DEF *attrdef);
};
+
+/**
+ * Transform keycodes to something printable.
+ */
+char ToCharacter(int keyIndex, bool shifted);
+
+/**
+ * Determine whether this character can be printed. We cannot use
+ * the library functions here, because we need to test our own
+ * keycodes. */
+bool IsPrintable(int keyIndex);
+
+/**
+ * Tests whether this is a delete key.
+ */
+bool IsDelete(int keyIndex);
+
+
#endif //__KX_KEYBOARDSENSOR
+
+