[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Status of my GTK efforts.
From: |
Jan D. |
Subject: |
Re: Status of my GTK efforts. |
Date: |
Sun, 30 Dec 2001 18:13:28 +0100 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.7) Gecko/20011221 |
Richard Stallman wrote:
But the advantages if Emacs
used the GTK way would be (apart from portability), that one could write
Emacs themes to change the look and feel.
Could you explain this more? What is "the GTK way" to handle resources?
GTK uses different syntax from Xdefaults to begin with, here is an example:
style "eventbox" {
bg_pixmap[NORMAL] = "<parent>"
bg_pixmap[INSENSITIVE] = "<parent>"
bg_pixmap[PRELIGHT] = "<parent>"
bg_pixmap[SELECTED] = "<parent>"
bg_pixmap[ACTIVE] = "<parent>"
}
class "GtkEventBox" style "eventbox"
<parent> means copy from parent. You can also apply styles to named
widgets as well as to a whole class as is done here.
Apart from the states, this can also be done in Xdefaults. But you can
also redefine how the widget looks (I am no expert on this):
style "checkradiobutton" {
engine "pixmap" {
image
{
function = FLAT_BOX
recolorable = TRUE
file = "button5.png"
border = { 10,5,5,10 }
stretch = TRUE
}
}
}
This does not come automatically with Xdefaults.
Ignoring the second usage, there is nothing new in GTKs way of handling
resources. BUT, it is handeled by default and applied to appropriate
widgets, whereas Xdefaults is ignored (much as Motif widgets react to
Xdefaults automatically). So, if Emacs is to handle X resources as it
does now, Emacs would have to apply all Xdefaults stuff to the GTK
widgets by itself.
I gather that the preferred way for GTK users is to have a ~/.gtkrc,
this is read at startup. Also, each application can have its own
~/.app_gtkrc (or any other name), that the applcation reads explicitly
with gtk_rc_parse("/PATH/TO/.app_gtkrc");
Jan D.
- Re: Status of my GTK efforts., (continued)
Re: Status of my GTK efforts., Richard Stallman, 2001/12/25
- Re: Status of my GTK efforts., Jan D., 2001/12/25
- Re: Status of my GTK efforts., Richard Stallman, 2001/12/26
- Re: Status of my GTK efforts., Andrew Choi, 2001/12/26
- Re: Status of my GTK efforts., Jason Rumney, 2001/12/27
- Re: Status of my GTK efforts., Jan D., 2001/12/30
- Re: Status of my GTK efforts., Richard Stallman, 2001/12/31
Re: Status of my GTK efforts., Richard Stallman, 2001/12/26
Re: Status of my GTK efforts.,
Jan D. <=
Re: Status of my GTK efforts., Richard Stallman, 2001/12/31
Re: Status of my GTK efforts., Jan D., 2001/12/31