tb_core.h 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. /** @mainpage Turbo Badger - Fast UI toolkit
  2. Turbo Badger
  3. Copyright (C) 2011-2014 Emil Segerås
  4. License:
  5. This software is provided 'as-is', without any express or implied
  6. warranty. In no event will the authors be held liable for any damages
  7. arising from the use of this software.
  8. Permission is granted to anyone to use this software for any purpose,
  9. including commercial applications, and to alter it and redistribute it
  10. freely, subject to the following restrictions:
  11. 1. The origin of this software must not be misrepresented; you must not
  12. claim that you wrote the original software. If you use this software
  13. in a product, an acknowledgment in the product documentation would be
  14. appreciated but is not required.
  15. 2. Altered source versions must be plainly marked as such, and must not be
  16. misrepresented as being the original software.
  17. 3. This notice may not be removed or altered from any source
  18. distribution.
  19. */
  20. #ifndef TB_CORE_H
  21. #define TB_CORE_H
  22. #include "tb_types.h"
  23. #include "tb_hash.h"
  24. #include "tb_debug.h"
  25. #define TB_VERSION_MAJOR 0
  26. #define TB_VERSION_MINOR 1
  27. #define TB_VERSION_REVISION 1
  28. #define TB_VERSION_STR "0.1.1"
  29. namespace tb {
  30. class TBRenderer;
  31. class TBSkin;
  32. class TBWidgetsReader;
  33. class TBLanguage;
  34. class TBFontManager;
  35. extern TBRenderer *g_renderer;
  36. extern TBSkin *g_tb_skin;
  37. extern TBWidgetsReader *g_widgets_reader;
  38. extern TBLanguage *g_tb_lng;
  39. extern TBFontManager *g_font_manager;
  40. /** Initialize turbo badger. Call this before using any turbo badger API. */
  41. bool tb_core_init(TBRenderer *renderer, const char *lng_file);
  42. /** Shutdown turbo badger. Call this after deleting the last widget, to free turbo badger internals. */
  43. void tb_core_shutdown();
  44. /** Returns true if turbo badger is initialized. */
  45. bool tb_core_is_initialized();
  46. }; // namespace tb
  47. #endif // TB_CORE_H