diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2008-12-10 22:22:10 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2008-12-10 22:22:10 +0300 |
commit | f00a75272e33d2e91a394a7a2336be572e1c92f6 (patch) | |
tree | c7b084bc742c259b95a9bee49a2b8d3e72a49cb8 /source/blender/editors/interface/interface_regions.c | |
parent | 64f9c67ca85a56fbc0a59b5c3a72c7f68c968445 (diff) |
UI:
* Added context pointer to function callbacks for buttons and blocks.
* Added a uiBlockSetHandleFunc, which will be called with the button
return value. This seems kind of redundant with uiBlockSetButmFunc,
but the latter uses a2 to pass the value.
Diffstat (limited to 'source/blender/editors/interface/interface_regions.c')
-rw-r--r-- | source/blender/editors/interface/interface_regions.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/editors/interface/interface_regions.c b/source/blender/editors/interface/interface_regions.c index 251db907bf4..a25e99e0d88 100644 --- a/source/blender/editors/interface/interface_regions.c +++ b/source/blender/editors/interface/interface_regions.c @@ -1024,7 +1024,7 @@ static void ui_update_block_buts_hex(uiBlock *block, char *hexcol) /* bt1 is palette but, col1 is original color */ /* callback to copy from/to palette */ -static void do_palette_cb(void *bt1, void *col1) +static void do_palette_cb(bContext *C, void *bt1, void *col1) { uiBut *but1= (uiBut *)bt1; float *col= (float *)col1; @@ -1048,7 +1048,7 @@ static void do_palette_cb(void *bt1, void *col1) /* bt1 is num but, hsv1 is pointer to original color in hsv space*/ /* callback to handle changes in num-buts in picker */ -static void do_palette1_cb(void *bt1, void *hsv1) +static void do_palette1_cb(bContext *C, void *bt1, void *hsv1) { uiBut *but1= (uiBut *)bt1; float *hsv= (float *)hsv1; @@ -1067,7 +1067,7 @@ static void do_palette1_cb(void *bt1, void *hsv1) /* bt1 is num but, col1 is pointer to original color */ /* callback to handle changes in num-buts in picker */ -static void do_palette2_cb(void *bt1, void *col1) +static void do_palette2_cb(bContext *C, void *bt1, void *col1) { uiBut *but1= (uiBut *)bt1; float *rgb= (float *)col1; @@ -1084,7 +1084,7 @@ static void do_palette2_cb(void *bt1, void *col1) ui_update_block_buts_hsv(but1->block, fp); } -static void do_palette_hex_cb(void *bt1, void *hexcl) +static void do_palette_hex_cb(bContext *C, void *bt1, void *hexcl) { uiBut *but1= (uiBut *)bt1; char *hexcol= (char *)hexcl; @@ -1093,7 +1093,7 @@ static void do_palette_hex_cb(void *bt1, void *hexcl) } /* used for both 3d view and image window */ -static void do_palette_sample_cb(void *bt1, void *col1) /* frontbuf */ +static void do_palette_sample_cb(bContext *C, void *bt1, void *col1) /* frontbuf */ { /* XXX 2.50 this should become an operator? */ #if 0 |