Team Fortress 2 Source Code as on 22/4/2020
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

79 lines
2.3 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose: Basic header for using vgui
  4. //
  5. // $NoKeywords: $
  6. //=============================================================================//
  7. #ifndef VGUI_H
  8. #define VGUI_H
  9. #ifdef _WIN32
  10. #pragma once
  11. #endif
  12. #define null 0L
  13. #ifndef NULL
  14. #ifdef __cplusplus
  15. #define NULL 0
  16. #else
  17. #define NULL ((void *)0)
  18. #endif
  19. #endif
  20. #pragma warning( disable: 4800 ) // disables 'performance warning converting int to bool'
  21. #pragma warning( disable: 4786 ) // disables 'identifier truncated in browser information' warning
  22. #pragma warning( disable: 4355 ) // disables 'this' : used in base member initializer list
  23. #pragma warning( disable: 4097 ) // warning C4097: typedef-name 'BaseClass' used as synonym for class-name
  24. #pragma warning( disable: 4514 ) // warning C4514: 'Color::Color' : unreferenced inline function has been removed
  25. #pragma warning( disable: 4100 ) // warning C4100: 'code' : unreferenced formal parameter
  26. #pragma warning( disable: 4127 ) // warning C4127: conditional expression is constant
  27. typedef unsigned char uchar;
  28. typedef unsigned short ushort;
  29. typedef unsigned int uint;
  30. typedef unsigned long ulong;
  31. #ifndef _WCHAR_T_DEFINED
  32. // DAL - wchar_t is a built in define in gcc 3.2 with a size of 4 bytes
  33. #if !defined( __x86_64__ ) && !defined( __WCHAR_TYPE__ )
  34. typedef unsigned short wchar_t;
  35. #define _WCHAR_T_DEFINED
  36. #endif
  37. #endif
  38. // do this in GOLDSRC only!!!
  39. //#define Assert assert
  40. namespace vgui
  41. {
  42. // handle to an internal vgui panel
  43. // this is the only handle to a panel that is valid across dll boundaries
  44. typedef unsigned int VPANEL;
  45. // handles to vgui objects
  46. // NULL values signify an invalid value
  47. typedef unsigned long HScheme;
  48. // Both -1 and 0 are used for invalid textures. Be careful.
  49. typedef unsigned long HTexture;
  50. typedef unsigned long HCursor;
  51. typedef unsigned long HPanel;
  52. const HPanel INVALID_PANEL = 0xffffffff;
  53. typedef unsigned long HFont;
  54. const HFont INVALID_FONT = 0; // the value of an invalid font handle
  55. }
  56. #include "tier1/strtools.h"
  57. #if 0 // defined( OSX ) // || defined( LINUX )
  58. // Disabled all platforms. Did a major cleanup of osxfont.cpp, and having this
  59. // turned off renders much closer to Windows and Linux and also uses the same
  60. // code paths (which is good).
  61. #define USE_GETKERNEDCHARWIDTH 1
  62. #else
  63. #define USE_GETKERNEDCHARWIDTH 0
  64. #endif
  65. #endif // VGUI_H