[MPlayer-G2-dev] GUI-related config (layer-0) metadata
Dan Christiansen
danchr at daimi.au.dk
Thu May 15 18:10:30 CEST 2003
On Thursday, May 15, 2003, at 03:28 PM, Arpi wrote:
> i vote for the last one.
> first option (built-in gui) is unacceptable, second is
> overcomplicated/bloated (hehe embedd mozilla into mplayer-g2 to
> interpret
> and run the xml gui :)), third is probably not enough.
>
> comments? recommendations for gui-related fields into config_t, if we
> agree on teh 4th solution?
I'd say having a function-based interface would be better. Accessing
variables through a function has the advantage that something like
input constraints could be handled directly. With a struct, you would
need a complex interface to tell you that one option was set one. A
function could return a non-zero value and set some errstring and/or
errno. I believe this would be much more dynamic than a struct.
A proposal:
int module_get_option_type(module_t module, char *key, char **type);
int module_get_option(module_t module, char *key, void **value);
int module_set_option(module_t module, char *key, void *value);
char **module_get_option_keys(module_t module);
void **module_get_option_values(module_t module);
char **module_get_option_types(module_t module);
char *module_get_error_string(module_t module, int errno);
- Dan
More information about the MPlayer-G2-dev
mailing list