Unit 'intuition' Package
[Overview][Constants][Types][Procedures and functions][Variables][Index] [#amunits]

ReportMouse

Tell Intuition whether to report mouse movement.

Declaration

Source position: intuition.pas line 4156

procedure ReportMouse(

  flag: LongInt;

  window: pWindow

);

Arguments

flag

  

True (-1) or False (0) value specifying whether to turn this function on or off

window

  

A pointer to a Window structure associated with this request

Description

Tells Intuition whether or not to broadcast mouse-movement events to your window when it's the active one. The Boolean value specifies whether to start or stop broadcasting position information of mouse-movement. If the window is the active one, mouse-movement reports start coming immediately afterwards. This same routine will change the current state of the GACT_FOLLOWMOUSE function of a currently-selected gadget too.

Note that calling ReportMouse() when a gadget is selected will only temporarily change whether or not mouse movements are reported while that gadget remains selected; the next time the gadget is selected, its GACT_FOLLOWMOUSE flag is examined anew.

The ReportMouse() function is first performed when OpenWindow() is first called; if the flag WFLG_REPORTMOUSE is included among the options, then all mouse-movement events are reported to the opening task and will continue to be reported until ReportMouse() is called with a Boolean value of FALSE. If WFLG_REPORTMOUSE is not set, then no mouse-movement reports will be broadcast until ReportMouse() is called with a Boolean of True.

Note that the WFLG_REPORTMOUSE flag, as managed by this routine, determines if mouse messages are to be broadcast. Determining how they are to be broadcast is determined by the IDCMP_MOUSEMOVE IDCMPFlag.


Documentation generated on: 2021-07-30