亚洲欧美第一页_禁久久精品乱码_粉嫩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一区二区三区免费野_久草精品视频
欧美在线观看禁18| av成人动漫在线观看| 日韩欧美一二区| 激情小说亚洲一区| 久久一区二区视频| 成人精品视频一区二区三区| 最好看的中文字幕久久| 一本久久综合亚洲鲁鲁五月天| 1000精品久久久久久久久| 色爱区综合激月婷婷| 日韩精品成人一区二区三区| 精品久久久久久无| 成人av一区二区三区| 亚洲午夜免费电影| 欧美大黄免费观看| 成人av手机在线观看| 一区二区三区在线观看视频| 91精品国产色综合久久不卡蜜臀| 激情久久五月天| 日本视频中文字幕一区二区三区| 欧美日韩国产在线播放网站| 免费在线观看一区| 国产三级精品三级在线专区| 99久久er热在这里只有精品15 | 欧美无人高清视频在线观看| 日本不卡1234视频| 日本一区二区三区电影| 欧美性生活影院| 国产成人在线电影| 天天操天天色综合| 亚洲国产精品ⅴa在线观看| 欧美三级电影在线看| 国内不卡的二区三区中文字幕 | 91精品福利在线一区二区三区| 久久爱另类一区二区小说| 国产精品国产自产拍高清av王其| 在线不卡中文字幕| 99在线热播精品免费| 麻豆一区二区三| 亚洲麻豆国产自偷在线| 久久久不卡网国产精品一区| 欧美美女一区二区三区| 国产.欧美.日韩| 日本亚洲天堂网| 亚洲精品成人a在线观看| 26uuuu精品一区二区| 欧美日韩你懂的| 99久久精品免费看| 国产一区不卡在线| 免费在线视频一区| 天天av天天翘天天综合网| 亚洲欧洲日韩一区二区三区| 26uuu成人网一区二区三区| 欧美日韩国产另类不卡| 91老师片黄在线观看| 成人永久aaa| 国产精品资源网站| 精品制服美女丁香| 日本大胆欧美人术艺术动态| 亚洲午夜电影在线| 亚洲一区二区在线播放相泽| 中文字幕精品一区二区三区精品 | 国产精品一区二区久久精品爱涩 | 久久综合色一综合色88| 91精品在线免费| 欧美网站大全在线观看| 91亚洲资源网| 一本色道久久综合精品竹菊| 99热99精品| 99这里都是精品| 99久久精品一区二区| 99国产精品一区| www.激情成人| av在线综合网| 91偷拍与自偷拍精品| av在线不卡电影| 99re热这里只有精品视频| 粉嫩aⅴ一区二区三区四区| 国产91精品欧美| 高清shemale亚洲人妖| 国产iv一区二区三区| 国产精品88av| 福利视频网站一区二区三区| 国产精品66部| 不卡一卡二卡三乱码免费网站| 国产91在线观看丝袜| 成人晚上爱看视频| 97成人超碰视| 欧美日韩在线播放一区| 欧美精品v国产精品v日韩精品| 欧美日韩高清一区| 欧美高清激情brazzers| 日韩久久久精品| 久久精品亚洲麻豆av一区二区| 日本一区二区免费在线| 亚洲色图另类专区| 亚洲一二三区在线观看| 免费人成精品欧美精品 | 国产精品久久久久永久免费观看 | 久久国产精品99久久人人澡| 国产在线精品一区二区不卡了| 国产精品一区三区| av一二三不卡影片| 欧美日韩一区二区在线观看| 欧美大尺度电影在线| 国产欧美一区二区三区在线看蜜臀| 国产精品欧美一区二区三区| 艳妇臀荡乳欲伦亚洲一区| 七七婷婷婷婷精品国产| 国产高清精品在线| 欧美性生活大片视频| 日韩欧美一级二级| 1024国产精品| 久久精品国产精品亚洲红杏| 成人av网址在线| 欧美一区二区三区免费大片| 欧美国产激情一区二区三区蜜月| 一区二区欧美国产| 麻豆精品视频在线观看视频| 99视频一区二区三区| 日韩精品中文字幕在线一区| 国产精品久久久久久久蜜臀| 日韩av二区在线播放| 成人激情校园春色| 欧美成人官网二区| 一区二区在线观看视频| 国产一区二区三区四区在线观看| 色老头久久综合| 久久久久久久久伊人| 日日摸夜夜添夜夜添国产精品| 成人性生交大合| 日韩午夜电影av| 亚洲激情图片一区| 国产1区2区3区精品美女| 欧美一区二区二区| 亚洲黄色在线视频| 成人天堂资源www在线| 日韩欧美久久久| 天天综合日日夜夜精品| 一本久久a久久免费精品不卡| 久久亚洲春色中文字幕久久久| 香蕉乱码成人久久天堂爱免费| 99re热这里只有精品免费视频| 国产亚洲精品精华液| 日韩**一区毛片| 欧美日韩视频在线一区二区| 亚洲伦理在线精品| 成人深夜福利app| 久久久99精品久久| 日本不卡免费在线视频| 欧美日韩一区二区三区在线看| ...av二区三区久久精品| 国产v综合v亚洲欧| www一区二区| 狠狠色丁香九九婷婷综合五月| 欧美一区二区大片| 日本欧美一区二区在线观看| 欧美精品三级日韩久久| 亚洲国产另类精品专区| 欧美日韩专区在线| 亚洲一区二区视频| 日本电影欧美片| 一区二区三区四区精品在线视频| 成人动漫中文字幕| 日韩一区在线看| 99久久久久久| 亚洲免费av高清| 在线看不卡av| 亚洲一区二区三区自拍| 欧美日韩精品专区| 五月天亚洲精品| 日韩无一区二区| 国内精品免费**视频| 久久久久久久网| 成人av在线资源网| 一级精品视频在线观看宜春院| 91蝌蚪porny九色| 亚洲超碰97人人做人人爱| 555www色欧美视频| 久久99国产精品尤物| 久久久不卡网国产精品二区| 成人久久视频在线观看| 亚洲男人电影天堂| 欧美日韩大陆一区二区| 久久精品99国产国产精| 国产日韩精品一区| 91色|porny| 秋霞午夜av一区二区三区| 久久亚洲精华国产精华液| 99精品在线观看视频| 亚洲一区二区三区视频在线播放| 欧美二区在线观看| 国产乱子伦一区二区三区国色天香| 中国色在线观看另类| 91豆麻精品91久久久久久| 国产一区二区中文字幕| 欧美高清在线一区二区| 在线看不卡av| 国产美女主播视频一区| 亚洲精品欧美综合四区|