fix keyboard event handling for host-provided plugin GUIs
[ardour2.git] / gtk2_ardour / draginfo.h
blob6d3a6b8de3714d78ba7a9a6a1bac62dc974cdfe0
1 /*
2 Copyright (C) 2000-2007 Paul Davis
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or
7 (at your option) any later version.
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20 #ifndef __gtk2_ardour_drag_info_h_
21 #define __gtk2_ardour_drag_info_h_
23 #include <list>
25 #include <gdk/gdk.h>
26 #include <stdint.h>
28 #include "canvas.h"
29 #include "editor_items.h"
31 #include <ardour/types.h>
33 namespace ARDOUR {
34 class Location;
37 class Editor;
38 class TimeAxisView;
40 struct DragInfo {
41 ArdourCanvas::Item* item;
42 ItemType item_type;
43 void* data;
44 nframes64_t last_frame_position;
45 nframes64_t pointer_frame_offset;
46 nframes64_t grab_frame;
47 nframes64_t last_pointer_frame;
48 nframes64_t current_pointer_frame;
49 double original_x, original_y;
50 double grab_x, grab_y;
51 double cumulative_x_drag;
52 double cumulative_y_drag;
53 double current_pointer_x;
54 double current_pointer_y;
55 double last_pointer_x;
56 double last_pointer_y;
57 void (Editor::*motion_callback)(ArdourCanvas::Item*, GdkEvent*);
58 void (Editor::*finished_callback)(ArdourCanvas::Item*, GdkEvent*);
59 TimeAxisView* source_trackview;
60 TimeAxisView* dest_trackview;
61 bool x_constrained;
62 bool y_constrained;
63 bool copy;
64 bool was_rolling;
65 bool first_move;
66 bool move_threshold_passed;
67 bool want_move_threshold;
68 bool brushing;
69 std::list<ARDOUR::Location*> copied_locations;
71 void clear_copied_locations ();
74 struct LineDragInfo {
75 uint32_t before;
76 uint32_t after;
79 #endif /* __gtk2_ardour_drag_info_h_ */