Package io.github.libsdl4j.api.shape
Class SdlShape
- java.lang.Object
-
- io.github.libsdl4j.api.shape.SdlShape
-
public final class SdlShape extends Object
Definitions from file SDL_shape.hHeader file for the shaped window API.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static SDL_Window
SDL_CreateShapedWindow(String title, int x, int y, int w, int h, int flags)
Create a window that can be shaped with the specified position, dimensions, and flags.static int
SDL_GetShapedWindowMode(SDL_Window window, SDL_WindowShapeMode shapeMode)
Get the shape parameters of a shaped window.static boolean
SDL_IsShapedWindow(SDL_Window window)
Return whether the given window is a shaped window.static int
SDL_SetWindowShape(SDL_Window window, SDL_Surface shape, SDL_WindowShapeMode shapeMode)
Set the shape and parameters of a shaped window.static boolean
SDL_SHAPEMODEALPHA(int mode)
-
-
-
Method Detail
-
SDL_SHAPEMODEALPHA
public static boolean SDL_SHAPEMODEALPHA(int mode)
-
SDL_SetWindowShape
public static int SDL_SetWindowShape(SDL_Window window, SDL_Surface shape, SDL_WindowShapeMode shapeMode)
Set the shape and parameters of a shaped window.- Parameters:
window
- The shaped window whose parameters should be set.shape
- A surface encoding the desired shape for the window.shapeMode
- The parameters to set for the shaped window.- Returns:
- 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.
- Since:
- This function is available since SDL 2.0.0.
- See Also:
SDL_WindowShapeMode
,SDL_GetShapedWindowMode(SDL_Window, SDL_WindowShapeMode)
-
SDL_GetShapedWindowMode
public static int SDL_GetShapedWindowMode(SDL_Window window, SDL_WindowShapeMode shapeMode)
Get the shape parameters of a shaped window.- Parameters:
window
- The shaped window whose parameters should be retrieved.shapeMode
- An empty shape-mode structure to fill, or null to check whether the window has a shape.- Returns:
- 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.
- Since:
- This function is available since SDL 2.0.0.
- See Also:
SDL_WindowShapeMode
,SDL_SetWindowShape(SDL_Window, SDL_Surface, SDL_WindowShapeMode)
-
SDL_CreateShapedWindow
public static SDL_Window SDL_CreateShapedWindow(String title, int x, int y, int w, int h, int flags)
Create a window that can be shaped with the specified position, dimensions, and flags.- Parameters:
title
- The title of the window, in UTF-8 encoding.x
- The x position of the window,SDL_WINDOWPOS_CENTERED
, orSDL_WINDOWPOS_UNDEFINED
.y
- The y position of the window,SDL_WINDOWPOS_CENTERED
, orSDL_WINDOWPOS_UNDEFINED
.w
- The width of the window.h
- The height of the window.flags
- The flags for the window, a mask ofSDL_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, andSDL_WINDOW_FULLSCREEN
is always unset.- Returns:
- the window created, or null if window creation failed.
- Since:
- This function is available since SDL 2.0.0.
- See Also:
SdlVideo.SDL_DestroyWindow(SDL_Window)
-
SDL_IsShapedWindow
public static boolean SDL_IsShapedWindow(SDL_Window window)
Return whether the given window is a shaped window.- Parameters:
window
- The window to query for being shaped.- Returns:
- true if the window is a window that can be shaped, false if the window is unshaped or null.
- Since:
- This function is available since SDL 2.0.0.
- See Also:
SDL_CreateShapedWindow(String, int, int, int, int, int)
-
-