gtk.RcStyle.RcStyle Class Reference

Inheritance diagram for gtk.RcStyle.RcStyle:

gobject.ObjectG.ObjectG List of all members.

Public Member Functions

GtkRcStylegetRcStyleStruct ()
 this (GtkRcStyle *gtkRcStyle)
 Sets our main struct and passes it to the parent class.
void addWidgetNameStyle (char[] pattern)
 Warning gtk_rc_add_widget_name_style is deprecated and should not be used in newly-written code.
void addWidgetClassStyle (char[] pattern)
 Warning gtk_rc_add_widget_class_style is deprecated and should not be used in newly-written code.
void addClassStyle (char[] pattern)
 Warning gtk_rc_add_class_style is deprecated and should not be used in newly-written code.
RcStyle styleCopy ()
 Makes a copy of the specified GtkRcStyle.
void styleRef ()
 Increments the reference count of a GtkRcStyle.
void styleUnref ()
 Decrements the reference count of a GtkRcStyle and frees if the result is 0.

Static Public Member Functions

static GScannerscannerNew ()
 Returns:.
static Style getStyle (Widget widget)
 Finds all matching RC styles for a given widget, composites them together, and then creates a GtkStyle representing the composite appearance.
static Style getStyleByPaths (Settings settings, char[] widgetPath, char[] classPath, GType type)
 Creates up a GtkStyle from styles defined in a RC file by providing the raw components used in matching.
static void parse (char[] filename)
 Parses a given resource file.
static void parseString (char[] rcString)
 Parses resource information directly from a string.
static int reparseAll ()
 If the modification time on any previously read file for the default GtkSettings has changed, discard all style information and then reread all previously read RC files.
static int reparseAllForSettings (Settings settings, int forceLoad)
 If the modification time on any previously read file for the given GtkSettings has changed, discard all style information and then reread all previously read RC files.
static void resetStyles (Settings settings)
 This function recomputes the styles for all widgets that use a particular GtkSettings object.
static void addDefaultFile (char[] filename)
 Adds a file to the list of files to be parsed at the end of gtk_init().
static char ** getDefaultFiles ()
 Retrieves the current list of RC files that will be parsed at the end of gtk_init().
static void setDefaultFiles (char **filenames)
 Sets the list of files that GTK+ will read at the end of gtk_init().
static uint parseColor (GScanner *scanner, Color color)
 Parses a color in the format expected in a RC file.
static uint parseState (GScanner *scanner, GtkStateType *state)
 Parses a GtkStateType variable from the format expected in a RC file.
static uint parsePriority (GScanner *scanner, GtkPathPriorityType *priority)
 Parses a GtkPathPriorityType variable from the format expected in a RC file.
static char[] findModuleInPath (char[] moduleFile)
 Searches for a theme engine in the GTK+ search path.
static char[] findPixmapInPath (Settings settings, GScanner *scanner, char[] pixmapFile)
 Looks up a file in pixmap path for the specified GtkSettings.
static char[] getModuleDir ()
 Returns a directory in which GTK+ looks for theme engines.
static char[] getImModulePath ()
 Obtains the path in which to look for IM modules.
static char[] getImModuleFile ()
 Obtains the path to the IM modules file.
static char[] getThemeDir ()
 Returns the standard directory in which themes should be installed.
static RcStyle styleNew ()
 Creates a new GtkRcStyle with no fields set and a reference count of 1.

Protected Member Functions

void * getStruct ()
 the main Gtk struct as a void*

Protected Attributes

GtkRcStylegtkRcStyle
 the main Gtk struct

Constructor & Destructor Documentation

gtk.RcStyle.RcStyle.this ( GtkRcStyle gtkRcStyle  ) 

Sets our main struct and passes it to the parent class.


Member Function Documentation

void gtk.RcStyle.RcStyle.addClassStyle ( char[]  pattern  ) 

Warning gtk_rc_add_class_style is deprecated and should not be used in newly-written code.

Adds a GtkRcStyle that will be looked up by a matching against the class hierarchy of the widget. This is equivalent to a: class PATTERN style STYLE statement in a RC file. rc_style: the GtkRcStyle to use for widgets deriving from pattern pattern: the pattern

static void gtk.RcStyle.RcStyle.addDefaultFile ( char[]  filename  )  [static]

Adds a file to the list of files to be parsed at the end of gtk_init().

filename: the pathname to the file. If filename is not absolute, it is searched in the current directory.

void gtk.RcStyle.RcStyle.addWidgetClassStyle ( char[]  pattern  ) 

Warning gtk_rc_add_widget_class_style is deprecated and should not be used in newly-written code.

Adds a GtkRcStyle that will be looked up by a match against the widget's class pathname. This is equivalent to a: widget_class PATTERN style STYLE statement in a RC file. rc_style: the GtkRcStyle to use for widgets matching pattern pattern: the pattern

void gtk.RcStyle.RcStyle.addWidgetNameStyle ( char[]  pattern  ) 

Warning gtk_rc_add_widget_name_style is deprecated and should not be used in newly-written code.

Adds a GtkRcStyle that will be looked up by a match against the widget's pathname. This is equivalent to a: widget PATTERN style STYLE statement in a RC file. rc_style: the GtkRcStyle to use for widgets matching pattern pattern: the pattern

static char [] gtk.RcStyle.RcStyle.findModuleInPath ( char[]  moduleFile  )  [static]

Searches for a theme engine in the GTK+ search path.

This function is not useful for applications and should not be used. module_file: name of a theme engine Returns: The filename, if found (must be freed with g_free()), otherwise NULL.

static char [] gtk.RcStyle.RcStyle.findPixmapInPath ( Settings  settings,
GScanner scanner,
char[]  pixmapFile 
) [static]

Looks up a file in pixmap path for the specified GtkSettings.

If the file is not found, it outputs a warning message using g_warning() and returns NULL. settings: a GtkSettings scanner: Scanner used to get line number information for the warning message, or NULL pixmap_file: name of the pixmap file to locate. Returns: the filename.

static char** gtk.RcStyle.RcStyle.getDefaultFiles (  )  [static]

Retrieves the current list of RC files that will be parsed at the end of gtk_init().

Returns: A NULL-terminated array of filenames. This memory is owned by GTK+ and must not be freed by the application. If you want to store this information, you should make a copy.

static char [] gtk.RcStyle.RcStyle.getImModuleFile (  )  [static]

Obtains the path to the IM modules file.

See the documentation of the GTK_IM_MODULE_FILE environment variable for more details. Returns: a newly-allocated string containing the name of the file listing the IM modules available for loading

static char [] gtk.RcStyle.RcStyle.getImModulePath (  )  [static]

Obtains the path in which to look for IM modules.

See the documentation of the GTK_PATH environment variable for more details about looking up modules. This function is useful solely for utilities supplied with GTK+ and should not be used by applications under normal circumstances. Returns: a newly-allocated string containing the path in which to look for IM modules.

static char [] gtk.RcStyle.RcStyle.getModuleDir (  )  [static]

Returns a directory in which GTK+ looks for theme engines.

For full information about the search for theme engines, see the docs for GTK_PATH in Running GTK+ Applications(3). Returns: the directory. (Must be freed with g_free())

GtkRcStyle* gtk.RcStyle.RcStyle.getRcStyleStruct (  ) 

void* gtk.RcStyle.RcStyle.getStruct (  )  [protected]

the main Gtk struct as a void*

Reimplemented from gobject.ObjectG.ObjectG.

static Style gtk.RcStyle.RcStyle.getStyle ( Widget  widget  )  [static]

Finds all matching RC styles for a given widget, composites them together, and then creates a GtkStyle representing the composite appearance.

(GTK+ actually keeps a cache of previously created styles, so a new style may not be created.) widget: a GtkWidget Returns: the resulting style. No refcount is added to the returned style, so if you want to save this style around, you should add a reference yourself.

static Style gtk.RcStyle.RcStyle.getStyleByPaths ( Settings  settings,
char[]  widgetPath,
char[]  classPath,
GType  type 
) [static]

Creates up a GtkStyle from styles defined in a RC file by providing the raw components used in matching.

This function may be useful when creating pseudo-widgets that should be themed like widgets but don't actually have corresponding GTK+ widgets. An example of this would be items inside a GNOME canvas widget. The action of gtk_rc_get_style() is similar to: gtk_widget_path (widget, NULL, path, NULL); gtk_widget_class_path (widget, NULL, class_path, NULL); gtk_rc_get_style_by_paths (gtk_widget_get_settings (widget), path, class_path, G_OBJECT_TYPE (widget)); settings: a GtkSettings object widget_path: the widget path to use when looking up the style, or NULL if no matching against the widget path should be done class_path: the class path to use when looking up the style, or NULL if no matching against the class path should be done. type: a type that will be used along with parent types of this type when matching against class styles, or G_TYPE_NONE Returns: A style created by matching with the supplied paths, or NULL if nothing matching was specified and the default style should be used. The returned value is owned by GTK+ as part of an internal cache, so you must call g_object_ref() on the returned value if you want to keep a reference to it.

static char [] gtk.RcStyle.RcStyle.getThemeDir (  )  [static]

Returns the standard directory in which themes should be installed.

(GTK+ does not actually use this directory itself.) Returns: The directory (must be freed with g_free()).

static void gtk.RcStyle.RcStyle.parse ( char[]  filename  )  [static]

Parses a given resource file.

filename: the filename of a file to parse. If filename is not absolute, it is searched in the current directory.

static uint gtk.RcStyle.RcStyle.parseColor ( GScanner scanner,
Color  color 
) [static]

Parses a color in the format expected in a RC file.

scanner: a GtkScanner color: a pointer to a GtkColor structure in which to store the result Returns: G_TOKEN_NONE if parsing succeeded, otherwise the token that was expected but not found.

static uint gtk.RcStyle.RcStyle.parsePriority ( GScanner scanner,
GtkPathPriorityType priority 
) [static]

Parses a GtkPathPriorityType variable from the format expected in a RC file.

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 succeeded, otherwise the token that was expected but not found.

static uint gtk.RcStyle.RcStyle.parseState ( GScanner scanner,
GtkStateType state 
) [static]

Parses a GtkStateType variable from the format expected in a RC file.

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 succeeded, otherwise the token that was expected but not found.

static void gtk.RcStyle.RcStyle.parseString ( char[]  rcString  )  [static]

Parses resource information directly from a string.

rc_string: a string to parse.

static int gtk.RcStyle.RcStyle.reparseAll (  )  [static]

If the modification time on any previously read file for the default GtkSettings has changed, discard all style information and then reread all previously read RC files.

Returns: TRUE if the files were reread.

static int gtk.RcStyle.RcStyle.reparseAllForSettings ( Settings  settings,
int  forceLoad 
) [static]

If the modification time on any previously read file for the given GtkSettings has changed, discard all style information and then reread all previously read RC files.

settings: a GtkSettings force_load: load whether or not anything changed Returns: TRUE if the files were reread.

static void gtk.RcStyle.RcStyle.resetStyles ( Settings  settings  )  [static]

This function recomputes the styles for all widgets that use a particular GtkSettings object.

(There is one GtkSettings object per GdkScreen, see gtk_settings_get_for_screen()); It is useful when some global parameter has changed that affects the appearance of all widgets, because when a widget gets a new style, it will both redraw and recompute any cached information about its appearance. As an example, it is used when the default font size set by the operating system changes. Note that this function doesn't affect widgets that have a style set explicitely on them with gtk_widget_set_style(). settings: a GtkSettings Since 2.4

static GScanner* gtk.RcStyle.RcStyle.scannerNew (  )  [static]

Returns:.

static void gtk.RcStyle.RcStyle.setDefaultFiles ( char **  filenames  )  [static]

Sets the list of files that GTK+ will read at the end of gtk_init().

filenames: A NULL-terminated list of filenames.

RcStyle gtk.RcStyle.RcStyle.styleCopy (  ) 

Makes a copy of the specified GtkRcStyle.

This function will correctly copy an RC style that is a member of a class derived from GtkRcStyle. orig: the style to copy Returns: the resulting GtkRcStyle

static RcStyle gtk.RcStyle.RcStyle.styleNew (  )  [static]

Creates a new GtkRcStyle with no fields set and a reference count of 1.

Returns: the newly-created GtkRcStyle

void gtk.RcStyle.RcStyle.styleRef (  ) 

Increments the reference count of a GtkRcStyle.

rc_style: a GtkRcStyle

void gtk.RcStyle.RcStyle.styleUnref (  ) 

Decrements the reference count of a GtkRcStyle and frees if the result is 0.

rc_style: a GtkRcStyle


Member Data Documentation

GtkRcStyle* gtk.RcStyle.RcStyle.gtkRcStyle [protected]

the main Gtk struct


SourceForge.net Logo DSource.org Logo digitalmars.com Logo