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

« back to all changes in this revision

Viewing changes to gtk/gtkcellrenderer.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
/* gtkcellrenderer.h
 
2
 * Copyright (C) 2000  Red Hat, Inc.,  Jonathan Blandford <jrb@redhat.com>
 
3
 *
 
4
 * This library is free software; you can redistribute it and/or
 
5
 * modify it under the terms of the GNU Library 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
 * Library General Public License for more details.
 
13
 *
 
14
 * You should have received a copy of the GNU Library 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
#ifndef __GTK_CELL_RENDERER_H__
 
21
#define __GTK_CELL_RENDERER_H__
 
22
 
 
23
#include <gtk/gtkobject.h>
 
24
#include <gtk/gtkwidget.h>
 
25
#include <gtk/gtkcelleditable.h>
 
26
 
 
27
G_BEGIN_DECLS
 
28
 
 
29
typedef enum
 
30
{
 
31
  GTK_CELL_RENDERER_SELECTED    = 1 << 0,
 
32
  GTK_CELL_RENDERER_PRELIT      = 1 << 1,
 
33
  GTK_CELL_RENDERER_INSENSITIVE = 1 << 2,
 
34
  /* this flag means the cell is in the sort column/row */
 
35
  GTK_CELL_RENDERER_SORTED      = 1 << 3,
 
36
  GTK_CELL_RENDERER_FOCUSED     = 1 << 4
 
37
} GtkCellRendererState;
 
38
 
 
39
typedef enum
 
40
{
 
41
  GTK_CELL_RENDERER_MODE_INERT,
 
42
  GTK_CELL_RENDERER_MODE_ACTIVATABLE,
 
43
  GTK_CELL_RENDERER_MODE_EDITABLE
 
44
} GtkCellRendererMode;
 
45
 
 
46
#define GTK_TYPE_CELL_RENDERER            (gtk_cell_renderer_get_type ())
 
47
#define GTK_CELL_RENDERER(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_CELL_RENDERER, GtkCellRenderer))
 
48
#define GTK_CELL_RENDERER_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_CELL_RENDERER, GtkCellRendererClass))
 
49
#define GTK_IS_CELL_RENDERER(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_CELL_RENDERER))
 
50
#define GTK_IS_CELL_RENDERER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_CELL_RENDERER))
 
51
#define GTK_CELL_RENDERER_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_CELL_RENDERER, GtkCellRendererClass))
 
52
 
 
53
typedef struct _GtkCellRenderer GtkCellRenderer;
 
54
typedef struct _GtkCellRendererClass GtkCellRendererClass;
 
55
 
 
56
struct _GtkCellRenderer
 
57
{
 
58
  GtkObject parent;
 
59
 
 
60
  gfloat xalign;
 
61
  gfloat yalign;
 
62
 
 
63
  gint width;
 
64
  gint height;
 
65
 
 
66
  guint16 xpad;
 
67
  guint16 ypad;
 
68
 
 
69
  guint mode : 2;
 
70
  guint visible : 1;
 
71
  guint is_expander : 1;
 
72
  guint is_expanded : 1;
 
73
  guint cell_background_set : 1;
 
74
  guint sensitive : 1;
 
75
  guint editing : 1;
 
76
};
 
77
 
 
78
struct _GtkCellRendererClass
 
79
{
 
80
  GtkObjectClass parent_class;
 
81
 
 
82
  /* vtable - not signals */
 
83
  void             (* get_size)      (GtkCellRenderer      *cell,
 
84
                                      GtkWidget            *widget,
 
85
                                      GdkRectangle         *cell_area,
 
86
                                      gint                 *x_offset,
 
87
                                      gint                 *y_offset,
 
88
                                      gint                 *width,
 
89
                                      gint                 *height);
 
90
  void             (* render)        (GtkCellRenderer      *cell,
 
91
                                      GdkDrawable          *window,
 
92
                                      GtkWidget            *widget,
 
93
                                      GdkRectangle         *background_area,
 
94
                                      GdkRectangle         *cell_area,
 
95
                                      GdkRectangle         *expose_area,
 
96
                                      GtkCellRendererState  flags);
 
97
  gboolean         (* activate)      (GtkCellRenderer      *cell,
 
98
                                      GdkEvent             *event,
 
99
                                      GtkWidget            *widget,
 
100
                                      const gchar          *path,
 
101
                                      GdkRectangle         *background_area,
 
102
                                      GdkRectangle         *cell_area,
 
103
                                      GtkCellRendererState  flags);
 
104
  GtkCellEditable *(* start_editing) (GtkCellRenderer      *cell,
 
105
                                      GdkEvent             *event,
 
106
                                      GtkWidget            *widget,
 
107
                                      const gchar          *path,
 
108
                                      GdkRectangle         *background_area,
 
109
                                      GdkRectangle         *cell_area,
 
110
                                      GtkCellRendererState  flags);
 
111
 
 
112
  /* Signals */
 
113
  void (* editing_canceled) (GtkCellRenderer *cell);
 
114
  void (* editing_started)  (GtkCellRenderer *cell,
 
115
                             GtkCellEditable *editable,
 
116
                             const gchar     *path);
 
117
 
 
118
  /* Padding for future expansion */
 
119
  void (*_gtk_reserved1) (void);
 
120
  void (*_gtk_reserved2) (void);
 
121
};
 
122
 
 
123
GType            gtk_cell_renderer_get_type       (void) G_GNUC_CONST;
 
124
 
 
125
void             gtk_cell_renderer_get_size       (GtkCellRenderer      *cell,
 
126
                                                   GtkWidget            *widget,
 
127
                                                   GdkRectangle         *cell_area,
 
128
                                                   gint                 *x_offset,
 
129
                                                   gint                 *y_offset,
 
130
                                                   gint                 *width,
 
131
                                                   gint                 *height);
 
132
void             gtk_cell_renderer_render         (GtkCellRenderer      *cell,
 
133
                                                   GdkWindow            *window,
 
134
                                                   GtkWidget            *widget,
 
135
                                                   GdkRectangle         *background_area,
 
136
                                                   GdkRectangle         *cell_area,
 
137
                                                   GdkRectangle         *expose_area,
 
138
                                                   GtkCellRendererState  flags);
 
139
gboolean         gtk_cell_renderer_activate       (GtkCellRenderer      *cell,
 
140
                                                   GdkEvent             *event,
 
141
                                                   GtkWidget            *widget,
 
142
                                                   const gchar          *path,
 
143
                                                   GdkRectangle         *background_area,
 
144
                                                   GdkRectangle         *cell_area,
 
145
                                                   GtkCellRendererState  flags);
 
146
GtkCellEditable *gtk_cell_renderer_start_editing  (GtkCellRenderer      *cell,
 
147
                                                   GdkEvent             *event,
 
148
                                                   GtkWidget            *widget,
 
149
                                                   const gchar          *path,
 
150
                                                   GdkRectangle         *background_area,
 
151
                                                   GdkRectangle         *cell_area,
 
152
                                                   GtkCellRendererState  flags);
 
153
void             gtk_cell_renderer_set_fixed_size (GtkCellRenderer      *cell,
 
154
                                                   gint                  width,
 
155
                                                   gint                  height);
 
156
void             gtk_cell_renderer_get_fixed_size (GtkCellRenderer      *cell,
 
157
                                                   gint                 *width,
 
158
                                                   gint                 *height);
 
159
 
 
160
/* For use by cell renderer implementations only */
 
161
#ifndef GTK_DISABLE_DEPRECATED
 
162
void gtk_cell_renderer_editing_canceled (GtkCellRenderer *cell);
 
163
#endif
 
164
void gtk_cell_renderer_stop_editing     (GtkCellRenderer *cell,
 
165
                                         gboolean         canceled);
 
166
 
 
167
 
 
168
G_END_DECLS
 
169
 
 
170
#endif /* __GTK_CELL_RENDERER_H__ */