Counter Strike : Global Offensive Source Code
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.

53 lines
1.1 KiB

  1. //========= Copyright, Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. // $NoKeywords: $
  6. //=============================================================================//
  7. #ifndef IPAINTHTML_H
  8. #define IPAINTHTML_H
  9. class IPaintHTML
  10. {
  11. public:
  12. enum EPaintTarget
  13. {
  14. ePaintBrowser,
  15. ePaintPopup,
  16. ePaintMAX
  17. };
  18. // returns the texture id used, pass in -1 to create a new texture
  19. virtual int DrawSubTextureRGBA( EPaintTarget eTarget, int textureID, int x, int y, const unsigned char *pRGBA, int wide, int tall ) = 0;
  20. virtual void DeleteTexture( EPaintTarget eTarget, int textureID ) = 0;
  21. };
  22. class IInputEventHTML
  23. {
  24. public:
  25. enum EMouseButton
  26. {
  27. eButtonLeft,
  28. eButtonMiddle,
  29. eButtonRight
  30. };
  31. virtual bool ChromeHandleMouseClick( EMouseButton eButton, bool bUp, int nClickCount ) = 0;
  32. virtual bool ChromeHandleMouseMove( int x, int y ) = 0;
  33. virtual bool ChromeHandleMouseWheel( int delta ) = 0;
  34. enum EKeyType
  35. {
  36. KeyDown,
  37. KeyUp,
  38. Char
  39. };
  40. enum EKeyModifier
  41. {
  42. AltDown = 1,
  43. CrtlDown = 2,
  44. ShiftDown = 4,
  45. };
  46. virtual bool ChromeHandleKeyEvent( EKeyType type, int key, int modifiers, bool bKeyUp ) = 0;
  47. };
  48. #endif // IPAINTHTML_H