diff --git a/.github/workflows/miqt.yml b/.github/workflows/miqt.yml index aa0a8f56..64920fa8 100644 --- a/.github/workflows/miqt.yml +++ b/.github/workflows/miqt.yml @@ -21,10 +21,26 @@ jobs: key: linux64-clang-cache - name: Rebuild binding source - run: make + run: make genbindings - name: Assert no changes run: git update-index --really-refresh && git diff-index HEAD + + miqt_buildall: + runs-on: ubuntu-24.04 + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Cache GOCACHE + uses: actions/cache@v4 + with: + path: ~/.cache/go-build + key: linux64-buildall-gocache + + - name: Rebuild all libraries and examples + run: make build-all miqt_linux64_qt5: runs-on: ubuntu-24.04 diff --git a/Makefile b/Makefile index 66149ed7..28864a78 100644 --- a/Makefile +++ b/Makefile @@ -1,18 +1,36 @@ -BUILDSTAMPS = docker/genbindings.docker-buildstamp -DOCKER = docker +BUILDSTAMPS := docker/genbindings.docker-buildstamp +DOCKER := docker +SHELL := /bin/bash +# DOCKEREXEC runs the target command in the `genbindings` docker container. +# It mounts in the current GOCACHE and GOMODCACHE. +DOCKEREXEC = mkdir -p "$$(go env GOCACHE)" && \ + mkdir -p "$$(go env GOMODCACHE)" && \ + $(DOCKER) run \ + --user "$$(id -u):$$(id -g)" \ + -v "$$(go env GOCACHE):/.cache/go-build" \ + -v "$$(go env GOMODCACHE):/go/pkg/mod" \ + -v "$$PWD:/src" \ + -w /src \ + miqt/genbindings:latest \ + /bin/bash -c + +.PHONY: all all: genbindings docker/genbindings.docker-buildstamp: docker/genbindings.Dockerfile $(DOCKER) build -t miqt/genbindings:latest -f docker/genbindings.Dockerfile . touch $@ +.PHONY: clean clean: $(DOCKER) image rm -f miqt/genbindings:latest rm -f $(BUILDSTAMPS) +.PHONY: genbindings genbindings: $(BUILDSTAMPS) - mkdir -p ~/.cache/go-build - $(DOCKER) run --user $$(id -u):$$(id -g) -v ~/.cache/go-build:/.cache/go-build -v $$PWD:/src -w /src miqt/genbindings:latest /bin/bash -c 'cd cmd/genbindings && go build && ./genbindings' + $(DOCKEREXEC) 'cd cmd/genbindings && go build && ./genbindings' -.PHONY : all clean genbindings +.PHONY: build-all +build-all: $(BUILDSTAMPS) + $(DOCKEREXEC) 'go build ./...' diff --git a/cmd/genbindings/clang2il.go b/cmd/genbindings/clang2il.go index 2c734b3f..377058e4 100644 --- a/cmd/genbindings/clang2il.go +++ b/cmd/genbindings/clang2il.go @@ -669,7 +669,7 @@ func parseMethod(node map[string]interface{}, mm *CppMethod) error { // If anything here is too complicated, skip the whole method var err error = nil - mm.ReturnType, mm.Parameters, mm.IsConst, err = parseTypeString(qualType) + mm.ReturnType, mm.Parameters, mm.IsConst, mm.IsNoExcept, err = parseTypeString(qualType) if err != nil { return err } @@ -767,10 +767,10 @@ func parseMethod(node map[string]interface{}, mm *CppMethod) error { // into its (A) return type and (B) separate parameter types. // These clang strings never contain the parameter's name, so the names here are // not filled in. -func parseTypeString(typeString string) (CppParameter, []CppParameter, bool, error) { +func parseTypeString(typeString string) (CppParameter, []CppParameter, bool, bool, error) { if strings.Contains(typeString, `&&`) { // TODO Rvalue references - return CppParameter{}, nil, false, ErrTooComplex + return CppParameter{}, nil, false, false, ErrTooComplex } // Cut to exterior-most (, ) pair @@ -778,27 +778,19 @@ func parseTypeString(typeString string) (CppParameter, []CppParameter, bool, err epos := strings.LastIndex(typeString, `)`) if opos == -1 || epos == -1 { - return CppParameter{}, nil, false, fmt.Errorf("Type string %q missing brackets", typeString) + return CppParameter{}, nil, false, false, fmt.Errorf("Type string %q missing brackets", typeString) } - isConst := false - if strings.Contains(typeString[epos:], `const`) { - isConst = true - } + isConst := strings.Contains(typeString[epos:], `const`) + isNoExcept := strings.Contains(typeString[epos:], `noexcept`) returnType := parseSingleTypeString(strings.TrimSpace(typeString[0:opos])) - // Skip functions that return ints-by-reference since the ergonomics don't - // go through the binding - if returnType.IntType() && returnType.ByRef { - return CppParameter{}, nil, false, ErrTooComplex // e.g. QSize::rheight() - } - inner := typeString[opos+1 : epos] // Should be no more brackets if strings.ContainsAny(inner, `()`) { - return CppParameter{}, nil, false, ErrTooComplex + return CppParameter{}, nil, false, false, ErrTooComplex } // Parameters are separated by commas and nesting can not be possible @@ -814,7 +806,7 @@ func parseTypeString(typeString string) (CppParameter, []CppParameter, bool, err } } - return returnType, ret, isConst, nil + return returnType, ret, isConst, isNoExcept, nil } // tokenizeMultipleParameters is like strings.Split by comma, except it does not @@ -904,6 +896,10 @@ func parseSingleTypeString(p string) CppParameter { // QNetwork has some references to 'class QSslCertificate'. Flatten continue + } else if tok == "noexcept" { + // Used by ScintillaEdit + insert.NoExcept = true + } else if tok == "&" { // U+0026 insert.ByRef = true diff --git a/cmd/genbindings/config-allowlist.go b/cmd/genbindings/config-allowlist.go index 60fce8f7..cccf2427 100644 --- a/cmd/genbindings/config-allowlist.go +++ b/cmd/genbindings/config-allowlist.go @@ -277,6 +277,20 @@ func AllowVirtualForClass(className string) bool { return false } + // QScintilla + // Pure virtuals + if className == "Scintilla::Internal::Surface" { + return false + } + if className == "Scintilla::Internal::ListBox" { + return false + } + + // Qt 5 QMultimedia (needs investigation) + if className == "QAbstractPlanarVideoBuffer" { + return false + } + // Qt 5 QWebkit: undefined reference to typeinfo if className == "QWebNotificationPresenter" { return false @@ -347,6 +361,12 @@ func AllowMethod(className string, mm CppMethod) error { return ErrTooComplex } + // Skip functions that return ints-by-reference since the ergonomics don't + // go through the binding + if mm.ReturnType.IntType() && mm.ReturnType.ByRef { + return ErrTooComplex // e.g. QSize::rheight() + } + return nil // OK, allow } diff --git a/cmd/genbindings/emitcabi.go b/cmd/genbindings/emitcabi.go index 1cabff09..7a42c024 100644 --- a/cmd/genbindings/emitcabi.go +++ b/cmd/genbindings/emitcabi.go @@ -1045,7 +1045,7 @@ extern "C" { ret.WriteString( "\t// Subclass to allow providing a Go implementation\n" + - "\tvirtual " + m.ReturnType.RenderTypeQtCpp() + " " + m.CppCallTarget() + "(" + emitParametersCpp(m) + ") " + ifv(m.IsConst, "const ", "") + "override {\n", + "\tvirtual " + m.ReturnType.RenderTypeQtCpp() + " " + m.CppCallTarget() + "(" + emitParametersCpp(m) + ") " + ifv(m.IsConst, "const ", "") + ifv(m.IsNoExcept, "noexcept ", "") + "override {\n", ) ret.WriteString("\t\tif (" + handleVarname + " == 0) {\n") diff --git a/cmd/genbindings/intermediate.go b/cmd/genbindings/intermediate.go index 6e8a98d5..52c6edf0 100644 --- a/cmd/genbindings/intermediate.go +++ b/cmd/genbindings/intermediate.go @@ -14,6 +14,7 @@ type CppParameter struct { PointerCount int ByRef bool Optional bool + NoExcept bool QtCppOriginalType *CppParameter // If we rewrote QStringList->QList, this field contains the original QStringList. Otherwise, it's blank } @@ -245,6 +246,7 @@ type CppMethod struct { IsStatic bool IsSignal bool IsConst bool + IsNoExcept bool IsVirtual bool IsPureVirtual bool // Virtual method was declared with = 0 i.e. there is no base method here to call IsProtected bool // If true, we can't call this method but we may still be able to overload it diff --git a/docker/genbindings.Dockerfile b/docker/genbindings.Dockerfile index d81b25d7..1d59d82d 100644 --- a/docker/genbindings.Dockerfile +++ b/docker/genbindings.Dockerfile @@ -39,6 +39,7 @@ RUN \ RUN mkdir -p /usr/local/lib/pkgconfig COPY pkg-config/QScintilla.pc.example /usr/local/lib/pkgconfig/QScintilla.pc +COPY pkg-config/QScintilla6.pc.example /usr/local/lib/pkgconfig/QScintilla6.pc COPY pkg-config/ScintillaEdit.pc.example /usr/local/lib/pkgconfig/ScintillaEdit.pc ENV GOFLAGS=-buildvcs=false diff --git a/examples/windowsmanifest/main.go b/examples/windowsmanifest/main.go index 1aa7bd23..b82a537d 100644 --- a/examples/windowsmanifest/main.go +++ b/examples/windowsmanifest/main.go @@ -11,7 +11,7 @@ func main() { qt.NewQApplication(os.Args) - btn := qt.NewQPushButton2("Hello world!") + btn := qt.NewQPushButton3("Hello world!") btn.SetFixedWidth(320) var counter int = 0 diff --git a/qt-extras/scintillaedit/gen_ScintillaEdit.cpp b/qt-extras/scintillaedit/gen_ScintillaEdit.cpp index fc0b3a0d..5dbd5296 100644 --- a/qt-extras/scintillaedit/gen_ScintillaEdit.cpp +++ b/qt-extras/scintillaedit/gen_ScintillaEdit.cpp @@ -78,57 +78,6 @@ extern "C" { #endif -void miqt_exec_callback_Scintilla__Internal__Surface_Init(Scintilla__Internal__Surface*, intptr_t, void*); -void miqt_exec_callback_Scintilla__Internal__Surface_Init2(Scintilla__Internal__Surface*, intptr_t, void*, void*); -void miqt_exec_callback_Scintilla__Internal__Surface_SetMode(Scintilla__Internal__Surface*, intptr_t, Scintilla__Internal__SurfaceMode*); -void miqt_exec_callback_Scintilla__Internal__Surface_Release(Scintilla__Internal__Surface*, intptr_t); -int miqt_exec_callback_Scintilla__Internal__Surface_SupportsFeature(Scintilla__Internal__Surface*, intptr_t, int); -bool miqt_exec_callback_Scintilla__Internal__Surface_Initialised(Scintilla__Internal__Surface*, intptr_t); -int miqt_exec_callback_Scintilla__Internal__Surface_LogPixelsY(Scintilla__Internal__Surface*, intptr_t); -int miqt_exec_callback_Scintilla__Internal__Surface_PixelDivisions(Scintilla__Internal__Surface*, intptr_t); -int miqt_exec_callback_Scintilla__Internal__Surface_DeviceHeightFont(Scintilla__Internal__Surface*, intptr_t, int); -void miqt_exec_callback_Scintilla__Internal__Surface_LineDraw(Scintilla__Internal__Surface*, intptr_t, Scintilla__Internal__Point*, Scintilla__Internal__Point*, Scintilla__Internal__Stroke*); -void miqt_exec_callback_Scintilla__Internal__Surface_PolyLine(Scintilla__Internal__Surface*, intptr_t, Scintilla__Internal__Point*, size_t, Scintilla__Internal__Stroke*); -void miqt_exec_callback_Scintilla__Internal__Surface_Polygon(Scintilla__Internal__Surface*, intptr_t, Scintilla__Internal__Point*, size_t, Scintilla__Internal__FillStroke*); -void miqt_exec_callback_Scintilla__Internal__Surface_RectangleDraw(Scintilla__Internal__Surface*, intptr_t, Scintilla__Internal__PRectangle*, Scintilla__Internal__FillStroke*); -void miqt_exec_callback_Scintilla__Internal__Surface_RectangleFrame(Scintilla__Internal__Surface*, intptr_t, Scintilla__Internal__PRectangle*, Scintilla__Internal__Stroke*); -void miqt_exec_callback_Scintilla__Internal__Surface_FillRectangle(Scintilla__Internal__Surface*, intptr_t, Scintilla__Internal__PRectangle*, Scintilla__Internal__Fill*); -void miqt_exec_callback_Scintilla__Internal__Surface_FillRectangleAligned(Scintilla__Internal__Surface*, intptr_t, Scintilla__Internal__PRectangle*, Scintilla__Internal__Fill*); -void miqt_exec_callback_Scintilla__Internal__Surface_FillRectangle2(Scintilla__Internal__Surface*, intptr_t, Scintilla__Internal__PRectangle*, Scintilla__Internal__Surface*); -void miqt_exec_callback_Scintilla__Internal__Surface_RoundedRectangle(Scintilla__Internal__Surface*, intptr_t, Scintilla__Internal__PRectangle*, Scintilla__Internal__FillStroke*); -void miqt_exec_callback_Scintilla__Internal__Surface_AlphaRectangle(Scintilla__Internal__Surface*, intptr_t, Scintilla__Internal__PRectangle*, double, Scintilla__Internal__FillStroke*); -void miqt_exec_callback_Scintilla__Internal__Surface_DrawRGBAImage(Scintilla__Internal__Surface*, intptr_t, Scintilla__Internal__PRectangle*, int, int, const unsigned char*); -void miqt_exec_callback_Scintilla__Internal__Surface_Ellipse(Scintilla__Internal__Surface*, intptr_t, Scintilla__Internal__PRectangle*, Scintilla__Internal__FillStroke*); -void miqt_exec_callback_Scintilla__Internal__Surface_Stadium(Scintilla__Internal__Surface*, intptr_t, Scintilla__Internal__PRectangle*, Scintilla__Internal__FillStroke*, int); -void miqt_exec_callback_Scintilla__Internal__Surface_Copy(Scintilla__Internal__Surface*, intptr_t, Scintilla__Internal__PRectangle*, Scintilla__Internal__Point*, Scintilla__Internal__Surface*); -double miqt_exec_callback_Scintilla__Internal__Surface_Ascent(Scintilla__Internal__Surface*, intptr_t, Scintilla__Internal__Font*); -double miqt_exec_callback_Scintilla__Internal__Surface_Descent(Scintilla__Internal__Surface*, intptr_t, Scintilla__Internal__Font*); -double miqt_exec_callback_Scintilla__Internal__Surface_InternalLeading(Scintilla__Internal__Surface*, intptr_t, Scintilla__Internal__Font*); -double miqt_exec_callback_Scintilla__Internal__Surface_Height(Scintilla__Internal__Surface*, intptr_t, Scintilla__Internal__Font*); -double miqt_exec_callback_Scintilla__Internal__Surface_AverageCharWidth(Scintilla__Internal__Surface*, intptr_t, Scintilla__Internal__Font*); -void miqt_exec_callback_Scintilla__Internal__Surface_SetClip(Scintilla__Internal__Surface*, intptr_t, Scintilla__Internal__PRectangle*); -void miqt_exec_callback_Scintilla__Internal__Surface_PopClip(Scintilla__Internal__Surface*, intptr_t); -void miqt_exec_callback_Scintilla__Internal__Surface_FlushCachedState(Scintilla__Internal__Surface*, intptr_t); -void miqt_exec_callback_Scintilla__Internal__Surface_FlushDrawing(Scintilla__Internal__Surface*, intptr_t); -void miqt_exec_callback_Scintilla__Internal__ListBox_SetFont(Scintilla__Internal__ListBox*, intptr_t, Scintilla__Internal__Font*); -void miqt_exec_callback_Scintilla__Internal__ListBox_Create(Scintilla__Internal__ListBox*, intptr_t, Scintilla__Internal__Window*, int, Scintilla__Internal__Point*, int, bool, int); -void miqt_exec_callback_Scintilla__Internal__ListBox_SetAverageCharWidth(Scintilla__Internal__ListBox*, intptr_t, int); -void miqt_exec_callback_Scintilla__Internal__ListBox_SetVisibleRows(Scintilla__Internal__ListBox*, intptr_t, int); -int miqt_exec_callback_Scintilla__Internal__ListBox_GetVisibleRows(const Scintilla__Internal__ListBox*, intptr_t); -Scintilla__Internal__PRectangle* miqt_exec_callback_Scintilla__Internal__ListBox_GetDesiredRect(Scintilla__Internal__ListBox*, intptr_t); -int miqt_exec_callback_Scintilla__Internal__ListBox_CaretFromEdge(Scintilla__Internal__ListBox*, intptr_t); -void miqt_exec_callback_Scintilla__Internal__ListBox_Clear(Scintilla__Internal__ListBox*, intptr_t); -void miqt_exec_callback_Scintilla__Internal__ListBox_Append(Scintilla__Internal__ListBox*, intptr_t, char*, int); -int miqt_exec_callback_Scintilla__Internal__ListBox_Length(Scintilla__Internal__ListBox*, intptr_t); -void miqt_exec_callback_Scintilla__Internal__ListBox_Select(Scintilla__Internal__ListBox*, intptr_t, int); -int miqt_exec_callback_Scintilla__Internal__ListBox_GetSelection(Scintilla__Internal__ListBox*, intptr_t); -int miqt_exec_callback_Scintilla__Internal__ListBox_Find(Scintilla__Internal__ListBox*, intptr_t, const char*); -void miqt_exec_callback_Scintilla__Internal__ListBox_RegisterImage(Scintilla__Internal__ListBox*, intptr_t, int, const char*); -void miqt_exec_callback_Scintilla__Internal__ListBox_RegisterRGBAImage(Scintilla__Internal__ListBox*, intptr_t, int, int, int, const unsigned char*); -void miqt_exec_callback_Scintilla__Internal__ListBox_ClearRegisteredImages(Scintilla__Internal__ListBox*, intptr_t); -void miqt_exec_callback_Scintilla__Internal__ListBox_SetDelegate(Scintilla__Internal__ListBox*, intptr_t, Scintilla__Internal__IListBoxDelegate*); -void miqt_exec_callback_Scintilla__Internal__ListBox_SetList(Scintilla__Internal__ListBox*, intptr_t, const char*, char, char); -void miqt_exec_callback_Scintilla__Internal__ListBox_SetOptions(Scintilla__Internal__ListBox*, intptr_t, Scintilla__Internal__ListOptions*); void miqt_exec_callback_ScintillaEditBase_horizontalScrolled(intptr_t, int); void miqt_exec_callback_ScintillaEditBase_verticalScrolled(intptr_t, int); void miqt_exec_callback_ScintillaEditBase_horizontalRangeChanged(intptr_t, int, int); @@ -786,557 +735,6 @@ void Scintilla__Internal__SurfaceMode_delete(Scintilla__Internal__SurfaceMode* s delete self; } -class MiqtVirtualScintillaInternalSurface final : public Scintilla::Internal::Surface { -public: - - MiqtVirtualScintillaInternalSurface(): Scintilla::Internal::Surface() {}; - - virtual ~MiqtVirtualScintillaInternalSurface() override = default; - - // cgo.Handle value for overwritten implementation - intptr_t handle__Init = 0; - - // Subclass to allow providing a Go implementation - virtual void Init(Scintilla::Internal::WindowID wid) override { - if (handle__Init == 0) { - return; // Pure virtual, there is no base we can call - } - - Scintilla::Internal::WindowID wid_ret = wid; - void* sigval1 = static_cast(wid_ret); - - miqt_exec_callback_Scintilla__Internal__Surface_Init(this, handle__Init, sigval1); - - - } - - // cgo.Handle value for overwritten implementation - intptr_t handle__Init2 = 0; - - // Subclass to allow providing a Go implementation - virtual void Init(Scintilla::Internal::SurfaceID sid, Scintilla::Internal::WindowID wid) override { - if (handle__Init2 == 0) { - return; // Pure virtual, there is no base we can call - } - - Scintilla::Internal::SurfaceID sid_ret = sid; - void* sigval1 = static_cast(sid_ret); - Scintilla::Internal::WindowID wid_ret = wid; - void* sigval2 = static_cast(wid_ret); - - miqt_exec_callback_Scintilla__Internal__Surface_Init2(this, handle__Init2, sigval1, sigval2); - - - } - - // cgo.Handle value for overwritten implementation - intptr_t handle__SetMode = 0; - - // Subclass to allow providing a Go implementation - virtual void SetMode(Scintilla::Internal::SurfaceMode mode) override { - if (handle__SetMode == 0) { - return; // Pure virtual, there is no base we can call - } - - Scintilla__Internal__SurfaceMode* sigval1 = new Scintilla::Internal::SurfaceMode(mode); - - miqt_exec_callback_Scintilla__Internal__Surface_SetMode(this, handle__SetMode, sigval1); - - - } - - // cgo.Handle value for overwritten implementation - intptr_t handle__Release = 0; - - // Subclass to allow providing a Go implementation - virtual void Release() override { - if (handle__Release == 0) { - return; // Pure virtual, there is no base we can call - } - - - miqt_exec_callback_Scintilla__Internal__Surface_Release(this, handle__Release); - - - } - - // cgo.Handle value for overwritten implementation - intptr_t handle__SupportsFeature = 0; - - // Subclass to allow providing a Go implementation - virtual int SupportsFeature(Scintilla::Supports feature) override { - if (handle__SupportsFeature == 0) { - return 0; // Pure virtual, there is no base we can call - } - - Scintilla::Supports feature_ret = feature; - int sigval1 = static_cast(feature_ret); - - int callback_return_value = miqt_exec_callback_Scintilla__Internal__Surface_SupportsFeature(this, handle__SupportsFeature, sigval1); - - return static_cast(callback_return_value); - } - - // cgo.Handle value for overwritten implementation - intptr_t handle__Initialised = 0; - - // Subclass to allow providing a Go implementation - virtual bool Initialised() override { - if (handle__Initialised == 0) { - return false; // Pure virtual, there is no base we can call - } - - - bool callback_return_value = miqt_exec_callback_Scintilla__Internal__Surface_Initialised(this, handle__Initialised); - - return callback_return_value; - } - - // cgo.Handle value for overwritten implementation - intptr_t handle__LogPixelsY = 0; - - // Subclass to allow providing a Go implementation - virtual int LogPixelsY() override { - if (handle__LogPixelsY == 0) { - return 0; // Pure virtual, there is no base we can call - } - - - int callback_return_value = miqt_exec_callback_Scintilla__Internal__Surface_LogPixelsY(this, handle__LogPixelsY); - - return static_cast(callback_return_value); - } - - // cgo.Handle value for overwritten implementation - intptr_t handle__PixelDivisions = 0; - - // Subclass to allow providing a Go implementation - virtual int PixelDivisions() override { - if (handle__PixelDivisions == 0) { - return 0; // Pure virtual, there is no base we can call - } - - - int callback_return_value = miqt_exec_callback_Scintilla__Internal__Surface_PixelDivisions(this, handle__PixelDivisions); - - return static_cast(callback_return_value); - } - - // cgo.Handle value for overwritten implementation - intptr_t handle__DeviceHeightFont = 0; - - // Subclass to allow providing a Go implementation - virtual int DeviceHeightFont(int points) override { - if (handle__DeviceHeightFont == 0) { - return 0; // Pure virtual, there is no base we can call - } - - int sigval1 = points; - - int callback_return_value = miqt_exec_callback_Scintilla__Internal__Surface_DeviceHeightFont(this, handle__DeviceHeightFont, sigval1); - - return static_cast(callback_return_value); - } - - // cgo.Handle value for overwritten implementation - intptr_t handle__LineDraw = 0; - - // Subclass to allow providing a Go implementation - virtual void LineDraw(Scintilla::Internal::Point start, Scintilla::Internal::Point end, Scintilla::Internal::Stroke stroke) override { - if (handle__LineDraw == 0) { - return; // Pure virtual, there is no base we can call - } - - Scintilla__Internal__Point* sigval1 = new Scintilla::Internal::Point(start); - Scintilla__Internal__Point* sigval2 = new Scintilla::Internal::Point(end); - Scintilla__Internal__Stroke* sigval3 = new Scintilla::Internal::Stroke(stroke); - - miqt_exec_callback_Scintilla__Internal__Surface_LineDraw(this, handle__LineDraw, sigval1, sigval2, sigval3); - - - } - - // cgo.Handle value for overwritten implementation - intptr_t handle__PolyLine = 0; - - // Subclass to allow providing a Go implementation - virtual void PolyLine(const Scintilla::Internal::Point* pts, size_t npts, Scintilla::Internal::Stroke stroke) override { - if (handle__PolyLine == 0) { - return; // Pure virtual, there is no base we can call - } - - Scintilla__Internal__Point* sigval1 = (Scintilla__Internal__Point*) pts; - size_t sigval2 = npts; - Scintilla__Internal__Stroke* sigval3 = new Scintilla::Internal::Stroke(stroke); - - miqt_exec_callback_Scintilla__Internal__Surface_PolyLine(this, handle__PolyLine, sigval1, sigval2, sigval3); - - - } - - // cgo.Handle value for overwritten implementation - intptr_t handle__Polygon = 0; - - // Subclass to allow providing a Go implementation - virtual void Polygon(const Scintilla::Internal::Point* pts, size_t npts, Scintilla::Internal::FillStroke fillStroke) override { - if (handle__Polygon == 0) { - return; // Pure virtual, there is no base we can call - } - - Scintilla__Internal__Point* sigval1 = (Scintilla__Internal__Point*) pts; - size_t sigval2 = npts; - Scintilla__Internal__FillStroke* sigval3 = new Scintilla::Internal::FillStroke(fillStroke); - - miqt_exec_callback_Scintilla__Internal__Surface_Polygon(this, handle__Polygon, sigval1, sigval2, sigval3); - - - } - - // cgo.Handle value for overwritten implementation - intptr_t handle__RectangleDraw = 0; - - // Subclass to allow providing a Go implementation - virtual void RectangleDraw(Scintilla::Internal::PRectangle rc, Scintilla::Internal::FillStroke fillStroke) override { - if (handle__RectangleDraw == 0) { - return; // Pure virtual, there is no base we can call - } - - Scintilla__Internal__PRectangle* sigval1 = new Scintilla::Internal::PRectangle(rc); - Scintilla__Internal__FillStroke* sigval2 = new Scintilla::Internal::FillStroke(fillStroke); - - miqt_exec_callback_Scintilla__Internal__Surface_RectangleDraw(this, handle__RectangleDraw, sigval1, sigval2); - - - } - - // cgo.Handle value for overwritten implementation - intptr_t handle__RectangleFrame = 0; - - // Subclass to allow providing a Go implementation - virtual void RectangleFrame(Scintilla::Internal::PRectangle rc, Scintilla::Internal::Stroke stroke) override { - if (handle__RectangleFrame == 0) { - return; // Pure virtual, there is no base we can call - } - - Scintilla__Internal__PRectangle* sigval1 = new Scintilla::Internal::PRectangle(rc); - Scintilla__Internal__Stroke* sigval2 = new Scintilla::Internal::Stroke(stroke); - - miqt_exec_callback_Scintilla__Internal__Surface_RectangleFrame(this, handle__RectangleFrame, sigval1, sigval2); - - - } - - // cgo.Handle value for overwritten implementation - intptr_t handle__FillRectangle = 0; - - // Subclass to allow providing a Go implementation - virtual void FillRectangle(Scintilla::Internal::PRectangle rc, Scintilla::Internal::Fill fill) override { - if (handle__FillRectangle == 0) { - return; // Pure virtual, there is no base we can call - } - - Scintilla__Internal__PRectangle* sigval1 = new Scintilla::Internal::PRectangle(rc); - Scintilla__Internal__Fill* sigval2 = new Scintilla::Internal::Fill(fill); - - miqt_exec_callback_Scintilla__Internal__Surface_FillRectangle(this, handle__FillRectangle, sigval1, sigval2); - - - } - - // cgo.Handle value for overwritten implementation - intptr_t handle__FillRectangleAligned = 0; - - // Subclass to allow providing a Go implementation - virtual void FillRectangleAligned(Scintilla::Internal::PRectangle rc, Scintilla::Internal::Fill fill) override { - if (handle__FillRectangleAligned == 0) { - return; // Pure virtual, there is no base we can call - } - - Scintilla__Internal__PRectangle* sigval1 = new Scintilla::Internal::PRectangle(rc); - Scintilla__Internal__Fill* sigval2 = new Scintilla::Internal::Fill(fill); - - miqt_exec_callback_Scintilla__Internal__Surface_FillRectangleAligned(this, handle__FillRectangleAligned, sigval1, sigval2); - - - } - - // cgo.Handle value for overwritten implementation - intptr_t handle__FillRectangle2 = 0; - - // Subclass to allow providing a Go implementation - virtual void FillRectangle(Scintilla::Internal::PRectangle rc, Scintilla::Internal::Surface& surfacePattern) override { - if (handle__FillRectangle2 == 0) { - return; // Pure virtual, there is no base we can call - } - - Scintilla__Internal__PRectangle* sigval1 = new Scintilla::Internal::PRectangle(rc); - Scintilla::Internal::Surface& surfacePattern_ret = surfacePattern; - // Cast returned reference into pointer - Scintilla__Internal__Surface* sigval2 = &surfacePattern_ret; - - miqt_exec_callback_Scintilla__Internal__Surface_FillRectangle2(this, handle__FillRectangle2, sigval1, sigval2); - - - } - - // cgo.Handle value for overwritten implementation - intptr_t handle__RoundedRectangle = 0; - - // Subclass to allow providing a Go implementation - virtual void RoundedRectangle(Scintilla::Internal::PRectangle rc, Scintilla::Internal::FillStroke fillStroke) override { - if (handle__RoundedRectangle == 0) { - return; // Pure virtual, there is no base we can call - } - - Scintilla__Internal__PRectangle* sigval1 = new Scintilla::Internal::PRectangle(rc); - Scintilla__Internal__FillStroke* sigval2 = new Scintilla::Internal::FillStroke(fillStroke); - - miqt_exec_callback_Scintilla__Internal__Surface_RoundedRectangle(this, handle__RoundedRectangle, sigval1, sigval2); - - - } - - // cgo.Handle value for overwritten implementation - intptr_t handle__AlphaRectangle = 0; - - // Subclass to allow providing a Go implementation - virtual void AlphaRectangle(Scintilla::Internal::PRectangle rc, Scintilla::Internal::XYPOSITION cornerSize, Scintilla::Internal::FillStroke fillStroke) override { - if (handle__AlphaRectangle == 0) { - return; // Pure virtual, there is no base we can call - } - - Scintilla__Internal__PRectangle* sigval1 = new Scintilla::Internal::PRectangle(rc); - Scintilla::Internal::XYPOSITION cornerSize_ret = cornerSize; - double sigval2 = static_cast(cornerSize_ret); - Scintilla__Internal__FillStroke* sigval3 = new Scintilla::Internal::FillStroke(fillStroke); - - miqt_exec_callback_Scintilla__Internal__Surface_AlphaRectangle(this, handle__AlphaRectangle, sigval1, sigval2, sigval3); - - - } - - // cgo.Handle value for overwritten implementation - intptr_t handle__DrawRGBAImage = 0; - - // Subclass to allow providing a Go implementation - virtual void DrawRGBAImage(Scintilla::Internal::PRectangle rc, int width, int height, const unsigned char* pixelsImage) override { - if (handle__DrawRGBAImage == 0) { - return; // Pure virtual, there is no base we can call - } - - Scintilla__Internal__PRectangle* sigval1 = new Scintilla::Internal::PRectangle(rc); - int sigval2 = width; - int sigval3 = height; - const unsigned char* sigval4 = (const unsigned char*) pixelsImage; - - miqt_exec_callback_Scintilla__Internal__Surface_DrawRGBAImage(this, handle__DrawRGBAImage, sigval1, sigval2, sigval3, sigval4); - - - } - - // cgo.Handle value for overwritten implementation - intptr_t handle__Ellipse = 0; - - // Subclass to allow providing a Go implementation - virtual void Ellipse(Scintilla::Internal::PRectangle rc, Scintilla::Internal::FillStroke fillStroke) override { - if (handle__Ellipse == 0) { - return; // Pure virtual, there is no base we can call - } - - Scintilla__Internal__PRectangle* sigval1 = new Scintilla::Internal::PRectangle(rc); - Scintilla__Internal__FillStroke* sigval2 = new Scintilla::Internal::FillStroke(fillStroke); - - miqt_exec_callback_Scintilla__Internal__Surface_Ellipse(this, handle__Ellipse, sigval1, sigval2); - - - } - - // cgo.Handle value for overwritten implementation - intptr_t handle__Stadium = 0; - - // Subclass to allow providing a Go implementation - virtual void Stadium(Scintilla::Internal::PRectangle rc, Scintilla::Internal::FillStroke fillStroke, Scintilla::Internal::Surface::Ends ends) override { - if (handle__Stadium == 0) { - return; // Pure virtual, there is no base we can call - } - - Scintilla__Internal__PRectangle* sigval1 = new Scintilla::Internal::PRectangle(rc); - Scintilla__Internal__FillStroke* sigval2 = new Scintilla::Internal::FillStroke(fillStroke); - Scintilla::Internal::Surface::Ends ends_ret = ends; - int sigval3 = static_cast(ends_ret); - - miqt_exec_callback_Scintilla__Internal__Surface_Stadium(this, handle__Stadium, sigval1, sigval2, sigval3); - - - } - - // cgo.Handle value for overwritten implementation - intptr_t handle__Copy = 0; - - // Subclass to allow providing a Go implementation - virtual void Copy(Scintilla::Internal::PRectangle rc, Scintilla::Internal::Point from, Scintilla::Internal::Surface& surfaceSource) override { - if (handle__Copy == 0) { - return; // Pure virtual, there is no base we can call - } - - Scintilla__Internal__PRectangle* sigval1 = new Scintilla::Internal::PRectangle(rc); - Scintilla__Internal__Point* sigval2 = new Scintilla::Internal::Point(from); - Scintilla::Internal::Surface& surfaceSource_ret = surfaceSource; - // Cast returned reference into pointer - Scintilla__Internal__Surface* sigval3 = &surfaceSource_ret; - - miqt_exec_callback_Scintilla__Internal__Surface_Copy(this, handle__Copy, sigval1, sigval2, sigval3); - - - } - - // cgo.Handle value for overwritten implementation - intptr_t handle__Ascent = 0; - - // Subclass to allow providing a Go implementation - virtual Scintilla::Internal::XYPOSITION Ascent(const Scintilla::Internal::Font* font_) override { - if (handle__Ascent == 0) { - return 0; // Pure virtual, there is no base we can call - } - - Scintilla__Internal__Font* sigval1 = (Scintilla__Internal__Font*) font_; - - double callback_return_value = miqt_exec_callback_Scintilla__Internal__Surface_Ascent(this, handle__Ascent, sigval1); - - return static_cast(callback_return_value); - } - - // cgo.Handle value for overwritten implementation - intptr_t handle__Descent = 0; - - // Subclass to allow providing a Go implementation - virtual Scintilla::Internal::XYPOSITION Descent(const Scintilla::Internal::Font* font_) override { - if (handle__Descent == 0) { - return 0; // Pure virtual, there is no base we can call - } - - Scintilla__Internal__Font* sigval1 = (Scintilla__Internal__Font*) font_; - - double callback_return_value = miqt_exec_callback_Scintilla__Internal__Surface_Descent(this, handle__Descent, sigval1); - - return static_cast(callback_return_value); - } - - // cgo.Handle value for overwritten implementation - intptr_t handle__InternalLeading = 0; - - // Subclass to allow providing a Go implementation - virtual Scintilla::Internal::XYPOSITION InternalLeading(const Scintilla::Internal::Font* font_) override { - if (handle__InternalLeading == 0) { - return 0; // Pure virtual, there is no base we can call - } - - Scintilla__Internal__Font* sigval1 = (Scintilla__Internal__Font*) font_; - - double callback_return_value = miqt_exec_callback_Scintilla__Internal__Surface_InternalLeading(this, handle__InternalLeading, sigval1); - - return static_cast(callback_return_value); - } - - // cgo.Handle value for overwritten implementation - intptr_t handle__Height = 0; - - // Subclass to allow providing a Go implementation - virtual Scintilla::Internal::XYPOSITION Height(const Scintilla::Internal::Font* font_) override { - if (handle__Height == 0) { - return 0; // Pure virtual, there is no base we can call - } - - Scintilla__Internal__Font* sigval1 = (Scintilla__Internal__Font*) font_; - - double callback_return_value = miqt_exec_callback_Scintilla__Internal__Surface_Height(this, handle__Height, sigval1); - - return static_cast(callback_return_value); - } - - // cgo.Handle value for overwritten implementation - intptr_t handle__AverageCharWidth = 0; - - // Subclass to allow providing a Go implementation - virtual Scintilla::Internal::XYPOSITION AverageCharWidth(const Scintilla::Internal::Font* font_) override { - if (handle__AverageCharWidth == 0) { - return 0; // Pure virtual, there is no base we can call - } - - Scintilla__Internal__Font* sigval1 = (Scintilla__Internal__Font*) font_; - - double callback_return_value = miqt_exec_callback_Scintilla__Internal__Surface_AverageCharWidth(this, handle__AverageCharWidth, sigval1); - - return static_cast(callback_return_value); - } - - // cgo.Handle value for overwritten implementation - intptr_t handle__SetClip = 0; - - // Subclass to allow providing a Go implementation - virtual void SetClip(Scintilla::Internal::PRectangle rc) override { - if (handle__SetClip == 0) { - return; // Pure virtual, there is no base we can call - } - - Scintilla__Internal__PRectangle* sigval1 = new Scintilla::Internal::PRectangle(rc); - - miqt_exec_callback_Scintilla__Internal__Surface_SetClip(this, handle__SetClip, sigval1); - - - } - - // cgo.Handle value for overwritten implementation - intptr_t handle__PopClip = 0; - - // Subclass to allow providing a Go implementation - virtual void PopClip() override { - if (handle__PopClip == 0) { - return; // Pure virtual, there is no base we can call - } - - - miqt_exec_callback_Scintilla__Internal__Surface_PopClip(this, handle__PopClip); - - - } - - // cgo.Handle value for overwritten implementation - intptr_t handle__FlushCachedState = 0; - - // Subclass to allow providing a Go implementation - virtual void FlushCachedState() override { - if (handle__FlushCachedState == 0) { - return; // Pure virtual, there is no base we can call - } - - - miqt_exec_callback_Scintilla__Internal__Surface_FlushCachedState(this, handle__FlushCachedState); - - - } - - // cgo.Handle value for overwritten implementation - intptr_t handle__FlushDrawing = 0; - - // Subclass to allow providing a Go implementation - virtual void FlushDrawing() override { - if (handle__FlushDrawing == 0) { - return; // Pure virtual, there is no base we can call - } - - - miqt_exec_callback_Scintilla__Internal__Surface_FlushDrawing(this, handle__FlushDrawing); - - - } - -}; - -Scintilla__Internal__Surface* Scintilla__Internal__Surface_new() { - return new MiqtVirtualScintillaInternalSurface(); -} - void Scintilla__Internal__Surface_Init(Scintilla__Internal__Surface* self, void* wid) { self->Init(wid); } @@ -1470,326 +868,6 @@ void Scintilla__Internal__Surface_FlushDrawing(Scintilla__Internal__Surface* sel self->FlushDrawing(); } -bool Scintilla__Internal__Surface_override_virtual_Init(void* self, intptr_t slot) { - MiqtVirtualScintillaInternalSurface* self_cast = dynamic_cast( (Scintilla__Internal__Surface*)(self) ); - if (self_cast == nullptr) { - return false; - } - - self_cast->handle__Init = slot; - return true; -} - -bool Scintilla__Internal__Surface_override_virtual_Init2(void* self, intptr_t slot) { - MiqtVirtualScintillaInternalSurface* self_cast = dynamic_cast( (Scintilla__Internal__Surface*)(self) ); - if (self_cast == nullptr) { - return false; - } - - self_cast->handle__Init2 = slot; - return true; -} - -bool Scintilla__Internal__Surface_override_virtual_SetMode(void* self, intptr_t slot) { - MiqtVirtualScintillaInternalSurface* self_cast = dynamic_cast( (Scintilla__Internal__Surface*)(self) ); - if (self_cast == nullptr) { - return false; - } - - self_cast->handle__SetMode = slot; - return true; -} - -bool Scintilla__Internal__Surface_override_virtual_Release(void* self, intptr_t slot) { - MiqtVirtualScintillaInternalSurface* self_cast = dynamic_cast( (Scintilla__Internal__Surface*)(self) ); - if (self_cast == nullptr) { - return false; - } - - self_cast->handle__Release = slot; - return true; -} - -bool Scintilla__Internal__Surface_override_virtual_SupportsFeature(void* self, intptr_t slot) { - MiqtVirtualScintillaInternalSurface* self_cast = dynamic_cast( (Scintilla__Internal__Surface*)(self) ); - if (self_cast == nullptr) { - return false; - } - - self_cast->handle__SupportsFeature = slot; - return true; -} - -bool Scintilla__Internal__Surface_override_virtual_Initialised(void* self, intptr_t slot) { - MiqtVirtualScintillaInternalSurface* self_cast = dynamic_cast( (Scintilla__Internal__Surface*)(self) ); - if (self_cast == nullptr) { - return false; - } - - self_cast->handle__Initialised = slot; - return true; -} - -bool Scintilla__Internal__Surface_override_virtual_LogPixelsY(void* self, intptr_t slot) { - MiqtVirtualScintillaInternalSurface* self_cast = dynamic_cast( (Scintilla__Internal__Surface*)(self) ); - if (self_cast == nullptr) { - return false; - } - - self_cast->handle__LogPixelsY = slot; - return true; -} - -bool Scintilla__Internal__Surface_override_virtual_PixelDivisions(void* self, intptr_t slot) { - MiqtVirtualScintillaInternalSurface* self_cast = dynamic_cast( (Scintilla__Internal__Surface*)(self) ); - if (self_cast == nullptr) { - return false; - } - - self_cast->handle__PixelDivisions = slot; - return true; -} - -bool Scintilla__Internal__Surface_override_virtual_DeviceHeightFont(void* self, intptr_t slot) { - MiqtVirtualScintillaInternalSurface* self_cast = dynamic_cast( (Scintilla__Internal__Surface*)(self) ); - if (self_cast == nullptr) { - return false; - } - - self_cast->handle__DeviceHeightFont = slot; - return true; -} - -bool Scintilla__Internal__Surface_override_virtual_LineDraw(void* self, intptr_t slot) { - MiqtVirtualScintillaInternalSurface* self_cast = dynamic_cast( (Scintilla__Internal__Surface*)(self) ); - if (self_cast == nullptr) { - return false; - } - - self_cast->handle__LineDraw = slot; - return true; -} - -bool Scintilla__Internal__Surface_override_virtual_PolyLine(void* self, intptr_t slot) { - MiqtVirtualScintillaInternalSurface* self_cast = dynamic_cast( (Scintilla__Internal__Surface*)(self) ); - if (self_cast == nullptr) { - return false; - } - - self_cast->handle__PolyLine = slot; - return true; -} - -bool Scintilla__Internal__Surface_override_virtual_Polygon(void* self, intptr_t slot) { - MiqtVirtualScintillaInternalSurface* self_cast = dynamic_cast( (Scintilla__Internal__Surface*)(self) ); - if (self_cast == nullptr) { - return false; - } - - self_cast->handle__Polygon = slot; - return true; -} - -bool Scintilla__Internal__Surface_override_virtual_RectangleDraw(void* self, intptr_t slot) { - MiqtVirtualScintillaInternalSurface* self_cast = dynamic_cast( (Scintilla__Internal__Surface*)(self) ); - if (self_cast == nullptr) { - return false; - } - - self_cast->handle__RectangleDraw = slot; - return true; -} - -bool Scintilla__Internal__Surface_override_virtual_RectangleFrame(void* self, intptr_t slot) { - MiqtVirtualScintillaInternalSurface* self_cast = dynamic_cast( (Scintilla__Internal__Surface*)(self) ); - if (self_cast == nullptr) { - return false; - } - - self_cast->handle__RectangleFrame = slot; - return true; -} - -bool Scintilla__Internal__Surface_override_virtual_FillRectangle(void* self, intptr_t slot) { - MiqtVirtualScintillaInternalSurface* self_cast = dynamic_cast( (Scintilla__Internal__Surface*)(self) ); - if (self_cast == nullptr) { - return false; - } - - self_cast->handle__FillRectangle = slot; - return true; -} - -bool Scintilla__Internal__Surface_override_virtual_FillRectangleAligned(void* self, intptr_t slot) { - MiqtVirtualScintillaInternalSurface* self_cast = dynamic_cast( (Scintilla__Internal__Surface*)(self) ); - if (self_cast == nullptr) { - return false; - } - - self_cast->handle__FillRectangleAligned = slot; - return true; -} - -bool Scintilla__Internal__Surface_override_virtual_FillRectangle2(void* self, intptr_t slot) { - MiqtVirtualScintillaInternalSurface* self_cast = dynamic_cast( (Scintilla__Internal__Surface*)(self) ); - if (self_cast == nullptr) { - return false; - } - - self_cast->handle__FillRectangle2 = slot; - return true; -} - -bool Scintilla__Internal__Surface_override_virtual_RoundedRectangle(void* self, intptr_t slot) { - MiqtVirtualScintillaInternalSurface* self_cast = dynamic_cast( (Scintilla__Internal__Surface*)(self) ); - if (self_cast == nullptr) { - return false; - } - - self_cast->handle__RoundedRectangle = slot; - return true; -} - -bool Scintilla__Internal__Surface_override_virtual_AlphaRectangle(void* self, intptr_t slot) { - MiqtVirtualScintillaInternalSurface* self_cast = dynamic_cast( (Scintilla__Internal__Surface*)(self) ); - if (self_cast == nullptr) { - return false; - } - - self_cast->handle__AlphaRectangle = slot; - return true; -} - -bool Scintilla__Internal__Surface_override_virtual_DrawRGBAImage(void* self, intptr_t slot) { - MiqtVirtualScintillaInternalSurface* self_cast = dynamic_cast( (Scintilla__Internal__Surface*)(self) ); - if (self_cast == nullptr) { - return false; - } - - self_cast->handle__DrawRGBAImage = slot; - return true; -} - -bool Scintilla__Internal__Surface_override_virtual_Ellipse(void* self, intptr_t slot) { - MiqtVirtualScintillaInternalSurface* self_cast = dynamic_cast( (Scintilla__Internal__Surface*)(self) ); - if (self_cast == nullptr) { - return false; - } - - self_cast->handle__Ellipse = slot; - return true; -} - -bool Scintilla__Internal__Surface_override_virtual_Stadium(void* self, intptr_t slot) { - MiqtVirtualScintillaInternalSurface* self_cast = dynamic_cast( (Scintilla__Internal__Surface*)(self) ); - if (self_cast == nullptr) { - return false; - } - - self_cast->handle__Stadium = slot; - return true; -} - -bool Scintilla__Internal__Surface_override_virtual_Copy(void* self, intptr_t slot) { - MiqtVirtualScintillaInternalSurface* self_cast = dynamic_cast( (Scintilla__Internal__Surface*)(self) ); - if (self_cast == nullptr) { - return false; - } - - self_cast->handle__Copy = slot; - return true; -} - -bool Scintilla__Internal__Surface_override_virtual_Ascent(void* self, intptr_t slot) { - MiqtVirtualScintillaInternalSurface* self_cast = dynamic_cast( (Scintilla__Internal__Surface*)(self) ); - if (self_cast == nullptr) { - return false; - } - - self_cast->handle__Ascent = slot; - return true; -} - -bool Scintilla__Internal__Surface_override_virtual_Descent(void* self, intptr_t slot) { - MiqtVirtualScintillaInternalSurface* self_cast = dynamic_cast( (Scintilla__Internal__Surface*)(self) ); - if (self_cast == nullptr) { - return false; - } - - self_cast->handle__Descent = slot; - return true; -} - -bool Scintilla__Internal__Surface_override_virtual_InternalLeading(void* self, intptr_t slot) { - MiqtVirtualScintillaInternalSurface* self_cast = dynamic_cast( (Scintilla__Internal__Surface*)(self) ); - if (self_cast == nullptr) { - return false; - } - - self_cast->handle__InternalLeading = slot; - return true; -} - -bool Scintilla__Internal__Surface_override_virtual_Height(void* self, intptr_t slot) { - MiqtVirtualScintillaInternalSurface* self_cast = dynamic_cast( (Scintilla__Internal__Surface*)(self) ); - if (self_cast == nullptr) { - return false; - } - - self_cast->handle__Height = slot; - return true; -} - -bool Scintilla__Internal__Surface_override_virtual_AverageCharWidth(void* self, intptr_t slot) { - MiqtVirtualScintillaInternalSurface* self_cast = dynamic_cast( (Scintilla__Internal__Surface*)(self) ); - if (self_cast == nullptr) { - return false; - } - - self_cast->handle__AverageCharWidth = slot; - return true; -} - -bool Scintilla__Internal__Surface_override_virtual_SetClip(void* self, intptr_t slot) { - MiqtVirtualScintillaInternalSurface* self_cast = dynamic_cast( (Scintilla__Internal__Surface*)(self) ); - if (self_cast == nullptr) { - return false; - } - - self_cast->handle__SetClip = slot; - return true; -} - -bool Scintilla__Internal__Surface_override_virtual_PopClip(void* self, intptr_t slot) { - MiqtVirtualScintillaInternalSurface* self_cast = dynamic_cast( (Scintilla__Internal__Surface*)(self) ); - if (self_cast == nullptr) { - return false; - } - - self_cast->handle__PopClip = slot; - return true; -} - -bool Scintilla__Internal__Surface_override_virtual_FlushCachedState(void* self, intptr_t slot) { - MiqtVirtualScintillaInternalSurface* self_cast = dynamic_cast( (Scintilla__Internal__Surface*)(self) ); - if (self_cast == nullptr) { - return false; - } - - self_cast->handle__FlushCachedState = slot; - return true; -} - -bool Scintilla__Internal__Surface_override_virtual_FlushDrawing(void* self, intptr_t slot) { - MiqtVirtualScintillaInternalSurface* self_cast = dynamic_cast( (Scintilla__Internal__Surface*)(self) ); - if (self_cast == nullptr) { - return false; - } - - self_cast->handle__FlushDrawing = slot; - return true; -} - void Scintilla__Internal__Surface_delete(Scintilla__Internal__Surface* self) { delete self; } @@ -1883,331 +961,6 @@ void Scintilla__Internal__ListOptions_delete(Scintilla__Internal__ListOptions* s delete self; } -class MiqtVirtualScintillaInternalListBox final : public Scintilla::Internal::ListBox { -public: - - MiqtVirtualScintillaInternalListBox(): Scintilla::Internal::ListBox() {}; - - virtual ~MiqtVirtualScintillaInternalListBox() override = default; - - // cgo.Handle value for overwritten implementation - intptr_t handle__SetFont = 0; - - // Subclass to allow providing a Go implementation - virtual void SetFont(const Scintilla::Internal::Font* font) override { - if (handle__SetFont == 0) { - return; // Pure virtual, there is no base we can call - } - - Scintilla__Internal__Font* sigval1 = (Scintilla__Internal__Font*) font; - - miqt_exec_callback_Scintilla__Internal__ListBox_SetFont(this, handle__SetFont, sigval1); - - - } - - // cgo.Handle value for overwritten implementation - intptr_t handle__Create = 0; - - // Subclass to allow providing a Go implementation - virtual void Create(Scintilla::Internal::Window& parent, int ctrlID, Scintilla::Internal::Point location, int lineHeight_, bool unicodeMode_, Scintilla::Technology technology_) override { - if (handle__Create == 0) { - return; // Pure virtual, there is no base we can call - } - - Scintilla::Internal::Window& parent_ret = parent; - // Cast returned reference into pointer - Scintilla__Internal__Window* sigval1 = &parent_ret; - int sigval2 = ctrlID; - Scintilla__Internal__Point* sigval3 = new Scintilla::Internal::Point(location); - int sigval4 = lineHeight_; - bool sigval5 = unicodeMode_; - Scintilla::Technology technology__ret = technology_; - int sigval6 = static_cast(technology__ret); - - miqt_exec_callback_Scintilla__Internal__ListBox_Create(this, handle__Create, sigval1, sigval2, sigval3, sigval4, sigval5, sigval6); - - - } - - // cgo.Handle value for overwritten implementation - intptr_t handle__SetAverageCharWidth = 0; - - // Subclass to allow providing a Go implementation - virtual void SetAverageCharWidth(int width) override { - if (handle__SetAverageCharWidth == 0) { - return; // Pure virtual, there is no base we can call - } - - int sigval1 = width; - - miqt_exec_callback_Scintilla__Internal__ListBox_SetAverageCharWidth(this, handle__SetAverageCharWidth, sigval1); - - - } - - // cgo.Handle value for overwritten implementation - intptr_t handle__SetVisibleRows = 0; - - // Subclass to allow providing a Go implementation - virtual void SetVisibleRows(int rows) override { - if (handle__SetVisibleRows == 0) { - return; // Pure virtual, there is no base we can call - } - - int sigval1 = rows; - - miqt_exec_callback_Scintilla__Internal__ListBox_SetVisibleRows(this, handle__SetVisibleRows, sigval1); - - - } - - // cgo.Handle value for overwritten implementation - intptr_t handle__GetVisibleRows = 0; - - // Subclass to allow providing a Go implementation - virtual int GetVisibleRows() const override { - if (handle__GetVisibleRows == 0) { - return 0; // Pure virtual, there is no base we can call - } - - - int callback_return_value = miqt_exec_callback_Scintilla__Internal__ListBox_GetVisibleRows(this, handle__GetVisibleRows); - - return static_cast(callback_return_value); - } - - // cgo.Handle value for overwritten implementation - intptr_t handle__GetDesiredRect = 0; - - // Subclass to allow providing a Go implementation - virtual Scintilla::Internal::PRectangle GetDesiredRect() override { - if (handle__GetDesiredRect == 0) { - return Scintilla::Internal::PRectangle(); // Pure virtual, there is no base we can call - } - - - Scintilla__Internal__PRectangle* callback_return_value = miqt_exec_callback_Scintilla__Internal__ListBox_GetDesiredRect(this, handle__GetDesiredRect); - - return *callback_return_value; - } - - // cgo.Handle value for overwritten implementation - intptr_t handle__CaretFromEdge = 0; - - // Subclass to allow providing a Go implementation - virtual int CaretFromEdge() override { - if (handle__CaretFromEdge == 0) { - return 0; // Pure virtual, there is no base we can call - } - - - int callback_return_value = miqt_exec_callback_Scintilla__Internal__ListBox_CaretFromEdge(this, handle__CaretFromEdge); - - return static_cast(callback_return_value); - } - - // cgo.Handle value for overwritten implementation - intptr_t handle__Clear = 0; - - // Subclass to allow providing a Go implementation - virtual void Clear() override { - if (handle__Clear == 0) { - return; // Pure virtual, there is no base we can call - } - - - miqt_exec_callback_Scintilla__Internal__ListBox_Clear(this, handle__Clear); - - - } - - // cgo.Handle value for overwritten implementation - intptr_t handle__Append = 0; - - // Subclass to allow providing a Go implementation - virtual void Append(char* s, int type) override { - if (handle__Append == 0) { - return; // Pure virtual, there is no base we can call - } - - char* sigval1 = s; - int sigval2 = type; - - miqt_exec_callback_Scintilla__Internal__ListBox_Append(this, handle__Append, sigval1, sigval2); - - - } - - // cgo.Handle value for overwritten implementation - intptr_t handle__Length = 0; - - // Subclass to allow providing a Go implementation - virtual int Length() override { - if (handle__Length == 0) { - return 0; // Pure virtual, there is no base we can call - } - - - int callback_return_value = miqt_exec_callback_Scintilla__Internal__ListBox_Length(this, handle__Length); - - return static_cast(callback_return_value); - } - - // cgo.Handle value for overwritten implementation - intptr_t handle__Select = 0; - - // Subclass to allow providing a Go implementation - virtual void Select(int n) override { - if (handle__Select == 0) { - return; // Pure virtual, there is no base we can call - } - - int sigval1 = n; - - miqt_exec_callback_Scintilla__Internal__ListBox_Select(this, handle__Select, sigval1); - - - } - - // cgo.Handle value for overwritten implementation - intptr_t handle__GetSelection = 0; - - // Subclass to allow providing a Go implementation - virtual int GetSelection() override { - if (handle__GetSelection == 0) { - return 0; // Pure virtual, there is no base we can call - } - - - int callback_return_value = miqt_exec_callback_Scintilla__Internal__ListBox_GetSelection(this, handle__GetSelection); - - return static_cast(callback_return_value); - } - - // cgo.Handle value for overwritten implementation - intptr_t handle__Find = 0; - - // Subclass to allow providing a Go implementation - virtual int Find(const char* prefix) override { - if (handle__Find == 0) { - return 0; // Pure virtual, there is no base we can call - } - - const char* sigval1 = (const char*) prefix; - - int callback_return_value = miqt_exec_callback_Scintilla__Internal__ListBox_Find(this, handle__Find, sigval1); - - return static_cast(callback_return_value); - } - - // cgo.Handle value for overwritten implementation - intptr_t handle__RegisterImage = 0; - - // Subclass to allow providing a Go implementation - virtual void RegisterImage(int type, const char* xpm_data) override { - if (handle__RegisterImage == 0) { - return; // Pure virtual, there is no base we can call - } - - int sigval1 = type; - const char* sigval2 = (const char*) xpm_data; - - miqt_exec_callback_Scintilla__Internal__ListBox_RegisterImage(this, handle__RegisterImage, sigval1, sigval2); - - - } - - // cgo.Handle value for overwritten implementation - intptr_t handle__RegisterRGBAImage = 0; - - // Subclass to allow providing a Go implementation - virtual void RegisterRGBAImage(int type, int width, int height, const unsigned char* pixelsImage) override { - if (handle__RegisterRGBAImage == 0) { - return; // Pure virtual, there is no base we can call - } - - int sigval1 = type; - int sigval2 = width; - int sigval3 = height; - const unsigned char* sigval4 = (const unsigned char*) pixelsImage; - - miqt_exec_callback_Scintilla__Internal__ListBox_RegisterRGBAImage(this, handle__RegisterRGBAImage, sigval1, sigval2, sigval3, sigval4); - - - } - - // cgo.Handle value for overwritten implementation - intptr_t handle__ClearRegisteredImages = 0; - - // Subclass to allow providing a Go implementation - virtual void ClearRegisteredImages() override { - if (handle__ClearRegisteredImages == 0) { - return; // Pure virtual, there is no base we can call - } - - - miqt_exec_callback_Scintilla__Internal__ListBox_ClearRegisteredImages(this, handle__ClearRegisteredImages); - - - } - - // cgo.Handle value for overwritten implementation - intptr_t handle__SetDelegate = 0; - - // Subclass to allow providing a Go implementation - virtual void SetDelegate(Scintilla::Internal::IListBoxDelegate* lbDelegate) override { - if (handle__SetDelegate == 0) { - return; // Pure virtual, there is no base we can call - } - - Scintilla__Internal__IListBoxDelegate* sigval1 = lbDelegate; - - miqt_exec_callback_Scintilla__Internal__ListBox_SetDelegate(this, handle__SetDelegate, sigval1); - - - } - - // cgo.Handle value for overwritten implementation - intptr_t handle__SetList = 0; - - // Subclass to allow providing a Go implementation - virtual void SetList(const char* list, char separator, char typesep) override { - if (handle__SetList == 0) { - return; // Pure virtual, there is no base we can call - } - - const char* sigval1 = (const char*) list; - char sigval2 = separator; - char sigval3 = typesep; - - miqt_exec_callback_Scintilla__Internal__ListBox_SetList(this, handle__SetList, sigval1, sigval2, sigval3); - - - } - - // cgo.Handle value for overwritten implementation - intptr_t handle__SetOptions = 0; - - // Subclass to allow providing a Go implementation - virtual void SetOptions(Scintilla::Internal::ListOptions options_) override { - if (handle__SetOptions == 0) { - return; // Pure virtual, there is no base we can call - } - - Scintilla__Internal__ListOptions* sigval1 = new Scintilla::Internal::ListOptions(options_); - - miqt_exec_callback_Scintilla__Internal__ListBox_SetOptions(this, handle__SetOptions, sigval1); - - - } - -}; - -Scintilla__Internal__ListBox* Scintilla__Internal__ListBox_new() { - return new MiqtVirtualScintillaInternalListBox(); -} - void Scintilla__Internal__ListBox_virtbase(Scintilla__Internal__ListBox* src, Scintilla::Internal::Window** outptr_Scintilla__Internal__Window) { *outptr_Scintilla__Internal__Window = static_cast(src); } @@ -2288,196 +1041,6 @@ void Scintilla__Internal__ListBox_SetOptions(Scintilla__Internal__ListBox* self, self->SetOptions(*options_); } -bool Scintilla__Internal__ListBox_override_virtual_SetFont(void* self, intptr_t slot) { - MiqtVirtualScintillaInternalListBox* self_cast = dynamic_cast( (Scintilla__Internal__ListBox*)(self) ); - if (self_cast == nullptr) { - return false; - } - - self_cast->handle__SetFont = slot; - return true; -} - -bool Scintilla__Internal__ListBox_override_virtual_Create(void* self, intptr_t slot) { - MiqtVirtualScintillaInternalListBox* self_cast = dynamic_cast( (Scintilla__Internal__ListBox*)(self) ); - if (self_cast == nullptr) { - return false; - } - - self_cast->handle__Create = slot; - return true; -} - -bool Scintilla__Internal__ListBox_override_virtual_SetAverageCharWidth(void* self, intptr_t slot) { - MiqtVirtualScintillaInternalListBox* self_cast = dynamic_cast( (Scintilla__Internal__ListBox*)(self) ); - if (self_cast == nullptr) { - return false; - } - - self_cast->handle__SetAverageCharWidth = slot; - return true; -} - -bool Scintilla__Internal__ListBox_override_virtual_SetVisibleRows(void* self, intptr_t slot) { - MiqtVirtualScintillaInternalListBox* self_cast = dynamic_cast( (Scintilla__Internal__ListBox*)(self) ); - if (self_cast == nullptr) { - return false; - } - - self_cast->handle__SetVisibleRows = slot; - return true; -} - -bool Scintilla__Internal__ListBox_override_virtual_GetVisibleRows(void* self, intptr_t slot) { - MiqtVirtualScintillaInternalListBox* self_cast = dynamic_cast( (Scintilla__Internal__ListBox*)(self) ); - if (self_cast == nullptr) { - return false; - } - - self_cast->handle__GetVisibleRows = slot; - return true; -} - -bool Scintilla__Internal__ListBox_override_virtual_GetDesiredRect(void* self, intptr_t slot) { - MiqtVirtualScintillaInternalListBox* self_cast = dynamic_cast( (Scintilla__Internal__ListBox*)(self) ); - if (self_cast == nullptr) { - return false; - } - - self_cast->handle__GetDesiredRect = slot; - return true; -} - -bool Scintilla__Internal__ListBox_override_virtual_CaretFromEdge(void* self, intptr_t slot) { - MiqtVirtualScintillaInternalListBox* self_cast = dynamic_cast( (Scintilla__Internal__ListBox*)(self) ); - if (self_cast == nullptr) { - return false; - } - - self_cast->handle__CaretFromEdge = slot; - return true; -} - -bool Scintilla__Internal__ListBox_override_virtual_Clear(void* self, intptr_t slot) { - MiqtVirtualScintillaInternalListBox* self_cast = dynamic_cast( (Scintilla__Internal__ListBox*)(self) ); - if (self_cast == nullptr) { - return false; - } - - self_cast->handle__Clear = slot; - return true; -} - -bool Scintilla__Internal__ListBox_override_virtual_Append(void* self, intptr_t slot) { - MiqtVirtualScintillaInternalListBox* self_cast = dynamic_cast( (Scintilla__Internal__ListBox*)(self) ); - if (self_cast == nullptr) { - return false; - } - - self_cast->handle__Append = slot; - return true; -} - -bool Scintilla__Internal__ListBox_override_virtual_Length(void* self, intptr_t slot) { - MiqtVirtualScintillaInternalListBox* self_cast = dynamic_cast( (Scintilla__Internal__ListBox*)(self) ); - if (self_cast == nullptr) { - return false; - } - - self_cast->handle__Length = slot; - return true; -} - -bool Scintilla__Internal__ListBox_override_virtual_Select(void* self, intptr_t slot) { - MiqtVirtualScintillaInternalListBox* self_cast = dynamic_cast( (Scintilla__Internal__ListBox*)(self) ); - if (self_cast == nullptr) { - return false; - } - - self_cast->handle__Select = slot; - return true; -} - -bool Scintilla__Internal__ListBox_override_virtual_GetSelection(void* self, intptr_t slot) { - MiqtVirtualScintillaInternalListBox* self_cast = dynamic_cast( (Scintilla__Internal__ListBox*)(self) ); - if (self_cast == nullptr) { - return false; - } - - self_cast->handle__GetSelection = slot; - return true; -} - -bool Scintilla__Internal__ListBox_override_virtual_Find(void* self, intptr_t slot) { - MiqtVirtualScintillaInternalListBox* self_cast = dynamic_cast( (Scintilla__Internal__ListBox*)(self) ); - if (self_cast == nullptr) { - return false; - } - - self_cast->handle__Find = slot; - return true; -} - -bool Scintilla__Internal__ListBox_override_virtual_RegisterImage(void* self, intptr_t slot) { - MiqtVirtualScintillaInternalListBox* self_cast = dynamic_cast( (Scintilla__Internal__ListBox*)(self) ); - if (self_cast == nullptr) { - return false; - } - - self_cast->handle__RegisterImage = slot; - return true; -} - -bool Scintilla__Internal__ListBox_override_virtual_RegisterRGBAImage(void* self, intptr_t slot) { - MiqtVirtualScintillaInternalListBox* self_cast = dynamic_cast( (Scintilla__Internal__ListBox*)(self) ); - if (self_cast == nullptr) { - return false; - } - - self_cast->handle__RegisterRGBAImage = slot; - return true; -} - -bool Scintilla__Internal__ListBox_override_virtual_ClearRegisteredImages(void* self, intptr_t slot) { - MiqtVirtualScintillaInternalListBox* self_cast = dynamic_cast( (Scintilla__Internal__ListBox*)(self) ); - if (self_cast == nullptr) { - return false; - } - - self_cast->handle__ClearRegisteredImages = slot; - return true; -} - -bool Scintilla__Internal__ListBox_override_virtual_SetDelegate(void* self, intptr_t slot) { - MiqtVirtualScintillaInternalListBox* self_cast = dynamic_cast( (Scintilla__Internal__ListBox*)(self) ); - if (self_cast == nullptr) { - return false; - } - - self_cast->handle__SetDelegate = slot; - return true; -} - -bool Scintilla__Internal__ListBox_override_virtual_SetList(void* self, intptr_t slot) { - MiqtVirtualScintillaInternalListBox* self_cast = dynamic_cast( (Scintilla__Internal__ListBox*)(self) ); - if (self_cast == nullptr) { - return false; - } - - self_cast->handle__SetList = slot; - return true; -} - -bool Scintilla__Internal__ListBox_override_virtual_SetOptions(void* self, intptr_t slot) { - MiqtVirtualScintillaInternalListBox* self_cast = dynamic_cast( (Scintilla__Internal__ListBox*)(self) ); - if (self_cast == nullptr) { - return false; - } - - self_cast->handle__SetOptions = slot; - return true; -} - void Scintilla__Internal__ListBox_delete(Scintilla__Internal__ListBox* self) { delete self; } diff --git a/qt-extras/scintillaedit/gen_ScintillaEdit.go b/qt-extras/scintillaedit/gen_ScintillaEdit.go index 4b492186..1444ebd4 100644 --- a/qt-extras/scintillaedit/gen_ScintillaEdit.go +++ b/qt-extras/scintillaedit/gen_ScintillaEdit.go @@ -3366,12 +3366,6 @@ func UnsafeNewScintilla__Internal__Surface(h unsafe.Pointer) *Scintilla__Interna return newScintilla__Internal__Surface((*C.Scintilla__Internal__Surface)(h)) } -// NewScintilla__Internal__Surface constructs a new Scintilla::Internal::Surface object. -func NewScintilla__Internal__Surface() *Scintilla__Internal__Surface { - - return newScintilla__Internal__Surface(C.Scintilla__Internal__Surface_new()) -} - func (this *Scintilla__Internal__Surface) Init(wid unsafe.Pointer) { C.Scintilla__Internal__Surface_Init(this.h, wid) } @@ -3499,745 +3493,6 @@ func (this *Scintilla__Internal__Surface) FlushCachedState() { func (this *Scintilla__Internal__Surface) FlushDrawing() { C.Scintilla__Internal__Surface_FlushDrawing(this.h) } -func (this *Scintilla__Internal__Surface) OnInit(slot func(wid unsafe.Pointer)) { - ok := C.Scintilla__Internal__Surface_override_virtual_Init(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) - if !ok { - panic("miqt: can only override virtual methods for directly constructed types") - } -} - -//export miqt_exec_callback_Scintilla__Internal__Surface_Init -func miqt_exec_callback_Scintilla__Internal__Surface_Init(self *C.Scintilla__Internal__Surface, cb C.intptr_t, wid unsafe.Pointer) { - gofunc, ok := cgo.Handle(cb).Value().(func(wid unsafe.Pointer)) - if !ok { - panic("miqt: callback of non-callback type (heap corruption?)") - } - - // Convert all CABI parameters to Go parameters - slotval1 := (unsafe.Pointer)(wid) - - gofunc(slotval1) - -} -func (this *Scintilla__Internal__Surface) OnInit2(slot func(sid unsafe.Pointer, wid unsafe.Pointer)) { - ok := C.Scintilla__Internal__Surface_override_virtual_Init2(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) - if !ok { - panic("miqt: can only override virtual methods for directly constructed types") - } -} - -//export miqt_exec_callback_Scintilla__Internal__Surface_Init2 -func miqt_exec_callback_Scintilla__Internal__Surface_Init2(self *C.Scintilla__Internal__Surface, cb C.intptr_t, sid unsafe.Pointer, wid unsafe.Pointer) { - gofunc, ok := cgo.Handle(cb).Value().(func(sid unsafe.Pointer, wid unsafe.Pointer)) - if !ok { - panic("miqt: callback of non-callback type (heap corruption?)") - } - - // Convert all CABI parameters to Go parameters - slotval1 := (unsafe.Pointer)(sid) - - slotval2 := (unsafe.Pointer)(wid) - - gofunc(slotval1, slotval2) - -} -func (this *Scintilla__Internal__Surface) OnSetMode(slot func(mode Scintilla__Internal__SurfaceMode)) { - ok := C.Scintilla__Internal__Surface_override_virtual_SetMode(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) - if !ok { - panic("miqt: can only override virtual methods for directly constructed types") - } -} - -//export miqt_exec_callback_Scintilla__Internal__Surface_SetMode -func miqt_exec_callback_Scintilla__Internal__Surface_SetMode(self *C.Scintilla__Internal__Surface, cb C.intptr_t, mode *C.Scintilla__Internal__SurfaceMode) { - gofunc, ok := cgo.Handle(cb).Value().(func(mode Scintilla__Internal__SurfaceMode)) - if !ok { - panic("miqt: callback of non-callback type (heap corruption?)") - } - - // Convert all CABI parameters to Go parameters - mode_goptr := newScintilla__Internal__SurfaceMode(mode) - mode_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer - slotval1 := *mode_goptr - - gofunc(slotval1) - -} -func (this *Scintilla__Internal__Surface) OnRelease(slot func()) { - ok := C.Scintilla__Internal__Surface_override_virtual_Release(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) - if !ok { - panic("miqt: can only override virtual methods for directly constructed types") - } -} - -//export miqt_exec_callback_Scintilla__Internal__Surface_Release -func miqt_exec_callback_Scintilla__Internal__Surface_Release(self *C.Scintilla__Internal__Surface, cb C.intptr_t) { - gofunc, ok := cgo.Handle(cb).Value().(func()) - if !ok { - panic("miqt: callback of non-callback type (heap corruption?)") - } - - gofunc() - -} -func (this *Scintilla__Internal__Surface) OnSupportsFeature(slot func(feature Scintilla__Supports) int) { - ok := C.Scintilla__Internal__Surface_override_virtual_SupportsFeature(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) - if !ok { - panic("miqt: can only override virtual methods for directly constructed types") - } -} - -//export miqt_exec_callback_Scintilla__Internal__Surface_SupportsFeature -func miqt_exec_callback_Scintilla__Internal__Surface_SupportsFeature(self *C.Scintilla__Internal__Surface, cb C.intptr_t, feature C.int) C.int { - gofunc, ok := cgo.Handle(cb).Value().(func(feature Scintilla__Supports) int) - if !ok { - panic("miqt: callback of non-callback type (heap corruption?)") - } - - // Convert all CABI parameters to Go parameters - slotval1 := (Scintilla__Supports)(feature) - - virtualReturn := gofunc(slotval1) - - return (C.int)(virtualReturn) - -} -func (this *Scintilla__Internal__Surface) OnInitialised(slot func() bool) { - ok := C.Scintilla__Internal__Surface_override_virtual_Initialised(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) - if !ok { - panic("miqt: can only override virtual methods for directly constructed types") - } -} - -//export miqt_exec_callback_Scintilla__Internal__Surface_Initialised -func miqt_exec_callback_Scintilla__Internal__Surface_Initialised(self *C.Scintilla__Internal__Surface, cb C.intptr_t) C.bool { - gofunc, ok := cgo.Handle(cb).Value().(func() bool) - if !ok { - panic("miqt: callback of non-callback type (heap corruption?)") - } - - virtualReturn := gofunc() - - return (C.bool)(virtualReturn) - -} -func (this *Scintilla__Internal__Surface) OnLogPixelsY(slot func() int) { - ok := C.Scintilla__Internal__Surface_override_virtual_LogPixelsY(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) - if !ok { - panic("miqt: can only override virtual methods for directly constructed types") - } -} - -//export miqt_exec_callback_Scintilla__Internal__Surface_LogPixelsY -func miqt_exec_callback_Scintilla__Internal__Surface_LogPixelsY(self *C.Scintilla__Internal__Surface, cb C.intptr_t) C.int { - gofunc, ok := cgo.Handle(cb).Value().(func() int) - if !ok { - panic("miqt: callback of non-callback type (heap corruption?)") - } - - virtualReturn := gofunc() - - return (C.int)(virtualReturn) - -} -func (this *Scintilla__Internal__Surface) OnPixelDivisions(slot func() int) { - ok := C.Scintilla__Internal__Surface_override_virtual_PixelDivisions(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) - if !ok { - panic("miqt: can only override virtual methods for directly constructed types") - } -} - -//export miqt_exec_callback_Scintilla__Internal__Surface_PixelDivisions -func miqt_exec_callback_Scintilla__Internal__Surface_PixelDivisions(self *C.Scintilla__Internal__Surface, cb C.intptr_t) C.int { - gofunc, ok := cgo.Handle(cb).Value().(func() int) - if !ok { - panic("miqt: callback of non-callback type (heap corruption?)") - } - - virtualReturn := gofunc() - - return (C.int)(virtualReturn) - -} -func (this *Scintilla__Internal__Surface) OnDeviceHeightFont(slot func(points int) int) { - ok := C.Scintilla__Internal__Surface_override_virtual_DeviceHeightFont(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) - if !ok { - panic("miqt: can only override virtual methods for directly constructed types") - } -} - -//export miqt_exec_callback_Scintilla__Internal__Surface_DeviceHeightFont -func miqt_exec_callback_Scintilla__Internal__Surface_DeviceHeightFont(self *C.Scintilla__Internal__Surface, cb C.intptr_t, points C.int) C.int { - gofunc, ok := cgo.Handle(cb).Value().(func(points int) int) - if !ok { - panic("miqt: callback of non-callback type (heap corruption?)") - } - - // Convert all CABI parameters to Go parameters - slotval1 := (int)(points) - - virtualReturn := gofunc(slotval1) - - return (C.int)(virtualReturn) - -} -func (this *Scintilla__Internal__Surface) OnLineDraw(slot func(start Scintilla__Internal__Point, end Scintilla__Internal__Point, stroke Scintilla__Internal__Stroke)) { - ok := C.Scintilla__Internal__Surface_override_virtual_LineDraw(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) - if !ok { - panic("miqt: can only override virtual methods for directly constructed types") - } -} - -//export miqt_exec_callback_Scintilla__Internal__Surface_LineDraw -func miqt_exec_callback_Scintilla__Internal__Surface_LineDraw(self *C.Scintilla__Internal__Surface, cb C.intptr_t, start *C.Scintilla__Internal__Point, end *C.Scintilla__Internal__Point, stroke *C.Scintilla__Internal__Stroke) { - gofunc, ok := cgo.Handle(cb).Value().(func(start Scintilla__Internal__Point, end Scintilla__Internal__Point, stroke Scintilla__Internal__Stroke)) - if !ok { - panic("miqt: callback of non-callback type (heap corruption?)") - } - - // Convert all CABI parameters to Go parameters - start_goptr := newScintilla__Internal__Point(start) - start_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer - slotval1 := *start_goptr - - end_goptr := newScintilla__Internal__Point(end) - end_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer - slotval2 := *end_goptr - - stroke_goptr := newScintilla__Internal__Stroke(stroke) - stroke_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer - slotval3 := *stroke_goptr - - gofunc(slotval1, slotval2, slotval3) - -} -func (this *Scintilla__Internal__Surface) OnPolyLine(slot func(pts *Scintilla__Internal__Point, npts uint64, stroke Scintilla__Internal__Stroke)) { - ok := C.Scintilla__Internal__Surface_override_virtual_PolyLine(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) - if !ok { - panic("miqt: can only override virtual methods for directly constructed types") - } -} - -//export miqt_exec_callback_Scintilla__Internal__Surface_PolyLine -func miqt_exec_callback_Scintilla__Internal__Surface_PolyLine(self *C.Scintilla__Internal__Surface, cb C.intptr_t, pts *C.Scintilla__Internal__Point, npts C.size_t, stroke *C.Scintilla__Internal__Stroke) { - gofunc, ok := cgo.Handle(cb).Value().(func(pts *Scintilla__Internal__Point, npts uint64, stroke Scintilla__Internal__Stroke)) - if !ok { - panic("miqt: callback of non-callback type (heap corruption?)") - } - - // Convert all CABI parameters to Go parameters - slotval1 := newScintilla__Internal__Point(pts) - - slotval2 := (uint64)(npts) - - stroke_goptr := newScintilla__Internal__Stroke(stroke) - stroke_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer - slotval3 := *stroke_goptr - - gofunc(slotval1, slotval2, slotval3) - -} -func (this *Scintilla__Internal__Surface) OnPolygon(slot func(pts *Scintilla__Internal__Point, npts uint64, fillStroke Scintilla__Internal__FillStroke)) { - ok := C.Scintilla__Internal__Surface_override_virtual_Polygon(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) - if !ok { - panic("miqt: can only override virtual methods for directly constructed types") - } -} - -//export miqt_exec_callback_Scintilla__Internal__Surface_Polygon -func miqt_exec_callback_Scintilla__Internal__Surface_Polygon(self *C.Scintilla__Internal__Surface, cb C.intptr_t, pts *C.Scintilla__Internal__Point, npts C.size_t, fillStroke *C.Scintilla__Internal__FillStroke) { - gofunc, ok := cgo.Handle(cb).Value().(func(pts *Scintilla__Internal__Point, npts uint64, fillStroke Scintilla__Internal__FillStroke)) - if !ok { - panic("miqt: callback of non-callback type (heap corruption?)") - } - - // Convert all CABI parameters to Go parameters - slotval1 := newScintilla__Internal__Point(pts) - - slotval2 := (uint64)(npts) - - fillStroke_goptr := newScintilla__Internal__FillStroke(fillStroke) - fillStroke_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer - slotval3 := *fillStroke_goptr - - gofunc(slotval1, slotval2, slotval3) - -} -func (this *Scintilla__Internal__Surface) OnRectangleDraw(slot func(rc Scintilla__Internal__PRectangle, fillStroke Scintilla__Internal__FillStroke)) { - ok := C.Scintilla__Internal__Surface_override_virtual_RectangleDraw(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) - if !ok { - panic("miqt: can only override virtual methods for directly constructed types") - } -} - -//export miqt_exec_callback_Scintilla__Internal__Surface_RectangleDraw -func miqt_exec_callback_Scintilla__Internal__Surface_RectangleDraw(self *C.Scintilla__Internal__Surface, cb C.intptr_t, rc *C.Scintilla__Internal__PRectangle, fillStroke *C.Scintilla__Internal__FillStroke) { - gofunc, ok := cgo.Handle(cb).Value().(func(rc Scintilla__Internal__PRectangle, fillStroke Scintilla__Internal__FillStroke)) - if !ok { - panic("miqt: callback of non-callback type (heap corruption?)") - } - - // Convert all CABI parameters to Go parameters - rc_goptr := newScintilla__Internal__PRectangle(rc) - rc_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer - slotval1 := *rc_goptr - - fillStroke_goptr := newScintilla__Internal__FillStroke(fillStroke) - fillStroke_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer - slotval2 := *fillStroke_goptr - - gofunc(slotval1, slotval2) - -} -func (this *Scintilla__Internal__Surface) OnRectangleFrame(slot func(rc Scintilla__Internal__PRectangle, stroke Scintilla__Internal__Stroke)) { - ok := C.Scintilla__Internal__Surface_override_virtual_RectangleFrame(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) - if !ok { - panic("miqt: can only override virtual methods for directly constructed types") - } -} - -//export miqt_exec_callback_Scintilla__Internal__Surface_RectangleFrame -func miqt_exec_callback_Scintilla__Internal__Surface_RectangleFrame(self *C.Scintilla__Internal__Surface, cb C.intptr_t, rc *C.Scintilla__Internal__PRectangle, stroke *C.Scintilla__Internal__Stroke) { - gofunc, ok := cgo.Handle(cb).Value().(func(rc Scintilla__Internal__PRectangle, stroke Scintilla__Internal__Stroke)) - if !ok { - panic("miqt: callback of non-callback type (heap corruption?)") - } - - // Convert all CABI parameters to Go parameters - rc_goptr := newScintilla__Internal__PRectangle(rc) - rc_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer - slotval1 := *rc_goptr - - stroke_goptr := newScintilla__Internal__Stroke(stroke) - stroke_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer - slotval2 := *stroke_goptr - - gofunc(slotval1, slotval2) - -} -func (this *Scintilla__Internal__Surface) OnFillRectangle(slot func(rc Scintilla__Internal__PRectangle, fill Scintilla__Internal__Fill)) { - ok := C.Scintilla__Internal__Surface_override_virtual_FillRectangle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) - if !ok { - panic("miqt: can only override virtual methods for directly constructed types") - } -} - -//export miqt_exec_callback_Scintilla__Internal__Surface_FillRectangle -func miqt_exec_callback_Scintilla__Internal__Surface_FillRectangle(self *C.Scintilla__Internal__Surface, cb C.intptr_t, rc *C.Scintilla__Internal__PRectangle, fill *C.Scintilla__Internal__Fill) { - gofunc, ok := cgo.Handle(cb).Value().(func(rc Scintilla__Internal__PRectangle, fill Scintilla__Internal__Fill)) - if !ok { - panic("miqt: callback of non-callback type (heap corruption?)") - } - - // Convert all CABI parameters to Go parameters - rc_goptr := newScintilla__Internal__PRectangle(rc) - rc_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer - slotval1 := *rc_goptr - - fill_goptr := newScintilla__Internal__Fill(fill) - fill_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer - slotval2 := *fill_goptr - - gofunc(slotval1, slotval2) - -} -func (this *Scintilla__Internal__Surface) OnFillRectangleAligned(slot func(rc Scintilla__Internal__PRectangle, fill Scintilla__Internal__Fill)) { - ok := C.Scintilla__Internal__Surface_override_virtual_FillRectangleAligned(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) - if !ok { - panic("miqt: can only override virtual methods for directly constructed types") - } -} - -//export miqt_exec_callback_Scintilla__Internal__Surface_FillRectangleAligned -func miqt_exec_callback_Scintilla__Internal__Surface_FillRectangleAligned(self *C.Scintilla__Internal__Surface, cb C.intptr_t, rc *C.Scintilla__Internal__PRectangle, fill *C.Scintilla__Internal__Fill) { - gofunc, ok := cgo.Handle(cb).Value().(func(rc Scintilla__Internal__PRectangle, fill Scintilla__Internal__Fill)) - if !ok { - panic("miqt: callback of non-callback type (heap corruption?)") - } - - // Convert all CABI parameters to Go parameters - rc_goptr := newScintilla__Internal__PRectangle(rc) - rc_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer - slotval1 := *rc_goptr - - fill_goptr := newScintilla__Internal__Fill(fill) - fill_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer - slotval2 := *fill_goptr - - gofunc(slotval1, slotval2) - -} -func (this *Scintilla__Internal__Surface) OnFillRectangle2(slot func(rc Scintilla__Internal__PRectangle, surfacePattern *Scintilla__Internal__Surface)) { - ok := C.Scintilla__Internal__Surface_override_virtual_FillRectangle2(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) - if !ok { - panic("miqt: can only override virtual methods for directly constructed types") - } -} - -//export miqt_exec_callback_Scintilla__Internal__Surface_FillRectangle2 -func miqt_exec_callback_Scintilla__Internal__Surface_FillRectangle2(self *C.Scintilla__Internal__Surface, cb C.intptr_t, rc *C.Scintilla__Internal__PRectangle, surfacePattern *C.Scintilla__Internal__Surface) { - gofunc, ok := cgo.Handle(cb).Value().(func(rc Scintilla__Internal__PRectangle, surfacePattern *Scintilla__Internal__Surface)) - if !ok { - panic("miqt: callback of non-callback type (heap corruption?)") - } - - // Convert all CABI parameters to Go parameters - rc_goptr := newScintilla__Internal__PRectangle(rc) - rc_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer - slotval1 := *rc_goptr - - slotval2 := newScintilla__Internal__Surface(surfacePattern) - - gofunc(slotval1, slotval2) - -} -func (this *Scintilla__Internal__Surface) OnRoundedRectangle(slot func(rc Scintilla__Internal__PRectangle, fillStroke Scintilla__Internal__FillStroke)) { - ok := C.Scintilla__Internal__Surface_override_virtual_RoundedRectangle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) - if !ok { - panic("miqt: can only override virtual methods for directly constructed types") - } -} - -//export miqt_exec_callback_Scintilla__Internal__Surface_RoundedRectangle -func miqt_exec_callback_Scintilla__Internal__Surface_RoundedRectangle(self *C.Scintilla__Internal__Surface, cb C.intptr_t, rc *C.Scintilla__Internal__PRectangle, fillStroke *C.Scintilla__Internal__FillStroke) { - gofunc, ok := cgo.Handle(cb).Value().(func(rc Scintilla__Internal__PRectangle, fillStroke Scintilla__Internal__FillStroke)) - if !ok { - panic("miqt: callback of non-callback type (heap corruption?)") - } - - // Convert all CABI parameters to Go parameters - rc_goptr := newScintilla__Internal__PRectangle(rc) - rc_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer - slotval1 := *rc_goptr - - fillStroke_goptr := newScintilla__Internal__FillStroke(fillStroke) - fillStroke_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer - slotval2 := *fillStroke_goptr - - gofunc(slotval1, slotval2) - -} -func (this *Scintilla__Internal__Surface) OnAlphaRectangle(slot func(rc Scintilla__Internal__PRectangle, cornerSize float64, fillStroke Scintilla__Internal__FillStroke)) { - ok := C.Scintilla__Internal__Surface_override_virtual_AlphaRectangle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) - if !ok { - panic("miqt: can only override virtual methods for directly constructed types") - } -} - -//export miqt_exec_callback_Scintilla__Internal__Surface_AlphaRectangle -func miqt_exec_callback_Scintilla__Internal__Surface_AlphaRectangle(self *C.Scintilla__Internal__Surface, cb C.intptr_t, rc *C.Scintilla__Internal__PRectangle, cornerSize C.double, fillStroke *C.Scintilla__Internal__FillStroke) { - gofunc, ok := cgo.Handle(cb).Value().(func(rc Scintilla__Internal__PRectangle, cornerSize float64, fillStroke Scintilla__Internal__FillStroke)) - if !ok { - panic("miqt: callback of non-callback type (heap corruption?)") - } - - // Convert all CABI parameters to Go parameters - rc_goptr := newScintilla__Internal__PRectangle(rc) - rc_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer - slotval1 := *rc_goptr - - slotval2 := (float64)(cornerSize) - - fillStroke_goptr := newScintilla__Internal__FillStroke(fillStroke) - fillStroke_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer - slotval3 := *fillStroke_goptr - - gofunc(slotval1, slotval2, slotval3) - -} -func (this *Scintilla__Internal__Surface) OnDrawRGBAImage(slot func(rc Scintilla__Internal__PRectangle, width int, height int, pixelsImage *byte)) { - ok := C.Scintilla__Internal__Surface_override_virtual_DrawRGBAImage(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) - if !ok { - panic("miqt: can only override virtual methods for directly constructed types") - } -} - -//export miqt_exec_callback_Scintilla__Internal__Surface_DrawRGBAImage -func miqt_exec_callback_Scintilla__Internal__Surface_DrawRGBAImage(self *C.Scintilla__Internal__Surface, cb C.intptr_t, rc *C.Scintilla__Internal__PRectangle, width C.int, height C.int, pixelsImage *C.uchar) { - gofunc, ok := cgo.Handle(cb).Value().(func(rc Scintilla__Internal__PRectangle, width int, height int, pixelsImage *byte)) - if !ok { - panic("miqt: callback of non-callback type (heap corruption?)") - } - - // Convert all CABI parameters to Go parameters - rc_goptr := newScintilla__Internal__PRectangle(rc) - rc_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer - slotval1 := *rc_goptr - - slotval2 := (int)(width) - - slotval3 := (int)(height) - - slotval4 := (*byte)(unsafe.Pointer(pixelsImage)) - - gofunc(slotval1, slotval2, slotval3, slotval4) - -} -func (this *Scintilla__Internal__Surface) OnEllipse(slot func(rc Scintilla__Internal__PRectangle, fillStroke Scintilla__Internal__FillStroke)) { - ok := C.Scintilla__Internal__Surface_override_virtual_Ellipse(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) - if !ok { - panic("miqt: can only override virtual methods for directly constructed types") - } -} - -//export miqt_exec_callback_Scintilla__Internal__Surface_Ellipse -func miqt_exec_callback_Scintilla__Internal__Surface_Ellipse(self *C.Scintilla__Internal__Surface, cb C.intptr_t, rc *C.Scintilla__Internal__PRectangle, fillStroke *C.Scintilla__Internal__FillStroke) { - gofunc, ok := cgo.Handle(cb).Value().(func(rc Scintilla__Internal__PRectangle, fillStroke Scintilla__Internal__FillStroke)) - if !ok { - panic("miqt: callback of non-callback type (heap corruption?)") - } - - // Convert all CABI parameters to Go parameters - rc_goptr := newScintilla__Internal__PRectangle(rc) - rc_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer - slotval1 := *rc_goptr - - fillStroke_goptr := newScintilla__Internal__FillStroke(fillStroke) - fillStroke_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer - slotval2 := *fillStroke_goptr - - gofunc(slotval1, slotval2) - -} -func (this *Scintilla__Internal__Surface) OnStadium(slot func(rc Scintilla__Internal__PRectangle, fillStroke Scintilla__Internal__FillStroke, ends Scintilla__Internal__Surface__Ends)) { - ok := C.Scintilla__Internal__Surface_override_virtual_Stadium(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) - if !ok { - panic("miqt: can only override virtual methods for directly constructed types") - } -} - -//export miqt_exec_callback_Scintilla__Internal__Surface_Stadium -func miqt_exec_callback_Scintilla__Internal__Surface_Stadium(self *C.Scintilla__Internal__Surface, cb C.intptr_t, rc *C.Scintilla__Internal__PRectangle, fillStroke *C.Scintilla__Internal__FillStroke, ends C.int) { - gofunc, ok := cgo.Handle(cb).Value().(func(rc Scintilla__Internal__PRectangle, fillStroke Scintilla__Internal__FillStroke, ends Scintilla__Internal__Surface__Ends)) - if !ok { - panic("miqt: callback of non-callback type (heap corruption?)") - } - - // Convert all CABI parameters to Go parameters - rc_goptr := newScintilla__Internal__PRectangle(rc) - rc_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer - slotval1 := *rc_goptr - - fillStroke_goptr := newScintilla__Internal__FillStroke(fillStroke) - fillStroke_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer - slotval2 := *fillStroke_goptr - - slotval3 := (Scintilla__Internal__Surface__Ends)(ends) - - gofunc(slotval1, slotval2, slotval3) - -} -func (this *Scintilla__Internal__Surface) OnCopy(slot func(rc Scintilla__Internal__PRectangle, from Scintilla__Internal__Point, surfaceSource *Scintilla__Internal__Surface)) { - ok := C.Scintilla__Internal__Surface_override_virtual_Copy(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) - if !ok { - panic("miqt: can only override virtual methods for directly constructed types") - } -} - -//export miqt_exec_callback_Scintilla__Internal__Surface_Copy -func miqt_exec_callback_Scintilla__Internal__Surface_Copy(self *C.Scintilla__Internal__Surface, cb C.intptr_t, rc *C.Scintilla__Internal__PRectangle, from *C.Scintilla__Internal__Point, surfaceSource *C.Scintilla__Internal__Surface) { - gofunc, ok := cgo.Handle(cb).Value().(func(rc Scintilla__Internal__PRectangle, from Scintilla__Internal__Point, surfaceSource *Scintilla__Internal__Surface)) - if !ok { - panic("miqt: callback of non-callback type (heap corruption?)") - } - - // Convert all CABI parameters to Go parameters - rc_goptr := newScintilla__Internal__PRectangle(rc) - rc_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer - slotval1 := *rc_goptr - - from_goptr := newScintilla__Internal__Point(from) - from_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer - slotval2 := *from_goptr - - slotval3 := newScintilla__Internal__Surface(surfaceSource) - - gofunc(slotval1, slotval2, slotval3) - -} -func (this *Scintilla__Internal__Surface) OnAscent(slot func(font_ *Scintilla__Internal__Font) float64) { - ok := C.Scintilla__Internal__Surface_override_virtual_Ascent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) - if !ok { - panic("miqt: can only override virtual methods for directly constructed types") - } -} - -//export miqt_exec_callback_Scintilla__Internal__Surface_Ascent -func miqt_exec_callback_Scintilla__Internal__Surface_Ascent(self *C.Scintilla__Internal__Surface, cb C.intptr_t, font_ *C.Scintilla__Internal__Font) C.double { - gofunc, ok := cgo.Handle(cb).Value().(func(font_ *Scintilla__Internal__Font) float64) - if !ok { - panic("miqt: callback of non-callback type (heap corruption?)") - } - - // Convert all CABI parameters to Go parameters - slotval1 := newScintilla__Internal__Font(font_) - - virtualReturn := gofunc(slotval1) - - return (C.double)(virtualReturn) - -} -func (this *Scintilla__Internal__Surface) OnDescent(slot func(font_ *Scintilla__Internal__Font) float64) { - ok := C.Scintilla__Internal__Surface_override_virtual_Descent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) - if !ok { - panic("miqt: can only override virtual methods for directly constructed types") - } -} - -//export miqt_exec_callback_Scintilla__Internal__Surface_Descent -func miqt_exec_callback_Scintilla__Internal__Surface_Descent(self *C.Scintilla__Internal__Surface, cb C.intptr_t, font_ *C.Scintilla__Internal__Font) C.double { - gofunc, ok := cgo.Handle(cb).Value().(func(font_ *Scintilla__Internal__Font) float64) - if !ok { - panic("miqt: callback of non-callback type (heap corruption?)") - } - - // Convert all CABI parameters to Go parameters - slotval1 := newScintilla__Internal__Font(font_) - - virtualReturn := gofunc(slotval1) - - return (C.double)(virtualReturn) - -} -func (this *Scintilla__Internal__Surface) OnInternalLeading(slot func(font_ *Scintilla__Internal__Font) float64) { - ok := C.Scintilla__Internal__Surface_override_virtual_InternalLeading(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) - if !ok { - panic("miqt: can only override virtual methods for directly constructed types") - } -} - -//export miqt_exec_callback_Scintilla__Internal__Surface_InternalLeading -func miqt_exec_callback_Scintilla__Internal__Surface_InternalLeading(self *C.Scintilla__Internal__Surface, cb C.intptr_t, font_ *C.Scintilla__Internal__Font) C.double { - gofunc, ok := cgo.Handle(cb).Value().(func(font_ *Scintilla__Internal__Font) float64) - if !ok { - panic("miqt: callback of non-callback type (heap corruption?)") - } - - // Convert all CABI parameters to Go parameters - slotval1 := newScintilla__Internal__Font(font_) - - virtualReturn := gofunc(slotval1) - - return (C.double)(virtualReturn) - -} -func (this *Scintilla__Internal__Surface) OnHeight(slot func(font_ *Scintilla__Internal__Font) float64) { - ok := C.Scintilla__Internal__Surface_override_virtual_Height(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) - if !ok { - panic("miqt: can only override virtual methods for directly constructed types") - } -} - -//export miqt_exec_callback_Scintilla__Internal__Surface_Height -func miqt_exec_callback_Scintilla__Internal__Surface_Height(self *C.Scintilla__Internal__Surface, cb C.intptr_t, font_ *C.Scintilla__Internal__Font) C.double { - gofunc, ok := cgo.Handle(cb).Value().(func(font_ *Scintilla__Internal__Font) float64) - if !ok { - panic("miqt: callback of non-callback type (heap corruption?)") - } - - // Convert all CABI parameters to Go parameters - slotval1 := newScintilla__Internal__Font(font_) - - virtualReturn := gofunc(slotval1) - - return (C.double)(virtualReturn) - -} -func (this *Scintilla__Internal__Surface) OnAverageCharWidth(slot func(font_ *Scintilla__Internal__Font) float64) { - ok := C.Scintilla__Internal__Surface_override_virtual_AverageCharWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) - if !ok { - panic("miqt: can only override virtual methods for directly constructed types") - } -} - -//export miqt_exec_callback_Scintilla__Internal__Surface_AverageCharWidth -func miqt_exec_callback_Scintilla__Internal__Surface_AverageCharWidth(self *C.Scintilla__Internal__Surface, cb C.intptr_t, font_ *C.Scintilla__Internal__Font) C.double { - gofunc, ok := cgo.Handle(cb).Value().(func(font_ *Scintilla__Internal__Font) float64) - if !ok { - panic("miqt: callback of non-callback type (heap corruption?)") - } - - // Convert all CABI parameters to Go parameters - slotval1 := newScintilla__Internal__Font(font_) - - virtualReturn := gofunc(slotval1) - - return (C.double)(virtualReturn) - -} -func (this *Scintilla__Internal__Surface) OnSetClip(slot func(rc Scintilla__Internal__PRectangle)) { - ok := C.Scintilla__Internal__Surface_override_virtual_SetClip(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) - if !ok { - panic("miqt: can only override virtual methods for directly constructed types") - } -} - -//export miqt_exec_callback_Scintilla__Internal__Surface_SetClip -func miqt_exec_callback_Scintilla__Internal__Surface_SetClip(self *C.Scintilla__Internal__Surface, cb C.intptr_t, rc *C.Scintilla__Internal__PRectangle) { - gofunc, ok := cgo.Handle(cb).Value().(func(rc Scintilla__Internal__PRectangle)) - if !ok { - panic("miqt: callback of non-callback type (heap corruption?)") - } - - // Convert all CABI parameters to Go parameters - rc_goptr := newScintilla__Internal__PRectangle(rc) - rc_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer - slotval1 := *rc_goptr - - gofunc(slotval1) - -} -func (this *Scintilla__Internal__Surface) OnPopClip(slot func()) { - ok := C.Scintilla__Internal__Surface_override_virtual_PopClip(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) - if !ok { - panic("miqt: can only override virtual methods for directly constructed types") - } -} - -//export miqt_exec_callback_Scintilla__Internal__Surface_PopClip -func miqt_exec_callback_Scintilla__Internal__Surface_PopClip(self *C.Scintilla__Internal__Surface, cb C.intptr_t) { - gofunc, ok := cgo.Handle(cb).Value().(func()) - if !ok { - panic("miqt: callback of non-callback type (heap corruption?)") - } - - gofunc() - -} -func (this *Scintilla__Internal__Surface) OnFlushCachedState(slot func()) { - ok := C.Scintilla__Internal__Surface_override_virtual_FlushCachedState(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) - if !ok { - panic("miqt: can only override virtual methods for directly constructed types") - } -} - -//export miqt_exec_callback_Scintilla__Internal__Surface_FlushCachedState -func miqt_exec_callback_Scintilla__Internal__Surface_FlushCachedState(self *C.Scintilla__Internal__Surface, cb C.intptr_t) { - gofunc, ok := cgo.Handle(cb).Value().(func()) - if !ok { - panic("miqt: callback of non-callback type (heap corruption?)") - } - - gofunc() - -} -func (this *Scintilla__Internal__Surface) OnFlushDrawing(slot func()) { - ok := C.Scintilla__Internal__Surface_override_virtual_FlushDrawing(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) - if !ok { - panic("miqt: can only override virtual methods for directly constructed types") - } -} - -//export miqt_exec_callback_Scintilla__Internal__Surface_FlushDrawing -func miqt_exec_callback_Scintilla__Internal__Surface_FlushDrawing(self *C.Scintilla__Internal__Surface, cb C.intptr_t) { - gofunc, ok := cgo.Handle(cb).Value().(func()) - if !ok { - panic("miqt: callback of non-callback type (heap corruption?)") - } - - gofunc() - -} // Delete this object from C++ memory. func (this *Scintilla__Internal__Surface) Delete() { @@ -4555,12 +3810,6 @@ func UnsafeNewScintilla__Internal__ListBox(h unsafe.Pointer) *Scintilla__Interna return newScintilla__Internal__ListBox((*C.Scintilla__Internal__ListBox)(h)) } -// NewScintilla__Internal__ListBox constructs a new Scintilla::Internal::ListBox object. -func NewScintilla__Internal__ListBox() *Scintilla__Internal__ListBox { - - return newScintilla__Internal__ListBox(C.Scintilla__Internal__ListBox_new()) -} - func (this *Scintilla__Internal__ListBox) SetFont(font *Scintilla__Internal__Font) { C.Scintilla__Internal__ListBox_SetFont(this.h, font.cPointer()) } @@ -4646,409 +3895,6 @@ func (this *Scintilla__Internal__ListBox) SetList(list string, separator int8, t func (this *Scintilla__Internal__ListBox) SetOptions(options_ Scintilla__Internal__ListOptions) { C.Scintilla__Internal__ListBox_SetOptions(this.h, options_.cPointer()) } -func (this *Scintilla__Internal__ListBox) OnSetFont(slot func(font *Scintilla__Internal__Font)) { - ok := C.Scintilla__Internal__ListBox_override_virtual_SetFont(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) - if !ok { - panic("miqt: can only override virtual methods for directly constructed types") - } -} - -//export miqt_exec_callback_Scintilla__Internal__ListBox_SetFont -func miqt_exec_callback_Scintilla__Internal__ListBox_SetFont(self *C.Scintilla__Internal__ListBox, cb C.intptr_t, font *C.Scintilla__Internal__Font) { - gofunc, ok := cgo.Handle(cb).Value().(func(font *Scintilla__Internal__Font)) - if !ok { - panic("miqt: callback of non-callback type (heap corruption?)") - } - - // Convert all CABI parameters to Go parameters - slotval1 := newScintilla__Internal__Font(font) - - gofunc(slotval1) - -} -func (this *Scintilla__Internal__ListBox) OnCreate(slot func(parent *Scintilla__Internal__Window, ctrlID int, location Scintilla__Internal__Point, lineHeight_ int, unicodeMode_ bool, technology_ Scintilla__Technology)) { - ok := C.Scintilla__Internal__ListBox_override_virtual_Create(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) - if !ok { - panic("miqt: can only override virtual methods for directly constructed types") - } -} - -//export miqt_exec_callback_Scintilla__Internal__ListBox_Create -func miqt_exec_callback_Scintilla__Internal__ListBox_Create(self *C.Scintilla__Internal__ListBox, cb C.intptr_t, parent *C.Scintilla__Internal__Window, ctrlID C.int, location *C.Scintilla__Internal__Point, lineHeight_ C.int, unicodeMode_ C.bool, technology_ C.int) { - gofunc, ok := cgo.Handle(cb).Value().(func(parent *Scintilla__Internal__Window, ctrlID int, location Scintilla__Internal__Point, lineHeight_ int, unicodeMode_ bool, technology_ Scintilla__Technology)) - if !ok { - panic("miqt: callback of non-callback type (heap corruption?)") - } - - // Convert all CABI parameters to Go parameters - slotval1 := newScintilla__Internal__Window(parent) - - slotval2 := (int)(ctrlID) - - location_goptr := newScintilla__Internal__Point(location) - location_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer - slotval3 := *location_goptr - - slotval4 := (int)(lineHeight_) - - slotval5 := (bool)(unicodeMode_) - - slotval6 := (Scintilla__Technology)(technology_) - - gofunc(slotval1, slotval2, slotval3, slotval4, slotval5, slotval6) - -} -func (this *Scintilla__Internal__ListBox) OnSetAverageCharWidth(slot func(width int)) { - ok := C.Scintilla__Internal__ListBox_override_virtual_SetAverageCharWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) - if !ok { - panic("miqt: can only override virtual methods for directly constructed types") - } -} - -//export miqt_exec_callback_Scintilla__Internal__ListBox_SetAverageCharWidth -func miqt_exec_callback_Scintilla__Internal__ListBox_SetAverageCharWidth(self *C.Scintilla__Internal__ListBox, cb C.intptr_t, width C.int) { - gofunc, ok := cgo.Handle(cb).Value().(func(width int)) - if !ok { - panic("miqt: callback of non-callback type (heap corruption?)") - } - - // Convert all CABI parameters to Go parameters - slotval1 := (int)(width) - - gofunc(slotval1) - -} -func (this *Scintilla__Internal__ListBox) OnSetVisibleRows(slot func(rows int)) { - ok := C.Scintilla__Internal__ListBox_override_virtual_SetVisibleRows(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) - if !ok { - panic("miqt: can only override virtual methods for directly constructed types") - } -} - -//export miqt_exec_callback_Scintilla__Internal__ListBox_SetVisibleRows -func miqt_exec_callback_Scintilla__Internal__ListBox_SetVisibleRows(self *C.Scintilla__Internal__ListBox, cb C.intptr_t, rows C.int) { - gofunc, ok := cgo.Handle(cb).Value().(func(rows int)) - if !ok { - panic("miqt: callback of non-callback type (heap corruption?)") - } - - // Convert all CABI parameters to Go parameters - slotval1 := (int)(rows) - - gofunc(slotval1) - -} -func (this *Scintilla__Internal__ListBox) OnGetVisibleRows(slot func() int) { - ok := C.Scintilla__Internal__ListBox_override_virtual_GetVisibleRows(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) - if !ok { - panic("miqt: can only override virtual methods for directly constructed types") - } -} - -//export miqt_exec_callback_Scintilla__Internal__ListBox_GetVisibleRows -func miqt_exec_callback_Scintilla__Internal__ListBox_GetVisibleRows(self *C.Scintilla__Internal__ListBox, cb C.intptr_t) C.int { - gofunc, ok := cgo.Handle(cb).Value().(func() int) - if !ok { - panic("miqt: callback of non-callback type (heap corruption?)") - } - - virtualReturn := gofunc() - - return (C.int)(virtualReturn) - -} -func (this *Scintilla__Internal__ListBox) OnGetDesiredRect(slot func() *Scintilla__Internal__PRectangle) { - ok := C.Scintilla__Internal__ListBox_override_virtual_GetDesiredRect(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) - if !ok { - panic("miqt: can only override virtual methods for directly constructed types") - } -} - -//export miqt_exec_callback_Scintilla__Internal__ListBox_GetDesiredRect -func miqt_exec_callback_Scintilla__Internal__ListBox_GetDesiredRect(self *C.Scintilla__Internal__ListBox, cb C.intptr_t) *C.Scintilla__Internal__PRectangle { - gofunc, ok := cgo.Handle(cb).Value().(func() *Scintilla__Internal__PRectangle) - if !ok { - panic("miqt: callback of non-callback type (heap corruption?)") - } - - virtualReturn := gofunc() - - return virtualReturn.cPointer() - -} -func (this *Scintilla__Internal__ListBox) OnCaretFromEdge(slot func() int) { - ok := C.Scintilla__Internal__ListBox_override_virtual_CaretFromEdge(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) - if !ok { - panic("miqt: can only override virtual methods for directly constructed types") - } -} - -//export miqt_exec_callback_Scintilla__Internal__ListBox_CaretFromEdge -func miqt_exec_callback_Scintilla__Internal__ListBox_CaretFromEdge(self *C.Scintilla__Internal__ListBox, cb C.intptr_t) C.int { - gofunc, ok := cgo.Handle(cb).Value().(func() int) - if !ok { - panic("miqt: callback of non-callback type (heap corruption?)") - } - - virtualReturn := gofunc() - - return (C.int)(virtualReturn) - -} -func (this *Scintilla__Internal__ListBox) OnClear(slot func()) { - ok := C.Scintilla__Internal__ListBox_override_virtual_Clear(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) - if !ok { - panic("miqt: can only override virtual methods for directly constructed types") - } -} - -//export miqt_exec_callback_Scintilla__Internal__ListBox_Clear -func miqt_exec_callback_Scintilla__Internal__ListBox_Clear(self *C.Scintilla__Internal__ListBox, cb C.intptr_t) { - gofunc, ok := cgo.Handle(cb).Value().(func()) - if !ok { - panic("miqt: callback of non-callback type (heap corruption?)") - } - - gofunc() - -} -func (this *Scintilla__Internal__ListBox) OnAppend(slot func(s string, typeVal int)) { - ok := C.Scintilla__Internal__ListBox_override_virtual_Append(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) - if !ok { - panic("miqt: can only override virtual methods for directly constructed types") - } -} - -//export miqt_exec_callback_Scintilla__Internal__ListBox_Append -func miqt_exec_callback_Scintilla__Internal__ListBox_Append(self *C.Scintilla__Internal__ListBox, cb C.intptr_t, s *C.char, typeVal C.int) { - gofunc, ok := cgo.Handle(cb).Value().(func(s string, typeVal int)) - if !ok { - panic("miqt: callback of non-callback type (heap corruption?)") - } - - // Convert all CABI parameters to Go parameters - s_ret := s - slotval1 := C.GoString(s_ret) - - slotval2 := (int)(typeVal) - - gofunc(slotval1, slotval2) - -} -func (this *Scintilla__Internal__ListBox) OnLength(slot func() int) { - ok := C.Scintilla__Internal__ListBox_override_virtual_Length(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) - if !ok { - panic("miqt: can only override virtual methods for directly constructed types") - } -} - -//export miqt_exec_callback_Scintilla__Internal__ListBox_Length -func miqt_exec_callback_Scintilla__Internal__ListBox_Length(self *C.Scintilla__Internal__ListBox, cb C.intptr_t) C.int { - gofunc, ok := cgo.Handle(cb).Value().(func() int) - if !ok { - panic("miqt: callback of non-callback type (heap corruption?)") - } - - virtualReturn := gofunc() - - return (C.int)(virtualReturn) - -} -func (this *Scintilla__Internal__ListBox) OnSelect(slot func(n int)) { - ok := C.Scintilla__Internal__ListBox_override_virtual_Select(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) - if !ok { - panic("miqt: can only override virtual methods for directly constructed types") - } -} - -//export miqt_exec_callback_Scintilla__Internal__ListBox_Select -func miqt_exec_callback_Scintilla__Internal__ListBox_Select(self *C.Scintilla__Internal__ListBox, cb C.intptr_t, n C.int) { - gofunc, ok := cgo.Handle(cb).Value().(func(n int)) - if !ok { - panic("miqt: callback of non-callback type (heap corruption?)") - } - - // Convert all CABI parameters to Go parameters - slotval1 := (int)(n) - - gofunc(slotval1) - -} -func (this *Scintilla__Internal__ListBox) OnGetSelection(slot func() int) { - ok := C.Scintilla__Internal__ListBox_override_virtual_GetSelection(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) - if !ok { - panic("miqt: can only override virtual methods for directly constructed types") - } -} - -//export miqt_exec_callback_Scintilla__Internal__ListBox_GetSelection -func miqt_exec_callback_Scintilla__Internal__ListBox_GetSelection(self *C.Scintilla__Internal__ListBox, cb C.intptr_t) C.int { - gofunc, ok := cgo.Handle(cb).Value().(func() int) - if !ok { - panic("miqt: callback of non-callback type (heap corruption?)") - } - - virtualReturn := gofunc() - - return (C.int)(virtualReturn) - -} -func (this *Scintilla__Internal__ListBox) OnFind(slot func(prefix string) int) { - ok := C.Scintilla__Internal__ListBox_override_virtual_Find(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) - if !ok { - panic("miqt: can only override virtual methods for directly constructed types") - } -} - -//export miqt_exec_callback_Scintilla__Internal__ListBox_Find -func miqt_exec_callback_Scintilla__Internal__ListBox_Find(self *C.Scintilla__Internal__ListBox, cb C.intptr_t, prefix *C.const_char) C.int { - gofunc, ok := cgo.Handle(cb).Value().(func(prefix string) int) - if !ok { - panic("miqt: callback of non-callback type (heap corruption?)") - } - - // Convert all CABI parameters to Go parameters - prefix_ret := prefix - slotval1 := C.GoString(prefix_ret) - - virtualReturn := gofunc(slotval1) - - return (C.int)(virtualReturn) - -} -func (this *Scintilla__Internal__ListBox) OnRegisterImage(slot func(typeVal int, xpm_data string)) { - ok := C.Scintilla__Internal__ListBox_override_virtual_RegisterImage(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) - if !ok { - panic("miqt: can only override virtual methods for directly constructed types") - } -} - -//export miqt_exec_callback_Scintilla__Internal__ListBox_RegisterImage -func miqt_exec_callback_Scintilla__Internal__ListBox_RegisterImage(self *C.Scintilla__Internal__ListBox, cb C.intptr_t, typeVal C.int, xpm_data *C.const_char) { - gofunc, ok := cgo.Handle(cb).Value().(func(typeVal int, xpm_data string)) - if !ok { - panic("miqt: callback of non-callback type (heap corruption?)") - } - - // Convert all CABI parameters to Go parameters - slotval1 := (int)(typeVal) - - xpm_data_ret := xpm_data - slotval2 := C.GoString(xpm_data_ret) - - gofunc(slotval1, slotval2) - -} -func (this *Scintilla__Internal__ListBox) OnRegisterRGBAImage(slot func(typeVal int, width int, height int, pixelsImage *byte)) { - ok := C.Scintilla__Internal__ListBox_override_virtual_RegisterRGBAImage(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) - if !ok { - panic("miqt: can only override virtual methods for directly constructed types") - } -} - -//export miqt_exec_callback_Scintilla__Internal__ListBox_RegisterRGBAImage -func miqt_exec_callback_Scintilla__Internal__ListBox_RegisterRGBAImage(self *C.Scintilla__Internal__ListBox, cb C.intptr_t, typeVal C.int, width C.int, height C.int, pixelsImage *C.uchar) { - gofunc, ok := cgo.Handle(cb).Value().(func(typeVal int, width int, height int, pixelsImage *byte)) - if !ok { - panic("miqt: callback of non-callback type (heap corruption?)") - } - - // Convert all CABI parameters to Go parameters - slotval1 := (int)(typeVal) - - slotval2 := (int)(width) - - slotval3 := (int)(height) - - slotval4 := (*byte)(unsafe.Pointer(pixelsImage)) - - gofunc(slotval1, slotval2, slotval3, slotval4) - -} -func (this *Scintilla__Internal__ListBox) OnClearRegisteredImages(slot func()) { - ok := C.Scintilla__Internal__ListBox_override_virtual_ClearRegisteredImages(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) - if !ok { - panic("miqt: can only override virtual methods for directly constructed types") - } -} - -//export miqt_exec_callback_Scintilla__Internal__ListBox_ClearRegisteredImages -func miqt_exec_callback_Scintilla__Internal__ListBox_ClearRegisteredImages(self *C.Scintilla__Internal__ListBox, cb C.intptr_t) { - gofunc, ok := cgo.Handle(cb).Value().(func()) - if !ok { - panic("miqt: callback of non-callback type (heap corruption?)") - } - - gofunc() - -} -func (this *Scintilla__Internal__ListBox) OnSetDelegate(slot func(lbDelegate *Scintilla__Internal__IListBoxDelegate)) { - ok := C.Scintilla__Internal__ListBox_override_virtual_SetDelegate(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) - if !ok { - panic("miqt: can only override virtual methods for directly constructed types") - } -} - -//export miqt_exec_callback_Scintilla__Internal__ListBox_SetDelegate -func miqt_exec_callback_Scintilla__Internal__ListBox_SetDelegate(self *C.Scintilla__Internal__ListBox, cb C.intptr_t, lbDelegate *C.Scintilla__Internal__IListBoxDelegate) { - gofunc, ok := cgo.Handle(cb).Value().(func(lbDelegate *Scintilla__Internal__IListBoxDelegate)) - if !ok { - panic("miqt: callback of non-callback type (heap corruption?)") - } - - // Convert all CABI parameters to Go parameters - slotval1 := newScintilla__Internal__IListBoxDelegate(lbDelegate) - - gofunc(slotval1) - -} -func (this *Scintilla__Internal__ListBox) OnSetList(slot func(list string, separator int8, typesep int8)) { - ok := C.Scintilla__Internal__ListBox_override_virtual_SetList(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) - if !ok { - panic("miqt: can only override virtual methods for directly constructed types") - } -} - -//export miqt_exec_callback_Scintilla__Internal__ListBox_SetList -func miqt_exec_callback_Scintilla__Internal__ListBox_SetList(self *C.Scintilla__Internal__ListBox, cb C.intptr_t, list *C.const_char, separator C.char, typesep C.char) { - gofunc, ok := cgo.Handle(cb).Value().(func(list string, separator int8, typesep int8)) - if !ok { - panic("miqt: callback of non-callback type (heap corruption?)") - } - - // Convert all CABI parameters to Go parameters - list_ret := list - slotval1 := C.GoString(list_ret) - - slotval2 := (int8)(separator) - - slotval3 := (int8)(typesep) - - gofunc(slotval1, slotval2, slotval3) - -} -func (this *Scintilla__Internal__ListBox) OnSetOptions(slot func(options_ Scintilla__Internal__ListOptions)) { - ok := C.Scintilla__Internal__ListBox_override_virtual_SetOptions(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) - if !ok { - panic("miqt: can only override virtual methods for directly constructed types") - } -} - -//export miqt_exec_callback_Scintilla__Internal__ListBox_SetOptions -func miqt_exec_callback_Scintilla__Internal__ListBox_SetOptions(self *C.Scintilla__Internal__ListBox, cb C.intptr_t, options_ *C.Scintilla__Internal__ListOptions) { - gofunc, ok := cgo.Handle(cb).Value().(func(options_ Scintilla__Internal__ListOptions)) - if !ok { - panic("miqt: callback of non-callback type (heap corruption?)") - } - - // Convert all CABI parameters to Go parameters - options__goptr := newScintilla__Internal__ListOptions(options_) - options__goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer - slotval1 := *options__goptr - - gofunc(slotval1) - -} // Delete this object from C++ memory. func (this *Scintilla__Internal__ListBox) Delete() { diff --git a/qt-extras/scintillaedit/gen_ScintillaEdit.h b/qt-extras/scintillaedit/gen_ScintillaEdit.h index ab2c14e5..08432304 100644 --- a/qt-extras/scintillaedit/gen_ScintillaEdit.h +++ b/qt-extras/scintillaedit/gen_ScintillaEdit.h @@ -452,7 +452,6 @@ Scintilla__Internal__SurfaceMode* Scintilla__Internal__SurfaceMode_new(); Scintilla__Internal__SurfaceMode* Scintilla__Internal__SurfaceMode_new2(int codePage_, bool bidiR2L_); void Scintilla__Internal__SurfaceMode_delete(Scintilla__Internal__SurfaceMode* self); -Scintilla__Internal__Surface* Scintilla__Internal__Surface_new(); void Scintilla__Internal__Surface_Init(Scintilla__Internal__Surface* self, void* wid); void Scintilla__Internal__Surface_Init2(Scintilla__Internal__Surface* self, void* sid, void* wid); void Scintilla__Internal__Surface_SetMode(Scintilla__Internal__Surface* self, Scintilla__Internal__SurfaceMode* mode); @@ -485,70 +484,6 @@ void Scintilla__Internal__Surface_SetClip(Scintilla__Internal__Surface* self, Sc void Scintilla__Internal__Surface_PopClip(Scintilla__Internal__Surface* self); void Scintilla__Internal__Surface_FlushCachedState(Scintilla__Internal__Surface* self); void Scintilla__Internal__Surface_FlushDrawing(Scintilla__Internal__Surface* self); -bool Scintilla__Internal__Surface_override_virtual_Init(void* self, intptr_t slot); -void Scintilla__Internal__Surface_virtualbase_Init(void* self, void* wid); -bool Scintilla__Internal__Surface_override_virtual_Init2(void* self, intptr_t slot); -void Scintilla__Internal__Surface_virtualbase_Init2(void* self, void* sid, void* wid); -bool Scintilla__Internal__Surface_override_virtual_SetMode(void* self, intptr_t slot); -void Scintilla__Internal__Surface_virtualbase_SetMode(void* self, Scintilla__Internal__SurfaceMode* mode); -bool Scintilla__Internal__Surface_override_virtual_Release(void* self, intptr_t slot); -void Scintilla__Internal__Surface_virtualbase_Release(void* self); -bool Scintilla__Internal__Surface_override_virtual_SupportsFeature(void* self, intptr_t slot); -int Scintilla__Internal__Surface_virtualbase_SupportsFeature(void* self, int feature); -bool Scintilla__Internal__Surface_override_virtual_Initialised(void* self, intptr_t slot); -bool Scintilla__Internal__Surface_virtualbase_Initialised(void* self); -bool Scintilla__Internal__Surface_override_virtual_LogPixelsY(void* self, intptr_t slot); -int Scintilla__Internal__Surface_virtualbase_LogPixelsY(void* self); -bool Scintilla__Internal__Surface_override_virtual_PixelDivisions(void* self, intptr_t slot); -int Scintilla__Internal__Surface_virtualbase_PixelDivisions(void* self); -bool Scintilla__Internal__Surface_override_virtual_DeviceHeightFont(void* self, intptr_t slot); -int Scintilla__Internal__Surface_virtualbase_DeviceHeightFont(void* self, int points); -bool Scintilla__Internal__Surface_override_virtual_LineDraw(void* self, intptr_t slot); -void Scintilla__Internal__Surface_virtualbase_LineDraw(void* self, Scintilla__Internal__Point* start, Scintilla__Internal__Point* end, Scintilla__Internal__Stroke* stroke); -bool Scintilla__Internal__Surface_override_virtual_PolyLine(void* self, intptr_t slot); -void Scintilla__Internal__Surface_virtualbase_PolyLine(void* self, Scintilla__Internal__Point* pts, size_t npts, Scintilla__Internal__Stroke* stroke); -bool Scintilla__Internal__Surface_override_virtual_Polygon(void* self, intptr_t slot); -void Scintilla__Internal__Surface_virtualbase_Polygon(void* self, Scintilla__Internal__Point* pts, size_t npts, Scintilla__Internal__FillStroke* fillStroke); -bool Scintilla__Internal__Surface_override_virtual_RectangleDraw(void* self, intptr_t slot); -void Scintilla__Internal__Surface_virtualbase_RectangleDraw(void* self, Scintilla__Internal__PRectangle* rc, Scintilla__Internal__FillStroke* fillStroke); -bool Scintilla__Internal__Surface_override_virtual_RectangleFrame(void* self, intptr_t slot); -void Scintilla__Internal__Surface_virtualbase_RectangleFrame(void* self, Scintilla__Internal__PRectangle* rc, Scintilla__Internal__Stroke* stroke); -bool Scintilla__Internal__Surface_override_virtual_FillRectangle(void* self, intptr_t slot); -void Scintilla__Internal__Surface_virtualbase_FillRectangle(void* self, Scintilla__Internal__PRectangle* rc, Scintilla__Internal__Fill* fill); -bool Scintilla__Internal__Surface_override_virtual_FillRectangleAligned(void* self, intptr_t slot); -void Scintilla__Internal__Surface_virtualbase_FillRectangleAligned(void* self, Scintilla__Internal__PRectangle* rc, Scintilla__Internal__Fill* fill); -bool Scintilla__Internal__Surface_override_virtual_FillRectangle2(void* self, intptr_t slot); -void Scintilla__Internal__Surface_virtualbase_FillRectangle2(void* self, Scintilla__Internal__PRectangle* rc, Scintilla__Internal__Surface* surfacePattern); -bool Scintilla__Internal__Surface_override_virtual_RoundedRectangle(void* self, intptr_t slot); -void Scintilla__Internal__Surface_virtualbase_RoundedRectangle(void* self, Scintilla__Internal__PRectangle* rc, Scintilla__Internal__FillStroke* fillStroke); -bool Scintilla__Internal__Surface_override_virtual_AlphaRectangle(void* self, intptr_t slot); -void Scintilla__Internal__Surface_virtualbase_AlphaRectangle(void* self, Scintilla__Internal__PRectangle* rc, double cornerSize, Scintilla__Internal__FillStroke* fillStroke); -bool Scintilla__Internal__Surface_override_virtual_DrawRGBAImage(void* self, intptr_t slot); -void Scintilla__Internal__Surface_virtualbase_DrawRGBAImage(void* self, Scintilla__Internal__PRectangle* rc, int width, int height, const unsigned char* pixelsImage); -bool Scintilla__Internal__Surface_override_virtual_Ellipse(void* self, intptr_t slot); -void Scintilla__Internal__Surface_virtualbase_Ellipse(void* self, Scintilla__Internal__PRectangle* rc, Scintilla__Internal__FillStroke* fillStroke); -bool Scintilla__Internal__Surface_override_virtual_Stadium(void* self, intptr_t slot); -void Scintilla__Internal__Surface_virtualbase_Stadium(void* self, Scintilla__Internal__PRectangle* rc, Scintilla__Internal__FillStroke* fillStroke, int ends); -bool Scintilla__Internal__Surface_override_virtual_Copy(void* self, intptr_t slot); -void Scintilla__Internal__Surface_virtualbase_Copy(void* self, Scintilla__Internal__PRectangle* rc, Scintilla__Internal__Point* from, Scintilla__Internal__Surface* surfaceSource); -bool Scintilla__Internal__Surface_override_virtual_Ascent(void* self, intptr_t slot); -double Scintilla__Internal__Surface_virtualbase_Ascent(void* self, Scintilla__Internal__Font* font_); -bool Scintilla__Internal__Surface_override_virtual_Descent(void* self, intptr_t slot); -double Scintilla__Internal__Surface_virtualbase_Descent(void* self, Scintilla__Internal__Font* font_); -bool Scintilla__Internal__Surface_override_virtual_InternalLeading(void* self, intptr_t slot); -double Scintilla__Internal__Surface_virtualbase_InternalLeading(void* self, Scintilla__Internal__Font* font_); -bool Scintilla__Internal__Surface_override_virtual_Height(void* self, intptr_t slot); -double Scintilla__Internal__Surface_virtualbase_Height(void* self, Scintilla__Internal__Font* font_); -bool Scintilla__Internal__Surface_override_virtual_AverageCharWidth(void* self, intptr_t slot); -double Scintilla__Internal__Surface_virtualbase_AverageCharWidth(void* self, Scintilla__Internal__Font* font_); -bool Scintilla__Internal__Surface_override_virtual_SetClip(void* self, intptr_t slot); -void Scintilla__Internal__Surface_virtualbase_SetClip(void* self, Scintilla__Internal__PRectangle* rc); -bool Scintilla__Internal__Surface_override_virtual_PopClip(void* self, intptr_t slot); -void Scintilla__Internal__Surface_virtualbase_PopClip(void* self); -bool Scintilla__Internal__Surface_override_virtual_FlushCachedState(void* self, intptr_t slot); -void Scintilla__Internal__Surface_virtualbase_FlushCachedState(void* self); -bool Scintilla__Internal__Surface_override_virtual_FlushDrawing(void* self, intptr_t slot); -void Scintilla__Internal__Surface_virtualbase_FlushDrawing(void* self); void Scintilla__Internal__Surface_delete(Scintilla__Internal__Surface* self); Scintilla__Internal__Window* Scintilla__Internal__Window_new(); @@ -577,7 +512,6 @@ void Scintilla__Internal__IListBoxDelegate_delete(Scintilla__Internal__IListBoxD void Scintilla__Internal__ListOptions_delete(Scintilla__Internal__ListOptions* self); -Scintilla__Internal__ListBox* Scintilla__Internal__ListBox_new(); void Scintilla__Internal__ListBox_virtbase(Scintilla__Internal__ListBox* src, Scintilla__Internal__Window** outptr_Scintilla__Internal__Window); void Scintilla__Internal__ListBox_SetFont(Scintilla__Internal__ListBox* self, Scintilla__Internal__Font* font); void Scintilla__Internal__ListBox_Create(Scintilla__Internal__ListBox* self, Scintilla__Internal__Window* parent, int ctrlID, Scintilla__Internal__Point* location, int lineHeight_, bool unicodeMode_, int technology_); @@ -598,44 +532,6 @@ void Scintilla__Internal__ListBox_ClearRegisteredImages(Scintilla__Internal__Lis void Scintilla__Internal__ListBox_SetDelegate(Scintilla__Internal__ListBox* self, Scintilla__Internal__IListBoxDelegate* lbDelegate); void Scintilla__Internal__ListBox_SetList(Scintilla__Internal__ListBox* self, const char* list, char separator, char typesep); void Scintilla__Internal__ListBox_SetOptions(Scintilla__Internal__ListBox* self, Scintilla__Internal__ListOptions* options_); -bool Scintilla__Internal__ListBox_override_virtual_SetFont(void* self, intptr_t slot); -void Scintilla__Internal__ListBox_virtualbase_SetFont(void* self, Scintilla__Internal__Font* font); -bool Scintilla__Internal__ListBox_override_virtual_Create(void* self, intptr_t slot); -void Scintilla__Internal__ListBox_virtualbase_Create(void* self, Scintilla__Internal__Window* parent, int ctrlID, Scintilla__Internal__Point* location, int lineHeight_, bool unicodeMode_, int technology_); -bool Scintilla__Internal__ListBox_override_virtual_SetAverageCharWidth(void* self, intptr_t slot); -void Scintilla__Internal__ListBox_virtualbase_SetAverageCharWidth(void* self, int width); -bool Scintilla__Internal__ListBox_override_virtual_SetVisibleRows(void* self, intptr_t slot); -void Scintilla__Internal__ListBox_virtualbase_SetVisibleRows(void* self, int rows); -bool Scintilla__Internal__ListBox_override_virtual_GetVisibleRows(void* self, intptr_t slot); -int Scintilla__Internal__ListBox_virtualbase_GetVisibleRows(const void* self); -bool Scintilla__Internal__ListBox_override_virtual_GetDesiredRect(void* self, intptr_t slot); -Scintilla__Internal__PRectangle* Scintilla__Internal__ListBox_virtualbase_GetDesiredRect(void* self); -bool Scintilla__Internal__ListBox_override_virtual_CaretFromEdge(void* self, intptr_t slot); -int Scintilla__Internal__ListBox_virtualbase_CaretFromEdge(void* self); -bool Scintilla__Internal__ListBox_override_virtual_Clear(void* self, intptr_t slot); -void Scintilla__Internal__ListBox_virtualbase_Clear(void* self); -bool Scintilla__Internal__ListBox_override_virtual_Append(void* self, intptr_t slot); -void Scintilla__Internal__ListBox_virtualbase_Append(void* self, char* s, int type); -bool Scintilla__Internal__ListBox_override_virtual_Length(void* self, intptr_t slot); -int Scintilla__Internal__ListBox_virtualbase_Length(void* self); -bool Scintilla__Internal__ListBox_override_virtual_Select(void* self, intptr_t slot); -void Scintilla__Internal__ListBox_virtualbase_Select(void* self, int n); -bool Scintilla__Internal__ListBox_override_virtual_GetSelection(void* self, intptr_t slot); -int Scintilla__Internal__ListBox_virtualbase_GetSelection(void* self); -bool Scintilla__Internal__ListBox_override_virtual_Find(void* self, intptr_t slot); -int Scintilla__Internal__ListBox_virtualbase_Find(void* self, const char* prefix); -bool Scintilla__Internal__ListBox_override_virtual_RegisterImage(void* self, intptr_t slot); -void Scintilla__Internal__ListBox_virtualbase_RegisterImage(void* self, int type, const char* xpm_data); -bool Scintilla__Internal__ListBox_override_virtual_RegisterRGBAImage(void* self, intptr_t slot); -void Scintilla__Internal__ListBox_virtualbase_RegisterRGBAImage(void* self, int type, int width, int height, const unsigned char* pixelsImage); -bool Scintilla__Internal__ListBox_override_virtual_ClearRegisteredImages(void* self, intptr_t slot); -void Scintilla__Internal__ListBox_virtualbase_ClearRegisteredImages(void* self); -bool Scintilla__Internal__ListBox_override_virtual_SetDelegate(void* self, intptr_t slot); -void Scintilla__Internal__ListBox_virtualbase_SetDelegate(void* self, Scintilla__Internal__IListBoxDelegate* lbDelegate); -bool Scintilla__Internal__ListBox_override_virtual_SetList(void* self, intptr_t slot); -void Scintilla__Internal__ListBox_virtualbase_SetList(void* self, const char* list, char separator, char typesep); -bool Scintilla__Internal__ListBox_override_virtual_SetOptions(void* self, intptr_t slot); -void Scintilla__Internal__ListBox_virtualbase_SetOptions(void* self, Scintilla__Internal__ListOptions* options_); void Scintilla__Internal__ListBox_delete(Scintilla__Internal__ListBox* self); Scintilla__Internal__Menu* Scintilla__Internal__Menu_new(); diff --git a/qt/multimedia/gen_qabstractvideobuffer.cpp b/qt/multimedia/gen_qabstractvideobuffer.cpp index ace56bb0..335955d1 100644 --- a/qt/multimedia/gen_qabstractvideobuffer.cpp +++ b/qt/multimedia/gen_qabstractvideobuffer.cpp @@ -13,11 +13,6 @@ int miqt_exec_callback_QAbstractVideoBuffer_mapMode(const QAbstractVideoBuffer*, unsigned char* miqt_exec_callback_QAbstractVideoBuffer_map(QAbstractVideoBuffer*, intptr_t, int, int*, int*); void miqt_exec_callback_QAbstractVideoBuffer_unmap(QAbstractVideoBuffer*, intptr_t); QVariant* miqt_exec_callback_QAbstractVideoBuffer_handle(const QAbstractVideoBuffer*, intptr_t); -unsigned char* miqt_exec_callback_QAbstractPlanarVideoBuffer_map(QAbstractPlanarVideoBuffer*, intptr_t, int, int*, int*); -void miqt_exec_callback_QAbstractPlanarVideoBuffer_release(QAbstractPlanarVideoBuffer*, intptr_t); -int miqt_exec_callback_QAbstractPlanarVideoBuffer_mapMode(const QAbstractPlanarVideoBuffer*, intptr_t); -void miqt_exec_callback_QAbstractPlanarVideoBuffer_unmap(QAbstractPlanarVideoBuffer*, intptr_t); -QVariant* miqt_exec_callback_QAbstractPlanarVideoBuffer_handle(const QAbstractPlanarVideoBuffer*, intptr_t); #ifdef __cplusplus } /* extern C */ #endif @@ -212,105 +207,6 @@ void QAbstractVideoBuffer_delete(QAbstractVideoBuffer* self) { delete self; } -class MiqtVirtualQAbstractPlanarVideoBuffer final : public QAbstractPlanarVideoBuffer { -public: - - MiqtVirtualQAbstractPlanarVideoBuffer(QAbstractVideoBuffer::HandleType type): QAbstractPlanarVideoBuffer(type) {}; - - virtual ~MiqtVirtualQAbstractPlanarVideoBuffer() override = default; - - // cgo.Handle value for overwritten implementation - intptr_t handle__map = 0; - - // Subclass to allow providing a Go implementation - virtual uchar* map(QAbstractVideoBuffer::MapMode mode, int* numBytes, int* bytesPerLine) override { - if (handle__map == 0) { - return QAbstractPlanarVideoBuffer::map(mode, numBytes, bytesPerLine); - } - - QAbstractVideoBuffer::MapMode mode_ret = mode; - int sigval1 = static_cast(mode_ret); - int* sigval2 = numBytes; - int* sigval3 = bytesPerLine; - - unsigned char* callback_return_value = miqt_exec_callback_QAbstractPlanarVideoBuffer_map(this, handle__map, sigval1, sigval2, sigval3); - - return static_cast(callback_return_value); - } - - friend unsigned char* QAbstractPlanarVideoBuffer_virtualbase_map(void* self, int mode, int* numBytes, int* bytesPerLine); - - // cgo.Handle value for overwritten implementation - intptr_t handle__release = 0; - - // Subclass to allow providing a Go implementation - virtual void release() override { - if (handle__release == 0) { - QAbstractPlanarVideoBuffer::release(); - return; - } - - - miqt_exec_callback_QAbstractPlanarVideoBuffer_release(this, handle__release); - - - } - - friend void QAbstractPlanarVideoBuffer_virtualbase_release(void* self); - - // cgo.Handle value for overwritten implementation - intptr_t handle__mapMode = 0; - - // Subclass to allow providing a Go implementation - virtual QAbstractVideoBuffer::MapMode mapMode() const override { - if (handle__mapMode == 0) { - return (QAbstractVideoBuffer::MapMode)(0); // Pure virtual, there is no base we can call - } - - - int callback_return_value = miqt_exec_callback_QAbstractPlanarVideoBuffer_mapMode(this, handle__mapMode); - - return static_cast(callback_return_value); - } - - // cgo.Handle value for overwritten implementation - intptr_t handle__unmap = 0; - - // Subclass to allow providing a Go implementation - virtual void unmap() override { - if (handle__unmap == 0) { - return; // Pure virtual, there is no base we can call - } - - - miqt_exec_callback_QAbstractPlanarVideoBuffer_unmap(this, handle__unmap); - - - } - - // cgo.Handle value for overwritten implementation - intptr_t handle__handle = 0; - - // Subclass to allow providing a Go implementation - virtual QVariant handle() const override { - if (handle__handle == 0) { - return QAbstractPlanarVideoBuffer::handle(); - } - - - QVariant* callback_return_value = miqt_exec_callback_QAbstractPlanarVideoBuffer_handle(this, handle__handle); - - return *callback_return_value; - } - - friend QVariant* QAbstractPlanarVideoBuffer_virtualbase_handle(const void* self); - -}; - -QAbstractPlanarVideoBuffer* QAbstractPlanarVideoBuffer_new(int type) { - return new MiqtVirtualQAbstractPlanarVideoBuffer(static_cast(type)); -} - void QAbstractPlanarVideoBuffer_virtbase(QAbstractPlanarVideoBuffer* src, QAbstractVideoBuffer** outptr_QAbstractVideoBuffer) { *outptr_QAbstractVideoBuffer = static_cast(src); } @@ -320,75 +216,6 @@ unsigned char* QAbstractPlanarVideoBuffer_map(QAbstractPlanarVideoBuffer* self, return static_cast(_ret); } -bool QAbstractPlanarVideoBuffer_override_virtual_map(void* self, intptr_t slot) { - MiqtVirtualQAbstractPlanarVideoBuffer* self_cast = dynamic_cast( (QAbstractPlanarVideoBuffer*)(self) ); - if (self_cast == nullptr) { - return false; - } - - self_cast->handle__map = slot; - return true; -} - -unsigned char* QAbstractPlanarVideoBuffer_virtualbase_map(void* self, int mode, int* numBytes, int* bytesPerLine) { - - uchar* _ret = ( (MiqtVirtualQAbstractPlanarVideoBuffer*)(self) )->QAbstractPlanarVideoBuffer::map(static_cast(mode), static_cast(numBytes), static_cast(bytesPerLine)); - return static_cast(_ret); - -} - -bool QAbstractPlanarVideoBuffer_override_virtual_release(void* self, intptr_t slot) { - MiqtVirtualQAbstractPlanarVideoBuffer* self_cast = dynamic_cast( (QAbstractPlanarVideoBuffer*)(self) ); - if (self_cast == nullptr) { - return false; - } - - self_cast->handle__release = slot; - return true; -} - -void QAbstractPlanarVideoBuffer_virtualbase_release(void* self) { - - ( (MiqtVirtualQAbstractPlanarVideoBuffer*)(self) )->QAbstractPlanarVideoBuffer::release(); - -} - -bool QAbstractPlanarVideoBuffer_override_virtual_mapMode(void* self, intptr_t slot) { - MiqtVirtualQAbstractPlanarVideoBuffer* self_cast = dynamic_cast( (QAbstractPlanarVideoBuffer*)(self) ); - if (self_cast == nullptr) { - return false; - } - - self_cast->handle__mapMode = slot; - return true; -} - -bool QAbstractPlanarVideoBuffer_override_virtual_unmap(void* self, intptr_t slot) { - MiqtVirtualQAbstractPlanarVideoBuffer* self_cast = dynamic_cast( (QAbstractPlanarVideoBuffer*)(self) ); - if (self_cast == nullptr) { - return false; - } - - self_cast->handle__unmap = slot; - return true; -} - -bool QAbstractPlanarVideoBuffer_override_virtual_handle(void* self, intptr_t slot) { - MiqtVirtualQAbstractPlanarVideoBuffer* self_cast = dynamic_cast( (QAbstractPlanarVideoBuffer*)(self) ); - if (self_cast == nullptr) { - return false; - } - - self_cast->handle__handle = slot; - return true; -} - -QVariant* QAbstractPlanarVideoBuffer_virtualbase_handle(const void* self) { - - return new QVariant(( (const MiqtVirtualQAbstractPlanarVideoBuffer*)(self) )->QAbstractPlanarVideoBuffer::handle()); - -} - void QAbstractPlanarVideoBuffer_delete(QAbstractPlanarVideoBuffer* self) { delete self; } diff --git a/qt/multimedia/gen_qabstractvideobuffer.go b/qt/multimedia/gen_qabstractvideobuffer.go index 523ad3b6..c85a9e16 100644 --- a/qt/multimedia/gen_qabstractvideobuffer.go +++ b/qt/multimedia/gen_qabstractvideobuffer.go @@ -263,134 +263,10 @@ func UnsafeNewQAbstractPlanarVideoBuffer(h unsafe.Pointer) *QAbstractPlanarVideo return newQAbstractPlanarVideoBuffer((*C.QAbstractPlanarVideoBuffer)(h)) } -// NewQAbstractPlanarVideoBuffer constructs a new QAbstractPlanarVideoBuffer object. -func NewQAbstractPlanarVideoBuffer(typeVal QAbstractVideoBuffer__HandleType) *QAbstractPlanarVideoBuffer { - - return newQAbstractPlanarVideoBuffer(C.QAbstractPlanarVideoBuffer_new((C.int)(typeVal))) -} - func (this *QAbstractPlanarVideoBuffer) Map(mode QAbstractVideoBuffer__MapMode, numBytes *int, bytesPerLine *int) *byte { return (*byte)(unsafe.Pointer(C.QAbstractPlanarVideoBuffer_map(this.h, (C.int)(mode), (*C.int)(unsafe.Pointer(numBytes)), (*C.int)(unsafe.Pointer(bytesPerLine))))) } -func (this *QAbstractPlanarVideoBuffer) callVirtualBase_Map(mode QAbstractVideoBuffer__MapMode, numBytes *int, bytesPerLine *int) *byte { - - return (*byte)(unsafe.Pointer(C.QAbstractPlanarVideoBuffer_virtualbase_map(unsafe.Pointer(this.h), (C.int)(mode), (*C.int)(unsafe.Pointer(numBytes)), (*C.int)(unsafe.Pointer(bytesPerLine))))) - -} -func (this *QAbstractPlanarVideoBuffer) OnMap(slot func(super func(mode QAbstractVideoBuffer__MapMode, numBytes *int, bytesPerLine *int) *byte, mode QAbstractVideoBuffer__MapMode, numBytes *int, bytesPerLine *int) *byte) { - ok := C.QAbstractPlanarVideoBuffer_override_virtual_map(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) - if !ok { - panic("miqt: can only override virtual methods for directly constructed types") - } -} - -//export miqt_exec_callback_QAbstractPlanarVideoBuffer_map -func miqt_exec_callback_QAbstractPlanarVideoBuffer_map(self *C.QAbstractPlanarVideoBuffer, cb C.intptr_t, mode C.int, numBytes *C.int, bytesPerLine *C.int) *C.uchar { - gofunc, ok := cgo.Handle(cb).Value().(func(super func(mode QAbstractVideoBuffer__MapMode, numBytes *int, bytesPerLine *int) *byte, mode QAbstractVideoBuffer__MapMode, numBytes *int, bytesPerLine *int) *byte) - if !ok { - panic("miqt: callback of non-callback type (heap corruption?)") - } - - // Convert all CABI parameters to Go parameters - slotval1 := (QAbstractVideoBuffer__MapMode)(mode) - - slotval2 := (*int)(unsafe.Pointer(numBytes)) - - slotval3 := (*int)(unsafe.Pointer(bytesPerLine)) - - virtualReturn := gofunc((&QAbstractPlanarVideoBuffer{h: self}).callVirtualBase_Map, slotval1, slotval2, slotval3) - - return (*C.uchar)(unsafe.Pointer(virtualReturn)) - -} - -func (this *QAbstractPlanarVideoBuffer) callVirtualBase_Release() { - - C.QAbstractPlanarVideoBuffer_virtualbase_release(unsafe.Pointer(this.h)) - -} -func (this *QAbstractPlanarVideoBuffer) OnRelease(slot func(super func())) { - ok := C.QAbstractPlanarVideoBuffer_override_virtual_release(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) - if !ok { - panic("miqt: can only override virtual methods for directly constructed types") - } -} - -//export miqt_exec_callback_QAbstractPlanarVideoBuffer_release -func miqt_exec_callback_QAbstractPlanarVideoBuffer_release(self *C.QAbstractPlanarVideoBuffer, cb C.intptr_t) { - gofunc, ok := cgo.Handle(cb).Value().(func(super func())) - if !ok { - panic("miqt: callback of non-callback type (heap corruption?)") - } - - gofunc((&QAbstractPlanarVideoBuffer{h: self}).callVirtualBase_Release) - -} -func (this *QAbstractPlanarVideoBuffer) OnMapMode(slot func() QAbstractVideoBuffer__MapMode) { - ok := C.QAbstractPlanarVideoBuffer_override_virtual_mapMode(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) - if !ok { - panic("miqt: can only override virtual methods for directly constructed types") - } -} - -//export miqt_exec_callback_QAbstractPlanarVideoBuffer_mapMode -func miqt_exec_callback_QAbstractPlanarVideoBuffer_mapMode(self *C.QAbstractPlanarVideoBuffer, cb C.intptr_t) C.int { - gofunc, ok := cgo.Handle(cb).Value().(func() QAbstractVideoBuffer__MapMode) - if !ok { - panic("miqt: callback of non-callback type (heap corruption?)") - } - - virtualReturn := gofunc() - - return (C.int)(virtualReturn) - -} -func (this *QAbstractPlanarVideoBuffer) OnUnmap(slot func()) { - ok := C.QAbstractPlanarVideoBuffer_override_virtual_unmap(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) - if !ok { - panic("miqt: can only override virtual methods for directly constructed types") - } -} - -//export miqt_exec_callback_QAbstractPlanarVideoBuffer_unmap -func miqt_exec_callback_QAbstractPlanarVideoBuffer_unmap(self *C.QAbstractPlanarVideoBuffer, cb C.intptr_t) { - gofunc, ok := cgo.Handle(cb).Value().(func()) - if !ok { - panic("miqt: callback of non-callback type (heap corruption?)") - } - - gofunc() - -} - -func (this *QAbstractPlanarVideoBuffer) callVirtualBase_Handle() *qt.QVariant { - - _goptr := qt.UnsafeNewQVariant(unsafe.Pointer(C.QAbstractPlanarVideoBuffer_virtualbase_handle(unsafe.Pointer(this.h)))) - _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer - return _goptr - -} -func (this *QAbstractPlanarVideoBuffer) OnHandle(slot func(super func() *qt.QVariant) *qt.QVariant) { - ok := C.QAbstractPlanarVideoBuffer_override_virtual_handle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) - if !ok { - panic("miqt: can only override virtual methods for directly constructed types") - } -} - -//export miqt_exec_callback_QAbstractPlanarVideoBuffer_handle -func miqt_exec_callback_QAbstractPlanarVideoBuffer_handle(self *C.QAbstractPlanarVideoBuffer, cb C.intptr_t) *C.QVariant { - gofunc, ok := cgo.Handle(cb).Value().(func(super func() *qt.QVariant) *qt.QVariant) - if !ok { - panic("miqt: callback of non-callback type (heap corruption?)") - } - - virtualReturn := gofunc((&QAbstractPlanarVideoBuffer{h: self}).callVirtualBase_Handle) - - return (*C.QVariant)(virtualReturn.UnsafePointer()) - -} - // Delete this object from C++ memory. func (this *QAbstractPlanarVideoBuffer) Delete() { C.QAbstractPlanarVideoBuffer_delete(this.h) diff --git a/qt/multimedia/gen_qabstractvideobuffer.h b/qt/multimedia/gen_qabstractvideobuffer.h index 62523756..a40e138f 100644 --- a/qt/multimedia/gen_qabstractvideobuffer.h +++ b/qt/multimedia/gen_qabstractvideobuffer.h @@ -43,19 +43,8 @@ bool QAbstractVideoBuffer_override_virtual_handle(void* self, intptr_t slot); QVariant* QAbstractVideoBuffer_virtualbase_handle(const void* self); void QAbstractVideoBuffer_delete(QAbstractVideoBuffer* self); -QAbstractPlanarVideoBuffer* QAbstractPlanarVideoBuffer_new(int type); void QAbstractPlanarVideoBuffer_virtbase(QAbstractPlanarVideoBuffer* src, QAbstractVideoBuffer** outptr_QAbstractVideoBuffer); unsigned char* QAbstractPlanarVideoBuffer_map(QAbstractPlanarVideoBuffer* self, int mode, int* numBytes, int* bytesPerLine); -bool QAbstractPlanarVideoBuffer_override_virtual_map(void* self, intptr_t slot); -unsigned char* QAbstractPlanarVideoBuffer_virtualbase_map(void* self, int mode, int* numBytes, int* bytesPerLine); -bool QAbstractPlanarVideoBuffer_override_virtual_release(void* self, intptr_t slot); -void QAbstractPlanarVideoBuffer_virtualbase_release(void* self); -bool QAbstractPlanarVideoBuffer_override_virtual_mapMode(void* self, intptr_t slot); -int QAbstractPlanarVideoBuffer_virtualbase_mapMode(const void* self); -bool QAbstractPlanarVideoBuffer_override_virtual_unmap(void* self, intptr_t slot); -void QAbstractPlanarVideoBuffer_virtualbase_unmap(void* self); -bool QAbstractPlanarVideoBuffer_override_virtual_handle(void* self, intptr_t slot); -QVariant* QAbstractPlanarVideoBuffer_virtualbase_handle(const void* self); void QAbstractPlanarVideoBuffer_delete(QAbstractPlanarVideoBuffer* self); #ifdef __cplusplus