WM: minor changes to cursor API

This commit is contained in:
2018-10-25 15:18:24 +11:00
parent c9e36e5434
commit 2046817c08
2 changed files with 14 additions and 5 deletions

View File

@@ -1813,7 +1813,7 @@ static void WM_OT_console_toggle(wmOperatorType *ot)
* - draw(bContext): drawing callback for paint cursor
*/
void *WM_paint_cursor_activate(
wmPaintCursor *WM_paint_cursor_activate(
wmWindowManager *wm, bool (*poll)(bContext *C),
wmPaintCursorDraw draw, void *customdata)
{
@@ -1828,7 +1828,7 @@ void *WM_paint_cursor_activate(
return pc;
}
void WM_paint_cursor_end(wmWindowManager *wm, void *handle)
bool WM_paint_cursor_end(wmWindowManager *wm, wmPaintCursor *handle)
{
wmPaintCursor *pc;
@@ -1836,9 +1836,15 @@ void WM_paint_cursor_end(wmWindowManager *wm, void *handle)
if (pc == (wmPaintCursor *)handle) {
BLI_remlink(&wm->paintcursors, pc);
MEM_freeN(pc);
return;
return true;
}
}
return false;
}
void *WM_paint_cursor_customdata_get(wmPaintCursor *pc)
{
return pc->customdata;
}
/* *********************** radial control ****************** */