GtkIconTheme              package:RGtk2              R Documentation

_G_t_k_I_c_o_n_T_h_e_m_e

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

     Looking up icons by name

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

     'gtkIconThemeNew()'
      'gtkIconThemeGetDefault()'
      'gtkIconThemeGetForScreen(screen)'
      'gtkIconThemeSetScreen(object, screen)'
      'gtkIconThemeSetSearchPath(object, path)'
      'gtkIconThemeGetSearchPath(object)'
      'gtkIconThemeAppendSearchPath(object, path)'
      'gtkIconThemePrependSearchPath(object, path)'
      'gtkIconThemeSetCustomTheme(object, theme.name)'
      'gtkIconThemeHasIcon(object, icon.name)'
      'gtkIconThemeLookupIcon(object, icon.name, size, flags)'
      'gtkIconThemeChooseIcon(object, icon.names, size, flags)'
      'gtkIconThemeLoadIcon(object, icon.name, size, flags, .errwarn =
     TRUE)'
      'gtkIconThemeListContexts(object)'
      'gtkIconThemeListIcons(object, context = NULL)'
      'gtkIconThemeGetIconSizes(object, icon.name)'
      'gtkIconThemeGetExampleIconName(object)'
      'gtkIconThemeRescanIfNeeded(object)'
      'gtkIconThemeAddBuiltinIcon(icon.name, size, pixbuf)'
      'gtkIconInfoCopy(object)'
      'gtkIconInfoGetBaseSize(object)'
      'gtkIconInfoGetFilename(object)'
      'gtkIconInfoGetBuiltinPixbuf(object)'
      'gtkIconInfoLoadIcon(object, .errwarn = TRUE)'
      'gtkIconInfoSetRawCoordinates(object, raw.coordinates)'
      'gtkIconInfoGetEmbeddedRect(object)'
      'gtkIconInfoGetAttachPoints(object)'
      'gtkIconInfoGetDisplayName(object)'
      'gtkIconTheme()'

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

     GObject
        +----GtkIconTheme 

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

     'GtkIconTheme' provides a facility for looking up icons by name
     and size. The main reason for using a name rather than simply
     providing a filename is to allow different icons to be used
     depending on what icon theme is selecetd by the user. The
     operation of icon themes on Linux and Unix follows the Icon Theme
     Specification (<URL:
     http://www.freedesktop.org/Standards/icon-theme-spec>). There is a
     default icon theme, named 'hicolor' where applications should
     install their icons, but more additional application themes can be
     installed as operating system vendors and users choose.

     Named icons are similar to the  facility, and the distinction
     between the two may be a bit confusing. A few things to keep in
     mind:

        *  Stock images usually are used in conjunction with ., such as
           'GTK_STOCK_OK' or 'GTK_STOCK_OPEN'. Named icons are easier
           to set up and therefore are more useful for new icons that
           an application wants to add, such as application icons or
           window icons.

        *  Stock images can only be loaded at the symbolic sizes
           defined by the 'GtkIconSize' enumeration, or by custom sizes
           defined by 'gtkIconSizeRegister', while named icons are more
           flexible and any pixel size can be specified.

        *  Because stock images are closely tied to stock items, and
           thus to actions in the user interface, stock images may come
           in multiple variants for different widget states or writing
           directions. 

     In many cases, named themes are used indirectly, via 'GtkImage' or
     stock items, rather than directly, but looking up icons directly
     is also simple. The 'GtkIconTheme' object acts as a database of
     all the icons in the current theme. You can create new
     'GtkIconTheme' objects, but its much more efficient to use the
     standard icon theme for the 'GdkScreen' so that the icon
     information is shared with other people looking up icons. In the
     case where the default screen is being used, looking up an icon
     can be as simple as:


     icon_theme <- gtkIconThemeGetDefault()
     result <- icon_theme$loadIcon("my-icon-name", 48, 0)
     if (!result[[1]]) {
       warning("Couldn't load icon: ", result$error$message)
     } else {
       pixbuf <- result[[1]]
       ## Use the pixbuf
     }


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


     '_G_t_k_I_c_o_n_I_n_f_o' Contains information found when looking up an icon
          in an icon theme.


     '_G_t_k_I_c_o_n_T_h_e_m_e' Acts as a database of information about an icon
          theme. Normally, you retrieve the icon theme for a particular
          screen using 'gtkIconThemeGetForScreen' and it will contain
          information about current icon theme for that screen, but you
          can also create a new 'GtkIconTheme' object and set the icon
          theme name explicitely using 'gtkIconThemeSetCustomTheme'.


_C_o_n_v_e_n_i_e_n_t _C_o_n_s_t_r_u_c_t_i_o_n:

     'gtkIconTheme' is the equivalent of 'gtkIconThemeNew'.

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


     '_G_t_k_I_c_o_n_L_o_o_k_u_p_F_l_a_g_s' Used to specify options for
          'gtkIconThemeLookupIcon'  

          '_n_o-_s_v_g' Never return SVG icons, even if gdk-pixbuf supports
               them. Cannot be used together with
               'GTK_ICON_LOOKUP_FORCE_SVG'.

          '_f_o_r_c_e-_s_v_g' Return SVG icons, even if gdk-pixbuf doesn't
               support them. Cannot be used together with
               'GTK_ICON_LOOKUP_NO_SVG'.

          '_u_s_e-_b_u_i_l_t_i_n' When passed to 'gtkIconThemeLookupIcon'
               includes builtin icons as well as files. For a builtin
               icon, 'gtkIconInfoGetFilename' returns 'NULL' and you
               need to call 'gtkIconInfoGetBuiltinPixbuf'.


     '_G_t_k_I_c_o_n_T_h_e_m_e_E_r_r_o_r' Error codes for GtkIconTheme operations.  

          '_n_o_t-_f_o_u_n_d' The icon specified does not exist in the theme

          '_f_a_i_l_e_d' An unspecified error occurred.


_S_i_g_n_a_l_s:


     '_c_h_a_n_g_e_d(_i_c_o_n._t_h_e_m_e, _u_s_e_r._d_a_t_a)' Emitted when the current icon
          theme is switched or GTK+ detects that a change has occurred
          in the contents of the current icon theme.  

          '_i_c_o_n._t_h_e_m_e' ['GtkIconTheme']  the icon theme

          '_u_s_e_r._d_a_t_a' [R object] user data set when the signal handler
               was connected.


_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/GtkIconTheme.html>

