]> Pileus Git - ~andy/gtk/blob - docs/reference/gtk/tmpl/gtkrc.sgml
Add documentation about GtkSizeGroup.
[~andy/gtk] / docs / reference / gtk / tmpl / gtkrc.sgml
1 <!-- ##### SECTION Title ##### -->
2 Resource Files
3
4 <!-- ##### SECTION Short_Description ##### -->
5 Routines for handling resource files
6
7 <!-- ##### SECTION Long_Description ##### -->
8 <para>
9 GTK+ provides resource file mechanism for configuring
10 various aspects of the operation of a GTK+ program
11 at runtime.
12 </para>
13
14 <refsect2><title>Default files</title>
15 <para>
16 An application can cause GTK+ to parse a specific RC
17 file by calling gtk_rc_parse(). In addition to this,
18 certain files will be read at the end of gtk_init().
19 Unless modified, the files looked for will be <filename>.gtkrc</filename>
20 in the users home directory, and 
21 <filename>$localstatedir/gtk/gtkrc</filename> 
22 (<literal>$localstatedir</literal> defaults to 
23 <filename>/usr/local/etc</filename>).
24 </para>
25 <para>
26 The set of these <firstterm>default</firstterm> files
27 can be retrieved with gtk_rc_get_default_files()
28 and modified with gtk_rc_add_default_file() and
29 gtk_rc_set_default_files().
30 </para>
31 <para>
32 For each default file, in addition to the file itself,
33 GTK+ will look for a locale-specific file that will
34 be parsed in addition to the main file. For instance,
35 if <literal>LANG</literal> is set to <literal>ja_JP.ujis</literal>,
36 when loading the default file <filename>~/.gtkrc</filename>
37 then GTK+ looks for <filename>~/.gtkrc.ja_JP.ujis</filename>,
38 <filename>~/.gtkrc.ja_JP</filename>, and
39 <filename>~/.gtkrc.ja</filename>, and parses the
40 first one it finds.
41 </para>
42 </refsect2>
43
44 <refsect2><title>Pathnames and patterns</title>
45 <para>
46 A resource file defines a number of styles and key bindings and
47 attaches them to particular widgets. The attachment is done
48 by the <literal>widget</literal>, <literal>widget_class</literal>,
49 and <literal>class</literal> declarations. As an example
50 of such a statement:
51 <programlisting>
52 widget "mywindow.*.GtkEntry" style "my-entry-class"
53 </programlisting>
54 attaches the style <literal>"my-entry-class"</literal>
55 to all widgets whose <firstterm>widget class</firstterm>
56 matches the <firstterm>pattern</firstterm>
57 <literal>"mywindow.*.GtkEntry"</literal>.
58 </para>
59 <para>
60 The patterns here are given in the standard shell glob
61 syntax. The <literal>"?"</literal> wildcard matches
62 any character, while <literal>"*"</literal> matches
63 zero or more of any character. The three types of
64 matching are against the widget path, the
65 <firstterm>class path</firstterm> and the class
66 heirarchy. Both the widget and the class paths consists of a
67 <literal>"."</literal> separated list of all the
68 parents of the widget and the widget itself from
69 outermost to innermost. The difference is that in
70 the widget path, the name assigned by
71 <function>gtk_widget_set_name()</function> is used
72 if present, otherwise the class name of the widget, while
73 for the widget path, the class name is always used.
74 </para>
75 <para>
76 So, if you have a <classname>GtkEntry</classname> named
77 <literal>"myentry"</literal>, inside of a of a window
78 named <literal>"mywindow"</literal>, then the
79 widget path is:
80 <programlisting>
81 "mwindow.GtkHBox.myentry"
82 </programlisting>
83 while the class path is:
84 <programlisting>
85 "GtkWindow.GtkHBox.GtkEntry"
86 </programlisting>
87 </para>
88 <para>
89 Matching against class is a little different. The pattern
90 match is done against all class names in the widgets
91 class heirarchy (not the layout heirarchy) in sequence, so the
92 pattern:
93 <programlisting>
94 class "GtkButton" style "my-style"
95 </programlisting>
96 will match not just <classname>GtkButton</classname> widgets,
97 but also <classname>GtkToggleButton</classname> and
98 <classname>GtkCheckButton</classname> widgets, since
99 those classes derive from <classname>GtkButton</classname>.
100 </para>
101 </refsect2>
102
103 <refsect2><title>Toplevel declarations</title>
104 <para>
105 An RC file is a text file which is composed of a sequence
106 of declarations. '#' characters delimit comments and
107 the portion of a line after a '#' is ignored when parsing
108 an RC file.
109 </para>
110
111 <para>
112 The possible toplevel declarations are:
113
114 <variablelist>
115   <varlistentry>
116     <term><literal>binding <replaceable>name</replaceable>
117      { ... }</literal></term>
118     <listitem>
119       <para>Declare a binding set</para>
120     </listitem>
121   </varlistentry>
122   <varlistentry>
123     <term><literal>class <replaceable>pattern</replaceable> 
124           [ style | binding [ : <replaceable>priority</replaceable> ]]
125           <replaceable>name</replaceable></literal></term>
126     <listitem>
127      <para>Specify a style or binding set for a particular
128      branch of the inheritance heirarchy.</para>
129     </listitem>
130   </varlistentry>
131   <varlistentry>
132     <term><literal>include <replaceable>filename</replaceable></literal></term>
133     <listitem>
134       <para>Parse another file at this point</para>
135     </listitem>
136   </varlistentry>
137   <varlistentry>
138     <term><literal>module_path <replaceable>path></replaceable></literal></term>
139     <listitem>
140       <para>Sets a path (a list of directories separated
141       by colons) that will be searched for theme engines referenced in
142       RC files.</para>
143     </listitem>
144   </varlistentry>
145   <varlistentry>
146     <term><literal>pixmap_path <replaceable>path></replaceable></literal></term>
147     <listitem>
148       <para>Sets a path (a list of directories separated
149       by colons) that will be searched for pixmaps referenced in
150       RC files.</para>
151     </listitem>
152   </varlistentry>
153   <varlistentry>
154     <term><literal>style <replaceable>name</replaceable> [ =
155     <replaceable>parent</replaceable> ] { ... }</literal></term>
156     <listitem>
157       <para>Declare a style</para>
158     </listitem>
159   </varlistentry>
160   <varlistentry>
161     <term><literal>widget <replaceable>pattern</replaceable> 
162           [ style | binding [ : <replaceable>priority</replaceable> ]]
163           <replaceable>name</replaceable></literal></term>
164     <listitem>
165      <para>Specify a style or binding set for a particular
166      group of widgets by matching on the widget pathname.</para>
167     </listitem>
168   </varlistentry>
169   <varlistentry>
170     <term><literal>widget_class <replaceable>pattern</replaceable> 
171           [ style | binding [ : <replaceable>priority</replaceable> ]]
172           <replaceable>name</replaceable></literal></term>
173     <listitem>
174      <para>Specify a style or binding set for a particular
175      group of widgets by matching on the class pathname.</para>
176     </listitem>
177   </varlistentry>
178 </variablelist>
179 </para>
180 </refsect2>
181
182 <refsect2><title>Styles</title>
183 <para>
184 A RC style is specified by a <literal>style</literal> 
185 declaration in a RC file, and then bound to widgets
186 with a <literal>widget</literal>, <literal>widget_class</literal>,
187 or <literal>class</literal> declaration. All styles
188 applying to a particular widget are composited together
189 with <literal>widget</literal> declarations overriding
190 <literal>widget_class</literal> declarations which, in
191 turn, override <literal>widget</literal> declarations.
192 Within each type of declaration, later declarations override
193 earlier ones.
194 </para>
195
196 <para>
197 Within a <literal>style</literal> declaration, the possible
198 elements are:
199
200 <variablelist>
201   <varlistentry>
202     <term><literal>bg[<replaceable>state</replaceable>] =
203       <replaceable>color</replaceable></literal></term>
204      <listitem>
205        <para>
206          Set color used for the background of most widgets.
207        </para>
208      </listitem>
209   </varlistentry>
210   <varlistentry>
211     <term><literal>fg[<replaceable>state</replaceable>] =
212       <replaceable>color</replaceable></literal></term>
213      <listitem>
214        <para>
215          Set color used for the foreground of most widgets.
216        </para>
217      </listitem>
218   </varlistentry>
219   <varlistentry>
220     <term><literal>base[<replaceable>state</replaceable>] =
221       <replaceable>color</replaceable></literal></term>
222      <listitem>
223        <para>
224          Set color used for the background of widgets displaying
225          editable text. This color is used for the background
226          of, among others, #GtkText, #GtkEntry, #GtkList, and #GtkClist.
227        </para>
228      </listitem>
229   </varlistentry>
230   <varlistentry>
231     <term><literal>text[<replaceable>state</replaceable>] =
232       <replaceable>color</replaceable></literal></term>
233      <listitem>
234        <para>
235          Set color used for foreground of widgets using
236          <literal>base</literal> for the background color.
237        </para>
238      </listitem>
239   </varlistentry>
240   <varlistentry>
241     <term><literal>bg_text[<replaceable>state</replaceable>] =
242       <replaceable>color</replaceable></literal></term>
243      <listitem>
244        <para>
245          Set a background pixmap to be used in place of
246          the <literal>bg</literal> color (or for #GtkText,
247          in place of the <literal>base</literal> color.
248        </para>
249      </listitem>
250   </varlistentry>
251   <varlistentry>
252     <term><literal>font = <replaceable>font</replaceable></literal></term>
253      <listitem>
254        <para>
255          Set the font for a widget.
256        </para>
257      </listitem>
258   </varlistentry>
259   <varlistentry>
260     <term><literal>fontset = <replaceable>font</replaceable></literal></term>
261      <listitem>
262        <para>
263          Set the fontset for a widget. Overrides any
264          <literal>font</literal> declarations.
265        </para>
266      </listitem>
267   </varlistentry>
268   <varlistentry>
269     <term><literal>stock[<replaceable>"stock-id"</replaceable>] = { <replaceable>icon source specifications</replaceable> }</literal></term>
270      <listitem>
271        <para>
272         Defines the icon for a stock item.
273        </para>
274      </listitem>
275   </varlistentry>
276 </variablelist>
277 </para>
278 <para>
279 The colors and background pixmaps are specified as a function of the
280 state of the widget. The states are:
281
282 <variablelist>
283   <varlistentry>
284     <term><literal>NORMAL</literal></term>
285     <listitem>
286       <para>
287         A color used for a widget in its normal state
288       </para>
289     </listitem>
290   </varlistentry>
291   <varlistentry>
292     <term><literal>ACTIVE</literal></term>
293     <listitem>
294       <para>
295         A variant of the <literal>NORMAL</literal> color used when the
296         widget is in the %GTK_STATE_ACTIVE state, and also for
297         the trough of a ScrollBar, tabs of a NoteBook
298         other than the current tab and similar areas.
299         Frequently, this should be a darker variant
300         of the <literal>NORMAL</literal> color.
301       </para>
302     </listitem>
303   </varlistentry>
304   <varlistentry>
305     <term><literal>PRELIGHT</literal></term>
306     <listitem>
307       <para>
308         A color used for widgets in the %GTK_STATE_PRELIGHT state. This
309         state is the used for Buttons and MenuItems
310         that have the mouse cursor over them, and for 
311         their children.
312       </para>
313     </listitem>
314   </varlistentry>
315   <varlistentry>
316     <term><literal>SELECTED</literal></term>
317     <listitem>
318       <para>
319         A color used to highlight data selected by the user.
320         for instance, the selected ListItems in a List widget, and the
321         selection in an Editable widget.
322       </para>
323     </listitem>
324   </varlistentry>
325   <varlistentry>
326     <term><literal>INSENSITIVE</literal></term>
327     <listitem>
328       <para>
329         A color used for the background of widgets that have
330         been set insensitive with gtk_widget_set_sensitive()
331       </para>
332     </listitem>
333   </varlistentry>
334 </variablelist>
335 </para>
336
337 <para>
338 Colors can be specified as a string <literal>"&hash;rrrrggggbbbb"</literal>,
339 <literal>"&hash;rrrgggbbb"</literal>, <literal>"&hash;rrggbb"</literal>,
340 or <literal>"&hash;rgb"</literal>, where <literal>r</literal>
341 <literal>g</literal>, and <literal>b</literal> are
342 hex digits, or they can be specified as a triplet of floats
343 <literal>{ <replaceable>r</replaceable>, <replaceable>g</replaceable>,
344 <replaceable>b</replaceable>}</literal>.
345 </para>
346
347 <para>
348 In a <literal>stock</literal> definition, icon sources are specified as a
349 4-tuple of image filename, text direction, widget state, and size, in that
350 order.  Each icon source specifies an image filename to use with a given
351 direction, state, and size. The <literal>*</literal> character can be used as a
352 wildcard, and if direction/state/size are omitted they default to
353 <literal>*</literal>. So for example, the following specifies different icons to
354 use for left-to-right and right-to-left languages:
355 <programlisting>
356 stock["my-stock-item"] = 
357 {
358   { "itemltr.png", LTR, *, * },
359   { "itemrtl.png", RTL, *, * }
360 }
361 </programlisting>
362 This could be abbreviated as follows:
363 <programlisting>
364 stock["my-stock-item"] = 
365 {
366   { "itemltr.png", LTR },
367   { "itemrtl.png", RTL }
368 }
369 </programlisting>
370 </para>
371
372 <para>
373 You can specify custom icons for specific sizes, as follows:
374 <programlisting>
375 stock["my-stock-item"] = 
376 {
377   { "itemmenusize.png", *, *, "gtk-menu" },
378   { "itemtoolbarsize.png", *, *, "gtk-large-toolbar" }
379   { "itemgeneric.png" } /* implicit *, *, * as a fallback */
380 }
381 </programlisting>
382 The sizes that come with GTK+ itself are <literal>"gtk-menu"</literal>,
383 <literal>"gtk-small-toolbar"</literal>, <literal>"gtk-large-toolbar"</literal>,
384 <literal>"gtk-button"</literal>, <literal>"gtk-dialog"</literal>. Applications
385 can define other sizes.
386 </para>
387
388 <para>
389 It's also possible to use custom icons for a given state, for example:
390 <programlisting>
391 stock["my-stock-item"] = 
392 {
393   { "itemprelight.png", *, PRELIGHT },
394   { "iteminsensitive.png", *, INSENSITIVE }, 
395   { "itemgeneric.png" } /* implicit *, *, * as a fallback */
396 }
397 </programlisting>
398 </para>
399
400 <para>
401 When selecting an icon source to use, GTK+ will consider text direction most
402 important, state second, and size third. It will select the best match based on
403 those criteria. If an attribute matches exactly (e.g. you specified
404 <literal>PRELIGHT</literal> or specified the size), GTK+ won't modify the image;
405 if the attribute matches with a wildcard, GTK+ will scale or modify the image to
406 match the state and size the user requested.
407 </para>
408
409 </refsect2>
410
411 <refsect2><title>Key bindings</title>
412 <para>
413 Key bindings allow the user to specify actions to be 
414 taken on particular key presses. The form of a binding
415 set declaration is:
416 </para>
417
418 <programlisting>
419 binding <replaceable>name</replaceable> {
420   bind <replaceable>key</replaceable> { 
421     <replaceable>signalname</replaceable> (<replaceable>param</replaceable>, ...)
422     ...
423   }
424   ...
425 }
426 </programlisting>
427
428 <para>
429 <replaceable>key</replaceable> is a string consisting of a 
430 series of modifiers followed by the name of a key. The
431 modifiers can be:
432 <simplelist>
433 <member><literal>&lt;alt&gt;</literal></member>
434 <member><literal>&lt;control&gt;</literal></member>
435 <member><literal>&lt;mod1&gt;</literal></member>
436 <member><literal>&lt;mod2&gt;</literal></member>
437 <member><literal>&lt;mod3&gt;</literal></member>
438 <member><literal>&lt;mod4&gt;</literal></member>
439 <member><literal>&lt;mod5&gt;</literal></member>
440 <member><literal>&lt;release&gt;</literal></member>
441 <member><literal>&lt;shft&gt;</literal></member>
442 <member><literal>&lt;shift&gt;</literal></member>
443 </simplelist>
444 <literal>&lt;shft&gt;</literal> is an alias for 
445 <literal>&lt;shift&gt;</literal> and 
446 <literal>&lt;alt&gt;</literal> is an alias for
447 <literal>&lt;mod1&gt;</literal>.
448 </para>
449
450 <para>
451 The action that is bound to the key is a sequence
452 of signal names (strings) followed by parameters for 
453 each signal. The signals must be action signals.
454 (See gtk_signal_new()). Each parameter can be
455 a float, integer, string, or unquoted string
456 representing an enumeration value. The types of
457 the parameters specified must match the types of the 
458 parameters of the signal.
459 </para>
460
461 <para>
462 Binding sets are connected to widgets in the
463 same manner as styles, with one addition. 
464 A priority can be specified for each pattern,
465 and within each type of pattern, binding sets
466 override other binding sets first by priority,
467 and only then by order of specification. (Later
468 overrides earlier). The priorities that can
469 be specified are (highest to lowest):
470 <simplelist>
471 <member><literal>HIGHEST</literal></member>
472 <member><literal>RC</literal></member>
473 <member><literal>APPLICATION</literal></member>
474 <member><literal>GTK</literal></member>
475 <member><literal>LOWEST</literal></member>
476 </simplelist>
477 <literal>RC</literal> is the default for bindings
478 read from an RC file, <literal>APPLICATION</literal>
479 should be used for bindings an application sets
480 up, and <literal>GTK</literal> is used for bindings
481 that GTK+ creates internally.
482 </para>
483 </refsect2>
484
485 <!-- ##### SECTION See_Also ##### -->
486 <para>
487
488 </para>
489
490 <!-- ##### STRUCT GtkRcStyle ##### -->
491 <para>
492 The #GtkRcStyle structure is used to represent a set
493 of information about the appearance of a widget.
494 This can later be composited together with other
495 #GtkRcStyle structures to form a #GtkStyle.
496 </para>
497
498 @name: 
499 @bg_pixmap_name: 
500 @font_desc: 
501 @color_flags: 
502 @fg: 
503 @bg: 
504 @text: 
505 @base: 
506 @xthickness: 
507 @ythickness: 
508
509 <!-- ##### STRUCT GtkRcStyleClass ##### -->
510 <para>
511
512 </para>
513
514
515 <!-- ##### ENUM GtkRcFlags ##### -->
516 <para>
517 The #GtkRcFlags enumeration is used as a bitmask
518 to specify which fields of a #GtkRcStyle have been
519 set for each state.
520 </para>
521 <variablelist>
522  <varlistentry><term> %GTK_RC_FG </term>
523  <listitem>
524    <para>
525    If present, the foreground color has been set for this state.
526    </para>
527  </listitem>
528  </varlistentry>
529  <varlistentry><term> %GTK_RC_BG </term>
530  <listitem>
531    <para>
532    If present, the background color has been set for this state.
533    </para>
534  </listitem>
535  </varlistentry>
536  <varlistentry><term> %GTK_RC_TEXT </term>
537  <listitem>
538    <para>
539    If present, the text color has been set for this state.
540    </para>
541  </listitem>
542  </varlistentry>
543  <varlistentry><term> %GTK_RC_BASE </term>
544  <listitem>
545    <para>
546    If present, the base color has been set for this state.
547    </para>
548  </listitem>
549  </varlistentry>
550 </variablelist>
551
552 @GTK_RC_FG: 
553 @GTK_RC_BG: 
554 @GTK_RC_TEXT: 
555 @GTK_RC_BASE: 
556
557 <!-- ##### USER_FUNCTION GtkImageLoader ##### -->
558 <para>
559 A GtkImageLoader is used to load a filename found in
560 a RC file.
561 </para>
562
563 @window: the window for creating image
564 @colormap: the colormap for this image
565 @mask: a pointer to the location to store the mask
566 @transparent_color: the transparent color for the image
567 @filename: filename to load
568 @Returns: a #GtkPixmap representing @filename
569
570
571 <!-- ##### ENUM GtkRcTokenType ##### -->
572 <para>
573 The #GtkRcTokenType enumeration represents the tokens
574 in the RC file. It is exposed so that theme engines
575 can reuse these tokens when parsing the theme-engine
576 specific portions of a RC file.
577 </para>
578
579 @GTK_RC_TOKEN_INVALID: 
580 @GTK_RC_TOKEN_INCLUDE: 
581 @GTK_RC_TOKEN_NORMAL: 
582 @GTK_RC_TOKEN_ACTIVE: 
583 @GTK_RC_TOKEN_PRELIGHT: 
584 @GTK_RC_TOKEN_SELECTED: 
585 @GTK_RC_TOKEN_INSENSITIVE: 
586 @GTK_RC_TOKEN_FG: 
587 @GTK_RC_TOKEN_BG: 
588 @GTK_RC_TOKEN_TEXT: 
589 @GTK_RC_TOKEN_BASE: 
590 @GTK_RC_TOKEN_XTHICKNESS: 
591 @GTK_RC_TOKEN_YTHICKNESS: 
592 @GTK_RC_TOKEN_FONT: 
593 @GTK_RC_TOKEN_FONTSET: 
594 @GTK_RC_TOKEN_FONT_NAME: 
595 @GTK_RC_TOKEN_BG_PIXMAP: 
596 @GTK_RC_TOKEN_PIXMAP_PATH: 
597 @GTK_RC_TOKEN_STYLE: 
598 @GTK_RC_TOKEN_BINDING: 
599 @GTK_RC_TOKEN_BIND: 
600 @GTK_RC_TOKEN_WIDGET: 
601 @GTK_RC_TOKEN_WIDGET_CLASS: 
602 @GTK_RC_TOKEN_CLASS: 
603 @GTK_RC_TOKEN_LOWEST: 
604 @GTK_RC_TOKEN_GTK: 
605 @GTK_RC_TOKEN_APPLICATION: 
606 @GTK_RC_TOKEN_RC: 
607 @GTK_RC_TOKEN_HIGHEST: 
608 @GTK_RC_TOKEN_ENGINE: 
609 @GTK_RC_TOKEN_MODULE_PATH: 
610 @GTK_RC_TOKEN_IM_MODULE_PATH: 
611 @GTK_RC_TOKEN_IM_MODULE_FILE: 
612 @GTK_RC_TOKEN_STOCK: 
613 @GTK_RC_TOKEN_LTR: 
614 @GTK_RC_TOKEN_RTL: 
615 @GTK_RC_TOKEN_LAST: 
616
617 <!-- ##### FUNCTION gtk_rc_scanner_new ##### -->
618 <para>
619
620 </para>
621
622 @Returns: 
623
624
625 <!-- ##### FUNCTION gtk_rc_get_style ##### -->
626 <para>
627 Finds all matching RC styles for a given widget,
628 composites them together, and then creates a 
629 #GtkStyle representing the composite appearance.
630 (GTK+ actually keeps a cache of previously 
631 created styles, so a new style may not be
632 created.)
633 </para>
634
635 @widget: a #GtkWidget
636 @Returns: the resulting style. The caller should
637 reference the result, since GTK+ will retain the
638 initial reference count itself for the cache
639 of created styles.
640
641
642 <!-- ##### FUNCTION gtk_rc_add_widget_name_style ##### -->
643 <para>
644 Add a RcStyle that will be looked up by a match against
645 the widget's pathname. This is equivalent to a:
646 <programlisting>
647 widget PATTERN style STYLE
648 </programlisting>
649 statement in a RC file.
650 </para>
651
652 @rc_style: the #GtkRcStyle to use for widgets matching @pattern
653 @pattern: the pattern
654
655
656 <!-- ##### FUNCTION gtk_rc_add_widget_class_style ##### -->
657 <para>
658 Add a RcStyle that will be looked up by a match against
659 the widget's class pathname. This is equivalent to a:
660
661 <programlisting>
662 widget_class PATTERN style STYLE
663 </programlisting>
664 statement in a RC file.
665 </para>
666
667 @rc_style: the #GtkRcStyle to use for widgets matching @pattern
668 @pattern: the pattern
669
670
671 <!-- ##### FUNCTION gtk_rc_add_class_style ##### -->
672 <para>
673 Add a RcStyle that will be looked up by a matching against
674 the class heirarchy of the widget. This is equivalent to a:
675 <programlisting>
676 class PATTERN style STYLE
677 </programlisting>
678 statement in a RC file.
679 </para>
680
681 @rc_style: the #GtkRcStyle to use for widgets deriving from @pattern
682 @pattern: the pattern
683
684
685 <!-- ##### FUNCTION gtk_rc_parse ##### -->
686 <para>
687 Parse a given resource file.
688 </para>
689
690 @filename: the filename of a file to parse.
691
692
693 <!-- ##### FUNCTION gtk_rc_parse_string ##### -->
694 <para>
695 Parse resource information directly from a string.
696 </para>
697
698 @rc_string: a string to parse.
699
700
701 <!-- ##### FUNCTION gtk_rc_reparse_all ##### -->
702 <para>
703 If the modification time on any previously read file
704 has changed, discard all style information
705 and then reread all previously read RC files.
706 </para>
707
708 @Returns: %TRUE if the files were reread.
709
710
711 <!-- ##### FUNCTION gtk_rc_add_default_file ##### -->
712 <para>
713 Adds a file to the list of files to be parsed at the
714 end of gtk_init().
715 </para>
716
717 @filename: the pathname to the file.
718
719
720 <!-- ##### FUNCTION gtk_rc_get_default_files ##### -->
721 <para>
722 Retrieves the current list of RC files that will be parsed
723 at the end of gtk_init()
724 </para>
725
726 @Returns: A NULL terminated array of filenames. This memory
727 is owned by GTK+ and must not be freed by the application.
728 If you want to store this information, you should make a 
729 copy.
730
731
732 <!-- ##### FUNCTION gtk_rc_set_default_files ##### -->
733 <para>
734 Sets the list of files that GTK+ will read at the
735 end of gtk_init()
736 </para>
737
738 @filenames: A %NULL terminated list of filenames.
739
740
741 <!-- ##### FUNCTION gtk_rc_parse_color ##### -->
742 <para>
743 Parses a color in the format expected in a RC file.
744 </para>
745
746 @scanner: a #GtkScanner
747 @color: a pointer to a #GtkColor structure in which to store the result
748 @Returns: %G_TOKEN_NONE if parsing suceeded, otherwise the token
749 that was expected but not found.
750
751
752 <!-- ##### FUNCTION gtk_rc_parse_state ##### -->
753 <para>
754 Parses a #GtkStateType variable from the format expected
755 in a RC file.
756 </para>
757
758 @scanner: a #GtkScanner (must be initialized for parsing an RC file)
759 @state: A pointer to a #GtkStateType variable in which to
760 store the result.
761 @Returns: %G_TOKEN_NONE if parsing suceeded, otherwise the token
762 that was expected but not found.
763
764
765 <!-- ##### FUNCTION gtk_rc_parse_priority ##### -->
766 <para>
767 Parses a #GtkPathPriorityType variable from the format expected
768 in a RC file.
769 </para>
770
771 @scanner: a #GtkScanner (must be initialized for parsing an RC file)
772 @priority: A pointer to #GtkPathPriorityType variable in which
773 to store the result.
774 @Returns: %G_TOKEN_NONE if parsing suceeded, otherwise the token
775 that was expected but not found.
776
777
778 <!-- ##### FUNCTION gtk_rc_find_module_in_path ##### -->
779 <para>
780 Looks up a file in the current module path.
781 </para>
782
783 @module_file: The name of the module to search for.
784 @Returns: The filename, if found. (Must be freed with g_free()),
785 otherwise %NULL.
786
787
788 <!-- ##### FUNCTION gtk_rc_find_pixmap_in_path ##### -->
789 <para>
790 Looks up a file in the current pixmap path. If the file is
791 not found, it outputs a warning message using g_warning()
792 and returns %NULL.
793 </para>
794
795 @scanner: a #GtkScanner. Used for printing out warning messages
796 if the file is not found.
797 @pixmap_file: The name of the file to search for.
798 @Returns: The filename, if found. (Must be freed with g_free()),
799 otherwise %NULL.
800
801
802 <!-- ##### FUNCTION gtk_rc_get_module_dir ##### -->
803 <para>
804 Returns the directory in which GTK+ will look for
805 theme engines.
806 </para>
807
808 @Returns: The directory. (Must be freed with g_free())
809
810
811 <!-- ##### FUNCTION gtk_rc_get_im_module_path ##### -->
812 <para>
813
814 </para>
815
816 @Returns: 
817
818
819 <!-- ##### FUNCTION gtk_rc_get_im_module_file ##### -->
820 <para>
821
822 </para>
823
824 @Returns: 
825
826
827 <!-- ##### FUNCTION gtk_rc_get_theme_dir ##### -->
828 <para>
829 Returns the standard directory in which themes should
830 be installed. (GTK+ does not actually use this directory
831 itself.)
832 </para>
833
834 @Returns: The directory. (Must be freed with g_free())
835
836
837 <!-- ##### FUNCTION gtk_rc_set_image_loader ##### -->
838 <para>
839 Sets the function that GTK+ will use to load images 
840 </para>
841
842 @loader: the #GtkImageLoader to use
843
844
845 <!-- ##### FUNCTION gtk_rc_load_image ##### -->
846 <para>
847 Internal function. Loads an image using the current
848 image loader.
849 </para>
850
851 @colormap: the colormap to use for the image
852 @transparent_color: the transparent color for the image
853 @filename: the filename of the image file
854 @Returns: a #GtkPixmap representing @filename
855
856
857 <!-- ##### FUNCTION gtk_rc_style_new ##### -->
858 <para>
859 Create a new #GtkRcStyle with no fields set and
860 a reference count of 1.
861 </para>
862
863 @Returns: the newly create #GtkRcStyle
864
865
866 <!-- ##### FUNCTION gtk_rc_style_copy ##### -->
867 <para>
868
869 </para>
870
871 @orig: 
872 @Returns: 
873
874
875 <!-- ##### FUNCTION gtk_rc_style_ref ##### -->
876 <para>
877 Increment the reference count of a #GtkRcStyle.
878 </para>
879
880 @rc_style: a #GtkRcStyle
881
882
883 <!-- ##### FUNCTION gtk_rc_style_unref ##### -->
884 <para>
885 Decrement the reference count of a #GtkRcStyle and
886 free if the result is 0.
887 </para>
888
889 @rc_style: a #GtkRcStyle
890
891