summaryrefslogtreecommitdiffstatshomepage
path: root/src/mess/tools/imgtool/filter.h
blob: cbeef088830abe80f01f3c8bcdbd2356afd46f8b (plain) (blame)
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
/***************************************************************************

    filter.h

    Imgtool filters

***************************************************************************/

#ifndef FILTER_H
#define FILTER_H

#include <stdlib.h>
#include <stdio.h>

#include "library.h"

struct imgtool_filter;

enum
{
	/* --- the following bits of info are returned as 64-bit signed integers --- */
	FILTINFO_INT_FIRST = 0x00000,
	FILTINFO_INT_STATESIZE,

	/* --- the following bits of info are returned as pointers to data or functions --- */
	FILTINFO_PTR_FIRST = 0x10000,
	FILTINFO_PTR_READFILE,
	FILTINFO_PTR_WRITEFILE,
	FILTINFO_PTR_CHECKSTREAM,

	/* --- the following bits of info are returned as NULL-terminated strings --- */
	FILTINFO_STR_FIRST = 0x20000,
	FILTINFO_STR_NAME,
	FILTINFO_STR_HUMANNAME,
	FILTINFO_STR_EXTENSION
};

extern const filter_getinfoproc filters[];

filter_getinfoproc filter_lookup(const char *name);

/* ----------------------------------------------------------------------- */

INT64 filter_get_info_int(filter_getinfoproc get_info, UINT32 state);
void *filter_get_info_ptr(filter_getinfoproc get_info, UINT32 state);
void *filter_get_info_fct(filter_getinfoproc get_info, UINT32 state);
const char *filter_get_info_string(filter_getinfoproc get_info, UINT32 state);

/* ----------------------------------------------------------------------- */

extern void filter_eoln_getinfo(UINT32 state, union filterinfo *info);
extern void filter_cocobas_getinfo(UINT32 state, union filterinfo *info);
extern void filter_dragonbas_getinfo(UINT32 state, union filterinfo *info);
extern void filter_macbinary_getinfo(UINT32 state, union filterinfo *info);
extern void filter_vzsnapshot_getinfo(UINT32 state, union filterinfo *info);
extern void filter_vzbas_getinfo(UINT32 state, union filterinfo *info);
extern void filter_thombas5_getinfo(UINT32 state, union filterinfo *info);
extern void filter_thombas7_getinfo(UINT32 state, union filterinfo *info);
extern void filter_thombas128_getinfo(UINT32 state, union filterinfo *info);
extern void filter_thomcrypt_getinfo(UINT32 state, union filterinfo *info);
extern void filter_bml3bas_getinfo(UINT32 state, union filterinfo *info);


#endif /* FILTER_H */