|
ExternalRenderer * | external_renderer_new () |
| Create new ExternalRenderer object. More...
|
|
ExternalRenderer * | external_renderer_new_with_so_and_param (const char *so_path, const char *param_string) |
| Create new ExternalRenderer object with specified shared object path. More...
|
|
static int | external_renderer_render_cell (struct gds_cell *toplevel_cell, GList *layer_info_list, const char *output_file, double scale, const char *so_path, const char *params) |
| Execute render function in shared object to render the supplied cell. More...
|
|
static int | external_renderer_render_output (GdsOutputRenderer *renderer, struct gds_cell *cell, double scale) |
|
static void | external_renderer_get_property (GObject *obj, guint property_id, GValue *value, GParamSpec *pspec) |
|
static void | external_renderer_set_property (GObject *obj, guint property_id, const GValue *value, GParamSpec *pspec) |
|
static void | external_renderer_dispose (GObject *self_obj) |
|
static void | external_renderer_class_init (ExternalRendererClass *klass) |
|
static void | external_renderer_init (ExternalRenderer *self) |
|
Properties
This class inherits all properties from its parent GDS Output Renderer base class. In addition to that, it implements the following properties:
Property Name | Description |
shared-object-path | Path to the shared object used for rendering |
param-string | Command line parameters passed to external renderer's init function |
All these properties have to be set for rendering.
Necessary Functions
The following functions and variables are necessary for an external renderer to implement:
◆ EXPORT_FUNC
#define EXPORT_FUNC __attribute__((visibility("default"))) |
◆ EXPORTED_FUNC_DECL
Define for declaring the exported functions.
This not only helps with the declaration but also makes the symbols visible, so they can be called form outside the library
Definition at line 72 of file external-renderer-interfaces.h.
◆ EXTERNAL_LIBRARY_FORK_REQUEST
#define EXTERNAL_LIBRARY_FORK_REQUEST exported_fork_request |
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
Definition at line 65 of file external-renderer-interfaces.h.
◆ EXTERNAL_LIBRARY_INIT_FUNCTION
#define EXTERNAL_LIBRARY_INIT_FUNCTION exported_init |
Function name expected to be found in external library for initialization.
int EXPORTED_FUNC_DECL() EXTERNAL_LIBRARY_INIT_FUNCTION(const char *params, const char *version)
Definition at line 57 of file external-renderer-interfaces.h.
◆ EXTERNAL_LIBRARY_RENDER_FUNCTION
#define EXTERNAL_LIBRARY_RENDER_FUNCTION exported_render_cell_to_file |
Function name expected to be found in external library for rendering.
The function has to be defined as follows:
int EXPORTED_FUNC_DECL() EXTERNAL_LIBRARY_RENDER_FUNCTION(struct gds_cell *toplevel, GList *layer_info_list, const char *output_file_name, double scale)
A Cell inside a gds_library.
Definition at line 48 of file external-renderer-interfaces.h.
◆ FORCE_FORK
if != 0, then forking is forced regardless of the shared object's settings
Definition at line 39 of file external-renderer.c.
◆ GDS_RENDER_TYPE_EXTERNAL_RENDERER
#define GDS_RENDER_TYPE_EXTERNAL_RENDERER (external_renderer_get_type()) |
◆ anonymous enum
Enumerator |
---|
PROP_SO_PATH | Shared object path property.
|
PROP_PARAM_STRING | |
N_PROPERTIES | Shared object renderer parameter string from CLI.
Used to get property count
|
Definition at line 47 of file external-renderer.c.
◆ external_renderer_class_init()
static void external_renderer_class_init |
( |
ExternalRendererClass * |
klass | ) |
|
|
static |
◆ external_renderer_dispose()
static void external_renderer_dispose |
( |
GObject * |
self_obj | ) |
|
|
static |
◆ external_renderer_get_property()
static void external_renderer_get_property |
( |
GObject * |
obj, |
|
|
guint |
property_id, |
|
|
GValue * |
value, |
|
|
GParamSpec * |
pspec |
|
) |
| |
|
static |
◆ external_renderer_init()
static void external_renderer_init |
( |
ExternalRenderer * |
self | ) |
|
|
static |
◆ external_renderer_new()
ExternalRenderer * external_renderer_new |
( |
| ) |
|
◆ external_renderer_new_with_so_and_param()
ExternalRenderer * external_renderer_new_with_so_and_param |
( |
const char * |
so_path, |
|
|
const char * |
param_string |
|
) |
| |
Create new ExternalRenderer object with specified shared object path.
- Parameters
-
so_path | Path to shared object, the rendering function is searched in |
param_string | Command line parameter string passed to external renderer |
- Returns
- New object.
Definition at line 275 of file external-renderer.c.
◆ external_renderer_render_cell()
static int external_renderer_render_cell |
( |
struct gds_cell * |
toplevel_cell, |
|
|
GList * |
layer_info_list, |
|
|
const char * |
output_file, |
|
|
double |
scale, |
|
|
const char * |
so_path, |
|
|
const char * |
params |
|
) |
| |
|
static |
Execute render function in shared object to render the supplied cell.
- Parameters
-
toplevel_cell | Cell to render |
layer_info_list | Layer information (Color etc.) |
output_file | Destination file |
scale | the scaling value to scale the output cell down by. |
so_path | Path to shared object |
params | Parameters passed to EXTERNAL_LIBRARY_INIT_FUNCTION |
- Returns
- 0 if successful
Definition at line 65 of file external-renderer.c.
◆ external_renderer_render_output()
static int external_renderer_render_output |
( |
GdsOutputRenderer * |
renderer, |
|
|
struct gds_cell * |
cell, |
|
|
double |
scale |
|
) |
| |
|
static |
◆ external_renderer_set_property()
static void external_renderer_set_property |
( |
GObject * |
obj, |
|
|
guint |
property_id, |
|
|
const GValue * |
value, |
|
|
GParamSpec * |
pspec |
|
) |
| |
|
static |
◆ external_renderer_properties
GParamSpec* external_renderer_properties[N_PROPERTIES] = {NULL} |
|
static |