a1200   NEWS   APPS   DOCS   ABOUT
a1200
----
a1200
----
Autodocs
 Libraries:
 intuition.library
  ActivateGadget
  ActivateWindow
  AddClass
  AddGList
  AddGadget
  AllocRemember
  AllocScreenBuffer
  AutoRequest
  BeginRefresh
  BuildEasyRequestArgs
  BuildSysRequest
  ChangeScreenBuffer
  ChangeWindowBox
  ClearDMRequest
  ClearMenuStrip
  ClearPointer
  CloseScreen
  CloseWindow
  CloseWorkBench
  CurrentTime
  DisplayAlert
  DisplayBeep
  DisposeObject
  DoGadgetMethodA
  DoubleClick
  DrawBorder
  DrawImage
  DrawImageState
  EasyRequestArgs
  EndRefresh
  EndRequest
  EraseImage
  FreeClass
  FreeRemember
  FreeScreenBuffer
  FreeScreenDrawInfo
  FreeSysRequest
  GadgetMouse
  GetAttr
  GetDefPrefs
  GetDefaultPubScreen
  GetPrefs
  GetScreenData
  GetScreenDrawInfo
  HelpControl
  InitRequester
  IntuiTextLength
  ItemAddress
  LendMenus
  LockIBase
  LockPubScreen
  LockPubScreenList
  MakeClass
  MakeScreen
  ModifyIDCMP
  ModifyProp
  MoveScreen
  MoveWindow
  MoveWindowInFrontOf
  NewModifyProp
  NewObject
  NextObject
  NextPubScreen
  ObtainGIRPort
  OffGadget
  OffMenu
  OnGadget
  OnMenu
  OpenScreen
  OpenScreenTagList
  OpenWindow
  OpenWindowTagList
  OpenWorkBench
  PointInImage
  PrintIText
  PubScreenStatus
  QueryOverscan
  RefreshGList
  RefreshGadgets
  RefreshWindowFrame
  ReleaseGIRPort
  RemakeDisplay
  RemoveClass
  RemoveGList
  RemoveGadget
  ReportMouse
  Request
  ResetMenuStrip
  RethinkDisplay
  ScreenDepth
  ScreenPosition
  ScreenToBack
  ScreenToFront
  ScrollWindowRaster
  SetAttrsA
  SetDMRequest
  SetDefaultPubScreen
  SetEditHook
  SetGadgetAttrsA
  SetMenuStrip
  SetMouseQueue
  SetPointer
  SetPrefs
  SetPubScreenModes
  SetWindowPointerA
  SetWindowTitles
  ShowTitle
  SizeWindow
  SysReqHandler
  TimedDisplayAlert
  UnlockIBase
  UnlockPubScreen
  UnlockPubScreenList
  ViewAddress
  ViewPortAddress
  WBenchToBack
  WBenchToFront
  WindowLimits
  WindowToBack
  WindowToFront
  ZipWindow
Include
GuruMeditation
Docs » Autodocs » intuition.library » ReportMouse

NAME

	ReportMouse -- Tell Intuition whether to report mouse movement.

SYNOPSIS

	ReportMouse( Boolean, Window )
D0 A0 <-note
VOID ReportMouse( BOOL, struct Window * );
SPECIAL NOTE
Some compilers and link files switch the arguments to this function
about in unpredictable ways. We apologize for this confusion
wrapped around an error enclosing a mistake.
The call will take one of two forms:
ReportMouse(Boolean, Window);
-or-
ReportMouse(Window, (ULONG)Boolean);
The first form is the one that corresponds to the amiga.lib supplied
by Commodore. The linker libraries and "pragmas" of some compilers
supply the alternate form.
A key point to remember is that the form of the function in ROM
has always been the same, so there has always been object code
compatibility. However some care should be taken when switching
compilers or switching between stubs and pragmas.
From assembler the interface has always been:
Boolean in D0, Window in A0
Also, it is still endorsed to simply set the WFLG_REPORTMOUSE flag bit
in Window->Flags, or reset it, on your own. Make the operation
an atomic assembly instruction (OR.W #WFLG_REPORTMOUSE,wd_Flags+2(A0)
where A0 contains your window pointer). Most compilers will produce
an atomic operation when faced with:
Window->Flags |= WFLG_REPORTMOUSE;
Window->Flags &=~WFLG_REPORTMOUSE;
or else bracket the operation between Forbid()/Permit().

FUNCTION

	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.
Note also that calling ReportMouse() when no gadget is currently
selected will change the state of the window's WFLG_REPORTMOUSE flag,
but will have no effect on any gadget that may be subsequently
selected. (This is all fixed in V36.)
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.

INPUTS

	Window = pointer to a Window structure associated with this request
Boolean = TRUE or FALSE value specifying whether to turn this
function on or off

RESULT

	None

BUGS

	See above

SEE ALSO

The Input and Output section of the Intuition Reference Manual

Comments

Name:
E-mail: Use this if you want a message if you get a response, will not be shown.
Comment:
Select correct short for:

Spaceballs

SPB
AYS
PHA
DJ

Comments:

$VER: d0.se 1.14 Copyright © 2011-2024 Tobias Geijersson support at d0 dot se