xref: /aoo42x/main/vcl/inc/win/salframe.h (revision 79aad27f)
1*2123d757SAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
3*2123d757SAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4*2123d757SAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5*2123d757SAndrew Rist  * distributed with this work for additional information
6*2123d757SAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7*2123d757SAndrew Rist  * to you under the Apache License, Version 2.0 (the
8*2123d757SAndrew Rist  * "License"); you may not use this file except in compliance
9*2123d757SAndrew Rist  * with the License.  You may obtain a copy of the License at
10*2123d757SAndrew Rist  *
11*2123d757SAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12*2123d757SAndrew Rist  *
13*2123d757SAndrew Rist  * Unless required by applicable law or agreed to in writing,
14*2123d757SAndrew Rist  * software distributed under the License is distributed on an
15*2123d757SAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*2123d757SAndrew Rist  * KIND, either express or implied.  See the License for the
17*2123d757SAndrew Rist  * specific language governing permissions and limitations
18*2123d757SAndrew Rist  * under the License.
19*2123d757SAndrew Rist  *
20*2123d757SAndrew Rist  *************************************************************/
21*2123d757SAndrew Rist 
22*2123d757SAndrew Rist 
23cdf0e10cSrcweir 
24cdf0e10cSrcweir #ifndef _SV_SALFRAME_H
25cdf0e10cSrcweir #define _SV_SALFRAME_H
26cdf0e10cSrcweir 
27cdf0e10cSrcweir #include <vcl/sysdata.hxx>
28cdf0e10cSrcweir #include <salframe.hxx>
29cdf0e10cSrcweir 
30cdf0e10cSrcweir class WinSalGraphics;
31cdf0e10cSrcweir 
32cdf0e10cSrcweir // ----------------
33cdf0e10cSrcweir // - WinSalFrame -
34cdf0e10cSrcweir // ----------------
35cdf0e10cSrcweir 
36cdf0e10cSrcweir class WinSalFrame : public SalFrame
37cdf0e10cSrcweir {
38cdf0e10cSrcweir public:
39cdf0e10cSrcweir     HWND                    mhWnd;                  // Window handle
40cdf0e10cSrcweir     HCURSOR                 mhCursor;               // cursor handle
41cdf0e10cSrcweir     HIMC                    mhDefIMEContext;        // default IME-Context
42cdf0e10cSrcweir     WinSalGraphics*         mpGraphics;             // current frame graphics
43cdf0e10cSrcweir     WinSalGraphics*         mpGraphics2;            // current frame graphics for other threads
44cdf0e10cSrcweir     WinSalFrame*            mpNextFrame;            // pointer to next frame
45cdf0e10cSrcweir     HMENU                   mSelectedhMenu;         // the menu where highlighting is currently going on
46cdf0e10cSrcweir     HMENU                   mLastActivatedhMenu;    // the menu that was most recently opened
47cdf0e10cSrcweir     SystemEnvData           maSysData;              // system data
48cdf0e10cSrcweir     SalFrameState           maState;                // frame state
49cdf0e10cSrcweir     int                     mnShowState;            // show state
50cdf0e10cSrcweir     long                    mnWidth;                // client width in pixeln
51cdf0e10cSrcweir     long                    mnHeight;               // client height in pixeln
52cdf0e10cSrcweir     int                     mnMinWidth;             // min. client width in pixeln
53cdf0e10cSrcweir     int                     mnMinHeight;            // min. client height in pixeln
54cdf0e10cSrcweir     int                     mnMaxWidth;             // max. client width in pixeln
55cdf0e10cSrcweir     int                     mnMaxHeight;            // max. client height in pixeln
56cdf0e10cSrcweir     RECT                    maFullScreenRect;       // fullscreen rect
57cdf0e10cSrcweir     int                     mnFullScreenShowState;  // fullscreen restore show state
58cdf0e10cSrcweir     UINT                    mnInputLang;            // current Input Language
59cdf0e10cSrcweir     UINT                    mnInputCodePage;        // current Input CodePage
60cdf0e10cSrcweir     sal_uIntPtr                   mnStyle;                // style
61cdf0e10cSrcweir     sal_Bool                    mbGraphics;             // is Graphics used
62cdf0e10cSrcweir     sal_Bool                    mbCaption;              // has window a caption
63cdf0e10cSrcweir     sal_Bool                    mbBorder;               // has window a border
64cdf0e10cSrcweir     sal_Bool                    mbFixBorder;            // has window a fixed border
65cdf0e10cSrcweir     sal_Bool                    mbSizeBorder;           // has window a sizeable border
66cdf0e10cSrcweir     sal_Bool                    mbNoIcon;               // is an window without an icon
67cdf0e10cSrcweir     sal_Bool                    mbFloatWin;             // is a FloatingWindow
68cdf0e10cSrcweir     sal_Bool                    mbFullScreen;           // TRUE: in full screen mode
69cdf0e10cSrcweir     sal_Bool                    mbPresentation;         // TRUE: Presentation Mode running
70cdf0e10cSrcweir     sal_Bool                    mbInShow;               // innerhalb eines Show-Aufrufs
71cdf0e10cSrcweir     sal_Bool                    mbRestoreMaximize;      // Restore-Maximize
72cdf0e10cSrcweir     sal_Bool                    mbInMoveMsg;            // Move-Message wird verarbeitet
73cdf0e10cSrcweir     sal_Bool                    mbInSizeMsg;            // Size-Message wird verarbeitet
74cdf0e10cSrcweir     sal_Bool                    mbFullScreenToolWin;    // WS_EX_TOOLWINDOW reset in FullScreenMode
75cdf0e10cSrcweir     sal_Bool                    mbDefPos;               // default-position
76cdf0e10cSrcweir     sal_Bool                    mbOverwriteState;       // TRUE: WindowState darf umgesetzt werden
77cdf0e10cSrcweir     sal_Bool                    mbIME;                  // TRUE: We are in IME Mode
78cdf0e10cSrcweir     sal_Bool                    mbHandleIME;            // TRUE: Wir handeln die IME-Messages
79cdf0e10cSrcweir     sal_Bool                    mbSpezIME;              // TRUE: Spez IME
80cdf0e10cSrcweir     sal_Bool                    mbAtCursorIME;          // TRUE: Wir behandeln nur einige IME-Messages
81cdf0e10cSrcweir     sal_Bool                    mbCandidateMode;        // TRUE: Wir befinden uns im Candidate-Modus
82cdf0e10cSrcweir     static sal_Bool             mbInReparent;           // TRUE: ignore focus lost and gain due to reparenting
83cdf0e10cSrcweir 
84cdf0e10cSrcweir     RGNDATA*                mpClipRgnData;
85cdf0e10cSrcweir     RECT*                   mpNextClipRect;
86cdf0e10cSrcweir     sal_Bool                    mbFirstClipRect;
87cdf0e10cSrcweir 	sal_Int32				mnDisplay;				// Display used for Fullscreen, 0 is primary monitor
88cdf0e10cSrcweir 
89cdf0e10cSrcweir     void updateScreenNumber();
90cdf0e10cSrcweir public:
91cdf0e10cSrcweir     WinSalFrame();
92cdf0e10cSrcweir     virtual ~WinSalFrame();
93cdf0e10cSrcweir 
94cdf0e10cSrcweir     virtual SalGraphics*		GetGraphics();
95cdf0e10cSrcweir     virtual void				ReleaseGraphics( SalGraphics* pGraphics );
96cdf0e10cSrcweir     virtual sal_Bool				PostEvent( void* pData );
97cdf0e10cSrcweir     virtual void				SetTitle( const XubString& rTitle );
98cdf0e10cSrcweir     virtual void				SetIcon( sal_uInt16 nIcon );
99cdf0e10cSrcweir     virtual void                                SetMenu( SalMenu* pSalMenu );
100cdf0e10cSrcweir     virtual void                                DrawMenuBar();
101cdf0e10cSrcweir     virtual void                SetExtendedFrameStyle( SalExtStyle nExtStyle );
102cdf0e10cSrcweir     virtual void				Show( sal_Bool bVisible, sal_Bool bNoActivate = FALSE );
103cdf0e10cSrcweir     virtual void				Enable( sal_Bool bEnable );
104cdf0e10cSrcweir     virtual void                SetMinClientSize( long nWidth, long nHeight );
105cdf0e10cSrcweir     virtual void                SetMaxClientSize( long nWidth, long nHeight );
106cdf0e10cSrcweir     virtual void				SetPosSize( long nX, long nY, long nWidth, long nHeight, sal_uInt16 nFlags );
107cdf0e10cSrcweir     virtual void				GetClientSize( long& rWidth, long& rHeight );
108cdf0e10cSrcweir     virtual void				GetWorkArea( Rectangle& rRect );
109cdf0e10cSrcweir     virtual SalFrame*			GetParent() const;
110cdf0e10cSrcweir     virtual void				SetWindowState( const SalFrameState* pState );
111cdf0e10cSrcweir     virtual sal_Bool				GetWindowState( SalFrameState* pState );
112cdf0e10cSrcweir     virtual void				ShowFullScreen( sal_Bool bFullScreen, sal_Int32 nDisplay );
113cdf0e10cSrcweir     virtual void				StartPresentation( sal_Bool bStart );
114cdf0e10cSrcweir     virtual void				SetAlwaysOnTop( sal_Bool bOnTop );
115cdf0e10cSrcweir     virtual void				ToTop( sal_uInt16 nFlags );
116cdf0e10cSrcweir     virtual void				SetPointer( PointerStyle ePointerStyle );
117cdf0e10cSrcweir     virtual void				CaptureMouse( sal_Bool bMouse );
118cdf0e10cSrcweir     virtual void				SetPointerPos( long nX, long nY );
119cdf0e10cSrcweir     using SalFrame::Flush;
120cdf0e10cSrcweir     virtual void				Flush();
121cdf0e10cSrcweir     virtual void				Sync();
122cdf0e10cSrcweir     virtual void				SetInputContext( SalInputContext* pContext );
123cdf0e10cSrcweir     virtual void				EndExtTextInput( sal_uInt16 nFlags );
124cdf0e10cSrcweir     virtual String				GetKeyName( sal_uInt16 nKeyCode );
125cdf0e10cSrcweir     virtual String				GetSymbolKeyName( const XubString& rFontName, sal_uInt16 nKeyCode );
126cdf0e10cSrcweir     virtual sal_Bool                MapUnicodeToKeyCode( sal_Unicode aUnicode, LanguageType aLangType, KeyCode& rKeyCode );
127cdf0e10cSrcweir     virtual LanguageType		GetInputLanguage();
128cdf0e10cSrcweir     virtual SalBitmap*			SnapShot();
129cdf0e10cSrcweir     virtual void				UpdateSettings( AllSettings& rSettings );
130cdf0e10cSrcweir     virtual void				Beep( SoundType eSoundType );
131cdf0e10cSrcweir     virtual const SystemEnvData*	GetSystemData() const;
132cdf0e10cSrcweir     virtual SalPointerState		GetPointerState();
133cdf0e10cSrcweir     virtual void				SetParent( SalFrame* pNewParent );
134cdf0e10cSrcweir     virtual bool				SetPluginParent( SystemParentData* pNewParent );
135cdf0e10cSrcweir     virtual void                SetBackgroundBitmap( SalBitmap* );
136cdf0e10cSrcweir     virtual void                SetScreenNumber( unsigned int );
137cdf0e10cSrcweir 	virtual void				ResetClipRegion();
138cdf0e10cSrcweir 	virtual void				BeginSetClipRegion( sal_uIntPtr nRects );
139cdf0e10cSrcweir 	virtual void				UnionClipRegion( long nX, long nY, long nWidth, long nHeight );
140cdf0e10cSrcweir 	virtual void				EndSetClipRegion();
141cdf0e10cSrcweir };
142cdf0e10cSrcweir 
143cdf0e10cSrcweir void ImplSalGetWorkArea( HWND hWnd, RECT *pRect, const RECT *pParentRect );
144cdf0e10cSrcweir 
145cdf0e10cSrcweir #endif // _SV_SALFRAME_H
146