World of Might and Magic  0.2.0
Open reimplementation of Might and Magic 6 7 8 game engine
Файл SDL_shape.h

См. исходные тексты.

Классы

union  SDL_WindowShapeParams
 A union containing parameters for shaped windows. Подробнее...
 
struct  SDL_WindowShapeMode
 A struct that tags the SDL_WindowShapeParams union with an enum describing the type of its contents. Подробнее...
 

Определения типов

typedef struct SDL_WindowShapeMode SDL_WindowShapeMode
 A struct that tags the SDL_WindowShapeParams union with an enum describing the type of its contents. Подробнее...
 

Перечисления

enum  WindowShapeMode { ShapeModeDefault, ShapeModeBinarizeAlpha, ShapeModeReverseBinarizeAlpha, ShapeModeColorKey }
 An enum denoting the specific type of contents present in an SDL_WindowShapeParams union. Подробнее...
 

Функции

DECLSPEC SDL_Window *SDLCALL SDL_CreateShapedWindow (const char *title, unsigned int x, unsigned int y, unsigned int w, unsigned int h, Uint32 flags)
 Create a window that can be shaped with the specified position, dimensions, and flags. Подробнее...
 
DECLSPEC SDL_bool SDLCALL SDL_IsShapedWindow (const SDL_Window *window)
 Return whether the given window is a shaped window. Подробнее...
 
DECLSPEC int SDLCALL SDL_SetWindowShape (SDL_Window *window, SDL_Surface *shape, SDL_WindowShapeMode *shape_mode)
 Set the shape and parameters of a shaped window. Подробнее...
 
DECLSPEC int SDLCALL SDL_GetShapedWindowMode (SDL_Window *window, SDL_WindowShapeMode *shape_mode)
 Get the shape parameters of a shaped window. Подробнее...
 

Подробное описание

Header file for the shaped window API.

См. определение в файле SDL_shape.h

Типы

◆ SDL_WindowShapeMode

A struct that tags the SDL_WindowShapeParams union with an enum describing the type of its contents.

Перечисления

◆ WindowShapeMode

An enum denoting the specific type of contents present in an SDL_WindowShapeParams union.

Элементы перечислений
ShapeModeDefault 

The default mode, a binarized alpha cutoff of 1.

ShapeModeBinarizeAlpha 

A binarized alpha cutoff with a given integer value.

ShapeModeReverseBinarizeAlpha 

A binarized alpha cutoff with a given integer value, but with the opposite comparison.

ShapeModeColorKey 

A color key is applied.

См. определение в файле SDL_shape.h строка 80

Функции

◆ SDL_CreateShapedWindow()

DECLSPEC SDL_Window* SDLCALL SDL_CreateShapedWindow ( const char *  title,
unsigned int  x,
unsigned int  y,
unsigned int  w,
unsigned int  h,
Uint32  flags 
)

Create a window that can be shaped with the specified position, dimensions, and flags.

Аргументы
titleThe title of the window, in UTF-8 encoding.
xThe x position of the window, ::SDL_WINDOWPOS_CENTERED, or ::SDL_WINDOWPOS_UNDEFINED.
yThe y position of the window, ::SDL_WINDOWPOS_CENTERED, or ::SDL_WINDOWPOS_UNDEFINED.
wThe width of the window.
hThe height of the window.
flagsThe flags for the window, a mask of SDL_WINDOW_BORDERLESS with any of the following: SDL_WINDOW_OPENGL, SDL_WINDOW_INPUT_GRABBED, SDL_WINDOW_HIDDEN, SDL_WINDOW_RESIZABLE, SDL_WINDOW_MAXIMIZED, SDL_WINDOW_MINIMIZED, SDL_WINDOW_BORDERLESS is always set, and SDL_WINDOW_FULLSCREEN is always unset.
Возвращает
The window created, or NULL if window creation failed.
См. также
SDL_DestroyWindow()

◆ SDL_IsShapedWindow()

DECLSPEC SDL_bool SDLCALL SDL_IsShapedWindow ( const SDL_Window window)

Return whether the given window is a shaped window.

Аргументы
windowThe window to query for being shaped.
Возвращает
SDL_TRUE if the window is a window that can be shaped, SDL_FALSE if the window is unshaped or NULL.
См. также
SDL_CreateShapedWindow

◆ SDL_SetWindowShape()

DECLSPEC int SDLCALL SDL_SetWindowShape ( SDL_Window window,
SDL_Surface shape,
SDL_WindowShapeMode shape_mode 
)

Set the shape and parameters of a shaped window.

Аргументы
windowThe shaped window whose parameters should be set.
shapeA surface encoding the desired shape for the window.
shape_modeThe parameters to set for the shaped window.
Возвращает
0 on success, SDL_INVALID_SHAPE_ARGUMENT on an invalid shape argument, or SDL_NONSHAPEABLE_WINDOW if the SDL_Window given does not reference a valid shaped window.
См. также
SDL_WindowShapeMode
SDL_GetShapedWindowMode.

◆ SDL_GetShapedWindowMode()

DECLSPEC int SDLCALL SDL_GetShapedWindowMode ( SDL_Window window,
SDL_WindowShapeMode shape_mode 
)

Get the shape parameters of a shaped window.

Аргументы
windowThe shaped window whose parameters should be retrieved.
shape_modeAn empty shape-mode structure to fill, or NULL to check whether the window has a shape.
Возвращает
0 if the window has a shape and, provided shape_mode was not NULL, shape_mode has been filled with the mode data, SDL_NONSHAPEABLE_WINDOW if the SDL_Window given is not a shaped window, or SDL_WINDOW_LACKS_SHAPE if the SDL_Window given is a shapeable window currently lacking a shape.
См. также
SDL_WindowShapeMode
SDL_SetWindowShape
ShapeModeBinarizeAlpha
@ ShapeModeBinarizeAlpha
A binarized alpha cutoff with a given integer value.
Definition: SDL_shape.h:84
ShapeModeReverseBinarizeAlpha
@ ShapeModeReverseBinarizeAlpha
A binarized alpha cutoff with a given integer value, but with the opposite comparison.
Definition: SDL_shape.h:86
ShapeModeColorKey
@ ShapeModeColorKey
A color key is applied.
Definition: SDL_shape.h:88
WindowShapeMode
WindowShapeMode
An enum denoting the specific type of contents present in an SDL_WindowShapeParams union.
Definition: SDL_shape.h:80
ShapeModeDefault
@ ShapeModeDefault
The default mode, a binarized alpha cutoff of 1.
Definition: SDL_shape.h:82