projects
/
goodguy
/
cinelerra.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
defaults for mxf format + android/termux patches from Andrew
[goodguy/cinelerra.git]
/
cinelerra-5.1
/
cinelerra
/
canvas.h
diff --git
a/cinelerra-5.1/cinelerra/canvas.h
b/cinelerra-5.1/cinelerra/canvas.h
index 1984269560882a1583377cce0ba19fcbb3bfd530..51b7a2010d769f0614ce7fc28dd7fcb91207c5a9 100644
(file)
--- a/
cinelerra-5.1/cinelerra/canvas.h
+++ b/
cinelerra-5.1/cinelerra/canvas.h
@@
-22,49
+22,31
@@
#ifndef CANVAS_H
#define CANVAS_H
#ifndef CANVAS_H
#define CANVAS_H
+#include "canvas.inc"
#include "edl.inc"
#include "guicast.h"
#include "mwindow.inc"
#include "videodevice.inc"
#include "edl.inc"
#include "guicast.h"
#include "mwindow.inc"
#include "videodevice.inc"
-
// Output for all X11 video
// Output for all X11 video
-class CanvasOutput;
-class CanvasFullScreen;
-class CanvasXScroll;
-class CanvasYScroll;
-class CanvasPopup;
-class CanvasFullScreenPopup;
-class CanvasToggleControls;
-
// The EDL arguments can be set to 0 if the canvas_w and canvas_h are used
class Canvas
{
public:
// The EDL arguments can be set to 0 if the canvas_w and canvas_h are used
class Canvas
{
public:
- Canvas(MWindow *mwindow,
- BC_WindowBase *subwindow,
- int x,
- int y,
- int w,
- int h,
- int output_w,
- int output_h,
+ Canvas(MWindow *mwindow, BC_WindowBase *subwindow,
+ int x, int y, int w, int h,
+ int output_w, int output_h,
int use_scrollbars);
virtual ~Canvas();
void reset();
// Get dimensions given a zoom
void calculate_sizes(float aspect_ratio,
int use_scrollbars);
virtual ~Canvas();
void reset();
// Get dimensions given a zoom
void calculate_sizes(float aspect_ratio,
- int output_w,
- int output_h,
- float zoom,
- int &w,
- int &h);
-// Lock access to the canvas pointer.
-// Must be called before get_canvas or locking the canvas.
- void lock_canvas(const char *location);
+ int output_w, int output_h, float zoom,
+ int &w, int &h);
+// Lock canvas pointer and window
+ BC_WindowBase *lock_canvas(const char *loc);
void unlock_canvas();
void unlock_canvas();
- int is_locked();
void create_objects(EDL *edl);
void set_cursor(int cursor);
void create_objects(EDL *edl);
void set_cursor(int cursor);
@@
-76,42
+58,34
@@
public:
void start_single();
void stop_single();
void start_single();
void stop_single();
- void start_fullscreen();
- void stop_fullscreen();
-
// Don't call from inside the canvas
void create_canvas();
// Don't call from inside the canvas
void create_canvas();
-
-
// Processing or video playback changed.
virtual void status_event() {};
// Processing or video playback changed.
virtual void status_event() {};
-
- virtual void reset_
camera() {};
- virtual void
reset_projector() {};
- virtual void
zoom_resize_window(float percentage) {};
- virtual void zoom_
auto() {};
- virtual int cursor_leave_event() { return 0; }
;
- virtual int cursor_enter_event() { return 0; }
;
- virtual int button_release_event() { return 0; }
;
+ virtual void reset_camera() {}
+ virtual void reset_
projector() {}
+ virtual void
camera_keyframe() {}
+ virtual void
projector_keyframe() {}
+ virtual void zoom_
resize_window(float percentage) {}
+ virtual int cursor_leave_event() { return 0; }
+ virtual int cursor_enter_event() { return 0; }
+ virtual int button_release_event() { return 0; }
virtual int button_press_event();
virtual int button_press_event();
- virtual int cursor_motion_event() { return 0; }
;
+ virtual int cursor_motion_event() { return 0; }
virtual int need_overlays() { return 1; }
virtual int need_overlays() { return 1; }
- virtual void draw_overlays() { };
- virtual void toggle_controls() { } ;
- virtual int get_cwindow_controls() { return 0; };
- virtual int get_fullscreen() { return 0; }
- virtual void set_fullscreen(int value) { };
+ virtual void draw_overlays() {}
+ virtual void toggle_controls() {}
+ virtual int get_cwindow_controls() { return 0; }
+ virtual int get_fullscreen();
+ virtual int get_clear_color();
+ virtual int set_fullscreen(int on, int unlock);
int cursor_leave_event_base(BC_WindowBase *caller);
int cursor_enter_event_base(BC_WindowBase *caller);
int button_press_event_base(BC_WindowBase *caller);
int keypress_event(BC_WindowBase *caller);
int cursor_leave_event_base(BC_WindowBase *caller);
int cursor_enter_event_base(BC_WindowBase *caller);
int button_press_event_base(BC_WindowBase *caller);
int keypress_event(BC_WindowBase *caller);
-// Use menu different options for different windows
- void use_cwindow();
- void use_rwindow();
- void use_vwindow();
void use_auxwindow(BC_WindowBase *aux);
// Provide canvas dimensions since a BC_Bitmap containing obsolete dimensions
void use_auxwindow(BC_WindowBase *aux);
// Provide canvas dimensions since a BC_Bitmap containing obsolete dimensions
@@
-136,39
+110,39
@@
public:
virtual void reset_translation() {};
virtual void close_source() {};
// Updates the stores
virtual void reset_translation() {};
virtual void close_source() {};
// Updates the stores
- virtual void update_zoom(int x, int y, float zoom) {}
;
+ virtual void update_zoom(int x, int y, float zoom) {}
void check_boundaries(EDL *edl, int &x, int &y, float &zoom);
void check_boundaries(EDL *edl, int &x, int &y, float &zoom);
- void update_scrollbars(int flush);
+ void clear_borders(EDL *edl);
+ void update_scrollbars(EDL *edl, int flush);
// Get scrollbar positions relative to output.
// No correction is done if output is smaller than canvas
// Get scrollbar positions relative to output.
// No correction is done if output is smaller than canvas
- virtual int get_xscroll() { return 0; };
- virtual int get_yscroll() { return 0; };
- virtual float get_zoom() { return 0; };
+ virtual int get_xscroll() { return 0; }
+ virtual int get_yscroll() { return 0; }
+ virtual float get_zoom() { return 0; }
+ virtual float get_auto_zoom(EDL *edl);
+ virtual void zoom_auto();
// Updates the refresh_frame
void update_refresh(VideoDevice *device, VFrame *output_frame);
// Redraws the refresh_frame
virtual void draw_refresh(int flush = 1) {};
// Updates the refresh_frame
void update_refresh(VideoDevice *device, VFrame *output_frame);
// Redraws the refresh_frame
virtual void draw_refresh(int flush = 1) {};
- virtual void clear(int flush=1);
+ virtual void clear(int flash=1);
+// draw scope
+ virtual int scope_on() { return 0; }
+ virtual void draw_scope(VFrame *frame, int refresh) {}
+ void process_scope(VideoDevice *video, VFrame *frame);
// Get top left offset of canvas relative to output.
// Normally negative. Can be positive if output is smaller than canvas.
// Get top left offset of canvas relative to output.
// Normally negative. Can be positive if output is smaller than canvas.
- float get_x_offset(EDL *edl,
- int single_channel,
- float zoom_x,
- float conformed_w,
- float conformed_h);
- float get_y_offset(EDL *edl,
- int single_channel,
- float zoom_y,
- float conformed_w,
- float conformed_h);
- void get_zooms(EDL *edl,
- int single_channel,
- float &zoom_x,
- float &zoom_y,
- float &conformed_w,
- float &conformed_h);
+ float get_x_offset(EDL *edl, int single_channel, float zoom_x,
+ float conformed_w, float conformed_h);
+ float get_y_offset(EDL *edl, int single_channel, float zoom_y,
+ float conformed_w, float conformed_h);
+ void get_zooms(EDL *edl, int single_channel,
+ float &zoom_x, float &zoom_y,
+ float &conformed_w, float &conformed_h);
+ void set_zoom(EDL *edl, float zoom);
+ void set_zoom(EDL *edl, float zoom, float cx, float cy);
// Convert coord from output to canvas position, including
// x and y scroll offsets
// Convert coord from output to canvas position, including
// x and y scroll offsets
@@
-187,6
+161,9
@@
public:
int get_buttonpress();
// Gets whatever video surface is enabled
BC_WindowBase* get_canvas();
int get_buttonpress();
// Gets whatever video surface is enabled
BC_WindowBase* get_canvas();
+// draw_refresh, with/without locks
+ int refresh(int flush);
+ int redraw(int flush);
// The owner of the canvas
BC_WindowBase *subwindow;
// The owner of the canvas
BC_WindowBase *subwindow;
@@
-207,28
+184,27
@@
public:
// refreshes.
VFrame *refresh_frame;
// Results from last get_scrollbars
// refreshes.
VFrame *refresh_frame;
// Results from last get_scrollbars
- int w_needed;
- int h_needed;
- int w_visible;
- int h_visible;
+ int w_needed, h_needed;
+ int w_visible, h_visible;
// For cases where video is not enabled on the canvas but processing is
// occurring for a single frame, this causes the status to update.
int is_processing;
// For cases where video is not enabled on the canvas but processing is
// occurring for a single frame, this causes the status to update.
int is_processing;
+ int is_fullscreen;
// Cursor is inside video surface
int cursor_inside;
// Cursor is inside video surface
int cursor_inside;
- int view_x;
- int view_y;
- int view_w;
- int view_h;
- int scr_w0;
+ int view_x, view_y, view_w, view_h;
int root_w, root_h;
int root_w, root_h;
+ int scr_w0;
MWindow *mwindow;
private:
MWindow *mwindow;
private:
- void get_scrollbars(EDL *edl,
- int &canvas_x, int &canvas_y, int &canvas_w, int &canvas_h);
- Mutex *canvas_lock;
+ int get_scrollbars(EDL *edl);
+ void start_fullscreen();
+ void stop_fullscreen();
+
+// Lock access to the canvas pointer.
+ Condition *canvas_lock;
};
};
@@
-307,8
+283,6
@@
public:
CanvasFullScreenPopup(Canvas *canvas);
void create_objects();
CanvasFullScreenPopup(Canvas *canvas);
void create_objects();
- void use_cwindow();
-
Canvas *canvas;
};
Canvas *canvas;
};
@@
-327,12
+301,23
@@
public:
~CanvasPopup();
void create_objects();
~CanvasPopup();
void create_objects();
- void use_cwindow();
- void use_rwindow();
- void use_vwindow();
+ Canvas *canvas;
+};
+
+class CanvasZoomSize : public BC_MenuItem
+{
+public:
+ CanvasZoomSize(Canvas *canvas);
Canvas *canvas;
Canvas *canvas;
- CanvasToggleControls *toggle_controls;
+};
+
+class CanvasSizeSubMenu : public BC_SubMenu
+{
+public:
+ CanvasSizeSubMenu(CanvasZoomSize *zoom_size);
+
+ CanvasZoomSize *zoom_size;
};
class CanvasPopupSize : public BC_MenuItem
};
class CanvasPopupSize : public BC_MenuItem
@@
-369,12
+354,19
@@
public:
Canvas *canvas;
};
Canvas *canvas;
};
-class Canvas
ToggleControls
: public BC_MenuItem
+class Canvas
PopupCameraKeyframe
: public BC_MenuItem
{
public:
{
public:
- CanvasToggleControls(Canvas *canvas);
+ CanvasPopupCameraKeyframe(Canvas *canvas);
+ int handle_event();
+ Canvas *canvas;
+};
+
+class CanvasPopupProjectorKeyframe : public BC_MenuItem
+{
+public:
+ CanvasPopupProjectorKeyframe(Canvas *canvas);
int handle_event();
int handle_event();
- static char* calculate_text(int cwindow_controls);
Canvas *canvas;
};
Canvas *canvas;
};
@@
-394,7
+386,6
@@
public:
Canvas *canvas;
};
Canvas *canvas;
};
-
class CanvasPopupRemoveSource : public BC_MenuItem
{
public:
class CanvasPopupRemoveSource : public BC_MenuItem
{
public:
@@
-403,8
+394,4
@@
public:
Canvas *canvas;
};
Canvas *canvas;
};
-
-
-
-
#endif
#endif