User:Petr-akhlamov/Shell

From ReactOS Wiki
Jump to: navigation, search

About Shell

(on russian)

Shell in ReactOS initially was absent. She was implemented in v0.2 by Martin Fuchs, at that implemented wrong from point of view program architecture. In ideal by functionality she need be analoguous by Windows shell, but for good work she need library Shell32.dll.

Work under new shell started Thomas Bluemel. As prototype he choose Windows 2003 Shell and do delimite of functions of explorer.exe and Shell32.dll. But due missing Shell32.dll new version of Explorer didn't work yet. Later Andrew Hill converted shell32 into C++ and implemented browseui.dll, the file browsing window library.

First big step in Shell32.dll development was contract which was concluded with Giannis Adamopoulos for rework Shell32. The result of the contract it became possible to start in ReactOS and allow a user to browse about explorer_new. In addition to the code developed during the contract, Giannis has produced copious amounts of documentation regarding the shell infrastructure.

After contract with Giannis

Later 02-02-2014 was created branch shell-experiments, in which worked David Quintana (Gigaherz) and Giannis Adamopoulos.

Progress

  • 13.07.2014 - CMergedFolder was completed.
  • 24.08.2014 - hotkeys Ctrl+C, Ctrl+X, Ctrl+V was implemented.
  • 28.09.2014 - IPC was implemented.

Shell32 components scheme

Shellclasses 2.png

Unimplemented features

  • DDE

Reports in the bugtracker

  • shell/explorer issues (CORE-5620)
  • Major unimplemented features of the shell (CORE-9277)
  • shell32: shell icon cache and icon extractors need to be rewritten (CORE-7563)

Reorganization of shell resources

As part of his work (CORE-10030), Robert Naumann:

  • Reworked the property dialogs, made them nicer, added missing resources and removed unneeded ones
  • Changed the start menu icon from an icon to a bitmap resource
  • Fixed existing and add missing icons
  • Reorganized the resource folder structure

Components

Browseui.dll

As of 13.07.2017:

  • contents of current folder are displayed
  • icon is displayed in the header
  • buttons are displayed
  • buttons have icons
  • list mode has sort arrows

Button implementations

The buttons in the file browser toolbar can be subdivided into 4 groups:

  • The navigation buttons, with history back/forward and “up”,
  • The sidebar buttons, with “folders” and “search”,
  • The file operations, with “copy to”, “move to”, “delete” and “undo”,
  • The view mode, which shows a dropdown to select the listview style.

Works:

  • navigation
  • view mode
  • folders and search

In progress

Shdocvw

Shdocvw.dll is a library which contains the user interface portions of both Internet Explorer and the file system. In this context, the file system is the Windows Explorer accessory that you use to browse Windows folders and files. The "SHDocVw.dll" library is a COM object, it is not managed.

CORE-14172 - AddUrlToFavorites

Implemented functions
Function Applicable Versions Status
AddUrlToFavorites 4.71 and higher
CallRegisterServer_RunDLL 4.70 from Internet Explorer 3.00 only
CDDEAuto_Navigate (162) 4.71 and higher
ClearAutoSuggestForForms (211) 5.0 and higher
ClearExtensionRecordsBlockReason (234) 6.0 from Windows XP SP2 and Windows Server 2003 SP1, and higher
CreateFromDesktop (115) 4.71 and higher
CreateShortcutInDirA (102) 4.70 from Windows 95 OSR2, and higher
CreateShortcutInDirW (103) 4.70 from Windows 95 OSR2, and higher
CreateShortcutInDirEx (105) 5.0 and higher
CShellUIHelper_CreateInstance2 (152) 4.71 and higher
DDECreatePostNotify (116) 5.0 and higher
DDEHandleViewFolderNotify (117) 4.71 and higher
_DeletePidlDPA (171) 5.0 and higher
DetectAndFixAssociations (175) 5.0 and higher
DisplayUrlParseError (199) 5.0 from before Windows 2000; 6.0 from Windows Vista, and higher
DllCanUnloadNow 4.70 and higher
DllGetClassObject 4.70 and higher
DllGetVersion 4.70 from Internet Explorer 3.01, and higher
DllInstall 4.71 up to but not including 6.0 from Windows Vista
DllRegisterServer 4.70 up to but not including 6.0 from Windows Vista
DllRegisterWindowClasses 4.71 and higher
DllUnregisterServer 4.70 up to but not including 6.0 from Windows Vista
DoAddToFavDlg 4.70 from Windows 95 OSR2, and higher
DoAddToFavDlgW 5.0 and higher
DoFileDownload 4.70 from Windows 95 OSR2, and higher
DoFileDownloadEx 4.70 from Internet Explorer 3.02, and higher
DoOrganizeFavDlg 4.70 from Windows 95 OSR2, and higher
DoOrganizeFavDlgW 5.0 and higher
DoPrivacyDlg 6.0 and higher
DragDrop (140) 5.0 and higher
EnsureWebViewRegSettings (176) 5.0 and higher
FireEvent_Quit (185) 5.0 and higher
GetDefaultInternetSearchUrlA (217) 5.0 and higher
GetDefaultInternetSearchUrlW (216) 5.0 and higher
GetExtensionRecordBlockReason (233) 6.0 from Windows XP SP2 and Windows Server 2003 SP1, and higher
GetExtensionRecords (232) 6.0 from Windows XP SP2 and Windows Server 2003 SP1, and higher
GetLeakDetectionFunctionTable (161) 4.71 and higher
GetLinkInfo (212) 5.0 and higher
GetSearchAssistantUrlA (215) 5.0 and higher
GetSearchAssistantUrlW (214) 5.0 and higher
_GetStdLocation (150) 5.0 and higher
HlinkFindFrame 4.71 and higher
HlinkFrameNavigate 4.70 from Windows 95 OSR2 and higher
HlinkFrameNavigateNHL 4.71 and higher
IEAboutBox 4.70 from Windows 95 OSR2 and higher, only
IEBindToObject (146) 5.0 and higher
IEBindToObjectEx (149) 5.0 from Windows 2000, and higher
IECleanUpAutomationObject (194) 5.0 and higher
IEDDE_NewWindow (197) 5.0 and higher
IEDDE_WindowDestroyed (196) 5.0 and higher
IEGetAttributesOf (145) 5.0 and higher
IEGetDisplayName (148) (189) 5.0 and higher
IEGetNameAndFlags (147) 5.0 and higher
IEILIsEqual (219) 5.0 and higher
IEInvalidateImageList (141) 5.0 and higher
IEIsLinkSafe (226) 5.0 from Windows 2000, and higher
IEMapPIDLToSystemImageListIndex (142) 5.0 and higher
IEOnFirstBrowserCreation (195) 5.0 and higher
IEParseDisplayNameWithBCW (218) 5.0 and higher
IEWinMain (101) 4.70 and higher
IEWriteErrorLog 4.71 up to but not including 6.0 from Windows Vista
ILCreateFromPathCPWithBCA (221) 5.0 and higher
ILCreateFromPathCPWithBCW (222) 5.0 and higher
ILIsWeb (143) 5.0 and higher
ImportPrivacySettings 6.0 and higher
InstallReg_RunDLL 4.70 from Windows 95 OSR2 and higher, only
IsErrorUrl (198) 5.0 and higher
IsFileUrl (135) 5.0 and higher
IsFileUrlW (136) 5.0 and higher
IsIEDefaultBrowser (167) 5.0 and higher
IsResetWebSettingsRequired (224) 5.0 and higher
IsURLChild (153) 5.0 and higher
IURLQualify (172) 5.0 and higher
JITCoCreateInstance (209) 5.0 and higher
NavToUrlUsingIEA (203) 5.0 and higher
NavToUrlUsingIEW (204) 5.0 and higher
OpenPidlOrderStream (139) 5.0 and higher
OpenURL 4.71 and higher
ParseURLFromOutsideSourceA (169) 5.0 and higher
ParseURLFromOutsideSourceW (170) 5.0 and higher
PathIsFilePath (137) 5.0 and higher
PrepareURLForDisplayUTF8W (225) 5.0 from Windows 2000, and higher
RecordExtensionCreation (231) 6.0 from Windows XP SP2 and Windows Server 2003 SP1, and higher
ResetProfileSharing (164) 4.71 and higher
ResetWebSettings (223) 5.0 and higher
RunInstallUninstallStubs (125) 4.71 and higher
RunInstallUninstallStubs2 (130) 4.71 and higher
SafeOpenPromptForPackager (229) 6.0 from Windows XP SP1, and higher
SafeOpenPromptForShellExec (228) 6.0 from Windows XP SP1, and higher
SearchForElementInHead (208) 5.0 and higher
SetQueryNetSessionCount 4.71 and higher
SetShellOfflineState 5.0 and higher
SHAddSubscribeFavorite 4.71 and higher
SHCreateDesktop (119) 4.71 and higher
SHCreateSplashScreen (131) 4.71 and higher
SHDesktopMessageLoop (120) 4.71 and higher
SHDGetPageLocation (187) 5.0 and higher
ShellDDEInit (118) 4.71 and higher
SHGetHistoryPIDL (192) 5.0 and higher
SHGetIDispatchForFolder 4.71 and higher
SHGetViewStream (200) 5.0 and higher
SHIEErrorMsgBox (188) 5.0 and higher
SHIsGlobalOffline (174) 5.0 and higher
SHIsRegisteredClient (191) 5.0 and higher
SHIsRestricted (173) 5.0 and higher
SHIsRestricted2W (160) 5.0 and higher
SHMapNbspToSp (183) 5.0 and higher
ShowUrlInNewBrowserInstance (230) 6.0 from Windows XP SP2, and higher
SHRestricted2A (158) 4.71 and higher
SHRestricted2W (159) 4.71 and higher
SHRunIndirectRegClientCommand (190) 5.0 from before Windows 2000; 5.50 and higher
SHUseClassicToolbarGlyphs (227) 6.0 and higher
SoftwareUpdateMessageBox 4.71 and higher
StopWatch (123) 4.71 and higher
StopWatchFlush (122) 4.71 and higher
StopWatchMode (121) 4.71 and higher
UrlHitsNetW (210) 5.0 and higher
URLQualifyA 4.70 and higher
URLQualifyW 4.70 and higher
URLSubLoadString (138) 5.0 and higher
URLSubRegQueryA (151) 4.71 and higher
URLSubstitution (150) 4.71 and 4.72
URLSubstitution (165) 5.0 and higher
UseCustomInternetSearch (213) 5.0 and higher
WhichPlatform (104) 4.71 and higher
WinList_FindFolderWindow (178) 5.0 and higher
WinList_GetShellWindows (179) 5.0 and higher
WinList_Init (110) 4.71 and higher
WinList_NotifyNewLocation (177) 5.0 and higher
WinList_RegisterPending (180) 5.0 and higher
WinList_Revoke (181) 5.0 and higher
WinList_Terminate (111) 4.71 and higher
unknown (220) 5.0 and 5.50

Dynamic Data Exchange

24.08.2014: DDE base code was imported from trunk.

29.09.2014: Work on it was started.

After test and debug of component in Windows, Gigaherz added it to Shell32 and test it in ReactOS.

Due to bugs in the win32k, DDE implementation is badly broken and developer set it aside, they needs to be fixed. [1]

IPC

IPC mechanism is used by browseui to open new windows in the existing process. This function was implemented on 28.09.2014[2].

Sidebar

03.12.2014: Implementation of CExplorerBand class was started , which needed for sidebar. Gigaherz added this class to research sidebar implementation in Windows.

05.02.2016: Patch (CORE-10838) with initial implementation of classes BaseBar and CBaseBarSite was published .

19.02.2016: Sylvain Deverre started working on sidebar in github-repo.

30.05.2016: Results of his work was added to trunk.

01.06.2016: Sidebar was implemented.

26.07.2016: In the sidebar, expanding the tree view to the current folder when a new folder is being browsed and showing the context menu on right click was implemented.

02.08.2016: In the sidebar, displaying of disk name was implemented.

01.02.2017: In the sidebar, rudimentary support for drag icons was implemented.

Search

Rosfilesearch.png

In 2019, In the GSoC boundaries was implmented file search.[3]

Command line parameters

08.09.2014: Base of parser of command line parameters was written.

The report CORE-12163 was closed 07.11.2016.

Commands

Explorer [/n] [/e] [(,)/root,<object>] [/select,<object>]

/n Opens a new single-pane window for the default selection. This is usually the root of the drive Windows is installed on. If the window is already open, a duplicate opens.

/e Opens Windows Explorer in its default view.

/root,<object> Opens a window view of the specified object.

/select,<object> Opens a window view with the specified folder, file or application selected.

Examples:

  Example 1:     Explorer /select,C:\TestDir\TestApp.exe

Opens a window view with TestApp selected.

  Example 2:  Explorer /e,/root,C:\TestDir\TestApp.exe

This opens Explorer with C: expanded and TestApp selected.

  Example 3:  Explorer /root,\\TestSvr\TestShare

Opens a window view of the specified share.

  Example 4:  Explorer /root,\\TestSvr\TestShare,select,TestApp.exe

Opens a window view of the specified share with TestApp selected.

Now, explorer supports these parameters:

  • /separate
  • /e
  • /select

Desktop

05.02.2017: In the trunk, auto updating of desktop after its content changed was implemented.

Hide desktop icons

Taskbar

15.05.2014: Work on taskbar was started.

Taskbar.png

As of 31.07.2017:

  • windows list displays
  • you can minimize/restore windows with left-click
  • you can call windows action-list with right-click
  • taskbar autohide is implemented
  • taskbar size changing to certain step

Taskbar settings

14.07.2017: Robert Naumann started implementation of taskbar settings saving/loading. (CORE-11498)

01.11.2017: in revision 2ed535d (0.4.8-dev-46) Giannis implemented some taskbar settings (lock, keep on top of other windows, auto-hide, show clock, show seconds). Others will be implemented later.

The notification area

Notification balloons.png

The notification area was implemented on 05.07.2014. Now:

  • in the tray, apps icons are displayed
  • you can minimize/restore apps with left-click
  • you can call app action-list with right-click
  • hiding of inactive icons is not implemented

23-march-2019 was implemented date tooltip to taskbar clock

Shell service objects

Sound setting dialog

Shell service objects is a component, which implements sound, battery, safely remove and other icons in the system tray. Its implementation was started on 23.07.2014.

17.08.2014: basic functions was implemented.

Next work

23-24.03.2017: Eric Kohl implemented:

  • r74225 - Implement code to show and hide the power and volume icons in the notification area aka systray.
  • r74226 - Show and hide the power systray icon.
    • r74228 - Implement the power schemes popup menu.
  • r74227 - Show and hide the volume systray icon.

25-feb-2018 40bd09a - Tray volume dialog implementation

2019:

  • Added speakers volume dialog[4]
  • Default sound is now played when volume is changed via taskbar or master bar[5]
  • Implemented volume control for tray window[6]
  • Implement the mute checkbox
  • Implement the volume and balance trackbar for mono and stereo lines

Address bar

04.05.2014: Work on address bar was started.

Shell-adress.png

As of 25.08.2016:

  • implemented:
    • displaying current path
    • icon
    • recognition support
    • system folder name is displayed instead GUID/CLSID
    • when pressing Enter, browsing to adress
    • addressbar autoresizing
    • addressbar combobox
Shell adresslist.png

CLSID

Color and value
Not functioning
Implemented
Missing in Windows XP

About unimplemented CLSIDs:

  • Network Computers - in Windows XP opens "search results of computers"
  • Scheduled Tasks - opens the relevant folder

Other CLSIDs are missing in NT5.

CLSID
Administrative Tools
Briefcase
Control Panel
Fonts
History
Inbox
MS Network
My Computer
My Documents
My Network Places
Network Computers
Network Connections
Printers and Faxes
Programs Folder
Recycle Bin
Scanners and Cameras
Scheduled Tasks
Start Menu Folder
Temporary Internet Files
Web Folders

Menu bar

Unimplemented items are displayed as inactive. It works with keyboard control.

Missing

Menu items implementation

Color and value
Not functioning
Implemented
Menu
File Close
Edit Undo
Cut
Copy
Paste
Paste Shortcut
Copy To Folder...
Move To Folder...
Select All
Invert Selection
View Toolbars
Status Bar
Explorer Bar
Icon sizes
Go to
Refresh
Favorites Add to Favorites
Organize Favorites
Tools Map Network Drive
Disconnect Network Drive
Synchronize
Folder Options
Help About ReactOS
Folder options
Folder-options.png
  • CORE-10837 - Unable to launch Folder Options due to missing class
  • CORE-11141 - FolderOptions are unimplemented
  • CORE-10800 - Improvements to Folder Options
  • CORE-12906 - Changing or creating new file associations in Folder options is missing
  • CORE-12540 - Implement TreeView of Folder Options

05.02.2017: folder properties dialog was implemented in r73703 with all available settings.

Copy to / Move to

18.04.2016: Barrett Karish sent a patch with implementation of this function.

Connect/disconnect network drive

03.07.2017: Jared Smudde started implementation of netplwiz.dll library, which performs this function.

23.04.2019 to menu was added item for disconnect network drive.

"Start"

Start setting

Classicconf.png
  • 21.11.2015: in r69992, implementation of setting dialog of classic start menu was started.
  • 22.11.2015: in r70001, these buttons were implemented:
    • Add > open shortcut wizard
    • Advanced > open %username%/Start menu
    • Clear > Clears %username%/Recent

Shutdown dialog

Shell-poweroff.png

29.09.2014: in shell-experiments, a patch with new shutdown dialog was applied.

ShellBag

ShellBag information is a set of subkeys in a user registry hive (eg. ntuser.dat and usrclass.dat files) used by the Windows operating system to track user window viewing preferences. It does this by storing various Windows Explorer settings that relates to dimensions, settings, etc. This allows one to reopen the same folder at a later time with the settings from the previous time. Each user will have separate preferences for folders, and therefore, these settings are stored in the appropriate user hive.[7]

CORE-9283

Additional features

Copy dialog

Copydialog.png

Work on copy dialog was started in November 2014. (CORE-4476)

  • 23.02.2015: It was implemented, but without animation.
  • 23.04.2015: Animation was implemented.

Show of hidden files

Implementation of this feature was started on 17.02.2015 and finished on 14.03.2015. (CORE-9207)

Shell extensions

Browser of registry and NT-objects

15.03.2015: Exploring registry and NT objects from explorer was implemented. CORE-9244

Reg new.png NTObj new.png

Virtual desktops

This function may be implemented as a shell extension.

Improve support for shell extensions

Shell Namespace Extensions

  • shell32: rewrite shell folders implementation (CORE-7585)
Zipfolders.png
Zip folder namespace extension

This extension was implemented 7-apr-2018.

28-feb-2019 was implemented archive with password suppport.

Taskbar extensions

They were implemented in GSoC. (quick start panel, battery state, and usb-ejecter)

18.08.2017: USB-ejecter extension was added to trunk.

QuickLaunch panel

20.10.2017: Quick launch panel extension was implemented.

For filling panel, adding shortcuts to C:\Documents and Settings\%username%\Application Data\Microsoft\Internet Explorer\Quick Launch folder is needed.

Also, you can create user bar.

The panel is created on the right. You can't move it. Shortcuts runs You can show/hide text and title, close panel. You can reduce the panel, but hidden icons aren't restored. Bug: you can't swap without errors quickstart panel and taskbar.

Sort arrows

13.07.2017: In the shell, was implemented sort arrows in the list.

HotKeys

Color and value
Not functioning
Implemented
Not tested
Missing in Windows XP (or only in programs)
Hotkeys
CTRL
CTRL + A
CTRL + C
CTRL + F
CTRL + G
CTRL + N
CTRL + O
CTRL + P
CTRL + S
CTRL + V
CTRL + X
CTRL + Z
CTRL + F4
CTRL + while dragging an item
CTRL + SHIFT with arrow keys
CTRL + ESC
CTRL + F6
ALT
ALT+ENTER
ALT+F4
ALT+SPACEBAR
ALT+TAB
ALT+ESC
FUN
F1
F2
F3
F4
F5
F6
F10
WIN
Windows Logo
Windows Logo+BREAK
Windows Logo+D
Windows Logo+M
Windows Logo+SHIFT+M
Windows Logo+E
Windows Logo+F
CTRL+Windows Logo+F
Windows Logo+F1
Windows Logo+ L
Windows Logo+R
Windows Logo+U
dialogue
TAB
SHIFT+TAB
CTRL+TAB
CTRL+SHIFT+TAB
ALT+Underlined letter
ENTER
SPACEBAR
F1
F4
Arrow keys
BACKSPACE
Explorer
END
HOME
NUM LOCK+Asterisk sign (*)
NUM LOCK+Plus sign (+)
NUM LOCK+Minus sign (-)
LEFT ARROW
RIGHT ARROW

Right click drag menu

  • 5bef945 - Added resources strings
  • 8f8ab05 - Implementation of GetItemPosition, SelectAndPositionItems, IsDropOnSource, GetDragPoint
  • 6d91269 - Initial implementation of right click drag menu

Explorer background

Shellbackground.png

04.04.2019 ReactOS Explorer background was implemented. For creating folder background you must place to it an image file and a *.ini file with the following contents:

[{BE098140-A513-11D0-A3A4-00C04FD706EC}]
IconArea_Image=ros.png
IconArea_Text=0x4B0082
IconArea_TextBackground=0xB048B5

Where:

  • IconArea_Image - background
  • IconArea_Text - text color
  • IconArea_TextBackground - text background

Autocomplete

AutoComplete.png

Autocomplete prototype by Katayama Hirofumi MZ.

Other classes

CMergedFolder

The CMergedFolder class structure is a set of classes, whose primary purpose of the merged folder is the ability to aggregate the contents of multiple shell folders into one virtual folder that includes items from all of the sources, and also merges the child items of the same name into one virtual item.

Implementation was started on 28.06.2014 and finished on 13.07.2014.

It is used in:

Programs

CMergedFolder allows displaying shortcuts in the start menu from two folders:

  • "Programs" (content of %userprofile%/Start menu/Programs and All Users/Start menu/Programs).
  • "Start menu" (content of %userprofile%/Start menu and All Users/Start menu)

Favourites

Favourites displays shortcuts from %userprofile%/Favourites.

Recent documents

Recent documents in the start menu, with using CMergedFolder to show files from %userprofile%/Recent.

CFocusManager

This class is needed for determination and set focus area and for setting elements, which have focus on menu panel. Its implementation was started together with menu panel.

CShellDispatch

CShellDispatch implements objects of IShellDispatch v1-6. Since ReactOS seeks to compatibility with Win2k3, then it will be implemented as v1-4. (CORE-6892)

The IShellDispatch2 is planned to be taken from Wine, converted it to C++, added to ReactOS and finalized.

Also, in shldisp.idl, IShellDispatch3 and IShellDispatch4 are missing (and v5 and v6, but they are not included in W2k3). These and tests, which will be written later, will be sent to Wine.

First commits was in r71116 and 71117.

  • CORE-12955 - implementation:
    • ShellExecute - performs a specified operation on a specified file[8]
    • IsServiceRunning - returns a value that indicates whether a particular service is running.[9]
  • ShutdownWindows was implemented on 02.04.2017 in r74268 - shows shutdown dialog[10]

PaintMenuBar

31.03.2017: Giannis added the prototype of function PaintMenuBar, which draws gradient and text on the side of menu (for example Start).

Task pane

DirectUI (from 2k3 and xp) will not be implemented due it's largely undocumented. (CORE-11401)

Developers planning to implement Vista+ interfaces IExplorerCommand / ExplorerCommandProvider as replacement of the DirectUI. (CORE-14175)

Themes in new explorer

  • 27.08.2017: Support of alpha-channels in the themes (CORE-13464 was fixed in r75688)

Settings via registry

You can change some parameters in registry.

HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\

  • Hidden - shows hidden folders and files
  • HideFileExt - hides files extensions
  • ListviewShadow - shadows at icons text on the desktop
  • StartMenuLogoff - "Logoff" item in the Start

Links