2021-11-26 16:53:51 +03:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <gui/view.h>
|
|
|
|
#include "../bad_usb_script.h"
|
|
|
|
|
|
|
|
typedef struct BadUsb BadUsb;
|
2023-02-08 18:01:00 +03:00
|
|
|
typedef void (*BadUsbButtonCallback)(InputKey key, void* context);
|
2021-11-26 16:53:51 +03:00
|
|
|
|
|
|
|
BadUsb* bad_usb_alloc();
|
|
|
|
|
|
|
|
void bad_usb_free(BadUsb* bad_usb);
|
|
|
|
|
|
|
|
View* bad_usb_get_view(BadUsb* bad_usb);
|
|
|
|
|
2023-02-08 18:01:00 +03:00
|
|
|
void bad_usb_set_button_callback(BadUsb* bad_usb, BadUsbButtonCallback callback, void* context);
|
2021-11-26 16:53:51 +03:00
|
|
|
|
2022-05-27 14:19:21 +03:00
|
|
|
void bad_usb_set_file_name(BadUsb* bad_usb, const char* name);
|
2021-11-26 16:53:51 +03:00
|
|
|
|
2023-02-08 18:01:00 +03:00
|
|
|
void bad_usb_set_layout(BadUsb* bad_usb, const char* layout);
|
|
|
|
|
2021-11-26 16:53:51 +03:00
|
|
|
void bad_usb_set_state(BadUsb* bad_usb, BadUsbState* st);
|