ooo-build r11755 - trunk/patches/src680
- From: freuter svn gnome org
- To: svn-commits-list gnome org
- Subject: ooo-build r11755 - trunk/patches/src680
- Date: Fri, 29 Feb 2008 08:42:15 +0000 (GMT)
Author: freuter
Date: Fri Feb 29 08:42:15 2008
New Revision: 11755
URL: http://svn.gnome.org/viewvc/ooo-build?rev=11755&view=rev
Log:
patch to enable a team pane. not working yet...
Added:
trunk/patches/src680/sw-team-pane.diff
Added: trunk/patches/src680/sw-team-pane.diff
==============================================================================
--- (empty file)
+++ trunk/patches/src680/sw-team-pane.diff Fri Feb 29 08:42:15 2008
@@ -0,0 +1,1019 @@
+diff --git a/sfx2/inc/sfx2/sfxsids.hrc b/sfx2/inc/sfx2/sfxsids.hrc
+index dfc1f33..30888a8 100644
+--- sfx2/inc/sfx2/sfxsids.hrc
++++ sfx2/inc/sfx2/sfxsids.hrc
+@@ -1147,6 +1147,8 @@
+ #define SID_COMP_BIBLIOGRAPHY (SID_SVX_START + 880)
+ #define SID_ADDRESS_DATA_SOURCE (SID_SVX_START + 934)
+
++#define SID_TEAM (SID_SVX_START + 1888)
++
+ #define FID_SVX_START (SID_LIB_START + 500)
+ #define FID_SEARCH_NOW (FID_SVX_START + 2)
+
+diff --git a/sfx2/inc/sfx2/team.hxx b/sfx2/inc/sfx2/team.hxx
+new file mode 100644
+index 0000000..01bff2b
+--- /dev/null
++++ sfx2/inc/sfx2/team.hxx
+@@ -0,0 +1,40 @@
++/*
++ * written by Florian Reuter, (c) Novell Inc 2008
++ */
++
++#ifndef _SFXTEAM_HXX
++#define _SFXTEAM_HXX
++
++
++#include <sfx2/childwin.hxx>
++#include <sfx2/dockwin.hxx>
++
++class SfxTeamWrapper : public SfxChildWindow
++{
++
++public:
++ SfxTeamWrapper( Window* pParent ,
++ USHORT nId ,
++ SfxBindings* pBindings ,
++ SfxChildWinInfo* pInfo );
++
++ SFX_DECL_CHILDWINDOW(SfxTeamWrapper);
++};
++
++class SfxTeam : public SfxDockingWindow
++{
++ SfxChildWindow* pWrapper;
++
++public:
++ SfxTeam( SfxBindings* pBindings ,
++ SfxChildWindow* pChildWin ,
++ Window* pParent ,
++ WinBits nBits );
++
++ virtual void Resize();
++ virtual void Resizing( Size& rSize );
++ virtual BOOL Close();
++};
++
++#endif
++
+diff --git a/sfx2/sdi/frmslots.sdi b/sfx2/sdi/frmslots.sdi
+index 7fc8979..511833d 100644
+--- sfx2/sdi/frmslots.sdi
++++ sfx2/sdi/frmslots.sdi
+@@ -31,6 +31,11 @@ interface Window
+ ExecMethod = ChildWindowExecute ;
+ StateMethod = ChildWindowState ;
+ ]
++ SID_TEAM // status(final|play)
++ [
++ ExecMethod = ChildWindowExecute ;
++ StateMethod = ChildWindowState ;
++ ]
+ SID_SHOW_BROWSER // ole(no) api(final/play/rec)
+ [
+ ExecMethod = ChildWindowExecute ;
+diff --git a/sfx2/sdi/sfx.sdi b/sfx2/sdi/sfx.sdi
+index 77facb1..21b51d0 100644
+--- sfx2/sdi/sfx.sdi
++++ sfx2/sdi/sfx.sdi
+@@ -4406,6 +4406,32 @@ SfxBoolItem Navigator SID_NAVIGATOR
+ GroupId = GID_NAVIGATOR;
+ ]
+ //--------------------------------------------------------------------------
++SfxBoolItem Team SID_TEAM
++
++[
++ /* flags: */
++ AutoUpdate = TRUE,
++ Cachable = Cachable,
++ FastCall = FALSE,
++ HasCoreId = FALSE,
++ HasDialog = FALSE,
++ ReadOnlyDoc = TRUE,
++ Toggle = FALSE,
++ Container = FALSE,
++ RecordAbsolute = FALSE,
++ RecordPerSet;
++ Synchron;
++
++ Readonly = FALSE,
++
++ /* config: */
++ AccelConfig = TRUE,
++ MenuConfig = TRUE,
++ StatusBarConfig = FALSE,
++ ToolBoxConfig = TRUE,
++ GroupId = GID_NAVIGATOR;
++]
++//--------------------------------------------------------------------------
+ SfxVoidItem RestoreEditingView SID_RESTORE_EDITING_VIEW
+
+ [
+diff --git a/sfx2/source/appl/appreg.cxx b/sfx2/source/appl/appreg.cxx
+index 4bf7007..fcb7528 100644
+--- sfx2/source/appl/appreg.cxx
++++ sfx2/source/appl/appreg.cxx
+@@ -58,6 +58,7 @@
+ #include <sfx2/objsh.hxx>
+ #include <sfx2/viewsh.hxx>
+ #include <sfx2/objface.hxx>
++#include <sfx2/team.hxx>
+
+ //===================================================================
+
+@@ -76,7 +77,7 @@ void SfxApplication::Registrations_Impl()
+ SfxNavigatorWrapper::RegisterChildWindow( FALSE, NULL, SFX_CHILDWIN_NEVERHIDE );
+ SfxPartChildWnd_Impl::RegisterChildWindow();
+ SfxTemplateDialogWrapper::RegisterChildWindow();
+-
++ SfxTeamWrapper::RegisterChildWindow( FALSE, NULL, SFX_CHILDWIN_NEVERHIDE );
+ // Controller
+ SfxToolBoxControl::RegisterControl(SID_REPEAT);
+ SfxURLToolBoxControl_Impl::RegisterControl(SID_OPENURL);
+diff --git a/sfx2/source/dialog/makefile.mk b/sfx2/source/dialog/makefile.mk
+index 6884ec0..0b81c0d 100644
+--- sfx2/source/dialog/makefile.mk
++++ sfx2/source/dialog/makefile.mk
+@@ -69,6 +69,7 @@ SLOFILES =\
+ $(SLO)$/mailwindow.obj \
+ $(SLO)$/mgetempl.obj \
+ $(SLO)$/navigat.obj \
++ $(SLO)$/team.obj \
+ $(SLO)$/newstyle.obj \
+ $(SLO)$/passwd.obj \
+ $(SLO)$/printopt.obj \
+diff --git a/sfx2/source/dialog/team.cxx b/sfx2/source/dialog/team.cxx
+new file mode 100644
+index 0000000..e01d706
+--- /dev/null
++++ sfx2/source/dialog/team.cxx
+@@ -0,0 +1,77 @@
++/*
++ * written by Florian Reuter, (c) Novell Inc 2008
++ */
++
++// MARKER(update_precomp.py): autogen include statement, do not remove
++#include "precompiled_sfx2.hxx"
++
++#ifndef GCC
++#endif
++
++#include <sfx2/team.hxx>
++#include <sfx2/sfx.hrc>
++#include <sfx2/app.hxx>
++#include "sfxresid.hxx"
++#include "helpid.hrc"
++
++SFX_IMPL_DOCKINGWINDOW( SfxTeamWrapper , SID_TEAM );
++
++SfxTeamWrapper::SfxTeamWrapper( Window* pParentWnd ,
++ USHORT nId ,
++ SfxBindings* pBindings ,
++ SfxChildWinInfo* pInfo )
++ : SfxChildWindow( pParentWnd , nId )
++{
++ printf("SfxTeamWrapper::SfxTeamWrapper\n");
++ pWindow = new SfxTeam( pBindings, this, pParentWnd,
++ WB_STDDOCKWIN | WB_CLIPCHILDREN | WB_SIZEABLE | WB_3DLOOK | WB_ROLLABLE);
++ eChildAlignment = SFX_ALIGN_NOALIGNMENT;
++
++// pWindow->SetHelpId ( HID_NAVIGATOR_WINDOW );
++ pWindow->SetOutputSizePixel( Size( 270, 240 ) );
++
++ ( ( SfxDockingWindow* ) pWindow )->Initialize( pInfo );
++ SetHideNotDelete( TRUE );
++}
++
++
++SfxTeam::SfxTeam( SfxBindings* pBind ,
++ SfxChildWindow* pChildWin ,
++ Window* pParent ,
++ WinBits nBits )
++ : SfxDockingWindow( pBind ,
++ pChildWin ,
++ pParent ,
++ nBits )
++ , pWrapper( pChildWin )
++{
++// SetText( String( SfxResId( SID_NAVIGATOR ) ) );
++ SetText( String::CreateFromAscii("Team Window"));
++}
++
++void SfxTeam::Resize()
++{
++ SfxDockingWindow::Resize();
++ if ( pWrapper->GetContextWindow() )
++ pWrapper->GetContextWindow()->SetSizePixel( GetOutputSizePixel() );
++}
++
++void SfxTeam::Resizing( Size &rSize )
++{
++ SfxDockingWindow::Resizing( rSize );
++
++ SfxChildWindowContext *pCon = GetChildWindow_Impl()->GetContext_Impl();
++ DBG_ASSERT( pCon, "Kein Context!" );
++ if ( pCon )
++ pCon->Resizing( rSize );
++}
++
++BOOL SfxTeam::Close()
++{
++ SfxChildWindowContext *pCon = GetChildWindow_Impl()->GetContext_Impl();
++ DBG_ASSERT( pCon, "Kein Context!" );
++ if ( !pCon || pCon->Close() )
++ return SfxDockingWindow::Close();
++ else
++ return FALSE;
++}
+diff --git a/sw/source/ui/app/swmodule.cxx b/sw/source/ui/app/swmodule.cxx
+index af24186..bfeddb5 100644
+--- sw/source/ui/app/swmodule.cxx
++++ sw/source/ui/app/swmodule.cxx
+@@ -237,6 +237,7 @@
+ #ifndef _NAVIPI_HXX //autogen
+ #include <navipi.hxx>
+ #endif
++#include <teampi.hxx>
+ #ifndef _CHARTINS_HXX //autogen
+ #include <chartins.hxx>
+ #endif
+@@ -335,6 +336,7 @@ sal_Bool bNoInterrupt = sal_False;
+
+ #include <unomid.h>
+
++
+ using namespace com::sun::star;
+
+
+@@ -609,6 +611,7 @@ void SwDLL::RegisterControls()
+ SwFldDataOnlyDlgWrapper::RegisterChildWindow( sal_False, pMod );
+ SvxContourDlgChildWindow::RegisterChildWindow( sal_False, pMod );
+ SwNavigationChild::RegisterChildWindowContext( pMod );
++ SwTeamChild::RegisterChildWindowContext( pMod );
+ SwInputChild::RegisterChildWindow( sal_False, pMod, SFX_CHILDWIN_FORCEDOCK );
+ SwRedlineAcceptChild::RegisterChildWindow( sal_False, pMod );
+ SwSyncChildWin::RegisterChildWindow( sal_True, pMod );
+diff --git a/sw/source/ui/uiview/view0.cxx b/sw/source/ui/uiview/view0.cxx
+index 13160f7..e3063df 100644
+--- sw/source/ui/uiview/view0.cxx
++++ sw/source/ui/uiview/view0.cxx
+@@ -161,6 +161,7 @@ SFX_IMPL_VIEWFACTORY(SwView, SW_RES(STR_NONAME))
+ SFX_IMPL_INTERFACE( SwView, SfxViewShell, SW_RES(RID_TOOLS_TOOLBOX) )
+ {
+ SFX_CHILDWINDOW_CONTEXT_REGISTRATION(SID_NAVIGATOR);
++ SFX_CHILDWINDOW_CONTEXT_REGISTRATION(SID_TEAM);
+ SFX_CHILDWINDOW_REGISTRATION(SfxTemplateDialogWrapper::GetChildWindowId());
+ SFX_CHILDWINDOW_REGISTRATION(SvxSearchDialogWrapper::GetChildWindowId());
+ SFX_CHILDWINDOW_REGISTRATION(SwSpellDialogChildWindow::GetChildWindowId());
+diff --git a/sw/source/ui/uiview/view2.cxx b/sw/source/ui/uiview/view2.cxx
+index af8d645..320b9c8 100644
+--- sw/source/ui/uiview/view2.cxx
++++ sw/source/ui/uiview/view2.cxx
+@@ -1567,8 +1567,13 @@ void SwView::ExecuteStatusLine(SfxRequest &rReq)
+ {
+ case FN_STAT_PAGE:
+ {
++/*
+ GetViewFrame()->GetDispatcher()->Execute( SID_NAVIGATOR,
+ SFX_CALLMODE_SYNCHRON|SFX_CALLMODE_RECORD );
++*/
++ printf("Execute TEAM...\n");
++ GetViewFrame()->GetDispatcher()->Execute( SID_TEAM,
++ SFX_CALLMODE_SYNCHRON|SFX_CALLMODE_RECORD );
+ }
+ break;
+
+diff --git a/sw/source/ui/utlui/makefile.mk b/sw/source/ui/utlui/makefile.mk
+index 8faae2d..1e908de 100644
+--- sw/source/ui/utlui/makefile.mk
++++ sw/source/ui/utlui/makefile.mk
+@@ -69,6 +69,7 @@ SLOFILES = $(EXCEPTIONSFILES) \
+ $(SLO)$/glbltree.obj \
+ $(SLO)$/initui.obj \
+ $(SLO)$/navipi.obj \
++ $(SLO)$/teampi.obj \
+ $(SLO)$/navicfg.obj \
+ $(SLO)$/numfmtlb.obj \
+ $(SLO)$/prcntfld.obj \
+diff --git a/vcl/inc/vcl/salinst.hxx b/vcl/inc/vcl/salinst.hxx
+index b392ffa..9ae1276 100644
+--- vcl/inc/vcl/salinst.hxx
++++ vcl/inc/vcl/salinst.hxx
+@@ -110,6 +110,13 @@ public:
+ // Object (System Child Window)
+ virtual SalObject* CreateObject( SalFrame* pParent, SystemWindowData* pWindowData, BOOL bShow = TRUE ) = 0;
+ virtual void DestroyObject( SalObject* pObject ) = 0;
++
++ virtual SalObject* CreateSocket( SalFrame* pParent, BOOL bShow = TRUE) = 0;
++ virtual void DestroySocket( SalObject* pObject ) = 0;
++
++ virtual SalObject* CreateMozObject( SalFrame* pParent, BOOL bShow = TRUE) = 0;
++ virtual void DestroyMozObject( SalObject* pObject ) = 0;
++
+
+ // VirtualDevice
+ // nDX and nDY in Pixel
+diff --git a/vcl/inc/vcl/salobj.hxx b/vcl/inc/vcl/salobj.hxx
+index 72bf898..a924b4a 100644
+--- vcl/inc/vcl/salobj.hxx
++++ vcl/inc/vcl/salobj.hxx
+@@ -84,6 +84,7 @@ public:
+ virtual void Show( BOOL bVisible ) = 0;
+ virtual void Enable( BOOL nEnable ) = 0;
+ virtual void GrabFocus() = 0;
++ virtual void RemoveFocus() = 0;
+
+ virtual void SetBackground() = 0;
+ virtual void SetBackground( SalColor nSalColor ) = 0;
+@@ -92,6 +93,8 @@ public:
+
+ virtual const SystemEnvData* GetSystemData() const = 0;
+
++ virtual void LoadUrl(char *url) = 0;
++
+ void SetCallback( void* pInst, SALOBJECTPROC pProc )
+ { m_pInst = pInst; m_pCallback = pProc; }
+ long CallCallback( USHORT nEvent, const void* pEvent )
+diff --git a/vcl/inc/vcl/syschildctrl.hxx b/vcl/inc/vcl/syschildctrl.hxx
+new file mode 100644
+index 0000000..0125472
+--- /dev/null
++++ vcl/inc/vcl/syschildctrl.hxx
+@@ -0,0 +1,53 @@
++/*
++ * written by Florian Reuter, (c) Novell Inc 2008
++ */
++#ifndef _SV_SYSCHILDCTRL_HXX
++#define _SV_SYSCHILDCTRL_HXX
++
++#ifndef _SV_SV_H
++#include <vcl/sv.h>
++#endif
++#ifndef _VCL_DLLAPI_H
++#include <vcl/dllapi.h>
++#endif
++
++#ifndef _SV_WINDOW_HXX
++#include <vcl/window.hxx>
++#endif
++
++#include <vcl/ctrl.hxx>
++
++
++struct SystemEnvData;
++struct SystemWindowData;
++
++class VCL_DLLPUBLIC SystemChildControl : public Control
++{
++using Control::ImplInit;
++private:
++ // Copy assignment is forbidden and not implemented.
++ SAL_DLLPRIVATE SystemChildControl (const SystemChildControl &);
++ SAL_DLLPRIVATE SystemChildControl & operator= (const SystemChildControl &);
++
++ SAL_DLLPRIVATE void ImplInitSysChildCtrl( Window* pParent, WinBits nStyle, SystemWindowData *pData, BOOL bShow = TRUE );
++
++public:
++ SystemChildControl(Window* pParent, WinBits nStyle = 0);
++ ~SystemChildControl();
++
++ virtual void GetFocus();
++ virtual void LoseFocus();
++ virtual long Notify( NotifyEvent& rNEvt );
++
++ virtual void MouseButtonDown( const MouseEvent& rMEvt );
++ virtual void MouseButtonUp( const MouseEvent& rMEvt );
++ virtual void KeyInput( const KeyEvent& rKEvt );
++
++static void send_focus_change_message(
++ SystemChildControl* pWindow,
++ int mode, int detail );
++ void load_url(char *url);
++};
++
++
++#endif
+diff --git a/vcl/inc/vcl/window.hxx b/vcl/inc/vcl/window.hxx
+index a9390b0..ece5079 100644
+--- vcl/inc/vcl/window.hxx
++++ vcl/inc/vcl/window.hxx
+@@ -392,6 +392,7 @@ class VCL_DLLPUBLIC Window : public OutputDevice
+ friend class PushButton;
+ friend class RadioButton;
+ friend class SystemChildWindow;
++ friend class SystemChildControl;
+ friend class ImplBorderWindow;
+
+ // TODO: improve missing functionality
+diff --git a/vcl/inc/vcl/wintypes.hxx b/vcl/inc/vcl/wintypes.hxx
+index 9d4d3eb..f1f8244 100644
+--- vcl/inc/vcl/wintypes.hxx
++++ vcl/inc/vcl/wintypes.hxx
+@@ -129,7 +129,8 @@ typedef USHORT WindowType;
+ #define WINDOW_INTROWINDOW (WINDOW_FIRST + 0x4f)
+ #define WINDOW_LISTBOXWINDOW (WINDOW_FIRST + 0x50)
+ #define WINDOW_DOCKINGAREA (WINDOW_FIRST + 0x51)
+-#define WINDOW_LAST (WINDOW_DOCKINGAREA)
++#define WINDOW_SYSTEMCHILDCTRL (WINDOW_FIRST + 0x52)
++#define WINDOW_LAST (WINDOW_SYSTEMCHILDCTRL)
+
+
+ // ---------------
+diff --git a/vcl/prj/d.lst b/vcl/prj/d.lst
+index d6cb440..8f04d86 100644
+--- vcl/prj/d.lst
++++ vcl/prj/d.lst
+@@ -114,6 +114,7 @@ mkdir: %_DEST%\inc%_EXT%\vcl\plug\vcl
+ ..\inc\vcl\svapp.hxx %_DEST%\inc%_EXT%\vcl\svapp.hxx
+ ..\inc\vcl\symbol.hxx %_DEST%\inc%_EXT%\vcl\symbol.hxx
+ ..\inc\vcl\syschild.hxx %_DEST%\inc%_EXT%\vcl\syschild.hxx
++..\inc\vcl\syschildctrl.hxx %_DEST%\inc%_EXT%\vcl\syschildctrl.hxx
+ ..\inc\vcl\sysdata.hxx %_DEST%\inc%_EXT%\vcl\sysdata.hxx
+ ..\inc\vcl\syswin.hxx %_DEST%\inc%_EXT%\vcl\syswin.hxx
+ ..\inc\vcl\tabctrl.hxx %_DEST%\inc%_EXT%\vcl\tabctrl.hxx
+diff --git a/vcl/source/window/makefile.mk b/vcl/source/window/makefile.mk
+index d8fa88f..68769b6 100644
+--- vcl/source/window/makefile.mk
++++ vcl/source/window/makefile.mk
+@@ -78,6 +78,7 @@ SLOFILES= \
+ $(SLO)$/splitwin.obj \
+ $(SLO)$/status.obj \
+ $(SLO)$/syschild.obj \
++ $(SLO)$/syschildctrl.obj \
+ $(SLO)$/javachild.obj \
+ $(SLO)$/syswin.obj \
+ $(SLO)$/tabdlg.obj \
+diff --git a/vcl/source/window/syschildctrl.cxx b/vcl/source/window/syschildctrl.cxx
+new file mode 100644
+index 0000000..b3a3027
+--- /dev/null
++++ vcl/source/window/syschildctrl.cxx
+@@ -0,0 +1,194 @@
++/*
++ * written by Florian Reuter, (c) Novell Inc 2008
++ */
++// MARKER(update_precomp.py): autogen include statement, do not remove
++#include "precompiled_vcl.hxx"
++
++#ifndef _SV_SVSYS_HXX
++#include <svsys.h>
++#endif
++#ifndef _SV_SALINST_HXX
++#include <vcl/salinst.hxx>
++#endif
++#ifndef _SV_SALFRAME_HXX
++#include <vcl/salframe.hxx>
++#endif
++#include <vcl/window.hxx>
++#ifndef _SV_SALOBJ_HXX
++#include <vcl/salobj.hxx>
++#endif
++
++#ifndef _SV_RC_H
++#include <tools/rc.h>
++#endif
++#ifndef _SV_SVDATA_HXX
++#include <vcl/svdata.hxx>
++#endif
++#ifndef _SV_WIDNOW_H
++#include <vcl/window.h>
++#endif
++#ifndef _SV_SVAPP_HXX
++#include <vcl/svapp.hxx>
++#endif
++#include <vcl/syschildctrl.hxx>
++
++#include <stdio.h>
++
++#if 0
++void SystemChildControl::send_focus_change_message(
++ SystemChildControl* pWindow,
++ int mode, int detail )
++{
++ XFocusChangeEvent ev;
++ memset(&ev, 0, sizeof(ev));
++ ev.type=FocusOut;
++ ev.display = (_XDisplay*)pWindow->GetSystemData()->pDisplay;
++ ev.window = pWindow->GetSystemData()->aWindow;
++ ev.send_event = true;
++ ev.mode = mode;
++ ev.detail = detail;
++
++ trap_errors();
++ XSendEvent(ev.display, pWindow->GetSystemData()->aWindow, False, NoEventMask, (XEvent*)&ev);
++ XSync(ev.display, False);
++ if (untrap_errors()) {
++ // Handle failure
++ }
++}
++#endif
++
++long ImplSysChildCtrlProc( void* pInst, SalObject* /* pObject */,
++ USHORT nEvent, const void* /* pEvent */ )
++{
++ printf("syschildctrl::ImplSysChildCtrlProc\n");
++ SystemChildControl* pWindow = (SystemChildControl*)pInst;
++ long nRet = 0;
++
++ switch ( nEvent )
++ {
++ case SALOBJ_EVENT_GETFOCUS:
++// SystemChildWindow::__GrapFocus(pWindow);
++ printf("SALOBJ_EVENT_GETFOCUS\n");
++ pWindow->GrabFocus();
++ break;
++
++ case SALOBJ_EVENT_LOSEFOCUS:
++ printf("SALOBJ_EVENT_LOSEFOCUS\n");
++// SystemChildWindow::__LoseFocus(pWindow);
++ break;
++
++ case SALOBJ_EVENT_TOTOP:
++ printf("SALOBJ_EVENT_TOTOP\n");
++// SystemChildWindow::__ToTop(pWindow);
++ break;
++ }
++
++ return nRet;
++}
++
++
++void SystemChildControl::ImplInitSysChildCtrl( Window* pParent, WinBits nStyle, SystemWindowData *pData, BOOL bShow )
++{
++ mpWindowImpl->mpSysObj = ImplGetSVData()->mpDefInst->CreateSocket( pParent->ImplGetFrame(), bShow );
++ Control::ImplInit( pParent, nStyle, NULL );
++
++ if ( GetSystemData() )
++ {
++ mpWindowImpl->mpSysObj->SetCallback( this, ImplSysChildCtrlProc );
++ SetParentClipMode( PARENTCLIPMODE_CLIP );
++ SetBackground();
++ }
++
++}
++
++
++SystemChildControl::SystemChildControl( Window* pParent, WinBits nStyle ) : Control( WINDOW_SYSTEMCHILDCTRL )
++{
++ ImplInitSysChildCtrl( pParent, nStyle, NULL );
++ EnableInput();
++}
++
++SystemChildControl::~SystemChildControl()
++{
++ Hide();
++ if ( mpWindowImpl->mpSysObj )
++ {
++ ImplGetSVData()->mpDefInst->DestroySocket( mpWindowImpl->mpSysObj );
++ mpWindowImpl->mpSysObj = NULL;
++ }
++}
++
++void SystemChildControl::GetFocus()
++{
++ Control::GetFocus();
++}
++
++void SystemChildControl::LoseFocus()
++{
++ printf("SystemChildControl::LoseFocus()\n");
++/*
++ GtkSalObject *pGtkSalObject = (GtkSalObject *)mpWindowImpl->mpSysObj;
++ GtkSocket *socket=GTK_SOCKET(pGtkSalObject->GetSystemData()->pWidget);
++ printf("socket=%p\n", socket);
++ gtk_container_set_focus_child (GTK_CONTAINER (socket), NULL);
++ GtkFixed *fixed=GTK_FIXED(GTK_WIDGET(socket)->parent);
++ printf("fixed=%p\n", fixed);
++ gtk_container_set_focus_child (GTK_CONTAINER (fixed), NULL);
++ gtk_window_set_focus(GTK_WINDOW(gtk_widget_get_toplevel (GTK_WIDGET(socket))), NULL);
++*/
++ SalObject *pSalObject = mpWindowImpl->mpSysObj;
++ if (pSalObject) {
++ pSalObject->RemoveFocus();
++ }
++/*
++ GtkWidget *socket=GTK_WIDGET(pGtkSalObject->GetSystemData()->pWidget);
++ if (GTK_IS_CONTAINER(socket)) {
++ gtk_container_set_focus_child (GTK_CONTAINER (socket), NULL);
++ }
++ GtkContainer *fixed=GTK_CONTAINER(GTK_WIDGET(socket)->parent);
++ gtk_container_set_focus_child (fixed, NULL);
++ gtk_window_set_focus(GTK_WINDOW(gtk_widget_get_toplevel (GTK_WIDGET(socket))), NULL);
++*/
++ Control::LoseFocus();
++}
++
++long SystemChildControl::Notify( NotifyEvent& rNEvt )
++{
++ return Control::Notify(rNEvt);
++}
++
++void SystemChildControl::MouseButtonDown( const MouseEvent& rMEvt )
++{
++// GtkWidget *socket=GTK_WIDGET(GetSystemData()->pWidget);
++// GrabFocus();
++// gtk_widget_grab_focus(socket);
++// gtk_widget_set_sensitive(socket, 0);
++// g_signal_emit_by_name(socket, "focus-out-event"
++// printf("**** SystemChildControl::send_focus_change_message ***\n");
++// SystemChildControl::send_focus_change_message(this, NotifyUngrab, NotifyDetailNone);
++
++
++// printf("SystemChildControl::MouseButtonDown focus=%i\n", gtk_widget_is_focus(socket));
++ Control::MouseButtonDown(rMEvt);
++}
++
++void SystemChildControl::MouseButtonUp( const MouseEvent& rMEvt )
++{
++ printf("SystemChildControl::MouseButtonUp\n");
++ Control::MouseButtonUp(rMEvt);
++}
++
++void SystemChildControl::KeyInput( const KeyEvent& rKEvt )
++{
++ printf("SystemChildControl::KeyInput\n");
++}
++
++
++void SystemChildControl::load_url(char *url)
++{
++ printf("+++ SystemChildControl::LOAD..\n");
++
++ SalObject *pGtkSalObject = mpWindowImpl->mpSysObj;
++ pGtkSalObject->LoadUrl(url);
++}
++
+diff --git a/vcl/unx/gtk/app/gtkinst.cxx b/vcl/unx/gtk/app/gtkinst.cxx
+index f5383a0..41326fc 100644
+--- vcl/unx/gtk/app/gtkinst.cxx
++++ vcl/unx/gtk/app/gtkinst.cxx
+@@ -226,6 +226,27 @@ SalObject* GtkInstance::CreateObject( SalFrame* pParent, SystemWindowData* pWind
+ return new GtkSalObject( static_cast<GtkSalFrame*>(pParent), bShow );
+ }
+
++
++SalObject* GtkInstance::CreateSocket( SalFrame* pParent, BOOL bShow )
++{
++ return new GtkSalObject( static_cast<GtkSalFrame*>(pParent), bShow );
++}
++
++void GtkInstance::DestroySocket( SalObject* pObject )
++{
++ delete pObject;
++}
++
++SalObject* GtkInstance::CreateMozObject( SalFrame* pParent, BOOL bShow )
++{
++ return new GtkSalObject( static_cast<GtkSalFrame*>(pParent), bShow );
++}
++
++void GtkInstance::DestroyMozObject( SalObject* pObject )
++{
++ delete pObject;
++}
++
+ GtkYieldMutex::GtkYieldMutex()
+ {
+ }
+diff --git a/vcl/unx/gtk/window/gtkobject.cxx b/vcl/unx/gtk/window/gtkobject.cxx
+index 1f1d7b5..da8fe96 100644
+--- vcl/unx/gtk/window/gtkobject.cxx
++++ vcl/unx/gtk/window/gtkobject.cxx
+@@ -41,6 +41,9 @@
+ #include <plugins/gtk/gtkdata.hxx>
+ #include <plugins/gtk/gtkinst.hxx>
+
++#include <gtkembedmoz/gtkmozembed.h>
++
++
+ GtkSalObject::GtkSalObject( GtkSalFrame* pParent, BOOL bShow )
+ : m_pSocket( NULL ),
+ m_pRegion( NULL )
+@@ -224,3 +227,29 @@ void GtkSalObject::SetForwardKey( BOOL bEnable )
+ else
+ gtk_widget_set_events( GTK_WIDGET( m_pSocket ), ~(GDK_KEY_PRESS_MASK | GDK_KEY_RELEASE) & gtk_widget_get_events( GTK_WIDGET( m_pSocket ) ) );
+ }
++
++
++void GtkSalObject::RemoveFocus()
++{
++ GtkSalObject *pGtkSalObject = this;
++ GtkWidget *socket=GTK_WIDGET(pGtkSalObject->GetSystemData()->pWidget);
++ if (GTK_IS_CONTAINER(socket)) {
++ gtk_container_set_focus_child (GTK_CONTAINER (socket), NULL);
++ }
++ GtkContainer *fixed=GTK_CONTAINER(GTK_WIDGET(socket)->parent);
++ gtk_container_set_focus_child (fixed, NULL);
++ gtk_window_set_focus(GTK_WINDOW(gtk_widget_get_toplevel (GTK_WIDGET(socket))), NULL);
++}
++
++
++void GtkSalObject::LoadUrl(char *url)
++{
++ GTK_YIELD_GRAB();
++ GtkMozEmbed *embed=GTK_MOZ_EMBED(m_pSocket);
++ gtk_widget_show(GTK_WIDGET(embed));
++ printf("%p GTK_IS_MOZ_EMBED(embed)=%i GTK_WIDGET_REALIZED(embed)=%i\n", embed, GTK_IS_MOZ_EMBED(embed), GTK_WIDGET_REALIZED(embed));
++// gtk_moz_embed_load_url(embed, "http://137.65.132.22:8080/user/florian/1");
++ gtk_moz_embed_load_url(embed, "http://www.google.de");
++ gtk_widget_show(GTK_WIDGET(embed));
++
++}
+diff --git a/vcl/unx/gtk/window/makefile.mk b/vcl/unx/gtk/window/makefile.mk
+index 01e4fff..f84f2f9 100644
+--- vcl/unx/gtk/window/makefile.mk
++++ vcl/unx/gtk/window/makefile.mk
+@@ -65,6 +65,9 @@ PKGCONFIG_MODULES+= dbus-glib-1
+ .ENDIF
+ .INCLUDE : pkg_config.mk
+
++CFLAGS+=-I/usr/include/xulrunner-1.8.0.1
++
++
+ .IF "$(COM)" == "C52"
+ NOOPTFILES=$(SLO)$/gtkframe.obj
+ .ENDIF
+diff --git a/vcl/unx/headless/svpdummies.cxx b/vcl/unx/headless/svpdummies.cxx
+index 2b66731..ccec2cb 100644
+--- vcl/unx/headless/svpdummies.cxx
++++ vcl/unx/headless/svpdummies.cxx
+@@ -75,9 +75,11 @@ void SvpSalObject::SetPosSize( long, long, long, long ) {}
+ void SvpSalObject::Show( BOOL ) {}
+ void SvpSalObject::Enable( BOOL ) {}
+ void SvpSalObject::GrabFocus() {}
++void SvpSalObject::RemoveFocus() {}
+ void SvpSalObject::SetBackground() {}
+ void SvpSalObject::SetBackground( SalColor ) {}
+ const SystemEnvData* SvpSalObject::GetSystemData() const { return &m_aSystemChildData; }
++void SvpSalObject::LoadUrl(char *url) {}
+
+ // SalI18NImeStatus
+ SvpImeStatus::~SvpImeStatus() {}
+diff --git a/vcl/unx/headless/svpdummies.hxx b/vcl/unx/headless/svpdummies.hxx
+index 929de79..1f49eab 100644
+--- vcl/unx/headless/svpdummies.hxx
++++ vcl/unx/headless/svpdummies.hxx
+@@ -77,11 +77,12 @@ public:
+ virtual void Show( BOOL bVisible );
+ virtual void Enable( BOOL nEnable );
+ virtual void GrabFocus();
+-
++ virtual void RemoveFocus();
+ virtual void SetBackground();
+ virtual void SetBackground( SalColor nSalColor );
+
+ virtual const SystemEnvData* GetSystemData() const;
++ virtual void LoadUrl(char *url);
+ };
+
+ class SvpImeStatus : public SalI18NImeStatus
+diff --git a/vcl/unx/headless/svpinst.cxx b/vcl/unx/headless/svpinst.cxx
+index fdf743c..184d68e 100644
+--- vcl/unx/headless/svpinst.cxx
++++ vcl/unx/headless/svpinst.cxx
+@@ -255,6 +255,27 @@ void SvpSalInstance::DestroyObject( SalObject* pObject )
+ delete pObject;
+ }
+
++SalObject* SvpSalInstance::CreateSocket( SalFrame*, BOOL )
++{
++ return new SvpSalObject();
++}
++
++void SvpSalInstance::DestroySocket( SalObject* pObject )
++{
++ delete pObject;
++}
++
++SalObject* SvpSalInstance::CreateMozObject( SalFrame*, BOOL )
++{
++ return new SvpSalObject();
++}
++
++void SvpSalInstance::DestroyMozObject( SalObject* pObject )
++{
++ delete pObject;
++}
++
++
+ SalVirtualDevice* SvpSalInstance::CreateVirtualDevice( SalGraphics*,
+ long nDX, long nDY,
+ USHORT nBitCount, const SystemGraphicsData* )
+diff --git a/vcl/unx/headless/svpinst.hxx b/vcl/unx/headless/svpinst.hxx
+index 58569f1..634841f 100644
+--- vcl/unx/headless/svpinst.hxx
++++ vcl/unx/headless/svpinst.hxx
+@@ -142,6 +142,14 @@ public:
+ virtual SalObject* CreateObject( SalFrame* pParent, SystemWindowData* pWindowData, BOOL bShow = TRUE );
+ virtual void DestroyObject( SalObject* pObject );
+
++ virtual SalObject* CreateSocket( SalFrame* pParent, BOOL bShow = TRUE);
++ virtual void DestroySocket( SalObject* pObject );
++
++ virtual SalObject* CreateMozObject( SalFrame* pParent, BOOL bShow = TRUE);
++ virtual void DestroyMozObject( SalObject* pObject );
++
++
++
+ // VirtualDevice
+ // nDX and nDY in Pixel
+ // nBitCount: 0 == Default(=as window) / 1 == Mono
+diff --git a/vcl/unx/inc/plugins/gtk/gtkinst.hxx b/vcl/unx/inc/plugins/gtk/gtkinst.hxx
+index 2874611..c3e7c24 100644
+--- vcl/unx/inc/plugins/gtk/gtkinst.hxx
++++ vcl/unx/inc/plugins/gtk/gtkinst.hxx
+@@ -96,6 +96,12 @@ public:
+ virtual SalFrame* CreateChildFrame( SystemParentData* pParent, ULONG nStyle );
+ virtual SalObject* CreateObject( SalFrame* pParent, SystemWindowData* pWindowData, BOOL bShow = TRUE );
+ virtual SalSystem* CreateSalSystem();
++
++ virtual SalObject* CreateSocket( SalFrame* pParent, BOOL bShow = TRUE);
++ virtual void DestroySocket( SalObject* pObject );
++
++ virtual SalObject* CreateMozObject( SalFrame* pParent, BOOL bShow = TRUE);
++ virtual void DestroyMozObject( SalObject* pObject );
+ };
+
+ class GtkSalSystem : public X11SalSystem
+diff --git a/vcl/unx/inc/plugins/gtk/gtkobject.hxx b/vcl/unx/inc/plugins/gtk/gtkobject.hxx
+index 5ce3237..f4c90f9 100644
+--- vcl/unx/inc/plugins/gtk/gtkobject.hxx
++++ vcl/unx/inc/plugins/gtk/gtkobject.hxx
+@@ -74,6 +74,7 @@ public:
+ virtual void Show( BOOL bVisible );
+ virtual void Enable( BOOL nEnable );
+ virtual void GrabFocus();
++ virtual void RemoveFocus();
+
+ virtual void SetBackground();
+ virtual void SetBackground( SalColor nSalColor );
+@@ -81,7 +82,8 @@ public:
+ virtual void SetForwardKey( BOOL bEnable );
+
+ virtual const SystemEnvData* GetSystemData() const;
+-
++
++ virtual void LoadUrl(char *url);
+ };
+
+ #endif // _SV_SALOBJ_H
+diff --git a/vcl/unx/inc/plugins/kde/kdedata.hxx b/vcl/unx/inc/plugins/kde/kdedata.hxx
+index ec252c5..6cedbd9 100644
+--- vcl/unx/inc/plugins/kde/kdedata.hxx
++++ vcl/unx/inc/plugins/kde/kdedata.hxx
+@@ -92,6 +92,12 @@ public:
+ : X11SalInstance( pMutex ) {}
+ virtual ~KDESalInstance() {}
+ virtual SalFrame* CreateFrame( SalFrame* pParent, ULONG nStyle );
++
++ virtual SalObject* CreateSocket( SalFrame* pParent, BOOL bShow = TRUE);
++ virtual void DestroySocket( SalObject* pObject );
++
++ virtual SalObject* CreateMozObject( SalFrame* pParent, BOOL bShow = TRUE);
++ virtual void DestroyMozObject( SalObject* pObject );
+ };
+
+ class KDEXLib : public SalXLib
+diff --git a/vcl/unx/inc/salinst.h b/vcl/unx/inc/salinst.h
+index 0823a3d..dc5ae34 100644
+--- vcl/unx/inc/salinst.h
++++ vcl/unx/inc/salinst.h
+@@ -92,6 +92,13 @@ public:
+ virtual SalObject* CreateObject( SalFrame* pParent, SystemWindowData* pWindowData, BOOL bShow = TRUE );
+ virtual void DestroyObject( SalObject* pObject );
+
++ virtual SalObject* CreateSocket( SalFrame* pParent, BOOL bShow = TRUE);
++ virtual void DestroySocket( SalObject* pObject );
++
++ virtual SalObject* CreateMozObject( SalFrame* pParent, BOOL bShow = TRUE);
++ virtual void DestroyMozObject( SalObject* pObject );
++
++
+ virtual SalVirtualDevice* CreateVirtualDevice( SalGraphics* pGraphics,
+ long nDX, long nDY,
+ USHORT nBitCount, const SystemGraphicsData *pData = NULL );
+diff --git a/vcl/unx/inc/salobj.h b/vcl/unx/inc/salobj.h
+index 131824b..6edf0ef 100644
+--- vcl/unx/inc/salobj.h
++++ vcl/unx/inc/salobj.h
+@@ -109,12 +109,13 @@ public:
+ virtual void Show( BOOL bVisible );
+ virtual void Enable( BOOL nEnable );
+ virtual void GrabFocus();
+-
++ virtual void RemoveFocus();
+ virtual void SetBackground();
+ virtual void SetBackground( SalColor nSalColor );
+
+ virtual const SystemEnvData* GetSystemData() const;
+-
++ virtual void LoadUrl(char *url);
++
+ };
+
+ #endif // _SV_SALOBJ_H
+diff --git a/vcl/unx/kde/salnativewidgets-kde.cxx b/vcl/unx/kde/salnativewidgets-kde.cxx
+index b6b800f..138ac65 100644
+--- vcl/unx/kde/salnativewidgets-kde.cxx
++++ vcl/unx/kde/salnativewidgets-kde.cxx
+@@ -2090,6 +2090,26 @@ KDESalInstance::CreateFrame( SalFrame *pParent, ULONG nStyle )
+ return new KDESalFrame( pParent, nStyle );
+ }
+
++
++SalObject* KDESalInstance::CreateSocket( SalFrame* pParent, BOOL bShow)
++{
++ return NULL; //@TODO implement...
++}
++
++void KDESalInstance::DestroySocket( SalObject* pObject )
++{
++}
++
++SalObject* KDESalInstance::CreateMozObject( SalFrame* pParent, BOOL bShow)
++{
++ return NULL; //@TODO implement...
++}
++
++void KDESalInstance::DestroyMozObject( SalObject* pObject )
++{
++}
++
++
+ // -----------------------------------------------------------------------
+ // KDESalData pieces
+ // -----------------------------------------------------------------------
+diff --git a/vcl/unx/source/window/salobj.cxx b/vcl/unx/source/window/salobj.cxx
+index 3c7c9c8..f306544 100644
+--- vcl/unx/source/window/salobj.cxx
++++ vcl/unx/source/window/salobj.cxx
+@@ -215,6 +215,24 @@ void X11SalInstance::DestroyObject( SalObject* pObject )
+ delete pObject;
+ }
+
++SalObject* X11SalInstance::CreateSocket( SalFrame* pParent, BOOL bShow)
++{
++ return NULL;
++}
++
++void X11SalInstance::DestroySocket( SalObject* pObject )
++{
++}
++
++SalObject* X11SalInstance::CreateMozObject( SalFrame* pParent, BOOL bShow)
++{
++ return NULL;
++}
++
++void X11SalInstance::DestroyMozObject( SalObject* pObject )
++{
++}
++
+
+ // ======================================================================
+ // SalClipRegion is a member of SalObject
+@@ -576,3 +594,11 @@ long X11SalObject::Dispatch( XEvent* pEvent )
+ }
+ return 0;
+ }
++
++void X11SalObject::RemoveFocus()
++{
++}
++
++void X11SalObject::LoadUrl(char *url)
++{
++}
+diff --git a/vcl/util/makefile.mk b/vcl/util/makefile.mk
+index 512e9c4..7037080 100644
+--- vcl/util/makefile.mk
++++ vcl/util/makefile.mk
+@@ -206,6 +206,10 @@ SHL1OBJS= $(SLO)$/salshl.obj
+ SHL1RES= $(RES)$/salsrc.res
+ .ENDIF
+
++#LDFLAGS+=-L/usr/lib/xulrunner-1.8.0.1
++#SHL1STDLIBS+=-lgtkembedmoz
++
++
+ SHL1DEF= $(MISC)$/$(SHL1TARGET).def
+
+ DEF1NAME =$(SHL1TARGET)
+@@ -314,7 +318,7 @@ SHL2STDLIBS+= -ldl
+
+ # gtk plugin
+ .IF "$(ENABLE_GTK)" != ""
+-PKGCONFIG_MODULES=gtk+-2.0 gthread-2.0
++PKGCONFIG_MODULES=gtk+-2.0 gthread-2.0 xulrunner-gtkmozembed
+ .IF "$(ENABLE_DBUS)" != ""
+ PKGCONFIG_MODULES+= dbus-glib-1
+ .ENDIF
+@@ -333,6 +337,7 @@ SHL4LIBS=$(LIB4TARGET)
+ SHL4DEPN=$(SHL1IMPLIBN) $(SHL1TARGETN) $(SHL2IMPLIBN) $(SHL2TARGETN)
+ # libs for gtk plugin
+ SHL4STDLIBS+=$(PKGCONFIG_LIBS:s/ -lpangoxft-1.0//)
++#SHL4STDLIBS+=-lgtkembedmoz
+ # hack for faked SO environment
+ .IF "$(PKGCONFIG_ROOT)"!=""
+ SHL4SONAME+=-z nodefs
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]