gtk-Resource-Files           package:RGtk2           R Documentation

_R_e_s_o_u_r_c_e _F_i_l_e_s

_D_e_s_c_r_i_p_t_i_o_n:

     Routines for handling resource files

_M_e_t_h_o_d_s _a_n_d _F_u_n_c_t_i_o_n_s:

     'gtkRcScannerNew()'
      'gtkRcGetStyle(object)'
      'gtkRcGetStyleByPaths(settings, widget.path, class.path, type)'
      'gtkRcAddWidgetNameStyle(object, pattern)'
      'gtkRcAddWidgetClassStyle(object, pattern)'
      'gtkRcAddClassStyle(object, pattern)'
      'gtkRcParse(filename)'
      'gtkRcParseString(rc.string)'
      'gtkRcReparseAll()'
      'gtkRcReparseAllForSettings(settings, force.load)'
      'gtkRcResetStyles(settings)'
      'gtkRcAddDefaultFile(filename)'
      'gtkRcGetDefaultFiles()'
      'gtkRcSetDefaultFiles(filenames)'
      'gtkRcParseColor(scanner, color)'
      'gtkRcParseColorFull(scanner, style)'
      'gtkRcParseState(scanner)'
      'gtkRcParsePriority(scanner)'
      'gtkRcFindModuleInPath(module.file)'
      'gtkRcFindPixmapInPath(settings, scanner = NULL, pixmap.file)'
      'gtkRcGetModuleDir()'
      'gtkRcGetImModulePath()'
      'gtkRcGetImModuleFile()'
      'gtkRcGetThemeDir()'
      'gtkRcStyleNew()'
      'gtkRcStyleCopy(object)'

_H_i_e_r_a_r_c_h_y:

     GObject
        +----GtkRcStyle 

_D_e_t_a_i_l_e_d _D_e_s_c_r_i_p_t_i_o_n:

     GTK+ provides resource file mechanism for configuring various
     aspects of the operation of a GTK+ program at runtime.

_D_e_f_a_u_l_t _f_i_l_e_s:

     An application can cause GTK+ to parse a specific RC file by
     calling 'gtkRcParse'. In addition to this, certain files will be
     read at the end of 'gtkInit'. Unless modified, the files looked
     for will be  '<SYSCONFDIR>/gtk-2.0/gtkrc'  and '.gtkrc-2.0' in the
     users home directory. ('<SYSCONFDIR>' defaults to 
     '/usr/local/etc'. It can be changed with the '--prefix' or
     '--sysconfdir' options when  configuring GTK+.) Note that although
     the filenames contain the version  number 2.0, all 2.x versions of
     GTK+ look for these files.  

     The set of these default files can be retrieved with
     'gtkRcGetDefaultFiles' and modified with 'gtkRcAddDefaultFile' and
     'gtkRcSetDefaultFiles'. Additionally, the 'GTK2_RC_FILES'
     environment variable can be set to a
     'G_SEARCHPATH_SEPARATOR_S-separated' list of files in order to
     overwrite the set of default files at runtime.

     For each RC file, in addition to the file itself, GTK+ will look
     for  a locale-specific file that will be parsed after the main
     file.  For instance, if 'LANG' is set to 'ja_JP.ujis', when
     loading the default file '~/.gtkrc' then GTK+ looks  for
     '~/.gtkrc.ja_JP' and '~/.gtkrc.ja',  and parses the first of those
     that exists.

_O_p_t_i_m_i_z_i_n_g _R_C _S_t_y_l_e _M_a_t_c_h_e_s:

     Everytime a widget is created and added to the layout hierarchy of
     a 'GtkWindow' ("anchored" to be exact), a list of matching RC
     styles out of all RC styles read in so far is composed. For this,
     every RC style is matched against the widgets class path, the
     widgets name path and widgets inheritance hierarchy. As a
     consequence, significant slowdown can be caused by utilization of
     many RC styles and by using RC style patterns that are slow or
     complicated to match against a given widget. The following ordered
     list provides a number of advices (prioritized by  effectiveness)
     to reduce the performance overhead associated with RC style 
     matches:


        1.  Move RC styles for specific applications into RC files
           dedicated to those applications and parse application
           specific RC files only from applications that are affected
           by them. This reduces the overall amount of RC styles that
           have to be considered for a match across a group of
           applications.

        2.  Merge multiple styles which use the same matching rule, for
           instance:

           style "Foo" { foo_content }
                class "X" style "Foo"
                style "Bar" { bar_content }
                class "X" style "Bar"

           is faster to match as:

           style "FooBar" { foo_content bar_content }
                class "X" style "FooBar"


        3.  Use of wildcards should be avoided, this can reduce the
           individual RC style match to a single integer comparison in
           most cases.

        4.  To avoid complex recursive matching, specification of full
           class names (for 'class' matches) or full path names (for
           'widget' and 'widget_class' matches) is to be preferred over
           shortened names containing '"*"' or '"?"'.

        5.  If at all necessary, wildcards should only be used at the
           tail or head of a pattern. This reduces the match complexity
           to a string comparison per RC style.

        6.  When using wildcards, use of '"?"' should be preferred over
           '"*"'. This can reduce the matching complexity from O(n\^2)
           to O(n). For example '"Gtk*Box"' can be turned into
           '"Gtk?Box"' and will still match 'GtkHBox' and 'GtkVBox'.

        7.  The use of '"*"' wildcards should be restricted as much as
           possible, because matching '"A*B*C*RestString"' can result
           in matching complexities of O(n\^2) worst case.


_S_t_r_u_c_t_u_r_e_s:


     '_G_t_k_R_c_S_t_y_l_e' 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'.


_E_n_u_m_s _a_n_d _F_l_a_g_s:


     '_G_t_k_R_c_F_l_a_g_s' The 'GtkRcFlags' enumeration is used as a bitmask to
          specify which fields of a 'GtkRcStyle' have been set for each
          state.

          '_f_g' If present, the foreground color has been set for this
               state.

          '_b_g' If present, the background color has been set for this
               state.

          '_t_e_x_t' If present, the text color has been set for this
               state.

          '_b_a_s_e' If present, the base color has been set for this
               state.


     '_G_t_k_R_c_T_o_k_e_n_T_y_p_e' 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.

          '_i_n_v_a_l_i_d' _undocumented _

          '_i_n_c_l_u_d_e' _undocumented _

          '_n_o_r_m_a_l' _undocumented _

          '_a_c_t_i_v_e' _undocumented _

          '_p_r_e_l_i_g_h_t' _undocumented _

          '_s_e_l_e_c_t_e_d' _undocumented _

          '_i_n_s_e_n_s_i_t_i_v_e' _undocumented _

          '_f_g' _undocumented _

          '_b_g' _undocumented _

          '_t_e_x_t' _undocumented _

          '_b_a_s_e' _undocumented _

          '_x_t_h_i_c_k_n_e_s_s' _undocumented _

          '_y_t_h_i_c_k_n_e_s_s' _undocumented _

          '_f_o_n_t' _undocumented _

          '_f_o_n_t_s_e_t' _undocumented _

          '_f_o_n_t-_n_a_m_e' _undocumented _

          '_b_g-_p_i_x_m_a_p' _undocumented _

          '_p_i_x_m_a_p-_p_a_t_h' _undocumented _

          '_s_t_y_l_e' _undocumented _

          '_b_i_n_d_i_n_g' _undocumented _

          '_b_i_n_d' _undocumented _

          '_w_i_d_g_e_t' _undocumented _

          '_w_i_d_g_e_t-_c_l_a_s_s' _undocumented _

          '_c_l_a_s_s' _undocumented _

          '_l_o_w_e_s_t' _undocumented _

          '_g_t_k' _undocumented _

          '_a_p_p_l_i_c_a_t_i_o_n' _undocumented _

          '_t_h_e_m_e' _undocumented _

          '_r_c' _undocumented _

          '_h_i_g_h_e_s_t' _undocumented _

          '_e_n_g_i_n_e' _undocumented _

          '_m_o_d_u_l_e-_p_a_t_h' _undocumented _

          '_i_m-_m_o_d_u_l_e-_p_a_t_h' _undocumented _

          '_i_m-_m_o_d_u_l_e-_f_i_l_e' _undocumented _

          '_s_t_o_c_k' _undocumented _

          '_l_t_r' _undocumented _

          '_r_t_l' _undocumented _

          '_l_a_s_t' _undocumented _


_A_u_t_h_o_r(_s):

     Derived by RGtkGen from GTK+ documentation

_R_e_f_e_r_e_n_c_e_s:

     <URL:
     http://developer.gnome.org/doc/API/2.0/gtk/gtk-Resource-Files.html>

