1
1
mirror of https://github.com/tstellar/bygfoot.git synced 2025-02-23 23:07:43 +01:00
bygfoot/src/option.h

57 lines
2.0 KiB
C
Raw Normal View History

2005-01-09 20:21:22 +00:00
#ifndef OPTION_H
#define OPTION_H
#include <math.h>
2005-01-09 20:21:22 +00:00
#include "bygfoot.h"
2005-03-23 19:03:26 +00:00
#include "option_struct.h"
2005-01-09 20:21:22 +00:00
/** Convenience abbrevs. */
#define option_set_float(name, option_array, value) option_set_int(name, option_array, (gint)rint(value * 1000))
2005-03-23 19:03:26 +00:00
#define opt_str(name) option_string(name, &options)
#define opt_strp(name) option_string_pointer(name, &options)
#define opt_int(name) option_int(name, &options)
#define opt_intp(name) option_int_pointer(name, &options)
#define opt_float(name) option_float(name, &options)
2005-03-23 19:03:26 +00:00
#define opt_set_int(name, value) option_set_int(name, &options, value)
#define opt_set_str(name, value) option_set_string(name, &options, value)
#define opt_set_float(name, value) option_set_float(name, &options, value)
2005-03-23 19:03:26 +00:00
#define opt_user_str(name) option_string(name, &current_user.options)
#define opt_user_strp(name) option_string_pointer(name, &current_user.options)
#define opt_user_int(name) option_int(name, &current_user.options)
#define opt_user_intp(name) option_int_pointer(name, &current_user.options)
#define opt_user_float(name) option_float(name, &current_user.options)
2005-03-23 19:03:26 +00:00
#define opt_user_set_int(name, value) option_set_int(name, &current_user.options, value)
#define opt_user_set_str(name, value) option_set_string(name, &current_user.options, value)
#define opt_user_set_float(name, value) option_set_float(name, &current_user.options, value)
2005-03-23 19:03:26 +00:00
#define const_str(name) option_string(name, &constants)
#define const_int(name) option_int(name, &constants)
#define const_float(name) option_float(name, &constants)
gfloat
2005-03-23 19:03:26 +00:00
option_float(const gchar *name, OptionList *optionlist);
gint
2005-03-23 19:03:26 +00:00
option_int(const gchar *name, OptionList *optionlist);
gint*
option_int_pointer(const gchar *name, OptionList *optionlist);
gchar*
2005-03-23 19:03:26 +00:00
option_string(const gchar *name, OptionList *optionlist);
GString*
option_string_pointer(const gchar *name, OptionList *optionlist);
void
2005-03-23 19:03:26 +00:00
option_set_string(const gchar *name, OptionList *optionlist, const gchar *new_value);
void
2005-03-23 19:03:26 +00:00
option_set_int(const gchar *name, OptionList *optionlist, gint new_value);
2005-01-09 20:21:22 +00:00
#endif