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

📄 preferences.c

📁 uclinux下mplayer的源码
💻 C
📖 第 1 页 / 共 3 页
字号:
/* * MPlayer GUI for Win32 * Copyright (C) 2003 Sascha Sommer <saschasommer@freenet.de> * Copyright (C) 2006 Erik Augustson <erik_27can@yahoo.com> * Copyright (C) 2006 Gianluigi Tiesi <sherpya@netfarm.it> * * This file is part of MPlayer. * * MPlayer 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. * * MPlayer 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 MPlayer; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */#include <windows.h>#include <commctrl.h>#include <stdio.h>#include <stdlib.h>#include <string.h>#include "libvo/video_out.h"#include "libao2/audio_out.h"#include "mixer.h"#include "interface.h"#include "gui.h"#include "mp_msg.h"#include "help_mp.h"#include "dialogs.h"#include "wincfg.h"extern char  *proc_priority;static void set_defaults(void);static LRESULT CALLBACK PrefsWndProc(HWND hwnd, UINT iMsg, WPARAM wParam, LPARAM lParam){    HWND btn, label, edit1, edit2, edit3, updown1, updown2, track1, track2;    static HWND vo_driver, ao_driver, prio;    int i = 0, j = 0;    char dvddevice[MAX_PATH];    char cdromdevice[MAX_PATH];    char procprio[11];    float x = 10.0, y = 100.0, stereopos, delaypos;    stereopos = gtkAOExtraStereoMul * x;    delaypos = audio_delay * y;    switch (iMsg)    {        case WM_CREATE:        {            /* video and audio drivers */            label = CreateWindow("static", "Video Driver:",                                 WS_CHILD | WS_VISIBLE,                                 10, 13, 70, 15, hwnd,                                 NULL, ((LPCREATESTRUCT) lParam) -> hInstance,                                 NULL);            SendMessage(label, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0);            label = CreateWindow("static", "Audio Driver:",                                 WS_CHILD | WS_VISIBLE,                                 190, 13, 70, 15, hwnd,                                 NULL, ((LPCREATESTRUCT) lParam) -> hInstance,                                 NULL);            SendMessage(label, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0);            label = CreateWindow("static", "Extra stereo coefficient:",                                 WS_CHILD | WS_VISIBLE,                                 10, 126, 115, 15, hwnd,                                 NULL, ((LPCREATESTRUCT) lParam) -> hInstance,                                 NULL);            SendMessage(label, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0);            label = CreateWindow("static", "Audio delay:",                                 WS_CHILD | WS_VISIBLE,                                 36, 165, 115, 15, hwnd,                                 NULL, ((LPCREATESTRUCT) lParam) -> hInstance,                                 NULL);            SendMessage(label, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0);            label = CreateWindow("static", "OSD level:",                                 WS_CHILD | WS_VISIBLE,                                 10, 264, 115, 15, hwnd,                                 NULL, ((LPCREATESTRUCT) lParam) -> hInstance,                                 NULL);            SendMessage(label, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0);            label = CreateWindow("static", "DVD device:",                                 WS_CHILD | WS_VISIBLE,                                 80, 363, 115, 15, hwnd,                                 NULL, ((LPCREATESTRUCT) lParam) -> hInstance,                                 NULL);            SendMessage(label, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0);            label = CreateWindow("static", "CD device:",                                 WS_CHILD | WS_VISIBLE,                                 202, 363, 115, 15, hwnd,                                 NULL, ((LPCREATESTRUCT) lParam) -> hInstance,                                 NULL);            SendMessage(label, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0);            label = CreateWindow("static", "Priority:",                                 WS_CHILD | WS_VISIBLE,                                 217, 264, 115, 15, hwnd,                                 NULL, ((LPCREATESTRUCT) lParam) -> hInstance,                                 NULL);            SendMessage(label, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0);            vo_driver = CreateWindow("combobox", NULL,                                     CBS_DROPDOWNLIST | CB_SHOWDROPDOWN |                                     CBS_NOINTEGRALHEIGHT | CBS_HASSTRINGS |                                     WS_CHILD | WS_VISIBLE |                                     WS_VSCROLL | WS_TABSTOP,                                     80, 10, 100, 160, hwnd,                                     (HMENU) ID_VO_DRIVER,                                     ((LPCREATESTRUCT) lParam) -> hInstance,                                     NULL);            ao_driver = CreateWindow("combobox", NULL,                                     CBS_DROPDOWNLIST | CB_SHOWDROPDOWN |                                     CBS_NOINTEGRALHEIGHT | CBS_HASSTRINGS |                                     WS_CHILD | WS_VISIBLE |                                     WS_VSCROLL | WS_TABSTOP,                                     260, 10, 100, 160, hwnd,                                     (HMENU) ID_AO_DRIVER,                                     ((LPCREATESTRUCT) lParam) -> hInstance,                                     NULL);            prio = CreateWindow("combobox", NULL,                                CBS_DROPDOWNLIST | CB_SHOWDROPDOWN |                                CBS_NOINTEGRALHEIGHT | CBS_HASSTRINGS |                                WS_CHILD | WS_VISIBLE |                                WS_VSCROLL | WS_TABSTOP,                                260, 260, 100, 160, hwnd,                                (HMENU) ID_PRIO,                                ((LPCREATESTRUCT) lParam) -> hInstance,                                NULL);            /* checkboxes */            btn = CreateWindow("button", "Enable double buffering",                               WS_CHILD | WS_VISIBLE | BS_AUTOCHECKBOX,                               25, 35, 150, 25,                               hwnd, (HMENU) ID_DOUBLE,                               ((LPCREATESTRUCT) lParam) -> hInstance,                               NULL);            SendMessage(btn, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0);            btn = CreateWindow("button", "Enable direct rendering",                               WS_CHILD | WS_VISIBLE | BS_AUTOCHECKBOX,                               25, 57, 150, 25,                               hwnd, (HMENU) ID_DIRECT,                               ((LPCREATESTRUCT) lParam) -> hInstance,                               NULL);            SendMessage(btn, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0);            btn = CreateWindow("button", "Enable framedropping",                               WS_CHILD | WS_VISIBLE | BS_AUTOCHECKBOX,                               25, 79, 150, 25,                               hwnd, (HMENU) ID_FRAMEDROP,                               ((LPCREATESTRUCT) lParam) -> hInstance,                               NULL);            SendMessage(btn, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0);            btn = CreateWindow("button", "Normalize sound",                               WS_CHILD | WS_VISIBLE | BS_AUTOCHECKBOX,                               205, 35, 150, 25,                               hwnd, (HMENU) ID_NORMALIZE,                               ((LPCREATESTRUCT) lParam) -> hInstance,                               NULL);            SendMessage(btn, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0);            btn = CreateWindow("button", "Enable software mixer",                               WS_CHILD | WS_VISIBLE | BS_AUTOCHECKBOX,                               205, 57, 150, 25,                               hwnd, (HMENU) ID_SOFTMIX,                               ((LPCREATESTRUCT) lParam) -> hInstance,                               NULL);            SendMessage(btn, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0);            btn = CreateWindow("button", "Enable extra stereo",                               WS_CHILD | WS_VISIBLE | BS_AUTOCHECKBOX,                               205, 79, 150, 25,                               hwnd, (HMENU) ID_EXTRASTEREO,                               ((LPCREATESTRUCT) lParam) -> hInstance,                               NULL);            SendMessage(btn, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0);            btn = CreateWindow("button", "Enable cache",                               WS_CHILD | WS_VISIBLE | BS_AUTOCHECKBOX,                               10, 200, 90, 25,                               hwnd, (HMENU) ID_CACHE,                               ((LPCREATESTRUCT) lParam) -> hInstance,                               NULL);            SendMessage(btn, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0);            btn = CreateWindow("button", "Enable autosync",                               WS_CHILD | WS_VISIBLE | BS_AUTOCHECKBOX,                               192, 200, 100, 25, hwnd,                               (HMENU) ID_AUTOSYNC,                               ((LPCREATESTRUCT) lParam) -> hInstance,                               NULL);            SendMessage(btn, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0);            btn = CreateWindow("button", "Display videos in the sub window",                               WS_CHILD | WS_VISIBLE | BS_AUTOCHECKBOX,                               85, 227, 250, 25,                               hwnd, (HMENU) ID_SUBWINDOW,                               ((LPCREATESTRUCT) lParam) -> hInstance,                               NULL);            SendMessage(btn, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0);            /* osd level */            btn = CreateWindow("button", "None",                               WS_CHILD | WS_VISIBLE | BS_AUTORADIOBUTTON,                               95, 260, 100, 25, hwnd,                               (HMENU) ID_NONE,                               ((LPCREATESTRUCT) lParam) -> hInstance,                               NULL);            SendMessage(btn, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0);            btn = CreateWindow("button", "Timer and indicators",                               WS_CHILD | WS_VISIBLE | BS_AUTORADIOBUTTON,                               95, 280, 180, 25, hwnd,                               (HMENU) ID_OSD1,                               ((LPCREATESTRUCT) lParam) -> hInstance,                               NULL);            SendMessage(btn, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0);            btn = CreateWindow("button", "Progress bar only",                               WS_CHILD | WS_VISIBLE | BS_AUTORADIOBUTTON,                               95, 300, 180, 25, hwnd,                               (HMENU) ID_OSD2,

⌨️ 快捷键说明

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