1ebfcd9afSAndrew Rist /**************************************************************
2cdf0e10cSrcweir *
3ebfcd9afSAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one
4ebfcd9afSAndrew Rist * or more contributor license agreements. See the NOTICE file
5ebfcd9afSAndrew Rist * distributed with this work for additional information
6ebfcd9afSAndrew Rist * regarding copyright ownership. The ASF licenses this file
7ebfcd9afSAndrew Rist * to you under the Apache License, Version 2.0 (the
8ebfcd9afSAndrew Rist * "License"); you may not use this file except in compliance
9ebfcd9afSAndrew Rist * with the License. You may obtain a copy of the License at
10ebfcd9afSAndrew Rist *
11ebfcd9afSAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0
12ebfcd9afSAndrew Rist *
13ebfcd9afSAndrew Rist * Unless required by applicable law or agreed to in writing,
14ebfcd9afSAndrew Rist * software distributed under the License is distributed on an
15ebfcd9afSAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16ebfcd9afSAndrew Rist * KIND, either express or implied. See the License for the
17ebfcd9afSAndrew Rist * specific language governing permissions and limitations
18ebfcd9afSAndrew Rist * under the License.
19ebfcd9afSAndrew Rist *
20ebfcd9afSAndrew Rist *************************************************************/
21ebfcd9afSAndrew Rist
22ebfcd9afSAndrew 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
15885c309d6SJürgen Schmidt sal_uLong mnLastInputTime; // GetLastInputTime()
15985c309d6SJürgen Schmidt sal_uInt16 mnDispatchLevel; // DispatchLevel
16085c309d6SJürgen Schmidt sal_uInt16 mnModalMode; // ModalMode Count
16185c309d6SJürgen Schmidt sal_uInt16 mnModalDialog; // ModalDialog Count
16285c309d6SJürgen Schmidt sal_uInt16 mnAccessCount; // AccessHdl Count
16385c309d6SJürgen Schmidt sal_uInt16 mnSysWinMode; // Modus, wann SystemWindows erzeugt werden sollen
16485c309d6SJürgen Schmidt sal_uInt16 mnLayout; // --- RTL-Flags --- currently not used, only for testing
165cdf0e10cSrcweir short mnDialogScaleX; // Scale X-Positions and sizes in Dialogs
16685c309d6SJürgen Schmidt sal_Bool mbInAppMain; // is Application::Main() on stack
16785c309d6SJürgen Schmidt sal_Bool mbInAppExecute; // is Application::Execute() on stack
16885c309d6SJürgen Schmidt sal_Bool mbAppQuit; // is Application::Quit() called
16985c309d6SJürgen Schmidt sal_Bool mbSettingsInit; // sal_True: Settings are initialized
17085c309d6SJürgen Schmidt sal_Bool mbDialogCancel; // sal_True: Alle Dialog::Execute()-Aufrufe werden mit return sal_False sofort beendet
17185c309d6SJürgen Schmidt 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
17685c309d6SJürgen Schmidt bool mbConversionMode; // true allows further optimizations during document conversion in different code areas.
17785c309d6SJürgen Schmidt
178cdf0e10cSrcweir /** Controls whether showing any IME status window is toggled on or off.
179cdf0e10cSrcweir
180cdf0e10cSrcweir Only meaningful if showing IME status windows can be toggled on and off
181cdf0e10cSrcweir externally (see Application::CanToggleImeStatusWindow).
182cdf0e10cSrcweir */
183cdf0e10cSrcweir ImeStatusWindowMode meShowImeStatusWindow;
184cdf0e10cSrcweir
185*df906e24SSteve Yin long m_bEnableAccessInterface;
186cdf0e10cSrcweir DECL_STATIC_LINK( ImplSVAppData, ImplQuitMsg, void* );
187cdf0e10cSrcweir
188cdf0e10cSrcweir };
189cdf0e10cSrcweir
190cdf0e10cSrcweir
191cdf0e10cSrcweir // -----------------
192cdf0e10cSrcweir // - ImplSVGDIData -
193cdf0e10cSrcweir // -----------------
194cdf0e10cSrcweir
195cdf0e10cSrcweir struct ImplSVGDIData
196cdf0e10cSrcweir {
197cdf0e10cSrcweir OutputDevice* mpFirstWinGraphics; // First OutputDevice with a Frame Graphics
198cdf0e10cSrcweir OutputDevice* mpLastWinGraphics; // Last OutputDevice with a Frame Graphics
199cdf0e10cSrcweir OutputDevice* mpFirstVirGraphics; // First OutputDevice with a VirtualDevice Graphics
200cdf0e10cSrcweir OutputDevice* mpLastVirGraphics; // Last OutputDevice with a VirtualDevice Graphics
201cdf0e10cSrcweir OutputDevice* mpFirstPrnGraphics; // First OutputDevice with a InfoPrinter Graphics
202cdf0e10cSrcweir OutputDevice* mpLastPrnGraphics; // Last OutputDevice with a InfoPrinter Graphics
203cdf0e10cSrcweir VirtualDevice* mpFirstVirDev; // First VirtualDevice
204cdf0e10cSrcweir VirtualDevice* mpLastVirDev; // Last VirtualDevice
205cdf0e10cSrcweir Printer* mpFirstPrinter; // First Printer
206cdf0e10cSrcweir Printer* mpLastPrinter; // Last Printer
207cdf0e10cSrcweir ImplPrnQueueList* mpPrinterQueueList; // List of all printer queue
208cdf0e10cSrcweir ImplDevFontList* mpScreenFontList; // Screen-Font-List
209cdf0e10cSrcweir ImplFontCache* mpScreenFontCache; // Screen-Font-Cache
210cdf0e10cSrcweir ImplDirectFontSubstitution* mpDirectFontSubst;// Font-Substitutons defined in Tools->Options->Fonts
211cdf0e10cSrcweir GraphicConverter* mpGrfConverter; // Converter for graphics
212cdf0e10cSrcweir long mnRealAppFontX; // AppFont X-Numenator for 40/tel Width
213cdf0e10cSrcweir long mnAppFontX; // AppFont X-Numenator for 40/tel Width + DialogScaleX
214cdf0e10cSrcweir long mnAppFontY; // AppFont Y-Numenator for 80/tel Height
215cdf0e10cSrcweir sal_Bool mbFontSubChanged; // sal_True: FontSubstitution wurde zwischen Begin/End geaendert
216cdf0e10cSrcweir utl::DefaultFontConfiguration* mpDefaultFontConfiguration;
217cdf0e10cSrcweir utl::FontSubstConfiguration* mpFontSubstConfiguration;
218cdf0e10cSrcweir bool mbNativeFontConfig; // true: do not override UI font
219cdf0e10cSrcweir bool mbNoXORClipping; // true: do not use XOR to achieve clipping effects
220cdf0e10cSrcweir };
221cdf0e10cSrcweir
222cdf0e10cSrcweir
223cdf0e10cSrcweir // -----------------
224cdf0e10cSrcweir // - ImplSVWinData -
225cdf0e10cSrcweir // -----------------
226cdf0e10cSrcweir
227cdf0e10cSrcweir struct ImplSVWinData
228cdf0e10cSrcweir {
229cdf0e10cSrcweir Window* mpFirstFrame; // First FrameWindow
230cdf0e10cSrcweir Window* mpDefDialogParent; // Default Dialog Parent
231cdf0e10cSrcweir WorkWindow* mpAppWin; // Application-Window
232cdf0e10cSrcweir Window* mpFocusWin; // window, that has the focus
233cdf0e10cSrcweir Window* mpActiveApplicationFrame; // the last active application frame, can be used as DefModalDialogParent if no focuswin set
234cdf0e10cSrcweir Window* mpCaptureWin; // window, that has the mouse capture
235cdf0e10cSrcweir Window* mpLastDeacWin; // Window, that need a deactivate (FloatingWindow-Handling)
236cdf0e10cSrcweir DbgWindow* mpDbgWin; // debug window
237cdf0e10cSrcweir FloatingWindow* mpFirstFloat; // First FloatingWindow in PopupMode
238cdf0e10cSrcweir Dialog* mpLastExecuteDlg; // Erster Dialog, der sich in Execute befindet
239cdf0e10cSrcweir Window* mpExtTextInputWin; // Window, which is in ExtTextInput
240cdf0e10cSrcweir Window* mpTrackWin; // window, that is in tracking mode
241cdf0e10cSrcweir AutoTimer* mpTrackTimer; // tracking timer
242cdf0e10cSrcweir ImageList* mpMsgBoxImgList; // ImageList for MessageBox
243cdf0e10cSrcweir ImageList* mpMsgBoxHCImgList; // ImageList for MessageBox (high contrast mode)
244cdf0e10cSrcweir Window* mpAutoScrollWin; // window, that is in AutoScrollMode mode
245cdf0e10cSrcweir sal_uInt16 mnTrackFlags; // tracking flags
246cdf0e10cSrcweir sal_uInt16 mnAutoScrollFlags; // auto scroll flags
247cdf0e10cSrcweir sal_Bool mbNoDeactivate; // sal_True: keine Deactivate durchfuehren
248cdf0e10cSrcweir sal_Bool mbNoSaveFocus; // sal_True: menues must not save/restore focus
249cdf0e10cSrcweir sal_Bool mbNoSaveBackground; // sal_True: save background is unnecessary or even less performant
250cdf0e10cSrcweir };
251cdf0e10cSrcweir
252cdf0e10cSrcweir
253cdf0e10cSrcweir // ------------------
254cdf0e10cSrcweir // - ImplSVCtrlData -
255cdf0e10cSrcweir // ------------------
256cdf0e10cSrcweir
257cdf0e10cSrcweir typedef std::vector< std::pair< String, FieldUnit > > FieldUnitStringList;
258cdf0e10cSrcweir
259cdf0e10cSrcweir struct ImplSVCtrlData
260cdf0e10cSrcweir {
261cdf0e10cSrcweir ImageList* mpCheckImgList; // ImageList for CheckBoxes
262cdf0e10cSrcweir ImageList* mpRadioImgList; // ImageList for RadioButtons
263cdf0e10cSrcweir ImageList* mpPinImgList; // ImageList for PIN
264cdf0e10cSrcweir ImageList* mpSplitHPinImgList; // ImageList for Horizontale SplitWindows
265cdf0e10cSrcweir ImageList* mpSplitVPinImgList; // ImageList for Vertikale SplitWindows (PIN's)
266cdf0e10cSrcweir ImageList* mpSplitHArwImgList; // ImageList for Horizontale SplitWindows (Arrows)
267cdf0e10cSrcweir ImageList* mpSplitVArwImgList; // ImageList for Vertikale SplitWindows (Arrows)
268cdf0e10cSrcweir Image* mpDisclosurePlus;
269cdf0e10cSrcweir Image* mpDisclosurePlusHC;
270cdf0e10cSrcweir Image* mpDisclosureMinus;
271cdf0e10cSrcweir Image* mpDisclosureMinusHC;
272cdf0e10cSrcweir ImplTBDragMgr* mpTBDragMgr; // DragMgr for ToolBox
273cdf0e10cSrcweir sal_uInt16 mnCheckStyle; // CheckBox-Style for ImageList-Update
274cdf0e10cSrcweir sal_uInt16 mnRadioStyle; // Radio-Style for ImageList-Update
275cdf0e10cSrcweir sal_uLong mnLastCheckFColor; // Letzte FaceColor fuer CheckImage
276cdf0e10cSrcweir sal_uLong mnLastCheckWColor; // Letzte WindowColor fuer CheckImage
277cdf0e10cSrcweir sal_uLong mnLastCheckWTextColor; // Letzte WindowTextColor fuer CheckImage
278cdf0e10cSrcweir sal_uLong mnLastCheckLColor; // Letzte LightColor fuer CheckImage
279cdf0e10cSrcweir sal_uLong mnLastRadioFColor; // Letzte FaceColor fuer RadioImage
280cdf0e10cSrcweir sal_uLong mnLastRadioWColor; // Letzte WindowColor fuer RadioImage
281cdf0e10cSrcweir sal_uLong mnLastRadioLColor; // Letzte LightColor fuer RadioImage
282cdf0e10cSrcweir FieldUnitStringList* mpFieldUnitStrings; // list with field units
283cdf0e10cSrcweir FieldUnitStringList* mpCleanUnitStrings; // same list but with some "fluff" like spaces removed
284cdf0e10cSrcweir };
285cdf0e10cSrcweir
286cdf0e10cSrcweir
287cdf0e10cSrcweir // ------------------
288cdf0e10cSrcweir // - ImplSVHelpData -
289cdf0e10cSrcweir // ------------------
290cdf0e10cSrcweir
291cdf0e10cSrcweir struct ImplSVHelpData
292cdf0e10cSrcweir {
293cdf0e10cSrcweir sal_Bool mbContextHelp : 1; // is ContextHelp enabled
294cdf0e10cSrcweir sal_Bool mbExtHelp : 1; // is ExtendedHelp enabled
295cdf0e10cSrcweir sal_Bool mbExtHelpMode : 1; // is in ExtendedHelp Mode
296cdf0e10cSrcweir sal_Bool mbOldBalloonMode : 1; // BallonMode, befor ExtHelpMode started
297cdf0e10cSrcweir sal_Bool mbBalloonHelp : 1; // is BalloonHelp enabled
298cdf0e10cSrcweir sal_Bool mbQuickHelp : 1; // is QuickHelp enabled
299cdf0e10cSrcweir sal_Bool mbSetKeyboardHelp : 1; // tiphelp was activated by keyboard
300cdf0e10cSrcweir sal_Bool mbKeyboardHelp : 1; // tiphelp was activated by keyboard
301cdf0e10cSrcweir sal_Bool mbAutoHelpId : 1; // generate HelpIds
302cdf0e10cSrcweir sal_Bool mbRequestingHelp : 1; // In Window::RequestHelp
303cdf0e10cSrcweir HelpTextWindow* mpHelpWin; // HelpWindow
304cdf0e10cSrcweir sal_uLong mnLastHelpHideTime; // ticks of last show
305cdf0e10cSrcweir };
306cdf0e10cSrcweir
307cdf0e10cSrcweir struct ImplSVNWFData
308cdf0e10cSrcweir {
309cdf0e10cSrcweir bool mbMenuBarDockingAreaCommonBG; // e.g. WinXP default theme
310cdf0e10cSrcweir bool mbDockingAreaSeparateTB; // individual toolbar backgrounds
311cdf0e10cSrcweir // instead of one for docking area
312cdf0e10cSrcweir bool mbToolboxDropDownSeparate; // two adjacent buttons for
313cdf0e10cSrcweir // toolbox dropdown buttons
314cdf0e10cSrcweir int mnMenuFormatExtraBorder; // inner popup menu border
315cdf0e10cSrcweir bool mbFlatMenu; // no popup 3D border
316cdf0e10cSrcweir Color maMenuBarHighlightTextColor; // override higlight text color
317cdf0e10cSrcweir // in menubar if not transparent
318cdf0e10cSrcweir bool mbOpenMenuOnF10; // on gnome the first menu opens on F10
319cdf0e10cSrcweir bool mbNoFocusRects; // on Aqua focus rects are not used
320cdf0e10cSrcweir bool mbNoBoldTabFocus; // on Aqua and Gnome the focused tab has not bold text
321cdf0e10cSrcweir bool mbCenteredTabs; // on Aqua, tabs are centered
322cdf0e10cSrcweir bool mbNoActiveTabTextRaise; // on Aqua the text for the selected tab
323cdf0e10cSrcweir // should not "jump up" a pixel
324cdf0e10cSrcweir bool mbProgressNeedsErase; // set true for platforms that should draw the
325cdf0e10cSrcweir // window background before drawing the native
326cdf0e10cSrcweir // progress bar
327cdf0e10cSrcweir bool mbCheckBoxNeedsErase; // set true for platforms that should draw the
328cdf0e10cSrcweir // window background before drawing the native
329cdf0e10cSrcweir // checkbox
330cdf0e10cSrcweir bool mbScrollbarJumpPage; // true for "jump to here" behavior
331cdf0e10cSrcweir int mnStatusBarLowerRightOffset; // amount in pixel to avoid in the lower righthand corner
332cdf0e10cSrcweir bool mbCanDrawWidgetAnySize; // set to true currently on gtk
333cdf0e10cSrcweir };
334cdf0e10cSrcweir
335cdf0e10cSrcweir
336cdf0e10cSrcweir // --------------
337cdf0e10cSrcweir // - ImplSVData -
338cdf0e10cSrcweir // --------------
339cdf0e10cSrcweir
340cdf0e10cSrcweir struct ImplSVData
341cdf0e10cSrcweir {
342cdf0e10cSrcweir void* mpSalData; // SalData
343cdf0e10cSrcweir SalInstance* mpDefInst; // Default SalInstance
344cdf0e10cSrcweir Application* mpApp; // pApp
345cdf0e10cSrcweir WorkWindow* mpDefaultWin; // Default-Window
346cdf0e10cSrcweir sal_Bool mbDeInit; // Is VCL deinitializing
347cdf0e10cSrcweir sal_uLong mnThreadCount; // is VCL MultiThread enabled
348cdf0e10cSrcweir ImplConfigData* mpFirstConfigData; // Zeiger auf ersten Config-Block
349cdf0e10cSrcweir ImplTimerData* mpFirstTimerData; // list of all running timers
350cdf0e10cSrcweir SalTimer* mpSalTimer; // interface to sal event loop/timers
351cdf0e10cSrcweir SalI18NImeStatus* mpImeStatus; // interface to ime status window
352cdf0e10cSrcweir SalSystem* mpSalSystem; // SalSystem interface
353cdf0e10cSrcweir ResMgr* mpResMgr; // SV-Resource-Manager
354cdf0e10cSrcweir sal_uLong mnTimerPeriod; // current timer period
355cdf0e10cSrcweir sal_uLong mnTimerUpdate; // TimerCallbackProcs on stack
356cdf0e10cSrcweir sal_Bool mbNotAllTimerCalled;// sal_True: Es muessen noch Timer abgearbeitet werden
357cdf0e10cSrcweir sal_Bool mbNoCallTimer; // sal_True: No Timeout calls
358cdf0e10cSrcweir ImplSVAppData maAppData; // indepen data for class Application
359cdf0e10cSrcweir ImplSVGDIData maGDIData; // indepen data for Output classes
360cdf0e10cSrcweir ImplSVWinData maWinData; // indepen data for Windows classes
361cdf0e10cSrcweir ImplSVCtrlData maCtrlData; // indepen data for Control classes
362cdf0e10cSrcweir ImplSVHelpData maHelpData; // indepen data for Help classes
363cdf0e10cSrcweir ImplSVNWFData maNWFData;
364cdf0e10cSrcweir UnoWrapperBase* mpUnoWrapper;
365cdf0e10cSrcweir Window* mpIntroWindow; // the splash screen
366cdf0e10cSrcweir DockingManager* mpDockingManager;
367cdf0e10cSrcweir sal_Bool mbIsTestTool;
368cdf0e10cSrcweir
369cdf0e10cSrcweir vos::OThread::TThreadIdentifier mnMainThreadId;
370cdf0e10cSrcweir rtl::Reference< vcl::DisplayConnection > mxDisplayConnection;
371cdf0e10cSrcweir
372cdf0e10cSrcweir ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > mxAccessBridge;
373cdf0e10cSrcweir com::sun::star::uno::Reference< com::sun::star::frame::XSessionManagerClient > xSMClient;
374cdf0e10cSrcweir ::vcl::SettingsConfigItem* mpSettingsConfigItem;
375cdf0e10cSrcweir std::list< vcl::DeleteOnDeinitBase* >* mpDeinitDeleteList;
376cdf0e10cSrcweir std::hash_map< int, rtl::OUString >* mpPaperNames;
377cdf0e10cSrcweir };
378cdf0e10cSrcweir
379cdf0e10cSrcweir void ImplInitSVData();
380cdf0e10cSrcweir void ImplDeInitSVData();
381cdf0e10cSrcweir void ImplDestroySVData();
382cdf0e10cSrcweir Window* ImplGetDefaultWindow();
383cdf0e10cSrcweir VCL_PLUGIN_PUBLIC ResMgr* ImplGetResMgr();
384cdf0e10cSrcweir VCL_PLUGIN_PUBLIC ResId VclResId( sal_Int32 nId ); // throws std::bad_alloc if no res mgr
385cdf0e10cSrcweir DockingManager* ImplGetDockingManager();
386cdf0e10cSrcweir void ImplWindowAutoMnemonic( Window* pWindow );
387cdf0e10cSrcweir
388cdf0e10cSrcweir void ImplUpdateSystemProcessWindow();
389cdf0e10cSrcweir Window* ImplFindWindow( const SalFrame* pFrame, Point& rSalFramePos );
390cdf0e10cSrcweir
391cdf0e10cSrcweir // SVAPP.CXX
392cdf0e10cSrcweir sal_Bool ImplCallHotKey( const KeyCode& rKeyCode );
393cdf0e10cSrcweir void ImplFreeHotKeyData();
394cdf0e10cSrcweir void ImplFreeEventHookData();
395cdf0e10cSrcweir
396cdf0e10cSrcweir // WINPROC.CXX
397cdf0e10cSrcweir long ImplCallPreNotify( NotifyEvent& rEvt );
398cdf0e10cSrcweir long ImplCallEvent( NotifyEvent& rEvt );
399cdf0e10cSrcweir
400cdf0e10cSrcweir extern VCL_PLUGIN_PUBLIC ImplSVData* pImplSVData;
ImplGetSVData()401cdf0e10cSrcweir inline VCL_PLUGIN_PUBLIC ImplSVData* ImplGetSVData() { return pImplSVData; }
ImplGetAppSVData()402cdf0e10cSrcweir inline ImplSVData* ImplGetAppSVData() { return ImplGetSVData(); }
403cdf0e10cSrcweir
404cdf0e10cSrcweir bool ImplInitAccessBridge( sal_Bool bAllowCancel, sal_Bool &rCancelled );
405cdf0e10cSrcweir
406cdf0e10cSrcweir FieldUnitStringList* ImplGetFieldUnits();
407cdf0e10cSrcweir FieldUnitStringList* ImplGetCleanedFieldUnits();
408cdf0e10cSrcweir
409cdf0e10cSrcweir
410cdf0e10cSrcweir // -----------------------------------------------------------------------
411cdf0e10cSrcweir
412cdf0e10cSrcweir // -----------------
413cdf0e10cSrcweir // - ImplSVEmpyStr -
414cdf0e10cSrcweir // -----------------
415cdf0e10cSrcweir
416cdf0e10cSrcweir // Empty-SV-String
417cdf0e10cSrcweir
ImplGetSVEmptyStr()418cdf0e10cSrcweir inline const String& ImplGetSVEmptyStr()
419cdf0e10cSrcweir { return String::EmptyString(); }
ImplGetSVEmptyByteStr()420cdf0e10cSrcweir inline const ByteString& ImplGetSVEmptyByteStr()
421cdf0e10cSrcweir { return ByteString::EmptyString(); }
422cdf0e10cSrcweir
423cdf0e10cSrcweir // -----------------------------------------------------------------------
424cdf0e10cSrcweir
425cdf0e10cSrcweir // ----------------------
426cdf0e10cSrcweir // - struct ImplDelData -
427cdf0e10cSrcweir // ----------------------
428cdf0e10cSrcweir // ImplDelData is used as a "dog tag" by a window when it
429cdf0e10cSrcweir // does something that could indirectly destroy the window
430cdf0e10cSrcweir // TODO: wild destruction of a window should not be possible
431cdf0e10cSrcweir
432cdf0e10cSrcweir struct ImplDelData
433cdf0e10cSrcweir {
434cdf0e10cSrcweir ImplDelData* mpNext;
435cdf0e10cSrcweir const Window* mpWindow;
436cdf0e10cSrcweir sal_Bool mbDel;
437cdf0e10cSrcweir
ImplDelDataImplDelData438cdf0e10cSrcweir ImplDelData( const Window* pWindow = NULL )
439cdf0e10cSrcweir : mpNext( NULL ), mpWindow( NULL ), mbDel( sal_False )
440cdf0e10cSrcweir { if( pWindow ) AttachToWindow( pWindow ); }
441cdf0e10cSrcweir
442cdf0e10cSrcweir virtual ~ImplDelData();
443cdf0e10cSrcweir
IsDeadImplDelData444cdf0e10cSrcweir bool IsDead() const
445cdf0e10cSrcweir {
446cdf0e10cSrcweir DBG_ASSERT( mbDel == sal_False, "object deleted while in use !" );
447cdf0e10cSrcweir return (mbDel!=sal_False);
448cdf0e10cSrcweir }
IsDeleteImplDelData449cdf0e10cSrcweir sal_Bool /*deprecated */IsDelete() const { return (sal_Bool)IsDead(); }
450cdf0e10cSrcweir
451cdf0e10cSrcweir private:
452cdf0e10cSrcweir void AttachToWindow( const Window* );
453cdf0e10cSrcweir };
454cdf0e10cSrcweir
455cdf0e10cSrcweir // ---------------
456cdf0e10cSrcweir // - ImplSVEvent -
457cdf0e10cSrcweir // ---------------
458cdf0e10cSrcweir
459cdf0e10cSrcweir struct ImplSVEvent
460cdf0e10cSrcweir {
461cdf0e10cSrcweir sal_uLong mnEvent;
462cdf0e10cSrcweir void* mpData;
463cdf0e10cSrcweir Link* mpLink;
464cdf0e10cSrcweir Window* mpWindow;
465cdf0e10cSrcweir ImplDelData maDelData;
466cdf0e10cSrcweir sal_Bool mbCall;
467cdf0e10cSrcweir };
468cdf0e10cSrcweir
469cdf0e10cSrcweir #endif // _SV_SVDATA_HXX
470