--- a/PluginSupport.st Wed Dec 21 19:48:25 2005 +0100
+++ b/PluginSupport.st Wed Dec 21 20:52:45 2005 +0100
@@ -1,6 +1,6 @@
"
COPYRIGHT (c) 2005 by Claus Gittinger
- All Rights Reserved
+ All Rights Reserved
This software is furnished under a license and may be used
only in accordance with the terms of that license and with the
@@ -24,7 +24,7 @@
copyright
"
COPYRIGHT (c) 2005 by Claus Gittinger
- All Rights Reserved
+ All Rights Reserved
This software is furnished under a license and may be used
only in accordance with the terms of that license and with the
@@ -41,13 +41,28 @@
(actually, it could be started from any other application just the same...)
[author:]
- Claus Gittinger
+ Claus Gittinger
[see also:]
- Smalltalk
+ Smalltalk
"
! !
+!PluginSupport class methodsFor:'support'!
+
+setPluginWindowHandle:windowId
+%{
+ extern void __pluginSetWindow();
+# define HWND void *
+# define _HWNDVal(o) (HWND)(__MKCP(o))
+
+ if (__isExternalAddress(windowId)) {
+ HWND hWnd = _HWNDVal(windowId);
+ __pluginSetWindow(hWnd);
+ }
+%}.
+! !
+
!PluginSupport class methodsFor:'startup'!
start:anApplicationClass inWindowWithID:windowID parameters:parameters
@@ -58,13 +73,14 @@
browserWindow clear.
(anApplicationClass isSubclassOf:ApplicationModel) ifTrue:[
- app := anApplicationClass new.
- app allButOpen.
- browserWindow becomeParentOf:app window.
- app window extent:1.0@1.0.
+ app := anApplicationClass new.
+ app allButOpen.
+ browserWindow becomeParentOf:app window.
+ "/ app window extent:1.0@1.0.
+ self setPluginWindowHandle:(app window id).
] ifFalse:[
- v := anApplicationClass new.
- browserWindow becomeParentOf:v.
+ v := anApplicationClass new.
+ browserWindow becomeParentOf:v.
].
"/ wait forEver
@@ -72,10 +88,10 @@
!
startInBrowserWithWindowID:windowID parameters:parameters
- self
- start:(WorkspaceApplication ? Workspace)
- inWindowWithID:windowID
- parameters:parameters
+ self
+ start:(WorkspaceApplication ? Workspace)
+ inWindowWithID:windowID
+ parameters:parameters
"
|v|
@@ -100,5 +116,5 @@
!PluginSupport class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libbasic/PluginSupport.st,v 1.6 2005-12-21 18:48:25 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/PluginSupport.st,v 1.7 2005-12-21 19:52:45 cg Exp $'
! !