text stringlengths 0 234 |
|---|
return |
(Rumble => Result.Rumble, |
Periodic => Result.Periodic, |
Constant_V => Result.Constant_V, |
Spring => Result.Spring, |
Friction => Result.Friction, |
Damper => Result.Damper, |
Inertia => Result.Inertia, |
Ramp => Result.Ramp, |
Square => Result.Square, |
Triangle => Result.Triangle, |
Sine => Result.Sine, |
Saw_Up => Result.Saw_Up, |
Saw_Down => Result.Saw_Down, |
Custom => Result.Custom, |
Gain => Result.Gain, |
Auto_Center => Result.Auto_Center); |
end Features; |
---------------------------------------------------------------------------- |
function Axis (Object : Input_Device; Axis : Absolute_Axis_Kind) return Axis_Info is |
Result : aliased Axis_Info; |
function Convert is new Ada.Unchecked_Conversion |
(Source => Absolute_Axis_Info_Kind, Target => Unsigned_64); |
Error_Code : constant Integer := Event_Device.Input_Dev.IO_Control |
(Object.FD, |
(Read, 'E', 16#40# + Unsigned_8 (Convert (Absolute_Axis_Info_Kind (Axis))), |
Result'Size / System.Storage_Unit), |
Result'Address); |
begin |
pragma Assert (Error_Code /= -1); |
return Result; |
end Axis; |
function Key_Statuses (Object : Input_Device) return Key_Features is |
Result : aliased Key_Features; |
Error_Code : constant Integer := Event_Device.Input_Dev.IO_Control |
(Object.FD, (Read, 'E', 16#18#, |
Result'Size / System.Storage_Unit), |
Result'Address); |
begin |
pragma Assert (Error_Code /= -1); |
return Result; |
end Key_Statuses; |
function LED_Statuses (Object : Input_Device) return LED_Features is |
Result : aliased LED_Features; |
Error_Code : constant Integer := Event_Device.Input_Dev.IO_Control |
(Object.FD, |
(Read, 'E', 16#19#, Result'Size / System.Storage_Unit), |
Result'Address); |
begin |
pragma Assert (Error_Code /= -1); |
return Result; |
end LED_Statuses; |
function Sound_Statuses (Object : Input_Device) return Sound_Features is |
Result : aliased Sound_Features; |
Error_Code : constant Integer := Event_Device.Input_Dev.IO_Control |
(Object.FD, |
(Read, 'E', 16#1A#, Result'Size / System.Storage_Unit), |
Result'Address); |
begin |
pragma Assert (Error_Code /= -1); |
return Result; |
end Sound_Statuses; |
function Switch_Statuses (Object : Input_Device) return Switch_Features is |
Result : aliased Switch_Features; |
Error_Code : constant Integer := Event_Device.Input_Dev.IO_Control |
(Object.FD, |
(Read, 'E', 16#1B#, Result'Size / System.Storage_Unit), |
Result'Address); |
begin |
pragma Assert (Error_Code /= -1); |
return Result; |
end Switch_Statuses; |
function Force_Feedback_Effects (Object : Input_Device) return Natural is |
Result : aliased Integer; |
Error_Code : constant Integer := Event_Device.Input_Dev.IO_Control |
(Object.FD, (Read, 'E', 16#84#, Result'Size / System.Storage_Unit), Result'Address); |
begin |
pragma Assert (Error_Code /= -1); |
return Result; |
end Force_Feedback_Effects; |
procedure Set_Force_Feedback_Gain |
(Object : Input_Device; |
Value : Force_Feedback_Gain) |
is |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.