idler.cpp
来自「做为linux下图形用户界面支持系统之一的MicroWindows采用C++设计」· C++ 代码 · 共 49 行
CPP
49 行
//
// Micro Windows Implementation
// idler.h: the Idler
//
// $Revision: 1.2 $
// $Source: P:/MWINDOWS/LIB/rcs/idler.cpp $
// $Date: 1993/11/27 09:53:32 $
//
// when the message queue is empty, idler sends messages
// to its appliers.
#include "idler.h"
#include "global.h"
void Idler::apply (View *applier)
{
applierList.put (applier);
}
void Idler::remove (View *applier)
{
View *obj = (View*)applierList.first();
do
{
if (obj == NULL) break;
if (obj == applier) applierList.remove ();
obj = (View*)applierList.next();
} while (1);
msgqueue->removeBy (this, applier);
}
void Idler::pool (MessageQueue *queue)
{
if (queue->isEmpty() == FALSE) return;
View *obj = (View*)applierList.first ();
do
{
if (obj == NULL) break;
queue->put (NULL, obj, this);
obj = (View*)applierList.next ();
} while (1);
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?