[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:
@@ -1,77 +1,95 @@
|
||||
/**
|
||||
* @file dialog.h
|
||||
* GUI: Dialog view module API
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <gui/view.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Dialog anonymous structure */
|
||||
/** Dialog anonymous structure */
|
||||
typedef struct Dialog Dialog;
|
||||
|
||||
/* Dialog result */
|
||||
/** Dialog result */
|
||||
typedef enum {
|
||||
DialogResultLeft,
|
||||
DialogResultRight,
|
||||
DialogResultBack,
|
||||
} DialogResult;
|
||||
|
||||
/* Dialog result callback type
|
||||
* @warning comes from GUI thread
|
||||
/** Dialog result callback type
|
||||
* @warning comes from GUI thread
|
||||
*/
|
||||
typedef void (*DialogResultCallback)(DialogResult result, void* context);
|
||||
|
||||
/* Allocate and initialize dialog
|
||||
/** Allocate and initialize dialog
|
||||
*
|
||||
* This dialog used to ask simple questions like Yes/
|
||||
*
|
||||
* @return Dialog instance
|
||||
*/
|
||||
Dialog* dialog_alloc();
|
||||
|
||||
/* Deinitialize and free dialog
|
||||
* @param dialog - Dialog instance
|
||||
/** Deinitialize and free dialog
|
||||
*
|
||||
* @param dialog Dialog instance
|
||||
*/
|
||||
void dialog_free(Dialog* dialog);
|
||||
|
||||
/* Get dialog view
|
||||
* @param dialog - Dialog instance
|
||||
* @return View instance that can be used for embedding
|
||||
/** Get dialog view
|
||||
*
|
||||
* @param dialog Dialog instance
|
||||
*
|
||||
* @return View instance that can be used for embedding
|
||||
*/
|
||||
View* dialog_get_view(Dialog* dialog);
|
||||
|
||||
/* Set dialog result callback
|
||||
* @param dialog - Dialog instance
|
||||
* @param callback - result callback function
|
||||
/** Set dialog result callback
|
||||
*
|
||||
* @param dialog Dialog instance
|
||||
* @param callback result callback function
|
||||
*/
|
||||
void dialog_set_result_callback(Dialog* dialog, DialogResultCallback callback);
|
||||
|
||||
/* Set dialog context
|
||||
* @param dialog - Dialog instance
|
||||
* @param context - context pointer, will be passed to result callback
|
||||
/** Set dialog context
|
||||
*
|
||||
* @param dialog Dialog instance
|
||||
* @param context context pointer, will be passed to result callback
|
||||
*/
|
||||
void dialog_set_context(Dialog* dialog, void* context);
|
||||
|
||||
/* Set dialog header text
|
||||
* @param dialog - Dialog instance
|
||||
* @param text - text to be shown
|
||||
/** Set dialog header text
|
||||
*
|
||||
* @param dialog Dialog instance
|
||||
* @param text text to be shown
|
||||
*/
|
||||
void dialog_set_header_text(Dialog* dialog, const char* text);
|
||||
|
||||
/* Set dialog text
|
||||
* @param dialog - Dialog instance
|
||||
* @param text - text to be shown
|
||||
/** Set dialog text
|
||||
*
|
||||
* @param dialog Dialog instance
|
||||
* @param text text to be shown
|
||||
*/
|
||||
void dialog_set_text(Dialog* dialog, const char* text);
|
||||
|
||||
/* Set left button text
|
||||
* @param dialog - Dialog instance
|
||||
* @param text - text to be shown
|
||||
/** Set left button text
|
||||
*
|
||||
* @param dialog Dialog instance
|
||||
* @param text text to be shown
|
||||
*/
|
||||
void dialog_set_left_button_text(Dialog* dialog, const char* text);
|
||||
|
||||
/* Set right button text
|
||||
* @param dialog - Dialog instance
|
||||
* @param text - text to be shown
|
||||
/** Set right button text
|
||||
*
|
||||
* @param dialog Dialog instance
|
||||
* @param text text to be shown
|
||||
*/
|
||||
void dialog_set_right_button_text(Dialog* dialog, const char* text);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user