// GetDisplayDPI returns the dots/pixels-per-inch for a display.
// (https://wiki.libsdl.org/SDL_GetDisplayDPI)
425357
func GetDisplayDPI(displayIndex int) (ddpi, hdpi, vdpi float32, err error) {
	err = errorFromInt(int(
		C.SDL_GetDisplayDPI(C.int(displayIndex), (*C.float)(unsafe.Pointer(&ddpi)), (*C.float)(unsafe.Pointer(&hdpi)), (*C.float)(unsafe.Pointer(&vdpi)))))
	return
}
125289
func (s *VideoParameters) SetDisplayAspectRatio(v string) *VideoParameters {
	s.DisplayAspectRatio = &v
	return s
}
1182377
func (s *SSD1306Driver) SetBufferAndDisplay(buf []byte) (err error) {
	s.buffer.Set(buf)
	return s.Display()
}
144858
func GetScreenDimensions() (cols int, lines int, err error) {
	ws, err := unix.IoctlGetWinsize(0, unix.TIOCGWINSZ)
	if err != nil {
		return -1, -1, err
	}
	return int(ws.Col), int(ws.Row), nil
}
892909
func (w *VT100Writer) SetDisplayAttributes(fg, bg Color, attrs ...DisplayAttribute) {
	w.WriteRaw([]byte{0x1b, '['}) // control sequence introducer
	defer w.WriteRaw([]byte{'m'}) // final character

	var separator byte = ';'
	for i := range attrs {
		p, ok := displayAttributeParameters[attrs[i]]
		if !ok {
			continue
		}
		w.WriteRaw(p)
		w.WriteRaw([]byte{separator})
	}

	f, ok := foregroundANSIColors[fg]
	if !ok {
		f = foregroundANSIColors[DefaultColor]
	}
	w.WriteRaw(f)
	w.WriteRaw([]byte{separator})
	b, ok := backgroundANSIColors[bg]
	if !ok {
		b = backgroundANSIColors[DefaultColor]
	}
	w.WriteRaw(b)
	return
}
104594
func (api *API) GetDvdIso(dvd_id string) (*DvdIso, error) {
	result := new(DvdIso)
	url := createUrl(api, dvdIsoPathSegment, dvd_id)
	err := api.Client.Get(url, &result, http.StatusOK)
	if err != nil {
		return nil, err
	}
	result.api = api
	return result, nil
}
1038863
func GetDisplayMode(displayIndex int, modeIndex int) (mode DisplayMode, err error) {
	err = errorFromInt(int(
		C.SDL_GetDisplayMode(C.int(displayIndex), C.int(modeIndex), (&mode).cptr())))
	return
}
388913
func (o *OIDCConnectorV2) GetDisplay() string {
	if o.Spec.Display != "" {
		return o.Spec.Display
	}
	return o.GetName()
}
130608
func (s *CaseDetails) SetDisplayId(v string) *CaseDetails {
	s.DisplayId = &v
	return s
}
861803
func GetVertexAttribIiv(index uint32, pname uint32, params *int32) {
	C.glowGetVertexAttribIiv(gpGetVertexAttribIiv, (C.GLuint)(index), (C.GLenum)(pname), (*C.GLint)(unsafe.Pointer(params)))
}
254924
func (pc DonutChart) GetDPI(defaults ...float64) float64 {
	if pc.DPI == 0 {
		if len(defaults) > 0 {
			return defaults[0]
		}
		return DefaultDPI
	}
	return pc.DPI
}
955900
func GetDisplayUsableBounds(displayIndex int) (rect Rect, err error) {
	err = errorFromInt(int(
		C.SDL_GetDisplayUsableBounds(C.int(displayIndex), rect.cptr())))
	return
}
740531
func (vr *vectorRenderer) SetDPI(dpi float64) {
	vr.dpi = dpi
	vr.c.dpi = dpi
}
219290
func GetXDisplayName() string {
	name := C.get_XDisplay_name()
	gname := C.GoString(name)
	C.free(unsafe.Pointer(name))

	return gname
}
415213
func GetCurrentDisplayMode(displayIndex int) (mode DisplayMode, err error) {
	err = errorFromInt(int(
		C.SDL_GetCurrentDisplayMode(C.int(displayIndex), (&mode).cptr())))
	return
}
402386
func Display(d, xauthPath string) ServiceOption {
	return func(s *Service) error {
		if s.display != "" {
			return fmt.Errorf("service display already set: %v", s.display)
		}
		if s.xauthPath != "" {
			return fmt.Errorf("service xauth path already set: %v", s.xauthPath)
		}
		if !isDisplay(d) {
			return fmt.Errorf("supplied display %q must be of the format 'x' or 'x.y' where x and y are integers", d)
		}
		s.display = d
		s.xauthPath = xauthPath
		return nil
	}
}
745543
func (d Display) Size() Size {
	return Size{Height: *d.o.Size.Height, Width: *d.o.Size.Width}
}