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

« back to all changes in this revision

Viewing changes to gtk/gtknotebook.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
/* -*- Mode: C; c-file-style: "gnu"; tab-width: 8 -*- */
 
2
/* GTK - The GIMP Toolkit
 
3
 * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
 
4
 *
 
5
 * This library is free software; you can redistribute it and/or
 
6
 * modify it under the terms of the GNU Lesser General Public
 
7
 * License as published by the Free Software Foundation; either
 
8
 * version 2 of the License, or (at your option) any later version.
 
9
 *
 
10
 * This library is distributed in the hope that it will be useful,
 
11
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
12
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 
13
 * Lesser General Public License for more details.
 
14
 *
 
15
 * You should have received a copy of the GNU Lesser General Public
 
16
 * License along with this library; if not, write to the
 
17
 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 
18
 * Boston, MA 02111-1307, USA.
 
19
 */
 
20
 
 
21
/*
 
22
 * Modified by the GTK+ Team and others 1997-2000.  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_NOTEBOOK_H__
 
29
#define __GTK_NOTEBOOK_H__
 
30
 
 
31
 
 
32
#include <gdk/gdk.h>
 
33
#include <gtk/gtkcontainer.h>
 
34
 
 
35
G_BEGIN_DECLS
 
36
 
 
37
#define GTK_TYPE_NOTEBOOK                  (gtk_notebook_get_type ())
 
38
#define GTK_NOTEBOOK(obj)                  (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_NOTEBOOK, GtkNotebook))
 
39
#define GTK_NOTEBOOK_CLASS(klass)          (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_NOTEBOOK, GtkNotebookClass))
 
40
#define GTK_IS_NOTEBOOK(obj)               (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_NOTEBOOK))
 
41
#define GTK_IS_NOTEBOOK_CLASS(klass)       (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_NOTEBOOK))
 
42
#define GTK_NOTEBOOK_GET_CLASS(obj)        (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_NOTEBOOK, GtkNotebookClass))
 
43
 
 
44
 
 
45
typedef enum
 
46
{
 
47
  GTK_NOTEBOOK_TAB_FIRST,
 
48
  GTK_NOTEBOOK_TAB_LAST
 
49
} GtkNotebookTab;
 
50
 
 
51
typedef struct _GtkNotebook       GtkNotebook;
 
52
typedef struct _GtkNotebookClass  GtkNotebookClass;
 
53
typedef struct _GtkNotebookPage   GtkNotebookPage;
 
54
 
 
55
struct _GtkNotebook
 
56
{
 
57
  GtkContainer container;
 
58
  
 
59
  GtkNotebookPage *cur_page;
 
60
  GList *children;
 
61
  GList *first_tab;             /* The first tab visible (for scrolling notebooks) */
 
62
  GList *focus_tab;
 
63
  
 
64
  GtkWidget *menu;
 
65
  GdkWindow *event_window;
 
66
  
 
67
  guint32 timer;
 
68
  
 
69
  guint16 tab_hborder;
 
70
  guint16 tab_vborder;
 
71
  
 
72
  guint show_tabs          : 1;
 
73
  guint homogeneous        : 1;
 
74
  guint show_border        : 1;
 
75
  guint tab_pos            : 2;
 
76
  guint scrollable         : 1;
 
77
  guint in_child           : 3;
 
78
  guint click_child        : 3;
 
79
  guint button             : 2;
 
80
  guint need_timer         : 1;
 
81
  guint child_has_focus    : 1;
 
82
  guint have_visible_child : 1;
 
83
  guint focus_out          : 1; /* Flag used by ::move-focus-out implementation */
 
84
 
 
85
  guint has_before_previous : 1;
 
86
  guint has_before_next     : 1;
 
87
  guint has_after_previous  : 1;
 
88
  guint has_after_next      : 1;
 
89
};
 
90
 
 
91
struct _GtkNotebookClass
 
92
{
 
93
  GtkContainerClass parent_class;
 
94
  
 
95
  void (* switch_page)       (GtkNotebook     *notebook,
 
96
                              GtkNotebookPage *page,
 
97
                              guint            page_num);
 
98
 
 
99
  /* Action signals for keybindings */
 
100
  gboolean (* select_page)     (GtkNotebook       *notebook,
 
101
                                gboolean           move_focus);
 
102
  gboolean (* focus_tab)       (GtkNotebook       *notebook,
 
103
                                GtkNotebookTab     type);
 
104
  gboolean (* change_current_page) (GtkNotebook   *notebook,
 
105
                                gint               offset);
 
106
  void (* move_focus_out)      (GtkNotebook       *notebook,
 
107
                                GtkDirectionType   direction);
 
108
  gboolean (* reorder_tab)     (GtkNotebook       *notebook,
 
109
                                GtkDirectionType   direction,
 
110
                                gboolean           move_to_last);
 
111
 
 
112
  /* More vfuncs */
 
113
  gint (* insert_page)         (GtkNotebook       *notebook,
 
114
                                GtkWidget         *child,
 
115
                                GtkWidget         *tab_label,
 
116
                                GtkWidget         *menu_label,
 
117
                                gint               position);
 
118
 
 
119
  void (*_gtk_reserved1) (void);
 
120
  void (*_gtk_reserved2) (void);
 
121
};
 
122
 
 
123
typedef GtkNotebook* (*GtkNotebookWindowCreationFunc) (GtkNotebook *source,
 
124
                                                       GtkWidget   *page,
 
125
                                                       gint         x,
 
126
                                                       gint         y,
 
127
                                                       gpointer     data);
 
128
 
 
129
/***********************************************************
 
130
 *           Creation, insertion, deletion                 *
 
131
 ***********************************************************/
 
132
 
 
133
GType   gtk_notebook_get_type       (void) G_GNUC_CONST;
 
134
GtkWidget * gtk_notebook_new        (void);
 
135
gint gtk_notebook_append_page       (GtkNotebook *notebook,
 
136
                                     GtkWidget   *child,
 
137
                                     GtkWidget   *tab_label);
 
138
gint gtk_notebook_append_page_menu  (GtkNotebook *notebook,
 
139
                                     GtkWidget   *child,
 
140
                                     GtkWidget   *tab_label,
 
141
                                     GtkWidget   *menu_label);
 
142
gint gtk_notebook_prepend_page      (GtkNotebook *notebook,
 
143
                                     GtkWidget   *child,
 
144
                                     GtkWidget   *tab_label);
 
145
gint gtk_notebook_prepend_page_menu (GtkNotebook *notebook,
 
146
                                     GtkWidget   *child,
 
147
                                     GtkWidget   *tab_label,
 
148
                                     GtkWidget   *menu_label);
 
149
gint gtk_notebook_insert_page       (GtkNotebook *notebook,
 
150
                                     GtkWidget   *child,
 
151
                                     GtkWidget   *tab_label,
 
152
                                     gint         position);
 
153
gint gtk_notebook_insert_page_menu  (GtkNotebook *notebook,
 
154
                                     GtkWidget   *child,
 
155
                                     GtkWidget   *tab_label,
 
156
                                     GtkWidget   *menu_label,
 
157
                                     gint         position);
 
158
void gtk_notebook_remove_page       (GtkNotebook *notebook,
 
159
                                     gint         page_num);
 
160
 
 
161
/***********************************************************
 
162
 *           Tabs drag and drop                            *
 
163
 ***********************************************************/
 
164
 
 
165
void gtk_notebook_set_window_creation_hook (GtkNotebookWindowCreationFunc  func,
 
166
                                            gpointer                       data,
 
167
                                            GDestroyNotify                 destroy);
 
168
void gtk_notebook_set_group_id             (GtkNotebook *notebook,
 
169
                                            gint         group_id);
 
170
gint gtk_notebook_get_group_id             (GtkNotebook *notebook);
 
171
 
 
172
/***********************************************************
 
173
 *            query, set current NoteebookPage             *
 
174
 ***********************************************************/
 
175
 
 
176
gint       gtk_notebook_get_current_page (GtkNotebook *notebook);
 
177
GtkWidget* gtk_notebook_get_nth_page     (GtkNotebook *notebook,
 
178
                                          gint         page_num);
 
179
gint       gtk_notebook_get_n_pages      (GtkNotebook *notebook);
 
180
gint       gtk_notebook_page_num         (GtkNotebook *notebook,
 
181
                                          GtkWidget   *child);
 
182
void       gtk_notebook_set_current_page (GtkNotebook *notebook,
 
183
                                          gint         page_num);
 
184
void       gtk_notebook_next_page        (GtkNotebook *notebook);
 
185
void       gtk_notebook_prev_page        (GtkNotebook *notebook);
 
186
 
 
187
/***********************************************************
 
188
 *            set Notebook, NotebookTab style              *
 
189
 ***********************************************************/
 
190
 
 
191
void     gtk_notebook_set_show_border      (GtkNotebook     *notebook,
 
192
                                            gboolean         show_border);
 
193
gboolean gtk_notebook_get_show_border      (GtkNotebook     *notebook);
 
194
void     gtk_notebook_set_show_tabs        (GtkNotebook     *notebook,
 
195
                                            gboolean         show_tabs);
 
196
gboolean gtk_notebook_get_show_tabs        (GtkNotebook     *notebook);
 
197
void     gtk_notebook_set_tab_pos          (GtkNotebook     *notebook,
 
198
                                            GtkPositionType  pos);
 
199
GtkPositionType gtk_notebook_get_tab_pos   (GtkNotebook     *notebook);
 
200
 
 
201
#ifndef GTK_DISABLE_DEPRECATED
 
202
void     gtk_notebook_set_homogeneous_tabs (GtkNotebook     *notebook,
 
203
                                            gboolean         homogeneous);
 
204
void     gtk_notebook_set_tab_border       (GtkNotebook     *notebook,
 
205
                                            guint            border_width);
 
206
void     gtk_notebook_set_tab_hborder      (GtkNotebook     *notebook,
 
207
                                            guint            tab_hborder);
 
208
void     gtk_notebook_set_tab_vborder      (GtkNotebook     *notebook,
 
209
                                            guint            tab_vborder);
 
210
#endif /* GTK_DISABLE_DEPRECATED */
 
211
 
 
212
void     gtk_notebook_set_scrollable       (GtkNotebook     *notebook,
 
213
                                            gboolean         scrollable);
 
214
gboolean gtk_notebook_get_scrollable       (GtkNotebook     *notebook);
 
215
 
 
216
/***********************************************************
 
217
 *               enable/disable PopupMenu                  *
 
218
 ***********************************************************/
 
219
 
 
220
void gtk_notebook_popup_enable  (GtkNotebook *notebook);
 
221
void gtk_notebook_popup_disable (GtkNotebook *notebook);
 
222
 
 
223
/***********************************************************
 
224
 *             query/set NotebookPage Properties           *
 
225
 ***********************************************************/
 
226
 
 
227
GtkWidget * gtk_notebook_get_tab_label    (GtkNotebook *notebook,
 
228
                                           GtkWidget   *child);
 
229
void gtk_notebook_set_tab_label           (GtkNotebook *notebook,
 
230
                                           GtkWidget   *child,
 
231
                                           GtkWidget   *tab_label);
 
232
void gtk_notebook_set_tab_label_text      (GtkNotebook *notebook,
 
233
                                           GtkWidget   *child,
 
234
                                           const gchar *tab_text);
 
235
G_CONST_RETURN gchar *gtk_notebook_get_tab_label_text (GtkNotebook *notebook,
 
236
                                                       GtkWidget   *child);
 
237
GtkWidget * gtk_notebook_get_menu_label   (GtkNotebook *notebook,
 
238
                                           GtkWidget   *child);
 
239
void gtk_notebook_set_menu_label          (GtkNotebook *notebook,
 
240
                                           GtkWidget   *child,
 
241
                                           GtkWidget   *menu_label);
 
242
void gtk_notebook_set_menu_label_text     (GtkNotebook *notebook,
 
243
                                           GtkWidget   *child,
 
244
                                           const gchar *menu_text);
 
245
G_CONST_RETURN gchar *gtk_notebook_get_menu_label_text (GtkNotebook *notebook,
 
246
                                                        GtkWidget   *child);
 
247
void gtk_notebook_query_tab_label_packing (GtkNotebook *notebook,
 
248
                                           GtkWidget   *child,
 
249
                                           gboolean    *expand,
 
250
                                           gboolean    *fill,
 
251
                                           GtkPackType *pack_type);
 
252
void gtk_notebook_set_tab_label_packing   (GtkNotebook *notebook,
 
253
                                           GtkWidget   *child,
 
254
                                           gboolean     expand,
 
255
                                           gboolean     fill,
 
256
                                           GtkPackType  pack_type);
 
257
void gtk_notebook_reorder_child           (GtkNotebook *notebook,
 
258
                                           GtkWidget   *child,
 
259
                                           gint         position);
 
260
gboolean gtk_notebook_get_tab_reorderable (GtkNotebook *notebook,
 
261
                                           GtkWidget   *child);
 
262
void gtk_notebook_set_tab_reorderable     (GtkNotebook *notebook,
 
263
                                           GtkWidget   *child,
 
264
                                           gboolean     reorderable);
 
265
gboolean gtk_notebook_get_tab_detachable  (GtkNotebook *notebook,
 
266
                                           GtkWidget   *child);
 
267
void gtk_notebook_set_tab_detachable      (GtkNotebook *notebook,
 
268
                                           GtkWidget   *child,
 
269
                                           gboolean     detachable);
 
270
 
 
271
#ifndef GTK_DISABLE_DEPRECATED
 
272
#define gtk_notebook_current_page               gtk_notebook_get_current_page
 
273
#define gtk_notebook_set_page                   gtk_notebook_set_current_page
 
274
#endif /* GTK_DISABLE_DEPRECATED */
 
275
 
 
276
G_END_DECLS
 
277
 
 
278
#endif /* __GTK_NOTEBOOK_H__ */