示例#1
0
文件: GWindow.cpp 项目: FEI17N/Lgi
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;
}
示例#2
0
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;

}
示例#3
0
文件: GWindow.cpp 项目: FEI17N/Lgi
void GWindow::SetZoom(GWindowZoom i)
{
	if (Wnd)
	{
		ThreadCheck();

	}
}
示例#4
0
文件: GWindow.cpp 项目: FEI17N/Lgi
bool GWindow::SetPos(GRect &p, bool Repaint)
{
	Pos = p;
	if (Wnd)
	{
		ThreadCheck();
	}
	return true;
}
示例#5
0
文件: GWindow.cpp 项目: FEI17N/Lgi
bool GWindow::Name(const char *n)
{
	if (Wnd)
	{
		ThreadCheck();
	}

	return GBase::Name(n);
}
示例#6
0
main()
{
   printf("Testing OS abstraction layer\n");
   printf("============================\n");
   
   // System init
   TEST_OK("os_init", os_init());
   
   AllocatorCheck();
   
   TimerCheck();
   
   ThreadCheck();       
   
   EventCheck();

   EventCheck2();
}
示例#7
0
文件: GWindow.cpp 项目: FEI17N/Lgi
void GWindow::Visible(bool i)
{
	ThreadCheck();
	GView::Visible(i);
}