Re: [MACTCL] Access Mac-specific system icons from Tk
by Kevin Walzer other posts by this author
Oct 14 2005 3:17PM messages near this date
Re: [MACTCL] Access Mac-specific system icons from Tk
|
[MACTCL] about package require
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Doing a quick look at tkOSXBitmap.c and this document,
http://developer.apple.com/documentation/Carbon/Conceptual/Icon_Service_nd_Utilities/02conce
pts/chapter_2_section_4.html,
I see no references to the "icns" resource in the code, just "icn" and
"cicn." Are these latter two deprecated? They seem to be based on
old-school resource files. I'm wondering if this is why the native
bitmaps don't currently display.
How hard would this be to fix/revise? Looking at this code, it's a bit
out of my depth, though I'm willing to give it a try. Should I try to
generate a patch for tkOSXBitmap.c instead of working on a separate
extension?
Cheers,
Kevin Walzer, PhD
WordTech Software - "Tame the Terminal"
http://www.wordtech-software.com
sw at wordtech-software.com
Jim Ingham wrote:
| TkAqua is (trying) to use the Icon Services to fetch and draw the
| system icons. Look at tk/macosx/tkMacOSXBitmap.c.
| TkpCreateNativeBitmap is where the icons are explicitly fetched. I am
| pretty sure this worked at one point on X, but I can't swear to that.
| It's not a very flexible facility either, it just finds whatever Icon
| resources are currently loaded
|
| It would be nice to have a facility to do some fancier things with
| Icons (like looking up the icon for a document type from
| LaunchServices, etc...) I bet most of this stuff would have at least
| Windows equivalents. But if you want to, cooking something like this
| up on X would be great and very useful. Then if somebody was
| motivated, they could try to do it for Windows as well.
|
| Jim
|
|
| On Oct 9, 2005, at 2:35 PM, Kevin Walzer wrote:
|
| Well, a quick perusal of the developer documentation shows this API:
|
| http://developer.apple.com/documentation/Carbon/Reference/
| IconServices/index.html
|
| Looks like this is what I would need to work with in terms of generating
| a Tcl/Tk wrapper for accessing system icons, if there isn't already the
| capability to do so in Tk Aqua.
|
| Basically, I want to be able to browse a directory, i.e. glob, and
| automatically call the correct bitmap as defined for the system for a
| specific file or folder. I don't want to do a lot of hacks converting
| system icons to .gifs or .pngs, which is what I'm doing now in the code
| I'm playing with.
|
| Jim or Daniel, is this something that would be useful? A "TkIcns"
| package perhaps? Or is there a way programatically to do this already?
|
|
| Cheers,
|
| Kevin Walzer, PhD
| WordTech Software - "Tame the Terminal"
| http://www.wordtech-software.com
| sw at wordtech-software.com
|
| Kevin Walzer wrote:
| | Thanks for pointing this out, but it appears to be obsolete:
| doesn't the
| | Macintosh platform refer to the Classic MacOS?
| |
| | This sample code produces a blank frame:
| |
| | % frame .w
| | .w
| | % pack .w
| | % label .w.label1 -text "label" -bitmap application
| | .w.label1
| | % pack .w.label1
| | %
| |
| | Kevin
| |
| | Jon Guyer wrote:
| | |
| | | On Oct 9, 2005, at 12:58 PM, Kevin Walzer wrote:
| | |
| | |> Anyone know ... b) where I
| | |> can find "GetBitmap.3.html" to see the documentation?
| | |
| | |
| | | man GetBitmap
| | |
| | |
| | | -------------------------------------------------------
| | | This SF.Net email is sponsored by:
| | | Power Architecture Resource Center: Free content, downloads,
| discussions,
| | | and more. http://solutions.newsforge.com/ibmarch.tmpl
| | | _______________________________________________
| | | Tcl-mac mailing list
| | | Tcl-mac@[...].net
| | | https://lists.sourceforge.net/lists/listinfo/tcl-mac
| | |
| | |
|
| -------------------------------------------------------
| This SF.Net email is sponsored by:
| Power Architecture Resource Center: Free content, downloads,
| discussions,
| and more. http://solutions.newsforge.com/ibmarch.tmpl
| _______________________________________________
| Tcl-mac mailing list
| Tcl-mac@[...].net
| https://lists.sourceforge.net/lists/listinfo/tcl-mac
|
|
|>
|>
- -------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads,
discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Tcl-mac mailing list
Tcl-mac@[...].net
https://lists.sourceforge.net/lists/listinfo/tcl-mac
|>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (Darwin)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFDUC4iJmdQs+6YVcoRAi6GAJwKMFAoYZ8pjeAH0kbon+060ZP2UQCfQfZr
Zly4q8xDuPygrBvGf/w/RlI=
=V940
-----END PGP SIGNATURE-----
-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Tcl-mac mailing list
Tcl-mac@[...].net
https://lists.sourceforge.net/lists/listinfo/tcl-mac
Thread:
Kevin Walzer
Kristoffer Lawson
Jon Guyer
Kevin Walzer
Kevin Walzer
Jim Ingham
Kevin Walzer
Kevin Walzer
Kevin Walzer
|