[FL-1906] Documentation: add Doxyfile, prepare sources for doxygen. (#741)

* Documentation: add Doxyfile, prepare sources for doxygen.

* Update ReadMe and remove obsolete CLA

* Add contribution guide

* Contributing: update text

* Correct spelling
This commit is contained in:
あく
2021-10-03 13:36:05 +03:00
committed by GitHub
parent 1208a5077f
commit 89a6c09a7a
66 changed files with 4846 additions and 1224 deletions

View File

@@ -1,4 +1,10 @@
/**
* @file button_panel.h
* GUI: ButtonPanel view module API
*/
#pragma once
#include <gui/view.h>
#ifdef __cplusplus
@@ -10,37 +16,39 @@ typedef struct ButtonPanel ButtonPanel;
/** Callback type to call for handling selecting button_panel items */
typedef void (*ButtonItemCallback)(void* context, uint32_t index);
/** Callback type for additional drawings above main button_panel screen */
typedef void (*ButtonPanelDrawCallback)(Canvas* canvas, void* _model);
/** Callback type to intercept input events of button_panel */
typedef bool (*ButtonPanelInputCallback)(InputEvent* event, void* context);
/** Allocate new button_panel module.
*
* @return just-created module
* @return ButtonPanel instance
*/
ButtonPanel* button_panel_alloc(void);
/** Free button_panel module.
*
* @param button_panel - module to free
* @param button_panel ButtonPanel instance
*/
void button_panel_free(ButtonPanel* button_panel);
/** Free items from button_panel module. Preallocated matrix stays unchanged.
*
* @param button_panel - module to clean
* @param button_panel ButtonPanel instance
*/
void button_panel_clean(ButtonPanel* button_panel);
/** Reserve space for adding items.
*
* One does not simply use button_panel_add_item() without this function.
* It should be allocated space for it first.
* One does not simply use button_panel_add_item() without this function. It
* should be allocated space for it first.
*
* @param button_panel - module to modify
* @param reserve_x - number of columns in button_panel
* @param reserve_y - number of rows in button_panel
* @param button_panel ButtonPanel instance
* @param reserve_x number of columns in button_panel
* @param reserve_y number of rows in button_panel
*/
void button_panel_reserve(ButtonPanel* button_panel, size_t reserve_x, size_t reserve_y);
@@ -48,20 +56,20 @@ void button_panel_reserve(ButtonPanel* button_panel, size_t reserve_x, size_t re
*
* Have to set element in bounds of allocated size by X and by Y.
*
* @param button_panel - module
* @param index - value to pass to callback
* @param matrix_place_x - coordinates by x-axis on virtual grid, it
* is only used for naviagation
* @param matrix_place_y - coordinates by y-axis on virtual grid, it
* is only used for naviagation
* @param x - x-coordinate to draw icon on
* @param y - y-coordinate to draw icon on
* @param icon_name - name of the icon to draw
* @param icon_name_selected - name of the icon to draw when current
* element is selected
* @param callback - function to call when specific element is selected
* (pressed Ok on selected item)
* @param callback_context - context to pass to callback
* @param button_panel ButtonPanel instance
* @param index value to pass to callback
* @param matrix_place_x coordinates by x-axis on virtual grid, it
* is only used for naviagation
* @param matrix_place_y coordinates by y-axis on virtual grid, it
* is only used for naviagation
* @param x x-coordinate to draw icon on
* @param y y-coordinate to draw icon on
* @param icon_name name of the icon to draw
* @param icon_name_selected name of the icon to draw when current
* element is selected
* @param callback function to call when specific element is
* selected (pressed Ok on selected item)
* @param callback_context context to pass to callback
*/
void button_panel_add_item(
ButtonPanel* button_panel,
@@ -77,17 +85,19 @@ void button_panel_add_item(
/** Get button_panel view.
*
* @param button_panel - module to get view from
* @return acquired view
* @param button_panel ButtonPanel instance
*
* @return acquired view
*/
View* button_panel_get_view(ButtonPanel* button_panel);
/** Add label to button_panel module.
*
* @param x - x-coordinate to place label
* @param y - y-coordinate to place label
* @param font - font to write label with
* @param label_str - string label to write
* @param button_panel ButtonPanel instance
* @param x x-coordinate to place label
* @param y y-coordinate to place label
* @param font font to write label with
* @param label_str string label to write
*/
void button_panel_add_label(
ButtonPanel* button_panel,
@@ -101,9 +111,9 @@ void button_panel_add_label(
*
* Used to add popup drawings after main draw callback is done.
*
* @param button_panel - module to modify
* @param callback - callback function to set for draw event
* @param context - context to pass to callback
* @param button_panel ButtonPanel instance
* @param callback callback function to set for draw event
* @param context context to pass to callback
*/
void button_panel_set_popup_draw_callback(
ButtonPanel* button_panel,
@@ -112,12 +122,12 @@ void button_panel_set_popup_draw_callback(
/** Set popup input callback for button_panel module.
*
* Used to add popup input callback. It will intercept all input
* events for current view.
* Used to add popup input callback. It will intercept all input events for
* current view.
*
* @param button_panel - module to modify
* @param callback - function to overwrite main input callbacks
* @param context - context to pass to callback
* @param button_panel ButtonPanel instance
* @param callback function to overwrite main input callbacks
* @param context context to pass to callback
*/
void button_panel_set_popup_input_callback(
ButtonPanel* button_panel,