summaryrefslogtreecommitdiff
path: root/support/dktools/wxdrd.h
blob: 9fa59137bab032cea59992424961dee8a062ec45 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
/*
Copyright (C) 2018-2020, Dirk Krause
SPDX-License-Identifier: BSD-3-Clause
*/

/*
	WARNING: This file was generated by the dkct program (see
	http://dktools.sourceforge.net/ for details).
	Changes you make here will be lost if dkct is run again!
	You should modify the original source and run dkct on it.
	Original source: wxdrd.ctr
*/

/**	@file wxdrd.h Header file for the wxdrd module.
*/

#ifndef WXDRD_H_INCLUDED
/** Avoid multiple inclusions. */
#define WXDRD_H_INCLUDED 1


#line 8 "wxdrd.ctr"

#ifndef	DK4APP_H_INCLUDED
#include "dk4app.h"
#endif

#ifndef	WXDTYPES_H_INCLUDED
#include "wxdtypes.h"
#endif


#ifdef	__cplusplus
extern "C" {
#endif


/**	Open a drawing from file.
	@param	fn	File name.
	@param	job	Job structure.
	@return	Valid pointer to drawing on success, NULL on error.
*/

wxd_drawing_t *
wxdrd_open_from_file(const dkChar *fn, wxd2lat_job_t *job);


/**	Open a new empty drawing.
	@return	Valid pointer to drawing on success, NULL on error.
*/

wxd_drawing_t *
wxdrd_open_empty(void);


/**	Apply file contents to empty drawing.
	@param	drw		Drawing to modify.
	@param	fipo	File pointer, opened for text reading.
	@param	fn		File name, may be NULL.
	@param	job		Job structure.
	@return	1 on success, 0 on error.
*/

int
wxdrd_apply_file(
	wxd_drawing_t	*drw,
	FILE			*fipo,
	const dkChar	*fn,
	wxd2lat_job_t	*job
);


/**	Close drawing and release resources.
	@param	drw	Drawing to close.
*/

void
wxdrd_close(wxd_drawing_t *drw);


#ifdef	__cplusplus
}
#endif

/* vim: set ai sw=4 ts=4 : */

#endif