Implement missing functions

This commit is contained in:
Miron Alexandru authored and Chris Thrasher committed 2024-03-09 20:29:30 -07:00
1 parent 16ae40d383
commit e0589c302b
11 files changed
+211

No files matched your search

+13
View File
@@ -618,5 +618,18 @@ CSFML_GRAPHICS_API void sfMouse_setPositionRenderWindow(sfVector2i position, con
////////////////////////////////////////////////////////////
CSFML_GRAPHICS_API sfVector2i sfTouch_getPositionRenderWindow(unsigned int finger, const sfRenderWindow* relativeTo);
////////////////////////////////////////////////////////////
/// \brief Create a Vulkan rendering surface
///
/// \param renderWindow RenderWindow object
/// \param instance Vulkan instance
/// \param surface Created surface
/// \param allocator Allocator to use
///
/// \return True if surface creation was successful, false otherwise
///
////////////////////////////////////////////////////////////
CSFML_GRAPHICS_API sfBool sfRenderWindow_createVulkanSurface(sfRenderWindow* renderWindow, const VkInstance* instance, VkSurfaceKHR* surface, const VkAllocationCallbacks* allocator);
#endif // SFML_RENDERWINDOW_H
+49
View File
@@ -0,0 +1,49 @@
////////////////////////////////////////////////////////////
//
// SFML - Simple and Fast Multimedia Library
// Copyright (C) 2007-2023 Laurent Gomila (laurent@sfml-dev.org)
//
// This software is provided 'as-is', without any express or implied warranty.
// In no event will the authors be held liable for any damages arising from the use of this software.
//
// Permission is granted to anyone to use this software for any purpose,
// including commercial applications, and to alter it and redistribute it freely,
// subject to the following restrictions:
//
// 1. The origin of this software must not be misrepresented;
// you must not claim that you wrote the original software.
// If you use this software in a product, an acknowledgment
// in the product documentation would be appreciated but is not required.
//
// 2. Altered source versions must be plainly marked as such,
// and must not be misrepresented as being the original software.
//
// 3. This notice may not be removed or altered from any source distribution.
//
////////////////////////////////////////////////////////////
#ifndef SFML_ALLOC_H
#define SFML_ALLOC_H
////////////////////////////////////////////////////////////
// Headers
////////////////////////////////////////////////////////////
#include <SFML/System/Export.h>
////////////////////////////////////////////////////////////
/// \brief Deallocates memory
///
/// This function deallocates the memory being pointed to
/// using the free function from the C standard library.
///
/// The memory must have been previously allocated using a call
/// to malloc.
///
/// \param ptr Pointer to the memory to deallocate
///
////////////////////////////////////////////////////////////
CSFML_SYSTEM_API void sfFree(void* ptr);
#endif // SFML_ALLOC_H
+25
View File
@@ -94,5 +94,30 @@ CSFML_WINDOW_API sfVector2i sfMouse_getPosition(const sfWindow* relativeTo);
////////////////////////////////////////////////////////////
CSFML_WINDOW_API void sfMouse_setPosition(sfVector2i position, const sfWindow* relativeTo);
////////////////////////////////////////////////////////////
/// \brief Get the current position of the mouse relative to a window base
///
/// This function returns the current position of the mouse
/// cursor relative to the given window base, or desktop if NULL is passed.
///
/// \param relativeTo Reference window
///
/// \return Position of the mouse cursor, relative to the given window base
///
////////////////////////////////////////////////////////////
CSFML_WINDOW_API sfVector2i sfMouse_getPositionWindowBase(const sfWindowBase* relativeTo);
////////////////////////////////////////////////////////////
/// \brief Set the current position of the mouse relative to a window base
///
/// This function sets the current position of the mouse
/// cursor relative to the given window base, or desktop if NULL is passed.
///
/// \param position New position of the mouse
/// \param relativeTo Reference window
///
////////////////////////////////////////////////////////////
CSFML_WINDOW_API void sfMouse_setPositionWindowBase(sfVector2i position, const sfWindowBase* relativeTo);
#endif // SFML_MOUSE_H
+14
View File
@@ -57,5 +57,19 @@ CSFML_WINDOW_API sfBool sfTouch_isDown(unsigned int finger);
////////////////////////////////////////////////////////////
CSFML_WINDOW_API sfVector2i sfTouch_getPosition(unsigned int finger, const sfWindow* relativeTo);
////////////////////////////////////////////////////////////
/// \brief Get the current position of a touch in window coordinates
///
/// This function returns the current touch position
/// relative to the given window base, or desktop if NULL is passed.
///
/// \param finger Finger index
/// \param relativeTo Reference window
///
/// \return Current position of \a finger, or undefined if it's not down
///
////////////////////////////////////////////////////////////
CSFML_WINDOW_API sfVector2i sfTouch_getPositionWindowBase(unsigned int finger, const sfWindowBase* relativeTo);
#endif // SFML_TOUCH_H
+13
View File
@@ -474,5 +474,18 @@ CSFML_WINDOW_API void sfWindow_display(sfWindow* window);
////////////////////////////////////////////////////////////
CSFML_WINDOW_API sfWindowHandle sfWindow_getSystemHandle(const sfWindow* window);
////////////////////////////////////////////////////////////
/// \brief Create a Vulkan rendering surface
///
/// \param window Window object
/// \param instance Vulkan instance
/// \param surface Created surface
/// \param allocator Allocator to use
///
/// \return True if surface creation was successful, false otherwise
///
////////////////////////////////////////////////////////////
CSFML_WINDOW_API sfBool sfWindow_createVulkanSurface(sfWindow* window, const VkInstance* instance, VkSurfaceKHR* surface, const VkAllocationCallbacks* allocator);
#endif // SFML_WINDOW_H