~ubuntu-branches/ubuntu/karmic/xmame/karmic

« back to all changes in this revision

Viewing changes to src/config.h

  • Committer: Bazaar Package Importer
  • Author(s): Bruno Barrera C.
  • Date: 2007-02-16 10:06:54 UTC
  • mfrom: (2.1.5 edgy)
  • Revision ID: james.westby@ubuntu.com-20070216100654-iztas2cl47k5j039
Tags: 0.106-2
* Added Italian debconf templates translation. (closes: #382672)
* Added German debconf templates translation. (closes: #396610)
* Added Japanese debconf templates translation. (closes: #400011)
* Added Portuguese debconf templates translation. (closes: #409960)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/***************************************************************************
2
2
 
3
 
        config.h
4
 
 
5
 
        Wrappers for handling MAME configuration files
 
3
    config.h
 
4
 
 
5
    Wrappers for handling MAME configuration files
 
6
 
 
7
    Copyright (c) 1996-2006, Nicola Salmoria and the MAME Team.
 
8
    Visit http://mamedev.org for licensing and usage restrictions.
6
9
 
7
10
***************************************************************************/
8
11
 
9
 
#ifndef CONFIG_H
10
 
#define CONFIG_H
 
12
#pragma once
 
13
 
 
14
#ifndef __CONFIG_H__
 
15
#define __CONFIG_H__
11
16
 
12
17
#include "mame.h"
13
18
#include "input.h"
14
 
 
15
 
 
16
 
/*************************************
17
 
 *
18
 
 *      Function prototypes
19
 
 *
20
 
 *************************************/
21
 
 
22
 
int config_load(const struct InputPort *input_ports_default, struct InputPort *input_ports);
23
 
void config_save(const struct InputPort *input_ports_default, const struct InputPort *input_ports);
24
 
int config_load_default(const struct InputPortDefinition *input_ports_backup, struct InputPortDefinition *input_ports);
25
 
void config_save_default(const struct InputPortDefinition *input_ports_backup, const struct InputPortDefinition *input_ports);
26
 
int config_load_controller(const char *name, struct InputPortDefinition *input_ports);
27
 
 
28
 
 
29
 
#endif /* CONFIG_H */
 
19
#include "xmlfile.h"
 
20
 
 
21
 
 
22
 
 
23
/*************************************
 
24
 *
 
25
 *  Constants
 
26
 *
 
27
 *************************************/
 
28
 
 
29
#define CONFIG_TYPE_INIT                        0               /* opportunity to initialize things first */
 
30
#define CONFIG_TYPE_CONTROLLER          1               /* loading from controller file */
 
31
#define CONFIG_TYPE_DEFAULT                     2               /* loading from default.cfg */
 
32
#define CONFIG_TYPE_GAME                        3               /* loading from game.cfg */
 
33
#define CONFIG_TYPE_FINAL                       4               /* opportunity to finish initialization */
 
34
 
 
35
 
 
36
 
 
37
/*************************************
 
38
 *
 
39
 *  Type definitions
 
40
 *
 
41
 *************************************/
 
42
 
 
43
typedef void (*config_callback)(int config_type, xml_data_node *parentnode);
 
44
 
 
45
 
 
46
 
 
47
/*************************************
 
48
 *
 
49
 *  Function prototypes
 
50
 *
 
51
 *************************************/
 
52
 
 
53
void config_init(void);
 
54
void config_register(const char *nodename, config_callback load, config_callback save);
 
55
int config_load_settings(void);
 
56
void config_save_settings(void);
 
57
 
 
58
#endif  /* __CONFIG_H__ */