X-Git-Url: https://git.cinelerra-gg.org/git/?a=blobdiff_plain;f=cinelerra-5.1%2Fguicast%2Fvicon.h;h=86474095411c66e3d205f3d2771efb1a8faf4fd8;hb=refs%2Fheads%2Fmaster;hp=69cdb3629034927ba269a3c366c6e839874fa16e;hpb=e8453fdab4d5ed7b384279a5b37c92010ac13295;p=goodguy%2Fcinelerra.git diff --git a/cinelerra-5.1/guicast/vicon.h b/cinelerra-5.1/guicast/vicon.h index 69cdb362..86474095 100644 --- a/cinelerra-5.1/guicast/vicon.h +++ b/cinelerra-5.1/guicast/vicon.h @@ -1,3 +1,24 @@ +/* + * CINELERRA + * Copyright (C) 2016-2020 William Morrow + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published + * by the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 + * USA + */ + + #ifndef __VICON_H__ #define __VICON_H__ @@ -24,7 +45,6 @@ public: class VIFrame { unsigned char *img_data; - VFrame *vfrm; public: VIFrame(int ww, int hh, int vcmdl) { int size = BC_CModels::calculate_datasize(ww, hh, -1, vcmdl); @@ -32,8 +52,7 @@ public: vfrm = new VFrame(img_data, -1, ww, hh, vcmdl, -1); } ~VIFrame() { delete vfrm; delete [] img_data; } - - operator VFrame *() { return vfrm; } + VFrame *vfrm; }; class VIcon @@ -53,7 +72,7 @@ public: void init_audio(int audio_size); virtual int64_t set_seq_no(int64_t no) { return seq_no = no; } - virtual VFrame *frame() { return *images[seq_no]; } + virtual VFrame *frame() { return images[seq_no]->vfrm; } virtual int get_vx() { return 0; } virtual int get_vy() { return 0; } virtual void load_audio() {} @@ -94,7 +113,7 @@ public: void run(); void flash(); int draw(VIcon *vicon); - int update_view(int do_audio=1); + int update_view(int do_audio); void draw_images(); void start_drawing(); void stop_drawing(); @@ -109,7 +128,7 @@ public: void close_view_popup(); void hide_vicons(int v=1); int show_vicon(VIcon *next); - virtual ViewPopup *new_view_window(); + virtual ViewPopup *new_view_window(ViewPopup *vpopup); virtual bool visible(VIcon *vicon, int x, int y); virtual void drawing_started() {}