Flipper Zero Firmware
Loading...
Searching...
No Matches
number_input.h File Reference

GUI: Integer string keyboard view module API. More...

#include <gui/view.h>

Go to the source code of this file.

Typedefs

typedef struct NumberInput NumberInput
 Number input anonymous structure

 
typedef void(* NumberInputCallback) (void *context, int32_t number)
 Callback to be called on save button press.
 

Functions

NumberInputnumber_input_alloc (void)
 Allocate and initialize Number input.
 
void number_input_free (NumberInput *number_input)
 Deinitialize and free byte input.
 
Viewnumber_input_get_view (NumberInput *number_input)
 Get byte input view.
 
void number_input_set_result_callback (NumberInput *number_input, NumberInputCallback input_callback, void *callback_context, int32_t current_number, int32_t min_value, int32_t max_value)
 Set byte input result callback.
 
void number_input_set_header_text (NumberInput *number_input, const char *text)
 Set byte input header text.
 

Detailed Description

GUI: Integer string keyboard view module API.

Function Documentation

◆ number_input_alloc()

NumberInput * number_input_alloc ( void )

Allocate and initialize Number input.

This Number input is used to enter Numbers (Integers).

Returns
NumberInput instance pointer

◆ number_input_free()

void number_input_free ( NumberInput * number_input)

Deinitialize and free byte input.

Parameters
number_inputNumber input instance

◆ number_input_get_view()

View * number_input_get_view ( NumberInput * number_input)

Get byte input view.

Parameters
number_inputbyte input instance
Returns
View instance that can be used for embedding

◆ number_input_set_header_text()

void number_input_set_header_text ( NumberInput * number_input,
const char * text )

Set byte input header text.

Parameters
number_inputbyte input instance
texttext to be shown

◆ number_input_set_result_callback()

void number_input_set_result_callback ( NumberInput * number_input,
NumberInputCallback input_callback,
void * callback_context,
int32_t current_number,
int32_t min_value,
int32_t max_value )

Set byte input result callback.

Parameters
number_inputbyte input instance
input_callbackinput callback fn
callback_contextcallback context
[in]current_numberThe current number
min_valueMin number value
max_valueMax number value