Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/ui/components/empty.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
static const component_functions_t _component_functions = {
.cleanup = ui_util_component_cleanup,
.render = ui_util_component_render_subcomponents,
.on_event = ui_util_on_event_noop,
.on_event = NULL,
};

/********************************** Create Instance **********************************/
Expand Down
2 changes: 1 addition & 1 deletion src/ui/components/image.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ static void _render(component_t* component)
static const component_functions_t _component_functions = {
.cleanup = ui_util_component_cleanup,
.render = _render,
.on_event = ui_util_on_event_noop,
.on_event = NULL,
};

/********************************** Create Instance **********************************/
Expand Down
2 changes: 1 addition & 1 deletion src/ui/components/info_centered.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
static const component_functions_t _component_functions = {
.cleanup = ui_util_component_cleanup,
.render = ui_util_component_render_subcomponents,
.on_event = ui_util_on_event_noop,
.on_event = NULL,
};

/********************************** Create Instance **********************************/
Expand Down
2 changes: 1 addition & 1 deletion src/ui/components/knight_rider.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ static void _render(component_t* component)
static component_functions_t _component_functions = {
.cleanup = ui_util_component_cleanup,
.render = _render,
.on_event = ui_util_on_event_noop,
.on_event = NULL,
};

/********************************** Create Instance **********************************/
Expand Down
2 changes: 1 addition & 1 deletion src/ui/components/lockscreen.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
static const component_functions_t _component_functions = {
.cleanup = ui_util_component_cleanup,
.render = ui_util_component_render_subcomponents,
.on_event = ui_util_on_event_noop,
.on_event = NULL,
};

/********************************** Create Instance **********************************/
Expand Down
2 changes: 1 addition & 1 deletion src/ui/components/orientation_arrows.c
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ static void _render(component_t* component)
static component_functions_t _component_functions = {
.cleanup = ui_util_component_cleanup,
.render = _render,
.on_event = ui_util_on_event_noop,
.on_event = NULL,
};

/********************************** Create Instance **********************************/
Expand Down
2 changes: 1 addition & 1 deletion src/ui/components/progress.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ static void _render(component_t* component)
static const component_functions_t _component_functions = {
.cleanup = ui_util_component_cleanup,
.render = _render,
.on_event = ui_util_on_event_noop,
.on_event = NULL,
};

component_t* progress_create(const char* title)
Expand Down
2 changes: 1 addition & 1 deletion src/ui/components/screensaver.c
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ static void _render(component_t* component)
static component_functions_t _component_functions = {
.cleanup = ui_util_component_cleanup,
.render = _render,
.on_event = ui_util_on_event_noop,
.on_event = NULL,
};

component_t* screensaver_create(void)
Expand Down
2 changes: 1 addition & 1 deletion src/ui/components/sdcard.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ static void _render(component_t* component)
static const component_functions_t _component_functions = {
.cleanup = ui_util_component_cleanup,
.render = _render,
.on_event = ui_util_on_event_noop,
.on_event = NULL,
};

/********************************** Create Instance **********************************/
Expand Down
2 changes: 1 addition & 1 deletion src/ui/components/status.c
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ static void _render(component_t* component)
static const component_functions_t _component_functions = {
.cleanup = ui_util_component_cleanup,
.render = _render,
.on_event = ui_util_on_event_noop,
.on_event = NULL,
};

/********************************** Create Instance **********************************/
Expand Down
2 changes: 1 addition & 1 deletion src/ui/components/trinary_choice.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ typedef struct {
static const component_functions_t _component_functions = {
.cleanup = ui_util_component_cleanup,
.render = ui_util_component_render_subcomponents,
.on_event = ui_util_on_event_noop,
.on_event = NULL,
};

static void _left_selected(component_t* button)
Expand Down
2 changes: 1 addition & 1 deletion src/ui/components/waiting.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ static void _render(component_t* component)
static component_functions_t _component_functions = {
.cleanup = ui_util_component_cleanup,
.render = _render,
.on_event = ui_util_on_event_noop,
.on_event = NULL,
};

/********************************** Create Instance **********************************/
Expand Down
12 changes: 0 additions & 12 deletions src/ui/ui_util.c
Original file line number Diff line number Diff line change
Expand Up @@ -63,18 +63,6 @@ void ui_util_component_cleanup(component_t* component)
free(component);
}

/**
* A no-op function for components that do not handle events.
* @param[in] event The emitted event.
* @param[in] component The component that receives the event.
*/
void ui_util_on_event_noop(const event_t* event, component_t* component)
{
// noop
(void)event;
(void)component;
}

/**
* Positions the child component in the center (vertical and horizontal) of the
* parent component.
Expand Down
7 changes: 0 additions & 7 deletions src/ui/ui_util.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,6 @@ void ui_util_component_render_subcomponents(component_t* component);
*/
void ui_util_component_cleanup(component_t* component);

/**
* A no-op function for components that do not handle events.
* @param[in] event The emitted event.
* @param[in] component The component that receives the event.
*/
void ui_util_on_event_noop(const event_t* event, component_t* component);

/**
* Positions the child component in the center (vertical and horizontal) of the
* parent component.
Expand Down
2 changes: 1 addition & 1 deletion test/hardware-fakes/src/fake_component.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
static const component_functions_t FAKE_COMPONENT_FUNCTIONS = {
.cleanup = ui_util_component_cleanup,
.render = ui_util_component_render_subcomponents,
.on_event = ui_util_on_event_noop};
.on_event = NULL};

/********************************** Create Instance **********************************/

Expand Down