Rewritten vout for BeOS. Now does not support overlay however code is simpler
[vlc.git] / 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.5 2001/08/14 12:09:03 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 #include <Slider.h>
26 #include <Accelerant.h>
27 #include <Bitmap.h>
28
29 class VLCView : public BView
30 {
31 public:
32         VLCView( BRect bounds);
33         ~VLCView();
34         
35         virtual void MouseDown(BPoint point);
36 };
37
38
39 class VideoWindow : public BWindow
40 {
41 public:
42     // standard constructor and destructor
43     VideoWindow( BRect frame, const char *name,
44                  struct vout_thread_s *p_video_output); 
45     ~VideoWindow();
46
47     // standard window member
48     virtual bool    QuitRequested();
49     virtual void    FrameResized(float width, float height);
50     virtual void    MessageReceived(BMessage *message);
51     virtual void        Zoom(BPoint origin, float width, float height);
52
53     // this is the hook controling direct screen connection
54     int32                   i_bytes_per_pixel;
55     int32                   i_screen_depth;
56     int32                                       i_width;
57     int32                                       i_height;
58     struct vout_thread_s   *p_vout;
59      
60     int32           fRowBytes;
61
62     uint32          fNumClipRects;
63
64     int                         i_buffer_index;
65     bool            fDirty;
66     thread_id       fDrawThreadID;
67     BBitmap                     *bitmap[2];
68     VLCView                     *view;
69     bool                        teardownwindow;
70     bool                        is_zoomed;
71     bool                        fUsingOverlay;
72     BScreen                     *screen;
73
74 private:
75         display_mode old_mode;
76         BRect rect;
77
78 };
79