]> git.sesse.net Git - vlc/blob - modules/gui/wxwindows/wxwindows.h
* added a wxwindows interface using the wxWindows cross-platform GUI framework.
[vlc] / modules / gui / wxwindows / wxwindows.h
1 /*****************************************************************************
2  * wxwindows.h: private wxWindows interface description
3  *****************************************************************************
4  * Copyright (C) 1999, 2000 VideoLAN
5  * $Id: wxwindows.h,v 1.1 2002/11/18 13:02:16 gbazin Exp $
6  *
7  * Authors: Gildas Bazin <gbazin@netcourrier.com>
8  *
9  * This program is free software; you can redistribute it and/or modify
10  * it under the terms of the GNU General Public License as published by
11  * the Free Software Foundation; either version 2 of the License, or
12  * (at your option) any later version.
13  * 
14  * This program is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17  * GNU General Public License for more details.
18  *
19  * You should have received a copy of the GNU General Public License
20  * along with this program; if not, write to the Free Software
21  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
22  *****************************************************************************/
23
24 /*****************************************************************************
25  * intf_sys_t: description and status of Gtk+ interface
26  *****************************************************************************/
27 struct intf_sys_t
28 {
29     /* the wx parent window */
30     wxWindow            *p_wxwindow;
31
32     /* special actions */
33     vlc_bool_t          b_playing;
34     vlc_bool_t          b_popup_changed;                   /* display menu ? */
35     vlc_bool_t          b_window_changed;        /* window display toggled ? */
36     vlc_bool_t          b_playlist_changed;    /* playlist display toggled ? */
37     vlc_bool_t          b_slider_free;                      /* slider status */
38
39     /* menus handlers */
40     vlc_bool_t          b_program_update;   /* do we need to update programs 
41                                                                         menu */
42     vlc_bool_t          b_title_update;  /* do we need to update title menus */
43     vlc_bool_t          b_chapter_update;            /* do we need to update
44                                                                chapter menus */
45     vlc_bool_t          b_audio_update;  /* do we need to update audio menus */
46     vlc_bool_t          b_spu_update;      /* do we need to update spu menus */
47
48     /* windows and widgets */
49
50     /* The input thread */
51     input_thread_t *    p_input;
52
53     /* The slider */
54     int                 i_slider_pos;                     /* slider position */
55     int                 i_slider_oldpos;                /* previous position */
56
57     /* The messages window */
58     msg_subscription_t* p_sub;                  /* message bank subscription */
59
60     /* Playlist management */
61     int                 i_playing;                 /* playlist selected item */
62
63     /* The window labels for DVD mode */
64     int                 i_part;                           /* current chapter */
65 };
66
67 /*****************************************************************************
68  * Prototypes
69  *****************************************************************************/
70
71 /*****************************************************************************
72  * Classes declarations.
73  *****************************************************************************/
74 class Interface;
75
76 /* Timer */
77 class Timer: public wxTimer
78 {
79 public:
80     /* Constructor */
81     Timer( intf_thread_t *p_intf, Interface *p_main_interface );
82     virtual ~Timer();
83
84     virtual void Notify();
85
86 private:
87     intf_thread_t *p_intf;
88     Interface *p_main_interface;
89 };
90
91 /* Main Interface */
92 class Interface: public wxFrame
93 {
94 public:
95     /* Constructor */
96     Interface( intf_thread_t *p_intf );
97     virtual ~Interface();
98     wxSlider *slider;
99     wxStatusBar *statusbar;
100
101 private:
102     /* Event handlers (these functions should _not_ be virtual) */
103     void OnExit(wxCommandEvent& event);
104     void OnAbout(wxCommandEvent& event);
105     void OnOpenFile(wxCommandEvent& event);
106     void OnPlayStream(wxCommandEvent& event);
107     void OnStopStream(wxCommandEvent& event);
108     void OnPauseStream(wxCommandEvent& event);
109     void OnSliderUpdate(wxScrollEvent& event);
110     void OnPrevStream( wxCommandEvent& event );
111     void OnNextStream( wxCommandEvent& event );
112
113     DECLARE_EVENT_TABLE();
114
115     Timer *timer;
116     intf_thread_t *p_intf;
117 };