tdf#130857 qt weld: Implement QtInstanceWidget::strip_mnemonic
[LibreOffice.git] / vcl / inc / osx / saldata.hxx
blobba4d6e8c856b7f21912f4ecfb71f82642cc5d3f5
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #ifndef INCLUDED_VCL_INC_OSX_SALDATA_HXX
21 #define INCLUDED_VCL_INC_OSX_SALDATA_HXX
23 #include <config_features.h>
25 #include <premac.h>
26 #include <Cocoa/Cocoa.h>
27 #include <postmac.h>
29 #include <com/sun/star/uno/Reference.hxx>
31 #include <vcl/ptrstyle.hxx>
33 #include <svdata.hxx>
34 #include <salwtype.hxx>
36 #include <functional>
37 #include <list>
38 #include <map>
39 #include <memory>
40 #include <unordered_set>
41 #include <vector>
42 #include <o3tl/enumarray.hxx>
44 #include <cstdio>
45 #include <cstdarg>
47 #include <apple_remote/RemoteMainController.h>
49 class AquaSalFrame;
50 class AquaSalInstance;
51 class SalObject;
52 class SalFrame;
53 class SalVirtualDevice;
54 class SalPrinter;
55 class SystemFontList;
57 #define SAL_CLIPRECT_COUNT 16
58 #define INVALID_CURSOR_PTR reinterpret_cast<NSCursor*>(0xdeadbeef)
60 // Singleton, instantiated from Application::Application() in
61 // vcl/source/app/svapp.cxx.
63 class SalData
65 public:
66 SALTIMERPROC mpTimerProc; // timer callback proc
67 AquaSalInstance *mpInstance;
68 std::list<AquaSalFrame*> maPresentationFrames; // list of frames in presentation mode
69 SalObject *mpFirstObject; // pointer of first object window
70 SalVirtualDevice *mpFirstVD; // first VirDev
71 SalPrinter *mpFirstPrinter; // first printing printer
72 std::unique_ptr<SystemFontList> mpFontList;
73 NSStatusItem* mpStatusItem; // one status item that draws all our statuses
74 // at the moment this is only one add menu button
75 CGColorSpaceRef mxRGBSpace;
76 CGColorSpaceRef mxGraySpace;
78 o3tl::enumarray< PointerStyle, NSCursor* > maCursors;
79 std::vector< NSMenuItem* > maFallbackMenu;
80 std::map< NSEvent*, bool > maKeyEventAnswer;
82 static oslThreadKey s_aAutoReleaseKey;
84 bool mbIsScrollbarDoubleMax; // TODO: support DoubleMin and DoubleBoth too
85 #if !HAVE_FEATURE_MACOSX_SANDBOX
86 AppleRemoteMainController* mpAppleRemoteMainController;
87 #endif
88 NSObject* mpDockIconClickHandler;
89 sal_Int32 mnDPIX; // #i100617# read DPI only once per office life
90 sal_Int32 mnDPIY; // #i100617# read DPI only once per office life
92 css::uno::Reference< css::uno::XInterface > mxClipboard;
94 SalData();
95 ~SalData();
97 NSCursor* getCursor( PointerStyle i_eStyle );
99 static void ensureThreadAutoreleasePool();
101 static NSStatusItem* getStatusItem();
104 bool ImplSalYieldMutexTryToAcquire();
105 void ImplSalYieldMutexRelease();
107 #endif // INCLUDED_VCL_INC_OSX_SALDATA_HXX
109 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */