miqt/qt/multimedia/gen_qradiotuner.go

870 lines
28 KiB
Go
Raw Normal View History

2024-11-04 23:15:32 +13:00
package multimedia
/*
#include "gen_qradiotuner.h"
#include <stdlib.h>
*/
import "C"
import (
"github.com/mappu/miqt/qt"
"runtime"
"runtime/cgo"
"unsafe"
)
type QRadioTuner__State int
const (
QRadioTuner__ActiveState QRadioTuner__State = 0
QRadioTuner__StoppedState QRadioTuner__State = 1
)
type QRadioTuner__Band int
const (
QRadioTuner__AM QRadioTuner__Band = 0
QRadioTuner__FM QRadioTuner__Band = 1
QRadioTuner__SW QRadioTuner__Band = 2
QRadioTuner__LW QRadioTuner__Band = 3
QRadioTuner__FM2 QRadioTuner__Band = 4
)
type QRadioTuner__Error int
const (
QRadioTuner__NoError QRadioTuner__Error = 0
QRadioTuner__ResourceError QRadioTuner__Error = 1
QRadioTuner__OpenError QRadioTuner__Error = 2
QRadioTuner__OutOfRangeError QRadioTuner__Error = 3
)
type QRadioTuner__StereoMode int
const (
QRadioTuner__ForceStereo QRadioTuner__StereoMode = 0
QRadioTuner__ForceMono QRadioTuner__StereoMode = 1
QRadioTuner__Auto QRadioTuner__StereoMode = 2
)
type QRadioTuner__SearchMode int
const (
QRadioTuner__SearchFast QRadioTuner__SearchMode = 0
QRadioTuner__SearchGetStationId QRadioTuner__SearchMode = 1
)
type QRadioTuner struct {
h *C.QRadioTuner
2024-11-04 23:15:32 +13:00
*QMediaObject
}
func (this *QRadioTuner) cPointer() *C.QRadioTuner {
if this == nil {
return nil
}
return this.h
}
func (this *QRadioTuner) UnsafePointer() unsafe.Pointer {
if this == nil {
return nil
}
return unsafe.Pointer(this.h)
}
2024-11-19 19:29:06 +13:00
// newQRadioTuner constructs the type using only CGO pointers.
2024-12-07 17:15:57 +13:00
func newQRadioTuner(h *C.QRadioTuner) *QRadioTuner {
2024-11-04 23:15:32 +13:00
if h == nil {
return nil
}
2024-12-07 17:15:57 +13:00
var outptr_QMediaObject *C.QMediaObject = nil
C.QRadioTuner_virtbase(h, &outptr_QMediaObject)
2024-11-19 19:29:06 +13:00
return &QRadioTuner{h: h,
2024-12-07 17:15:57 +13:00
QMediaObject: newQMediaObject(outptr_QMediaObject)}
2024-11-04 23:15:32 +13:00
}
2024-11-19 19:29:06 +13:00
// UnsafeNewQRadioTuner constructs the type using only unsafe pointers.
2024-12-07 17:15:57 +13:00
func UnsafeNewQRadioTuner(h unsafe.Pointer) *QRadioTuner {
return newQRadioTuner((*C.QRadioTuner)(h))
2024-11-04 23:15:32 +13:00
}
// NewQRadioTuner constructs a new QRadioTuner object.
func NewQRadioTuner() *QRadioTuner {
2024-11-19 19:29:06 +13:00
return newQRadioTuner(C.QRadioTuner_new())
2024-11-04 23:15:32 +13:00
}
// NewQRadioTuner2 constructs a new QRadioTuner object.
func NewQRadioTuner2(parent *qt.QObject) *QRadioTuner {
2024-11-19 19:29:06 +13:00
return newQRadioTuner(C.QRadioTuner_new2((*C.QObject)(parent.UnsafePointer())))
2024-11-04 23:15:32 +13:00
}
func (this *QRadioTuner) MetaObject() *qt.QMetaObject {
2025-02-01 13:45:16 +13:00
return qt.UnsafeNewQMetaObject(unsafe.Pointer(C.QRadioTuner_metaObject(this.h)))
2024-11-04 23:15:32 +13:00
}
func (this *QRadioTuner) Metacast(param1 string) unsafe.Pointer {
param1_Cstring := C.CString(param1)
defer C.free(unsafe.Pointer(param1_Cstring))
2025-02-01 13:45:16 +13:00
return (unsafe.Pointer)(C.QRadioTuner_metacast(this.h, param1_Cstring))
2024-11-04 23:15:32 +13:00
}
func QRadioTuner_Tr(s string) string {
s_Cstring := C.CString(s)
defer C.free(unsafe.Pointer(s_Cstring))
2025-02-01 13:45:16 +13:00
var _ms C.struct_miqt_string = C.QRadioTuner_tr(s_Cstring)
2024-11-04 23:15:32 +13:00
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
C.free(unsafe.Pointer(_ms.data))
return _ret
}
func QRadioTuner_TrUtf8(s string) string {
s_Cstring := C.CString(s)
defer C.free(unsafe.Pointer(s_Cstring))
2025-02-01 13:45:16 +13:00
var _ms C.struct_miqt_string = C.QRadioTuner_trUtf8(s_Cstring)
2024-11-04 23:15:32 +13:00
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
C.free(unsafe.Pointer(_ms.data))
return _ret
}
func (this *QRadioTuner) Availability() QMultimedia__AvailabilityStatus {
2025-02-01 13:45:16 +13:00
return (QMultimedia__AvailabilityStatus)(C.QRadioTuner_availability(this.h))
2024-11-04 23:15:32 +13:00
}
func (this *QRadioTuner) State() QRadioTuner__State {
2025-02-01 13:45:16 +13:00
return (QRadioTuner__State)(C.QRadioTuner_state(this.h))
2024-11-04 23:15:32 +13:00
}
func (this *QRadioTuner) Band() QRadioTuner__Band {
2025-02-01 13:45:16 +13:00
return (QRadioTuner__Band)(C.QRadioTuner_band(this.h))
2024-11-04 23:15:32 +13:00
}
func (this *QRadioTuner) IsBandSupported(b QRadioTuner__Band) bool {
2025-02-01 13:45:16 +13:00
return (bool)(C.QRadioTuner_isBandSupported(this.h, (C.int)(b)))
2024-11-04 23:15:32 +13:00
}
func (this *QRadioTuner) Frequency() int {
2025-02-01 13:45:16 +13:00
return (int)(C.QRadioTuner_frequency(this.h))
2024-11-04 23:15:32 +13:00
}
func (this *QRadioTuner) FrequencyStep(band QRadioTuner__Band) int {
2025-02-01 13:45:16 +13:00
return (int)(C.QRadioTuner_frequencyStep(this.h, (C.int)(band)))
2024-11-04 23:15:32 +13:00
}
func (this *QRadioTuner) FrequencyRange(band QRadioTuner__Band) struct {
First int
Second int
} {
2025-02-01 13:45:16 +13:00
var _mm C.struct_miqt_map = C.QRadioTuner_frequencyRange(this.h, (C.int)(band))
_First_CArray := (*[0xffff]C.int)(unsafe.Pointer(_mm.keys))
_Second_CArray := (*[0xffff]C.int)(unsafe.Pointer(_mm.values))
_entry_First := (int)(_First_CArray[0])
_entry_Second := (int)(_Second_CArray[0])
return struct {
First int
Second int
}{First: _entry_First, Second: _entry_Second}
}
2024-11-04 23:15:32 +13:00
func (this *QRadioTuner) IsStereo() bool {
2025-02-01 13:45:16 +13:00
return (bool)(C.QRadioTuner_isStereo(this.h))
2024-11-04 23:15:32 +13:00
}
func (this *QRadioTuner) SetStereoMode(mode QRadioTuner__StereoMode) {
2025-02-01 13:45:16 +13:00
C.QRadioTuner_setStereoMode(this.h, (C.int)(mode))
2024-11-04 23:15:32 +13:00
}
func (this *QRadioTuner) StereoMode() QRadioTuner__StereoMode {
2025-02-01 13:45:16 +13:00
return (QRadioTuner__StereoMode)(C.QRadioTuner_stereoMode(this.h))
2024-11-04 23:15:32 +13:00
}
func (this *QRadioTuner) SignalStrength() int {
2025-02-01 13:45:16 +13:00
return (int)(C.QRadioTuner_signalStrength(this.h))
2024-11-04 23:15:32 +13:00
}
func (this *QRadioTuner) Volume() int {
2025-02-01 13:45:16 +13:00
return (int)(C.QRadioTuner_volume(this.h))
2024-11-04 23:15:32 +13:00
}
func (this *QRadioTuner) IsMuted() bool {
2025-02-01 13:45:16 +13:00
return (bool)(C.QRadioTuner_isMuted(this.h))
2024-11-04 23:15:32 +13:00
}
func (this *QRadioTuner) IsSearching() bool {
2025-02-01 13:45:16 +13:00
return (bool)(C.QRadioTuner_isSearching(this.h))
2024-11-04 23:15:32 +13:00
}
func (this *QRadioTuner) IsAntennaConnected() bool {
2025-02-01 13:45:16 +13:00
return (bool)(C.QRadioTuner_isAntennaConnected(this.h))
2024-11-04 23:15:32 +13:00
}
func (this *QRadioTuner) Error() QRadioTuner__Error {
2025-02-01 13:45:16 +13:00
return (QRadioTuner__Error)(C.QRadioTuner_error(this.h))
2024-11-04 23:15:32 +13:00
}
func (this *QRadioTuner) ErrorString() string {
2025-02-01 13:45:16 +13:00
var _ms C.struct_miqt_string = C.QRadioTuner_errorString(this.h)
2024-11-04 23:15:32 +13:00
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
C.free(unsafe.Pointer(_ms.data))
return _ret
}
func (this *QRadioTuner) RadioData() *QRadioData {
2025-02-01 13:45:16 +13:00
return newQRadioData(C.QRadioTuner_radioData(this.h))
2024-11-04 23:15:32 +13:00
}
func (this *QRadioTuner) SearchForward() {
2025-02-01 13:45:16 +13:00
C.QRadioTuner_searchForward(this.h)
2024-11-04 23:15:32 +13:00
}
func (this *QRadioTuner) SearchBackward() {
2025-02-01 13:45:16 +13:00
C.QRadioTuner_searchBackward(this.h)
2024-11-04 23:15:32 +13:00
}
func (this *QRadioTuner) SearchAllStations() {
2025-02-01 13:45:16 +13:00
C.QRadioTuner_searchAllStations(this.h)
2024-11-04 23:15:32 +13:00
}
func (this *QRadioTuner) CancelSearch() {
2025-02-01 13:45:16 +13:00
C.QRadioTuner_cancelSearch(this.h)
2024-11-04 23:15:32 +13:00
}
func (this *QRadioTuner) SetBand(band QRadioTuner__Band) {
2025-02-01 13:45:16 +13:00
C.QRadioTuner_setBand(this.h, (C.int)(band))
2024-11-04 23:15:32 +13:00
}
func (this *QRadioTuner) SetFrequency(frequency int) {
2025-02-01 13:45:16 +13:00
C.QRadioTuner_setFrequency(this.h, (C.int)(frequency))
2024-11-04 23:15:32 +13:00
}
func (this *QRadioTuner) SetVolume(volume int) {
2025-02-01 13:45:16 +13:00
C.QRadioTuner_setVolume(this.h, (C.int)(volume))
2024-11-04 23:15:32 +13:00
}
func (this *QRadioTuner) SetMuted(muted bool) {
2025-02-01 13:45:16 +13:00
C.QRadioTuner_setMuted(this.h, (C.bool)(muted))
2024-11-04 23:15:32 +13:00
}
func (this *QRadioTuner) Start() {
2025-02-01 13:45:16 +13:00
C.QRadioTuner_start(this.h)
2024-11-04 23:15:32 +13:00
}
func (this *QRadioTuner) Stop() {
2025-02-01 13:45:16 +13:00
C.QRadioTuner_stop(this.h)
2024-11-04 23:15:32 +13:00
}
func (this *QRadioTuner) StateChanged(state QRadioTuner__State) {
2025-02-01 13:45:16 +13:00
C.QRadioTuner_stateChanged(this.h, (C.int)(state))
2024-11-04 23:15:32 +13:00
}
func (this *QRadioTuner) OnStateChanged(slot func(state QRadioTuner__State)) {
2025-02-01 13:45:16 +13:00
C.QRadioTuner_connect_stateChanged(this.h, C.intptr_t(cgo.NewHandle(slot)))
2024-11-04 23:15:32 +13:00
}
2025-02-01 13:45:16 +13:00
//export miqt_exec_callback_QRadioTuner_stateChanged
func miqt_exec_callback_QRadioTuner_stateChanged(cb C.intptr_t, state C.int) {
2024-11-04 23:15:32 +13:00
gofunc, ok := cgo.Handle(cb).Value().(func(state QRadioTuner__State))
if !ok {
panic("miqt: callback of non-callback type (heap corruption?)")
}
// Convert all CABI parameters to Go parameters
slotval1 := (QRadioTuner__State)(state)
gofunc(slotval1)
}
func (this *QRadioTuner) BandChanged(band QRadioTuner__Band) {
2025-02-01 13:45:16 +13:00
C.QRadioTuner_bandChanged(this.h, (C.int)(band))
2024-11-04 23:15:32 +13:00
}
func (this *QRadioTuner) OnBandChanged(slot func(band QRadioTuner__Band)) {
2025-02-01 13:45:16 +13:00
C.QRadioTuner_connect_bandChanged(this.h, C.intptr_t(cgo.NewHandle(slot)))
2024-11-04 23:15:32 +13:00
}
2025-02-01 13:45:16 +13:00
//export miqt_exec_callback_QRadioTuner_bandChanged
func miqt_exec_callback_QRadioTuner_bandChanged(cb C.intptr_t, band C.int) {
2024-11-04 23:15:32 +13:00
gofunc, ok := cgo.Handle(cb).Value().(func(band QRadioTuner__Band))
if !ok {
panic("miqt: callback of non-callback type (heap corruption?)")
}
// Convert all CABI parameters to Go parameters
slotval1 := (QRadioTuner__Band)(band)
gofunc(slotval1)
}
func (this *QRadioTuner) FrequencyChanged(frequency int) {
2025-02-01 13:45:16 +13:00
C.QRadioTuner_frequencyChanged(this.h, (C.int)(frequency))
2024-11-04 23:15:32 +13:00
}
func (this *QRadioTuner) OnFrequencyChanged(slot func(frequency int)) {
2025-02-01 13:45:16 +13:00
C.QRadioTuner_connect_frequencyChanged(this.h, C.intptr_t(cgo.NewHandle(slot)))
2024-11-04 23:15:32 +13:00
}
2025-02-01 13:45:16 +13:00
//export miqt_exec_callback_QRadioTuner_frequencyChanged
func miqt_exec_callback_QRadioTuner_frequencyChanged(cb C.intptr_t, frequency C.int) {
2024-11-04 23:15:32 +13:00
gofunc, ok := cgo.Handle(cb).Value().(func(frequency int))
if !ok {
panic("miqt: callback of non-callback type (heap corruption?)")
}
// Convert all CABI parameters to Go parameters
slotval1 := (int)(frequency)
gofunc(slotval1)
}
func (this *QRadioTuner) StereoStatusChanged(stereo bool) {
2025-02-01 13:45:16 +13:00
C.QRadioTuner_stereoStatusChanged(this.h, (C.bool)(stereo))
2024-11-04 23:15:32 +13:00
}
func (this *QRadioTuner) OnStereoStatusChanged(slot func(stereo bool)) {
2025-02-01 13:45:16 +13:00
C.QRadioTuner_connect_stereoStatusChanged(this.h, C.intptr_t(cgo.NewHandle(slot)))
2024-11-04 23:15:32 +13:00
}
2025-02-01 13:45:16 +13:00
//export miqt_exec_callback_QRadioTuner_stereoStatusChanged
func miqt_exec_callback_QRadioTuner_stereoStatusChanged(cb C.intptr_t, stereo C.bool) {
2024-11-04 23:15:32 +13:00
gofunc, ok := cgo.Handle(cb).Value().(func(stereo bool))
if !ok {
panic("miqt: callback of non-callback type (heap corruption?)")
}
// Convert all CABI parameters to Go parameters
slotval1 := (bool)(stereo)
gofunc(slotval1)
}
func (this *QRadioTuner) SearchingChanged(searching bool) {
2025-02-01 13:45:16 +13:00
C.QRadioTuner_searchingChanged(this.h, (C.bool)(searching))
2024-11-04 23:15:32 +13:00
}
func (this *QRadioTuner) OnSearchingChanged(slot func(searching bool)) {
2025-02-01 13:45:16 +13:00
C.QRadioTuner_connect_searchingChanged(this.h, C.intptr_t(cgo.NewHandle(slot)))
2024-11-04 23:15:32 +13:00
}
2025-02-01 13:45:16 +13:00
//export miqt_exec_callback_QRadioTuner_searchingChanged
func miqt_exec_callback_QRadioTuner_searchingChanged(cb C.intptr_t, searching C.bool) {
2024-11-04 23:15:32 +13:00
gofunc, ok := cgo.Handle(cb).Value().(func(searching bool))
if !ok {
panic("miqt: callback of non-callback type (heap corruption?)")
}
// Convert all CABI parameters to Go parameters
slotval1 := (bool)(searching)
gofunc(slotval1)
}
func (this *QRadioTuner) SignalStrengthChanged(signalStrength int) {
2025-02-01 13:45:16 +13:00
C.QRadioTuner_signalStrengthChanged(this.h, (C.int)(signalStrength))
2024-11-04 23:15:32 +13:00
}
func (this *QRadioTuner) OnSignalStrengthChanged(slot func(signalStrength int)) {
2025-02-01 13:45:16 +13:00
C.QRadioTuner_connect_signalStrengthChanged(this.h, C.intptr_t(cgo.NewHandle(slot)))
2024-11-04 23:15:32 +13:00
}
2025-02-01 13:45:16 +13:00
//export miqt_exec_callback_QRadioTuner_signalStrengthChanged
func miqt_exec_callback_QRadioTuner_signalStrengthChanged(cb C.intptr_t, signalStrength C.int) {
2024-11-04 23:15:32 +13:00
gofunc, ok := cgo.Handle(cb).Value().(func(signalStrength int))
if !ok {
panic("miqt: callback of non-callback type (heap corruption?)")
}
// Convert all CABI parameters to Go parameters
slotval1 := (int)(signalStrength)
gofunc(slotval1)
}
func (this *QRadioTuner) VolumeChanged(volume int) {
2025-02-01 13:45:16 +13:00
C.QRadioTuner_volumeChanged(this.h, (C.int)(volume))
2024-11-04 23:15:32 +13:00
}
func (this *QRadioTuner) OnVolumeChanged(slot func(volume int)) {
2025-02-01 13:45:16 +13:00
C.QRadioTuner_connect_volumeChanged(this.h, C.intptr_t(cgo.NewHandle(slot)))
2024-11-04 23:15:32 +13:00
}
2025-02-01 13:45:16 +13:00
//export miqt_exec_callback_QRadioTuner_volumeChanged
func miqt_exec_callback_QRadioTuner_volumeChanged(cb C.intptr_t, volume C.int) {
2024-11-04 23:15:32 +13:00
gofunc, ok := cgo.Handle(cb).Value().(func(volume int))
if !ok {
panic("miqt: callback of non-callback type (heap corruption?)")
}
// Convert all CABI parameters to Go parameters
slotval1 := (int)(volume)
gofunc(slotval1)
}
func (this *QRadioTuner) MutedChanged(muted bool) {
2025-02-01 13:45:16 +13:00
C.QRadioTuner_mutedChanged(this.h, (C.bool)(muted))
2024-11-04 23:15:32 +13:00
}
func (this *QRadioTuner) OnMutedChanged(slot func(muted bool)) {
2025-02-01 13:45:16 +13:00
C.QRadioTuner_connect_mutedChanged(this.h, C.intptr_t(cgo.NewHandle(slot)))
2024-11-04 23:15:32 +13:00
}
2025-02-01 13:45:16 +13:00
//export miqt_exec_callback_QRadioTuner_mutedChanged
func miqt_exec_callback_QRadioTuner_mutedChanged(cb C.intptr_t, muted C.bool) {
2024-11-04 23:15:32 +13:00
gofunc, ok := cgo.Handle(cb).Value().(func(muted bool))
if !ok {
panic("miqt: callback of non-callback type (heap corruption?)")
}
// Convert all CABI parameters to Go parameters
slotval1 := (bool)(muted)
gofunc(slotval1)
}
func (this *QRadioTuner) StationFound(frequency int, stationId string) {
stationId_ms := C.struct_miqt_string{}
stationId_ms.data = C.CString(stationId)
stationId_ms.len = C.size_t(len(stationId))
defer C.free(unsafe.Pointer(stationId_ms.data))
2025-02-01 13:45:16 +13:00
C.QRadioTuner_stationFound(this.h, (C.int)(frequency), stationId_ms)
2024-11-04 23:15:32 +13:00
}
func (this *QRadioTuner) OnStationFound(slot func(frequency int, stationId string)) {
2025-02-01 13:45:16 +13:00
C.QRadioTuner_connect_stationFound(this.h, C.intptr_t(cgo.NewHandle(slot)))
2024-11-04 23:15:32 +13:00
}
2025-02-01 13:45:16 +13:00
//export miqt_exec_callback_QRadioTuner_stationFound
func miqt_exec_callback_QRadioTuner_stationFound(cb C.intptr_t, frequency C.int, stationId C.struct_miqt_string) {
2024-11-04 23:15:32 +13:00
gofunc, ok := cgo.Handle(cb).Value().(func(frequency int, stationId string))
if !ok {
panic("miqt: callback of non-callback type (heap corruption?)")
}
// Convert all CABI parameters to Go parameters
slotval1 := (int)(frequency)
var stationId_ms C.struct_miqt_string = stationId
stationId_ret := C.GoStringN(stationId_ms.data, C.int(int64(stationId_ms.len)))
C.free(unsafe.Pointer(stationId_ms.data))
slotval2 := stationId_ret
gofunc(slotval1, slotval2)
}
func (this *QRadioTuner) AntennaConnectedChanged(connectionStatus bool) {
2025-02-01 13:45:16 +13:00
C.QRadioTuner_antennaConnectedChanged(this.h, (C.bool)(connectionStatus))
2024-11-04 23:15:32 +13:00
}
func (this *QRadioTuner) OnAntennaConnectedChanged(slot func(connectionStatus bool)) {
2025-02-01 13:45:16 +13:00
C.QRadioTuner_connect_antennaConnectedChanged(this.h, C.intptr_t(cgo.NewHandle(slot)))
2024-11-04 23:15:32 +13:00
}
2025-02-01 13:45:16 +13:00
//export miqt_exec_callback_QRadioTuner_antennaConnectedChanged
func miqt_exec_callback_QRadioTuner_antennaConnectedChanged(cb C.intptr_t, connectionStatus C.bool) {
2024-11-04 23:15:32 +13:00
gofunc, ok := cgo.Handle(cb).Value().(func(connectionStatus bool))
if !ok {
panic("miqt: callback of non-callback type (heap corruption?)")
}
// Convert all CABI parameters to Go parameters
slotval1 := (bool)(connectionStatus)
gofunc(slotval1)
}
func (this *QRadioTuner) ErrorWithError(error QRadioTuner__Error) {
2025-02-01 13:45:16 +13:00
C.QRadioTuner_errorWithError(this.h, (C.int)(error))
2024-11-04 23:15:32 +13:00
}
func (this *QRadioTuner) OnErrorWithError(slot func(error QRadioTuner__Error)) {
2025-02-01 13:45:16 +13:00
C.QRadioTuner_connect_errorWithError(this.h, C.intptr_t(cgo.NewHandle(slot)))
2024-11-04 23:15:32 +13:00
}
2025-02-01 13:45:16 +13:00
//export miqt_exec_callback_QRadioTuner_errorWithError
func miqt_exec_callback_QRadioTuner_errorWithError(cb C.intptr_t, error C.int) {
2024-11-04 23:15:32 +13:00
gofunc, ok := cgo.Handle(cb).Value().(func(error QRadioTuner__Error))
if !ok {
panic("miqt: callback of non-callback type (heap corruption?)")
}
// Convert all CABI parameters to Go parameters
slotval1 := (QRadioTuner__Error)(error)
gofunc(slotval1)
}
func QRadioTuner_Tr2(s string, c string) string {
s_Cstring := C.CString(s)
defer C.free(unsafe.Pointer(s_Cstring))
c_Cstring := C.CString(c)
defer C.free(unsafe.Pointer(c_Cstring))
2025-02-01 13:45:16 +13:00
var _ms C.struct_miqt_string = C.QRadioTuner_tr2(s_Cstring, c_Cstring)
2024-11-04 23:15:32 +13:00
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
C.free(unsafe.Pointer(_ms.data))
return _ret
}
func QRadioTuner_Tr3(s string, c string, n int) string {
s_Cstring := C.CString(s)
defer C.free(unsafe.Pointer(s_Cstring))
c_Cstring := C.CString(c)
defer C.free(unsafe.Pointer(c_Cstring))
2025-02-01 13:45:16 +13:00
var _ms C.struct_miqt_string = C.QRadioTuner_tr3(s_Cstring, c_Cstring, (C.int)(n))
2024-11-04 23:15:32 +13:00
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
C.free(unsafe.Pointer(_ms.data))
return _ret
}
func QRadioTuner_TrUtf82(s string, c string) string {
s_Cstring := C.CString(s)
defer C.free(unsafe.Pointer(s_Cstring))
c_Cstring := C.CString(c)
defer C.free(unsafe.Pointer(c_Cstring))
2025-02-01 13:45:16 +13:00
var _ms C.struct_miqt_string = C.QRadioTuner_trUtf82(s_Cstring, c_Cstring)
2024-11-04 23:15:32 +13:00
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
C.free(unsafe.Pointer(_ms.data))
return _ret
}
func QRadioTuner_TrUtf83(s string, c string, n int) string {
s_Cstring := C.CString(s)
defer C.free(unsafe.Pointer(s_Cstring))
c_Cstring := C.CString(c)
defer C.free(unsafe.Pointer(c_Cstring))
2025-02-01 13:45:16 +13:00
var _ms C.struct_miqt_string = C.QRadioTuner_trUtf83(s_Cstring, c_Cstring, (C.int)(n))
2024-11-04 23:15:32 +13:00
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
C.free(unsafe.Pointer(_ms.data))
return _ret
}
func (this *QRadioTuner) SearchAllStations1(searchMode QRadioTuner__SearchMode) {
2025-02-01 13:45:16 +13:00
C.QRadioTuner_searchAllStations1(this.h, (C.int)(searchMode))
2024-11-04 23:15:32 +13:00
}
2024-11-19 19:29:06 +13:00
func (this *QRadioTuner) callVirtualBase_Availability() QMultimedia__AvailabilityStatus {
2025-02-01 13:45:16 +13:00
return (QMultimedia__AvailabilityStatus)(C.QRadioTuner_virtualbase_availability(unsafe.Pointer(this.h)))
2024-11-19 19:29:06 +13:00
}
2025-02-01 13:45:16 +13:00
func (this *QRadioTuner) Onavailability(slot func(super func() QMultimedia__AvailabilityStatus) QMultimedia__AvailabilityStatus) {
ok := C.QRadioTuner_override_virtual_availability(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
if !ok {
panic("miqt: can only override virtual methods for directly constructed types")
}
2024-11-19 19:29:06 +13:00
}
2025-02-01 13:45:16 +13:00
//export miqt_exec_callback_QRadioTuner_availability
func miqt_exec_callback_QRadioTuner_availability(self *C.QRadioTuner, cb C.intptr_t) C.int {
2024-11-19 19:29:06 +13:00
gofunc, ok := cgo.Handle(cb).Value().(func(super func() QMultimedia__AvailabilityStatus) QMultimedia__AvailabilityStatus)
if !ok {
panic("miqt: callback of non-callback type (heap corruption?)")
}
virtualReturn := gofunc((&QRadioTuner{h: self}).callVirtualBase_Availability)
return (C.int)(virtualReturn)
}
func (this *QRadioTuner) callVirtualBase_IsAvailable() bool {
2025-02-01 13:45:16 +13:00
return (bool)(C.QRadioTuner_virtualbase_isAvailable(unsafe.Pointer(this.h)))
2024-11-19 19:29:06 +13:00
}
2025-02-01 13:45:16 +13:00
func (this *QRadioTuner) OnisAvailable(slot func(super func() bool) bool) {
ok := C.QRadioTuner_override_virtual_isAvailable(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
if !ok {
panic("miqt: can only override virtual methods for directly constructed types")
}
2024-11-19 19:29:06 +13:00
}
2025-02-01 13:45:16 +13:00
//export miqt_exec_callback_QRadioTuner_isAvailable
func miqt_exec_callback_QRadioTuner_isAvailable(self *C.QRadioTuner, cb C.intptr_t) C.bool {
2024-11-19 19:29:06 +13:00
gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool)
if !ok {
panic("miqt: callback of non-callback type (heap corruption?)")
}
virtualReturn := gofunc((&QRadioTuner{h: self}).callVirtualBase_IsAvailable)
return (C.bool)(virtualReturn)
}
func (this *QRadioTuner) callVirtualBase_Service() *QMediaService {
2025-02-01 13:45:16 +13:00
return newQMediaService(C.QRadioTuner_virtualbase_service(unsafe.Pointer(this.h)))
2024-11-19 19:29:06 +13:00
}
2025-02-01 13:45:16 +13:00
func (this *QRadioTuner) Onservice(slot func(super func() *QMediaService) *QMediaService) {
ok := C.QRadioTuner_override_virtual_service(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
if !ok {
panic("miqt: can only override virtual methods for directly constructed types")
}
2024-11-19 19:29:06 +13:00
}
2025-02-01 13:45:16 +13:00
//export miqt_exec_callback_QRadioTuner_service
func miqt_exec_callback_QRadioTuner_service(self *C.QRadioTuner, cb C.intptr_t) *C.QMediaService {
2024-11-19 19:29:06 +13:00
gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QMediaService) *QMediaService)
if !ok {
panic("miqt: callback of non-callback type (heap corruption?)")
}
virtualReturn := gofunc((&QRadioTuner{h: self}).callVirtualBase_Service)
return virtualReturn.cPointer()
}
func (this *QRadioTuner) callVirtualBase_Bind(param1 *qt.QObject) bool {
2025-02-01 13:45:16 +13:00
return (bool)(C.QRadioTuner_virtualbase_bind(unsafe.Pointer(this.h), (*C.QObject)(param1.UnsafePointer())))
2024-11-19 19:29:06 +13:00
}
2025-02-01 13:45:16 +13:00
func (this *QRadioTuner) Onbind(slot func(super func(param1 *qt.QObject) bool, param1 *qt.QObject) bool) {
ok := C.QRadioTuner_override_virtual_bind(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
if !ok {
panic("miqt: can only override virtual methods for directly constructed types")
}
2024-11-19 19:29:06 +13:00
}
2025-02-01 13:45:16 +13:00
//export miqt_exec_callback_QRadioTuner_bind
func miqt_exec_callback_QRadioTuner_bind(self *C.QRadioTuner, cb C.intptr_t, param1 *C.QObject) C.bool {
2024-11-19 19:29:06 +13:00
gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *qt.QObject) bool, param1 *qt.QObject) bool)
if !ok {
panic("miqt: callback of non-callback type (heap corruption?)")
}
// Convert all CABI parameters to Go parameters
slotval1 := qt.UnsafeNewQObject(unsafe.Pointer(param1))
virtualReturn := gofunc((&QRadioTuner{h: self}).callVirtualBase_Bind, slotval1)
return (C.bool)(virtualReturn)
}
func (this *QRadioTuner) callVirtualBase_Unbind(param1 *qt.QObject) {
2025-02-01 13:45:16 +13:00
C.QRadioTuner_virtualbase_unbind(unsafe.Pointer(this.h), (*C.QObject)(param1.UnsafePointer()))
2024-11-19 19:29:06 +13:00
}
2025-02-01 13:45:16 +13:00
func (this *QRadioTuner) Onunbind(slot func(super func(param1 *qt.QObject), param1 *qt.QObject)) {
ok := C.QRadioTuner_override_virtual_unbind(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
if !ok {
panic("miqt: can only override virtual methods for directly constructed types")
}
2024-11-19 19:29:06 +13:00
}
2025-02-01 13:45:16 +13:00
//export miqt_exec_callback_QRadioTuner_unbind
func miqt_exec_callback_QRadioTuner_unbind(self *C.QRadioTuner, cb C.intptr_t, param1 *C.QObject) {
2024-11-19 19:29:06 +13:00
gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *qt.QObject), param1 *qt.QObject))
if !ok {
panic("miqt: callback of non-callback type (heap corruption?)")
}
// Convert all CABI parameters to Go parameters
slotval1 := qt.UnsafeNewQObject(unsafe.Pointer(param1))
gofunc((&QRadioTuner{h: self}).callVirtualBase_Unbind, slotval1)
}
func (this *QRadioTuner) callVirtualBase_Event(event *qt.QEvent) bool {
2025-02-01 13:45:16 +13:00
return (bool)(C.QRadioTuner_virtualbase_event(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer())))
}
2025-02-01 13:45:16 +13:00
func (this *QRadioTuner) Onevent(slot func(super func(event *qt.QEvent) bool, event *qt.QEvent) bool) {
ok := C.QRadioTuner_override_virtual_event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
if !ok {
panic("miqt: can only override virtual methods for directly constructed types")
}
}
2025-02-01 13:45:16 +13:00
//export miqt_exec_callback_QRadioTuner_event
func miqt_exec_callback_QRadioTuner_event(self *C.QRadioTuner, cb C.intptr_t, event *C.QEvent) C.bool {
gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QEvent) bool, event *qt.QEvent) bool)
if !ok {
panic("miqt: callback of non-callback type (heap corruption?)")
}
// Convert all CABI parameters to Go parameters
slotval1 := qt.UnsafeNewQEvent(unsafe.Pointer(event))
virtualReturn := gofunc((&QRadioTuner{h: self}).callVirtualBase_Event, slotval1)
return (C.bool)(virtualReturn)
}
func (this *QRadioTuner) callVirtualBase_EventFilter(watched *qt.QObject, event *qt.QEvent) bool {
2025-02-01 13:45:16 +13:00
return (bool)(C.QRadioTuner_virtualbase_eventFilter(unsafe.Pointer(this.h), (*C.QObject)(watched.UnsafePointer()), (*C.QEvent)(event.UnsafePointer())))
}
2025-02-01 13:45:16 +13:00
func (this *QRadioTuner) OneventFilter(slot func(super func(watched *qt.QObject, event *qt.QEvent) bool, watched *qt.QObject, event *qt.QEvent) bool) {
ok := C.QRadioTuner_override_virtual_eventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
if !ok {
panic("miqt: can only override virtual methods for directly constructed types")
}
}
2025-02-01 13:45:16 +13:00
//export miqt_exec_callback_QRadioTuner_eventFilter
func miqt_exec_callback_QRadioTuner_eventFilter(self *C.QRadioTuner, cb C.intptr_t, watched *C.QObject, event *C.QEvent) C.bool {
gofunc, ok := cgo.Handle(cb).Value().(func(super func(watched *qt.QObject, event *qt.QEvent) bool, watched *qt.QObject, event *qt.QEvent) bool)
if !ok {
panic("miqt: callback of non-callback type (heap corruption?)")
}
// Convert all CABI parameters to Go parameters
slotval1 := qt.UnsafeNewQObject(unsafe.Pointer(watched))
slotval2 := qt.UnsafeNewQEvent(unsafe.Pointer(event))
virtualReturn := gofunc((&QRadioTuner{h: self}).callVirtualBase_EventFilter, slotval1, slotval2)
return (C.bool)(virtualReturn)
}
func (this *QRadioTuner) callVirtualBase_TimerEvent(event *qt.QTimerEvent) {
2025-02-01 13:45:16 +13:00
C.QRadioTuner_virtualbase_timerEvent(unsafe.Pointer(this.h), (*C.QTimerEvent)(event.UnsafePointer()))
}
2025-02-01 13:45:16 +13:00
func (this *QRadioTuner) OntimerEvent(slot func(super func(event *qt.QTimerEvent), event *qt.QTimerEvent)) {
ok := C.QRadioTuner_override_virtual_timerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
if !ok {
panic("miqt: can only override virtual methods for directly constructed types")
}
}
2025-02-01 13:45:16 +13:00
//export miqt_exec_callback_QRadioTuner_timerEvent
func miqt_exec_callback_QRadioTuner_timerEvent(self *C.QRadioTuner, cb C.intptr_t, event *C.QTimerEvent) {
gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QTimerEvent), event *qt.QTimerEvent))
if !ok {
panic("miqt: callback of non-callback type (heap corruption?)")
}
// Convert all CABI parameters to Go parameters
slotval1 := qt.UnsafeNewQTimerEvent(unsafe.Pointer(event))
gofunc((&QRadioTuner{h: self}).callVirtualBase_TimerEvent, slotval1)
}
func (this *QRadioTuner) callVirtualBase_ChildEvent(event *qt.QChildEvent) {
2025-02-01 13:45:16 +13:00
C.QRadioTuner_virtualbase_childEvent(unsafe.Pointer(this.h), (*C.QChildEvent)(event.UnsafePointer()))
}
2025-02-01 13:45:16 +13:00
func (this *QRadioTuner) OnchildEvent(slot func(super func(event *qt.QChildEvent), event *qt.QChildEvent)) {
ok := C.QRadioTuner_override_virtual_childEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
if !ok {
panic("miqt: can only override virtual methods for directly constructed types")
}
}
2025-02-01 13:45:16 +13:00
//export miqt_exec_callback_QRadioTuner_childEvent
func miqt_exec_callback_QRadioTuner_childEvent(self *C.QRadioTuner, cb C.intptr_t, event *C.QChildEvent) {
gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QChildEvent), event *qt.QChildEvent))
if !ok {
panic("miqt: callback of non-callback type (heap corruption?)")
}
// Convert all CABI parameters to Go parameters
slotval1 := qt.UnsafeNewQChildEvent(unsafe.Pointer(event))
gofunc((&QRadioTuner{h: self}).callVirtualBase_ChildEvent, slotval1)
}
func (this *QRadioTuner) callVirtualBase_CustomEvent(event *qt.QEvent) {
2025-02-01 13:45:16 +13:00
C.QRadioTuner_virtualbase_customEvent(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer()))
}
2025-02-01 13:45:16 +13:00
func (this *QRadioTuner) OncustomEvent(slot func(super func(event *qt.QEvent), event *qt.QEvent)) {
ok := C.QRadioTuner_override_virtual_customEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
if !ok {
panic("miqt: can only override virtual methods for directly constructed types")
}
}
2025-02-01 13:45:16 +13:00
//export miqt_exec_callback_QRadioTuner_customEvent
func miqt_exec_callback_QRadioTuner_customEvent(self *C.QRadioTuner, cb C.intptr_t, event *C.QEvent) {
gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QEvent), event *qt.QEvent))
if !ok {
panic("miqt: callback of non-callback type (heap corruption?)")
}
// Convert all CABI parameters to Go parameters
slotval1 := qt.UnsafeNewQEvent(unsafe.Pointer(event))
gofunc((&QRadioTuner{h: self}).callVirtualBase_CustomEvent, slotval1)
}
func (this *QRadioTuner) callVirtualBase_ConnectNotify(signal *qt.QMetaMethod) {
2025-02-01 13:45:16 +13:00
C.QRadioTuner_virtualbase_connectNotify(unsafe.Pointer(this.h), (*C.QMetaMethod)(signal.UnsafePointer()))
}
2025-02-01 13:45:16 +13:00
func (this *QRadioTuner) OnconnectNotify(slot func(super func(signal *qt.QMetaMethod), signal *qt.QMetaMethod)) {
ok := C.QRadioTuner_override_virtual_connectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
if !ok {
panic("miqt: can only override virtual methods for directly constructed types")
}
}
2025-02-01 13:45:16 +13:00
//export miqt_exec_callback_QRadioTuner_connectNotify
func miqt_exec_callback_QRadioTuner_connectNotify(self *C.QRadioTuner, cb C.intptr_t, signal *C.QMetaMethod) {
gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *qt.QMetaMethod), signal *qt.QMetaMethod))
if !ok {
panic("miqt: callback of non-callback type (heap corruption?)")
}
// Convert all CABI parameters to Go parameters
slotval1 := qt.UnsafeNewQMetaMethod(unsafe.Pointer(signal))
gofunc((&QRadioTuner{h: self}).callVirtualBase_ConnectNotify, slotval1)
}
func (this *QRadioTuner) callVirtualBase_DisconnectNotify(signal *qt.QMetaMethod) {
2025-02-01 13:45:16 +13:00
C.QRadioTuner_virtualbase_disconnectNotify(unsafe.Pointer(this.h), (*C.QMetaMethod)(signal.UnsafePointer()))
}
2025-02-01 13:45:16 +13:00
func (this *QRadioTuner) OndisconnectNotify(slot func(super func(signal *qt.QMetaMethod), signal *qt.QMetaMethod)) {
ok := C.QRadioTuner_override_virtual_disconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
if !ok {
panic("miqt: can only override virtual methods for directly constructed types")
}
}
2025-02-01 13:45:16 +13:00
//export miqt_exec_callback_QRadioTuner_disconnectNotify
func miqt_exec_callback_QRadioTuner_disconnectNotify(self *C.QRadioTuner, cb C.intptr_t, signal *C.QMetaMethod) {
gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *qt.QMetaMethod), signal *qt.QMetaMethod))
if !ok {
panic("miqt: callback of non-callback type (heap corruption?)")
}
// Convert all CABI parameters to Go parameters
slotval1 := qt.UnsafeNewQMetaMethod(unsafe.Pointer(signal))
gofunc((&QRadioTuner{h: self}).callVirtualBase_DisconnectNotify, slotval1)
}
2024-11-04 23:15:32 +13:00
// Delete this object from C++ memory.
func (this *QRadioTuner) Delete() {
2025-02-01 13:45:16 +13:00
C.QRadioTuner_delete(this.h)
2024-11-04 23:15:32 +13:00
}
// GoGC adds a Go Finalizer to this pointer, so that it will be deleted
// from C++ memory once it is unreachable from Go memory.
func (this *QRadioTuner) GoGC() {
runtime.SetFinalizer(this, func(this *QRadioTuner) {
this.Delete()
runtime.KeepAlive(this.h)
})
}