// gtk_widget_trigger_tooltip_query
// gtk_widget_get_snapshot
359289
func (v *Widget) GetWindow() *gdk.Window {
	return gdk.WindowFromUnsafe(unsafe.Pointer(C.gtk_widget_get_window(v.GWidget)))
}
1284572
func (v *MenuToolButton) SetArrowTooltipText(text string) {
	pt := C.CString(text)
	defer cfree(pt)
	C.gtk_menu_tool_button_set_arrow_tooltip_text(MENU_TOOL_BUTTON(v), gstring(pt))
}
734983
func (s *Store) Snapshot() (snapshot *Store) {
	coll := copyColl(*(*map[string]*Collection)(atomic.LoadPointer(&s.coll)))
	res := &Store{
		coll:      unsafe.Pointer(&coll),
		file:      s.file,
		size:      atomic.LoadInt64(&s.size),
		readOnly:  true,
		callbacks: s.callbacks,
	}
	for _, name := range collNames(coll) {
		collOrig := coll[name]
		coll[name] = &Collection{
			store:    res,
			compare:  collOrig.compare,
			rootLock: collOrig.rootLock,
			root:     collOrig.rootAddRef(),
		}
	}
	return res
}
627847
func (d *Lepton3) Snapshot() (*RawFrame, error) {
	if err := d.Open(); err != nil {
		return nil, err
	}
	defer d.Close()
	frame := new(RawFrame)
	if err := d.NextFrame(frame); err != nil {
		return nil, err
	}
	return frame, nil
}
408462
func (c *tufClient) downloadSnapshot() error {
	logrus.Debug("Loading snapshot...")
	role := data.CanonicalSnapshotRole
	consistentInfo := c.newBuilder.GetConsistentInfo(role)

	_, err := c.tryLoadCacheThenRemote(consistentInfo)
	return err
}
67168
func (p *AuroraAdminClient) Snapshot(ctx context.Context) (r *Response, err error) {
  var _args344 AuroraAdminSnapshotArgs
  var _result345 AuroraAdminSnapshotResult
  if err = p.Client_().Call(ctx, "snapshot", &_args344, &_result345); err != nil {
    return
  }
  return _result345.GetSuccess(), nil
}
419083
func (ss *segmentStack) ChildCollectionSnapshot(childCollectionName string) (
	Snapshot, error) {
	if ss.childSegStacks == nil {
		return nil, nil
	}
	childSegStack, exists := ss.childSegStacks[childCollectionName]
	if !exists {
		return nil, nil
	}
	childSegStack.addRef()
	return childSegStack, nil
}
398733
func (d *driver) SnapshotInspect(
	ctx types.Context,
	snapshotID string,
	opts types.Store) (*types.Snapshot, error) {
	// TODO Snapshots are not implemented yet
	return nil, types.ErrNotImplemented
}
1141108
func (dfs *DistributedFilesystem) Snapshot(data SnapshotInfo, spaceFactor int) (string, error) {
	label := generateSnapshotLabel()
	vol, err := dfs.disk.Get(data.TenantID)

	if volume.DriverTypeDeviceMapper == dfs.disk.DriverType() {
		freeSpace, err := ensureFreeSpace(vol, dfs, spaceFactor)
		if err != nil {
			glog.Errorf("Could not determine freespace on devicemapper device %s", err)
			return "", err
		}
		if !freeSpace {
			return "", errors.New("There is not enough diskspace to complete your request. You should enlarge your thin pool using LVM tools and/or delete some snapshots")
		}
	}
	if err != nil {
		glog.Errorf("Could not get volume for tenant %s: %s", data.TenantID, err)
		return "", err
	}
	// relabel all registry tags for this snapshot
	images := make([]string, len(data.Images))
	for i, image := range data.Images {
		rImage, err := dfs.index.FindImage(image)
		if err != nil {
			glog.Errorf("Could not find image %s for snapshot: %s", image, err)
			return "", err
		}

		// make sure we actually have the image locally before changing the tag and triggering a push
		if _, err := dfs.reg.FindImage(rImage); err != nil {
			glog.Errorf("Could not find image %s locally for snapshot:  %s", rImage.String(), err)
			return "", err
		}

		rImage.Tag = label
		if err := dfs.index.PushImage(rImage.String(), rImage.UUID, rImage.Hash); err != nil {
			glog.Errorf("Could not retag image %s for snapshot: %s", image, err)
			return "", err
		}
		fullImagePath, err := dfs.reg.ImagePath(rImage.String())
		if err != nil {
			glog.Errorf("Could not get the full image path for image %s: %s", image, err)
			return "", err
		}
		images[i] = fullImagePath
	}
	// write snapshot metadata
	w, err := vol.WriteMetadata(label, ImagesMetadataFile)
	if err != nil {
		glog.Errorf("Could not create image metadata file for tenant %s: %s", data.TenantID, err)
		return "", err
	}
	if err := exportJSON(w, images); err != nil {
		glog.Errorf("Could not write service metadata file for tenant %s: %s", data.TenantID, err)
		return "", err
	}
	w, err = vol.WriteMetadata(label, ServicesMetadataFile)
	if err != nil {
		glog.Errorf("Could not create service metadata file for tenant %s: %s", data.TenantID, err)
		return "", err
	}
	if err := exportJSON(w, data.Services); err != nil {
		glog.Errorf("Could not write service metadata file for tenant %s: %s", data.TenantID, err)
		return "", err
	}
	// snapshot the volume
	if err := vol.Snapshot(label, data.Message, data.Tags); err != nil {
		glog.Errorf("Could not snapshot volume for tenant %s: %s", data.TenantID, err)
		return "", err
	}
	info, err := vol.SnapshotInfo(label)
	if err != nil {
		glog.Errorf("Could not get info for snapshot %s of tenant %s: %s", label, data.TenantID, err)
		return "", err
	}
	return info.Name, nil
}
163283
func (s *SnapshotGetService) Snapshot(snapshots ...string) *SnapshotGetService {
	s.snapshot = append(s.snapshot, snapshots...)
	return s
}
840463
func (s *SnapshotDeleteService) Snapshot(snapshot string) *SnapshotDeleteService {
	s.snapshot = snapshot
	return s
}
1035869
func (f *Facade) GetSnapshotInfo(ctx datastore.Context, snapshotID string) (*dfs.SnapshotInfo, error) {
	defer ctx.Metrics().Stop(ctx.Metrics().Start("Facade.GetSnapshotInfo"))
	info, err := f.dfs.Info(snapshotID)
	if err != nil {
		plog.WithField("snapshotid", snapshotID).WithError(err).Debug("Could not get info for snapshot")
		return nil, err
	}
	return info, nil
}
39553
func (d *driver) Snapshot(volumeID string, readonly bool, locator *api.VolumeLocator, noRetry bool) (string, error) {
	vols, err := d.Inspect([]string{volumeID})
	if err != nil {
		return "", err
	}
	if len(vols) != 1 {
		return "", fmt.Errorf("Failed to inspect %v len %v", volumeID, len(vols))
	}
	snapID := uuid.New()
	vols[0].Id = snapID
	vols[0].Source = &api.Source{Parent: volumeID}
	vols[0].Locator = locator
	vols[0].Ctime = prototime.Now()

	if err := d.CreateVol(vols[0]); err != nil {
		return "", err
	}
	chaos.Now(koStrayCreate)
	err = d.btrfs.Create(snapID, volumeID, "", nil)
	if err != nil {
		return "", err
	}
	return vols[0].Id, nil
}
1252452
func GetAuthDBSnapshot(c context.Context, id string) (*protocol.AuthDB, error) {
	report := durationReporter(c, getSnapshotDuration)
	logging.Debugf(c, "Fetching AuthDB snapshot from the datastore")
	defer logging.Debugf(c, "AuthDB snapshot fetched")

	c = ds.WithoutTransaction(defaultNS(c))
	snap := Snapshot{ID: id}
	switch err := ds.Get(c, &snap); {
	case err == ds.ErrNoSuchEntity:
		report("ERROR_NO_SNAPSHOT")
		return nil, err // not transient
	case err != nil:
		report("ERROR_TRANSIENT")
		return nil, transient.Tag.Apply(err)
	}

	db, err := service.InflateAuthDB(snap.AuthDBDeflated)
	if err != nil {
		report("ERROR_INFLATION")
		return nil, err
	}

	report("SUCCESS")
	return db, nil
}
364823
func (dao *ControlPlaneDao) Snapshot(req model.SnapshotRequest, snapshotID *string) (err error) {
	ctx := datastore.Get()

	// synchronize the dfs
	dfslocker := dao.facade.DFSLock(ctx)
	dfslocker.Lock("snapshot")
	defer dfslocker.Unlock()

	tagList := []string{}
	if len(req.Tag) > 0 {
		tagList = []string{req.Tag}
	}

	if req.ContainerID != "" {
		*snapshotID, err = dao.facade.Commit(ctx, req.ContainerID, req.Message, tagList, req.SnapshotSpacePercent)
	} else {
		*snapshotID, err = dao.facade.Snapshot(ctx, req.ServiceID, req.Message, tagList, req.SnapshotSpacePercent)
	}
	return
}
1331328
func ValidateSnapshotWithGCSafePoint(snapshotTS, safePointTS uint64) error {
	if safePointTS > snapshotTS {
		return variable.ErrSnapshotTooOld.GenWithStackByArgs(model.TSConvert2Time(safePointTS).String())
	}
	return nil
}
856535
func (d *Domain) SnapshotCurrent(flags uint32) (*DomainSnapshot, error) {
	var err C.virError
	result := C.virDomainSnapshotCurrentWrapper(d.ptr, C.uint(flags), &err)
	if result == nil {
		return nil, makeError(&err)
	}
	return &DomainSnapshot{ptr: result}, nil

}