bool GWindow::Attach(GViewI *p) { bool Status = false; ThreadCheck(); { // Do a rough layout of child windows Pour(); // Setup default button... if (!_Default) { _Default = FindControl(IDOK); } if (_Default) { _Default->Invalidate(); } // Call on create OnCreate(); // Add icon if (d->Icon) { SetIcon(d->Icon); d->Icon.Empty(); } Status = true; } return Status; }
void ThreadHandleResponse (int fd) { struct thread *t; /* wait for any child process to free up */ while (freelist == NULL) { ThreadCheck (); sched_yield(); } // remove thread structure from freelist t = freelist; freelist = t->next; if (t->next) t->next->prev = NULL; t->prev = NULL; // add thread structure to worklist t->next = worklist; if (t->next) t->next->prev = t; t->prev = NULL; worklist = t; // setup thread and run it t->fd = fd; t->Running = 1; }
void GWindow::SetZoom(GWindowZoom i) { if (Wnd) { ThreadCheck(); } }
bool GWindow::SetPos(GRect &p, bool Repaint) { Pos = p; if (Wnd) { ThreadCheck(); } return true; }
bool GWindow::Name(const char *n) { if (Wnd) { ThreadCheck(); } return GBase::Name(n); }
main() { printf("Testing OS abstraction layer\n"); printf("============================\n"); // System init TEST_OK("os_init", os_init()); AllocatorCheck(); TimerCheck(); ThreadCheck(); EventCheck(); EventCheck2(); }
void GWindow::Visible(bool i) { ThreadCheck(); GView::Visible(i); }