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