CSFML - C binding of the Simple and Fast Multimedia Library

CSFML 3.0.0

- Main Page
- Classes
- Files

- File List
- File Members

Loading...
Searching...
No Matches
Cursor.h
Go to the documentation of this file.
1
2//
3// SFML - Simple and Fast Multimedia Library
4// Copyright (C) 2007-2024 Laurent Gomila (laurent@sfml-dev.org)
5//
6// This software is provided 'as-is', without any express or implied warranty.
7// In no event will the authors be held liable for any damages arising from the use of this software.
8//
9// Permission is granted to anyone to use this software for any purpose,
10// including commercial applications, and to alter it and redistribute it freely,
11// subject to the following restrictions:
12//
13// 1. The origin of this software must not be misrepresented;
14// you must not claim that you wrote the original software.
15// If you use this software in a product, an acknowledgment
16// in the product documentation would be appreciated but is not required.
17//
18// 2. Altered source versions must be plainly marked as such,
19// and must not be misrepresented as being the original software.
20//
21// 3. This notice may not be removed or altered from any source distribution.
22//
24
25#pragma once
26
28// Headers
30#include <CSFML/Window/Export.h>
31
32#include <CSFML/System/Vector2.h>
33#include <CSFML/Window/Types.h>
34
35
67 typedef enum
68{
69 sfCursorArrow,
70 sfCursorArrowWait,
71 sfCursorWait,
72 sfCursorText,
73 sfCursorHand,
74 sfCursorSizeHorizontal,
75 sfCursorSizeVertical,
76 sfCursorSizeTopLeftBottomRight,
77 sfCursorSizeBottomLeftTopRight,
78 sfCursorSizeLeft,
79 sfCursorSizeRight,
80 sfCursorSizeTop,
81 sfCursorSizeBottom,
82 sfCursorSizeTopLeft,
83 sfCursorSizeBottomRight,
84 sfCursorSizeBottomLeft,
85 sfCursorSizeTopRight,
86 sfCursorSizeAll,
87 sfCursorCross,
88 sfCursorHelp,
89 sfCursorNotAllowed
90} sfCursorType;
91
92
120 CSFML_WINDOW_API sfCursor* sfCursor_createFromPixels(const uint8_t* pixels, sfVector2u size, sfVector2u hotspot);
121
122
135 CSFML_WINDOW_API sfCursor* sfCursor_createFromSystem(sfCursorType type);
136
137
144 CSFML_WINDOW_API void sfCursor_destroy(const sfCursor* cursor);
sfCursor_createFromSystem
sfCursor * sfCursor_createFromSystem(sfCursorType type)
Create a native system cursor.
sfCursor_createFromPixels
sfCursor * sfCursor_createFromPixels(const uint8_t *pixels, sfVector2u size, sfVector2u hotspot)
Create a cursor with the provided image.
sfCursor_destroy
void sfCursor_destroy(const sfCursor *cursor)
Destroy a cursor.
sfCursorType
sfCursorType
Enumeration of the native system cursor types.
Definition Cursor.h:68
sfCursorSizeVertical
@ sfCursorSizeVertical
Vertical double arrow cursor.
Definition Cursor.h:75
sfCursorHand
@ sfCursorHand
Pointing hand cursor.
Definition Cursor.h:73
sfCursorNotAllowed
@ sfCursorNotAllowed
Action not allowed cursor.
Definition Cursor.h:89
sfCursorWait
@ sfCursorWait
Busy cursor.
Definition Cursor.h:71
sfCursorSizeBottomLeftTopRight
@ sfCursorSizeBottomLeftTopRight
Double arrow cursor going from bottom-left to top-right.
Definition Cursor.h:77
sfCursorSizeTop
@ sfCursorSizeTop
Up arrow cursor on Linux, same as SizeVertical on other platforms.
Definition Cursor.h:80
sfCursorCross
@ sfCursorCross
Crosshair cursor.
Definition Cursor.h:87
sfCursorSizeLeft
@ sfCursorSizeLeft
Left arrow cursor on Linux, same as SizeHorizontal on other platforms.
Definition Cursor.h:78
sfCursorSizeRight
@ sfCursorSizeRight
Right arrow cursor on Linux, same as SizeHorizontal on other platforms.
Definition Cursor.h:79
sfCursorHelp
@ sfCursorHelp
Help cursor.
Definition Cursor.h:88
sfCursorSizeTopLeft
@ sfCursorSizeTopLeft
Top-left arrow cursor on Linux, same as SizeTopLeftBottomRight on other platforms.
Definition Cursor.h:82
sfCursorSizeTopLeftBottomRight
@ sfCursorSizeTopLeftBottomRight
Double arrow cursor going from top-left to bottom-right.
Definition Cursor.h:76
sfCursorArrowWait
@ sfCursorArrowWait
Busy arrow cursor.
Definition Cursor.h:70
sfCursorArrow
@ sfCursorArrow
Arrow cursor (default)
Definition Cursor.h:69
sfCursorSizeTopRight
@ sfCursorSizeTopRight
Top-right arrow cursor on Linux, same as SizeBottomLeftTopRight on other platforms.
Definition Cursor.h:85
sfCursorSizeBottomRight
@ sfCursorSizeBottomRight
Bottom-right arrow cursor on Linux, same as SizeTopLeftBottomRight on other platforms.
Definition Cursor.h:83
sfCursorSizeHorizontal
@ sfCursorSizeHorizontal
Horizontal double arrow cursor.
Definition Cursor.h:74
sfCursorSizeBottomLeft
@ sfCursorSizeBottomLeft
Bottom-left arrow cursor on Linux, same as SizeBottomLeftTopRight on other platforms.
Definition Cursor.h:84
sfCursorText
@ sfCursorText
I-beam, cursor when hovering over a field allowing text entry.
Definition Cursor.h:72
sfCursorSizeAll
@ sfCursorSizeAll
Combination of SizeHorizontal and SizeVertical.
Definition Cursor.h:86
sfCursorSizeBottom
@ sfCursorSizeBottom
Down arrow cursor on Linux, same as SizeVertical on other platforms.
Definition Cursor.h:81
Vector2.h
Export.h
CSFML_WINDOW_API
#define CSFML_WINDOW_API
Definition Window/Export.h:42
Types.h
sfCursor
struct sfCursor sfCursor
Definition Window/Types.h:29
sfVector2u
2-component vector of unsigned integers
Definition Vector2.h:49