ooo-build r11796 - trunk/patches/src680



Author: freuter
Date: Tue Mar  4 11:05:02 2008
New Revision: 11796
URL: http://svn.gnome.org/viewvc/ooo-build?rev=11796&view=rev

Log:
focus handling done... but still no API...


Modified:
   trunk/patches/src680/sw-team-pane.diff

Modified: trunk/patches/src680/sw-team-pane.diff
==============================================================================
--- trunk/patches/src680/sw-team-pane.diff	(original)
+++ trunk/patches/src680/sw-team-pane.diff	Tue Mar  4 11:05:02 2008
@@ -145,10 +145,10 @@
  		$(SLO)$/printopt.obj		\
 diff --git a/sfx2/source/dialog/team.cxx b/sfx2/source/dialog/team.cxx
 new file mode 100644
-index 0000000..e01d706
+index 0000000..a27df16
 --- /dev/null
 +++ sfx2/source/dialog/team.cxx
-@@ -0,0 +1,77 @@
+@@ -0,0 +1,79 @@
 +/*
 + * written by Florian Reuter, (c) Novell Inc 2008
 + */
@@ -176,7 +176,9 @@
 +    printf("SfxTeamWrapper::SfxTeamWrapper\n");
 +    pWindow = new SfxTeam( pBindings, this, pParentWnd,
 +			   WB_STDDOCKWIN | WB_CLIPCHILDREN | WB_SIZEABLE | WB_3DLOOK | WB_ROLLABLE);
-+    eChildAlignment = SFX_ALIGN_NOALIGNMENT;
++//    eChildAlignment = SFX_ALIGN_NOALIGNMENT;
++    eChildAlignment = SFX_ALIGN_RIGHT;
++    printf("**ALIGN RIGHT**\n");
 +    
 +//    pWindow->SetHelpId ( HID_NAVIGATOR_WINDOW );
 +    pWindow->SetOutputSizePixel( Size( 270, 240 ) );
@@ -377,7 +379,7 @@
  		$(SLO)$/prcntfld.obj \
 diff --git a/sw/source/ui/utlui/teampi.cxx b/sw/source/ui/utlui/teampi.cxx
 new file mode 100644
-index 0000000..fc991bb
+index 0000000..7090cfd
 --- /dev/null
 +++ sw/source/ui/utlui/teampi.cxx
 @@ -0,0 +1,272 @@
@@ -488,14 +490,14 @@
 +IMPL_LINK( SwTeamPI, MyClickHandler, OKButton*, EMPTYARG )
 +{
 +    printf("### CLICK\n");
-+aJavaWindow.load_url("http://www.google.com";);    
++aJavaWindow.LoadUrl("http://www.google.com";);    
 +  return 0;
 +}
 +
 +IMPL_LINK( SwTeamPI, MyListBoxHandler, ListBox *, pBox )
 +{
 +    printf("### DROP DOWN SELECT...\n");
-+    aJavaWindow.load_url("http://www.google.com";);
++    aJavaWindow.LoadUrl("http://www.google.com";);
 +    return 0;
 +}
 +
@@ -508,7 +510,7 @@
 +    SfxControllerItem( SID_DOCFULLNAME, *_pBindings ),
 +//    aOKButton       ( this ),
 +    aEdit       ( this, WB_DROPDOWN ),
-+    aJavaWindow ( this, SystemChildControl::BROWSER )
++    aJavaWindow ( this, SystemChildControl::SOCKET )
 +//    aJavaWindow2 ( this )    
 +{
 +    printf("SwTeamPI::SwTeamPI\n");
@@ -672,7 +674,7 @@
      // VirtualDevice
      // nDX and nDY in Pixel
 diff --git a/vcl/inc/vcl/salobj.hxx b/vcl/inc/vcl/salobj.hxx
-index 72bf898..a924b4a 100644
+index 72bf898..421c37c 100644
 --- vcl/inc/vcl/salobj.hxx
 +++ vcl/inc/vcl/salobj.hxx
 @@ -84,6 +84,7 @@ public:
@@ -683,21 +685,22 @@
  
  	virtual void					SetBackground() = 0;
  	virtual void					SetBackground( SalColor nSalColor ) = 0;
-@@ -92,6 +93,8 @@ public:
+@@ -92,6 +93,9 @@ public:
  
  	virtual const SystemEnvData*	GetSystemData() const = 0;
  
 +        virtual void LoadUrl(char *url) = 0;
++        virtual sal_uInt32 GetSocketId() = 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..e09198f
+index 0000000..d056ead
 --- /dev/null
 +++ vcl/inc/vcl/syschildctrl.hxx
-@@ -0,0 +1,57 @@
+@@ -0,0 +1,58 @@
 +/*
 + * written by Florian Reuter, (c) Novell Inc 2008
 + */
@@ -751,7 +754,8 @@
 +static void send_focus_change_message(
 +    SystemChildControl* pWindow,
 +    int mode, int detail );    
-+    void load_url(char *url);
++    void LoadUrl(char *url);
++    sal_uInt32 GetSocketId();
 +};
 +
 +#endif
@@ -807,10 +811,10 @@
  			$(SLO)$/tabdlg.obj		\
 diff --git a/vcl/source/window/syschildctrl.cxx b/vcl/source/window/syschildctrl.cxx
 new file mode 100644
-index 0000000..0c0d2de
+index 0000000..0859737
 --- /dev/null
 +++ vcl/source/window/syschildctrl.cxx
-@@ -0,0 +1,215 @@
+@@ -0,0 +1,220 @@
 +/*
 + * written by Florian Reuter, (c) Novell Inc 2008
 + */
@@ -1018,7 +1022,7 @@
 +}
 +
 +
-+void SystemChildControl::load_url(char *url)
++void SystemChildControl::LoadUrl(char *url)
 +{
 +    printf("+++ SystemChildControl::LOAD..\n");
 +
@@ -1026,6 +1030,11 @@
 +    pGtkSalObject->LoadUrl(url);
 +}
 +
++sal_uInt32 SystemChildControl::GetSocketId()
++{
++    SalObject *pGtkSalObject = mpWindowImpl->mpSysObj;
++    return pGtkSalObject->GetSocketId();
++}
 diff --git a/vcl/unx/gtk/app/gtkinst.cxx b/vcl/unx/gtk/app/gtkinst.cxx
 index f5383a0..4e0899f 100644
 --- vcl/unx/gtk/app/gtkinst.cxx
@@ -1082,15 +1091,17 @@
  
      if( pThis->m_pIMHandler )
 diff --git a/vcl/unx/gtk/window/gtkobject.cxx b/vcl/unx/gtk/window/gtkobject.cxx
-index 1f1d7b5..f3ab335 100644
+index 1f1d7b5..2289042 100644
 --- vcl/unx/gtk/window/gtkobject.cxx
 +++ vcl/unx/gtk/window/gtkobject.cxx
-@@ -41,14 +41,29 @@
+@@ -41,14 +41,33 @@
  #include <plugins/gtk/gtkdata.hxx>
  #include <plugins/gtk/gtkinst.hxx>
  
 -GtkSalObject::GtkSalObject( GtkSalFrame* pParent, BOOL bShow ) 
++#ifdef ENABLE_GTKMOZEMBED
 +#include <gtkembedmoz/gtkmozembed.h>
++#endif
 +
 +
 +GtkSalObject::GtkSalObject( GtkSalFrame* pParent, int type, BOOL bShow ) 
@@ -1107,10 +1118,12 @@
 +	    case SOCKET:
 +		m_pSocket = gtk_socket_new();
 +		break;
++#ifdef ENABLE_GTKMOZEMBED
 +	    case MOZ_EMBEDD:
 +		gtk_moz_embed_set_comp_path("/usr/lib/firefox"); 
 +		gtk_moz_embed_set_profile_path("/home/freuter/.mozilla", "firefox"); 		m_pSocket = gtk_moz_embed_new();
 +		break;
++#endif
 +	    default:
 +		m_pSocket = gtk_drawing_area_new();
 +	    break;
@@ -1118,33 +1131,50 @@
          Show( bShow );
          // insert into container
          gtk_fixed_put( pParent->getFixedContainer(),
-@@ -60,7 +75,7 @@ GtkSalObject::GtkSalObject( GtkSalFrame* pParent, BOOL bShow )
+@@ -60,7 +79,8 @@ GtkSalObject::GtkSalObject( GtkSalFrame* pParent, BOOL bShow )
  
          // make it transparent; some plugins may not insert
          // their own window here but use the socket window itself
 -        gtk_widget_set_app_paintable( m_pSocket, TRUE );
-+//        gtk_widget_set_app_paintable( m_pSocket, TRUE );
++	if (type==DRAWING_AREA)
++	    gtk_widget_set_app_paintable( m_pSocket, TRUE );
  
          //system data
          SalDisplay* pDisp = GetX11SalData()->GetDisplay();
-@@ -77,8 +92,12 @@ GtkSalObject::GtkSalObject( GtkSalFrame* pParent, BOOL bShow )
+@@ -77,12 +97,20 @@ GtkSalObject::GtkSalObject( GtkSalFrame* pParent, BOOL bShow )
  
          g_signal_connect( G_OBJECT(m_pSocket), "button-press-event", G_CALLBACK(signalButton), this );
          g_signal_connect( G_OBJECT(m_pSocket), "button-release-event", G_CALLBACK(signalButton), this );
-+/*
++/**/
          g_signal_connect( G_OBJECT(m_pSocket), "focus-in-event", G_CALLBACK(signalFocus), this );
          g_signal_connect( G_OBJECT(m_pSocket), "focus-out-event", G_CALLBACK(signalFocus), this );
-+*/
++/**/
 +	g_signal_connect( G_OBJECT(m_pSocket), "set-focus-child", G_CALLBACK(signalFocusChild), this );
 +
          g_signal_connect( G_OBJECT(m_pSocket), "destroy", G_CALLBACK(signalDestroy), this );
          
          // #i59255# necessary due to sync effects with java child windows
-@@ -207,6 +226,19 @@ gboolean GtkSalObject::signalFocus( GtkWidget*, GdkEventFocus* pEvent, gpointer
+         pParent->Sync();
++
++	if (type==SOCKET) {
++	    printf("socket id=%li\n", (long)gtk_socket_get_id(GTK_SOCKET(m_pSocket)));
++	}
+     }
+ }
+ 
+@@ -199,6 +227,7 @@ gboolean GtkSalObject::signalButton( GtkWidget*, GdkEventButton* pEvent, gpointe
+ gboolean GtkSalObject::signalFocus( GtkWidget*, GdkEventFocus* pEvent, gpointer object )
+ {
+     GtkSalObject* pThis = (GtkSalObject*)object;
++    printf("GtkSalObject::signalFocus\n");
+ 
+     GTK_YIELD_GRAB();
+ 
+@@ -207,6 +236,19 @@ gboolean GtkSalObject::signalFocus( GtkWidget*, GdkEventFocus* pEvent, gpointer
      return FALSE;
  }
  
-+void GtkSalObject::signalFocusChild  (GtkContainer *container,
++void GtkSalObject::signalFocusChild  (GtkContainer */*container*/,
 +				      GtkWidget    *widget,
 +				      gpointer      object)
 +{
@@ -1160,7 +1190,7 @@
  void GtkSalObject::signalDestroy( GtkObject* pObj, gpointer object )
  {
      GtkSalObject* pThis = (GtkSalObject*)object;
-@@ -224,3 +256,31 @@ void GtkSalObject::SetForwardKey( BOOL bEnable )
+@@ -224,3 +266,42 @@ 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 ) ) );
  }
@@ -1174,12 +1204,15 @@
 +    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);
++//    if (GTK_IS_CONTAINER(GTK_WIDGET(socket)->parent)) {
++	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);
++//    }
 +}
 +
 +
++#ifdef ENABLE_GTKMOZEMBED
 +void GtkSalObject::LoadUrl(char *url)
 +{
 +    GTK_YIELD_GRAB();
@@ -1189,9 +1222,17 @@
 +//    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));
-+   
 +}
++#else
++void GtkSalObject::LoadUrl(char */*url*/)
++{
++}
++#endif
 +
++sal_uInt32 GtkSalObject::GetSocketId()
++{
++    return gtk_socket_get_id(GTK_SOCKET(m_pSocket));
++}
 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
@@ -1207,10 +1248,10 @@
  NOOPTFILES=$(SLO)$/gtkframe.obj
  .ENDIF
 diff --git a/vcl/unx/headless/svpdummies.cxx b/vcl/unx/headless/svpdummies.cxx
-index 2b66731..ccec2cb 100644
+index 2b66731..ed184a4 100644
 --- vcl/unx/headless/svpdummies.cxx
 +++ vcl/unx/headless/svpdummies.cxx
-@@ -75,9 +75,11 @@ void SvpSalObject::SetPosSize( long, long, long, long ) {}
+@@ -75,9 +75,12 @@ void SvpSalObject::SetPosSize( long, long, long, long ) {}
  void SvpSalObject::Show( BOOL ) {}
  void SvpSalObject::Enable( BOOL ) {}
  void SvpSalObject::GrabFocus() {}
@@ -1219,14 +1260,15 @@
  void SvpSalObject::SetBackground( SalColor ) {}
  const SystemEnvData* SvpSalObject::GetSystemData() const { return &m_aSystemChildData; }
 +void SvpSalObject::LoadUrl(char *url) {}
++sal_uInt32 SvpSalObject::GetSocketId() { return 0; }
  
  // SalI18NImeStatus
  SvpImeStatus::~SvpImeStatus() {}
 diff --git a/vcl/unx/headless/svpdummies.hxx b/vcl/unx/headless/svpdummies.hxx
-index 929de79..1f49eab 100644
+index 929de79..baad302 100644
 --- vcl/unx/headless/svpdummies.hxx
 +++ vcl/unx/headless/svpdummies.hxx
-@@ -77,11 +77,12 @@ public:
+@@ -77,11 +77,13 @@ public:
  	virtual void					Show( BOOL bVisible );
  	virtual void					Enable( BOOL nEnable );
  	virtual void					GrabFocus();
@@ -1237,6 +1279,7 @@
  
  	virtual const SystemEnvData*	GetSystemData() const;
 +        virtual void LoadUrl(char *url);
++        virtual sal_uInt32 GetSocketId();
  };
  
  class SvpImeStatus : public SalI18NImeStatus
@@ -1309,7 +1352,7 @@
  
  class GtkSalSystem : public X11SalSystem
 diff --git a/vcl/unx/inc/plugins/gtk/gtkobject.hxx b/vcl/unx/inc/plugins/gtk/gtkobject.hxx
-index 5ce3237..fe7e198 100644
+index 5ce3237..c8c65fe 100644
 --- vcl/unx/inc/plugins/gtk/gtkobject.hxx
 +++ vcl/unx/inc/plugins/gtk/gtkobject.hxx
 @@ -51,16 +51,28 @@
@@ -1350,13 +1393,14 @@
  
  	virtual void					SetBackground();
  	virtual void					SetBackground( SalColor nSalColor );
-@@ -81,7 +94,8 @@ public:
+@@ -81,7 +94,9 @@ public:
          virtual void                                    SetForwardKey( BOOL bEnable );
  
  	virtual const SystemEnvData*	GetSystemData() const;
 -   
 +    
 +        virtual void LoadUrl(char *url);   
++        virtual sal_uInt32 GetSocketId();
  };
  
  #endif // _SV_SALOBJ_H
@@ -1396,10 +1440,10 @@
                                                       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
+index 131824b..b41e2e9 100644
 --- vcl/unx/inc/salobj.h
 +++ vcl/unx/inc/salobj.h
-@@ -109,12 +109,13 @@ public:
+@@ -109,12 +109,14 @@ public:
  	virtual void					Show( BOOL bVisible );
  	virtual void					Enable( BOOL nEnable );
  	virtual void					GrabFocus();
@@ -1411,6 +1455,7 @@
  	virtual const SystemEnvData*	GetSystemData() const;
 -   
 +	virtual void LoadUrl(char *url);
++	virtual sal_uInt32 GetSocketId();
 +
  };
  
@@ -1447,7 +1492,7 @@
  // KDESalData pieces
  // -----------------------------------------------------------------------
 diff --git a/vcl/unx/source/window/salobj.cxx b/vcl/unx/source/window/salobj.cxx
-index 3c7c9c8..f306544 100644
+index 3c7c9c8..65f586f 100644
 --- vcl/unx/source/window/salobj.cxx
 +++ vcl/unx/source/window/salobj.cxx
 @@ -215,6 +215,24 @@ void X11SalInstance::DestroyObject( SalObject* pObject )
@@ -1475,7 +1520,7 @@
  
  // ======================================================================
  // SalClipRegion is a member of SalObject
-@@ -576,3 +594,11 @@ long X11SalObject::Dispatch( XEvent* pEvent )
+@@ -576,3 +594,16 @@ long X11SalObject::Dispatch( XEvent* pEvent )
  	}
  	return 0;
  }
@@ -1487,8 +1532,13 @@
 +void X11SalObject::LoadUrl(char *url)
 +{
 +}
++
++sal_uInt32 X11SalObject::GetSocketId()
++{
++    return 0;
++}
 diff --git a/vcl/util/makefile.mk b/vcl/util/makefile.mk
-index 512e9c4..7037080 100644
+index 512e9c4..6146b6c 100644
 --- vcl/util/makefile.mk
 +++ vcl/util/makefile.mk
 @@ -206,6 +206,10 @@ SHL1OBJS=   $(SLO)$/salshl.obj
@@ -1502,16 +1552,17 @@
  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
+@@ -318,6 +322,9 @@ PKGCONFIG_MODULES=gtk+-2.0 gthread-2.0
  .IF "$(ENABLE_DBUS)" != ""
  PKGCONFIG_MODULES+= dbus-glib-1
  .ENDIF
-@@ -333,6 +337,7 @@ SHL4LIBS=$(LIB4TARGET)
++.IF "$(ENABLE_GTKMOZEMBED)" != ""
++PKGCONFIG_MODULES=xulrunner-gtkmozembed
++.ENDIF
+ .INCLUDE: pkg_config.mk
+ 
+ LIB4TARGET=$(SLB)$/igtk_plug_
+@@ -333,6 +340,7 @@ SHL4LIBS=$(LIB4TARGET)
  SHL4DEPN=$(SHL1IMPLIBN) $(SHL1TARGETN) $(SHL2IMPLIBN) $(SHL2TARGETN)
  # libs for gtk plugin
  SHL4STDLIBS+=$(PKGCONFIG_LIBS:s/ -lpangoxft-1.0//)



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]