Loading...
Searching...
No Matches
date_time_input.h File Reference

GUI: DateTimeInput view module API. More...

#include <gui/view.h>
#include <datetime.h>

Go to the source code of this file.

Typedefs

typedef struct DateTimeInput DateTimeInput
 Date/time input anonymous structure.
 
typedef void(* DateTimeChangedCallback) (void *context)
 callback that is executed on value change
 
typedef void(* DateTimeDoneCallback) (void *context)
 callback that is executed on back button press
 

Functions

DateTimeInputdate_time_input_alloc (void)
 Allocate and initialize date/time input.
 
void date_time_input_free (DateTimeInput *date_time_input)
 Deinitialize and free date/time input.
 
Viewdate_time_input_get_view (DateTimeInput *date_time_input)
 Get date/time input view.
 
void date_time_input_set_result_callback (DateTimeInput *date_time_input, DateTimeChangedCallback changed_callback, DateTimeDoneCallback done_callback, void *callback_context, DateTime *datetime)
 Set date/time input result callback.
 
void date_time_input_set_editable_fields (DateTimeInput *date_time_input, bool year, bool month, bool day, bool hour, bool minute, bool second)
 Set date/time fields which can be edited.
 

Detailed Description

GUI: DateTimeInput view module API.

Function Documentation

◆ date_time_input_alloc()

DateTimeInput * date_time_input_alloc ( void )

Allocate and initialize date/time input.

This screen used to input a date and time

Returns
DateTimeInput instance

◆ date_time_input_free()

void date_time_input_free ( DateTimeInput * date_time_input)

Deinitialize and free date/time input.

Parameters
date_time_inputDate/time input instance

◆ date_time_input_get_view()

View * date_time_input_get_view ( DateTimeInput * date_time_input)

Get date/time input view.

Parameters
date_time_inputDate/time input instance
Returns
View instance that can be used for embedding

◆ date_time_input_set_editable_fields()

void date_time_input_set_editable_fields ( DateTimeInput * date_time_input,
bool year,
bool month,
bool day,
bool hour,
bool minute,
bool second )

Set date/time fields which can be edited.

Parameters
date_time_inputdate/time input instance
yearwhether to allow editing the year
monthwhether to allow editing the month
daywhether to allow editing the day
hourwhether to allow editing the hour
minutewhether to allow editing the minute
secondwhether to allow editing the second

◆ date_time_input_set_result_callback()

void date_time_input_set_result_callback ( DateTimeInput * date_time_input,
DateTimeChangedCallback changed_callback,
DateTimeDoneCallback done_callback,
void * callback_context,
DateTime * datetime )

Set date/time input result callback.

Parameters
date_time_inputdate/time input instance
changed_callbackchanged callback fn
done_callbackfinished callback fn
callback_contextcallback context
datetimedate/time value