Esempio n. 1
0
func (c *Config) IterSections() chan string {
	channel := make(chan string)
	go func() {
		var iter *C.ALLEGRO_CONFIG_SECTION

		var name_ptr *C.char

		name_ptr = C.al_get_first_config_section((*C.ALLEGRO_CONFIG)(c), &iter)

		for name_ptr != nil {
			name := C.GoString(name_ptr)
			channel <- name

			name_ptr = C.al_get_next_config_section(&iter)

		}
		close(channel)
	}()
	return channel
}
Esempio n. 2
0
func GetNextSection(iterator **ConfigSection) string {
	return C.GoString(C.al_get_next_config_section((**C.ALLEGRO_CONFIG_SECTION)(unsafe.Pointer(iterator))))
}