mirror of
https://github.com/SFML/CSFML.git
synced 2026-10-27 05:26:13 +01:00
Use C standard library utilities for booleans and fixed-width ints
This commit is contained in:
1 parent
46bc9a7ed8
commit
a51c22a7a3
97 files changed
+670
-707
No files matched your search
@@ -55,7 +55,7 @@ CSFML_WINDOW_API const char* sfClipboard_getString(void);
|
||||
/// \return Clipboard contents as UTF-32
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_WINDOW_API const sfUint32* sfClipboard_getUnicodeString(void);
|
||||
CSFML_WINDOW_API const uint32_t* sfClipboard_getUnicodeString(void);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Set the content of the clipboard as ANSI string data
|
||||
@@ -79,7 +79,7 @@ CSFML_WINDOW_API void sfClipboard_setString(const char* text);
|
||||
/// to the clipboard
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_WINDOW_API void sfClipboard_setUnicodeString(const sfUint32* text);
|
||||
CSFML_WINDOW_API void sfClipboard_setUnicodeString(const uint32_t* text);
|
||||
|
||||
|
||||
#endif // SFML_CURSOR_H
|
||||
@@ -60,18 +60,18 @@ CSFML_WINDOW_API void sfContext_destroy(sfContext* context);
|
||||
/// \return True if available, false if unavailable
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_WINDOW_API sfBool sfContext_isExtensionAvailable(const char* name);
|
||||
CSFML_WINDOW_API bool sfContext_isExtensionAvailable(const char* name);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Activate or deactivate explicitely a context
|
||||
///
|
||||
/// \param context Context object
|
||||
/// \param active sfTrue to activate, sfFalse to deactivate
|
||||
/// \param active true to activate, false to deactivate
|
||||
///
|
||||
/// \return sfTrue on success, sfFalse on failure
|
||||
/// \return true on success, false on failure
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_WINDOW_API sfBool sfContext_setActive(sfContext* context, sfBool active);
|
||||
CSFML_WINDOW_API bool sfContext_setActive(sfContext* context, bool active);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the address of an OpenGL function.
|
||||
@@ -106,6 +106,6 @@ CSFML_WINDOW_API sfContextSettings sfContext_getSettings(const sfContext* contex
|
||||
/// \return The active context's ID or 0 if no context is currently active
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_WINDOW_API sfUint64 sfContext_getActiveContextId(void);
|
||||
CSFML_WINDOW_API uint64_t sfContext_getActiveContextId(void);
|
||||
|
||||
#endif // SFML_CONTEXT_H
|
||||
@@ -118,7 +118,7 @@ typedef enum
|
||||
/// \return A new sfCursor object
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_WINDOW_API sfCursor* sfCursor_createFromPixels(const sfUint8* pixels, sfVector2u size, sfVector2u hotspot);
|
||||
CSFML_WINDOW_API sfCursor* sfCursor_createFromPixels(const uint8_t* pixels, sfVector2u size, sfVector2u hotspot);
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -78,10 +78,10 @@ typedef struct
|
||||
sfEventType type;
|
||||
sfKeyCode code;
|
||||
sfScancode scancode;
|
||||
sfBool alt;
|
||||
sfBool control;
|
||||
sfBool shift;
|
||||
sfBool system;
|
||||
bool alt;
|
||||
bool control;
|
||||
bool shift;
|
||||
bool system;
|
||||
} sfKeyEvent;
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
@@ -91,7 +91,7 @@ typedef struct
|
||||
typedef struct
|
||||
{
|
||||
sfEventType type;
|
||||
sfUint32 unicode;
|
||||
uint32_t unicode;
|
||||
} sfTextEvent;
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -66,10 +66,10 @@ typedef enum
|
||||
///
|
||||
/// \param joystick Index of the joystick to check
|
||||
///
|
||||
/// \return sfTrue if the joystick is connected, sfFalse otherwise
|
||||
/// \return true if the joystick is connected, false otherwise
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_WINDOW_API sfBool sfJoystick_isConnected(unsigned int joystick);
|
||||
CSFML_WINDOW_API bool sfJoystick_isConnected(unsigned int joystick);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Return the number of buttons supported by a joystick
|
||||
@@ -91,10 +91,10 @@ CSFML_WINDOW_API unsigned int sfJoystick_getButtonCount(unsigned int joystick);
|
||||
/// \param joystick Index of the joystick
|
||||
/// \param axis Axis to check
|
||||
///
|
||||
/// \return sfTrue if the joystick supports the axis, sfFalse otherwise
|
||||
/// \return true if the joystick supports the axis, false otherwise
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_WINDOW_API sfBool sfJoystick_hasAxis(unsigned int joystick, sfJoystickAxis axis);
|
||||
CSFML_WINDOW_API bool sfJoystick_hasAxis(unsigned int joystick, sfJoystickAxis axis);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Check if a joystick button is pressed
|
||||
@@ -104,10 +104,10 @@ CSFML_WINDOW_API sfBool sfJoystick_hasAxis(unsigned int joystick, sfJoystickAxis
|
||||
/// \param joystick Index of the joystick
|
||||
/// \param button Button to check
|
||||
///
|
||||
/// \return sfTrue if the button is pressed, sfFalse otherwise
|
||||
/// \return true if the button is pressed, false otherwise
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_WINDOW_API sfBool sfJoystick_isButtonPressed(unsigned int joystick, unsigned int button);
|
||||
CSFML_WINDOW_API bool sfJoystick_isButtonPressed(unsigned int joystick, unsigned int button);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the current position of a joystick axis
|
||||
|
||||
@@ -331,24 +331,24 @@ typedef enum
|
||||
///
|
||||
/// \param key Key to check
|
||||
///
|
||||
/// \return sfTrue if the key is pressed, sfFalse otherwise
|
||||
/// \return true if the key is pressed, false otherwise
|
||||
///
|
||||
/// \see sfKeyboard_isScancodePressed
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_WINDOW_API sfBool sfKeyboard_isKeyPressed(sfKeyCode key);
|
||||
CSFML_WINDOW_API bool sfKeyboard_isKeyPressed(sfKeyCode key);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Check if a key is pressed
|
||||
///
|
||||
/// \param code Scancode to check
|
||||
///
|
||||
/// \return sfTrue if the physical key is pressed, sfFalse otherwise
|
||||
/// \return true if the physical key is pressed, false otherwise
|
||||
///
|
||||
/// \see sfKeyboard_isKeyPressed
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_WINDOW_API sfBool sfKeyboard_isScancodePressed(sfScancode code);
|
||||
CSFML_WINDOW_API bool sfKeyboard_isScancodePressed(sfScancode code);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Localize a physical key to a logical one
|
||||
@@ -418,6 +418,6 @@ CSFML_WINDOW_API const char* sfKeyboard_getDescription(sfScancode code);
|
||||
/// \param visible True to show, false to hide
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_WINDOW_API void sfKeyboard_setVirtualKeyboardVisible(sfBool visible);
|
||||
CSFML_WINDOW_API void sfKeyboard_setVirtualKeyboardVisible(bool visible);
|
||||
|
||||
#endif // SFML_KEYBOARD_H
|
||||
@@ -64,10 +64,10 @@ typedef enum
|
||||
///
|
||||
/// \param button Button to check
|
||||
///
|
||||
/// \return sfTrue if the button is pressed, sfFalse otherwise
|
||||
/// \return true if the button is pressed, false otherwise
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_WINDOW_API sfBool sfMouse_isButtonPressed(sfMouseButton button);
|
||||
CSFML_WINDOW_API bool sfMouse_isButtonPressed(sfMouseButton button);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the current position of the mouse
|
||||
|
||||
@@ -55,10 +55,10 @@ typedef enum
|
||||
///
|
||||
/// \param sensor Sensor to check
|
||||
///
|
||||
/// \return sfTrue if the sensor is available, sfFalse otherwise
|
||||
/// \return true if the sensor is available, false otherwise
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_WINDOW_API sfBool sfSensor_isAvailable(sfSensorType sensor);
|
||||
CSFML_WINDOW_API bool sfSensor_isAvailable(sfSensorType sensor);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Enable or disable a sensor
|
||||
@@ -70,10 +70,10 @@ CSFML_WINDOW_API sfBool sfSensor_isAvailable(sfSensorType sensor);
|
||||
/// This function does nothing if the sensor is unavailable.
|
||||
///
|
||||
/// \param sensor Sensor to enable
|
||||
/// \param enabled sfTrue to enable, sfFalse to disable
|
||||
/// \param enabled true to enable, false to disable
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_WINDOW_API void sfSensor_setEnabled(sfSensorType sensor, sfBool enabled);
|
||||
CSFML_WINDOW_API void sfSensor_setEnabled(sfSensorType sensor, bool enabled);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the current sensor value
|
||||
|
||||
@@ -38,10 +38,10 @@
|
||||
///
|
||||
/// \param finger Finger index
|
||||
///
|
||||
/// \return sfTrue if \a finger is currently touching the screen, sfFalse otherwise
|
||||
/// \return true if \a finger is currently touching the screen, false otherwise
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_WINDOW_API sfBool sfTouch_isDown(unsigned int finger);
|
||||
CSFML_WINDOW_API bool sfTouch_isDown(unsigned int finger);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the current position of a touch in window coordinates
|
||||
|
||||
@@ -81,10 +81,10 @@ CSFML_WINDOW_API const sfVideoMode* sfVideoMode_getFullscreenModes(size_t* count
|
||||
///
|
||||
/// \param mode Video mode
|
||||
///
|
||||
/// \return sfTrue if the video mode is valid for fullscreen mode
|
||||
/// \return true if the video mode is valid for fullscreen mode
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_WINDOW_API sfBool sfVideoMode_isValid(sfVideoMode mode);
|
||||
CSFML_WINDOW_API bool sfVideoMode_isValid(sfVideoMode mode);
|
||||
|
||||
|
||||
#endif // SFML_VIDEOMODE_H
|
||||
@@ -37,7 +37,7 @@ typedef struct VkSurfaceKHR_T* VkSurfaceKHR;
|
||||
|
||||
#else
|
||||
|
||||
typedef sfUint64 VkSurfaceKHR;
|
||||
typedef uint64_t VkSurfaceKHR;
|
||||
|
||||
#endif
|
||||
|
||||
@@ -62,7 +62,7 @@ typedef void (*sfVulkanFunctionPointer)(void);
|
||||
/// \return True if Vulkan is supported, false otherwise
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_WINDOW_API sfBool sfVulkan_isAvailable(sfBool requireGraphics);
|
||||
CSFML_WINDOW_API bool sfVulkan_isAvailable(bool requireGraphics);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the address of a Vulkan function
|
||||
|
||||
@@ -60,8 +60,8 @@ typedef struct
|
||||
unsigned int antialiasingLevel; ///< Level of antialiasing
|
||||
unsigned int majorVersion; ///< Major number of the context version to create
|
||||
unsigned int minorVersion; ///< Minor number of the context version to create
|
||||
sfUint32 attributeFlags; ///< The attribute flags to create the context with
|
||||
sfBool sRgbCapable; ///< Whether the context framebuffer is sRGB capable
|
||||
uint32_t attributeFlags; ///< The attribute flags to create the context with
|
||||
bool sRgbCapable; ///< Whether the context framebuffer is sRGB capable
|
||||
} sfContextSettings;
|
||||
|
||||
|
||||
@@ -86,7 +86,7 @@ typedef struct
|
||||
/// \return A new sfWindow object
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_WINDOW_API sfWindow* sfWindow_create(sfVideoMode mode, const char* title, sfUint32 style, const sfContextSettings* settings);
|
||||
CSFML_WINDOW_API sfWindow* sfWindow_create(sfVideoMode mode, const char* title, uint32_t style, const sfContextSettings* settings);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Construct a new window (with a UTF-32 title)
|
||||
@@ -109,7 +109,7 @@ CSFML_WINDOW_API sfWindow* sfWindow_create(sfVideoMode mode, const char* title,
|
||||
/// \return A new sfWindow object
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_WINDOW_API sfWindow* sfWindow_createUnicode(sfVideoMode mode, const sfUint32* title, sfUint32 style, const sfContextSettings* settings);
|
||||
CSFML_WINDOW_API sfWindow* sfWindow_createUnicode(sfVideoMode mode, const uint32_t* title, uint32_t style, const sfContextSettings* settings);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Construct a window from an existing control
|
||||
@@ -155,15 +155,15 @@ CSFML_WINDOW_API void sfWindow_close(sfWindow* window);
|
||||
/// \brief Tell whether or not a window is opened
|
||||
///
|
||||
/// This function returns whether or not the window exists.
|
||||
/// Note that a hidden window (sfWindow_setVisible(sfFalse)) will return
|
||||
/// sfTrue.
|
||||
/// Note that a hidden window (sfWindow_setVisible(false)) will return
|
||||
/// true.
|
||||
///
|
||||
/// \param window Window object
|
||||
///
|
||||
/// \return sfTrue if the window is opened, sfFalse if it has been closed
|
||||
/// \return true if the window is opened, false if it has been closed
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_WINDOW_API sfBool sfWindow_isOpen(const sfWindow* window);
|
||||
CSFML_WINDOW_API bool sfWindow_isOpen(const sfWindow* window);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the settings of the OpenGL context of a window
|
||||
@@ -192,10 +192,10 @@ CSFML_WINDOW_API sfContextSettings sfWindow_getSettings(const sfWindow* window);
|
||||
/// \param window Window object
|
||||
/// \param event Event to be returned
|
||||
///
|
||||
/// \return sfTrue if an event was returned, or sfFalse if the event queue was empty
|
||||
/// \return true if an event was returned, or false if the event queue was empty
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_WINDOW_API sfBool sfWindow_pollEvent(sfWindow* window, sfEvent* event);
|
||||
CSFML_WINDOW_API bool sfWindow_pollEvent(sfWindow* window, sfEvent* event);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Wait for an event and return it
|
||||
@@ -211,10 +211,10 @@ CSFML_WINDOW_API sfBool sfWindow_pollEvent(sfWindow* window, sfEvent* event);
|
||||
/// \param window Window object
|
||||
/// \param event Event to be returned
|
||||
///
|
||||
/// \return sfFalse if any error occured
|
||||
/// \return false if any error occured
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_WINDOW_API sfBool sfWindow_waitEvent(sfWindow* window, sfEvent* event);
|
||||
CSFML_WINDOW_API bool sfWindow_waitEvent(sfWindow* window, sfEvent* event);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the position of a window
|
||||
@@ -277,7 +277,7 @@ CSFML_WINDOW_API void sfWindow_setTitle(sfWindow* window, const char* title);
|
||||
/// \param title New title
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_WINDOW_API void sfWindow_setUnicodeTitle(sfWindow* window, const sfUint32* title);
|
||||
CSFML_WINDOW_API void sfWindow_setUnicodeTitle(sfWindow* window, const uint32_t* title);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Change a window's icon
|
||||
@@ -291,16 +291,16 @@ CSFML_WINDOW_API void sfWindow_setUnicodeTitle(sfWindow* window, const sfUint32*
|
||||
/// \param pixels Pointer to the array of pixels in memory
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_WINDOW_API void sfWindow_setIcon(sfWindow* window, unsigned int width, unsigned int height, const sfUint8* pixels);
|
||||
CSFML_WINDOW_API void sfWindow_setIcon(sfWindow* window, unsigned int width, unsigned int height, const uint8_t* pixels);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Show or hide a window
|
||||
///
|
||||
/// \param window Window object
|
||||
/// \param visible sfTrue to show the window, sfFalse to hide it
|
||||
/// \param visible true to show the window, false to hide it
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_WINDOW_API void sfWindow_setVisible(sfWindow* window, sfBool visible);
|
||||
CSFML_WINDOW_API void sfWindow_setVisible(sfWindow* window, bool visible);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Enable or disable vertical synchronization
|
||||
@@ -311,19 +311,19 @@ CSFML_WINDOW_API void sfWindow_setVisible(sfWindow* window, sfBool visible);
|
||||
/// to a good value (but not constant across different computers).
|
||||
///
|
||||
/// \param window Window object
|
||||
/// \param enabled sfTrue to enable v-sync, sfFalse to deactivate
|
||||
/// \param enabled true to enable v-sync, false to deactivate
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_WINDOW_API void sfWindow_setVerticalSyncEnabled(sfWindow* window, sfBool enabled);
|
||||
CSFML_WINDOW_API void sfWindow_setVerticalSyncEnabled(sfWindow* window, bool enabled);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Show or hide the mouse cursor
|
||||
///
|
||||
/// \param window Window object
|
||||
/// \param visible sfTrue to show, sfFalse to hide
|
||||
/// \param visible true to show, false to hide
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_WINDOW_API void sfWindow_setMouseCursorVisible(sfWindow* window, sfBool visible);
|
||||
CSFML_WINDOW_API void sfWindow_setMouseCursorVisible(sfWindow* window, bool visible);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Grab or release the mouse cursor
|
||||
@@ -335,10 +335,10 @@ CSFML_WINDOW_API void sfWindow_setMouseCursorVisible(sfWindow* window, sfBool vi
|
||||
/// won't have any effect (fullscreen windows always grab the
|
||||
/// cursor).
|
||||
///
|
||||
/// \param grabbed sfTrue to enable, sfFalse to disable
|
||||
/// \param grabbed true to enable, false to disable
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_WINDOW_API void sfWindow_setMouseCursorGrabbed(sfWindow* window, sfBool grabbed);
|
||||
CSFML_WINDOW_API void sfWindow_setMouseCursorGrabbed(sfWindow* window, bool grabbed);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Set the displayed cursor to a native system cursor
|
||||
@@ -370,10 +370,10 @@ CSFML_WINDOW_API void sfWindow_setMouseCursor(sfWindow* window, const sfCursor*
|
||||
/// Key repeat is enabled by default.
|
||||
///
|
||||
/// \param window Window object
|
||||
/// \param enabled sfTrue to enable, sfFalse to disable
|
||||
/// \param enabled true to enable, false to disable
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_WINDOW_API void sfWindow_setKeyRepeatEnabled(sfWindow* window, sfBool enabled);
|
||||
CSFML_WINDOW_API void sfWindow_setKeyRepeatEnabled(sfWindow* window, bool enabled);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Limit the framerate to a maximum fixed frequency
|
||||
@@ -412,12 +412,12 @@ CSFML_WINDOW_API void sfWindow_setJoystickThreshold(sfWindow* window, float thre
|
||||
/// This is not to be confused with sfWindow_requestFocus().
|
||||
///
|
||||
/// \param window Window object
|
||||
/// \param active sfTrue to activate, sfFalse to deactivate
|
||||
/// \param active true to activate, false to deactivate
|
||||
///
|
||||
/// \return sfTrue if operation was successful, sfFalse otherwise
|
||||
/// \return true if operation was successful, false otherwise
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_WINDOW_API sfBool sfWindow_setActive(sfWindow* window, sfBool active);
|
||||
CSFML_WINDOW_API bool sfWindow_setActive(sfWindow* window, bool active);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Request the current window to be made the active
|
||||
@@ -443,7 +443,7 @@ CSFML_WINDOW_API void sfWindow_requestFocus(sfWindow* window);
|
||||
/// \return True if window has focus, false otherwise
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_WINDOW_API sfBool sfWindow_hasFocus(const sfWindow* window);
|
||||
CSFML_WINDOW_API bool sfWindow_hasFocus(const sfWindow* window);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Display on screen what has been rendered to the
|
||||
|
||||
@@ -68,7 +68,7 @@ typedef enum
|
||||
/// \return A new sfWindow object
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_WINDOW_API sfWindowBase* sfWindowBase_create(sfVideoMode mode, const char* title, sfUint32 style);
|
||||
CSFML_WINDOW_API sfWindowBase* sfWindowBase_create(sfVideoMode mode, const char* title, uint32_t style);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Construct a new window (with a UTF-32 title)
|
||||
@@ -86,7 +86,7 @@ CSFML_WINDOW_API sfWindowBase* sfWindowBase_create(sfVideoMode mode, const char*
|
||||
/// \return A new sfWindow object
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_WINDOW_API sfWindowBase* sfWindowBase_createUnicode(sfVideoMode mode, const sfUint32* title, sfUint32 style);
|
||||
CSFML_WINDOW_API sfWindowBase* sfWindowBase_createUnicode(sfVideoMode mode, const uint32_t* title, uint32_t style);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Construct a window from an existing control
|
||||
@@ -124,15 +124,15 @@ CSFML_WINDOW_API void sfWindowBase_close(sfWindowBase* windowBase);
|
||||
/// \brief Tell whether or not a window is opened
|
||||
///
|
||||
/// This function returns whether or not the window exists.
|
||||
/// Note that a hidden window (sfWindowBase_setVisible(sfFalse)) will return
|
||||
/// sfTrue.
|
||||
/// Note that a hidden window (sfWindowBase_setVisible(false)) will return
|
||||
/// true.
|
||||
///
|
||||
/// \param windowBase Window object
|
||||
///
|
||||
/// \return sfTrue if the window is opened, sfFalse if it has been closed
|
||||
/// \return true if the window is opened, false if it has been closed
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_WINDOW_API sfBool sfWindowBase_isOpen(const sfWindowBase* windowBase);
|
||||
CSFML_WINDOW_API bool sfWindowBase_isOpen(const sfWindowBase* windowBase);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Pop the event on top of event queue, if any, and return it
|
||||
@@ -146,10 +146,10 @@ CSFML_WINDOW_API sfBool sfWindowBase_isOpen(const sfWindowBase* windowBase);
|
||||
/// \param windowBase Window object
|
||||
/// \param event Event to be returned
|
||||
///
|
||||
/// \return sfTrue if an event was returned, or sfFalse if the event queue was empty
|
||||
/// \return true if an event was returned, or false if the event queue was empty
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_WINDOW_API sfBool sfWindowBase_pollEvent(sfWindowBase* windowBase, sfEvent* event);
|
||||
CSFML_WINDOW_API bool sfWindowBase_pollEvent(sfWindowBase* windowBase, sfEvent* event);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Wait for an event and return it
|
||||
@@ -165,10 +165,10 @@ CSFML_WINDOW_API sfBool sfWindowBase_pollEvent(sfWindowBase* windowBase, sfEvent
|
||||
/// \param windowBase Window object
|
||||
/// \param event Event to be returned
|
||||
///
|
||||
/// \return sfFalse if any error occured
|
||||
/// \return false if any error occured
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_WINDOW_API sfBool sfWindowBase_waitEvent(sfWindowBase* windowBase, sfEvent* event);
|
||||
CSFML_WINDOW_API bool sfWindowBase_waitEvent(sfWindowBase* windowBase, sfEvent* event);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the position of a window
|
||||
@@ -231,7 +231,7 @@ CSFML_WINDOW_API void sfWindowBase_setTitle(sfWindowBase* windowBase, const char
|
||||
/// \param title New title
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_WINDOW_API void sfWindowBase_setUnicodeTitle(sfWindowBase* windowBase, const sfUint32* title);
|
||||
CSFML_WINDOW_API void sfWindowBase_setUnicodeTitle(sfWindowBase* windowBase, const uint32_t* title);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Change a window's icon
|
||||
@@ -245,25 +245,25 @@ CSFML_WINDOW_API void sfWindowBase_setUnicodeTitle(sfWindowBase* windowBase, con
|
||||
/// \param pixels Pointer to the array of pixels in memory
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_WINDOW_API void sfWindowBase_setIcon(sfWindowBase* windowBase, unsigned int width, unsigned int height, const sfUint8* pixels);
|
||||
CSFML_WINDOW_API void sfWindowBase_setIcon(sfWindowBase* windowBase, unsigned int width, unsigned int height, const uint8_t* pixels);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Show or hide a window
|
||||
///
|
||||
/// \param windowBase Window object
|
||||
/// \param visible sfTrue to show the windowBase, sfFalse to hide it
|
||||
/// \param visible true to show the windowBase, false to hide it
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_WINDOW_API void sfWindowBase_setVisible(sfWindowBase* windowBase, sfBool visible);
|
||||
CSFML_WINDOW_API void sfWindowBase_setVisible(sfWindowBase* windowBase, bool visible);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Show or hide the mouse cursor
|
||||
///
|
||||
/// \param windowBase Window object
|
||||
/// \param visible sfTrue to show, sfFalse to hide
|
||||
/// \param visible true to show, false to hide
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_WINDOW_API void sfWindowBase_setMouseCursorVisible(sfWindowBase* windowBase, sfBool visible);
|
||||
CSFML_WINDOW_API void sfWindowBase_setMouseCursorVisible(sfWindowBase* windowBase, bool visible);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Grab or release the mouse cursor
|
||||
@@ -275,10 +275,10 @@ CSFML_WINDOW_API void sfWindowBase_setMouseCursorVisible(sfWindowBase* windowBas
|
||||
/// won't have any effect (fullscreen windows always grab the
|
||||
/// cursor).
|
||||
///
|
||||
/// \param grabbed sfTrue to enable, sfFalse to disable
|
||||
/// \param grabbed true to enable, false to disable
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_WINDOW_API void sfWindowBase_setMouseCursorGrabbed(sfWindowBase* windowBase, sfBool grabbed);
|
||||
CSFML_WINDOW_API void sfWindowBase_setMouseCursorGrabbed(sfWindowBase* windowBase, bool grabbed);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Set the displayed cursor to a native system cursor
|
||||
@@ -310,10 +310,10 @@ CSFML_WINDOW_API void sfWindowBase_setMouseCursor(sfWindowBase* windowBase, cons
|
||||
/// Key repeat is enabled by default.
|
||||
///
|
||||
/// \param windowBase Window object
|
||||
/// \param enabled sfTrue to enable, sfFalse to disable
|
||||
/// \param enabled true to enable, false to disable
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_WINDOW_API void sfWindowBase_setKeyRepeatEnabled(sfWindowBase* windowBase, sfBool enabled);
|
||||
CSFML_WINDOW_API void sfWindowBase_setKeyRepeatEnabled(sfWindowBase* windowBase, bool enabled);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Change the joystick threshold
|
||||
@@ -350,7 +350,7 @@ CSFML_WINDOW_API void sfWindowBase_requestFocus(sfWindowBase* windowBase);
|
||||
/// \return True if window has focus, false otherwise
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_WINDOW_API sfBool sfWindowBase_hasFocus(const sfWindowBase* windowBase);
|
||||
CSFML_WINDOW_API bool sfWindowBase_hasFocus(const sfWindowBase* windowBase);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the OS-specific handle of the window
|
||||
@@ -379,6 +379,6 @@ CSFML_WINDOW_API sfWindowHandle sfWindowBase_getSystemHandle(const sfWindowBase*
|
||||
/// \return True if surface creation was successful, false otherwise
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_WINDOW_API sfBool sfWindowBase_createVulkanSurface(sfWindowBase* windowBase, const VkInstance* instance, VkSurfaceKHR* surface, const VkAllocationCallbacks* allocator);
|
||||
CSFML_WINDOW_API bool sfWindowBase_createVulkanSurface(sfWindowBase* windowBase, const VkInstance* instance, VkSurfaceKHR* surface, const VkAllocationCallbacks* allocator);
|
||||
|
||||
#endif // SFML_WINDOWBASE_H
|
||||
Reference in new issue
Block a user