2 // Generated by gtkmmproc -- DO NOT MODIFY!
3 #ifndef _GDKMM_CURSOR_H
4 #define _GDKMM_CURSOR_H
13 * Copyright (C) 1998-2002 The gtkmm Development Team
15 * This library is free software; you can redistribute it and/or
16 * modify it under the terms of the GNU Library General Public
17 * License as published by the Free Software Foundation; either
18 * version 2 of the License, or (at your option) any later version.
20 * This library is distributed in the hope that it will be useful,
21 * but WITHOUT ANY WARRANTY; without even the implied warranty of
22 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
23 * Library General Public License for more details.
25 * You should have received a copy of the GNU Library General Public
26 * License along with this library; if not, write to the Free
27 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
30 #include <gdkmm/color.h>
31 #include <gdkmm/bitmap.h>
32 #include <gdkmm/display.h>
33 #include <gdkmm/pixbuf.h>
36 #ifndef DOXYGEN_SHOULD_SKIP_THIS
37 extern "C" { typedef struct _GdkCursor GdkCursor; }
44 /** @addtogroup gdkmmEnums Enums and Flags */
57 BOTTOM_LEFT_CORNER = 12,
58 BOTTOM_RIGHT_CORNER = 14,
105 SB_H_DOUBLE_ARROW = 108,
107 SB_RIGHT_ARROW = 112,
109 SB_V_DOUBLE_ARROW = 116,
117 TOP_LEFT_ARROW = 132,
118 TOP_LEFT_CORNER = 134,
119 TOP_RIGHT_CORNER = 136,
129 CURSOR_IS_PIXMAP = -1
135 #ifndef DOXYGEN_SHOULD_SKIP_THIS
140 class Value<Gdk::CursorType> : public Glib::Value_Enum<Gdk::CursorType>
143 static GType value_type() G_GNUC_CONST;
147 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
154 /** This represents a cursor.
159 #ifndef DOXYGEN_SHOULD_SKIP_THIS
160 typedef Cursor CppObjectType;
161 typedef GdkCursor BaseObjectType;
163 static GType get_type() G_GNUC_CONST;
164 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
168 explicit Cursor(GdkCursor* gobject, bool make_a_copy = true);
170 Cursor(const Cursor& other);
171 Cursor& operator=(const Cursor& other);
175 void swap(Cursor& other);
177 ///Provides access to the underlying C instance.
178 GdkCursor* gobj() { return gobject_; }
180 ///Provides access to the underlying C instance.
181 const GdkCursor* gobj() const { return gobject_; }
183 ///Provides access to the underlying C instance. The caller is responsible for freeing it. Use when directly setting fields in structs.
184 GdkCursor* gobj_copy() const;
193 explicit Cursor(CursorType cursor_type);
194 Cursor(const Glib::RefPtr<Pixmap>& source, const Glib::RefPtr<Pixmap>& mask,
195 const Color& fg, const Color& bg,
197 explicit Cursor(const Glib::RefPtr<Display>& display, CursorType cursor_type);
198 Cursor(const Glib::RefPtr<Display>& display, const Glib::RefPtr<Pixbuf>& pixbuf, int x, int y);
199 explicit Cursor(const Glib::RefPtr<Display>& display, const Glib::ustring& name);
202 /** Returns: the Gdk::Display associated to @a cursor
203 * @return The Gdk::Display associated to @a cursor
207 Glib::RefPtr<Display> get_display();
209 /** Returns: the Gdk::Display associated to @a cursor
210 * @return The Gdk::Display associated to @a cursor
214 Glib::RefPtr<const Display> get_display() const;
217 /** Returns: a Gdk::Pixbuf representing @a cursor , or <tt>0</tt>
218 * @return A Gdk::Pixbuf representing @a cursor , or <tt>0</tt>
222 Glib::RefPtr<Gdk::Pixbuf> get_image();
224 /** Returns: a Gdk::Pixbuf representing @a cursor , or <tt>0</tt>
225 * @return A Gdk::Pixbuf representing @a cursor , or <tt>0</tt>
229 Glib::RefPtr<const Gdk::Pixbuf> get_image() const;
240 /** @relates Gdk::Cursor
241 * @param lhs The left-hand side
242 * @param rhs The right-hand side
244 inline void swap(Cursor& lhs, Cursor& rhs)
252 /** A Glib::wrap() method for this object.
254 * @param object The C instance.
255 * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
256 * @result A C++ instance that wraps this C instance.
258 * @relates Gdk::Cursor
260 Gdk::Cursor wrap(GdkCursor* object, bool take_copy = false);
262 #ifndef DOXYGEN_SHOULD_SKIP_THIS
264 class Value<Gdk::Cursor> : public Glib::Value_Boxed<Gdk::Cursor>
266 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
271 #endif /* _GDKMM_CURSOR_H */