// Package gdk was automatically generated by github.com/bnema/puregotk DO NOT EDIT package gdk import ( "github.com/ebitengine/purego" "github.com/bnema/puregotk/pkg/core" "github.com/bnema/puregotk/v4/cairo" "github.com/bnema/puregotk/v4/pango" ) var xPangoLayoutGetClipRegion func(uintptr, int, int, int, int) *cairo.Region // Obtains a clip region which contains the areas where the given ranges // of text would be drawn. // // @x_origin and @y_origin are the top left point to center the layout. // @index_ranges should contain ranges of bytes in the layout’s text. // // Note that the regions returned correspond to logical extents of the text // ranges, not ink extents. So the drawn layout may in fact touch areas out of // the clip region. The clip region is mainly useful for highlightling parts // of text, such as when text is selected. func PangoLayoutGetClipRegion(LayoutVar *pango.Layout, XOriginVar int, YOriginVar int, IndexRangesVar int, NRangesVar int) *cairo.Region { cret := xPangoLayoutGetClipRegion(LayoutVar.GoPointer(), XOriginVar, YOriginVar, IndexRangesVar, NRangesVar) return cret } var xPangoLayoutLineGetClipRegion func(*pango.LayoutLine, int, int, []int, int) *cairo.Region // Obtains a clip region which contains the areas where the given // ranges of text would be drawn. // // @x_origin and @y_origin are the top left position of the layout. // @index_ranges should contain ranges of bytes in the layout’s text. // The clip region will include space to the left or right of the line // (to the layout bounding box) if you have indexes above or below the // indexes contained inside the line. This is to draw the selection all // the way to the side of the layout. However, the clip region is in line // coordinates, not layout coordinates. // // Note that the regions returned correspond to logical extents of the text // ranges, not ink extents. So the drawn line may in fact touch areas out of // the clip region. The clip region is mainly useful for highlightling parts // of text, such as when text is selected. func PangoLayoutLineGetClipRegion(LineVar *pango.LayoutLine, XOriginVar int, YOriginVar int, IndexRangesVar []int, NRangesVar int) *cairo.Region { cret := xPangoLayoutLineGetClipRegion(LineVar, XOriginVar, YOriginVar, IndexRangesVar, NRangesVar) return cret } func init() { core.SetPackageName("GDK", "gtk4") core.SetSharedLibraries("GDK", []string{"libgtk-4.so.1"}) var libs []uintptr for _, libPath := range core.GetPaths("GDK") { lib, err := purego.Dlopen(libPath, purego.RTLD_NOW|purego.RTLD_GLOBAL) if err != nil { panic(err) } libs = append(libs, lib) } core.PuregoSafeRegister(&xPangoLayoutGetClipRegion, libs, "gdk_pango_layout_get_clip_region") core.PuregoSafeRegister(&xPangoLayoutLineGetClipRegion, libs, "gdk_pango_layout_line_get_clip_region") }