1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: salframe.h,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef _SV_SALFRAME_H
32 #define _SV_SALFRAME_H
35 #include <vcl/sysdata.hxx>
36 #include <vcl/salframe.hxx>
39 #ifndef PM_BIDI_INCLUDED
63 class Os2SalFrame
: public SalFrame
66 HWND mhWndFrame
; // HWND-Frame
67 HWND mhWndClient
; // HWND-Client
69 HPOINTER mhPointer
; // Current MousePointer
70 void* mpInst
; // VCL-Instance
71 //SALFRAMEPROC mpProc; // VCL-Proc
72 Os2SalGraphics
* mpGraphics
; // current frame graphics
73 Os2SalFrame
* mpNextFrame
; // pointer to next frame
74 SystemEnvData maSysData
; // system data
75 SalFrameState maState
; // frame state
76 int mnShowState
; // show state
77 ULONG mnStyle
; // SalFrameStyle
78 long mnWidth
; // Window-Witdth
79 long mnHeight
; // Window-Height
80 SWP maFullScreenRect
; // WindowRect befor FullScreenMode
81 BOOL mbGraphics
; // is Graphics used
82 BOOL mbAllwayOnTop
; // Allways on top modus
83 BOOL mbVisible
; // Visible Show/Hide-Status
84 BOOL mbMinHide
; // hide called from OS2
85 BOOL mbHandleIME
; // TRUE: Wir handeln die IME-Messages
86 BOOL mbConversionMode
; // TRUE: Wir befinden uns im Conversion-Modus
87 BOOL mbCandidateMode
; // TRUE: Wir befinden uns im Candidate-Modus
88 BOOL mbCaption
; // has window a caption
89 BOOL mbBorder
; // has window a border
90 BOOL mbFixBorder
; // has window a fixed border
91 BOOL mbSizeBorder
; // has window a sizeable border
92 BOOL mbNoIcon
; // is an window without an icon
93 BOOL mbFloatWin
; // is a FloatingWindow
94 BOOL mbFullScreen
; // TRUE: in full screen mode
95 BOOL mbPresentation
; // TRUE: Presentation Mode running
96 BOOL mbInShow
; // innerhalb eines Show-Aufrufs
97 BOOL mbRestoreMaximize
; // Restore-Maximize
98 BOOL mbInMoveMsg
; // Move-Message wird verarbeitet
99 BOOL mbInSizeMsg
; // Size-Message wird verarbeitet
100 BOOL mbFullScreenToolWin
; // WS_EX_TOOLWINDOW reset in FullScreenMode
101 BOOL mbDefPos
; // default-position
102 BOOL mbOverwriteState
; // TRUE: WindowState darf umgesetzt werden
104 int mnMinWidth
; // min. client width in pixeln
105 int mnMinHeight
; // min. client height in pixeln
106 int mnMaxWidth
; // max. client width in pixeln
107 int mnMaxHeight
; // max. client height in pixeln
108 static ULONG mnInputLang
; // current Input Language
109 KHAND mnKeyboardHandle
; // current unicode keyboard
110 static BOOL mbInReparent
; // TRUE: ignore focus lost and gain due to reparenting
113 Os2SalFrame
* mpParentFrame
; // parent frame pointer
117 virtual ~Os2SalFrame();
119 virtual SalGraphics
* GetGraphics();
120 virtual void ReleaseGraphics( SalGraphics
* pGraphics
);
121 virtual BOOL
PostEvent( void* pData
);
122 virtual void SetTitle( const XubString
& rTitle
);
123 virtual void SetIcon( USHORT nIcon
);
124 virtual void SetMenu( SalMenu
* pSalMenu
);
125 virtual void DrawMenuBar();
126 virtual void SetExtendedFrameStyle( SalExtStyle nExtStyle
);
127 virtual void Show( BOOL bVisible
, BOOL bNoActivate
= FALSE
);
128 virtual void Enable( BOOL bEnable
);
129 virtual void SetMinClientSize( long nWidth
, long nHeight
);
130 virtual void SetMaxClientSize( long nWidth
, long nHeight
);
131 virtual void SetPosSize( long nX
, long nY
, long nWidth
, long nHeight
, USHORT nFlags
);
132 virtual void GetClientSize( long& rWidth
, long& rHeight
);
133 virtual void GetWorkArea( RECTL
& rRect
);
134 virtual void GetWorkArea( Rectangle
& rRect
);
135 virtual SalFrame
* GetParent() const;
136 virtual void SetWindowState( const SalFrameState
* pState
);
137 virtual BOOL
GetWindowState( SalFrameState
* pState
);
138 virtual void ShowFullScreen( BOOL bFullScreen
, sal_Int32 nDisplay
);
139 virtual void StartPresentation( BOOL bStart
);
140 virtual void SetAlwaysOnTop( BOOL bOnTop
);
141 virtual void ToTop( USHORT nFlags
);
142 virtual void SetPointer( PointerStyle ePointerStyle
);
143 virtual void CaptureMouse( BOOL bMouse
);
144 virtual void SetPointerPos( long nX
, long nY
);
145 virtual void Flush();
147 virtual void SetInputContext( SalInputContext
* pContext
);
148 virtual void EndExtTextInput( USHORT nFlags
);
149 virtual String
GetKeyName( USHORT nKeyCode
);
150 virtual String
GetSymbolKeyName( const XubString
& rFontName
, USHORT nKeyCode
);
151 virtual BOOL
MapUnicodeToKeyCode( sal_Unicode aUnicode
, LanguageType aLangType
, KeyCode
& rKeyCode
);
152 virtual LanguageType
GetInputLanguage();
153 virtual SalBitmap
* SnapShot();
154 virtual void UpdateSettings( AllSettings
& rSettings
);
155 virtual void Beep( SoundType eSoundType
);
156 virtual const SystemEnvData
* GetSystemData() const;
157 virtual SalPointerState
GetPointerState();
158 virtual SalIndicatorState
GetIndicatorState();
159 virtual void SimulateKeyPress( USHORT nKeyCode
);
160 virtual void SetParent( SalFrame
* pNewParent
);
161 virtual bool SetPluginParent( SystemParentData
* pNewParent
);
162 virtual void SetBackgroundBitmap( SalBitmap
* );
163 virtual void SetScreenNumber( unsigned int );
164 virtual void ResetClipRegion();
165 virtual void BeginSetClipRegion( ULONG nRects
);
166 virtual void UnionClipRegion( long nX
, long nY
, long nWidth
, long nHeight
);
167 virtual void EndSetClipRegion();
171 #endif // _SV_SALFRAME_H