2021-11-26 13:53:51 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <gui/view.h>
|
2023-03-20 17:22:03 +00:00
|
|
|
#include "../helpers/ducky_script.h"
|
2021-11-26 13:53:51 +00:00
|
|
|
|
|
|
|
typedef struct BadUsb BadUsb;
|
2023-02-08 15:01:00 +00:00
|
|
|
typedef void (*BadUsbButtonCallback)(InputKey key, void* context);
|
2021-11-26 13:53:51 +00:00
|
|
|
|
2024-03-25 08:39:33 +00:00
|
|
|
BadUsb* bad_usb_view_alloc(void);
|
2021-11-26 13:53:51 +00:00
|
|
|
|
2024-03-25 08:39:33 +00:00
|
|
|
void bad_usb_view_free(BadUsb* bad_usb);
|
2021-11-26 13:53:51 +00:00
|
|
|
|
2024-03-25 08:39:33 +00:00
|
|
|
View* bad_usb_view_get_view(BadUsb* bad_usb);
|
2021-11-26 13:53:51 +00:00
|
|
|
|
2024-03-25 08:39:33 +00:00
|
|
|
void bad_usb_view_set_button_callback(
|
|
|
|
BadUsb* bad_usb,
|
|
|
|
BadUsbButtonCallback callback,
|
|
|
|
void* context);
|
2021-11-26 13:53:51 +00:00
|
|
|
|
2024-03-25 08:39:33 +00:00
|
|
|
void bad_usb_view_set_file_name(BadUsb* bad_usb, const char* name);
|
2021-11-26 13:53:51 +00:00
|
|
|
|
2024-03-25 08:39:33 +00:00
|
|
|
void bad_usb_view_set_layout(BadUsb* bad_usb, const char* layout);
|
2023-02-08 15:01:00 +00:00
|
|
|
|
2024-03-25 08:39:33 +00:00
|
|
|
void bad_usb_view_set_state(BadUsb* bad_usb, BadUsbState* st);
|
2023-02-27 14:04:14 +00:00
|
|
|
|
2024-03-25 08:39:33 +00:00
|
|
|
bool bad_usb_view_is_idle_state(BadUsb* bad_usb);
|