@@ -677,10 +677,12 @@ impl CGEvent {
677
677
678
678
#[ cfg_attr( feature = "link" , link( name = "CoreGraphics" , kind = "framework" ) ) ]
679
679
extern "C" {
680
- /// Return the type identifier for the opaque type `CGEventRef'.
680
+ /// Return the type identifier for the opaque type [`CGEventRef`].
681
+ ///
682
+ /// [`CGEventRef`]: crate::sys::CGEventRef
681
683
fn CGEventGetTypeID ( ) -> CFTypeID ;
682
684
683
- /// Return a new event using the event source `source' . If `source' is NULL,
685
+ /// Return a new event using the event source `source` . If `source` is NULL,
684
686
/// the default source is used.
685
687
fn CGEventCreate ( source : crate :: sys:: CGEventSourceRef ) -> crate :: sys:: CGEventRef ;
686
688
@@ -703,11 +705,11 @@ extern "C" {
703
705
/// Return a new mouse event.
704
706
///
705
707
/// The event source may be taken from another event, or may be NULL.
706
- /// `mouseType' should be one of the mouse event types. `mouseCursorPosition'
708
+ /// `mouseType` should be one of the mouse event types. `mouseCursorPosition`
707
709
/// should be the position of the mouse cursor in global coordinates.
708
- /// `mouseButton' should be the button that's changing state; `mouseButton'
709
- /// is ignored unless `mouseType' is one of `kCGEventOtherMouseDown' ,
710
- /// `kCGEventOtherMouseDragged' , or `kCGEventOtherMouseUp' .
710
+ /// `mouseButton` should be the button that's changing state; `mouseButton`
711
+ /// is ignored unless `mouseType` is one of `kCGEventOtherMouseDown` ,
712
+ /// `kCGEventOtherMouseDragged` , or `kCGEventOtherMouseUp` .
711
713
///
712
714
/// The current implementation of the event system supports a maximum of
713
715
/// thirty-two buttons. Mouse button 0 is the primary button on the mouse.
@@ -720,7 +722,7 @@ extern "C" {
720
722
mouseButton : CGMouseButton ,
721
723
) -> crate :: sys:: CGEventRef ;
722
724
723
- /// A non-variadic variant version of CGEventCreateScrollWheelEvent.
725
+ /// A non-variadic variant version of [` CGEventCreateScrollWheelEvent`] .
724
726
///
725
727
/// Returns a new Quartz scrolling event.
726
728
///
@@ -756,7 +758,9 @@ extern "C" {
756
758
fn CGEventGetFlags ( event : crate :: sys:: CGEventRef ) -> CGEventFlags ;
757
759
758
760
/// Return the location of an event in global display coordinates.
759
- /// CGPointZero is returned if event is not a valid crate::sys::CGEventRef.
761
+ /// `CGPointZero` is returned if event is not a valid [`CGEventRef`].
762
+ ///
763
+ /// [`CGEventRef`]: crate::sys::CGEventRef
760
764
fn CGEventGetLocation ( event : crate :: sys:: CGEventRef ) -> CGPoint ;
761
765
762
766
/// Set the event type of an event.
@@ -785,13 +789,13 @@ extern "C" {
785
789
/// Set the integer value of a field in an event.
786
790
///
787
791
/// Before calling this function, the event type must be set using a typed
788
- /// event creation function such as `CGEventCreateMouseEvent' , or by
789
- /// calling `CGEventSetType' .
792
+ /// event creation function such as [ `CGEventCreateMouseEvent`] , or by
793
+ /// calling [ `CGEventSetType`] .
790
794
///
791
795
/// If you are creating a mouse event generated by a tablet, call this
792
- /// function and specify the field `kCGMouseEventSubtype' with a value of
793
- /// `kCGEventMouseSubtypeTabletPoint' or
794
- /// `kCGEventMouseSubtypeTabletProximity' before setting other parameters.
796
+ /// function and specify the field `kCGMouseEventSubtype` with a value of
797
+ /// `kCGEventMouseSubtypeTabletPoint` or
798
+ /// `kCGEventMouseSubtypeTabletProximity` before setting other parameters.
795
799
fn CGEventSetIntegerValueField ( event : crate :: sys:: CGEventRef , field : CGEventField , value : i64 ) ;
796
800
797
801
/// Return the floating-point value of a field in an event.
@@ -804,8 +808,8 @@ extern "C" {
804
808
/// Set the floating-point value of a field in an event.
805
809
///
806
810
/// Before calling this function, the event type must be set using a typed
807
- /// event creation function such as `CGEventCreateMouseEvent' , or by calling
808
- /// `CGEventSetType' .
811
+ /// event creation function such as [ `CGEventCreateMouseEvent`] , or by calling
812
+ /// [ `CGEventSetType`] .
809
813
///
810
814
/// In cases where the field’s value is represented within the event by a
811
815
/// fixed point number or integer, the value parameter is scaled as needed
0 commit comments