亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? theme.cpp

?? VLC媒體播放程序
?? CPP
字號(hào):
/***************************************************************************** * theme.cpp: Theme class ***************************************************************************** * Copyright (C) 2003 VideoLAN * $Id: theme.cpp,v 1.18 2003/10/17 18:17:28 ipkiss Exp $ * * Authors: Olivier Teuli鑢e <ipkiss@via.ecp.fr> *          Emmanuel Puig    <karibu@via.ecp.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., 59 Temple Place - Suite 330, Boston, MA  02111, * USA. *****************************************************************************///--- VLC -------------------------------------------------------------------#include <vlc/intf.h>//--- SKIN ------------------------------------------------------------------#include "../os_api.h"#include "window.h"#include "../os_window.h"#include "banks.h"#include "anchor.h"#include "event.h"#include "../os_event.h"#include "../controls/generic.h"#include "theme.h"#include "vlcproc.h"#include "skin_common.h"//---------------------------------------------------------------------------// THEME//---------------------------------------------------------------------------Theme::Theme( intf_thread_t *_p_intf ){    p_intf = _p_intf;    BmpBank = new BitmapBank( p_intf );    FntBank = new FontBank( p_intf );    EvtBank = new EventBank( p_intf );    OffBank = new OffSetBank( p_intf );    ConstructPlaylist = false;    ShowInTray    = false;    ShowInTaskbar = false;}//---------------------------------------------------------------------------Theme::~Theme(){    // Delete the windows    list<SkinWindow *>::const_iterator win;    for( win = WindowList.begin(); win != WindowList.end(); win++ )    {        delete (OSWindow *)(*win);    }    delete OffBank;    delete EvtBank;    delete BmpBank;    delete FntBank;}//---------------------------------------------------------------------------void Theme::ShowTheme(){    // Get parameters form vlcrc config file    if( ShowInTray != (bool)config_GetInt( p_intf, "show_in_tray" ) )        ChangeTray();    if( ShowInTaskbar != (bool)config_GetInt( p_intf, "show_in_taskbar" ) )        ChangeTaskbar();    list<SkinWindow *>::const_iterator win;    Event *evt1;    Event *evt2;    // Synchronize control to visible aspect    for( win = WindowList.begin(); win != WindowList.end(); win++ )    {        // Synchronize windows visibility        if( (*win)->OnStartThemeVisible )        {            evt1 = (Event *)new OSEvent( p_intf, (*win), WINDOW_OPEN,  1, 0 );            evt2 = (Event *)new OSEvent( p_intf, (*win), WINDOW_CLOSE, 0, 0 );        }        else        {            evt1 = (Event *)new OSEvent( p_intf, (*win), WINDOW_OPEN,  0, 0 );            evt2 = (Event *)new OSEvent( p_intf, (*win), WINDOW_CLOSE, 1, 0 );        }        evt1->PostSynchroMessage( true );        evt2->PostSynchroMessage( true );    }    // Initialize magnetism    CheckAnchors();    // Show windows    OSAPI_PostMessage( NULL, VLC_SHOW, 0, 0 );}//---------------------------------------------------------------------------void Theme::CreateSystemMenu(){    AddSystemMenu( "Open file...", EvtBank->Get( "open" ) );    AddSystemMenu( "Change skin...", EvtBank->Get( "load_skin" ) );    AddSystemMenu( "Preferences...", EvtBank->Get( "show_prefs" ) );    AddSystemMenu( "Always on top", EvtBank->Get( "on_top" ) );    AddSystemMenu( "SEPARATOR", 0 );    AddSystemMenu( "Exit", EvtBank->Get( "quit" ) );}//---------------------------------------------------------------------------void Theme::LoadConfig(){    // Get config from vlcrc file    char *save = config_GetPsz( p_intf, "skin_config" );    if( save == NULL )        return;    // Initialization    list<SkinWindow *>::const_iterator win;    int i = 0;    int x, y, v, scan;    // Get config for each window    for( win = WindowList.begin(); win != WindowList.end(); win++ )    {        // Get config        scan = sscanf( &save[i * 13], "(%4d,%4d,%1d)", &x, &y, &v );        // If config has the correct number of arguments        if( scan > 2 )        {            (*win)->Move( x, y );            (*win)->OnStartThemeVisible = (bool)v;        }        // Next window        i++;    }}//---------------------------------------------------------------------------void Theme::SaveConfig(){    // Initialize char where config is stored    char *save  = new char[400];    list<SkinWindow *>::const_iterator win;    int i = 0;    int x, y;    // Save config of every window    for( win = WindowList.begin(); win != WindowList.end(); win++ )    {        // Print config        (*win)->GetPos( x, y );        sprintf( &save[i * 13], "(%4d,%4d,%1d)", x, y,            (*win)->OnStartThemeVisible );        i++;    }    // Save config to file    config_PutPsz( p_intf, "skin_config",     save );    config_PutInt( p_intf, "show_in_tray",    (int)ShowInTray );    config_PutInt( p_intf, "show_in_taskbar", (int)ShowInTaskbar );    config_SaveConfigFile( p_intf, "skins" );    // Free memory    delete[] save;}//---------------------------------------------------------------------------void Theme::StartTheme( int magnet ){    Magnet = magnet;}//---------------------------------------------------------------------------void Theme::InitTheme(){    // Initialize the events    EvtBank->Init();    // Initialize the controls    InitControls();    // Initialize the windows    InitWindows();}//---------------------------------------------------------------------------void Theme::InitWindows(){    for( list<SkinWindow *>::const_iterator win = WindowList.begin();         win != WindowList.end(); win++ )    {        (*win)->Init();    }}//---------------------------------------------------------------------------void Theme::InitControls(){    for( list<SkinWindow *>::const_iterator win = WindowList.begin();         win != WindowList.end(); win++ )    {        for( unsigned int i = 0; i < (*win)->ControlList.size(); i++ )        {            (*win)->ControlList[i]->Init();        }    }}//---------------------------------------------------------------------------SkinWindow * Theme::GetWindow( string name ){    for( list<SkinWindow *>::const_iterator win = WindowList.begin();         win != WindowList.end(); win++ )    {        if( name == OSAPI_GetWindowTitle( *win ) )        {            return (*win);        }    }    return NULL;}//---------------------------------------------------------------------------void Theme::MoveSkin( SkinWindow *wnd, int left, int top ){    int oldx, oldy;    SkinWindow *win;    list<Anchor *>::const_iterator anc;    list<Anchor *>::const_iterator hang;    wnd->GetPos( oldx, oldy );    // Move child windows recursively    for( anc = wnd->AnchorList.begin(); anc != wnd->AnchorList.end(); anc++ )    {        for( hang = (*anc)->HangList.begin(); hang != (*anc)->HangList.end();             hang++ )        {            win = (*hang)->GetParent();            // Check that the window hasn't already moved (this avoids            // infinite recursion with circular anchoring)            if( !win->Moved )            {                win->Moved = true;                MoveSkin( win, left, top );            }        }    }    // Move window    wnd->Move( oldx + left, oldy + top );}//---------------------------------------------------------------------------bool Theme::MoveSkinMagnet( SkinWindow *wnd, int left, int top ){    // If magnetism not activate    if( !Magnet )    {        wnd->Move( left, top );        return false;    }    // Screen bounds initialization    int NewLeft = left;    int NewTop  = top;    int Sx, Sy, Wx, Wy;    OSAPI_GetScreenSize( Sx, Sy );    int width, height;    wnd->GetSize( width, height );    wnd->GetPos( Wx, Wy );    // Magnetism with screen bounds    if( left < Magnet && left > -Magnet)        NewLeft = 0;    else if( left + width > Sx - Magnet && left + width < Sx + Magnet )        NewLeft = Sx - width;    if( top < Magnet && top > -Magnet )        NewTop = 0;    else if( top + height > Sy - Magnet && top + height < Sy + Magnet )        NewTop = Sy - height;    // Deal with anchors    HangToAnchors( wnd, NewLeft, NewTop );    // All windows can be moved    list<SkinWindow *>::const_iterator win;    for( win = WindowList.begin(); win != WindowList.end(); win++ )        (*win)->Moved = false;    // Move Window    MoveSkin( wnd, NewLeft - Wx, NewTop - Wy );    return true;}//---------------------------------------------------------------------------void Theme::HangToAnchors( SkinWindow *wnd, int &x, int &y, bool init ){    // Magnetism initialization    int win_x, win_y, win_anchor_x, win_anchor_y, wnd_anchor_x, wnd_anchor_y;    list<SkinWindow *>::const_iterator win;    list<Anchor *>::const_iterator win_anchor, wnd_anchor;    // Parse list of windows    for( win = WindowList.begin(); win != WindowList.end(); win++ )    {        // If window is moved window        if( (*win) == wnd )            continue;               // Check next window        // If window is hidden        if( !init )        {            if( (*win)->IsHidden() )                continue;           // Check next window        }        else        {            if( !(*win)->OnStartThemeVisible )                continue;           // Check next window        }        // Parse anchor lists        for( wnd_anchor  = wnd->AnchorList.begin();             wnd_anchor != wnd->AnchorList.end(); wnd_anchor++ )        {            for( win_anchor  = (*win)->AnchorList.begin();                 win_anchor != (*win)->AnchorList.end(); win_anchor++ )            {                if( (*wnd_anchor)->GetPriority() <                    (*win_anchor)->GetPriority() )                {                    // Parent anchor is win and child is wnd !!!                    if( !(*win_anchor)->Hang( (*wnd_anchor), x, y ) )                    {                        // If child is in parent list and parent doesn't hang                        // child                        if( (*win_anchor)->IsInList( (*wnd_anchor) ) )                            (*win_anchor)->Remove( (*wnd_anchor) );                    }                    else                    {                        // If parent hangs child and child is not yet in list                        if( !(*win_anchor)->IsInList( (*wnd_anchor) ) )                        {                            (*win_anchor)->Add( (*wnd_anchor) );                        }                        // Move window to stick anchor                        (*wnd_anchor)->GetPos( wnd_anchor_x, wnd_anchor_y );                        (*win_anchor)->GetPos( win_anchor_x, win_anchor_y );                        (*win)->GetPos( win_x, win_y );                        x = win_x + win_anchor_x - wnd_anchor_x;                        y = win_y + win_anchor_y - wnd_anchor_y;                        break;                    }                }                else if( (*win_anchor)->Hang( (*wnd_anchor), x, y ) )                {                    if( !(*wnd_anchor)->IsInList( *win_anchor ) )                    {                        // Move window to stick anchor                        (*wnd_anchor)->GetPos( wnd_anchor_x, wnd_anchor_y );                        (*win_anchor)->GetPos( win_anchor_x, win_anchor_y );                        (*win)->GetPos( win_x, win_y );                        x = win_x + win_anchor_x - wnd_anchor_x;                        y = win_y + win_anchor_y - wnd_anchor_y;                    }                    break;                }            }        }    }}//---------------------------------------------------------------------------void Theme::CheckAnchors(){    list<SkinWindow *>::const_iterator win;    int x, y;    for( win = WindowList.begin(); win != WindowList.end(); win++ )    {        (*win)->GetPos( x, y );        HangToAnchors( (*win), x, y, true );        (*win)->Move( x, y );    }}//---------------------------------------------------------------------------

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
中文字幕不卡在线观看| 日韩码欧中文字| 91麻豆精品秘密| 开心九九激情九九欧美日韩精美视频电影| 国产精品你懂的| 久久色在线观看| 日韩欧美专区在线| 欧美美女一区二区在线观看| 99久久精品国产导航| 国产成人av电影| 激情亚洲综合在线| 免费精品视频在线| 亚州成人在线电影| 一区二区三区精密机械公司| 国产精品毛片大码女人| 久久久久久麻豆| 日韩美女天天操| 欧美电影一区二区三区| 在线视频亚洲一区| 一本久道中文字幕精品亚洲嫩| 国产精品中文字幕日韩精品| 精品一区二区三区免费| 喷白浆一区二区| 亚洲国产精品久久不卡毛片| 一区二区三区中文在线| 亚洲精品欧美综合四区| 亚洲女人的天堂| 一区二区三区欧美日| 亚洲欧美日韩国产综合| 亚洲男人的天堂网| 一区二区欧美视频| 一二三区精品视频| 亚洲成av人片一区二区梦乃 | 亚洲日本在线看| 中文成人综合网| 国产精品传媒视频| 亚洲人成7777| 亚洲综合色成人| 亚洲高清不卡在线| 天天综合色天天综合色h| 天天综合网天天综合色| 美国欧美日韩国产在线播放| 激情综合色丁香一区二区| 国产在线播放一区三区四| 成人一区二区三区视频在线观看| 福利一区二区在线| 色综合中文字幕国产| 在线视频国内一区二区| 欧美日韩国产成人在线91| 日韩欧美国产午夜精品| 国产亚洲女人久久久久毛片| 中文字幕免费观看一区| 亚洲精品乱码久久久久久久久| 一区二区三区日韩欧美精品 | 日韩成人一区二区三区在线观看| 青青青伊人色综合久久| 国产一区二区美女诱惑| 69久久99精品久久久久婷婷 | 欧美一区二区免费观在线| 日韩欧美综合在线| 国产视频不卡一区| 亚洲免费av网站| 秋霞国产午夜精品免费视频| 国内偷窥港台综合视频在线播放| 成人激情黄色小说| 欧美日韩精品三区| 精品嫩草影院久久| 亚洲青青青在线视频| 日韩在线观看一区二区| 国产精品伊人色| 在线观看欧美精品| 精品国产免费一区二区三区香蕉| 中文字幕在线免费不卡| 偷拍与自拍一区| 国产成人免费在线| 欧美色区777第一页| 久久免费看少妇高潮| 亚洲最新视频在线播放| 韩国欧美一区二区| 在线免费观看日韩欧美| 精品日韩一区二区三区免费视频| 自拍av一区二区三区| 老鸭窝一区二区久久精品| 一本色道a无线码一区v| 欧美电视剧免费全集观看| 国产精品网站在线观看| 日本中文一区二区三区| 91影院在线观看| 欧美一级日韩不卡播放免费| 成人欧美一区二区三区1314 | 国产不卡视频一区二区三区| 欧美日韩高清一区| 中文在线一区二区| 日韩av电影免费观看高清完整版| 成人国产精品免费观看动漫| 日韩欧美一区电影| 亚洲欧美日韩国产中文在线| 国产精品综合久久| 91精品在线麻豆| 亚洲天堂精品在线观看| 国产福利精品一区| 日韩一区二区三区四区| 亚洲成人av资源| 99这里只有久久精品视频| 久久综合九色综合97婷婷女人| 亚洲国产一二三| 91免费观看国产| 国产丝袜欧美中文另类| 激情六月婷婷久久| 欧美精品少妇一区二区三区| 亚洲在线视频网站| 色乱码一区二区三区88| 久久久久久久久99精品| 国产在线精品一区二区不卡了 | 亚洲乱码一区二区三区在线观看| 国产成人亚洲综合a∨婷婷图片| 日韩欧美在线网站| 日韩精品久久久久久| 欧美日韩中文精品| 亚洲超丰满肉感bbw| 一本到不卡精品视频在线观看| 国产精品亲子伦对白| 粉嫩绯色av一区二区在线观看| 久久亚洲精精品中文字幕早川悠里| 男人的j进女人的j一区| 亚洲视频一区二区在线| 成人免费视频播放| 国产精品伦一区| 91丨九色porny丨蝌蚪| 中文字幕人成不卡一区| 一本大道久久精品懂色aⅴ| 亚洲色图欧洲色图| 91高清视频在线| 一区二区三区av电影| 欧美性大战久久久久久久蜜臀| 亚洲自拍偷拍综合| 在线成人高清不卡| 青青草伊人久久| 精品成人免费观看| 国产成人av网站| 成人欧美一区二区三区1314| 色就色 综合激情| 五月婷婷久久综合| 欧美成人一区二区三区片免费| 美洲天堂一区二卡三卡四卡视频| 日韩女优制服丝袜电影| 国产精品一区二区你懂的| 国产日韩在线不卡| 91香蕉视频在线| 亚洲成人三级小说| 精品国产欧美一区二区| 不卡区在线中文字幕| 一区二区三区在线免费播放| 欧美日韩高清一区二区| 精品一区二区av| 国产欧美va欧美不卡在线| 日本高清不卡在线观看| 日本中文字幕一区二区有限公司| 久久综合网色—综合色88| 粉嫩av亚洲一区二区图片| 综合久久一区二区三区| 欧美日韩亚州综合| 国产精品123| 一区二区三区在线观看动漫| 欧美一级黄色录像| 成人综合在线观看| 亚洲国产成人高清精品| 久久午夜色播影院免费高清| 91免费看视频| 久久精品国产色蜜蜜麻豆| 亚洲国产成人午夜在线一区| 欧美日韩精品一区二区三区 | 亚洲狠狠爱一区二区三区| 欧美xxxxxxxx| 色老汉一区二区三区| 久久超碰97人人做人人爱| 亚洲欧洲精品一区二区三区| 91精品婷婷国产综合久久竹菊| 高清不卡一区二区| 丝袜诱惑亚洲看片| 国产精品福利电影一区二区三区四区| 欧美在线观看视频一区二区| 黑人巨大精品欧美一区| 依依成人综合视频| 精品国产露脸精彩对白| 欧美在线免费观看视频| 成人午夜av在线| 蜜臀av性久久久久蜜臀aⅴ四虎| 亚洲天天做日日做天天谢日日欢| 日韩一区二区电影| 日本乱码高清不卡字幕| 国产成人欧美日韩在线电影 | 91免费精品国自产拍在线不卡| 日本va欧美va瓶| 一区二区三区在线免费视频| 国产婷婷色一区二区三区在线| 91精品国产欧美日韩| 91在线视频官网| 国产成人夜色高潮福利影视| 蜜桃av一区二区在线观看|