mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-09-21 21:26:12 +00:00
Expose proper capture closing function to python extensions
This commit is contained in:
@@ -286,6 +286,17 @@ This may not be possible on all OSs, so the function is not guaranteed to succee
|
||||
)");
|
||||
virtual void BringToFront() = 0;
|
||||
|
||||
DOCUMENT(R"(Prompt the user to close the currently open capture file. This will go through the
|
||||
normal workflow and ask the user to save any unsaved capture.
|
||||
|
||||
If no capture is open, this function returns True immediately.
|
||||
|
||||
:return: True if no capture was open, or if it was successfully closed. False if the capture is
|
||||
still open due to user interactions.
|
||||
:rtype: bool
|
||||
)");
|
||||
virtual bool PromptCloseCapture() = 0;
|
||||
|
||||
protected:
|
||||
IMainWindow() = default;
|
||||
~IMainWindow() = default;
|
||||
|
||||
@@ -797,6 +797,7 @@ struct IMainWindowInvoker : UIThreadInvoker<IMainWindow>
|
||||
return InvokeVoidFunction(&IMainWindow::UnregisterShortcut, shortcut, widget);
|
||||
}
|
||||
void BringToFront() { return InvokeVoidFunction(&IMainWindow::BringToFront); }
|
||||
bool PromptCloseCapture() { return InvokeRetFunction<bool>(&IMainWindow::PromptCloseCapture); }
|
||||
};
|
||||
|
||||
struct IEventBrowserInvoker : UIThreadInvoker<IEventBrowser>
|
||||
|
||||
@@ -84,6 +84,7 @@ public:
|
||||
void RegisterShortcut(const rdcstr &shortcut, QWidget *widget, ShortcutCallback callback) override;
|
||||
void UnregisterShortcut(const rdcstr &shortcut, QWidget *widget) override;
|
||||
void BringToFront() override;
|
||||
bool PromptCloseCapture() override;
|
||||
|
||||
// ICaptureViewer
|
||||
void OnCaptureLoaded() override;
|
||||
@@ -118,7 +119,6 @@ public:
|
||||
void ShowLiveCapture(LiveCapture *live);
|
||||
void LiveCaptureClosed(LiveCapture *live);
|
||||
|
||||
bool PromptCloseCapture();
|
||||
bool PromptSaveCaptureAs();
|
||||
bool SaveCurrentCapture(QString saveFilename);
|
||||
|
||||
|
||||
@@ -588,7 +588,9 @@
|
||||
</ClCompile>
|
||||
<ClCompile Include="Code\qprocessinfo.cpp" />
|
||||
<ClCompile Include="Code\pyrenderdoc\PythonContext.cpp" />
|
||||
<ClCompile Include="Code\pyrenderdoc\PythonInvokers.cpp" />
|
||||
<ClCompile Include="Code\pyrenderdoc\PythonInvokers.cpp">
|
||||
<AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Code\QRDUtils.cpp" />
|
||||
<ClCompile Include="Code\MiniQtHelper.cpp" />
|
||||
<ClCompile Include="Code\Resources.cpp" />
|
||||
|
||||
Reference in New Issue
Block a user