Merged revisions 6293,6296-6306,6308 via svnmerge from
[ardour.git] / libs / gtkmm2 / gdk / src / cursor.hg
1 /* $Id: cursor.hg,v 1.8 2006/04/12 11:11:24 murrayc Exp $ */
2
3 /* drawable.h
4  *
5  * Copyright (C) 1998-2002 The gtkmm Development Team
6  *
7  * This library is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU Library General Public
9  * License as published by the Free Software Foundation; either
10  * version 2 of the License, or (at your option) any later version.
11  *
12  * This library is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15  * Library General Public License for more details.
16  *
17  * You should have received a copy of the GNU Library General Public
18  * License along with this library; if not, write to the Free
19  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20  */
21
22 #include <gdkmm/color.h>
23 #include <gdkmm/bitmap.h>
24 #include <gdkmm/display.h>
25 #include <gdkmm/pixbuf.h>
26
27 _DEFS(gdkmm,gdk)
28 _PINCLUDE(glibmm/private/object_p.h)
29
30
31 namespace Gdk
32 {
33
34 _CC_INCLUDE(gdk/gdkenumtypes.h)
35 _WRAP_ENUM(CursorType, GdkCursorType)
36
37 /** This represents a cursor.
38  */
39 class Cursor
40 {
41   _CLASS_BOXEDTYPE(Cursor, GdkCursor, NONE, gdk_cursor_ref, gdk_cursor_unref)
42   _IGNORE(gdk_cursor_ref, gdk_cursor_unref)
43
44 public:
45   explicit Cursor(CursorType cursor_type);
46   Cursor(const Glib::RefPtr<Pixmap>& source, const Glib::RefPtr<Pixmap>& mask,
47          const Color& fg, const Color& bg,
48          int x, int y);
49   explicit Cursor(const Glib::RefPtr<Display>& display, CursorType cursor_type);
50   Cursor(const Glib::RefPtr<Display>& display, const Glib::RefPtr<Pixbuf>& pixbuf, int x, int y);
51   explicit Cursor(const Glib::RefPtr<Display>& display, const Glib::ustring& name);
52
53   _WRAP_METHOD(Glib::RefPtr<Display> get_display(), gdk_cursor_get_display, refreturn)
54   _WRAP_METHOD(Glib::RefPtr<const Display> get_display() const, gdk_cursor_get_display, refreturn, constversion)
55
56   _WRAP_METHOD(Glib::RefPtr<Gdk::Pixbuf> get_image(), gdk_cursor_get_image)
57   _WRAP_METHOD(Glib::RefPtr<const Gdk::Pixbuf> get_image() const, gdk_cursor_get_image, constversion)
58 };
59
60 } //namespace Gdk
61
62