2 /* $Id: types.ccg,v 1.3 2004/02/10 17:29:54 mxpxpod Exp $ */
4 /* Copyright 1998-2002 The gtkmm Development Team
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Library General Public License for more details.
16 * You should have received a copy of the GNU Library General Public
17 * License along with this library; if not, write to the Free
18 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
30 Point::Point(int x, int y)
36 bool Point::equal(const Gdk::Point& rhs) const
38 return (gobject_.x == rhs.gobject_.x) && (gobject_.y == rhs.gobject_.y);
42 GdkAtom AtomStringTraits::to_c_type(const std::string& atom_name)
44 return gdk_atom_intern(atom_name.c_str(), 0);
48 std::string AtomStringTraits::to_cpp_type(GdkAtom atom)
50 if(char *const atom_name = gdk_atom_name(atom))
51 return std::string(Glib::ScopedPtr<char>(atom_name).get());
62 Gdk::Point& wrap(GdkPoint* object)
64 return *reinterpret_cast<Gdk::Point*>(object);
67 const Gdk::Point& wrap(const GdkPoint* object)
69 return *reinterpret_cast<const Gdk::Point*>(object);