patch #2911 - tp_getset for Lamp module.

A nice juicy chunk of new style attribute handling from Ken Hughes.

Thanks, Ken.
This commit is contained in:
Stephen Swaney
2005-08-27 18:44:56 +00:00
parent eb1f65768a
commit adc1d7137a
3 changed files with 948 additions and 636 deletions

View File

@@ -97,6 +97,26 @@ int EXPP_map_getShortVal( const EXPP_map_pair * map,
int EXPP_map_getStrVal( const EXPP_map_pair * map,
int ival, const char **sval );
/* clamping and range-checking utilities */
int EXPP_setCharClamped ( PyObject *value, char *param,
short min, short max);
int EXPP_setShortClamped ( PyObject *value, short *param,
short min, short max);
int EXPP_setIntClamped ( PyObject *value, int *param,
int min, int max);
int EXPP_setFloatClamped ( PyObject *value, float *param,
float min, float max);
int EXPP_setChrRange ( PyObject *value, char *param,
short min, short max);
int EXPP_setShortRange ( PyObject *value, short *param,
short min, short max);
int EXPP_setIntRange ( PyObject *value, int *param,
int min, int max);
int EXPP_setFloatRange ( PyObject *value, float *param,
float min, float max);
/* scriplinks-related: */
PyObject *EXPP_getScriptLinks(ScriptLink *slink, PyObject *args, int is_scene);
PyObject *EXPP_addScriptLink(ScriptLink *slink, PyObject *args, int is_scene);
@@ -106,3 +126,4 @@ PyObject *EXPP_clearScriptLinks(ScriptLink *slink, PyObject *args);
void EXPP_allqueue(unsigned short event, short val);
#endif /* EXPP_gen_utils_h */