mirror of
https://github.com/mappu/miqt.git
synced 2024-12-22 00:48:38 +00:00
Merge pull request #43 from mappu/miqt-multipackage
Multiple package support
This commit is contained in:
commit
c6827726f7
@ -138,9 +138,9 @@ pacman -S mingw-w64-ucrt-x86_64-{go,gcc,qt5-base,pkg-config}
|
||||
GOROOT=/ucrt64/lib/go go build -ldflags "-s -w -H windowsgui"
|
||||
```
|
||||
|
||||
Static builds are also available by installing the `mingw-w64-ucrt-x86_64-qt5-static` package and building with `--tags=windowsqtstatic`.
|
||||
For dynamic linking, the MSYS2 `qt5-base` package [links against `libicu`](https://github.com/msys2/MINGW-packages/blob/master/mingw-w64-qt5-base/PKGBUILD#L241), whereas the Fsu0413 Qt packages do not. When using MSYS2, your distribution size including `.dll` files will be larger.
|
||||
|
||||
The MSYS2 Qt packages in MSYS2 link against `libicu`, whereas the Fsu0413 Qt packages do not. When using MSYS2, your distribution size including `.dll` files will be larger.
|
||||
Static builds are also available by installing the `mingw-w64-ucrt-x86_64-qt5-static` package and building with `--tags=windowsqtstatic`. The static build will also be smaller as it [does not link to `libicu`](https://github.com/msys2/MINGW-packages/blob/master/mingw-w64-qt5-static/PKGBUILD#L280).
|
||||
|
||||
### Windows (Docker)
|
||||
|
||||
|
@ -525,7 +525,7 @@ nextEnumEntry:
|
||||
}
|
||||
|
||||
kind, ok := entry["kind"].(string)
|
||||
if kind == "DeprecatedAttr" {
|
||||
if kind == "DeprecatedAttr" || kind == "FullComment" {
|
||||
continue nextEnumEntry // skip
|
||||
} else if kind == "EnumConstantDecl" {
|
||||
// allow
|
||||
@ -545,56 +545,69 @@ nextEnumEntry:
|
||||
|
||||
// Try to find the enum value
|
||||
ei1, ok := entry["inner"].([]interface{})
|
||||
if !ok || len(ei1) == 0 {
|
||||
// Enum case without definition e.g. QCalendar::Gregorian
|
||||
// This means one more than the last value
|
||||
cee.EntryValue = fmt.Sprintf("%d", lastImplicitValue+1)
|
||||
if !ok {
|
||||
// No inner value on the enum = autoincrement
|
||||
// Fall through as if a blank ei1, this will be handled
|
||||
}
|
||||
|
||||
} else if len(ei1) >= 1 {
|
||||
// There may be more than one RHS `inner` expression if one of them
|
||||
// is a comment
|
||||
// Iterate through each of the ei1 entries and see if any of them
|
||||
// work for the purposes of enum constant value parsing
|
||||
foundValidInner := false
|
||||
for _, ei1_0 := range ei1 {
|
||||
|
||||
// There may be more than one RHS `inner` expression if one of them
|
||||
// is a comment
|
||||
// Iterate through each of the ei1 entries and see if any of them
|
||||
// work for the purposes of enum constant value parsing
|
||||
for _, ei1_0 := range ei1 {
|
||||
ei1_0 := ei1_0.(map[string]interface{})
|
||||
ei1Kind, ok := ei1_0["kind"].(string)
|
||||
if !ok {
|
||||
panic("inner with no kind (1)")
|
||||
}
|
||||
|
||||
ei1_0 := ei1_0.(map[string]interface{})
|
||||
if ei1Kind == "FullComment" {
|
||||
continue
|
||||
}
|
||||
foundValidInner = true
|
||||
|
||||
// Best case: .inner -> kind=ConstantExpr value=xx
|
||||
// e.g. qabstractitemmodel
|
||||
if ei1Kind, ok := ei1_0["kind"].(string); ok && ei1Kind == "ConstantExpr" {
|
||||
log.Printf("Got ConstantExpr OK")
|
||||
if ei1Value, ok := ei1_0["value"].(string); ok {
|
||||
cee.EntryValue = ei1Value
|
||||
goto afterParse
|
||||
}
|
||||
// Best case: .inner -> kind=ConstantExpr value=xx
|
||||
// e.g. qabstractitemmodel
|
||||
if ei1Kind == "ConstantExpr" {
|
||||
log.Printf("Got ConstantExpr OK")
|
||||
if ei1Value, ok := ei1_0["value"].(string); ok {
|
||||
cee.EntryValue = ei1Value
|
||||
goto afterParse
|
||||
}
|
||||
}
|
||||
|
||||
// Best case: .inner -> kind=ImplicitCastExpr .inner -> kind=ConstantExpr value=xx
|
||||
// e.g. QCalendar (when there is a int typecast)
|
||||
if ei1Kind, ok := ei1_0["kind"].(string); ok && ei1Kind == "ImplicitCastExpr" {
|
||||
log.Printf("Got ImplicitCastExpr OK")
|
||||
if ei2, ok := ei1_0["inner"].([]interface{}); ok && len(ei2) > 0 {
|
||||
ei2_0 := ei2[0].(map[string]interface{})
|
||||
if ei2Kind, ok := ei2_0["kind"].(string); ok && ei2Kind == "ConstantExpr" {
|
||||
log.Printf("Got ConstantExpr OK")
|
||||
if ei2Value, ok := ei2_0["value"].(string); ok {
|
||||
cee.EntryValue = ei2Value
|
||||
goto afterParse
|
||||
}
|
||||
// Best case: .inner -> kind=ImplicitCastExpr .inner -> kind=ConstantExpr value=xx
|
||||
// e.g. QCalendar (when there is a int typecast)
|
||||
if ei1Kind == "ImplicitCastExpr" {
|
||||
log.Printf("Got ImplicitCastExpr OK")
|
||||
if ei2, ok := ei1_0["inner"].([]interface{}); ok && len(ei2) > 0 {
|
||||
ei2_0 := ei2[0].(map[string]interface{})
|
||||
if ei2Kind, ok := ei2_0["kind"].(string); ok && ei2Kind == "ConstantExpr" {
|
||||
log.Printf("Got ConstantExpr OK")
|
||||
if ei2Value, ok := ei2_0["value"].(string); ok {
|
||||
cee.EntryValue = ei2Value
|
||||
goto afterParse
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ei1Kind, ok := ei1_0["kind"].(string); ok && ei1Kind == "DeprecatedAttr" {
|
||||
log.Printf("Enum entry %q is deprecated, skipping", ret.EnumName+"::"+entryname)
|
||||
continue nextEnumEntry
|
||||
}
|
||||
|
||||
}
|
||||
// If we made it here, we did not hit any of the `goto afterParse` cases
|
||||
|
||||
if ei1Kind == "DeprecatedAttr" {
|
||||
log.Printf("Enum entry %q is deprecated, skipping", ret.EnumName+"::"+entryname)
|
||||
continue nextEnumEntry
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// If we made it here, we did not hit any of the `goto afterParse` cases
|
||||
if !foundValidInner {
|
||||
// Enum case without definition e.g. QCalendar::Gregorian
|
||||
// This means one more than the last value
|
||||
cee.EntryValue = fmt.Sprintf("%d", lastImplicitValue+1)
|
||||
}
|
||||
|
||||
afterParse:
|
||||
if cee.EntryValue == "" {
|
||||
return ret, fmt.Errorf("Complex enum %q entry %q", ret.EnumName, entryname)
|
||||
|
@ -39,27 +39,22 @@ func clangExec(ctx context.Context, clangBin, inputHeader string, cflags []strin
|
||||
|
||||
var wg sync.WaitGroup
|
||||
var inner []interface{}
|
||||
var innerErr error
|
||||
|
||||
wg.Add(1)
|
||||
go func() {
|
||||
defer wg.Done()
|
||||
|
||||
inner__, err := clangStripUpToFile(pr, inputHeader)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
inner = inner__
|
||||
inner, innerErr = clangStripUpToFile(pr, inputHeader)
|
||||
}()
|
||||
|
||||
err = cmd.Wait()
|
||||
if err != nil {
|
||||
panic(err)
|
||||
return nil, fmt.Errorf("Command: %w", err)
|
||||
}
|
||||
|
||||
wg.Wait()
|
||||
|
||||
return inner, nil
|
||||
return inner, innerErr
|
||||
}
|
||||
|
||||
func mustClangExec(ctx context.Context, clangBin, inputHeader string, cflags []string) []interface{} {
|
||||
@ -71,6 +66,7 @@ func mustClangExec(ctx context.Context, clangBin, inputHeader string, cflags []s
|
||||
log.Printf("WARNING: Clang execution failed: %v", err)
|
||||
time.Sleep(ClangRetryDelay)
|
||||
log.Printf("Retrying...")
|
||||
continue
|
||||
}
|
||||
|
||||
// Success
|
||||
|
@ -70,13 +70,13 @@ func (p CppParameter) RenderTypeCabi() string {
|
||||
|
||||
if ft, ok := p.QFlagsOf(); ok {
|
||||
if e, ok := KnownEnums[ft.ParameterType]; ok {
|
||||
ret = e.UnderlyingType.RenderTypeCabi()
|
||||
ret = e.Enum.UnderlyingType.RenderTypeCabi()
|
||||
} else {
|
||||
ret = "int"
|
||||
}
|
||||
|
||||
} else if e, ok := KnownEnums[p.ParameterType]; ok {
|
||||
ret = e.UnderlyingType.RenderTypeCabi()
|
||||
ret = e.Enum.UnderlyingType.RenderTypeCabi()
|
||||
|
||||
}
|
||||
|
||||
@ -204,7 +204,7 @@ func emitCABI2CppForwarding(p CppParameter, indent string) (preamble string, for
|
||||
|
||||
} else if listType, ok := p.QListOf(); ok {
|
||||
|
||||
preamble += indent + p.ParameterType + " " + nameprefix + "_QList;\n"
|
||||
preamble += indent + p.GetQtCppType().ParameterType + " " + nameprefix + "_QList;\n"
|
||||
preamble += indent + nameprefix + "_QList.reserve(" + p.ParameterName + "->len);\n"
|
||||
|
||||
preamble += indent + listType.RenderTypeCabi() + "* " + nameprefix + "_arr = static_cast<" + listType.RenderTypeCabi() + "*>(" + p.ParameterName + "->data);\n"
|
||||
@ -343,7 +343,7 @@ func emitAssignCppToCabi(assignExpression string, p CppParameter, rvalue string)
|
||||
|
||||
shouldReturn = p.RenderTypeQtCpp() + " " + namePrefix + "_ret = "
|
||||
|
||||
afterCall += indent + "// Convert QList<> from C++ memory to manually-managed C memory\n"
|
||||
afterCall += indent + "// Convert QSet<> from C++ memory to manually-managed C memory\n"
|
||||
afterCall += indent + "" + t.RenderTypeCabi() + "* " + namePrefix + "_arr = static_cast<" + t.RenderTypeCabi() + "*>(malloc(sizeof(" + t.RenderTypeCabi() + ") * " + namePrefix + "_ret.size()));\n"
|
||||
afterCall += indent + "int " + namePrefix + "_ctr = 0;\n"
|
||||
afterCall += indent + "QSetIterator<" + t.RenderTypeQtCpp() + "> " + namePrefix + "_itr(" + namePrefix + "_ret);\n"
|
||||
@ -448,7 +448,7 @@ func getReferencedTypes(src *CppParsedHeader) []string {
|
||||
// Convert to sorted list
|
||||
foundTypesList := make([]string, 0, len(foundTypes))
|
||||
for ft := range foundTypes {
|
||||
if strings.HasPrefix(ft, "QList<") || strings.HasPrefix(ft, "QVector<") {
|
||||
if strings.HasPrefix(ft, "QList<") || strings.HasPrefix(ft, "QVector<") { // TODO properly exclude via the QListOf() check above
|
||||
continue
|
||||
}
|
||||
if strings.HasSuffix(ft, "Private") { // qbrush.h finds QGradientPrivate
|
||||
@ -475,11 +475,16 @@ func cabiClassName(className string) string {
|
||||
return strings.Replace(className, `::`, `__`, -1)
|
||||
}
|
||||
|
||||
func emitBindingHeader(src *CppParsedHeader, filename string) (string, error) {
|
||||
func emitBindingHeader(src *CppParsedHeader, filename string, packageName string) (string, error) {
|
||||
ret := strings.Builder{}
|
||||
|
||||
includeGuard := "GEN_" + strings.ToUpper(strings.Replace(filename, `.`, `_`, -1))
|
||||
|
||||
bindingInclude := "../libmiqt/libmiqt.h"
|
||||
if packageName != "qt" {
|
||||
bindingInclude = "../" + bindingInclude
|
||||
}
|
||||
|
||||
ret.WriteString(`#ifndef ` + includeGuard + `
|
||||
#define ` + includeGuard + `
|
||||
|
||||
@ -489,7 +494,7 @@ func emitBindingHeader(src *CppParsedHeader, filename string) (string, error) {
|
||||
|
||||
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||
|
||||
#include "binding.h"
|
||||
#include "` + bindingInclude + `"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@ -591,7 +596,7 @@ func emitBindingCpp(src *CppParsedHeader, filename string) (string, error) {
|
||||
ret.WriteString(`#include <` + ref + ">\n")
|
||||
}
|
||||
|
||||
ret.WriteString(`#include "` + filename + "\"\n")
|
||||
ret.WriteString(`#include <` + filename + ">\n")
|
||||
ret.WriteString(`#include "gen_` + filename + "\"\n")
|
||||
ret.WriteString("#include \"_cgo_export.h\"\n\n")
|
||||
|
||||
|
@ -19,7 +19,7 @@ func goReservedWord(s string) bool {
|
||||
}
|
||||
}
|
||||
|
||||
func (p CppParameter) RenderTypeGo() string {
|
||||
func (p CppParameter) RenderTypeGo(gfs *goFileState) string {
|
||||
if p.Pointer && p.ParameterType == "char" {
|
||||
return "string"
|
||||
}
|
||||
@ -28,11 +28,11 @@ func (p CppParameter) RenderTypeGo() string {
|
||||
}
|
||||
|
||||
if t, ok := p.QListOf(); ok {
|
||||
return "[]" + t.RenderTypeGo()
|
||||
return "[]" + t.RenderTypeGo(gfs)
|
||||
}
|
||||
|
||||
if t, ok := p.QSetOf(); ok {
|
||||
return "map[" + t.RenderTypeGo() + "]struct{}"
|
||||
return "map[" + t.RenderTypeGo(gfs) + "]struct{}"
|
||||
}
|
||||
|
||||
if p.ParameterType == "void" && p.Pointer {
|
||||
@ -40,10 +40,6 @@ func (p CppParameter) RenderTypeGo() string {
|
||||
}
|
||||
|
||||
ret := ""
|
||||
if p.ByRef || p.Pointer {
|
||||
ret += "*"
|
||||
}
|
||||
|
||||
switch p.ParameterType {
|
||||
case "unsigned char", "uchar", "quint8":
|
||||
// Go byte is unsigned
|
||||
@ -101,10 +97,25 @@ func (p CppParameter) RenderTypeGo() string {
|
||||
default:
|
||||
|
||||
if ft, ok := p.QFlagsOf(); ok {
|
||||
ret += cabiClassName(ft.ParameterType)
|
||||
|
||||
} else if p.IsKnownEnum() {
|
||||
ret += cabiClassName(p.ParameterType)
|
||||
if enumInfo, ok := KnownEnums[ft.ParameterType]; ok && enumInfo.PackageName != gfs.currentPackageName {
|
||||
// Cross-package
|
||||
ret += enumInfo.PackageName + "." + cabiClassName(ft.ParameterType)
|
||||
gfs.imports[importPathForQtPackage(enumInfo.PackageName)] = struct{}{}
|
||||
} else {
|
||||
// Same package
|
||||
ret += cabiClassName(ft.ParameterType)
|
||||
}
|
||||
|
||||
} else if enumInfo, ok := KnownEnums[p.ParameterType]; ok {
|
||||
if enumInfo.PackageName != gfs.currentPackageName {
|
||||
// Cross-package
|
||||
ret += enumInfo.PackageName + "." + cabiClassName(p.ParameterType)
|
||||
gfs.imports[importPathForQtPackage(enumInfo.PackageName)] = struct{}{}
|
||||
} else {
|
||||
// Same package
|
||||
ret += cabiClassName(p.ParameterType)
|
||||
}
|
||||
|
||||
} else if strings.Contains(p.ParameterType, `::`) {
|
||||
// Inner class
|
||||
@ -117,6 +128,15 @@ func (p CppParameter) RenderTypeGo() string {
|
||||
|
||||
}
|
||||
|
||||
if pkg, ok := KnownClassnames[p.ParameterType]; ok && pkg.PackageName != gfs.currentPackageName {
|
||||
ret = pkg.PackageName + "." + ret
|
||||
gfs.imports[importPathForQtPackage(pkg.PackageName)] = struct{}{}
|
||||
}
|
||||
|
||||
if p.ByRef || p.Pointer {
|
||||
ret = "*" + ret
|
||||
}
|
||||
|
||||
return ret // ignore const
|
||||
}
|
||||
|
||||
@ -134,7 +154,8 @@ func (p CppParameter) parameterTypeCgo() string {
|
||||
}
|
||||
|
||||
tmp := strings.Replace(p.RenderTypeCabi(), `*`, "", -1)
|
||||
if strings.HasPrefix(tmp, "const ") {
|
||||
|
||||
if strings.HasPrefix(tmp, "const ") && tmp != "const char" { // Special typedef to make this work for const char* signal parameters
|
||||
tmp = tmp[6:] // Constness doesn't survive the CABI boundary
|
||||
}
|
||||
if strings.HasPrefix(tmp, "unsigned ") {
|
||||
@ -153,7 +174,7 @@ func (p CppParameter) parameterTypeCgo() string {
|
||||
}
|
||||
}
|
||||
|
||||
func emitParametersGo(params []CppParameter) string {
|
||||
func (gfs *goFileState) emitParametersGo(params []CppParameter) string {
|
||||
tmp := make([]string, 0, len(params))
|
||||
|
||||
skipNext := false
|
||||
@ -170,7 +191,7 @@ func emitParametersGo(params []CppParameter) string {
|
||||
|
||||
} else {
|
||||
// Ordinary parameter
|
||||
tmp = append(tmp, p.ParameterName+" "+p.RenderTypeGo())
|
||||
tmp = append(tmp, p.ParameterName+" "+p.RenderTypeGo(gfs))
|
||||
|
||||
}
|
||||
}
|
||||
@ -178,7 +199,8 @@ func emitParametersGo(params []CppParameter) string {
|
||||
}
|
||||
|
||||
type goFileState struct {
|
||||
imports map[string]struct{}
|
||||
imports map[string]struct{}
|
||||
currentPackageName string
|
||||
}
|
||||
|
||||
func (gfs *goFileState) emitParametersGo2CABIForwarding(m CppMethod) (preamble string, forwarding string) {
|
||||
@ -234,7 +256,8 @@ func (gfs *goFileState) emitParameterGo2CABIForwarding(p CppParameter) (preamble
|
||||
// Go: convert string -> miqt_string*
|
||||
// CABI: convert miqt_string* -> real QString
|
||||
|
||||
preamble += nameprefix + "_ms := miqt_strdupg(" + p.ParameterName + ")\n"
|
||||
gfs.imports["libmiqt"] = struct{}{}
|
||||
preamble += nameprefix + "_ms := libmiqt.Strdupg(" + p.ParameterName + ")\n"
|
||||
preamble += "defer C.free(" + nameprefix + "_ms)\n"
|
||||
|
||||
rvalue = "(*C.struct_miqt_string)(" + nameprefix + "_ms)"
|
||||
@ -277,7 +300,16 @@ func (gfs *goFileState) emitParameterGo2CABIForwarding(p CppParameter) (preamble
|
||||
} else if /*(p.Pointer || p.ByRef) &&*/ p.QtClassType() {
|
||||
// The C++ type is a pointer to Qt class
|
||||
// We want our functions to accept the Go wrapper type, and forward as cPointer()
|
||||
rvalue = p.ParameterName + ".cPointer()"
|
||||
// cPointer() returns the cgo pointer which only works in the same package -
|
||||
// anything cross-package needs to go via unsafe.Pointer
|
||||
|
||||
if classInfo, ok := KnownClassnames[p.ParameterType]; ok && gfs.currentPackageName != classInfo.PackageName {
|
||||
// Cross-package
|
||||
rvalue = "(" + p.parameterTypeCgo() + ")(" + p.ParameterName + ".UnsafePointer())"
|
||||
} else {
|
||||
// Same package
|
||||
rvalue = p.ParameterName + ".cPointer()"
|
||||
}
|
||||
|
||||
} else if p.IntType() || p.IsFlagType() || p.IsKnownEnum() || p.ParameterType == "bool" {
|
||||
if p.Pointer || p.ByRef {
|
||||
@ -329,7 +361,7 @@ func (gfs *goFileState) emitCabiToGo(assignExpr string, rt CppParameter, rvalue
|
||||
|
||||
shouldReturn = "var " + namePrefix + "_ma *C.struct_miqt_array = "
|
||||
|
||||
afterword += namePrefix + "_ret := make([]" + t.RenderTypeGo() + ", int(" + namePrefix + "_ma.len))\n"
|
||||
afterword += namePrefix + "_ret := make([]" + t.RenderTypeGo(gfs) + ", int(" + namePrefix + "_ma.len))\n"
|
||||
afterword += namePrefix + "_outCast := (*[0xffff]" + t.parameterTypeCgo() + ")(unsafe.Pointer(" + namePrefix + "_ma.data)) // hey ya\n"
|
||||
afterword += "for i := 0; i < int(" + namePrefix + "_ma.len); i++ {\n"
|
||||
|
||||
@ -345,7 +377,7 @@ func (gfs *goFileState) emitCabiToGo(assignExpr string, rt CppParameter, rvalue
|
||||
|
||||
shouldReturn = "var " + namePrefix + "_ma *C.struct_miqt_array = "
|
||||
|
||||
afterword += namePrefix + "_ret := make(map[" + t.RenderTypeGo() + "]struct{}, int(" + namePrefix + "_ma.len))\n"
|
||||
afterword += namePrefix + "_ret := make(map[" + t.RenderTypeGo(gfs) + "]struct{}, int(" + namePrefix + "_ma.len))\n"
|
||||
afterword += namePrefix + "_outCast := (*[0xffff]" + t.parameterTypeCgo() + ")(unsafe.Pointer(" + namePrefix + "_ma.data)) // hey ya\n"
|
||||
afterword += "for i := 0; i < int(" + namePrefix + "_ma.len); i++ {\n"
|
||||
|
||||
@ -360,9 +392,15 @@ func (gfs *goFileState) emitCabiToGo(assignExpr string, rt CppParameter, rvalue
|
||||
// Construct our Go type based on this inner CABI type
|
||||
shouldReturn = "" + namePrefix + "_ret := "
|
||||
|
||||
crossPackage := ""
|
||||
if pkg, ok := KnownClassnames[rt.ParameterType]; ok && pkg.PackageName != gfs.currentPackageName {
|
||||
crossPackage = pkg.PackageName + "."
|
||||
gfs.imports[importPathForQtPackage(pkg.PackageName)] = struct{}{}
|
||||
}
|
||||
|
||||
if rt.Pointer || rt.ByRef {
|
||||
gfs.imports["unsafe"] = struct{}{}
|
||||
return assignExpr + " new" + cabiClassName(rt.ParameterType) + "_U(unsafe.Pointer(" + rvalue + "))"
|
||||
return assignExpr + " " + crossPackage + "UnsafeNew" + cabiClassName(rt.ParameterType) + "(unsafe.Pointer(" + rvalue + "))"
|
||||
|
||||
} else {
|
||||
// This is return by value, but CABI has new'd it into a
|
||||
@ -371,7 +409,13 @@ func (gfs *goFileState) emitCabiToGo(assignExpr string, rt CppParameter, rvalue
|
||||
// finalizer to automatically Delete once the type goes out
|
||||
// of Go scope
|
||||
|
||||
afterword += namePrefix + "_goptr := new" + cabiClassName(rt.ParameterType) + "(" + namePrefix + "_ret)\n"
|
||||
if crossPackage == "" {
|
||||
afterword += namePrefix + "_goptr := new" + cabiClassName(rt.ParameterType) + "(" + namePrefix + "_ret)\n"
|
||||
} else {
|
||||
gfs.imports["unsafe"] = struct{}{}
|
||||
afterword += namePrefix + "_goptr := " + crossPackage + "UnsafeNew" + cabiClassName(rt.ParameterType) + "(unsafe.Pointer(" + namePrefix + "_ret))\n"
|
||||
|
||||
}
|
||||
afterword += namePrefix + "_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer\n"
|
||||
|
||||
// If this is a function return, we have converted value-returned Qt types to pointers
|
||||
@ -387,17 +431,17 @@ func (gfs *goFileState) emitCabiToGo(assignExpr string, rt CppParameter, rvalue
|
||||
} else if rt.IntType() || rt.IsKnownEnum() || rt.IsFlagType() || rt.ParameterType == "bool" || rt.QtCppOriginalType != nil {
|
||||
// Need to cast Cgo type to Go int type
|
||||
// Optimize assignment to avoid temporary
|
||||
return assignExpr + "(" + rt.RenderTypeGo() + ")(" + rvalue + ")\n"
|
||||
return assignExpr + "(" + rt.RenderTypeGo(gfs) + ")(" + rvalue + ")\n"
|
||||
|
||||
}
|
||||
|
||||
return shouldReturn + " " + rvalue + "\n" + afterword
|
||||
}
|
||||
|
||||
func emitGo(src *CppParsedHeader, headerName string) (string, error) {
|
||||
func emitGo(src *CppParsedHeader, headerName string, packageName string) (string, error) {
|
||||
|
||||
ret := strings.Builder{}
|
||||
ret.WriteString(`package qt
|
||||
ret.WriteString(`package ` + packageName + `
|
||||
|
||||
/*
|
||||
|
||||
@ -411,7 +455,8 @@ import "C"
|
||||
`)
|
||||
|
||||
gfs := goFileState{
|
||||
imports: map[string]struct{}{},
|
||||
imports: map[string]struct{}{},
|
||||
currentPackageName: packageName,
|
||||
}
|
||||
|
||||
// Check if short-named enums are allowed.
|
||||
@ -455,7 +500,7 @@ import "C"
|
||||
}
|
||||
|
||||
ret.WriteString(`
|
||||
type ` + goEnumName + ` ` + e.UnderlyingType.RenderTypeGo() + `
|
||||
type ` + goEnumName + ` ` + e.UnderlyingType.RenderTypeGo(&gfs) + `
|
||||
`)
|
||||
|
||||
if len(e.Entries) > 0 {
|
||||
@ -481,7 +526,16 @@ import "C"
|
||||
|
||||
// Embed all inherited types to directly allow calling inherited methods
|
||||
for _, base := range c.Inherits {
|
||||
ret.WriteString("*" + cabiClassName(base) + "\n")
|
||||
|
||||
if pkg, ok := KnownClassnames[base]; ok && pkg.PackageName != gfs.currentPackageName {
|
||||
// Cross-package parent class
|
||||
ret.WriteString("*" + pkg.PackageName + "." + cabiClassName(base) + "\n")
|
||||
gfs.imports[importPathForQtPackage(pkg.PackageName)] = struct{}{}
|
||||
} else {
|
||||
// Same-package parent class
|
||||
ret.WriteString("*" + cabiClassName(base) + "\n")
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
ret.WriteString(`
|
||||
@ -494,12 +548,26 @@ import "C"
|
||||
return this.h
|
||||
}
|
||||
|
||||
func (this *` + goClassName + `) UnsafePointer() unsafe.Pointer {
|
||||
if this == nil {
|
||||
return nil
|
||||
}
|
||||
return unsafe.Pointer(this.h)
|
||||
}
|
||||
|
||||
`)
|
||||
gfs.imports["unsafe"] = struct{}{}
|
||||
|
||||
localInit := "h: h"
|
||||
for _, base := range c.Inherits {
|
||||
gfs.imports["unsafe"] = struct{}{}
|
||||
localInit += ", " + cabiClassName(base) + ": new" + cabiClassName(base) + "_U(unsafe.Pointer(h))"
|
||||
|
||||
ctorPrefix := ""
|
||||
if pkg, ok := KnownClassnames[base]; ok && pkg.PackageName != gfs.currentPackageName {
|
||||
ctorPrefix = pkg.PackageName + "."
|
||||
}
|
||||
|
||||
localInit += ", " + cabiClassName(base) + ": " + ctorPrefix + "UnsafeNew" + cabiClassName(base) + "(unsafe.Pointer(h))"
|
||||
}
|
||||
|
||||
ret.WriteString(`
|
||||
@ -518,7 +586,7 @@ import "C"
|
||||
// that never happens in Go's type system.
|
||||
gfs.imports["unsafe"] = struct{}{}
|
||||
ret.WriteString(`
|
||||
func new` + goClassName + `_U(h unsafe.Pointer) *` + goClassName + ` {
|
||||
func UnsafeNew` + goClassName + `(h unsafe.Pointer) *` + goClassName + ` {
|
||||
return new` + goClassName + `( (*C.` + goClassName + `)(h) )
|
||||
}
|
||||
|
||||
@ -531,7 +599,7 @@ import "C"
|
||||
gfs.imports["runtime"] = struct{}{}
|
||||
ret.WriteString(`
|
||||
// New` + goClassName + maybeSuffix(i) + ` constructs a new ` + c.ClassName + ` object.
|
||||
func New` + goClassName + maybeSuffix(i) + `(` + emitParametersGo(ctor.Parameters) + `) *` + goClassName + ` {
|
||||
func New` + goClassName + maybeSuffix(i) + `(` + gfs.emitParametersGo(ctor.Parameters) + `) *` + goClassName + ` {
|
||||
if runtime.GOOS == "linux" {
|
||||
` + preamble + ` ret := C.` + goClassName + `_new` + maybeSuffix(i) + `(` + forwarding + `)
|
||||
return new` + goClassName + `(ret)
|
||||
@ -544,7 +612,7 @@ import "C"
|
||||
} else {
|
||||
ret.WriteString(`
|
||||
// New` + goClassName + maybeSuffix(i) + ` constructs a new ` + c.ClassName + ` object.
|
||||
func New` + goClassName + maybeSuffix(i) + `(` + emitParametersGo(ctor.Parameters) + `) *` + goClassName + ` {
|
||||
func New` + goClassName + maybeSuffix(i) + `(` + gfs.emitParametersGo(ctor.Parameters) + `) *` + goClassName + ` {
|
||||
` + preamble + ` ret := C.` + goClassName + `_new` + maybeSuffix(i) + `(` + forwarding + `)
|
||||
return new` + goClassName + `(ret)
|
||||
}
|
||||
@ -556,7 +624,7 @@ import "C"
|
||||
for _, m := range c.Methods {
|
||||
preamble, forwarding := gfs.emitParametersGo2CABIForwarding(m)
|
||||
|
||||
returnTypeDecl := m.ReturnType.RenderTypeGo()
|
||||
returnTypeDecl := m.ReturnType.RenderTypeGo(&gfs)
|
||||
if returnTypeDecl == "void" {
|
||||
returnTypeDecl = ""
|
||||
}
|
||||
@ -578,7 +646,7 @@ import "C"
|
||||
}
|
||||
|
||||
ret.WriteString(`
|
||||
func ` + receiverAndMethod + `(` + emitParametersGo(m.Parameters) + `) ` + returnTypeDecl + ` {`)
|
||||
func ` + receiverAndMethod + `(` + gfs.emitParametersGo(m.Parameters) + `) ` + returnTypeDecl + ` {`)
|
||||
if m.LinuxOnly {
|
||||
gfs.imports["runtime"] = struct{}{}
|
||||
ret.WriteString(`
|
||||
@ -611,13 +679,13 @@ import "C"
|
||||
conversion += gfs.emitCabiToGo(fmt.Sprintf("slotval%d := ", i+1), pp, pp.ParameterName) + "\n"
|
||||
}
|
||||
|
||||
ret.WriteString(`func (this *` + goClassName + `) On` + m.SafeMethodName() + `(slot func(` + emitParametersGo(m.Parameters) + `)) {
|
||||
ret.WriteString(`func (this *` + goClassName + `) On` + m.SafeMethodName() + `(slot func(` + gfs.emitParametersGo(m.Parameters) + `)) {
|
||||
C.` + goClassName + `_connect_` + m.SafeMethodName() + `(this.h, C.intptr_t(cgo.NewHandle(slot)) )
|
||||
}
|
||||
|
||||
//export miqt_exec_callback_` + goClassName + `_` + m.SafeMethodName() + `
|
||||
func miqt_exec_callback_` + goClassName + `_` + m.SafeMethodName() + `(cb C.intptr_t` + ifv(len(m.Parameters) > 0, ", ", "") + strings.Join(cgoNamedParams, `, `) + `) {
|
||||
gofunc, ok := cgo.Handle(cb).Value().(func(` + emitParametersGo(m.Parameters) + `))
|
||||
gofunc, ok := cgo.Handle(cb).Value().(func(` + gfs.emitParametersGo(m.Parameters) + `))
|
||||
if !ok {
|
||||
panic("miqt: callback of non-callback type (heap corruption?)")
|
||||
}
|
||||
@ -660,14 +728,17 @@ import "C"
|
||||
if len(gfs.imports) > 0 {
|
||||
allImports := make([]string, 0, len(gfs.imports))
|
||||
for k, _ := range gfs.imports {
|
||||
allImports = append(allImports, `"`+k+`"`)
|
||||
if k == "libmiqt" {
|
||||
allImports = append(allImports, `"`+BaseModule+`/libmiqt"`)
|
||||
} else {
|
||||
allImports = append(allImports, `"`+k+`"`)
|
||||
}
|
||||
}
|
||||
|
||||
sort.Strings(allImports)
|
||||
goSrc = strings.Replace(goSrc, `%%_IMPORTLIBS_%%`, "import (\n\t"+strings.Join(allImports, "\n\t")+"\n)", 1)
|
||||
|
||||
} else {
|
||||
goSrc = strings.Replace(goSrc, `%%_IMPORTLIBS_%%`, "", 1)
|
||||
|
||||
}
|
||||
|
||||
// Run gofmt over the result
|
||||
|
@ -10,20 +10,20 @@ func InsertTypedefs() {
|
||||
// Seed well-known typedefs
|
||||
|
||||
// QString is deleted from this binding
|
||||
KnownTypedefs["QStringList"] = CppTypedef{"QStringList", parseSingleTypeString("QList<QString>")}
|
||||
KnownTypedefs["QStringList"] = lookupResultTypedef{"qt", CppTypedef{"QStringList", parseSingleTypeString("QList<QString>")}}
|
||||
|
||||
// FIXME this isn't picked up automatically because QFile inherits QFileDevice and the name refers to its parent class
|
||||
KnownTypedefs["QFile::FileTime"] = CppTypedef{"QFile::FileTime", parseSingleTypeString("QFileDevice::FileTime")}
|
||||
KnownTypedefs["QFile::FileTime"] = lookupResultTypedef{"qt", CppTypedef{"QFile::FileTime", parseSingleTypeString("QFileDevice::FileTime")}}
|
||||
|
||||
// n.b. Qt 5 only
|
||||
KnownTypedefs["QLineF::IntersectionType"] = CppTypedef{"QLineF::IntersectionType", parseSingleTypeString("QLineF::IntersectType")}
|
||||
KnownTypedefs["QLineF::IntersectionType"] = lookupResultTypedef{"qt", CppTypedef{"QLineF::IntersectionType", parseSingleTypeString("QLineF::IntersectType")}}
|
||||
|
||||
// Not sure the reason for this one
|
||||
KnownTypedefs["QSocketDescriptor::DescriptorType"] = CppTypedef{"QSocketDescriptor::DescriptorType", parseSingleTypeString("QSocketNotifier::Type")}
|
||||
KnownTypedefs["QSocketDescriptor::DescriptorType"] = lookupResultTypedef{"qt", CppTypedef{"QSocketDescriptor::DescriptorType", parseSingleTypeString("QSocketNotifier::Type")}}
|
||||
|
||||
// QFile doesn't see QFileDevice parent class enum
|
||||
KnownTypedefs["QFile::Permissions"] = CppTypedef{"QFile::Permissions", parseSingleTypeString("QFileDevice::Permissions")}
|
||||
KnownTypedefs["QFileDevice::Permissions"] = CppTypedef{"QFile::Permissions", parseSingleTypeString("QFlags<QFileDevice::Permission>")}
|
||||
KnownTypedefs["QFile::Permissions"] = lookupResultTypedef{"qt", CppTypedef{"QFile::Permissions", parseSingleTypeString("QFileDevice::Permissions")}}
|
||||
KnownTypedefs["QFileDevice::Permissions"] = lookupResultTypedef{"qt", CppTypedef{"QFile::Permissions", parseSingleTypeString("QFlags<QFileDevice::Permission>")}}
|
||||
}
|
||||
|
||||
func AllowHeader(fullpath string) bool {
|
||||
|
@ -5,16 +5,30 @@ import (
|
||||
"strings"
|
||||
)
|
||||
|
||||
type lookupResultClass struct {
|
||||
PackageName string
|
||||
}
|
||||
|
||||
type lookupResultTypedef struct {
|
||||
PackageName string
|
||||
Typedef CppTypedef
|
||||
}
|
||||
|
||||
type lookupResultEnum struct {
|
||||
PackageName string
|
||||
Enum CppEnum
|
||||
}
|
||||
|
||||
var (
|
||||
KnownClassnames map[string]struct{} // Entries of the form QFoo::Bar if it is an inner class
|
||||
KnownTypedefs map[string]CppTypedef
|
||||
KnownEnums map[string]CppEnum
|
||||
KnownClassnames map[string]lookupResultClass // Entries of the form QFoo::Bar if it is an inner class
|
||||
KnownTypedefs map[string]lookupResultTypedef
|
||||
KnownEnums map[string]lookupResultEnum
|
||||
)
|
||||
|
||||
func init() {
|
||||
KnownClassnames = make(map[string]struct{})
|
||||
KnownTypedefs = make(map[string]CppTypedef)
|
||||
KnownEnums = make(map[string]CppEnum)
|
||||
KnownClassnames = make(map[string]lookupResultClass)
|
||||
KnownTypedefs = make(map[string]lookupResultTypedef)
|
||||
KnownEnums = make(map[string]lookupResultEnum)
|
||||
}
|
||||
|
||||
type CppParameter struct {
|
||||
|
@ -15,78 +15,119 @@ import (
|
||||
|
||||
const (
|
||||
ClangSubprocessCount = 3
|
||||
BaseModule = "github.com/mappu/miqt"
|
||||
)
|
||||
|
||||
func importPathForQtPackage(packageName string) string {
|
||||
switch packageName {
|
||||
case "qt":
|
||||
return BaseModule + "/qt"
|
||||
default:
|
||||
return BaseModule + "/qt/" + packageName
|
||||
}
|
||||
}
|
||||
|
||||
func cacheFilePath(inputHeader string) string {
|
||||
return filepath.Join("cachedir", strings.Replace(inputHeader, `/`, `__`, -1)+".json")
|
||||
}
|
||||
|
||||
func main() {
|
||||
ctx := context.Background()
|
||||
func findHeadersInDir(srcDir string) []string {
|
||||
content, err := os.ReadDir(srcDir)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
var ret []string
|
||||
|
||||
for _, includeFile := range content {
|
||||
if includeFile.IsDir() {
|
||||
continue
|
||||
}
|
||||
if !strings.HasSuffix(includeFile.Name(), `.h`) {
|
||||
continue
|
||||
}
|
||||
fullPath := filepath.Join(srcDir, includeFile.Name())
|
||||
if !AllowHeader(fullPath) {
|
||||
continue
|
||||
}
|
||||
ret = append(ret, fullPath)
|
||||
}
|
||||
|
||||
return ret
|
||||
}
|
||||
|
||||
func cleanGeneratedFilesInDir(dirpath string) {
|
||||
log.Printf("Cleaning up output directory %q...", dirpath)
|
||||
|
||||
_ = os.MkdirAll(dirpath, 0755)
|
||||
|
||||
existing, err := os.ReadDir(dirpath)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
cleaned := 0
|
||||
for _, e := range existing {
|
||||
if e.IsDir() {
|
||||
continue
|
||||
}
|
||||
if !strings.HasPrefix(e.Name(), `gen_`) {
|
||||
continue
|
||||
}
|
||||
// One of ours, clean up
|
||||
err := os.Remove(filepath.Join(dirpath, e.Name()))
|
||||
if err != nil {
|
||||
log.Printf("WARNING: Failed to remove existing file %q", e.Name())
|
||||
continue
|
||||
}
|
||||
|
||||
cleaned++
|
||||
}
|
||||
|
||||
log.Printf("Removed %d file(s).", cleaned)
|
||||
}
|
||||
|
||||
func main() {
|
||||
clang := flag.String("clang", "clang", "Custom path to clang")
|
||||
cflags := flag.String("cflags", `-DQT_WIDGETS_LIB -I/usr/include/x86_64-linux-gnu/qt5/QtWidgets -I/usr/include/x86_64-linux-gnu/qt5 -I/usr/include/x86_64-linux-gnu/qt5/QtCore -DQT_GUI_LIB -I/usr/include/x86_64-linux-gnu/qt5/QtGui -DQT_CORE_LIB`, "Cflags to pass to clang (e.g. `pkg-config --cflags Qt5Widgets`)")
|
||||
outDir := flag.String("outdir", "../../qt", "Output directory for generated gen_** files")
|
||||
outDir := flag.String("outdir", "../../", "Output directory for generated gen_** files")
|
||||
|
||||
flag.Parse()
|
||||
|
||||
generate(
|
||||
"qt",
|
||||
[]string{
|
||||
"/usr/include/x86_64-linux-gnu/qt5/QtCore",
|
||||
"/usr/include/x86_64-linux-gnu/qt5/QtGui",
|
||||
"/usr/include/x86_64-linux-gnu/qt5/QtWidgets",
|
||||
},
|
||||
*clang,
|
||||
// pkg-config --cflags Qt5Widgets
|
||||
strings.Fields(`-DQT_WIDGETS_LIB -I/usr/include/x86_64-linux-gnu/qt5/QtWidgets -I/usr/include/x86_64-linux-gnu/qt5 -I/usr/include/x86_64-linux-gnu/qt5/QtCore -DQT_GUI_LIB -I/usr/include/x86_64-linux-gnu/qt5/QtGui -DQT_CORE_LIB`),
|
||||
filepath.Join(*outDir, "qt"),
|
||||
)
|
||||
|
||||
generate(
|
||||
"qprintsupport",
|
||||
[]string{
|
||||
"/usr/include/x86_64-linux-gnu/qt5/QtPrintSupport",
|
||||
},
|
||||
*clang,
|
||||
// pkg-config --cflags Qt5PrintSupport
|
||||
strings.Fields(`-DQT_PRINTSUPPORT_LIB -I/usr/include/x86_64-linux-gnu/qt5/QtPrintSupport -I/usr/include/x86_64-linux-gnu/qt5 -I/usr/include/x86_64-linux-gnu/qt5/QtCore -I/usr/include/x86_64-linux-gnu/qt5/QtGui -DQT_WIDGETS_LIB -I/usr/include/x86_64-linux-gnu/qt5/QtWidgets -DQT_GUI_LIB -DQT_CORE_LIB`),
|
||||
filepath.Join(*outDir, "qt/qprintsupport"),
|
||||
)
|
||||
}
|
||||
|
||||
func generate(packageName string, srcDirs []string, clangBin string, cflags []string, outDir string) {
|
||||
|
||||
var includeFiles []string
|
||||
|
||||
for _, srcDir := range []string{
|
||||
"/usr/include/x86_64-linux-gnu/qt5/QtCore",
|
||||
"/usr/include/x86_64-linux-gnu/qt5/QtGui",
|
||||
"/usr/include/x86_64-linux-gnu/qt5/QtWidgets",
|
||||
} {
|
||||
content, err := os.ReadDir(srcDir)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
for _, includeFile := range content {
|
||||
if includeFile.IsDir() {
|
||||
continue
|
||||
}
|
||||
if !strings.HasSuffix(includeFile.Name(), `.h`) {
|
||||
continue
|
||||
}
|
||||
fullPath := filepath.Join(srcDir, includeFile.Name())
|
||||
if !AllowHeader(fullPath) {
|
||||
continue
|
||||
}
|
||||
includeFiles = append(includeFiles, fullPath)
|
||||
}
|
||||
for _, srcDir := range srcDirs {
|
||||
includeFiles = append(includeFiles, findHeadersInDir(srcDir)...)
|
||||
}
|
||||
|
||||
log.Printf("Found %d header files to process.", len(includeFiles))
|
||||
|
||||
{
|
||||
log.Printf("Cleaning up output directory %q...", *outDir)
|
||||
|
||||
existing, err := os.ReadDir(*outDir)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
cleaned := 0
|
||||
for _, e := range existing {
|
||||
if e.IsDir() {
|
||||
continue
|
||||
}
|
||||
if !strings.HasPrefix(e.Name(), `gen_`) {
|
||||
continue
|
||||
}
|
||||
// One of ours, clean up
|
||||
err := os.Remove(filepath.Join(*outDir, e.Name()))
|
||||
if err != nil {
|
||||
log.Printf("WARNING: Failed to remove existing file %q", e.Name())
|
||||
continue
|
||||
}
|
||||
|
||||
cleaned++
|
||||
}
|
||||
|
||||
log.Printf("Removed %d file(s).", cleaned)
|
||||
}
|
||||
cleanGeneratedFilesInDir(outDir)
|
||||
|
||||
var processHeaders []*CppParsedHeader
|
||||
atr := astTransformRedundant{
|
||||
@ -99,63 +140,7 @@ func main() {
|
||||
// PASS 0 (Fill clang cache)
|
||||
//
|
||||
|
||||
var clangChan = make(chan string, 0)
|
||||
var clangWg sync.WaitGroup
|
||||
|
||||
for i := 0; i < ClangSubprocessCount; i++ {
|
||||
clangWg.Add(1)
|
||||
go func() {
|
||||
defer clangWg.Done()
|
||||
log.Printf("Clang worker: starting")
|
||||
|
||||
for {
|
||||
inputHeader, ok := <-clangChan
|
||||
if !ok {
|
||||
return // Done
|
||||
}
|
||||
|
||||
log.Printf("Clang worker got message for file %q", inputHeader)
|
||||
|
||||
// Parse the file
|
||||
// This seems to intermittently fail, so allow retrying
|
||||
astInner := mustClangExec(ctx, *clang, inputHeader, strings.Fields(*cflags))
|
||||
|
||||
// Write to cache
|
||||
jb, err := json.MarshalIndent(astInner, "", "\t")
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
err = ioutil.WriteFile(cacheFilePath(inputHeader), jb, 0644)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
astInner = nil
|
||||
jb = nil
|
||||
runtime.GC()
|
||||
|
||||
}
|
||||
log.Printf("Clang worker: exiting")
|
||||
}()
|
||||
}
|
||||
|
||||
for _, inputHeader := range includeFiles {
|
||||
|
||||
// Check if there is a matching cache hit
|
||||
cacheFile := cacheFilePath(inputHeader)
|
||||
|
||||
if _, err := os.Stat(cacheFile); err != nil && os.IsNotExist(err) {
|
||||
|
||||
// Nonexistent cache file, regenerate from clang
|
||||
log.Printf("No AST cache for file %q, running clang...", filepath.Base(inputHeader))
|
||||
clangChan <- inputHeader
|
||||
}
|
||||
}
|
||||
|
||||
// Done with all clang workers
|
||||
close(clangChan)
|
||||
clangWg.Wait()
|
||||
generateClangCaches(includeFiles, clangBin, cflags)
|
||||
|
||||
// The cache should now be fully populated.
|
||||
|
||||
@ -179,6 +164,10 @@ func main() {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
if astInner == nil {
|
||||
panic("Null in cache file for " + inputHeader)
|
||||
}
|
||||
|
||||
// Convert it to our intermediate format
|
||||
parsed, err := parseHeader(astInner, "")
|
||||
if err != nil {
|
||||
@ -194,15 +183,14 @@ func main() {
|
||||
atr.Process(parsed)
|
||||
|
||||
// Update global state tracker (AFTER astTransformChildClasses)
|
||||
// Currently, this is only used for inner classes
|
||||
for _, c := range parsed.Classes {
|
||||
KnownClassnames[c.ClassName] = struct{}{}
|
||||
KnownClassnames[c.ClassName] = lookupResultClass{packageName}
|
||||
}
|
||||
for _, td := range parsed.Typedefs {
|
||||
KnownTypedefs[td.Alias] = td // copy
|
||||
KnownTypedefs[td.Alias] = lookupResultTypedef{packageName, td /* copy */}
|
||||
}
|
||||
for _, en := range parsed.Enums {
|
||||
KnownEnums[en.EnumName] = en // copy
|
||||
KnownEnums[en.EnumName] = lookupResultEnum{packageName, en /* copy */}
|
||||
}
|
||||
|
||||
processHeaders = append(processHeaders, parsed)
|
||||
@ -240,9 +228,9 @@ func main() {
|
||||
}
|
||||
|
||||
// Emit 3 code files from the intermediate format
|
||||
outputName := filepath.Join(*outDir, "gen_"+strings.TrimSuffix(filepath.Base(parsed.Filename), `.h`))
|
||||
outputName := filepath.Join(outDir, "gen_"+strings.TrimSuffix(filepath.Base(parsed.Filename), `.h`))
|
||||
|
||||
goSrc, err := emitGo(parsed, filepath.Base(parsed.Filename))
|
||||
goSrc, err := emitGo(parsed, filepath.Base(parsed.Filename), packageName)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
@ -262,7 +250,7 @@ func main() {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
bindingHSrc, err := emitBindingHeader(parsed, filepath.Base(parsed.Filename))
|
||||
bindingHSrc, err := emitBindingHeader(parsed, filepath.Base(parsed.Filename), packageName)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
@ -278,3 +266,65 @@ func main() {
|
||||
|
||||
log.Printf("Processing %d file(s) completed", len(includeFiles))
|
||||
}
|
||||
|
||||
func generateClangCaches(includeFiles []string, clangBin string, cflags []string) {
|
||||
|
||||
var clangChan = make(chan string, 0)
|
||||
var clangWg sync.WaitGroup
|
||||
ctx := context.Background()
|
||||
|
||||
for i := 0; i < ClangSubprocessCount; i++ {
|
||||
clangWg.Add(1)
|
||||
go func() {
|
||||
defer clangWg.Done()
|
||||
log.Printf("Clang worker: starting")
|
||||
|
||||
for {
|
||||
inputHeader, ok := <-clangChan
|
||||
if !ok {
|
||||
return // Done
|
||||
}
|
||||
|
||||
log.Printf("Clang worker got message for file %q", inputHeader)
|
||||
|
||||
// Parse the file
|
||||
// This seems to intermittently fail, so allow retrying
|
||||
astInner := mustClangExec(ctx, clangBin, inputHeader, cflags)
|
||||
|
||||
// Write to cache
|
||||
jb, err := json.MarshalIndent(astInner, "", "\t")
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
err = ioutil.WriteFile(cacheFilePath(inputHeader), jb, 0644)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
astInner = nil
|
||||
jb = nil
|
||||
runtime.GC()
|
||||
|
||||
}
|
||||
log.Printf("Clang worker: exiting")
|
||||
}()
|
||||
}
|
||||
|
||||
for _, inputHeader := range includeFiles {
|
||||
|
||||
// Check if there is a matching cache hit
|
||||
cacheFile := cacheFilePath(inputHeader)
|
||||
|
||||
if _, err := os.Stat(cacheFile); err != nil && os.IsNotExist(err) {
|
||||
|
||||
// Nonexistent cache file, regenerate from clang
|
||||
log.Printf("No AST cache for file %q, running clang...", filepath.Base(inputHeader))
|
||||
clangChan <- inputHeader
|
||||
}
|
||||
}
|
||||
|
||||
// Done with all clang workers
|
||||
close(clangChan)
|
||||
clangWg.Wait()
|
||||
}
|
||||
|
@ -11,7 +11,7 @@ func applyTypedefs(p CppParameter) CppParameter {
|
||||
if !ok {
|
||||
break
|
||||
}
|
||||
p.ApplyTypedef(td.UnderlyingType)
|
||||
p.ApplyTypedef(td.Typedef.UnderlyingType)
|
||||
}
|
||||
|
||||
if t, ok := p.QListOf(); ok {
|
||||
|
@ -1,7 +1,4 @@
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "binding.h"
|
||||
#include "libmiqt.h"
|
||||
|
||||
struct miqt_string* miqt_strdup(const char* src, size_t len) {
|
||||
struct miqt_string* ret = (struct miqt_string*)( malloc(len + sizeof(size_t)) );
|
@ -1,6 +1,9 @@
|
||||
#ifndef MIQT_BINDING_H
|
||||
#define MIQT_BINDING_H
|
||||
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
@ -15,10 +18,10 @@ struct miqt_array {
|
||||
void* data; // Separate, second allocation
|
||||
};
|
||||
|
||||
// miqt_strdup allocates a miqt_string and copies C data into it.
|
||||
// The function is defined in C++.
|
||||
struct miqt_string* miqt_strdup(const char* src, size_t len);
|
||||
|
||||
typedef const char const_char;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
@ -1,10 +1,10 @@
|
||||
package qt
|
||||
package libmiqt
|
||||
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
/*
|
||||
|
||||
#include "binding.h"
|
||||
#include "libmiqt.h"
|
||||
|
||||
struct miqt_string* miqt_strdupg(_GoString_ gs) {
|
||||
return miqt_strdup(_GoStringPtr(gs), _GoStringLen(gs));
|
||||
@ -17,9 +17,9 @@ import (
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
// miqt_strdupg will strdup a Go string into a miqt_string*.
|
||||
// Strdupg will strdup a Go string into a miqt_string*.
|
||||
// It is typed as returning an unsafe.Pointer because Cgo types cannot be shared
|
||||
// across Go file boundaries.
|
||||
func miqt_strdupg(s string) unsafe.Pointer {
|
||||
func Strdupg(s string) unsafe.Pointer {
|
||||
return unsafe.Pointer(C.miqt_strdupg(s))
|
||||
}
|
@ -6,7 +6,7 @@
|
||||
#include <QString>
|
||||
#include <QByteArray>
|
||||
#include <cstring>
|
||||
#include "qabstractanimation.h"
|
||||
#include <qabstractanimation.h>
|
||||
#include "gen_qabstractanimation.h"
|
||||
#include "_cgo_export.h"
|
||||
|
||||
|
@ -48,19 +48,26 @@ func (this *QAbstractAnimation) cPointer() *C.QAbstractAnimation {
|
||||
return this.h
|
||||
}
|
||||
|
||||
func (this *QAbstractAnimation) UnsafePointer() unsafe.Pointer {
|
||||
if this == nil {
|
||||
return nil
|
||||
}
|
||||
return unsafe.Pointer(this.h)
|
||||
}
|
||||
|
||||
func newQAbstractAnimation(h *C.QAbstractAnimation) *QAbstractAnimation {
|
||||
if h == nil {
|
||||
return nil
|
||||
}
|
||||
return &QAbstractAnimation{h: h, QObject: newQObject_U(unsafe.Pointer(h))}
|
||||
return &QAbstractAnimation{h: h, QObject: UnsafeNewQObject(unsafe.Pointer(h))}
|
||||
}
|
||||
|
||||
func newQAbstractAnimation_U(h unsafe.Pointer) *QAbstractAnimation {
|
||||
func UnsafeNewQAbstractAnimation(h unsafe.Pointer) *QAbstractAnimation {
|
||||
return newQAbstractAnimation((*C.QAbstractAnimation)(h))
|
||||
}
|
||||
|
||||
func (this *QAbstractAnimation) MetaObject() *QMetaObject {
|
||||
return newQMetaObject_U(unsafe.Pointer(C.QAbstractAnimation_MetaObject(this.h)))
|
||||
return UnsafeNewQMetaObject(unsafe.Pointer(C.QAbstractAnimation_MetaObject(this.h)))
|
||||
}
|
||||
|
||||
func (this *QAbstractAnimation) Metacast(param1 string) unsafe.Pointer {
|
||||
@ -92,7 +99,7 @@ func (this *QAbstractAnimation) State() QAbstractAnimation__State {
|
||||
}
|
||||
|
||||
func (this *QAbstractAnimation) Group() *QAnimationGroup {
|
||||
return newQAnimationGroup_U(unsafe.Pointer(C.QAbstractAnimation_Group(this.h)))
|
||||
return UnsafeNewQAnimationGroup(unsafe.Pointer(C.QAbstractAnimation_Group(this.h)))
|
||||
}
|
||||
|
||||
func (this *QAbstractAnimation) Direction() QAbstractAnimation__Direction {
|
||||
@ -308,14 +315,21 @@ func (this *QAnimationDriver) cPointer() *C.QAnimationDriver {
|
||||
return this.h
|
||||
}
|
||||
|
||||
func (this *QAnimationDriver) UnsafePointer() unsafe.Pointer {
|
||||
if this == nil {
|
||||
return nil
|
||||
}
|
||||
return unsafe.Pointer(this.h)
|
||||
}
|
||||
|
||||
func newQAnimationDriver(h *C.QAnimationDriver) *QAnimationDriver {
|
||||
if h == nil {
|
||||
return nil
|
||||
}
|
||||
return &QAnimationDriver{h: h, QObject: newQObject_U(unsafe.Pointer(h))}
|
||||
return &QAnimationDriver{h: h, QObject: UnsafeNewQObject(unsafe.Pointer(h))}
|
||||
}
|
||||
|
||||
func newQAnimationDriver_U(h unsafe.Pointer) *QAnimationDriver {
|
||||
func UnsafeNewQAnimationDriver(h unsafe.Pointer) *QAnimationDriver {
|
||||
return newQAnimationDriver((*C.QAnimationDriver)(h))
|
||||
}
|
||||
|
||||
@ -332,7 +346,7 @@ func NewQAnimationDriver2(parent *QObject) *QAnimationDriver {
|
||||
}
|
||||
|
||||
func (this *QAnimationDriver) MetaObject() *QMetaObject {
|
||||
return newQMetaObject_U(unsafe.Pointer(C.QAnimationDriver_MetaObject(this.h)))
|
||||
return UnsafeNewQMetaObject(unsafe.Pointer(C.QAnimationDriver_MetaObject(this.h)))
|
||||
}
|
||||
|
||||
func (this *QAnimationDriver) Metacast(param1 string) unsafe.Pointer {
|
||||
|
@ -7,7 +7,7 @@
|
||||
|
||||
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||
|
||||
#include "binding.h"
|
||||
#include "../libmiqt/libmiqt.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
@ -7,7 +7,7 @@
|
||||
#include <QString>
|
||||
#include <QByteArray>
|
||||
#include <cstring>
|
||||
#include "qabstractbutton.h"
|
||||
#include <qabstractbutton.h>
|
||||
#include "gen_qabstractbutton.h"
|
||||
#include "_cgo_export.h"
|
||||
|
||||
|
@ -9,6 +9,7 @@ package qt
|
||||
import "C"
|
||||
|
||||
import (
|
||||
"github.com/mappu/miqt/libmiqt"
|
||||
"runtime"
|
||||
"runtime/cgo"
|
||||
"unsafe"
|
||||
@ -26,19 +27,26 @@ func (this *QAbstractButton) cPointer() *C.QAbstractButton {
|
||||
return this.h
|
||||
}
|
||||
|
||||
func (this *QAbstractButton) UnsafePointer() unsafe.Pointer {
|
||||
if this == nil {
|
||||
return nil
|
||||
}
|
||||
return unsafe.Pointer(this.h)
|
||||
}
|
||||
|
||||
func newQAbstractButton(h *C.QAbstractButton) *QAbstractButton {
|
||||
if h == nil {
|
||||
return nil
|
||||
}
|
||||
return &QAbstractButton{h: h, QWidget: newQWidget_U(unsafe.Pointer(h))}
|
||||
return &QAbstractButton{h: h, QWidget: UnsafeNewQWidget(unsafe.Pointer(h))}
|
||||
}
|
||||
|
||||
func newQAbstractButton_U(h unsafe.Pointer) *QAbstractButton {
|
||||
func UnsafeNewQAbstractButton(h unsafe.Pointer) *QAbstractButton {
|
||||
return newQAbstractButton((*C.QAbstractButton)(h))
|
||||
}
|
||||
|
||||
func (this *QAbstractButton) MetaObject() *QMetaObject {
|
||||
return newQMetaObject_U(unsafe.Pointer(C.QAbstractButton_MetaObject(this.h)))
|
||||
return UnsafeNewQMetaObject(unsafe.Pointer(C.QAbstractButton_MetaObject(this.h)))
|
||||
}
|
||||
|
||||
func (this *QAbstractButton) Metacast(param1 string) unsafe.Pointer {
|
||||
@ -66,7 +74,7 @@ func QAbstractButton_TrUtf8(s string) string {
|
||||
}
|
||||
|
||||
func (this *QAbstractButton) SetText(text string) {
|
||||
text_ms := miqt_strdupg(text)
|
||||
text_ms := libmiqt.Strdupg(text)
|
||||
defer C.free(text_ms)
|
||||
C.QAbstractButton_SetText(this.h, (*C.struct_miqt_string)(text_ms))
|
||||
}
|
||||
@ -160,7 +168,7 @@ func (this *QAbstractButton) AutoExclusive() bool {
|
||||
}
|
||||
|
||||
func (this *QAbstractButton) Group() *QButtonGroup {
|
||||
return newQButtonGroup_U(unsafe.Pointer(C.QAbstractButton_Group(this.h)))
|
||||
return UnsafeNewQButtonGroup(unsafe.Pointer(C.QAbstractButton_Group(this.h)))
|
||||
}
|
||||
|
||||
func (this *QAbstractButton) SetIconSize(size *QSize) {
|
||||
|
@ -7,7 +7,7 @@
|
||||
|
||||
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||
|
||||
#include "binding.h"
|
||||
#include "../libmiqt/libmiqt.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
@ -10,7 +10,7 @@
|
||||
#include <QByteArray>
|
||||
#include <cstring>
|
||||
#include <QThread>
|
||||
#include "qabstracteventdispatcher.h"
|
||||
#include <qabstracteventdispatcher.h>
|
||||
#include "gen_qabstracteventdispatcher.h"
|
||||
#include "_cgo_export.h"
|
||||
|
||||
|
@ -26,19 +26,26 @@ func (this *QAbstractEventDispatcher) cPointer() *C.QAbstractEventDispatcher {
|
||||
return this.h
|
||||
}
|
||||
|
||||
func (this *QAbstractEventDispatcher) UnsafePointer() unsafe.Pointer {
|
||||
if this == nil {
|
||||
return nil
|
||||
}
|
||||
return unsafe.Pointer(this.h)
|
||||
}
|
||||
|
||||
func newQAbstractEventDispatcher(h *C.QAbstractEventDispatcher) *QAbstractEventDispatcher {
|
||||
if h == nil {
|
||||
return nil
|
||||
}
|
||||
return &QAbstractEventDispatcher{h: h, QObject: newQObject_U(unsafe.Pointer(h))}
|
||||
return &QAbstractEventDispatcher{h: h, QObject: UnsafeNewQObject(unsafe.Pointer(h))}
|
||||
}
|
||||
|
||||
func newQAbstractEventDispatcher_U(h unsafe.Pointer) *QAbstractEventDispatcher {
|
||||
func UnsafeNewQAbstractEventDispatcher(h unsafe.Pointer) *QAbstractEventDispatcher {
|
||||
return newQAbstractEventDispatcher((*C.QAbstractEventDispatcher)(h))
|
||||
}
|
||||
|
||||
func (this *QAbstractEventDispatcher) MetaObject() *QMetaObject {
|
||||
return newQMetaObject_U(unsafe.Pointer(C.QAbstractEventDispatcher_MetaObject(this.h)))
|
||||
return UnsafeNewQMetaObject(unsafe.Pointer(C.QAbstractEventDispatcher_MetaObject(this.h)))
|
||||
}
|
||||
|
||||
func (this *QAbstractEventDispatcher) Metacast(param1 string) unsafe.Pointer {
|
||||
@ -66,7 +73,7 @@ func QAbstractEventDispatcher_TrUtf8(s string) string {
|
||||
}
|
||||
|
||||
func QAbstractEventDispatcher_Instance() *QAbstractEventDispatcher {
|
||||
return newQAbstractEventDispatcher_U(unsafe.Pointer(C.QAbstractEventDispatcher_Instance()))
|
||||
return UnsafeNewQAbstractEventDispatcher(unsafe.Pointer(C.QAbstractEventDispatcher_Instance()))
|
||||
}
|
||||
|
||||
func (this *QAbstractEventDispatcher) ProcessEvents(flags QEventLoop__ProcessEventsFlag) bool {
|
||||
@ -230,7 +237,7 @@ func QAbstractEventDispatcher_TrUtf83(s string, c string, n int) string {
|
||||
}
|
||||
|
||||
func QAbstractEventDispatcher_Instance1(thread *QThread) *QAbstractEventDispatcher {
|
||||
return newQAbstractEventDispatcher_U(unsafe.Pointer(C.QAbstractEventDispatcher_Instance1(thread.cPointer())))
|
||||
return UnsafeNewQAbstractEventDispatcher(unsafe.Pointer(C.QAbstractEventDispatcher_Instance1(thread.cPointer())))
|
||||
}
|
||||
|
||||
// Delete this object from C++ memory.
|
||||
@ -258,6 +265,13 @@ func (this *QAbstractEventDispatcher__TimerInfo) cPointer() *C.QAbstractEventDis
|
||||
return this.h
|
||||
}
|
||||
|
||||
func (this *QAbstractEventDispatcher__TimerInfo) UnsafePointer() unsafe.Pointer {
|
||||
if this == nil {
|
||||
return nil
|
||||
}
|
||||
return unsafe.Pointer(this.h)
|
||||
}
|
||||
|
||||
func newQAbstractEventDispatcher__TimerInfo(h *C.QAbstractEventDispatcher__TimerInfo) *QAbstractEventDispatcher__TimerInfo {
|
||||
if h == nil {
|
||||
return nil
|
||||
@ -265,7 +279,7 @@ func newQAbstractEventDispatcher__TimerInfo(h *C.QAbstractEventDispatcher__Timer
|
||||
return &QAbstractEventDispatcher__TimerInfo{h: h}
|
||||
}
|
||||
|
||||
func newQAbstractEventDispatcher__TimerInfo_U(h unsafe.Pointer) *QAbstractEventDispatcher__TimerInfo {
|
||||
func UnsafeNewQAbstractEventDispatcher__TimerInfo(h unsafe.Pointer) *QAbstractEventDispatcher__TimerInfo {
|
||||
return newQAbstractEventDispatcher__TimerInfo((*C.QAbstractEventDispatcher__TimerInfo)(h))
|
||||
}
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
|
||||
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||
|
||||
#include "binding.h"
|
||||
#include "../libmiqt/libmiqt.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
@ -14,7 +14,7 @@
|
||||
#include <cstring>
|
||||
#include <QStyleOptionViewItem>
|
||||
#include <QWidget>
|
||||
#include "qabstractitemdelegate.h"
|
||||
#include <qabstractitemdelegate.h>
|
||||
#include "gen_qabstractitemdelegate.h"
|
||||
#include "_cgo_export.h"
|
||||
|
||||
|
@ -9,6 +9,7 @@ package qt
|
||||
import "C"
|
||||
|
||||
import (
|
||||
"github.com/mappu/miqt/libmiqt"
|
||||
"runtime"
|
||||
"runtime/cgo"
|
||||
"unsafe"
|
||||
@ -36,19 +37,26 @@ func (this *QAbstractItemDelegate) cPointer() *C.QAbstractItemDelegate {
|
||||
return this.h
|
||||
}
|
||||
|
||||
func (this *QAbstractItemDelegate) UnsafePointer() unsafe.Pointer {
|
||||
if this == nil {
|
||||
return nil
|
||||
}
|
||||
return unsafe.Pointer(this.h)
|
||||
}
|
||||
|
||||
func newQAbstractItemDelegate(h *C.QAbstractItemDelegate) *QAbstractItemDelegate {
|
||||
if h == nil {
|
||||
return nil
|
||||
}
|
||||
return &QAbstractItemDelegate{h: h, QObject: newQObject_U(unsafe.Pointer(h))}
|
||||
return &QAbstractItemDelegate{h: h, QObject: UnsafeNewQObject(unsafe.Pointer(h))}
|
||||
}
|
||||
|
||||
func newQAbstractItemDelegate_U(h unsafe.Pointer) *QAbstractItemDelegate {
|
||||
func UnsafeNewQAbstractItemDelegate(h unsafe.Pointer) *QAbstractItemDelegate {
|
||||
return newQAbstractItemDelegate((*C.QAbstractItemDelegate)(h))
|
||||
}
|
||||
|
||||
func (this *QAbstractItemDelegate) MetaObject() *QMetaObject {
|
||||
return newQMetaObject_U(unsafe.Pointer(C.QAbstractItemDelegate_MetaObject(this.h)))
|
||||
return UnsafeNewQMetaObject(unsafe.Pointer(C.QAbstractItemDelegate_MetaObject(this.h)))
|
||||
}
|
||||
|
||||
func (this *QAbstractItemDelegate) Metacast(param1 string) unsafe.Pointer {
|
||||
@ -87,7 +95,7 @@ func (this *QAbstractItemDelegate) SizeHint(option *QStyleOptionViewItem, index
|
||||
}
|
||||
|
||||
func (this *QAbstractItemDelegate) CreateEditor(parent *QWidget, option *QStyleOptionViewItem, index *QModelIndex) *QWidget {
|
||||
return newQWidget_U(unsafe.Pointer(C.QAbstractItemDelegate_CreateEditor(this.h, parent.cPointer(), option.cPointer(), index.cPointer())))
|
||||
return UnsafeNewQWidget(unsafe.Pointer(C.QAbstractItemDelegate_CreateEditor(this.h, parent.cPointer(), option.cPointer(), index.cPointer())))
|
||||
}
|
||||
|
||||
func (this *QAbstractItemDelegate) DestroyEditor(editor *QWidget, index *QModelIndex) {
|
||||
@ -111,7 +119,7 @@ func (this *QAbstractItemDelegate) EditorEvent(event *QEvent, model *QAbstractIt
|
||||
}
|
||||
|
||||
func QAbstractItemDelegate_ElidedText(fontMetrics *QFontMetrics, width int, mode TextElideMode, text string) string {
|
||||
text_ms := miqt_strdupg(text)
|
||||
text_ms := libmiqt.Strdupg(text)
|
||||
defer C.free(text_ms)
|
||||
var _ms *C.struct_miqt_string = C.QAbstractItemDelegate_ElidedText(fontMetrics.cPointer(), (C.int)(width), (C.int)(mode), (*C.struct_miqt_string)(text_ms))
|
||||
_ret := C.GoStringN(&_ms.data, C.int(int64(_ms.len)))
|
||||
@ -149,7 +157,7 @@ func miqt_exec_callback_QAbstractItemDelegate_CommitData(cb C.intptr_t, editor *
|
||||
}
|
||||
|
||||
// Convert all CABI parameters to Go parameters
|
||||
slotval1 := newQWidget_U(unsafe.Pointer(editor))
|
||||
slotval1 := UnsafeNewQWidget(unsafe.Pointer(editor))
|
||||
|
||||
gofunc(slotval1)
|
||||
}
|
||||
@ -169,7 +177,7 @@ func miqt_exec_callback_QAbstractItemDelegate_CloseEditor(cb C.intptr_t, editor
|
||||
}
|
||||
|
||||
// Convert all CABI parameters to Go parameters
|
||||
slotval1 := newQWidget_U(unsafe.Pointer(editor))
|
||||
slotval1 := UnsafeNewQWidget(unsafe.Pointer(editor))
|
||||
|
||||
gofunc(slotval1)
|
||||
}
|
||||
@ -189,7 +197,7 @@ func miqt_exec_callback_QAbstractItemDelegate_SizeHintChanged(cb C.intptr_t, par
|
||||
}
|
||||
|
||||
// Convert all CABI parameters to Go parameters
|
||||
slotval1 := newQModelIndex_U(unsafe.Pointer(param1))
|
||||
slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(param1))
|
||||
|
||||
gofunc(slotval1)
|
||||
}
|
||||
@ -253,7 +261,7 @@ func miqt_exec_callback_QAbstractItemDelegate_CloseEditor2(cb C.intptr_t, editor
|
||||
}
|
||||
|
||||
// Convert all CABI parameters to Go parameters
|
||||
slotval1 := newQWidget_U(unsafe.Pointer(editor))
|
||||
slotval1 := UnsafeNewQWidget(unsafe.Pointer(editor))
|
||||
slotval2 := (QAbstractItemDelegate__EndEditHint)(hint)
|
||||
|
||||
gofunc(slotval1, slotval2)
|
||||
|
@ -7,7 +7,7 @@
|
||||
|
||||
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||
|
||||
#include "binding.h"
|
||||
#include "../libmiqt/libmiqt.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
@ -11,7 +11,7 @@
|
||||
#include <QByteArray>
|
||||
#include <cstring>
|
||||
#include <QVariant>
|
||||
#include "qabstractitemmodel.h"
|
||||
#include <qabstractitemmodel.h>
|
||||
#include "gen_qabstractitemmodel.h"
|
||||
#include "_cgo_export.h"
|
||||
|
||||
@ -278,7 +278,7 @@ struct miqt_array* QAbstractItemModel_MimeTypes(const QAbstractItemModel* self)
|
||||
}
|
||||
|
||||
QMimeData* QAbstractItemModel_MimeData(const QAbstractItemModel* self, struct miqt_array* /* of QModelIndex* */ indexes) {
|
||||
QList<QModelIndex> indexes_QList;
|
||||
QModelIndexList indexes_QList;
|
||||
indexes_QList.reserve(indexes->len);
|
||||
QModelIndex** indexes_arr = static_cast<QModelIndex**>(indexes->data);
|
||||
for(size_t i = 0; i < indexes->len; ++i) {
|
||||
|
@ -42,6 +42,13 @@ func (this *QModelIndex) cPointer() *C.QModelIndex {
|
||||
return this.h
|
||||
}
|
||||
|
||||
func (this *QModelIndex) UnsafePointer() unsafe.Pointer {
|
||||
if this == nil {
|
||||
return nil
|
||||
}
|
||||
return unsafe.Pointer(this.h)
|
||||
}
|
||||
|
||||
func newQModelIndex(h *C.QModelIndex) *QModelIndex {
|
||||
if h == nil {
|
||||
return nil
|
||||
@ -49,7 +56,7 @@ func newQModelIndex(h *C.QModelIndex) *QModelIndex {
|
||||
return &QModelIndex{h: h}
|
||||
}
|
||||
|
||||
func newQModelIndex_U(h unsafe.Pointer) *QModelIndex {
|
||||
func UnsafeNewQModelIndex(h unsafe.Pointer) *QModelIndex {
|
||||
return newQModelIndex((*C.QModelIndex)(h))
|
||||
}
|
||||
|
||||
@ -128,7 +135,7 @@ func (this *QModelIndex) Flags() ItemFlag {
|
||||
}
|
||||
|
||||
func (this *QModelIndex) Model() *QAbstractItemModel {
|
||||
return newQAbstractItemModel_U(unsafe.Pointer(C.QModelIndex_Model(this.h)))
|
||||
return UnsafeNewQAbstractItemModel(unsafe.Pointer(C.QModelIndex_Model(this.h)))
|
||||
}
|
||||
|
||||
func (this *QModelIndex) IsValid() bool {
|
||||
@ -179,6 +186,13 @@ func (this *QPersistentModelIndex) cPointer() *C.QPersistentModelIndex {
|
||||
return this.h
|
||||
}
|
||||
|
||||
func (this *QPersistentModelIndex) UnsafePointer() unsafe.Pointer {
|
||||
if this == nil {
|
||||
return nil
|
||||
}
|
||||
return unsafe.Pointer(this.h)
|
||||
}
|
||||
|
||||
func newQPersistentModelIndex(h *C.QPersistentModelIndex) *QPersistentModelIndex {
|
||||
if h == nil {
|
||||
return nil
|
||||
@ -186,7 +200,7 @@ func newQPersistentModelIndex(h *C.QPersistentModelIndex) *QPersistentModelIndex
|
||||
return &QPersistentModelIndex{h: h}
|
||||
}
|
||||
|
||||
func newQPersistentModelIndex_U(h unsafe.Pointer) *QPersistentModelIndex {
|
||||
func UnsafeNewQPersistentModelIndex(h unsafe.Pointer) *QPersistentModelIndex {
|
||||
return newQPersistentModelIndex((*C.QPersistentModelIndex)(h))
|
||||
}
|
||||
|
||||
@ -289,7 +303,7 @@ func (this *QPersistentModelIndex) Flags() ItemFlag {
|
||||
}
|
||||
|
||||
func (this *QPersistentModelIndex) Model() *QAbstractItemModel {
|
||||
return newQAbstractItemModel_U(unsafe.Pointer(C.QPersistentModelIndex_Model(this.h)))
|
||||
return UnsafeNewQAbstractItemModel(unsafe.Pointer(C.QPersistentModelIndex_Model(this.h)))
|
||||
}
|
||||
|
||||
func (this *QPersistentModelIndex) IsValid() bool {
|
||||
@ -329,19 +343,26 @@ func (this *QAbstractItemModel) cPointer() *C.QAbstractItemModel {
|
||||
return this.h
|
||||
}
|
||||
|
||||
func (this *QAbstractItemModel) UnsafePointer() unsafe.Pointer {
|
||||
if this == nil {
|
||||
return nil
|
||||
}
|
||||
return unsafe.Pointer(this.h)
|
||||
}
|
||||
|
||||
func newQAbstractItemModel(h *C.QAbstractItemModel) *QAbstractItemModel {
|
||||
if h == nil {
|
||||
return nil
|
||||
}
|
||||
return &QAbstractItemModel{h: h, QObject: newQObject_U(unsafe.Pointer(h))}
|
||||
return &QAbstractItemModel{h: h, QObject: UnsafeNewQObject(unsafe.Pointer(h))}
|
||||
}
|
||||
|
||||
func newQAbstractItemModel_U(h unsafe.Pointer) *QAbstractItemModel {
|
||||
func UnsafeNewQAbstractItemModel(h unsafe.Pointer) *QAbstractItemModel {
|
||||
return newQAbstractItemModel((*C.QAbstractItemModel)(h))
|
||||
}
|
||||
|
||||
func (this *QAbstractItemModel) MetaObject() *QMetaObject {
|
||||
return newQMetaObject_U(unsafe.Pointer(C.QAbstractItemModel_MetaObject(this.h)))
|
||||
return UnsafeNewQMetaObject(unsafe.Pointer(C.QAbstractItemModel_MetaObject(this.h)))
|
||||
}
|
||||
|
||||
func (this *QAbstractItemModel) Metacast(param1 string) unsafe.Pointer {
|
||||
@ -450,7 +471,7 @@ func (this *QAbstractItemModel) MimeData(indexes []QModelIndex) *QMimeData {
|
||||
}
|
||||
indexes_ma := &C.struct_miqt_array{len: C.size_t(len(indexes)), data: unsafe.Pointer(indexes_CArray)}
|
||||
defer runtime.KeepAlive(unsafe.Pointer(indexes_ma))
|
||||
return newQMimeData_U(unsafe.Pointer(C.QAbstractItemModel_MimeData(this.h, indexes_ma)))
|
||||
return UnsafeNewQMimeData(unsafe.Pointer(C.QAbstractItemModel_MimeData(this.h, indexes_ma)))
|
||||
}
|
||||
|
||||
func (this *QAbstractItemModel) CanDropMimeData(data *QMimeData, action DropAction, row int, column int, parent *QModelIndex) bool {
|
||||
@ -580,8 +601,8 @@ func miqt_exec_callback_QAbstractItemModel_DataChanged(cb C.intptr_t, topLeft *C
|
||||
}
|
||||
|
||||
// Convert all CABI parameters to Go parameters
|
||||
slotval1 := newQModelIndex_U(unsafe.Pointer(topLeft))
|
||||
slotval2 := newQModelIndex_U(unsafe.Pointer(bottomRight))
|
||||
slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(topLeft))
|
||||
slotval2 := UnsafeNewQModelIndex(unsafe.Pointer(bottomRight))
|
||||
|
||||
gofunc(slotval1, slotval2)
|
||||
}
|
||||
@ -832,8 +853,8 @@ func miqt_exec_callback_QAbstractItemModel_DataChanged3(cb C.intptr_t, topLeft *
|
||||
}
|
||||
|
||||
// Convert all CABI parameters to Go parameters
|
||||
slotval1 := newQModelIndex_U(unsafe.Pointer(topLeft))
|
||||
slotval2 := newQModelIndex_U(unsafe.Pointer(bottomRight))
|
||||
slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(topLeft))
|
||||
slotval2 := UnsafeNewQModelIndex(unsafe.Pointer(bottomRight))
|
||||
var roles_ma *C.struct_miqt_array = roles
|
||||
roles_ret := make([]int, int(roles_ma.len))
|
||||
roles_outCast := (*[0xffff]C.int)(unsafe.Pointer(roles_ma.data)) // hey ya
|
||||
@ -1028,19 +1049,26 @@ func (this *QAbstractTableModel) cPointer() *C.QAbstractTableModel {
|
||||
return this.h
|
||||
}
|
||||
|
||||
func (this *QAbstractTableModel) UnsafePointer() unsafe.Pointer {
|
||||
if this == nil {
|
||||
return nil
|
||||
}
|
||||
return unsafe.Pointer(this.h)
|
||||
}
|
||||
|
||||
func newQAbstractTableModel(h *C.QAbstractTableModel) *QAbstractTableModel {
|
||||
if h == nil {
|
||||
return nil
|
||||
}
|
||||
return &QAbstractTableModel{h: h, QAbstractItemModel: newQAbstractItemModel_U(unsafe.Pointer(h))}
|
||||
return &QAbstractTableModel{h: h, QAbstractItemModel: UnsafeNewQAbstractItemModel(unsafe.Pointer(h))}
|
||||
}
|
||||
|
||||
func newQAbstractTableModel_U(h unsafe.Pointer) *QAbstractTableModel {
|
||||
func UnsafeNewQAbstractTableModel(h unsafe.Pointer) *QAbstractTableModel {
|
||||
return newQAbstractTableModel((*C.QAbstractTableModel)(h))
|
||||
}
|
||||
|
||||
func (this *QAbstractTableModel) MetaObject() *QMetaObject {
|
||||
return newQMetaObject_U(unsafe.Pointer(C.QAbstractTableModel_MetaObject(this.h)))
|
||||
return UnsafeNewQMetaObject(unsafe.Pointer(C.QAbstractTableModel_MetaObject(this.h)))
|
||||
}
|
||||
|
||||
func (this *QAbstractTableModel) Metacast(param1 string) unsafe.Pointer {
|
||||
@ -1166,19 +1194,26 @@ func (this *QAbstractListModel) cPointer() *C.QAbstractListModel {
|
||||
return this.h
|
||||
}
|
||||
|
||||
func (this *QAbstractListModel) UnsafePointer() unsafe.Pointer {
|
||||
if this == nil {
|
||||
return nil
|
||||
}
|
||||
return unsafe.Pointer(this.h)
|
||||
}
|
||||
|
||||
func newQAbstractListModel(h *C.QAbstractListModel) *QAbstractListModel {
|
||||
if h == nil {
|
||||
return nil
|
||||
}
|
||||
return &QAbstractListModel{h: h, QAbstractItemModel: newQAbstractItemModel_U(unsafe.Pointer(h))}
|
||||
return &QAbstractListModel{h: h, QAbstractItemModel: UnsafeNewQAbstractItemModel(unsafe.Pointer(h))}
|
||||
}
|
||||
|
||||
func newQAbstractListModel_U(h unsafe.Pointer) *QAbstractListModel {
|
||||
func UnsafeNewQAbstractListModel(h unsafe.Pointer) *QAbstractListModel {
|
||||
return newQAbstractListModel((*C.QAbstractListModel)(h))
|
||||
}
|
||||
|
||||
func (this *QAbstractListModel) MetaObject() *QMetaObject {
|
||||
return newQMetaObject_U(unsafe.Pointer(C.QAbstractListModel_MetaObject(this.h)))
|
||||
return UnsafeNewQMetaObject(unsafe.Pointer(C.QAbstractListModel_MetaObject(this.h)))
|
||||
}
|
||||
|
||||
func (this *QAbstractListModel) Metacast(param1 string) unsafe.Pointer {
|
||||
|
@ -7,7 +7,7 @@
|
||||
|
||||
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||
|
||||
#include "binding.h"
|
||||
#include "../libmiqt/libmiqt.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
@ -12,7 +12,7 @@
|
||||
#include <cstring>
|
||||
#include <QVariant>
|
||||
#include <QWidget>
|
||||
#include "qabstractitemview.h"
|
||||
#include <qabstractitemview.h>
|
||||
#include "gen_qabstractitemview.h"
|
||||
#include "_cgo_export.h"
|
||||
|
||||
|
@ -9,6 +9,7 @@ package qt
|
||||
import "C"
|
||||
|
||||
import (
|
||||
"github.com/mappu/miqt/libmiqt"
|
||||
"runtime"
|
||||
"runtime/cgo"
|
||||
"unsafe"
|
||||
@ -82,19 +83,26 @@ func (this *QAbstractItemView) cPointer() *C.QAbstractItemView {
|
||||
return this.h
|
||||
}
|
||||
|
||||
func (this *QAbstractItemView) UnsafePointer() unsafe.Pointer {
|
||||
if this == nil {
|
||||
return nil
|
||||
}
|
||||
return unsafe.Pointer(this.h)
|
||||
}
|
||||
|
||||
func newQAbstractItemView(h *C.QAbstractItemView) *QAbstractItemView {
|
||||
if h == nil {
|
||||
return nil
|
||||
}
|
||||
return &QAbstractItemView{h: h, QAbstractScrollArea: newQAbstractScrollArea_U(unsafe.Pointer(h))}
|
||||
return &QAbstractItemView{h: h, QAbstractScrollArea: UnsafeNewQAbstractScrollArea(unsafe.Pointer(h))}
|
||||
}
|
||||
|
||||
func newQAbstractItemView_U(h unsafe.Pointer) *QAbstractItemView {
|
||||
func UnsafeNewQAbstractItemView(h unsafe.Pointer) *QAbstractItemView {
|
||||
return newQAbstractItemView((*C.QAbstractItemView)(h))
|
||||
}
|
||||
|
||||
func (this *QAbstractItemView) MetaObject() *QMetaObject {
|
||||
return newQMetaObject_U(unsafe.Pointer(C.QAbstractItemView_MetaObject(this.h)))
|
||||
return UnsafeNewQMetaObject(unsafe.Pointer(C.QAbstractItemView_MetaObject(this.h)))
|
||||
}
|
||||
|
||||
func (this *QAbstractItemView) Metacast(param1 string) unsafe.Pointer {
|
||||
@ -126,7 +134,7 @@ func (this *QAbstractItemView) SetModel(model *QAbstractItemModel) {
|
||||
}
|
||||
|
||||
func (this *QAbstractItemView) Model() *QAbstractItemModel {
|
||||
return newQAbstractItemModel_U(unsafe.Pointer(C.QAbstractItemView_Model(this.h)))
|
||||
return UnsafeNewQAbstractItemModel(unsafe.Pointer(C.QAbstractItemView_Model(this.h)))
|
||||
}
|
||||
|
||||
func (this *QAbstractItemView) SetSelectionModel(selectionModel *QItemSelectionModel) {
|
||||
@ -134,7 +142,7 @@ func (this *QAbstractItemView) SetSelectionModel(selectionModel *QItemSelectionM
|
||||
}
|
||||
|
||||
func (this *QAbstractItemView) SelectionModel() *QItemSelectionModel {
|
||||
return newQItemSelectionModel_U(unsafe.Pointer(C.QAbstractItemView_SelectionModel(this.h)))
|
||||
return UnsafeNewQItemSelectionModel(unsafe.Pointer(C.QAbstractItemView_SelectionModel(this.h)))
|
||||
}
|
||||
|
||||
func (this *QAbstractItemView) SetItemDelegate(delegate *QAbstractItemDelegate) {
|
||||
@ -142,7 +150,7 @@ func (this *QAbstractItemView) SetItemDelegate(delegate *QAbstractItemDelegate)
|
||||
}
|
||||
|
||||
func (this *QAbstractItemView) ItemDelegate() *QAbstractItemDelegate {
|
||||
return newQAbstractItemDelegate_U(unsafe.Pointer(C.QAbstractItemView_ItemDelegate(this.h)))
|
||||
return UnsafeNewQAbstractItemDelegate(unsafe.Pointer(C.QAbstractItemView_ItemDelegate(this.h)))
|
||||
}
|
||||
|
||||
func (this *QAbstractItemView) SetSelectionMode(mode QAbstractItemView__SelectionMode) {
|
||||
@ -299,7 +307,7 @@ func (this *QAbstractItemView) TextElideMode() TextElideMode {
|
||||
}
|
||||
|
||||
func (this *QAbstractItemView) KeyboardSearch(search string) {
|
||||
search_ms := miqt_strdupg(search)
|
||||
search_ms := libmiqt.Strdupg(search)
|
||||
defer C.free(search_ms)
|
||||
C.QAbstractItemView_KeyboardSearch(this.h, (*C.struct_miqt_string)(search_ms))
|
||||
}
|
||||
@ -354,7 +362,7 @@ func (this *QAbstractItemView) SetIndexWidget(index *QModelIndex, widget *QWidge
|
||||
}
|
||||
|
||||
func (this *QAbstractItemView) IndexWidget(index *QModelIndex) *QWidget {
|
||||
return newQWidget_U(unsafe.Pointer(C.QAbstractItemView_IndexWidget(this.h, index.cPointer())))
|
||||
return UnsafeNewQWidget(unsafe.Pointer(C.QAbstractItemView_IndexWidget(this.h, index.cPointer())))
|
||||
}
|
||||
|
||||
func (this *QAbstractItemView) SetItemDelegateForRow(row int, delegate *QAbstractItemDelegate) {
|
||||
@ -362,7 +370,7 @@ func (this *QAbstractItemView) SetItemDelegateForRow(row int, delegate *QAbstrac
|
||||
}
|
||||
|
||||
func (this *QAbstractItemView) ItemDelegateForRow(row int) *QAbstractItemDelegate {
|
||||
return newQAbstractItemDelegate_U(unsafe.Pointer(C.QAbstractItemView_ItemDelegateForRow(this.h, (C.int)(row))))
|
||||
return UnsafeNewQAbstractItemDelegate(unsafe.Pointer(C.QAbstractItemView_ItemDelegateForRow(this.h, (C.int)(row))))
|
||||
}
|
||||
|
||||
func (this *QAbstractItemView) SetItemDelegateForColumn(column int, delegate *QAbstractItemDelegate) {
|
||||
@ -370,11 +378,11 @@ func (this *QAbstractItemView) SetItemDelegateForColumn(column int, delegate *QA
|
||||
}
|
||||
|
||||
func (this *QAbstractItemView) ItemDelegateForColumn(column int) *QAbstractItemDelegate {
|
||||
return newQAbstractItemDelegate_U(unsafe.Pointer(C.QAbstractItemView_ItemDelegateForColumn(this.h, (C.int)(column))))
|
||||
return UnsafeNewQAbstractItemDelegate(unsafe.Pointer(C.QAbstractItemView_ItemDelegateForColumn(this.h, (C.int)(column))))
|
||||
}
|
||||
|
||||
func (this *QAbstractItemView) ItemDelegateWithIndex(index *QModelIndex) *QAbstractItemDelegate {
|
||||
return newQAbstractItemDelegate_U(unsafe.Pointer(C.QAbstractItemView_ItemDelegateWithIndex(this.h, index.cPointer())))
|
||||
return UnsafeNewQAbstractItemDelegate(unsafe.Pointer(C.QAbstractItemView_ItemDelegateWithIndex(this.h, index.cPointer())))
|
||||
}
|
||||
|
||||
func (this *QAbstractItemView) InputMethodQuery(query InputMethodQuery) *QVariant {
|
||||
@ -439,7 +447,7 @@ func miqt_exec_callback_QAbstractItemView_Pressed(cb C.intptr_t, index *C.QModel
|
||||
}
|
||||
|
||||
// Convert all CABI parameters to Go parameters
|
||||
slotval1 := newQModelIndex_U(unsafe.Pointer(index))
|
||||
slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index))
|
||||
|
||||
gofunc(slotval1)
|
||||
}
|
||||
@ -459,7 +467,7 @@ func miqt_exec_callback_QAbstractItemView_Clicked(cb C.intptr_t, index *C.QModel
|
||||
}
|
||||
|
||||
// Convert all CABI parameters to Go parameters
|
||||
slotval1 := newQModelIndex_U(unsafe.Pointer(index))
|
||||
slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index))
|
||||
|
||||
gofunc(slotval1)
|
||||
}
|
||||
@ -479,7 +487,7 @@ func miqt_exec_callback_QAbstractItemView_DoubleClicked(cb C.intptr_t, index *C.
|
||||
}
|
||||
|
||||
// Convert all CABI parameters to Go parameters
|
||||
slotval1 := newQModelIndex_U(unsafe.Pointer(index))
|
||||
slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index))
|
||||
|
||||
gofunc(slotval1)
|
||||
}
|
||||
@ -499,7 +507,7 @@ func miqt_exec_callback_QAbstractItemView_Activated(cb C.intptr_t, index *C.QMod
|
||||
}
|
||||
|
||||
// Convert all CABI parameters to Go parameters
|
||||
slotval1 := newQModelIndex_U(unsafe.Pointer(index))
|
||||
slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index))
|
||||
|
||||
gofunc(slotval1)
|
||||
}
|
||||
@ -519,7 +527,7 @@ func miqt_exec_callback_QAbstractItemView_Entered(cb C.intptr_t, index *C.QModel
|
||||
}
|
||||
|
||||
// Convert all CABI parameters to Go parameters
|
||||
slotval1 := newQModelIndex_U(unsafe.Pointer(index))
|
||||
slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index))
|
||||
|
||||
gofunc(slotval1)
|
||||
}
|
||||
@ -556,7 +564,7 @@ func miqt_exec_callback_QAbstractItemView_IconSizeChanged(cb C.intptr_t, size *C
|
||||
}
|
||||
|
||||
// Convert all CABI parameters to Go parameters
|
||||
slotval1 := newQSize_U(unsafe.Pointer(size))
|
||||
slotval1 := UnsafeNewQSize(unsafe.Pointer(size))
|
||||
|
||||
gofunc(slotval1)
|
||||
}
|
||||
|
@ -7,7 +7,7 @@
|
||||
|
||||
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||
|
||||
#include "binding.h"
|
||||
#include "../libmiqt/libmiqt.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
@ -1,6 +1,6 @@
|
||||
#include <QAbstractNativeEventFilter>
|
||||
#include <QByteArray>
|
||||
#include "qabstractnativeeventfilter.h"
|
||||
#include <qabstractnativeeventfilter.h>
|
||||
#include "gen_qabstractnativeeventfilter.h"
|
||||
#include "_cgo_export.h"
|
||||
|
||||
|
@ -24,6 +24,13 @@ func (this *QAbstractNativeEventFilter) cPointer() *C.QAbstractNativeEventFilter
|
||||
return this.h
|
||||
}
|
||||
|
||||
func (this *QAbstractNativeEventFilter) UnsafePointer() unsafe.Pointer {
|
||||
if this == nil {
|
||||
return nil
|
||||
}
|
||||
return unsafe.Pointer(this.h)
|
||||
}
|
||||
|
||||
func newQAbstractNativeEventFilter(h *C.QAbstractNativeEventFilter) *QAbstractNativeEventFilter {
|
||||
if h == nil {
|
||||
return nil
|
||||
@ -31,7 +38,7 @@ func newQAbstractNativeEventFilter(h *C.QAbstractNativeEventFilter) *QAbstractNa
|
||||
return &QAbstractNativeEventFilter{h: h}
|
||||
}
|
||||
|
||||
func newQAbstractNativeEventFilter_U(h unsafe.Pointer) *QAbstractNativeEventFilter {
|
||||
func UnsafeNewQAbstractNativeEventFilter(h unsafe.Pointer) *QAbstractNativeEventFilter {
|
||||
return newQAbstractNativeEventFilter((*C.QAbstractNativeEventFilter)(h))
|
||||
}
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
|
||||
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||
|
||||
#include "binding.h"
|
||||
#include "../libmiqt/libmiqt.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
@ -9,7 +9,7 @@
|
||||
#include <QByteArray>
|
||||
#include <cstring>
|
||||
#include <QVariant>
|
||||
#include "qabstractproxymodel.h"
|
||||
#include <qabstractproxymodel.h>
|
||||
#include "gen_qabstractproxymodel.h"
|
||||
#include "_cgo_export.h"
|
||||
|
||||
@ -109,7 +109,7 @@ QModelIndex* QAbstractProxyModel_Sibling(const QAbstractProxyModel* self, int ro
|
||||
}
|
||||
|
||||
QMimeData* QAbstractProxyModel_MimeData(const QAbstractProxyModel* self, struct miqt_array* /* of QModelIndex* */ indexes) {
|
||||
QList<QModelIndex> indexes_QList;
|
||||
QModelIndexList indexes_QList;
|
||||
indexes_QList.reserve(indexes->len);
|
||||
QModelIndex** indexes_arr = static_cast<QModelIndex**>(indexes->data);
|
||||
for(size_t i = 0; i < indexes->len; ++i) {
|
||||
|
@ -25,19 +25,26 @@ func (this *QAbstractProxyModel) cPointer() *C.QAbstractProxyModel {
|
||||
return this.h
|
||||
}
|
||||
|
||||
func (this *QAbstractProxyModel) UnsafePointer() unsafe.Pointer {
|
||||
if this == nil {
|
||||
return nil
|
||||
}
|
||||
return unsafe.Pointer(this.h)
|
||||
}
|
||||
|
||||
func newQAbstractProxyModel(h *C.QAbstractProxyModel) *QAbstractProxyModel {
|
||||
if h == nil {
|
||||
return nil
|
||||
}
|
||||
return &QAbstractProxyModel{h: h, QAbstractItemModel: newQAbstractItemModel_U(unsafe.Pointer(h))}
|
||||
return &QAbstractProxyModel{h: h, QAbstractItemModel: UnsafeNewQAbstractItemModel(unsafe.Pointer(h))}
|
||||
}
|
||||
|
||||
func newQAbstractProxyModel_U(h unsafe.Pointer) *QAbstractProxyModel {
|
||||
func UnsafeNewQAbstractProxyModel(h unsafe.Pointer) *QAbstractProxyModel {
|
||||
return newQAbstractProxyModel((*C.QAbstractProxyModel)(h))
|
||||
}
|
||||
|
||||
func (this *QAbstractProxyModel) MetaObject() *QMetaObject {
|
||||
return newQMetaObject_U(unsafe.Pointer(C.QAbstractProxyModel_MetaObject(this.h)))
|
||||
return UnsafeNewQMetaObject(unsafe.Pointer(C.QAbstractProxyModel_MetaObject(this.h)))
|
||||
}
|
||||
|
||||
func (this *QAbstractProxyModel) Metacast(param1 string) unsafe.Pointer {
|
||||
@ -69,7 +76,7 @@ func (this *QAbstractProxyModel) SetSourceModel(sourceModel *QAbstractItemModel)
|
||||
}
|
||||
|
||||
func (this *QAbstractProxyModel) SourceModel() *QAbstractItemModel {
|
||||
return newQAbstractItemModel_U(unsafe.Pointer(C.QAbstractProxyModel_SourceModel(this.h)))
|
||||
return UnsafeNewQAbstractItemModel(unsafe.Pointer(C.QAbstractProxyModel_SourceModel(this.h)))
|
||||
}
|
||||
|
||||
func (this *QAbstractProxyModel) MapToSource(proxyIndex *QModelIndex) *QModelIndex {
|
||||
@ -166,7 +173,7 @@ func (this *QAbstractProxyModel) MimeData(indexes []QModelIndex) *QMimeData {
|
||||
}
|
||||
indexes_ma := &C.struct_miqt_array{len: C.size_t(len(indexes)), data: unsafe.Pointer(indexes_CArray)}
|
||||
defer runtime.KeepAlive(unsafe.Pointer(indexes_ma))
|
||||
return newQMimeData_U(unsafe.Pointer(C.QAbstractProxyModel_MimeData(this.h, indexes_ma)))
|
||||
return UnsafeNewQMimeData(unsafe.Pointer(C.QAbstractProxyModel_MimeData(this.h, indexes_ma)))
|
||||
}
|
||||
|
||||
func (this *QAbstractProxyModel) CanDropMimeData(data *QMimeData, action DropAction, row int, column int, parent *QModelIndex) bool {
|
||||
|
@ -7,7 +7,7 @@
|
||||
|
||||
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||
|
||||
#include "binding.h"
|
||||
#include "../libmiqt/libmiqt.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
@ -7,7 +7,7 @@
|
||||
#include <QByteArray>
|
||||
#include <cstring>
|
||||
#include <QWidget>
|
||||
#include "qabstractscrollarea.h"
|
||||
#include <qabstractscrollarea.h>
|
||||
#include "gen_qabstractscrollarea.h"
|
||||
#include "_cgo_export.h"
|
||||
|
||||
|
@ -33,14 +33,21 @@ func (this *QAbstractScrollArea) cPointer() *C.QAbstractScrollArea {
|
||||
return this.h
|
||||
}
|
||||
|
||||
func (this *QAbstractScrollArea) UnsafePointer() unsafe.Pointer {
|
||||
if this == nil {
|
||||
return nil
|
||||
}
|
||||
return unsafe.Pointer(this.h)
|
||||
}
|
||||
|
||||
func newQAbstractScrollArea(h *C.QAbstractScrollArea) *QAbstractScrollArea {
|
||||
if h == nil {
|
||||
return nil
|
||||
}
|
||||
return &QAbstractScrollArea{h: h, QFrame: newQFrame_U(unsafe.Pointer(h))}
|
||||
return &QAbstractScrollArea{h: h, QFrame: UnsafeNewQFrame(unsafe.Pointer(h))}
|
||||
}
|
||||
|
||||
func newQAbstractScrollArea_U(h unsafe.Pointer) *QAbstractScrollArea {
|
||||
func UnsafeNewQAbstractScrollArea(h unsafe.Pointer) *QAbstractScrollArea {
|
||||
return newQAbstractScrollArea((*C.QAbstractScrollArea)(h))
|
||||
}
|
||||
|
||||
@ -57,7 +64,7 @@ func NewQAbstractScrollArea2(parent *QWidget) *QAbstractScrollArea {
|
||||
}
|
||||
|
||||
func (this *QAbstractScrollArea) MetaObject() *QMetaObject {
|
||||
return newQMetaObject_U(unsafe.Pointer(C.QAbstractScrollArea_MetaObject(this.h)))
|
||||
return UnsafeNewQMetaObject(unsafe.Pointer(C.QAbstractScrollArea_MetaObject(this.h)))
|
||||
}
|
||||
|
||||
func (this *QAbstractScrollArea) Metacast(param1 string) unsafe.Pointer {
|
||||
@ -93,7 +100,7 @@ func (this *QAbstractScrollArea) SetVerticalScrollBarPolicy(verticalScrollBarPol
|
||||
}
|
||||
|
||||
func (this *QAbstractScrollArea) VerticalScrollBar() *QScrollBar {
|
||||
return newQScrollBar_U(unsafe.Pointer(C.QAbstractScrollArea_VerticalScrollBar(this.h)))
|
||||
return UnsafeNewQScrollBar(unsafe.Pointer(C.QAbstractScrollArea_VerticalScrollBar(this.h)))
|
||||
}
|
||||
|
||||
func (this *QAbstractScrollArea) SetVerticalScrollBar(scrollbar *QScrollBar) {
|
||||
@ -109,7 +116,7 @@ func (this *QAbstractScrollArea) SetHorizontalScrollBarPolicy(horizontalScrollBa
|
||||
}
|
||||
|
||||
func (this *QAbstractScrollArea) HorizontalScrollBar() *QScrollBar {
|
||||
return newQScrollBar_U(unsafe.Pointer(C.QAbstractScrollArea_HorizontalScrollBar(this.h)))
|
||||
return UnsafeNewQScrollBar(unsafe.Pointer(C.QAbstractScrollArea_HorizontalScrollBar(this.h)))
|
||||
}
|
||||
|
||||
func (this *QAbstractScrollArea) SetHorizontalScrollBar(scrollbar *QScrollBar) {
|
||||
@ -117,7 +124,7 @@ func (this *QAbstractScrollArea) SetHorizontalScrollBar(scrollbar *QScrollBar) {
|
||||
}
|
||||
|
||||
func (this *QAbstractScrollArea) CornerWidget() *QWidget {
|
||||
return newQWidget_U(unsafe.Pointer(C.QAbstractScrollArea_CornerWidget(this.h)))
|
||||
return UnsafeNewQWidget(unsafe.Pointer(C.QAbstractScrollArea_CornerWidget(this.h)))
|
||||
}
|
||||
|
||||
func (this *QAbstractScrollArea) SetCornerWidget(widget *QWidget) {
|
||||
@ -133,14 +140,14 @@ func (this *QAbstractScrollArea) ScrollBarWidgets(alignment AlignmentFlag) []*QW
|
||||
_ret := make([]*QWidget, int(_ma.len))
|
||||
_outCast := (*[0xffff]*C.QWidget)(unsafe.Pointer(_ma.data)) // hey ya
|
||||
for i := 0; i < int(_ma.len); i++ {
|
||||
_ret[i] = newQWidget_U(unsafe.Pointer(_outCast[i]))
|
||||
_ret[i] = UnsafeNewQWidget(unsafe.Pointer(_outCast[i]))
|
||||
}
|
||||
C.free(unsafe.Pointer(_ma))
|
||||
return _ret
|
||||
}
|
||||
|
||||
func (this *QAbstractScrollArea) Viewport() *QWidget {
|
||||
return newQWidget_U(unsafe.Pointer(C.QAbstractScrollArea_Viewport(this.h)))
|
||||
return UnsafeNewQWidget(unsafe.Pointer(C.QAbstractScrollArea_Viewport(this.h)))
|
||||
}
|
||||
|
||||
func (this *QAbstractScrollArea) SetViewport(widget *QWidget) {
|
||||
|
@ -7,7 +7,7 @@
|
||||
|
||||
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||
|
||||
#include "binding.h"
|
||||
#include "../libmiqt/libmiqt.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
@ -4,7 +4,7 @@
|
||||
#include <QByteArray>
|
||||
#include <cstring>
|
||||
#include <QWidget>
|
||||
#include "qabstractslider.h"
|
||||
#include <qabstractslider.h>
|
||||
#include "gen_qabstractslider.h"
|
||||
#include "_cgo_export.h"
|
||||
|
||||
|
@ -39,14 +39,21 @@ func (this *QAbstractSlider) cPointer() *C.QAbstractSlider {
|
||||
return this.h
|
||||
}
|
||||
|
||||
func (this *QAbstractSlider) UnsafePointer() unsafe.Pointer {
|
||||
if this == nil {
|
||||
return nil
|
||||
}
|
||||
return unsafe.Pointer(this.h)
|
||||
}
|
||||
|
||||
func newQAbstractSlider(h *C.QAbstractSlider) *QAbstractSlider {
|
||||
if h == nil {
|
||||
return nil
|
||||
}
|
||||
return &QAbstractSlider{h: h, QWidget: newQWidget_U(unsafe.Pointer(h))}
|
||||
return &QAbstractSlider{h: h, QWidget: UnsafeNewQWidget(unsafe.Pointer(h))}
|
||||
}
|
||||
|
||||
func newQAbstractSlider_U(h unsafe.Pointer) *QAbstractSlider {
|
||||
func UnsafeNewQAbstractSlider(h unsafe.Pointer) *QAbstractSlider {
|
||||
return newQAbstractSlider((*C.QAbstractSlider)(h))
|
||||
}
|
||||
|
||||
@ -63,7 +70,7 @@ func NewQAbstractSlider2(parent *QWidget) *QAbstractSlider {
|
||||
}
|
||||
|
||||
func (this *QAbstractSlider) MetaObject() *QMetaObject {
|
||||
return newQMetaObject_U(unsafe.Pointer(C.QAbstractSlider_MetaObject(this.h)))
|
||||
return UnsafeNewQMetaObject(unsafe.Pointer(C.QAbstractSlider_MetaObject(this.h)))
|
||||
}
|
||||
|
||||
func (this *QAbstractSlider) Metacast(param1 string) unsafe.Pointer {
|
||||
|
@ -7,7 +7,7 @@
|
||||
|
||||
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||
|
||||
#include "binding.h"
|
||||
#include "../libmiqt/libmiqt.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
@ -7,7 +7,7 @@
|
||||
#include <cstring>
|
||||
#include <QVariant>
|
||||
#include <QWidget>
|
||||
#include "qabstractspinbox.h"
|
||||
#include <qabstractspinbox.h>
|
||||
#include "gen_qabstractspinbox.h"
|
||||
#include "_cgo_export.h"
|
||||
|
||||
|
@ -9,6 +9,7 @@ package qt
|
||||
import "C"
|
||||
|
||||
import (
|
||||
"github.com/mappu/miqt/libmiqt"
|
||||
"runtime"
|
||||
"runtime/cgo"
|
||||
"unsafe"
|
||||
@ -56,14 +57,21 @@ func (this *QAbstractSpinBox) cPointer() *C.QAbstractSpinBox {
|
||||
return this.h
|
||||
}
|
||||
|
||||
func (this *QAbstractSpinBox) UnsafePointer() unsafe.Pointer {
|
||||
if this == nil {
|
||||
return nil
|
||||
}
|
||||
return unsafe.Pointer(this.h)
|
||||
}
|
||||
|
||||
func newQAbstractSpinBox(h *C.QAbstractSpinBox) *QAbstractSpinBox {
|
||||
if h == nil {
|
||||
return nil
|
||||
}
|
||||
return &QAbstractSpinBox{h: h, QWidget: newQWidget_U(unsafe.Pointer(h))}
|
||||
return &QAbstractSpinBox{h: h, QWidget: UnsafeNewQWidget(unsafe.Pointer(h))}
|
||||
}
|
||||
|
||||
func newQAbstractSpinBox_U(h unsafe.Pointer) *QAbstractSpinBox {
|
||||
func UnsafeNewQAbstractSpinBox(h unsafe.Pointer) *QAbstractSpinBox {
|
||||
return newQAbstractSpinBox((*C.QAbstractSpinBox)(h))
|
||||
}
|
||||
|
||||
@ -80,7 +88,7 @@ func NewQAbstractSpinBox2(parent *QWidget) *QAbstractSpinBox {
|
||||
}
|
||||
|
||||
func (this *QAbstractSpinBox) MetaObject() *QMetaObject {
|
||||
return newQMetaObject_U(unsafe.Pointer(C.QAbstractSpinBox_MetaObject(this.h)))
|
||||
return UnsafeNewQMetaObject(unsafe.Pointer(C.QAbstractSpinBox_MetaObject(this.h)))
|
||||
}
|
||||
|
||||
func (this *QAbstractSpinBox) Metacast(param1 string) unsafe.Pointer {
|
||||
@ -142,7 +150,7 @@ func (this *QAbstractSpinBox) SpecialValueText() string {
|
||||
}
|
||||
|
||||
func (this *QAbstractSpinBox) SetSpecialValueText(txt string) {
|
||||
txt_ms := miqt_strdupg(txt)
|
||||
txt_ms := libmiqt.Strdupg(txt)
|
||||
defer C.free(txt_ms)
|
||||
C.QAbstractSpinBox_SetSpecialValueText(this.h, (*C.struct_miqt_string)(txt_ms))
|
||||
}
|
||||
@ -233,13 +241,13 @@ func (this *QAbstractSpinBox) InputMethodQuery(param1 InputMethodQuery) *QVarian
|
||||
}
|
||||
|
||||
func (this *QAbstractSpinBox) Validate(input string, pos *int) QValidator__State {
|
||||
input_ms := miqt_strdupg(input)
|
||||
input_ms := libmiqt.Strdupg(input)
|
||||
defer C.free(input_ms)
|
||||
return (QValidator__State)(C.QAbstractSpinBox_Validate(this.h, (*C.struct_miqt_string)(input_ms), (*C.int)(unsafe.Pointer(pos))))
|
||||
}
|
||||
|
||||
func (this *QAbstractSpinBox) Fixup(input string) {
|
||||
input_ms := miqt_strdupg(input)
|
||||
input_ms := libmiqt.Strdupg(input)
|
||||
defer C.free(input_ms)
|
||||
C.QAbstractSpinBox_Fixup(this.h, (*C.struct_miqt_string)(input_ms))
|
||||
}
|
||||
|
@ -7,7 +7,7 @@
|
||||
|
||||
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||
|
||||
#include "binding.h"
|
||||
#include "../libmiqt/libmiqt.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
@ -5,7 +5,7 @@
|
||||
#include <QString>
|
||||
#include <QByteArray>
|
||||
#include <cstring>
|
||||
#include "qabstractstate.h"
|
||||
#include <qabstractstate.h>
|
||||
#include "gen_qabstractstate.h"
|
||||
#include "_cgo_export.h"
|
||||
|
||||
|
@ -26,19 +26,26 @@ func (this *QAbstractState) cPointer() *C.QAbstractState {
|
||||
return this.h
|
||||
}
|
||||
|
||||
func (this *QAbstractState) UnsafePointer() unsafe.Pointer {
|
||||
if this == nil {
|
||||
return nil
|
||||
}
|
||||
return unsafe.Pointer(this.h)
|
||||
}
|
||||
|
||||
func newQAbstractState(h *C.QAbstractState) *QAbstractState {
|
||||
if h == nil {
|
||||
return nil
|
||||
}
|
||||
return &QAbstractState{h: h, QObject: newQObject_U(unsafe.Pointer(h))}
|
||||
return &QAbstractState{h: h, QObject: UnsafeNewQObject(unsafe.Pointer(h))}
|
||||
}
|
||||
|
||||
func newQAbstractState_U(h unsafe.Pointer) *QAbstractState {
|
||||
func UnsafeNewQAbstractState(h unsafe.Pointer) *QAbstractState {
|
||||
return newQAbstractState((*C.QAbstractState)(h))
|
||||
}
|
||||
|
||||
func (this *QAbstractState) MetaObject() *QMetaObject {
|
||||
return newQMetaObject_U(unsafe.Pointer(C.QAbstractState_MetaObject(this.h)))
|
||||
return UnsafeNewQMetaObject(unsafe.Pointer(C.QAbstractState_MetaObject(this.h)))
|
||||
}
|
||||
|
||||
func (this *QAbstractState) Metacast(param1 string) unsafe.Pointer {
|
||||
@ -66,11 +73,11 @@ func QAbstractState_TrUtf8(s string) string {
|
||||
}
|
||||
|
||||
func (this *QAbstractState) ParentState() *QState {
|
||||
return newQState_U(unsafe.Pointer(C.QAbstractState_ParentState(this.h)))
|
||||
return UnsafeNewQState(unsafe.Pointer(C.QAbstractState_ParentState(this.h)))
|
||||
}
|
||||
|
||||
func (this *QAbstractState) Machine() *QStateMachine {
|
||||
return newQStateMachine_U(unsafe.Pointer(C.QAbstractState_Machine(this.h)))
|
||||
return UnsafeNewQStateMachine(unsafe.Pointer(C.QAbstractState_Machine(this.h)))
|
||||
}
|
||||
|
||||
func (this *QAbstractState) Active() bool {
|
||||
|
@ -7,7 +7,7 @@
|
||||
|
||||
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||
|
||||
#include "binding.h"
|
||||
#include "../libmiqt/libmiqt.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
@ -16,7 +16,7 @@
|
||||
#include <QTextFormat>
|
||||
#include <QTextFrame>
|
||||
#include <QTextObjectInterface>
|
||||
#include "qabstracttextdocumentlayout.h"
|
||||
#include <qabstracttextdocumentlayout.h>
|
||||
#include "gen_qabstracttextdocumentlayout.h"
|
||||
#include "_cgo_export.h"
|
||||
|
||||
|
@ -26,19 +26,26 @@ func (this *QAbstractTextDocumentLayout) cPointer() *C.QAbstractTextDocumentLayo
|
||||
return this.h
|
||||
}
|
||||
|
||||
func (this *QAbstractTextDocumentLayout) UnsafePointer() unsafe.Pointer {
|
||||
if this == nil {
|
||||
return nil
|
||||
}
|
||||
return unsafe.Pointer(this.h)
|
||||
}
|
||||
|
||||
func newQAbstractTextDocumentLayout(h *C.QAbstractTextDocumentLayout) *QAbstractTextDocumentLayout {
|
||||
if h == nil {
|
||||
return nil
|
||||
}
|
||||
return &QAbstractTextDocumentLayout{h: h, QObject: newQObject_U(unsafe.Pointer(h))}
|
||||
return &QAbstractTextDocumentLayout{h: h, QObject: UnsafeNewQObject(unsafe.Pointer(h))}
|
||||
}
|
||||
|
||||
func newQAbstractTextDocumentLayout_U(h unsafe.Pointer) *QAbstractTextDocumentLayout {
|
||||
func UnsafeNewQAbstractTextDocumentLayout(h unsafe.Pointer) *QAbstractTextDocumentLayout {
|
||||
return newQAbstractTextDocumentLayout((*C.QAbstractTextDocumentLayout)(h))
|
||||
}
|
||||
|
||||
func (this *QAbstractTextDocumentLayout) MetaObject() *QMetaObject {
|
||||
return newQMetaObject_U(unsafe.Pointer(C.QAbstractTextDocumentLayout_MetaObject(this.h)))
|
||||
return UnsafeNewQMetaObject(unsafe.Pointer(C.QAbstractTextDocumentLayout_MetaObject(this.h)))
|
||||
}
|
||||
|
||||
func (this *QAbstractTextDocumentLayout) Metacast(param1 string) unsafe.Pointer {
|
||||
@ -131,11 +138,11 @@ func (this *QAbstractTextDocumentLayout) SetPaintDevice(device *QPaintDevice) {
|
||||
}
|
||||
|
||||
func (this *QAbstractTextDocumentLayout) PaintDevice() *QPaintDevice {
|
||||
return newQPaintDevice_U(unsafe.Pointer(C.QAbstractTextDocumentLayout_PaintDevice(this.h)))
|
||||
return UnsafeNewQPaintDevice(unsafe.Pointer(C.QAbstractTextDocumentLayout_PaintDevice(this.h)))
|
||||
}
|
||||
|
||||
func (this *QAbstractTextDocumentLayout) Document() *QTextDocument {
|
||||
return newQTextDocument_U(unsafe.Pointer(C.QAbstractTextDocumentLayout_Document(this.h)))
|
||||
return UnsafeNewQTextDocument(unsafe.Pointer(C.QAbstractTextDocumentLayout_Document(this.h)))
|
||||
}
|
||||
|
||||
func (this *QAbstractTextDocumentLayout) RegisterHandler(objectType int, component *QObject) {
|
||||
@ -147,7 +154,7 @@ func (this *QAbstractTextDocumentLayout) UnregisterHandler(objectType int) {
|
||||
}
|
||||
|
||||
func (this *QAbstractTextDocumentLayout) HandlerForObject(objectType int) *QTextObjectInterface {
|
||||
return newQTextObjectInterface_U(unsafe.Pointer(C.QAbstractTextDocumentLayout_HandlerForObject(this.h, (C.int)(objectType))))
|
||||
return UnsafeNewQTextObjectInterface(unsafe.Pointer(C.QAbstractTextDocumentLayout_HandlerForObject(this.h, (C.int)(objectType))))
|
||||
}
|
||||
|
||||
func (this *QAbstractTextDocumentLayout) Update() {
|
||||
@ -182,7 +189,7 @@ func miqt_exec_callback_QAbstractTextDocumentLayout_UpdateBlock(cb C.intptr_t, b
|
||||
}
|
||||
|
||||
// Convert all CABI parameters to Go parameters
|
||||
slotval1 := newQTextBlock_U(unsafe.Pointer(block))
|
||||
slotval1 := UnsafeNewQTextBlock(unsafe.Pointer(block))
|
||||
|
||||
gofunc(slotval1)
|
||||
}
|
||||
@ -202,7 +209,7 @@ func miqt_exec_callback_QAbstractTextDocumentLayout_DocumentSizeChanged(cb C.int
|
||||
}
|
||||
|
||||
// Convert all CABI parameters to Go parameters
|
||||
slotval1 := newQSizeF_U(unsafe.Pointer(newSize))
|
||||
slotval1 := UnsafeNewQSizeF(unsafe.Pointer(newSize))
|
||||
|
||||
gofunc(slotval1)
|
||||
}
|
||||
@ -290,7 +297,7 @@ func miqt_exec_callback_QAbstractTextDocumentLayout_Update1(cb C.intptr_t, param
|
||||
}
|
||||
|
||||
// Convert all CABI parameters to Go parameters
|
||||
slotval1 := newQRectF_U(unsafe.Pointer(param1))
|
||||
slotval1 := UnsafeNewQRectF(unsafe.Pointer(param1))
|
||||
|
||||
gofunc(slotval1)
|
||||
}
|
||||
@ -320,6 +327,13 @@ func (this *QTextObjectInterface) cPointer() *C.QTextObjectInterface {
|
||||
return this.h
|
||||
}
|
||||
|
||||
func (this *QTextObjectInterface) UnsafePointer() unsafe.Pointer {
|
||||
if this == nil {
|
||||
return nil
|
||||
}
|
||||
return unsafe.Pointer(this.h)
|
||||
}
|
||||
|
||||
func newQTextObjectInterface(h *C.QTextObjectInterface) *QTextObjectInterface {
|
||||
if h == nil {
|
||||
return nil
|
||||
@ -327,7 +341,7 @@ func newQTextObjectInterface(h *C.QTextObjectInterface) *QTextObjectInterface {
|
||||
return &QTextObjectInterface{h: h}
|
||||
}
|
||||
|
||||
func newQTextObjectInterface_U(h unsafe.Pointer) *QTextObjectInterface {
|
||||
func UnsafeNewQTextObjectInterface(h unsafe.Pointer) *QTextObjectInterface {
|
||||
return newQTextObjectInterface((*C.QTextObjectInterface)(h))
|
||||
}
|
||||
|
||||
@ -371,6 +385,13 @@ func (this *QAbstractTextDocumentLayout__Selection) cPointer() *C.QAbstractTextD
|
||||
return this.h
|
||||
}
|
||||
|
||||
func (this *QAbstractTextDocumentLayout__Selection) UnsafePointer() unsafe.Pointer {
|
||||
if this == nil {
|
||||
return nil
|
||||
}
|
||||
return unsafe.Pointer(this.h)
|
||||
}
|
||||
|
||||
func newQAbstractTextDocumentLayout__Selection(h *C.QAbstractTextDocumentLayout__Selection) *QAbstractTextDocumentLayout__Selection {
|
||||
if h == nil {
|
||||
return nil
|
||||
@ -378,7 +399,7 @@ func newQAbstractTextDocumentLayout__Selection(h *C.QAbstractTextDocumentLayout_
|
||||
return &QAbstractTextDocumentLayout__Selection{h: h}
|
||||
}
|
||||
|
||||
func newQAbstractTextDocumentLayout__Selection_U(h unsafe.Pointer) *QAbstractTextDocumentLayout__Selection {
|
||||
func UnsafeNewQAbstractTextDocumentLayout__Selection(h unsafe.Pointer) *QAbstractTextDocumentLayout__Selection {
|
||||
return newQAbstractTextDocumentLayout__Selection((*C.QAbstractTextDocumentLayout__Selection)(h))
|
||||
}
|
||||
|
||||
@ -417,6 +438,13 @@ func (this *QAbstractTextDocumentLayout__PaintContext) cPointer() *C.QAbstractTe
|
||||
return this.h
|
||||
}
|
||||
|
||||
func (this *QAbstractTextDocumentLayout__PaintContext) UnsafePointer() unsafe.Pointer {
|
||||
if this == nil {
|
||||
return nil
|
||||
}
|
||||
return unsafe.Pointer(this.h)
|
||||
}
|
||||
|
||||
func newQAbstractTextDocumentLayout__PaintContext(h *C.QAbstractTextDocumentLayout__PaintContext) *QAbstractTextDocumentLayout__PaintContext {
|
||||
if h == nil {
|
||||
return nil
|
||||
@ -424,7 +452,7 @@ func newQAbstractTextDocumentLayout__PaintContext(h *C.QAbstractTextDocumentLayo
|
||||
return &QAbstractTextDocumentLayout__PaintContext{h: h}
|
||||
}
|
||||
|
||||
func newQAbstractTextDocumentLayout__PaintContext_U(h unsafe.Pointer) *QAbstractTextDocumentLayout__PaintContext {
|
||||
func UnsafeNewQAbstractTextDocumentLayout__PaintContext(h unsafe.Pointer) *QAbstractTextDocumentLayout__PaintContext {
|
||||
return newQAbstractTextDocumentLayout__PaintContext((*C.QAbstractTextDocumentLayout__PaintContext)(h))
|
||||
}
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
|
||||
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||
|
||||
#include "binding.h"
|
||||
#include "../libmiqt/libmiqt.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
@ -8,7 +8,7 @@
|
||||
#include <QString>
|
||||
#include <QByteArray>
|
||||
#include <cstring>
|
||||
#include "qabstracttransition.h"
|
||||
#include <qabstracttransition.h>
|
||||
#include "gen_qabstracttransition.h"
|
||||
#include "_cgo_export.h"
|
||||
|
||||
@ -60,7 +60,7 @@ struct miqt_array* QAbstractTransition_TargetStates(const QAbstractTransition* s
|
||||
}
|
||||
|
||||
void QAbstractTransition_SetTargetStates(QAbstractTransition* self, struct miqt_array* /* of QAbstractState* */ targets) {
|
||||
QList<QAbstractState*> targets_QList;
|
||||
QList<QAbstractState *> targets_QList;
|
||||
targets_QList.reserve(targets->len);
|
||||
QAbstractState** targets_arr = static_cast<QAbstractState**>(targets->data);
|
||||
for(size_t i = 0; i < targets->len; ++i) {
|
||||
|
@ -32,19 +32,26 @@ func (this *QAbstractTransition) cPointer() *C.QAbstractTransition {
|
||||
return this.h
|
||||
}
|
||||
|
||||
func (this *QAbstractTransition) UnsafePointer() unsafe.Pointer {
|
||||
if this == nil {
|
||||
return nil
|
||||
}
|
||||
return unsafe.Pointer(this.h)
|
||||
}
|
||||
|
||||
func newQAbstractTransition(h *C.QAbstractTransition) *QAbstractTransition {
|
||||
if h == nil {
|
||||
return nil
|
||||
}
|
||||
return &QAbstractTransition{h: h, QObject: newQObject_U(unsafe.Pointer(h))}
|
||||
return &QAbstractTransition{h: h, QObject: UnsafeNewQObject(unsafe.Pointer(h))}
|
||||
}
|
||||
|
||||
func newQAbstractTransition_U(h unsafe.Pointer) *QAbstractTransition {
|
||||
func UnsafeNewQAbstractTransition(h unsafe.Pointer) *QAbstractTransition {
|
||||
return newQAbstractTransition((*C.QAbstractTransition)(h))
|
||||
}
|
||||
|
||||
func (this *QAbstractTransition) MetaObject() *QMetaObject {
|
||||
return newQMetaObject_U(unsafe.Pointer(C.QAbstractTransition_MetaObject(this.h)))
|
||||
return UnsafeNewQMetaObject(unsafe.Pointer(C.QAbstractTransition_MetaObject(this.h)))
|
||||
}
|
||||
|
||||
func (this *QAbstractTransition) Metacast(param1 string) unsafe.Pointer {
|
||||
@ -72,11 +79,11 @@ func QAbstractTransition_TrUtf8(s string) string {
|
||||
}
|
||||
|
||||
func (this *QAbstractTransition) SourceState() *QState {
|
||||
return newQState_U(unsafe.Pointer(C.QAbstractTransition_SourceState(this.h)))
|
||||
return UnsafeNewQState(unsafe.Pointer(C.QAbstractTransition_SourceState(this.h)))
|
||||
}
|
||||
|
||||
func (this *QAbstractTransition) TargetState() *QAbstractState {
|
||||
return newQAbstractState_U(unsafe.Pointer(C.QAbstractTransition_TargetState(this.h)))
|
||||
return UnsafeNewQAbstractState(unsafe.Pointer(C.QAbstractTransition_TargetState(this.h)))
|
||||
}
|
||||
|
||||
func (this *QAbstractTransition) SetTargetState(target *QAbstractState) {
|
||||
@ -88,7 +95,7 @@ func (this *QAbstractTransition) TargetStates() []*QAbstractState {
|
||||
_ret := make([]*QAbstractState, int(_ma.len))
|
||||
_outCast := (*[0xffff]*C.QAbstractState)(unsafe.Pointer(_ma.data)) // hey ya
|
||||
for i := 0; i < int(_ma.len); i++ {
|
||||
_ret[i] = newQAbstractState_U(unsafe.Pointer(_outCast[i]))
|
||||
_ret[i] = UnsafeNewQAbstractState(unsafe.Pointer(_outCast[i]))
|
||||
}
|
||||
C.free(unsafe.Pointer(_ma))
|
||||
return _ret
|
||||
@ -115,7 +122,7 @@ func (this *QAbstractTransition) SetTransitionType(typeVal QAbstractTransition__
|
||||
}
|
||||
|
||||
func (this *QAbstractTransition) Machine() *QStateMachine {
|
||||
return newQStateMachine_U(unsafe.Pointer(C.QAbstractTransition_Machine(this.h)))
|
||||
return UnsafeNewQStateMachine(unsafe.Pointer(C.QAbstractTransition_Machine(this.h)))
|
||||
}
|
||||
|
||||
func (this *QAbstractTransition) AddAnimation(animation *QAbstractAnimation) {
|
||||
@ -131,7 +138,7 @@ func (this *QAbstractTransition) Animations() []*QAbstractAnimation {
|
||||
_ret := make([]*QAbstractAnimation, int(_ma.len))
|
||||
_outCast := (*[0xffff]*C.QAbstractAnimation)(unsafe.Pointer(_ma.data)) // hey ya
|
||||
for i := 0; i < int(_ma.len); i++ {
|
||||
_ret[i] = newQAbstractAnimation_U(unsafe.Pointer(_outCast[i]))
|
||||
_ret[i] = UnsafeNewQAbstractAnimation(unsafe.Pointer(_outCast[i]))
|
||||
}
|
||||
C.free(unsafe.Pointer(_ma))
|
||||
return _ret
|
||||
|
@ -7,7 +7,7 @@
|
||||
|
||||
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||
|
||||
#include "binding.h"
|
||||
#include "../libmiqt/libmiqt.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
@ -29,7 +29,7 @@
|
||||
#include <cstring>
|
||||
#include <QVariant>
|
||||
#include <QWindow>
|
||||
#include "qaccessible.h"
|
||||
#include <qaccessible.h>
|
||||
#include "gen_qaccessible.h"
|
||||
#include "_cgo_export.h"
|
||||
|
||||
|
@ -9,6 +9,7 @@ package qt
|
||||
import "C"
|
||||
|
||||
import (
|
||||
"github.com/mappu/miqt/libmiqt"
|
||||
"runtime"
|
||||
"unsafe"
|
||||
)
|
||||
@ -236,6 +237,13 @@ func (this *QAccessible) cPointer() *C.QAccessible {
|
||||
return this.h
|
||||
}
|
||||
|
||||
func (this *QAccessible) UnsafePointer() unsafe.Pointer {
|
||||
if this == nil {
|
||||
return nil
|
||||
}
|
||||
return unsafe.Pointer(this.h)
|
||||
}
|
||||
|
||||
func newQAccessible(h *C.QAccessible) *QAccessible {
|
||||
if h == nil {
|
||||
return nil
|
||||
@ -243,7 +251,7 @@ func newQAccessible(h *C.QAccessible) *QAccessible {
|
||||
return &QAccessible{h: h}
|
||||
}
|
||||
|
||||
func newQAccessible_U(h unsafe.Pointer) *QAccessible {
|
||||
func UnsafeNewQAccessible(h unsafe.Pointer) *QAccessible {
|
||||
return newQAccessible((*C.QAccessible)(h))
|
||||
}
|
||||
|
||||
@ -256,7 +264,7 @@ func QAccessible_RemoveActivationObserver(param1 *QAccessible__ActivationObserve
|
||||
}
|
||||
|
||||
func QAccessible_QueryAccessibleInterface(param1 *QObject) *QAccessibleInterface {
|
||||
return newQAccessibleInterface_U(unsafe.Pointer(C.QAccessible_QueryAccessibleInterface(param1.cPointer())))
|
||||
return UnsafeNewQAccessibleInterface(unsafe.Pointer(C.QAccessible_QueryAccessibleInterface(param1.cPointer())))
|
||||
}
|
||||
|
||||
func QAccessible_UniqueId(iface *QAccessibleInterface) uint {
|
||||
@ -264,7 +272,7 @@ func QAccessible_UniqueId(iface *QAccessibleInterface) uint {
|
||||
}
|
||||
|
||||
func QAccessible_AccessibleInterface(uniqueId uint) *QAccessibleInterface {
|
||||
return newQAccessibleInterface_U(unsafe.Pointer(C.QAccessible_AccessibleInterface((C.uint)(uniqueId))))
|
||||
return UnsafeNewQAccessibleInterface(unsafe.Pointer(C.QAccessible_AccessibleInterface((C.uint)(uniqueId))))
|
||||
}
|
||||
|
||||
func QAccessible_RegisterAccessibleInterface(iface *QAccessibleInterface) uint {
|
||||
@ -320,6 +328,13 @@ func (this *QAccessibleInterface) cPointer() *C.QAccessibleInterface {
|
||||
return this.h
|
||||
}
|
||||
|
||||
func (this *QAccessibleInterface) UnsafePointer() unsafe.Pointer {
|
||||
if this == nil {
|
||||
return nil
|
||||
}
|
||||
return unsafe.Pointer(this.h)
|
||||
}
|
||||
|
||||
func newQAccessibleInterface(h *C.QAccessibleInterface) *QAccessibleInterface {
|
||||
if h == nil {
|
||||
return nil
|
||||
@ -327,7 +342,7 @@ func newQAccessibleInterface(h *C.QAccessibleInterface) *QAccessibleInterface {
|
||||
return &QAccessibleInterface{h: h}
|
||||
}
|
||||
|
||||
func newQAccessibleInterface_U(h unsafe.Pointer) *QAccessibleInterface {
|
||||
func UnsafeNewQAccessibleInterface(h unsafe.Pointer) *QAccessibleInterface {
|
||||
return newQAccessibleInterface((*C.QAccessibleInterface)(h))
|
||||
}
|
||||
|
||||
@ -336,27 +351,27 @@ func (this *QAccessibleInterface) IsValid() bool {
|
||||
}
|
||||
|
||||
func (this *QAccessibleInterface) Object() *QObject {
|
||||
return newQObject_U(unsafe.Pointer(C.QAccessibleInterface_Object(this.h)))
|
||||
return UnsafeNewQObject(unsafe.Pointer(C.QAccessibleInterface_Object(this.h)))
|
||||
}
|
||||
|
||||
func (this *QAccessibleInterface) Window() *QWindow {
|
||||
return newQWindow_U(unsafe.Pointer(C.QAccessibleInterface_Window(this.h)))
|
||||
return UnsafeNewQWindow(unsafe.Pointer(C.QAccessibleInterface_Window(this.h)))
|
||||
}
|
||||
|
||||
func (this *QAccessibleInterface) FocusChild() *QAccessibleInterface {
|
||||
return newQAccessibleInterface_U(unsafe.Pointer(C.QAccessibleInterface_FocusChild(this.h)))
|
||||
return UnsafeNewQAccessibleInterface(unsafe.Pointer(C.QAccessibleInterface_FocusChild(this.h)))
|
||||
}
|
||||
|
||||
func (this *QAccessibleInterface) ChildAt(x int, y int) *QAccessibleInterface {
|
||||
return newQAccessibleInterface_U(unsafe.Pointer(C.QAccessibleInterface_ChildAt(this.h, (C.int)(x), (C.int)(y))))
|
||||
return UnsafeNewQAccessibleInterface(unsafe.Pointer(C.QAccessibleInterface_ChildAt(this.h, (C.int)(x), (C.int)(y))))
|
||||
}
|
||||
|
||||
func (this *QAccessibleInterface) Parent() *QAccessibleInterface {
|
||||
return newQAccessibleInterface_U(unsafe.Pointer(C.QAccessibleInterface_Parent(this.h)))
|
||||
return UnsafeNewQAccessibleInterface(unsafe.Pointer(C.QAccessibleInterface_Parent(this.h)))
|
||||
}
|
||||
|
||||
func (this *QAccessibleInterface) Child(index int) *QAccessibleInterface {
|
||||
return newQAccessibleInterface_U(unsafe.Pointer(C.QAccessibleInterface_Child(this.h, (C.int)(index))))
|
||||
return UnsafeNewQAccessibleInterface(unsafe.Pointer(C.QAccessibleInterface_Child(this.h, (C.int)(index))))
|
||||
}
|
||||
|
||||
func (this *QAccessibleInterface) ChildCount() int {
|
||||
@ -375,7 +390,7 @@ func (this *QAccessibleInterface) Text(t QAccessible__Text) string {
|
||||
}
|
||||
|
||||
func (this *QAccessibleInterface) SetText(t QAccessible__Text, text string) {
|
||||
text_ms := miqt_strdupg(text)
|
||||
text_ms := libmiqt.Strdupg(text)
|
||||
defer C.free(text_ms)
|
||||
C.QAccessibleInterface_SetText(this.h, (C.int)(t), (*C.struct_miqt_string)(text_ms))
|
||||
}
|
||||
@ -413,31 +428,31 @@ func (this *QAccessibleInterface) BackgroundColor() *QColor {
|
||||
}
|
||||
|
||||
func (this *QAccessibleInterface) TextInterface() *QAccessibleTextInterface {
|
||||
return newQAccessibleTextInterface_U(unsafe.Pointer(C.QAccessibleInterface_TextInterface(this.h)))
|
||||
return UnsafeNewQAccessibleTextInterface(unsafe.Pointer(C.QAccessibleInterface_TextInterface(this.h)))
|
||||
}
|
||||
|
||||
func (this *QAccessibleInterface) EditableTextInterface() *QAccessibleEditableTextInterface {
|
||||
return newQAccessibleEditableTextInterface_U(unsafe.Pointer(C.QAccessibleInterface_EditableTextInterface(this.h)))
|
||||
return UnsafeNewQAccessibleEditableTextInterface(unsafe.Pointer(C.QAccessibleInterface_EditableTextInterface(this.h)))
|
||||
}
|
||||
|
||||
func (this *QAccessibleInterface) ValueInterface() *QAccessibleValueInterface {
|
||||
return newQAccessibleValueInterface_U(unsafe.Pointer(C.QAccessibleInterface_ValueInterface(this.h)))
|
||||
return UnsafeNewQAccessibleValueInterface(unsafe.Pointer(C.QAccessibleInterface_ValueInterface(this.h)))
|
||||
}
|
||||
|
||||
func (this *QAccessibleInterface) ActionInterface() *QAccessibleActionInterface {
|
||||
return newQAccessibleActionInterface_U(unsafe.Pointer(C.QAccessibleInterface_ActionInterface(this.h)))
|
||||
return UnsafeNewQAccessibleActionInterface(unsafe.Pointer(C.QAccessibleInterface_ActionInterface(this.h)))
|
||||
}
|
||||
|
||||
func (this *QAccessibleInterface) ImageInterface() *QAccessibleImageInterface {
|
||||
return newQAccessibleImageInterface_U(unsafe.Pointer(C.QAccessibleInterface_ImageInterface(this.h)))
|
||||
return UnsafeNewQAccessibleImageInterface(unsafe.Pointer(C.QAccessibleInterface_ImageInterface(this.h)))
|
||||
}
|
||||
|
||||
func (this *QAccessibleInterface) TableInterface() *QAccessibleTableInterface {
|
||||
return newQAccessibleTableInterface_U(unsafe.Pointer(C.QAccessibleInterface_TableInterface(this.h)))
|
||||
return UnsafeNewQAccessibleTableInterface(unsafe.Pointer(C.QAccessibleInterface_TableInterface(this.h)))
|
||||
}
|
||||
|
||||
func (this *QAccessibleInterface) TableCellInterface() *QAccessibleTableCellInterface {
|
||||
return newQAccessibleTableCellInterface_U(unsafe.Pointer(C.QAccessibleInterface_TableCellInterface(this.h)))
|
||||
return UnsafeNewQAccessibleTableCellInterface(unsafe.Pointer(C.QAccessibleInterface_TableCellInterface(this.h)))
|
||||
}
|
||||
|
||||
func (this *QAccessibleInterface) VirtualHook(id int, data unsafe.Pointer) {
|
||||
@ -459,6 +474,13 @@ func (this *QAccessibleTextInterface) cPointer() *C.QAccessibleTextInterface {
|
||||
return this.h
|
||||
}
|
||||
|
||||
func (this *QAccessibleTextInterface) UnsafePointer() unsafe.Pointer {
|
||||
if this == nil {
|
||||
return nil
|
||||
}
|
||||
return unsafe.Pointer(this.h)
|
||||
}
|
||||
|
||||
func newQAccessibleTextInterface(h *C.QAccessibleTextInterface) *QAccessibleTextInterface {
|
||||
if h == nil {
|
||||
return nil
|
||||
@ -466,7 +488,7 @@ func newQAccessibleTextInterface(h *C.QAccessibleTextInterface) *QAccessibleText
|
||||
return &QAccessibleTextInterface{h: h}
|
||||
}
|
||||
|
||||
func newQAccessibleTextInterface_U(h unsafe.Pointer) *QAccessibleTextInterface {
|
||||
func UnsafeNewQAccessibleTextInterface(h unsafe.Pointer) *QAccessibleTextInterface {
|
||||
return newQAccessibleTextInterface((*C.QAccessibleTextInterface)(h))
|
||||
}
|
||||
|
||||
@ -581,6 +603,13 @@ func (this *QAccessibleEditableTextInterface) cPointer() *C.QAccessibleEditableT
|
||||
return this.h
|
||||
}
|
||||
|
||||
func (this *QAccessibleEditableTextInterface) UnsafePointer() unsafe.Pointer {
|
||||
if this == nil {
|
||||
return nil
|
||||
}
|
||||
return unsafe.Pointer(this.h)
|
||||
}
|
||||
|
||||
func newQAccessibleEditableTextInterface(h *C.QAccessibleEditableTextInterface) *QAccessibleEditableTextInterface {
|
||||
if h == nil {
|
||||
return nil
|
||||
@ -588,7 +617,7 @@ func newQAccessibleEditableTextInterface(h *C.QAccessibleEditableTextInterface)
|
||||
return &QAccessibleEditableTextInterface{h: h}
|
||||
}
|
||||
|
||||
func newQAccessibleEditableTextInterface_U(h unsafe.Pointer) *QAccessibleEditableTextInterface {
|
||||
func UnsafeNewQAccessibleEditableTextInterface(h unsafe.Pointer) *QAccessibleEditableTextInterface {
|
||||
return newQAccessibleEditableTextInterface((*C.QAccessibleEditableTextInterface)(h))
|
||||
}
|
||||
|
||||
@ -597,13 +626,13 @@ func (this *QAccessibleEditableTextInterface) DeleteText(startOffset int, endOff
|
||||
}
|
||||
|
||||
func (this *QAccessibleEditableTextInterface) InsertText(offset int, text string) {
|
||||
text_ms := miqt_strdupg(text)
|
||||
text_ms := libmiqt.Strdupg(text)
|
||||
defer C.free(text_ms)
|
||||
C.QAccessibleEditableTextInterface_InsertText(this.h, (C.int)(offset), (*C.struct_miqt_string)(text_ms))
|
||||
}
|
||||
|
||||
func (this *QAccessibleEditableTextInterface) ReplaceText(startOffset int, endOffset int, text string) {
|
||||
text_ms := miqt_strdupg(text)
|
||||
text_ms := libmiqt.Strdupg(text)
|
||||
defer C.free(text_ms)
|
||||
C.QAccessibleEditableTextInterface_ReplaceText(this.h, (C.int)(startOffset), (C.int)(endOffset), (*C.struct_miqt_string)(text_ms))
|
||||
}
|
||||
@ -637,6 +666,13 @@ func (this *QAccessibleValueInterface) cPointer() *C.QAccessibleValueInterface {
|
||||
return this.h
|
||||
}
|
||||
|
||||
func (this *QAccessibleValueInterface) UnsafePointer() unsafe.Pointer {
|
||||
if this == nil {
|
||||
return nil
|
||||
}
|
||||
return unsafe.Pointer(this.h)
|
||||
}
|
||||
|
||||
func newQAccessibleValueInterface(h *C.QAccessibleValueInterface) *QAccessibleValueInterface {
|
||||
if h == nil {
|
||||
return nil
|
||||
@ -644,7 +680,7 @@ func newQAccessibleValueInterface(h *C.QAccessibleValueInterface) *QAccessibleVa
|
||||
return &QAccessibleValueInterface{h: h}
|
||||
}
|
||||
|
||||
func newQAccessibleValueInterface_U(h unsafe.Pointer) *QAccessibleValueInterface {
|
||||
func UnsafeNewQAccessibleValueInterface(h unsafe.Pointer) *QAccessibleValueInterface {
|
||||
return newQAccessibleValueInterface((*C.QAccessibleValueInterface)(h))
|
||||
}
|
||||
|
||||
@ -709,6 +745,13 @@ func (this *QAccessibleTableCellInterface) cPointer() *C.QAccessibleTableCellInt
|
||||
return this.h
|
||||
}
|
||||
|
||||
func (this *QAccessibleTableCellInterface) UnsafePointer() unsafe.Pointer {
|
||||
if this == nil {
|
||||
return nil
|
||||
}
|
||||
return unsafe.Pointer(this.h)
|
||||
}
|
||||
|
||||
func newQAccessibleTableCellInterface(h *C.QAccessibleTableCellInterface) *QAccessibleTableCellInterface {
|
||||
if h == nil {
|
||||
return nil
|
||||
@ -716,7 +759,7 @@ func newQAccessibleTableCellInterface(h *C.QAccessibleTableCellInterface) *QAcce
|
||||
return &QAccessibleTableCellInterface{h: h}
|
||||
}
|
||||
|
||||
func newQAccessibleTableCellInterface_U(h unsafe.Pointer) *QAccessibleTableCellInterface {
|
||||
func UnsafeNewQAccessibleTableCellInterface(h unsafe.Pointer) *QAccessibleTableCellInterface {
|
||||
return newQAccessibleTableCellInterface((*C.QAccessibleTableCellInterface)(h))
|
||||
}
|
||||
|
||||
@ -729,7 +772,7 @@ func (this *QAccessibleTableCellInterface) ColumnHeaderCells() []*QAccessibleInt
|
||||
_ret := make([]*QAccessibleInterface, int(_ma.len))
|
||||
_outCast := (*[0xffff]*C.QAccessibleInterface)(unsafe.Pointer(_ma.data)) // hey ya
|
||||
for i := 0; i < int(_ma.len); i++ {
|
||||
_ret[i] = newQAccessibleInterface_U(unsafe.Pointer(_outCast[i]))
|
||||
_ret[i] = UnsafeNewQAccessibleInterface(unsafe.Pointer(_outCast[i]))
|
||||
}
|
||||
C.free(unsafe.Pointer(_ma))
|
||||
return _ret
|
||||
@ -740,7 +783,7 @@ func (this *QAccessibleTableCellInterface) RowHeaderCells() []*QAccessibleInterf
|
||||
_ret := make([]*QAccessibleInterface, int(_ma.len))
|
||||
_outCast := (*[0xffff]*C.QAccessibleInterface)(unsafe.Pointer(_ma.data)) // hey ya
|
||||
for i := 0; i < int(_ma.len); i++ {
|
||||
_ret[i] = newQAccessibleInterface_U(unsafe.Pointer(_outCast[i]))
|
||||
_ret[i] = UnsafeNewQAccessibleInterface(unsafe.Pointer(_outCast[i]))
|
||||
}
|
||||
C.free(unsafe.Pointer(_ma))
|
||||
return _ret
|
||||
@ -763,7 +806,7 @@ func (this *QAccessibleTableCellInterface) RowExtent() int {
|
||||
}
|
||||
|
||||
func (this *QAccessibleTableCellInterface) Table() *QAccessibleInterface {
|
||||
return newQAccessibleInterface_U(unsafe.Pointer(C.QAccessibleTableCellInterface_Table(this.h)))
|
||||
return UnsafeNewQAccessibleInterface(unsafe.Pointer(C.QAccessibleTableCellInterface_Table(this.h)))
|
||||
}
|
||||
|
||||
func (this *QAccessibleTableCellInterface) OperatorAssign(param1 *QAccessibleTableCellInterface) {
|
||||
@ -795,6 +838,13 @@ func (this *QAccessibleTableInterface) cPointer() *C.QAccessibleTableInterface {
|
||||
return this.h
|
||||
}
|
||||
|
||||
func (this *QAccessibleTableInterface) UnsafePointer() unsafe.Pointer {
|
||||
if this == nil {
|
||||
return nil
|
||||
}
|
||||
return unsafe.Pointer(this.h)
|
||||
}
|
||||
|
||||
func newQAccessibleTableInterface(h *C.QAccessibleTableInterface) *QAccessibleTableInterface {
|
||||
if h == nil {
|
||||
return nil
|
||||
@ -802,20 +852,20 @@ func newQAccessibleTableInterface(h *C.QAccessibleTableInterface) *QAccessibleTa
|
||||
return &QAccessibleTableInterface{h: h}
|
||||
}
|
||||
|
||||
func newQAccessibleTableInterface_U(h unsafe.Pointer) *QAccessibleTableInterface {
|
||||
func UnsafeNewQAccessibleTableInterface(h unsafe.Pointer) *QAccessibleTableInterface {
|
||||
return newQAccessibleTableInterface((*C.QAccessibleTableInterface)(h))
|
||||
}
|
||||
|
||||
func (this *QAccessibleTableInterface) Caption() *QAccessibleInterface {
|
||||
return newQAccessibleInterface_U(unsafe.Pointer(C.QAccessibleTableInterface_Caption(this.h)))
|
||||
return UnsafeNewQAccessibleInterface(unsafe.Pointer(C.QAccessibleTableInterface_Caption(this.h)))
|
||||
}
|
||||
|
||||
func (this *QAccessibleTableInterface) Summary() *QAccessibleInterface {
|
||||
return newQAccessibleInterface_U(unsafe.Pointer(C.QAccessibleTableInterface_Summary(this.h)))
|
||||
return UnsafeNewQAccessibleInterface(unsafe.Pointer(C.QAccessibleTableInterface_Summary(this.h)))
|
||||
}
|
||||
|
||||
func (this *QAccessibleTableInterface) CellAt(row int, column int) *QAccessibleInterface {
|
||||
return newQAccessibleInterface_U(unsafe.Pointer(C.QAccessibleTableInterface_CellAt(this.h, (C.int)(row), (C.int)(column))))
|
||||
return UnsafeNewQAccessibleInterface(unsafe.Pointer(C.QAccessibleTableInterface_CellAt(this.h, (C.int)(row), (C.int)(column))))
|
||||
}
|
||||
|
||||
func (this *QAccessibleTableInterface) SelectedCellCount() int {
|
||||
@ -827,7 +877,7 @@ func (this *QAccessibleTableInterface) SelectedCells() []*QAccessibleInterface {
|
||||
_ret := make([]*QAccessibleInterface, int(_ma.len))
|
||||
_outCast := (*[0xffff]*C.QAccessibleInterface)(unsafe.Pointer(_ma.data)) // hey ya
|
||||
for i := 0; i < int(_ma.len); i++ {
|
||||
_ret[i] = newQAccessibleInterface_U(unsafe.Pointer(_outCast[i]))
|
||||
_ret[i] = UnsafeNewQAccessibleInterface(unsafe.Pointer(_outCast[i]))
|
||||
}
|
||||
C.free(unsafe.Pointer(_ma))
|
||||
return _ret
|
||||
@ -938,6 +988,13 @@ func (this *QAccessibleActionInterface) cPointer() *C.QAccessibleActionInterface
|
||||
return this.h
|
||||
}
|
||||
|
||||
func (this *QAccessibleActionInterface) UnsafePointer() unsafe.Pointer {
|
||||
if this == nil {
|
||||
return nil
|
||||
}
|
||||
return unsafe.Pointer(this.h)
|
||||
}
|
||||
|
||||
func newQAccessibleActionInterface(h *C.QAccessibleActionInterface) *QAccessibleActionInterface {
|
||||
if h == nil {
|
||||
return nil
|
||||
@ -945,7 +1002,7 @@ func newQAccessibleActionInterface(h *C.QAccessibleActionInterface) *QAccessible
|
||||
return &QAccessibleActionInterface{h: h}
|
||||
}
|
||||
|
||||
func newQAccessibleActionInterface_U(h unsafe.Pointer) *QAccessibleActionInterface {
|
||||
func UnsafeNewQAccessibleActionInterface(h unsafe.Pointer) *QAccessibleActionInterface {
|
||||
return newQAccessibleActionInterface((*C.QAccessibleActionInterface)(h))
|
||||
}
|
||||
|
||||
@ -982,7 +1039,7 @@ func (this *QAccessibleActionInterface) ActionNames() []string {
|
||||
}
|
||||
|
||||
func (this *QAccessibleActionInterface) LocalizedActionName(name string) string {
|
||||
name_ms := miqt_strdupg(name)
|
||||
name_ms := libmiqt.Strdupg(name)
|
||||
defer C.free(name_ms)
|
||||
var _ms *C.struct_miqt_string = C.QAccessibleActionInterface_LocalizedActionName(this.h, (*C.struct_miqt_string)(name_ms))
|
||||
_ret := C.GoStringN(&_ms.data, C.int(int64(_ms.len)))
|
||||
@ -991,7 +1048,7 @@ func (this *QAccessibleActionInterface) LocalizedActionName(name string) string
|
||||
}
|
||||
|
||||
func (this *QAccessibleActionInterface) LocalizedActionDescription(name string) string {
|
||||
name_ms := miqt_strdupg(name)
|
||||
name_ms := libmiqt.Strdupg(name)
|
||||
defer C.free(name_ms)
|
||||
var _ms *C.struct_miqt_string = C.QAccessibleActionInterface_LocalizedActionDescription(this.h, (*C.struct_miqt_string)(name_ms))
|
||||
_ret := C.GoStringN(&_ms.data, C.int(int64(_ms.len)))
|
||||
@ -1000,13 +1057,13 @@ func (this *QAccessibleActionInterface) LocalizedActionDescription(name string)
|
||||
}
|
||||
|
||||
func (this *QAccessibleActionInterface) DoAction(actionName string) {
|
||||
actionName_ms := miqt_strdupg(actionName)
|
||||
actionName_ms := libmiqt.Strdupg(actionName)
|
||||
defer C.free(actionName_ms)
|
||||
C.QAccessibleActionInterface_DoAction(this.h, (*C.struct_miqt_string)(actionName_ms))
|
||||
}
|
||||
|
||||
func (this *QAccessibleActionInterface) KeyBindingsForAction(actionName string) []string {
|
||||
actionName_ms := miqt_strdupg(actionName)
|
||||
actionName_ms := libmiqt.Strdupg(actionName)
|
||||
defer C.free(actionName_ms)
|
||||
var _ma *C.struct_miqt_array = C.QAccessibleActionInterface_KeyBindingsForAction(this.h, (*C.struct_miqt_string)(actionName_ms))
|
||||
_ret := make([]string, int(_ma.len))
|
||||
@ -1178,6 +1235,13 @@ func (this *QAccessibleImageInterface) cPointer() *C.QAccessibleImageInterface {
|
||||
return this.h
|
||||
}
|
||||
|
||||
func (this *QAccessibleImageInterface) UnsafePointer() unsafe.Pointer {
|
||||
if this == nil {
|
||||
return nil
|
||||
}
|
||||
return unsafe.Pointer(this.h)
|
||||
}
|
||||
|
||||
func newQAccessibleImageInterface(h *C.QAccessibleImageInterface) *QAccessibleImageInterface {
|
||||
if h == nil {
|
||||
return nil
|
||||
@ -1185,7 +1249,7 @@ func newQAccessibleImageInterface(h *C.QAccessibleImageInterface) *QAccessibleIm
|
||||
return &QAccessibleImageInterface{h: h}
|
||||
}
|
||||
|
||||
func newQAccessibleImageInterface_U(h unsafe.Pointer) *QAccessibleImageInterface {
|
||||
func UnsafeNewQAccessibleImageInterface(h unsafe.Pointer) *QAccessibleImageInterface {
|
||||
return newQAccessibleImageInterface((*C.QAccessibleImageInterface)(h))
|
||||
}
|
||||
|
||||
@ -1239,6 +1303,13 @@ func (this *QAccessibleEvent) cPointer() *C.QAccessibleEvent {
|
||||
return this.h
|
||||
}
|
||||
|
||||
func (this *QAccessibleEvent) UnsafePointer() unsafe.Pointer {
|
||||
if this == nil {
|
||||
return nil
|
||||
}
|
||||
return unsafe.Pointer(this.h)
|
||||
}
|
||||
|
||||
func newQAccessibleEvent(h *C.QAccessibleEvent) *QAccessibleEvent {
|
||||
if h == nil {
|
||||
return nil
|
||||
@ -1246,7 +1317,7 @@ func newQAccessibleEvent(h *C.QAccessibleEvent) *QAccessibleEvent {
|
||||
return &QAccessibleEvent{h: h}
|
||||
}
|
||||
|
||||
func newQAccessibleEvent_U(h unsafe.Pointer) *QAccessibleEvent {
|
||||
func UnsafeNewQAccessibleEvent(h unsafe.Pointer) *QAccessibleEvent {
|
||||
return newQAccessibleEvent((*C.QAccessibleEvent)(h))
|
||||
}
|
||||
|
||||
@ -1267,7 +1338,7 @@ func (this *QAccessibleEvent) Type() QAccessible__Event {
|
||||
}
|
||||
|
||||
func (this *QAccessibleEvent) Object() *QObject {
|
||||
return newQObject_U(unsafe.Pointer(C.QAccessibleEvent_Object(this.h)))
|
||||
return UnsafeNewQObject(unsafe.Pointer(C.QAccessibleEvent_Object(this.h)))
|
||||
}
|
||||
|
||||
func (this *QAccessibleEvent) UniqueId() uint {
|
||||
@ -1283,7 +1354,7 @@ func (this *QAccessibleEvent) Child() int {
|
||||
}
|
||||
|
||||
func (this *QAccessibleEvent) AccessibleInterface() *QAccessibleInterface {
|
||||
return newQAccessibleInterface_U(unsafe.Pointer(C.QAccessibleEvent_AccessibleInterface(this.h)))
|
||||
return UnsafeNewQAccessibleInterface(unsafe.Pointer(C.QAccessibleEvent_AccessibleInterface(this.h)))
|
||||
}
|
||||
|
||||
// Delete this object from C++ memory.
|
||||
@ -1312,14 +1383,21 @@ func (this *QAccessibleStateChangeEvent) cPointer() *C.QAccessibleStateChangeEve
|
||||
return this.h
|
||||
}
|
||||
|
||||
func (this *QAccessibleStateChangeEvent) UnsafePointer() unsafe.Pointer {
|
||||
if this == nil {
|
||||
return nil
|
||||
}
|
||||
return unsafe.Pointer(this.h)
|
||||
}
|
||||
|
||||
func newQAccessibleStateChangeEvent(h *C.QAccessibleStateChangeEvent) *QAccessibleStateChangeEvent {
|
||||
if h == nil {
|
||||
return nil
|
||||
}
|
||||
return &QAccessibleStateChangeEvent{h: h, QAccessibleEvent: newQAccessibleEvent_U(unsafe.Pointer(h))}
|
||||
return &QAccessibleStateChangeEvent{h: h, QAccessibleEvent: UnsafeNewQAccessibleEvent(unsafe.Pointer(h))}
|
||||
}
|
||||
|
||||
func newQAccessibleStateChangeEvent_U(h unsafe.Pointer) *QAccessibleStateChangeEvent {
|
||||
func UnsafeNewQAccessibleStateChangeEvent(h unsafe.Pointer) *QAccessibleStateChangeEvent {
|
||||
return newQAccessibleStateChangeEvent((*C.QAccessibleStateChangeEvent)(h))
|
||||
}
|
||||
|
||||
@ -1368,14 +1446,21 @@ func (this *QAccessibleTextCursorEvent) cPointer() *C.QAccessibleTextCursorEvent
|
||||
return this.h
|
||||
}
|
||||
|
||||
func (this *QAccessibleTextCursorEvent) UnsafePointer() unsafe.Pointer {
|
||||
if this == nil {
|
||||
return nil
|
||||
}
|
||||
return unsafe.Pointer(this.h)
|
||||
}
|
||||
|
||||
func newQAccessibleTextCursorEvent(h *C.QAccessibleTextCursorEvent) *QAccessibleTextCursorEvent {
|
||||
if h == nil {
|
||||
return nil
|
||||
}
|
||||
return &QAccessibleTextCursorEvent{h: h, QAccessibleEvent: newQAccessibleEvent_U(unsafe.Pointer(h))}
|
||||
return &QAccessibleTextCursorEvent{h: h, QAccessibleEvent: UnsafeNewQAccessibleEvent(unsafe.Pointer(h))}
|
||||
}
|
||||
|
||||
func newQAccessibleTextCursorEvent_U(h unsafe.Pointer) *QAccessibleTextCursorEvent {
|
||||
func UnsafeNewQAccessibleTextCursorEvent(h unsafe.Pointer) *QAccessibleTextCursorEvent {
|
||||
return newQAccessibleTextCursorEvent((*C.QAccessibleTextCursorEvent)(h))
|
||||
}
|
||||
|
||||
@ -1425,14 +1510,21 @@ func (this *QAccessibleTextSelectionEvent) cPointer() *C.QAccessibleTextSelectio
|
||||
return this.h
|
||||
}
|
||||
|
||||
func (this *QAccessibleTextSelectionEvent) UnsafePointer() unsafe.Pointer {
|
||||
if this == nil {
|
||||
return nil
|
||||
}
|
||||
return unsafe.Pointer(this.h)
|
||||
}
|
||||
|
||||
func newQAccessibleTextSelectionEvent(h *C.QAccessibleTextSelectionEvent) *QAccessibleTextSelectionEvent {
|
||||
if h == nil {
|
||||
return nil
|
||||
}
|
||||
return &QAccessibleTextSelectionEvent{h: h, QAccessibleTextCursorEvent: newQAccessibleTextCursorEvent_U(unsafe.Pointer(h))}
|
||||
return &QAccessibleTextSelectionEvent{h: h, QAccessibleTextCursorEvent: UnsafeNewQAccessibleTextCursorEvent(unsafe.Pointer(h))}
|
||||
}
|
||||
|
||||
func newQAccessibleTextSelectionEvent_U(h unsafe.Pointer) *QAccessibleTextSelectionEvent {
|
||||
func UnsafeNewQAccessibleTextSelectionEvent(h unsafe.Pointer) *QAccessibleTextSelectionEvent {
|
||||
return newQAccessibleTextSelectionEvent((*C.QAccessibleTextSelectionEvent)(h))
|
||||
}
|
||||
|
||||
@ -1486,20 +1578,27 @@ func (this *QAccessibleTextInsertEvent) cPointer() *C.QAccessibleTextInsertEvent
|
||||
return this.h
|
||||
}
|
||||
|
||||
func (this *QAccessibleTextInsertEvent) UnsafePointer() unsafe.Pointer {
|
||||
if this == nil {
|
||||
return nil
|
||||
}
|
||||
return unsafe.Pointer(this.h)
|
||||
}
|
||||
|
||||
func newQAccessibleTextInsertEvent(h *C.QAccessibleTextInsertEvent) *QAccessibleTextInsertEvent {
|
||||
if h == nil {
|
||||
return nil
|
||||
}
|
||||
return &QAccessibleTextInsertEvent{h: h, QAccessibleTextCursorEvent: newQAccessibleTextCursorEvent_U(unsafe.Pointer(h))}
|
||||
return &QAccessibleTextInsertEvent{h: h, QAccessibleTextCursorEvent: UnsafeNewQAccessibleTextCursorEvent(unsafe.Pointer(h))}
|
||||
}
|
||||
|
||||
func newQAccessibleTextInsertEvent_U(h unsafe.Pointer) *QAccessibleTextInsertEvent {
|
||||
func UnsafeNewQAccessibleTextInsertEvent(h unsafe.Pointer) *QAccessibleTextInsertEvent {
|
||||
return newQAccessibleTextInsertEvent((*C.QAccessibleTextInsertEvent)(h))
|
||||
}
|
||||
|
||||
// NewQAccessibleTextInsertEvent constructs a new QAccessibleTextInsertEvent object.
|
||||
func NewQAccessibleTextInsertEvent(obj *QObject, position int, text string) *QAccessibleTextInsertEvent {
|
||||
text_ms := miqt_strdupg(text)
|
||||
text_ms := libmiqt.Strdupg(text)
|
||||
defer C.free(text_ms)
|
||||
ret := C.QAccessibleTextInsertEvent_new(obj.cPointer(), (C.int)(position), (*C.struct_miqt_string)(text_ms))
|
||||
return newQAccessibleTextInsertEvent(ret)
|
||||
@ -1507,7 +1606,7 @@ func NewQAccessibleTextInsertEvent(obj *QObject, position int, text string) *QAc
|
||||
|
||||
// NewQAccessibleTextInsertEvent2 constructs a new QAccessibleTextInsertEvent object.
|
||||
func NewQAccessibleTextInsertEvent2(iface *QAccessibleInterface, position int, text string) *QAccessibleTextInsertEvent {
|
||||
text_ms := miqt_strdupg(text)
|
||||
text_ms := libmiqt.Strdupg(text)
|
||||
defer C.free(text_ms)
|
||||
ret := C.QAccessibleTextInsertEvent_new2(iface.cPointer(), (C.int)(position), (*C.struct_miqt_string)(text_ms))
|
||||
return newQAccessibleTextInsertEvent(ret)
|
||||
@ -1550,20 +1649,27 @@ func (this *QAccessibleTextRemoveEvent) cPointer() *C.QAccessibleTextRemoveEvent
|
||||
return this.h
|
||||
}
|
||||
|
||||
func (this *QAccessibleTextRemoveEvent) UnsafePointer() unsafe.Pointer {
|
||||
if this == nil {
|
||||
return nil
|
||||
}
|
||||
return unsafe.Pointer(this.h)
|
||||
}
|
||||
|
||||
func newQAccessibleTextRemoveEvent(h *C.QAccessibleTextRemoveEvent) *QAccessibleTextRemoveEvent {
|
||||
if h == nil {
|
||||
return nil
|
||||
}
|
||||
return &QAccessibleTextRemoveEvent{h: h, QAccessibleTextCursorEvent: newQAccessibleTextCursorEvent_U(unsafe.Pointer(h))}
|
||||
return &QAccessibleTextRemoveEvent{h: h, QAccessibleTextCursorEvent: UnsafeNewQAccessibleTextCursorEvent(unsafe.Pointer(h))}
|
||||
}
|
||||
|
||||
func newQAccessibleTextRemoveEvent_U(h unsafe.Pointer) *QAccessibleTextRemoveEvent {
|
||||
func UnsafeNewQAccessibleTextRemoveEvent(h unsafe.Pointer) *QAccessibleTextRemoveEvent {
|
||||
return newQAccessibleTextRemoveEvent((*C.QAccessibleTextRemoveEvent)(h))
|
||||
}
|
||||
|
||||
// NewQAccessibleTextRemoveEvent constructs a new QAccessibleTextRemoveEvent object.
|
||||
func NewQAccessibleTextRemoveEvent(obj *QObject, position int, text string) *QAccessibleTextRemoveEvent {
|
||||
text_ms := miqt_strdupg(text)
|
||||
text_ms := libmiqt.Strdupg(text)
|
||||
defer C.free(text_ms)
|
||||
ret := C.QAccessibleTextRemoveEvent_new(obj.cPointer(), (C.int)(position), (*C.struct_miqt_string)(text_ms))
|
||||
return newQAccessibleTextRemoveEvent(ret)
|
||||
@ -1571,7 +1677,7 @@ func NewQAccessibleTextRemoveEvent(obj *QObject, position int, text string) *QAc
|
||||
|
||||
// NewQAccessibleTextRemoveEvent2 constructs a new QAccessibleTextRemoveEvent object.
|
||||
func NewQAccessibleTextRemoveEvent2(iface *QAccessibleInterface, position int, text string) *QAccessibleTextRemoveEvent {
|
||||
text_ms := miqt_strdupg(text)
|
||||
text_ms := libmiqt.Strdupg(text)
|
||||
defer C.free(text_ms)
|
||||
ret := C.QAccessibleTextRemoveEvent_new2(iface.cPointer(), (C.int)(position), (*C.struct_miqt_string)(text_ms))
|
||||
return newQAccessibleTextRemoveEvent(ret)
|
||||
@ -1614,22 +1720,29 @@ func (this *QAccessibleTextUpdateEvent) cPointer() *C.QAccessibleTextUpdateEvent
|
||||
return this.h
|
||||
}
|
||||
|
||||
func (this *QAccessibleTextUpdateEvent) UnsafePointer() unsafe.Pointer {
|
||||
if this == nil {
|
||||
return nil
|
||||
}
|
||||
return unsafe.Pointer(this.h)
|
||||
}
|
||||
|
||||
func newQAccessibleTextUpdateEvent(h *C.QAccessibleTextUpdateEvent) *QAccessibleTextUpdateEvent {
|
||||
if h == nil {
|
||||
return nil
|
||||
}
|
||||
return &QAccessibleTextUpdateEvent{h: h, QAccessibleTextCursorEvent: newQAccessibleTextCursorEvent_U(unsafe.Pointer(h))}
|
||||
return &QAccessibleTextUpdateEvent{h: h, QAccessibleTextCursorEvent: UnsafeNewQAccessibleTextCursorEvent(unsafe.Pointer(h))}
|
||||
}
|
||||
|
||||
func newQAccessibleTextUpdateEvent_U(h unsafe.Pointer) *QAccessibleTextUpdateEvent {
|
||||
func UnsafeNewQAccessibleTextUpdateEvent(h unsafe.Pointer) *QAccessibleTextUpdateEvent {
|
||||
return newQAccessibleTextUpdateEvent((*C.QAccessibleTextUpdateEvent)(h))
|
||||
}
|
||||
|
||||
// NewQAccessibleTextUpdateEvent constructs a new QAccessibleTextUpdateEvent object.
|
||||
func NewQAccessibleTextUpdateEvent(obj *QObject, position int, oldText string, text string) *QAccessibleTextUpdateEvent {
|
||||
oldText_ms := miqt_strdupg(oldText)
|
||||
oldText_ms := libmiqt.Strdupg(oldText)
|
||||
defer C.free(oldText_ms)
|
||||
text_ms := miqt_strdupg(text)
|
||||
text_ms := libmiqt.Strdupg(text)
|
||||
defer C.free(text_ms)
|
||||
ret := C.QAccessibleTextUpdateEvent_new(obj.cPointer(), (C.int)(position), (*C.struct_miqt_string)(oldText_ms), (*C.struct_miqt_string)(text_ms))
|
||||
return newQAccessibleTextUpdateEvent(ret)
|
||||
@ -1637,9 +1750,9 @@ func NewQAccessibleTextUpdateEvent(obj *QObject, position int, oldText string, t
|
||||
|
||||
// NewQAccessibleTextUpdateEvent2 constructs a new QAccessibleTextUpdateEvent object.
|
||||
func NewQAccessibleTextUpdateEvent2(iface *QAccessibleInterface, position int, oldText string, text string) *QAccessibleTextUpdateEvent {
|
||||
oldText_ms := miqt_strdupg(oldText)
|
||||
oldText_ms := libmiqt.Strdupg(oldText)
|
||||
defer C.free(oldText_ms)
|
||||
text_ms := miqt_strdupg(text)
|
||||
text_ms := libmiqt.Strdupg(text)
|
||||
defer C.free(text_ms)
|
||||
ret := C.QAccessibleTextUpdateEvent_new2(iface.cPointer(), (C.int)(position), (*C.struct_miqt_string)(oldText_ms), (*C.struct_miqt_string)(text_ms))
|
||||
return newQAccessibleTextUpdateEvent(ret)
|
||||
@ -1689,14 +1802,21 @@ func (this *QAccessibleValueChangeEvent) cPointer() *C.QAccessibleValueChangeEve
|
||||
return this.h
|
||||
}
|
||||
|
||||
func (this *QAccessibleValueChangeEvent) UnsafePointer() unsafe.Pointer {
|
||||
if this == nil {
|
||||
return nil
|
||||
}
|
||||
return unsafe.Pointer(this.h)
|
||||
}
|
||||
|
||||
func newQAccessibleValueChangeEvent(h *C.QAccessibleValueChangeEvent) *QAccessibleValueChangeEvent {
|
||||
if h == nil {
|
||||
return nil
|
||||
}
|
||||
return &QAccessibleValueChangeEvent{h: h, QAccessibleEvent: newQAccessibleEvent_U(unsafe.Pointer(h))}
|
||||
return &QAccessibleValueChangeEvent{h: h, QAccessibleEvent: UnsafeNewQAccessibleEvent(unsafe.Pointer(h))}
|
||||
}
|
||||
|
||||
func newQAccessibleValueChangeEvent_U(h unsafe.Pointer) *QAccessibleValueChangeEvent {
|
||||
func UnsafeNewQAccessibleValueChangeEvent(h unsafe.Pointer) *QAccessibleValueChangeEvent {
|
||||
return newQAccessibleValueChangeEvent((*C.QAccessibleValueChangeEvent)(h))
|
||||
}
|
||||
|
||||
@ -1749,14 +1869,21 @@ func (this *QAccessibleTableModelChangeEvent) cPointer() *C.QAccessibleTableMode
|
||||
return this.h
|
||||
}
|
||||
|
||||
func (this *QAccessibleTableModelChangeEvent) UnsafePointer() unsafe.Pointer {
|
||||
if this == nil {
|
||||
return nil
|
||||
}
|
||||
return unsafe.Pointer(this.h)
|
||||
}
|
||||
|
||||
func newQAccessibleTableModelChangeEvent(h *C.QAccessibleTableModelChangeEvent) *QAccessibleTableModelChangeEvent {
|
||||
if h == nil {
|
||||
return nil
|
||||
}
|
||||
return &QAccessibleTableModelChangeEvent{h: h, QAccessibleEvent: newQAccessibleEvent_U(unsafe.Pointer(h))}
|
||||
return &QAccessibleTableModelChangeEvent{h: h, QAccessibleEvent: UnsafeNewQAccessibleEvent(unsafe.Pointer(h))}
|
||||
}
|
||||
|
||||
func newQAccessibleTableModelChangeEvent_U(h unsafe.Pointer) *QAccessibleTableModelChangeEvent {
|
||||
func UnsafeNewQAccessibleTableModelChangeEvent(h unsafe.Pointer) *QAccessibleTableModelChangeEvent {
|
||||
return newQAccessibleTableModelChangeEvent((*C.QAccessibleTableModelChangeEvent)(h))
|
||||
}
|
||||
|
||||
@ -1837,6 +1964,13 @@ func (this *QAccessible__State) cPointer() *C.QAccessible__State {
|
||||
return this.h
|
||||
}
|
||||
|
||||
func (this *QAccessible__State) UnsafePointer() unsafe.Pointer {
|
||||
if this == nil {
|
||||
return nil
|
||||
}
|
||||
return unsafe.Pointer(this.h)
|
||||
}
|
||||
|
||||
func newQAccessible__State(h *C.QAccessible__State) *QAccessible__State {
|
||||
if h == nil {
|
||||
return nil
|
||||
@ -1844,7 +1978,7 @@ func newQAccessible__State(h *C.QAccessible__State) *QAccessible__State {
|
||||
return &QAccessible__State{h: h}
|
||||
}
|
||||
|
||||
func newQAccessible__State_U(h unsafe.Pointer) *QAccessible__State {
|
||||
func UnsafeNewQAccessible__State(h unsafe.Pointer) *QAccessible__State {
|
||||
return newQAccessible__State((*C.QAccessible__State)(h))
|
||||
}
|
||||
|
||||
@ -1885,6 +2019,13 @@ func (this *QAccessible__ActivationObserver) cPointer() *C.QAccessible__Activati
|
||||
return this.h
|
||||
}
|
||||
|
||||
func (this *QAccessible__ActivationObserver) UnsafePointer() unsafe.Pointer {
|
||||
if this == nil {
|
||||
return nil
|
||||
}
|
||||
return unsafe.Pointer(this.h)
|
||||
}
|
||||
|
||||
func newQAccessible__ActivationObserver(h *C.QAccessible__ActivationObserver) *QAccessible__ActivationObserver {
|
||||
if h == nil {
|
||||
return nil
|
||||
@ -1892,7 +2033,7 @@ func newQAccessible__ActivationObserver(h *C.QAccessible__ActivationObserver) *Q
|
||||
return &QAccessible__ActivationObserver{h: h}
|
||||
}
|
||||
|
||||
func newQAccessible__ActivationObserver_U(h unsafe.Pointer) *QAccessible__ActivationObserver {
|
||||
func UnsafeNewQAccessible__ActivationObserver(h unsafe.Pointer) *QAccessible__ActivationObserver {
|
||||
return newQAccessible__ActivationObserver((*C.QAccessible__ActivationObserver)(h))
|
||||
}
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
|
||||
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||
|
||||
#include "binding.h"
|
||||
#include "../libmiqt/libmiqt.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
@ -6,7 +6,7 @@
|
||||
#include <QString>
|
||||
#include <QByteArray>
|
||||
#include <cstring>
|
||||
#include "qaccessiblebridge.h"
|
||||
#include <qaccessiblebridge.h>
|
||||
#include "gen_qaccessiblebridge.h"
|
||||
#include "_cgo_export.h"
|
||||
|
||||
|
@ -9,6 +9,7 @@ package qt
|
||||
import "C"
|
||||
|
||||
import (
|
||||
"github.com/mappu/miqt/libmiqt"
|
||||
"runtime"
|
||||
"unsafe"
|
||||
)
|
||||
@ -24,6 +25,13 @@ func (this *QAccessibleBridge) cPointer() *C.QAccessibleBridge {
|
||||
return this.h
|
||||
}
|
||||
|
||||
func (this *QAccessibleBridge) UnsafePointer() unsafe.Pointer {
|
||||
if this == nil {
|
||||
return nil
|
||||
}
|
||||
return unsafe.Pointer(this.h)
|
||||
}
|
||||
|
||||
func newQAccessibleBridge(h *C.QAccessibleBridge) *QAccessibleBridge {
|
||||
if h == nil {
|
||||
return nil
|
||||
@ -31,7 +39,7 @@ func newQAccessibleBridge(h *C.QAccessibleBridge) *QAccessibleBridge {
|
||||
return &QAccessibleBridge{h: h}
|
||||
}
|
||||
|
||||
func newQAccessibleBridge_U(h unsafe.Pointer) *QAccessibleBridge {
|
||||
func UnsafeNewQAccessibleBridge(h unsafe.Pointer) *QAccessibleBridge {
|
||||
return newQAccessibleBridge((*C.QAccessibleBridge)(h))
|
||||
}
|
||||
|
||||
@ -73,19 +81,26 @@ func (this *QAccessibleBridgePlugin) cPointer() *C.QAccessibleBridgePlugin {
|
||||
return this.h
|
||||
}
|
||||
|
||||
func (this *QAccessibleBridgePlugin) UnsafePointer() unsafe.Pointer {
|
||||
if this == nil {
|
||||
return nil
|
||||
}
|
||||
return unsafe.Pointer(this.h)
|
||||
}
|
||||
|
||||
func newQAccessibleBridgePlugin(h *C.QAccessibleBridgePlugin) *QAccessibleBridgePlugin {
|
||||
if h == nil {
|
||||
return nil
|
||||
}
|
||||
return &QAccessibleBridgePlugin{h: h, QObject: newQObject_U(unsafe.Pointer(h))}
|
||||
return &QAccessibleBridgePlugin{h: h, QObject: UnsafeNewQObject(unsafe.Pointer(h))}
|
||||
}
|
||||
|
||||
func newQAccessibleBridgePlugin_U(h unsafe.Pointer) *QAccessibleBridgePlugin {
|
||||
func UnsafeNewQAccessibleBridgePlugin(h unsafe.Pointer) *QAccessibleBridgePlugin {
|
||||
return newQAccessibleBridgePlugin((*C.QAccessibleBridgePlugin)(h))
|
||||
}
|
||||
|
||||
func (this *QAccessibleBridgePlugin) MetaObject() *QMetaObject {
|
||||
return newQMetaObject_U(unsafe.Pointer(C.QAccessibleBridgePlugin_MetaObject(this.h)))
|
||||
return UnsafeNewQMetaObject(unsafe.Pointer(C.QAccessibleBridgePlugin_MetaObject(this.h)))
|
||||
}
|
||||
|
||||
func (this *QAccessibleBridgePlugin) Metacast(param1 string) unsafe.Pointer {
|
||||
@ -113,9 +128,9 @@ func QAccessibleBridgePlugin_TrUtf8(s string) string {
|
||||
}
|
||||
|
||||
func (this *QAccessibleBridgePlugin) Create(key string) *QAccessibleBridge {
|
||||
key_ms := miqt_strdupg(key)
|
||||
key_ms := libmiqt.Strdupg(key)
|
||||
defer C.free(key_ms)
|
||||
return newQAccessibleBridge_U(unsafe.Pointer(C.QAccessibleBridgePlugin_Create(this.h, (*C.struct_miqt_string)(key_ms))))
|
||||
return UnsafeNewQAccessibleBridge(unsafe.Pointer(C.QAccessibleBridgePlugin_Create(this.h, (*C.struct_miqt_string)(key_ms))))
|
||||
}
|
||||
|
||||
func QAccessibleBridgePlugin_Tr2(s string, c string) string {
|
||||
|
@ -7,7 +7,7 @@
|
||||
|
||||
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||
|
||||
#include "binding.h"
|
||||
#include "../libmiqt/libmiqt.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
@ -8,7 +8,7 @@
|
||||
#include <QByteArray>
|
||||
#include <cstring>
|
||||
#include <QWindow>
|
||||
#include "qaccessibleobject.h"
|
||||
#include <qaccessibleobject.h>
|
||||
#include "gen_qaccessibleobject.h"
|
||||
#include "_cgo_export.h"
|
||||
|
||||
|
@ -9,6 +9,7 @@ package qt
|
||||
import "C"
|
||||
|
||||
import (
|
||||
"github.com/mappu/miqt/libmiqt"
|
||||
"runtime"
|
||||
"unsafe"
|
||||
)
|
||||
@ -25,14 +26,21 @@ func (this *QAccessibleObject) cPointer() *C.QAccessibleObject {
|
||||
return this.h
|
||||
}
|
||||
|
||||
func (this *QAccessibleObject) UnsafePointer() unsafe.Pointer {
|
||||
if this == nil {
|
||||
return nil
|
||||
}
|
||||
return unsafe.Pointer(this.h)
|
||||
}
|
||||
|
||||
func newQAccessibleObject(h *C.QAccessibleObject) *QAccessibleObject {
|
||||
if h == nil {
|
||||
return nil
|
||||
}
|
||||
return &QAccessibleObject{h: h, QAccessibleInterface: newQAccessibleInterface_U(unsafe.Pointer(h))}
|
||||
return &QAccessibleObject{h: h, QAccessibleInterface: UnsafeNewQAccessibleInterface(unsafe.Pointer(h))}
|
||||
}
|
||||
|
||||
func newQAccessibleObject_U(h unsafe.Pointer) *QAccessibleObject {
|
||||
func UnsafeNewQAccessibleObject(h unsafe.Pointer) *QAccessibleObject {
|
||||
return newQAccessibleObject((*C.QAccessibleObject)(h))
|
||||
}
|
||||
|
||||
@ -41,7 +49,7 @@ func (this *QAccessibleObject) IsValid() bool {
|
||||
}
|
||||
|
||||
func (this *QAccessibleObject) Object() *QObject {
|
||||
return newQObject_U(unsafe.Pointer(C.QAccessibleObject_Object(this.h)))
|
||||
return UnsafeNewQObject(unsafe.Pointer(C.QAccessibleObject_Object(this.h)))
|
||||
}
|
||||
|
||||
func (this *QAccessibleObject) Rect() *QRect {
|
||||
@ -52,13 +60,13 @@ func (this *QAccessibleObject) Rect() *QRect {
|
||||
}
|
||||
|
||||
func (this *QAccessibleObject) SetText(t QAccessible__Text, text string) {
|
||||
text_ms := miqt_strdupg(text)
|
||||
text_ms := libmiqt.Strdupg(text)
|
||||
defer C.free(text_ms)
|
||||
C.QAccessibleObject_SetText(this.h, (C.int)(t), (*C.struct_miqt_string)(text_ms))
|
||||
}
|
||||
|
||||
func (this *QAccessibleObject) ChildAt(x int, y int) *QAccessibleInterface {
|
||||
return newQAccessibleInterface_U(unsafe.Pointer(C.QAccessibleObject_ChildAt(this.h, (C.int)(x), (C.int)(y))))
|
||||
return UnsafeNewQAccessibleInterface(unsafe.Pointer(C.QAccessibleObject_ChildAt(this.h, (C.int)(x), (C.int)(y))))
|
||||
}
|
||||
|
||||
type QAccessibleApplication struct {
|
||||
@ -73,14 +81,21 @@ func (this *QAccessibleApplication) cPointer() *C.QAccessibleApplication {
|
||||
return this.h
|
||||
}
|
||||
|
||||
func (this *QAccessibleApplication) UnsafePointer() unsafe.Pointer {
|
||||
if this == nil {
|
||||
return nil
|
||||
}
|
||||
return unsafe.Pointer(this.h)
|
||||
}
|
||||
|
||||
func newQAccessibleApplication(h *C.QAccessibleApplication) *QAccessibleApplication {
|
||||
if h == nil {
|
||||
return nil
|
||||
}
|
||||
return &QAccessibleApplication{h: h, QAccessibleObject: newQAccessibleObject_U(unsafe.Pointer(h))}
|
||||
return &QAccessibleApplication{h: h, QAccessibleObject: UnsafeNewQAccessibleObject(unsafe.Pointer(h))}
|
||||
}
|
||||
|
||||
func newQAccessibleApplication_U(h unsafe.Pointer) *QAccessibleApplication {
|
||||
func UnsafeNewQAccessibleApplication(h unsafe.Pointer) *QAccessibleApplication {
|
||||
return newQAccessibleApplication((*C.QAccessibleApplication)(h))
|
||||
}
|
||||
|
||||
@ -91,7 +106,7 @@ func NewQAccessibleApplication() *QAccessibleApplication {
|
||||
}
|
||||
|
||||
func (this *QAccessibleApplication) Window() *QWindow {
|
||||
return newQWindow_U(unsafe.Pointer(C.QAccessibleApplication_Window(this.h)))
|
||||
return UnsafeNewQWindow(unsafe.Pointer(C.QAccessibleApplication_Window(this.h)))
|
||||
}
|
||||
|
||||
func (this *QAccessibleApplication) ChildCount() int {
|
||||
@ -103,15 +118,15 @@ func (this *QAccessibleApplication) IndexOfChild(param1 *QAccessibleInterface) i
|
||||
}
|
||||
|
||||
func (this *QAccessibleApplication) FocusChild() *QAccessibleInterface {
|
||||
return newQAccessibleInterface_U(unsafe.Pointer(C.QAccessibleApplication_FocusChild(this.h)))
|
||||
return UnsafeNewQAccessibleInterface(unsafe.Pointer(C.QAccessibleApplication_FocusChild(this.h)))
|
||||
}
|
||||
|
||||
func (this *QAccessibleApplication) Parent() *QAccessibleInterface {
|
||||
return newQAccessibleInterface_U(unsafe.Pointer(C.QAccessibleApplication_Parent(this.h)))
|
||||
return UnsafeNewQAccessibleInterface(unsafe.Pointer(C.QAccessibleApplication_Parent(this.h)))
|
||||
}
|
||||
|
||||
func (this *QAccessibleApplication) Child(index int) *QAccessibleInterface {
|
||||
return newQAccessibleInterface_U(unsafe.Pointer(C.QAccessibleApplication_Child(this.h, (C.int)(index))))
|
||||
return UnsafeNewQAccessibleInterface(unsafe.Pointer(C.QAccessibleApplication_Child(this.h, (C.int)(index))))
|
||||
}
|
||||
|
||||
func (this *QAccessibleApplication) Text(t QAccessible__Text) string {
|
||||
|
@ -7,7 +7,7 @@
|
||||
|
||||
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||
|
||||
#include "binding.h"
|
||||
#include "../libmiqt/libmiqt.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
@ -5,7 +5,7 @@
|
||||
#include <QString>
|
||||
#include <QByteArray>
|
||||
#include <cstring>
|
||||
#include "qaccessibleplugin.h"
|
||||
#include <qaccessibleplugin.h>
|
||||
#include "gen_qaccessibleplugin.h"
|
||||
#include "_cgo_export.h"
|
||||
|
||||
|
@ -9,6 +9,7 @@ package qt
|
||||
import "C"
|
||||
|
||||
import (
|
||||
"github.com/mappu/miqt/libmiqt"
|
||||
"runtime"
|
||||
"unsafe"
|
||||
)
|
||||
@ -25,19 +26,26 @@ func (this *QAccessiblePlugin) cPointer() *C.QAccessiblePlugin {
|
||||
return this.h
|
||||
}
|
||||
|
||||
func (this *QAccessiblePlugin) UnsafePointer() unsafe.Pointer {
|
||||
if this == nil {
|
||||
return nil
|
||||
}
|
||||
return unsafe.Pointer(this.h)
|
||||
}
|
||||
|
||||
func newQAccessiblePlugin(h *C.QAccessiblePlugin) *QAccessiblePlugin {
|
||||
if h == nil {
|
||||
return nil
|
||||
}
|
||||
return &QAccessiblePlugin{h: h, QObject: newQObject_U(unsafe.Pointer(h))}
|
||||
return &QAccessiblePlugin{h: h, QObject: UnsafeNewQObject(unsafe.Pointer(h))}
|
||||
}
|
||||
|
||||
func newQAccessiblePlugin_U(h unsafe.Pointer) *QAccessiblePlugin {
|
||||
func UnsafeNewQAccessiblePlugin(h unsafe.Pointer) *QAccessiblePlugin {
|
||||
return newQAccessiblePlugin((*C.QAccessiblePlugin)(h))
|
||||
}
|
||||
|
||||
func (this *QAccessiblePlugin) MetaObject() *QMetaObject {
|
||||
return newQMetaObject_U(unsafe.Pointer(C.QAccessiblePlugin_MetaObject(this.h)))
|
||||
return UnsafeNewQMetaObject(unsafe.Pointer(C.QAccessiblePlugin_MetaObject(this.h)))
|
||||
}
|
||||
|
||||
func (this *QAccessiblePlugin) Metacast(param1 string) unsafe.Pointer {
|
||||
@ -65,9 +73,9 @@ func QAccessiblePlugin_TrUtf8(s string) string {
|
||||
}
|
||||
|
||||
func (this *QAccessiblePlugin) Create(key string, object *QObject) *QAccessibleInterface {
|
||||
key_ms := miqt_strdupg(key)
|
||||
key_ms := libmiqt.Strdupg(key)
|
||||
defer C.free(key_ms)
|
||||
return newQAccessibleInterface_U(unsafe.Pointer(C.QAccessiblePlugin_Create(this.h, (*C.struct_miqt_string)(key_ms), object.cPointer())))
|
||||
return UnsafeNewQAccessibleInterface(unsafe.Pointer(C.QAccessiblePlugin_Create(this.h, (*C.struct_miqt_string)(key_ms), object.cPointer())))
|
||||
}
|
||||
|
||||
func QAccessiblePlugin_Tr2(s string, c string) string {
|
||||
|
@ -7,7 +7,7 @@
|
||||
|
||||
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||
|
||||
#include "binding.h"
|
||||
#include "../libmiqt/libmiqt.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
@ -9,7 +9,7 @@
|
||||
#include <cstring>
|
||||
#include <QWidget>
|
||||
#include <QWindow>
|
||||
#include "qaccessiblewidget.h"
|
||||
#include <qaccessiblewidget.h>
|
||||
#include "gen_qaccessiblewidget.h"
|
||||
#include "_cgo_export.h"
|
||||
|
||||
|
@ -9,6 +9,7 @@ package qt
|
||||
import "C"
|
||||
|
||||
import (
|
||||
"github.com/mappu/miqt/libmiqt"
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
@ -25,14 +26,21 @@ func (this *QAccessibleWidget) cPointer() *C.QAccessibleWidget {
|
||||
return this.h
|
||||
}
|
||||
|
||||
func (this *QAccessibleWidget) UnsafePointer() unsafe.Pointer {
|
||||
if this == nil {
|
||||
return nil
|
||||
}
|
||||
return unsafe.Pointer(this.h)
|
||||
}
|
||||
|
||||
func newQAccessibleWidget(h *C.QAccessibleWidget) *QAccessibleWidget {
|
||||
if h == nil {
|
||||
return nil
|
||||
}
|
||||
return &QAccessibleWidget{h: h, QAccessibleObject: newQAccessibleObject_U(unsafe.Pointer(h)), QAccessibleActionInterface: newQAccessibleActionInterface_U(unsafe.Pointer(h))}
|
||||
return &QAccessibleWidget{h: h, QAccessibleObject: UnsafeNewQAccessibleObject(unsafe.Pointer(h)), QAccessibleActionInterface: UnsafeNewQAccessibleActionInterface(unsafe.Pointer(h))}
|
||||
}
|
||||
|
||||
func newQAccessibleWidget_U(h unsafe.Pointer) *QAccessibleWidget {
|
||||
func UnsafeNewQAccessibleWidget(h unsafe.Pointer) *QAccessibleWidget {
|
||||
return newQAccessibleWidget((*C.QAccessibleWidget)(h))
|
||||
}
|
||||
|
||||
@ -50,7 +58,7 @@ func NewQAccessibleWidget2(o *QWidget, r QAccessible__Role) *QAccessibleWidget {
|
||||
|
||||
// NewQAccessibleWidget3 constructs a new QAccessibleWidget object.
|
||||
func NewQAccessibleWidget3(o *QWidget, r QAccessible__Role, name string) *QAccessibleWidget {
|
||||
name_ms := miqt_strdupg(name)
|
||||
name_ms := libmiqt.Strdupg(name)
|
||||
defer C.free(name_ms)
|
||||
ret := C.QAccessibleWidget_new3(o.cPointer(), (C.int)(r), (*C.struct_miqt_string)(name_ms))
|
||||
return newQAccessibleWidget(ret)
|
||||
@ -61,7 +69,7 @@ func (this *QAccessibleWidget) IsValid() bool {
|
||||
}
|
||||
|
||||
func (this *QAccessibleWidget) Window() *QWindow {
|
||||
return newQWindow_U(unsafe.Pointer(C.QAccessibleWidget_Window(this.h)))
|
||||
return UnsafeNewQWindow(unsafe.Pointer(C.QAccessibleWidget_Window(this.h)))
|
||||
}
|
||||
|
||||
func (this *QAccessibleWidget) ChildCount() int {
|
||||
@ -73,7 +81,7 @@ func (this *QAccessibleWidget) IndexOfChild(child *QAccessibleInterface) int {
|
||||
}
|
||||
|
||||
func (this *QAccessibleWidget) FocusChild() *QAccessibleInterface {
|
||||
return newQAccessibleInterface_U(unsafe.Pointer(C.QAccessibleWidget_FocusChild(this.h)))
|
||||
return UnsafeNewQAccessibleInterface(unsafe.Pointer(C.QAccessibleWidget_FocusChild(this.h)))
|
||||
}
|
||||
|
||||
func (this *QAccessibleWidget) Rect() *QRect {
|
||||
@ -84,11 +92,11 @@ func (this *QAccessibleWidget) Rect() *QRect {
|
||||
}
|
||||
|
||||
func (this *QAccessibleWidget) Parent() *QAccessibleInterface {
|
||||
return newQAccessibleInterface_U(unsafe.Pointer(C.QAccessibleWidget_Parent(this.h)))
|
||||
return UnsafeNewQAccessibleInterface(unsafe.Pointer(C.QAccessibleWidget_Parent(this.h)))
|
||||
}
|
||||
|
||||
func (this *QAccessibleWidget) Child(index int) *QAccessibleInterface {
|
||||
return newQAccessibleInterface_U(unsafe.Pointer(C.QAccessibleWidget_Child(this.h, (C.int)(index))))
|
||||
return UnsafeNewQAccessibleInterface(unsafe.Pointer(C.QAccessibleWidget_Child(this.h, (C.int)(index))))
|
||||
}
|
||||
|
||||
func (this *QAccessibleWidget) Text(t QAccessible__Text) string {
|
||||
@ -142,13 +150,13 @@ func (this *QAccessibleWidget) ActionNames() []string {
|
||||
}
|
||||
|
||||
func (this *QAccessibleWidget) DoAction(actionName string) {
|
||||
actionName_ms := miqt_strdupg(actionName)
|
||||
actionName_ms := libmiqt.Strdupg(actionName)
|
||||
defer C.free(actionName_ms)
|
||||
C.QAccessibleWidget_DoAction(this.h, (*C.struct_miqt_string)(actionName_ms))
|
||||
}
|
||||
|
||||
func (this *QAccessibleWidget) KeyBindingsForAction(actionName string) []string {
|
||||
actionName_ms := miqt_strdupg(actionName)
|
||||
actionName_ms := libmiqt.Strdupg(actionName)
|
||||
defer C.free(actionName_ms)
|
||||
var _ma *C.struct_miqt_array = C.QAccessibleWidget_KeyBindingsForAction(this.h, (*C.struct_miqt_string)(actionName_ms))
|
||||
_ret := make([]string, int(_ma.len))
|
||||
|
@ -7,7 +7,7 @@
|
||||
|
||||
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||
|
||||
#include "binding.h"
|
||||
#include "../libmiqt/libmiqt.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
@ -13,7 +13,7 @@
|
||||
#include <cstring>
|
||||
#include <QVariant>
|
||||
#include <QWidget>
|
||||
#include "qaction.h"
|
||||
#include <qaction.h>
|
||||
#include "gen_qaction.h"
|
||||
#include "_cgo_export.h"
|
||||
|
||||
|
@ -9,6 +9,7 @@ package qt
|
||||
import "C"
|
||||
|
||||
import (
|
||||
"github.com/mappu/miqt/libmiqt"
|
||||
"runtime"
|
||||
"runtime/cgo"
|
||||
"unsafe"
|
||||
@ -53,14 +54,21 @@ func (this *QAction) cPointer() *C.QAction {
|
||||
return this.h
|
||||
}
|
||||
|
||||
func (this *QAction) UnsafePointer() unsafe.Pointer {
|
||||
if this == nil {
|
||||
return nil
|
||||
}
|
||||
return unsafe.Pointer(this.h)
|
||||
}
|
||||
|
||||
func newQAction(h *C.QAction) *QAction {
|
||||
if h == nil {
|
||||
return nil
|
||||
}
|
||||
return &QAction{h: h, QObject: newQObject_U(unsafe.Pointer(h))}
|
||||
return &QAction{h: h, QObject: UnsafeNewQObject(unsafe.Pointer(h))}
|
||||
}
|
||||
|
||||
func newQAction_U(h unsafe.Pointer) *QAction {
|
||||
func UnsafeNewQAction(h unsafe.Pointer) *QAction {
|
||||
return newQAction((*C.QAction)(h))
|
||||
}
|
||||
|
||||
@ -72,7 +80,7 @@ func NewQAction() *QAction {
|
||||
|
||||
// NewQAction2 constructs a new QAction object.
|
||||
func NewQAction2(text string) *QAction {
|
||||
text_ms := miqt_strdupg(text)
|
||||
text_ms := libmiqt.Strdupg(text)
|
||||
defer C.free(text_ms)
|
||||
ret := C.QAction_new2((*C.struct_miqt_string)(text_ms))
|
||||
return newQAction(ret)
|
||||
@ -80,7 +88,7 @@ func NewQAction2(text string) *QAction {
|
||||
|
||||
// NewQAction3 constructs a new QAction object.
|
||||
func NewQAction3(icon *QIcon, text string) *QAction {
|
||||
text_ms := miqt_strdupg(text)
|
||||
text_ms := libmiqt.Strdupg(text)
|
||||
defer C.free(text_ms)
|
||||
ret := C.QAction_new3(icon.cPointer(), (*C.struct_miqt_string)(text_ms))
|
||||
return newQAction(ret)
|
||||
@ -94,7 +102,7 @@ func NewQAction4(parent *QObject) *QAction {
|
||||
|
||||
// NewQAction5 constructs a new QAction object.
|
||||
func NewQAction5(text string, parent *QObject) *QAction {
|
||||
text_ms := miqt_strdupg(text)
|
||||
text_ms := libmiqt.Strdupg(text)
|
||||
defer C.free(text_ms)
|
||||
ret := C.QAction_new5((*C.struct_miqt_string)(text_ms), parent.cPointer())
|
||||
return newQAction(ret)
|
||||
@ -102,14 +110,14 @@ func NewQAction5(text string, parent *QObject) *QAction {
|
||||
|
||||
// NewQAction6 constructs a new QAction object.
|
||||
func NewQAction6(icon *QIcon, text string, parent *QObject) *QAction {
|
||||
text_ms := miqt_strdupg(text)
|
||||
text_ms := libmiqt.Strdupg(text)
|
||||
defer C.free(text_ms)
|
||||
ret := C.QAction_new6(icon.cPointer(), (*C.struct_miqt_string)(text_ms), parent.cPointer())
|
||||
return newQAction(ret)
|
||||
}
|
||||
|
||||
func (this *QAction) MetaObject() *QMetaObject {
|
||||
return newQMetaObject_U(unsafe.Pointer(C.QAction_MetaObject(this.h)))
|
||||
return UnsafeNewQMetaObject(unsafe.Pointer(C.QAction_MetaObject(this.h)))
|
||||
}
|
||||
|
||||
func (this *QAction) Metacast(param1 string) unsafe.Pointer {
|
||||
@ -141,7 +149,7 @@ func (this *QAction) SetActionGroup(group *QActionGroup) {
|
||||
}
|
||||
|
||||
func (this *QAction) ActionGroup() *QActionGroup {
|
||||
return newQActionGroup_U(unsafe.Pointer(C.QAction_ActionGroup(this.h)))
|
||||
return UnsafeNewQActionGroup(unsafe.Pointer(C.QAction_ActionGroup(this.h)))
|
||||
}
|
||||
|
||||
func (this *QAction) SetIcon(icon *QIcon) {
|
||||
@ -156,7 +164,7 @@ func (this *QAction) Icon() *QIcon {
|
||||
}
|
||||
|
||||
func (this *QAction) SetText(text string) {
|
||||
text_ms := miqt_strdupg(text)
|
||||
text_ms := libmiqt.Strdupg(text)
|
||||
defer C.free(text_ms)
|
||||
C.QAction_SetText(this.h, (*C.struct_miqt_string)(text_ms))
|
||||
}
|
||||
@ -169,7 +177,7 @@ func (this *QAction) Text() string {
|
||||
}
|
||||
|
||||
func (this *QAction) SetIconText(text string) {
|
||||
text_ms := miqt_strdupg(text)
|
||||
text_ms := libmiqt.Strdupg(text)
|
||||
defer C.free(text_ms)
|
||||
C.QAction_SetIconText(this.h, (*C.struct_miqt_string)(text_ms))
|
||||
}
|
||||
@ -182,7 +190,7 @@ func (this *QAction) IconText() string {
|
||||
}
|
||||
|
||||
func (this *QAction) SetToolTip(tip string) {
|
||||
tip_ms := miqt_strdupg(tip)
|
||||
tip_ms := libmiqt.Strdupg(tip)
|
||||
defer C.free(tip_ms)
|
||||
C.QAction_SetToolTip(this.h, (*C.struct_miqt_string)(tip_ms))
|
||||
}
|
||||
@ -195,7 +203,7 @@ func (this *QAction) ToolTip() string {
|
||||
}
|
||||
|
||||
func (this *QAction) SetStatusTip(statusTip string) {
|
||||
statusTip_ms := miqt_strdupg(statusTip)
|
||||
statusTip_ms := libmiqt.Strdupg(statusTip)
|
||||
defer C.free(statusTip_ms)
|
||||
C.QAction_SetStatusTip(this.h, (*C.struct_miqt_string)(statusTip_ms))
|
||||
}
|
||||
@ -208,7 +216,7 @@ func (this *QAction) StatusTip() string {
|
||||
}
|
||||
|
||||
func (this *QAction) SetWhatsThis(what string) {
|
||||
what_ms := miqt_strdupg(what)
|
||||
what_ms := libmiqt.Strdupg(what)
|
||||
defer C.free(what_ms)
|
||||
C.QAction_SetWhatsThis(this.h, (*C.struct_miqt_string)(what_ms))
|
||||
}
|
||||
@ -229,7 +237,7 @@ func (this *QAction) Priority() QAction__Priority {
|
||||
}
|
||||
|
||||
func (this *QAction) Menu() *QMenu {
|
||||
return newQMenu_U(unsafe.Pointer(C.QAction_Menu(this.h)))
|
||||
return UnsafeNewQMenu(unsafe.Pointer(C.QAction_Menu(this.h)))
|
||||
}
|
||||
|
||||
func (this *QAction) SetMenu(menu *QMenu) {
|
||||
@ -376,7 +384,7 @@ func (this *QAction) IsShortcutVisibleInContextMenu() bool {
|
||||
}
|
||||
|
||||
func (this *QAction) ParentWidget() *QWidget {
|
||||
return newQWidget_U(unsafe.Pointer(C.QAction_ParentWidget(this.h)))
|
||||
return UnsafeNewQWidget(unsafe.Pointer(C.QAction_ParentWidget(this.h)))
|
||||
}
|
||||
|
||||
func (this *QAction) AssociatedWidgets() []*QWidget {
|
||||
@ -384,7 +392,7 @@ func (this *QAction) AssociatedWidgets() []*QWidget {
|
||||
_ret := make([]*QWidget, int(_ma.len))
|
||||
_outCast := (*[0xffff]*C.QWidget)(unsafe.Pointer(_ma.data)) // hey ya
|
||||
for i := 0; i < int(_ma.len); i++ {
|
||||
_ret[i] = newQWidget_U(unsafe.Pointer(_outCast[i]))
|
||||
_ret[i] = UnsafeNewQWidget(unsafe.Pointer(_outCast[i]))
|
||||
}
|
||||
C.free(unsafe.Pointer(_ma))
|
||||
return _ret
|
||||
@ -395,7 +403,7 @@ func (this *QAction) AssociatedGraphicsWidgets() []*QGraphicsWidget {
|
||||
_ret := make([]*QGraphicsWidget, int(_ma.len))
|
||||
_outCast := (*[0xffff]*C.QGraphicsWidget)(unsafe.Pointer(_ma.data)) // hey ya
|
||||
for i := 0; i < int(_ma.len); i++ {
|
||||
_ret[i] = newQGraphicsWidget_U(unsafe.Pointer(_outCast[i]))
|
||||
_ret[i] = UnsafeNewQGraphicsWidget(unsafe.Pointer(_outCast[i]))
|
||||
}
|
||||
C.free(unsafe.Pointer(_ma))
|
||||
return _ret
|
||||
|
@ -7,7 +7,7 @@
|
||||
|
||||
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||
|
||||
#include "binding.h"
|
||||
#include "../libmiqt/libmiqt.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
@ -7,7 +7,7 @@
|
||||
#include <QString>
|
||||
#include <QByteArray>
|
||||
#include <cstring>
|
||||
#include "qactiongroup.h"
|
||||
#include <qactiongroup.h>
|
||||
#include "gen_qactiongroup.h"
|
||||
#include "_cgo_export.h"
|
||||
|
||||
|
@ -9,6 +9,7 @@ package qt
|
||||
import "C"
|
||||
|
||||
import (
|
||||
"github.com/mappu/miqt/libmiqt"
|
||||
"runtime"
|
||||
"runtime/cgo"
|
||||
"unsafe"
|
||||
@ -34,14 +35,21 @@ func (this *QActionGroup) cPointer() *C.QActionGroup {
|
||||
return this.h
|
||||
}
|
||||
|
||||
func (this *QActionGroup) UnsafePointer() unsafe.Pointer {
|
||||
if this == nil {
|
||||
return nil
|
||||
}
|
||||
return unsafe.Pointer(this.h)
|
||||
}
|
||||
|
||||
func newQActionGroup(h *C.QActionGroup) *QActionGroup {
|
||||
if h == nil {
|
||||
return nil
|
||||
}
|
||||
return &QActionGroup{h: h, QObject: newQObject_U(unsafe.Pointer(h))}
|
||||
return &QActionGroup{h: h, QObject: UnsafeNewQObject(unsafe.Pointer(h))}
|
||||
}
|
||||
|
||||
func newQActionGroup_U(h unsafe.Pointer) *QActionGroup {
|
||||
func UnsafeNewQActionGroup(h unsafe.Pointer) *QActionGroup {
|
||||
return newQActionGroup((*C.QActionGroup)(h))
|
||||
}
|
||||
|
||||
@ -52,7 +60,7 @@ func NewQActionGroup(parent *QObject) *QActionGroup {
|
||||
}
|
||||
|
||||
func (this *QActionGroup) MetaObject() *QMetaObject {
|
||||
return newQMetaObject_U(unsafe.Pointer(C.QActionGroup_MetaObject(this.h)))
|
||||
return UnsafeNewQMetaObject(unsafe.Pointer(C.QActionGroup_MetaObject(this.h)))
|
||||
}
|
||||
|
||||
func (this *QActionGroup) Metacast(param1 string) unsafe.Pointer {
|
||||
@ -80,19 +88,19 @@ func QActionGroup_TrUtf8(s string) string {
|
||||
}
|
||||
|
||||
func (this *QActionGroup) AddAction(a *QAction) *QAction {
|
||||
return newQAction_U(unsafe.Pointer(C.QActionGroup_AddAction(this.h, a.cPointer())))
|
||||
return UnsafeNewQAction(unsafe.Pointer(C.QActionGroup_AddAction(this.h, a.cPointer())))
|
||||
}
|
||||
|
||||
func (this *QActionGroup) AddActionWithText(text string) *QAction {
|
||||
text_ms := miqt_strdupg(text)
|
||||
text_ms := libmiqt.Strdupg(text)
|
||||
defer C.free(text_ms)
|
||||
return newQAction_U(unsafe.Pointer(C.QActionGroup_AddActionWithText(this.h, (*C.struct_miqt_string)(text_ms))))
|
||||
return UnsafeNewQAction(unsafe.Pointer(C.QActionGroup_AddActionWithText(this.h, (*C.struct_miqt_string)(text_ms))))
|
||||
}
|
||||
|
||||
func (this *QActionGroup) AddAction2(icon *QIcon, text string) *QAction {
|
||||
text_ms := miqt_strdupg(text)
|
||||
text_ms := libmiqt.Strdupg(text)
|
||||
defer C.free(text_ms)
|
||||
return newQAction_U(unsafe.Pointer(C.QActionGroup_AddAction2(this.h, icon.cPointer(), (*C.struct_miqt_string)(text_ms))))
|
||||
return UnsafeNewQAction(unsafe.Pointer(C.QActionGroup_AddAction2(this.h, icon.cPointer(), (*C.struct_miqt_string)(text_ms))))
|
||||
}
|
||||
|
||||
func (this *QActionGroup) RemoveAction(a *QAction) {
|
||||
@ -104,14 +112,14 @@ func (this *QActionGroup) Actions() []*QAction {
|
||||
_ret := make([]*QAction, int(_ma.len))
|
||||
_outCast := (*[0xffff]*C.QAction)(unsafe.Pointer(_ma.data)) // hey ya
|
||||
for i := 0; i < int(_ma.len); i++ {
|
||||
_ret[i] = newQAction_U(unsafe.Pointer(_outCast[i]))
|
||||
_ret[i] = UnsafeNewQAction(unsafe.Pointer(_outCast[i]))
|
||||
}
|
||||
C.free(unsafe.Pointer(_ma))
|
||||
return _ret
|
||||
}
|
||||
|
||||
func (this *QActionGroup) CheckedAction() *QAction {
|
||||
return newQAction_U(unsafe.Pointer(C.QActionGroup_CheckedAction(this.h)))
|
||||
return UnsafeNewQAction(unsafe.Pointer(C.QActionGroup_CheckedAction(this.h)))
|
||||
}
|
||||
|
||||
func (this *QActionGroup) IsExclusive() bool {
|
||||
@ -165,7 +173,7 @@ func miqt_exec_callback_QActionGroup_Triggered(cb C.intptr_t, param1 *C.QAction)
|
||||
}
|
||||
|
||||
// Convert all CABI parameters to Go parameters
|
||||
slotval1 := newQAction_U(unsafe.Pointer(param1))
|
||||
slotval1 := UnsafeNewQAction(unsafe.Pointer(param1))
|
||||
|
||||
gofunc(slotval1)
|
||||
}
|
||||
@ -185,7 +193,7 @@ func miqt_exec_callback_QActionGroup_Hovered(cb C.intptr_t, param1 *C.QAction) {
|
||||
}
|
||||
|
||||
// Convert all CABI parameters to Go parameters
|
||||
slotval1 := newQAction_U(unsafe.Pointer(param1))
|
||||
slotval1 := UnsafeNewQAction(unsafe.Pointer(param1))
|
||||
|
||||
gofunc(slotval1)
|
||||
}
|
||||
|
@ -7,7 +7,7 @@
|
||||
|
||||
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||
|
||||
#include "binding.h"
|
||||
#include "../libmiqt/libmiqt.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
@ -4,7 +4,7 @@
|
||||
#include <QString>
|
||||
#include <QByteArray>
|
||||
#include <cstring>
|
||||
#include "qanimationgroup.h"
|
||||
#include <qanimationgroup.h>
|
||||
#include "gen_qanimationgroup.h"
|
||||
#include "_cgo_export.h"
|
||||
|
||||
|
@ -25,19 +25,26 @@ func (this *QAnimationGroup) cPointer() *C.QAnimationGroup {
|
||||
return this.h
|
||||
}
|
||||
|
||||
func (this *QAnimationGroup) UnsafePointer() unsafe.Pointer {
|
||||
if this == nil {
|
||||
return nil
|
||||
}
|
||||
return unsafe.Pointer(this.h)
|
||||
}
|
||||
|
||||
func newQAnimationGroup(h *C.QAnimationGroup) *QAnimationGroup {
|
||||
if h == nil {
|
||||
return nil
|
||||
}
|
||||
return &QAnimationGroup{h: h, QAbstractAnimation: newQAbstractAnimation_U(unsafe.Pointer(h))}
|
||||
return &QAnimationGroup{h: h, QAbstractAnimation: UnsafeNewQAbstractAnimation(unsafe.Pointer(h))}
|
||||
}
|
||||
|
||||
func newQAnimationGroup_U(h unsafe.Pointer) *QAnimationGroup {
|
||||
func UnsafeNewQAnimationGroup(h unsafe.Pointer) *QAnimationGroup {
|
||||
return newQAnimationGroup((*C.QAnimationGroup)(h))
|
||||
}
|
||||
|
||||
func (this *QAnimationGroup) MetaObject() *QMetaObject {
|
||||
return newQMetaObject_U(unsafe.Pointer(C.QAnimationGroup_MetaObject(this.h)))
|
||||
return UnsafeNewQMetaObject(unsafe.Pointer(C.QAnimationGroup_MetaObject(this.h)))
|
||||
}
|
||||
|
||||
func (this *QAnimationGroup) Metacast(param1 string) unsafe.Pointer {
|
||||
@ -65,7 +72,7 @@ func QAnimationGroup_TrUtf8(s string) string {
|
||||
}
|
||||
|
||||
func (this *QAnimationGroup) AnimationAt(index int) *QAbstractAnimation {
|
||||
return newQAbstractAnimation_U(unsafe.Pointer(C.QAnimationGroup_AnimationAt(this.h, (C.int)(index))))
|
||||
return UnsafeNewQAbstractAnimation(unsafe.Pointer(C.QAnimationGroup_AnimationAt(this.h, (C.int)(index))))
|
||||
}
|
||||
|
||||
func (this *QAnimationGroup) AnimationCount() int {
|
||||
@ -89,7 +96,7 @@ func (this *QAnimationGroup) RemoveAnimation(animation *QAbstractAnimation) {
|
||||
}
|
||||
|
||||
func (this *QAnimationGroup) TakeAnimation(index int) *QAbstractAnimation {
|
||||
return newQAbstractAnimation_U(unsafe.Pointer(C.QAnimationGroup_TakeAnimation(this.h, (C.int)(index))))
|
||||
return UnsafeNewQAbstractAnimation(unsafe.Pointer(C.QAnimationGroup_TakeAnimation(this.h, (C.int)(index))))
|
||||
}
|
||||
|
||||
func (this *QAnimationGroup) Clear() {
|
||||
|
@ -7,7 +7,7 @@
|
||||
|
||||
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||
|
||||
#include "binding.h"
|
||||
#include "../libmiqt/libmiqt.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
@ -15,7 +15,7 @@
|
||||
#include <cstring>
|
||||
#include <QStyle>
|
||||
#include <QWidget>
|
||||
#include "qapplication.h"
|
||||
#include <qapplication.h>
|
||||
#include "gen_qapplication.h"
|
||||
#include "_cgo_export.h"
|
||||
|
||||
|
@ -9,6 +9,7 @@ package qt
|
||||
import "C"
|
||||
|
||||
import (
|
||||
"github.com/mappu/miqt/libmiqt"
|
||||
"runtime"
|
||||
"runtime/cgo"
|
||||
"unsafe"
|
||||
@ -34,14 +35,21 @@ func (this *QApplication) cPointer() *C.QApplication {
|
||||
return this.h
|
||||
}
|
||||
|
||||
func (this *QApplication) UnsafePointer() unsafe.Pointer {
|
||||
if this == nil {
|
||||
return nil
|
||||
}
|
||||
return unsafe.Pointer(this.h)
|
||||
}
|
||||
|
||||
func newQApplication(h *C.QApplication) *QApplication {
|
||||
if h == nil {
|
||||
return nil
|
||||
}
|
||||
return &QApplication{h: h, QGuiApplication: newQGuiApplication_U(unsafe.Pointer(h))}
|
||||
return &QApplication{h: h, QGuiApplication: UnsafeNewQGuiApplication(unsafe.Pointer(h))}
|
||||
}
|
||||
|
||||
func newQApplication_U(h unsafe.Pointer) *QApplication {
|
||||
func UnsafeNewQApplication(h unsafe.Pointer) *QApplication {
|
||||
return newQApplication((*C.QApplication)(h))
|
||||
}
|
||||
|
||||
@ -72,7 +80,7 @@ func NewQApplication2(args []string, param3 int) *QApplication {
|
||||
}
|
||||
|
||||
func (this *QApplication) MetaObject() *QMetaObject {
|
||||
return newQMetaObject_U(unsafe.Pointer(C.QApplication_MetaObject(this.h)))
|
||||
return UnsafeNewQMetaObject(unsafe.Pointer(C.QApplication_MetaObject(this.h)))
|
||||
}
|
||||
|
||||
func (this *QApplication) Metacast(param1 string) unsafe.Pointer {
|
||||
@ -100,7 +108,7 @@ func QApplication_TrUtf8(s string) string {
|
||||
}
|
||||
|
||||
func QApplication_Style() *QStyle {
|
||||
return newQStyle_U(unsafe.Pointer(C.QApplication_Style()))
|
||||
return UnsafeNewQStyle(unsafe.Pointer(C.QApplication_Style()))
|
||||
}
|
||||
|
||||
func QApplication_SetStyle(style *QStyle) {
|
||||
@ -108,9 +116,9 @@ func QApplication_SetStyle(style *QStyle) {
|
||||
}
|
||||
|
||||
func QApplication_SetStyleWithStyle(style string) *QStyle {
|
||||
style_ms := miqt_strdupg(style)
|
||||
style_ms := libmiqt.Strdupg(style)
|
||||
defer C.free(style_ms)
|
||||
return newQStyle_U(unsafe.Pointer(C.QApplication_SetStyleWithStyle((*C.struct_miqt_string)(style_ms))))
|
||||
return UnsafeNewQStyle(unsafe.Pointer(C.QApplication_SetStyleWithStyle((*C.struct_miqt_string)(style_ms))))
|
||||
}
|
||||
|
||||
func QApplication_ColorSpec() int {
|
||||
@ -191,7 +199,7 @@ func QApplication_AllWidgets() []*QWidget {
|
||||
_ret := make([]*QWidget, int(_ma.len))
|
||||
_outCast := (*[0xffff]*C.QWidget)(unsafe.Pointer(_ma.data)) // hey ya
|
||||
for i := 0; i < int(_ma.len); i++ {
|
||||
_ret[i] = newQWidget_U(unsafe.Pointer(_outCast[i]))
|
||||
_ret[i] = UnsafeNewQWidget(unsafe.Pointer(_outCast[i]))
|
||||
}
|
||||
C.free(unsafe.Pointer(_ma))
|
||||
return _ret
|
||||
@ -202,30 +210,30 @@ func QApplication_TopLevelWidgets() []*QWidget {
|
||||
_ret := make([]*QWidget, int(_ma.len))
|
||||
_outCast := (*[0xffff]*C.QWidget)(unsafe.Pointer(_ma.data)) // hey ya
|
||||
for i := 0; i < int(_ma.len); i++ {
|
||||
_ret[i] = newQWidget_U(unsafe.Pointer(_outCast[i]))
|
||||
_ret[i] = UnsafeNewQWidget(unsafe.Pointer(_outCast[i]))
|
||||
}
|
||||
C.free(unsafe.Pointer(_ma))
|
||||
return _ret
|
||||
}
|
||||
|
||||
func QApplication_Desktop() *QDesktopWidget {
|
||||
return newQDesktopWidget_U(unsafe.Pointer(C.QApplication_Desktop()))
|
||||
return UnsafeNewQDesktopWidget(unsafe.Pointer(C.QApplication_Desktop()))
|
||||
}
|
||||
|
||||
func QApplication_ActivePopupWidget() *QWidget {
|
||||
return newQWidget_U(unsafe.Pointer(C.QApplication_ActivePopupWidget()))
|
||||
return UnsafeNewQWidget(unsafe.Pointer(C.QApplication_ActivePopupWidget()))
|
||||
}
|
||||
|
||||
func QApplication_ActiveModalWidget() *QWidget {
|
||||
return newQWidget_U(unsafe.Pointer(C.QApplication_ActiveModalWidget()))
|
||||
return UnsafeNewQWidget(unsafe.Pointer(C.QApplication_ActiveModalWidget()))
|
||||
}
|
||||
|
||||
func QApplication_FocusWidget() *QWidget {
|
||||
return newQWidget_U(unsafe.Pointer(C.QApplication_FocusWidget()))
|
||||
return UnsafeNewQWidget(unsafe.Pointer(C.QApplication_FocusWidget()))
|
||||
}
|
||||
|
||||
func QApplication_ActiveWindow() *QWidget {
|
||||
return newQWidget_U(unsafe.Pointer(C.QApplication_ActiveWindow()))
|
||||
return UnsafeNewQWidget(unsafe.Pointer(C.QApplication_ActiveWindow()))
|
||||
}
|
||||
|
||||
func QApplication_SetActiveWindow(act *QWidget) {
|
||||
@ -233,19 +241,19 @@ func QApplication_SetActiveWindow(act *QWidget) {
|
||||
}
|
||||
|
||||
func QApplication_WidgetAt(p *QPoint) *QWidget {
|
||||
return newQWidget_U(unsafe.Pointer(C.QApplication_WidgetAt(p.cPointer())))
|
||||
return UnsafeNewQWidget(unsafe.Pointer(C.QApplication_WidgetAt(p.cPointer())))
|
||||
}
|
||||
|
||||
func QApplication_WidgetAt2(x int, y int) *QWidget {
|
||||
return newQWidget_U(unsafe.Pointer(C.QApplication_WidgetAt2((C.int)(x), (C.int)(y))))
|
||||
return UnsafeNewQWidget(unsafe.Pointer(C.QApplication_WidgetAt2((C.int)(x), (C.int)(y))))
|
||||
}
|
||||
|
||||
func QApplication_TopLevelAt(p *QPoint) *QWidget {
|
||||
return newQWidget_U(unsafe.Pointer(C.QApplication_TopLevelAt(p.cPointer())))
|
||||
return UnsafeNewQWidget(unsafe.Pointer(C.QApplication_TopLevelAt(p.cPointer())))
|
||||
}
|
||||
|
||||
func QApplication_TopLevelAt2(x int, y int) *QWidget {
|
||||
return newQWidget_U(unsafe.Pointer(C.QApplication_TopLevelAt2((C.int)(x), (C.int)(y))))
|
||||
return UnsafeNewQWidget(unsafe.Pointer(C.QApplication_TopLevelAt2((C.int)(x), (C.int)(y))))
|
||||
}
|
||||
|
||||
func QApplication_Beep() {
|
||||
@ -346,8 +354,8 @@ func miqt_exec_callback_QApplication_FocusChanged(cb C.intptr_t, old *C.QWidget,
|
||||
}
|
||||
|
||||
// Convert all CABI parameters to Go parameters
|
||||
slotval1 := newQWidget_U(unsafe.Pointer(old))
|
||||
slotval2 := newQWidget_U(unsafe.Pointer(now))
|
||||
slotval1 := UnsafeNewQWidget(unsafe.Pointer(old))
|
||||
slotval2 := UnsafeNewQWidget(unsafe.Pointer(now))
|
||||
|
||||
gofunc(slotval1, slotval2)
|
||||
}
|
||||
@ -360,7 +368,7 @@ func (this *QApplication) StyleSheet() string {
|
||||
}
|
||||
|
||||
func (this *QApplication) SetStyleSheet(sheet string) {
|
||||
sheet_ms := miqt_strdupg(sheet)
|
||||
sheet_ms := libmiqt.Strdupg(sheet)
|
||||
defer C.free(sheet_ms)
|
||||
C.QApplication_SetStyleSheet(this.h, (*C.struct_miqt_string)(sheet_ms))
|
||||
}
|
||||
|
@ -7,7 +7,7 @@
|
||||
|
||||
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||
|
||||
#include "binding.h"
|
||||
#include "../libmiqt/libmiqt.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
@ -1,6 +1,6 @@
|
||||
#include <QArrayData>
|
||||
#define WORKAROUND_INNER_CLASS_DEFINITION_QtPrivate__QContainerImplHelper
|
||||
#include "qarraydata.h"
|
||||
#include <qarraydata.h>
|
||||
#include "gen_qarraydata.h"
|
||||
#include "_cgo_export.h"
|
||||
|
||||
|
@ -43,6 +43,13 @@ func (this *QArrayData) cPointer() *C.QArrayData {
|
||||
return this.h
|
||||
}
|
||||
|
||||
func (this *QArrayData) UnsafePointer() unsafe.Pointer {
|
||||
if this == nil {
|
||||
return nil
|
||||
}
|
||||
return unsafe.Pointer(this.h)
|
||||
}
|
||||
|
||||
func newQArrayData(h *C.QArrayData) *QArrayData {
|
||||
if h == nil {
|
||||
return nil
|
||||
@ -50,7 +57,7 @@ func newQArrayData(h *C.QArrayData) *QArrayData {
|
||||
return &QArrayData{h: h}
|
||||
}
|
||||
|
||||
func newQArrayData_U(h unsafe.Pointer) *QArrayData {
|
||||
func UnsafeNewQArrayData(h unsafe.Pointer) *QArrayData {
|
||||
return newQArrayData((*C.QArrayData)(h))
|
||||
}
|
||||
|
||||
@ -79,11 +86,11 @@ func (this *QArrayData) CloneFlags() QArrayData__AllocationOption {
|
||||
}
|
||||
|
||||
func QArrayData_Allocate(objectSize uint64, alignment uint64, capacity uint64) *QArrayData {
|
||||
return newQArrayData_U(unsafe.Pointer(C.QArrayData_Allocate((C.size_t)(objectSize), (C.size_t)(alignment), (C.size_t)(capacity))))
|
||||
return UnsafeNewQArrayData(unsafe.Pointer(C.QArrayData_Allocate((C.size_t)(objectSize), (C.size_t)(alignment), (C.size_t)(capacity))))
|
||||
}
|
||||
|
||||
func QArrayData_ReallocateUnaligned(data *QArrayData, objectSize uint64, newCapacity uint64) *QArrayData {
|
||||
return newQArrayData_U(unsafe.Pointer(C.QArrayData_ReallocateUnaligned(data.cPointer(), (C.size_t)(objectSize), (C.size_t)(newCapacity))))
|
||||
return UnsafeNewQArrayData(unsafe.Pointer(C.QArrayData_ReallocateUnaligned(data.cPointer(), (C.size_t)(objectSize), (C.size_t)(newCapacity))))
|
||||
}
|
||||
|
||||
func QArrayData_Deallocate(data *QArrayData, objectSize uint64, alignment uint64) {
|
||||
@ -91,15 +98,15 @@ func QArrayData_Deallocate(data *QArrayData, objectSize uint64, alignment uint64
|
||||
}
|
||||
|
||||
func QArrayData_SharedNull() *QArrayData {
|
||||
return newQArrayData_U(unsafe.Pointer(C.QArrayData_SharedNull()))
|
||||
return UnsafeNewQArrayData(unsafe.Pointer(C.QArrayData_SharedNull()))
|
||||
}
|
||||
|
||||
func QArrayData_Allocate4(objectSize uint64, alignment uint64, capacity uint64, options QArrayData__AllocationOption) *QArrayData {
|
||||
return newQArrayData_U(unsafe.Pointer(C.QArrayData_Allocate4((C.size_t)(objectSize), (C.size_t)(alignment), (C.size_t)(capacity), (C.int)(options))))
|
||||
return UnsafeNewQArrayData(unsafe.Pointer(C.QArrayData_Allocate4((C.size_t)(objectSize), (C.size_t)(alignment), (C.size_t)(capacity), (C.int)(options))))
|
||||
}
|
||||
|
||||
func QArrayData_ReallocateUnaligned4(data *QArrayData, objectSize uint64, newCapacity uint64, newOptions QArrayData__AllocationOption) *QArrayData {
|
||||
return newQArrayData_U(unsafe.Pointer(C.QArrayData_ReallocateUnaligned4(data.cPointer(), (C.size_t)(objectSize), (C.size_t)(newCapacity), (C.int)(newOptions))))
|
||||
return UnsafeNewQArrayData(unsafe.Pointer(C.QArrayData_ReallocateUnaligned4(data.cPointer(), (C.size_t)(objectSize), (C.size_t)(newCapacity), (C.int)(newOptions))))
|
||||
}
|
||||
|
||||
// Delete this object from C++ memory.
|
||||
@ -127,6 +134,13 @@ func (this *QtPrivate__QContainerImplHelper) cPointer() *C.QtPrivate__QContainer
|
||||
return this.h
|
||||
}
|
||||
|
||||
func (this *QtPrivate__QContainerImplHelper) UnsafePointer() unsafe.Pointer {
|
||||
if this == nil {
|
||||
return nil
|
||||
}
|
||||
return unsafe.Pointer(this.h)
|
||||
}
|
||||
|
||||
func newQtPrivate__QContainerImplHelper(h *C.QtPrivate__QContainerImplHelper) *QtPrivate__QContainerImplHelper {
|
||||
if h == nil {
|
||||
return nil
|
||||
@ -134,7 +148,7 @@ func newQtPrivate__QContainerImplHelper(h *C.QtPrivate__QContainerImplHelper) *Q
|
||||
return &QtPrivate__QContainerImplHelper{h: h}
|
||||
}
|
||||
|
||||
func newQtPrivate__QContainerImplHelper_U(h unsafe.Pointer) *QtPrivate__QContainerImplHelper {
|
||||
func UnsafeNewQtPrivate__QContainerImplHelper(h unsafe.Pointer) *QtPrivate__QContainerImplHelper {
|
||||
return newQtPrivate__QContainerImplHelper((*C.QtPrivate__QContainerImplHelper)(h))
|
||||
}
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
|
||||
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||
|
||||
#include "binding.h"
|
||||
#include "../libmiqt/libmiqt.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
@ -4,7 +4,7 @@
|
||||
#include <QRegion>
|
||||
#include <QSize>
|
||||
#include <QWindow>
|
||||
#include "qbackingstore.h"
|
||||
#include <qbackingstore.h>
|
||||
#include "gen_qbackingstore.h"
|
||||
#include "_cgo_export.h"
|
||||
|
||||
|
@ -24,6 +24,13 @@ func (this *QBackingStore) cPointer() *C.QBackingStore {
|
||||
return this.h
|
||||
}
|
||||
|
||||
func (this *QBackingStore) UnsafePointer() unsafe.Pointer {
|
||||
if this == nil {
|
||||
return nil
|
||||
}
|
||||
return unsafe.Pointer(this.h)
|
||||
}
|
||||
|
||||
func newQBackingStore(h *C.QBackingStore) *QBackingStore {
|
||||
if h == nil {
|
||||
return nil
|
||||
@ -31,7 +38,7 @@ func newQBackingStore(h *C.QBackingStore) *QBackingStore {
|
||||
return &QBackingStore{h: h}
|
||||
}
|
||||
|
||||
func newQBackingStore_U(h unsafe.Pointer) *QBackingStore {
|
||||
func UnsafeNewQBackingStore(h unsafe.Pointer) *QBackingStore {
|
||||
return newQBackingStore((*C.QBackingStore)(h))
|
||||
}
|
||||
|
||||
@ -42,11 +49,11 @@ func NewQBackingStore(window *QWindow) *QBackingStore {
|
||||
}
|
||||
|
||||
func (this *QBackingStore) Window() *QWindow {
|
||||
return newQWindow_U(unsafe.Pointer(C.QBackingStore_Window(this.h)))
|
||||
return UnsafeNewQWindow(unsafe.Pointer(C.QBackingStore_Window(this.h)))
|
||||
}
|
||||
|
||||
func (this *QBackingStore) PaintDevice() *QPaintDevice {
|
||||
return newQPaintDevice_U(unsafe.Pointer(C.QBackingStore_PaintDevice(this.h)))
|
||||
return UnsafeNewQPaintDevice(unsafe.Pointer(C.QBackingStore_PaintDevice(this.h)))
|
||||
}
|
||||
|
||||
func (this *QBackingStore) Flush(region *QRegion) {
|
||||
|
@ -7,7 +7,7 @@
|
||||
|
||||
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||
|
||||
#include "binding.h"
|
||||
#include "../libmiqt/libmiqt.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
@ -1,6 +1,6 @@
|
||||
#include <QBasicTimer>
|
||||
#include <QObject>
|
||||
#include "qbasictimer.h"
|
||||
#include <qbasictimer.h>
|
||||
#include "gen_qbasictimer.h"
|
||||
#include "_cgo_export.h"
|
||||
|
||||
|
@ -24,6 +24,13 @@ func (this *QBasicTimer) cPointer() *C.QBasicTimer {
|
||||
return this.h
|
||||
}
|
||||
|
||||
func (this *QBasicTimer) UnsafePointer() unsafe.Pointer {
|
||||
if this == nil {
|
||||
return nil
|
||||
}
|
||||
return unsafe.Pointer(this.h)
|
||||
}
|
||||
|
||||
func newQBasicTimer(h *C.QBasicTimer) *QBasicTimer {
|
||||
if h == nil {
|
||||
return nil
|
||||
@ -31,7 +38,7 @@ func newQBasicTimer(h *C.QBasicTimer) *QBasicTimer {
|
||||
return &QBasicTimer{h: h}
|
||||
}
|
||||
|
||||
func newQBasicTimer_U(h unsafe.Pointer) *QBasicTimer {
|
||||
func UnsafeNewQBasicTimer(h unsafe.Pointer) *QBasicTimer {
|
||||
return newQBasicTimer((*C.QBasicTimer)(h))
|
||||
}
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
|
||||
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||
|
||||
#include "binding.h"
|
||||
#include "../libmiqt/libmiqt.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
@ -1,6 +1,6 @@
|
||||
#include <QBitArray>
|
||||
#include <QBitRef>
|
||||
#include "qbitarray.h"
|
||||
#include <qbitarray.h>
|
||||
#include "gen_qbitarray.h"
|
||||
#include "_cgo_export.h"
|
||||
|
||||
|
@ -24,6 +24,13 @@ func (this *QBitArray) cPointer() *C.QBitArray {
|
||||
return this.h
|
||||
}
|
||||
|
||||
func (this *QBitArray) UnsafePointer() unsafe.Pointer {
|
||||
if this == nil {
|
||||
return nil
|
||||
}
|
||||
return unsafe.Pointer(this.h)
|
||||
}
|
||||
|
||||
func newQBitArray(h *C.QBitArray) *QBitArray {
|
||||
if h == nil {
|
||||
return nil
|
||||
@ -31,7 +38,7 @@ func newQBitArray(h *C.QBitArray) *QBitArray {
|
||||
return &QBitArray{h: h}
|
||||
}
|
||||
|
||||
func newQBitArray_U(h unsafe.Pointer) *QBitArray {
|
||||
func UnsafeNewQBitArray(h unsafe.Pointer) *QBitArray {
|
||||
return newQBitArray((*C.QBitArray)(h))
|
||||
}
|
||||
|
||||
@ -231,6 +238,13 @@ func (this *QBitRef) cPointer() *C.QBitRef {
|
||||
return this.h
|
||||
}
|
||||
|
||||
func (this *QBitRef) UnsafePointer() unsafe.Pointer {
|
||||
if this == nil {
|
||||
return nil
|
||||
}
|
||||
return unsafe.Pointer(this.h)
|
||||
}
|
||||
|
||||
func newQBitRef(h *C.QBitRef) *QBitRef {
|
||||
if h == nil {
|
||||
return nil
|
||||
@ -238,7 +252,7 @@ func newQBitRef(h *C.QBitRef) *QBitRef {
|
||||
return &QBitRef{h: h}
|
||||
}
|
||||
|
||||
func newQBitRef_U(h unsafe.Pointer) *QBitRef {
|
||||
func UnsafeNewQBitRef(h unsafe.Pointer) *QBitRef {
|
||||
return newQBitRef((*C.QBitRef)(h))
|
||||
}
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
|
||||
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||
|
||||
#include "binding.h"
|
||||
#include "../libmiqt/libmiqt.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
@ -7,7 +7,7 @@
|
||||
#include <QByteArray>
|
||||
#include <cstring>
|
||||
#include <QTransform>
|
||||
#include "qbitmap.h"
|
||||
#include <qbitmap.h>
|
||||
#include "gen_qbitmap.h"
|
||||
#include "_cgo_export.h"
|
||||
|
||||
|
@ -9,6 +9,7 @@ package qt
|
||||
import "C"
|
||||
|
||||
import (
|
||||
"github.com/mappu/miqt/libmiqt"
|
||||
"runtime"
|
||||
"unsafe"
|
||||
)
|
||||
@ -25,14 +26,21 @@ func (this *QBitmap) cPointer() *C.QBitmap {
|
||||
return this.h
|
||||
}
|
||||
|
||||
func (this *QBitmap) UnsafePointer() unsafe.Pointer {
|
||||
if this == nil {
|
||||
return nil
|
||||
}
|
||||
return unsafe.Pointer(this.h)
|
||||
}
|
||||
|
||||
func newQBitmap(h *C.QBitmap) *QBitmap {
|
||||
if h == nil {
|
||||
return nil
|
||||
}
|
||||
return &QBitmap{h: h, QPixmap: newQPixmap_U(unsafe.Pointer(h))}
|
||||
return &QBitmap{h: h, QPixmap: UnsafeNewQPixmap(unsafe.Pointer(h))}
|
||||
}
|
||||
|
||||
func newQBitmap_U(h unsafe.Pointer) *QBitmap {
|
||||
func UnsafeNewQBitmap(h unsafe.Pointer) *QBitmap {
|
||||
return newQBitmap((*C.QBitmap)(h))
|
||||
}
|
||||
|
||||
@ -62,7 +70,7 @@ func NewQBitmap4(param1 *QSize) *QBitmap {
|
||||
|
||||
// NewQBitmap5 constructs a new QBitmap object.
|
||||
func NewQBitmap5(fileName string) *QBitmap {
|
||||
fileName_ms := miqt_strdupg(fileName)
|
||||
fileName_ms := libmiqt.Strdupg(fileName)
|
||||
defer C.free(fileName_ms)
|
||||
ret := C.QBitmap_new5((*C.struct_miqt_string)(fileName_ms))
|
||||
return newQBitmap(ret)
|
||||
@ -76,7 +84,7 @@ func NewQBitmap6(other *QBitmap) *QBitmap {
|
||||
|
||||
// NewQBitmap7 constructs a new QBitmap object.
|
||||
func NewQBitmap7(fileName string, format string) *QBitmap {
|
||||
fileName_ms := miqt_strdupg(fileName)
|
||||
fileName_ms := libmiqt.Strdupg(fileName)
|
||||
defer C.free(fileName_ms)
|
||||
format_Cstring := C.CString(format)
|
||||
defer C.free(unsafe.Pointer(format_Cstring))
|
||||
|
@ -7,7 +7,7 @@
|
||||
|
||||
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||
|
||||
#include "binding.h"
|
||||
#include "../libmiqt/libmiqt.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
@ -11,7 +11,7 @@
|
||||
#include <cstring>
|
||||
#include <QVBoxLayout>
|
||||
#include <QWidget>
|
||||
#include "qboxlayout.h"
|
||||
#include <qboxlayout.h>
|
||||
#include "gen_qboxlayout.h"
|
||||
#include "_cgo_export.h"
|
||||
|
||||
|
@ -36,14 +36,21 @@ func (this *QBoxLayout) cPointer() *C.QBoxLayout {
|
||||
return this.h
|
||||
}
|
||||
|
||||
func (this *QBoxLayout) UnsafePointer() unsafe.Pointer {
|
||||
if this == nil {
|
||||
return nil
|
||||
}
|
||||
return unsafe.Pointer(this.h)
|
||||
}
|
||||
|
||||
func newQBoxLayout(h *C.QBoxLayout) *QBoxLayout {
|
||||
if h == nil {
|
||||
return nil
|
||||
}
|
||||
return &QBoxLayout{h: h, QLayout: newQLayout_U(unsafe.Pointer(h))}
|
||||
return &QBoxLayout{h: h, QLayout: UnsafeNewQLayout(unsafe.Pointer(h))}
|
||||
}
|
||||
|
||||
func newQBoxLayout_U(h unsafe.Pointer) *QBoxLayout {
|
||||
func UnsafeNewQBoxLayout(h unsafe.Pointer) *QBoxLayout {
|
||||
return newQBoxLayout((*C.QBoxLayout)(h))
|
||||
}
|
||||
|
||||
@ -60,7 +67,7 @@ func NewQBoxLayout2(param1 QBoxLayout__Direction, parent *QWidget) *QBoxLayout {
|
||||
}
|
||||
|
||||
func (this *QBoxLayout) MetaObject() *QMetaObject {
|
||||
return newQMetaObject_U(unsafe.Pointer(C.QBoxLayout_MetaObject(this.h)))
|
||||
return UnsafeNewQMetaObject(unsafe.Pointer(C.QBoxLayout_MetaObject(this.h)))
|
||||
}
|
||||
|
||||
func (this *QBoxLayout) Metacast(param1 string) unsafe.Pointer {
|
||||
@ -213,11 +220,11 @@ func (this *QBoxLayout) Invalidate() {
|
||||
}
|
||||
|
||||
func (this *QBoxLayout) ItemAt(param1 int) *QLayoutItem {
|
||||
return newQLayoutItem_U(unsafe.Pointer(C.QBoxLayout_ItemAt(this.h, (C.int)(param1))))
|
||||
return UnsafeNewQLayoutItem(unsafe.Pointer(C.QBoxLayout_ItemAt(this.h, (C.int)(param1))))
|
||||
}
|
||||
|
||||
func (this *QBoxLayout) TakeAt(param1 int) *QLayoutItem {
|
||||
return newQLayoutItem_U(unsafe.Pointer(C.QBoxLayout_TakeAt(this.h, (C.int)(param1))))
|
||||
return UnsafeNewQLayoutItem(unsafe.Pointer(C.QBoxLayout_TakeAt(this.h, (C.int)(param1))))
|
||||
}
|
||||
|
||||
func (this *QBoxLayout) Count() int {
|
||||
@ -330,14 +337,21 @@ func (this *QHBoxLayout) cPointer() *C.QHBoxLayout {
|
||||
return this.h
|
||||
}
|
||||
|
||||
func (this *QHBoxLayout) UnsafePointer() unsafe.Pointer {
|
||||
if this == nil {
|
||||
return nil
|
||||
}
|
||||
return unsafe.Pointer(this.h)
|
||||
}
|
||||
|
||||
func newQHBoxLayout(h *C.QHBoxLayout) *QHBoxLayout {
|
||||
if h == nil {
|
||||
return nil
|
||||
}
|
||||
return &QHBoxLayout{h: h, QBoxLayout: newQBoxLayout_U(unsafe.Pointer(h))}
|
||||
return &QHBoxLayout{h: h, QBoxLayout: UnsafeNewQBoxLayout(unsafe.Pointer(h))}
|
||||
}
|
||||
|
||||
func newQHBoxLayout_U(h unsafe.Pointer) *QHBoxLayout {
|
||||
func UnsafeNewQHBoxLayout(h unsafe.Pointer) *QHBoxLayout {
|
||||
return newQHBoxLayout((*C.QHBoxLayout)(h))
|
||||
}
|
||||
|
||||
@ -354,7 +368,7 @@ func NewQHBoxLayout2(parent *QWidget) *QHBoxLayout {
|
||||
}
|
||||
|
||||
func (this *QHBoxLayout) MetaObject() *QMetaObject {
|
||||
return newQMetaObject_U(unsafe.Pointer(C.QHBoxLayout_MetaObject(this.h)))
|
||||
return UnsafeNewQMetaObject(unsafe.Pointer(C.QHBoxLayout_MetaObject(this.h)))
|
||||
}
|
||||
|
||||
func (this *QHBoxLayout) Metacast(param1 string) unsafe.Pointer {
|
||||
@ -451,14 +465,21 @@ func (this *QVBoxLayout) cPointer() *C.QVBoxLayout {
|
||||
return this.h
|
||||
}
|
||||
|
||||
func (this *QVBoxLayout) UnsafePointer() unsafe.Pointer {
|
||||
if this == nil {
|
||||
return nil
|
||||
}
|
||||
return unsafe.Pointer(this.h)
|
||||
}
|
||||
|
||||
func newQVBoxLayout(h *C.QVBoxLayout) *QVBoxLayout {
|
||||
if h == nil {
|
||||
return nil
|
||||
}
|
||||
return &QVBoxLayout{h: h, QBoxLayout: newQBoxLayout_U(unsafe.Pointer(h))}
|
||||
return &QVBoxLayout{h: h, QBoxLayout: UnsafeNewQBoxLayout(unsafe.Pointer(h))}
|
||||
}
|
||||
|
||||
func newQVBoxLayout_U(h unsafe.Pointer) *QVBoxLayout {
|
||||
func UnsafeNewQVBoxLayout(h unsafe.Pointer) *QVBoxLayout {
|
||||
return newQVBoxLayout((*C.QVBoxLayout)(h))
|
||||
}
|
||||
|
||||
@ -475,7 +496,7 @@ func NewQVBoxLayout2(parent *QWidget) *QVBoxLayout {
|
||||
}
|
||||
|
||||
func (this *QVBoxLayout) MetaObject() *QMetaObject {
|
||||
return newQMetaObject_U(unsafe.Pointer(C.QVBoxLayout_MetaObject(this.h)))
|
||||
return UnsafeNewQMetaObject(unsafe.Pointer(C.QVBoxLayout_MetaObject(this.h)))
|
||||
}
|
||||
|
||||
func (this *QVBoxLayout) Metacast(param1 string) unsafe.Pointer {
|
||||
|
@ -7,7 +7,7 @@
|
||||
|
||||
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||
|
||||
#include "binding.h"
|
||||
#include "../libmiqt/libmiqt.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
@ -11,7 +11,7 @@
|
||||
#include <QPointF>
|
||||
#include <QRadialGradient>
|
||||
#include <QTransform>
|
||||
#include "qbrush.h"
|
||||
#include <qbrush.h>
|
||||
#include "gen_qbrush.h"
|
||||
#include "_cgo_export.h"
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user