~canonical-dx-team/ubuntu/maverick/gtk+2.0/menuproxy

« back to all changes in this revision

Viewing changes to gtk/gtkiconfactory.h

  • Committer: Bazaar Package Importer
  • Author(s): Sebastien Bacher
  • Date: 2007-05-04 12:24:25 UTC
  • mfrom: (1.1.21 upstream)
  • Revision ID: james.westby@ubuntu.com-20070504122425-0m8midgzrp40y8w2
Tags: 2.10.12-1ubuntu1
* Sync with Debian
* New upstream version:
  Fixed bugs:
  - 379414 file chooser warnings when changing path in the entry
  - 418585 GtkFileChooserDefault sizing code is not DPI independent
  - 419568 Crash in search if start with special letter
  - 435062 build dies with icon cache validation
  - 379399 Segfault to call gtk_print_operation_run twice.
  - 387889 cups backend has problems when there are too many printers
  - 418531 invalid read to gtkicontheme.c gtk_icon_theme_lookup_icon...
  - 423916 crash in color scheme code
  - 424042 Segmentation fault while quickly pressing Alt+arrows
  - 415260 Protect against negative indices when setting values in G...
  - 419171 XGetVisualInfo() may not set nxvisuals
  - 128852 Gdk cursors don't look good on win32
  - 344657 Ctrl-H doesn't toggle "Show Hidden Files" setting
  - 345345 PrintOperation::paginate is not emitted for class handler
  - 347567 GtkPrintOperation::end-print is not emitted if it's cance...
  - 369112 gtk_ui_manager_add_ui should accept unnamed separator
  - 392015 Selected menu item invisible on Windows Vista
  - 399253 MS-Windows Theme Bottom Tab placement rendering glitches
  - 399425 gtk_input_dialog_fill_axes() adds child to gtkscrolledwin...
  - 403251 [patch] little memory leak in GtkPrintJob
  - 403267 [patch] memory leak in GtkPageSetupUnixDialog
  - 403470 MS-Windows Theme tab placement other than on top leaks a ...
  - 404506 Windows system fonts that have multi-byte font names cann...
  - 405089 Incorrect window placement for GtkEventBox private window
  - 405515 Minor leak in gtkfilesystemmodel.c
  - 405539 gdk_pixbuf_save() for PNG saver can return FALSE without ...
  - 415681 gdk_window_clear_area includes an extra line and column o...
  - 418219 GtkRecentChooser should apply filter before sorting and c...
  - 418403 Scroll to printer after selecting it from settings
  - 421985 _gtk_print_operation_platform_backend_launch_preview
  - 421990 gtk_print_job_get_surface
  - 421993 gtk_print_operation_init
  - 423064 Conditional jump or move depends on uninitialised value(s...
  - 423722 Fix printing header in gtk-demo
  - 424168 gtk_print_operation_run on async preview
  - 425655 Don't install gtk+-unix-print-2.0.pc on non-UNIX platforms
  - 425786 GDK segfaults if XineramaQueryScreens fails
  - 428665 Lpr Backend gets stuck in infinite loop during gtk_enumer...
  - 429902 GtkPrintOperation leaks cairo contextes
  - 431997 First delay of GdkPixbufAnimationIter is wrong
  - 433242 Inconsistent scroll arrow position calculations
  - 433972 Placing gtk.Expander inside a gtk.TextView() changes gtk....
  - 434261 _gtk_toolbar_elide_underscores incorrectly handles some s...
  - 383354 ctrl-L should make 'Location' entry disappear
  - 418673 gtk_recent_manager_add_item
  - 429732 gtk_accel_group_finalize accesses invalid memory
  - 435028 WM_CLIENT_LEADER is wrong on the leader_window
  - 431067 Background of the header window is not updated
  - 338843 add recent files support inside the ui manager
  - 148535 add drop shadow to menus, tooltips, etc. under Windows XP
* debian/control.in:
  - Conflicts on ubuntulooks (<= 0.9.11-1)
* debian/patches/15_default-fallback-icon-theme.patch:
  - patch from Debian, fallback on gnome icon theme

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* GTK - The GIMP Toolkit
 
2
 * Copyright (C) 2000 Red Hat, Inc.
 
3
 *
 
4
 * This library is free software; you can redistribute it and/or
 
5
 * modify it under the terms of the GNU Lesser General Public
 
6
 * License as published by the Free Software Foundation; either
 
7
 * version 2 of the License, or (at your option) any later version.
 
8
 *
 
9
 * This library is distributed in the hope that it will be useful,
 
10
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
11
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 
12
 * Lesser General Public License for more details.
 
13
 *
 
14
 * You should have received a copy of the GNU Lesser General Public
 
15
 * License along with this library; if not, write to the
 
16
 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 
17
 * Boston, MA 02111-1307, USA.
 
18
 */
 
19
 
 
20
/*
 
21
 * Modified by the GTK+ Team and others 1997-2000.  See the AUTHORS
 
22
 * file for a list of people on the GTK+ Team.  See the ChangeLog
 
23
 * files for a list of changes.  These files are distributed with
 
24
 * GTK+ at ftp://ftp.gtk.org/pub/gtk/. 
 
25
 */
 
26
 
 
27
#ifndef __GTK_ICON_FACTORY_H__
 
28
#define __GTK_ICON_FACTORY_H__
 
29
 
 
30
#include <gdk/gdk.h>
 
31
#include <gtk/gtkrc.h>
 
32
 
 
33
G_BEGIN_DECLS
 
34
 
 
35
typedef struct _GtkIconFactoryClass GtkIconFactoryClass;
 
36
 
 
37
#define GTK_TYPE_ICON_FACTORY              (gtk_icon_factory_get_type ())
 
38
#define GTK_ICON_FACTORY(object)           (G_TYPE_CHECK_INSTANCE_CAST ((object), GTK_TYPE_ICON_FACTORY, GtkIconFactory))
 
39
#define GTK_ICON_FACTORY_CLASS(klass)      (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_ICON_FACTORY, GtkIconFactoryClass))
 
40
#define GTK_IS_ICON_FACTORY(object)        (G_TYPE_CHECK_INSTANCE_TYPE ((object), GTK_TYPE_ICON_FACTORY))
 
41
#define GTK_IS_ICON_FACTORY_CLASS(klass)   (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_ICON_FACTORY))
 
42
#define GTK_ICON_FACTORY_GET_CLASS(obj)    (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_ICON_FACTORY, GtkIconFactoryClass))
 
43
#define GTK_TYPE_ICON_SET                  (gtk_icon_set_get_type ())
 
44
#define GTK_TYPE_ICON_SOURCE               (gtk_icon_source_get_type ())
 
45
 
 
46
struct _GtkIconFactory
 
47
{
 
48
  GObject parent_instance;
 
49
 
 
50
  GHashTable *icons;
 
51
};
 
52
 
 
53
struct _GtkIconFactoryClass
 
54
{
 
55
  GObjectClass parent_class;
 
56
 
 
57
  /* Padding for future expansion */
 
58
  void (*_gtk_reserved1) (void);
 
59
  void (*_gtk_reserved2) (void);
 
60
  void (*_gtk_reserved3) (void);
 
61
  void (*_gtk_reserved4) (void);
 
62
};
 
63
 
 
64
#ifdef G_OS_WIN32
 
65
/* Reserve old names for DLL ABI backward compatibility */
 
66
#define gtk_icon_source_set_filename gtk_icon_source_set_filename_utf8
 
67
#define gtk_icon_source_get_filename gtk_icon_source_get_filename_utf8
 
68
#endif
 
69
 
 
70
GType           gtk_icon_factory_get_type (void) G_GNUC_CONST;
 
71
GtkIconFactory* gtk_icon_factory_new      (void);
 
72
void            gtk_icon_factory_add      (GtkIconFactory *factory,
 
73
                                           const gchar    *stock_id,
 
74
                                           GtkIconSet     *icon_set);
 
75
GtkIconSet*     gtk_icon_factory_lookup   (GtkIconFactory *factory,
 
76
                                           const gchar    *stock_id);
 
77
 
 
78
/* Manage the default icon factory stack */
 
79
 
 
80
void        gtk_icon_factory_add_default     (GtkIconFactory  *factory);
 
81
void        gtk_icon_factory_remove_default  (GtkIconFactory  *factory);
 
82
GtkIconSet* gtk_icon_factory_lookup_default  (const gchar     *stock_id);
 
83
 
 
84
/* Get preferred real size from registered semantic size.  Note that
 
85
 * themes SHOULD use this size, but they aren't required to; for size
 
86
 * requests and such, you should get the actual pixbuf from the icon
 
87
 * set and see what size was rendered.
 
88
 *
 
89
 * This function is intended for people who are scaling icons,
 
90
 * rather than for people who are displaying already-scaled icons.
 
91
 * That is, if you are displaying an icon, you should get the
 
92
 * size from the rendered pixbuf, not from here.
 
93
 */
 
94
 
 
95
#ifndef GDK_MULTIHEAD_SAFE
 
96
gboolean gtk_icon_size_lookup              (GtkIconSize  size,
 
97
                                            gint        *width,
 
98
                                            gint        *height);
 
99
#endif /* GDK_MULTIHEAD_SAFE */
 
100
gboolean gtk_icon_size_lookup_for_settings (GtkSettings *settings,
 
101
                                            GtkIconSize  size,
 
102
                                            gint        *width,
 
103
                                            gint        *height);
 
104
 
 
105
GtkIconSize           gtk_icon_size_register       (const gchar *name,
 
106
                                                    gint         width,
 
107
                                                    gint         height);
 
108
void                  gtk_icon_size_register_alias (const gchar *alias,
 
109
                                                    GtkIconSize  target);
 
110
GtkIconSize           gtk_icon_size_from_name      (const gchar *name);
 
111
G_CONST_RETURN gchar* gtk_icon_size_get_name       (GtkIconSize  size);
 
112
 
 
113
/* Icon sets */
 
114
 
 
115
GType       gtk_icon_set_get_type        (void) G_GNUC_CONST;
 
116
GtkIconSet* gtk_icon_set_new             (void);
 
117
GtkIconSet* gtk_icon_set_new_from_pixbuf (GdkPixbuf       *pixbuf);
 
118
 
 
119
GtkIconSet* gtk_icon_set_ref             (GtkIconSet      *icon_set);
 
120
void        gtk_icon_set_unref           (GtkIconSet      *icon_set);
 
121
GtkIconSet* gtk_icon_set_copy            (GtkIconSet      *icon_set);
 
122
 
 
123
/* Get one of the icon variants in the set, creating the variant if
 
124
 * necessary.
 
125
 */
 
126
GdkPixbuf*  gtk_icon_set_render_icon     (GtkIconSet      *icon_set,
 
127
                                          GtkStyle        *style,
 
128
                                          GtkTextDirection direction,
 
129
                                          GtkStateType     state,
 
130
                                          GtkIconSize      size,
 
131
                                          GtkWidget       *widget,
 
132
                                          const char      *detail);
 
133
 
 
134
 
 
135
void           gtk_icon_set_add_source   (GtkIconSet          *icon_set,
 
136
                                          const GtkIconSource *source);
 
137
 
 
138
void           gtk_icon_set_get_sizes    (GtkIconSet          *icon_set,
 
139
                                          GtkIconSize        **sizes,
 
140
                                          gint                *n_sizes);
 
141
 
 
142
GType          gtk_icon_source_get_type                 (void) G_GNUC_CONST;
 
143
GtkIconSource* gtk_icon_source_new                      (void);
 
144
GtkIconSource* gtk_icon_source_copy                     (const GtkIconSource *source);
 
145
void           gtk_icon_source_free                     (GtkIconSource       *source);
 
146
 
 
147
void           gtk_icon_source_set_filename             (GtkIconSource       *source,
 
148
                                                         const gchar         *filename);
 
149
void           gtk_icon_source_set_icon_name            (GtkIconSource       *source,
 
150
                                                         const gchar         *icon_name);
 
151
void           gtk_icon_source_set_pixbuf               (GtkIconSource       *source,
 
152
                                                         GdkPixbuf           *pixbuf);
 
153
 
 
154
G_CONST_RETURN gchar* gtk_icon_source_get_filename  (const GtkIconSource *source);
 
155
G_CONST_RETURN gchar* gtk_icon_source_get_icon_name (const GtkIconSource *source);
 
156
GdkPixbuf*            gtk_icon_source_get_pixbuf    (const GtkIconSource *source);
 
157
 
 
158
void             gtk_icon_source_set_direction_wildcarded (GtkIconSource       *source,
 
159
                                                           gboolean             setting);
 
160
void             gtk_icon_source_set_state_wildcarded     (GtkIconSource       *source,
 
161
                                                           gboolean             setting);
 
162
void             gtk_icon_source_set_size_wildcarded      (GtkIconSource       *source,
 
163
                                                           gboolean             setting);
 
164
gboolean         gtk_icon_source_get_size_wildcarded      (const GtkIconSource *source);
 
165
gboolean         gtk_icon_source_get_state_wildcarded     (const GtkIconSource *source);
 
166
gboolean         gtk_icon_source_get_direction_wildcarded (const GtkIconSource *source);
 
167
void             gtk_icon_source_set_direction            (GtkIconSource       *source,
 
168
                                                           GtkTextDirection     direction);
 
169
void             gtk_icon_source_set_state                (GtkIconSource       *source,
 
170
                                                           GtkStateType         state);
 
171
void             gtk_icon_source_set_size                 (GtkIconSource       *source,
 
172
                                                           GtkIconSize          size);
 
173
GtkTextDirection gtk_icon_source_get_direction            (const GtkIconSource *source);
 
174
GtkStateType     gtk_icon_source_get_state                (const GtkIconSource *source);
 
175
GtkIconSize      gtk_icon_source_get_size                 (const GtkIconSource *source);
 
176
 
 
177
 
 
178
/* ignore this */
 
179
void _gtk_icon_set_invalidate_caches (void);
 
180
GSList* _gtk_icon_factory_list_ids (void);
 
181
void _gtk_icon_factory_ensure_default_icons (void);
 
182
 
 
183
G_END_DECLS
 
184
 
 
185
#endif /* __GTK_ICON_FACTORY_H__ */