[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_menu.h
* GUI: ButtonMenu view module API
*/
#pragma once
#include <stdint.h>
#include <gui/view.h>
@@ -6,40 +12,48 @@
extern "C" {
#endif
/* ButtonMenu anonymous structure */
/** ButtonMenu anonymous structure */
typedef struct ButtonMenu ButtonMenu;
/** ButtonMenuItem anonymous structure */
typedef struct ButtonMenuItem ButtonMenuItem;
/* Callback for any button menu actions */
/** Callback for any button menu actions */
typedef void (*ButtonMenuItemCallback)(void* context, int32_t index, InputType type);
/* Type of button. Difference in drawing buttons. */
/** Type of button. Difference in drawing buttons. */
typedef enum {
ButtonMenuItemTypeCommon,
ButtonMenuItemTypeControl,
} ButtonMenuItemType;
/**
* @brief Get button menu view
* @param button_menu - ButtonMenu instance
* @return View instance that can be used for embedding
/** Get button menu view
*
* @param button_menu ButtonMenu instance
*
* @return View instance that can be used for embedding
*/
View* button_menu_get_view(ButtonMenu* button_menu);
/**
* @brief Clean button menu
* @param button_menu - ButtonMenu instance
/** Clean button menu
*
* @param button_menu ButtonMenu instance
*/
void button_menu_clean(ButtonMenu* button_menu);
/**
* @brief Add item to button menu instance
* @param button_menu - ButtonMenu instance
* @param label - text inside new button
* @param index - value to distinct between buttons inside ButtonMenuItemCallback
* @param type - type of button to create. Differ by button drawing.
* Control buttons have no frames, and have more squared borders.
* @return pointer to just-created item
/** Add item to button menu instance
*
* @param button_menu ButtonMenu instance
* @param label text inside new button
* @param index value to distinct between buttons inside
* ButtonMenuItemCallback
* @param callback The callback
* @param type type of button to create. Differ by button
* drawing. Control buttons have no frames, and
* have more squared borders.
* @param callback_context The callback context
*
* @return pointer to just-created item
*/
ButtonMenuItem* button_menu_add_item(
ButtonMenu* button_menu,
@@ -49,29 +63,29 @@ ButtonMenuItem* button_menu_add_item(
ButtonMenuItemType type,
void* callback_context);
/**
* @brief Allocate and initialize new instance of ButtonMenu model
* @return just-created ButtonMenu model
/** Allocate and initialize new instance of ButtonMenu model
*
* @return just-created ButtonMenu model
*/
ButtonMenu* button_menu_alloc(void);
/**
* @brief Free ButtonMenu element
* @param button_menu - ButtonMenu instance
/** Free ButtonMenu element
*
* @param button_menu ButtonMenu instance
*/
void button_menu_free(ButtonMenu* button_menu);
/**
* @brief Set ButtonMenu header on top of canvas
* @param button_menu - ButtonMenu instance
* @param header - header on the top of button menu
/** Set ButtonMenu header on top of canvas
*
* @param button_menu ButtonMenu instance
* @param header header on the top of button menu
*/
void button_menu_set_header(ButtonMenu* button_menu, const char* header);
/**
* @brief Set selected item
* @param button_menu - ButtonMenu instance
* @param index - index of ButtonMenu to be selected
/** Set selected item
*
* @param button_menu ButtonMenu instance
* @param index index of ButtonMenu to be selected
*/
void button_menu_set_selected_item(ButtonMenu* button_menu, uint32_t index);