config.go 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. // TODO configuration support
  2. package al
  3. /*
  4. #include <stdlib.h>
  5. #include <allegro5/allegro.h>
  6. #include "helpers.h"
  7. #include "callbacks.h"
  8. */
  9. import "C"
  10. /*
  11. typedef struct ALLEGRO_CONFIG ALLEGRO_CONFIG;
  12. typedef struct ALLEGRO_CONFIG_SECTION ALLEGRO_CONFIG_SECTION;
  13. typedef struct ALLEGRO_CONFIG_ENTRY ALLEGRO_CONFIG_ENTRY;
  14. AL_FUNC(ALLEGRO_CONFIG *, al_create_config, (void));
  15. AL_FUNC(void, al_add_config_section, (ALLEGRO_CONFIG *config, const char *name));
  16. AL_FUNC(void, al_set_config_value, (ALLEGRO_CONFIG *config, const char *section, const char *key, const char *value));
  17. AL_FUNC(void, al_add_config_comment, (ALLEGRO_CONFIG *config, const char *section, const char *comment));
  18. AL_FUNC(const char*, al_get_config_value, (const ALLEGRO_CONFIG *config, const char *section, const char *key));
  19. AL_FUNC(ALLEGRO_CONFIG*, al_load_config_file, (const char *filename));
  20. AL_FUNC(ALLEGRO_CONFIG*, al_load_config_file_f, (ALLEGRO_FILE *filename));
  21. AL_FUNC(bool, al_save_config_file, (const char *filename, const ALLEGRO_CONFIG *config));
  22. AL_FUNC(bool, al_save_config_file_f, (ALLEGRO_FILE *file, const ALLEGRO_CONFIG *config));
  23. AL_FUNC(void, al_merge_config_into, (ALLEGRO_CONFIG *master, const ALLEGRO_CONFIG *add));
  24. AL_FUNC(ALLEGRO_CONFIG *, al_merge_config, (const ALLEGRO_CONFIG *cfg1, const ALLEGRO_CONFIG *cfg2));
  25. AL_FUNC(void, al_destroy_config, (ALLEGRO_CONFIG *config));
  26. AL_FUNC(bool, al_remove_config_section, (ALLEGRO_CONFIG *config,
  27. char const *section));
  28. AL_FUNC(bool, al_remove_config_key, (ALLEGRO_CONFIG *config,
  29. char const *section, char const *key));
  30. AL_FUNC(char const *, al_get_first_config_section, (ALLEGRO_CONFIG const *config, ALLEGRO_CONFIG_SECTION **iterator));
  31. AL_FUNC(char const *, al_get_next_config_section, (ALLEGRO_CONFIG_SECTION **iterator));
  32. AL_FUNC(char const *, al_get_first_config_entry, (ALLEGRO_CONFIG const *config, char const *section,
  33. ALLEGRO_CONFIG_ENTRY **iterator));
  34. AL_FUNC(char const *, al_get_next_config_entry, (ALLEGRO_CONFIG_ENTRY **iterator));
  35. */