Skip to content

Adds an API to get standard cursor images #2780

@pmasschelier

Description

@pmasschelier

While it is possible to set one of the standard cursor to be the current cursor through glfwCreateStandardCursor, there is no way to get the underlying image (which is already retrieved internally by glfw for various implementations).

This feature would allow to have virtual cursors with a standard shape. For instance to implement sticky cursor.

My proposition is to add the getStandardCursorImage function pointer to the _GLFWplatform struct and implement this function for each WM

struct _GLFWplatform
{
    int platformID;
    // init
    GLFWbool (*init)(void);
    void (*terminate)(void);
    // input
    void (*getCursorPos)(_GLFWwindow*,double*,double*);
...
    GLFWbool (*getStandardCursorImage)(GLFWimage*,int);
...
};

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementFeature suggestions and PRs

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions