]> git.sesse.net Git - vlc/blob - plugins/beos/VideoWindow.h
0ff3cc20bc5a8c3d660348d654b1cd96f8ee4810
[vlc] / plugins / beos / VideoWindow.h
1 /*****************************************************************************
2  * VideoWindow.h: BeOS video window class prototype
3  *****************************************************************************
4  * Copyright (C) 1999, 2000, 2001 VideoLAN
5  * $Id: VideoWindow.h,v 1.11 2002/03/17 05:48:18 tcastley Exp $
6  *
7  * Authors: Jean-Marc Dressler <polux@via.ecp.fr>
8  *          Tony Castley <tcastley@mail.powerup.com.au>
9  *          Richard Shepherd <richard@rshepherd.demon.co.uk>
10  *
11  * This program is free software; you can redistribute it and/or modify
12  * it under the terms of the GNU General Public License as published by
13  * the Free Software Foundation; either version 2 of the License, or
14  * (at your option) any later version.
15  * 
16  * This program is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19  * GNU General Public License for more details.
20  *
21  * You should have received a copy of the GNU General Public License
22  * along with this program; if not, write to the Free Software
23  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
24  *****************************************************************************/
25 class VLCView : public BView
26 {
27 public:
28         VLCView( BRect bounds);
29         ~VLCView();
30         
31         void MouseDown(BPoint point);
32         void Draw(BRect updateRect);
33 };
34
35
36 class VideoWindow 
37 {
38 public:
39     // standard constructor and destructor
40     VideoWindow( int width, int height,
41                  struct vout_thread_s *p_video_output); 
42     ~VideoWindow();
43     
44     void drawBuffer(int bufferIndex);
45     
46     // this is the hook controling direct screen connection
47     int32           i_width;     // incomming bitmap size 
48     int32           i_height;
49     BRect           winSize;     // current window size
50     float           width_scale, height_scale;
51     bool            is_zoomed, resized;
52     BBitmap             *bitmap[2];
53     VLCView             *view;
54     BWindow         *voutWindow;
55     int             i_buffer;
56     bool                        teardownwindow;
57
58 private:
59     // display_mode old_mode;
60     thread_id              fDrawThreadID;
61     struct vout_thread_s   *p_vout;
62
63 };
64
65 class bitmapWindow : public BWindow
66 {
67 public:
68     bitmapWindow(BRect frame, VideoWindow *theOwner);
69     ~bitmapWindow();
70     // standard window member
71     virtual void    FrameResized(float width, float height);
72     virtual void        Zoom(BPoint origin, float width, float height);
73 private:
74         VideoWindow     *owner;
75 };
76
77  
78 class directWindow : public BDirectWindow
79 {
80 public:
81     // standard constructor and destructor
82     directWindow( BRect frame, VideoWindow *theOwner); 
83     ~directWindow();
84
85     // standard window member
86     virtual void    FrameResized(float width, float height);
87     virtual void        Zoom(BPoint origin, float width, float height);
88     virtual void    DirectConnected(direct_buffer_info *info);
89 private:
90     VideoWindow     *owner;
91 };