blob: 4ba24bce0ee0ef5a647180428dc804bac366c633 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
// Package cpptest is an internal test helper.
package cpptest
// #cgo CXXFLAGS: -std=c++0x -Wall -fno-strict-aliasing -I..
// #cgo LDFLAGS: -lstdc++
//
// #cgo pkg-config: Qt5Core
//
// #include "cpptest.h"
//
import "C"
import (
"unsafe"
"gopkg.in/qml.v1"
)
func NewTestType(engine *qml.Engine) qml.Object {
var obj qml.Object
qml.RunMain(func() {
addr := C.newTestType()
obj = qml.CommonOf(addr, engine)
})
return obj
}
func PlainTestTypeN(obj qml.Object) int {
return int(C.plainTestTypeN(unsafe.Pointer(obj.Property("plainAddr").(uintptr))))
}
|