Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
en:docs:fapi:mouregister [2021/10/06 13:19] – created prokushev | en:docs:fapi:mouregister [2022/09/01 14:58] (current) – prokushev | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | {{page> | ||
+ | |||
+ | ====== MouRegister ====== | ||
+ | |||
This call registers a mouse subsystem within a session. | This call registers a mouse subsystem within a session. | ||
- | ==Syntax== | + | ===== Syntax ===== |
+ | <code c> | ||
| | ||
+ | </ | ||
- | ==Parameters== | + | ===== Parameters ===== |
- | ;ModuleName (PSZ) - input : Address of the dynamic link module name. The maximum length is 9 bytes (including ASCIIZ terminator). | + | |
- | ;EntryName (PSZ) - input : Address of the dynamic link entry point name of a routine that receives control when any of the registered functions are called. The maximum length is 33 bytes (including ASCIIZ terminator). | + | |
- | ;Mask (ULONG) - input : A mask of bits, where each bit set to 1 identifies a mouse function being registered. | + | |
+ | | ||
+ | |||
+ | ===== Return Code ===== | ||
+ | |||
+ | rc (USHORT) - return: | ||
+ | |||
+ | * 0 NO_ERROR | ||
+ | *385 ERROR_MOUSE_NO_DEVICE | ||
+ | *413 ERROR_MOUSE_INVALID_ASCIIZ | ||
+ | *414 ERROR_MOUSE_INVALID_MASK | ||
+ | *415 ERROR_MOUSE_REGISTER | ||
+ | *466 ERROR_MOU_DETACHED | ||
+ | *505 ERROR_MOU_EXTENDED_SG | ||
+ | |||
+ | ===== Remarks ===== | ||
- | ==Return Code== | ||
- | ;rc (USHORT) - return: | ||
- | * 0 NO_ERROR | ||
- | *385 ERROR_MOUSE_NO_DEVICE | ||
- | *413 ERROR_MOUSE_INVALID_ASCIIZ | ||
- | *414 ERROR_MOUSE_INVALID_MASK | ||
- | *415 ERROR_MOUSE_REGISTER | ||
- | *466 ERROR_MOU_DETACHED | ||
- | *505 ERROR_MOU_EXTENDED_SG | ||
- | ==Remarks== | ||
The Base Mouse Subsystem is the default mouse subsystem. There can be only one MouRegister outstanding for each session without an intervening MouDeRegister. MouDeRegister must be issued by the same process that issued MouRegister. | The Base Mouse Subsystem is the default mouse subsystem. There can be only one MouRegister outstanding for each session without an intervening MouDeRegister. MouDeRegister must be issued by the same process that issued MouRegister. | ||
When any registered function is called, control is routed to EntryName. When this routine is entered, four additional values are pushed onto the stack. The first is the index number (Word) of the function being called. The second is a near pointer (Word). The third is the caller' | When any registered function is called, control is routed to EntryName. When this routine is entered, four additional values are pushed onto the stack. The first is the index number (Word) of the function being called. The second is a near pointer (Word). The third is the caller' | ||
+ | |||
+ | <code asm> | ||
PUSH@ WORD NumberOfMickeys | PUSH@ WORD NumberOfMickeys | ||
| | ||
Line 30: | Line 43: | ||
| | ||
| | ||
+ | </ | ||
+ | |||
When a registered function returns to the Mouse Router, AX is interpreted as follows: | When a registered function returns to the Mouse Router, AX is interpreted as follows: | ||
- | AX = 0 No error. Do not invoke the Base Mouse Subsystem routine. Return AX = 0. | + | |
- | AX = -1 | + | * AX = 0 No error. Do not invoke the Base Mouse Subsystem routine. Return AX = 0. |
- | AX = error (if not 0 or -1) Do not invoke the Base Mouse Subsystem Routine. Return AX = error. | + | |
+ | | ||
When the mouse router receives a mouse call, it routes it to the Base Mouse Subsystem unless an application or other mouse subsystem has previously issued MouRegister for that call. If the call was registered, the subsystem is entered at the EntryName specified, and provided with the applicable function code. | When the mouse router receives a mouse call, it routes it to the Base Mouse Subsystem unless an application or other mouse subsystem has previously issued MouRegister for that call. If the call was registered, the subsystem is entered at the EntryName specified, and provided with the applicable function code. | ||
Line 39: | Line 56: | ||
The following list shows the relationship of the mouse API calls and the Function Code passed to either the Base Mouse Subsystem or a registered mouse subsystem. | The following list shows the relationship of the mouse API calls and the Function Code passed to either the Base Mouse Subsystem or a registered mouse subsystem. | ||
- | {|class=" | + | |
- | !MOU API calls||Function Code||Function Mask | + | ^ MOU API calls ^ Function Code ^ Function Mask ^ |
- | |- | + | |[[en: |
- | |MouGetNumButtons||00H||00000001H | + | |[[en: |
- | |- | + | |[[en: |
- | |MouGetNumMickeys||01H||00000002H | + | |[[en: |
- | |- | + | |[[en: |
- | |MouGetDevStatus||02H||00000004H | + | |[[en: |
- | |- | + | |[[en: |
- | |MouGetNumQueEl||03H||00000008H | + | |[[en: |
- | |- | + | |[[en: |
- | |MouReadEventQue||04H||00000010H | + | |[[en: |
- | |- | + | |[[en: |
- | |MouGetScaleFact||05H||00000020H | + | |[[en: |
- | |- | + | |[[en: |
- | |MouGetEventMask||06H||00000040H | + | |[[en: |
- | |- | + | |[[en: |
- | |MouSetScaleFact||07H||00000080H | + | |[[en: |
- | |- | + | |[[en: |
- | |MouSetEventMask||08H||00000100H | + | |[[en: |
- | |- | + | |[[en: |
- | |MouGetHotKey||09H||00000200H | + | |[[en: |
- | |- | + | |[[en: |
- | |MouSetHotKey||0AH||00000400H | + | |[[en: |
- | |- | + | |
- | |MouOpen||0BH||00000800H | + | |
- | |- | + | |
- | |MouClose||0CH||00001000H | + | |
- | |- | + | |
- | |MouGetPtrShape||0DH||00002000H | + | |
- | |- | + | |
- | |MouSetPtrShape||0EH||00004000H | + | |
- | |- | + | |
- | |MouDrawPtr||0FH||00008000H | + | |
- | |- | + | |
- | |MouRemovePtr||10H||00010000H | + | |
- | |- | + | |
- | |MouGetPtrPos||11H||00020000H | + | |
- | |- | + | |
- | |MouSetPtrPos||12H||00040000H | + | |
- | |- | + | |
- | |MouInitReal||13H||00080000H | + | |
- | |- | + | |
- | |MouFlushQue||14H||00100000H | + | |
- | |- | + | |
- | |MouSetDevStatus||15H|| | + | |
- | |} | + | |
A registered mouse sybsystem must leave the stack, on exit, in the exact state it was received. | A registered mouse sybsystem must leave the stack, on exit, in the exact state it was received. | ||
- | ==Bindings== | + | ===== Bindings |
- | ===C=== | + | |
- | <PRE> | + | ====C==== |
+ | <code c> | ||
#define INCL_MOU | #define INCL_MOU | ||
Line 100: | Line 96: | ||
USHORT | USHORT | ||
- | </PRE> | + | </code> |
- | ===MASM=== | + | ====MASM==== |
- | <PRE> | + | <code asm> |
EXTRN | EXTRN | ||
INCL_MOU | INCL_MOU | ||
Line 113: | Line 109: | ||
Returns WORD | Returns WORD | ||
- | </PRE> | + | </code> |
+ | |||
+ | ===== Related Functions ===== | ||
- | ==Related Functions== | + | [[MouDeRegister]] |
- | * [[MouDeRegister]] | + | |
- | [[Category:Mou]] | + | {{page> |