2
// Generated by gtkmmproc -- DO NOT MODIFY!
10
/* Copyright (C) 2002 The gtkmm Development Team
12
* This library is free software; you can redistribute it and/or
13
* modify it under the terms of the GNU Library General Public
14
* License as published by the Free Software Foundation; either
15
* version 2 of the License, or (at your option) any later version.
17
* This library is distributed in the hope that it will be useful,
18
* but WITHOUT ANY WARRANTY; without even the implied warranty of
19
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20
* Library General Public License for more details.
22
* You should have received a copy of the GNU Library General Public
23
* License along with this library; if not, write to the Free
24
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
29
#include <gdkmmconfig.h>
31
/* Shadow ERROR macro (from wingdi.h).
33
#if defined(ERROR) && !defined(GTKMM_MACRO_SHADOW_ERROR)
34
enum { GTKMM_MACRO_DEFINITION_ERROR = ERROR };
36
enum { ERROR = GTKMM_MACRO_DEFINITION_ERROR };
38
#define GTKMM_MACRO_SHADOW_ERROR 1
41
/*********************************************************************
43
*********************************************************************/
45
/* macro for controlling version numbers */
48
#define GDK_VERSION_GT(major,minor) ((GTK_MAJOR_VERSION>major)||(GTK_MAJOR_VERSION==major)&&(GTK_MINOR_VERSION>minor))
49
#define GDK_VERSION_GE(major,minor) ((GTK_MAJOR_VERSION>major)||(GTK_MAJOR_VERSION==major)&&(GTK_MINOR_VERSION>=minor))
50
#define GDK_VERSION_EQ(major,minor) ((GTK_MAJOR_VERSION==major)&&(GTK_MINOR_VERSION==minor))
51
#define GDK_VERSION_NE(major,minor) ((GTK_MAJOR_VERSION!=major)||(GTK_MINOR_VERSION!=minor))
52
#define GDK_VERSION_LE(major,minor) ((GTK_MAJOR_VERSION<major)||(GTK_MAJOR_VERSION==major)&&(GTK_MINOR_VERSION<=minor))
53
#define GDK_VERSION_LT(major,minor) ((GTK_MAJOR_VERSION<major)||(GTK_MAJOR_VERSION==major)&&(GTK_MINOR_VERSION<minor))
55
//Note: Use GTK_CHECK_VERSION to check that a version is equal or more than (the micro version).
57
#endif /* _GDK_VERSION */
72
/** @addtogroup gdkmmEnums Enums and Flags */
86
#ifndef DOXYGEN_SHOULD_SKIP_THIS
91
class Value<Gdk::ByteOrder> : public Glib::Value_Enum<Gdk::ByteOrder>
94
static GType value_type() G_GNUC_CONST;
98
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
105
* @ingroup gdkmmEnums
106
* @par Bitwise operators:
107
* <tt>%ModifierType operator|(ModifierType, ModifierType)</tt><br>
108
* <tt>%ModifierType operator&(ModifierType, ModifierType)</tt><br>
109
* <tt>%ModifierType operator^(ModifierType, ModifierType)</tt><br>
110
* <tt>%ModifierType operator~(ModifierType)</tt><br>
111
* <tt>%ModifierType& operator|=(ModifierType&, ModifierType)</tt><br>
112
* <tt>%ModifierType& operator&=(ModifierType&, ModifierType)</tt><br>
113
* <tt>%ModifierType& operator^=(ModifierType&, ModifierType)</tt><br>
119
CONTROL_MASK = 1 << 2,
125
BUTTON1_MASK = 1 << 8,
126
BUTTON2_MASK = 1 << 9,
127
BUTTON3_MASK = 1 << 10,
128
BUTTON4_MASK = 1 << 11,
129
BUTTON5_MASK = 1 << 12,
130
RELEASE_MASK = 1 << 30,
131
MODIFIER_MASK = 0x40001FFF
134
/** @ingroup gdkmmEnums */
135
inline ModifierType operator|(ModifierType lhs, ModifierType rhs)
136
{ return static_cast<ModifierType>(static_cast<unsigned>(lhs) | static_cast<unsigned>(rhs)); }
138
/** @ingroup gdkmmEnums */
139
inline ModifierType operator&(ModifierType lhs, ModifierType rhs)
140
{ return static_cast<ModifierType>(static_cast<unsigned>(lhs) & static_cast<unsigned>(rhs)); }
142
/** @ingroup gdkmmEnums */
143
inline ModifierType operator^(ModifierType lhs, ModifierType rhs)
144
{ return static_cast<ModifierType>(static_cast<unsigned>(lhs) ^ static_cast<unsigned>(rhs)); }
146
/** @ingroup gdkmmEnums */
147
inline ModifierType operator~(ModifierType flags)
148
{ return static_cast<ModifierType>(~static_cast<unsigned>(flags)); }
150
/** @ingroup gdkmmEnums */
151
inline ModifierType& operator|=(ModifierType& lhs, ModifierType rhs)
152
{ return (lhs = static_cast<ModifierType>(static_cast<unsigned>(lhs) | static_cast<unsigned>(rhs))); }
154
/** @ingroup gdkmmEnums */
155
inline ModifierType& operator&=(ModifierType& lhs, ModifierType rhs)
156
{ return (lhs = static_cast<ModifierType>(static_cast<unsigned>(lhs) & static_cast<unsigned>(rhs))); }
158
/** @ingroup gdkmmEnums */
159
inline ModifierType& operator^=(ModifierType& lhs, ModifierType rhs)
160
{ return (lhs = static_cast<ModifierType>(static_cast<unsigned>(lhs) ^ static_cast<unsigned>(rhs))); }
165
#ifndef DOXYGEN_SHOULD_SKIP_THIS
170
class Value<Gdk::ModifierType> : public Glib::Value_Flags<Gdk::ModifierType>
173
static GType value_type() G_GNUC_CONST;
177
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
184
* @ingroup gdkmmEnums
198
#ifndef DOXYGEN_SHOULD_SKIP_THIS
203
class Value<Gdk::Status> : public Glib::Value_Enum<Gdk::Status>
206
static GType value_type() G_GNUC_CONST;
210
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
217
* @ingroup gdkmmEnums
218
* @par Bitwise operators:
219
* <tt>%InputCondition operator|(InputCondition, InputCondition)</tt><br>
220
* <tt>%InputCondition operator&(InputCondition, InputCondition)</tt><br>
221
* <tt>%InputCondition operator^(InputCondition, InputCondition)</tt><br>
222
* <tt>%InputCondition operator~(InputCondition)</tt><br>
223
* <tt>%InputCondition& operator|=(InputCondition&, InputCondition)</tt><br>
224
* <tt>%InputCondition& operator&=(InputCondition&, InputCondition)</tt><br>
225
* <tt>%InputCondition& operator^=(InputCondition&, InputCondition)</tt><br>
230
INPUT_WRITE = 1 << 1,
231
INPUT_EXCEPTION = 1 << 2
234
/** @ingroup gdkmmEnums */
235
inline InputCondition operator|(InputCondition lhs, InputCondition rhs)
236
{ return static_cast<InputCondition>(static_cast<unsigned>(lhs) | static_cast<unsigned>(rhs)); }
238
/** @ingroup gdkmmEnums */
239
inline InputCondition operator&(InputCondition lhs, InputCondition rhs)
240
{ return static_cast<InputCondition>(static_cast<unsigned>(lhs) & static_cast<unsigned>(rhs)); }
242
/** @ingroup gdkmmEnums */
243
inline InputCondition operator^(InputCondition lhs, InputCondition rhs)
244
{ return static_cast<InputCondition>(static_cast<unsigned>(lhs) ^ static_cast<unsigned>(rhs)); }
246
/** @ingroup gdkmmEnums */
247
inline InputCondition operator~(InputCondition flags)
248
{ return static_cast<InputCondition>(~static_cast<unsigned>(flags)); }
250
/** @ingroup gdkmmEnums */
251
inline InputCondition& operator|=(InputCondition& lhs, InputCondition rhs)
252
{ return (lhs = static_cast<InputCondition>(static_cast<unsigned>(lhs) | static_cast<unsigned>(rhs))); }
254
/** @ingroup gdkmmEnums */
255
inline InputCondition& operator&=(InputCondition& lhs, InputCondition rhs)
256
{ return (lhs = static_cast<InputCondition>(static_cast<unsigned>(lhs) & static_cast<unsigned>(rhs))); }
258
/** @ingroup gdkmmEnums */
259
inline InputCondition& operator^=(InputCondition& lhs, InputCondition rhs)
260
{ return (lhs = static_cast<InputCondition>(static_cast<unsigned>(lhs) ^ static_cast<unsigned>(rhs))); }
265
#ifndef DOXYGEN_SHOULD_SKIP_THIS
270
class Value<Gdk::InputCondition> : public Glib::Value_Flags<Gdk::InputCondition>
273
static GType value_type() G_GNUC_CONST;
277
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
284
typedef GdkGeometry Geometry; //It's not used enough to justify having a wrapper.
285
typedef GdkNativeWindow NativeWindow;
287
/** This is a simple structure containing an x and y coordinate of a point.
292
#ifndef DOXYGEN_SHOULD_SKIP_THIS
293
typedef Point CppObjectType;
294
typedef GdkPoint BaseObjectType;
295
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
304
void set_x(int x) { gobject_.x = x; }
305
void set_y(int y) { gobject_.y = y; }
307
int get_x() const { return gobject_.x; }
308
int get_y() const { return gobject_.y; }
310
bool equal(const Gdk::Point& rhs) const;
312
/// Provides access to the underlying C GObject.
313
GdkPoint* gobj() { return &gobject_; }
314
/// Provides access to the underlying C GObject.
315
const GdkPoint* gobj() const { return &gobject_; }
323
/** @relates Gdk::Point */
324
inline bool operator==(const Point& lhs, const Point& rhs)
325
{ return lhs.equal(rhs); }
327
/** @relates Gdk::Point */
328
inline bool operator!=(const Point& lhs, const Point& rhs)
329
{ return !lhs.equal(rhs); }
332
struct AtomStringTraits
334
typedef std::string CppType;
335
typedef GdkAtom CType;
336
typedef GdkAtom CTypeNonConst;
338
static GdkAtom to_c_type(GdkAtom atom) { return atom; }
339
static void release_c_type(GdkAtom) {}
341
// These aren't worth to be inlined since doing so
342
// would expose way too much of the implementation.
343
static GdkAtom to_c_type (const std::string& atom_name);
344
static std::string to_cpp_type(GdkAtom atom);
347
// I'm typedef'ing this because when we call to_c_type or to_c_type,
348
// we don't want it to look like we're calling a template trait, but
349
// a utility function. -Bryan
350
typedef AtomStringTraits AtomString;
352
typedef Glib::ArrayHandle<std::string,AtomStringTraits> ArrayHandle_AtomString;
360
/** @relates Gdk::Point */
361
Gdk::Point& wrap(GdkPoint* object);
363
/** @relates Gdk::Point */
364
const Gdk::Point& wrap(const GdkPoint* object);
369
#endif /* _GDKMM_TYPES_H */