20#ifndef POSIX_INPUTFILE_H
21#define POSIX_INPUTFILE_H
23#include "pedigree/kernel/machine/InputManager.h"
24#include "pedigree/kernel/process/Mutex.h"
25#include "pedigree/kernel/utilities/Buffer.h"
27#include "linux-input-abi.h"
28#include "modules/system/vfs/File.h"
40 uint64_t
readBytewise(uint64_t location, uint64_t size, uintptr_t buffer,
41 bool bCanBlock =
true)
override;
42 uint64_t
writeBytewise(uint64_t location, uint64_t size, uintptr_t buffer,
43 bool bCanBlock =
true)
override;
44 int select(
bool bWriting =
false,
int timeout = 0)
override;
61 const bool m_Endpoint;
64 size_t m_LifetimePins = 0;
65 bool m_Registered =
false;
71 enum DeviceType {
Keyboard, Pointer, AbsolutePointer };
74 bool endpoint =
false);
80 uint64_t
readBytewise(uint64_t location, uint64_t size, uintptr_t buffer,
81 bool bCanBlock =
true)
override;
82 uint64_t
writeBytewise(uint64_t location, uint64_t size, uintptr_t buffer,
83 bool bCanBlock =
true)
override;
84 int select(
bool bWriting =
false,
int timeout = 0)
override;
86 int command(
size_t command,
void* buffer)
override;
104 const DeviceType m_Type;
105 const bool m_Endpoint;
108 uint8_t m_KeyState[96];
109 bool m_ButtonState[5];
110 uint32_t m_AbsoluteX = 0;
111 uint32_t m_AbsoluteY = 0;
112 bool m_HaveAbsolute =
false;
113 size_t m_LifetimePins = 0;
114 bool m_Registered =
false;
bool isSeekable() const override
int command(size_t command, void *buffer) override
uint64_t readBytewise(uint64_t location, uint64_t size, uintptr_t buffer, bool bCanBlock=true) override
bool supports(size_t command) const override
uint64_t writeBytewise(uint64_t location, uint64_t size, uintptr_t buffer, bool bCanBlock=true) override
int select(bool bWriting=false, int timeout=0) override
bool isBytewise() const override
bool retainVfsReference() override
void releaseVfsReference() override