Pepper_31_C_interfaces
Public Attributes | List of all members
PP_InputEvent_Wheel Struct Reference

#include <pp_input_event.h>

Collaboration diagram for PP_InputEvent_Wheel:
Collaboration graph

Public Attributes

uint32_t modifier
 
float delta_x
 
float delta_y
 
float wheel_ticks_x
 
float wheel_ticks_y
 
PP_Bool scroll_by_page
 

Detailed Description

The PP_InputEvent_Wheel struct represents all mouse wheel events.

Definition at line 133 of file pp_input_event.h.

Member Data Documentation

float PP_InputEvent_Wheel::delta_x

The mouse wheel's horizontal scroll amount. A scroll to the right (where the content moves left) is represented as positive values, and a scroll to the left (where the content moves right) is represented as negative values.

The units are either in pixels (when scroll_by_page is false) or pages (when scroll_by_page is true). For example, delta_y = -3 means scroll up 3 pixels when scroll_by_page is false, and scroll up 3 pages when scroll_by_page is true.

This amount is system dependent and will take into account the user's preferred scroll sensitivity and potentially also nonlinear acceleration based on the speed of the scrolling.

Devices will be of varying resolution. Some mice with large detents will only generate integer scroll amounts. But fractional values are also possible, for example, on some trackpads and newer mice that don't have "clicks".

Definition at line 159 of file pp_input_event.h.

float PP_InputEvent_Wheel::delta_y

The mouse wheel's vertical scroll amount. A scroll down (where the content moves up) is represented as positive values, and a scroll up (where the content moves down) is represented as negative values.

The units are either in pixels (when scroll_by_page is false) or pages (when scroll_by_page is true). For example, delta_y = -3 means scroll up 3 pixels when scroll_by_page is false, and scroll up 3 pages when scroll_by_page is true.

This amount is system dependent and will take into account the user's preferred scroll sensitivity and potentially also nonlinear acceleration based on the speed of the scrolling.

Devices will be of varying resolution. Some mice with large detents will only generate integer scroll amounts. But fractional values are also possible, for example, on some trackpads and newer mice that don't have "clicks".

Definition at line 179 of file pp_input_event.h.

uint32_t PP_InputEvent_Wheel::modifier

This value represents a combination of the EVENT_MODIFIER flags.

Definition at line 138 of file pp_input_event.h.

PP_Bool PP_InputEvent_Wheel::scroll_by_page

Indicates if the scroll delta_x/delta_y indicates pages or lines to scroll by. When true, the user is requesting to scroll by pages.

Definition at line 206 of file pp_input_event.h.

float PP_InputEvent_Wheel::wheel_ticks_x

The number of "clicks" of the scroll wheel that have produced the event. The value may have system-specific acceleration applied to it, depending on the device. The positive and negative meanings are the same as for delta_x and delta_y.

If you are scrolling, you probably want to use the delta values above. These tick events can be useful if you aren't doing actual scrolling and don't want or pixel values. An example may be cycling between different items in a game.

You may receive fractional values for the wheel ticks if the mouse wheel is high resolution or doesn't have "clicks". If your program wants discrete events (as in the "picking items" example) you should accumulate fractional click values from multiple messages until the total value reaches positive or negative one. This should represent a similar amount of scrolling as for a mouse that has a discrete mouse wheel.

Definition at line 198 of file pp_input_event.h.

float PP_InputEvent_Wheel::wheel_ticks_y

This value represents

Definition at line 200 of file pp_input_event.h.


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