GDS-Render v1.2.1
gds-output-renderer.h
Go to the documentation of this file.
1/*
2 * GDSII-Converter
3 * Copyright (C) 2018 Mario Hüttel <mario.huettel@gmx.net>
4 *
5 * This file is part of GDSII-Converter.
6 *
7 * GDSII-Converter is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation.
10 *
11 * GDSII-Converter is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with GDSII-Converter. If not, see <http://www.gnu.org/licenses/>.
18 */
19
31#ifndef _GDS_OUTPUT_RENDERER_H_
32#define _GDS_OUTPUT_RENDERER_H_
33
35#include <glib-object.h>
36#include <glib.h>
38
39G_BEGIN_DECLS
40
41#define GDS_RENDER_TYPE_OUTPUT_RENDERER (gds_output_renderer_get_type())
42
43G_DECLARE_DERIVABLE_TYPE(GdsOutputRenderer, gds_output_renderer, GDS_RENDER, OUTPUT_RENDERER, GObject);
44
50 GObjectClass parent_class;
51
55 int (*render_output)(GdsOutputRenderer *renderer,
56 struct gds_cell *cell,
57 double scale);
58 gpointer padding[4];
59};
60
61enum {
64};
65
70GdsOutputRenderer *gds_output_renderer_new();
71
78GdsOutputRenderer *gds_output_renderer_new_with_props(const char *output_file, LayerSettings *layer_settings);
79
87int gds_output_renderer_render_output(GdsOutputRenderer *renderer,
88 struct gds_cell *cell,
89 double scale);
90
96void gds_output_renderer_set_output_file(GdsOutputRenderer *renderer, const gchar *file_name);
97
103const char *gds_output_renderer_get_output_file(GdsOutputRenderer *renderer);
104
116LayerSettings *gds_output_renderer_get_and_ref_layer_settings(GdsOutputRenderer *renderer);
117
130void gds_output_renderer_set_layer_settings(GdsOutputRenderer *renderer, LayerSettings *settings);
131
145int gds_output_renderer_render_output_async(GdsOutputRenderer *renderer, struct gds_cell *cell, double scale);
146
155void gds_output_renderer_update_async_progress(GdsOutputRenderer *renderer, const char *status);
156
157G_END_DECLS
158
159#endif /* _GDS_OUTPUT_RENDERER_H_ */
160
Defines types and macros used by the GDS-Parser.
GdsOutputRenderer * gds_output_renderer_new()
Create a new GdsOutputRenderer GObject.
GdsOutputRenderer * gds_output_renderer_new_with_props(const char *output_file, LayerSettings *layer_settings)
Create a new GdsOutputRenderer GObject with its properties.
int gds_output_renderer_render_output_async(GdsOutputRenderer *renderer, struct gds_cell *cell, double scale)
Render output asynchronously.
void gds_output_renderer_set_output_file(GdsOutputRenderer *renderer, const gchar *file_name)
Convenience function for setting the "output-file" property.
G_DECLARE_DERIVABLE_TYPE(GdsOutputRenderer, gds_output_renderer, GDS_RENDER, OUTPUT_RENDERER, GObject)
const char * gds_output_renderer_get_output_file(GdsOutputRenderer *renderer)
Convenience function for getting the "output-file" property.
int gds_output_renderer_render_output(GdsOutputRenderer *renderer, struct gds_cell *cell, double scale)
gds_output_renderer_render_output
void gds_output_renderer_update_async_progress(GdsOutputRenderer *renderer, const char *status)
This function emits the 'progress-changed' in the thread/context that triggered an asynchronous rende...
LayerSettings * gds_output_renderer_get_and_ref_layer_settings(GdsOutputRenderer *renderer)
Get layer settings.
void gds_output_renderer_set_layer_settings(GdsOutputRenderer *renderer, LayerSettings *settings)
Set layer settings.
@ GDS_OUTPUT_RENDERER_PARAM_ERR
Error set by the _GdsOutputRendererClass::render_output virtual function, if parameters are faulty.
@ GDS_OUTPUT_RENDERER_GEN_ERR
Error set by the _GdsOutputRendererClass::render_output virtual function, if renderer is invalid.
LayerSettings class header file.
Base output renderer class structure.
int(* render_output)(GdsOutputRenderer *renderer, struct gds_cell *cell, double scale)
Virtual render output function. Overwritten by final class implementation.
A Cell inside a gds_library.
Definition: gds-types.h:122