Update include file hierarchy: Move include file to central include tree
This commit is contained in:
		@@ -10,18 +10,18 @@ add_subdirectory(glade)
 | 
			
		||||
add_subdirectory(doxygen)
 | 
			
		||||
add_subdirectory(version)
 | 
			
		||||
 | 
			
		||||
include_directories(${GLIB_INCLUDE_DIRS} ${GTK3_INCLUDE_DIRS} ${CAIRO_INCLUDE_DIRS})
 | 
			
		||||
include_directories(${GLIB_INCLUDE_DIRS} ${GTK3_INCLUDE_DIRS} ${CAIRO_INCLUDE_DIRS} ${CMAKE_CURRENT_SOURCE_DIR}/include)
 | 
			
		||||
link_directories(${GLIB_LINK_DIRS} ${GTK3_LINK_DIRS} ${CAIRO_LINK_DIRS})
 | 
			
		||||
add_definitions(${GLIB2_CFLAGS_OTHER})
 | 
			
		||||
 | 
			
		||||
aux_source_directory("widgets" LAYER_SOURCES)
 | 
			
		||||
aux_source_directory("tree-renderer" RENDERER_SOURCES)
 | 
			
		||||
aux_source_directory("gds-utils" GDS_SOURCES)
 | 
			
		||||
aux_source_directory("latex-output" LATEX_SOURCES)
 | 
			
		||||
aux_source_directory("cairo-output" CAIRO_SOURCES)
 | 
			
		||||
aux_source_directory("trigonometric" TRIG_SOURCES)
 | 
			
		||||
aux_source_directory("latex-renderer" LATEX_SOURCES)
 | 
			
		||||
aux_source_directory("cairo-renderer" CAIRO_SOURCES)
 | 
			
		||||
aux_source_directory("geometric" GEOMETRIC_SOURCES)
 | 
			
		||||
aux_source_directory("layer" LAYER_SELECTOR_SOURCES)
 | 
			
		||||
set(SOURCE "main.c" "mapping-parser.c" "command-line.c" "gds-render-gui.c" "external-renderer.c")
 | 
			
		||||
set(SOURCE "main.c" "command-line.c" "gds-render-gui.c" "external-renderer.c")
 | 
			
		||||
 | 
			
		||||
set(SOURCE
 | 
			
		||||
  ${SOURCE}
 | 
			
		||||
@@ -30,7 +30,7 @@ set(SOURCE
 | 
			
		||||
  ${GDS_SOURCES}
 | 
			
		||||
  ${LATEX_SOURCES}
 | 
			
		||||
  ${CAIRO_SOURCES}
 | 
			
		||||
  ${TRIG_SOURCES}
 | 
			
		||||
  ${GEOMETRIC_SOURCES}
 | 
			
		||||
  ${LAYER_SELECTOR_SOURCES}
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -26,13 +26,14 @@
 | 
			
		||||
 *  @{
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#include "cairo-output.h"
 | 
			
		||||
#include <math.h>
 | 
			
		||||
#include <stdlib.h>
 | 
			
		||||
#include <cairo.h>
 | 
			
		||||
#include <cairo-pdf.h>
 | 
			
		||||
#include <cairo-svg.h>
 | 
			
		||||
 | 
			
		||||
#include <gds-render/cairo-renderer/cairo-output.h>
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * @brief The cairo_layer struct
 | 
			
		||||
 * Each rendered layer is represented by this struct.
 | 
			
		||||
@@ -29,14 +29,15 @@
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#include <stdio.h>
 | 
			
		||||
#include "command-line.h"
 | 
			
		||||
#include "gds-utils/gds-parser.h"
 | 
			
		||||
#include "mapping-parser.h"
 | 
			
		||||
#include "layer/layer-info.h"
 | 
			
		||||
#include "cairo-output/cairo-output.h"
 | 
			
		||||
#include "latex-output/latex-output.h"
 | 
			
		||||
#include "external-renderer.h"
 | 
			
		||||
#include "gds-utils/gds-tree-checker.h"
 | 
			
		||||
 | 
			
		||||
#include <gds-render/command-line.h>
 | 
			
		||||
#include <gds-render/gds-utils/gds-parser.h>
 | 
			
		||||
#include <gds-render/layer/mapping-parser.h>
 | 
			
		||||
#include <gds-render/layer/layer-info.h>
 | 
			
		||||
#include <gds-render/cairo-renderer/cairo-output.h>
 | 
			
		||||
#include <gds-render/latex-renderer/latex-output.h>
 | 
			
		||||
#include <gds-render/external-renderer.h>
 | 
			
		||||
#include <gds-render/gds-utils/gds-tree-checker.h>
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * @brief Delete layer_info and free nem element.
 | 
			
		||||
 
 | 
			
		||||
@@ -1,8 +1,8 @@
 | 
			
		||||
/* This file only contains help information for doxygen */
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * @defgroup trigonometric Trigonometric Helper Functions
 | 
			
		||||
 * @defgroup geometric Geometric Helper Functions
 | 
			
		||||
 * 
 | 
			
		||||
 * The trigonometric helper function are used to calculate bounding boxes
 | 
			
		||||
 * The geometric helper function are used to calculate bounding boxes
 | 
			
		||||
 * @warning Code is incomplete. Please double check for functionality!
 | 
			
		||||
 */
 | 
			
		||||
@@ -28,10 +28,11 @@
 | 
			
		||||
 * @{
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#include "external-renderer.h"
 | 
			
		||||
#include <dlfcn.h>
 | 
			
		||||
#include <stdio.h>
 | 
			
		||||
 | 
			
		||||
#include <gds-render/external-renderer.h>
 | 
			
		||||
 | 
			
		||||
int external_renderer_render_cell(struct gds_cell *toplevel_cell, GList *layer_info_list,
 | 
			
		||||
				  char *output_file, char *so_path)
 | 
			
		||||
{
 | 
			
		||||
 
 | 
			
		||||
@@ -27,19 +27,20 @@
 | 
			
		||||
 * @{
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#include "gds-render-gui.h"
 | 
			
		||||
#include <stdio.h>
 | 
			
		||||
#include "gds-utils/gds-parser.h"
 | 
			
		||||
#include <gtk/gtk.h>
 | 
			
		||||
#include "layer/layer-selector.h"
 | 
			
		||||
#include "tree-renderer/tree-store.h"
 | 
			
		||||
#include "latex-output/latex-output.h"
 | 
			
		||||
#include "widgets/conv-settings-dialog.h"
 | 
			
		||||
#include "cairo-output/cairo-output.h"
 | 
			
		||||
#include "trigonometric/cell-trigonometrics.h"
 | 
			
		||||
#include "version/version.h"
 | 
			
		||||
#include "tree-renderer/lib-cell-renderer.h"
 | 
			
		||||
#include "gds-utils/gds-tree-checker.h"
 | 
			
		||||
 | 
			
		||||
#include <gds-render/gds-render-gui.h>
 | 
			
		||||
#include <gds-render/gds-utils/gds-parser.h>
 | 
			
		||||
#include <gds-render/gds-utils/gds-tree-checker.h>
 | 
			
		||||
#include <gds-render/layer/layer-selector.h>
 | 
			
		||||
#include <gds-render/tree-renderer/tree-store.h>
 | 
			
		||||
#include <gds-render/tree-renderer/lib-cell-renderer.h>
 | 
			
		||||
#include <gds-render/latex-renderer/latex-output.h>
 | 
			
		||||
#include <gds-render/cairo-renderer/cairo-output.h>
 | 
			
		||||
#include <gds-render/widgets/conv-settings-dialog.h>
 | 
			
		||||
#include <gds-render/geometric/cell-geometrics.h>
 | 
			
		||||
#include <gds-render/version.h>
 | 
			
		||||
 | 
			
		||||
enum gds_render_gui_signal_sig_ids {SIGNAL_WINDOW_CLOSED = 0, SIGNAL_COUNT};
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -34,8 +34,6 @@
 | 
			
		||||
 * @{
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#include "gds-parser.h"
 | 
			
		||||
#include <stdlib.h>
 | 
			
		||||
#include <stdio.h>
 | 
			
		||||
#include <string.h>
 | 
			
		||||
@@ -43,6 +41,8 @@
 | 
			
		||||
#include <math.h>
 | 
			
		||||
#include <cairo.h>
 | 
			
		||||
 | 
			
		||||
#include <gds-render/gds-utils/gds-parser.h>
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * @brief Default units assumed for library.
 | 
			
		||||
 * @note This value is usually overwritten with the value defined in the library.
 | 
			
		||||
 
 | 
			
		||||
@@ -33,9 +33,10 @@
 | 
			
		||||
 * @{
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#include "gds-tree-checker.h"
 | 
			
		||||
#include <stdio.h>
 | 
			
		||||
 | 
			
		||||
#include <gds-render/gds-utils/gds-tree-checker.h>
 | 
			
		||||
 | 
			
		||||
int gds_tree_check_cell_references(struct gds_library *lib)
 | 
			
		||||
{
 | 
			
		||||
	GList *cell_iter;
 | 
			
		||||
 
 | 
			
		||||
@@ -24,14 +24,15 @@
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * @addtogroup trigonometric
 | 
			
		||||
 * @addtogroup geometric
 | 
			
		||||
 * @{
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#include <stdio.h>
 | 
			
		||||
#include "bounding-box.h"
 | 
			
		||||
#include <math.h>
 | 
			
		||||
 | 
			
		||||
#include <gds-render/geometric/bounding-box.h>
 | 
			
		||||
 | 
			
		||||
#define MIN(a,b) (((a) < (b)) ? (a) : (b)) /**< @brief Return smaller number */
 | 
			
		||||
#define MAX(a,b) (((a) > (b)) ? (a) : (b)) /**< @brief Return bigger number */
 | 
			
		||||
#define ABS_DBL(a) ((a) < 0 ? -(a) : (a))
 | 
			
		||||
@@ -18,16 +18,17 @@
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * @file cell-trigonometrics.c
 | 
			
		||||
 * @file cell-geometrics.c
 | 
			
		||||
 * @brief Calculation of gds_cell trigonometrics
 | 
			
		||||
 * @author Mario Hüttel <mario.huettel@gmx.net>
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#include "cell-trigonometrics.h"
 | 
			
		||||
#include <math.h>
 | 
			
		||||
 | 
			
		||||
#include <gds-render/geometric/cell-geometrics.h>
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * @addtogroup trigonometric
 | 
			
		||||
 * @addtogroup geometric
 | 
			
		||||
 * @{
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
@@ -24,14 +24,15 @@
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * @addtogroup trigonometric
 | 
			
		||||
 * @addtogroup geometric
 | 
			
		||||
 * @{
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#include "vector-operations.h"
 | 
			
		||||
#include <math.h>
 | 
			
		||||
#include <stdlib.h>
 | 
			
		||||
 | 
			
		||||
#include <gds-render/geometric/vector-operations.h>
 | 
			
		||||
 | 
			
		||||
#define ABS_DBL(a) ((a) < 0 ? -(a) : (a))
 | 
			
		||||
 | 
			
		||||
double vector_2d_scalar_multipy(struct vector_2d *a, struct vector_2d *b)
 | 
			
		||||
@@ -21,11 +21,11 @@
 | 
			
		||||
 * @brief Header File for Cairo output renderer
 | 
			
		||||
 * @author Mario Hüttel <mario.huettel@gmx.net>
 | 
			
		||||
 */
 | 
			
		||||
#ifndef __CAIRO_OUTPUT_H__
 | 
			
		||||
#define __CAIRO_OUTPUT_H__
 | 
			
		||||
#ifndef _CAIRO_OUTPUT_H_
 | 
			
		||||
#define _CAIRO_OUTPUT_H_
 | 
			
		||||
 | 
			
		||||
#include "../layer/layer-info.h"
 | 
			
		||||
#include "../gds-utils/gds-types.h"
 | 
			
		||||
#include <gds-render/gds-utils/gds-types.h>
 | 
			
		||||
#include <gds-render/layer/layer-info.h>
 | 
			
		||||
 | 
			
		||||
/** @addtogroup Cairo-Renderer
 | 
			
		||||
 *  @{
 | 
			
		||||
@@ -45,4 +45,4 @@ void cairo_render_cell_to_vector_file(struct gds_cell *cell, GList *layer_infos,
 | 
			
		||||
 | 
			
		||||
/** @} */
 | 
			
		||||
 | 
			
		||||
#endif /* __CAIRO_OUTPUT_H__ */
 | 
			
		||||
#endif /* _CAIRO_OUTPUT_H_ */
 | 
			
		||||
@@ -30,6 +30,7 @@
 | 
			
		||||
 | 
			
		||||
#ifndef _COMMAND_LINE_H_
 | 
			
		||||
#define _COMMAND_LINE_H_
 | 
			
		||||
 | 
			
		||||
#include <glib.h>
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
@@ -48,6 +49,8 @@
 | 
			
		||||
 * @param so_name Path to shared object of custom renderer
 | 
			
		||||
 * @param so_out_file Output file path for custom renderer
 | 
			
		||||
 * @param svg_name SVG file name
 | 
			
		||||
 *
 | 
			
		||||
 * @note This function is pretty damn retarded (Lots of parameters). Will be reworked when generating GObjects for renderers.
 | 
			
		||||
 */
 | 
			
		||||
void command_line_convert_gds(char *gds_name, char *pdf_name, char *tex_name, gboolean pdf, gboolean tex,
 | 
			
		||||
			      char *layer_file, char *cell_name, double scale, gboolean pdf_layers,
 | 
			
		||||
@@ -31,7 +31,7 @@
 | 
			
		||||
#ifndef _EXTERNAL_RENDERER_H_
 | 
			
		||||
#define _EXTERNAL_RENDERER_H_
 | 
			
		||||
 | 
			
		||||
#include "gds-utils/gds-types.h"
 | 
			
		||||
#include <gds-render/gds-utils/gds-types.h>
 | 
			
		||||
#include <glib.h>
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
@@ -28,11 +28,12 @@
 | 
			
		||||
 * @{
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#ifndef __GDSPARSE_H__
 | 
			
		||||
#define __GDSPARSE_H__
 | 
			
		||||
#ifndef _GDSPARSER_H_
 | 
			
		||||
#define _GDSPARSER_H_
 | 
			
		||||
 | 
			
		||||
#include <glib.h>
 | 
			
		||||
#include "gds-types.h"
 | 
			
		||||
 | 
			
		||||
#include <gds-render/gds-utils/gds-types.h>
 | 
			
		||||
 | 
			
		||||
#define GDS_PRINT_DEBUG_INFOS (0) /**< @brief 1: Print infos, 0: Don't print */
 | 
			
		||||
 | 
			
		||||
@@ -46,4 +47,4 @@ int clear_lib_list(GList **library_list);
 | 
			
		||||
 | 
			
		||||
/** @} */
 | 
			
		||||
 | 
			
		||||
#endif /* __GDSPARSE_H__ */
 | 
			
		||||
#endif /* _GDSPARSE_H_ */
 | 
			
		||||
@@ -31,7 +31,7 @@
 | 
			
		||||
#ifndef _GDS_TREE_CHECKER_H_
 | 
			
		||||
#define _GDS_TREE_CHECKER_H_
 | 
			
		||||
 | 
			
		||||
#include "gds-types.h"
 | 
			
		||||
#include <gds-render/gds-utils/gds-types.h>
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * @brief gds_tree_check_cell_references checks if all child cell references can be resolved in the given library
 | 
			
		||||
@@ -24,14 +24,15 @@
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * @addtogroup trigonometric
 | 
			
		||||
 * @addtogroup geometric
 | 
			
		||||
 * @{
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#ifndef _BOUNDING_BOX_H_
 | 
			
		||||
#define _BOUNDING_BOX_H_
 | 
			
		||||
 | 
			
		||||
#include <glib.h>
 | 
			
		||||
#include "vector-operations.h"
 | 
			
		||||
#include <gds-render/geometric/vector-operations.h>
 | 
			
		||||
#include <stdbool.h>
 | 
			
		||||
 | 
			
		||||
union bounding_box {
 | 
			
		||||
@@ -24,21 +24,21 @@
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * @addtogroup trigonometric
 | 
			
		||||
 * @addtogroup geometric
 | 
			
		||||
 * @{
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#ifndef _CELL_TRIGONOMETRICS_H_
 | 
			
		||||
#define _CELL_TRIGONOMETRICS_H_
 | 
			
		||||
 | 
			
		||||
#include "bounding-box.h"
 | 
			
		||||
#include "../gds-utils/gds-types.h"
 | 
			
		||||
#include <gds-render/geometric/bounding-box.h>
 | 
			
		||||
#include <gds-render/gds-utils/gds-types.h>
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * @brief calculate_cell_bounding_box Calculate bounding box of gds cell
 | 
			
		||||
 * @param box Resulting boundig box. Will be uüdated and not overwritten
 | 
			
		||||
 * @param cell toplevel cell
 | 
			
		||||
 * @warning Path handling not yet implemented correctly
 | 
			
		||||
 * @warning Path handling not yet implemented correctly.
 | 
			
		||||
 */
 | 
			
		||||
void calculate_cell_bounding_box(union bounding_box *box, struct gds_cell *cell);
 | 
			
		||||
 | 
			
		||||
@@ -24,7 +24,7 @@
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * @addtogroup trigonometric
 | 
			
		||||
 * @addtogroup geometric
 | 
			
		||||
 * @{
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
@@ -31,10 +31,11 @@
 | 
			
		||||
 * @{
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#include "../gds-utils/gds-types.h"
 | 
			
		||||
#include <glib.h>
 | 
			
		||||
#include <stdio.h>
 | 
			
		||||
#include "../layer/layer-info.h"
 | 
			
		||||
 | 
			
		||||
#include "gds-render/layer/layer-info.h"
 | 
			
		||||
#include <gds-render/gds-utils/gds-types.h>
 | 
			
		||||
 | 
			
		||||
#define LATEX_LINE_BUFFER_KB (10) /**< @brief Buffer for LaTeX Code line in KiB */
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										51
									
								
								include/gds-render/layer/layer-info.h
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										51
									
								
								include/gds-render/layer/layer-info.h
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,51 @@
 | 
			
		||||
/*
 | 
			
		||||
 * GDSII-Converter
 | 
			
		||||
 * Copyright (C) 2019  Mario Hüttel <mario.huettel@gmx.net>
 | 
			
		||||
 *
 | 
			
		||||
 * This file is part of GDSII-Converter.
 | 
			
		||||
 *
 | 
			
		||||
 * GDSII-Converter is free software: you can redistribute it and/or modify
 | 
			
		||||
 * it under the terms of the GNU General Public License version 2 as
 | 
			
		||||
 * published by the Free Software Foundation.
 | 
			
		||||
 *
 | 
			
		||||
 * GDSII-Converter is distributed in the hope that it will be useful,
 | 
			
		||||
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 | 
			
		||||
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 | 
			
		||||
 * GNU General Public License for more details.
 | 
			
		||||
 *
 | 
			
		||||
 * You should have received a copy of the GNU General Public License
 | 
			
		||||
 * along with GDSII-Converter.  If not, see <http://www.gnu.org/licenses/>.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * @file layer-info.c
 | 
			
		||||
 * @brief Helper functions and definition of layer info struct
 | 
			
		||||
 * @author Mario Hüttel <mario.huettel@gmx.net>
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#ifndef _LAYER_INFO_H_
 | 
			
		||||
#define _LAYER_INFO_H_
 | 
			
		||||
 | 
			
		||||
#include <gtk/gtk.h>
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * @brief Layer information.
 | 
			
		||||
 *
 | 
			
		||||
 * This structs contains information on how to render a layer
 | 
			
		||||
 */
 | 
			
		||||
struct layer_info
 | 
			
		||||
{
 | 
			
		||||
	int layer; /**< @brief Layer number */
 | 
			
		||||
	char *name; /**< @brief Layer name */
 | 
			
		||||
	int stacked_position; ///< @brief Position of layer in output @warning This parameter is not used by any renderer so far @note Lower is bottom, higher is top
 | 
			
		||||
	GdkRGBA color; /**< @brief RGBA color used to render this layer */
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * @brief Delete a layer_info struct
 | 
			
		||||
 * @param info Struct to be deleted.
 | 
			
		||||
 * @note The layer_info::name Element has to be freed manually
 | 
			
		||||
 */
 | 
			
		||||
void layer_info_delete_struct(struct layer_info *info);
 | 
			
		||||
 | 
			
		||||
#endif // _LAYER_INFO_H_
 | 
			
		||||
@@ -31,8 +31,9 @@
 | 
			
		||||
 * @{
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#include <gtk/gtk.h>
 | 
			
		||||
#include "widgets/layer-element.h"
 | 
			
		||||
#include <glib.h>
 | 
			
		||||
 | 
			
		||||
#include <gds-render/widgets/layer-element.h>
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * @brief Load a line from \p stream and parse try to parse it as layer information
 | 
			
		||||
@@ -23,9 +23,10 @@
 | 
			
		||||
 * @author Mario Hüttel <mario.huettel@gmx.net>
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#include "latex-output.h"
 | 
			
		||||
#include <math.h>
 | 
			
		||||
 | 
			
		||||
#include <gds-render/latex-renderer/latex-output.h>
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * @addtogroup LaTeX-Renderer
 | 
			
		||||
 * @{
 | 
			
		||||
@@ -1,9 +1,39 @@
 | 
			
		||||
/*
 | 
			
		||||
 * GDSII-Converter
 | 
			
		||||
 * Copyright (C) 2019  Mario Hüttel <mario.huettel@gmx.net>
 | 
			
		||||
 *
 | 
			
		||||
 * This file is part of GDSII-Converter.
 | 
			
		||||
 *
 | 
			
		||||
 * GDSII-Converter is free software: you can redistribute it and/or modify
 | 
			
		||||
 * it under the terms of the GNU General Public License version 2 as
 | 
			
		||||
 * published by the Free Software Foundation.
 | 
			
		||||
 *
 | 
			
		||||
 * GDSII-Converter is distributed in the hope that it will be useful,
 | 
			
		||||
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 | 
			
		||||
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 | 
			
		||||
 * GNU General Public License for more details.
 | 
			
		||||
 *
 | 
			
		||||
 * You should have received a copy of the GNU General Public License
 | 
			
		||||
 * along with GDSII-Converter.  If not, see <http://www.gnu.org/licenses/>.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * @file layer-info.c
 | 
			
		||||
 * @brief Helper functions for layer info struct
 | 
			
		||||
 * @author Mario Hüttel <mario.huettel@gmx.net>
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#include "layer-info.h"
 | 
			
		||||
/**
 | 
			
		||||
 * @addtogroup MainApplication
 | 
			
		||||
 * @{
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#include <gds-render/layer/layer-info.h>
 | 
			
		||||
 | 
			
		||||
void layer_info_delete_struct(struct layer_info *info)
 | 
			
		||||
{
 | 
			
		||||
	if (info)
 | 
			
		||||
		free(info);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/** @} */
 | 
			
		||||
 
 | 
			
		||||
@@ -1,26 +0,0 @@
 | 
			
		||||
#ifndef _LAYER_INFO_H_
 | 
			
		||||
#define _LAYER_INFO_H_
 | 
			
		||||
 | 
			
		||||
#include <gtk/gtk.h>
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * @brief Layer information.
 | 
			
		||||
 *
 | 
			
		||||
 * This structs contains information on how to render a layer
 | 
			
		||||
 */
 | 
			
		||||
struct layer_info
 | 
			
		||||
{
 | 
			
		||||
	int layer; /**< @brief Layer number */
 | 
			
		||||
	char *name; /**< @brief Layer name */
 | 
			
		||||
	int stacked_position; ///< @brief Position of layer in output @warning This parameter is not used by any renderer so far @note Lower is bottom, higher is top
 | 
			
		||||
	GdkRGBA color; /**< @brief RGBA color used to render this layer */
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * @brief Delete a layer_info struct
 | 
			
		||||
 * @param info Struct to be deleted.
 | 
			
		||||
 * @note The layer_info::name Element has to be freed manually
 | 
			
		||||
 */
 | 
			
		||||
void layer_info_delete_struct(struct layer_info *info);
 | 
			
		||||
 | 
			
		||||
#endif // _LAYER_INFO_H_
 | 
			
		||||
@@ -28,16 +28,17 @@
 | 
			
		||||
 * @{
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#include "layer-selector.h"
 | 
			
		||||
#include "layer-info.h"
 | 
			
		||||
#include "../gds-utils/gds-parser.h"
 | 
			
		||||
#include "../widgets/layer-element.h"
 | 
			
		||||
#include "../mapping-parser.h"
 | 
			
		||||
#include <glib.h>
 | 
			
		||||
#include <string.h>
 | 
			
		||||
#include <stdio.h>
 | 
			
		||||
#include <stdlib.h>
 | 
			
		||||
 | 
			
		||||
#include <gds-render/layer/layer-selector.h>
 | 
			
		||||
#include <gds-render/layer/layer-info.h>
 | 
			
		||||
#include <gds-render/gds-utils/gds-parser.h>
 | 
			
		||||
#include <gds-render/widgets/layer-element.h>
 | 
			
		||||
#include <gds-render/layer/mapping-parser.h>
 | 
			
		||||
 | 
			
		||||
struct _LayerSelector {
 | 
			
		||||
	/* Parent */
 | 
			
		||||
	GObject parent;
 | 
			
		||||
@@ -55,7 +56,6 @@ struct _LayerSelector {
 | 
			
		||||
 | 
			
		||||
G_DEFINE_TYPE(LayerSelector, layer_selector, G_TYPE_OBJECT)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/* Drag and drop code 
 | 
			
		||||
 * Original code from https://blog.gtk.org/2017/06/01/drag-and-drop-in-lists-revisited/
 | 
			
		||||
 */
 | 
			
		||||
 
 | 
			
		||||
@@ -29,7 +29,7 @@
 | 
			
		||||
 * @{
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#include "mapping-parser.h"
 | 
			
		||||
#include <gds-render/layer/mapping-parser.h>
 | 
			
		||||
 | 
			
		||||
int mapping_parser_load_line(GDataInputStream *stream, gboolean *export, char **name, int *layer, GdkRGBA *color)
 | 
			
		||||
{
 | 
			
		||||
							
								
								
									
										13
									
								
								main.c
									
									
									
									
									
								
							
							
						
						
									
										13
									
								
								main.c
									
									
									
									
									
								
							@@ -20,10 +20,11 @@
 | 
			
		||||
#include <stdio.h>
 | 
			
		||||
#include <gtk/gtk.h>
 | 
			
		||||
#include <glib.h>
 | 
			
		||||
#include "gds-render-gui.h"
 | 
			
		||||
#include "command-line.h"
 | 
			
		||||
#include "external-renderer.h"
 | 
			
		||||
#include "version/version.h"
 | 
			
		||||
 | 
			
		||||
#include <gds-render/gds-render-gui.h>
 | 
			
		||||
#include <gds-render/command-line.h>
 | 
			
		||||
#include <gds-render/external-renderer.h>
 | 
			
		||||
#include <gds-render/version.h>
 | 
			
		||||
 | 
			
		||||
struct application_data {
 | 
			
		||||
		GtkApplication *app;
 | 
			
		||||
@@ -119,7 +120,9 @@ static int start_gui(int argc, char **argv)
 | 
			
		||||
 | 
			
		||||
	GtkApplication *gapp;
 | 
			
		||||
	int app_status;
 | 
			
		||||
	static struct application_data appdata = {.gui_list = NULL};
 | 
			
		||||
	static struct application_data appdata = {
 | 
			
		||||
		.gui_list = NULL
 | 
			
		||||
	};
 | 
			
		||||
	GMenu *menu;
 | 
			
		||||
	GMenu *m_quit;
 | 
			
		||||
	GMenu *m_about;
 | 
			
		||||
 
 | 
			
		||||
@@ -17,8 +17,8 @@
 | 
			
		||||
 * along with GDSII-Converter.  If not, see <http://www.gnu.org/licenses/>.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#include "lib-cell-renderer.h"
 | 
			
		||||
#include "../gds-utils/gds-types.h"
 | 
			
		||||
#include <gds-render/tree-renderer/lib-cell-renderer.h>
 | 
			
		||||
#include <gds-render/gds-utils/gds-types.h>
 | 
			
		||||
 | 
			
		||||
G_DEFINE_TYPE(LibCellRenderer, lib_cell_renderer, GTK_TYPE_CELL_RENDERER_TEXT)
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -28,9 +28,9 @@
 | 
			
		||||
 * @{
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#include "tree-store.h"
 | 
			
		||||
#include "lib-cell-renderer.h"
 | 
			
		||||
#include "../gds-utils/gds-types.h"
 | 
			
		||||
#include <gds-render/tree-renderer/tree-store.h>
 | 
			
		||||
#include <gds-render/tree-renderer/lib-cell-renderer.h>
 | 
			
		||||
#include <gds-render/gds-utils/gds-types.h>
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * @brief this function olny allows cells to be selected
 | 
			
		||||
 
 | 
			
		||||
@@ -23,7 +23,6 @@
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#ifdef PROJECT_GIT_VERSION
 | 
			
		||||
 | 
			
		||||
#define xstr(a) str(a)
 | 
			
		||||
#define str(a) #a
 | 
			
		||||
const char *_app_version_string = xstr(PROJECT_GIT_VERSION);
 | 
			
		||||
 
 | 
			
		||||
@@ -28,7 +28,7 @@
 | 
			
		||||
 * @{
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#include "conv-settings-dialog.h"
 | 
			
		||||
#include <gds-render/widgets/conv-settings-dialog.h>
 | 
			
		||||
 | 
			
		||||
struct  _RendererSettingsDialog {
 | 
			
		||||
		GtkDialog parent;
 | 
			
		||||
 
 | 
			
		||||
@@ -35,7 +35,7 @@
 | 
			
		||||
 * @{
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#include "layer-element.h"
 | 
			
		||||
#include <gds-render/widgets/layer-element.h>
 | 
			
		||||
 | 
			
		||||
G_DEFINE_TYPE(LayerElement, layer_element, GTK_TYPE_LIST_BOX_ROW)
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user