⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 wince.h

📁 VLC Player Source Code
💻 H
📖 第 1 页 / 共 2 页
字号:
/***************************************************************************** * wince.h: private WinCE interface descriptor ***************************************************************************** * Copyright (C) 1999-2004 the VideoLAN team * $Id$ * * Authors: Gildas Bazin <gbazin@videolan.org> *          Marodon Cedric <cedric_marodon@yahoo.fr> * * 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., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. *****************************************************************************/#ifndef WINCE_RESOURCE#define SLIDER_HEIGHT 50#define SLIDER_MAX_POS 10000#define MENU_HEIGHT 26#define FILE_ACCESS 1#define NET_ACCESS 2#define OPEN_NORMAL 0#define OPEN_STREAM 1#if defined( UNDER_CE ) && defined(__MINGW32__)    /* This is a gross hack for the wince gcc cross-compiler */#   define _off_t long#endif#include "vlc_keys.h"#include <stdio.h>#include <string>#include <vector>using namespace std;class CBaseWindow;class MenuItemExt;class VideoWindow;/***************************************************************************** * intf_sys_t: description and status of wxwindows interface *****************************************************************************/struct intf_sys_t{    /* the parent window */    CBaseWindow         *p_window;    /* special actions */    bool          b_playing;    /* The input thread */    input_thread_t *    p_input;    /* The slider */    int                 i_slider_pos;                     /* slider position */    int                 i_slider_oldpos;                /* previous position */    bool          b_slider_free;                      /* slider status */    /* The messages window */    msg_subscription_t* p_sub;                  /* message bank subscription */    /* Playlist management */    int                 i_playing;                 /* playlist selected item */    /* Send an event to show a dialog */    void (*pf_show_dialog) ( intf_thread_t *p_intf, int i_dialog, int i_arg,                             intf_dialog_args_t *p_arg );    /* Dynamic Menu management */    vector<MenuItemExt*> *p_audio_menu;    vector<MenuItemExt*> *p_video_menu;    vector<MenuItemExt*> *p_navig_menu;    vector<MenuItemExt*> *p_settings_menu;    VideoWindow          *p_video_window;};/***************************************************************************** * Prototypes *****************************************************************************/class CBaseWindow{public:    CBaseWindow( intf_thread_t *_p_intf = 0, CBaseWindow *_p_parent = 0,                 HINSTANCE _hInst = 0 )      : hWnd(0), hInst(_hInst), p_parent(_p_parent), p_intf(_p_intf) {};    virtual ~CBaseWindow() {};    HWND hWnd;                // The main window handle    static LRESULT CALLBACK BaseWndProc( HWND, UINT, WPARAM, LPARAM );    static int CreateDialogBox( HWND, CBaseWindow * );    HWND GetHandle() { return hWnd; }    BOOL Show( BOOL b_show ) { return (hWnd && ShowWindow(hWnd, b_show)); }    BOOL IsShown( void ) { return (hWnd && IsWindowVisible(hWnd)); }protected:    HINSTANCE       hInst;               // The current instance    HWND            hwndCB;              // The command bar handle    HINSTANCE       GetInstance () const { return hInst; }    virtual LRESULT WndProc( HWND, UINT, WPARAM, LPARAM ) { return 0; };    CBaseWindow     *p_parent;    intf_thread_t   *p_intf;};class FileInfo;class Messages;class Playlist;class Timer;class OpenDialog;class PrefsDialog;CBaseWindow *CreateDialogsProvider( intf_thread_t *, CBaseWindow *, HINSTANCE);CBaseWindow *CreateVideoWindow( intf_thread_t *, HWND );void PopupMenu( intf_thread_t *, HWND, POINT );/* Main Interface */class Interface : public CBaseWindow{public:    /* Constructor */    Interface( intf_thread_t *, CBaseWindow *, HINSTANCE );    ~Interface();    BOOL InitInstance();    HWND CreateMenuBar( HWND, HINSTANCE );    void TogglePlayButton( int i_playing_status );    void Update();    HWND hwndMain;      // Handle to the main window.    HWND hwndCB;        // Handle to the command bar (contains menu)    HWND hwndTB;        // Handle to the toolbar.    HWND hwndSlider;       // Handle to the Sliderbar.    HWND hwndLabel;    HWND hwndVol;          // Handle to the volume trackbar.    HWND hwndSB;        // Handle to the status bar.    HMENU hPopUpMenu;    HMENU hMenu;    Timer *timer;    CBaseWindow *video;protected:    virtual LRESULT WndProc( HWND, UINT, WPARAM, LPARAM );    void OnShowDialog( int );    void OnPlayStream( void );    void OnStopStream( void );    void OnPrevStream( void );    void OnNextStream( void );    void OnSlowStream( void );    void OnFastStream( void );    void OnVideoOnTop( void );    void OnSliderUpdate( int wp );    void OnChange( int wp );    void VolumeChange( int i_volume );    void VolumeUpdate( void );    int i_old_playing_status;private:    HMENU menu_settings;    HMENU menu_video;    HMENU menu_audio;    HMENU menu_navigation;    bool b_volume_hold;};/* File Info */class FileInfo : public CBaseWindow{public:    /* Constructor */    FileInfo( intf_thread_t *, CBaseWindow *, HINSTANCE );    virtual ~FileInfo(){};    void UpdateFileInfo(void);protected:    HWND hwnd_fileinfo;                 // handle to fileinfo window    HWND hwndTV;                                // handle to tree-view control    TCHAR szFileInfoClassName[100];     // Main window class name    TCHAR szFileInfoTitle[100];         // Main window name    virtual LRESULT WndProc( HWND, UINT, WPARAM, LPARAM );    BOOL CreateTreeView( HWND );};/* Messages */class Messages : public CBaseWindow{public:    /* Constructor */    Messages( intf_thread_t *, CBaseWindow *, HINSTANCE );    virtual ~Messages(){};    void UpdateLog(void);protected:    virtual LRESULT WndProc( HWND, UINT, WPARAM, LPARAM );    HWND hListView;    bool b_verbose;};/* ItemInfo Dialog */class ItemInfoDialog : public CBaseWindow{public:    /* Constructor */    ItemInfoDialog( intf_thread_t *, CBaseWindow *,                    HINSTANCE, playlist_item_t * );    virtual ~ItemInfoDialog(){};protected:    intf_thread_t *p_intf;    HWND hwndCB;        // Handle to the command bar (but no menu)    playlist_item_t *p_item;    /* Event handlers (these functions should _not_ be virtual) */    void OnOk();    void UpdateInfo();    virtual LRESULT WndProc( HWND, UINT, WPARAM, LPARAM );    /* Controls for the iteminfo dialog box */    HWND uri_label;    HWND uri_text;    HWND name_label;    HWND name_text;    HWND checkbox_label;    HWND enabled_checkbox;    HWND info_tree;};/* Open Dialog */class SubsFileDialog;class OpenDialog : public CBaseWindow{public:    /* Constructor */    OpenDialog( intf_thread_t *, CBaseWindow *, HINSTANCE, int, int );    virtual ~OpenDialog(){};    void UpdateMRL();    void UpdateMRL( int i_access_method );    HWND file_combo;protected:    virtual LRESULT WndProc( HWND, UINT, WPARAM, LPARAM );    HWND mrl_box;    HWND mrl_label;    HWND mrl_combo;    HWND label;    HWND notebook;    HWND browse_button;    HWND subsfile_checkbox;    HWND subsfile_label;    HWND subsfile_button;    SubsFileDialog *subsfile_dialog;    HWND net_radios[4];    HWND net_label[4];    HWND net_port_label[4];    HWND net_ports[4];    HWND hUpdown[4];    int i_net_ports[4];    HWND net_addrs_label[4];    HWND net_addrs[4];    int i_open_arg;    int i_access;    int i_net_type;    void FilePanel( HWND hwnd );    void NetPanel( HWND hwnd );    void OnSubsFileEnable();    void OnSubsFileSettings( HWND hwnd );    void OnPageChange();    void OnFilePanelChange();    void OnFileBrowse();    void OnNetPanelChange( int event );    void OnNetTypeChange( int event );    void DisableNETCtrl();    void OnOk();    vector<string> mrl;    vector<string> subsfile_mrl;};/* Subtitles File Dialog */class SubsFileDialog: public CBaseWindow{public:    /* Constructor */    SubsFileDialog( intf_thread_t *, CBaseWindow *, HINSTANCE );    virtual ~SubsFileDialog(){};    vector<string> subsfile_mrl;    HWND file_combo;protected:    friend class OpenDialog;    HWND file_box;    HWND browse_button;    HWND enc_box;    HWND enc_label;    HWND encoding_combo;    HWND misc_box;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -