summaryrefslogtreecommitdiff
path: root/support/dktools/dk3bmj.h
blob: a4e881f0609102d738849a687a820a8d638d340b (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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
/*
Copyright (C) 2011-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: dk3bmj.ctr
*/

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

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


#line 10 "dk3bmj.ctr"

#ifdef __cplusplus
extern "C" {
#endif

/**	Initialize job structure.
	@param	job	Structure to initialize.
	@param	app	Application structure for diagnostics.
*/
void
dk3bmj_init(dk3_bm_conversion_job_t *job, dk3_app_t *app);

/**	Write a log message.
	@param	app	Application structure.
	@param	ll	Log level.
	@param	i	Index of message text in internal array.
	@param	dest	Destination, combination of DK3_BMJ_LOG_xxx,
			see @ref bmepslogtargets.
	@param	job	Job structure.
*/
void
dk3bmj_log_i1(
  dk3_app_t			*app,
  int				 ll,
  size_t			 i,
  int				 dest,
  dk3_bm_conversion_job_t	*job
);

/**	Write a log message.
	@param	app	Application structure.
	@param	ll	Log level.
	@param	i1	Index of first message text in internal array.
	@param	i2	Index of third message text in internal array.
	@param	txt	Second message text.
	@param	dest	Destination, combination of DK3_BMJ_LOG_xxx,
			see @ref bmepslogtargets.
	@param	job	Job structure.
*/
void
dk3bmj_log_i3(
  dk3_app_t			*app,
  int				 ll,
  size_t			 i1,
  size_t			 i2,
  dkChar const			*txt,
  int				 dest,
  dk3_bm_conversion_job_t	*job
);

/**	Write a log message.
	@param	app	Application structure.
	@param	ll	Log level.
	@param	i1	Index of first message text in internal array.
	@param	i2	Index of third message text in internal array.
	@param	i3	Index of fifth message text in internal array.
	@param	txt1	Second message text.
	@param	txt2	Fourth message text.
	@param	dest	Destination, combination of DK3_BMJ_LOG_xxx,
			see @ref bmepslogtargets.
	@param	job	Job structure.
*/
void
dk3bmj_log_i5(
  dk3_app_t			*app,
  int				 ll,
  size_t			 i1,
  size_t			 i2,
  size_t			 i3,
  dkChar const			*txt1,
  dkChar const			*txt2,
  int				 dest,
  dk3_bm_conversion_job_t	*job
);

/**	Write a log message.
	@param	app	Application structure.
	@param	ll	Log level.
	@param	txta	Localized message texts.
	@param	i	Index of message text in @a txta.
	@param	dest	Destination, combination of DK3_BMJ_LOG_xxx,
			see @ref bmepslogtargets.
	@param	job	Job structure.
*/
void
dk3bmj_log_1(
  dk3_app_t			*app,
  int				 ll,
  dkChar const * const		*txta,
  size_t			 i,
  int				 dest,
  dk3_bm_conversion_job_t	*job
);

/**	Write a log message.
	@param	app	Application structure.
	@param	ll	Log level.
	@param	txta	Localized message texts.
	@param	i1	Index of first message text in @a txta.
	@param	i2	Index of third message text in @a txta.
	@param	txt	Second message text.
	@param	dest	Destination, combination of DK3_BMJ_LOG_xxx,
			see @ref bmepslogtargets.
	@param	job	Job structure.
*/
void
dk3bmj_log_3(
  dk3_app_t			*app,
  int				 ll,
  dkChar const * const		*txta,
  size_t			 i1,
  size_t			 i2,
  dkChar const			*txt,
  int				 dest,
  dk3_bm_conversion_job_t	*job
);

/**	Write a log message.
	@param	app	Application structure.
	@param	ll	Log level.
	@param	txta	Localized message texts.
	@param	i1	Index of first message text in @a txta.
	@param	i2	Index of third message text in @a txta.
	@param	i3	Index of fifth message text in @a txta.
	@param	txt1	Second message text.
	@param	txt2	Fourth message text.
	@param	dest	Destination, combination of DK3_BMJ_LOG_xxx,
			see @ref bmepslogtargets.
	@param	job	Job structure.
*/
void
dk3bmj_log_5(
  dk3_app_t			*app,
  int				 ll,
  dkChar const * const		*txta,
  size_t			 i1,
  size_t			 i2,
  size_t			 i3,
  dkChar const			*txt1,
  dkChar const			*txt2,
  int				 dest,
  dk3_bm_conversion_job_t	*job
);

/**	Set new value for progress bar.
	@param	pc	Communicator object pointer.
	@param	val	New value (0-1000).
*/
void
dk3bmj_progress(void *pc, int val);

/**	Show progress for completed image scanlines.
	@param	pc	Communicator object.
	@param	min	Minimum progress bar value.
	@param	max	Maximum progress bar value.
	@param	h	Image height (number of lines).
	@param	y	Current line completed.
*/
void
dk3bmj_lines_do_progress(
  void			*pc,
  int		 	min,
  int		 	max,
  dk3_bif_coord_t	h,
  dk3_bif_coord_t	y
);

/**	Show progress for completed image scanlines.
	Calls dk3bmj_lines_do_progress() if DK3_USE_WX is on,
	does nothing otherwise.
	@param	pc	Communicator object.
	@param	min	Minimum progress bar value.
	@param	max	Maximum progress bar value.
	@param	h	Image height (number of lines).
	@param	y	Current line completed.
*/
void
dk3bmj_lines_progress(
  void			*pc,
  int		 	min,
  int		 	max,
  dk3_bif_coord_t	h,
  dk3_bif_coord_t	y
);

/**	Show progress for completed image scanlines.
	@param	pc	Communicator object.
	@param	min	Minimum progress bar value.
	@param	max	Maximum progress bar value.
	@param	nObjects	Number of objects.
	@param	co	Current object number.
*/
void
dk3bmj_objects_do_progress(
  void			*pc,
  int			 min,
  int			 max,
  unsigned long		 nObjects,
  unsigned long		 co
);

/**	Show progress for completed image scanlines.
	Call dk3bmj_objects_do_progress() if DK3_USE_WX is on,
	do nothing otherwise.
	@param	pc	Communicator object.
	@param	min	Minimum progress bar value.
	@param	max	Maximum progress bar value.
	@param	nObjects	Number of objects.
	@param	co	Current object number.
*/
void
dk3bmj_obj_progress(
  void			*pc,
  int			 min,
  int			 max,
  unsigned long		 nObjects,
  unsigned long		 co
);

#ifdef __cplusplus
}
#endif


/**	@defgroup	bmepslogtargets	Log targets for bmeps3 and wxbmeps . */
/**@{*/
/**	Log destination:	Application structure.
*/
#define	DK3_BMJ_LOG_APP		1

/**	Log destination:	Job structure.
*/
#define	DK3_BMJ_LOG_JOB		2

/**	Log destination:	Application structure and job structure.
*/
#define	DK3_BMJ_LOG_BOTH	(DK3_BMJ_LOG_APP | DK3_BMJ_LOG_JOB)
/**@}*/



/**	@defgroup	bmepscompression	Compression type used by bmeps. 
*/
/**@{*/
/**	Output procedure: Uncompressed RGB.
*/
#define	DK3_BMEPS_RGB_UNCOMPRESSED	0

/**	Output procedure: Uncompressed gray.
*/
#define	DK3_BMEPS_GRAY_UNCOMPRESSED	1

/**	Output procedure: Run-length compressed RGB, separated color channels.
*/
#define	DK3_BMEPS_RGB_RUNLENGTH		2

/**	Output procedure: Run-length compressed gray.
*/
#define	DK3_BMEPS_GRAY_RUNLENGTH	3

/**	Output procedure: DCT-compressed RGB.
*/
#define	DK3_BMEPS_RGB_DCT		4

/**	Output procedure: DCT-compressed gray.
*/
#define	DK3_BMEPS_GRAY_DCT		5

/**	Output procedure: DCT-compressed CMYK.
*/
#define	DK3_BMEPS_CMYK_DCT		6

/**	Output procedure: Flate-compressed RGB.
*/
#define	DK3_BMEPS_RGB_FLATE		7

/**	Output procedure: Flate-compressed gray.
*/
#define	DK3_BMEPS_GRAY_FLATE		8

/**	Output procedure: Flate-compressed RGB with alpha (PDF output only).
*/
#define	DK3_BMEPS_RGB_ALPHA_FLATE	9

/**	Output procedure: Flate-compressed gray with alpha (PDF output only).
*/
#define	DK3_BMEPS_GRAY_ALPHA_FLATE	10	

/**@}*/




#endif