[Mono-dev] [PATCH] Win32 Shell Icons in MWF with high level system icon abstraction layer in XplatUI
Kornél Pál
kornelpal at hotmail.com
Thu Sep 22 07:49:49 EDT 2005
Hi,
Originally I only wanted to create a shell icon handler for Windows but it
figured out that the current abstraction of icon handling is not abstract
enough. So I created a new abstraction in XplatUI that is based on file name
rather than on MIME type. And I added special icon handling that can provide
system specific icons for OpenFileDialog for example.
Please review the patch and please approve it.
Note that special icons should either mapped to KDE and GNOME icons or
resources from Default handler should be used in MimeIconEngine. I didn't
implement this. Unless it will be implemented unknown/unknown icon will be
used for undefined special icons. Optionally and open folter icon could be
implemented in MimeIconEngine as well by using directory/open for example.
This is the expected behaviour of ImageList and is required by the other
patch:
ImageList.cs: Modified to copy Images when adding or getting them.
ChangeLog:
System.Windows.Forms.dll.sources: Added SizedIcons.cs and
Win32ShellIcons.cs.
XplatUIStructs.cs: Added SpecialIcons enumeration.
XplatUIDriver.cs: Added LargeIcons, SmallIcons, GetIconIndex and
GetSpecialIconIndex for system icon handling. Default implementation uses
MimeIconEngine.
XplatUI.cs: Added LargeIcons, SmallIcons, GetIconIndex and
GetSpecialIconIndex.
Win32ShellIcons.cs: New shell icon handler for Windows. Supports 32-bit
icons with alpha channel and caches system image list icons in managed
ImageLists to provide compatibility with ListView.
XplatUIWin32.cs: Implemented LargeIcons, SmallIcons, GetIconIndex and
GetSpecialIconIndex using Win32ShellIcons.
SizedIcons.cs: New icon handler that wraps XplatUI icon handler and provides
ImageLists with constant size.
FileDialog.cs: Modified to use XplatUI and SizedIcons instead of
MimeIconEngine and GetResource.
MimeIcon.cs: Removed GetIconForMimeTypeAndSize as it is superseded by
SizedIcons. Removed code that prevented MIME types returned other than
inode/directory and unknown/unknown when using PlatformDefaultHandler. Added
special icons to PlatformDefaultHandler.
Mime.cs: Removed code that assumed it is used on Windows.
Kornél
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Win32ShellIcons.tar.gz
Type: application/x-gzip
Size: 7870 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/mono-devel-list/attachments/20050922/49acadcd/attachment.gz
More information about the Mono-devel-list
mailing list