[Libreoffice-commits] core.git: vcl/android vcl/headless vcl/inc vcl/ios vcl/osx vcl/source vcl/unx vcl/win
Noel Grandin
noel at peralex.com
Sun Oct 4 23:52:46 PDT 2015
vcl/android/androidinst.cxx | 6 -
vcl/headless/svpframe.cxx | 10 +-
vcl/headless/svpinst.cxx | 4
vcl/inc/android/androidinst.hxx | 4
vcl/inc/headless/svpframe.hxx | 4
vcl/inc/headless/svpinst.hxx | 4
vcl/inc/ios/iosinst.hxx | 4
vcl/inc/osx/salframe.h | 4
vcl/inc/osx/salinst.h | 4
vcl/inc/salframe.hxx | 61 +++++++------
vcl/inc/salinst.hxx | 5 -
vcl/inc/unx/gtk/gtkframe.hxx | 26 ++---
vcl/inc/unx/gtk/gtkinst.hxx | 4
vcl/inc/unx/salframe.h | 20 ++--
vcl/inc/unx/salinst.h | 4
vcl/inc/win/salframe.h | 2
vcl/inc/win/salinst.h | 6 -
vcl/ios/iosinst.cxx | 4
vcl/osx/salframe.cxx | 22 ++--
vcl/osx/salframeview.mm | 22 ++--
vcl/osx/salinst.cxx | 4
vcl/osx/vclnsapp.mm | 2
vcl/source/window/window.cxx | 32 +++----
vcl/unx/generic/app/salinst.cxx | 4
vcl/unx/generic/app/wmadaptor.cxx | 12 +-
vcl/unx/generic/window/salframe.cxx | 158 +++++++++++++++++------------------
vcl/unx/gtk/app/gtkinst.cxx | 4
vcl/unx/gtk/window/gtksalframe.cxx | 86 +++++++++----------
vcl/unx/kde/salnativewidgets-kde.cxx | 2
vcl/unx/kde4/KDESalFrame.cxx | 2
vcl/win/source/app/salinst.cxx | 10 +-
vcl/win/source/window/salframe.cxx | 52 +++++------
32 files changed, 298 insertions(+), 290 deletions(-)
New commits:
commit 0e30af6fdc496ee1b935d68e979aa63729cef878
Author: Noel Grandin <noel at peralex.com>
Date: Fri Oct 2 11:37:49 2015 +0200
convert SAL_FRAME_STYLE to scoped enum
Change-Id: Ic3f7fddcea36c18ffe43c4c633d415f596a58cbc
Reviewed-on: https://gerrit.libreoffice.org/19094
Reviewed-by: Noel Grandin <noelgrandin at gmail.com>
Tested-by: Noel Grandin <noelgrandin at gmail.com>
diff --git a/vcl/android/androidinst.cxx b/vcl/android/androidinst.cxx
index ce46fee..787beba 100644
--- a/vcl/android/androidinst.cxx
+++ b/vcl/android/androidinst.cxx
@@ -118,7 +118,7 @@ class AndroidSalFrame : public SvpSalFrame
public:
AndroidSalFrame( AndroidSalInstance *pInstance,
SalFrame *pParent,
- sal_uLong nSalFrameStyle,
+ SalFrameStyleFlags nSalFrameStyle,
SystemParentData *pSysParent )
: SvpSalFrame( pInstance, pParent, nSalFrameStyle,
true, basebmp::Format::ThirtyTwoBitTcMaskRGBA,
@@ -177,12 +177,12 @@ public:
}
};
-SalFrame *AndroidSalInstance::CreateChildFrame( SystemParentData* pParent, sal_uLong nStyle )
+SalFrame *AndroidSalInstance::CreateChildFrame( SystemParentData* pParent, SalFrameStyleFlags nStyle )
{
return new AndroidSalFrame( this, NULL, nStyle, pParent );
}
-SalFrame *AndroidSalInstance::CreateFrame( SalFrame* pParent, sal_uLong nStyle )
+SalFrame *AndroidSalInstance::CreateFrame( SalFrame* pParent, SalFrameStyleFlags nStyle )
{
return new AndroidSalFrame( this, pParent, nStyle, NULL );
}
diff --git a/vcl/headless/svpframe.cxx b/vcl/headless/svpframe.cxx
index 4d4a225..408e05d 100644
--- a/vcl/headless/svpframe.cxx
+++ b/vcl/headless/svpframe.cxx
@@ -69,7 +69,7 @@ void SvpSalFrame::enableDamageTracker( bool bOn )
SvpSalFrame::SvpSalFrame( SvpSalInstance* pInstance,
SalFrame* pParent,
- sal_uLong nSalFrameStyle,
+ SalFrameStyleFlags nSalFrameStyle,
bool bTopDown,
basebmp::Format nScanlineFormat,
SystemParentData* ) :
@@ -137,9 +137,9 @@ SvpSalFrame::~SvpSalFrame()
SvpSalFrame* pFrame = const_cast<SvpSalFrame*>(static_cast<const SvpSalFrame*>(*it));
if( pFrame->m_bVisible &&
pFrame->m_pParent == NULL &&
- (pFrame->m_nStyle & (SAL_FRAME_STYLE_MOVEABLE |
- SAL_FRAME_STYLE_SIZEABLE |
- SAL_FRAME_STYLE_CLOSEABLE) ) != 0
+ (pFrame->m_nStyle & (SalFrameStyleFlags::MOVEABLE |
+ SalFrameStyleFlags::SIZEABLE |
+ SalFrameStyleFlags::CLOSEABLE) )
)
{
pFrame->GetFocus();
@@ -155,7 +155,7 @@ void SvpSalFrame::GetFocus()
if( s_pFocusFrame == this )
return;
- if( (m_nStyle & (SAL_FRAME_STYLE_OWNERDRAWDECORATION | SAL_FRAME_STYLE_FLOAT)) == 0 )
+ if( (m_nStyle & (SalFrameStyleFlags::OWNERDRAWDECORATION | SalFrameStyleFlags::FLOAT)) == SalFrameStyleFlags::NONE )
{
if( s_pFocusFrame )
s_pFocusFrame->LoseFocus();
diff --git a/vcl/headless/svpinst.cxx b/vcl/headless/svpinst.cxx
index bcecfac..1c47be3 100644
--- a/vcl/headless/svpinst.cxx
+++ b/vcl/headless/svpinst.cxx
@@ -198,12 +198,12 @@ bool SvpSalInstance::CheckTimeout( bool bExecuteTimers )
return bRet;
}
-SalFrame* SvpSalInstance::CreateChildFrame( SystemParentData* pParent, sal_uLong nStyle )
+SalFrame* SvpSalInstance::CreateChildFrame( SystemParentData* pParent, SalFrameStyleFlags nStyle )
{
return new SvpSalFrame( this, NULL, nStyle, false, SVP_DEFAULT_BITMAP_FORMAT, pParent );
}
-SalFrame* SvpSalInstance::CreateFrame( SalFrame* pParent, sal_uLong nStyle )
+SalFrame* SvpSalInstance::CreateFrame( SalFrame* pParent, SalFrameStyleFlags nStyle )
{
return new SvpSalFrame( this, pParent, nStyle, false, SVP_DEFAULT_BITMAP_FORMAT );
}
diff --git a/vcl/inc/android/androidinst.hxx b/vcl/inc/android/androidinst.hxx
index 21c6583..764d0cf 100644
--- a/vcl/inc/android/androidinst.hxx
+++ b/vcl/inc/android/androidinst.hxx
@@ -33,8 +33,8 @@ public:
// frame management
void GetWorkArea( Rectangle& rRect );
- SalFrame* CreateFrame( SalFrame* pParent, sal_uLong nStyle );
- SalFrame* CreateChildFrame( SystemParentData* pParent, sal_uLong nStyle );
+ SalFrame* CreateFrame( SalFrame* pParent, SalFrameStyleFlags nStyle );
+ SalFrame* CreateChildFrame( SystemParentData* pParent, SalFrameStyleFlags nStyle );
// mainloop pieces
virtual bool AnyInput( VclInputFlags nType );
diff --git a/vcl/inc/headless/svpframe.hxx b/vcl/inc/headless/svpframe.hxx
index 74efe19..16ff7e254 100644
--- a/vcl/inc/headless/svpframe.hxx
+++ b/vcl/inc/headless/svpframe.hxx
@@ -41,7 +41,7 @@ class VCL_DLLPUBLIC SvpSalFrame : public SalFrame
SvpSalInstance* m_pInstance;
SvpSalFrame* m_pParent; // pointer to parent frame
std::list< SvpSalFrame* > m_aChildren; // List of child frames
- sal_uLong m_nStyle;
+ SalFrameStyleFlags m_nStyle;
bool m_bVisible;
bool m_bTopDown;
#ifndef IOS
@@ -62,7 +62,7 @@ class VCL_DLLPUBLIC SvpSalFrame : public SalFrame
public:
SvpSalFrame( SvpSalInstance* pInstance,
SalFrame* pParent,
- sal_uLong nSalFrameStyle,
+ SalFrameStyleFlags nSalFrameStyle,
bool bTopDown,
basebmp::Format nScanlineFormat,
SystemParentData* pSystemParent = NULL );
diff --git a/vcl/inc/headless/svpinst.hxx b/vcl/inc/headless/svpinst.hxx
index e33527f..e1bf136 100644
--- a/vcl/inc/headless/svpinst.hxx
+++ b/vcl/inc/headless/svpinst.hxx
@@ -115,8 +115,8 @@ public:
bool CheckTimeout( bool bExecuteTimers = true );
// Frame
- virtual SalFrame* CreateChildFrame( SystemParentData* pParent, sal_uLong nStyle ) SAL_OVERRIDE;
- virtual SalFrame* CreateFrame( SalFrame* pParent, sal_uLong nStyle ) SAL_OVERRIDE;
+ virtual SalFrame* CreateChildFrame( SystemParentData* pParent, SalFrameStyleFlags nStyle ) SAL_OVERRIDE;
+ virtual SalFrame* CreateFrame( SalFrame* pParent, SalFrameStyleFlags nStyle ) SAL_OVERRIDE;
virtual void DestroyFrame( SalFrame* pFrame ) SAL_OVERRIDE;
// Object (System Child Window)
diff --git a/vcl/inc/ios/iosinst.hxx b/vcl/inc/ios/iosinst.hxx
index 4a1648a..1693986 100644
--- a/vcl/inc/ios/iosinst.hxx
+++ b/vcl/inc/ios/iosinst.hxx
@@ -40,8 +40,8 @@ public:
virtual SalSystem* CreateSalSystem() SAL_OVERRIDE;
void GetWorkArea( Rectangle& rRect );
- SalFrame* CreateFrame( SalFrame* pParent, sal_uLong nStyle ) SAL_OVERRIDE;
- SalFrame* CreateChildFrame( SystemParentData* pParent, sal_uLong nStyle ) SAL_OVERRIDE;
+ SalFrame* CreateFrame( SalFrame* pParent, SalFrameStyleFlags nStyle ) SAL_OVERRIDE;
+ SalFrame* CreateChildFrame( SystemParentData* pParent, SalFrameStyleFlags nStyle ) SAL_OVERRIDE;
SalFrame *getFocusFrame() const;
};
diff --git a/vcl/inc/osx/salframe.h b/vcl/inc/osx/salframe.h
index f426200..52a8ac3 100644
--- a/vcl/inc/osx/salframe.h
+++ b/vcl/inc/osx/salframe.h
@@ -70,7 +70,7 @@ public:
bool mbSized:1;
bool mbPresentation:1;
- sal_uLong mnStyle;
+ SalFrameStyleFlags mnStyle;
unsigned int mnStyleMask; // our style mask from NSWindow creation
sal_uInt64 mnLastEventTime;
@@ -102,7 +102,7 @@ public:
@throws std::runtime_error in case window creation fails
*/
- AquaSalFrame( SalFrame* pParent, sal_uLong salFrameStyle );
+ AquaSalFrame( SalFrame* pParent, SalFrameStyleFlags salFrameStyle );
virtual ~AquaSalFrame();
diff --git a/vcl/inc/osx/salinst.h b/vcl/inc/osx/salinst.h
index ba0eb12..2d98957 100644
--- a/vcl/inc/osx/salinst.h
+++ b/vcl/inc/osx/salinst.h
@@ -80,8 +80,8 @@ public:
AquaSalInstance();
virtual ~AquaSalInstance();
- virtual SalFrame* CreateChildFrame( SystemParentData* pParent, sal_uLong nStyle ) SAL_OVERRIDE;
- virtual SalFrame* CreateFrame( SalFrame* pParent, sal_uLong nStyle ) SAL_OVERRIDE;
+ virtual SalFrame* CreateChildFrame( SystemParentData* pParent, SalFrameStyleFlags nStyle ) SAL_OVERRIDE;
+ virtual SalFrame* CreateFrame( SalFrame* pParent, SalFrameStyleFlags nStyle ) SAL_OVERRIDE;
virtual void DestroyFrame( SalFrame* pFrame ) SAL_OVERRIDE;
virtual SalObject* CreateObject( SalFrame* pParent, SystemWindowData* pWindowData,
bool bShow = true ) SAL_OVERRIDE;
diff --git a/vcl/inc/salframe.hxx b/vcl/inc/salframe.hxx
index 26d275b..da95a5a 100644
--- a/vcl/inc/salframe.hxx
+++ b/vcl/inc/salframe.hxx
@@ -35,6 +35,7 @@
#include <vcl/keycod.hxx>
#include <vcl/window.hxx>
#include <vcl/vclptr.hxx>
+#include <o3tl/typed_flags_set.hxx>
// complete vcl::Window for SalFrame::CallCallback under -fsanitize=function
@@ -54,33 +55,39 @@ struct SystemEnvData;
#define SAL_FRAME_TOTOP_GRABFOCUS_ONLY ((sal_uInt16)0x0008)
// SalFrame styles
-#define SAL_FRAME_STYLE_DEFAULT ((sal_uLong)0x00000001)
-#define SAL_FRAME_STYLE_MOVEABLE ((sal_uLong)0x00000002)
-#define SAL_FRAME_STYLE_SIZEABLE ((sal_uLong)0x00000004)
-#define SAL_FRAME_STYLE_CLOSEABLE ((sal_uLong)0x00000008)
-
-// no shadow effect on Windows XP
-#define SAL_FRAME_STYLE_NOSHADOW ((sal_uLong)0x00000010)
-// indicate tooltip windows, so they can always be topmost
-#define SAL_FRAME_STYLE_TOOLTIP ((sal_uLong)0x00000020)
-// windows without windowmanager decoration, this typically only applies to floating windows
-#define SAL_FRAME_STYLE_OWNERDRAWDECORATION ((sal_uLong)0x00000040)
-// dialogs
-#define SAL_FRAME_STYLE_DIALOG ((sal_uLong)0x00000080)
-// partial fullscreen: fullscreen on one monitor of a multimonitor display
-#define SAL_FRAME_STYLE_PARTIAL_FULLSCREEN ((sal_uLong)0x00800000)
-// plugged system child window
-#define SAL_FRAME_STYLE_PLUG ((sal_uLong)0x10000000)
-// system child window inside another SalFrame
-#define SAL_FRAME_STYLE_SYSTEMCHILD ((sal_uLong)0x08000000)
-// floating window
-#define SAL_FRAME_STYLE_FLOAT ((sal_uLong)0x20000000)
-// floating window that needs to be focusable
-#define SAL_FRAME_STYLE_FLOAT_FOCUSABLE ((sal_uLong)0x04000000)
-// toolwindows should be painted with a smaller decoration
-#define SAL_FRAME_STYLE_TOOLWINDOW ((sal_uLong)0x40000000)
-// the window containing the intro bitmap, aka splashscreen
-#define SAL_FRAME_STYLE_INTRO ((sal_uLong)0x80000000)
+enum class SalFrameStyleFlags
+{
+ NONE = 0x00000000,
+ DEFAULT = 0x00000001,
+ MOVEABLE = 0x00000002,
+ SIZEABLE = 0x00000004,
+ CLOSEABLE = 0x00000008,
+ // no shadow effect on Windows XP
+ NOSHADOW = 0x00000010,
+ // indicate tooltip windows, so they can always be topmost
+ TOOLTIP = 0x00000020,
+ // windows without windowmanager decoration, this typically only applies to floating windows
+ OWNERDRAWDECORATION = 0x00000040,
+ // dialogs
+ DIALOG = 0x00000080,
+ // partial fullscreen: fullscreen on one monitor of a multimonitor display
+ PARTIAL_FULLSCREEN = 0x00800000,
+ // plugged system child window
+ PLUG = 0x10000000,
+ // system child window inside another SalFrame
+ SYSTEMCHILD = 0x08000000,
+ // floating window
+ FLOAT = 0x20000000,
+ // floating window that needs to be focusable
+ FLOAT_FOCUSABLE = 0x04000000,
+ // toolwindows should be painted with a smaller decoration
+ TOOLWINDOW = 0x40000000,
+ // the window containing the intro bitmap, aka splashscreen
+ INTRO = 0x00000100,
+};
+namespace o3tl {
+ template<> struct typed_flags<SalFrameStyleFlags> : is_typed_flags<SalFrameStyleFlags, 0x748001ff> {};
+};
// - extended frame style -
// - (sal equivalent to extended WinBits) -
diff --git a/vcl/inc/salinst.hxx b/vcl/inc/salinst.hxx
index 63e707e..ec429b9 100644
--- a/vcl/inc/salinst.hxx
+++ b/vcl/inc/salinst.hxx
@@ -57,6 +57,7 @@ struct SystemGraphicsData;
struct SystemWindowData;
class Menu;
enum class VclInputFlags;
+enum class SalFrameStyleFlags;
class VCL_PLUGIN_PUBLIC SalInstance
{
@@ -72,8 +73,8 @@ public:
// Frame
// DisplayName for Unix ???
- virtual SalFrame* CreateChildFrame( SystemParentData* pParent, sal_uLong nStyle ) = 0;
- virtual SalFrame* CreateFrame( SalFrame* pParent, sal_uLong nStyle ) = 0;
+ virtual SalFrame* CreateChildFrame( SystemParentData* pParent, SalFrameStyleFlags nStyle ) = 0;
+ virtual SalFrame* CreateFrame( SalFrame* pParent, SalFrameStyleFlags nStyle ) = 0;
virtual void DestroyFrame( SalFrame* pFrame ) = 0;
// Object (System Child Window)
diff --git a/vcl/inc/unx/gtk/gtkframe.hxx b/vcl/inc/unx/gtk/gtkframe.hxx
index f465c95..102f894 100644
--- a/vcl/inc/unx/gtk/gtkframe.hxx
+++ b/vcl/inc/unx/gtk/gtkframe.hxx
@@ -180,7 +180,7 @@ class GtkSalFrame : public SalFrame, public X11WindowProvider
GdkWindow* m_pForeignTopLevel;
GdkNativeWindow m_aForeignTopLevelWindow;
Pixmap m_hBackgroundPixmap;
- sal_uLong m_nStyle;
+ SalFrameStyleFlags m_nStyle;
SalExtStyle m_nExtStyle;
GtkSalFrame* m_pParent;
std::list< GtkSalFrame* > m_aChildren;
@@ -201,8 +201,8 @@ class GtkSalFrame : public SalFrame, public X11WindowProvider
bool m_bSendModChangeOnRelease;
bool m_bWindowIsGtkPlug;
bool m_bSetFocusOnMap;
- OUString m_aTitle;
- OUString m_sWMClass;
+ OUString m_aTitle;
+ OUString m_sWMClass;
IMHandler* m_pIMHandler;
@@ -229,7 +229,7 @@ class GtkSalFrame : public SalFrame, public X11WindowProvider
#endif
guint m_nWatcherId;
- void Init( SalFrame* pParent, sal_uLong nStyle );
+ void Init( SalFrame* pParent, SalFrameStyleFlags nStyle );
void Init( SystemParentData* pSysData );
void InitCommon();
void InvalidateGraphics();
@@ -282,20 +282,20 @@ class GtkSalFrame : public SalFrame, public X11WindowProvider
bool isFloatGrabWindow() const
{
return
- (m_nStyle & SAL_FRAME_STYLE_FLOAT) && // only a float can be floatgrab
- !(m_nStyle & SAL_FRAME_STYLE_TOOLTIP) && // tool tips are not
- !(m_nStyle & SAL_FRAME_STYLE_OWNERDRAWDECORATION) && // toolbars are also not
- !(m_nStyle & SAL_FRAME_STYLE_FLOAT_FOCUSABLE); // focusable floats are not
+ (m_nStyle & SalFrameStyleFlags::FLOAT) && // only a float can be floatgrab
+ !(m_nStyle & SalFrameStyleFlags::TOOLTIP) && // tool tips are not
+ !(m_nStyle & SalFrameStyleFlags::OWNERDRAWDECORATION) && // toolbars are also not
+ !(m_nStyle & SalFrameStyleFlags::FLOAT_FOCUSABLE); // focusable floats are not
}
bool isChild( bool bPlug = true, bool bSysChild = true )
{
- sal_uLong nMask = 0;
+ SalFrameStyleFlags nMask = SalFrameStyleFlags::NONE;
if( bPlug )
- nMask |= SAL_FRAME_STYLE_PLUG;
+ nMask |= SalFrameStyleFlags::PLUG;
if( bSysChild )
- nMask |= SAL_FRAME_STYLE_SYSTEMCHILD;
- return (m_nStyle & nMask) != 0;
+ nMask |= SalFrameStyleFlags::SYSTEMCHILD;
+ return bool(m_nStyle & nMask);
}
//call gtk_window_resize if the current size differs and
@@ -327,7 +327,7 @@ public:
#if GTK_CHECK_VERSION(3,0,0)
basebmp::BitmapDeviceSharedPtr m_aFrame;
#endif
- GtkSalFrame( SalFrame* pParent, sal_uLong nStyle );
+ GtkSalFrame( SalFrame* pParent, SalFrameStyleFlags nStyle );
GtkSalFrame( SystemParentData* pSysData );
guint m_nMenuExportId;
diff --git a/vcl/inc/unx/gtk/gtkinst.hxx b/vcl/inc/unx/gtk/gtkinst.hxx
index 35b341c..6b68a84 100644
--- a/vcl/inc/unx/gtk/gtkinst.hxx
+++ b/vcl/inc/unx/gtk/gtkinst.hxx
@@ -62,8 +62,8 @@ public:
void EnsureInit();
virtual void AfterAppInit() SAL_OVERRIDE;
- virtual SalFrame* CreateFrame( SalFrame* pParent, sal_uLong nStyle ) SAL_OVERRIDE;
- virtual SalFrame* CreateChildFrame( SystemParentData* pParent, sal_uLong nStyle ) SAL_OVERRIDE;
+ virtual SalFrame* CreateFrame( SalFrame* pParent, SalFrameStyleFlags nStyle ) SAL_OVERRIDE;
+ virtual SalFrame* CreateChildFrame( SystemParentData* pParent, SalFrameStyleFlags nStyle ) SAL_OVERRIDE;
virtual SalObject* CreateObject( SalFrame* pParent, SystemWindowData* pWindowData, bool bShow = true ) SAL_OVERRIDE;
virtual SalSystem* CreateSalSystem() SAL_OVERRIDE;
virtual SalInfoPrinter* CreateInfoPrinter(SalPrinterQueueInfo* pPrinterQueueInfo, ImplJobSetup* pJobSetup) SAL_OVERRIDE;
diff --git a/vcl/inc/unx/salframe.h b/vcl/inc/unx/salframe.h
index 5ae4a4a..e211fd1 100644
--- a/vcl/inc/unx/salframe.h
+++ b/vcl/inc/unx/salframe.h
@@ -87,7 +87,7 @@ class VCLPLUG_GEN_PUBLIC X11SalFrame : public SalFrame, public X11WindowProvider
int nWidth_; // client width
int nHeight_; // client height
Rectangle maRestorePosSize;
- sal_uIntPtr nStyle_;
+ SalFrameStyleFlags nStyle_;
SalExtStyle mnExtStyle;
bool bAlwaysOnTop_;
bool bViewable_;
@@ -115,9 +115,9 @@ class VCLPLUG_GEN_PUBLIC X11SalFrame : public SalFrame, public X11WindowProvider
// icon id
int mnIconID;
- OUString m_aTitle;
+ OUString m_aTitle;
- OUString m_sWMClass;
+ OUString m_sWMClass;
SystemEnvData maSystemChildData;
@@ -160,11 +160,11 @@ class VCLPLUG_GEN_PUBLIC X11SalFrame : public SalFrame, public X11WindowProvider
void updateWMClass();
public:
- X11SalFrame( SalFrame* pParent, sal_uIntPtr nSalFrameStyle, SystemParentData* pSystemParent = NULL );
+ X11SalFrame( SalFrame* pParent, SalFrameStyleFlags nSalFrameStyle, SystemParentData* pSystemParent = NULL );
virtual ~X11SalFrame();
long Dispatch( XEvent *pEvent );
- void Init( sal_uIntPtr nSalFrameStyle, SalX11Screen nScreen = SalX11Screen( -1 ),
+ void Init( SalFrameStyleFlags nSalFrameStyle, SalX11Screen nScreen = SalX11Screen( -1 ),
SystemParentData* pParentData = NULL, bool bUseGeometry = false );
SalDisplay* GetDisplay() const
@@ -181,16 +181,16 @@ public:
::Window GetForeignParent() const { return mhForeignParent; }
::Window GetStackingWindow() const { return mhStackingWindow; }
long Close() const { return CallCallback( SALEVENT_CLOSE, 0 ); }
- sal_uIntPtr GetStyle() const { return nStyle_; }
+ SalFrameStyleFlags GetStyle() const { return nStyle_; }
- Cursor GetCursor() const { return hCursor_; }
- bool IsCaptured() const { return nCaptured_ == 1; }
+ Cursor GetCursor() const { return hCursor_; }
+ bool IsCaptured() const { return nCaptured_ == 1; }
#if !defined(__synchronous_extinput__)
void HandleExtTextEvent (XClientMessageEvent *pEvent);
#endif
bool IsOverrideRedirect() const;
- bool IsChildWindow() const { return (nStyle_ & (SAL_FRAME_STYLE_PLUG|SAL_FRAME_STYLE_SYSTEMCHILD)) != 0; }
- bool IsSysChildWindow() const { return (nStyle_ & (SAL_FRAME_STYLE_SYSTEMCHILD)) != 0; }
+ bool IsChildWindow() const { return bool(nStyle_ & (SalFrameStyleFlags::PLUG|SalFrameStyleFlags::SYSTEMCHILD)); }
+ bool IsSysChildWindow() const { return bool(nStyle_ & (SalFrameStyleFlags::SYSTEMCHILD)); }
bool IsFloatGrabWindow() const;
SalI18N_InputContext* getInputContext() const { return mpInputContext; }
bool isMapped() const { return bMapped_; }
diff --git a/vcl/inc/unx/salinst.h b/vcl/inc/unx/salinst.h
index ea57496..ebd3c36 100644
--- a/vcl/inc/unx/salinst.h
+++ b/vcl/inc/unx/salinst.h
@@ -48,8 +48,8 @@ public:
X11SalInstance( SalYieldMutex* pMutex ) : SalGenericInstance( pMutex ), mpXLib(NULL) {}
virtual ~X11SalInstance();
- virtual SalFrame* CreateChildFrame( SystemParentData* pParent, sal_uIntPtr nStyle ) SAL_OVERRIDE;
- virtual SalFrame* CreateFrame( SalFrame* pParent, sal_uIntPtr nStyle ) SAL_OVERRIDE;
+ virtual SalFrame* CreateChildFrame( SystemParentData* pParent, SalFrameStyleFlags nStyle ) SAL_OVERRIDE;
+ virtual SalFrame* CreateFrame( SalFrame* pParent, SalFrameStyleFlags nStyle ) SAL_OVERRIDE;
virtual void DestroyFrame( SalFrame* pFrame ) SAL_OVERRIDE;
virtual SalObject* CreateObject( SalFrame* pParent, SystemWindowData* pWindowData, bool bShow = true ) SAL_OVERRIDE;
diff --git a/vcl/inc/win/salframe.h b/vcl/inc/win/salframe.h
index 19819bd..68a2337 100644
--- a/vcl/inc/win/salframe.h
+++ b/vcl/inc/win/salframe.h
@@ -52,7 +52,7 @@ public:
int mnFullScreenShowState; // fullscreen restore show state
UINT mnInputLang; // current Input Language
UINT mnInputCodePage; // current Input CodePage
- sal_uIntPtr mnStyle; // style
+ SalFrameStyleFlags mnStyle; // style
bool mbGraphics; // is Graphics used
bool mbCaption; // has window a caption
bool mbBorder; // has window a border
diff --git a/vcl/inc/win/salinst.h b/vcl/inc/win/salinst.h
index 6c41314..7bdf3fc 100644
--- a/vcl/inc/win/salinst.h
+++ b/vcl/inc/win/salinst.h
@@ -46,8 +46,8 @@ public:
WinSalInstance();
virtual ~WinSalInstance();
- virtual SalFrame* CreateChildFrame( SystemParentData* pParent, sal_uIntPtr nStyle ) SAL_OVERRIDE;
- virtual SalFrame* CreateFrame( SalFrame* pParent, sal_uIntPtr nStyle ) SAL_OVERRIDE;
+ virtual SalFrame* CreateChildFrame( SystemParentData* pParent, SalFrameStyleFlags nStyle ) SAL_OVERRIDE;
+ virtual SalFrame* CreateFrame( SalFrame* pParent, SalFrameStyleFlags nStyle ) SAL_OVERRIDE;
virtual void DestroyFrame( SalFrame* pFrame ) SAL_OVERRIDE;
virtual SalObject* CreateObject( SalFrame* pParent, SystemWindowData* pWindowData, bool bShow = true ) SAL_OVERRIDE;
virtual void DestroyObject( SalObject* pObject ) SAL_OVERRIDE;
@@ -85,7 +85,7 @@ public:
static int WorkaroundExceptionHandlingInUSER32Lib(int nExcept, LPEXCEPTION_POINTERS pExceptionInfo);
};
-SalFrame* ImplSalCreateFrame( WinSalInstance* pInst, HWND hWndParent, sal_uIntPtr nSalFrameStyle );
+SalFrame* ImplSalCreateFrame( WinSalInstance* pInst, HWND hWndParent, SalFrameStyleFlags nSalFrameStyle );
SalObject* ImplSalCreateObject( WinSalInstance* pInst, WinSalFrame* pParent );
HWND ImplSalReCreateHWND( HWND hWndParent, HWND oldhWnd, bool bAsChild );
void ImplSalStartTimer( sal_uIntPtr nMS, bool bMutex = false );
diff --git a/vcl/ios/iosinst.cxx b/vcl/ios/iosinst.cxx
index 3139268..2b58ed7 100644
--- a/vcl/ios/iosinst.cxx
+++ b/vcl/ios/iosinst.cxx
@@ -166,12 +166,12 @@ public:
}
};
-SalFrame *IosSalInstance::CreateChildFrame( SystemParentData* pParent, sal_uLong nStyle )
+SalFrame *IosSalInstance::CreateChildFrame( SystemParentData* pParent, SalFrameStyleFlags nStyle )
{
return new IosSalFrame( this, NULL, nStyle, pParent );
}
-SalFrame *IosSalInstance::CreateFrame( SalFrame* pParent, sal_uLong nStyle )
+SalFrame *IosSalInstance::CreateFrame( SalFrame* pParent, SalFrameStyleFlags nStyle )
{
return new IosSalFrame( this, pParent, nStyle, NULL );
}
diff --git a/vcl/osx/salframe.cxx b/vcl/osx/salframe.cxx
index 3fabeb4..275ba89 100644
--- a/vcl/osx/salframe.cxx
+++ b/vcl/osx/salframe.cxx
@@ -51,7 +51,7 @@ using namespace std;
AquaSalFrame* AquaSalFrame::s_pCaptureFrame = NULL;
-AquaSalFrame::AquaSalFrame( SalFrame* pParent, sal_uLong salFrameStyle ) :
+AquaSalFrame::AquaSalFrame( SalFrame* pParent, SalFrameStyleFlags salFrameStyle ) :
mpNSWindow(nil),
mpNSView(nil),
mpDockMenuEntry(nil),
@@ -143,10 +143,10 @@ void AquaSalFrame::initWindowAndView()
maGeometry.nHeight = static_cast<unsigned int>(aVisibleRect.size.height * 0.8);
// calculate style mask
- if( (mnStyle & SAL_FRAME_STYLE_FLOAT) ||
- (mnStyle & SAL_FRAME_STYLE_OWNERDRAWDECORATION) )
+ if( (mnStyle & SalFrameStyleFlags::FLOAT) ||
+ (mnStyle & SalFrameStyleFlags::OWNERDRAWDECORATION) )
mnStyleMask = NSBorderlessWindowMask;
- else if( mnStyle & SAL_FRAME_STYLE_DEFAULT )
+ else if( mnStyle & SalFrameStyleFlags::DEFAULT )
{
mnStyleMask = NSTitledWindowMask |
NSMiniaturizableWindowMask |
@@ -161,15 +161,15 @@ void AquaSalFrame::initWindowAndView()
}
else
{
- if( (mnStyle & SAL_FRAME_STYLE_MOVEABLE) )
+ if( (mnStyle & SalFrameStyleFlags::MOVEABLE) )
{
mnStyleMask |= NSTitledWindowMask;
if( mpParent == NULL )
mnStyleMask |= NSMiniaturizableWindowMask;
}
- if( (mnStyle & SAL_FRAME_STYLE_SIZEABLE) )
+ if( (mnStyle & SalFrameStyleFlags::SIZEABLE) )
mnStyleMask |= NSResizableWindowMask;
- if( (mnStyle & SAL_FRAME_STYLE_CLOSEABLE) )
+ if( (mnStyle & SalFrameStyleFlags::CLOSEABLE) )
mnStyleMask |= NSClosableWindowMask;
// documentation says anything other than NSBorderlessWindowMask (=0)
// should also include NSTitledWindowMask;
@@ -188,7 +188,7 @@ void AquaSalFrame::initWindowAndView()
return;
}
- if( (mnStyle & SAL_FRAME_STYLE_TOOLTIP) )
+ if( (mnStyle & SalFrameStyleFlags::TOOLTIP) )
[mpNSWindow setIgnoresMouseEvents: YES];
else
[mpNSWindow setAcceptsMouseMovedEvents: YES];
@@ -291,7 +291,7 @@ void AquaSalFrame::SetTitle(const OUString& rTitle)
[mpNSWindow setTitle: pTitle];
// create an entry in the dock menu
- const sal_uLong nAppWindowStyle = (SAL_FRAME_STYLE_CLOSEABLE | SAL_FRAME_STYLE_MOVEABLE);
+ const SalFrameStyleFlags nAppWindowStyle = (SalFrameStyleFlags::CLOSEABLE | SalFrameStyleFlags::MOVEABLE);
if( mpParent == NULL &&
(mnStyle & nAppWindowStyle) == nAppWindowStyle )
{
@@ -361,7 +361,7 @@ void AquaSalFrame::initShow()
nNewY - mpParent->maGeometry.nY,
0, 0, SAL_FRAME_POSSIZE_X | SAL_FRAME_POSSIZE_Y );
}
- else if( ! (mnStyle & SAL_FRAME_STYLE_SIZEABLE) )
+ else if( ! (mnStyle & SalFrameStyleFlags::SIZEABLE) )
{
// center on screen
long nNewX = (aScreenRect.GetWidth() - maGeometry.nWidth)/2;
@@ -420,7 +420,7 @@ void AquaSalFrame::Show(bool bVisible, bool bNoActivate)
floaters and ownerdraw windows have not yet shown up in cases where
we don't want the parent to become visible
*/
- if( mpParent->mbShown || (mnStyle & (SAL_FRAME_STYLE_OWNERDRAWDECORATION | SAL_FRAME_STYLE_FLOAT) ) )
+ if( mpParent->mbShown || (mnStyle & (SalFrameStyleFlags::OWNERDRAWDECORATION | SalFrameStyleFlags::FLOAT) ) )
{
[mpParent->mpNSWindow addChildWindow: mpNSWindow ordered: NSWindowAbove];
}
diff --git a/vcl/osx/salframeview.mm b/vcl/osx/salframeview.mm
index 5be7cc3..4016090 100644
--- a/vcl/osx/salframeview.mm
+++ b/vcl/osx/salframeview.mm
@@ -183,8 +183,8 @@ static AquaSalFrame* getMouseContainerFrame()
#endif
// enable OSX>=10.7 fullscreen options if available and useful
- bool bAllowFullScreen = (0 == (mpFrame->mnStyle & (SAL_FRAME_STYLE_DIALOG | SAL_FRAME_STYLE_TOOLTIP | SAL_FRAME_STYLE_SYSTEMCHILD | SAL_FRAME_STYLE_FLOAT | SAL_FRAME_STYLE_TOOLWINDOW | SAL_FRAME_STYLE_INTRO)));
- bAllowFullScreen &= (0 == (~mpFrame->mnStyle & (SAL_FRAME_STYLE_SIZEABLE)));
+ bool bAllowFullScreen = (SalFrameStyleFlags::NONE == (mpFrame->mnStyle & (SalFrameStyleFlags::DIALOG | SalFrameStyleFlags::TOOLTIP | SalFrameStyleFlags::SYSTEMCHILD | SalFrameStyleFlags::FLOAT | SalFrameStyleFlags::TOOLWINDOW | SalFrameStyleFlags::INTRO)));
+ bAllowFullScreen &= (SalFrameStyleFlags::NONE == (~mpFrame->mnStyle & (SalFrameStyleFlags::SIZEABLE)));
bAllowFullScreen &= (mpFrame->mpParent == NULL);
const SEL setCollectionBehavior = @selector(setCollectionBehavior:);
if( bAllowFullScreen && [pNSWindow respondsToSelector: setCollectionBehavior])
@@ -233,16 +233,16 @@ static AquaSalFrame* getMouseContainerFrame()
-(BOOL)canBecomeKeyWindow
{
if( (mpFrame->mnStyle &
- ( SAL_FRAME_STYLE_FLOAT |
- SAL_FRAME_STYLE_TOOLTIP |
- SAL_FRAME_STYLE_INTRO
- )) == 0 )
+ ( SalFrameStyleFlags::FLOAT |
+ SalFrameStyleFlags::TOOLTIP |
+ SalFrameStyleFlags::INTRO
+ )) == SalFrameStyleFlags::NONE )
return YES;
- if( (mpFrame->mnStyle & SAL_FRAME_STYLE_OWNERDRAWDECORATION) != 0 )
+ if( mpFrame->mnStyle & SalFrameStyleFlags::OWNERDRAWDECORATION )
return YES;
if( mpFrame->mbFullScreen )
return YES;
- if( (mpFrame->mnStyle & SAL_FRAME_STYLE_FLOAT_FOCUSABLE) )
+ if( (mpFrame->mnStyle & SalFrameStyleFlags::FLOAT_FOCUSABLE) )
return YES;
return [super canBecomeKeyWindow];
}
@@ -254,9 +254,9 @@ static AquaSalFrame* getMouseContainerFrame()
if( mpFrame && AquaSalFrame::isAlive( mpFrame ) )
{
- static const sal_uLong nGuessDocument = SAL_FRAME_STYLE_MOVEABLE|
- SAL_FRAME_STYLE_SIZEABLE|
- SAL_FRAME_STYLE_CLOSEABLE;
+ static const SalFrameStyleFlags nGuessDocument = SalFrameStyleFlags::MOVEABLE|
+ SalFrameStyleFlags::SIZEABLE|
+ SalFrameStyleFlags::CLOSEABLE;
if( mpFrame->mpMenu )
mpFrame->mpMenu->setMainMenu();
diff --git a/vcl/osx/salinst.cxx b/vcl/osx/salinst.cxx
index b92c6ba..bc9b205 100644
--- a/vcl/osx/salinst.cxx
+++ b/vcl/osx/salinst.cxx
@@ -755,12 +755,12 @@ bool AquaSalInstance::AnyInput( VclInputFlags nType )
return (pEvent != NULL);
}
-SalFrame* AquaSalInstance::CreateChildFrame( SystemParentData*, sal_uLong /*nSalFrameStyle*/ )
+SalFrame* AquaSalInstance::CreateChildFrame( SystemParentData*, SalFrameStyleFlags /*nSalFrameStyle*/ )
{
return NULL;
}
-SalFrame* AquaSalInstance::CreateFrame( SalFrame* pParent, sal_uLong nSalFrameStyle )
+SalFrame* AquaSalInstance::CreateFrame( SalFrame* pParent, SalFrameStyleFlags nSalFrameStyle )
{
SalData::ensureThreadAutoreleasePool();
diff --git a/vcl/osx/vclnsapp.mm b/vcl/osx/vclnsapp.mm
index 6cbf522..2614754 100644
--- a/vcl/osx/vclnsapp.mm
+++ b/vcl/osx/vclnsapp.mm
@@ -150,7 +150,7 @@
// popup windows do not get the focus, so they don't get these either
// simplest would be dispatch this to the key window always if it is without parent
// however e.g. in document we want the menu shortcut if e.g. the stylist has focus
- if( pFrame->mpParent && (pFrame->mnStyle & SAL_FRAME_STYLE_FLOAT) == 0 )
+ if( pFrame->mpParent && !(pFrame->mnStyle & SalFrameStyleFlags::FLOAT) )
{
[[pKeyWin contentView] keyDown: pEvent];
bHandled = GetSalData()->maKeyEventAnswer[ pEvent ];
diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx
index c1212c0..e039c6d 100644
--- a/vcl/source/window/window.cxx
+++ b/vcl/source/window/window.cxx
@@ -948,42 +948,42 @@ void Window::ImplInit( vcl::Window* pParent, WinBits nStyle, SystemParentData* p
if ( mpWindowImpl->mbFrame )
{
// create frame
- sal_uLong nFrameStyle = 0;
+ SalFrameStyleFlags nFrameStyle = SalFrameStyleFlags::NONE;
if ( nStyle & WB_MOVEABLE )
- nFrameStyle |= SAL_FRAME_STYLE_MOVEABLE;
+ nFrameStyle |= SalFrameStyleFlags::MOVEABLE;
if ( nStyle & WB_SIZEABLE )
- nFrameStyle |= SAL_FRAME_STYLE_SIZEABLE;
+ nFrameStyle |= SalFrameStyleFlags::SIZEABLE;
if ( nStyle & WB_CLOSEABLE )
- nFrameStyle |= SAL_FRAME_STYLE_CLOSEABLE;
+ nFrameStyle |= SalFrameStyleFlags::CLOSEABLE;
if ( nStyle & WB_APP )
- nFrameStyle |= SAL_FRAME_STYLE_DEFAULT;
+ nFrameStyle |= SalFrameStyleFlags::DEFAULT;
// check for undecorated floating window
if( // 1. floating windows that are not moveable/sizeable (only closeable allowed)
- ( !(nFrameStyle & ~SAL_FRAME_STYLE_CLOSEABLE) &&
+ ( !(nFrameStyle & ~SalFrameStyleFlags::CLOSEABLE) &&
( mpWindowImpl->mbFloatWin || ((GetType() == WINDOW_BORDERWINDOW) && static_cast<ImplBorderWindow*>(this)->mbFloatWindow) || (nStyle & WB_SYSTEMFLOATWIN) ) ) ||
// 2. borderwindows of floaters with ownerdraw decoration
( ((GetType() == WINDOW_BORDERWINDOW) && static_cast<ImplBorderWindow*>(this)->mbFloatWindow && (nStyle & WB_OWNERDRAWDECORATION) ) ) )
{
- nFrameStyle = SAL_FRAME_STYLE_FLOAT;
+ nFrameStyle = SalFrameStyleFlags::FLOAT;
if( nStyle & WB_OWNERDRAWDECORATION )
- nFrameStyle |= (SAL_FRAME_STYLE_OWNERDRAWDECORATION | SAL_FRAME_STYLE_NOSHADOW);
+ nFrameStyle |= (SalFrameStyleFlags::OWNERDRAWDECORATION | SalFrameStyleFlags::NOSHADOW);
if( nStyle & WB_NEEDSFOCUS )
- nFrameStyle |= SAL_FRAME_STYLE_FLOAT_FOCUSABLE;
+ nFrameStyle |= SalFrameStyleFlags::FLOAT_FOCUSABLE;
}
else if( mpWindowImpl->mbFloatWin )
- nFrameStyle |= SAL_FRAME_STYLE_TOOLWINDOW;
+ nFrameStyle |= SalFrameStyleFlags::TOOLWINDOW;
if( nStyle & WB_INTROWIN )
- nFrameStyle |= SAL_FRAME_STYLE_INTRO;
+ nFrameStyle |= SalFrameStyleFlags::INTRO;
if( nStyle & WB_TOOLTIPWIN )
- nFrameStyle |= SAL_FRAME_STYLE_TOOLTIP;
+ nFrameStyle |= SalFrameStyleFlags::TOOLTIP;
if( nStyle & WB_NOSHADOW )
- nFrameStyle |= SAL_FRAME_STYLE_NOSHADOW;
+ nFrameStyle |= SalFrameStyleFlags::NOSHADOW;
if( nStyle & WB_SYSTEMCHILDWINDOW )
- nFrameStyle |= SAL_FRAME_STYLE_SYSTEMCHILD;
+ nFrameStyle |= SalFrameStyleFlags::SYSTEMCHILD;
switch (mpWindowImpl->mnType)
{
@@ -996,7 +996,7 @@ void Window::ImplInit( vcl::Window* pParent, WinBits nStyle, SystemParentData* p
case WINDOW_WARNINGBOX:
case WINDOW_ERRORBOX:
case WINDOW_QUERYBOX:
- nFrameStyle |= SAL_FRAME_STYLE_DIALOG;
+ nFrameStyle |= SalFrameStyleFlags::DIALOG;
default:
break;
}
@@ -1006,7 +1006,7 @@ void Window::ImplInit( vcl::Window* pParent, WinBits nStyle, SystemParentData* p
pParentFrame = pParent->mpWindowImpl->mpFrame;
SalFrame* pFrame;
if ( pSystemParentData )
- pFrame = pSVData->mpDefInst->CreateChildFrame( pSystemParentData, nFrameStyle | SAL_FRAME_STYLE_PLUG );
+ pFrame = pSVData->mpDefInst->CreateChildFrame( pSystemParentData, nFrameStyle | SalFrameStyleFlags::PLUG );
else
pFrame = pSVData->mpDefInst->CreateFrame( pParentFrame, nFrameStyle );
if ( !pFrame )
diff --git a/vcl/unx/generic/app/salinst.cxx b/vcl/unx/generic/app/salinst.cxx
index e27ca1b..ca469dc 100644
--- a/vcl/unx/generic/app/salinst.cxx
+++ b/vcl/unx/generic/app/salinst.cxx
@@ -167,14 +167,14 @@ void* X11SalInstance::GetConnectionIdentifier( ConnectionIdentifierType& rReturn
return pDisplay ? const_cast<char *>(pDisplay) : const_cast<char *>("");
}
-SalFrame *X11SalInstance::CreateFrame( SalFrame *pParent, sal_uLong nSalFrameStyle )
+SalFrame *X11SalInstance::CreateFrame( SalFrame *pParent, SalFrameStyleFlags nSalFrameStyle )
{
SalFrame *pFrame = new X11SalFrame( pParent, nSalFrameStyle );
return pFrame;
}
-SalFrame* X11SalInstance::CreateChildFrame( SystemParentData* pParentData, sal_uLong nStyle )
+SalFrame* X11SalInstance::CreateChildFrame( SystemParentData* pParentData, SalFrameStyleFlags nStyle )
{
SalFrame* pFrame = new X11SalFrame( NULL, nStyle, pParentData );
diff --git a/vcl/unx/generic/app/wmadaptor.cxx b/vcl/unx/generic/app/wmadaptor.cxx
index 74a32f6..46b3e57 100644
--- a/vcl/unx/generic/app/wmadaptor.cxx
+++ b/vcl/unx/generic/app/wmadaptor.cxx
@@ -1125,7 +1125,7 @@ void NetWMAdaptor::setNetWMState( X11SalFrame* pFrame ) const
m_aWMAtoms[ NET_WM_STATE ] );
if( pFrame->mbMaximizedHorz
&& pFrame->mbMaximizedVert
- && ! ( pFrame->nStyle_ & SAL_FRAME_STYLE_SIZEABLE ) )
+ && ! ( pFrame->nStyle_ & SalFrameStyleFlags::SIZEABLE ) )
{
/*
* for maximizing use NorthWestGravity (including decoration)
@@ -1215,7 +1215,7 @@ void GnomeWMAdaptor::setGnomeWMState( X11SalFrame* pFrame ) const
);
if( pFrame->mbMaximizedHorz
&& pFrame->mbMaximizedVert
- && ! ( pFrame->nStyle_ & SAL_FRAME_STYLE_SIZEABLE ) )
+ && ! ( pFrame->nStyle_ & SalFrameStyleFlags::SIZEABLE ) )
{
/*
* for maximizing use NorthWestGravity (including decoration)
@@ -1556,7 +1556,7 @@ void NetWMAdaptor::maximizeFrame( X11SalFrame* pFrame, bool bHorizontal, bool bV
if( m_aWMAtoms[ NET_WM_STATE ]
&& m_aWMAtoms[ NET_WM_STATE_MAXIMIZED_VERT ]
&& m_aWMAtoms[ NET_WM_STATE_MAXIMIZED_HORZ ]
- && ( pFrame->nStyle_ & ~SAL_FRAME_STYLE_DEFAULT )
+ && ( pFrame->nStyle_ & ~SalFrameStyleFlags::DEFAULT )
)
{
if( pFrame->bMapped_ )
@@ -1621,7 +1621,7 @@ void GnomeWMAdaptor::maximizeFrame( X11SalFrame* pFrame, bool bHorizontal, bool
pFrame->mbMaximizedHorz = bHorizontal;
if( m_aWMAtoms[ WIN_STATE ]
- && ( pFrame->nStyle_ & ~SAL_FRAME_STYLE_DEFAULT )
+ && ( pFrame->nStyle_ & ~SalFrameStyleFlags::DEFAULT )
)
{
if( pFrame->bMapped_ )
@@ -1755,7 +1755,7 @@ void GnomeWMAdaptor::enableAlwaysOnTop( X11SalFrame* pFrame, bool bEnable ) cons
*/
void WMAdaptor::changeReferenceFrame( X11SalFrame* pFrame, X11SalFrame* pReferenceFrame ) const
{
- if( ! ( pFrame->nStyle_ & SAL_FRAME_STYLE_PLUG )
+ if( ! ( pFrame->nStyle_ & SalFrameStyleFlags::PLUG )
&& ! pFrame->IsOverrideRedirect()
&& ! pFrame->IsFloatGrabWindow()
)
@@ -1937,7 +1937,7 @@ void NetWMAdaptor::shade( X11SalFrame* pFrame, bool bToShaded ) const
{
if( m_aWMAtoms[ NET_WM_STATE ]
&& m_aWMAtoms[ NET_WM_STATE_SHADED ]
- && ( pFrame->nStyle_ & ~SAL_FRAME_STYLE_DEFAULT )
+ && ( pFrame->nStyle_ & ~SalFrameStyleFlags::DEFAULT )
)
{
pFrame->mbShaded = bToShaded;
diff --git a/vcl/unx/generic/window/salframe.cxx b/vcl/unx/generic/window/salframe.cxx
index 11ec3e4..002a058 100644
--- a/vcl/unx/generic/window/salframe.cxx
+++ b/vcl/unx/generic/window/salframe.cxx
@@ -135,9 +135,9 @@ static void doReparentPresentationDialogues( SalDisplay* pDisplay )
bool X11SalFrame::IsOverrideRedirect() const
{
return
- ((nStyle_ & SAL_FRAME_STYLE_INTRO) && !pDisplay_->getWMAdaptor()->supportsSplash())
+ ((nStyle_ & SalFrameStyleFlags::INTRO) && !pDisplay_->getWMAdaptor()->supportsSplash())
||
- (!( nStyle_ & ~SAL_FRAME_STYLE_DEFAULT ) && !pDisplay_->getWMAdaptor()->supportsFullScreen())
+ (!( nStyle_ & ~SalFrameStyleFlags::DEFAULT ) && !pDisplay_->getWMAdaptor()->supportsFullScreen())
;
}
@@ -148,9 +148,9 @@ bool X11SalFrame::IsFloatGrabWindow() const
return
( ( !pDisableGrab || !*pDisableGrab ) &&
(
- (nStyle_ & SAL_FRAME_STYLE_FLOAT) &&
- ! (nStyle_ & SAL_FRAME_STYLE_TOOLTIP) &&
- ! (nStyle_ & SAL_FRAME_STYLE_OWNERDRAWDECORATION)
+ (nStyle_ & SalFrameStyleFlags::FLOAT) &&
+ ! (nStyle_ & SalFrameStyleFlags::TOOLTIP) &&
+ ! (nStyle_ & SalFrameStyleFlags::OWNERDRAWDECORATION)
)
);
}
@@ -324,7 +324,7 @@ static bool lcl_SelectAppIconPixmap( SalDisplay *pDisplay, SalX11Screen nXScreen
return true;
}
-void X11SalFrame::Init( sal_uLong nSalFrameStyle, SalX11Screen nXScreen, SystemParentData* pParentData, bool bUseGeometry )
+void X11SalFrame::Init( SalFrameStyleFlags nSalFrameStyle, SalX11Screen nXScreen, SystemParentData* pParentData, bool bUseGeometry )
{
if( nXScreen.getXScreen() >= GetDisplay()->GetXScreenCount() )
nXScreen = GetDisplay()->GetDefaultXScreen();
@@ -335,7 +335,7 @@ void X11SalFrame::Init( sal_uLong nSalFrameStyle, SalX11Screen nXScreen, SystemP
nStyle_ = nSalFrameStyle;
XWMHints Hints;
Hints.flags = InputHint;
- Hints.input = (nSalFrameStyle & SAL_FRAME_STYLE_OWNERDRAWDECORATION) ? False : True;
+ Hints.input = (nSalFrameStyle & SalFrameStyleFlags::OWNERDRAWDECORATION) ? False : True;
NetWmIconData netwm_icon;
int x = 0, y = 0;
@@ -366,8 +366,8 @@ void X11SalFrame::Init( sal_uLong nSalFrameStyle, SalX11Screen nXScreen, SystemP
h = maGeometry.nHeight;
}
- if( (nSalFrameStyle & SAL_FRAME_STYLE_FLOAT) &&
- ! (nSalFrameStyle & SAL_FRAME_STYLE_OWNERDRAWDECORATION)
+ if( (nSalFrameStyle & SalFrameStyleFlags::FLOAT) &&
+ ! (nSalFrameStyle & SalFrameStyleFlags::OWNERDRAWDECORATION)
)
{
if( nShowState_ == SHOWSTATE_UNKNOWN )
@@ -377,13 +377,13 @@ void X11SalFrame::Init( sal_uLong nSalFrameStyle, SalX11Screen nXScreen, SystemP
}
Attributes.override_redirect = True;
}
- else if( (nSalFrameStyle & SAL_FRAME_STYLE_SYSTEMCHILD ) )
+ else if( (nSalFrameStyle & SalFrameStyleFlags::SYSTEMCHILD ) )
{
- DBG_ASSERT( mpParent, "SAL_FRAME_STYLE_SYSTEMCHILD window without parent" );
+ DBG_ASSERT( mpParent, "SalFrameStyleFlags::SYSTEMCHILD window without parent" );
if( mpParent )
{
aFrameParent = mpParent->mhWindow;
- // FIXME: since with SAL_FRAME_STYLE_SYSTEMCHILD
+ // FIXME: since with SalFrameStyleFlags::SYSTEMCHILD
// multiple X11SalFrame objects can have the same shell window
// dispatching events in saldisp.cxx is unclear (the first frame)
// wins. HTH this correctly is unclear yet
@@ -398,7 +398,7 @@ void X11SalFrame::Init( sal_uLong nSalFrameStyle, SalX11Screen nXScreen, SystemP
// process; start permanantly ignoring X errors ...
GetGenericData()->ErrorTrapPush();
- nStyle_ |= SAL_FRAME_STYLE_PLUG;
+ nStyle_ |= SalFrameStyleFlags::PLUG;
Attributes.override_redirect = True;
if( pParentData->nSize >= sizeof(SystemParentData) )
m_bXEmbed = pParentData->bXEmbedSupport;
@@ -452,8 +452,8 @@ void X11SalFrame::Init( sal_uLong nSalFrameStyle, SalX11Screen nXScreen, SystemP
Size aScreenSize( GetDisplay()->getDataForScreen( m_nXScreen ).m_aSize );
w = aScreenSize.Width();
h = aScreenSize.Height();
- if( nSalFrameStyle & SAL_FRAME_STYLE_SIZEABLE &&
- nSalFrameStyle & SAL_FRAME_STYLE_MOVEABLE )
+ if( nSalFrameStyle & SalFrameStyleFlags::SIZEABLE &&
+ nSalFrameStyle & SalFrameStyleFlags::MOVEABLE )
{
Size aBestFitSize(bestmaxFrameSizeForScreenSize(aScreenSize));
w = aBestFitSize.Width();
@@ -470,7 +470,7 @@ void X11SalFrame::Init( sal_uLong nSalFrameStyle, SalX11Screen nXScreen, SystemP
pFrame = static_cast< const X11SalFrame* >(*it);
if( ! ( pFrame->mpParent
|| pFrame->mbFullScreen
- || ! ( pFrame->nStyle_ & SAL_FRAME_STYLE_SIZEABLE )
+ || ! ( pFrame->nStyle_ & SalFrameStyleFlags::SIZEABLE )
|| ! pFrame->GetUnmirroredGeometry().nWidth
|| ! pFrame->GetUnmirroredGeometry().nHeight
)
@@ -530,7 +530,7 @@ void X11SalFrame::Init( sal_uLong nSalFrameStyle, SalX11Screen nXScreen, SystemP
if( IsOverrideRedirect() )
Attributes.override_redirect = True;
// default icon
- if( (nStyle_ & SAL_FRAME_STYLE_INTRO) == 0 )
+ if( !(nStyle_ & SalFrameStyleFlags::INTRO) )
{
bool bOk=false;
try
@@ -556,7 +556,7 @@ void X11SalFrame::Init( sal_uLong nSalFrameStyle, SalX11Screen nXScreen, SystemP
X11SalFrame* pFrame = this;
while( pFrame->mpParent )
pFrame = pFrame->mpParent;
- if( (pFrame->nStyle_ & SAL_FRAME_STYLE_PLUG ) )
+ if( (pFrame->nStyle_ & SalFrameStyleFlags::PLUG ) )
{
// if the top level window is a plugin window,
// then we should place us in the same window group as
@@ -624,7 +624,7 @@ void X11SalFrame::Init( sal_uLong nSalFrameStyle, SalX11Screen nXScreen, SystemP
XSync( GetXDisplay(), False );
setXEmbedInfo();
- Time nUserTime = (nStyle_ & (SAL_FRAME_STYLE_OWNERDRAWDECORATION | SAL_FRAME_STYLE_TOOLWINDOW) ) == 0 ?
+ Time nUserTime = (nStyle_ & (SalFrameStyleFlags::OWNERDRAWDECORATION | SalFrameStyleFlags::TOOLWINDOW) ) == SalFrameStyleFlags::NONE ?
pDisplay_->GetLastUserEventTime() : 0;
pDisplay_->getWMAdaptor()->setUserTime( this, nUserTime );
@@ -637,7 +637,7 @@ void X11SalFrame::Init( sal_uLong nSalFrameStyle, SalX11Screen nXScreen, SystemP
a[n++] = pDisplay_->getWMAdaptor()->getAtom( WMAdaptor::WM_DELETE_WINDOW );
if( pDisplay_->getWMAdaptor()->getAtom( WMAdaptor::NET_WM_PING ) )
a[n++] = pDisplay_->getWMAdaptor()->getAtom( WMAdaptor::NET_WM_PING );
- if( (nSalFrameStyle & SAL_FRAME_STYLE_OWNERDRAWDECORATION) )
+ if( (nSalFrameStyle & SalFrameStyleFlags::OWNERDRAWDECORATION) )
a[n++] = pDisplay_->getWMAdaptor()->getAtom( WMAdaptor::WM_TAKE_FOCUS );
XSetWMProtocols( GetXDisplay(), GetShellWindow(), a, n );
@@ -682,13 +682,13 @@ void X11SalFrame::Init( sal_uLong nSalFrameStyle, SalX11Screen nXScreen, SystemP
1
);
}
-#define DECOFLAGS (SAL_FRAME_STYLE_MOVEABLE | SAL_FRAME_STYLE_SIZEABLE | SAL_FRAME_STYLE_CLOSEABLE)
+#define DECOFLAGS (SalFrameStyleFlags::MOVEABLE | SalFrameStyleFlags::SIZEABLE | SalFrameStyleFlags::CLOSEABLE)
int nDecoFlags = WMAdaptor::decoration_All;
- if( (nStyle_ & SAL_FRAME_STYLE_PARTIAL_FULLSCREEN) ||
- (nStyle_ & SAL_FRAME_STYLE_OWNERDRAWDECORATION)
+ if( (nStyle_ & SalFrameStyleFlags::PARTIAL_FULLSCREEN) ||
+ (nStyle_ & SalFrameStyleFlags::OWNERDRAWDECORATION)
)
nDecoFlags = 0;
- else if( (nStyle_ & DECOFLAGS ) != DECOFLAGS || (nStyle_ & SAL_FRAME_STYLE_TOOLWINDOW) )
+ else if( (nStyle_ & DECOFLAGS ) != DECOFLAGS || (nStyle_ & SalFrameStyleFlags::TOOLWINDOW) )
{
if( nStyle_ & DECOFLAGS )
// if any decoration, then show a border
@@ -699,28 +699,28 @@ void X11SalFrame::Init( sal_uLong nSalFrameStyle, SalX11Screen nXScreen, SystemP
if( ! mpParent && (nStyle_ & DECOFLAGS) )
// don't add a min button if window should be decorationless
nDecoFlags |= WMAdaptor::decoration_MinimizeBtn;
- if( nStyle_ & SAL_FRAME_STYLE_CLOSEABLE )
+ if( nStyle_ & SalFrameStyleFlags::CLOSEABLE )
nDecoFlags |= WMAdaptor::decoration_CloseBtn;
- if( nStyle_ & SAL_FRAME_STYLE_SIZEABLE )
+ if( nStyle_ & SalFrameStyleFlags::SIZEABLE )
{
nDecoFlags |= WMAdaptor::decoration_Resize;
- if( ! (nStyle_ & SAL_FRAME_STYLE_TOOLWINDOW) )
+ if( ! (nStyle_ & SalFrameStyleFlags::TOOLWINDOW) )
nDecoFlags |= WMAdaptor::decoration_MaximizeBtn;
}
- if( nStyle_ & SAL_FRAME_STYLE_MOVEABLE )
+ if( nStyle_ & SalFrameStyleFlags::MOVEABLE )
nDecoFlags |= WMAdaptor::decoration_Title;
}
WMAdaptor::WMWindowType eType = WMAdaptor::windowType_Normal;
- if( nStyle_ & SAL_FRAME_STYLE_INTRO )
+ if( nStyle_ & SalFrameStyleFlags::INTRO )
eType = WMAdaptor::windowType_Splash;
- if( (nStyle_ & SAL_FRAME_STYLE_DIALOG) && hPresentationWindow == None )
+ if( (nStyle_ & SalFrameStyleFlags::DIALOG) && hPresentationWindow == None )
eType = WMAdaptor::windowType_ModelessDialogue;
- if( nStyle_ & SAL_FRAME_STYLE_TOOLWINDOW )
+ if( nStyle_ & SalFrameStyleFlags::TOOLWINDOW )
eType = WMAdaptor::windowType_Utility;
- if( nStyle_ & SAL_FRAME_STYLE_OWNERDRAWDECORATION )
+ if( nStyle_ & SalFrameStyleFlags::OWNERDRAWDECORATION )
eType = WMAdaptor::windowType_Toolbar;
- if( (nStyle_ & SAL_FRAME_STYLE_PARTIAL_FULLSCREEN)
+ if( (nStyle_ & SalFrameStyleFlags::PARTIAL_FULLSCREEN)
&& GetDisplay()->getWMAdaptor()->isLegacyPartialFullscreen() )
eType = WMAdaptor::windowType_Dock;
@@ -730,12 +730,12 @@ void X11SalFrame::Init( sal_uLong nSalFrameStyle, SalX11Screen nXScreen, SystemP
nDecoFlags,
hPresentationWindow ? NULL : mpParent );
- if( (nStyle_ & (SAL_FRAME_STYLE_DEFAULT |
- SAL_FRAME_STYLE_OWNERDRAWDECORATION|
- SAL_FRAME_STYLE_FLOAT |
- SAL_FRAME_STYLE_INTRO |
- SAL_FRAME_STYLE_PARTIAL_FULLSCREEN) )
- == SAL_FRAME_STYLE_DEFAULT )
+ if( (nStyle_ & (SalFrameStyleFlags::DEFAULT |
+ SalFrameStyleFlags::OWNERDRAWDECORATION|
+ SalFrameStyleFlags::FLOAT |
+ SalFrameStyleFlags::INTRO |
+ SalFrameStyleFlags::PARTIAL_FULLSCREEN) )
+ == SalFrameStyleFlags::DEFAULT )
pDisplay_->getWMAdaptor()->maximizeFrame( this, true );
if( !netwm_icon.empty() && GetDisplay()->getWMAdaptor()->getAtom( WMAdaptor::NET_WM_ICON ))
@@ -750,7 +750,7 @@ void X11SalFrame::Init( sal_uLong nSalFrameStyle, SalX11Screen nXScreen, SystemP
SetPointer( PointerStyle::Arrow );
}
-X11SalFrame::X11SalFrame( SalFrame *pParent, sal_uLong nSalFrameStyle,
+X11SalFrame::X11SalFrame( SalFrame *pParent, SalFrameStyleFlags nSalFrameStyle,
SystemParentData* pSystemParent ) :
m_nXScreen( 0 )
{
@@ -789,7 +789,7 @@ X11SalFrame::X11SalFrame( SalFrame *pParent, sal_uLong nSalFrameStyle,
nShowState_ = SHOWSTATE_UNKNOWN;
nWidth_ = 0;
nHeight_ = 0;
- nStyle_ = 0;
+ nStyle_ = SalFrameStyleFlags::NONE;
mnExtStyle = 0;
bAlwaysOnTop_ = false;
@@ -1093,7 +1093,7 @@ void X11SalFrame::SetMaxClientSize( long nWidth, long nHeight )
{
if( ! IsChildWindow() )
{
- if( GetShellWindow() && (nStyle_ & (SAL_FRAME_STYLE_FLOAT|SAL_FRAME_STYLE_OWNERDRAWDECORATION) ) != SAL_FRAME_STYLE_FLOAT )
+ if( GetShellWindow() && (nStyle_ & (SalFrameStyleFlags::FLOAT|SalFrameStyleFlags::OWNERDRAWDECORATION) ) != SalFrameStyleFlags::FLOAT )
{
XSizeHints* pHints = XAllocSizeHints();
long nSupplied = 0;
@@ -1117,7 +1117,7 @@ void X11SalFrame::SetMinClientSize( long nWidth, long nHeight )
{
if( ! IsChildWindow() )
{
- if( GetShellWindow() && (nStyle_ & (SAL_FRAME_STYLE_FLOAT|SAL_FRAME_STYLE_OWNERDRAWDECORATION) ) != SAL_FRAME_STYLE_FLOAT )
+ if( GetShellWindow() && (nStyle_ & (SalFrameStyleFlags::FLOAT|SalFrameStyleFlags::OWNERDRAWDECORATION) ) != SalFrameStyleFlags::FLOAT )
{
XSizeHints* pHints = XAllocSizeHints();
long nSupplied = 0;
@@ -1149,7 +1149,7 @@ void X11SalFrame::Show( bool bVisible, bool bNoActivate )
// even though transient frames should be kept above their parent
// this does not necessarily hold true for DOCK type windows
// so artificially set ABOVE and remove it again on hide
- if( mpParent && (mpParent->nStyle_ & SAL_FRAME_STYLE_PARTIAL_FULLSCREEN ) && pDisplay_->getWMAdaptor()->isLegacyPartialFullscreen())
+ if( mpParent && (mpParent->nStyle_ & SalFrameStyleFlags::PARTIAL_FULLSCREEN ) && pDisplay_->getWMAdaptor()->isLegacyPartialFullscreen())
pDisplay_->getWMAdaptor()->enableAlwaysOnTop( this, bVisible );
bMapped_ = bVisible;
@@ -1158,7 +1158,7 @@ void X11SalFrame::Show( bool bVisible, bool bNoActivate )
if( bVisible )
{
mbInShow = true;
- if( ! (nStyle_ & SAL_FRAME_STYLE_INTRO) )
+ if( ! (nStyle_ & SalFrameStyleFlags::INTRO) )
{
// hide all INTRO frames
const std::list< SalFrame* >& rFrames = GetDisplay()->getFrames();
@@ -1166,7 +1166,7 @@ void X11SalFrame::Show( bool bVisible, bool bNoActivate )
{
const X11SalFrame* pFrame = static_cast< const X11SalFrame* >(*it);
// look for intro bit map; if present, hide it
- if( pFrame->nStyle_ & SAL_FRAME_STYLE_INTRO )
+ if( pFrame->nStyle_ & SalFrameStyleFlags::INTRO )
{
if( pFrame->bMapped_ )
const_cast<X11SalFrame*>(pFrame)->Show( false );
@@ -1225,10 +1225,10 @@ void X11SalFrame::Show( bool bVisible, bool bNoActivate )
}
Time nUserTime = 0;
- if( ! bNoActivate && (nStyle_ & (SAL_FRAME_STYLE_OWNERDRAWDECORATION)) == 0 )
+ if( ! bNoActivate && !(nStyle_ & SalFrameStyleFlags::OWNERDRAWDECORATION) )
nUserTime = pDisplay_->GetLastUserEventTime( true );
GetDisplay()->getWMAdaptor()->setUserTime( this, nUserTime );
- if( ! bNoActivate && (nStyle_ & SAL_FRAME_STYLE_TOOLWINDOW) )
+ if( ! bNoActivate && (nStyle_ & SalFrameStyleFlags::TOOLWINDOW) )
m_bSetFocusOnMap = true;
// actually map the window
@@ -1242,7 +1242,7 @@ void X11SalFrame::Show( bool bVisible, bool bNoActivate )
XMapWindow( GetXDisplay(), GetShellWindow() );
XSelectInput( GetXDisplay(), GetShellWindow(), CLIENT_EVENTS );
}
- if( nStyle_ & SAL_FRAME_STYLE_FLOAT )
+ if( nStyle_ & SalFrameStyleFlags::FLOAT )
XMapRaised( GetXDisplay(), GetWindow() );
else
XMapWindow( GetXDisplay(), GetWindow() );
@@ -1318,7 +1318,7 @@ void X11SalFrame::Show( bool bVisible, bool bNoActivate )
* and have the focus. So try to set the focus
* to the child on Show(true)
*/
- if( (nStyle_ & SAL_FRAME_STYLE_PLUG) && ! m_bXEmbed )
+ if( (nStyle_ & SalFrameStyleFlags::PLUG) && ! m_bXEmbed )
XSetInputFocus( GetXDisplay(),
GetWindow(),
RevertToParent,
@@ -1342,7 +1342,7 @@ void X11SalFrame::Show( bool bVisible, bool bNoActivate )
/* FIXME: Is deleting the property really necessary ? It hurts
* owner drawn windows at least.
*/
- if( mpParent && ! (nStyle_ & SAL_FRAME_STYLE_OWNERDRAWDECORATION) )
+ if( mpParent && ! (nStyle_ & SalFrameStyleFlags::OWNERDRAWDECORATION) )
XDeleteProperty( GetXDisplay(), GetShellWindow(), GetDisplay()->getWMAdaptor()->getAtom( WMAdaptor::WM_TRANSIENT_FOR ) );
XWithdrawWindow( GetXDisplay(), GetShellWindow(), m_nXScreen.getXScreen() );
}
@@ -1366,7 +1366,7 @@ void X11SalFrame::Show( bool bVisible, bool bNoActivate )
void X11SalFrame::ToTop( sal_uInt16 nFlags )
{
if( ( nFlags & SAL_FRAME_TOTOP_RESTOREWHENMIN )
- && ! ( nStyle_ & SAL_FRAME_STYLE_FLOAT )
+ && ! ( nStyle_ & SalFrameStyleFlags::FLOAT )
&& nShowState_ != SHOWSTATE_HIDDEN
&& nShowState_ != SHOWSTATE_UNKNOWN
)
@@ -1483,7 +1483,7 @@ void X11SalFrame::Center( )
pFrame->maGeometry.nHeight = aRect.GetHeight();
}
- if( pFrame->nStyle_ & SAL_FRAME_STYLE_PLUG )
+ if( pFrame->nStyle_ & SalFrameStyleFlags::PLUG )
{
::Window aRoot;
unsigned int bw, depth;
@@ -1561,7 +1561,7 @@ void X11SalFrame::updateScreenNumber()
void X11SalFrame::SetPosSize( long nX, long nY, long nWidth, long nHeight, sal_uInt16 nFlags )
{
- if( nStyle_ & SAL_FRAME_STYLE_PLUG )
+ if( nStyle_ & SalFrameStyleFlags::PLUG )
return;
// relative positioning in X11SalFrame::SetPosSize
@@ -1702,7 +1702,7 @@ void X11SalFrame::SetWindowState( const SalFrameState *pState )
{
SalFrameGeometry aGeom = maGeometry;
- if( ! (nStyle_ & ( SAL_FRAME_STYLE_FLOAT | SAL_FRAME_STYLE_PLUG ) ) &&
+ if( ! (nStyle_ & ( SalFrameStyleFlags::FLOAT | SalFrameStyleFlags::PLUG ) ) &&
mpParent &&
aGeom.nLeftDecoration == 0 &&
aGeom.nTopDecoration == 0 )
@@ -1840,9 +1840,9 @@ void X11SalFrame::SetSize( const Size &rSize )
{
if( rSize.Width() > 0 && rSize.Height() > 0 )
{
- if( ! ( nStyle_ & SAL_FRAME_STYLE_SIZEABLE )
+ if( ! ( nStyle_ & SalFrameStyleFlags::SIZEABLE )
&& ! IsChildWindow()
- && ( nStyle_ & (SAL_FRAME_STYLE_FLOAT|SAL_FRAME_STYLE_OWNERDRAWDECORATION) ) != SAL_FRAME_STYLE_FLOAT )
+ && ( nStyle_ & (SalFrameStyleFlags::FLOAT|SalFrameStyleFlags::OWNERDRAWDECORATION) ) != SalFrameStyleFlags::FLOAT )
{
XSizeHints* pHints = XAllocSizeHints();
long nSupplied = 0;
@@ -1864,7 +1864,7 @@ void X11SalFrame::SetSize( const Size &rSize )
XResizeWindow( GetXDisplay(), IsSysChildWindow() ? GetWindow() : GetShellWindow(), rSize.Width(), rSize.Height() );
if( GetWindow() != GetShellWindow() )
{
- if( (nStyle_ & SAL_FRAME_STYLE_PLUG ) )
+ if( (nStyle_ & SalFrameStyleFlags::PLUG ) )
XMoveResizeWindow( GetXDisplay(), GetWindow(), 0, 0, rSize.Width(), rSize.Height() );
else
XResizeWindow( GetXDisplay(), GetWindow(), rSize.Width(), rSize.Height() );
@@ -1918,11 +1918,11 @@ void X11SalFrame::SetPosSize( const Rectangle &rPosSize )
// child windows
! IsChildWindow()
// popups (menu, help window, etc.)
- && (nStyle_ & (SAL_FRAME_STYLE_FLOAT|SAL_FRAME_STYLE_OWNERDRAWDECORATION) ) != SAL_FRAME_STYLE_FLOAT
+ && (nStyle_ & (SalFrameStyleFlags::FLOAT|SalFrameStyleFlags::OWNERDRAWDECORATION) ) != SalFrameStyleFlags::FLOAT
// shown, sizeable windows
&& ( nShowState_ == SHOWSTATE_UNKNOWN ||
nShowState_ == SHOWSTATE_HIDDEN ||
- ! ( nStyle_ & SAL_FRAME_STYLE_SIZEABLE )
+ ! ( nStyle_ & SalFrameStyleFlags::SIZEABLE )
)
)
{
@@ -1933,7 +1933,7 @@ void X11SalFrame::SetPosSize( const Rectangle &rPosSize )
pHints,
&nSupplied
);
- if( ! ( nStyle_ & SAL_FRAME_STYLE_SIZEABLE ) )
+ if( ! ( nStyle_ & SalFrameStyleFlags::SIZEABLE ) )
{
pHints->min_width = rPosSize.GetWidth();
pHints->min_height = rPosSize.GetHeight();
@@ -1963,7 +1963,7 @@ void X11SalFrame::SetPosSize( const Rectangle &rPosSize )
XMoveResizeWindow( GetXDisplay(), IsSysChildWindow() ? GetWindow() : GetShellWindow(), values.x, values.y, values.width, values.height );
if( GetShellWindow() != GetWindow() )
{
- if( (nStyle_ & SAL_FRAME_STYLE_PLUG ) )
+ if( (nStyle_ & SalFrameStyleFlags::PLUG ) )
XMoveResizeWindow( GetXDisplay(), GetWindow(), 0, 0, values.width, values.height );
else
XMoveResizeWindow( GetXDisplay(), GetWindow(), values.x, values.y, values.width, values.height );
@@ -2122,7 +2122,7 @@ void X11SalFrame::ShowFullScreen( bool bFullScreen, sal_Int32 nScreen )
aRect = Rectangle( Point(0,0), GetDisplay()->GetScreenSize( m_nXScreen ) );
else
aRect = GetDisplay()->GetXineramaScreens()[nScreen];
- nStyle_ |= SAL_FRAME_STYLE_PARTIAL_FULLSCREEN;
+ nStyle_ |= SalFrameStyleFlags::PARTIAL_FULLSCREEN;
bool bVisible = bMapped_;
if( bVisible )
Show( false );
@@ -2144,7 +2144,7 @@ void X11SalFrame::ShowFullScreen( bool bFullScreen, sal_Int32 nScreen )
else
{
mbFullScreen = false;
- nStyle_ &= ~SAL_FRAME_STYLE_PARTIAL_FULLSCREEN;
+ nStyle_ &= ~SalFrameStyleFlags::PARTIAL_FULLSCREEN;
bool bVisible = bMapped_;
Rectangle aRect = maRestorePosSize;
maRestorePosSize = Rectangle();
@@ -2433,7 +2433,7 @@ bool X11SalFrame::PostEvent(ImplSVEvent* pData)
void X11SalFrame::SetTitle( const OUString& rTitle )
{
- if( ! ( IsChildWindow() || (nStyle_ & SAL_FRAME_STYLE_FLOAT ) ) )
+ if( ! ( IsChildWindow() || (nStyle_ & SalFrameStyleFlags::FLOAT ) ) )
{
m_aTitle = rTitle;
GetDisplay()->getWMAdaptor()->setWMName( this, rTitle );
@@ -2596,9 +2596,9 @@ void X11SalFrame::createNewWindow( ::Window aNewParent, SalX11Screen nXScreen )
// now init with new parent again
if ( aParentData.aWindow != None )
- Init( nStyle_ | SAL_FRAME_STYLE_PLUG, nXScreen, &aParentData );
+ Init( nStyle_ | SalFrameStyleFlags::PLUG, nXScreen, &aParentData );
else
- Init( nStyle_ & ~SAL_FRAME_STYLE_PLUG, nXScreen, NULL, true );
+ Init( nStyle_ & ~SalFrameStyleFlags::PLUG, nXScreen, NULL, true );
// update graphics if necessary
updateGraphics(false);
@@ -2809,7 +2809,7 @@ long X11SalFrame::HandleMouseEvent( XEvent *pEvent )
// let mouse events reach the correct window
if( nVisibleFloats < 1 )
{
- if( ! (nStyle_ & SAL_FRAME_STYLE_OWNERDRAWDECORATION) )
+ if( ! (nStyle_ & SalFrameStyleFlags::OWNERDRAWDECORATION) )
XUngrabPointer( GetXDisplay(), CurrentTime );
}
else if( pEvent->type == ButtonPress )
@@ -3472,7 +3472,7 @@ long X11SalFrame::HandleFocusEvent( XFocusChangeEvent *pEvent )
}
if ( pEvent->mode == NotifyNormal || pEvent->mode == NotifyWhileGrabbed ||
- ( ( nStyle_ & SAL_FRAME_STYLE_PLUG ) && pEvent->window == GetShellWindow() )
+ ( ( nStyle_ & SalFrameStyleFlags::PLUG ) && pEvent->window == GetShellWindow() )
)
{
if( hPresentationWindow != None && hPresentationWindow != GetShellWindow() )
@@ -3485,7 +3485,7 @@ long X11SalFrame::HandleFocusEvent( XFocusChangeEvent *pEvent )
ImplSVData* pSVData = ImplGetSVData();
long nRet = CallCallback( SALEVENT_GETFOCUS, 0 );
- if ((mpParent != NULL && nStyle_ == 0)
+ if ((mpParent != NULL && nStyle_ == SalFrameStyleFlags::NONE)
&& pSVData->maWinData.mpFirstFloat )
{
FloatWinPopupFlags nMode = pSVData->maWinData.mpFirstFloat->GetPopupModeFlags();
@@ -3651,7 +3651,7 @@ long X11SalFrame::HandleSizeEvent( XConfigureEvent *pEvent )
return 1;
}
- if( ( nStyle_ & SAL_FRAME_STYLE_PLUG ) && pEvent->window == GetShellWindow() )
+ if( ( nStyle_ & SalFrameStyleFlags::PLUG ) && pEvent->window == GetShellWindow() )
{
// just update the children's positions
RestackChildren();
@@ -3789,7 +3789,7 @@ long X11SalFrame::HandleReparentEvent( XReparentEvent *pEvent )
if( hWM_Parent == pDisplay_->GetRootWindow( pDisplay_->GetDefaultXScreen() )
|| hWM_Parent == GetForeignParent()
|| pEvent->parent == pDisplay_->GetRootWindow( pDisplay_->GetDefaultXScreen() )
- || ( nStyle_ & SAL_FRAME_STYLE_FLOAT ) )
+ || ( nStyle_ & SalFrameStyleFlags::FLOAT ) )
{
// Reparenting before Destroy
aPresentationReparentList.remove( GetStackingWindow() );
@@ -3883,7 +3883,7 @@ long X11SalFrame::HandleReparentEvent( XReparentEvent *pEvent )
// olwm and fvwm need this, it doesn't harm the rest
// #i81311# do this only for sizable frames
- if( (nStyle_ & SAL_FRAME_STYLE_SIZEABLE) != 0 )
+ if( nStyle_ & SalFrameStyleFlags::SIZEABLE )
{
Size aScreenSize = GetDisplay()->GetScreenSize( m_nXScreen );
int nScreenWidth = aScreenSize.Width();
@@ -3970,8 +3970,8 @@ long X11SalFrame::HandleClientMessage( XClientMessageEvent *pEvent )
{
if( (Atom)pEvent->data.l[0] == rWMAdaptor.getAtom( WMAdaptor::NET_WM_PING ) )
rWMAdaptor.answerPing( this, pEvent );
- else if( ! ( nStyle_ & SAL_FRAME_STYLE_PLUG )
- && ! (( nStyle_ & SAL_FRAME_STYLE_FLOAT ) && (nStyle_ & SAL_FRAME_STYLE_OWNERDRAWDECORATION))
+ else if( ! ( nStyle_ & SalFrameStyleFlags::PLUG )
+ && ! (( nStyle_ & SalFrameStyleFlags::FLOAT ) && (nStyle_ & SalFrameStyleFlags::OWNERDRAWDECORATION))
)
{
if( (Atom)pEvent->data.l[0] == rWMAdaptor.getAtom( WMAdaptor::WM_DELETE_WINDOW ) )
@@ -3984,7 +3984,7 @@ long X11SalFrame::HandleClientMessage( XClientMessageEvent *pEvent )
// do nothing, we set the input focus in ToTop() if necessary
#if OSL_DEBUG_LEVEL > 1
fprintf( stderr, "got WM_TAKE_FOCUS on %s window\n",
- (nStyle_&SAL_FRAME_STYLE_OWNERDRAWDECORATION) ?
+ (nStyle_ & SalFrameStyleFlags::OWNERDRAWDECORATION) ?
"ownerdraw" : "NON OWNERDRAW" );
#endif
}
@@ -4076,7 +4076,7 @@ long X11SalFrame::Dispatch( XEvent *pEvent )
* even if they are withdrawn when the respective
* document is mapped.
*/
- if( ! (nStyle_ & SAL_FRAME_STYLE_PLUG) )
+ if( ! (nStyle_ & SalFrameStyleFlags::PLUG) )
XUnmapWindow( GetXDisplay(), GetShellWindow() );
break;
}
@@ -4091,7 +4091,7 @@ long X11SalFrame::Dispatch( XEvent *pEvent )
/* another workaround for sawfish: if a transient window for the same parent is shown
* sawfish does not set the focus to it. Applies only for click to focus mode.
*/
- if( ! (nStyle_ & SAL_FRAME_STYLE_FLOAT ) && mbInShow && GetDisplay()->getWMAdaptor()->getWindowManagerName() == "Sawfish" )
+ if( ! (nStyle_ & SalFrameStyleFlags::FLOAT ) && mbInShow && GetDisplay()->getWMAdaptor()->getWindowManagerName() == "Sawfish" )
{
// don't set the focus into the IME status window
// since this will lead to a parent loss of focus, close status,
@@ -4195,7 +4195,7 @@ long X11SalFrame::Dispatch( XEvent *pEvent )
{
case FocusIn:
case FocusOut:
- if( ( nStyle_ & SAL_FRAME_STYLE_PLUG )
+ if( ( nStyle_ & SalFrameStyleFlags::PLUG )
&& ( pEvent->xfocus.window == GetShellWindow()
|| pEvent->xfocus.window == GetForeignParent() )
)
diff --git a/vcl/unx/gtk/app/gtkinst.cxx b/vcl/unx/gtk/app/gtkinst.cxx
index cbdbc6e..c41c408 100644
--- a/vcl/unx/gtk/app/gtkinst.cxx
+++ b/vcl/unx/gtk/app/gtkinst.cxx
@@ -198,13 +198,13 @@ GtkInstance::~GtkInstance()
DeInitAtkBridge();
}
-SalFrame* GtkInstance::CreateFrame( SalFrame* pParent, sal_uLong nStyle )
+SalFrame* GtkInstance::CreateFrame( SalFrame* pParent, SalFrameStyleFlags nStyle )
{
EnsureInit();
return new GtkSalFrame( pParent, nStyle );
}
-SalFrame* GtkInstance::CreateChildFrame( SystemParentData* pParentData, sal_uLong )
+SalFrame* GtkInstance::CreateChildFrame( SystemParentData* pParentData, SalFrameStyleFlags )
{
EnsureInit();
return new GtkSalFrame( pParentData );
diff --git a/vcl/unx/gtk/window/gtksalframe.cxx b/vcl/unx/gtk/window/gtksalframe.cxx
index 49eebbd..5b81897 100644
--- a/vcl/unx/gtk/window/gtksalframe.cxx
+++ b/vcl/unx/gtk/window/gtksalframe.cxx
@@ -506,12 +506,12 @@ GtkSalFrame::GraphicsHolder::~GraphicsHolder()
delete pGraphics;
}
-GtkSalFrame::GtkSalFrame( SalFrame* pParent, sal_uLong nStyle )
+GtkSalFrame::GtkSalFrame( SalFrame* pParent, SalFrameStyleFlags nStyle )
: m_nXScreen( getDisplay()->GetDefaultXScreen() )
{
getDisplay()->registerFrame( this );
m_bDefaultPos = true;
- m_bDefaultSize = ( (nStyle & SAL_FRAME_STYLE_SIZEABLE) && ! pParent );
+ m_bDefaultSize = ( (nStyle & SalFrameStyleFlags::SIZEABLE) && ! pParent );
m_bWindowIsGtkPlug = false;
#if defined(ENABLE_DBUS) && defined(ENABLE_GIO)
m_pLastSyncedDbusMenu = NULL;
@@ -1347,12 +1347,12 @@ GtkSalFrame *GtkSalFrame::getFromWindow( GtkWindow *pWindow )
return static_cast<GtkSalFrame *>(g_object_get_data( G_OBJECT( pWindow ), "SalFrame" ));
}
-void GtkSalFrame::Init( SalFrame* pParent, sal_uLong nStyle )
+void GtkSalFrame::Init( SalFrame* pParent, SalFrameStyleFlags nStyle )
{
- if( nStyle & SAL_FRAME_STYLE_DEFAULT ) // ensure default style
+ if( nStyle & SalFrameStyleFlags::DEFAULT ) // ensure default style
{
- nStyle |= SAL_FRAME_STYLE_MOVEABLE | SAL_FRAME_STYLE_SIZEABLE | SAL_FRAME_STYLE_CLOSEABLE;
- nStyle &= ~SAL_FRAME_STYLE_FLOAT;
+ nStyle |= SalFrameStyleFlags::MOVEABLE | SalFrameStyleFlags::SIZEABLE | SalFrameStyleFlags::CLOSEABLE;
+ nStyle &= ~SalFrameStyleFlags::FLOAT;
}
m_pParent = static_cast<GtkSalFrame*>(pParent);
@@ -1362,13 +1362,13 @@ void GtkSalFrame::Init( SalFrame* pParent, sal_uLong nStyle )
m_aForeignTopLevelWindow = None;
m_nStyle = nStyle;
- GtkWindowType eWinType = ( (nStyle & SAL_FRAME_STYLE_FLOAT) &&
- ! (nStyle & (SAL_FRAME_STYLE_OWNERDRAWDECORATION|
- SAL_FRAME_STYLE_FLOAT_FOCUSABLE))
+ GtkWindowType eWinType = ( (nStyle & SalFrameStyleFlags::FLOAT) &&
+ ! (nStyle & (SalFrameStyleFlags::OWNERDRAWDECORATION|
+ SalFrameStyleFlags::FLOAT_FOCUSABLE))
)
? GTK_WINDOW_POPUP : GTK_WINDOW_TOPLEVEL;
- if( nStyle & SAL_FRAME_STYLE_SYSTEMCHILD )
+ if( nStyle & SalFrameStyleFlags::SYSTEMCHILD )
{
m_pWindow = gtk_event_box_new();
if( m_pParent )
@@ -1399,35 +1399,35 @@ void GtkSalFrame::Init( SalFrame* pParent, sal_uLong nStyle )
// set window type
bool bDecoHandling =
! isChild() &&
- ( ! (nStyle & SAL_FRAME_STYLE_FLOAT) ||
- (nStyle & (SAL_FRAME_STYLE_OWNERDRAWDECORATION|SAL_FRAME_STYLE_FLOAT_FOCUSABLE) ) );
+ ( ! (nStyle & SalFrameStyleFlags::FLOAT) ||
+ (nStyle & (SalFrameStyleFlags::OWNERDRAWDECORATION|SalFrameStyleFlags::FLOAT_FOCUSABLE) ) );
if( bDecoHandling )
{
GdkWindowTypeHint eType = GDK_WINDOW_TYPE_HINT_NORMAL;
- if( (nStyle & SAL_FRAME_STYLE_DIALOG) && m_pParent != 0 )
+ if( (nStyle & SalFrameStyleFlags::DIALOG) && m_pParent != 0 )
eType = GDK_WINDOW_TYPE_HINT_DIALOG;
- if( (nStyle & SAL_FRAME_STYLE_INTRO) )
+ if( (nStyle & SalFrameStyleFlags::INTRO) )
{
gtk_window_set_role( GTK_WINDOW(m_pWindow), "splashscreen" );
eType = GDK_WINDOW_TYPE_HINT_SPLASHSCREEN;
}
- else if( (nStyle & SAL_FRAME_STYLE_TOOLWINDOW ) )
+ else if( (nStyle & SalFrameStyleFlags::TOOLWINDOW ) )
{
eType = GDK_WINDOW_TYPE_HINT_UTILITY;
gtk_window_set_skip_taskbar_hint( GTK_WINDOW(m_pWindow), true );
}
- else if( (nStyle & SAL_FRAME_STYLE_OWNERDRAWDECORATION) )
+ else if( (nStyle & SalFrameStyleFlags::OWNERDRAWDECORATION) )
{
eType = GDK_WINDOW_TYPE_HINT_TOOLBAR;
lcl_set_accept_focus( GTK_WINDOW(m_pWindow), false, true );
}
- else if( (nStyle & SAL_FRAME_STYLE_FLOAT_FOCUSABLE) )
+ else if( (nStyle & SalFrameStyleFlags::FLOAT_FOCUSABLE) )
{
eType = GDK_WINDOW_TYPE_HINT_UTILITY;
}
#if !GTK_CHECK_VERSION(3,0,0)
- if( (nStyle & SAL_FRAME_STYLE_PARTIAL_FULLSCREEN )
+ if( (nStyle & SalFrameStyleFlags::PARTIAL_FULLSCREEN )
&& getDisplay()->getWMAdaptor()->isLegacyPartialFullscreen() )
{
eType = GDK_WINDOW_TYPE_HINT_TOOLBAR;
@@ -1436,10 +1436,10 @@ void GtkSalFrame::Init( SalFrame* pParent, sal_uLong nStyle )
#endif
gtk_window_set_type_hint( GTK_WINDOW(m_pWindow), eType );
gtk_window_set_gravity( GTK_WINDOW(m_pWindow), GDK_GRAVITY_STATIC );
- if( m_pParent && ! (m_pParent->m_nStyle & SAL_FRAME_STYLE_PLUG) )
+ if( m_pParent && ! (m_pParent->m_nStyle & SalFrameStyleFlags::PLUG) )
gtk_window_set_transient_for( GTK_WINDOW(m_pWindow), GTK_WINDOW(m_pParent->m_pWindow) );
}
- else if( (nStyle & SAL_FRAME_STYLE_FLOAT) )
+ else if( (nStyle & SalFrameStyleFlags::FLOAT) )
{
gtk_window_set_type_hint( GTK_WINDOW(m_pWindow), GDK_WINDOW_TYPE_HINT_UTILITY );
}
@@ -1457,7 +1457,7 @@ void GtkSalFrame::Init( SalFrame* pParent, sal_uLong nStyle )
#endif
guint32 nUserTime = 0;
- if( (nStyle & (SAL_FRAME_STYLE_OWNERDRAWDECORATION|SAL_FRAME_STYLE_TOOLWINDOW)) == 0 )
+ if( (nStyle & (SalFrameStyleFlags::OWNERDRAWDECORATION|SalFrameStyleFlags::TOOLWINDOW)) == SalFrameStyleFlags::NONE )
{
nUserTime = gdk_x11_get_server_time(GTK_WIDGET (m_pWindow)->window);
}
@@ -1467,8 +1467,8 @@ void GtkSalFrame::Init( SalFrame* pParent, sal_uLong nStyle )
if( bDecoHandling )
{
- gtk_window_set_resizable( GTK_WINDOW(m_pWindow), (nStyle & SAL_FRAME_STYLE_SIZEABLE) != 0 );
- if( ( (nStyle & (SAL_FRAME_STYLE_OWNERDRAWDECORATION)) ) )
+ gtk_window_set_resizable( GTK_WINDOW(m_pWindow), bool(nStyle & SalFrameStyleFlags::SIZEABLE) );
+ if( ( (nStyle & (SalFrameStyleFlags::OWNERDRAWDECORATION)) ) )
lcl_set_accept_focus( GTK_WINDOW(m_pWindow), false, false );
}
}
@@ -1534,7 +1534,7 @@ void GtkSalFrame::Init( SystemParentData* pSysData )
m_pWindow = gtk_window_new( GTK_WINDOW_POPUP );
m_bWindowIsGtkPlug = false;
}
- m_nStyle = SAL_FRAME_STYLE_PLUG;
+ m_nStyle = SalFrameStyleFlags::PLUG;
InitCommon();
m_pForeignParent = gdk_window_foreign_new_for_display( getGdkDisplay(), m_aForeignParentWindow );
@@ -1728,7 +1728,7 @@ bitmapToPixbuf( SalBitmap *pSalBitmap, SalBitmap *pSalAlpha )
void GtkSalFrame::SetIcon( sal_uInt16 nIcon )
{
- if( (m_nStyle & (SAL_FRAME_STYLE_PLUG|SAL_FRAME_STYLE_SYSTEMCHILD|SAL_FRAME_STYLE_FLOAT|SAL_FRAME_STYLE_INTRO|SAL_FRAME_STYLE_OWNERDRAWDECORATION))
+ if( (m_nStyle & (SalFrameStyleFlags::PLUG|SalFrameStyleFlags::SYSTEMCHILD|SalFrameStyleFlags::FLOAT|SalFrameStyleFlags::INTRO|SalFrameStyleFlags::OWNERDRAWDECORATION))
|| ! m_pWindow )
return;
@@ -1861,7 +1861,7 @@ void GtkSalFrame::SetDefaultSize()
SetPosSize( 0, 0, aDefSize.Width(), aDefSize.Height(),
SAL_FRAME_POSSIZE_WIDTH | SAL_FRAME_POSSIZE_HEIGHT );
- if( (m_nStyle & SAL_FRAME_STYLE_DEFAULT) && m_pWindow )
+ if( (m_nStyle & SalFrameStyleFlags::DEFAULT) && m_pWindow )
gtk_window_maximize( GTK_WINDOW(m_pWindow) );
}
@@ -1886,7 +1886,7 @@ void GtkSalFrame::Show( bool bVisible, bool bNoActivate )
if( m_pWindow )
{
#if !GTK_CHECK_VERSION(3,0,0)
- if( m_pParent && (m_pParent->m_nStyle & SAL_FRAME_STYLE_PARTIAL_FULLSCREEN)
+ if( m_pParent && (m_pParent->m_nStyle & SalFrameStyleFlags::PARTIAL_FULLSCREEN)
&& getDisplay()->getWMAdaptor()->isLegacyPartialFullscreen() )
gtk_window_set_keep_above( GTK_WINDOW(m_pWindow), bVisible );
#endif
@@ -1924,7 +1924,7 @@ void GtkSalFrame::Show( bool bVisible, bool bNoActivate )
#if !GTK_CHECK_VERSION(3,0,0)
guint32 nUserTime = 0;
- if( ! bNoActivate && (m_nStyle & (SAL_FRAME_STYLE_OWNERDRAWDECORATION|SAL_FRAME_STYLE_TOOLWINDOW)) == 0 )
+ if( ! bNoActivate && !(m_nStyle & (SalFrameStyleFlags::OWNERDRAWDECORATION|SalFrameStyleFlags::TOOLWINDOW)) )
nUserTime = gdk_x11_get_server_time(GTK_WIDGET (m_pWindow)->window);
//For these floating windows we don't want the main window to lose focus, and metacity has...
@@ -1955,7 +1955,7 @@ void GtkSalFrame::Show( bool bVisible, bool bNoActivate )
lcl_set_user_time(GTK_WINDOW(m_pWindow), nUserTime );
#endif
- if( ! bNoActivate && (m_nStyle & SAL_FRAME_STYLE_TOOLWINDOW) )
+ if( ! bNoActivate && (m_nStyle & SalFrameStyleFlags::TOOLWINDOW) )
m_bSetFocusOnMap = true;
gtk_widget_show( m_pWindow );
@@ -2011,7 +2011,7 @@ void GtkSalFrame::setMinMaxSize()
{
GdkGeometry aGeo;
int aHints = 0;
- if( m_nStyle & SAL_FRAME_STYLE_SIZEABLE )
+ if( m_nStyle & SalFrameStyleFlags::SIZEABLE )
{
if( m_aMinSize.Width() && m_aMinSize.Height() && ! m_bFullscreen )
{
@@ -2412,7 +2412,7 @@ void GtkSalFrame::SetScreen( unsigned int nNewScreen, int eType, Rectangle *pSiz
maGeometry.nY = aNewMonitor.y;
maGeometry.nWidth = aNewMonitor.width;
maGeometry.nHeight = aNewMonitor.height;
- m_nStyle |= SAL_FRAME_STYLE_PARTIAL_FULLSCREEN;
+ m_nStyle |= SalFrameStyleFlags::PARTIAL_FULLSCREEN;
bResize = true;
// #i110881# for the benefit of compiz set a max size here
@@ -2427,14 +2427,14 @@ void GtkSalFrame::SetScreen( unsigned int nNewScreen, int eType, Rectangle *pSiz
maGeometry.nY = pSize->Top();
maGeometry.nWidth = pSize->GetWidth();
maGeometry.nHeight = pSize->GetHeight();
- m_nStyle &= ~SAL_FRAME_STYLE_PARTIAL_FULLSCREEN;
+ m_nStyle &= ~SalFrameStyleFlags::PARTIAL_FULLSCREEN;
bResize = true;
}
if (bResize)
{
// temporarily re-sizeable
- if( !(m_nStyle & SAL_FRAME_STYLE_SIZEABLE) )
+ if( !(m_nStyle & SalFrameStyleFlags::SIZEABLE) )
gtk_window_set_resizable( GTK_WINDOW(m_pWindow), TRUE );
window_resize(maGeometry.nWidth, maGeometry.nHeight);
//I wonder if we should instead leave maGeometry alone and rely on
@@ -2461,7 +2461,7 @@ void GtkSalFrame::SetScreen( unsigned int nNewScreen, int eType, Rectangle *pSiz
}
if( eType == SET_UN_FULLSCREEN &&
- !(m_nStyle & SAL_FRAME_STYLE_SIZEABLE) )
+ !(m_nStyle & SalFrameStyleFlags::SIZEABLE) )
gtk_window_set_resizable( GTK_WINDOW( m_pWindow ), FALSE );
// FIXME: we should really let gtk+ handle our widget hierarchy ...
@@ -2758,7 +2758,7 @@ void GtkSalFrame::ToTop( sal_uInt16 nFlags )
* to our window - which it of course won't since our input hint
* is set to false.
*/
- if( (m_nStyle & (SAL_FRAME_STYLE_OWNERDRAWDECORATION|SAL_FRAME_STYLE_FLOAT_FOCUSABLE)) )
+ if( (m_nStyle & (SalFrameStyleFlags::OWNERDRAWDECORATION|SalFrameStyleFlags::FLOAT_FOCUSABLE)) )
{
// sad but true: this can cause an XError, we need to catch that
// to do this we need to synchronize with the XServer
@@ -3241,12 +3241,12 @@ void GtkSalFrame::createNewWindow( ::Window aNewParent, bool bXEmbed, SalX11Scre
m_bDefaultPos = m_bDefaultSize = false;
if( aParentData.aWindow != None )
{
- m_nStyle |= SAL_FRAME_STYLE_PLUG;
+ m_nStyle |= SalFrameStyleFlags::PLUG;
Init( &aParentData );
}
else
{
- m_nStyle &= ~SAL_FRAME_STYLE_PLUG;
+ m_nStyle &= ~SalFrameStyleFlags::PLUG;
Init( (m_pParent && m_pParent->m_nXScreen == m_nXScreen) ? m_pParent : NULL, m_nStyle );
}
@@ -3438,7 +3438,7 @@ gboolean GtkSalFrame::signalButton( GtkWidget*, GdkEventButton* pEvent, gpointer
bool bClosePopups = false;
if( pEvent->type == GDK_BUTTON_PRESS &&
- (pThis->m_nStyle & SAL_FRAME_STYLE_OWNERDRAWDECORATION) == 0
+ !(pThis->m_nStyle & SalFrameStyleFlags::OWNERDRAWDECORATION)
)
{
if( m_nFloats > 0 )
@@ -3888,7 +3888,7 @@ gboolean GtkSalFrame::signalConfigure( GtkWidget*, GdkEventConfigure* pEvent, gp
* would size/move based on wrong data if we would actually evaluate
* this event. So let's swallow it.
*/
- if( (pThis->m_nStyle & SAL_FRAME_STYLE_OWNERDRAWDECORATION) &&
+ if( (pThis->m_nStyle & SalFrameStyleFlags::OWNERDRAWDECORATION) &&
GtkSalFrame::getDisplay()->GetCaptureFrame() == pThis )
return false;
@@ -3912,12 +3912,12 @@ gboolean GtkSalFrame::signalConfigure( GtkWidget*, GdkEventConfigure* pEvent, gp
* wrong size at some point.
*/
/* fprintf (stderr, "configure %d %d %d (%d) %d, %d diff? %d\n",
- (int)pThis->m_bFullscreen, (pThis->m_nStyle & (SAL_FRAME_STYLE_SIZEABLE | SAL_FRAME_STYLE_PLUG)), SAL_FRAME_STYLE_SIZEABLE,
- !!( pThis->m_bFullscreen || (pThis->m_nStyle & (SAL_FRAME_STYLE_SIZEABLE | SAL_FRAME_STYLE_PLUG)) == SAL_FRAME_STYLE_SIZEABLE ),
+ (int)pThis->m_bFullscreen, (pThis->m_nStyle & (SalFrameStyleFlags::SIZEABLE | SalFrameStyleFlags::PLUG)), SalFrameStyleFlags::SIZEABLE,
+ !!( pThis->m_bFullscreen || (pThis->m_nStyle & (SalFrameStyleFlags::SIZEABLE | SalFrameStyleFlags::PLUG)) == SalFrameStyleFlags::SIZEABLE ),
pEvent->width, pEvent->height,
!!(pEvent->width != (int)pThis->maGeometry.nWidth || pEvent->height != (int)pThis->maGeometry.nHeight)
); */
- if( pThis->m_bFullscreen || (pThis->m_nStyle & (SAL_FRAME_STYLE_SIZEABLE | SAL_FRAME_STYLE_PLUG)) == SAL_FRAME_STYLE_SIZEABLE )
+ if( pThis->m_bFullscreen || (pThis->m_nStyle & (SalFrameStyleFlags::SIZEABLE | SalFrameStyleFlags::PLUG)) == SalFrameStyleFlags::SIZEABLE )
{
if( pEvent->width != (int)pThis->maGeometry.nWidth || pEvent->height != (int)pThis->maGeometry.nHeight )
{
@@ -3928,7 +3928,7 @@ gboolean GtkSalFrame::signalConfigure( GtkWidget*, GdkEventConfigure* pEvent, gp
}
// update decoration hints
- if( ! (pThis->m_nStyle & SAL_FRAME_STYLE_PLUG) )
+ if( ! (pThis->m_nStyle & SalFrameStyleFlags::PLUG) )
{
GdkRectangle aRect;
gdk_window_get_frame_extents( widget_get_window(GTK_WIDGET(pThis->m_pWindow)), &aRect );
diff --git a/vcl/unx/kde/salnativewidgets-kde.cxx b/vcl/unx/kde/salnativewidgets-kde.cxx
index 08102ba..105c3e6 100644
--- a/vcl/unx/kde/salnativewidgets-kde.cxx
+++ b/vcl/unx/kde/salnativewidgets-kde.cxx
@@ -1732,7 +1732,7 @@ KDESalFrame::KDESalFrame( SalFrame* pParent, sal_uLong nStyle ) :
void KDESalFrame::Show( bool bVisible, bool bNoActivate )
{
- if ( !GetParent() && ! (GetStyle() & SAL_FRAME_STYLE_INTRO) )
+ if ( !GetParent() && ! (GetStyle() & SalFrameStyleFlags::INTRO) )
{
KDEXLib* pXLib = static_cast<KDEXLib*>(GetDisplay()->GetXLib());
pXLib->doStartup();
diff --git a/vcl/unx/kde4/KDESalFrame.cxx b/vcl/unx/kde4/KDESalFrame.cxx
index 125e049..0a5e587 100644
--- a/vcl/unx/kde4/KDESalFrame.cxx
+++ b/vcl/unx/kde4/KDESalFrame.cxx
@@ -55,7 +55,7 @@ KDESalFrame::KDESalFrame( SalFrame* pParent, sal_uLong nState ) :
void KDESalFrame::Show( bool bVisible, bool bNoActivate )
{
- if ( !GetParent() && ! (GetStyle() & SAL_FRAME_STYLE_INTRO) )
+ if ( !GetParent() && ! (GetStyle() & SalFrameStyleFlags::INTRO) )
{
KDEXLib* pXLib = static_cast<KDEXLib*>(GetDisplay()->GetXLib());
pXLib->doStartup();
diff --git a/vcl/win/source/app/salinst.cxx b/vcl/win/source/app/salinst.cxx
index 3927630..27af73f 100644
--- a/vcl/win/source/app/salinst.cxx
+++ b/vcl/win/source/app/salinst.cxx
@@ -730,7 +730,7 @@ LRESULT CALLBACK SalComWndProc( HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lPar
rDef = FALSE;
break;
case SAL_MSG_CREATEFRAME:
- nRet = (LRESULT)ImplSalCreateFrame( GetSalData()->mpFirstInstance, (HWND)lParam, (sal_uLong)wParam );
+ nRet = (LRESULT)ImplSalCreateFrame( GetSalData()->mpFirstInstance, (HWND)lParam, (SalFrameStyleFlags)wParam );
rDef = FALSE;
break;
case SAL_MSG_RECREATEHWND:
@@ -922,13 +922,13 @@ void SalTimer::Start( sal_uLong nMS )
ImplSalStartTimer( nMS, FALSE );
}
-SalFrame* WinSalInstance::CreateChildFrame( SystemParentData* pSystemParentData, sal_uLong nSalFrameStyle )
+SalFrame* WinSalInstance::CreateChildFrame( SystemParentData* pSystemParentData, SalFrameStyleFlags nSalFrameStyle )
{
// to switch to Main-Thread
- return (SalFrame*)(sal_IntPtr)SendMessageW( mhComWnd, SAL_MSG_CREATEFRAME, nSalFrameStyle, (LPARAM)pSystemParentData->hWnd );
+ return (SalFrame*)(sal_IntPtr)SendMessageW( mhComWnd, SAL_MSG_CREATEFRAME, static_cast<WPARAM>(nSalFrameStyle), (LPARAM)pSystemParentData->hWnd );
}
-SalFrame* WinSalInstance::CreateFrame( SalFrame* pParent, sal_uLong nSalFrameStyle )
+SalFrame* WinSalInstance::CreateFrame( SalFrame* pParent, SalFrameStyleFlags nSalFrameStyle )
{
// to switch to Main-Thread
HWND hWndParent;
@@ -936,7 +936,7 @@ SalFrame* WinSalInstance::CreateFrame( SalFrame* pParent, sal_uLong nSalFrameSty
hWndParent = static_cast<WinSalFrame*>(pParent)->mhWnd;
else
hWndParent = 0;
- return (SalFrame*)(sal_IntPtr)SendMessageW( mhComWnd, SAL_MSG_CREATEFRAME, nSalFrameStyle, (LPARAM)hWndParent );
+ return (SalFrame*)(sal_IntPtr)SendMessageW( mhComWnd, SAL_MSG_CREATEFRAME, static_cast<WPARAM>(nSalFrameStyle), (LPARAM)hWndParent );
}
void WinSalInstance::DestroyFrame( SalFrame* pFrame )
diff --git a/vcl/win/source/window/salframe.cxx b/vcl/win/source/window/salframe.cxx
index 3ac3f8f..634d5fd 100644
--- a/vcl/win/source/window/salframe.cxx
+++ b/vcl/win/source/window/salframe.cxx
@@ -280,7 +280,7 @@ void ImplSalGetWorkArea( HWND hWnd, RECT *pRect, const RECT *pParentRect )
}
SalFrame* ImplSalCreateFrame( WinSalInstance* pInst,
- HWND hWndParent, sal_uLong nSalFrameStyle )
+ HWND hWndParent, SalFrameStyleFlags nSalFrameStyle )
{
WinSalFrame* pFrame = new WinSalFrame;
HWND hWnd;
@@ -295,17 +295,17 @@ SalFrame* ImplSalCreateFrame( WinSalInstance* pInst,
static const char* pEnvTransparentFloats = getenv("SAL_TRANSPARENT_FLOATS" );
// determine creation data
- if ( nSalFrameStyle & (SAL_FRAME_STYLE_PLUG | SAL_FRAME_STYLE_SYSTEMCHILD) )
+ if ( nSalFrameStyle & (SalFrameStyleFlags::PLUG | SalFrameStyleFlags::SYSTEMCHILD) )
{
nSysStyle |= WS_CHILD;
- if( nSalFrameStyle & SAL_FRAME_STYLE_SYSTEMCHILD )
+ if( nSalFrameStyle & SalFrameStyleFlags::SYSTEMCHILD )
nSysStyle |= WS_CLIPSIBLINGS;
}
else
{
// #i87402# commenting out WS_CLIPCHILDREN
- // this breaks SAL_FRAME_STYLE_SYSTEMCHILD handling, which is not
- // used currently. Probably SAL_FRAME_STYLE_SYSTEMCHILD should be
+ // this breaks SalFrameStyleFlags::SYSTEMCHILD handling, which is not
+ // used currently. Probably SalFrameStyleFlags::SYSTEMCHILD should be
// removed again.
// nSysStyle |= WS_CLIPCHILDREN;
@@ -318,18 +318,18 @@ SalFrame* ImplSalCreateFrame( WinSalInstance* pInst,
else
{
// Only with WS_OVRLAPPED we get a useful default position/size
- if ( (nSalFrameStyle & (SAL_FRAME_STYLE_SIZEABLE | SAL_FRAME_STYLE_MOVEABLE)) ==
- (SAL_FRAME_STYLE_SIZEABLE | SAL_FRAME_STYLE_MOVEABLE) )
+ if ( (nSalFrameStyle & (SalFrameStyleFlags::SIZEABLE | SalFrameStyleFlags::MOVEABLE)) ==
+ (SalFrameStyleFlags::SIZEABLE | SalFrameStyleFlags::MOVEABLE) )
nSysStyle |= WS_OVERLAPPED;
else
{
nSysStyle |= WS_POPUP;
- if ( !(nSalFrameStyle & SAL_FRAME_STYLE_MOVEABLE) )
+ if ( !(nSalFrameStyle & SalFrameStyleFlags::MOVEABLE) )
nExSysStyle |= WS_EX_TOOLWINDOW; // avoid taskbar appearance, for eg splash screen
}
}
- if ( nSalFrameStyle & SAL_FRAME_STYLE_MOVEABLE )
+ if ( nSalFrameStyle & SalFrameStyleFlags::MOVEABLE )
{
pFrame->mbCaption = TRUE;
nSysStyle |= WS_SYSMENU | WS_CAPTION;
@@ -338,7 +338,7 @@ SalFrame* ImplSalCreateFrame( WinSalInstance* pInst,
else
nExSysStyle |= WS_EX_DLGMODALFRAME;
- if ( nSalFrameStyle & SAL_FRAME_STYLE_SIZEABLE )
+ if ( nSalFrameStyle & SalFrameStyleFlags::SIZEABLE )
{
pFrame->mbSizeBorder = TRUE;
nSysStyle |= WS_THICKFRAME;
@@ -348,34 +348,34 @@ SalFrame* ImplSalCreateFrame( WinSalInstance* pInst,
else
pFrame->mbFixBorder = TRUE;
- if ( nSalFrameStyle & SAL_FRAME_STYLE_DEFAULT )
+ if ( nSalFrameStyle & SalFrameStyleFlags::DEFAULT )
nExSysStyle |= WS_EX_APPWINDOW;
}
- if( nSalFrameStyle & SAL_FRAME_STYLE_TOOLWINDOW
+ if( nSalFrameStyle & SalFrameStyleFlags::TOOLWINDOW
// #100656# toolwindows lead to bad alt-tab behaviour, if they have the focus
// you must press it twice to leave the application
// so toolwindows are only used for non sizeable windows
// which are typically small, so a small caption makes sense
// #103578# looked too bad - above changes reverted
- /* && !(nSalFrameStyle & SAL_FRAME_STYLE_SIZEABLE) */ )
+ /* && !(nSalFrameStyle & SalFrameStyleFlags::SIZEABLE) */ )
{
pFrame->mbNoIcon = TRUE;
nExSysStyle |= WS_EX_TOOLWINDOW;
- if ( pEnvTransparentFloats /*&& !(nSalFrameStyle & SAL_FRAME_STYLE_MOVEABLE) */)
+ if ( pEnvTransparentFloats /*&& !(nSalFrameStyle & SalFrameStyleFlags::MOVEABLE) */)
nExSysStyle |= WS_EX_LAYERED;
}
}
- if ( nSalFrameStyle & SAL_FRAME_STYLE_FLOAT )
+ if ( nSalFrameStyle & SalFrameStyleFlags::FLOAT )
{
nExSysStyle |= WS_EX_TOOLWINDOW;
pFrame->mbFloatWin = TRUE;
- if ( (pEnvTransparentFloats /* does not work remote! || (nSalFrameStyle & SAL_FRAME_STYLE_FLOAT_FOCUSABLE) */ ) )
+ if ( (pEnvTransparentFloats /* does not work remote! || (nSalFrameStyle & SalFrameStyleFlags::FLOAT_FOCUSABLE) */ ) )
nExSysStyle |= WS_EX_LAYERED;
}
- if( (nSalFrameStyle & SAL_FRAME_STYLE_TOOLTIP) || (nSalFrameStyle & SAL_FRAME_STYLE_FLOAT_FOCUSABLE) )
+ if( (nSalFrameStyle & SalFrameStyleFlags::TOOLTIP) || (nSalFrameStyle & SalFrameStyleFlags::FLOAT_FOCUSABLE) )
nExSysStyle |= WS_EX_TOPMOST;
// init frame data
@@ -389,7 +389,7 @@ SalFrame* ImplSalCreateFrame( WinSalInstance* pInst,
pFrame->mnShowState = SW_SHOWMAXIMIZED;
else
{
- if ( nSalFrameStyle & SAL_FRAME_STYLE_DEFAULT )
+ if ( nSalFrameStyle & SalFrameStyleFlags::DEFAULT )
{
SalData* pSalData = GetSalData();
pFrame->mnShowState = pSalData->mnCmdShow;
@@ -422,14 +422,14 @@ SalFrame* ImplSalCreateFrame( WinSalInstance* pInst,
LPCWSTR pClassName;
if ( bSubFrame )
{
- if ( nSalFrameStyle & (SAL_FRAME_STYLE_MOVEABLE|SAL_FRAME_STYLE_NOSHADOW) ) // check if shadow not wanted
+ if ( nSalFrameStyle & (SalFrameStyleFlags::MOVEABLE|SalFrameStyleFlags::NOSHADOW) ) // check if shadow not wanted
pClassName = SAL_SUBFRAME_CLASSNAMEW;
else
pClassName = SAL_TMPSUBFRAME_CLASSNAMEW; // undecorated floaters will get shadow on XP
}
else
{
- if ( nSalFrameStyle & SAL_FRAME_STYLE_MOVEABLE )
+ if ( nSalFrameStyle & SalFrameStyleFlags::MOVEABLE )
pClassName = SAL_FRAME_CLASSNAMEW;
else
pClassName = SAL_TMPSUBFRAME_CLASSNAMEW;
@@ -469,7 +469,7 @@ SalFrame* ImplSalCreateFrame( WinSalInstance* pInst,
DeleteMenu( hSysMenu, SC_SIZE, MF_BYCOMMAND );
}
}
- if ( (nSysStyle & WS_SYSMENU) && !(nSalFrameStyle & SAL_FRAME_STYLE_CLOSEABLE) )
+ if ( (nSysStyle & WS_SYSMENU) && !(nSalFrameStyle & SalFrameStyleFlags::CLOSEABLE) )
{
HMENU hSysMenu = GetSystemMenu( hWnd, FALSE );
if ( hSysMenu )
@@ -1145,7 +1145,7 @@ static void ImplSalShow( HWND hWnd, bool bVisible, bool bNoActivate )
if( aDogTag.isDeleted() )
return;
- if ( aSalShlData.mbWXP && pFrame->mbFloatWin && !(pFrame->mnStyle & SAL_FRAME_STYLE_NOSHADOW))
+ if ( aSalShlData.mbWXP && pFrame->mbFloatWin && !(pFrame->mnStyle & SalFrameStyleFlags::NOSHADOW))
{
// erase the window immediately to improve XP shadow effect
// otherwise the shadow may appears long time before the rest of the window
@@ -1394,10 +1394,10 @@ void WinSalFrame::SetPosSize( long nX, long nY, long nWidth, long nHeight,
bool bCheckOffScreen = TRUE;
// but don't do this for floaters or ownerdraw windows that are currently moved interactively
- if( (mnStyle & SAL_FRAME_STYLE_FLOAT) && !(mnStyle & SAL_FRAME_STYLE_OWNERDRAWDECORATION) )
+ if( (mnStyle & SalFrameStyleFlags::FLOAT) && !(mnStyle & SalFrameStyleFlags::OWNERDRAWDECORATION) )
bCheckOffScreen = FALSE;
- if( mnStyle & SAL_FRAME_STYLE_OWNERDRAWDECORATION )
+ if( mnStyle & SalFrameStyleFlags::OWNERDRAWDECORATION )
{
// may be the window is currently being moved (mouse is captured), then no check is required
if( mhWnd == ::GetCapture() )
@@ -1420,7 +1420,7 @@ void WinSalFrame::SetPosSize( long nX, long nY, long nWidth, long nHeight,
UINT nPosFlags = SWP_NOACTIVATE | SWP_NOOWNERZORDER | nPosSize;
// bring floating windows always to top
- if( !(mnStyle & SAL_FRAME_STYLE_FLOAT) )
+ if( !(mnStyle & SalFrameStyleFlags::FLOAT) )
nPosFlags |= SWP_NOZORDER; // do not change z-order
SetWindowPos( mhWnd, HWND_TOP, nX, nY, (int)nWidth, (int)nHeight, nPosFlags );
@@ -1986,7 +1986,7 @@ void WinSalFrame::SetAlwaysOnTop( bool bOnTop )
static void ImplSalToTop( HWND hWnd, sal_uInt16 nFlags )
{
WinSalFrame* pToTopFrame = GetWindowPtr( hWnd );
- if( pToTopFrame && (pToTopFrame->mnStyle & SAL_FRAME_STYLE_SYSTEMCHILD) != 0 )
+ if( pToTopFrame && (pToTopFrame->mnStyle & SalFrameStyleFlags::SYSTEMCHILD) )
BringWindowToTop( hWnd );
if ( nFlags & SAL_FRAME_TOTOP_FOREGROUNDTASK )
More information about the Libreoffice-commits
mailing list