@@ -4215,6 +4215,115 @@ impl NSNib for id {
42154215 }
42164216}
42174217
4218+ pub trait NSCursor : Sized {
4219+ unsafe fn alloc ( _: Self ) -> id ;
4220+ unsafe fn current_cursor ( _: Self ) -> id ;
4221+ unsafe fn current_system_cursor ( _: Self ) -> id ;
4222+ unsafe fn arrow_cursor ( _: Self ) -> id ;
4223+ unsafe fn contextual_menu_cursor ( _: Self ) -> id ;
4224+ unsafe fn closed_hand_cursor ( _: Self ) -> id ;
4225+ unsafe fn crosshair_cursor ( _: Self ) -> id ;
4226+ unsafe fn disappearing_item_cursor ( _: Self ) -> id ;
4227+ unsafe fn drag_copy_cursor ( _: Self ) -> id ;
4228+ unsafe fn drag_link_cursor ( _: Self ) -> id ;
4229+ unsafe fn i_beam_cursor ( _: Self ) -> id ;
4230+ unsafe fn open_hand_cursor ( _: Self ) -> id ;
4231+ unsafe fn operation_not_allowed_cursor ( _: Self ) -> id ;
4232+ unsafe fn pointing_hand_cursor ( _: Self ) -> id ;
4233+ unsafe fn resize_down_cursor ( _: Self ) -> id ;
4234+ unsafe fn resize_left_cursor ( _: Self ) -> id ;
4235+ unsafe fn resize_left_right_cursor ( _: Self ) -> id ;
4236+ unsafe fn resize_right_cursor ( _: Self ) -> id ;
4237+ unsafe fn resize_up_cursor ( _: Self ) -> id ;
4238+ unsafe fn resize_up_down_cursor ( _: Self ) -> id ;
4239+ unsafe fn i_beam_cursor_for_vertical_layout ( _: Self ) -> id ;
4240+ }
4241+
4242+ impl NSCursor for id {
4243+ unsafe fn alloc ( _: Self ) -> id {
4244+ msg_send ! [ class!( NSCursor ) , alloc]
4245+ }
4246+
4247+ unsafe fn current_cursor ( _: Self ) -> id {
4248+ msg_send ! [ class!( NSCursor ) , currentCursor]
4249+ }
4250+
4251+ unsafe fn current_system_cursor ( _: Self ) -> id {
4252+ msg_send ! [ class!( NSCursor ) , currentSystemCursor]
4253+ }
4254+
4255+ unsafe fn arrow_cursor ( _: Self ) -> id {
4256+ msg_send ! [ class!( NSCursor ) , arrowCursor]
4257+ }
4258+
4259+ unsafe fn contextual_menu_cursor ( _: Self ) -> id {
4260+ msg_send ! [ class!( NSCursor ) , contextualMenuCursor]
4261+ }
4262+
4263+ unsafe fn closed_hand_cursor ( _: Self ) -> id {
4264+ msg_send ! [ class!( NSCursor ) , closedHandCursor]
4265+ }
4266+
4267+ unsafe fn crosshair_cursor ( _: Self ) -> id {
4268+ msg_send ! [ class!( NSCursor ) , crosshairCursor]
4269+ }
4270+
4271+ unsafe fn disappearing_item_cursor ( _: Self ) -> id {
4272+ msg_send ! [ class!( NSCursor ) , disappearingItemCursor]
4273+ }
4274+
4275+ unsafe fn drag_copy_cursor ( _: Self ) -> id {
4276+ msg_send ! [ class!( NSCursor ) , dragCopyCursor]
4277+ }
4278+
4279+ unsafe fn drag_link_cursor ( _: Self ) -> id {
4280+ msg_send ! [ class!( NSCursor ) , dragLinkCursor]
4281+ }
4282+
4283+ unsafe fn i_beam_cursor ( _: Self ) -> id {
4284+ msg_send ! [ class!( NSCursor ) , IBeamCursor ]
4285+ }
4286+
4287+ unsafe fn open_hand_cursor ( _: Self ) -> id {
4288+ msg_send ! [ class!( NSCursor ) , openHandCursor]
4289+ }
4290+
4291+ unsafe fn operation_not_allowed_cursor ( _: Self ) -> id {
4292+ msg_send ! [ class!( NSCursor ) , operationNotAllowedCursor]
4293+ }
4294+
4295+ unsafe fn pointing_hand_cursor ( _: Self ) -> id {
4296+ msg_send ! [ class!( NSCursor ) , pointingHandCursor]
4297+ }
4298+
4299+ unsafe fn resize_down_cursor ( _: Self ) -> id {
4300+ msg_send ! [ class!( NSCursor ) , resizeDownCursor]
4301+ }
4302+
4303+ unsafe fn resize_left_cursor ( _: Self ) -> id {
4304+ msg_send ! [ class!( NSCursor ) , resizeLeftCursor]
4305+ }
4306+
4307+ unsafe fn resize_left_right_cursor ( _: Self ) -> id {
4308+ msg_send ! [ class!( NSCursor ) , resizeLeftRightCursor]
4309+ }
4310+
4311+ unsafe fn resize_right_cursor ( _: Self ) -> id {
4312+ msg_send ! [ class!( NSCursor ) , resizeRightCursor]
4313+ }
4314+
4315+ unsafe fn resize_up_cursor ( _: Self ) -> id {
4316+ msg_send ! [ class!( NSCursor ) , resizeUpCursor]
4317+ }
4318+
4319+ unsafe fn resize_up_down_cursor ( _: Self ) -> id {
4320+ msg_send ! [ class!( NSCursor ) , resizeUpDownCursor]
4321+ }
4322+
4323+ unsafe fn i_beam_cursor_for_vertical_layout ( _: Self ) -> id {
4324+ msg_send ! [ class!( NSCursor ) , IBeamCursorForVerticalLayout ]
4325+ }
4326+ }
42184327
42194328#[ cfg( test) ]
42204329mod test {
0 commit comments