This repository has been archived by the owner on Feb 11, 2021. It is now read-only.
/
SDL_amigamouse.c
85 lines (69 loc) · 2.22 KB
1
2
/*
SDL - Simple DirectMedia Layer
3
Copyright (C) 1997-2006 Sam Lantinga
4
5
This library is free software; you can redistribute it and/or
6
modify it under the terms of the GNU Lesser General Public
7
License as published by the Free Software Foundation; either
8
version 2.1 of the License, or (at your option) any later version.
9
10
11
12
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13
Lesser General Public License for more details.
14
15
16
17
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
18
19
Sam Lantinga
20
slouken@libsdl.org
21
*/
22
#include "SDL_config.h"
23
24
#include "SDL_mouse.h"
25
26
#include "../../events/SDL_events_c.h"
#include "../SDL_cursor_c.h"
27
28
29
30
31
#include "SDL_amigamouse_c.h"
/* The implementation dependent data for the window manager cursor */
32
typedef void *WMCursor;
33
34
void
35
amiga_FreeWMCursor(_THIS, WMcursor * cursor)
36
37
38
{
}
39
WMcursor *
40
41
42
amiga_CreateWMCursor(_THIS,
Uint8 * data, Uint8 * mask, int w, int h, int hot_x,
int hot_y)
43
{
44
return (WMcursor *) 1; // Amiga has an Hardware cursor, so it's ok to return something unuseful but true
45
46
}
47
int
48
amiga_ShowWMCursor(_THIS, WMcursor * cursor)
49
{
50
51
52
53
/* Don't do anything if the display is gone */
if (SDL_Display == NULL) {
return (0);
}
54
55
/* Set the Amiga prefs cursor cursor, or blank if cursor is NULL */
56
57
if (SDL_Window) {
58
SDL_Lock_EventThread();
59
60
if (cursor == NULL) {
if (SDL_BlankCursor != NULL) {
61
// Hide cursor HERE
62
SetPointer(SDL_Window, (UWORD *) SDL_BlankCursor, 1, 1, 0, 0);
63
64
}
} else {
65
// Show cursor
66
ClearPointer(SDL_Window);
67
}
68
SDL_Unlock_EventThread();
69
70
}
return (1);
71
72
}
73
void
74
amiga_WarpWMCursor(_THIS, Uint16 x, Uint16 y)
75
76
77
78
79
{
/* FIXME: Not implemented */
}
/* Check to see if we need to enter or leave mouse relative mode */
80
void
81
amiga_CheckMouseMode(_THIS)
82
83
{
}
84
85
/* vi: set ts=4 sw=4 expandtab: */