summaryrefslogtreecommitdiff
path: root/vcl/osx
diff options
context:
space:
mode:
authorTor Lillqvist <tml@collabora.com>2015-03-30 13:12:34 +0300
committerTor Lillqvist <tml@collabora.com>2015-03-30 16:01:38 +0300
commit038d13ef848e0c773d531048637d760395a56d9f (patch)
tree2b6a5e97c5894f41802a642e7090f4b2fe7c3046 /vcl/osx
parent3d177c7b6dae0af7d2e4822b3812757c9f65a0c3 (diff)
Introduce vcl::IsWindowSystemAvailable()
Change-Id: I6e3f804833db7487ddf7ba75c43d15017dcbe1ba
Diffstat (limited to 'vcl/osx')
-rw-r--r--vcl/osx/salinst.cxx11
1 files changed, 11 insertions, 0 deletions
diff --git a/vcl/osx/salinst.cxx b/vcl/osx/salinst.cxx
index 105a9a914553..fc8e9e474f66 100644
--- a/vcl/osx/salinst.cxx
+++ b/vcl/osx/salinst.cxx
@@ -1070,4 +1070,15 @@ NSImage* CreateNSImage( const Image& rImage )
return pImage;
}
+namespace vcl
+{
+
+bool IsWindowSystemAvailable()
+{
+ // Yes I know the parens are not needed. I like them in cases like this. So sue me.
+ return ([NSScreen screens] != nil && [[NSScreen screens] count] > 0);
+}
+
+} // namespace vcl
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */