SDL_shape.h 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. #ifndef _SDL_shape_h
  2. #define _SDL_shape_h
  3. #include "SDL_stdinc.h"
  4. #include "SDL_pixels.h"
  5. #include "SDL_rect.h"
  6. #include "SDL_surface.h"
  7. #include "SDL_video.h"
  8. #include "begin_code.h"
  9. #ifdef __cplusplus
  10. extern "C" {
  11. #endif
  12. #define SDL_NONSHAPEABLE_WINDOW -1
  13. #define SDL_INVALID_SHAPE_ARGUMENT -2
  14. #define SDL_WINDOW_LACKS_SHAPE -3
  15. typedef SDL_Window * SDLCALL tSDL_CreateShapedWindow(const char *title,unsigned int x,unsigned int y,unsigned int w,unsigned int h,Uint32 flags);
  16. typedef SDL_bool SDLCALL tSDL_IsShapedWindow(const SDL_Window *window);
  17. typedef enum {
  18. ShapeModeDefault,
  19. ShapeModeBinarizeAlpha,
  20. ShapeModeReverseBinarizeAlpha,
  21. ShapeModeColorKey
  22. } WindowShapeMode;
  23. #define SDL_SHAPEMODEALPHA(mode) (mode == ShapeModeDefault || mode == ShapeModeBinarizeAlpha || mode == ShapeModeReverseBinarizeAlpha)
  24. typedef union {
  25. Uint8 binarizationCutoff;
  26. SDL_Color colorKey;
  27. } SDL_WindowShapeParams;
  28. typedef struct SDL_WindowShapeMode {
  29. WindowShapeMode mode;
  30. SDL_WindowShapeParams parameters;
  31. } SDL_WindowShapeMode;
  32. typedef int SDLCALL tSDL_SetWindowShape(SDL_Window *window,SDL_Surface *shape,SDL_WindowShapeMode *shape_mode);
  33. typedef int SDLCALL tSDL_GetShapedWindowMode(SDL_Window *window,SDL_WindowShapeMode *shape_mode);
  34. #ifdef __cplusplus
  35. }
  36. #endif
  37. #include "close_code.h"
  38. #endif