1*161f4cd1SAndrew Rist /************************************************************** 2cdf0e10cSrcweir * 3*161f4cd1SAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 4*161f4cd1SAndrew Rist * or more contributor license agreements. See the NOTICE file 5*161f4cd1SAndrew Rist * distributed with this work for additional information 6*161f4cd1SAndrew Rist * regarding copyright ownership. The ASF licenses this file 7*161f4cd1SAndrew Rist * to you under the Apache License, Version 2.0 (the 8*161f4cd1SAndrew Rist * "License"); you may not use this file except in compliance 9*161f4cd1SAndrew Rist * with the License. You may obtain a copy of the License at 10*161f4cd1SAndrew Rist * 11*161f4cd1SAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 12*161f4cd1SAndrew Rist * 13*161f4cd1SAndrew Rist * Unless required by applicable law or agreed to in writing, 14*161f4cd1SAndrew Rist * software distributed under the License is distributed on an 15*161f4cd1SAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16*161f4cd1SAndrew Rist * KIND, either express or implied. See the License for the 17*161f4cd1SAndrew Rist * specific language governing permissions and limitations 18*161f4cd1SAndrew Rist * under the License. 19*161f4cd1SAndrew Rist * 20*161f4cd1SAndrew Rist *************************************************************/ 21*161f4cd1SAndrew Rist 22*161f4cd1SAndrew Rist 23cdf0e10cSrcweir 24cdf0e10cSrcweir #ifndef _VCL_GTKFRAME_HXX 25cdf0e10cSrcweir #define _VCL_GTKFRAME_HXX 26cdf0e10cSrcweir 27cdf0e10cSrcweir #include <tools/prex.h> 28cdf0e10cSrcweir #include <gtk/gtk.h> 29cdf0e10cSrcweir #include <gdk/gdk.h> 30cdf0e10cSrcweir #include <gdk/gdkx.h> 31cdf0e10cSrcweir #include <gdk/gdkkeysyms.h> 32cdf0e10cSrcweir #include <tools/postx.h> 33cdf0e10cSrcweir 34cdf0e10cSrcweir #include <salframe.hxx> 35cdf0e10cSrcweir #include <vcl/sysdata.hxx> 36cdf0e10cSrcweir 37cdf0e10cSrcweir #include "tools/link.hxx" 38cdf0e10cSrcweir 39cdf0e10cSrcweir #include <list> 40cdf0e10cSrcweir #include <vector> 41cdf0e10cSrcweir 42cdf0e10cSrcweir class GtkSalGraphics; 43cdf0e10cSrcweir class GtkSalDisplay; 44cdf0e10cSrcweir 45cdf0e10cSrcweir class GtkSalFrame : public SalFrame 46cdf0e10cSrcweir { 47cdf0e10cSrcweir static const int nMaxGraphics = 2; 48cdf0e10cSrcweir 49cdf0e10cSrcweir struct GraphicsHolder 50cdf0e10cSrcweir { 51cdf0e10cSrcweir GtkSalGraphics* pGraphics; 52cdf0e10cSrcweir bool bInUse; GraphicsHolderGtkSalFrame::GraphicsHolder53cdf0e10cSrcweir GraphicsHolder() 54cdf0e10cSrcweir : pGraphics( NULL ), 55cdf0e10cSrcweir bInUse( false ) 56cdf0e10cSrcweir {} 57cdf0e10cSrcweir ~GraphicsHolder(); 58cdf0e10cSrcweir }; 59cdf0e10cSrcweir 60cdf0e10cSrcweir struct IMHandler 61cdf0e10cSrcweir { 62cdf0e10cSrcweir //-------------------------------------------------------- 63cdf0e10cSrcweir // Not all GTK Input Methods swallow key release 64cdf0e10cSrcweir // events. Since they swallow the key press events and we 65cdf0e10cSrcweir // are left with the key release events, we need to 66cdf0e10cSrcweir // manually swallow those. To do this, we keep a list of 67cdf0e10cSrcweir // the previous 10 key press events in each GtkSalFrame 68cdf0e10cSrcweir // and when we get a key release that matches one of the 69cdf0e10cSrcweir // key press events in our list, we swallow it. 70cdf0e10cSrcweir struct PreviousKeyPress 71cdf0e10cSrcweir { 72cdf0e10cSrcweir GdkWindow *window; 73cdf0e10cSrcweir gint8 send_event; 74cdf0e10cSrcweir guint32 time; 75cdf0e10cSrcweir guint state; 76cdf0e10cSrcweir guint keyval; 77cdf0e10cSrcweir guint16 hardware_keycode; 78cdf0e10cSrcweir guint8 group; 79cdf0e10cSrcweir PreviousKeyPressGtkSalFrame::IMHandler::PreviousKeyPress80cdf0e10cSrcweir PreviousKeyPress (GdkEventKey *event) 81cdf0e10cSrcweir : window (NULL), 82cdf0e10cSrcweir send_event (0), 83cdf0e10cSrcweir time (0), 84cdf0e10cSrcweir state (0), 85cdf0e10cSrcweir keyval (0), 86cdf0e10cSrcweir hardware_keycode (0), 87cdf0e10cSrcweir group (0) 88cdf0e10cSrcweir { 89cdf0e10cSrcweir if (event) 90cdf0e10cSrcweir { 91cdf0e10cSrcweir window = event->window; 92cdf0e10cSrcweir send_event = event->send_event; 93cdf0e10cSrcweir time = event->time; 94cdf0e10cSrcweir state = event->state; 95cdf0e10cSrcweir keyval = event->keyval; 96cdf0e10cSrcweir hardware_keycode = event->hardware_keycode; 97cdf0e10cSrcweir group = event->group; 98cdf0e10cSrcweir } 99cdf0e10cSrcweir } 100cdf0e10cSrcweir PreviousKeyPressGtkSalFrame::IMHandler::PreviousKeyPress101cdf0e10cSrcweir PreviousKeyPress( const PreviousKeyPress& rPrev ) 102cdf0e10cSrcweir : window( rPrev.window ), 103cdf0e10cSrcweir send_event( rPrev.send_event ), 104cdf0e10cSrcweir time( rPrev.time ), 105cdf0e10cSrcweir state( rPrev.state ), 106cdf0e10cSrcweir keyval( rPrev.keyval ), 107cdf0e10cSrcweir hardware_keycode( rPrev.hardware_keycode ), 108cdf0e10cSrcweir group( rPrev.group ) 109cdf0e10cSrcweir {} 110cdf0e10cSrcweir operator ==GtkSalFrame::IMHandler::PreviousKeyPress111cdf0e10cSrcweir bool operator== (GdkEventKey *event) const 112cdf0e10cSrcweir { 113cdf0e10cSrcweir return (event != NULL) 114cdf0e10cSrcweir && (event->window == window) 115cdf0e10cSrcweir && (event->send_event == send_event) 116cdf0e10cSrcweir && (event->state == state) 117cdf0e10cSrcweir && (event->keyval == keyval) 118cdf0e10cSrcweir && (event->hardware_keycode == hardware_keycode) 119cdf0e10cSrcweir && (event->group == group) 120cdf0e10cSrcweir && (event->time - time < 3) 121cdf0e10cSrcweir ; 122cdf0e10cSrcweir } 123cdf0e10cSrcweir }; 124cdf0e10cSrcweir 125cdf0e10cSrcweir 126cdf0e10cSrcweir GtkSalFrame* m_pFrame; 127cdf0e10cSrcweir std::list< PreviousKeyPress > m_aPrevKeyPresses; 128cdf0e10cSrcweir int m_nPrevKeyPresses; // avoid using size() 129cdf0e10cSrcweir GtkIMContext* m_pIMContext; 130cdf0e10cSrcweir bool m_bFocused; 131cdf0e10cSrcweir bool m_bPreeditJustChanged; 132cdf0e10cSrcweir SalExtTextInputEvent m_aInputEvent; 133cdf0e10cSrcweir std::vector< sal_uInt16 > m_aInputFlags; 134cdf0e10cSrcweir 135cdf0e10cSrcweir IMHandler( GtkSalFrame* ); 136cdf0e10cSrcweir ~IMHandler(); 137cdf0e10cSrcweir 138cdf0e10cSrcweir void createIMContext(); 139cdf0e10cSrcweir void deleteIMContext(); 140cdf0e10cSrcweir void updateIMSpotLocation(); 141cdf0e10cSrcweir void setInputContext( SalInputContext* pContext ); 142cdf0e10cSrcweir void endExtTextInput( sal_uInt16 nFlags ); 143cdf0e10cSrcweir bool handleKeyEvent( GdkEventKey* pEvent ); 144cdf0e10cSrcweir void focusChanged( bool bFocusIn ); 145cdf0e10cSrcweir 146cdf0e10cSrcweir void doCallEndExtTextInput(); 147cdf0e10cSrcweir void sendEmptyCommit(); 148cdf0e10cSrcweir 149cdf0e10cSrcweir 150cdf0e10cSrcweir static void signalIMCommit( GtkIMContext*, gchar*, gpointer ); 151cdf0e10cSrcweir static gboolean signalIMDeleteSurrounding( GtkIMContext*, gint, gint, gpointer ); 152cdf0e10cSrcweir static void signalIMPreeditChanged( GtkIMContext*, gpointer ); 153cdf0e10cSrcweir static void signalIMPreeditEnd( GtkIMContext*, gpointer ); 154cdf0e10cSrcweir static void signalIMPreeditStart( GtkIMContext*, gpointer ); 155cdf0e10cSrcweir static gboolean signalIMRetrieveSurrounding( GtkIMContext*, gpointer ); 156cdf0e10cSrcweir }; 157cdf0e10cSrcweir friend struct IMHandler; 158cdf0e10cSrcweir 159cdf0e10cSrcweir int m_nScreen; 160cdf0e10cSrcweir GtkWidget* m_pWindow; 161cdf0e10cSrcweir GdkWindow* m_pForeignParent; 162cdf0e10cSrcweir GdkNativeWindow m_aForeignParentWindow; 163cdf0e10cSrcweir GdkWindow* m_pForeignTopLevel; 164cdf0e10cSrcweir GdkNativeWindow m_aForeignTopLevelWindow; 165cdf0e10cSrcweir Pixmap m_hBackgroundPixmap; 166cdf0e10cSrcweir sal_uLong m_nStyle; 167cdf0e10cSrcweir SalExtStyle m_nExtStyle; 168cdf0e10cSrcweir GtkFixed* m_pFixedContainer; 169cdf0e10cSrcweir GtkSalFrame* m_pParent; 170cdf0e10cSrcweir std::list< GtkSalFrame* > m_aChildren; 171cdf0e10cSrcweir GdkWindowState m_nState; 172cdf0e10cSrcweir SystemEnvData m_aSystemData; 173cdf0e10cSrcweir GraphicsHolder m_aGraphics[ nMaxGraphics ]; 174cdf0e10cSrcweir sal_uInt16 m_nKeyModifiers; 175cdf0e10cSrcweir GdkCursor *m_pCurrentCursor; 176cdf0e10cSrcweir GdkVisibilityState m_nVisibility; 177cdf0e10cSrcweir PointerStyle m_ePointerStyle; 178cdf0e10cSrcweir int m_nSavedScreenSaverTimeout; 179cdf0e10cSrcweir guint m_nGSMCookie; 180cdf0e10cSrcweir int m_nWorkArea; 181cdf0e10cSrcweir bool m_bFullscreen; 182cdf0e10cSrcweir bool m_bSingleAltPress; 183cdf0e10cSrcweir bool m_bDefaultPos; 184cdf0e10cSrcweir bool m_bDefaultSize; 185cdf0e10cSrcweir bool m_bSendModChangeOnRelease; 186cdf0e10cSrcweir bool m_bWindowIsGtkPlug; 187cdf0e10cSrcweir bool m_bSetFocusOnMap; 188cdf0e10cSrcweir String m_aTitle; 189cdf0e10cSrcweir 190cdf0e10cSrcweir IMHandler* m_pIMHandler; 191cdf0e10cSrcweir 192cdf0e10cSrcweir Size m_aMaxSize; 193cdf0e10cSrcweir Size m_aMinSize; 194cdf0e10cSrcweir Rectangle m_aRestorePosSize; 195cdf0e10cSrcweir 196cdf0e10cSrcweir GdkRegion* m_pRegion; 197cdf0e10cSrcweir 198cdf0e10cSrcweir void Init( SalFrame* pParent, sal_uLong nStyle ); 199cdf0e10cSrcweir void Init( SystemParentData* pSysData ); 200cdf0e10cSrcweir void InitCommon(); 201cdf0e10cSrcweir 202cdf0e10cSrcweir // signals 203cdf0e10cSrcweir static gboolean signalButton( GtkWidget*, GdkEventButton*, gpointer ); 204cdf0e10cSrcweir static void signalStyleSet( GtkWidget*, GtkStyle* pPrevious, gpointer ); 205cdf0e10cSrcweir static gboolean signalExpose( GtkWidget*, GdkEventExpose*, gpointer ); 206cdf0e10cSrcweir static gboolean signalFocus( GtkWidget*, GdkEventFocus*, gpointer ); 207cdf0e10cSrcweir static gboolean signalMap( GtkWidget*, GdkEvent*, gpointer ); 208cdf0e10cSrcweir static gboolean signalUnmap( GtkWidget*, GdkEvent*, gpointer ); 209cdf0e10cSrcweir static gboolean signalConfigure( GtkWidget*, GdkEventConfigure*, gpointer ); 210cdf0e10cSrcweir static gboolean signalMotion( GtkWidget*, GdkEventMotion*, gpointer ); 211cdf0e10cSrcweir static gboolean signalKey( GtkWidget*, GdkEventKey*, gpointer ); 212cdf0e10cSrcweir static gboolean signalDelete( GtkWidget*, GdkEvent*, gpointer ); 213cdf0e10cSrcweir static gboolean signalState( GtkWidget*, GdkEvent*, gpointer ); 214cdf0e10cSrcweir static gboolean signalScroll( GtkWidget*, GdkEvent*, gpointer ); 215cdf0e10cSrcweir static gboolean signalCrossing( GtkWidget*, GdkEventCrossing*, gpointer ); 216cdf0e10cSrcweir static gboolean signalVisibility( GtkWidget*, GdkEventVisibility*, gpointer ); 217cdf0e10cSrcweir static void signalDestroy( GtkObject*, gpointer ); 218cdf0e10cSrcweir 219cdf0e10cSrcweir void Center(); 220cdf0e10cSrcweir void SetDefaultSize(); 221cdf0e10cSrcweir void setAutoLock( bool bLock ); 222cdf0e10cSrcweir void setScreenSaverTimeout( int nTimeout ); 223cdf0e10cSrcweir 224cdf0e10cSrcweir void doKeyCallback( guint state, 225cdf0e10cSrcweir guint keyval, 226cdf0e10cSrcweir guint16 hardware_keycode, 227cdf0e10cSrcweir guint8 group, 228cdf0e10cSrcweir guint32 time, 229cdf0e10cSrcweir sal_Unicode aOrigCode, 230cdf0e10cSrcweir bool bDown, 231cdf0e10cSrcweir bool bSendRelease 232cdf0e10cSrcweir ); 233cdf0e10cSrcweir 234cdf0e10cSrcweir 235cdf0e10cSrcweir GdkNativeWindow findTopLevelSystemWindow( GdkNativeWindow aWindow ); 236cdf0e10cSrcweir 237cdf0e10cSrcweir static int m_nFloats; 238cdf0e10cSrcweir isFloatGrabWindow() const239cdf0e10cSrcweir bool isFloatGrabWindow() const 240cdf0e10cSrcweir { 241cdf0e10cSrcweir return 242cdf0e10cSrcweir (m_nStyle & SAL_FRAME_STYLE_FLOAT) && // only a float can be floatgrab 243cdf0e10cSrcweir !(m_nStyle & SAL_FRAME_STYLE_TOOLTIP) && // tool tips are not 244cdf0e10cSrcweir !(m_nStyle & SAL_FRAME_STYLE_OWNERDRAWDECORATION) && // toolbars are also not 245cdf0e10cSrcweir !(m_nStyle & SAL_FRAME_STYLE_FLOAT_FOCUSABLE); // focusable floats are not 246cdf0e10cSrcweir } 247cdf0e10cSrcweir isChild(bool bPlug=true,bool bSysChild=true)248cdf0e10cSrcweir bool isChild( bool bPlug = true, bool bSysChild = true ) 249cdf0e10cSrcweir { 250cdf0e10cSrcweir sal_uLong nMask = 0; 251cdf0e10cSrcweir if( bPlug ) 252cdf0e10cSrcweir nMask |= SAL_FRAME_STYLE_PLUG; 253cdf0e10cSrcweir if( bSysChild ) 254cdf0e10cSrcweir nMask |= SAL_FRAME_STYLE_SYSTEMCHILD; 255cdf0e10cSrcweir return (m_nStyle & nMask) != 0; 256cdf0e10cSrcweir } 257cdf0e10cSrcweir 258cdf0e10cSrcweir void resizeWindow( long nWidth, long nHeight ); 259cdf0e10cSrcweir void moveWindow( long nX, long nY ); 260cdf0e10cSrcweir 261cdf0e10cSrcweir Size calcDefaultSize(); 262cdf0e10cSrcweir 263cdf0e10cSrcweir void setMinMaxSize(); 264cdf0e10cSrcweir void createNewWindow( XLIB_Window aParent, bool bXEmbed, int nScreen ); 265cdf0e10cSrcweir void askForXEmbedFocus( sal_Int32 nTimecode ); 266cdf0e10cSrcweir 267cdf0e10cSrcweir DECL_LINK( ImplDelayedFullScreenHdl, void* ); 268cdf0e10cSrcweir public: 269cdf0e10cSrcweir GtkSalFrame( SalFrame* pParent, sal_uLong nStyle ); 270cdf0e10cSrcweir GtkSalFrame( SystemParentData* pSysData ); 271cdf0e10cSrcweir 272cdf0e10cSrcweir // dispatches an event, returns true if dispatched 273cdf0e10cSrcweir // and false else; if true was returned the event should 274cdf0e10cSrcweir // be swallowed 275cdf0e10cSrcweir bool Dispatch( const XEvent* pEvent ); 276cdf0e10cSrcweir void grabPointer( sal_Bool bGrab, sal_Bool bOwnerEvents = sal_False ); 277cdf0e10cSrcweir 278cdf0e10cSrcweir GtkSalDisplay* getDisplay(); 279cdf0e10cSrcweir GdkDisplay* getGdkDisplay(); getWindow() const280cdf0e10cSrcweir GtkWidget* getWindow() const { return m_pWindow; } getFixedContainer() const281cdf0e10cSrcweir GtkFixed* getFixedContainer() const { return m_pFixedContainer; } getForeignParent() const282cdf0e10cSrcweir GdkWindow* getForeignParent() const { return m_pForeignParent; } getForeignParentWindow() const283cdf0e10cSrcweir GdkNativeWindow getForeignParentWindow() const { return m_aForeignParentWindow; } getForeignTopLevel() const284cdf0e10cSrcweir GdkWindow* getForeignTopLevel() const { return m_pForeignTopLevel; } getForeignTopLevelWindow() const285cdf0e10cSrcweir GdkNativeWindow getForeignTopLevelWindow() const { return m_aForeignTopLevelWindow; } getVisibilityState() const286cdf0e10cSrcweir GdkVisibilityState getVisibilityState() const 287cdf0e10cSrcweir { return m_nVisibility; } getBackgroundPixmap() const288cdf0e10cSrcweir Pixmap getBackgroundPixmap() const { return m_hBackgroundPixmap; } getScreenNumber() const289cdf0e10cSrcweir int getScreenNumber() const { return m_nScreen; } 290cdf0e10cSrcweir void updateScreenNumber(); 291cdf0e10cSrcweir 292cdf0e10cSrcweir void moveToScreen( int nScreen ); 293cdf0e10cSrcweir 294cdf0e10cSrcweir virtual ~GtkSalFrame(); 295cdf0e10cSrcweir 296cdf0e10cSrcweir // SalGraphics or NULL, but two Graphics for all SalFrames 297cdf0e10cSrcweir // must be returned 298cdf0e10cSrcweir virtual SalGraphics* GetGraphics(); 299cdf0e10cSrcweir virtual void ReleaseGraphics( SalGraphics* pGraphics ); 300cdf0e10cSrcweir 301cdf0e10cSrcweir // Event must be destroyed, when Frame is destroyed 302cdf0e10cSrcweir // When Event is called, SalInstance::Yield() must be returned 303cdf0e10cSrcweir virtual sal_Bool PostEvent( void* pData ); 304cdf0e10cSrcweir 305cdf0e10cSrcweir virtual void SetTitle( const XubString& rTitle ); 306cdf0e10cSrcweir virtual void SetIcon( sal_uInt16 nIcon ); 307cdf0e10cSrcweir virtual void SetMenu( SalMenu *pSalMenu ); 308cdf0e10cSrcweir virtual void DrawMenuBar(); 309cdf0e10cSrcweir 310cdf0e10cSrcweir virtual void SetExtendedFrameStyle( SalExtStyle nExtStyle ); 311cdf0e10cSrcweir // Before the window is visible, a resize event 312cdf0e10cSrcweir // must be sent with the correct size 313cdf0e10cSrcweir virtual void Show( sal_Bool bVisible, sal_Bool bNoActivate = sal_False ); 314cdf0e10cSrcweir virtual void Enable( sal_Bool bEnable ); 315cdf0e10cSrcweir // Set ClientSize and Center the Window to the desktop 316cdf0e10cSrcweir // and send/post a resize message 317cdf0e10cSrcweir virtual void SetMinClientSize( long nWidth, long nHeight ); 318cdf0e10cSrcweir virtual void SetMaxClientSize( long nWidth, long nHeight ); 319cdf0e10cSrcweir virtual void SetPosSize( long nX, long nY, long nWidth, long nHeight, sal_uInt16 nFlags ); 320cdf0e10cSrcweir virtual void GetClientSize( long& rWidth, long& rHeight ); 321cdf0e10cSrcweir virtual void GetWorkArea( Rectangle& rRect ); 322cdf0e10cSrcweir virtual SalFrame* GetParent() const; 323cdf0e10cSrcweir virtual void SetWindowState( const SalFrameState* pState ); 324cdf0e10cSrcweir virtual sal_Bool GetWindowState( SalFrameState* pState ); 325cdf0e10cSrcweir virtual void ShowFullScreen( sal_Bool bFullScreen, sal_Int32 nDisplay ); 326cdf0e10cSrcweir // Enable/Disable ScreenSaver, SystemAgents, ... 327cdf0e10cSrcweir virtual void StartPresentation( sal_Bool bStart ); 328cdf0e10cSrcweir // Show Window over all other Windows 329cdf0e10cSrcweir virtual void SetAlwaysOnTop( sal_Bool bOnTop ); 330cdf0e10cSrcweir 331cdf0e10cSrcweir // Window to top and grab focus 332cdf0e10cSrcweir virtual void ToTop( sal_uInt16 nFlags ); 333cdf0e10cSrcweir 334cdf0e10cSrcweir // this function can call with the same 335cdf0e10cSrcweir // pointer style 336cdf0e10cSrcweir virtual void SetPointer( PointerStyle ePointerStyle ); 337cdf0e10cSrcweir virtual void CaptureMouse( sal_Bool bMouse ); 338cdf0e10cSrcweir virtual void SetPointerPos( long nX, long nY ); 339cdf0e10cSrcweir 340cdf0e10cSrcweir // flush output buffer 341cdf0e10cSrcweir using SalFrame::Flush; 342cdf0e10cSrcweir virtual void Flush(); 343cdf0e10cSrcweir // flush output buffer, wait till outstanding operations are done 344cdf0e10cSrcweir virtual void Sync(); 345cdf0e10cSrcweir 346cdf0e10cSrcweir virtual void SetInputContext( SalInputContext* pContext ); 347cdf0e10cSrcweir virtual void EndExtTextInput( sal_uInt16 nFlags ); 348cdf0e10cSrcweir 349cdf0e10cSrcweir virtual String GetKeyName( sal_uInt16 nKeyCode ); 350cdf0e10cSrcweir virtual String GetSymbolKeyName( const XubString& rFontName, sal_uInt16 nKeyCode ); 351cdf0e10cSrcweir virtual sal_Bool MapUnicodeToKeyCode( sal_Unicode aUnicode, LanguageType aLangType, KeyCode& rKeyCode ); 352cdf0e10cSrcweir 353cdf0e10cSrcweir // returns the input language used for the last key stroke 354cdf0e10cSrcweir // may be LANGUAGE_DONTKNOW if not supported by the OS 355cdf0e10cSrcweir virtual LanguageType GetInputLanguage(); 356cdf0e10cSrcweir 357cdf0e10cSrcweir virtual SalBitmap* SnapShot(); 358cdf0e10cSrcweir 359cdf0e10cSrcweir virtual void UpdateSettings( AllSettings& rSettings ); 360cdf0e10cSrcweir 361cdf0e10cSrcweir virtual void Beep( SoundType eSoundType ); 362cdf0e10cSrcweir 363cdf0e10cSrcweir // returns system data (most prominent: window handle) 364cdf0e10cSrcweir virtual const SystemEnvData* GetSystemData() const; 365cdf0e10cSrcweir 366cdf0e10cSrcweir 367cdf0e10cSrcweir // get current modifier and button mask 368cdf0e10cSrcweir virtual SalPointerState GetPointerState(); 369cdf0e10cSrcweir 370cdf0e10cSrcweir // set new parent window 371cdf0e10cSrcweir virtual void SetParent( SalFrame* pNewParent ); 372cdf0e10cSrcweir // reparent window to act as a plugin; implementation 373cdf0e10cSrcweir // may choose to use a new system window internally 374cdf0e10cSrcweir // return false to indicate failure 375cdf0e10cSrcweir virtual bool SetPluginParent( SystemParentData* pNewParent ); 376cdf0e10cSrcweir 377cdf0e10cSrcweir virtual void SetBackgroundBitmap( SalBitmap* ); 378cdf0e10cSrcweir 379cdf0e10cSrcweir virtual void SetScreenNumber( unsigned int ); 380cdf0e10cSrcweir 381cdf0e10cSrcweir // shaped system windows 382cdf0e10cSrcweir // set clip region to none (-> rectangular windows, normal state) 383cdf0e10cSrcweir virtual void ResetClipRegion(); 384cdf0e10cSrcweir // start setting the clipregion consisting of nRects rectangles 385cdf0e10cSrcweir virtual void BeginSetClipRegion( sal_uLong nRects ); 386cdf0e10cSrcweir // add a rectangle to the clip region 387cdf0e10cSrcweir virtual void UnionClipRegion( long nX, long nY, long nWidth, long nHeight ); 388cdf0e10cSrcweir // done setting up the clipregion 389cdf0e10cSrcweir virtual void EndSetClipRegion(); 390cdf0e10cSrcweir 391cdf0e10cSrcweir static GtkSalFrame *getFromWindow( GtkWindow *pWindow ); 392cdf0e10cSrcweir }; 393cdf0e10cSrcweir 394cdf0e10cSrcweir 395cdf0e10cSrcweir #define OOO_TYPE_FIXED ooo_fixed_get_type() 396cdf0e10cSrcweir 397cdf0e10cSrcweir extern "C" { 398cdf0e10cSrcweir 399cdf0e10cSrcweir GType ooo_fixed_get_type( void ); 400cdf0e10cSrcweir 401cdf0e10cSrcweir } // extern "C" 402cdf0e10cSrcweir 403cdf0e10cSrcweir #endif //_VCL_GTKFRAME_HXX 404