GDS-Render v1.2.1
plugin-main.c
Go to the documentation of this file.
1/*
2 * GDSII-Converter example plugin
3 * Copyright (C) 2019 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
29#include <stdio.h>
30#include <glib.h>
33
34int EXPORTED_FUNC_DECL(EXTERNAL_LIBRARY_RENDER_FUNCTION)(struct gds_cell *toplevel, GList *layer_info_list, const char *output_file_name, double scale)
35{
36 if (!toplevel)
37 return -1000;
38
39 printf("Rendering %s\n", toplevel->name);
40 return 0;
41}
42
43int EXPORTED_FUNC_DECL(EXTERNAL_LIBRARY_INIT_FUNCTION)(const char *params, const char *version)
44{
45 printf("Init with params: %s\ngds-render version: %s\n", params, version);
46 return 0;
47}
48
Defines types and macros used by the GDS-Parser.
#define EXPORTED_FUNC_DECL(FUNC)
Define for declaring the exported functions.
int EXPORTED_FUNC_DECL() EXTERNAL_LIBRARY_RENDER_FUNCTION(struct gds_cell *toplevel, GList *layer_info_list, const char *output_file_name, double scale)
Definition: plugin-main.c:34
int EXPORTED_FUNC_DECL() EXTERNAL_LIBRARY_INIT_FUNCTION(const char *params, const char *version)
Definition: plugin-main.c:43
A Cell inside a gds_library.
Definition: gds-types.h:122
char name[CELL_NAME_MAX]
Definition: gds-types.h:123