2014-10-17 13:36:03 -07:00
|
|
|
#ifndef ELM_CODE_H_
|
|
|
|
# define ELM_CODE_H_
|
|
|
|
|
2015-01-04 04:00:40 -08:00
|
|
|
#include "elm_code_common.h"
|
2015-02-14 15:14:06 -08:00
|
|
|
#include "elm_code_line.h"
|
2015-02-22 12:07:08 -08:00
|
|
|
#include "elm_code_text.h"
|
2015-01-04 04:00:40 -08:00
|
|
|
#include "elm_code_file.h"
|
|
|
|
#include "elm_code_parse.h"
|
2016-06-02 17:19:08 -07:00
|
|
|
#include "elm_code_widget.eo.h"
|
|
|
|
#include "elm_code_widget_legacy.h"
|
|
|
|
#include "elm_code_widget_selection.h"
|
2015-01-04 04:00:40 -08:00
|
|
|
#include "elm_code_diff_widget.h"
|
|
|
|
|
2014-10-17 13:36:03 -07:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @file
|
2014-10-26 15:47:27 -07:00
|
|
|
* @brief These routines are used for loading Elm Code widgets.
|
2014-10-17 13:36:03 -07:00
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief Init / shutdown functions.
|
|
|
|
* @defgroup Init Init / Shutdown
|
|
|
|
*
|
|
|
|
* @{
|
|
|
|
*
|
|
|
|
* Functions of obligatory usage, handling proper initialization
|
|
|
|
* and shutdown routines.
|
|
|
|
*
|
|
|
|
* Before the usage of any other function, Elm Code should be properly
|
|
|
|
* initialized with @ref elm_code_init() and the last call to Elm Code's
|
|
|
|
* functions should be @ref elm_code_shutdown(), so everything will
|
|
|
|
* be correctly freed.
|
|
|
|
*
|
|
|
|
* Elm Code logs everything with Eina Log, using the "elm_code" log domain.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Initialize Elm Code.
|
|
|
|
*
|
|
|
|
* Initializes Elm Code, its dependencies and modules. Should be the first
|
|
|
|
* function of Elm Code to be called.
|
|
|
|
*
|
|
|
|
* @return The init counter value.
|
|
|
|
*
|
|
|
|
* @see elm_code_shutdown().
|
|
|
|
*
|
|
|
|
* @ingroup Init
|
|
|
|
*/
|
|
|
|
EAPI int elm_code_init(void);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Shutdown Elm Code
|
|
|
|
*
|
|
|
|
* Shutdown Elm Code. If init count reaches 0, all the internal structures will
|
|
|
|
* be freed. Any Elm Code library call after this point will leads to an error.
|
|
|
|
*
|
|
|
|
* @return Elm Code's init counter value.
|
|
|
|
*
|
2014-11-28 00:55:42 -08:00
|
|
|
* @see elm_code_init()
|
2014-10-17 13:36:03 -07:00
|
|
|
*
|
|
|
|
* @ingroup Init
|
|
|
|
*/
|
|
|
|
EAPI int elm_code_shutdown(void);
|
|
|
|
|
2014-10-26 15:08:52 -07:00
|
|
|
/**
|
2014-11-16 15:52:41 -08:00
|
|
|
* Create a new Elm Code instance
|
2014-10-26 15:08:52 -07:00
|
|
|
*
|
2014-11-28 00:55:42 -08:00
|
|
|
* This method creates a new Elm Code instance using an in-memory file for backing changes.
|
|
|
|
* A regular file can be set after creation if required.
|
2014-10-26 15:47:27 -07:00
|
|
|
* Once an Elm Code has been created you can create widgets that render the content.
|
2014-10-26 15:08:52 -07:00
|
|
|
*
|
2014-11-28 00:55:42 -08:00
|
|
|
* @return an allocated Elm_Code that references the given file
|
|
|
|
* @see elm_code_file_open()
|
2014-10-26 15:08:52 -07:00
|
|
|
*/
|
2014-11-16 15:52:41 -08:00
|
|
|
EAPI Elm_Code *elm_code_create();
|
2014-10-17 15:36:07 -07:00
|
|
|
|
2014-10-26 15:08:52 -07:00
|
|
|
/**
|
2014-10-26 15:47:27 -07:00
|
|
|
* Free an Elm Code instance
|
2014-10-26 15:08:52 -07:00
|
|
|
*
|
2014-10-26 15:47:27 -07:00
|
|
|
* Releases the resources retained by the code instance and any files it references.
|
2014-10-26 15:08:52 -07:00
|
|
|
*/
|
2014-10-26 15:47:27 -07:00
|
|
|
EAPI void elm_code_free(Elm_Code *code);
|
2014-10-19 14:33:49 -07:00
|
|
|
|
2014-11-06 15:43:56 -08:00
|
|
|
/**
|
|
|
|
* @}
|
|
|
|
*
|
|
|
|
* @brief Callbacks and message passing.
|
|
|
|
* @defgroup Callbacks Managing the information flow between Elm_Code objects and Evas_Object widgets
|
|
|
|
*
|
|
|
|
* @{
|
|
|
|
*
|
|
|
|
* Managing the callbacks and other behaviours that cross the backend - frontend divide.
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
2014-11-09 13:53:30 -08:00
|
|
|
EAPI void elm_code_callback_fire(Elm_Code *code, const Eo_Event_Description *signal, void *data);
|
2014-11-06 15:43:56 -08:00
|
|
|
|
|
|
|
|
2014-10-17 13:36:03 -07:00
|
|
|
/**
|
|
|
|
* @}
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif /* ELM_CODE_H_ */
|