diff options
Diffstat (limited to 'source/blender/windowmanager/WM_api.h')
-rw-r--r-- | source/blender/windowmanager/WM_api.h | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/source/blender/windowmanager/WM_api.h b/source/blender/windowmanager/WM_api.h index 64abda4a849..6b020a07fb9 100644 --- a/source/blender/windowmanager/WM_api.h +++ b/source/blender/windowmanager/WM_api.h @@ -65,6 +65,7 @@ void WM_keymap_verify_item(ListBase *lb, char *idname, short type, void WM_keymap_add_item (ListBase *lb, char *idname, short type, short val, int modifier, short keymodifier); struct wmEventHandler *WM_event_add_keymap_handler(ListBase *keymap, ListBase *handlers); +void WM_event_remove_keymap_handler(ListBase *keymap, ListBase *handlers); struct wmEventHandler *WM_event_add_modal_handler(ListBase *handlers, wmOperator *op); void WM_event_remove_modal_handler(ListBase *handlers, wmOperator *op); @@ -81,7 +82,7 @@ int WM_operator_winactive (struct bContext *C); /* operator api */ wmOperatorType *WM_operatortype_find(const char *idname); -void WM_operatortypelist_append(ListBase *lb); +void WM_operatortype_append(void (*opfunc)(wmOperatorType*)); /* * Operator property api @@ -98,10 +99,13 @@ void WM_operatortypelist_append(ListBase *lb); * I really think that is better duplicate the string, so we are * really sure that the property data don't change. * - * OP_get_int/float/array return 0 on success (found the property) - * or != 0 if can't found the property in the operator. + * OP_get_int/float/array return 1 on success (found the property) + * or 0 if can't find the property in the operator. * The property value are store in the "value" pointer. * + * OP_verify_* sets the value only if it wasn't set already, and + * returns the existing or new value. + * * Both array function copy the property data into the "array" * pointer, but you need init the len pointer to the "array" size. * @@ -128,6 +132,12 @@ char *OP_get_string(wmOperator *op, char *name); int OP_get_int_array(wmOperator *op, char *name, int *array, short *len); int OP_get_float_array(wmOperator *op, char *name, float *array, short *len); +void OP_verify_int(wmOperator *op, char *name, int value, int *result); +void OP_verify_float(wmOperator *op, char *name, float value, int *result); +char *OP_verify_string(wmOperator *op, char *name, char *str); +void OP_verify_int_array(wmOperator *op, char *name, int *array, short len, int *resultarray, short *resultlen); +void OP_verify_float_array(wmOperator *op, char *name, float *array, short len, float *resultarray, short *resultlen); + /* * Need call this function in the "exit callback" * of the operator, but only if you use the property system. @@ -135,9 +145,9 @@ int OP_get_float_array(wmOperator *op, char *name, float *array, short *len); void OP_free_property(wmOperator *op); /* Gesture manager API */ -void WM_gesture_init(bContext *C, int type); -void WM_gesture_update(bContext *C, struct wmGesture *from); -void WM_gesture_end(bContext *C, int type); +void WM_gesture_init(struct bContext *C, int type); +void WM_gesture_update(struct bContext *C, struct wmGesture *from); +void WM_gesture_end(struct bContext *C, int type); void WM_gesture_free(wmWindow *win); /* OpenGL wrappers, mimicing opengl syntax */ |