Reference Manual

Main Page | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Namespace Members | Compound Members | File Members

# dnd.h

Go to the documentation of this file.

    00001 /*  Inti: Integrated Foundation Classes
    00002  *  Copyright (C) 2002-2003 The Inti Development Team.
    00003  *
    00004  *  This program is free software; you can redistribute it and/or modify
    00005  *  it under the terms of the GNU General Public License as published by
    00006  *  the Free Software Foundation; either version 2 of the License, or
    00007  *  (at your option) any later version.
    00008  *
    00009  *  This program is distributed in the hope that it will be useful,
    00010  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    00011  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    00012  *  GNU Library General Public License for more details.
    00013  *
    00014  *  You should have received a copy of the GNU Library General Public License
    00015  *  along with this program; if not, write to the Free Software
    00016  *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
    00017  */
    00018
    00023
    00024 #ifndef INTI_GDK_DND_H
    00025 #define INTI_GDK_DND_H
    00026
    00027 #ifndef INTI_G_OBJECT_H
    00028 #include <inti/glib/object.h>
    00029 #endif
    00030
    00031 #ifndef INTI_GDK_TYPES_H
    00032 #include <inti/gdk/types.h>
    00033 #endif
    00034
    00035 #ifndef _CPP_VECTOR
    00036 #include <vector>
    00037 #endif
    00038
    00039 namespace Inti {
    00040
    00041 namespace Gdk {
    00042
    00043 class Display;
    00044 class DragContextClass;
    00045 class Screen;
    00046 class Window;
    00047
    00057
    00058 class DragContext : public G::Object
    00059 {
    00060         friend class G::Object;
    00061         friend class DragContextClass;
    00062
    00063         DragContext(const DragContext&);
    00064         DragContext& operator=(const DragContext&);
    00065
    00066 protected:
    00069
    00070         DragContext();
    00072
    00073         explicit DragContext(GdkDragContext *drag_context, bool reference = true);
    00080
    00082
    00083 public:
    00086
    00087         virtual ~DragContext();
    00089
    00091
    00092         static Pointer<DragContext> drag_begin(const Window& window, const std::vector<Atom>& targets);
    00099
    00100         static unsigned int drag_get_protocol(unsigned int xid, DragProtocol *protocol, const Display *display = 0);
    00109
    00112
    00113         GdkDragContext* gdk_drag_context() const { return (GdkDragContext*)instance; }
    00115
    00116         GdkDragContextClass* gdk_drag_context_class() const;
    00118
    00119         operator GdkDragContext* () const;
    00121
    00122         DragProtocol protocol() const;
    00124
    00125         bool is_source() const;
    00127
    00128         Window* source_window() const;
    00130
    00131         Window* dest_window() const;
    00133
    00134         bool targets(std::vector<Atom>& target_list) const;
    00138
    00139         DragActionField actions() const;
    00141
    00142         DragActionField suggested_action() const;
    00144
    00145         DragActionField action() const;
    00147
    00148         unsigned int start_time() const;
    00150
    00151         Atom get_selection() const;
    00154
    00158
    00159         void drag_status(DragActionField action, unsigned int time);
    00167
    00168         void drop_reply(bool ok, unsigned int time);
    00175
    00176         void drop_finish(bool success, unsigned int time);
    00182
    00183         void find_window(int x_root, int y_root, Window **dest_window, DragProtocol *protocol, const Screen *screen = 0);
    00194
    00195         bool drag_motion(const Window& dest_window, DragProtocol protocol, int x_root, int y_root,
    00196                          DragActionField suggested_action, DragActionField possible_actions, unsigned int time);
    00208
    00209         void drag_drop(unsigned int time);
    00214
    00215         void drag_abort(unsigned int time);
    00220
    00222 };
    00223
    00224 } // namespace Gdk
    00225
    00226 } // namespace Inti
    00227
    00228 #endif // INTI_GDK_DND_H
    00229

Main Page - Footer