// LevelChange is an event fired when the level attribute has been updated.
//
// https://developer.mozilla.org/docs/Web/Events/levelchange
517660
func LevelChange(listener func(*vecty.Event)) *vecty.EventListener {
	return &vecty.EventListener{Name: "levelchange", Listener: listener}
}
662877
func (l Listener) OnChannelChange(e *gumble.ChannelChangeEvent) {
	if l.ChannelChange != nil {
		l.ChannelChange(e)
	}
}
1346164
func (k *SimpleFS) LocalChange(
	ctx context.Context, node libkbfs.Node, _ libkbfs.WriteRange) {
	k.subscribeLock.RLock()
	defer k.subscribeLock.RUnlock()
	if node.GetFolderBranch() == k.subscribeCurrFB {
		k.config.Reporter().NotifyPathUpdated(ctx, k.subscribeCurrTlfPathFromGUI)
	}
}
52541
func FullScreenChange(listener func(*vecty.Event)) *vecty.EventListener {
	return &vecty.EventListener{Name: "fullscreenchange", Listener: listener}
}
1137101
func (e ActualLRPEventCalculator) RecordChange(before, after *models.ActualLRP, lrps []*models.ActualLRP) []*models.ActualLRP {
	found := false
	newLRPs := []*models.ActualLRP{}
	for _, l := range lrps {
		if l == nil {
			// this entry is recording a LRP removal, just skip it
			newLRPs = append(newLRPs, nil)
			continue
		}

		if before != nil && l.ActualLRPInstanceKey.Equal(before.ActualLRPInstanceKey) {
			newLRPs = append(newLRPs, after)
			found = true
		} else {
			newLRPs = append(newLRPs, l)
		}
	}

	if !found {
		newLRPs = append(newLRPs, after)
	}

	return newLRPs
}
442020
func (l *LoggerLevels) DefaultLevel() zapcore.Level {
	l.mutex.RLock()
	lvl := l.defaultLevel
	l.mutex.RUnlock()
	return lvl
}
1367635
func (d *InstanceDiff) ChangeType() DiffChangeType {
	if d.Empty() {
		return DiffNone
	}

	if d.RequiresNew() && (d.GetDestroy() || d.GetDestroyTainted()) {
		return DiffDestroyCreate
	}

	if d.GetDestroy() || d.GetDestroyDeposed() {
		return DiffDestroy
	}

	if d.RequiresNew() {
		return DiffCreate
	}

	return DiffUpdate
}
745769
func (s *Settings) ClearOnChange(key string) {
	s.lock.Lock()
	defer s.lock.Unlock()
	delete(s.onChangeCallbacks, key)
}
1187286
func RateChange(listener func(*vecty.Event)) *vecty.EventListener {
	return &vecty.EventListener{Name: "ratechange", Listener: listener}
}
692295
func (l *ConsoleLogger) Level(o int) {
	if o >= 0 && o <= len(l.levels)-1 {
		l.outLevel = o
	}
}
632871
func (s *H264Settings) SetLevel(v string) *H264Settings {
	s.Level = &v
	return s
}
627293
func SetLevel(module string, level api.Level) {
	rwmutex.Lock()
	defer rwmutex.Unlock()
	moduleLevels.SetLevel(module, level)
}
485677
func Change(listener func(*vecty.Event)) *vecty.EventListener {
	return &vecty.EventListener{Name: "change", Listener: listener}
}
1209402
func (d *ResourceData) HasChange(key string) bool {
	o, n := d.GetChange(key)

	// If the type implements the Equal interface, then call that
	// instead of just doing a reflect.DeepEqual. An example where this is
	// needed is *Set
	if eq, ok := o.(Equal); ok {
		return !eq.Equal(n)
	}

	return !reflect.DeepEqual(o, n)
}
476027
func (l *intLogger) SetLevel(level Level) {
	atomic.StoreInt32(l.level, int32(level))
}
413881
func (a *Application) ChangeScale(scaleChange int) (int, error) {
	newScale := a.doc.DesiredScale + scaleChange
	if newScale < 0 {
		return a.doc.DesiredScale, errors.NotValidf("cannot remove more units than currently exist")
	}
	buildTxn := func(attempt int) ([]txn.Op, error) {
		if attempt > 0 {
			alive, err := isAlive(a.st, applicationsC, a.doc.DocID)
			if err != nil {
				return nil, errors.Trace(err)
			} else if !alive {
				return nil, applicationNotAliveErr
			}
			if err := a.Refresh(); err != nil {
				return nil, errors.Trace(err)
			}
			newScale = a.doc.DesiredScale + scaleChange
			if newScale < 0 {
				return nil, errors.NotValidf("cannot remove more units than currently exist")
			}
		}
		return []txn.Op{{
			C:  applicationsC,
			Id: a.doc.DocID,
			Assert: bson.D{{"life", Alive},
				{"charmurl", a.doc.CharmURL},
				{"unitcount", a.doc.UnitCount},
				{"scale", a.doc.DesiredScale}},
			Update: bson.D{{"$set", bson.D{{"scale", newScale}}}},
		}}, nil
	}
	if err := a.st.db().Run(buildTxn); err != nil {
		return a.doc.DesiredScale, errors.Errorf("cannot set scale for application %q to %v: %v", a, newScale, onAbort(err, applicationNotAliveErr))
	}
	a.doc.DesiredScale = newScale
	return newScale, nil
}
1121249
func SetLevel(level string) {
	lvl, err := log.ParseLevel(level)
	if err != nil {
		Fatal(fmt.Sprintf(`not a valid level: "%s"`, level))
	}
	log.SetLevel(lvl)
}