// gtk_window_set_geometry_hints
// gtk_window_get_gravity
977478
func (v *Window) SetPosition(position WindowPosition) {
	C.gtk_window_set_position(WINDOW(v), C.GtkWindowPosition(position))
}
1156568
func (a *MovFnAggregation) Window(window int) *MovFnAggregation {
	a.window = window
	return a
}
1306848
func (m *Monitor) GetGammaRamp() (*GammaRamp, error) {
	var ramp GammaRamp

	rampC := C.glfwGetGammaRamp(m.data)
	if rampC == nil {
		return nil, errors.New("Can't get the gamma ramp.")
	}

	length := int(rampC.size)
	ramp.Red = make([]uint16, length)
	ramp.Green = make([]uint16, length)
	ramp.Blue = make([]uint16, length)

	for i := 0; i < length; i++ {
		ramp.Red[i] = uint16(C.GetGammaAtIndex(rampC.red, C.int(i)))
		ramp.Green[i] = uint16(C.GetGammaAtIndex(rampC.green, C.int(i)))
		ramp.Blue[i] = uint16(C.GetGammaAtIndex(rampC.blue, C.int(i)))
	}

	return &ramp, nil
}
315785
func (g *GeometryCollection) Push(gs ...T) error {
	g.geoms = append(g.geoms, gs...)
	return nil
}
1263227
func (v *Scale) GetLayoutOffsets() (x int, y int) {
	var xx, yy C.gint
	C.gtk_scale_get_layout_offsets(SCALE(v), &xx, &yy)
	return int(xx), int(yy)
}
570092
func Geometry(b orb.Bound, g orb.Geometry) orb.Geometry {
	if g == nil {
		return nil
	}

	if !b.Intersects(g.Bound()) {
		return nil
	}

	switch g := g.(type) {
	case orb.Point:
		return g // Intersect check above
	case orb.MultiPoint:
		mp := MultiPoint(b, g)
		if len(mp) == 1 {
			return mp[0]
		}

		if mp == nil {
			return nil
		}

		return mp
	case orb.LineString:
		mls := LineString(b, g)
		if len(mls) == 1 {
			return mls[0]
		}

		if len(mls) == 0 {
			return nil
		}
		return mls
	case orb.MultiLineString:
		mls := MultiLineString(b, g)
		if len(mls) == 1 {
			return mls[0]
		}

		if mls == nil {
			return nil
		}

		return mls
	case orb.Ring:
		r := Ring(b, g)
		if r == nil {
			return nil
		}

		return r
	case orb.Polygon:
		p := Polygon(b, g)
		if p == nil {
			return nil
		}

		return p
	case orb.MultiPolygon:
		mp := MultiPolygon(b, g)
		if len(mp) == 1 {
			return mp[0]
		}

		if mp == nil {
			return nil
		}

		return mp
	case orb.Collection:
		c := Collection(b, g)
		if len(c) == 1 {
			return c[0]
		}

		if c == nil {
			return nil
		}

		return c
	case orb.Bound:
		b = Bound(b, g)
		if b.IsEmpty() {
			return nil
		}

		return b
	}

	panic(fmt.Sprintf("geometry type not supported: %T", g))
}
147110
func (window *Window) GetPosition() (x, y int32) {
	var _x, _y C.int
	C.SDL_GetWindowPosition(window.cptr(), &_x, &_y)
	return int32(_x), int32(_y)
}
595301
func (w *Window) GetGLXContext() C.GLXContext {
	ret := C.glfwGetGLXContext(w.data)
	panicError()
	return ret
}
287637
func (c *Page) SetGeolocationOverride(latitude float64, longitude float64, accuracy float64) (*gcdmessage.ChromeResponse, error) {
	var v PageSetGeolocationOverrideParams
	v.Latitude = latitude
	v.Longitude = longitude
	v.Accuracy = accuracy
	return c.SetGeolocationOverrideWithParams(&v)
}
343295
func MoveWindow(xu *xgbutil.XUtil, win xproto.Window, x, y int) error {
	return MoveresizeWindowExtra(xu, win, x, y, 0, 0, xproto.GravityBitForget,
		2, true, true)
}
110390
func (m *Monitor) GetPosition() (x, y int) {
	var xpos, ypos C.int

	C.glfwGetMonitorPos(m.data, &xpos, &ypos)
	return int(xpos), int(ypos)
}
1264259
func (w *Window) Maximize() error {
	C.glfwMaximizeWindow(w.data)
	return acceptError(APIUnavailable)
}
1257293
func MoveresizeWindow(xu *xgbutil.XUtil, win xproto.Window,
	x, y, w, h int) error {

	return MoveresizeWindowExtra(xu, win, x, y, w, h, xproto.GravityBitForget,
		2, true, true)
}
325328
func (w *Window) GetAttrib(attrib Hint) int {
	ret := int(C.glfwGetWindowAttrib(w.data, C.int(attrib)))
	panicError()
	return ret
}
1183280
func (c *Canvas) setGlhfBounds() {
	_, _, bw, bh := intBounds(c.gf.Bounds())
	glhf.Bounds(0, 0, bw, bh)
}
731916
func (w *Window) GetNSGLContext() uintptr {
	ret := uintptr(C.workaround_glfwGetNSGLContext(w.data))
	panicError()
	return ret
}
77361
func ResizeWindow(xu *xgbutil.XUtil, win xproto.Window, w, h int) error {
	return MoveresizeWindowExtra(xu, win, 0, 0, w, h, xproto.GravityBitForget,
		2, false, false)
}