Add mouse cursor support
Add a new api, window.set_cursor, for setting the cursor. The enum MouseCursor lists the possible cursors. Only X11 is implemented. On OSX, Android, & Win32 the window.set_cursor function either does nothing or calls the "unimplemented!" macro.
This commit is contained in:
parent
318f0d2d06
commit
b532b8c65f
9 changed files with 174 additions and 3 deletions
|
|
@ -1384,6 +1384,7 @@ extern "C" {
|
|||
#[link(name = "GL")]
|
||||
#[link(name = "X11")]
|
||||
#[link(name = "Xxf86vm")]
|
||||
#[link(name = "Xcursor")]
|
||||
extern "C" {
|
||||
pub fn XCloseDisplay(display: *mut Display);
|
||||
pub fn XCheckMaskEvent(display: *mut Display, event_mask: libc::c_long,
|
||||
|
|
@ -1454,6 +1455,9 @@ extern "C" {
|
|||
x: libc::c_int, y: libc::c_int) -> Bool;
|
||||
pub fn XF86VidModeGetAllModeLines(dpy: *mut Display, screen: libc::c_int,
|
||||
modecount_return: *mut libc::c_int, modesinfo: *mut *mut *mut XF86VidModeModeInfo) -> Bool;
|
||||
|
||||
pub fn XcursorLibraryLoadCursor(dpy: *mut Display, name: *const libc::c_char) -> Cursor;
|
||||
pub fn XDefineCursor(dby: *mut Display, w: Window, cursor: Cursor);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue