mirror of
https://github.com/mappu/miqt.git
synced 2025-04-07 14:10:22 +00:00
Merge branch 'master' into feat/qml
# Conflicts: # cmd/genbindings/config-allowlist.go
This commit is contained in:
commit
e8a8be0921
18
.github/workflows/miqt.yml
vendored
18
.github/workflows/miqt.yml
vendored
@ -21,10 +21,26 @@ jobs:
|
|||||||
key: linux64-clang-cache
|
key: linux64-clang-cache
|
||||||
|
|
||||||
- name: Rebuild binding source
|
- name: Rebuild binding source
|
||||||
run: make
|
run: make genbindings
|
||||||
|
|
||||||
- name: Assert no changes
|
- name: Assert no changes
|
||||||
run: git update-index --really-refresh && git diff-index HEAD
|
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:
|
miqt_linux64_qt5:
|
||||||
runs-on: ubuntu-24.04
|
runs-on: ubuntu-24.04
|
||||||
|
28
Makefile
28
Makefile
@ -1,18 +1,36 @@
|
|||||||
BUILDSTAMPS = docker/genbindings.docker-buildstamp
|
BUILDSTAMPS := docker/genbindings.docker-buildstamp
|
||||||
DOCKER = docker
|
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
|
all: genbindings
|
||||||
|
|
||||||
docker/genbindings.docker-buildstamp: docker/genbindings.Dockerfile
|
docker/genbindings.docker-buildstamp: docker/genbindings.Dockerfile
|
||||||
$(DOCKER) build -t miqt/genbindings:latest -f docker/genbindings.Dockerfile .
|
$(DOCKER) build -t miqt/genbindings:latest -f docker/genbindings.Dockerfile .
|
||||||
touch $@
|
touch $@
|
||||||
|
|
||||||
|
.PHONY: clean
|
||||||
clean:
|
clean:
|
||||||
$(DOCKER) image rm -f miqt/genbindings:latest
|
$(DOCKER) image rm -f miqt/genbindings:latest
|
||||||
rm -f $(BUILDSTAMPS)
|
rm -f $(BUILDSTAMPS)
|
||||||
|
|
||||||
|
.PHONY: genbindings
|
||||||
genbindings: $(BUILDSTAMPS)
|
genbindings: $(BUILDSTAMPS)
|
||||||
mkdir -p ~/.cache/go-build
|
$(DOCKEREXEC) 'cd cmd/genbindings && go build && ./genbindings'
|
||||||
$(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'
|
|
||||||
|
|
||||||
.PHONY : all clean genbindings
|
.PHONY: build-all
|
||||||
|
build-all: $(BUILDSTAMPS)
|
||||||
|
$(DOCKEREXEC) 'go build ./...'
|
||||||
|
@ -669,7 +669,7 @@ func parseMethod(node map[string]interface{}, mm *CppMethod) error {
|
|||||||
// If anything here is too complicated, skip the whole method
|
// If anything here is too complicated, skip the whole method
|
||||||
|
|
||||||
var err error = nil
|
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 {
|
if err != nil {
|
||||||
return err
|
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.
|
// into its (A) return type and (B) separate parameter types.
|
||||||
// These clang strings never contain the parameter's name, so the names here are
|
// These clang strings never contain the parameter's name, so the names here are
|
||||||
// not filled in.
|
// 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
|
if strings.Contains(typeString, `&&`) { // TODO Rvalue references
|
||||||
return CppParameter{}, nil, false, ErrTooComplex
|
return CppParameter{}, nil, false, false, ErrTooComplex
|
||||||
}
|
}
|
||||||
|
|
||||||
// Cut to exterior-most (, ) pair
|
// Cut to exterior-most (, ) pair
|
||||||
@ -778,27 +778,19 @@ func parseTypeString(typeString string) (CppParameter, []CppParameter, bool, err
|
|||||||
epos := strings.LastIndex(typeString, `)`)
|
epos := strings.LastIndex(typeString, `)`)
|
||||||
|
|
||||||
if opos == -1 || epos == -1 {
|
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
|
isConst := strings.Contains(typeString[epos:], `const`)
|
||||||
if strings.Contains(typeString[epos:], `const`) {
|
isNoExcept := strings.Contains(typeString[epos:], `noexcept`)
|
||||||
isConst = true
|
|
||||||
}
|
|
||||||
|
|
||||||
returnType := parseSingleTypeString(strings.TrimSpace(typeString[0:opos]))
|
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]
|
inner := typeString[opos+1 : epos]
|
||||||
|
|
||||||
// Should be no more brackets
|
// Should be no more brackets
|
||||||
if strings.ContainsAny(inner, `()`) {
|
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
|
// 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
|
// 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
|
// QNetwork has some references to 'class QSslCertificate'. Flatten
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
} else if tok == "noexcept" {
|
||||||
|
// Used by ScintillaEdit
|
||||||
|
insert.NoExcept = true
|
||||||
|
|
||||||
} else if tok == "&" { // U+0026
|
} else if tok == "&" { // U+0026
|
||||||
insert.ByRef = true
|
insert.ByRef = true
|
||||||
|
|
||||||
|
@ -278,6 +278,20 @@ func AllowVirtualForClass(className string) bool {
|
|||||||
return false
|
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
|
// Qt 5 QWebkit: undefined reference to typeinfo
|
||||||
if className == "QWebNotificationPresenter" {
|
if className == "QWebNotificationPresenter" {
|
||||||
return false
|
return false
|
||||||
@ -366,6 +380,12 @@ func AllowMethod(className string, mm CppMethod) error {
|
|||||||
return ErrTooComplex // Callbacks that the attached object types must provide to QML
|
return ErrTooComplex // Callbacks that the attached object types must provide to QML
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 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
|
return nil // OK, allow
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1045,7 +1045,7 @@ extern "C" {
|
|||||||
|
|
||||||
ret.WriteString(
|
ret.WriteString(
|
||||||
"\t// Subclass to allow providing a Go implementation\n" +
|
"\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")
|
ret.WriteString("\t\tif (" + handleVarname + " == 0) {\n")
|
||||||
|
@ -14,6 +14,7 @@ type CppParameter struct {
|
|||||||
PointerCount int
|
PointerCount int
|
||||||
ByRef bool
|
ByRef bool
|
||||||
Optional bool
|
Optional bool
|
||||||
|
NoExcept bool
|
||||||
|
|
||||||
QtCppOriginalType *CppParameter // If we rewrote QStringList->QList<String>, this field contains the original QStringList. Otherwise, it's blank
|
QtCppOriginalType *CppParameter // If we rewrote QStringList->QList<String>, this field contains the original QStringList. Otherwise, it's blank
|
||||||
}
|
}
|
||||||
@ -245,6 +246,7 @@ type CppMethod struct {
|
|||||||
IsStatic bool
|
IsStatic bool
|
||||||
IsSignal bool
|
IsSignal bool
|
||||||
IsConst bool
|
IsConst bool
|
||||||
|
IsNoExcept bool
|
||||||
IsVirtual bool
|
IsVirtual bool
|
||||||
IsPureVirtual bool // Virtual method was declared with = 0 i.e. there is no base method here to call
|
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
|
IsProtected bool // If true, we can't call this method but we may still be able to overload it
|
||||||
|
@ -40,6 +40,7 @@ RUN \
|
|||||||
RUN mkdir -p /usr/local/lib/pkgconfig
|
RUN mkdir -p /usr/local/lib/pkgconfig
|
||||||
|
|
||||||
COPY pkg-config/QScintilla.pc.example /usr/local/lib/pkgconfig/QScintilla.pc
|
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
|
COPY pkg-config/ScintillaEdit.pc.example /usr/local/lib/pkgconfig/ScintillaEdit.pc
|
||||||
|
|
||||||
ENV GOFLAGS=-buildvcs=false
|
ENV GOFLAGS=-buildvcs=false
|
||||||
|
@ -11,7 +11,7 @@ func main() {
|
|||||||
|
|
||||||
qt.NewQApplication(os.Args)
|
qt.NewQApplication(os.Args)
|
||||||
|
|
||||||
btn := qt.NewQPushButton2("Hello world!")
|
btn := qt.NewQPushButton3("Hello world!")
|
||||||
btn.SetFixedWidth(320)
|
btn.SetFixedWidth(320)
|
||||||
|
|
||||||
var counter int = 0
|
var counter int = 0
|
||||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -452,7 +452,6 @@ Scintilla__Internal__SurfaceMode* Scintilla__Internal__SurfaceMode_new();
|
|||||||
Scintilla__Internal__SurfaceMode* Scintilla__Internal__SurfaceMode_new2(int codePage_, bool bidiR2L_);
|
Scintilla__Internal__SurfaceMode* Scintilla__Internal__SurfaceMode_new2(int codePage_, bool bidiR2L_);
|
||||||
void Scintilla__Internal__SurfaceMode_delete(Scintilla__Internal__SurfaceMode* self);
|
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_Init(Scintilla__Internal__Surface* self, void* wid);
|
||||||
void Scintilla__Internal__Surface_Init2(Scintilla__Internal__Surface* self, void* sid, 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);
|
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_PopClip(Scintilla__Internal__Surface* self);
|
||||||
void Scintilla__Internal__Surface_FlushCachedState(Scintilla__Internal__Surface* self);
|
void Scintilla__Internal__Surface_FlushCachedState(Scintilla__Internal__Surface* self);
|
||||||
void Scintilla__Internal__Surface_FlushDrawing(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);
|
void Scintilla__Internal__Surface_delete(Scintilla__Internal__Surface* self);
|
||||||
|
|
||||||
Scintilla__Internal__Window* Scintilla__Internal__Window_new();
|
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);
|
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_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_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_);
|
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_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_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_);
|
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);
|
void Scintilla__Internal__ListBox_delete(Scintilla__Internal__ListBox* self);
|
||||||
|
|
||||||
Scintilla__Internal__Menu* Scintilla__Internal__Menu_new();
|
Scintilla__Internal__Menu* Scintilla__Internal__Menu_new();
|
||||||
|
@ -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*);
|
unsigned char* miqt_exec_callback_QAbstractVideoBuffer_map(QAbstractVideoBuffer*, intptr_t, int, int*, int*);
|
||||||
void miqt_exec_callback_QAbstractVideoBuffer_unmap(QAbstractVideoBuffer*, intptr_t);
|
void miqt_exec_callback_QAbstractVideoBuffer_unmap(QAbstractVideoBuffer*, intptr_t);
|
||||||
QVariant* miqt_exec_callback_QAbstractVideoBuffer_handle(const 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
|
#ifdef __cplusplus
|
||||||
} /* extern C */
|
} /* extern C */
|
||||||
#endif
|
#endif
|
||||||
@ -212,105 +207,6 @@ void QAbstractVideoBuffer_delete(QAbstractVideoBuffer* self) {
|
|||||||
delete 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<int>(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<uchar*>(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<QAbstractVideoBuffer::MapMode>(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<QAbstractVideoBuffer::HandleType>(type));
|
|
||||||
}
|
|
||||||
|
|
||||||
void QAbstractPlanarVideoBuffer_virtbase(QAbstractPlanarVideoBuffer* src, QAbstractVideoBuffer** outptr_QAbstractVideoBuffer) {
|
void QAbstractPlanarVideoBuffer_virtbase(QAbstractPlanarVideoBuffer* src, QAbstractVideoBuffer** outptr_QAbstractVideoBuffer) {
|
||||||
*outptr_QAbstractVideoBuffer = static_cast<QAbstractVideoBuffer*>(src);
|
*outptr_QAbstractVideoBuffer = static_cast<QAbstractVideoBuffer*>(src);
|
||||||
}
|
}
|
||||||
@ -320,75 +216,6 @@ unsigned char* QAbstractPlanarVideoBuffer_map(QAbstractPlanarVideoBuffer* self,
|
|||||||
return static_cast<unsigned char*>(_ret);
|
return static_cast<unsigned char*>(_ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool QAbstractPlanarVideoBuffer_override_virtual_map(void* self, intptr_t slot) {
|
|
||||||
MiqtVirtualQAbstractPlanarVideoBuffer* self_cast = dynamic_cast<MiqtVirtualQAbstractPlanarVideoBuffer*>( (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<MiqtVirtualQAbstractPlanarVideoBuffer::MapMode>(mode), static_cast<int*>(numBytes), static_cast<int*>(bytesPerLine));
|
|
||||||
return static_cast<unsigned char*>(_ret);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
bool QAbstractPlanarVideoBuffer_override_virtual_release(void* self, intptr_t slot) {
|
|
||||||
MiqtVirtualQAbstractPlanarVideoBuffer* self_cast = dynamic_cast<MiqtVirtualQAbstractPlanarVideoBuffer*>( (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<MiqtVirtualQAbstractPlanarVideoBuffer*>( (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<MiqtVirtualQAbstractPlanarVideoBuffer*>( (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<MiqtVirtualQAbstractPlanarVideoBuffer*>( (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) {
|
void QAbstractPlanarVideoBuffer_delete(QAbstractPlanarVideoBuffer* self) {
|
||||||
delete self;
|
delete self;
|
||||||
}
|
}
|
||||||
|
@ -263,134 +263,10 @@ func UnsafeNewQAbstractPlanarVideoBuffer(h unsafe.Pointer) *QAbstractPlanarVideo
|
|||||||
return newQAbstractPlanarVideoBuffer((*C.QAbstractPlanarVideoBuffer)(h))
|
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 {
|
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)))))
|
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.
|
// Delete this object from C++ memory.
|
||||||
func (this *QAbstractPlanarVideoBuffer) Delete() {
|
func (this *QAbstractPlanarVideoBuffer) Delete() {
|
||||||
C.QAbstractPlanarVideoBuffer_delete(this.h)
|
C.QAbstractPlanarVideoBuffer_delete(this.h)
|
||||||
|
@ -43,19 +43,8 @@ bool QAbstractVideoBuffer_override_virtual_handle(void* self, intptr_t slot);
|
|||||||
QVariant* QAbstractVideoBuffer_virtualbase_handle(const void* self);
|
QVariant* QAbstractVideoBuffer_virtualbase_handle(const void* self);
|
||||||
void QAbstractVideoBuffer_delete(QAbstractVideoBuffer* self);
|
void QAbstractVideoBuffer_delete(QAbstractVideoBuffer* self);
|
||||||
|
|
||||||
QAbstractPlanarVideoBuffer* QAbstractPlanarVideoBuffer_new(int type);
|
|
||||||
void QAbstractPlanarVideoBuffer_virtbase(QAbstractPlanarVideoBuffer* src, QAbstractVideoBuffer** outptr_QAbstractVideoBuffer);
|
void QAbstractPlanarVideoBuffer_virtbase(QAbstractPlanarVideoBuffer* src, QAbstractVideoBuffer** outptr_QAbstractVideoBuffer);
|
||||||
unsigned char* QAbstractPlanarVideoBuffer_map(QAbstractPlanarVideoBuffer* self, int mode, int* numBytes, int* bytesPerLine);
|
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);
|
void QAbstractPlanarVideoBuffer_delete(QAbstractPlanarVideoBuffer* self);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
Loading…
x
Reference in New Issue
Block a user