merge from trunk #37722
[blender-staging.git] / source / blender / editors / interface / interface_regions.c
index 623651083d24c470405b90f4135cfa58349c168c..62043f240e453fb6c44b4e38578edbb196226cb8 100644 (file)
@@ -2582,6 +2582,25 @@ void uiPupBlock(bContext *C, uiBlockCreateFunc func, void *arg)
        uiPupBlockO(C, func, arg, NULL, 0);
 }
 
+void uiPupBlockEx(bContext *C, uiBlockCreateFunc func, uiBlockCancelFunc cancel_func, void *arg)
+{
+       wmWindow *window= CTX_wm_window(C);
+       uiPopupBlockHandle *handle;
+       
+       handle= ui_popup_block_create(C, NULL, NULL, func, NULL, arg);
+       handle->popup= 1;
+       handle->retvalue= 1;
+
+       handle->popup_arg= arg;
+       // handle->popup_func= operator_cb;
+       handle->cancel_func= cancel_func;
+       // handle->opcontext= opcontext;
+       
+       UI_add_popup_handlers(C, &window->modalhandlers, handle);
+       WM_event_add_mousemove(C);
+}
+
+#if 0 /* UNUSED */
 void uiPupBlockOperator(bContext *C, uiBlockCreateFunc func, wmOperator *op, int opcontext)
 {
        wmWindow *window= CTX_wm_window(C);
@@ -2599,6 +2618,7 @@ void uiPupBlockOperator(bContext *C, uiBlockCreateFunc func, wmOperator *op, int
        UI_add_popup_handlers(C, &window->modalhandlers, handle);
        WM_event_add_mousemove(C);
 }
+#endif
 
 void uiPupBlockClose(bContext *C, uiBlock *block)
 {