Ardour  8.7-14-g57a6773833
dragcontext.h
Go to the documentation of this file.
1 // -*- c++ -*-
2 // Generated by gmmproc 2.45.3 -- DO NOT MODIFY!
3 #ifndef _GDKMM_DRAGCONTEXT_H
4 #define _GDKMM_DRAGCONTEXT_H
5 
6 
7 #include <glibmm/ustring.h>
8 #include <sigc++/sigc++.h>
9 
10 /* $Id: dragcontext.hg,v 1.11 2006/03/22 16:53:21 murrayc Exp $ */
11 
12 /* dragcontext.h
13  *
14  * Copyright (C) 1998-2002 The gtkmm Development Team
15  *
16  * This library is free software; you can redistribute it and/or
17  * modify it under the terms of the GNU Lesser General Public
18  * License as published by the Free Software Foundation; either
19  * version 2.1 of the License, or (at your option) any later version.
20  *
21  * This library is distributed in the hope that it will be useful,
22  * but WITHOUT ANY WARRANTY; without even the implied warranty of
23  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
24  * Lesser General Public License for more details.
25  *
26  * You should have received a copy of the GNU Lesser General Public
27  * License along with this library; if not, write to the Free
28  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
29  */
30 
31 
32 #include <glibmm/object.h>
33 #include <gdkmm/pixbuf.h>
34 //#include <gdkmm/bitmap.h>
35 #include <gdkmm/colormap.h>
36 #include <glibmm/listhandle.h>
37 
38 
39 #ifndef DOXYGEN_SHOULD_SKIP_THIS
40 typedef struct _GdkDragContext GdkDragContext;
42 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
43 
44 
45 #ifndef DOXYGEN_SHOULD_SKIP_THIS
46 namespace Gdk
47 { class DragContext_Class; } // namespace Gdk
48 #endif //DOXYGEN_SHOULD_SKIP_THIS
49 
50 namespace Gdk
51 {
52 
68 {
69  ACTION_DEFAULT = 1 << 0,
70  ACTION_COPY = 1 << 1,
71  ACTION_MOVE = 1 << 2,
72  ACTION_LINK = 1 << 3,
73  ACTION_PRIVATE = 1 << 4,
74  ACTION_ASK = 1 << 5
75 };
76 
79  { return static_cast<DragAction>(static_cast<unsigned>(lhs) | static_cast<unsigned>(rhs)); }
80 
83  { return static_cast<DragAction>(static_cast<unsigned>(lhs) & static_cast<unsigned>(rhs)); }
84 
87  { return static_cast<DragAction>(static_cast<unsigned>(lhs) ^ static_cast<unsigned>(rhs)); }
88 
91  { return static_cast<DragAction>(~static_cast<unsigned>(flags)); }
92 
95  { return (lhs = static_cast<DragAction>(static_cast<unsigned>(lhs) | static_cast<unsigned>(rhs))); }
96 
99  { return (lhs = static_cast<DragAction>(static_cast<unsigned>(lhs) & static_cast<unsigned>(rhs))); }
100 
103  { return (lhs = static_cast<DragAction>(static_cast<unsigned>(lhs) ^ static_cast<unsigned>(rhs))); }
104 
105 } // namespace Gdk
106 
107 
108 #ifndef DOXYGEN_SHOULD_SKIP_THIS
109 namespace Glib
110 {
111 
112 template <>
113 class Value<Gdk::DragAction> : public Glib::Value_Flags<Gdk::DragAction>
114 {
115 public:
116  static GType value_type() G_GNUC_CONST;
117 };
118 
119 } // namespace Glib
120 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
121 
122 
123 namespace Gdk
124 {
125 
131 {
138 };
139 
140 } // namespace Gdk
141 
142 
143 #ifndef DOXYGEN_SHOULD_SKIP_THIS
144 namespace Glib
145 {
146 
147 template <>
148 class Value<Gdk::DragProtocol> : public Glib::Value_Enum<Gdk::DragProtocol>
149 {
150 public:
151  static GType value_type() G_GNUC_CONST;
152 };
153 
154 } // namespace Glib
155 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
156 
157 
158 namespace Gdk
159 {
160 
161 
165 class DragContext : public Glib::Object
166 {
167 
168 #ifndef DOXYGEN_SHOULD_SKIP_THIS
169 
170 public:
171  typedef DragContext CppObjectType;
172  typedef DragContext_Class CppClassType;
173  typedef GdkDragContext BaseObjectType;
174  typedef GdkDragContextClass BaseClassType;
175 
176 private: friend class DragContext_Class;
177  static CppClassType dragcontext_class_;
178 
179 private:
180  // noncopyable
181  DragContext(const DragContext&);
182  DragContext& operator=(const DragContext&);
183 
184 protected:
185  explicit DragContext(const Glib::ConstructParams& construct_params);
186  explicit DragContext(GdkDragContext* castitem);
187 
188 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
189 
190 public:
191  virtual ~DragContext();
192 
195  static GType get_type() G_GNUC_CONST;
196 
197 #ifndef DOXYGEN_SHOULD_SKIP_THIS
198 
199 
200  static GType get_base_type() G_GNUC_CONST;
201 #endif
202 
204  GdkDragContext* gobj() { return reinterpret_cast<GdkDragContext*>(gobject_); }
205 
207  const GdkDragContext* gobj() const { return reinterpret_cast<GdkDragContext*>(gobject_); }
208 
211 
212 private:
213 
214 
215 protected:
216 
217  #ifndef GDKMM_DISABLE_DEPRECATED
218 
222  #endif // GDKMM_DISABLE_DEPRECATED
223 
224 
225 public:
226  #ifndef GDKMM_DISABLE_DEPRECATED
227 
231  static Glib::RefPtr<DragContext> create();
232 
233  #endif // GDKMM_DISABLE_DEPRECATED
234 
235 
245  void drag_status(DragAction action, guint32 time);
246 
253  void drag_refuse(guint32 time);
254 
255  //gdk_drag_motion is only used in GDK internally.
256 
257 
266  void drop_reply(bool ok, guint32 time);
267 
275  void drop_finish(bool success, guint32 time);
276 
281  Glib::ustring get_selection() const;
282 
283  //For some reason this is not in our *_docs.xml file.
284 
290  void drag_finish(bool success, bool del, guint32 time);
291  //Gtk::Widget* get_source_widget() - see Gtk::Widget::drag_get_source_widget()
292 
293  // void set_icon(Gtk::Widget* widget, int hot_x, int hot_y) - see Gtk::Widget::set_as_icon().
294 
295  void set_icon(const Glib::RefPtr<Gdk::Colormap>& colormap, const Glib::RefPtr<Gdk::Pixmap>& pixmap, const Glib::RefPtr<Gdk::Bitmap>& mask, int hot_x, int hot_y);
296 
297  void set_icon(const Glib::RefPtr<Gdk::Pixbuf>& pixbuf, int hot_x, int hot_y);
298 
299  // The first argument was changed from StockID to ustring to avoid
300  // cross-dependence between gdkmm and gtkmm.
301  // See http://bugzilla.gnome.org/show_bug.cgi?id=79124 for details
302 
303  void set_icon(const Glib::ustring& stock_id, int hot_x, int hot_y);
304 
305  void set_icon_name(const Glib::ustring& name, int hot_x, int hot_y);
306 
307  void set_icon();
308 
309 
314  Glib::RefPtr<Window> get_source_window();
315 
320  Glib::RefPtr<const Window> get_source_window() const;
321 
322  //gtkmmproc error: gdk_drag_context_get_destination_window : method defs lookup failed (1)
323  //gtkmmproc error: gdk_drag_context_get_destination_window : method defs lookup failed (1)
324 
329 
334 
338  bool get_is_source() const;
339 
340 
347 
353 
354 
355 #ifndef GDKMM_DISABLE_DEPRECATED
356 
364 #endif // GDKMM_DISABLE_DEPRECATED
365 
366 
372 
376  guint32 get_start_time() const;
377 
378 
394  void find_window_for_screen(const Glib::RefPtr<Window>& drag_window, const Glib::RefPtr<Screen>& screen, int x_root, int y_root, Glib::RefPtr<Window>& dest_window, DragProtocol* protocol) const;
395 
396 
397 public:
398 
399 public:
400  //C++ methods used to invoke GTK+ virtual functions:
401 
402 protected:
403  //GTK+ Virtual Functions (override these to change behaviour):
404 
405  //Default Signal Handlers::
406 
407 
408 };
409 
410 } /* namespace Gdk */
411 
412 
413 namespace Glib
414 {
423  Glib::RefPtr<Gdk::DragContext> wrap(GdkDragContext* object, bool take_copy = false);
424 }
425 
426 
427 #endif /* _GDKMM_DRAGCONTEXT_H */
428 
Gdk::ListHandle_AtomString get_targets() const
DragAction get_suggested_action() const
DragAction get_actions() const
const GdkDragContext * gobj() const
Provides access to the underlying C GObject.
Definition: dragcontext.h:207
guint32 get_start_time() const
static Glib::RefPtr< DragContext > create()
static GType get_type() G_GNUC_CONST
void drag_status(DragAction action, guint32 time)
void drag_finish(bool success, bool del, guint32 time)
void find_window_for_screen(const Glib::RefPtr< Window > &drag_window, const Glib::RefPtr< Screen > &screen, int x_root, int y_root, Glib::RefPtr< Window > &dest_window, DragProtocol *protocol) const
DragAction get_action() const
void drag_refuse(guint32 time)
void drop_reply(bool ok, guint32 time)
GdkDragContext * gobj()
Provides access to the underlying C GObject.
Definition: dragcontext.h:204
void set_icon(const Glib::RefPtr< Gdk::Colormap > &colormap, const Glib::RefPtr< Gdk::Pixmap > &pixmap, const Glib::RefPtr< Gdk::Bitmap > &mask, int hot_x, int hot_y)
DragAction get_selected_action() const
Glib::ustring get_selection() const
bool get_is_source() const
Glib::RefPtr< Gdk::DragContext > wrap(GdkDragContext *object, bool take_copy=false)
virtual ~DragContext()
void drop_finish(bool success, guint32 time)
Glib::RefPtr< const Window > get_source_window() const
Glib::RefPtr< Window > get_source_window()
void set_icon_name(const Glib::ustring &name, int hot_x, int hot_y)
void set_icon(const Glib::RefPtr< Gdk::Pixbuf > &pixbuf, int hot_x, int hot_y)
GdkDragContext * gobj_copy()
Provides access to the underlying C instance. The caller is responsible for unrefing it....
void set_icon(const Glib::ustring &stock_id, int hot_x, int hot_y)
DragProtocol get_protocol() const
typedefG_BEGIN_DECLS struct _GdkDragContext GdkDragContext
Definition: gdkdnd.h:38
DragAction
Definition: dragcontext.h:68
DragProtocol
Definition: dragcontext.h:131
DragAction operator&(DragAction lhs, DragAction rhs)
Definition: dragcontext.h:82
DragAction & operator|=(DragAction &lhs, DragAction rhs)
Definition: dragcontext.h:94
DragAction operator~(DragAction flags)
Definition: dragcontext.h:90
DragAction & operator^=(DragAction &lhs, DragAction rhs)
Definition: dragcontext.h:102
DragAction & operator&=(DragAction &lhs, DragAction rhs)
Definition: dragcontext.h:98
DragAction operator^(DragAction lhs, DragAction rhs)
Definition: dragcontext.h:86
DragAction operator|(DragAction lhs, DragAction rhs)
Definition: dragcontext.h:78
@ ACTION_LINK
Definition: dragcontext.h:72
@ ACTION_MOVE
Definition: dragcontext.h:71
@ ACTION_ASK
Definition: dragcontext.h:74
@ ACTION_COPY
Definition: dragcontext.h:70
@ ACTION_DEFAULT
Definition: dragcontext.h:69
@ ACTION_PRIVATE
Definition: dragcontext.h:73
@ DRAG_PROTO_LOCAL
Definition: dragcontext.h:137
@ DRAG_PROTO_MOTIF
Definition: dragcontext.h:132
@ DRAG_PROTO_OLE2
Definition: dragcontext.h:136
@ DRAG_PROTO_NONE
Definition: dragcontext.h:134
@ DRAG_PROTO_XDND
Definition: dragcontext.h:133
@ DRAG_PROTO_WIN32_DROPFILES
Definition: dragcontext.h:135
GtkImageIconNameData name
Definition: gtkimage.h:6
GtkImagePixmapData pixmap
Definition: gtkimage.h:0
GtkImagePixbufData pixbuf
Definition: gtkimage.h:2
Glib::ListHandle< std::string, AtomStringTraits > ListHandle_AtomString
Definition: lobject.h:100