source: trunk/third/gtk/gtk/gtkthemes.h @ 14810

Revision 14810, 3.2 KB checked in by ghudson, 24 years ago (diff)
This commit was generated by cvs2svn to compensate for changes in r14809, which included commits to RCS files with non-trunk default branches.
Line 
1/* GTK - The GIMP Toolkit
2 * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
3 *
4 * Themes added by The Rasterman <raster@redhat.com>
5 *
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version.
10 *
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14 * Library General Public License for more details.
15 *
16 * You should have received a copy of the GNU Library General Public
17 * License along with this library; if not, write to the Free
18 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
19 */
20
21/*
22 * Modified by the GTK+ Team and others 1997-1999.  See the AUTHORS
23 * file for a list of people on the GTK+ Team.  See the ChangeLog
24 * files for a list of changes.  These files are distributed with
25 * GTK+ at ftp://ftp.gtk.org/pub/gtk/.
26 */
27
28#ifndef __GTK_THEMES_H__
29#define __GTK_THEMES_H__
30
31#include <gdk/gdk.h>
32#include <gtk/gtkstyle.h>
33#include <gtk/gtkwidget.h>
34
35
36#ifdef __cplusplus
37extern "C" {
38#endif /* __cplusplus */
39
40
41struct _GtkThemeEngine {
42  /* Fill in engine_data pointer in a GtkRcStyle by parsing contents
43   * of brackets. Returns G_TOKEN_NONE if succesfull, otherwise returns
44   * the token it expected but didn't get.
45   */
46  guint (*parse_rc_style)    (GScanner *scanner, GtkRcStyle *rc_style);
47 
48  /* Combine RC style data from src into dest. If
49   * dest->engine_data is NULL, it should be initialized to default
50   * values.
51   */
52  void (*merge_rc_style)    (GtkRcStyle *dest,     GtkRcStyle *src);
53
54  /* Fill in style->engine_data from rc_style->engine_data */
55  void (*rc_style_to_style) (GtkStyle   *style, GtkRcStyle *rc_style);
56
57  /* Duplicate engine_data from src to dest. The engine_data will
58   * not subsequently be modified except by a call to realize_style()
59   * so if realize_style() does nothing, refcounting is appropriate.
60   */
61  void (*duplicate_style)   (GtkStyle *dest,       GtkStyle *src);
62
63  /* If style needs to initialize for a particular colormap/depth
64   * combination, do it here. style->colormap/style->depth will have
65   * been set at this point, and style itself initialized for
66   * the colormap
67   */
68  void (*realize_style) (GtkStyle   *new_style);
69
70  /* If style needs to clean up for a particular colormap/depth
71   * combination, do it here.
72   */
73  void (*unrealize_style) (GtkStyle   *new_style);
74
75  /* Clean up rc_style->engine_data before rc_style is destroyed */
76  void (*destroy_rc_style)  (GtkRcStyle *rc_style);
77
78  /* Clean up style->engine_data before style is destroyed */
79  void (*destroy_style)     (GtkStyle   *style);
80
81  void (*set_background) (GtkStyle     *style,
82                          GdkWindow    *window,
83                          GtkStateType  state_type);
84};
85
86GtkThemeEngine *gtk_theme_engine_get   (const gchar    *name);
87void            gtk_theme_engine_ref   (GtkThemeEngine *engine);
88void            gtk_theme_engine_unref (GtkThemeEngine *engine);
89
90
91
92#ifdef __cplusplus
93}
94#endif /* __cplusplus */
95
96
97#endif /* __GTK_THEMES_H__ */
Note: See TracBrowser for help on using the repository browser.