Ardour  9.0-pre0-384-ga76afae0e9
gtkprivate.h
Go to the documentation of this file.
1 /* GTK - The GIMP Toolkit
2  * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
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_PRIVATE_H__
28 #define __GTK_PRIVATE_H__
29 
30 #include <gtk/gtkwidget.h>
31 
32 G_BEGIN_DECLS
33 
34 /* The private flags that are used in the private_flags member of GtkWidget.
35  */
36 typedef enum
37 {
40  PRIVATE_GTK_HAS_POINTER = 1 << 3, /* If the pointer is above a window belonging to the widget */
41  PRIVATE_GTK_SHADOWED = 1 << 4, /* If there is a grab in effect shadowing the widget */
44  PRIVATE_GTK_DIRECTION_SET = 1 << 7, /* If the reading direction is not DIR_NONE */
45  PRIVATE_GTK_DIRECTION_LTR = 1 << 8, /* If the reading direction is DIR_LTR */
46  PRIVATE_GTK_ANCHORED = 1 << 9, /* If widget has a GtkWindow ancestor */
47  PRIVATE_GTK_CHILD_VISIBLE = 1 << 10, /* If widget should be mapped when parent is mapped */
48  PRIVATE_GTK_REDRAW_ON_ALLOC = 1 << 11, /* If we should queue a draw on the entire widget when it is reallocated */
49  PRIVATE_GTK_ALLOC_NEEDED = 1 << 12, /* If we we should allocate even if the allocation is the same */
50  PRIVATE_GTK_REQUEST_NEEDED = 1 << 13 /* Whether we need to call gtk_widget_size_request */
52 
53 /* Macros for extracting a widgets private_flags from GtkWidget.
54  */
55 #define GTK_PRIVATE_FLAGS(wid) (GTK_WIDGET (wid)->private_flags)
56 #define GTK_WIDGET_USER_STYLE(obj) ((GTK_PRIVATE_FLAGS (obj) & PRIVATE_GTK_USER_STYLE) != 0)
57 #define GTK_CONTAINER_RESIZE_PENDING(obj) ((GTK_PRIVATE_FLAGS (obj) & PRIVATE_GTK_RESIZE_PENDING) != 0)
58 #define GTK_WIDGET_HAS_POINTER(obj) ((GTK_PRIVATE_FLAGS (obj) & PRIVATE_GTK_HAS_POINTER) != 0)
59 #define GTK_WIDGET_SHADOWED(obj) ((GTK_PRIVATE_FLAGS (obj) & PRIVATE_GTK_SHADOWED) != 0)
60 #define GTK_WIDGET_HAS_SHAPE_MASK(obj) ((GTK_PRIVATE_FLAGS (obj) & PRIVATE_GTK_HAS_SHAPE_MASK) != 0)
61 #define GTK_WIDGET_IN_REPARENT(obj) ((GTK_PRIVATE_FLAGS (obj) & PRIVATE_GTK_IN_REPARENT) != 0)
62 #define GTK_WIDGET_DIRECTION_SET(obj) ((GTK_PRIVATE_FLAGS (obj) & PRIVATE_GTK_DIRECTION_SET) != 0)
63 #define GTK_WIDGET_DIRECTION_LTR(obj) ((GTK_PRIVATE_FLAGS (obj) & PRIVATE_GTK_DIRECTION_LTR) != 0)
64 #define GTK_WIDGET_ANCHORED(obj) ((GTK_PRIVATE_FLAGS (obj) & PRIVATE_GTK_ANCHORED) != 0)
65 #define GTK_WIDGET_CHILD_VISIBLE(obj) ((GTK_PRIVATE_FLAGS (obj) & PRIVATE_GTK_CHILD_VISIBLE) != 0)
66 #define GTK_WIDGET_REDRAW_ON_ALLOC(obj) ((GTK_PRIVATE_FLAGS (obj) & PRIVATE_GTK_REDRAW_ON_ALLOC) != 0)
67 #define GTK_WIDGET_ALLOC_NEEDED(obj) ((GTK_PRIVATE_FLAGS (obj) & PRIVATE_GTK_ALLOC_NEEDED) != 0)
68 #define GTK_WIDGET_REQUEST_NEEDED(obj) ((GTK_PRIVATE_FLAGS (obj) & PRIVATE_GTK_REQUEST_NEEDED) != 0)
69 
70 /* Macros for setting and clearing private widget flags.
71  * we use a preprocessor string concatenation here for a clear
72  * flags/private_flags distinction at the cost of single flag operations.
73  */
74 #define GTK_PRIVATE_SET_FLAG(wid,flag) G_STMT_START{ (GTK_PRIVATE_FLAGS (wid) |= (PRIVATE_ ## flag)); }G_STMT_END
75 #define GTK_PRIVATE_UNSET_FLAG(wid,flag) G_STMT_START{ (GTK_PRIVATE_FLAGS (wid) &= ~(PRIVATE_ ## flag)); }G_STMT_END
76 
77 #if defined G_OS_WIN32
78 
79 const gchar *_gtk_get_datadir ();
80 const gchar *_gtk_get_libdir ();
81 const gchar *_gtk_get_sysconfdir ();
82 const gchar *_gtk_get_localedir ();
83 const gchar *_gtk_get_data_prefix ();
84 
85 #undef GTK_LIBDIR
86 #define GTK_LIBDIR _gtk_get_libdir ()
87 #undef GTK_LOCALEDIR
88 #define GTK_LOCALEDIR _gtk_get_localedir ()
89 
90 #endif /* G_OS_WIN32 */
91 
92 gboolean _gtk_fnmatch (const char *pattern,
93  const char *string,
94  gboolean no_leading_period);
95 
96 #define GTK_PARAM_READABLE G_PARAM_READABLE|G_PARAM_STATIC_NAME|G_PARAM_STATIC_NICK|G_PARAM_STATIC_BLURB
97 #define GTK_PARAM_WRITABLE G_PARAM_WRITABLE|G_PARAM_STATIC_NAME|G_PARAM_STATIC_NICK|G_PARAM_STATIC_BLURB
98 #define GTK_PARAM_READWRITE G_PARAM_READWRITE|G_PARAM_STATIC_NAME|G_PARAM_STATIC_NICK|G_PARAM_STATIC_BLURB
99 
100 /* Many keyboard shortcuts for Mac are the same as for X
101  * except they use Command key instead of Control (e.g. Cut,
102  * Copy, Paste). This symbol is for those simple cases. */
103 #ifndef GDK_WINDOWING_QUARTZ
104 #define GTK_DEFAULT_ACCEL_MOD_MASK GDK_CONTROL_MASK
105 #define GTK_DEFAULT_ACCEL_MOD_MASK_VIRTUAL GDK_CONTROL_MASK
106 #else
107 #define GTK_DEFAULT_ACCEL_MOD_MASK GDK_MOD2_MASK
108 #define GTK_DEFAULT_ACCEL_MOD_MASK_VIRTUAL GDK_MOD2_MASK
109 #endif
110 
111 /* When any of these modifiers are active, a key
112  * event cannot produce a symbol, so should be
113  * skipped when handling text input
114  */
115 #ifndef GDK_WINDOWING_QUARTZ
116 #define GTK_NO_TEXT_INPUT_MOD_MASK (GDK_MOD1_MASK | GDK_CONTROL_MASK)
117 #else
118 #define GTK_NO_TEXT_INPUT_MOD_MASK (GDK_MOD2_MASK | GDK_CONTROL_MASK)
119 #endif
120 
121 #ifndef GDK_WINDOWING_QUARTZ
122 #define GTK_EXTEND_SELECTION_MOD_MASK GDK_SHIFT_MASK
123 #define GTK_MODIFY_SELECTION_MOD_MASK GDK_CONTROL_MASK
124 #else
125 #define GTK_EXTEND_SELECTION_MOD_MASK GDK_SHIFT_MASK
126 #define GTK_MODIFY_SELECTION_MOD_MASK GDK_MOD2_MASK
127 #endif
128 
129 #ifndef GDK_WINDOWING_QUARTZ
130 #define GTK_TOGGLE_GROUP_MOD_MASK 0
131 #else
132 #define GTK_TOGGLE_GROUP_MOD_MASK GDK_MOD1_MASK
133 #endif
134 
136 
138  guint hardware_keycode,
139  GdkModifierType state,
140  GdkModifierType accel_mask,
141  gint group,
142  guint *keyval,
143  gint *effective_group,
144  gint *level,
145  GdkModifierType *consumed_modifiers);
146 
147 
148 G_END_DECLS
149 
150 #endif /* __GTK_PRIVATE_H__ */
GdkModifierType
Definition: gdktypes.h:127
gboolean _gtk_fnmatch(const char *pattern, const char *string, gboolean no_leading_period)
gboolean _gtk_button_event_triggers_context_menu(GdkEventButton *event)
GtkPrivateFlags
Definition: gtkprivate.h:37
@ PRIVATE_GTK_HAS_SHAPE_MASK
Definition: gtkprivate.h:42
@ PRIVATE_GTK_DIRECTION_LTR
Definition: gtkprivate.h:45
@ PRIVATE_GTK_RESIZE_PENDING
Definition: gtkprivate.h:39
@ PRIVATE_GTK_SHADOWED
Definition: gtkprivate.h:41
@ PRIVATE_GTK_USER_STYLE
Definition: gtkprivate.h:38
@ PRIVATE_GTK_DIRECTION_SET
Definition: gtkprivate.h:44
@ PRIVATE_GTK_ANCHORED
Definition: gtkprivate.h:46
@ PRIVATE_GTK_ALLOC_NEEDED
Definition: gtkprivate.h:49
@ PRIVATE_GTK_CHILD_VISIBLE
Definition: gtkprivate.h:47
@ PRIVATE_GTK_IN_REPARENT
Definition: gtkprivate.h:43
@ PRIVATE_GTK_REDRAW_ON_ALLOC
Definition: gtkprivate.h:48
@ PRIVATE_GTK_HAS_POINTER
Definition: gtkprivate.h:40
@ PRIVATE_GTK_REQUEST_NEEDED
Definition: gtkprivate.h:50
gboolean _gtk_translate_keyboard_accel_state(GdkKeymap *keymap, guint hardware_keycode, GdkModifierType state, GdkModifierType accel_mask, gint group, guint *keyval, gint *effective_group, gint *level, GdkModifierType *consumed_modifiers)
link region and track false waveform clip level