Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/intern
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2018-03-21 18:27:48 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-03-21 18:27:48 +0300
commit69eb452622e9af340f14b7116d59e450c3b6c745 (patch)
treebe5dd24893507bbba968d3114da06de60e9e83eb /intern
parent3ea8710b9daaed9bbf160c8b7895f2d6fdb0337c (diff)
parent5ba5254ec1ebba6c1e89b663592d716b92e13165 (diff)
Merge branch 'master' into blender2.8
Diffstat (limited to 'intern')
-rw-r--r--intern/ghost/GHOST_C-api.h5
-rw-r--r--intern/ghost/GHOST_ISystem.h6
-rw-r--r--intern/ghost/intern/GHOST_C-api.cpp5
-rw-r--r--intern/ghost/intern/GHOST_System.cpp5
-rw-r--r--intern/ghost/intern/GHOST_System.h4
-rw-r--r--intern/ghost/intern/GHOST_SystemNULL.h1
-rw-r--r--intern/ghost/intern/GHOST_SystemSDL.cpp5
-rw-r--r--intern/ghost/intern/GHOST_SystemSDL.h4
-rw-r--r--intern/ghost/intern/GHOST_SystemX11.cpp4
-rw-r--r--intern/ghost/intern/GHOST_SystemX11.h4
10 files changed, 43 insertions, 0 deletions
diff --git a/intern/ghost/GHOST_C-api.h b/intern/ghost/GHOST_C-api.h
index d5d8be7db8e..071474e57dc 100644
--- a/intern/ghost/GHOST_C-api.h
+++ b/intern/ghost/GHOST_C-api.h
@@ -930,6 +930,11 @@ extern int GHOST_toggleConsole(int action);
extern int GHOST_confirmQuit(GHOST_WindowHandle windowhandle);
/**
+ * Informs if the system provides native dialogs (eg. confirm quit)
+ */
+extern int GHOST_SupportsNativeDialogs(void);
+
+/**
* Use native pixel size (MacBook pro 'retina'), if supported.
*/
extern int GHOST_UseNativePixels(void);
diff --git a/intern/ghost/GHOST_ISystem.h b/intern/ghost/GHOST_ISystem.h
index 5c5590ef069..25b7fb26e0e 100644
--- a/intern/ghost/GHOST_ISystem.h
+++ b/intern/ghost/GHOST_ISystem.h
@@ -433,6 +433,12 @@ public:
* in the application
*/
virtual int confirmQuit(GHOST_IWindow *window) const = 0;
+
+ /**
+ * Informs if the system provides native dialogs (eg. confirm quit)
+ */
+ virtual bool supportsNativeDialogs(void) = 0;
+
protected:
/**
* Initialize the system.
diff --git a/intern/ghost/intern/GHOST_C-api.cpp b/intern/ghost/intern/GHOST_C-api.cpp
index 2fe94171cf8..c89ef49de33 100644
--- a/intern/ghost/intern/GHOST_C-api.cpp
+++ b/intern/ghost/intern/GHOST_C-api.cpp
@@ -921,6 +921,11 @@ int GHOST_toggleConsole(int action)
return system->toggleConsole(action);
}
+int GHOST_SupportsNativeDialogs(void)
+{
+ GHOST_ISystem *system = GHOST_ISystem::getSystem();
+ return system->supportsNativeDialogs();
+}
int GHOST_confirmQuit(GHOST_WindowHandle windowhandle)
{
diff --git a/intern/ghost/intern/GHOST_System.cpp b/intern/ghost/intern/GHOST_System.cpp
index 56d68b98ce0..4db2f0616d7 100644
--- a/intern/ghost/intern/GHOST_System.cpp
+++ b/intern/ghost/intern/GHOST_System.cpp
@@ -380,6 +380,11 @@ int GHOST_System::confirmQuit(GHOST_IWindow * /*window*/) const
return 1;
}
+bool GHOST_System::supportsNativeDialogs(void)
+{
+ return 1;
+}
+
bool GHOST_System::useNativePixel(void)
{
m_nativePixel = true;
diff --git a/intern/ghost/intern/GHOST_System.h b/intern/ghost/intern/GHOST_System.h
index af083996d91..50c893b1113 100644
--- a/intern/ghost/intern/GHOST_System.h
+++ b/intern/ghost/intern/GHOST_System.h
@@ -319,6 +319,10 @@ public:
*/
virtual int confirmQuit(GHOST_IWindow *window) const;
+ /**
+ * Informs if the system provides native dialogs (eg. confirm quit)
+ */
+ virtual bool supportsNativeDialogs(void);
protected:
diff --git a/intern/ghost/intern/GHOST_SystemNULL.h b/intern/ghost/intern/GHOST_SystemNULL.h
index 868416cd227..7c8d26d7486 100644
--- a/intern/ghost/intern/GHOST_SystemNULL.h
+++ b/intern/ghost/intern/GHOST_SystemNULL.h
@@ -52,6 +52,7 @@ public:
GHOST_TSuccess setCursorPosition(GHOST_TInt32 x, GHOST_TInt32 y) { return GHOST_kFailure; }
void getMainDisplayDimensions(GHOST_TUns32& width, GHOST_TUns32& height) const { /* nop */ }
void getAllDisplayDimensions(GHOST_TUns32& width, GHOST_TUns32& height) const { /* nop */ }
+ bool supportsNativeDialogs(void) { return false;}
GHOST_TSuccess init() {
GHOST_TSuccess success = GHOST_System::init();
diff --git a/intern/ghost/intern/GHOST_SystemSDL.cpp b/intern/ghost/intern/GHOST_SystemSDL.cpp
index e9768e4b845..db555910f4b 100644
--- a/intern/ghost/intern/GHOST_SystemSDL.cpp
+++ b/intern/ghost/intern/GHOST_SystemSDL.cpp
@@ -635,6 +635,11 @@ GHOST_SystemSDL::addDirtyWindow(GHOST_WindowSDL *bad_wind)
m_dirty_windows.push_back(bad_wind);
}
+bool
+GHOST_SystemSDL::supportsNativeDialogs(void)
+{
+ return false
+}
GHOST_TSuccess GHOST_SystemSDL::getButtons(GHOST_Buttons& buttons) const
{
diff --git a/intern/ghost/intern/GHOST_SystemSDL.h b/intern/ghost/intern/GHOST_SystemSDL.h
index 6f4ecec586b..41f110ed15d 100644
--- a/intern/ghost/intern/GHOST_SystemSDL.h
+++ b/intern/ghost/intern/GHOST_SystemSDL.h
@@ -95,6 +95,10 @@ public:
getMainDisplayDimensions(GHOST_TUns32& width,
GHOST_TUns32& height) const;
+ /**
+ * Informs if the system provides native dialogs (eg. confirm quit)
+ */
+ virtual bool supportsNativeDialogs(void);
private:
GHOST_TSuccess
diff --git a/intern/ghost/intern/GHOST_SystemX11.cpp b/intern/ghost/intern/GHOST_SystemX11.cpp
index 0de6e2f7d4a..69aa3a09977 100644
--- a/intern/ghost/intern/GHOST_SystemX11.cpp
+++ b/intern/ghost/intern/GHOST_SystemX11.cpp
@@ -386,6 +386,10 @@ createWindow(const STR_String& title,
return window;
}
+bool GHOST_SystemX11::supportsNativeDialogs(void)
+{
+ return false;
+}
/**
* Create a new offscreen context.
diff --git a/intern/ghost/intern/GHOST_SystemX11.h b/intern/ghost/intern/GHOST_SystemX11.h
index 1ad8277a431..b910589a1ad 100644
--- a/intern/ghost/intern/GHOST_SystemX11.h
+++ b/intern/ghost/intern/GHOST_SystemX11.h
@@ -97,6 +97,10 @@ public:
init(
);
+ /**
+ * Informs if the system provides native dialogs (eg. confirm quit)
+ */
+ virtual bool supportsNativeDialogs(void);
/**
* \section Interface Inherited from GHOST_ISystem