IE 4.0 Shell ArchitectureIE 4.0 Shell Architecture
IE 4.0 Technology Exchange Meeting
IE 4.0
Satoshi NakajimaSatoshi Nakajima
8 Nov., 1996
Scope of this presentationScope of this presentation
• Covered in this presentationCovered in this presentation
Browser, Shell Explorer, WebBar, Browser, Shell Explorer, WebBar, Asynchronos Navigation, UI negotiationAsynchronos Navigation, UI negotiation
• Not coveredNot covered
WebView, Automation Model, Desktop WebView, Automation Model, Desktop NewsNews
TopicTopic
Browser EvolutionBrowser Evolution
• How Win95 Explorer works Shell Namespace, IShellFolder, pidl,
IShellView, IShellBrowser
• How IE 3.0 browser worksDocObject
• How IE 4.0 browser worksWebBar
TopicTopic
Advanced topicsAdvanced topics
• Layout negotiation Layout negotiation
• How asynchronous navigation worksHow asynchronous navigation works
TopicTopic
Shell Name SpaceShell Name Space
• Shell NameSpaceShell NameSpace
Hierarchical name space, which the user Hierarchical name space, which the user can browse with the Shell Explorercan browse with the Shell Explorer
• Shell ItemsShell Items
Items in the shell name space -- drives, Items in the shell name space -- drives, files, directories, servers, shares, files, directories, servers, shares, MyComputer, ControlPanel, ControlPanel MyComputer, ControlPanel, ControlPanel items, Printer Folder, Printers.items, Printer Folder, Printers.
WIN95WIN95
IShellFolderIShellFolder
Explorer Shell FolderIShellFolder
IShellFolder allows you to • Enumerate items in it (returns pidls)• Parse display name (name to pidl)• Get display name (pidl to name)• Bind to an item• Get UI objects (menu, drop target, …)
WIN95WIN95
What is a “pidl”? What is a “pidl”? An identifier of an item in the shell name space.
WIN95WIN95
cb opaque bitsSHITEMID
SHITEMID1PIDL SHITEMID2 0
A pidl to “C:\tmp\foo.htm”cb1MyComputercb2 C:\ cb3 tmp cb4 Foo.htm 0
Remember that pidls are opaque!
Binding to IShellFolderBinding to IShellFolderWIN95WIN95
ISF::BindToObject cb1MyComputer
cb2 C:\ cb3 tmp 0
DesktopIShellFolder
MyComputerIShellFolder
ISF::BindToObject
C:\tmpIShellFolder
SHGetDesktopFolder
0
IShellBrowser / IShellViewIShellBrowser / IShellViewWIN95WIN95
C:\tmp (folder)IShellFolder
ISF::CreateViewObject
Explorer
C:\tmp (view)
IShellBrowser
IShellView
IShellBrowserIShellBrowser
It allows the shell view to It allows the shell view to
• Merge MenusMerge Menus
• Add Toolbar buttonsAdd Toolbar buttons
• Put some status textPut some status text
• Translate acceleratorsTranslate accelerators
Not OLE’s In-place UI negotiation!
WIN95WIN95
DefViewDefView
A default implementation of A default implementation of IShellView on top of IShellFolder.IShellView on top of IShellFolder.
WIN95WIN95
C:\tmp (folder)IShellFolder
ISF::CreateViewObjectDefView
IShellView
SHCreateShellFolderView(psf)
Extended Name SpaceExtended Name Space
ISVs can plug-in their own hierarchical name spaceISVs can plug-in their own hierarchical name space
WIN95WIN95
Explorer DesktopIShellFolder
MyComputer
NetHood
MSN
Athena
Zip Folder
Internet Explorer 3.0Internet Explorer 3.0IE 3.0IE 3.0
CShellBrowser
C:\tmp
IShellBrowser
IShellView
Wedge
IOleDocumentSite
HTMLObj
IOleDocument
Http://mswIShellFolder
ISF::CreateViewObject
Word/Excel
CShellBrowserCShellBrowser
CShellBrowser is a mini-ExplorerCShellBrowser is a mini-Explorer
CShellBrowser
IShellBrowserIOleCommandTargetIOleContainerIOleInPlaceUIWindow
IDispatchIWebBrowserAppIHlinkFrameITargetFrame
CBaseBrowsersubclass
IE 3.0IE 3.0
““Wedge”Wedge”IE 3.0IE 3.0
CShellDocView
IOleDocumentSiteIOleSiteIOleInPlaceSiteIOleCommandTargetIServiceProvider
CDocObjectHost
IShellViewIOleCommandTarget
WebBrowserOCWebBrowserOCIE 3.0IE 3.0
CWebBrowserOC
CWebBrowserSB
IOleObjectIViewObject2IPersistSreamInitIOleControlIWebBrowseretc.
IShellBrowserIOleCommandTargetIOleContainerIOleInPlaceUIWindow
CBaseBrowser
subclass
Frame SetFrame SetIE 3.0IE 3.0
CWebBrowserOCCWebBrowserSB
CWebBrowserOCCWebBrowserSB
CShellBrowser
Site Site
HTMLObj HTMLObj
IOleClientSiteIOleObject
HTLMObj
Wedge Wedge
IShellBrowserIShellView
IShellBrowserIShellView
IOleDocumentSiteIOleDocument
WedgeIOleDocumentSiteIOleDocument
IE 4.0 ExplorerIE 4.0 ExplorerIE 4.0IE 4.0
IE 4.0 Explorer, Folder and Desktop IE 4.0 Explorer, Folder and Desktop are based on IE 3.0 browser code. are based on IE 3.0 browser code.
CShellBrowser
CBaseBrowsersubclass
CWebBrowserOC
CWebBrowserSBCDesktopBrowser
subclass
CExplorerBrwsr
subclass
WebBarWebBar
WebBar is a dockable browser, which can be docked on a browser or the WebBar is a dockable browser, which can be docked on a browser or the desktopdesktop
IE 4.0IE 4.0
CWebBarOCHost
WebBrowserOC
IDockingWindow
CBaseBrowser
IDockingWindowSite
CShellBrowsersubclass
CDesktopBrwsr
Layout NegotiationLayout NegotiationIE 4.0IE 4.0
Effective Client AreaEffective Client Area
Effective Client AreaCBaseBrowser::_GetEffectiveClientAreaIDockingWindowSite::GetBorderDW for the internet toolbar returns this rectangle.
IE 4.0IE 4.0
Internet toolbar takes this border space
ISTBS::GetBorderSTISTBS::GetBorderST
IDockingWindowSite::GetBorderDW for the scope pane returns this rectangle.
IE 4.0IE 4.0
The scope pane takes the border space from left and top.
Shell View RectangleShell View Rectangle
CBaseBrowser::_GetViewRectIOleInPlaceUIWindow::GetBorder returns this rectangle.
IE 4.0IE 4.0
Excel’s formular bar
Shell View Window Shell View Window RectangleRectangle
CBaseBrowser::_GetViewWindowRectIOleDocumentView::SetRect will be called with this rectangle.
IE 4.0IE 4.0
Asynchronous NavigationAsynchronous NavigationIE 4.0IE 4.0
CShellBrowser
Wedge1
_psv
1. IHlinkFrame::Navigate called2. Create a new Wedge (Wedge2)3. Create URL moniker and call BindToObject(Note that HTMLView1 remains UIActive)
Wedge2
_psvPending
1
2
URL moniker
3
HTLMView1
Asynchronous NavigationAsynchronous NavigationIE 4.0IE 4.0
CShellBrowser
Wedge1
_psv
4. Moniker sends a HTTP request to the server5. Server responds6. Moniker create another HTML view(Note that HTMLView1 is still UIActive)
Wedge2
_psvPending
4
6
URL moniker
5
HTLMView1
HTLMView2
Asynchronous NavigationAsynchronous NavigationIE 4.0IE 4.0
CShellBrowser
Wedge1
_psv
7. Moniker calls Wedge’s OnObjectAvailable8. Wedge2 gets the pointer to HTML view9. Wedge2 notifies it to the browser(Note that HTMLView1 is still UIActive)
Wedge2
_psvPending
78
URL monikerHTLMView1
HTLMView2
9
Asynchronous NavigationAsynchronous Navigation
CShellBrowser
Wedge1
10. Deactivate and release the current view11. Activate the Wedge212. UIActivate HTMLView2
Wedge2
_psv11
12
HTLMView1
HTLMView2
10
IE 4.0IE 4.0
More InformationMore Information
• http://ohserv/users/satonahttp://ohserv/users/satona
• nt\private\shell\docs (\\trango\slmadd)nt\private\shell\docs (\\trango\slmadd)
SHIP IT! Robustness
PerformanceBug fixes
IE 4.0IE 4.0