MCPcopy Create free account
hub / github.com/RustAudio/baseview / load

Method load

src/platform/macos/cursor.rs:73–92  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

71
72impl Cursor {
73 pub fn load(&self) -> Retained<NSCursor> {
74 match self {
75 Cursor::Native(loader) => loader(),
76 Cursor::Undocumented(sel) => {
77 let class = NSCursor::class();
78
79 // NOTE: class.responds_to does not yield the same result (probably because NSCursor overrides respondsToSelector)
80 let responds_to: bool = unsafe { msg_send![class, respondsToSelector: *sel] };
81
82 if !responds_to {
83 return NSCursor::arrowCursor();
84 }
85
86 let raw: *mut NSCursor = unsafe { class.send_message(*sel, ()) };
87 let cursor = unsafe { Retained::retain(raw) };
88
89 cursor.unwrap_or_else(NSCursor::arrowCursor)
90 }
91 }
92 }
93}

Callers 13

closeMethod · 0.45
fmtMethod · 0.45
newMethod · 0.45
closeMethod · 0.45
resizeMethod · 0.45
request_closeMethod · 0.45
has_focusMethod · 0.45
focusMethod · 0.45
resizeMethod · 0.45
set_mouse_cursorMethod · 0.45
gl_contextMethod · 0.45
is_openMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected