text stringlengths 0 234 |
|---|
function Properties (Object : Input_Device) return Device_Properties is |
Result : aliased Device_Properties; |
Error_Code : constant Integer := Event_Device.Input_Dev.IO_Control |
(Object.FD, (Read, 'E', 16#09#, Result'Size / System.Storage_Unit), Result'Address); |
begin |
pragma Assert (Error_Code /= -1); |
return Result; |
end Properties; |
function Events (Object : Input_Device) return Device_Events is |
Result : aliased Device_Events; |
Error_Code : constant Integer := Event_Device.Input_Dev.IO_Control |
(Object.FD, (Read, 'E', 16#20#, Result'Size / System.Storage_Unit), Result'Address); |
begin |
pragma Assert (Error_Code /= -1); |
return Result; |
end Events; |
function Convert is new Ada.Unchecked_Conversion |
(Source => Event_Kind, Target => Interfaces.C.unsigned_short); |
function Features (Object : Input_Device) return Synchronization_Features is |
Result : aliased Synchronization_Features; |
Error_Code : constant Integer := Event_Device.Input_Dev.IO_Control |
(Object.FD, (Read, 'E', 16#20# + Unsigned_8 (Convert (Synchronization)), |
Result'Size / System.Storage_Unit), |
Result'Address); |
begin |
pragma Assert (Error_Code /= -1); |
return Result; |
end Features; |
function Features (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#20# + Unsigned_8 (Convert (Key)), |
Result'Size / System.Storage_Unit), |
Result'Address); |
begin |
pragma Assert (Error_Code /= -1); |
return Result; |
end Features; |
function Features (Object : Input_Device) return Relative_Axis_Features is |
Result : aliased Internal_Relative_Axis_Features; |
Error_Code : constant Integer := Event_Device.Input_Dev.IO_Control |
(Object.FD, |
(Read, 'E', 16#20# + Unsigned_8 (Convert (Relative)), Result'Size / System.Storage_Unit), |
Result'Address); |
begin |
pragma Assert (Error_Code /= -1); |
return |
(X => Result.X, |
Y => Result.Y, |
Z => Result.Z, |
Rx => Result.Rx, |
Ry => Result.Ry, |
Rz => Result.Rz, |
Horizontal_Wheel => Result.Horizontal_Wheel, |
Diagonal => Result.Diagonal, |
Wheel => Result.Wheel, |
Misc => Result.Misc, |
Wheel_High_Res => Result.Wheel_High_Res, |
Horizontal_Wheel_High_Res => Result.Horizontal_Wheel_High_Res); |
end Features; |
function Features (Object : Input_Device) return Absolute_Axis_Features is |
Result : aliased Internal_Absolute_Axis_Features; |
Error_Code : constant Integer := Event_Device.Input_Dev.IO_Control |
(Object.FD, |
(Read, 'E', 16#20# + Unsigned_8 (Convert (Absolute)), Result'Size / System.Storage_Unit), |
Result'Address); |
begin |
pragma Assert (Error_Code /= -1); |
return |
(X => Result.X, |
Y => Result.Y, |
Z => Result.Z, |
Rx => Result.Rx, |
Ry => Result.Ry, |
Rz => Result.Rz, |
Throttle => Result.Throttle, |
Rudder => Result.Rudder, |
Wheel => Result.Wheel, |
Gas => Result.Gas, |
Brake => Result.Brake, |
Hat_0X => Result.Hat_0X, |
Hat_0Y => Result.Hat_0Y, |
Hat_1X => Result.Hat_1X, |
Hat_1Y => Result.Hat_1Y, |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.