mirror of
https://github.com/DarkFlippers/unleashed-firmware.git
synced 2024-12-27 15:22:29 +03:00
0444a80f19
* Script command and character tables * Non-blocking stringdelay, docs update * altchar/altstring fix * Layout select UI fix * Remove debug print Co-authored-by: あく <alleteam@gmail.com>
51 lines
1.2 KiB
C
51 lines
1.2 KiB
C
#pragma once
|
|
|
|
#include "bad_usb_app.h"
|
|
#include "scenes/bad_usb_scene.h"
|
|
#include "helpers/ducky_script.h"
|
|
|
|
#include <gui/gui.h>
|
|
#include <assets_icons.h>
|
|
#include <gui/view_dispatcher.h>
|
|
#include <gui/scene_manager.h>
|
|
#include <gui/modules/submenu.h>
|
|
#include <dialogs/dialogs.h>
|
|
#include <notification/notification_messages.h>
|
|
#include <gui/modules/variable_item_list.h>
|
|
#include <gui/modules/widget.h>
|
|
#include "views/bad_usb_view.h"
|
|
#include <furi_hal_usb.h>
|
|
|
|
#define BAD_USB_APP_BASE_FOLDER ANY_PATH("badusb")
|
|
#define BAD_USB_APP_PATH_LAYOUT_FOLDER BAD_USB_APP_BASE_FOLDER "/assets/layouts"
|
|
#define BAD_USB_APP_SCRIPT_EXTENSION ".txt"
|
|
#define BAD_USB_APP_LAYOUT_EXTENSION ".kl"
|
|
|
|
typedef enum {
|
|
BadUsbAppErrorNoFiles,
|
|
BadUsbAppErrorCloseRpc,
|
|
} BadUsbAppError;
|
|
|
|
struct BadUsbApp {
|
|
Gui* gui;
|
|
ViewDispatcher* view_dispatcher;
|
|
SceneManager* scene_manager;
|
|
NotificationApp* notifications;
|
|
DialogsApp* dialogs;
|
|
Widget* widget;
|
|
Submenu* submenu;
|
|
|
|
BadUsbAppError error;
|
|
FuriString* file_path;
|
|
FuriString* keyboard_layout;
|
|
BadUsb* bad_usb_view;
|
|
BadUsbScript* bad_usb_script;
|
|
|
|
FuriHalUsbInterface* usb_if_prev;
|
|
};
|
|
|
|
typedef enum {
|
|
BadUsbAppViewError,
|
|
BadUsbAppViewWork,
|
|
BadUsbAppViewConfig,
|
|
} BadUsbAppView; |