Back to index

unity  6.0.0
Classes | Functions
StandaloneHud.cpp File Reference
#include <sstream>
#include "Nux/Nux.h"
#include "Nux/VLayout.h"
#include "Nux/Button.h"
#include "Nux/TextureArea.h"
#include "Nux/WindowThread.h"
#include "NuxGraphics/GraphicsEngine.h"
#include <gtk/gtk.h>
#include "HudView.h"
#include "unity-shared/DashStyle.h"
#include "unity-shared/UnitySettings.h"
#include <NuxCore/Logger.h>

Go to the source code of this file.

Classes

class  TestRunner

Functions

void ControlThread (nux::NThread *thread, void *data)
int main (int argc, char **argv)

Function Documentation

void ControlThread ( nux::NThread *  thread,
void *  data 
)

Definition at line 124 of file StandaloneHud.cpp.

{
  // sleep for 3 seconds
  nux::SleepForMilliseconds (3000);
  printf ("ControlThread successfully started\n");
}

Here is the caller graph for this function:

int main ( int  argc,
char **  argv 
)

Definition at line 133 of file StandaloneHud.cpp.

{
  nux::SystemThread* st = NULL;
  nux::WindowThread* wt = NULL;

  // no real tests right now, just make sure we don't get any criticals and such
  // waiting on nice perceptual diff support before we can build real tests
  // for views

  g_type_init ();
  gtk_init (&argc, &argv);

  nux::NuxInitialize(0);
  
  // Slightly higher as we're more likely to test things we know will fail
  nux::logging::configure_logging("unity.hud=debug");
  
  nux::logging::configure_logging(::getenv("UNITY_LOG_SEVERITY"));
  LOG_DEBUG(logger) << "starting the standalone hud";
  // The instances for the pseudo-singletons.
  unity::Settings settings;
  unity::dash::Style dash_style;

  TestRunner *test_runner = new TestRunner ();
  wt = nux::CreateGUIThread(TEXT("Hud Prototype Test"),
                            1200, 768,
                            0,
                            &TestRunner::InitWindowThread,
                            test_runner);

  st = nux::CreateSystemThread (NULL, ControlThread, wt);

  if (st)
    st->Start (NULL);

  wt->Run (NULL);
  delete st;
  delete wt;
  return 0;
}

Here is the call graph for this function: