X-Git-Url: https://git.cinelerra-gg.org/git/?p=goodguy%2Fcinelerra.git;a=blobdiff_plain;f=cinelerra-5.1%2Fcinelerra%2Fcanvas.h;h=8d30dcccd19c77f6edfaca718d6a6887cd76efbc;hp=1b1adb1d61f1a763d472b69438a440451e3d83a5;hb=07af5297688e2f888e0a309eab76293093a003bb;hpb=e8453fdab4d5ed7b384279a5b37c92010ac13295 diff --git a/cinelerra-5.1/cinelerra/canvas.h b/cinelerra-5.1/cinelerra/canvas.h index 1b1adb1d..8d30dccc 100644 --- a/cinelerra-5.1/cinelerra/canvas.h +++ b/cinelerra-5.1/cinelerra/canvas.h @@ -44,11 +44,9 @@ public: 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); +// Lock canvas pointer and window + BC_WindowBase *lock_canvas(const char *loc); void unlock_canvas(); - int is_locked(); void create_objects(EDL *edl); void set_cursor(int cursor); @@ -88,6 +86,7 @@ public: virtual void toggle_controls() {} virtual int get_cwindow_controls() { return 0; } virtual int get_fullscreen(); + virtual int get_clear_color(); virtual void set_fullscreen(int value); int cursor_leave_event_base(BC_WindowBase *caller); @@ -124,6 +123,7 @@ public: // Updates the stores virtual void update_zoom(int x, int y, float zoom) {}; void check_boundaries(EDL *edl, int &x, int &y, float &zoom); + void clear_borders(EDL *edl); void update_scrollbars(int flush); // Get scrollbar positions relative to output. // No correction is done if output is smaller than canvas @@ -134,7 +134,7 @@ public: 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); // Get top left offset of canvas relative to output. // Normally negative. Can be positive if output is smaller than canvas. @@ -173,6 +173,9 @@ public: 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; @@ -215,7 +218,8 @@ public: private: void get_scrollbars(EDL *edl, int &canvas_x, int &canvas_y, int &canvas_w, int &canvas_h); - Mutex *canvas_lock; +// Lock access to the canvas pointer. + Condition *canvas_lock; };