Ejemplo n.º 1
0
//-------------------------------------------------------------------------
//
//
//-------------------------------------------------------------------------
NS_METHOD nsToolkit::Init(PRThread *aThread)
{
#ifdef DEBUG
  printf("TKInit\n");
#endif
  Kill();
  // Store the thread ID of the thread containing the message pump.  
  // If no thread is provided create one
  if (NULL != aThread) 
  {
    mGuiThread = aThread;
    localthread = false;
  } 
  else 
  {
    localthread = true;
    // create a thread where the message pump will run
    CreateUIThread();
  }

  cached = false;

  nsWidgetAtoms::RegisterAtoms();

  return NS_OK;
}
Ejemplo n.º 2
0
//-------------------------------------------------------------------------
//
//
//-------------------------------------------------------------------------
NS_METHOD nsToolkit::Init(PRThread *aThread)
{
    // Store the thread ID of the thread containing the message pump.  
    // If no thread is provided create one
    if (NULL != aThread) {
        CreateInternalWindow(aThread);
    } else {
        // create a thread where the message pump will run
        CreateUIThread();
    }

    nsWidgetAtoms::RegisterAtoms();

    return NS_OK;
}
Ejemplo n.º 3
0
//-------------------------------------------------------------------------
//
//
//-------------------------------------------------------------------------
NS_METHOD nsToolkit::Init(PRThread *aThread)
{
  Kill();

  // Store the thread ID of the thread containing the message pump.  
  // If no thread is provided create one
  if (NULL != aThread) 
  {
    mGuiThread = aThread;
    localthread = false;
  } 
  else 
  {
    localthread = true;

    // create a thread where the message pump will run
    CreateUIThread();
  }

  cached = false;
  image_info iinfo;
  int32 cookie = 0;
  char *leaf = NULL;
  do {
    if (get_next_image_info(0, &cookie, &iinfo) == B_OK &&
        strlen(iinfo.name) > 0 &&
        (leaf = strrchr(iinfo.name, '/')) != NULL)
    {
      leaf++;
      mGUIThreadID = find_thread(leaf);
    }
    else
    {
      mGUIThreadID = find_thread(0);
    } 
  } while(iinfo.type != B_APP_IMAGE);
  return NS_OK;
}
Ejemplo n.º 4
0
//-------------------------------------------------------------------------
//
//
//-------------------------------------------------------------------------
NS_METHOD nsToolkit::Init(PRThread *aThread)
{
  Kill();

  // Store the thread ID of the thread containing the message pump.  
  // If no thread is provided create one
  if (NULL != aThread) 
  {
    mGuiThread = aThread;
    localthread = false;
  } 
  else 
  {
    localthread = true;

    // create a thread where the message pump will run
    CreateUIThread();
  }

  cached = false;

  return NS_OK;
}
Ejemplo n.º 5
0
void MfcProcess::CreateThreads()
{
	CreateUIThread();
	CreateFileThread();
	CreateIOThread();
}