6 * Copyright (C) 1998-2002 The gtkmm Development Team
8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either
11 * version 2 of the License, or (at your option) any later version.
13 * This library is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Library General Public License for more details.
18 * You should have received a copy of the GNU Library General Public
19 * License along with this library; if not, write to the Free
20 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
23 #include <gtkmm/targetentry.h>
29 TargetEntry::TargetEntry()
31 memset(&gobject_, 0, sizeof(gobject_));
34 TargetEntry::TargetEntry(const Glib::ustring& target, Gtk::TargetFlags flags, guint info)
41 TargetEntry::TargetEntry(const GtkTargetEntry& gobject)
43 set_target(gobject.target);
44 set_info(gobject.info);
45 set_flags(TargetFlags(gobject.flags));
48 TargetEntry::TargetEntry(const TargetEntry& src)
50 set_target(src.get_target());
51 set_info(src.get_info());
52 set_flags(src.get_flags());
55 TargetEntry::~TargetEntry()
57 g_free(gobject_.target);
60 TargetEntry& TargetEntry::operator=(const TargetEntry& src)
64 set_target(src.get_target());
65 set_info(src.get_info());
66 set_flags(src.get_flags());
72 Glib::ustring TargetEntry::get_target() const
74 return gobject_.target;
77 void TargetEntry::set_target(const Glib::ustring& target)
79 gobject_.target = g_strdup(target.c_str());
82 Gtk::TargetFlags TargetEntry::get_flags() const
84 return (Gtk::TargetFlags)(gobject_.flags);
87 void TargetEntry::set_flags(Gtk::TargetFlags flags)
89 gobject_.flags = (guint)(flags);
92 guint TargetEntry::get_info() const
97 void TargetEntry::set_info(guint info)
102 GtkTargetEntry* TargetEntry::gobj()
107 const GtkTargetEntry* TargetEntry::gobj() const
112 } /* namespace Gtk */