gtk2/docs/reference/gtk/tmpl/gtkrc.sgml

856 lines
24 KiB
Plaintext
Raw Normal View History

1999-08-16 18:51:52 +00:00
<!-- ##### SECTION Title ##### -->
Resource Files
<!-- ##### SECTION Short_Description ##### -->
Routines for handling resource files
<!-- ##### SECTION Long_Description ##### -->
<para>
GTK+ provides resource file mechanism for configuring
various aspects of the operation of a GTK+ program
at runtime.
</para>
<refsect2><title>Default files</title>
<para>
An application can cause GTK+ to parse a specific RC
file by calling gtk_rc_parse(). In addition to this,
certain files will be read at the end of gtk_init().
Unless modified, the files looked for will be <filename>.gtkrc</filename>
in the users home directory, and
<filename>$localstatedir/gtk/gtkrc</filename>
(<literal>$localstatedir</literal> defaults to
<filename>/usr/local/etc</filename>).
</para>
<para>
The set of these <firstterm>default</firstterm> files
can be retrieved with gtk_rc_get_default_files()
and modified with gtk_rc_add_default_file() and
gtk_rc_set_default_files().
</para>
<para>
For each default file, in addition to the file itself,
GTK+ will look for a locale-specific file that will
be parsed in addition to the main file. For instance,
if <literal>LANG</literal> is set to <literal>ja_JP.ujis</literal>,
when loading the default file <filename>~/.gtkrc</filename>
then GTK+ looks for <filename>~/.gtkrc.ja_JP.ujis</filename>,
<filename>~/.gtkrc.ja_JP</filename>, and
<filename>~/.gtkrc.ja</filename>, and parses the
first one it finds.
</para>
</refsect2>
<refsect2><title>Pathnames and patterns</title>
<para>
A resource file defines a number of styles and key bindings and
attaches them to particular widgets. The attachment is done
by the <literal>widget</literal>, <literal>widget_class</literal>,
and <literal>class</literal> declarations. As an example
of such a statement:
<informalexample><programlisting>
widget "mywindow.*.GtkEntry" style "my-entry-class"
</programlisting></informalexample>
attaches the style <literal>"my-entry-class"</literal>
to all widgets whose <firstterm>widget class</firstterm>
matches the <firstterm>pattern</firstterm>
<literal>"mywindow.*.GtkEntry"</literal>.
</para>
<para>
The patterns here are given in the standard shell glob
syntax. The <literal>"?"</literal> wildcard matches
any character, while <literal>"*"</literal> matches
zero or more of any character. The three types of
matching are against the widget path, the
<firstterm>class path</firstterm> and the class
hierarchy. Both the widget and the class paths consists of a
<literal>"."</literal> separated list of all the
parents of the widget and the widget itself from
outermost to innermost. The difference is that in
the widget path, the name assigned by
<function>gtk_widget_set_name()</function> is used
if present, otherwise the class name of the widget, while
for the widget path, the class name is always used.
</para>
<para>
So, if you have a <classname>GtkEntry</classname> named
<literal>"myentry"</literal>, inside of a of a window
named <literal>"mywindow"</literal>, then the
widget path is: <literal>"mwindow.GtkHBox.myentry"</literal>
while the class path is: <literal>"GtkWindow.GtkHBox.GtkEntry"</literal>.
</para>
<para>
Matching against class is a little different. The pattern
match is done against all class names in the widgets
class hierarchy (not the layout hierarchy) in sequence, so the
pattern:
<informalexample><programlisting>
class "GtkButton" style "my-style"
</programlisting></informalexample>
will match not just <classname>GtkButton</classname> widgets,
but also <classname>GtkToggleButton</classname> and
<classname>GtkCheckButton</classname> widgets, since
those classes derive from <classname>GtkButton</classname>.
</para>
</refsect2>
1999-08-16 18:51:52 +00:00
<refsect2><title>Toplevel declarations</title>
<para>
An RC file is a text file which is composed of a sequence
of declarations. '#' characters delimit comments and
the portion of a line after a '#' is ignored when parsing
an RC file.
</para>
<para>
The possible toplevel declarations are:
<variablelist>
<varlistentry>
<term><literal>binding <replaceable>name</replaceable>
{ ... }</literal></term>
<listitem>
<para>Declare a binding set</para>
</listitem>
</varlistentry>
<varlistentry>
<term><literal>class <replaceable>pattern</replaceable>
[ style | binding [ : <replaceable>priority</replaceable> ]]
<replaceable>name</replaceable></literal></term>
<listitem>
<para>Specify a style or binding set for a particular
branch of the inheritance hierarchy.</para>
1999-08-16 18:51:52 +00:00
</listitem>
</varlistentry>
<varlistentry>
<term><literal>include <replaceable>filename</replaceable></literal></term>
<listitem>
<para>Parse another file at this point</para>
</listitem>
</varlistentry>
<varlistentry>
<term><literal>module_path <replaceable>path></replaceable></literal></term>
<listitem>
<para>Sets a path (a list of directories separated
by colons) that will be searched for theme engines referenced in
RC files.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><literal>pixmap_path <replaceable>path></replaceable></literal></term>
<listitem>
<para>Sets a path (a list of directories separated
by colons) that will be searched for pixmaps referenced in
RC files.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><literal>style <replaceable>name</replaceable> [ =
<replaceable>parent</replaceable> ] { ... }</literal></term>
<listitem>
<para>Declare a style</para>
</listitem>
</varlistentry>
<varlistentry>
<term><literal>widget <replaceable>pattern</replaceable>
[ style | binding [ : <replaceable>priority</replaceable> ]]
<replaceable>name</replaceable></literal></term>
<listitem>
<para>Specify a style or binding set for a particular
group of widgets by matching on the widget pathname.</para>
1999-08-16 18:51:52 +00:00
</listitem>
</varlistentry>
<varlistentry>
<term><literal>widget_class <replaceable>pattern</replaceable>
[ style | binding [ : <replaceable>priority</replaceable> ]]
<replaceable>name</replaceable></literal></term>
<listitem>
<para>Specify a style or binding set for a particular
group of widgets by matching on the class pathname.</para>
1999-08-16 18:51:52 +00:00
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect2>
1999-08-16 18:51:52 +00:00
<refsect2><title>Styles</title>
<para>
A RC style is specified by a <literal>style</literal>
declaration in a RC file, and then bound to widgets
with a <literal>widget</literal>, <literal>widget_class</literal>,
or <literal>class</literal> declaration. All styles
applying to a particular widget are composited together
with <literal>widget</literal> declarations overriding
<literal>widget_class</literal> declarations which, in
turn, override <literal>class</literal> declarations.
1999-08-16 18:51:52 +00:00
Within each type of declaration, later declarations override
earlier ones.
</para>
<para>
Within a <literal>style</literal> declaration, the possible
elements are:
<variablelist>
<varlistentry>
<term><literal>bg[<replaceable>state</replaceable>] =
<replaceable>color</replaceable></literal></term>
<listitem>
<para>
Set color used for the background of most widgets.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><literal>fg[<replaceable>state</replaceable>] =
<replaceable>color</replaceable></literal></term>
<listitem>
<para>
Set color used for the foreground of most widgets.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><literal>base[<replaceable>state</replaceable>] =
<replaceable>color</replaceable></literal></term>
<listitem>
<para>
Set color used for the background of widgets displaying
editable text. This color is used for the background
of, among others, #GtkText, #GtkEntry, #GtkList, and #GtkClist.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><literal>text[<replaceable>state</replaceable>] =
<replaceable>color</replaceable></literal></term>
<listitem>
<para>
Set color used for foreground of widgets using
<literal>base</literal> for the background color.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><literal>bg_pixmap[<replaceable>state</replaceable>] =
<replaceable>pixmap</replaceable></literal></term>
1999-08-16 18:51:52 +00:00
<listitem>
<para>
Set a background pixmap to be used in place of
the <literal>bg</literal> color (or for #GtkText,
in place of the <literal>base</literal> color. The special
value "&lt;parent&gt;" may be used to indicate that the widget should
use the same background pixmap as its parent. The special value
"&lt;none&gt;" may be used to indicate no background pixmap.
1999-08-16 18:51:52 +00:00
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><literal>font = <replaceable>font</replaceable></literal></term>
<listitem>
<para>
Set the font for a widget.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><literal>fontset = <replaceable>font</replaceable></literal></term>
<listitem>
<para>
Set the fontset for a widget. Overrides any
<literal>font</literal> declarations.
</para>
</listitem>
</varlistentry>
<varlistentry>
create some stock buttons with the default accel group (create_image): 2000-10-04 Havoc Pennington <hp@redhat.com> * gtk/testgtk.c (create_buttons): create some stock buttons with the default accel group (create_image): test some new GtkImage features (make_message_dialog): test GtkMessageDialog (create_modal_window): fix someone's bizzarro indentation * gtk/gtkwindow.h, gtk/gtkwindow.c: Implement GTK_WIN_POS_CENTER_ON_PARENT. Add "destroy with parent" setting, which means the window goes away with its transient parent. (gtk_window_get_default_accel_group): get the default accel group for the window. (gtk_window_set_destroy_with_parent): set/unset destroy with parent flag (gtk_window_read_rcfiles): invalidate icon set caches after reloading rcfiles * gtk/gtkenums.h (GtkWindowPosition): add GTK_WIN_POS_CENTER_ON_PARENT, which centers a dialog on its parent window when the dialog is mapped for the first time. * gtk/gtkmessagedialog.h, gtk/gtkmessagedialog.c: Add a simple message dialog class * gtk/gtkdialog.c (gtk_dialog_init): Connect delete event handler to emit response signal, and maybe later it would honor a hide_on_delete flag - though that isn't there yet. Set border width on the vbox to 2, so we get some padding. Use a button box for the action area. (gtk_dialog_key_press): synthesize a delete event if Esc is pressed and the GtkWidget key press handler didn't handle the escape key. (gtk_dialog_new_with_buttons): new function creates a dialog with some default buttons in it. (gtk_dialog_add_action_widget): add an activatable widget as a button in the dialog - you can also add a non-activatable widget by accessing the action area directly. (gtk_dialog_add_button): add a simple button - stock ID or label - to the action area (gtk_dialog_response): emit response signal (gtk_dialog_run): block waiting for the dialog, return the response. Override normal delete_event behavior, so that delete_event does nothing inside gtk_dialog_run(). * gtk/gtkdialog.h, gtk/gtkdialog.c: Add "response" signal emitted when an action widget is clicked or the dialog gets delete_event * gtk/gtk.h: add gtkmessagedialog.h * gtk/Makefile.am: add gtkmessagedialog.[hc] 2000-10-20 Havoc Pennington <hp@redhat.com> * gtk/gtk-sections.txt: Add dialog docs
2000-10-20 23:14:41 +00:00
<term><literal>stock[<replaceable>"stock-id"</replaceable>] = { <replaceable>icon source specifications</replaceable> }</literal></term>
<listitem>
<para>
Defines the icon for a stock item.
</para>
</listitem>
</varlistentry>
1999-08-16 18:51:52 +00:00
</variablelist>
</para>
<para>
The colors and background pixmaps are specified as a function of the
state of the widget. The states are:
<variablelist>
<varlistentry>
<term><literal>NORMAL</literal></term>
<listitem>
<para>
A color used for a widget in its normal state
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><literal>ACTIVE</literal></term>
<listitem>
<para>
A variant of the <literal>NORMAL</literal> color used when the
widget is in the %GTK_STATE_ACTIVE state, and also for
the trough of a ScrollBar, tabs of a NoteBook
other than the current tab and similar areas.
Frequently, this should be a darker variant
of the <literal>NORMAL</literal> color.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><literal>PRELIGHT</literal></term>
<listitem>
<para>
A color used for widgets in the %GTK_STATE_PRELIGHT state. This
state is the used for Buttons and MenuItems
that have the mouse cursor over them, and for
their children.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><literal>SELECTED</literal></term>
<listitem>
<para>
A color used to highlight data selected by the user.
for instance, the selected ListItems in a List widget, and the
selection in an Editable widget.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><literal>INSENSITIVE</literal></term>
<listitem>
<para>
A color used for the background of widgets that have
create some stock buttons with the default accel group (create_image): 2000-10-04 Havoc Pennington <hp@redhat.com> * gtk/testgtk.c (create_buttons): create some stock buttons with the default accel group (create_image): test some new GtkImage features (make_message_dialog): test GtkMessageDialog (create_modal_window): fix someone's bizzarro indentation * gtk/gtkwindow.h, gtk/gtkwindow.c: Implement GTK_WIN_POS_CENTER_ON_PARENT. Add "destroy with parent" setting, which means the window goes away with its transient parent. (gtk_window_get_default_accel_group): get the default accel group for the window. (gtk_window_set_destroy_with_parent): set/unset destroy with parent flag (gtk_window_read_rcfiles): invalidate icon set caches after reloading rcfiles * gtk/gtkenums.h (GtkWindowPosition): add GTK_WIN_POS_CENTER_ON_PARENT, which centers a dialog on its parent window when the dialog is mapped for the first time. * gtk/gtkmessagedialog.h, gtk/gtkmessagedialog.c: Add a simple message dialog class * gtk/gtkdialog.c (gtk_dialog_init): Connect delete event handler to emit response signal, and maybe later it would honor a hide_on_delete flag - though that isn't there yet. Set border width on the vbox to 2, so we get some padding. Use a button box for the action area. (gtk_dialog_key_press): synthesize a delete event if Esc is pressed and the GtkWidget key press handler didn't handle the escape key. (gtk_dialog_new_with_buttons): new function creates a dialog with some default buttons in it. (gtk_dialog_add_action_widget): add an activatable widget as a button in the dialog - you can also add a non-activatable widget by accessing the action area directly. (gtk_dialog_add_button): add a simple button - stock ID or label - to the action area (gtk_dialog_response): emit response signal (gtk_dialog_run): block waiting for the dialog, return the response. Override normal delete_event behavior, so that delete_event does nothing inside gtk_dialog_run(). * gtk/gtkdialog.h, gtk/gtkdialog.c: Add "response" signal emitted when an action widget is clicked or the dialog gets delete_event * gtk/gtk.h: add gtkmessagedialog.h * gtk/Makefile.am: add gtkmessagedialog.[hc] 2000-10-20 Havoc Pennington <hp@redhat.com> * gtk/gtk-sections.txt: Add dialog docs
2000-10-20 23:14:41 +00:00
been set insensitive with gtk_widget_set_sensitive()
1999-08-16 18:51:52 +00:00
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
<para>
Colors can be specified as a string <literal>"&hash;rrrrggggbbbb"</literal>,
<literal>"&hash;rrrgggbbb"</literal>, <literal>"&hash;rrggbb"</literal>,
or <literal>"&hash;rgb"</literal>, where <literal>r</literal>
1999-08-16 18:51:52 +00:00
<literal>g</literal>, and <literal>b</literal> are
hex digits, or they can be specified as a triplet of floats
<literal>{ <replaceable>r</replaceable>, <replaceable>g</replaceable>,
<replaceable>b</replaceable>}</literal>.
</para>
<para>
In a <literal>stock</literal> definition, icon sources are specified as a
4-tuple of image filename, text direction, widget state, and size, in that
order. Each icon source specifies an image filename to use with a given
direction, state, and size. The <literal>*</literal> character can be used as a
wildcard, and if direction/state/size are omitted they default to
<literal>*</literal>. So for example, the following specifies different icons to
use for left-to-right and right-to-left languages:
<informalexample><programlisting>
stock["my-stock-item"] =
{
{ "itemltr.png", LTR, *, * },
{ "itemrtl.png", RTL, *, * }
}
</programlisting></informalexample>
This could be abbreviated as follows:
<informalexample><programlisting>
stock["my-stock-item"] =
{
{ "itemltr.png", LTR },
{ "itemrtl.png", RTL }
}
</programlisting></informalexample>
</para>
<para>
You can specify custom icons for specific sizes, as follows:
<informalexample><programlisting>
stock["my-stock-item"] =
{
{ "itemmenusize.png", *, *, "gtk-menu" },
{ "itemtoolbarsize.png", *, *, "gtk-large-toolbar" }
{ "itemgeneric.png" } /* implicit *, *, * as a fallback */
}
</programlisting></informalexample>
The sizes that come with GTK+ itself are <literal>"gtk-menu"</literal>,
<literal>"gtk-small-toolbar"</literal>, <literal>"gtk-large-toolbar"</literal>,
<literal>"gtk-button"</literal>, <literal>"gtk-dialog"</literal>. Applications
can define other sizes.
</para>
<para>
It's also possible to use custom icons for a given state, for example:
<informalexample><programlisting>
stock["my-stock-item"] =
{
{ "itemprelight.png", *, PRELIGHT },
{ "iteminsensitive.png", *, INSENSITIVE },
{ "itemgeneric.png" } /* implicit *, *, * as a fallback */
}
</programlisting></informalexample>
</para>
<para>
When selecting an icon source to use, GTK+ will consider text direction most
important, state second, and size third. It will select the best match based on
those criteria. If an attribute matches exactly (e.g. you specified
<literal>PRELIGHT</literal> or specified the size), GTK+ won't modify the image;
if the attribute matches with a wildcard, GTK+ will scale or modify the image to
match the state and size the user requested.
</para>
1999-08-16 18:51:52 +00:00
</refsect2>
<refsect2><title>Key bindings</title>
<para>
Key bindings allow the user to specify actions to be
taken on particular key presses. The form of a binding
set declaration is:
</para>
<informalexample><programlisting>
1999-08-16 18:51:52 +00:00
binding <replaceable>name</replaceable> {
bind <replaceable>key</replaceable> {
<replaceable>signalname</replaceable> (<replaceable>param</replaceable>, ...)
...
}
...
}
</programlisting></informalexample>
1999-08-16 18:51:52 +00:00
<para>
<replaceable>key</replaceable> is a string consisting of a
series of modifiers followed by the name of a key. The
modifiers can be:
<simplelist>
<member><literal>&lt;alt&gt;</literal></member>
<member><literal>&lt;control&gt;</literal></member>
<member><literal>&lt;mod1&gt;</literal></member>
<member><literal>&lt;mod2&gt;</literal></member>
<member><literal>&lt;mod3&gt;</literal></member>
<member><literal>&lt;mod4&gt;</literal></member>
<member><literal>&lt;mod5&gt;</literal></member>
<member><literal>&lt;release&gt;</literal></member>
<member><literal>&lt;shft&gt;</literal></member>
<member><literal>&lt;shift&gt;</literal></member>
</simplelist>
<literal>&lt;shft&gt;</literal> is an alias for
<literal>&lt;shift&gt;</literal> and
<literal>&lt;alt&gt;</literal> is an alias for
<literal>&lt;mod1&gt;</literal>.
</para>
<para>
The action that is bound to the key is a sequence
of signal names (strings) followed by parameters for
each signal. The signals must be action signals.
(See gtk_signal_new()). Each parameter can be
a float, integer, string, or unquoted string
representing an enumeration value. The types of
the parameters specified must match the types of the
parameters of the signal.
</para>
<para>
Binding sets are connected to widgets in the
same manner as styles, with one addition.
A priority can be specified for each pattern,
and within each type of pattern, binding sets
override other binding sets first by priority,
and only then by order of specification. (Later
overrides earlier). The priorities that can
be specified are (highest to lowest):
<simplelist>
<member><literal>HIGHEST</literal></member>
<member><literal>RC</literal></member>
<member><literal>APPLICATION</literal></member>
<member><literal>GTK</literal></member>
<member><literal>LOWEST</literal></member>
</simplelist>
<literal>RC</literal> is the default for bindings
read from an RC file, <literal>APPLICATION</literal>
should be used for bindings an application sets
up, and <literal>GTK</literal> is used for bindings
that GTK+ creates internally.
</para>
</refsect2>
<!-- ##### SECTION See_Also ##### -->
<para>
</para>
<!-- ##### STRUCT GtkRcStyle ##### -->
<para>
The #GtkRcStyle structure is used to represent a set
of information about the appearance of a widget.
This can later be composited together with other
#GtkRcStyle structures to form a #GtkStyle.
</para>
@name:
@bg_pixmap_name:
@font_desc:
1999-08-16 18:51:52 +00:00
@color_flags:
@fg:
@bg:
@text:
@base:
@xthickness:
@ythickness:
<!-- ##### STRUCT GtkRcStyleClass ##### -->
<para>
</para>
1999-08-16 18:51:52 +00:00
<!-- ##### ENUM GtkRcFlags ##### -->
<para>
The #GtkRcFlags enumeration is used as a bitmask
to specify which fields of a #GtkRcStyle have been
set for each state.
</para>
<variablelist>
<varlistentry><term> %GTK_RC_FG </term>
<listitem>
<para>
If present, the foreground color has been set for this state.
</para>
</listitem>
</varlistentry>
<varlistentry><term> %GTK_RC_BG </term>
<listitem>
<para>
If present, the background color has been set for this state.
</para>
</listitem>
</varlistentry>
<varlistentry><term> %GTK_RC_TEXT </term>
<listitem>
<para>
If present, the text color has been set for this state.
</para>
</listitem>
</varlistentry>
<varlistentry><term> %GTK_RC_BASE </term>
<listitem>
<para>
If present, the base color has been set for this state.
</para>
</listitem>
</varlistentry>
</variablelist>
@GTK_RC_FG:
@GTK_RC_BG:
@GTK_RC_TEXT:
@GTK_RC_BASE:
<!-- ##### ENUM GtkRcTokenType ##### -->
<para>
The #GtkRcTokenType enumeration represents the tokens
in the RC file. It is exposed so that theme engines
can reuse these tokens when parsing the theme-engine
specific portions of a RC file.
</para>
@GTK_RC_TOKEN_INVALID:
@GTK_RC_TOKEN_INCLUDE:
@GTK_RC_TOKEN_NORMAL:
@GTK_RC_TOKEN_ACTIVE:
@GTK_RC_TOKEN_PRELIGHT:
@GTK_RC_TOKEN_SELECTED:
@GTK_RC_TOKEN_INSENSITIVE:
@GTK_RC_TOKEN_FG:
@GTK_RC_TOKEN_BG:
@GTK_RC_TOKEN_TEXT:
@GTK_RC_TOKEN_BASE:
@GTK_RC_TOKEN_XTHICKNESS:
@GTK_RC_TOKEN_YTHICKNESS:
1999-08-16 18:51:52 +00:00
@GTK_RC_TOKEN_FONT:
@GTK_RC_TOKEN_FONTSET:
@GTK_RC_TOKEN_FONT_NAME:
1999-08-16 18:51:52 +00:00
@GTK_RC_TOKEN_BG_PIXMAP:
@GTK_RC_TOKEN_PIXMAP_PATH:
@GTK_RC_TOKEN_STYLE:
@GTK_RC_TOKEN_BINDING:
@GTK_RC_TOKEN_BIND:
@GTK_RC_TOKEN_WIDGET:
@GTK_RC_TOKEN_WIDGET_CLASS:
@GTK_RC_TOKEN_CLASS:
@GTK_RC_TOKEN_LOWEST:
@GTK_RC_TOKEN_GTK:
@GTK_RC_TOKEN_APPLICATION:
Allow %NULL for style to mean "revert to default style" Tue Jun 26 19:39:03 2001 Owen Taylor <otaylor@redhat.com> * gtk/gtkwidget.c (gtk_widget_set_style): Allow %NULL for style to mean "revert to default style" * gtk/gtkwidget.[ch] (gtk_widget_set_rc_style, gtk_widget_restore_default_style): Make this functions deprecated aliases for gtk_widget_set_style (widget, NULL). * gtk/gtkwidget.[ch]: Remove: gtk_widget_set_default_style () gtk_widget_push_style () gtk_widget_pop_style () These functions interact are overriden by RC files, and thus virtually useless, and complicated. Fri Jun 22 18:49:48 2001 Owen Taylor <otaylor@redhat.com> * gtk/gtkrc.c: Add a GtkRcContext structure to hold most of the previous global variables in gtkrc.c. This is in preparation for multi-head, since each screen can have different GtkSettings and RC information. * gtk/gtkrc.[ch]: * gtk/gtkrc.h (struct _GtkRcStyleClass): Add a GtkSettings parameter to GtkRcStyle::parse. * gdk/x11/gdkevents-x11.c gtk/gtksettings.c gtk/gtkrc.c: Add two new settings gtk-theme-name, gtk-key-theme-name, for RC files that are loaded by name after reading the default RC files. * gtk/gtkrc.c: Allow priorities for styles, as wll as bindings. * gtk/gtkenums.h gtk/gtkrc.c: Add GTK_PATH_PRIO_THEME, and use it by default for RC files loaded via gtk-theme-name, gtk-key-theme-name. * gtk/gtkiconfactory.c (gtk_icon_source_set_filename) gtk/gtkrc.c (gtk_rc_parse_pixmap_path_string) tests/testgtkrc: Require pathnames to be absolute. * gtk/gtkrc.c gtk/gtkiconfactory.c: Look up the full filename for the source when parsing, since the operation of looking up a pixmap from an RC file depends on the parsing context. * gtk/gtkrc.c (gtk_rc_context_reparse_all): Automatically reset RC styles on all widgets when files are reparsed. * tests/testgtk.c (create_rc_file) gtk/gtkwindow.c (gtk_window_read_rcfiles): Simplify, now that gtk_rc_reparse_all() resets styles on all widgets itself. * gtk/gtkmain.c (gtk_get_default_language): Fix broken return value. * gtk/gtksettings.[ch] (gtk_settings_install_property[_ch]): Remove GtkSettings argument. * gtk/gtksettings.[ch] (gtk_settings_get_default): Rename from gtk_settings_get_global(). * gtk/gtkwidget.[ch]: Add a function gtk_widget_Get_settings() to get the appropriate GtkSettings for a widget. (For now, just gets the default GtkSetttings.) * gtk/gtkcolorsel.c gtk/gtkentry.c gtk/gtkmenu.c gtk/gtkmenubar.c gtk/gtktextview.c gtk/gtktoolbar.c: Fixes for GtkSettings changes. * gtk/gtkrc.[ch]: Add gtk_rc_get_style_by_paths() to allow getting a style for a path without actually having a widget. (Allows using a style for a subpart of a widget, for example.) * gtk/gtkrc.[ch]: Add gtk_rc_reparse_all_for_setting() to allow forcing the RC files to be reloaded for just one GtkSettings (not sure how useful this really is.) * gtk/gtkrc.h: Deprecate gtk_rc_add_widget_name/widget_class/class_style
2001-06-30 16:08:25 +00:00
@GTK_RC_TOKEN_THEME:
1999-08-16 18:51:52 +00:00
@GTK_RC_TOKEN_RC:
@GTK_RC_TOKEN_HIGHEST:
@GTK_RC_TOKEN_ENGINE:
@GTK_RC_TOKEN_MODULE_PATH:
@GTK_RC_TOKEN_IM_MODULE_PATH:
@GTK_RC_TOKEN_IM_MODULE_FILE:
Some updates 2000-10-18 Havoc Pennington <hp@redhat.com> * gtk/gtk-sections.txt: Some updates * gdk/gdk-sections.txt: remove GdkPixbufAlphaMode * gdk-pixbuf/gdk-pixbuf-sections.txt: Add new API, remove GdkPixbufClass/GdkAnimationClass since those are private * gdk-pixbuf/Makefile.am (IGNORE_HFILES): ignore more headers 2000-10-18 Havoc Pennington <hp@redhat.com> * gtk/gtktextiter.c (gtk_text_iter_forward_to_newline): Fix a bug where any number of empty lines would get skipped * gtk/gtktextiter.h: Remove padding from GtkTextIter; live on the edge. * gtk/gtktextiter.c (gtk_text_iter_make_surreal): enhance the warning about invalid iterators (explain more thoroughly) (gtk_text_iter_in_region): rename gtk_text_iter_in_range * gtk/gtktextview.c (FOCUS_EDGE_WIDTH): Make focus rectangle less big * demos/*.c: Add error handling * gtk/gtktextbuffer.c: don't modify const iterators * gtk/gdk-pixbuf-loader.c: Add full error handling here * gtk/gtkimage.c (gtk_image_set_from_file): ignore errors on file load * gtk/gtkiconfactory.c: Update to reflect addition of error handling to gdk-pixbuf loaders 2000-10-16 Havoc Pennington <hp@redhat.com> * gdk-pixbuf-io.c (gdk_pixbuf_get_module) (gdk_pixbuf_get_named_module) (gdk_pixbuf_load_module): add error reporting here also * make-inline-pixbuf.c (main): use GError * io-xpm.c: include unistd.h * gdk-pixbuf-util.c: include string.h * io-*.c: add error reporting * gdk-pixbuf-animation.c (gdk_pixbuf_animation_new_from_file): add error reporting * gdk-pixbuf-io.c (gdk_pixbuf_new_from_file): Add error reporting * gdk-pixbuf-io.h: Add GError** to load_increment and load methods * gdk-pixbuf-io.c (gdk_pixbuf_save) (gdk_pixbuf_savev): return a G_FILE_ERROR if we fail to write or close the file. * gdk-pixbuf.h: remove GDK_PIXBUF_ERROR_IO, instead we'll use G_FILE_ERROR_*. Rename enum to GdkPixbufError, properly following the GError naming rules. Add GError** to load functions.
2000-10-18 18:42:54 +00:00
@GTK_RC_TOKEN_STOCK:
@GTK_RC_TOKEN_LTR:
@GTK_RC_TOKEN_RTL:
1999-08-16 18:51:52 +00:00
@GTK_RC_TOKEN_LAST:
<!-- ##### FUNCTION gtk_rc_scanner_new ##### -->
<para>
</para>
@Returns:
1999-08-16 18:51:52 +00:00
<!-- ##### FUNCTION gtk_rc_get_style ##### -->
<para>
</para>
Allow %NULL for style to mean "revert to default style" Tue Jun 26 19:39:03 2001 Owen Taylor <otaylor@redhat.com> * gtk/gtkwidget.c (gtk_widget_set_style): Allow %NULL for style to mean "revert to default style" * gtk/gtkwidget.[ch] (gtk_widget_set_rc_style, gtk_widget_restore_default_style): Make this functions deprecated aliases for gtk_widget_set_style (widget, NULL). * gtk/gtkwidget.[ch]: Remove: gtk_widget_set_default_style () gtk_widget_push_style () gtk_widget_pop_style () These functions interact are overriden by RC files, and thus virtually useless, and complicated. Fri Jun 22 18:49:48 2001 Owen Taylor <otaylor@redhat.com> * gtk/gtkrc.c: Add a GtkRcContext structure to hold most of the previous global variables in gtkrc.c. This is in preparation for multi-head, since each screen can have different GtkSettings and RC information. * gtk/gtkrc.[ch]: * gtk/gtkrc.h (struct _GtkRcStyleClass): Add a GtkSettings parameter to GtkRcStyle::parse. * gdk/x11/gdkevents-x11.c gtk/gtksettings.c gtk/gtkrc.c: Add two new settings gtk-theme-name, gtk-key-theme-name, for RC files that are loaded by name after reading the default RC files. * gtk/gtkrc.c: Allow priorities for styles, as wll as bindings. * gtk/gtkenums.h gtk/gtkrc.c: Add GTK_PATH_PRIO_THEME, and use it by default for RC files loaded via gtk-theme-name, gtk-key-theme-name. * gtk/gtkiconfactory.c (gtk_icon_source_set_filename) gtk/gtkrc.c (gtk_rc_parse_pixmap_path_string) tests/testgtkrc: Require pathnames to be absolute. * gtk/gtkrc.c gtk/gtkiconfactory.c: Look up the full filename for the source when parsing, since the operation of looking up a pixmap from an RC file depends on the parsing context. * gtk/gtkrc.c (gtk_rc_context_reparse_all): Automatically reset RC styles on all widgets when files are reparsed. * tests/testgtk.c (create_rc_file) gtk/gtkwindow.c (gtk_window_read_rcfiles): Simplify, now that gtk_rc_reparse_all() resets styles on all widgets itself. * gtk/gtkmain.c (gtk_get_default_language): Fix broken return value. * gtk/gtksettings.[ch] (gtk_settings_install_property[_ch]): Remove GtkSettings argument. * gtk/gtksettings.[ch] (gtk_settings_get_default): Rename from gtk_settings_get_global(). * gtk/gtkwidget.[ch]: Add a function gtk_widget_Get_settings() to get the appropriate GtkSettings for a widget. (For now, just gets the default GtkSetttings.) * gtk/gtkcolorsel.c gtk/gtkentry.c gtk/gtkmenu.c gtk/gtkmenubar.c gtk/gtktextview.c gtk/gtktoolbar.c: Fixes for GtkSettings changes. * gtk/gtkrc.[ch]: Add gtk_rc_get_style_by_paths() to allow getting a style for a path without actually having a widget. (Allows using a style for a subpart of a widget, for example.) * gtk/gtkrc.[ch]: Add gtk_rc_reparse_all_for_setting() to allow forcing the RC files to be reloaded for just one GtkSettings (not sure how useful this really is.) * gtk/gtkrc.h: Deprecate gtk_rc_add_widget_name/widget_class/class_style
2001-06-30 16:08:25 +00:00
@widget:
@Returns:
1999-08-16 18:51:52 +00:00
<!-- ##### FUNCTION gtk_rc_get_style_by_paths ##### -->
<para>
</para>
@settings:
@widget_path:
@class_path:
@type:
@Returns:
1999-08-16 18:51:52 +00:00
<!-- ##### FUNCTION gtk_rc_add_widget_name_style ##### -->
<para>
Adds a RcStyle that will be looked up by a match against
1999-08-16 18:51:52 +00:00
the widget's pathname. This is equivalent to a:
<literal>
1999-08-16 18:51:52 +00:00
widget PATTERN style STYLE
</literal>
1999-08-16 18:51:52 +00:00
statement in a RC file.
</para>
@rc_style: the #GtkRcStyle to use for widgets matching @pattern
@pattern: the pattern
<!-- ##### FUNCTION gtk_rc_add_widget_class_style ##### -->
<para>
Adds a RcStyle that will be looked up by a match against
1999-08-16 18:51:52 +00:00
the widget's class pathname. This is equivalent to a:
<literal>
1999-08-16 18:51:52 +00:00
widget_class PATTERN style STYLE
</literal>
1999-08-16 18:51:52 +00:00
statement in a RC file.
</para>
@rc_style: the #GtkRcStyle to use for widgets matching @pattern
@pattern: the pattern
<!-- ##### FUNCTION gtk_rc_add_class_style ##### -->
<para>
Adds a RcStyle that will be looked up by a matching against
the class hierarchy of the widget. This is equivalent to a:
<literal>
1999-08-16 18:51:52 +00:00
class PATTERN style STYLE
</literal>
1999-08-16 18:51:52 +00:00
statement in a RC file.
</para>
@rc_style: the #GtkRcStyle to use for widgets deriving from @pattern
@pattern: the pattern
<!-- ##### FUNCTION gtk_rc_parse ##### -->
<para>
Parses a given resource file.
1999-08-16 18:51:52 +00:00
</para>
@filename: the filename of a file to parse.
<!-- ##### FUNCTION gtk_rc_parse_string ##### -->
<para>
Parses resource information directly from a string.
1999-08-16 18:51:52 +00:00
</para>
@rc_string: a string to parse.
<!-- ##### FUNCTION gtk_rc_reparse_all ##### -->
<para>
</para>
Allow %NULL for style to mean "revert to default style" Tue Jun 26 19:39:03 2001 Owen Taylor <otaylor@redhat.com> * gtk/gtkwidget.c (gtk_widget_set_style): Allow %NULL for style to mean "revert to default style" * gtk/gtkwidget.[ch] (gtk_widget_set_rc_style, gtk_widget_restore_default_style): Make this functions deprecated aliases for gtk_widget_set_style (widget, NULL). * gtk/gtkwidget.[ch]: Remove: gtk_widget_set_default_style () gtk_widget_push_style () gtk_widget_pop_style () These functions interact are overriden by RC files, and thus virtually useless, and complicated. Fri Jun 22 18:49:48 2001 Owen Taylor <otaylor@redhat.com> * gtk/gtkrc.c: Add a GtkRcContext structure to hold most of the previous global variables in gtkrc.c. This is in preparation for multi-head, since each screen can have different GtkSettings and RC information. * gtk/gtkrc.[ch]: * gtk/gtkrc.h (struct _GtkRcStyleClass): Add a GtkSettings parameter to GtkRcStyle::parse. * gdk/x11/gdkevents-x11.c gtk/gtksettings.c gtk/gtkrc.c: Add two new settings gtk-theme-name, gtk-key-theme-name, for RC files that are loaded by name after reading the default RC files. * gtk/gtkrc.c: Allow priorities for styles, as wll as bindings. * gtk/gtkenums.h gtk/gtkrc.c: Add GTK_PATH_PRIO_THEME, and use it by default for RC files loaded via gtk-theme-name, gtk-key-theme-name. * gtk/gtkiconfactory.c (gtk_icon_source_set_filename) gtk/gtkrc.c (gtk_rc_parse_pixmap_path_string) tests/testgtkrc: Require pathnames to be absolute. * gtk/gtkrc.c gtk/gtkiconfactory.c: Look up the full filename for the source when parsing, since the operation of looking up a pixmap from an RC file depends on the parsing context. * gtk/gtkrc.c (gtk_rc_context_reparse_all): Automatically reset RC styles on all widgets when files are reparsed. * tests/testgtk.c (create_rc_file) gtk/gtkwindow.c (gtk_window_read_rcfiles): Simplify, now that gtk_rc_reparse_all() resets styles on all widgets itself. * gtk/gtkmain.c (gtk_get_default_language): Fix broken return value. * gtk/gtksettings.[ch] (gtk_settings_install_property[_ch]): Remove GtkSettings argument. * gtk/gtksettings.[ch] (gtk_settings_get_default): Rename from gtk_settings_get_global(). * gtk/gtkwidget.[ch]: Add a function gtk_widget_Get_settings() to get the appropriate GtkSettings for a widget. (For now, just gets the default GtkSetttings.) * gtk/gtkcolorsel.c gtk/gtkentry.c gtk/gtkmenu.c gtk/gtkmenubar.c gtk/gtktextview.c gtk/gtktoolbar.c: Fixes for GtkSettings changes. * gtk/gtkrc.[ch]: Add gtk_rc_get_style_by_paths() to allow getting a style for a path without actually having a widget. (Allows using a style for a subpart of a widget, for example.) * gtk/gtkrc.[ch]: Add gtk_rc_reparse_all_for_setting() to allow forcing the RC files to be reloaded for just one GtkSettings (not sure how useful this really is.) * gtk/gtkrc.h: Deprecate gtk_rc_add_widget_name/widget_class/class_style
2001-06-30 16:08:25 +00:00
@Returns:
1999-08-16 18:51:52 +00:00
<!-- ##### FUNCTION gtk_rc_reparse_all_for_settings ##### -->
<para>
</para>
@settings:
@force_load:
@Returns:
1999-08-16 18:51:52 +00:00
<!-- ##### FUNCTION gtk_rc_add_default_file ##### -->
<para>
</para>
Allow %NULL for style to mean "revert to default style" Tue Jun 26 19:39:03 2001 Owen Taylor <otaylor@redhat.com> * gtk/gtkwidget.c (gtk_widget_set_style): Allow %NULL for style to mean "revert to default style" * gtk/gtkwidget.[ch] (gtk_widget_set_rc_style, gtk_widget_restore_default_style): Make this functions deprecated aliases for gtk_widget_set_style (widget, NULL). * gtk/gtkwidget.[ch]: Remove: gtk_widget_set_default_style () gtk_widget_push_style () gtk_widget_pop_style () These functions interact are overriden by RC files, and thus virtually useless, and complicated. Fri Jun 22 18:49:48 2001 Owen Taylor <otaylor@redhat.com> * gtk/gtkrc.c: Add a GtkRcContext structure to hold most of the previous global variables in gtkrc.c. This is in preparation for multi-head, since each screen can have different GtkSettings and RC information. * gtk/gtkrc.[ch]: * gtk/gtkrc.h (struct _GtkRcStyleClass): Add a GtkSettings parameter to GtkRcStyle::parse. * gdk/x11/gdkevents-x11.c gtk/gtksettings.c gtk/gtkrc.c: Add two new settings gtk-theme-name, gtk-key-theme-name, for RC files that are loaded by name after reading the default RC files. * gtk/gtkrc.c: Allow priorities for styles, as wll as bindings. * gtk/gtkenums.h gtk/gtkrc.c: Add GTK_PATH_PRIO_THEME, and use it by default for RC files loaded via gtk-theme-name, gtk-key-theme-name. * gtk/gtkiconfactory.c (gtk_icon_source_set_filename) gtk/gtkrc.c (gtk_rc_parse_pixmap_path_string) tests/testgtkrc: Require pathnames to be absolute. * gtk/gtkrc.c gtk/gtkiconfactory.c: Look up the full filename for the source when parsing, since the operation of looking up a pixmap from an RC file depends on the parsing context. * gtk/gtkrc.c (gtk_rc_context_reparse_all): Automatically reset RC styles on all widgets when files are reparsed. * tests/testgtk.c (create_rc_file) gtk/gtkwindow.c (gtk_window_read_rcfiles): Simplify, now that gtk_rc_reparse_all() resets styles on all widgets itself. * gtk/gtkmain.c (gtk_get_default_language): Fix broken return value. * gtk/gtksettings.[ch] (gtk_settings_install_property[_ch]): Remove GtkSettings argument. * gtk/gtksettings.[ch] (gtk_settings_get_default): Rename from gtk_settings_get_global(). * gtk/gtkwidget.[ch]: Add a function gtk_widget_Get_settings() to get the appropriate GtkSettings for a widget. (For now, just gets the default GtkSetttings.) * gtk/gtkcolorsel.c gtk/gtkentry.c gtk/gtkmenu.c gtk/gtkmenubar.c gtk/gtktextview.c gtk/gtktoolbar.c: Fixes for GtkSettings changes. * gtk/gtkrc.[ch]: Add gtk_rc_get_style_by_paths() to allow getting a style for a path without actually having a widget. (Allows using a style for a subpart of a widget, for example.) * gtk/gtkrc.[ch]: Add gtk_rc_reparse_all_for_setting() to allow forcing the RC files to be reloaded for just one GtkSettings (not sure how useful this really is.) * gtk/gtkrc.h: Deprecate gtk_rc_add_widget_name/widget_class/class_style
2001-06-30 16:08:25 +00:00
@filename:
1999-08-16 18:51:52 +00:00
<!-- ##### FUNCTION gtk_rc_get_default_files ##### -->
<para>
</para>
Allow %NULL for style to mean "revert to default style" Tue Jun 26 19:39:03 2001 Owen Taylor <otaylor@redhat.com> * gtk/gtkwidget.c (gtk_widget_set_style): Allow %NULL for style to mean "revert to default style" * gtk/gtkwidget.[ch] (gtk_widget_set_rc_style, gtk_widget_restore_default_style): Make this functions deprecated aliases for gtk_widget_set_style (widget, NULL). * gtk/gtkwidget.[ch]: Remove: gtk_widget_set_default_style () gtk_widget_push_style () gtk_widget_pop_style () These functions interact are overriden by RC files, and thus virtually useless, and complicated. Fri Jun 22 18:49:48 2001 Owen Taylor <otaylor@redhat.com> * gtk/gtkrc.c: Add a GtkRcContext structure to hold most of the previous global variables in gtkrc.c. This is in preparation for multi-head, since each screen can have different GtkSettings and RC information. * gtk/gtkrc.[ch]: * gtk/gtkrc.h (struct _GtkRcStyleClass): Add a GtkSettings parameter to GtkRcStyle::parse. * gdk/x11/gdkevents-x11.c gtk/gtksettings.c gtk/gtkrc.c: Add two new settings gtk-theme-name, gtk-key-theme-name, for RC files that are loaded by name after reading the default RC files. * gtk/gtkrc.c: Allow priorities for styles, as wll as bindings. * gtk/gtkenums.h gtk/gtkrc.c: Add GTK_PATH_PRIO_THEME, and use it by default for RC files loaded via gtk-theme-name, gtk-key-theme-name. * gtk/gtkiconfactory.c (gtk_icon_source_set_filename) gtk/gtkrc.c (gtk_rc_parse_pixmap_path_string) tests/testgtkrc: Require pathnames to be absolute. * gtk/gtkrc.c gtk/gtkiconfactory.c: Look up the full filename for the source when parsing, since the operation of looking up a pixmap from an RC file depends on the parsing context. * gtk/gtkrc.c (gtk_rc_context_reparse_all): Automatically reset RC styles on all widgets when files are reparsed. * tests/testgtk.c (create_rc_file) gtk/gtkwindow.c (gtk_window_read_rcfiles): Simplify, now that gtk_rc_reparse_all() resets styles on all widgets itself. * gtk/gtkmain.c (gtk_get_default_language): Fix broken return value. * gtk/gtksettings.[ch] (gtk_settings_install_property[_ch]): Remove GtkSettings argument. * gtk/gtksettings.[ch] (gtk_settings_get_default): Rename from gtk_settings_get_global(). * gtk/gtkwidget.[ch]: Add a function gtk_widget_Get_settings() to get the appropriate GtkSettings for a widget. (For now, just gets the default GtkSetttings.) * gtk/gtkcolorsel.c gtk/gtkentry.c gtk/gtkmenu.c gtk/gtkmenubar.c gtk/gtktextview.c gtk/gtktoolbar.c: Fixes for GtkSettings changes. * gtk/gtkrc.[ch]: Add gtk_rc_get_style_by_paths() to allow getting a style for a path without actually having a widget. (Allows using a style for a subpart of a widget, for example.) * gtk/gtkrc.[ch]: Add gtk_rc_reparse_all_for_setting() to allow forcing the RC files to be reloaded for just one GtkSettings (not sure how useful this really is.) * gtk/gtkrc.h: Deprecate gtk_rc_add_widget_name/widget_class/class_style
2001-06-30 16:08:25 +00:00
@Returns:
1999-08-16 18:51:52 +00:00
<!-- ##### FUNCTION gtk_rc_set_default_files ##### -->
<para>
</para>
Allow %NULL for style to mean "revert to default style" Tue Jun 26 19:39:03 2001 Owen Taylor <otaylor@redhat.com> * gtk/gtkwidget.c (gtk_widget_set_style): Allow %NULL for style to mean "revert to default style" * gtk/gtkwidget.[ch] (gtk_widget_set_rc_style, gtk_widget_restore_default_style): Make this functions deprecated aliases for gtk_widget_set_style (widget, NULL). * gtk/gtkwidget.[ch]: Remove: gtk_widget_set_default_style () gtk_widget_push_style () gtk_widget_pop_style () These functions interact are overriden by RC files, and thus virtually useless, and complicated. Fri Jun 22 18:49:48 2001 Owen Taylor <otaylor@redhat.com> * gtk/gtkrc.c: Add a GtkRcContext structure to hold most of the previous global variables in gtkrc.c. This is in preparation for multi-head, since each screen can have different GtkSettings and RC information. * gtk/gtkrc.[ch]: * gtk/gtkrc.h (struct _GtkRcStyleClass): Add a GtkSettings parameter to GtkRcStyle::parse. * gdk/x11/gdkevents-x11.c gtk/gtksettings.c gtk/gtkrc.c: Add two new settings gtk-theme-name, gtk-key-theme-name, for RC files that are loaded by name after reading the default RC files. * gtk/gtkrc.c: Allow priorities for styles, as wll as bindings. * gtk/gtkenums.h gtk/gtkrc.c: Add GTK_PATH_PRIO_THEME, and use it by default for RC files loaded via gtk-theme-name, gtk-key-theme-name. * gtk/gtkiconfactory.c (gtk_icon_source_set_filename) gtk/gtkrc.c (gtk_rc_parse_pixmap_path_string) tests/testgtkrc: Require pathnames to be absolute. * gtk/gtkrc.c gtk/gtkiconfactory.c: Look up the full filename for the source when parsing, since the operation of looking up a pixmap from an RC file depends on the parsing context. * gtk/gtkrc.c (gtk_rc_context_reparse_all): Automatically reset RC styles on all widgets when files are reparsed. * tests/testgtk.c (create_rc_file) gtk/gtkwindow.c (gtk_window_read_rcfiles): Simplify, now that gtk_rc_reparse_all() resets styles on all widgets itself. * gtk/gtkmain.c (gtk_get_default_language): Fix broken return value. * gtk/gtksettings.[ch] (gtk_settings_install_property[_ch]): Remove GtkSettings argument. * gtk/gtksettings.[ch] (gtk_settings_get_default): Rename from gtk_settings_get_global(). * gtk/gtkwidget.[ch]: Add a function gtk_widget_Get_settings() to get the appropriate GtkSettings for a widget. (For now, just gets the default GtkSetttings.) * gtk/gtkcolorsel.c gtk/gtkentry.c gtk/gtkmenu.c gtk/gtkmenubar.c gtk/gtktextview.c gtk/gtktoolbar.c: Fixes for GtkSettings changes. * gtk/gtkrc.[ch]: Add gtk_rc_get_style_by_paths() to allow getting a style for a path without actually having a widget. (Allows using a style for a subpart of a widget, for example.) * gtk/gtkrc.[ch]: Add gtk_rc_reparse_all_for_setting() to allow forcing the RC files to be reloaded for just one GtkSettings (not sure how useful this really is.) * gtk/gtkrc.h: Deprecate gtk_rc_add_widget_name/widget_class/class_style
2001-06-30 16:08:25 +00:00
@filenames:
1999-08-16 18:51:52 +00:00
<!-- ##### FUNCTION gtk_rc_parse_color ##### -->
<para>
Parses a color in the format expected in a RC file.
</para>
@scanner: a #GtkScanner
@color: a pointer to a #GtkColor structure in which to store the result
@Returns: %G_TOKEN_NONE if parsing suceeded, otherwise the token
that was expected but not found.
<!-- ##### FUNCTION gtk_rc_parse_state ##### -->
<para>
Parses a #GtkStateType variable from the format expected
in a RC file.
</para>
@scanner: a #GtkScanner (must be initialized for parsing an RC file)
@state: A pointer to a #GtkStateType variable in which to
store the result.
@Returns: %G_TOKEN_NONE if parsing suceeded, otherwise the token
that was expected but not found.
<!-- ##### FUNCTION gtk_rc_parse_priority ##### -->
<para>
Parses a #GtkPathPriorityType variable from the format expected
in a RC file.
</para>
@scanner: a #GtkScanner (must be initialized for parsing an RC file)
@priority: A pointer to #GtkPathPriorityType variable in which
to store the result.
@Returns: %G_TOKEN_NONE if parsing suceeded, otherwise the token
that was expected but not found.
<!-- ##### FUNCTION gtk_rc_find_module_in_path ##### -->
<para>
Looks up a file in the current module path.
</para>
@module_file: The name of the module to search for.
@Returns: The filename, if found. (Must be freed with g_free()),
otherwise %NULL.
<!-- ##### FUNCTION gtk_rc_find_pixmap_in_path ##### -->
<para>
</para>
@settings:
1999-08-16 18:51:52 +00:00
@scanner: a #GtkScanner. Used for printing out warning messages
if the file is not found.
@pixmap_file: The name of the file to search for.
@Returns: The filename, if found. (Must be freed with g_free()),
otherwise %NULL.
<!-- # Unused Parameters # -->
@context:
1999-08-16 18:51:52 +00:00
<!-- ##### FUNCTION gtk_rc_get_module_dir ##### -->
<para>
Returns the directory in which GTK+ will look for
theme engines.
</para>
@Returns: The directory. (Must be freed with g_free())
<!-- ##### FUNCTION gtk_rc_get_im_module_path ##### -->
<para>
</para>
@Returns:
<!-- ##### FUNCTION gtk_rc_get_im_module_file ##### -->
<para>
</para>
@Returns:
1999-08-16 18:51:52 +00:00
<!-- ##### FUNCTION gtk_rc_get_theme_dir ##### -->
<para>
Returns the standard directory in which themes should
be installed. (GTK+ does not actually use this directory
itself.)
</para>
@Returns: The directory. (Must be freed with g_free())
<!-- ##### FUNCTION gtk_rc_style_new ##### -->
<para>
Creates a new #GtkRcStyle with no fields set and
1999-08-16 18:51:52 +00:00
a reference count of 1.
</para>
@Returns: the newly-created #GtkRcStyle
1999-08-16 18:51:52 +00:00
<!-- ##### FUNCTION gtk_rc_style_copy ##### -->
<para>
</para>
@orig:
@Returns:
1999-08-16 18:51:52 +00:00
<!-- ##### FUNCTION gtk_rc_style_ref ##### -->
<para>
Increments the reference count of a #GtkRcStyle.
1999-08-16 18:51:52 +00:00
</para>
@rc_style: a #GtkRcStyle
<!-- ##### FUNCTION gtk_rc_style_unref ##### -->
<para>
Decrements the reference count of a #GtkRcStyle and
frees if the result is 0.
1999-08-16 18:51:52 +00:00
</para>
@rc_style: a #GtkRcStyle