diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-09-07 03:17:29 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-09-07 03:17:29 +0400 |
commit | ec986b2c34f1c5bdd682ef5916760f55e1df6eca (patch) | |
tree | 2b58aaa00bb502546a5ca12785e555baa0006812 /source/blender/makesrna/intern/rna_wm_api.c | |
parent | 2c688788e6d5508f3138371fc4c818041d66f392 (diff) |
rna wrap WM_cursor_warp
Diffstat (limited to 'source/blender/makesrna/intern/rna_wm_api.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_wm_api.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/source/blender/makesrna/intern/rna_wm_api.c b/source/blender/makesrna/intern/rna_wm_api.c index 5c6916a2335..824fed98338 100644 --- a/source/blender/makesrna/intern/rna_wm_api.c +++ b/source/blender/makesrna/intern/rna_wm_api.c @@ -327,17 +327,21 @@ void RNA_api_window(StructRNA *srna) FunctionRNA *func; PropertyRNA *parm; - (void)func; - (void)parm; + func = RNA_def_function(srna, "cursor_warp", "WM_cursor_warp"); + parm = RNA_def_int(func, "x", 0, INT_MIN, INT_MAX, "", "", INT_MIN, INT_MAX); + RNA_def_property_flag(parm, PROP_REQUIRED); + parm = RNA_def_int(func, "y", 0, INT_MIN, INT_MAX, "", "", INT_MIN, INT_MAX); + RNA_def_property_flag(parm, PROP_REQUIRED); + RNA_def_function_ui_description(func, "Set the cursor position"); func = RNA_def_function(srna, "cursor_set", "WM_cursor_set"); - parm = RNA_def_property(func, "icon", PROP_ENUM, PROP_NONE); + parm = RNA_def_property(func, "cursor", PROP_ENUM, PROP_NONE); RNA_def_property_enum_items(parm, window_cursor_items); RNA_def_property_flag(parm, PROP_REQUIRED); RNA_def_function_ui_description(func, "Set the cursor"); func = RNA_def_function(srna, "cursor_modal_set", "WM_cursor_modal_set"); - parm = RNA_def_property(func, "icon", PROP_ENUM, PROP_NONE); + parm = RNA_def_property(func, "cursor", PROP_ENUM, PROP_NONE); RNA_def_property_enum_items(parm, window_cursor_items); RNA_def_property_flag(parm, PROP_REQUIRED); RNA_def_function_ui_description(func, "Set the cursor, so the previous cursor can be restored"); |