1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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_WIN_SALFRAME_H
21 #define INCLUDED_VCL_INC_WIN_SALFRAME_H
23 #include <vcl/sysdata.hxx>
24 #include <salframe.hxx>
30 class WinSalFrame
: public SalFrame
33 HWND mhWnd
; // Window handle
34 HCURSOR mhCursor
; // cursor handle
35 HIMC mhDefIMEContext
; // default IME-Context
36 WinSalGraphics
* mpGraphics
; // current frame graphics
37 WinSalGraphics
* mpGraphics2
; // current frame graphics for other threads
38 WinSalFrame
* mpNextFrame
; // pointer to next frame
39 HMENU mSelectedhMenu
; // the menu where highlighting is currently going on
40 HMENU mLastActivatedhMenu
; // the menu that was most recently opened
41 SystemEnvData maSysData
; // system data
42 SalFrameState maState
; // frame state
43 int mnShowState
; // show state
44 long mnWidth
; // client width in pixeln
45 long mnHeight
; // client height in pixeln
46 int mnMinWidth
; // min. client width in pixeln
47 int mnMinHeight
; // min. client height in pixeln
48 int mnMaxWidth
; // max. client width in pixeln
49 int mnMaxHeight
; // max. client height in pixeln
50 RECT maFullScreenRect
; // fullscreen rect
51 int mnFullScreenShowState
; // fullscreen restore show state
52 UINT mnInputLang
; // current Input Language
53 UINT mnInputCodePage
; // current Input CodePage
54 SalFrameStyleFlags mnStyle
; // style
55 bool mbGraphics
; // is Graphics used
56 bool mbCaption
; // has window a caption
57 bool mbBorder
; // has window a border
58 bool mbFixBorder
; // has window a fixed border
59 bool mbSizeBorder
; // has window a sizeable border
60 bool mbNoIcon
; // is an window without an icon
61 bool mbFloatWin
; // is a FloatingWindow
62 bool mbFullScreen
; // TRUE: in full screen mode
63 bool mbPresentation
; // TRUE: Presentation Mode running
64 bool mbInShow
; // inside a show call
65 bool mbRestoreMaximize
; // Restore-Maximize
66 bool mbInMoveMsg
; // Move-Message is being processed
67 bool mbInSizeMsg
; // Size-Message is being processed
68 bool mbFullScreenToolWin
; // WS_EX_TOOLWINDOW reset in FullScreenMode
69 bool mbDefPos
; // default-position
70 bool mbOverwriteState
; // TRUE: possible to change WindowState
71 bool mbIME
; // TRUE: We are in IME Mode
72 bool mbHandleIME
; // TRUE: We are handling the IME-Messages
73 bool mbSpezIME
; // TRUE: special IME
74 bool mbAtCursorIME
; // TRUE: We are only handling some IME-Messages
75 bool mbCandidateMode
; // TRUE: We are in Candidate-Mode
76 static bool mbInReparent
; // TRUE: ignore focus lost and gain due to reparenting
78 RGNDATA
* mpClipRgnData
;
81 sal_Int32 mnDisplay
; // Display used for Fullscreen, 0 is primary monitor
82 bool mbPropertiesStored
; // has values stored in the window property store
84 void updateScreenNumber();
87 virtual ~WinSalFrame() override
;
89 virtual SalGraphics
* AcquireGraphics() override
;
90 virtual void ReleaseGraphics( SalGraphics
* pGraphics
) override
;
91 virtual bool PostEvent(ImplSVEvent
* pData
) override
;
92 virtual void SetTitle( const OUString
& rTitle
) override
;
93 virtual void SetIcon( sal_uInt16 nIcon
) override
;
94 virtual void SetMenu( SalMenu
* pSalMenu
) override
;
95 virtual void DrawMenuBar() override
;
96 virtual void SetExtendedFrameStyle( SalExtStyle nExtStyle
) override
;
97 virtual void Show( bool bVisible
, bool bNoActivate
= FALSE
) override
;
98 virtual void SetMinClientSize( long nWidth
, long nHeight
) override
;
99 virtual void SetMaxClientSize( long nWidth
, long nHeight
) override
;
100 virtual void SetPosSize( long nX
, long nY
, long nWidth
, long nHeight
, sal_uInt16 nFlags
) override
;
101 virtual void GetClientSize( long& rWidth
, long& rHeight
) override
;
102 virtual void GetWorkArea( tools::Rectangle
& rRect
) override
;
103 virtual SalFrame
* GetParent() const override
;
104 virtual void SetWindowState( const SalFrameState
* pState
) override
;
105 virtual bool GetWindowState( SalFrameState
* pState
) override
;
106 virtual void ShowFullScreen( bool bFullScreen
, sal_Int32 nDisplay
) override
;
107 virtual void StartPresentation( bool bStart
) override
;
108 virtual void SetAlwaysOnTop( bool bOnTop
) override
;
109 virtual void ToTop( SalFrameToTop nFlags
) override
;
110 virtual void SetPointer( PointerStyle ePointerStyle
) override
;
111 virtual void CaptureMouse( bool bMouse
) override
;
112 virtual void SetPointerPos( long nX
, long nY
) override
;
113 using SalFrame::Flush
;
114 virtual void Flush() override
;
115 virtual void SetInputContext( SalInputContext
* pContext
) override
;
116 virtual void EndExtTextInput( EndExtTextInputFlags nFlags
) override
;
117 virtual OUString
GetKeyName( sal_uInt16 nKeyCode
) override
;
118 virtual bool MapUnicodeToKeyCode( sal_Unicode aUnicode
, LanguageType aLangType
, vcl::KeyCode
& rKeyCode
) override
;
119 virtual LanguageType
GetInputLanguage() override
;
120 virtual void UpdateSettings( AllSettings
& rSettings
) override
;
121 virtual void Beep() override
;
122 virtual const SystemEnvData
* GetSystemData() const override
;
123 virtual SalPointerState
GetPointerState() override
;
124 virtual KeyIndicatorState
GetIndicatorState() override
;
125 virtual void SimulateKeyPress( sal_uInt16 nKeyCode
) override
;
126 virtual void SetParent( SalFrame
* pNewParent
) override
;
127 virtual bool SetPluginParent( SystemParentData
* pNewParent
) override
;
128 virtual void SetScreenNumber( unsigned int ) override
;
129 virtual void SetApplicationID( const OUString
&rApplicationID
) override
;
130 virtual void ResetClipRegion() override
;
131 virtual void BeginSetClipRegion( sal_uIntPtr nRects
) override
;
132 virtual void UnionClipRegion( long nX
, long nY
, long nWidth
, long nHeight
) override
;
133 virtual void EndSetClipRegion() override
;
136 void ImplSalGetWorkArea( HWND hWnd
, RECT
*pRect
, const RECT
*pParentRect
);
138 // get foreign key names
140 OUString
getKeysReplacementName(
141 OUString
const & pLang
,
145 #endif // INCLUDED_VCL_INC_WIN_SALFRAME_H
147 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */