Documentation ¶
Index ¶
- type App
- func (a *App) BeforeClose(ctx context.Context) (prevent bool)
- func (a *App) DomReady(ctx context.Context)
- func (a *App) GetDeviceInformation()
- func (a *App) LoadAvaliableDevices() []DeviceInformationJson
- func (a *App) LoadDevices(ctx context.Context)
- func (a *App) LoadDevicesPolling() error
- func (a *App) SelectDevice(checksum string) error
- func (a *App) SetButtonWrapper(button_type string, new_value string)
- func (a *App) SetDpiWrapper(dpi int)
- func (a *App) SetLEDWrapper(ledhex string)
- func (a *App) Shutdown(ctx context.Context)
- func (a *App) Startup(ctx context.Context)
- func (a *App) UpdateAvaliableDevices(dij []DeviceInformationJson)
- type DeviceInformationJson
- type MouseInformationStruct
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type App ¶
type App struct { Log *logrus.Logger Driver *api.Driver DeviceInformation DeviceInformationJson AvaliableDevices map[string]DeviceInformationJson // contains filtered or unexported fields }
App struct
func (*App) BeforeClose ¶
beforeClose is called when the application is about to quit, either by clicking the window close button or calling runtime.Quit. Returning true will cause the application to continue, false will continue shutdown as normal.
func (*App) GetDeviceInformation ¶
func (a *App) GetDeviceInformation()
func (*App) LoadAvaliableDevices ¶
func (a *App) LoadAvaliableDevices() []DeviceInformationJson
func (*App) LoadDevices ¶
func (*App) LoadDevicesPolling ¶
func (*App) SelectDevice ¶
func (*App) SetButtonWrapper ¶
func (*App) SetDpiWrapper ¶
func (*App) SetLEDWrapper ¶
func (*App) UpdateAvaliableDevices ¶
func (a *App) UpdateAvaliableDevices(dij []DeviceInformationJson)
type DeviceInformationJson ¶
type DeviceInformationJson struct { Path string `json:"path"` VendorID uint16 `json:"vendor_id"` ProductID uint16 `json:"product_id"` Serial string `json:"serial"` Manufacturer string `json:"manufacturer"` Product string `json:"product"` Interface int `json:"interface"` Hash string `json:"checksum"` DeviceInfo *hid.DeviceInfo // Keep this in memory first to open a device easily }
func (*DeviceInformationJson) ParseFromHidLib ¶
func (d *DeviceInformationJson) ParseFromHidLib(di *hid.DeviceInfo)
type MouseInformationStruct ¶
type MouseInformationStruct struct { Dpi uint16 `json:"dpi"` CurrentBackButton string `json:"back_button"` CurrentFrontButton string `json:"front_button"` CurrentMiddleButton string `json:"middle_button"` LedColor string `json:"led"` }
func (*MouseInformationStruct) Init ¶
func (m *MouseInformationStruct) Init(d *api.Driver)
Click to show internal directories.
Click to hide internal directories.