xref: /AOO41X/main/vcl/inc/svdata.hxx (revision ebfcd9af2ce496a86a62eef7379364d0a42a7f96)
1*ebfcd9afSAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
3*ebfcd9afSAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4*ebfcd9afSAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5*ebfcd9afSAndrew Rist  * distributed with this work for additional information
6*ebfcd9afSAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7*ebfcd9afSAndrew Rist  * to you under the Apache License, Version 2.0 (the
8*ebfcd9afSAndrew Rist  * "License"); you may not use this file except in compliance
9*ebfcd9afSAndrew Rist  * with the License.  You may obtain a copy of the License at
10cdf0e10cSrcweir  *
11*ebfcd9afSAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12cdf0e10cSrcweir  *
13*ebfcd9afSAndrew Rist  * Unless required by applicable law or agreed to in writing,
14*ebfcd9afSAndrew Rist  * software distributed under the License is distributed on an
15*ebfcd9afSAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*ebfcd9afSAndrew Rist  * KIND, either express or implied.  See the License for the
17*ebfcd9afSAndrew Rist  * specific language governing permissions and limitations
18*ebfcd9afSAndrew Rist  * under the License.
19cdf0e10cSrcweir  *
20*ebfcd9afSAndrew Rist  *************************************************************/
21*ebfcd9afSAndrew Rist 
22*ebfcd9afSAndrew Rist 
23cdf0e10cSrcweir 
24cdf0e10cSrcweir #ifndef _SV_SVDATA_HXX
25cdf0e10cSrcweir #define _SV_SVDATA_HXX
26cdf0e10cSrcweir 
27cdf0e10cSrcweir #include "rtl/ref.hxx"
28cdf0e10cSrcweir 
29cdf0e10cSrcweir #include "vos/thread.hxx"
30cdf0e10cSrcweir 
31cdf0e10cSrcweir #include "tools/string.hxx"
32cdf0e10cSrcweir #include "tools/gen.hxx"
33cdf0e10cSrcweir #include "tools/shl.hxx"
34cdf0e10cSrcweir #include "tools/link.hxx"
35cdf0e10cSrcweir #include "tools/fldunit.hxx"
36cdf0e10cSrcweir #include "tools/color.hxx"
37cdf0e10cSrcweir #include "tools/debug.hxx"
38cdf0e10cSrcweir 
39cdf0e10cSrcweir #include "vcl/vclevent.hxx"
40cdf0e10cSrcweir #include "vcl/sv.h"
41cdf0e10cSrcweir #include "vcl/dllapi.h"
42cdf0e10cSrcweir 
43cdf0e10cSrcweir #include "unotools/options.hxx"
44cdf0e10cSrcweir 
45cdf0e10cSrcweir #include "xconnection.hxx"
46cdf0e10cSrcweir 
47cdf0e10cSrcweir #include "com/sun/star/uno/Reference.hxx"
48cdf0e10cSrcweir 
49cdf0e10cSrcweir #include <hash_map>
50cdf0e10cSrcweir 
51cdf0e10cSrcweir namespace com {
52cdf0e10cSrcweir namespace sun {
53cdf0e10cSrcweir namespace star {
54cdf0e10cSrcweir namespace lang {
55cdf0e10cSrcweir     class XMultiServiceFactory;
56cdf0e10cSrcweir }
57cdf0e10cSrcweir namespace frame {
58cdf0e10cSrcweir 	class XSessionManagerClient;
59cdf0e10cSrcweir }
60cdf0e10cSrcweir }}}
61cdf0e10cSrcweir 
62cdf0e10cSrcweir struct ImplTimerData;
63cdf0e10cSrcweir struct ImplFileImageCacheData;
64cdf0e10cSrcweir struct ImplConfigData;
65cdf0e10cSrcweir class ImplDirectFontSubstitution;
66cdf0e10cSrcweir struct ImplHotKey;
67cdf0e10cSrcweir struct ImplEventHook;
68cdf0e10cSrcweir class Point;
69cdf0e10cSrcweir class Rectangle;
70cdf0e10cSrcweir class ImpResMgr;
71cdf0e10cSrcweir class ResMgr;
72cdf0e10cSrcweir class UniqueIndex;
73cdf0e10cSrcweir class ImplAccelManager;
74cdf0e10cSrcweir class ImplDevFontList;
75cdf0e10cSrcweir class ImplFontCache;
76cdf0e10cSrcweir class HelpTextWindow;
77cdf0e10cSrcweir class ImplTBDragMgr;
78cdf0e10cSrcweir class ImplButtonList;
79cdf0e10cSrcweir class ImplIdleMgr;
80cdf0e10cSrcweir class DbgWindow;
81cdf0e10cSrcweir class FloatingWindow;
82cdf0e10cSrcweir class AllSettings;
83cdf0e10cSrcweir class KeyCode;
84cdf0e10cSrcweir class NotifyEvent;
85cdf0e10cSrcweir class Timer;
86cdf0e10cSrcweir class AutoTimer;
87cdf0e10cSrcweir class Help;
88cdf0e10cSrcweir class ImageList;
89cdf0e10cSrcweir class Image;
90cdf0e10cSrcweir class PopupMenu;
91cdf0e10cSrcweir class Application;
92cdf0e10cSrcweir class OutputDevice;
93cdf0e10cSrcweir class Window;
94cdf0e10cSrcweir class SystemWindow;
95cdf0e10cSrcweir class WorkWindow;
96cdf0e10cSrcweir class Dialog;
97cdf0e10cSrcweir class VirtualDevice;
98cdf0e10cSrcweir class Printer;
99cdf0e10cSrcweir class SalFrame;
100cdf0e10cSrcweir class SalInstance;
101cdf0e10cSrcweir class SalSystem;
102cdf0e10cSrcweir class SalProcessWindowList;
103cdf0e10cSrcweir class SalTrayList;
104cdf0e10cSrcweir class UniqueIdContainer;
105cdf0e10cSrcweir class List;
106cdf0e10cSrcweir class ImplPrnQueueList;
107cdf0e10cSrcweir class ImplVDevCache;
108cdf0e10cSrcweir class UnoWrapperBase;
109cdf0e10cSrcweir class GraphicConverter;
110cdf0e10cSrcweir class ImplWheelWindow;
111cdf0e10cSrcweir class SalTimer;
112cdf0e10cSrcweir class SalI18NImeStatus;
113cdf0e10cSrcweir class DockingManager;
114cdf0e10cSrcweir class VclEventListeners2;
115cdf0e10cSrcweir 
116cdf0e10cSrcweir namespace vos { class OMutex; }
117cdf0e10cSrcweir namespace vos { class OCondition; }
118cdf0e10cSrcweir namespace vcl { class DisplayConnection; class SettingsConfigItem; class DeleteOnDeinitBase; }
119cdf0e10cSrcweir namespace utl { class DefaultFontConfiguration; class FontSubstConfiguration; }
120cdf0e10cSrcweir 
121cdf0e10cSrcweir // -----------------
122cdf0e10cSrcweir // - ImplSVAppData -
123cdf0e10cSrcweir // -----------------
124cdf0e10cSrcweir class LocaleConfigurationListener : public utl::ConfigurationListener
125cdf0e10cSrcweir {
126cdf0e10cSrcweir public:
127cdf0e10cSrcweir 	virtual void ConfigurationChanged( utl::ConfigurationBroadcaster*, sal_uInt32 );
128cdf0e10cSrcweir };
129cdf0e10cSrcweir 
130cdf0e10cSrcweir struct ImplSVAppData
131cdf0e10cSrcweir {
132cdf0e10cSrcweir     enum ImeStatusWindowMode
133cdf0e10cSrcweir     {
134cdf0e10cSrcweir         ImeStatusWindowMode_UNKNOWN,
135cdf0e10cSrcweir         ImeStatusWindowMode_HIDE,
136cdf0e10cSrcweir         ImeStatusWindowMode_SHOW
137cdf0e10cSrcweir     };
138cdf0e10cSrcweir 
139cdf0e10cSrcweir     ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >    mxMSF;
140cdf0e10cSrcweir     String*                 mpMSFTempFileName;
141cdf0e10cSrcweir     AllSettings*            mpSettings;         // Application settings
142cdf0e10cSrcweir 	LocaleConfigurationListener* mpCfgListener;
143cdf0e10cSrcweir     VclEventListeners*      mpEventListeners;   // listeners for vcl events (eg, extended toolkit)
144cdf0e10cSrcweir     VclEventListeners*      mpKeyListeners;     // listeners for key events only (eg, extended toolkit)
145cdf0e10cSrcweir     ImplAccelManager*       mpAccelMgr;         // Accelerator Manager
146cdf0e10cSrcweir     XubString*              mpAppName;          // Application name
147cdf0e10cSrcweir     XubString*              mpAppFileName;      // Abs. Application FileName
148cdf0e10cSrcweir     XubString*              mpDisplayName;      // Application Display Name
149cdf0e10cSrcweir     String*                 mpFontPath;         // Additional Fontpath
150cdf0e10cSrcweir     Help*                   mpHelp;             // Application help
151cdf0e10cSrcweir     PopupMenu*              mpActivePopupMenu;  // Actives Popup-Menu (in Execute)
152cdf0e10cSrcweir     UniqueIdContainer*      mpUniqueIdCont;     // Fuer Eindeutige Id's
153cdf0e10cSrcweir     ImplIdleMgr*            mpIdleMgr;          // Idle-Manager
154cdf0e10cSrcweir     ImplWheelWindow*        mpWheelWindow;      // WheelWindow
155cdf0e10cSrcweir     ImplHotKey*             mpFirstHotKey;      // HotKey-Verwaltung
156cdf0e10cSrcweir     ImplEventHook*          mpFirstEventHook;   // Event-Hooks
157cdf0e10cSrcweir     VclEventListeners2*     mpPostYieldListeners;           // post yield listeners
158cdf0e10cSrcweir     sal_uLong                   mnLastInputTime;                // GetLastInputTime()
159cdf0e10cSrcweir     sal_uInt16                  mnDispatchLevel;                // DispatchLevel
160cdf0e10cSrcweir     sal_uInt16                  mnModalMode;                    // ModalMode Count
161cdf0e10cSrcweir     sal_uInt16                  mnModalDialog;                  // ModalDialog Count
162cdf0e10cSrcweir     sal_uInt16                  mnAccessCount;                  // AccessHdl Count
163cdf0e10cSrcweir     sal_uInt16                  mnSysWinMode;                   // Modus, wann SystemWindows erzeugt werden sollen
164cdf0e10cSrcweir     sal_uInt16                  mnLayout;                       // --- RTL-Flags --- currently not used, only for testing
165cdf0e10cSrcweir     short                   mnDialogScaleX;                 // Scale X-Positions and sizes in Dialogs
166cdf0e10cSrcweir     sal_Bool                    mbInAppMain;                    // is Application::Main() on stack
167cdf0e10cSrcweir     sal_Bool                    mbInAppExecute;                 // is Application::Execute() on stack
168cdf0e10cSrcweir     sal_Bool                    mbAppQuit;                      // is Application::Quit() called
169cdf0e10cSrcweir     sal_Bool                    mbSettingsInit;                 // sal_True: Settings are initialized
170cdf0e10cSrcweir     sal_Bool                    mbDialogCancel;                 // sal_True: Alle Dialog::Execute()-Aufrufe werden mit return sal_False sofort beendet
171cdf0e10cSrcweir     sal_Bool                    mbNoYield;                      // Application::Yield will not wait for events if the queue is empty
172cdf0e10cSrcweir                                                             // essentially that makes it the same as Application::Reschedule
173cdf0e10cSrcweir     long                    mnDefaultLayoutBorder;          // default value in pixel for layout distances used
174cdf0e10cSrcweir                                                             // in window arrangers
175cdf0e10cSrcweir 
176cdf0e10cSrcweir     /** Controls whether showing any IME status window is toggled on or off.
177cdf0e10cSrcweir 
178cdf0e10cSrcweir         Only meaningful if showing IME status windows can be toggled on and off
179cdf0e10cSrcweir         externally (see Application::CanToggleImeStatusWindow).
180cdf0e10cSrcweir      */
181cdf0e10cSrcweir     ImeStatusWindowMode meShowImeStatusWindow;
182cdf0e10cSrcweir 
183cdf0e10cSrcweir                             DECL_STATIC_LINK( ImplSVAppData, ImplQuitMsg, void* );
184cdf0e10cSrcweir 
185cdf0e10cSrcweir };
186cdf0e10cSrcweir 
187cdf0e10cSrcweir 
188cdf0e10cSrcweir // -----------------
189cdf0e10cSrcweir // - ImplSVGDIData -
190cdf0e10cSrcweir // -----------------
191cdf0e10cSrcweir 
192cdf0e10cSrcweir struct ImplSVGDIData
193cdf0e10cSrcweir {
194cdf0e10cSrcweir     OutputDevice*           mpFirstWinGraphics; // First OutputDevice with a Frame Graphics
195cdf0e10cSrcweir     OutputDevice*           mpLastWinGraphics;  // Last OutputDevice with a Frame Graphics
196cdf0e10cSrcweir     OutputDevice*           mpFirstVirGraphics; // First OutputDevice with a VirtualDevice Graphics
197cdf0e10cSrcweir     OutputDevice*           mpLastVirGraphics;  // Last OutputDevice with a VirtualDevice Graphics
198cdf0e10cSrcweir     OutputDevice*           mpFirstPrnGraphics; // First OutputDevice with a InfoPrinter Graphics
199cdf0e10cSrcweir     OutputDevice*           mpLastPrnGraphics;  // Last OutputDevice with a InfoPrinter Graphics
200cdf0e10cSrcweir     VirtualDevice*          mpFirstVirDev;      // First VirtualDevice
201cdf0e10cSrcweir     VirtualDevice*          mpLastVirDev;       // Last VirtualDevice
202cdf0e10cSrcweir     Printer*                mpFirstPrinter;     // First Printer
203cdf0e10cSrcweir     Printer*                mpLastPrinter;      // Last Printer
204cdf0e10cSrcweir     ImplPrnQueueList*       mpPrinterQueueList; // List of all printer queue
205cdf0e10cSrcweir     ImplDevFontList*        mpScreenFontList;   // Screen-Font-List
206cdf0e10cSrcweir     ImplFontCache*          mpScreenFontCache;  // Screen-Font-Cache
207cdf0e10cSrcweir     ImplDirectFontSubstitution* mpDirectFontSubst;// Font-Substitutons defined in Tools->Options->Fonts
208cdf0e10cSrcweir     GraphicConverter*       mpGrfConverter;     // Converter for graphics
209cdf0e10cSrcweir     long                    mnRealAppFontX;     // AppFont X-Numenator for 40/tel Width
210cdf0e10cSrcweir     long                    mnAppFontX;         // AppFont X-Numenator for 40/tel Width + DialogScaleX
211cdf0e10cSrcweir     long                    mnAppFontY;         // AppFont Y-Numenator for 80/tel Height
212cdf0e10cSrcweir     sal_Bool                    mbFontSubChanged;   // sal_True: FontSubstitution wurde zwischen Begin/End geaendert
213cdf0e10cSrcweir     utl::DefaultFontConfiguration* mpDefaultFontConfiguration;
214cdf0e10cSrcweir     utl::FontSubstConfiguration* mpFontSubstConfiguration;
215cdf0e10cSrcweir     bool                    mbNativeFontConfig; // true: do not override UI font
216cdf0e10cSrcweir     bool                    mbNoXORClipping;    // true: do not use XOR to achieve clipping effects
217cdf0e10cSrcweir };
218cdf0e10cSrcweir 
219cdf0e10cSrcweir 
220cdf0e10cSrcweir // -----------------
221cdf0e10cSrcweir // - ImplSVWinData -
222cdf0e10cSrcweir // -----------------
223cdf0e10cSrcweir 
224cdf0e10cSrcweir struct ImplSVWinData
225cdf0e10cSrcweir {
226cdf0e10cSrcweir     Window*                 mpFirstFrame;       // First FrameWindow
227cdf0e10cSrcweir     Window*                 mpDefDialogParent;  // Default Dialog Parent
228cdf0e10cSrcweir     WorkWindow*             mpAppWin;           // Application-Window
229cdf0e10cSrcweir     Window*                 mpFocusWin;         // window, that has the focus
230cdf0e10cSrcweir     Window*                 mpActiveApplicationFrame; // the last active application frame, can be used as DefModalDialogParent if no focuswin set
231cdf0e10cSrcweir     Window*                 mpCaptureWin;       // window, that has the mouse capture
232cdf0e10cSrcweir     Window*                 mpLastDeacWin;      // Window, that need a deactivate (FloatingWindow-Handling)
233cdf0e10cSrcweir     DbgWindow*              mpDbgWin;           // debug window
234cdf0e10cSrcweir     FloatingWindow*         mpFirstFloat;       // First FloatingWindow in PopupMode
235cdf0e10cSrcweir     Dialog*                 mpLastExecuteDlg;   // Erster Dialog, der sich in Execute befindet
236cdf0e10cSrcweir     Window*                 mpExtTextInputWin;  // Window, which is in ExtTextInput
237cdf0e10cSrcweir     Window*                 mpTrackWin;         // window, that is in tracking mode
238cdf0e10cSrcweir     AutoTimer*              mpTrackTimer;       // tracking timer
239cdf0e10cSrcweir     ImageList*              mpMsgBoxImgList;    // ImageList for MessageBox
240cdf0e10cSrcweir     ImageList*              mpMsgBoxHCImgList;  // ImageList for MessageBox (high contrast mode)
241cdf0e10cSrcweir     Window*                 mpAutoScrollWin;    // window, that is in AutoScrollMode mode
242cdf0e10cSrcweir     sal_uInt16                  mnTrackFlags;       // tracking flags
243cdf0e10cSrcweir     sal_uInt16                  mnAutoScrollFlags;  // auto scroll flags
244cdf0e10cSrcweir     sal_Bool                    mbNoDeactivate;     // sal_True: keine Deactivate durchfuehren
245cdf0e10cSrcweir 	sal_Bool					mbNoSaveFocus;		// sal_True: menues must not save/restore focus
246cdf0e10cSrcweir     sal_Bool                    mbNoSaveBackground; // sal_True: save background is unnecessary or even less performant
247cdf0e10cSrcweir };
248cdf0e10cSrcweir 
249cdf0e10cSrcweir 
250cdf0e10cSrcweir // ------------------
251cdf0e10cSrcweir // - ImplSVCtrlData -
252cdf0e10cSrcweir // ------------------
253cdf0e10cSrcweir 
254cdf0e10cSrcweir typedef std::vector< std::pair< String, FieldUnit > > FieldUnitStringList;
255cdf0e10cSrcweir 
256cdf0e10cSrcweir struct ImplSVCtrlData
257cdf0e10cSrcweir {
258cdf0e10cSrcweir     ImageList*              mpCheckImgList;     // ImageList for CheckBoxes
259cdf0e10cSrcweir     ImageList*              mpRadioImgList;     // ImageList for RadioButtons
260cdf0e10cSrcweir     ImageList*              mpPinImgList;       // ImageList for PIN
261cdf0e10cSrcweir     ImageList*              mpSplitHPinImgList; // ImageList for Horizontale SplitWindows
262cdf0e10cSrcweir     ImageList*              mpSplitVPinImgList; // ImageList for Vertikale SplitWindows (PIN's)
263cdf0e10cSrcweir     ImageList*              mpSplitHArwImgList; // ImageList for Horizontale SplitWindows (Arrows)
264cdf0e10cSrcweir     ImageList*              mpSplitVArwImgList; // ImageList for Vertikale SplitWindows (Arrows)
265cdf0e10cSrcweir     Image*                  mpDisclosurePlus;
266cdf0e10cSrcweir     Image*                  mpDisclosurePlusHC;
267cdf0e10cSrcweir     Image*                  mpDisclosureMinus;
268cdf0e10cSrcweir     Image*                  mpDisclosureMinusHC;
269cdf0e10cSrcweir     ImplTBDragMgr*          mpTBDragMgr;        // DragMgr for ToolBox
270cdf0e10cSrcweir     sal_uInt16                  mnCheckStyle;       // CheckBox-Style for ImageList-Update
271cdf0e10cSrcweir     sal_uInt16                  mnRadioStyle;       // Radio-Style for ImageList-Update
272cdf0e10cSrcweir     sal_uLong                   mnLastCheckFColor;  // Letzte FaceColor fuer CheckImage
273cdf0e10cSrcweir     sal_uLong                   mnLastCheckWColor;  // Letzte WindowColor fuer CheckImage
274cdf0e10cSrcweir     sal_uLong                   mnLastCheckWTextColor;  // Letzte WindowTextColor fuer CheckImage
275cdf0e10cSrcweir     sal_uLong                   mnLastCheckLColor;  // Letzte LightColor fuer CheckImage
276cdf0e10cSrcweir     sal_uLong                   mnLastRadioFColor;  // Letzte FaceColor fuer RadioImage
277cdf0e10cSrcweir     sal_uLong                   mnLastRadioWColor;  // Letzte WindowColor fuer RadioImage
278cdf0e10cSrcweir     sal_uLong                   mnLastRadioLColor;  // Letzte LightColor fuer RadioImage
279cdf0e10cSrcweir     FieldUnitStringList*    mpFieldUnitStrings; // list with field units
280cdf0e10cSrcweir     FieldUnitStringList*    mpCleanUnitStrings; // same list but with some "fluff" like spaces removed
281cdf0e10cSrcweir };
282cdf0e10cSrcweir 
283cdf0e10cSrcweir 
284cdf0e10cSrcweir // ------------------
285cdf0e10cSrcweir // - ImplSVHelpData -
286cdf0e10cSrcweir // ------------------
287cdf0e10cSrcweir 
288cdf0e10cSrcweir struct ImplSVHelpData
289cdf0e10cSrcweir {
290cdf0e10cSrcweir     sal_Bool                    mbContextHelp       : 1;    // is ContextHelp enabled
291cdf0e10cSrcweir     sal_Bool                    mbExtHelp           : 1;    // is ExtendedHelp enabled
292cdf0e10cSrcweir     sal_Bool                    mbExtHelpMode       : 1;    // is in ExtendedHelp Mode
293cdf0e10cSrcweir     sal_Bool                    mbOldBalloonMode    : 1;    // BallonMode, befor ExtHelpMode started
294cdf0e10cSrcweir     sal_Bool                    mbBalloonHelp       : 1;    // is BalloonHelp enabled
295cdf0e10cSrcweir     sal_Bool                    mbQuickHelp         : 1;    // is QuickHelp enabled
296cdf0e10cSrcweir     sal_Bool                    mbSetKeyboardHelp   : 1;    // tiphelp was activated by keyboard
297cdf0e10cSrcweir     sal_Bool                    mbKeyboardHelp      : 1;    // tiphelp was activated by keyboard
298cdf0e10cSrcweir     sal_Bool                    mbAutoHelpId        : 1;    // generate HelpIds
299cdf0e10cSrcweir     sal_Bool                    mbRequestingHelp    : 1;    // In Window::RequestHelp
300cdf0e10cSrcweir     HelpTextWindow*         mpHelpWin;                  // HelpWindow
301cdf0e10cSrcweir     sal_uLong                   mnLastHelpHideTime;         // ticks of last show
302cdf0e10cSrcweir };
303cdf0e10cSrcweir 
304cdf0e10cSrcweir struct ImplSVNWFData
305cdf0e10cSrcweir {
306cdf0e10cSrcweir     bool                    mbMenuBarDockingAreaCommonBG; // e.g. WinXP default theme
307cdf0e10cSrcweir     bool                    mbDockingAreaSeparateTB;      // individual toolbar backgrounds
308cdf0e10cSrcweir                                                           // instead of one for docking area
309cdf0e10cSrcweir     bool                    mbToolboxDropDownSeparate;    // two adjacent buttons for
310cdf0e10cSrcweir                                                           // toolbox dropdown buttons
311cdf0e10cSrcweir     int                     mnMenuFormatExtraBorder;      // inner popup menu border
312cdf0e10cSrcweir     bool                    mbFlatMenu;                   // no popup 3D border
313cdf0e10cSrcweir     Color                   maMenuBarHighlightTextColor;  // override higlight text color
314cdf0e10cSrcweir                                                           // in menubar if not transparent
315cdf0e10cSrcweir     bool                    mbOpenMenuOnF10;              // on gnome the first menu opens on F10
316cdf0e10cSrcweir     bool                    mbNoFocusRects;               // on Aqua focus rects are not used
317cdf0e10cSrcweir     bool                    mbNoBoldTabFocus;             // on Aqua and Gnome the focused tab has not bold text
318cdf0e10cSrcweir     bool                    mbCenteredTabs;               // on Aqua, tabs are centered
319cdf0e10cSrcweir     bool                    mbNoActiveTabTextRaise;       // on Aqua the text for the selected tab
320cdf0e10cSrcweir                                                           // should not "jump up" a pixel
321cdf0e10cSrcweir     bool                    mbProgressNeedsErase;         // set true for platforms that should draw the
322cdf0e10cSrcweir                                                           // window background before drawing the native
323cdf0e10cSrcweir                                                           // progress bar
324cdf0e10cSrcweir     bool                    mbCheckBoxNeedsErase;         // set true for platforms that should draw the
325cdf0e10cSrcweir                                                           // window background before drawing the native
326cdf0e10cSrcweir                                                           // checkbox
327cdf0e10cSrcweir     bool                    mbScrollbarJumpPage;          // true for "jump to here" behavior
328cdf0e10cSrcweir     int                     mnStatusBarLowerRightOffset;  // amount in pixel to avoid in the lower righthand corner
329cdf0e10cSrcweir     bool                    mbCanDrawWidgetAnySize;       // set to true currently on gtk
330cdf0e10cSrcweir };
331cdf0e10cSrcweir 
332cdf0e10cSrcweir 
333cdf0e10cSrcweir // --------------
334cdf0e10cSrcweir // - ImplSVData -
335cdf0e10cSrcweir // --------------
336cdf0e10cSrcweir 
337cdf0e10cSrcweir struct ImplSVData
338cdf0e10cSrcweir {
339cdf0e10cSrcweir     void*                   mpSalData;          // SalData
340cdf0e10cSrcweir     SalInstance*            mpDefInst;          // Default SalInstance
341cdf0e10cSrcweir     Application*            mpApp;              // pApp
342cdf0e10cSrcweir     WorkWindow*             mpDefaultWin;       // Default-Window
343cdf0e10cSrcweir     sal_Bool                    mbDeInit;             // Is VCL deinitializing
344cdf0e10cSrcweir     sal_uLong                   mnThreadCount;      // is VCL MultiThread enabled
345cdf0e10cSrcweir     ImplConfigData*         mpFirstConfigData;  // Zeiger auf ersten Config-Block
346cdf0e10cSrcweir     ImplTimerData*          mpFirstTimerData;   // list of all running timers
347cdf0e10cSrcweir     SalTimer*				mpSalTimer;			// interface to sal event loop/timers
348cdf0e10cSrcweir     SalI18NImeStatus*		mpImeStatus;		// interface to ime status window
349cdf0e10cSrcweir     SalSystem*				mpSalSystem;		// SalSystem interface
350cdf0e10cSrcweir     ResMgr*                 mpResMgr;           // SV-Resource-Manager
351cdf0e10cSrcweir     sal_uLong                   mnTimerPeriod;      // current timer period
352cdf0e10cSrcweir     sal_uLong                   mnTimerUpdate;      // TimerCallbackProcs on stack
353cdf0e10cSrcweir     sal_Bool                    mbNotAllTimerCalled;// sal_True: Es muessen noch Timer abgearbeitet werden
354cdf0e10cSrcweir     sal_Bool                    mbNoCallTimer;      // sal_True: No Timeout calls
355cdf0e10cSrcweir     ImplSVAppData           maAppData;          // indepen data for class Application
356cdf0e10cSrcweir     ImplSVGDIData           maGDIData;          // indepen data for Output classes
357cdf0e10cSrcweir     ImplSVWinData           maWinData;          // indepen data for Windows classes
358cdf0e10cSrcweir     ImplSVCtrlData          maCtrlData;         // indepen data for Control classes
359cdf0e10cSrcweir     ImplSVHelpData          maHelpData;         // indepen data for Help classes
360cdf0e10cSrcweir     ImplSVNWFData           maNWFData;
361cdf0e10cSrcweir     UnoWrapperBase*         mpUnoWrapper;
362cdf0e10cSrcweir     Window*                 mpIntroWindow;      // the splash screen
363cdf0e10cSrcweir     DockingManager*         mpDockingManager;
364cdf0e10cSrcweir     sal_Bool                    mbIsTestTool;
365cdf0e10cSrcweir 
366cdf0e10cSrcweir     vos::OThread::TThreadIdentifier                     mnMainThreadId;
367cdf0e10cSrcweir     rtl::Reference< vcl::DisplayConnection >            mxDisplayConnection;
368cdf0e10cSrcweir 
369cdf0e10cSrcweir     ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > mxAccessBridge;
370cdf0e10cSrcweir     com::sun::star::uno::Reference< com::sun::star::frame::XSessionManagerClient > xSMClient;
371cdf0e10cSrcweir     ::vcl::SettingsConfigItem*			mpSettingsConfigItem;
372cdf0e10cSrcweir     std::list< vcl::DeleteOnDeinitBase* >*   mpDeinitDeleteList;
373cdf0e10cSrcweir     std::hash_map< int, rtl::OUString >*     mpPaperNames;
374cdf0e10cSrcweir };
375cdf0e10cSrcweir 
376cdf0e10cSrcweir void        ImplInitSVData();
377cdf0e10cSrcweir void        ImplDeInitSVData();
378cdf0e10cSrcweir void        ImplDestroySVData();
379cdf0e10cSrcweir Window*     ImplGetDefaultWindow();
380cdf0e10cSrcweir VCL_PLUGIN_PUBLIC ResMgr*     ImplGetResMgr();
381cdf0e10cSrcweir VCL_PLUGIN_PUBLIC ResId VclResId( sal_Int32 nId ); // throws std::bad_alloc if no res mgr
382cdf0e10cSrcweir DockingManager*     ImplGetDockingManager();
383cdf0e10cSrcweir void        ImplWindowAutoMnemonic( Window* pWindow );
384cdf0e10cSrcweir 
385cdf0e10cSrcweir void        ImplUpdateSystemProcessWindow();
386cdf0e10cSrcweir Window*     ImplFindWindow( const SalFrame* pFrame, Point& rSalFramePos );
387cdf0e10cSrcweir 
388cdf0e10cSrcweir // SVAPP.CXX
389cdf0e10cSrcweir sal_Bool        ImplCallHotKey( const KeyCode& rKeyCode );
390cdf0e10cSrcweir void        ImplFreeHotKeyData();
391cdf0e10cSrcweir void        ImplFreeEventHookData();
392cdf0e10cSrcweir 
393cdf0e10cSrcweir // WINPROC.CXX
394cdf0e10cSrcweir long        ImplCallPreNotify( NotifyEvent& rEvt );
395cdf0e10cSrcweir long        ImplCallEvent( NotifyEvent& rEvt );
396cdf0e10cSrcweir 
397cdf0e10cSrcweir extern VCL_PLUGIN_PUBLIC ImplSVData* pImplSVData;
398cdf0e10cSrcweir inline VCL_PLUGIN_PUBLIC ImplSVData* ImplGetSVData() { return pImplSVData; }
399cdf0e10cSrcweir inline ImplSVData* ImplGetAppSVData() { return ImplGetSVData(); }
400cdf0e10cSrcweir 
401cdf0e10cSrcweir bool ImplInitAccessBridge( sal_Bool bAllowCancel, sal_Bool &rCancelled );
402cdf0e10cSrcweir 
403cdf0e10cSrcweir FieldUnitStringList* ImplGetFieldUnits();
404cdf0e10cSrcweir FieldUnitStringList* ImplGetCleanedFieldUnits();
405cdf0e10cSrcweir 
406cdf0e10cSrcweir 
407cdf0e10cSrcweir // -----------------------------------------------------------------------
408cdf0e10cSrcweir 
409cdf0e10cSrcweir // -----------------
410cdf0e10cSrcweir // - ImplSVEmpyStr -
411cdf0e10cSrcweir // -----------------
412cdf0e10cSrcweir 
413cdf0e10cSrcweir // Empty-SV-String
414cdf0e10cSrcweir 
415cdf0e10cSrcweir inline const String& ImplGetSVEmptyStr()
416cdf0e10cSrcweir     { return String::EmptyString(); }
417cdf0e10cSrcweir inline const ByteString& ImplGetSVEmptyByteStr()
418cdf0e10cSrcweir     { return ByteString::EmptyString(); }
419cdf0e10cSrcweir 
420cdf0e10cSrcweir // -----------------------------------------------------------------------
421cdf0e10cSrcweir 
422cdf0e10cSrcweir // ----------------------
423cdf0e10cSrcweir // - struct ImplDelData -
424cdf0e10cSrcweir // ----------------------
425cdf0e10cSrcweir // ImplDelData is used as a "dog tag" by a window when it
426cdf0e10cSrcweir // does something that could indirectly destroy the window
427cdf0e10cSrcweir // TODO: wild destruction of a window should not be possible
428cdf0e10cSrcweir 
429cdf0e10cSrcweir struct ImplDelData
430cdf0e10cSrcweir {
431cdf0e10cSrcweir     ImplDelData*    mpNext;
432cdf0e10cSrcweir     const Window*   mpWindow;
433cdf0e10cSrcweir     sal_Bool            mbDel;
434cdf0e10cSrcweir 
435cdf0e10cSrcweir                     ImplDelData( const Window* pWindow = NULL )
436cdf0e10cSrcweir                     : mpNext( NULL ), mpWindow( NULL ), mbDel( sal_False )
437cdf0e10cSrcweir                     { if( pWindow ) AttachToWindow( pWindow ); }
438cdf0e10cSrcweir 
439cdf0e10cSrcweir     virtual         ~ImplDelData();
440cdf0e10cSrcweir 
441cdf0e10cSrcweir     bool            IsDead() const
442cdf0e10cSrcweir     {
443cdf0e10cSrcweir         DBG_ASSERT( mbDel == sal_False, "object deleted while in use !" );
444cdf0e10cSrcweir         return (mbDel!=sal_False);
445cdf0e10cSrcweir     }
446cdf0e10cSrcweir     sal_Bool /*deprecated */IsDelete() const { return (sal_Bool)IsDead(); }
447cdf0e10cSrcweir 
448cdf0e10cSrcweir private:
449cdf0e10cSrcweir     void            AttachToWindow( const Window* );
450cdf0e10cSrcweir };
451cdf0e10cSrcweir 
452cdf0e10cSrcweir // ---------------
453cdf0e10cSrcweir // - ImplSVEvent -
454cdf0e10cSrcweir // ---------------
455cdf0e10cSrcweir 
456cdf0e10cSrcweir struct ImplSVEvent
457cdf0e10cSrcweir {
458cdf0e10cSrcweir     sal_uLong               mnEvent;
459cdf0e10cSrcweir     void*               mpData;
460cdf0e10cSrcweir     Link*               mpLink;
461cdf0e10cSrcweir     Window*             mpWindow;
462cdf0e10cSrcweir     ImplDelData         maDelData;
463cdf0e10cSrcweir     sal_Bool                mbCall;
464cdf0e10cSrcweir };
465cdf0e10cSrcweir 
466cdf0e10cSrcweir #endif  // _SV_SVDATA_HXX
467