On 3/24/06, Youness Alaoui <[EMAIL PROTECTED]> wrote:
On Fri, Mar 24, 2006 at 09:16:20PM +0100, Harry Vennik wrote:
> Op vrijdag 24 maart 2006 20:58, schreef Youness Alaoui:
> > Harry, your idea still doesn't work, because you'd have to implement so
> > much, Tk is not just about widgets, it's about anything graphical, so
> > you'll need to implement the winfo comamnd which is huge, implement the
> > image command, and other stuff like that, it's a lot of work, and to make
> > it compatible with tk's widgets, it would be huge, in the same way as
> > wrapping gnocl.. since all gnocl does is wrap the gtk functions, so your
> > wishgtk is the exact same thing as a plugin wrapping gnocl, only it will be
> > written in C instead of tcl.. makes no sense!
> Tcl is interpreted, C is native. Interpreters are relatively slow. So native
> is the better and thus a 'wishgtk' is better than wrapping gnocl.
> But, still, you are right that it is real huge. Every way to have amsn really
> use gtk is huge.
> If you do something huge, then do it the right way, or not at all....
>
indeed, but when you think about it, slow because of tcl not C is almost not noticeable, especially for
simple small if/else wrapping procs, compared to huge computational software.. I mean amsn is still fast for such a
huge application in a 'shell language'..

> > Also, why don't you use  Chameleon ? I'm sure the easiest way is to write a
> > simple program that transforms a .gtkrc file into a tile compatible .tcl
> > theme package, and use the gtk images for the theme, in the exact same way
> > the aquativo and winxpblue themes are created (only diff is that you'll
> > generate the .tcl file instead of creating it by hand).. if you do it for
> > all gtk themes, then you get all the gtk themes, all that is left is to
> > create a simple extension that would get the default gtk theme and have
> > callbacks being called when the theme changes so it can notify chameleon to
> > change the theme.. how about that ?
> Nice work-around. It is easier indeed, and I think it doesn't have no real
> drawbacks. A requirement should be however that it can import GTK themes
> live! I.e. it should work with just any theme, not only the well-known ones.
> So it gets notified of a theme change, it automatically imports the theme,
> and updates its display.
>

Well, I don't know how GTK works, I never used it, maybe some apps I use need it, but I never really looked into
that... What I noticed when working on tile themes is that you have pixmaps for the themes (gtk is a 'pixmaped
themed engine' ??) just like aquativo and winxpblue, those were directly downloaded from art.gnome.org or something
(can't remember, the url is in the header of the .tcl file) and it seems all gtk themes are 'downloaded' as a dir
structure with pixmaps and a .gtkrc file... as I said, I know nothing about gtk, but if I assume that the gtk themes
you use are simply directories with pixmaps and are located somewhere on the disk (let's say
/usr/lib/gtk/themes/*/gtk-2/*.png for example) then we could have a plugin, depending on chameleon, that would force
the theme to be gtk compatible, it would check using an API call (maybe available through gnocl, m,aybe has to be
implemented in a small extension) which theme is used, then go look for the .gtkrc in /usr/lib/themes/$themename (or
whatever path, there's probably a way to retreive the path to the theme) then read the .gtkrc, build up a string
with all needed config for tile, then do an 'eval' on it (which will act as a source on a file with that same info),
there, you just created, on the file, a theme for tile, that has the same config as the gtk theme, and uses the same
pixmaps as gtk.. you would do the same when you get an event from the gtk engine telling you that the theme
changed.. there, it fits.. no ?
What do you think ? who knows enough gtk, (and uses it) to create this additional plugin (or integrate it with
chameleon).. if it's a plausible idea..

I don't work with GTK directly, but the "Pixmap Engine" are only one of the various engines that GTK have. Some engines are now being written with Cairo support, to make use of vectors instead of pixmaps, and some engines, like Clearlooks and Industrial, generates the widgets directly in code (without pixmaps).

I know all of this only because Sun's JDK (uppon 1.5) tried to add support to the gtk look n' feel directly by read the .gtkrc file (like Tile), but now they had "given up", the JDK 1.6 (or 6.0) will make directly calls to the GTK API to do the drawing.

Some information can be found here: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6185456

I hope it helps in some way
 

KKRT

> >
> > KKRT
> >
> > On Fri, Mar 24, 2006 at 07:21:03PM +0100, Le Philousophe - Phil wrote:
> > > Le Friday 24 March 2006 16:03, Youness Alaoui a ?crit?:
> > > > Haha! Gnocl would be one hell of an extension to wrap, trust me! I've
> > > > done the wrapping for chameleon which "looks like tk" in terms of
> > > > functionning, but gnocl, nope, you can't.. you'd need to wrap almost
> > > > everything! you can't use grid, you can't use pack... we'll need to
> > > > rewrite the whole packing algorithm, because you don't pack widgets,
> > > > you instead have to put them in vertical/horizontal boxes... also, I
> > > > think it doesn't support the .toplevel.child path system for windows..
> > > > but anyways, from a quick look it seems to be unfeasible, or a 1 year
> > > > project :P About having a different executable, it's a good idea.. but
> > > > you know what it means ? it actually means that you need to write an
> > > > interpreter!!! not only you need to interpret the code, do syntax
> > > > checking, make sure all the syntax is correct (uplevels, subst, upvars,
> > > > {$whatever} vs. [list $whatever], etc...) but also implement the event
> > > > loop (although gtk's could be used) and implement the system for
> > > > loading extensions, etc.. all this, without decreasing the performance
> > > > of the already well optimized tcl/tk's code... I guess you could use
> > > > Tk_Init and Tcl_init which will make your program into a 'wish' program
> > > > (with 2 lines of code, you get a custom interpreter!) but then you'll
> > > > have to override all tk widgets, which makes it simply the same as
> > > > creating an extension, doing a load, and a namespace import ::gtk::* I
> > > > think it would be a great idea from a concept view, but a reallly bad
> > > > idea from a development point of view!
> > >
> > > Why do you want to rewrite things already written ? Anyway, Tile has a
> > > tile-qt theme and I think it would be better to rewrite the Tk's GUI part
> > > to make it use GTK. Not a huge work but not a work for aMsn... ;)
> > > Anyway, I think that it could be merged after in Tcl/Tk core...
> > > Phil
> > >
> > > > Take care
> > > > KaKaRoTo
> > > >
> > > > On Fri, Mar 24, 2006 at 12:47:25PM +0100, Karel Demeyer wrote:
> > > > > If someone wants to do it anyway, what about wrapping gnocl
> > > > > ( http://www.dr-baum.net/gnocl/ ) in an amsn plugin so it renames tk
> > > > > calls to gnocl calls ?  I think it won't be such a big thing anyway
> > > > > ... But gnocl doesn't work for me, I cann compile it but it crashes
> > > > > on me every time.  If it doesn't for otehr poeple it could be worth
> > > > > the work.
> > > > >
> > > > > Op vr, 24-03-2006 te 12:11 +0100, schreef NoWhereMan:
> > > > > > ----- Original Message -----
> > > > > > From: "Harry Vennik" < [EMAIL PROTECTED]>
> > > > > >
> > > > > > [...]
> > > > > >
> > > > > > > I'd really like a wishgtk and (even more) a wishqt, and I'd like
> > > > > > > to contribute
> > > > > > > to its development, if such is started!
> > > > > >
> > > > > > there is a "gtk-qt" project providing qt look to gtk apps, while
> > > > > > the opposite doesn't exist; also gtk under windows looks good; so
> > > > > > I'd tend to vote for gtk. Anyway I think such a project would be
> > > > > > just too complex :) And... wasn't there a faq for this? ;)
> > > > > >
> > > > > > --
> > > > > > _____/\/o\/\/here/\/\an_____
> > > > > > NoWhereBlog: www.nowhereland.it
> > > > > > deviantArt: http://nowhereland.deviantart.com
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > > -------------------------------------------------------
> > > > > > This SF.Net email is sponsored by xPML, a groundbreaking scripting
> > > > > > language that extends applications into web and mobile media.
> > > > > > Attend the live webcast and join the prime developer group breaking
> > > > > > into this new coding territory!
> > > > > > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=1
> > > > > >2164 2 _______________________________________________
> > > > > > Amsn-devel mailing list
> > > > > > Amsn-devel@lists.sourceforge.net
> > > > > > https://lists.sourceforge.net/lists/listinfo/amsn-devel
> > > > >
> > > > > -------------------------------------------------------
> > > > > This SF.Net email is sponsored by xPML, a groundbreaking scripting
> > > > > language that extends applications into web and mobile media. Attend
> > > > > the live webcast and join the prime developer group breaking into
> > > > > this new coding territory!
> > > > > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121
> > > > >642 _______________________________________________
> > > > > Amsn-devel mailing list
> > > > > Amsn-devel@lists.sourceforge.net
> > > > > https://lists.sourceforge.net/lists/listinfo/amsn-devel
> > > >
> > > > -------------------------------------------------------
> > > > This SF.Net email is sponsored by xPML, a groundbreaking scripting
> > > > language that extends applications into web and mobile media. Attend
> > > > the live webcast and join the prime developer group breaking into this
> > > > new coding territory!
> > > > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=12164
> > > >2 _______________________________________________
> > > > Amsn-devel mailing list
> > > > Amsn-devel@lists.sourceforge.net
> > > > https://lists.sourceforge.net/lists/listinfo/amsn-devel
> > >
> > > -------------------------------------------------------
> > > This SF.Net email is sponsored by xPML, a groundbreaking scripting
> > > language that extends applications into web and mobile media. Attend the
> > > live webcast and join the prime developer group breaking into this new
> > > coding territory!
> > > http://sel.as-us.falkag.net/sel?cmd=lnk&kid0944&bid$1720&dat1642
> > > _______________________________________________
> > > Amsn-devel mailing list
> > > Amsn-devel@lists.sourceforge.net
> > > https://lists.sourceforge.net/lists/listinfo/amsn-devel
> >
> > -------------------------------------------------------
> > This SF.Net email is sponsored by xPML, a groundbreaking scripting language
> > that extends applications into web and mobile media. Attend the live
> > webcast and join the prime developer group breaking into this new coding
> > territory!
> > http://sel.as-us.falkag.net/sel?cmd=lnk&kid0944&bid$1720&dat1642
> > _______________________________________________
> > Amsn-devel mailing list
> > Amsn-devel@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/amsn-devel
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by xPML, a groundbreaking scripting language
> that extends applications into web and mobile media. Attend the live webcast
> and join the prime developer group breaking into this new coding territory!
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
> _______________________________________________
> Amsn-devel mailing list
> Amsn-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/amsn-devel


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmdlnk&kid0944&bid$1720&dat1642
_______________________________________________
Amsn-devel mailing list
Amsn-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/amsn-devel



--
Bruno Costa
:wq

Reply via email to