mask mousewheel segv bug, mask opengl sw fallback read to ram, fix tiff config withou...
[goodguy/cinelerra.git] / cinelerra-5.1 / cinelerra / cwindow.h
1
2 /*
3  * CINELERRA
4  * Copyright (C) 2008 Adam Williams <broadcast at earthling dot net>
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, write to the Free Software
18  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
19  *
20  */
21
22 #ifndef CWINDOW_H
23 #define CWINDOW_H
24
25 #include "auto.inc"
26 #include "autos.inc"
27 #include "cplayback.inc"
28 #include "ctracking.inc"
29 #include "cwindowgui.inc"
30 #include "edl.inc"
31 #include "floatauto.inc"
32 #include "mwindow.inc"
33 #include "remotecontrol.h"
34 #include "thread.h"
35 #include "track.inc"
36
37 class CWindow : public Thread
38 {
39 public:
40         CWindow(MWindow *mwindow);
41         ~CWindow();
42
43     void create_objects();
44 // Position is inclusive of the other 2
45         void update(int dir,
46                 int overlays,
47                 int tool_window,
48                 int operation = 0,
49                 int timebar = 0);
50         void run();
51         Track* calculate_affected_track();
52 // Get keyframe for editing in the CWindow.
53 // create - if 0 forces automatic creation to be off
54 //          if 1 uses automatic creation option to create
55 // created - set to 1 if an auto was created
56 // redraw - redraw MWindow overlays if 1
57         Auto* calculate_affected_auto(Autos *autos,
58                 int create = 1,
59                 int *created = 0,
60                 int redraw = 1);
61 // Same as before.  Provide 0 to Auto arguments to have them ignored.
62         void calculate_affected_autos( Track *track,
63                 FloatAuto **x_auto, FloatAuto **y_auto, FloatAuto **z_auto,
64                 int use_camera, int create_x, int create_y, int create_z,
65                 int redraw=1);
66         void show_window();
67         void hide_window();
68         int update_position(double position);
69         void stop_playback(int wait);
70         void refresh_frame(int change_type, int dir=1);
71         void refresh_frame(int change_type, EDL *edl, int dir=1);
72
73         int destination;
74         MWindow *mwindow;
75         CWindowGUI *gui;
76
77         CTracking *playback_cursor;
78         CPlayback *playback_engine;
79 };
80
81 class CWindowRemoteHandler : public RemoteHandler
82 {
83         int last_key;
84 public:
85         int remote_process_key(RemoteControl *remote_control, int key);
86
87         CWindowRemoteHandler(RemoteControl *remote_control);
88         ~CWindowRemoteHandler();
89 };
90
91 #endif