Exemplo n.º 1
0
// GetIterLocation is a wrapper around gtk_text_view_get_iter_location().
func (v *TextView) GetIterLocation(iter *TextIter) *gdk.Rectangle {
	var rect C.GdkRectangle
	C.gtk_text_view_get_iter_location(v.native(), iter.native(), &rect)
	return gdk.WrapRectangle(uintptr(unsafe.Pointer(&rect)))
}
Exemplo n.º 2
0
// GetCursorLocations is a wrapper around gtk_text_view_get_cursor_locations().
func (v *TextView) GetCursorLocations(iter *TextIter) (strong, weak *gdk.Rectangle) {
	var strongRect, weakRect C.GdkRectangle
	C.gtk_text_view_get_cursor_locations(v.native(), iter.native(), &strongRect, &weakRect)
	return gdk.WrapRectangle(uintptr(unsafe.Pointer(&strongRect))), gdk.WrapRectangle(uintptr(unsafe.Pointer(&weakRect)))
}
Exemplo n.º 3
0
// GetVisibleRect is a wrapper around gtk_text_view_get_visible_rect().
func (v *TextView) GetVisibleRect() *gdk.Rectangle {
	var rect C.GdkRectangle
	C.gtk_text_view_get_visible_rect(v.native(), &rect)
	return gdk.WrapRectangle(uintptr(unsafe.Pointer(&rect)))
}