// Code generated by cmd/cgo; DO NOT EDIT.

//line /home/josie/.cache/paru/clone/wiiudownloader/src/pkg/mod/github.com/gotk3/gotk3@v0.6.5-0.20240618185848-ff349ae13f56/pango/pangocairo.go:1:1
/*
 * Copyright (c) 2015- terrak <terrak1975@gmail.com>
 *
 * This file originated from: http://www.terrak.net/
 *
 * Permission to use, copy, modify, and distribute this software for any
 * purpose with or without fee is hereby granted, provided that the above
 * copyright notice and this permission notice appear in all copies.
 *
 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 */

package pango

// #include <pango/pango.h>
// #include <cairo.h>
// #include <pango/pangocairo.h>
// #include "pango.go.h"
import _ "unsafe"
import (
	//	"github.com/gotk3/gotk3/glib"
	"unsafe"

	"github.com/gotk3/gotk3/cairo"
)

func init() {
	//	tm := []glib.TypeMarshaler{
	//		// Enums
	//		{glib.Type(C.pango_alignement_get_type()), marshalAlignment},
	//		{glib.Type(C.pango_ellipsize_mode_get_type()), marshalEllipsizeMode},
	//		{glib.Type(C.pango_wrap_mode_get_type()), marshalWrapMode},
	//	}
	//	glib.RegisterGValueMarshalers(tm)
}

func cairo_context(cr *cairo.Context) * /*line :43:40*/_Ctype_cairo_t /*line :43:49*/ {
	return (* /*line :44:11*/_Ctype_cairo_t /*line :44:20*/)(cr.GetCContext())
}

/* Convenience
 */
//PangoContext *pango_cairo_create_context (cairo_t   *cr);
func CairoCreateContext(cr *cairo.Context) *Context {
	c := func() *_Ctype_struct__PangoContext{ _cgo0 := /*line :51:36*/cairo_context(cr); _cgoCheckPointer(_cgo0, nil); return /*line :51:54*/_Cfunc_pango_cairo_create_context(_cgo0); }()
	context := new(Context)
	context.pangoContext = (* /*line :53:27*/_Ctype_PangoContext /*line :53:41*/)(c)
	return context
}

//PangoLayout *pango_cairo_create_layout (cairo_t     *cr);
func CairoCreateLayout(cr *cairo.Context) *Layout {
	c := func() *_Ctype_struct__PangoLayout{ _cgo0 := /*line :59:35*/cairo_context(cr); _cgoCheckPointer(_cgo0, nil); return /*line :59:53*/_Cfunc_pango_cairo_create_layout(_cgo0); }()
	layout := new(Layout)
	layout.pangoLayout = (* /*line :61:25*/_Ctype_PangoLayout /*line :61:38*/)(c)
	return layout
}

//void         pango_cairo_update_layout (cairo_t     *cr,
//					PangoLayout *layout);
func CairoUpdateLayout(cr *cairo.Context, v *Layout) {
	func() { _cgo0 := /*line :68:30*/cairo_context(cr); _cgo1 := /*line :68:49*/v.native(); _cgoCheckPointer(_cgo0, nil); _cgoCheckPointer(_cgo1, nil); /*line :68:60*/_Cfunc_pango_cairo_update_layout(_cgo0, _cgo1); }()
}

/*
 * Rendering
 */
//void pango_cairo_show_glyph_string (cairo_t          *cr,
//				    PangoFont        *font,
//				    PangoGlyphString *glyphs);
func CairoShowGlyphString(cr *cairo.Context, font *Font, glyphs *GlyphString) {
	func() { _cgo0 := /*line :78:34*/cairo_context(cr); _cgo1 := /*line :78:53*/font.native(); _cgo2 := /*line :78:68*/glyphs.native(); _cgoCheckPointer(_cgo0, nil); _cgoCheckPointer(_cgo1, nil); _cgoCheckPointer(_cgo2, nil); /*line :78:84*/_Cfunc_pango_cairo_show_glyph_string(_cgo0, _cgo1, _cgo2); }()
}

//void pango_cairo_show_glyph_item   (cairo_t          *cr,
//				    const char       *text,
//				    PangoGlyphItem   *glyph_item);
func CairoShowGlyphItem(cr *cairo.Context, text string, glyph_item *GlyphItem) {
	cstr := ( /*line :85:10*/_Cfunc_CString /*line :85:18*/)(text)
	defer func() func() { _cgo0 := /*line :86:15*/unsafe.Pointer(cstr); return func() { _cgoCheckPointer(_cgo0, nil); /*line :86:36*/_Cfunc_free(_cgo0); }}()()
	func() { _cgo0 := /*line :87:32*/cairo_context(cr); var _cgo1 *_Ctype_char = /*line :87:51*/(*_Ctype_char /*line :87:59*/)(cstr); _cgo2 := /*line :87:68*/glyph_item.native(); _cgoCheckPointer(_cgo0, nil); _cgoCheckPointer(_cgo2, nil); /*line :87:88*/_Cfunc_pango_cairo_show_glyph_item(_cgo0, _cgo1, _cgo2); }()
}

//void pango_cairo_show_layout_line  (cairo_t          *cr,
//				    PangoLayoutLine  *line);
func CairoShowLayoutLine(cr *cairo.Context, line *LayoutLine) {
	func() { _cgo0 := /*line :93:33*/cairo_context(cr); _cgo1 := /*line :93:52*/line.native(); _cgoCheckPointer(_cgo0, nil); _cgoCheckPointer(_cgo1, nil); /*line :93:66*/_Cfunc_pango_cairo_show_layout_line(_cgo0, _cgo1); }()
}

//void pango_cairo_show_layout       (cairo_t          *cr,
//				    PangoLayout      *layout);
func CairoShowLayout(cr *cairo.Context, layout *Layout) {
	func() { _cgo0 := /*line :99:28*/cairo_context(cr); _cgo1 := /*line :99:47*/layout.native(); _cgoCheckPointer(_cgo0, nil); _cgoCheckPointer(_cgo1, nil); /*line :99:63*/_Cfunc_pango_cairo_show_layout(_cgo0, _cgo1); }()
}

//void pango_cairo_show_error_underline (cairo_t       *cr,
//				       double         x,
//				       double         y,
//				       double         width,
//				       double         height);

/*
 * Rendering to a path
 */

//void pango_cairo_glyph_string_path (cairo_t          *cr,
//				    PangoFont        *font,
//				    PangoGlyphString *glyphs);
func CairoGlyphStringPath(cr *cairo.Context, font *Font, glyphs *GlyphString) {
	func() { _cgo0 := /*line :116:34*/cairo_context(cr); _cgo1 := /*line :116:53*/font.native(); _cgo2 := /*line :116:68*/glyphs.native(); _cgoCheckPointer(_cgo0, nil); _cgoCheckPointer(_cgo1, nil); _cgoCheckPointer(_cgo2, nil); /*line :116:84*/_Cfunc_pango_cairo_glyph_string_path(_cgo0, _cgo1, _cgo2); }()
}

//void pango_cairo_layout_line_path  (cairo_t          *cr,
//				    PangoLayoutLine  *line);
func CairoLayoutLinePath(cr *cairo.Context, line *LayoutLine) {
	func() { _cgo0 := /*line :122:33*/cairo_context(cr); _cgo1 := /*line :122:52*/line.native(); _cgoCheckPointer(_cgo0, nil); _cgoCheckPointer(_cgo1, nil); /*line :122:66*/_Cfunc_pango_cairo_layout_line_path(_cgo0, _cgo1); }()
}

//void pango_cairo_layout_path       (cairo_t          *cr,
//				    PangoLayout      *layout);
func CairoLayoutPath(cr *cairo.Context, layout *Layout) {
	func() { _cgo0 := /*line :128:28*/cairo_context(cr); _cgo1 := /*line :128:47*/layout.native(); _cgoCheckPointer(_cgo0, nil); _cgoCheckPointer(_cgo1, nil); /*line :128:63*/_Cfunc_pango_cairo_layout_path(_cgo0, _cgo1); }()
}

//void pango_cairo_error_underline_path (cairo_t       *cr,
//				       double         x,
//				       double         y,
//				       double         width,
//				       double         height);
func CairoErrorUnderlinePath(cr *cairo.Context, x, y, width, height float64) {
	func() { _cgo0 := /*line :137:37*/cairo_context(cr); var _cgo1 _Ctype_double = _Ctype_double /*line :137:64*/(x); var _cgo2 _Ctype_double = _Ctype_double /*line :137:77*/(y); var _cgo3 _Ctype_double = _Ctype_double /*line :137:90*/(width); var _cgo4 _Ctype_double = _Ctype_double /*line :137:107*/(height); _cgoCheckPointer(_cgo0, nil); /*line :137:116*/_Cfunc_pango_cairo_error_underline_path(_cgo0, _cgo1, _cgo2, _cgo3, _cgo4); }()
}
