64 FXMAPTYPE(0, FXThreadEvent::onThreadEvent),
65 FXMAPFUNC(
SEL_THREAD, 0, FXThreadEvent::onThreadEvent),
74 FXint res = pipe(event);
79 event = CreateEvent(
nullptr, FALSE, FALSE,
nullptr);
80 FXASSERT(event != NULL);
86 FXThreadEvent::~FXThreadEvent() {
88 getApp()->removeInput(event[
PIPE_READ], INPUT_READ);
93 getApp()->removeInput(event, INPUT_READ);
100 void FXThreadEvent::signal() {
103 FXint res = ::write(event[
PIPE_WRITE], &seltype,
sizeof(seltype));
112 void FXThreadEvent::signal(FXuint seltype) {
114 FXint res = ::write(event[
PIPE_WRITE], &seltype,
sizeof(seltype));
125 long FXThreadEvent::onThreadSignal(FXObject*, FXSelector,
void*) {
128 FXint res = ::read(event[
PIPE_READ], &seltype,
sizeof(seltype));
133 handle(
this, FXSEL(seltype, 0),
nullptr);
139 long FXThreadEvent::onThreadEvent(FXObject*, FXSelector sel,
void*) {
140 FXuint seltype = FXSELTYPE(sel);
141 return target && target->handle(
this, FXSEL(seltype, message),
nullptr);