Modify External Renderer: External renderer docu updated for future changes, restructuring. Not that the changes in the documentation are not yet implemented in code
This commit is contained in:
		@@ -0,0 +1,46 @@
 | 
			
		||||
#ifndef __EXTERNAL_RENDERER_INTERFACES_H__
 | 
			
		||||
#define __EXTERNAL_RENDERER_INTERFACES_H__
 | 
			
		||||
 | 
			
		||||
#ifndef xstr
 | 
			
		||||
 | 
			
		||||
#define xstr(a) str(a)
 | 
			
		||||
#define str(a) #a
 | 
			
		||||
 | 
			
		||||
#endif /* xstr */
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * @addtogroup ExternalRenderer
 | 
			
		||||
 * @{
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * @brief Function name expected to be found in external library for rendering.
 | 
			
		||||
 *
 | 
			
		||||
 * The function has to be defined as follows:
 | 
			
		||||
 * @code
 | 
			
		||||
 * int EXTERNAL_LIBRARY_RENDER_FUNCTION(struct gds_cell *toplevel, GList *layer_info_list, const char *output_file_name, double scale);
 | 
			
		||||
 * @endcode
 | 
			
		||||
 */
 | 
			
		||||
#define EXTERNAL_LIBRARY_RENDER_FUNCTION exported_render_cell_to_file
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * @brief Function name expected to be found in external library for initialization.
 | 
			
		||||
 *
 | 
			
		||||
 * @code
 | 
			
		||||
 * int EXTERNAL_LIBRARY_INIT_FUNCTION(const char *option_string, const char *version_string);
 | 
			
		||||
 * @endcode
 | 
			
		||||
 */
 | 
			
		||||
#define EXTERNAL_LIBRARY_INIT_FUNCTION exported_init
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * @brief Global integer specified by an external renderer to signal, that the init and render functions shall be executed in a subprocess
 | 
			
		||||
 *
 | 
			
		||||
 * The pure presence of this symbol name causes forking. The content of this variable is don't care.
 | 
			
		||||
 * @note Use this if you mess with the internal structures of gds-render
 | 
			
		||||
 *
 | 
			
		||||
 */
 | 
			
		||||
#define EXTERNAL_LIBRARY_FORK_REQUEST exported_fork_request
 | 
			
		||||
 | 
			
		||||
/** @} */
 | 
			
		||||
 | 
			
		||||
#endif /* __EXTERNAL_RENDERER_INTERFACES_H__ */
 | 
			
		||||
@@ -33,6 +33,7 @@
 | 
			
		||||
 | 
			
		||||
#include <gds-render/output-renderers/gds-output-renderer.h>
 | 
			
		||||
#include <gds-render/gds-utils/gds-types.h>
 | 
			
		||||
#include <gds-render/output-renderers/external-renderer-interfaces.h>
 | 
			
		||||
 | 
			
		||||
G_BEGIN_DECLS
 | 
			
		||||
 | 
			
		||||
@@ -40,16 +41,6 @@ G_BEGIN_DECLS
 | 
			
		||||
 | 
			
		||||
G_DECLARE_FINAL_TYPE(ExternalRenderer, external_renderer, GDS_RENDER, EXTERNAL_RENDERER, GdsOutputRenderer)
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * @brief function name expected to be found in external library.
 | 
			
		||||
 * 
 | 
			
		||||
 * The function has to be defined as follows:
 | 
			
		||||
 * @code
 | 
			
		||||
 * int EXTERNAL_LIBRARY_FUNCTION(struct gds_cell *toplevel, GList *layer_info_list, const char *output_file_name, double scale)
 | 
			
		||||
 * @endcode
 | 
			
		||||
 */
 | 
			
		||||
#define EXTERNAL_LIBRARY_FUNCTION "render_cell_to_file"
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * @brief Create new ExternalRenderer object
 | 
			
		||||
 * @return New object
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user