@@ -10,7 +10,7 @@ use objc2::{
1010 AllocAnyThread ,
1111} ;
1212use objc2_app_kit:: NSImage ;
13- use objc2_foundation:: { NSDictionary , NSPoint , NSString } ;
13+ use objc2_foundation:: { ns_string , NSDictionary , NSPoint , NSString } ;
1414use std:: {
1515 cell:: RefCell ,
1616 ffi:: { c_void, CString } ,
@@ -111,15 +111,15 @@ impl Cursor {
111111// instead you'll just get them all in a column.
112112pub unsafe fn load_webkit_cursor ( cursor_name : & str ) -> id {
113113 const CURSOR_ROOT : & str = "/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/HIServices.framework/Versions/A/Resources/cursors" ;
114- let cursor_root = NSString :: from_str ( CURSOR_ROOT ) ;
114+ let cursor_root = ns_string ! ( CURSOR_ROOT ) ;
115115 let cursor_name = NSString :: from_str ( cursor_name) ;
116- let cursor_pdf = NSString :: from_str ( "cursor.pdf" ) ;
117- let cursor_plist = NSString :: from_str ( "info.plist" ) ;
118- let key_x = NSString :: from_str ( "hotx" ) ;
119- let key_y = NSString :: from_str ( "hoty" ) ;
116+ let cursor_pdf = ns_string ! ( "cursor.pdf" ) ;
117+ let cursor_plist = ns_string ! ( "info.plist" ) ;
118+ let key_x = ns_string ! ( "hotx" ) ;
119+ let key_y = ns_string ! ( "hoty" ) ;
120120
121121 let cursor_path: Retained < NSString > =
122- msg_send ! [ & cursor_root, stringByAppendingPathComponent: & * cursor_name] ;
122+ msg_send ! [ cursor_root, stringByAppendingPathComponent: & * cursor_name] ;
123123 let pdf_path: Retained < NSString > =
124124 msg_send ! [ & cursor_path, stringByAppendingPathComponent: & * cursor_pdf] ;
125125 let info_path: Retained < NSString > =
0 commit comments