63 FXMAPTYPE(0, FXThreadEvent::onThreadEvent),
64 FXMAPFUNC(
SEL_THREAD, 0, FXThreadEvent::onThreadEvent),
73 FXint res = pipe(event);
78 event = CreateEvent(
nullptr, FALSE, FALSE,
nullptr);
79 FXASSERT(event != NULL);
85 FXThreadEvent::~FXThreadEvent() {
87 getApp()->removeInput(event[
PIPE_READ], INPUT_READ);
92 getApp()->removeInput(event, INPUT_READ);
99 void FXThreadEvent::signal() {
102 FXint res = ::write(event[
PIPE_WRITE], &seltype,
sizeof(seltype));
111 void FXThreadEvent::signal(FXuint seltype) {
113 FXint res = ::write(event[
PIPE_WRITE], &seltype,
sizeof(seltype));
124 long FXThreadEvent::onThreadSignal(FXObject*, FXSelector,
void*) {
127 FXint res = ::read(event[
PIPE_READ], &seltype,
sizeof(seltype));
132 handle(
this, FXSEL(seltype, 0),
nullptr);
138 long FXThreadEvent::onThreadEvent(FXObject*, FXSelector sel,
void*) {
139 FXuint seltype = FXSELTYPE(sel);
140 return target && target->handle(
this, FXSEL(seltype, message),
nullptr);