70 FXMAPTYPE(0, FXThreadEvent::onThreadEvent),
71 FXMAPFUNC(
SEL_THREAD, 0, FXThreadEvent::onThreadEvent),
80 FXint res = pipe(event);
85 event = CreateEvent(NULL, FALSE, FALSE, NULL);
86 FXASSERT(event != NULL);
92 FXThreadEvent::~FXThreadEvent() {
94 getApp()->removeInput(event[
PIPE_READ], INPUT_READ);
95 ::close(event[PIPE_READ]);
99 getApp()->removeInput(event, INPUT_READ);
100 ::CloseHandle(event);
106 void FXThreadEvent::signal() {
109 FXint res = ::write(event[
PIPE_WRITE], &seltype,
sizeof(seltype));
118 void FXThreadEvent::signal(FXuint seltype) {
120 FXint res = ::write(event[
PIPE_WRITE], &seltype,
sizeof(seltype));
131 long FXThreadEvent::onThreadSignal(FXObject*, FXSelector,
void*) {
134 FXint res = ::read(event[
PIPE_READ], &seltype,
sizeof(seltype));
139 handle(
this, FXSEL(seltype, 0), NULL);
145 long FXThreadEvent::onThreadEvent(FXObject*, FXSelector sel,
void*) {
146 FXuint seltype = FXSELTYPE(sel);
147 return target && target->handle(
this, FXSEL(seltype, message), NULL);
FXInputHandle * FXThreadEventHandle
#define UNUSED_PARAMETER(x)
ID for message passing between threads.
FXDEFMAP(FXRealSpinDialDial) FXSpinDialMap[]