54 #ifdef CHECK_MEMORY_LEAKS
70 FXMAPTYPE(0, FXThreadEvent::onThreadEvent),
71 FXMAPFUNC(
SEL_THREAD, 0, FXThreadEvent::onThreadEvent),
80 FXint res = pipe(event);
84 event = CreateEvent(NULL, FALSE, FALSE, NULL);
85 FXASSERT(event != NULL);
91 FXThreadEvent::~FXThreadEvent() {
93 getApp()->removeInput(event[
PIPE_READ], INPUT_READ);
94 ::close(event[PIPE_READ]);
98 getApp()->removeInput(event, INPUT_READ);
105 void FXThreadEvent::signal() {
108 ::write(event[
PIPE_WRITE], &seltype,
sizeof(seltype));
116 void FXThreadEvent::signal(FXuint seltype) {
118 ::write(event[
PIPE_WRITE], &seltype,
sizeof(seltype));
128 long FXThreadEvent::onThreadSignal(
FXObject*, FXSelector,
void*) {
131 ::read(event[
PIPE_READ], &seltype,
sizeof(seltype));
135 handle(
this, FXSEL(seltype, 0), NULL);
141 long FXThreadEvent::onThreadEvent(
FXObject*, FXSelector sel,
void*) {
142 FXuint seltype = FXSELTYPE(sel);
143 return target && target->handle(
this, FXSEL(seltype, message), NULL);
FXInputHandle * FXThreadEventHandle
#define UNUSED_PARAMETER(x)
ID for message passing between threads.
FXDEFMAP(FXRealSpinDialDial) FXSpinDialMap[]