SDL3pp
A slim C++ wrapper for SDL3
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | List of all members
SDL::CursorRef Struct Reference

The structure used to identify an SDL cursor. More...

Inheritance diagram for SDL::CursorRef:
Inheritance graph
[legend]

Public Member Functions

constexpr Resource (T resource={})
 Constructs from the underlying resource.
 
constexpr Resource (const ResourceHandle< Resource< T > > auto &resource)
 Constructs from pointer like.
 
constexpr Resource (std::nullptr_t)
 Equivalent to default ctor.
 
constexpr Resource (std::nullopt_t)
 Equivalent to default ctor.
 
- Public Member Functions inherited from SDL::Resource< SDL_Cursor * >
constexpr Resource (SDL_Cursor * resource={})
 Constructs from the underlying resource.
 
constexpr Resource (const ResourceHandle< Resource< SDL_Cursor * > > auto &resource)
 Constructs from pointer like.
 
constexpr Resource (std::nullptr_t)
 Equivalent to default ctor.
 
constexpr Resource (std::nullopt_t)
 Equivalent to default ctor.
 
constexpr operator bool () const
 True if contains a valid resource.
 
constexpr operator value_type () const
 Converts back to underlying type.
 
constexpr bool operator== (const Resource &other) const=default
 Comparison.
 
constexpr bool operator== (std::nullopt_t) const
 Comparison.
 
constexpr bool operator== (std::nullptr_t) const
 Comparison.
 
constexpr SDL_Cursor * get () const
 Return contained resource;.
 
constexpr const SDL_Cursor * operator-> () const
 Access to fields.
 
constexpr SDL_Cursor * operator-> ()
 Access to fields.
 

Static Public Member Functions

static void reset (SDL_Cursor *resource)
 Free a previously-created cursor.
 

Additional Inherited Members

- Public Types inherited from SDL::Resource< SDL_Cursor * >
using value_type = SDL_Cursor *
 The raw resource type.
 

Detailed Description

This is opaque data.

Since
This struct is available since SDL 3.2.0.
Category:
Resource
See also
Cursor

Member Function Documentation

◆ reset()

static void SDL::CursorRef::reset ( SDL_Cursor *  resource)
inlinestatic

Use this function to free cursor resources created with Cursor.Create(), Cursor.CreateColor() or Cursor.CreateSystem().

Parameters
resourcethe cursor to free.
Thread safety:
This function should only be called on the main thread.
Since
This function is available since SDL 3.2.0.
See also
Cursor.CreateColor
Cursor.Create
Cursor.CreateSystem

The documentation for this struct was generated from the following file: