]> git.sesse.net Git - vlc/blobdiff - modules/gui/wxwindows/wxwindows.h
* modules/gui/wxwindows/menus.cpp: release the wxMutexGui lock before triggering...
[vlc] / modules / gui / wxwindows / wxwindows.h
index b0e9ea86e246b56c8f918854b0ac7d3f9e08d1e1..a9ff131c338cd98bf64896a9ff80e6c68abf3a45 100644 (file)
@@ -130,6 +130,11 @@ struct intf_sys_t
     /* Popup menu */
     wxMenu              *p_popup_menu;
 
+    /* Hotkeys */
+    int                 i_first_hotkey_event;
+    int                 i_hotkeys;
+
+    /* Embedded vout */
     VideoWindow         *p_video_window;
     wxBoxSizer          *p_video_sizer;
 };
@@ -146,7 +151,6 @@ namespace wxvlc
 {
 class Interface;
 class OpenDialog;
-class V4LDialog;
 class SoutDialog;
 class SubsFileDialog;
 class Playlist;
@@ -176,6 +180,7 @@ private:
     Interface *p_main_interface;
     int i_old_playing_status;
     int i_old_rate;
+    vlc_bool_t b_old_seekable;
 };
 
 /* Main Interface */
@@ -186,6 +191,7 @@ public:
     Interface( intf_thread_t *p_intf );
     virtual ~Interface();
     void TogglePlayButton( int i_playing_status );
+    void Update();
 
     wxBoxSizer  *frame_sizer;
     wxStatusBar *statusbar;
@@ -197,6 +203,7 @@ public:
     vlc_bool_t b_extra;
 
     wxStaticBox *adjust_box;
+    wxButton *restoredefaults_button;
     wxSlider *brightness_slider;
     wxSlider *contrast_slider;
     wxSlider *saturation_slider;
@@ -209,7 +216,7 @@ public:
     wxGauge     *volctrl;
 
 private:
-    void UpdateAcceleratorTable();
+    void SetupHotkeys();
     void CreateOurMenuBar();
     void CreateOurToolBar();
     void CreateOurExtendedPanel();
@@ -225,7 +232,6 @@ private:
     void OnOpenDisc( wxCommandEvent& event );
     void OnOpenNet( wxCommandEvent& event );
     void OnOpenSat( wxCommandEvent& event );
-    void OnOpenV4L( wxCommandEvent& event );
     void OnExtended( wxCommandEvent& event );
     void OnBookmarks( wxCommandEvent& event );
     void OnShowDialog( wxCommandEvent& event );
@@ -238,11 +244,8 @@ private:
     void OnFastStream( wxCommandEvent& event );
 
     void OnEnableAdjust( wxCommandEvent& event );
-    void OnHueUpdate( wxScrollEvent& event );
-    void OnContrastUpdate( wxScrollEvent& event );
-    void OnBrightnessUpdate( wxScrollEvent& event );
-    void OnSaturationUpdate( wxScrollEvent& event );
-    void OnGammaUpdate( wxScrollEvent& event );
+    void OnRestoreDefaults( wxCommandEvent& event);
+    void OnAdjustUpdate( wxScrollEvent& event );
 
     void OnRatio( wxCommandEvent& event );
     void OnEnableVisual( wxCommandEvent& event );
@@ -273,7 +276,7 @@ private:
 
 /* Open Dialog */
 WX_DEFINE_ARRAY(AutoBuiltPanel *, ArrayOfAutoBuiltPanel);
-class OpenDialog: public wxFrame
+class OpenDialog: public wxDialog
 {
 public:
     /* Constructor */
@@ -297,7 +300,6 @@ private:
     wxPanel *FilePanel( wxWindow* parent );
     wxPanel *DiscPanel( wxWindow* parent );
     wxPanel *NetPanel( wxWindow* parent );
-    wxPanel *V4LPanel( wxWindow* parent );
 
     ArrayOfAutoBuiltPanel input_tab_array;
 
@@ -321,11 +323,6 @@ private:
     void OnNetPanelChange( wxCommandEvent& event );
     void OnNetTypeChange( wxCommandEvent& event );
 
-    /* Event handlers for the v4l page */
-    void OnV4LPanelChange( wxCommandEvent& event );
-    void OnV4LTypeChange( wxCommandEvent& event );
-    void OnV4LSettingsChange( wxCommandEvent& event );
-
     /* Event handlers for the stream output */
     void OnSubsFileEnable( wxCommandEvent& event );
     void OnSubsFileSettings( wxCommandEvent& WXUNUSED(event) );
@@ -375,14 +372,6 @@ private:
     wxTextCtrl *net_addrs[4];
     wxCheckBox *net_ipv6;
 
-    /* Controls for the v4l panel */
-    wxRadioBox *video_type;
-    wxTextCtrl *video_device;
-    wxSpinCtrl *video_channel;
-    wxButton *v4l_button;
-    V4LDialog *v4l_dialog;
-    wxArrayString v4l_mrl;
-
     /* Controls for the subtitles file */
     wxButton *subsfile_button;
     wxCheckBox *subsfile_checkbox;
@@ -407,75 +396,6 @@ enum
 };
 #define MAX_ACCESS CAPTURE_ACCESS
 
-/* V4L Dialog */
-class V4LDialog: public wxDialog
-{
-public:
-    /* Constructor */
-    V4LDialog( intf_thread_t *p_intf, wxWindow *p_parent );
-    virtual ~V4LDialog();
-
-    wxArrayString GetOptions();
-
-private:
-    void UpdateMRL();
-    wxPanel *AudioPanel( wxWindow* parent );
-    wxPanel *CommonPanel( wxWindow* parent );
-    wxPanel *BitratePanel( wxWindow* parent );
-    void    ParseMRL();
-
-    /* Event handlers (these functions should _not_ be virtual) */
-    void OnOk( wxCommandEvent& event );
-    void OnCancel( wxCommandEvent& event );
-    void OnMRLChange( wxCommandEvent& event );
-    void OnAudioEnable( wxCommandEvent& event );
-    void OnAudioChange( wxCommandEvent& event );
-    void OnAudioChannel( wxCommandEvent& event );
-    void OnSizeEnable( wxCommandEvent& event );
-    void OnSize( wxCommandEvent& event );
-    void OnNormEnable( wxCommandEvent& event );
-    void OnNorm( wxCommandEvent& event );
-    void OnFrequencyEnable( wxCommandEvent& event );
-    void OnFrequency( wxCommandEvent& event );
-    void OnBitrateEnable( wxCommandEvent& event );
-    void OnBitrate( wxCommandEvent& event );
-    void OnMaxBitrateEnable( wxCommandEvent& event );
-    void OnMaxBitrate( wxCommandEvent& event );
-
-    DECLARE_EVENT_TABLE();
-
-    intf_thread_t *p_intf;
-    wxWindow *p_parent;
-
-    wxComboBox *mrl_combo;
-
-    int i_access_type;
-
-    /* Controls for the v4l advanced options */
-    wxPanel *common_subpanel;
-    wxPanel *common_panel;
-    wxCheckBox *size_checkbox;
-    wxComboBox *size_combo;
-    wxCheckBox *norm_checkbox;
-    wxComboBox *norm_combo;
-    wxCheckBox *frequency_checkbox;
-    wxSpinCtrl *frequency;
-
-    wxPanel *audio_subpanel;
-    wxPanel *audio_panel;
-    wxCheckBox *audio_checkbox;
-    wxTextCtrl *audio_device;
-    wxSpinCtrl *audio_channel;
-
-    wxPanel *bitrate_subpanel;
-    wxPanel *bitrate_panel;
-    wxCheckBox *bitrate_checkbox;
-    wxSpinCtrl *bitrate;
-    wxCheckBox *maxbitrate_checkbox;
-    wxSpinCtrl *maxbitrate;
-
-};
-
 /* Stream output Dialog */
 enum
 {
@@ -658,6 +578,7 @@ public:
     virtual ~WizardDialog();
     void SetTranscode( char *vcodec, int vb, char *acodec,int ab);
     void SetMrl( const char *mrl );
+    void SetPartial( int, int );
     void SetStream( char *method, char *address );
     void SetTranscodeOut( char *address );
     void SetAction( int i_action );
@@ -668,6 +589,7 @@ public:
 
 private:
     int vb,ab;
+    int i_from, i_to;
     char *vcodec,*acodec,*method,*address,*mrl,*mux;
     DECLARE_EVENT_TABLE();
 
@@ -903,8 +825,7 @@ private:
 
 };
 
-
-#if !defined(__WXX11__)
+#if wxUSE_DRAG_AND_DROP
 /* Drag and Drop class */
 class DragAndDrop: public wxFileDropTarget
 {
@@ -949,51 +870,3 @@ private:
 
 } // end of wxvlc namespace
 using namespace wxvlc;
-
-static inline int ConvertHotkeyModifiers( int i_hotkey )
-{
-    int i_accel_flags = 0;
-    if( i_hotkey & KEY_MODIFIER_ALT ) i_accel_flags |= wxACCEL_ALT;
-    if( i_hotkey & KEY_MODIFIER_CTRL ) i_accel_flags |= wxACCEL_CTRL;
-    if( i_hotkey & KEY_MODIFIER_SHIFT ) i_accel_flags |= wxACCEL_SHIFT;
-    return i_accel_flags;
-}
-
-static inline int ConvertHotkey( int i_hotkey )
-{
-    int i_key = i_hotkey & ~KEY_MODIFIER;
-    if( i_key & KEY_ASCII ) return i_key & KEY_ASCII;
-    else if( i_key & KEY_SPECIAL )
-    {
-        switch ( i_key )
-        {
-        case KEY_LEFT: return WXK_LEFT;
-        case KEY_RIGHT: return WXK_RIGHT;
-        case KEY_UP: return WXK_UP;
-        case KEY_DOWN: return WXK_DOWN;
-        case KEY_SPACE: return WXK_SPACE;
-        case KEY_ENTER: return WXK_RETURN;
-        case KEY_F1: return WXK_F1;
-        case KEY_F2: return WXK_F2;
-        case KEY_F3: return WXK_F3;
-        case KEY_F4: return WXK_F4;
-        case KEY_F5: return WXK_F5;
-        case KEY_F6: return WXK_F6;
-        case KEY_F7: return WXK_F7;
-        case KEY_F8: return WXK_F8;
-        case KEY_F9: return WXK_F9;
-        case KEY_F10: return WXK_F10;
-        case KEY_F11: return WXK_F11;
-        case KEY_F12: return WXK_F12;
-        case KEY_HOME: return WXK_HOME;
-        case KEY_END: return WXK_HOME;
-        case KEY_MENU: return WXK_MENU;
-        case KEY_ESC: return WXK_ESCAPE;
-        case KEY_PAGEUP: return WXK_PRIOR;
-        case KEY_PAGEDOWN: return WXK_NEXT;
-        case KEY_TAB: return WXK_TAB;
-        case KEY_BACKSPACE: return WXK_BACK;
-        }
-    }
-    return 0;
-}