[FL-2045] SubGhz: new protocol (GSN , Beninca/Allmatic, Elmes) and validator (#958)

* SubGhz: add new method of obtaining a manufactory code subghz_protocol_keeloq_common_magic_xor_type1_learning
* TextInput: checking for a lock on a file with the same name
* TextInput:  fix checking for a lock on a file with the same name
* Assets: rename and recompile
* TextInput: added picture and timer to turn off blob
* TextInput: Fix graphics
* TextInput:  fix validator
* Validators: Add validator is file
* TextInput: fix callback validator_is_file_alloc
* SubGhz: add propocol GNS (dimamic), Beninca/Alcatic,  Elmes
* SubGhz: fix function description
* Gui: correct timer routine on deallocation
* Format sources

Co-authored-by: あく <alleteam@gmail.com>
This commit is contained in:
Skorpionm
2022-01-21 17:55:09 +04:00
committed by GitHub
parent 32c92a80ea
commit d4d87aa6a8
15 changed files with 300 additions and 46 deletions

View File

@@ -6,6 +6,8 @@
#pragma once
#include <gui/view.h>
#include "validators.h"
#include <m-string.h>
#ifdef __cplusplus
extern "C" {
@@ -14,6 +16,7 @@ extern "C" {
/** Text input anonymous structure */
typedef struct TextInput TextInput;
typedef void (*TextInputCallback)(void* context);
typedef bool (*TextInputValidatorCallback)(const char* text, string_t error, void* context);
/** Allocate and initialize text input
*
@@ -63,6 +66,15 @@ void text_input_set_result_callback(
size_t text_buffer_size,
bool clear_default_text);
void text_input_set_validator(
TextInput* text_input,
TextInputValidatorCallback callback,
void* callback_context);
TextInputValidatorCallback text_input_get_validator_callback(TextInput* text_input);
void* text_input_get_validator_callback_context(TextInput* text_input);
/** Set text input header text
*
* @param text_input TextInput instance