Skip to content

Commit

Permalink
Add API for sf::WindowBase
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisThrasher authored and eXpl0it3r committed Nov 19, 2023
1 parent d90cd6f commit e240141
Show file tree
Hide file tree
Showing 10 changed files with 768 additions and 64 deletions.
1 change: 1 addition & 0 deletions include/SFML/Window/Types.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
typedef struct sfContext sfContext;
typedef struct sfCursor sfCursor;
typedef struct sfWindow sfWindow;
typedef struct sfWindowBase sfWindowBase;


#endif // SFML_WINDOW_TYPES_H
15 changes: 15 additions & 0 deletions include/SFML/Window/Vulkan.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,21 @@
#include <SFML/Window/Export.h>


typedef struct VkInstance_T* VkInstance;

#if defined(__LP64__) || defined(_WIN64) || (defined(__x86_64__) && !defined(__ILP32__) ) || defined(_M_X64) || defined(__ia64) || defined (_M_IA64) || defined(__aarch64__) || defined(__powerpc64__)

typedef struct VkSurfaceKHR_T* VkSurfaceKHR;

#else

typedef uint64_t VkSurfaceKHR;

#endif

struct VkAllocationCallbacks;


typedef void (*sfVulkanFunctionPointer)();

////////////////////////////////////////////////////////////
Expand Down
18 changes: 2 additions & 16 deletions include/SFML/Window/Window.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,26 +31,12 @@
#include <SFML/Window/Export.h>
#include <SFML/Window/Event.h>
#include <SFML/Window/VideoMode.h>
#include <SFML/Window/WindowBase.h>
#include <SFML/Window/WindowHandle.h>
#include <SFML/Window/Types.h>
#include <SFML/System/Vector2.h>


////////////////////////////////////////////////////////////
/// \brief Enumeration of window creation styles
///
////////////////////////////////////////////////////////////
typedef enum
{
sfNone = 0, ///< No border / title bar (this flag and all others are mutually exclusive)
sfTitlebar = 1 << 0, ///< Title bar + fixed border
sfResize = 1 << 1, ///< Titlebar + resizable border + maximize button
sfClose = 1 << 2, ///< Titlebar + close button
sfFullscreen = 1 << 3, ///< Fullscreen mode (this flag and all others are mutually exclusive)
sfDefaultStyle = sfTitlebar | sfResize | sfClose ///< Default window style
} sfWindowStyle;


////////////////////////////////////////////////////////////
/// \brief Enumeration of the context attribute flags
///
Expand Down Expand Up @@ -406,7 +392,7 @@ CSFML_WINDOW_API void sfWindow_setFramerateLimit(sfWindow* window, unsigned int
/// \brief Change the joystick threshold
///
/// The joystick threshold is the value below which
/// no JoyMoved event will be generated.
/// no JoystickMoved event will be generated.
///
/// \param window Window object
/// \param threshold New threshold, in the range [0, 100]
Expand Down
Loading

0 comments on commit e240141

Please sign in to comment.