// 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/gdk/gdk_since_3_22.go:1:1 // +build !gtk_3_6,!gtk_3_8,!gtk_3_10,!gtk_3_12,!gtk_3_14,!gtk_3_16,!gtk_3_18,!gtk_3_20 // Supports building with gtk 3.22+ // Copyright (c) 2013-2014 Conformal Systems // // This file originated from: http://opensource.conformal.com/ // // 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 gdk // #include // #include "gdk_since_3_22.go.h" import _ "unsafe" import ( "unsafe" "github.com/gotk3/gotk3/glib" "github.com/gotk3/gotk3/internal/callback" ) func init() { tm := []glib.TypeMarshaler{ {glib.Type(( /*line :35:14*/_Cfunc_gdk_subpixel_layout_get_type /*line :35:43*/)()), marshalSubpixelLayout}, } glib.RegisterGValueMarshalers(tm) } /* * Constants */ // SeatCapabilities is a representation of GDK's GdkSeatCapabilities type SeatCapabilities int const ( SEAT_CAPABILITY_NONE SeatCapabilities = ( /*line :49:54*/_Ciconst_GDK_SEAT_CAPABILITY_NONE /*line :49:79*/) SEAT_CAPABILITY_POINTER SeatCapabilities = ( /*line :50:54*/_Ciconst_GDK_SEAT_CAPABILITY_POINTER /*line :50:82*/) SEAT_CAPABILITY_TOUCH SeatCapabilities = ( /*line :51:54*/_Ciconst_GDK_SEAT_CAPABILITY_TOUCH /*line :51:80*/) SEAT_CAPABILITY_TABLET_STYLUS SeatCapabilities = ( /*line :52:54*/_Ciconst_GDK_SEAT_CAPABILITY_TABLET_STYLUS /*line :52:88*/) SEAT_CAPABILITY_KEYBOARD SeatCapabilities = ( /*line :53:54*/_Ciconst_GDK_SEAT_CAPABILITY_KEYBOARD /*line :53:83*/) SEAT_CAPABILITY_ALL_POINTING SeatCapabilities = ( /*line :54:54*/_Ciconst_GDK_SEAT_CAPABILITY_ALL_POINTING /*line :54:87*/) SEAT_CAPABILITY_ALL SeatCapabilities = ( /*line :55:54*/_Ciconst_GDK_SEAT_CAPABILITY_ALL /*line :55:78*/) ) func marshalSeatCapabilitiesLayout(p uintptr) (interface{}, error) { c := ( /*line :59:10*/_Cfunc_g_value_get_enum /*line :59:27*/)((* /*line :59:31*/_Ctype_GValue /*line :59:39*/)(unsafe.Pointer(p))) return SeatCapabilities(c), nil } // SubpixelLayout is a representation of GDK's GdkSubpixelLayout. type SubpixelLayout int const ( SUBPIXEL_LAYOUT_UNKNOWN SubpixelLayout = ( /*line :67:50*/_Ciconst_GDK_SUBPIXEL_LAYOUT_UNKNOWN /*line :67:78*/) SUBPIXEL_LAYOUT_NONE SubpixelLayout = ( /*line :68:50*/_Ciconst_GDK_SUBPIXEL_LAYOUT_NONE /*line :68:75*/) SUBPIXEL_LAYOUT_HORIZONTAL_RGB SubpixelLayout = ( /*line :69:50*/_Ciconst_GDK_SUBPIXEL_LAYOUT_HORIZONTAL_RGB /*line :69:85*/) SUBPIXEL_LAYOUT_HORIZONTAL_BGR SubpixelLayout = ( /*line :70:50*/_Ciconst_GDK_SUBPIXEL_LAYOUT_HORIZONTAL_BGR /*line :70:85*/) SUBPIXEL_LAYOUT_VERTICAL_RGB SubpixelLayout = ( /*line :71:50*/_Ciconst_GDK_SUBPIXEL_LAYOUT_VERTICAL_RGB /*line :71:83*/) SUBPIXEL_LAYOUT_VERTICAL_BGR SubpixelLayout = ( /*line :72:50*/_Ciconst_GDK_SUBPIXEL_LAYOUT_VERTICAL_BGR /*line :72:83*/) ) func marshalSubpixelLayout(p uintptr) (interface{}, error) { c := ( /*line :76:7*/_Cfunc_g_value_get_enum /*line :76:24*/)((* /*line :76:28*/_Ctype_GValue /*line :76:36*/)(unsafe.Pointer(p))) return SubpixelLayout(c), nil } /* * GdkDisplay */ // GetNMonitors is a wrapper around gdk_display_get_n_monitors(). func (v *Display) GetNMonitors() int { c := func() _Ctype_int{ _cgo0 := /*line :86:36*/v.native(); _cgoCheckPointer(_cgo0, nil); return /*line :86:47*/_Cfunc_gdk_display_get_n_monitors(_cgo0); }() return int(c) } // GetPrimaryMonitor is a wrapper around gdk_display_get_primary_monitor(). func (v *Display) GetPrimaryMonitor() (*Monitor, error) { c := func() *_Ctype_struct__GdkMonitor{ _cgo0 := /*line :92:41*/v.native(); _cgoCheckPointer(_cgo0, nil); return /*line :92:52*/_Cfunc_gdk_display_get_primary_monitor(_cgo0); }() if c == nil { return nil, nilPtrErr } return &Monitor{glib.Take(unsafe.Pointer(c))}, nil } // GetMonitor is a wrapper around gdk_display_get_monitor(). func (v *Display) GetMonitor(num int) (*Monitor, error) { c := func() *_Ctype_struct__GdkMonitor{ _cgo0 := /*line :102:33*/v.native(); var _cgo1 _Ctype_int = _Ctype_int /*line :102:50*/(num); _cgoCheckPointer(_cgo0, nil); return /*line :102:56*/_Cfunc_gdk_display_get_monitor(_cgo0, _cgo1); }() if c == nil { return nil, nilPtrErr } return &Monitor{glib.Take(unsafe.Pointer(c))}, nil } // GetMonitorAtWindow is a wrapper around gdk_display_get_monitor_at_window(). func (v *Display) GetMonitorAtWindow(w *Window) (*Monitor, error) { c := func() *_Ctype_struct__GdkMonitor{ _cgo0 := /*line :111:43*/v.native(); _cgo1 := /*line :111:55*/w.native(); _cgoCheckPointer(_cgo0, nil); _cgoCheckPointer(_cgo1, nil); return /*line :111:66*/_Cfunc_gdk_display_get_monitor_at_window(_cgo0, _cgo1); }() if c == nil { return nil, nilPtrErr } return &Monitor{glib.Take(unsafe.Pointer(c))}, nil } // GetMonitorAtPoint is a wrapper around gdk_display_get_monitor_at_point(). func (v *Display) GetMonitorAtPoint(x int, y int) (*Monitor, error) { c := func() *_Ctype_struct__GdkMonitor{ _cgo0 := /*line :120:42*/v.native(); var _cgo1 _Ctype_int = _Ctype_int /*line :120:59*/(x); var _cgo2 _Ctype_int = _Ctype_int /*line :120:69*/(y); _cgoCheckPointer(_cgo0, nil); return /*line :120:73*/_Cfunc_gdk_display_get_monitor_at_point(_cgo0, _cgo1, _cgo2); }() if c == nil { return nil, nilPtrErr } return &Monitor{glib.Take(unsafe.Pointer(c))}, nil } /* * GdkSeat */ // GdkSeatGrabPrepareFunc type GrabPrepareFunc func(seat *Seat, window *Window, user_data /*line :132:65*/_Ctype_gpointer /*line :132:75*/) // GetDisplay is a wrapper around gdk_seat_get_display(). func (v *Seat) GetDisplay() (*Display, error) { return toDisplay(func() *_Ctype_struct__GdkDisplay{ _cgo0 := /*line :136:45*/v.native(); _cgoCheckPointer(_cgo0, nil); return /*line :136:56*/_Cfunc_gdk_seat_get_display(_cgo0); }()) } // Grab is a wrapper around gdk_seat_grab(). func (v *Seat) Grab(window *Window, capabilities SeatCapabilities, owner_events bool, cursor *Cursor, event *Event, prepare_func GrabPrepareFunc, prepare_func_data /*line :140:165*/_Ctype_gpointer /*line :140:175*/) GrabStatus { prepare_func_wrapped := (*[0]byte)(nil) if(prepare_func != nil) { prepare_func_wrapped = (*[0]byte)( /*line :143:43*/_Ctype_gpointer /*line :143:53*/(callback.Assign(prepare_func))) } return GrabStatus(func() _Ctype_GdkGrabStatus{ _cgo0 := /*line :146:39*/v.native(); _cgo1 := /*line :146:51*/window.native(); var _cgo2 _Ctype_GdkSeatCapabilities = _Ctype_GdkSeatCapabilities /*line :146:89*/(capabilities); var _cgo3 _Ctype_gboolean = /*line :146:105*/gbool(owner_events); _cgo4 := /*line :146:126*/cursor.native(); _cgo5 := /*line :146:143*/event.native(); var _cgo6 *[0]byte = /*line :146:159*/prepare_func_wrapped; _cgo7 := /*line :146:181*/prepare_func_data; _cgoCheckPointer(_cgo0, nil); _cgoCheckPointer(_cgo1, nil); _cgoCheckPointer(_cgo4, nil); _cgoCheckPointer(_cgo5, nil); _cgoCheckPointer(_cgo7, nil); return /*line :146:199*/_Cfunc_gdk_seat_grab(_cgo0, _cgo1, _cgo2, _cgo3, _cgo4, _cgo5, _cgo6, _cgo7); }()) } // UnGrab is a wrapper around gdk_seat_ungrab(). func (v *Seat) UnGrab() { func() { _cgo0 := /*line :151:23*/v.native(); _cgoCheckPointer(_cgo0, nil); /*line :151:34*/_Cfunc_gdk_seat_ungrab(_cgo0); }() } // GetCapabilities is a wrapper around gdk_seat_get_capabilities(). func (v *Seat) GetCapabilities() SeatCapabilities { return SeatCapabilities(func() _Ctype_GdkSeatCapabilities{ _cgo0 := /*line :156:57*/v.native(); _cgoCheckPointer(_cgo0, nil); return /*line :156:68*/_Cfunc_gdk_seat_get_capabilities(_cgo0); }()) } // GetKeyboard is a wrapper around gdk_seat_get_keyboard(). func (v *Seat) GetKeyboard() (*Device, error) { return toDevice(func() *_Ctype_struct__GdkDevice{ _cgo0 := /*line :161:45*/v.native(); _cgoCheckPointer(_cgo0, nil); return /*line :161:56*/_Cfunc_gdk_seat_get_keyboard(_cgo0); }()) } // GetSlaves is a wrapper around gdk_seat_get_slaves(). func (v *Seat) GetSlaves(capabilities SeatCapabilities) *[]Device { clist := func() *_Ctype_struct__GList{ _cgo0 := /*line :167:36*/v.native(); var _cgo1 _Ctype_GdkSeatCapabilities = _Ctype_GdkSeatCapabilities /*line :167:69*/(capabilities); _cgoCheckPointer(_cgo0, nil); return /*line :167:84*/_Cfunc_gdk_seat_get_slaves(_cgo0, _cgo1); }() if clist == nil { return nil } dlist := glib.WrapSList(uintptr(unsafe.Pointer(clist))) defer dlist.Free() var slaves = make([]Device, 0, dlist.Length()) for ; dlist.DataRaw() != nil; dlist = dlist.Next() { d := (* /*line :177:16*/_Ctype_GdkDevice /*line :177:27*/)(dlist.DataRaw()) obj := &glib.Object{glib.ToGObject(unsafe.Pointer(d))} slaves = append(slaves, Device{obj}) } return &slaves } /* * GdkMonitor */ // Monitor is a representation of GDK's GdkMonitor. type Monitor struct { *glib.Object } // native returns a pointer to the underlying GdkMonitor. func (v *Monitor) native() * /*line :197:29*/_Ctype_GdkMonitor /*line :197:41*/ { if v == nil || v.GObject == nil { return nil } p := unsafe.Pointer(v.GObject) return func() *_Ctype_struct__GdkMonitor{ _cgo0 := /*line :202:24*/p; _cgoCheckPointer(_cgo0, nil); return /*line :202:26*/_Cfunc_toGdkMonitor(_cgo0); }() } // Native returns a pointer to the underlying GdkMonitor. func (v *Monitor) Native() uintptr { return uintptr(unsafe.Pointer(v.native())) } func marshalMonitor(p uintptr) (interface{}, error) { c := ( /*line :211:7*/_Cfunc_g_value_get_object /*line :211:26*/)((* /*line :211:30*/_Ctype_GValue /*line :211:38*/)(unsafe.Pointer(p))) obj := &glib.Object{glib.ToGObject(unsafe.Pointer(c))} return &Monitor{obj}, nil } func toMonitor(s * /*line :216:19*/_Ctype_GdkMonitor /*line :216:31*/) (*Monitor, error) { if s == nil { return nil, nilPtrErr } obj := &glib.Object{glib.ToGObject(unsafe.Pointer(s))} return &Monitor{obj}, nil } // GetDisplay is a wrapper around gdk_monitor_get_display(). func (v *Monitor) GetDisplay() (*Display, error) { return toDisplay(func() *_Ctype_struct__GdkDisplay{ _cgo0 := /*line :226:45*/v.native(); _cgoCheckPointer(_cgo0, nil); return /*line :226:56*/_Cfunc_gdk_monitor_get_display(_cgo0); }()) } // GetGeometry is a wrapper around gdk_monitor_get_geometry(). func (v *Monitor) GetGeometry() *Rectangle { var rect /*line :231:11*/_Ctype_GdkRectangle /*line :231:25*/ func() { _cgo0 := /*line :233:29*/v.native(); var _cgo1 *_Ctype_struct__cairo_rectangle_int = /*line :233:41*/▭ _cgoCheckPointer(_cgo0, nil); /*line :233:47*/_Cfunc_gdk_monitor_get_geometry(_cgo0, _cgo1); }() return wrapRectangle(&rect) } // GetWorkarea is a wrapper around gdk_monitor_get_workarea(). func (v *Monitor) GetWorkarea() *Rectangle { var rect /*line :240:11*/_Ctype_GdkRectangle /*line :240:25*/ func() { _cgo0 := /*line :242:29*/v.native(); var _cgo1 *_Ctype_struct__cairo_rectangle_int = /*line :242:41*/▭ _cgoCheckPointer(_cgo0, nil); /*line :242:47*/_Cfunc_gdk_monitor_get_workarea(_cgo0, _cgo1); }() return wrapRectangle(&rect) } // GetWidthMM is a wrapper around gdk_monitor_get_width_mm(). func (v *Monitor) GetWidthMM() int { return int(func() _Ctype_int{ _cgo0 := /*line :249:40*/v.native(); _cgoCheckPointer(_cgo0, nil); return /*line :249:51*/_Cfunc_gdk_monitor_get_width_mm(_cgo0); }()) } // GetHeightMM is a wrapper around gdk_monitor_get_height_mm(). func (v *Monitor) GetHeightMM() int { return int(func() _Ctype_int{ _cgo0 := /*line :254:41*/v.native(); _cgoCheckPointer(_cgo0, nil); return /*line :254:52*/_Cfunc_gdk_monitor_get_height_mm(_cgo0); }()) } // GetManufacturer is a wrapper around gdk_monitor_get_manufacturer(). func (v *Monitor) GetManufacturer() string { // transfer none: don't free data after the code is done. return ( /*line :260:9*/_Cfunc_GoString /*line :260:18*/)(func() *_Ctype_char{ _cgo0 := /*line :260:51*/v.native(); _cgoCheckPointer(_cgo0, nil); return /*line :260:62*/_Cfunc_gdk_monitor_get_manufacturer(_cgo0); }()) } // GetModel is a wrapper around gdk_monitor_get_model(). func (v *Monitor) GetModel() string { // transfer none: don't free data after the code is done. return ( /*line :266:9*/_Cfunc_GoString /*line :266:18*/)(func() *_Ctype_char{ _cgo0 := /*line :266:44*/v.native(); _cgoCheckPointer(_cgo0, nil); return /*line :266:55*/_Cfunc_gdk_monitor_get_model(_cgo0); }()) } // GetScaleFactor is a wrapper around gdk_monitor_get_scale_factor(). func (v *Monitor) GetScaleFactor() int { return int(func() _Ctype_int{ _cgo0 := /*line :271:44*/v.native(); _cgoCheckPointer(_cgo0, nil); return /*line :271:55*/_Cfunc_gdk_monitor_get_scale_factor(_cgo0); }()) } // GetRefreshRate is a wrapper around gdk_monitor_get_refresh_rate(). func (v *Monitor) GetRefreshRate() int { return int(func() _Ctype_int{ _cgo0 := /*line :276:44*/v.native(); _cgoCheckPointer(_cgo0, nil); return /*line :276:55*/_Cfunc_gdk_monitor_get_refresh_rate(_cgo0); }()) } // GetSubpixelLayout is a wrapper around gdk_monitor_get_subpixel_layout(). func (v *Monitor) GetSubpixelLayout() SubpixelLayout { return SubpixelLayout(func() _Ctype_GdkSubpixelLayout{ _cgo0 := /*line :281:58*/v.native(); _cgoCheckPointer(_cgo0, nil); return /*line :281:69*/_Cfunc_gdk_monitor_get_subpixel_layout(_cgo0); }()) } // IsPrimary is a wrapper around gdk_monitor_is_primary(). func (v *Monitor) IsPrimary() bool { return gobool(func() _Ctype_gboolean{ _cgo0 := /*line :286:41*/v.native(); _cgoCheckPointer(_cgo0, nil); return /*line :286:52*/_Cfunc_gdk_monitor_is_primary(_cgo0); }()) } /* * GdkDevice */ // TODO: // gdk_device_get_axes(). // gdk_device_tool_get_serial(). // gdk_device_tool_get_tool_type(). /* * GdkGLContext */ // GetUseES is a wrapper around gdk_gl_context_get_use_es(). func (v *GLContext) GetUseES() bool { return gobool(func() _Ctype_gboolean{ _cgo0 := /*line :304:44*/v.native(); _cgoCheckPointer(_cgo0, nil); return /*line :304:55*/_Cfunc_gdk_gl_context_get_use_es(_cgo0); }()) } // SetUseES is a wrapper around gdk_gl_context_set_use_es(). func (v *GLContext) SetUseES(es int) { func() { _cgo0 := /*line :309:30*/v.native(); var _cgo1 _Ctype_int = /*line :309:42*/(_Ctype_int /*line :309:48*/)(es); _cgoCheckPointer(_cgo0, nil); /*line :309:54*/_Cfunc_gdk_gl_context_set_use_es(_cgo0, _cgo1); }() }