Mercurial > mplayer.hg
annotate m_config.h @ 13792:d603c33bb3d3
menu option to set desired movie aspect & keep aspect on window resize
author | nplourde |
---|---|
date | Thu, 28 Oct 2004 22:03:26 +0000 |
parents | 5dea9e3618ba |
children | 63909962d3fc |
rev | line source |
---|---|
10594
57bdcdb061d7
Removed the historic cfgparser and switched full to the new config parser (altought some macros still remain for compatibility). As a side effect 90% of the warning messages are gone from the core. Things should be cleaner now and less confusing for newbies.
alex
parents:
10582
diff
changeset
|
1 #ifndef _M_CONFIG_H |
57bdcdb061d7
Removed the historic cfgparser and switched full to the new config parser (altought some macros still remain for compatibility). As a side effect 90% of the warning messages are gone from the core. Things should be cleaner now and less confusing for newbies.
alex
parents:
10582
diff
changeset
|
2 #define _M_CONFIG_H |
8164 | 3 |
4 typedef struct m_config_option m_config_option_t; | |
5 typedef struct m_config_save_slot m_config_save_slot_t; | |
6 struct m_option; | |
7 struct m_option_type; | |
8 | |
9 struct m_config_save_slot { | |
10 m_config_save_slot_t* prev; | |
11 int lvl; | |
13246 | 12 // we have to store other datatypes in this as well, |
13 // so make sure we get properly aligned addresses | |
14 unsigned char data[0] __attribute__ ((aligned (8))); | |
8164 | 15 }; |
16 | |
17 struct m_config_option { | |
18 m_config_option_t* next; | |
19 char* name; // Full name (ie option:subopt) | |
20 struct m_option* opt; | |
21 m_config_save_slot_t* slots; | |
22 unsigned int flags; // currently it only tell if the option was set | |
23 }; | |
24 | |
25 typedef struct m_config { | |
26 m_config_option_t* opts; | |
27 int lvl; // Current stack level | |
28 int mode; | |
29 } m_config_t; | |
30 | |
9912
39444d65c4cb
Don't save restore all options wich point to the same variable.
albeu
parents:
8168
diff
changeset
|
31 #define M_CFG_OPT_SET (1<<0) |
39444d65c4cb
Don't save restore all options wich point to the same variable.
albeu
parents:
8168
diff
changeset
|
32 #define M_CFG_OPT_ALIAS (1<<1) |
39444d65c4cb
Don't save restore all options wich point to the same variable.
albeu
parents:
8168
diff
changeset
|
33 |
8164 | 34 |
35 //////////////////////////// Functions /////////////////////////////////// | |
36 | |
37 m_config_t* | |
38 m_config_new(void); | |
39 | |
40 void | |
41 m_config_free(m_config_t* config); | |
42 | |
43 void | |
44 m_config_push(m_config_t* config); | |
45 | |
46 void | |
47 m_config_pop(m_config_t* config); | |
48 | |
49 int | |
50 m_config_register_options(m_config_t *config, struct m_option *args); | |
51 | |
52 int | |
53 m_config_set_option(m_config_t *config, char* arg, char* param); | |
54 | |
55 int | |
56 m_config_check_option(m_config_t *config, char* arg, char* param); | |
57 | |
58 struct m_option* | |
59 m_config_get_option(m_config_t *config, char* arg); | |
60 | |
8168 | 61 void |
62 m_config_print_option_list(m_config_t *config); | |
63 | |
10594
57bdcdb061d7
Removed the historic cfgparser and switched full to the new config parser (altought some macros still remain for compatibility). As a side effect 90% of the warning messages are gone from the core. Things should be cleaner now and less confusing for newbies.
alex
parents:
10582
diff
changeset
|
64 #endif /* _M_CONFIG_H */ |