Xiqual 0.9.1

In file include/iarea.h:

typedef struct inputarea

An inputarea for testing mouse and other controllers in specific screen coordinates.

[more]struct inputarea *next
Next area if in a list-
[more]struct inputarea *prev
Previous area if in a list
[more]char* name
The optional name.
[more]void* data
User-definable data.
[more]int x
X coordinate of upper left corner
[more]int y
Y coordinate of upper left corner
[more]int w
Width of rectangle
[more]int h
Height of rectangle
[more]void (*lmbfunc)(void* )
Left mousebutton activation
[more]void (*mmbfunc)(void* )
Middle mousebutton activation
[more]void (*rmbfunc)(void* )
Right mousebutton activation
[more]void (*pfunc)(void* )
Mouse passing over without buttons pressed
[more]ulong inputs
Mask of controllers to respond to.
[more]ulong id
Mandatory ID.
[more]Uint8 mb
Mousebutton mask.
[more]Uint8 jb
Mask of joybuttons.
[more]Uint32 tick
Point when this inputarea was last activated.
[more]Uint32 delay
Delay in milliseconds before allowing another activation.



Documentation

An inputarea for testing mouse and other controllers in specific screen coordinates. The inputarea gets its function hooks filled from the tags supplied by iarea_new().
ostruct inputarea *next
Next area if in a list-

ostruct inputarea *prev
Previous area if in a list

ochar* name
The optional name. Little used, but could allow associating areas by name if they're all part of a complex gadget.

ovoid* data
User-definable data. Passed on to all the activation hooks.

oint x
X coordinate of upper left corner

oint y
Y coordinate of upper left corner

oint w
Width of rectangle

oint h
Height of rectangle

ovoid (*lmbfunc)(void* )
Left mousebutton activation

ovoid (*mmbfunc)(void* )
Middle mousebutton activation

ovoid (*rmbfunc)(void* )
Right mousebutton activation

ovoid (*pfunc)(void* )
Mouse passing over without buttons pressed

oulong inputs
Mask of controllers to respond to. IA_CTL_MOUSE and/or IA_CTL_JOY.

oulong id
Mandatory ID. iarea_check() returns this when a check is positive. It would be daft to supply a zero value. Zero means failure.

oUint8 mb
Mousebutton mask. IA_LMBMASK, IA_MMB_MASK and/or IA_RMB_MASK. These are all aliases for SDL flags with slightly longer names, because I am terminally lazy.

oUint8 jb
Mask of joybuttons. These have no presets, as which button is the first and which is the last depends on the joystick/pad in question. Bit #0 will most likely be near one of your thumbs, though.

oUint32 tick
Point when this inputarea was last activated. This is the point at which this inputarea was last activated. It uses SDL_GetTicks() to get its value, but the way delays are calculated shouldn't be affected by the 49-day limit.

Note, however, that there is something else you are doing wrong if you have a game running for 49 days.

oUint32 delay
Delay in milliseconds before allowing another activation. Use the IA_DELAY tag when creating to set this.
Author:
Ronny Bangsund
See Also:
iarea_new(), iarea_free()

Alphabetic index



This page was generated with the help of DOC++.