// EachSoundFont iterates over SoundFonts paths to use by supported MIDI backends.
351051
func EachSoundFont(function func(string) int) int {
	eachSoundFontFunc = function
	return int(C.Mix_EachSoundFont((*[0]byte)(C.callEachSoundFont), nil))
}
219947
func (ListInstanceGroups) Each(resp interface{}, callback IterateItemFunc) {
	items, ok := resp.(*ListInstanceGroupsResponse)
	if !ok {
		callback(nil, fmt.Errorf("wrong type, ListInstanceGroupsResponse was expected, got %T", resp))
		return
	}

	for i := range items.InstanceGroup {
		if !callback(&items.InstanceGroup[i], nil) {
			break
		}
	}
}
521608
func (t *Pot) EachBin(val Val, pof Pof, po int, f func(int, int, func(func(val Val) bool) bool) bool) {
	t.eachBin(val, pof, po, f)
}
137417
func (ListResourceDetails) Each(resp interface{}, callback IterateItemFunc) {
	items, ok := resp.(*ListResourceDetailsResponse)
	if !ok {
		callback(nil, fmt.Errorf("wrong type, ListResourceDetailsResponse was expected, got %T", resp))
		return
	}

	for i := range items.ResourceDetail {
		if !callback(&items.ResourceDetail[i], nil) {
			break
		}
	}
}
612209
func ReadFonts(dirPth string, suffix string) (err error) {
	files := make([]string, 0, 10)
	dir, err := ioutil.ReadDir(dirPth)
	if err != nil {
		return err
	}
	PthSep := string(os.PathSeparator)
	suffix = strings.ToUpper(suffix) //忽略后缀匹配的大小写
	for _, fi := range dir {
		if fi.IsDir() { // 忽略目录
			continue
		}
		if strings.HasSuffix(strings.ToUpper(fi.Name()), suffix) { //匹配文件
			files = append(files, dirPth+PthSep+fi.Name())
		}
	}
	SetFontFamily(files...)
	return nil
}
1063512
func (ListSnapshots) Each(resp interface{}, callback IterateItemFunc) {
	items, ok := resp.(*ListSnapshotsResponse)
	if !ok {
		callback(nil, fmt.Errorf("wrong type, ListSnapshotsResponse was expected, got %T", resp))
		return
	}

	for i := range items.Snapshot {
		if !callback(&items.Snapshot[i], nil) {
			break
		}
	}
}
607980
func (ListVirtualMachines) Each(resp interface{}, callback IterateItemFunc) {
	items, ok := resp.(*ListVirtualMachinesResponse)
	if !ok {
		callback(nil, fmt.Errorf("wrong type, ListVirtualMachinesResponse was expected, got %T", resp))
		return
	}

	for i := range items.VirtualMachine {
		if !callback(&items.VirtualMachine[i], nil) {
			break
		}
	}
}
1208882
func (r *StandardRegistry) Each(f func(string, interface{})) {
	for name, i := range r.registered() {
		f(name, i)
	}
}
834
func (f *ListenerStack) Each(d Event) {
	if f.Size() <= 0 {
		return
	}

	f.lock.RLock()

	// var ro sync.Mutex
	var stop bool

	for _, fx := range f.listeners {
		if stop {
			break
		}
		//TODO: is this critical that we send it into a goroutine with a mutex?
		fx(d, func() {
			// ro.Lock()
			stop = true
			// ro.Unlock()
		})
	}

	f.lock.RUnlock()
}
524881
func IsFont(buf []byte) bool {
	kind, _ := Font(buf)
	return kind != types.Unknown
}
1324922
func (this Collection) Each(f func(*Context)) Collection {
    for _, c := range this {
        f(c)
    }

    return this
}
1216871
func (ListAccounts) Each(resp interface{}, callback IterateItemFunc) {
	items, ok := resp.(*ListAccountsResponse)
	if !ok {
		callback(nil, fmt.Errorf("wrong type, ListAccountsResponse was expected, got %T", resp))
		return
	}

	for i := range items.Account {
		if !callback(&items.Account[i], nil) {
			break
		}
	}
}
56432
func UserFontFaceCreate() *FontFace {
	ret := wrapFontFace(C.cairo_user_font_face_create())
	if err := ret.status(); err != nil {
		panic(err)
	}
	return ret
}
738760
func MustFont(font *truetype.Font, err error) *truetype.Font {
	if err != nil {
		panic(err)
	}
	if font == nil {
		panic("font is nil")
	}
	return font
}
1083900
func (ListResourceLimits) Each(resp interface{}, callback IterateItemFunc) {
	items, ok := resp.(*ListResourceLimitsResponse)
	if !ok {
		callback(nil, fmt.Errorf("wrong type, ListResourceLimitsResponse was expected, got %T", resp))
		return
	}

	for i := range items.ResourceLimit {
		if !callback(&items.ResourceLimit[i], nil) {
			break
		}
	}
}
958322
func (ListVolumes) Each(resp interface{}, callback IterateItemFunc) {
	items, ok := resp.(*ListVolumesResponse)
	if !ok {
		callback(nil, fmt.Errorf("wrong type, ListVolumesResponse was expected, got %T", resp))
		return
	}

	for i := range items.Volume {
		if !callback(&items.Volume[i], nil) {
			break
		}
	}
}
807190
func (ListNetworkOfferings) Each(resp interface{}, callback IterateItemFunc) {
	items, ok := resp.(*ListNetworkOfferingsResponse)
	if !ok {
		callback(nil, fmt.Errorf("wrong type, ListNetworkOfferingsResponse was expected, got %T", resp))
		return
	}

	for i := range items.NetworkOffering {
		if !callback(&items.NetworkOffering[i], nil) {
			break
		}
	}
}