| 1 |
#ifndef _GTKMM_TARGETENTRY_H |
| 2 |
#define _GTKMM_TARGETENTRY_H |
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
|
| 21 |
#include <glibmm/utility.h> |
| 22 |
#include <glibmm/ustring.h> |
| 23 |
#include <gtkmm/enums.h> |
| 24 |
#include <gtk/gtk.h> |
| 25 |
|
| 26 |
#ifndef DOXYGEN_SHOULD_SKIP_THIS |
| 27 |
extern "C" |
| 28 |
{ |
| 29 |
typedef struct _GtkTargetEntry GtkTargetEntry; |
| 30 |
} |
| 31 |
#endif |
| 32 |
|
| 33 |
namespace Gtk |
| 34 |
{ |
| 35 |
|
| 36 |
class GTKMM_API TargetEntry |
| 37 |
{ |
| 38 |
public: |
| 39 |
TargetEntry(); |
| 40 |
explicit TargetEntry(const Glib::ustring& target, Gtk::TargetFlags flags = Gtk::TargetFlags(0), guint info = 0); |
| 41 |
explicit TargetEntry(const GtkTargetEntry& gobject); |
| 42 |
TargetEntry(const TargetEntry& src); |
| 43 |
virtual ~TargetEntry() noexcept; |
| 44 |
|
| 45 |
TargetEntry& operator=(const TargetEntry& src); |
| 46 |
|
| 47 |
Glib::ustring get_target() const; |
| 48 |
void set_target(const Glib::ustring& target); |
| 49 |
|
| 50 |
Gtk::TargetFlags get_flags() const; |
| 51 |
void set_flags(Gtk::TargetFlags flags); |
| 52 |
|
| 53 |
guint get_info() const; |
| 54 |
void set_info(guint info); |
| 55 |
|
| 56 |
|
| 57 |
|
| 58 |
GtkTargetEntry* gobj(); |
| 59 |
const GtkTargetEntry* gobj() const; |
| 60 |
|
| 61 |
protected: |
| 62 |
GtkTargetEntry gobject_; |
| 63 |
}; |
| 64 |
|
| 65 |
#ifndef DOXYGEN_SHOULD_SKIP_THIS |
| 66 |
struct TargetEntryTraits |
| 67 |
{ |
| 68 |
typedef TargetEntry CppType; |
| 69 |
typedef GtkTargetEntry CType; |
| 70 |
typedef GtkTargetEntry CTypeNonConst; |
| 71 |
|
| 72 |
static const CType& to_c_type(const CppType& item) |
| 73 |
{ return *item.gobj(); } |
| 74 |
|
| 75 |
static const CType& to_c_type(const CType& item) |
| 76 |
{ return item; } |
| 77 |
|
| 78 |
static CppType to_cpp_type(const CType& item) |
| 79 |
{ return TargetEntry(item); } |
| 80 |
|
| 81 |
static void release_c_type(const CType&) {} |
| 82 |
}; |
| 83 |
#endif |
| 84 |
|
| 85 |
} |
| 86 |
|
| 87 |
#endif |