54 #ifdef CHECK_MEMORY_LEAKS
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 ::write(event[
PIPE_WRITE], &seltype,
sizeof(seltype));
117 void FXThreadEvent::signal(FXuint seltype) {
119 ::write(event[
PIPE_WRITE], &seltype,
sizeof(seltype));
129 long FXThreadEvent::onThreadSignal(
FXObject*, FXSelector,
void*) {
132 ::read(event[
PIPE_READ], &seltype,
sizeof(seltype));
136 handle(
this, FXSEL(seltype, 0), NULL);
142 long FXThreadEvent::onThreadEvent(
FXObject*, FXSelector sel,
void*) {
143 FXuint seltype = FXSELTYPE(sel);
144 return target && target->handle(
this, FXSEL(seltype, message), NULL);
FXInputHandle * FXThreadEventHandle
#define UNUSED_PARAMETER(x)
ID for message passing between threads.
FXDEFMAP(FXRealSpinDialDial) FXSpinDialMap[]