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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? dom2_events.cpp

?? It is WEB browser core module with source code. Very good!
?? CPP
?? 第 1 頁 / 共 2 頁
字號:
/**
 * This file is part of the DOM implementation for KDE.
 *
 * (C) 2001 Peter Kelly (pmk@post.com)
 * Copyright (C) 2003 Apple Computer, Inc.
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Library General Public
 * License as published by the Free Software Foundation; either
 * version 2 of the License, or (at your option) any later version.
 *
 * This library 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
 * Library General Public License for more details.
 *
 * You should have received a copy of the GNU Library General Public License
 * along with this library; see the file COPYING.LIB.  If not, write to
 * the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 * Boston, MA 02111-1307, USA.
 *
 */

#include "dom/dom2_views.h"
#include "dom/dom_exception.h"
#include "xml/dom2_eventsimpl.h"

using namespace DOM;

EventListener::EventListener()
{
}

EventListener::~EventListener()
{
}

void EventListener::handleEvent(Event &/*evt*/, bool)
{
}

DOMString EventListener::eventListenerType()
{
    return "";
}

// -----------------------------------------------------------------------------

Event::Event()
{
    impl = 0;
}


Event::Event(const Event &other)
{
    impl = other.impl;
    if (impl) impl->ref();
}

Event::Event(EventImpl *i)
{
    impl = i;
    if (impl) impl->ref();
}

Event::~Event()
{
    if (impl) impl->deref();
}

Event &Event::operator = (const Event &other)
{
    if ( impl != other.impl ) {
    if(impl) impl->deref();
    impl = other.impl;
    if(impl) impl->ref();
    }
    return *this;
}

DOMString Event::type() const
{
    if (!impl)
#if KHTML_NO_EXCEPTIONS    
    { _exceptioncode = DOMException::INVALID_STATE_ERR; return DOMString(); }
#else
	throw DOMException(DOMException::INVALID_STATE_ERR);
#endif    

    return impl->type();
}

Node Event::target() const
{
    if (!impl)
#if KHTML_NO_EXCEPTIONS    
	{ _exceptioncode = DOMException::INVALID_STATE_ERR; return 0; }
#else
	throw DOMException(DOMException::INVALID_STATE_ERR);
#endif    

    return impl->target();
}

Node Event::currentTarget() const
{
    if (!impl)
#if KHTML_NO_EXCEPTIONS    
	{ _exceptioncode = DOMException::INVALID_STATE_ERR; return 0; }
#else
	throw DOMException(DOMException::INVALID_STATE_ERR);
#endif    

    return impl->currentTarget();
}

unsigned short Event::eventPhase() const
{
    if (!impl)
#if KHTML_NO_EXCEPTIONS    
	{ _exceptioncode = DOMException::INVALID_STATE_ERR; return 0; }
#else
	throw DOMException(DOMException::INVALID_STATE_ERR);
#endif    

    return impl->eventPhase();
}

bool Event::bubbles() const
{
    if (!impl)
#if KHTML_NO_EXCEPTIONS    
	{ _exceptioncode = DOMException::INVALID_STATE_ERR; return 0; }
#else
	throw DOMException(DOMException::INVALID_STATE_ERR);
#endif    

    return impl->bubbles();
}

bool Event::cancelable() const
{
    if (!impl)
#if KHTML_NO_EXCEPTIONS    
	{ _exceptioncode = DOMException::INVALID_STATE_ERR; return 0; }
#else
	throw DOMException(DOMException::INVALID_STATE_ERR);
#endif    

    return impl->cancelable();
}

DOMTimeStamp Event::timeStamp() const
{
    if (!impl)
#if KHTML_NO_EXCEPTIONS    
	{ _exceptioncode = DOMException::INVALID_STATE_ERR; return 0; }
#else
	throw DOMException(DOMException::INVALID_STATE_ERR);
#endif    

    return impl->timeStamp();
}

void Event::stopPropagation()
{
    if (!impl)
#if KHTML_NO_EXCEPTIONS    
	{ _exceptioncode = DOMException::INVALID_STATE_ERR; return; }
#else
	throw DOMException(DOMException::INVALID_STATE_ERR);
#endif    

    impl->stopPropagation();
}

void Event::preventDefault()
{
    if (!impl)
#if KHTML_NO_EXCEPTIONS    
	{ _exceptioncode = DOMException::INVALID_STATE_ERR; return;  }
#else
	throw DOMException(DOMException::INVALID_STATE_ERR);
#endif    

    impl->preventDefault();
}

void Event::initEvent(const DOMString &eventTypeArg, bool canBubbleArg, bool cancelableArg)
{
    if (!impl)
#if KHTML_NO_EXCEPTIONS    
	{ _exceptioncode = DOMException::INVALID_STATE_ERR; return; }
#else
	throw DOMException(DOMException::INVALID_STATE_ERR);
#endif    

    impl->initEvent(eventTypeArg,canBubbleArg,cancelableArg);
}

EventImpl *Event::handle() const
{
    return impl;
}

bool Event::isNull() const
{
    return (impl == 0);
}

void Event::setCancelBubble(bool cancel)
{
    if (!impl)
#if KHTML_NO_EXCEPTIONS    
	{ _exceptioncode = DOMException::INVALID_STATE_ERR; return; }
#else
	throw DOMException(DOMException::INVALID_STATE_ERR);
#endif    

    impl->setCancelBubble(cancel);
}

void Event::setDefaultPrevented(bool defaultPrevented)
{
    if (!impl)
#if KHTML_NO_EXCEPTIONS    
    { _exceptioncode = DOMException::INVALID_STATE_ERR; return; }
#else
	throw DOMException(DOMException::INVALID_STATE_ERR);
#endif    

    impl->setDefaultPrevented(defaultPrevented);
}
 
bool Event::getCancelBubble() const
{
    if (!impl)
#if KHTML_NO_EXCEPTIONS    
    { _exceptioncode = DOMException::INVALID_STATE_ERR; return false; }
#else
	throw DOMException(DOMException::INVALID_STATE_ERR);
#endif    

    return impl->getCancelBubble();
}

bool Event::defaultPrevented() const
{
    if (!impl)
#if KHTML_NO_EXCEPTIONS    
    { _exceptioncode = DOMException::INVALID_STATE_ERR; return false; }
#else
	throw DOMException(DOMException::INVALID_STATE_ERR);
#endif    
    
    return impl->defaultPrevented();
}

// -----------------------------------------------------------------------------

#ifndef SAVE_SPACE

EventException::EventException(unsigned short _code)
{
    code = _code;
}

EventException::EventException(const EventException &other)
{
    code = other.code;
}

EventException & EventException::operator = (const EventException &other)
{
    code = other.code;
    return *this;
}

#endif

// -----------------------------------------------------------------------------

UIEvent::UIEvent() : Event()
{
}

UIEvent::UIEvent(const UIEvent &other) : Event(other)
{
}

UIEvent::UIEvent(const Event &other) : Event()
{
    (*this)=other;
}

UIEvent::UIEvent(UIEventImpl *impl) : Event(impl)
{
}

UIEvent &UIEvent::operator = (const UIEvent &other)
{
    Event::operator = (other);
    return *this;
}

UIEvent &UIEvent::operator = (const Event &other)
{
    Event e;
    e = other;
    if (!e.isNull() && !e.handle()->isUIEvent()) {
	if ( impl ) impl->deref();
	impl = 0;
    } else
	Event::operator = (other);
    return *this;
}

UIEvent::~UIEvent()
{
}

AbstractView UIEvent::view() const
{
    if (!impl)
#if KHTML_NO_EXCEPTIONS    
	{ _exceptioncode = DOMException::INVALID_STATE_ERR; return 0; }
#else
	throw DOMException(DOMException::INVALID_STATE_ERR);
#endif    

    return static_cast<UIEventImpl*>(impl)->view();
}

long UIEvent::detail() const
{
    if (!impl)
#if KHTML_NO_EXCEPTIONS    
	{ _exceptioncode = DOMException::INVALID_STATE_ERR; return 0; }
#else
	throw DOMException(DOMException::INVALID_STATE_ERR);
#endif    

    return static_cast<UIEventImpl*>(impl)->detail();
}

int UIEvent::keyCode() const
{
    if (!impl)
#if KHTML_NO_EXCEPTIONS    
	{ _exceptioncode = DOMException::INVALID_STATE_ERR; return 0; }
#else
	throw DOMException(DOMException::INVALID_STATE_ERR);
#endif    
    
    if (impl->isKeyboardEvent())
        return static_cast<KeyboardEventImpl*>(impl)->keyCode();
    else
        return 0;
}

int UIEvent::charCode() const
{
    if (!impl)
#if KHTML_NO_EXCEPTIONS    
    { _exceptioncode = DOMException::INVALID_STATE_ERR; return 0; }
#else
	throw DOMException(DOMException::INVALID_STATE_ERR);
#endif    
    
    if (impl->isKeyboardEvent())
        return static_cast<KeyboardEventImpl*>(impl)->charCode();
    else
        return 0;
}

int UIEvent::pageX() const
{
    if (!impl)
#if KHTML_NO_EXCEPTIONS    
	{ _exceptioncode = DOMException::INVALID_STATE_ERR; return 0; }
#else
	throw DOMException(DOMException::INVALID_STATE_ERR);
#endif    
    
    if (impl->isMouseEvent())
        return static_cast<MouseEventImpl*>(impl)->clientX();
    else
        return 0;
}

int UIEvent::pageY() const
{
    if (!impl)
#if KHTML_NO_EXCEPTIONS    
	{ _exceptioncode = DOMException::INVALID_STATE_ERR; return 0; }
#else
	throw DOMException(DOMException::INVALID_STATE_ERR);
#endif    
    
    if (impl->isMouseEvent())
        return static_cast<MouseEventImpl*>(impl)->clientY();
    else
        return 0;
}

int UIEvent::layerX() const
{
    if (!impl)
#if KHTML_NO_EXCEPTIONS    
	{ _exceptioncode = DOMException::INVALID_STATE_ERR; return 0; }
#else
	throw DOMException(DOMException::INVALID_STATE_ERR);
#endif    
    
    if (impl->isMouseEvent())
        return static_cast<MouseEventImpl*>(impl)->layerX();
    else
        return 0;
}

int UIEvent::layerY() const
{
    if (!impl)
#if KHTML_NO_EXCEPTIONS    
	{ _exceptioncode = DOMException::INVALID_STATE_ERR; return 0; }
#else
	throw DOMException(DOMException::INVALID_STATE_ERR);
#endif    
    
    if (impl->isMouseEvent())
        return static_cast<MouseEventImpl*>(impl)->layerY();
    else
        return 0;
}

int UIEvent::which() const
{
    if (!impl)
#if KHTML_NO_EXCEPTIONS    
	{ _exceptioncode = DOMException::INVALID_STATE_ERR; return 0; }
#else
	throw DOMException(DOMException::INVALID_STATE_ERR);
#endif    

    // Note: This property supports both key events and mouse events

    // Netscape's "which" returns a virtual key code for keydown and keyup, and a character code for keypress.
    // That's exactly what IE's "keyCode" returns.
    if (impl->isKeyboardEvent())
        return static_cast<KeyboardEventImpl*>(impl)->keyCode();

    // For khtml, the return values for left, middle and right mouse buttons are 0, 1, 2, respectively.
    // For the Netscape "which" property, the return values for left, middle and right mouse buttons are 1, 2, 3, respectively. 
    // So we can just add 1 to the value returned by calling button().
    if (impl->isMouseEvent())
        return static_cast<MouseEventImpl*>(impl)->button() + 1;

    return 0;
}


void UIEvent::initUIEvent(const DOMString &typeArg,
                                 bool canBubbleArg,
                                 bool cancelableArg,
                                 const AbstractView &viewArg,
                                 long detailArg)
{
    if (!impl)
#if KHTML_NO_EXCEPTIONS    
	{ _exceptioncode = DOMException::INVALID_STATE_ERR; return; }
#else

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
麻豆极品一区二区三区| 国产欧美日韩不卡| 2020日本不卡一区二区视频| 久久毛片高清国产| 中文天堂在线一区| 一区二区三区电影在线播| 午夜激情久久久| 久久国产精品露脸对白| 成人av免费观看| 欧美精品一卡两卡| 久久久午夜电影| 一区二区三区精品| 国内精品写真在线观看| 欧美亚洲日本一区| 国产亚洲精品资源在线26u| 亚洲制服丝袜av| 国产九色sp调教91| 欧美日韩中文一区| 亚洲国产精品传媒在线观看| 亚洲一区二区三区四区的| 国内精品自线一区二区三区视频| 色噜噜狠狠成人中文综合| 精品久久久久99| 亚洲黄网站在线观看| 国产麻豆精品在线观看| 91成人在线观看喷潮| 精品国产凹凸成av人网站| 一区二区视频免费在线观看| 久久69国产一区二区蜜臀| 一本到三区不卡视频| 精品国产乱码久久久久久免费 | 午夜精品福利久久久| 国产成人精品亚洲日本在线桃色| 欧美剧在线免费观看网站| 亚洲日本乱码在线观看| 久久国产视频网| 精品视频1区2区| 中文字幕一区二区三区色视频 | 久久久久久久网| 午夜国产不卡在线观看视频| 99久久精品免费观看| 精品人在线二区三区| 亚洲国产视频一区| 99久久精品免费看国产免费软件| 精品粉嫩超白一线天av| 日本亚洲最大的色成网站www| 91亚洲国产成人精品一区二区三 | 成人国产精品免费观看| 日韩精品一区二| 爽好久久久欧美精品| 在线看一区二区| ㊣最新国产の精品bt伙计久久| 国产综合久久久久久久久久久久 | 久久爱www久久做| 精品视频资源站| 亚洲精品国产精品乱码不99| av影院午夜一区| 国产偷国产偷精品高清尤物| 激情文学综合网| 日韩亚洲电影在线| 日本vs亚洲vs韩国一区三区二区| 在线中文字幕一区| 亚洲精品视频观看| 91视频在线看| 亚洲精品一二三区| 91同城在线观看| 最新热久久免费视频| 91小视频免费看| 一区二区欧美精品| 欧洲精品一区二区| 亚洲一区二区三区不卡国产欧美| 91久久精品一区二区二区| 18成人在线观看| 91视频国产资源| 亚洲精品老司机| 欧美探花视频资源| 亚洲v精品v日韩v欧美v专区| 欧美日韩精品一区二区三区蜜桃| 亚洲第一成年网| 久久精品99国产精品日本| 日韩一区二区三| 欧美日本一区二区三区四区| 亚洲成a人片在线不卡一二三区| 在线免费亚洲电影| 午夜精品福利久久久| 91精品在线麻豆| 九九热在线视频观看这里只有精品| 欧美一区二区三区爱爱| 久久精品久久精品| 26uuu久久天堂性欧美| 国产在线视视频有精品| 国产农村妇女毛片精品久久麻豆| 成人免费精品视频| 夜夜嗨av一区二区三区中文字幕| zzijzzij亚洲日本少妇熟睡| 一区二区成人在线视频| 欧美日韩美女一区二区| 欧美aaa在线| 国产欧美日韩三级| 91毛片在线观看| 亚洲v日本v欧美v久久精品| 91精品国产综合久久婷婷香蕉 | 日韩欧美一区中文| 国产一区二区三区久久悠悠色av| 国产精品网站在线| 欧美在线一区二区| 老司机精品视频在线| 国产欧美日韩不卡| 欧美日韩在线播放三区四区| 6080午夜不卡| 久久免费精品国产久精品久久久久| 日韩一区二区免费在线观看| 精品一区二区三区欧美| 中文字幕精品三区| 欧美日韩免费视频| 加勒比av一区二区| 亚洲欧美日韩在线| 91精品婷婷国产综合久久性色 | 久久久噜噜噜久久人人看| 色综合天天做天天爱| 另类专区欧美蜜桃臀第一页| 国产精品久久久久久久久晋中 | 日本中文字幕一区二区视频| 久久精品视频免费观看| 91久久一区二区| 国产美女av一区二区三区| 亚洲一二三专区| 久久精品夜色噜噜亚洲aⅴ| 日本福利一区二区| 国产九九视频一区二区三区| 亚洲成av人片www| 国产精品成人网| 日韩欧美在线观看一区二区三区| av高清不卡在线| 激情六月婷婷综合| 亚洲一二三级电影| 国产精品免费视频一区| 91精品国产综合久久福利软件| 色哟哟一区二区三区| 精品国产在天天线2019| 精品第一国产综合精品aⅴ| 免费观看日韩av| 亚洲欧美日韩人成在线播放| 久久综合999| 在线观看视频一区二区| 国产成人综合在线观看| 日本sm残虐另类| 亚洲精品视频在线看| 国产欧美一区二区精品久导航 | 亚洲日本一区二区| 国产亚洲一区二区在线观看| 欧美视频一区在线观看| 国产高清在线精品| 蜜臀精品久久久久久蜜臀| 一区二区三区精品在线| 国产精品久久一卡二卡| 久久综合久久鬼色| 欧美电影免费提供在线观看| 欧美色手机在线观看| 91蜜桃在线观看| av激情亚洲男人天堂| 国产成人8x视频一区二区| 蜜臀av亚洲一区中文字幕| 性做久久久久久久久| 亚洲午夜电影网| ㊣最新国产の精品bt伙计久久| 久久久午夜精品理论片中文字幕| 日韩一区国产二区欧美三区| 欧美日韩一区中文字幕| 91精品办公室少妇高潮对白| 99国产精品久| 中文字幕一区视频| 一本大道综合伊人精品热热| 制服丝袜激情欧洲亚洲| 色欧美乱欧美15图片| 91丨国产丨九色丨pron| 99热99精品| av不卡一区二区三区| 99re热这里只有精品免费视频| 国产99精品在线观看| 国产91对白在线观看九色| 国产精品资源在线观看| 国产精品资源在线看| 国产成人午夜精品影院观看视频| 国产乱码精品一区二区三区av| 激情六月婷婷综合| 国产一区二区精品久久91| 国产精品1区2区3区在线观看| 久久激五月天综合精品| 国内精品第一页| 懂色av噜噜一区二区三区av| av一区二区三区| 欧美亚洲愉拍一区二区| 欧美日本不卡视频| 欧美电影免费观看高清完整版| 精品国产免费视频| 中日韩免费视频中文字幕| 亚洲视频综合在线| 午夜电影网一区| 精品一区二区三区日韩|