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

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

?? qeventdispatcher_glib.cpp

?? QT 開發環境里面一個很重要的文件
?? CPP
?? 第 1 頁 / 共 2 頁
字號:
/******************************************************************************** Copyright (C) 1992-2006 Trolltech ASA. All rights reserved.**** This file is part of the QtCore module of the Qt Toolkit.**** This file may be used under the terms of the GNU General Public** License version 2.0 as published by the Free Software Foundation** and appearing in the file LICENSE.GPL included in the packaging of** this file.  Please review the following information to ensure GNU** General Public Licensing requirements will be met:** http://www.trolltech.com/products/qt/opensource.html**** If you are unsure which license is appropriate for your use, please** review the following information:** http://www.trolltech.com/products/qt/licensing.html or contact the** sales department at sales@trolltech.com.**** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.******************************************************************************/#include "qeventdispatcher_glib_p.h"#include "qeventdispatcher_unix_p.h"#include <private/qthread_p.h>#include "qcoreapplication.h"#include "qsocketnotifier.h"#include <QtCore/qhash.h>#include <QtCore/qlist.h>#include <QtCore/qpair.h>#include <glib.h>struct GPollFDWithQSocketNotifier{    GPollFD pollfd;    QSocketNotifier *socketNotifier;};struct GSocketNotifierSource{    GSource source;    QList<GPollFDWithQSocketNotifier *> pollfds;};static gboolean socketNotifierSourcePrepare(GSource *, gint *timeout){    if (timeout)        *timeout = -1;    return false;}static gboolean socketNotifierSourceCheck(GSource *source){    GSocketNotifierSource *src = reinterpret_cast<GSocketNotifierSource *>(source);    bool pending = false;    for (int i = 0; !pending && i < src->pollfds.count(); ++i) {        GPollFDWithQSocketNotifier *p = src->pollfds.at(i);        if (p->pollfd.revents & G_IO_NVAL) {            // disable the invalid socket notifier            static const char *t[] = { "Read", "Write", "Exception" };            qWarning("QSocketNotifier: Invalid socket %d and type '%s', disabling...",                     p->pollfd.fd, t[int(p->socketNotifier->type())]);            // ### note, modifies src->pollfds!            p->socketNotifier->setEnabled(false);        }        pending = ((p->pollfd.revents & p->pollfd.events) != 0);    }    return pending;}static gboolean socketNotifierSourceDispatch(GSource *source, GSourceFunc, gpointer){    QEvent event(QEvent::SockAct);    GSocketNotifierSource *src = reinterpret_cast<GSocketNotifierSource *>(source);    for (int i = 0; i < src->pollfds.count(); ++i) {        GPollFDWithQSocketNotifier *p = src->pollfds.at(i);        if ((p->pollfd.revents & p->pollfd.events) != 0)            QCoreApplication::sendEvent(p->socketNotifier, &event);    }    return true; // ??? don't remove, right?}static GSourceFuncs socketNotifierSourceFuncs = {    socketNotifierSourcePrepare,    socketNotifierSourceCheck,    socketNotifierSourceDispatch,    NULL,    NULL,    NULL};struct GTimerSource{    GSource source;    QTimerInfoList timerList;};static gboolean timerSourcePrepare(GSource *source, gint *timeout){    gint dummy;    if (!timeout)        timeout = &dummy;    GTimerSource *src = reinterpret_cast<GTimerSource *>(source);    timeval tv = { 0l, 0l };    if (src->timerList.timerWait(tv))        *timeout = (tv.tv_sec * 1000) + (tv.tv_usec / 1000);    else        *timeout = -1;    return false;}static gboolean timerSourceCheck(GSource *source){    GTimerSource *src = reinterpret_cast<GTimerSource *>(source);    if (src->timerList.isEmpty())        return false;    timeval currentTime;    getTime(currentTime);    if (currentTime < src->timerList.first()->timeout)        return false;    return true;}static gboolean timerSourceDispatch(GSource *source, GSourceFunc, gpointer){    GTimerSource *src = reinterpret_cast<GTimerSource *>(source);    bool first = true;    timeval currentTime;    int n_act = 0, maxCount = src->timerList.size();    QTimerInfo *begin = 0;    while (maxCount--) {        getTime(currentTime);        if (first) {            src->timerList.updateWatchTime(currentTime);            first = false;        }        if (src->timerList.isEmpty())            break;        QTimerInfo *t = src->timerList.first();        if (currentTime < t->timeout)            break; // no timer has expired        if (!begin) {            begin = t;        } else if (begin == t) {            // avoid sending the same timer multiple times            break;        } else if (t->interval <  begin->interval || t->interval == begin->interval) {            begin = t;        }        // remove from list        src->timerList.removeFirst();        t->timeout += t->interval;        if (t->timeout < currentTime)            t->timeout = currentTime + t->interval;        // reinsert timer        src->timerList.timerInsert(t);        if (t->interval.tv_usec > 0 || t->interval.tv_sec > 0)            n_act++;        if (!t->inTimerEvent) {            // send event, but don't allow it to recurse            t->inTimerEvent = true;            QTimerEvent e(t->id);            QCoreApplication::sendEvent(t->obj, &e);            if (src->timerList.contains(t))                t->inTimerEvent = false;        }        if (!src->timerList.contains(begin))            begin = 0;    }    return true; // ??? don't remove, right again?}static GSourceFuncs timerSourceFuncs = {    timerSourcePrepare,    timerSourceCheck,    timerSourceDispatch,    NULL,    NULL,    NULL};struct GPostEventSource{    GSource source;    GPollFD pollfd;    int wakeUpPipe[2];    QEventLoop::ProcessEventsFlags flags, previousFlags;};static gboolean postEventSourcePrepare(GSource *s, gint *timeout){    QThreadData *data = QThreadData::current();    if (!data)        return false;    gint dummy;    if (!timeout)        timeout = &dummy;    *timeout = data->canWait ? -1 : 0;    GPostEventSource *source = reinterpret_cast<GPostEventSource *>(s);    return (!data->canWait            || (source->flags != source->previousFlags));}static gboolean postEventSourceCheck(GSource *source){    return (postEventSourcePrepare(source, 0)            || reinterpret_cast<GPostEventSource *>(source)->pollfd.revents != 0);}static gboolean postEventSourceDispatch(GSource *s, GSourceFunc, gpointer){    GPostEventSource *source = reinterpret_cast<GPostEventSource *>(s);    char c[16];    while (::read(source->wakeUpPipe[0], c, sizeof(c)) > 0)        ;    source->previousFlags = source->flags;    QCoreApplication::sendPostedEvents(0, (source->flags & QEventLoop::DeferredDeletion) ? -1 : 0);    return true; // i dunno, george...}static GSourceFuncs postEventSourceFuncs = {    postEventSourcePrepare,    postEventSourceCheck,    postEventSourceDispatch,    NULL,    NULL,    NULL};QEventDispatcherGlibPrivate::QEventDispatcherGlibPrivate(){    QCoreApplication *app = QCoreApplication::instance();    if (app && QThread::currentThread() == app->thread()) {        mainContext = g_main_context_default();        g_main_context_ref(mainContext);    } else {        mainContext = g_main_context_new();    }    postEventSource = reinterpret_cast<GPostEventSource *>(g_source_new(&postEventSourceFuncs,                                                                        sizeof(GPostEventSource)));    g_source_set_can_recurse(&postEventSource->source, true);    pipe(postEventSource->wakeUpPipe);    fcntl(postEventSource->wakeUpPipe[0], F_SETFD, FD_CLOEXEC);    fcntl(postEventSource->wakeUpPipe[1], F_SETFD, FD_CLOEXEC);    fcntl(postEventSource->wakeUpPipe[0], F_SETFL,          fcntl(postEventSource->wakeUpPipe[0], F_GETFL) | O_NONBLOCK);

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久99精品视频| 香蕉av福利精品导航| 国产黄色成人av| 中文av一区特黄| 91日韩精品一区| 午夜精品久久久久久久久久 | 五月婷婷色综合| 欧美精品视频www在线观看 | 国产一区二区三区四| 国产女主播视频一区二区| 成人深夜在线观看| 亚洲午夜一区二区三区| 欧美一级日韩免费不卡| 国产呦萝稀缺另类资源| 中文字幕一区二区三区在线播放 | 精品一区二区三区视频在线观看| 精品国产伦理网| 成人午夜免费视频| 亚洲伊人色欲综合网| 日韩免费看的电影| 成人国产精品免费观看动漫| 一区二区三区中文免费| 91精品国产一区二区三区香蕉| 国产福利一区二区三区在线视频| 依依成人综合视频| 久久噜噜亚洲综合| 一本色道亚洲精品aⅴ| 免费高清在线视频一区·| 欧美经典一区二区三区| 欧美三区在线视频| 国内精品不卡在线| 亚洲一区二区在线免费观看视频| 日韩欧美高清在线| 日本精品免费观看高清观看| 精久久久久久久久久久| 一二三区精品视频| 久久久国际精品| 91麻豆精品国产自产在线| 成人污视频在线观看| 蜜臀99久久精品久久久久久软件| 亚洲视频一二三区| 欧美经典一区二区三区| 日韩一区二区精品在线观看| 色综合一区二区| 国产精品99久久久久久久vr| 天天综合日日夜夜精品| 亚洲免费在线视频| 国产欧美日韩麻豆91| 日韩精品一区二区三区三区免费| 一本大道久久a久久精二百| 国产精品一区二区在线观看不卡 | 日韩欧美国产一二三区| 欧美私模裸体表演在线观看| 成人app在线| 国产精品香蕉一区二区三区| 欧美aaa在线| 丝袜美腿亚洲色图| 亚洲国产综合人成综合网站| 国产精品白丝在线| 国产精品入口麻豆九色| 久久嫩草精品久久久精品一| 91精品国产色综合久久不卡电影| 在线观看一区不卡| 色综合久久综合中文综合网| jlzzjlzz亚洲日本少妇| 成人性生交大片免费| 国产在线乱码一区二区三区| 蜜臀av性久久久久蜜臀aⅴ四虎| 亚洲18女电影在线观看| 亚洲3atv精品一区二区三区| 亚洲午夜激情网页| 亚洲www啪成人一区二区麻豆| 伊人色综合久久天天人手人婷| 亚洲欧洲av另类| 国产精品伦理在线| 中文字幕一区三区| 中文字幕一区二区三区不卡在线| 国产精品进线69影院| 国产精品女主播在线观看| 国产精品日韩成人| 中文字幕一区二区三| 亚洲人成亚洲人成在线观看图片| 亚洲欧美日韩国产一区二区三区| 亚洲另类色综合网站| 夜夜嗨av一区二区三区| 午夜欧美电影在线观看| 免费精品视频在线| 国产成人免费在线视频| 9色porny自拍视频一区二区| 97se亚洲国产综合在线| 欧美在线一二三四区| 欧美美女bb生活片| 精品国产乱码久久久久久蜜臀| 精品国产免费久久| 久久精品视频网| 亚洲人吸女人奶水| 亚洲国产精品精华液网站| 日韩av不卡在线观看| 国产一区啦啦啦在线观看| 丁香天五香天堂综合| 色悠悠久久综合| 日韩一级精品视频在线观看| 国产丝袜欧美中文另类| 亚洲黄色av一区| 老司机午夜精品| 成人免费视频免费观看| 在线免费观看不卡av| 日韩视频免费观看高清完整版在线观看 | 蜜桃av噜噜一区| 国产suv一区二区三区88区| 91福利在线播放| 久久综合久久综合亚洲| 国产精品国模大尺度视频| 天堂在线亚洲视频| 丁香天五香天堂综合| 欧美日韩在线三区| 久久精品人人做人人爽人人| 亚洲男人的天堂在线aⅴ视频| 日本不卡免费在线视频| av在线一区二区| 日韩女优视频免费观看| 亚洲素人一区二区| 国产乱子伦视频一区二区三区| 一本色道亚洲精品aⅴ| 久久综合色8888| 婷婷久久综合九色国产成人 | 激情五月婷婷综合| 91丨porny丨国产入口| 欧美成va人片在线观看| 亚洲一区中文在线| heyzo一本久久综合| 欧美xxxx老人做受| 午夜精品久久久久久久蜜桃app| 成人福利视频网站| 日韩精品在线一区| 天天做天天摸天天爽国产一区| 成人av在线资源网站| 欧美xxxxx裸体时装秀| 亚洲不卡一区二区三区| 色菇凉天天综合网| 亚洲国产成人自拍| 国产一区二区三区四区五区美女| 欧美一区二区在线看| 亚洲伊人色欲综合网| 色综合久久久久综合99| 欧美激情一区二区三区| 国产乱子轮精品视频| 日韩丝袜情趣美女图片| 亚洲va韩国va欧美va精品 | 欧美性videosxxxxx| 国产精品二区一区二区aⅴ污介绍| 黄色日韩三级电影| 日韩欧美一卡二卡| 免费黄网站欧美| 91精品国产综合久久久久| 亚洲国产精品久久一线不卡| 日本电影亚洲天堂一区| 亚洲婷婷在线视频| 91麻豆精品在线观看| 国产精品国产自产拍在线| 成人免费高清在线| 中文字幕第一区第二区| 成人精品免费视频| 国产精品剧情在线亚洲| 成人免费毛片片v| 亚洲欧洲精品一区二区精品久久久| 国产一区二区三区最好精华液| 欧美成人猛片aaaaaaa| 精品一区二区日韩| 精品欧美一区二区三区精品久久| 老司机精品视频一区二区三区| 91精品国产欧美一区二区成人| 天天av天天翘天天综合网| 7777精品伊人久久久大香线蕉的 | 激情另类小说区图片区视频区| 精品久久久网站| 国产91清纯白嫩初高中在线观看 | 日韩一区二区三区av| 麻豆精品新av中文字幕| 精品国产123| 国产精品18久久久久久vr| 久久免费偷拍视频| 菠萝蜜视频在线观看一区| 亚洲欧美日韩中文字幕一区二区三区| 91捆绑美女网站| 亚洲午夜激情网站| 精品欧美一区二区久久| 成人综合在线网站| 亚洲免费观看高清完整版在线观看 | 国产精品青草久久| 一本一道久久a久久精品综合蜜臀 一本一道综合狠狠老 | 美女精品自拍一二三四| 亚洲精品一区二区三区99| 成人黄色在线网站| 亚洲大片一区二区三区| 欧美刺激午夜性久久久久久久| 成人黄色网址在线观看| 亚洲图片一区二区| 久久精品视频免费观看| 色综合久久综合|