BEEP-8 SDK 1.0.0
Loading...
Searching...
No Matches
_b8HifMouseStatus Struct Reference

Structure representing the current mouse or touch panel status. More...

#include <hif.h>

Public Attributes

s16 mouse_x
 
s16 mouse_y
 
u8 is_dragging
 

Detailed Description

Structure representing the current mouse or touch panel status.

This structure provides information about the current position and state of the mouse or touch panel. Although the API refers to "mouse," it is also compatible with touch panel inputs. In the case of multiple touch points, the status prioritizes the most recently initiated touch.

For example:

  • If the index finger starts touching at 1 second and ends at 5 seconds, and the middle finger starts touching at 3 seconds and ends at 4 seconds:
    • From 1 second to 3 seconds, the position corresponds to the index finger.
    • From 3 seconds to 4 seconds, the position corresponds to the middle finger.
    • After 4 seconds, no touch is detected, and the state resets accordingly.

Members:

  • mouse_x: The current X coordinate of the mouse or touch panel (16-bit signed fixed-point number with 4 fractional bits).
  • mouse_y: The current Y coordinate of the mouse or touch panel (16-bit signed fixed-point number with 4 fractional bits).
  • is_dragging: Indicates whether the mouse or touch is in a dragging state (1: dragging, 0: not dragging).
Note
  • The mouse_x and mouse_y values are 16-bit signed fixed-point numbers with 4 bits dedicated to the fractional part. To obtain the actual floating-point value, divide by 16. For example, a mouse_x value of 160 represents 10.0 (160 / 16 = 10.0).

Member Data Documentation

◆ is_dragging

u8 _b8HifMouseStatus::is_dragging

Dragging state: 1 if dragging, 0 otherwise.

◆ mouse_x

s16 _b8HifMouseStatus::mouse_x

Current X coordinate of the mouse or touch panel (16-bit signed fixed-point with 4 fractional bits).

◆ mouse_y

s16 _b8HifMouseStatus::mouse_y

Current Y coordinate of the mouse or touch panel (16-bit signed fixed-point with 4 fractional bits).


The documentation for this struct was generated from the following file: