home *** CD-ROM | disk | FTP | other *** search
/ The Fred Fish Collection 1.5 / ffcollection-1-5-1992-11.iso / ff_disks / 200-299 / ff258.lzh / DMouse / dmouse-ipc.doc < prev    next >
Text File  |  1989-10-18  |  2KB  |  66 lines

  1.  
  2.     Talking to DMouse.
  3.  
  4.     DMouse listens on the "DMouse.ipc" port.  To send a message, setup an
  5.     IORequest structure with the appropriate command and then
  6.     FindPort()/PutMsg() atomically, then wait for the request to be returned
  7.     to the reply port specified in the request.
  8.  
  9.     *** REFER TO THE EXAMPLE BLANKER.C FOR USAGE
  10.  
  11.     DMCMD_MOUSEON    turn on mouse        (io_Command 0x80)
  12.     DMCMD_MOUSEOFF    turn off mouse            0x81
  13.     DMCMD_SCREENON    turn on screen            0x82
  14.     DMCMD_SCREENOFF    turn off screen         0x83
  15.  
  16.     DMCMD_ADDHANDLER    io_Message.mn_ReplyPort     0x84
  17.             contains port to send
  18.             msgs to.
  19.  
  20.     DNCMD_REMHANDLER    io_Message.mn_ReplyPort     0x85
  21.             contains port to stop
  22.             sending msgs to.
  23.  
  24.     DNCMD_PLEASEREMOVE    (DMouse->blanker)               0x86
  25.  
  26.  
  27.     DNCMD_ADDHANDLER:
  28.     io_Unit contains a magic cookie used to identify the handler and should
  29.     be set to some unique memory address (no accesses are actually made,
  30.     its just an identifier.
  31.  
  32.     io_Flags contains a bitmap of things our blanker can handle:
  33.     0x03    we can handle mouse blanking
  34.     0x0C    we can handle screen blanking
  35.     0x0F    we can handle both
  36.  
  37.     The request is NOT returned until you send a DNCMD_REMHANDLER request.
  38.     If DMouse is killed it will sent a DNCMD_PLEASEREMOVE (0x86) packet to
  39.     all active handlers and expect them to remove their handlers with a
  40.     DNCMD_REMHANDLER request.
  41.  
  42.     NOTE:    You may run multiple blankers.    DMouse will send requests to
  43.     ALL active handlers.
  44.  
  45.     DNCMD_REMHANDLER:
  46.     io_Unit contains a magic cookie that identifies which handler to remove.
  47.     The request is returned and then the original DNCMD_ADDHANDLER request
  48.     will be returned to you.  You can still receive DMouse commands up until
  49.     you finally get the original DNCMD_ADDHANDLER request back.
  50.  
  51.     on return, io_Error is 0 on success, -1 on failure.
  52.  
  53.     DNCMD_PLEASEREMOVE:
  54.     DMouse sends this to you asking you to remove your handler.  If you
  55.     receive this packet you must remove your handler with DNCMD_REMHANDLER.
  56.  
  57.  
  58.     DNCMD_MOUSEON,MOUSEOFF,SCREENON, SCREENOFF and PLEASEREMOVE commands
  59.     will be sent to the port specified in DNCMD_ADDHANDLER while it is
  60.     active and are expected to be returned to the DMouse handler.  You can
  61.     differentiate packets sourced by DMouse and packets sourced by you by
  62.     looking at the mn_Node.ln_Type field.  If it is NT_MESSAGE it was
  63.     sourced by DMouse, else it was sourced by you and replied by DMouse.
  64.  
  65.  
  66.