mirror of
https://github.com/mappu/miqt.git
synced 2024-12-22 00:48:38 +00:00
Merge pull request #44 from mappu/miqt-scintilla
QScintilla (GPL) and ScintillaEdit (MIT) support
This commit is contained in:
commit
e5435876b5
6
.github/workflows/miqt.yml
vendored
6
.github/workflows/miqt.yml
vendored
@ -15,7 +15,7 @@ jobs:
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Linux64 docker build
|
||||
run: cd docker && docker build -t miqt/genbindings:latest -f genbindings.Dockerfile .
|
||||
run: docker build -t miqt/genbindings:latest -f docker/genbindings.Dockerfile .
|
||||
|
||||
- name: Cache clang ASTs
|
||||
uses: actions/cache@v4
|
||||
@ -37,7 +37,7 @@ jobs:
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Linux64 docker build
|
||||
run: cd docker && docker build -t miqt/linux64:latest -f linux64-go1.19-qt5.15-dynamic.Dockerfile .
|
||||
run: docker build -t miqt/linux64:latest -f docker/linux64-go1.19-qt5.15-dynamic.Dockerfile .
|
||||
|
||||
- name: Cache GOCACHE
|
||||
uses: actions/cache@v4
|
||||
@ -62,7 +62,7 @@ jobs:
|
||||
key: win64-gocache
|
||||
|
||||
- name: Win64 docker build
|
||||
run: cd docker && docker build -t miqt/win64:latest -f win64-cross-go1.23-qt5.15-static.Dockerfile .
|
||||
run: docker build -t miqt/win64:latest -f docker/win64-cross-go1.23-qt5.15-static.Dockerfile .
|
||||
|
||||
- name: Win64 bindings compile
|
||||
run: docker run -v ~/.cache/go-build:/root/.cache/go-build -v $PWD:/src -w /src miqt/win64:latest /bin/bash -c 'cd qt && go build'
|
||||
|
5
.gitignore
vendored
5
.gitignore
vendored
@ -7,6 +7,9 @@ container-build-cache/
|
||||
# local genbindings configuration
|
||||
cmd/genbindings/genbindings.local*
|
||||
|
||||
# local pkg-config configuration
|
||||
pkg-config/*.pc
|
||||
|
||||
# binaries
|
||||
cmd/handbindings/handbindings
|
||||
cmd/handbindings/bindings_test/direct
|
||||
@ -23,6 +26,8 @@ examples/windowsmanifest/windowsmanifest.exe
|
||||
examples/uidesigner/uidesigner
|
||||
examples/uidesigner/uidesigner.exe
|
||||
examples/libraries/qt-qprintsupport/qt-qprintsupport
|
||||
examples/libraries/restricted-extras-qscintilla/restricted-extras-qscintilla
|
||||
examples/libraries/extras-scintillaedit/extras-scintillaedit
|
||||
|
||||
# android temporary build files
|
||||
android-build
|
||||
|
@ -149,14 +149,14 @@ Static builds are also available by installing the `mingw-w64-ucrt-x86_64-qt5-st
|
||||
For static builds (open source application):
|
||||
|
||||
1. Build the necessary docker container for cross-compilation:
|
||||
- `docker build -t miqt/win64-cross:latest -f win64-cross-go1.23-qt5.15-static.Dockerfile .`
|
||||
- `docker build -t miqt/win64-cross:latest -f docker/win64-cross-go1.23-qt5.15-static.Dockerfile .`
|
||||
2. Build your application:
|
||||
- `docker run --rm -v $(pwd):/src -w /src miqt/win64-cross:latest go build -buildvcs=false --tags=windowsqtstatic -ldflags '-s -w -H windowsgui'`
|
||||
|
||||
For dynamically-linked builds (closed-source or open source application):
|
||||
|
||||
1. Build the necessary docker container for cross-compilation:
|
||||
- `docker build -t miqt/win64-dynamic:latest -f win64-cross-go1.23-qt5.15-dynamic.Dockerfile .`
|
||||
- `docker build -t miqt/win64-dynamic:latest -f docker/win64-cross-go1.23-qt5.15-dynamic.Dockerfile .`
|
||||
2. Build your application:
|
||||
- `docker run --rm -v $(pwd):/src -w /src miqt/win64-dynamic:latest go build -buildvcs=false -ldflags '-s -w -H windowsgui'`
|
||||
3. Copy necessary Qt LGPL libraries and plugin files.
|
||||
@ -179,7 +179,7 @@ Miqt supports compiling for Android. Some extra steps are required to bridge the
|
||||
- Ensure to `import "C"`.
|
||||
- Check `examples/android` to see how to support both Android and desktop platforms.
|
||||
2. Build the necessary docker container for cross-compilation:
|
||||
- `docker build -t miqt/android:latest -f android-armv8a-go1.23-qt5.15-dynamic.Dockerfile .`
|
||||
- `docker build -t miqt/android:latest -f docker/android-armv8a-go1.23-qt5.15-dynamic.Dockerfile .`
|
||||
3. Build your application as `.so` format:
|
||||
- `docker run --rm -v $(pwd):/src -w /src miqt/android:latest go build -buildmode c-shared -ldflags "-s -w -extldflags -Wl,-soname,my_go_app.so" -o android-build/libs/arm64-v8a/my_go_app.so`
|
||||
4. Build the Qt linking stub:
|
||||
|
@ -9,6 +9,7 @@ import (
|
||||
"log"
|
||||
"os"
|
||||
"os/exec"
|
||||
"strings"
|
||||
"sync"
|
||||
"time"
|
||||
)
|
||||
@ -18,7 +19,26 @@ const (
|
||||
ClangRetryDelay = 3 * time.Second
|
||||
)
|
||||
|
||||
func clangExec(ctx context.Context, clangBin, inputHeader string, cflags []string) ([]interface{}, error) {
|
||||
type ClangMatcher func(astNodeFilename string) bool
|
||||
|
||||
func ClangMatchSameHeaderDefinitionOnly(astNodeFilename string) bool {
|
||||
return astNodeFilename == ""
|
||||
}
|
||||
|
||||
type clangMatchUnderPath struct {
|
||||
basePath string
|
||||
}
|
||||
|
||||
func (c *clangMatchUnderPath) Match(astNodeFilename string) bool {
|
||||
if astNodeFilename == "" {
|
||||
return true
|
||||
}
|
||||
return strings.HasPrefix(astNodeFilename, c.basePath)
|
||||
}
|
||||
|
||||
//
|
||||
|
||||
func clangExec(ctx context.Context, clangBin, inputHeader string, cflags []string, matcher ClangMatcher) ([]interface{}, error) {
|
||||
|
||||
clangArgs := []string{`-x`, `c++`}
|
||||
clangArgs = append(clangArgs, cflags...)
|
||||
@ -44,7 +64,7 @@ func clangExec(ctx context.Context, clangBin, inputHeader string, cflags []strin
|
||||
wg.Add(1)
|
||||
go func() {
|
||||
defer wg.Done()
|
||||
inner, innerErr = clangStripUpToFile(pr, inputHeader)
|
||||
inner, innerErr = clangStripUpToFile(pr, matcher)
|
||||
}()
|
||||
|
||||
err = cmd.Wait()
|
||||
@ -57,10 +77,10 @@ func clangExec(ctx context.Context, clangBin, inputHeader string, cflags []strin
|
||||
return inner, innerErr
|
||||
}
|
||||
|
||||
func mustClangExec(ctx context.Context, clangBin, inputHeader string, cflags []string) []interface{} {
|
||||
func mustClangExec(ctx context.Context, clangBin, inputHeader string, cflags []string, matcher ClangMatcher) []interface{} {
|
||||
|
||||
for i := 0; i < ClangMaxRetries; i++ {
|
||||
astInner, err := clangExec(ctx, clangBin, inputHeader, cflags)
|
||||
astInner, err := clangExec(ctx, clangBin, inputHeader, cflags, matcher)
|
||||
if err != nil {
|
||||
// Log and continue with next retry
|
||||
log.Printf("WARNING: Clang execution failed: %v", err)
|
||||
@ -83,7 +103,7 @@ func mustClangExec(ctx context.Context, clangBin, inputHeader string, cflags []s
|
||||
// This cleans out everything in the translation unit that came from an
|
||||
// #included file.
|
||||
// @ref https://stackoverflow.com/a/71128654
|
||||
func clangStripUpToFile(stdout io.Reader, inputFilePath string) ([]interface{}, error) {
|
||||
func clangStripUpToFile(stdout io.Reader, matcher ClangMatcher) ([]interface{}, error) {
|
||||
|
||||
var obj = map[string]interface{}{}
|
||||
err := json.NewDecoder(stdout).Decode(&obj)
|
||||
@ -108,10 +128,8 @@ func clangStripUpToFile(stdout io.Reader, inputFilePath string) ([]interface{},
|
||||
return nil, errors.New("entry is not a map")
|
||||
}
|
||||
|
||||
if _, ok := entry["isImplicit"]; ok {
|
||||
// Don't keep
|
||||
continue
|
||||
}
|
||||
// Check where this AST node came from, if it was directly written
|
||||
// in this header or if it as part of an #include
|
||||
|
||||
var match_filename = ""
|
||||
|
||||
@ -140,16 +158,13 @@ func clangStripUpToFile(stdout io.Reader, inputFilePath string) ([]interface{},
|
||||
|
||||
// log.Printf("# name=%v kind=%v filename=%q\n", entry["name"], entry["kind"], match_filename)
|
||||
|
||||
if match_filename == "" {
|
||||
if matcher(match_filename) {
|
||||
// Keep
|
||||
ret = append(ret, entry)
|
||||
|
||||
} else if match_filename != inputFilePath {
|
||||
// Skip this
|
||||
} else {
|
||||
// Keep this
|
||||
// ret = append(ret, entry)
|
||||
}
|
||||
|
||||
// Otherwise, discard this AST node, it comes from some imported file
|
||||
// that we will likely scan separately
|
||||
}
|
||||
|
||||
return ret, nil
|
||||
|
@ -24,6 +24,7 @@ func InsertTypedefs() {
|
||||
// QFile doesn't see QFileDevice parent class enum
|
||||
KnownTypedefs["QFile::Permissions"] = lookupResultTypedef{"qt", CppTypedef{"QFile::Permissions", parseSingleTypeString("QFileDevice::Permissions")}}
|
||||
KnownTypedefs["QFileDevice::Permissions"] = lookupResultTypedef{"qt", CppTypedef{"QFile::Permissions", parseSingleTypeString("QFlags<QFileDevice::Permission>")}}
|
||||
|
||||
}
|
||||
|
||||
func AllowHeader(fullpath string) bool {
|
||||
@ -69,6 +70,11 @@ func ImportHeaderForClass(className string) bool {
|
||||
return false
|
||||
}
|
||||
|
||||
if strings.HasPrefix(className, "Qsci") {
|
||||
// QScintilla - does not produce imports
|
||||
return false
|
||||
}
|
||||
|
||||
switch className {
|
||||
case "QGraphicsEffectSource", // e.g. qgraphicseffect.h
|
||||
"QAbstractConcatenable", // qstringbuilder.h
|
||||
@ -90,6 +96,10 @@ func AllowClass(className string) bool {
|
||||
return false
|
||||
}
|
||||
|
||||
if strings.HasPrefix(className, `std::`) {
|
||||
return false // Scintilla bindings find some of these
|
||||
}
|
||||
|
||||
switch className {
|
||||
case
|
||||
"QTextStreamManipulator", // Only seems to contain garbage methods
|
||||
@ -130,7 +140,6 @@ func AllowMethod(mm CppMethod) error {
|
||||
}
|
||||
|
||||
return nil // OK, allow
|
||||
|
||||
}
|
||||
|
||||
func CheckComplexity(p CppParameter, isReturnType bool) error {
|
||||
@ -150,6 +159,12 @@ func CheckComplexity(p CppParameter, isReturnType bool) error {
|
||||
if err := CheckComplexity(t, isReturnType); err != nil { // e.g. QGradientStops is a QVector<> (OK) of QGradientStop (not OK)
|
||||
return err
|
||||
}
|
||||
|
||||
// qsciscintilla.h QsciScintilla_Annotate4: no copy ctor for private type QsciStyledText
|
||||
// Works fine normally, but not in a list
|
||||
if t.ParameterType == "QsciStyledText" {
|
||||
return ErrTooComplex
|
||||
}
|
||||
}
|
||||
|
||||
if strings.Contains(p.ParameterType, "(*)") { // Function pointer.
|
||||
@ -176,12 +191,16 @@ func CheckComplexity(p CppParameter, isReturnType bool) error {
|
||||
if strings.HasPrefix(p.ParameterType, "QUrlTwoFlags<") {
|
||||
return ErrTooComplex // e.g. qurl.h
|
||||
}
|
||||
if strings.HasPrefix(p.ParameterType, "FillResult<") {
|
||||
return ErrTooComplex // Scintilla
|
||||
}
|
||||
if strings.HasPrefix(p.ParameterType, "std::") {
|
||||
// std::initializer e.g. qcborarray.h
|
||||
// std::string QByteArray->toStdString(). There are QString overloads already
|
||||
// std::nullptr_t Qcborstreamwriter
|
||||
// std::chrono::nanoseconds QDeadlineTimer_RemainingTimeAsDuration
|
||||
// std::seed_seq QRandom
|
||||
// std::exception Scintilla
|
||||
return ErrTooComplex
|
||||
}
|
||||
if strings.Contains(p.ParameterType, `Iterator::value_type`) {
|
||||
@ -253,6 +272,7 @@ func CheckComplexity(p CppParameter, isReturnType bool) error {
|
||||
"QXmlStreamNamespaceDeclarations", // e.g. qxmlstream.h. As above
|
||||
"QXmlStreamNotationDeclarations", // e.g. qxmlstream.h. As above
|
||||
"QXmlStreamAttributes", // e.g. qxmlstream.h
|
||||
"LineLayout::ValidLevel", // ..
|
||||
"QtMsgType", // e.g. qdebug.h TODO Defined in qlogging.h, but omitted because it's predefined in qglobal.h, and our clangexec is too agressive
|
||||
"QTextStreamFunction", // e.g. qdebug.h
|
||||
"QFactoryInterface", // qfactoryinterface.h
|
||||
|
@ -110,6 +110,10 @@ func (p CppParameter) QtClassType() bool {
|
||||
return true
|
||||
}
|
||||
|
||||
if p.ParameterType == "Scintilla::Internal::Point" {
|
||||
return true
|
||||
}
|
||||
|
||||
if p.ParameterType == "QString" || p.ParameterType == "QByteArray" {
|
||||
return true
|
||||
}
|
||||
|
@ -7,6 +7,7 @@ import (
|
||||
"io/ioutil"
|
||||
"log"
|
||||
"os"
|
||||
"os/exec"
|
||||
"path/filepath"
|
||||
"runtime"
|
||||
"strings"
|
||||
@ -22,6 +23,10 @@ func importPathForQtPackage(packageName string) string {
|
||||
switch packageName {
|
||||
case "qt":
|
||||
return BaseModule + "/qt"
|
||||
case "qscintilla":
|
||||
return BaseModule + "/qt-restricted-extras/" + packageName
|
||||
case "scintillaedit":
|
||||
return BaseModule + "/qt-extras/" + packageName
|
||||
default:
|
||||
return BaseModule + "/qt/" + packageName
|
||||
}
|
||||
@ -87,9 +92,19 @@ func cleanGeneratedFilesInDir(dirpath string) {
|
||||
log.Printf("Removed %d file(s).", cleaned)
|
||||
}
|
||||
|
||||
func pkgConfigCflags(packageName string) string {
|
||||
stdout, err := exec.Command(`pkg-config`, `--cflags`, packageName).Output()
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
return string(stdout)
|
||||
}
|
||||
|
||||
func main() {
|
||||
clang := flag.String("clang", "clang", "Custom path to clang")
|
||||
outDir := flag.String("outdir", "../../", "Output directory for generated gen_** files")
|
||||
extraLibsDir := flag.String("extralibs", "/usr/local/src/", "Base directory to find extra library checkouts")
|
||||
|
||||
flag.Parse()
|
||||
|
||||
@ -101,9 +116,9 @@ func main() {
|
||||
"/usr/include/x86_64-linux-gnu/qt5/QtWidgets",
|
||||
},
|
||||
*clang,
|
||||
// pkg-config --cflags Qt5Widgets
|
||||
strings.Fields(`-DQT_WIDGETS_LIB -I/usr/include/x86_64-linux-gnu/qt5/QtWidgets -I/usr/include/x86_64-linux-gnu/qt5 -I/usr/include/x86_64-linux-gnu/qt5/QtCore -DQT_GUI_LIB -I/usr/include/x86_64-linux-gnu/qt5/QtGui -DQT_CORE_LIB`),
|
||||
strings.Fields(pkgConfigCflags("Qt5Widgets")),
|
||||
filepath.Join(*outDir, "qt"),
|
||||
ClangMatchSameHeaderDefinitionOnly,
|
||||
)
|
||||
|
||||
generate(
|
||||
@ -112,17 +127,45 @@ func main() {
|
||||
"/usr/include/x86_64-linux-gnu/qt5/QtPrintSupport",
|
||||
},
|
||||
*clang,
|
||||
// pkg-config --cflags Qt5PrintSupport
|
||||
strings.Fields(`-DQT_PRINTSUPPORT_LIB -I/usr/include/x86_64-linux-gnu/qt5/QtPrintSupport -I/usr/include/x86_64-linux-gnu/qt5 -I/usr/include/x86_64-linux-gnu/qt5/QtCore -I/usr/include/x86_64-linux-gnu/qt5/QtGui -DQT_WIDGETS_LIB -I/usr/include/x86_64-linux-gnu/qt5/QtWidgets -DQT_GUI_LIB -DQT_CORE_LIB`),
|
||||
strings.Fields(pkgConfigCflags("Qt5PrintSupport")),
|
||||
filepath.Join(*outDir, "qt/qprintsupport"),
|
||||
ClangMatchSameHeaderDefinitionOnly,
|
||||
)
|
||||
|
||||
// Depends on QtCore/Gui/Widgets, QPrintSupport
|
||||
generate(
|
||||
"qscintilla",
|
||||
[]string{
|
||||
"/usr/include/x86_64-linux-gnu/qt5/Qsci",
|
||||
},
|
||||
*clang,
|
||||
strings.Fields(pkgConfigCflags("Qt5PrintSupport")),
|
||||
filepath.Join(*outDir, "qt-restricted-extras/qscintilla"),
|
||||
ClangMatchSameHeaderDefinitionOnly,
|
||||
)
|
||||
|
||||
// Depends on QtCore/Gui/Widgets
|
||||
generate(
|
||||
"scintillaedit",
|
||||
[]string{
|
||||
filepath.Join(*extraLibsDir, "scintilla/qt/ScintillaEdit/ScintillaEdit.h"),
|
||||
},
|
||||
*clang,
|
||||
strings.Fields("--std=c++1z "+pkgConfigCflags("ScintillaEdit")),
|
||||
filepath.Join(*outDir, "qt-extras/scintillaedit"),
|
||||
(&clangMatchUnderPath{filepath.Join(*extraLibsDir, "scintilla")}).Match,
|
||||
)
|
||||
}
|
||||
|
||||
func generate(packageName string, srcDirs []string, clangBin string, cflags []string, outDir string) {
|
||||
func generate(packageName string, srcDirs []string, clangBin string, cflags []string, outDir string, matcher ClangMatcher) {
|
||||
|
||||
var includeFiles []string
|
||||
for _, srcDir := range srcDirs {
|
||||
includeFiles = append(includeFiles, findHeadersInDir(srcDir)...)
|
||||
if strings.HasSuffix(srcDir, `.h`) {
|
||||
includeFiles = append(includeFiles, srcDir) // single .h
|
||||
} else {
|
||||
includeFiles = append(includeFiles, findHeadersInDir(srcDir)...)
|
||||
}
|
||||
}
|
||||
|
||||
log.Printf("Found %d header files to process.", len(includeFiles))
|
||||
@ -140,7 +183,7 @@ func generate(packageName string, srcDirs []string, clangBin string, cflags []st
|
||||
// PASS 0 (Fill clang cache)
|
||||
//
|
||||
|
||||
generateClangCaches(includeFiles, clangBin, cflags)
|
||||
generateClangCaches(includeFiles, clangBin, cflags, matcher)
|
||||
|
||||
// The cache should now be fully populated.
|
||||
|
||||
@ -267,7 +310,7 @@ func generate(packageName string, srcDirs []string, clangBin string, cflags []st
|
||||
log.Printf("Processing %d file(s) completed", len(includeFiles))
|
||||
}
|
||||
|
||||
func generateClangCaches(includeFiles []string, clangBin string, cflags []string) {
|
||||
func generateClangCaches(includeFiles []string, clangBin string, cflags []string, matcher ClangMatcher) {
|
||||
|
||||
var clangChan = make(chan string, 0)
|
||||
var clangWg sync.WaitGroup
|
||||
@ -289,7 +332,7 @@ func generateClangCaches(includeFiles []string, clangBin string, cflags []string
|
||||
|
||||
// Parse the file
|
||||
// This seems to intermittently fail, so allow retrying
|
||||
astInner := mustClangExec(ctx, clangBin, inputHeader, cflags)
|
||||
astInner := mustClangExec(ctx, clangBin, inputHeader, cflags, matcher)
|
||||
|
||||
// Write to cache
|
||||
jb, err := json.MarshalIndent(astInner, "", "\t")
|
||||
|
@ -1,4 +1,33 @@
|
||||
FROM debian:bookworm
|
||||
|
||||
RUN DEBIAN_FRONTEND=noninteractive apt-get update && \
|
||||
apt-get install -qyy golang-go qtbase5-dev clang
|
||||
apt-get install --no-install-recommends -qyy \
|
||||
golang-go \
|
||||
qtbase5-dev \
|
||||
libqscintilla2-qt5-dev \
|
||||
clang \
|
||||
git \
|
||||
ca-certificates \
|
||||
pkg-config \
|
||||
build-essential && \
|
||||
apt-get clean
|
||||
|
||||
RUN mkdir -p /usr/local/src/scintilla && \
|
||||
git clone 'https://github.com/mirror/scintilla.git' /usr/local/src/scintilla && \
|
||||
git -C /usr/local/src/scintilla checkout rel-5-5-2
|
||||
|
||||
RUN \
|
||||
cd /usr/local/src/scintilla/qt/ScintillaEditBase && \
|
||||
qmake && \
|
||||
make && \
|
||||
cd /usr/local/src/scintilla/qt/ScintillaEdit && \
|
||||
python3 WidgetGen.py && \
|
||||
qmake && \
|
||||
make
|
||||
|
||||
RUN mkdir -p /usr/local/lib/pkgconfig
|
||||
|
||||
COPY pkg-config/QScintilla.pc.example /usr/local/lib/pkgconfig/QScintilla.pc
|
||||
COPY pkg-config/ScintillaEdit.pc.example /usr/local/lib/pkgconfig/ScintillaEdit.pc
|
||||
|
||||
ENV GOFLAGS=-buildvcs=false
|
||||
|
21
examples/libraries/extras-scintillaedit/main.go
Normal file
21
examples/libraries/extras-scintillaedit/main.go
Normal file
@ -0,0 +1,21 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"os"
|
||||
|
||||
"github.com/mappu/miqt/qt"
|
||||
"github.com/mappu/miqt/qt-extras/scintillaedit"
|
||||
)
|
||||
|
||||
// n.b. May need LD_LIBRARY_PATH= env var set to find the necessary .so file
|
||||
|
||||
func main() {
|
||||
|
||||
qt.NewQApplication(os.Args)
|
||||
|
||||
area := scintillaedit.NewScintillaEdit()
|
||||
area.SetFixedSize2(640, 480)
|
||||
area.Show()
|
||||
|
||||
qt.QApplication_Exec()
|
||||
}
|
BIN
examples/libraries/extras-scintillaedit/scintillaedit.png
Normal file
BIN
examples/libraries/extras-scintillaedit/scintillaedit.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 8.2 KiB |
19
examples/libraries/restricted-extras-qscintilla/main.go
Normal file
19
examples/libraries/restricted-extras-qscintilla/main.go
Normal file
@ -0,0 +1,19 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"os"
|
||||
|
||||
"github.com/mappu/miqt/qt"
|
||||
"github.com/mappu/miqt/qt-restricted-extras/qscintilla"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
||||
qt.NewQApplication(os.Args)
|
||||
|
||||
area := qscintilla.NewQsciScintilla()
|
||||
area.SetFixedSize2(640, 480)
|
||||
area.Show()
|
||||
|
||||
qt.QApplication_Exec()
|
||||
}
|
BIN
examples/libraries/restricted-extras-qscintilla/qscintilla.png
Normal file
BIN
examples/libraries/restricted-extras-qscintilla/qscintilla.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 8.7 KiB |
9
pkg-config/QScintilla.pc.example
Normal file
9
pkg-config/QScintilla.pc.example
Normal file
@ -0,0 +1,9 @@
|
||||
includedir=/usr/include/x86_64-linux-gnu/qt5/Qsci/
|
||||
|
||||
Name: QScintilla
|
||||
Description: Qt5 port of the Scintilla source code editing widget
|
||||
URL: http://www.riverbankcomputing.co.uk/software/qscintilla
|
||||
Version: 2.13.3
|
||||
Requires: Qt5Widgets, Qt5PrintSupport
|
||||
Libs: -lqscintilla2_qt5
|
||||
Cflags: -I${includedir}
|
27
pkg-config/README.md
Normal file
27
pkg-config/README.md
Normal file
@ -0,0 +1,27 @@
|
||||
# pkg-config
|
||||
|
||||
MIQT always uses [pkg-config](https://people.freedesktop.org/~dbn/pkg-config-guide.html) to find C++ libraries to bind to.
|
||||
|
||||
For Qt Widgets, the `.pc` definition is supplied along with Qt, but for other third-party libraries, definitions might not be present. To use such third-party libraries, one option is to set the `CGO_CFLAGS`, `CGO_CXXFLAGS`, `CGO_LDFLAGS` environment variables for `go build`. However, this has a global effect and may cause issues if you use multiple libraries. Therefore, another option is to create a pkg-config file.
|
||||
|
||||
To specify the CFLAGS/CXXFLAGS and LDFLAGS for a specific library, make a `MyLibrary.pc` file as follows:
|
||||
|
||||
```pkgconfig
|
||||
Name: My Library
|
||||
Libs: -lfoo
|
||||
Cflags: -I/path/
|
||||
```
|
||||
|
||||
Then run `PKG_CONFIG_PATH=/path/to/dir/ go build` so CGO will find your library. Then, the necessary flags for your system will be used only as required for the specific package.
|
||||
|
||||
The `PKG_CONFIG_PATH` environment variable is understood both by CGO and by genbindings.
|
||||
|
||||
## Further reading
|
||||
|
||||
- [Guide to pkg-config](https://people.freedesktop.org/~dbn/pkg-config-guide.html)
|
||||
|
||||
```bash
|
||||
# Find where pkg-config looks for system libraries
|
||||
$ pkg-config --variable pc_path pkg-config
|
||||
/usr/local/lib/x86_64-linux-gnu/pkgconfig:/usr/local/lib/pkgconfig:/usr/local/share/pkgconfig:/usr/lib/x86_64-linux-gnu/pkgconfig:/usr/lib/pkgconfig:/usr/share/pkgconfig
|
||||
```
|
9
pkg-config/ScintillaEdit.pc.example
Normal file
9
pkg-config/ScintillaEdit.pc.example
Normal file
@ -0,0 +1,9 @@
|
||||
srcdir=/usr/local/src/scintilla/
|
||||
|
||||
Name: ScintillaEdit
|
||||
Description: Scintilla's own upstream Qt port
|
||||
URL: https://www.scintilla.org/
|
||||
Version: 5.5.2
|
||||
Requires: Qt5Widgets
|
||||
Libs: -L${srcdir}/bin -lScintillaEdit
|
||||
Cflags: -include stdint.h -I${srcdir}/qt/ScintillaEdit -I${srcdir}/qt/ScintillaEditBase -I${srcdir}/include -I${srcdir}/src
|
7
qt-extras/README.md
Normal file
7
qt-extras/README.md
Normal file
@ -0,0 +1,7 @@
|
||||
# MIQT Extras
|
||||
|
||||
This directory contains bindings to third-party Qt libraries.
|
||||
|
||||
|Library|License
|
||||
|---|---
|
||||
|[ScintillaEdit](https://www.scintilla.org/)|MIT
|
8
qt-extras/scintillaedit/cflags.go
Normal file
8
qt-extras/scintillaedit/cflags.go
Normal file
@ -0,0 +1,8 @@
|
||||
package scintillaedit
|
||||
|
||||
/*
|
||||
#cgo CFLAGS:
|
||||
#cgo CXXFLAGS: --std=c++1z
|
||||
#cgo pkg-config: ScintillaEdit
|
||||
*/
|
||||
import "C"
|
5598
qt-extras/scintillaedit/gen_ScintillaEdit.cpp
Normal file
5598
qt-extras/scintillaedit/gen_ScintillaEdit.cpp
Normal file
File diff suppressed because it is too large
Load Diff
9336
qt-extras/scintillaedit/gen_ScintillaEdit.go
Normal file
9336
qt-extras/scintillaedit/gen_ScintillaEdit.go
Normal file
File diff suppressed because it is too large
Load Diff
1492
qt-extras/scintillaedit/gen_ScintillaEdit.h
Normal file
1492
qt-extras/scintillaedit/gen_ScintillaEdit.h
Normal file
File diff suppressed because it is too large
Load Diff
7
qt-restricted-extras/README.md
Normal file
7
qt-restricted-extras/README.md
Normal file
@ -0,0 +1,7 @@
|
||||
# MIQT Restricted Extras
|
||||
|
||||
This directory contains bindings to Qt libraries that use more restrictive licenses than permissive or LGPL. Care should be taken when evaluating these libraries.
|
||||
|
||||
|Library|License
|
||||
|---|---
|
||||
|[QScintilla](https://riverbankcomputing.com/software/qscintilla)|GPL/Commercial
|
8
qt-restricted-extras/qscintilla/cflags.go
Normal file
8
qt-restricted-extras/qscintilla/cflags.go
Normal file
@ -0,0 +1,8 @@
|
||||
package qscintilla
|
||||
|
||||
/*
|
||||
#cgo CFLAGS:
|
||||
#cgo CXXFLAGS: -std=c++17
|
||||
#cgo pkg-config: QScintilla
|
||||
*/
|
||||
import "C"
|
147
qt-restricted-extras/qscintilla/gen_qsciabstractapis.cpp
Normal file
147
qt-restricted-extras/qscintilla/gen_qsciabstractapis.cpp
Normal file
@ -0,0 +1,147 @@
|
||||
#include <QList>
|
||||
#include <QMetaObject>
|
||||
#include <QString>
|
||||
#include <QByteArray>
|
||||
#include <cstring>
|
||||
#include <qsciabstractapis.h>
|
||||
#include "gen_qsciabstractapis.h"
|
||||
#include "_cgo_export.h"
|
||||
|
||||
QMetaObject* QsciAbstractAPIs_MetaObject(const QsciAbstractAPIs* self) {
|
||||
return (QMetaObject*) self->metaObject();
|
||||
}
|
||||
|
||||
void* QsciAbstractAPIs_Metacast(QsciAbstractAPIs* self, const char* param1) {
|
||||
return self->qt_metacast(param1);
|
||||
}
|
||||
|
||||
struct miqt_string QsciAbstractAPIs_Tr(const char* s) {
|
||||
QString _ret = QsciAbstractAPIs::tr(s);
|
||||
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
||||
QByteArray _b = _ret.toUtf8();
|
||||
struct miqt_string _ms;
|
||||
_ms.len = _b.length();
|
||||
_ms.data = static_cast<char*>(malloc(_ms.len));
|
||||
memcpy(_ms.data, _b.data(), _ms.len);
|
||||
return _ms;
|
||||
}
|
||||
|
||||
struct miqt_string QsciAbstractAPIs_TrUtf8(const char* s) {
|
||||
QString _ret = QsciAbstractAPIs::trUtf8(s);
|
||||
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
||||
QByteArray _b = _ret.toUtf8();
|
||||
struct miqt_string _ms;
|
||||
_ms.len = _b.length();
|
||||
_ms.data = static_cast<char*>(malloc(_ms.len));
|
||||
memcpy(_ms.data, _b.data(), _ms.len);
|
||||
return _ms;
|
||||
}
|
||||
|
||||
QsciLexer* QsciAbstractAPIs_Lexer(const QsciAbstractAPIs* self) {
|
||||
return self->lexer();
|
||||
}
|
||||
|
||||
void QsciAbstractAPIs_UpdateAutoCompletionList(QsciAbstractAPIs* self, struct miqt_array* /* of struct miqt_string */ context, struct miqt_array* /* of struct miqt_string */ list) {
|
||||
QStringList context_QList;
|
||||
context_QList.reserve(context->len);
|
||||
struct miqt_string* context_arr = static_cast<struct miqt_string*>(context->data);
|
||||
for(size_t i = 0; i < context->len; ++i) {
|
||||
QString context_arr_i_QString = QString::fromUtf8(context_arr[i].data, context_arr[i].len);
|
||||
context_QList.push_back(context_arr_i_QString);
|
||||
}
|
||||
QStringList list_QList;
|
||||
list_QList.reserve(list->len);
|
||||
struct miqt_string* list_arr = static_cast<struct miqt_string*>(list->data);
|
||||
for(size_t i = 0; i < list->len; ++i) {
|
||||
QString list_arr_i_QString = QString::fromUtf8(list_arr[i].data, list_arr[i].len);
|
||||
list_QList.push_back(list_arr_i_QString);
|
||||
}
|
||||
self->updateAutoCompletionList(context_QList, list_QList);
|
||||
}
|
||||
|
||||
void QsciAbstractAPIs_AutoCompletionSelected(QsciAbstractAPIs* self, struct miqt_string selection) {
|
||||
QString selection_QString = QString::fromUtf8(selection.data, selection.len);
|
||||
self->autoCompletionSelected(selection_QString);
|
||||
}
|
||||
|
||||
struct miqt_array* QsciAbstractAPIs_CallTips(QsciAbstractAPIs* self, struct miqt_array* /* of struct miqt_string */ context, int commas, int style, struct miqt_array* /* of int */ shifts) {
|
||||
QStringList context_QList;
|
||||
context_QList.reserve(context->len);
|
||||
struct miqt_string* context_arr = static_cast<struct miqt_string*>(context->data);
|
||||
for(size_t i = 0; i < context->len; ++i) {
|
||||
QString context_arr_i_QString = QString::fromUtf8(context_arr[i].data, context_arr[i].len);
|
||||
context_QList.push_back(context_arr_i_QString);
|
||||
}
|
||||
QList<int> shifts_QList;
|
||||
shifts_QList.reserve(shifts->len);
|
||||
int* shifts_arr = static_cast<int*>(shifts->data);
|
||||
for(size_t i = 0; i < shifts->len; ++i) {
|
||||
shifts_QList.push_back(static_cast<int>(shifts_arr[i]));
|
||||
}
|
||||
QStringList _ret = self->callTips(context_QList, static_cast<int>(commas), static_cast<QsciScintilla::CallTipsStyle>(style), shifts_QList);
|
||||
// Convert QList<> from C++ memory to manually-managed C memory
|
||||
struct miqt_string* _arr = static_cast<struct miqt_string*>(malloc(sizeof(struct miqt_string) * _ret.length()));
|
||||
for (size_t i = 0, e = _ret.length(); i < e; ++i) {
|
||||
QString _lv_ret = _ret[i];
|
||||
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
||||
QByteArray _lv_b = _lv_ret.toUtf8();
|
||||
struct miqt_string _lv_ms;
|
||||
_lv_ms.len = _lv_b.length();
|
||||
_lv_ms.data = static_cast<char*>(malloc(_lv_ms.len));
|
||||
memcpy(_lv_ms.data, _lv_b.data(), _lv_ms.len);
|
||||
_arr[i] = _lv_ms;
|
||||
}
|
||||
struct miqt_array* _out = static_cast<struct miqt_array*>(malloc(sizeof(struct miqt_array)));
|
||||
_out->len = _ret.length();
|
||||
_out->data = static_cast<void*>(_arr);
|
||||
return _out;
|
||||
}
|
||||
|
||||
struct miqt_string QsciAbstractAPIs_Tr2(const char* s, const char* c) {
|
||||
QString _ret = QsciAbstractAPIs::tr(s, c);
|
||||
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
||||
QByteArray _b = _ret.toUtf8();
|
||||
struct miqt_string _ms;
|
||||
_ms.len = _b.length();
|
||||
_ms.data = static_cast<char*>(malloc(_ms.len));
|
||||
memcpy(_ms.data, _b.data(), _ms.len);
|
||||
return _ms;
|
||||
}
|
||||
|
||||
struct miqt_string QsciAbstractAPIs_Tr3(const char* s, const char* c, int n) {
|
||||
QString _ret = QsciAbstractAPIs::tr(s, c, static_cast<int>(n));
|
||||
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
||||
QByteArray _b = _ret.toUtf8();
|
||||
struct miqt_string _ms;
|
||||
_ms.len = _b.length();
|
||||
_ms.data = static_cast<char*>(malloc(_ms.len));
|
||||
memcpy(_ms.data, _b.data(), _ms.len);
|
||||
return _ms;
|
||||
}
|
||||
|
||||
struct miqt_string QsciAbstractAPIs_TrUtf82(const char* s, const char* c) {
|
||||
QString _ret = QsciAbstractAPIs::trUtf8(s, c);
|
||||
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
||||
QByteArray _b = _ret.toUtf8();
|
||||
struct miqt_string _ms;
|
||||
_ms.len = _b.length();
|
||||
_ms.data = static_cast<char*>(malloc(_ms.len));
|
||||
memcpy(_ms.data, _b.data(), _ms.len);
|
||||
return _ms;
|
||||
}
|
||||
|
||||
struct miqt_string QsciAbstractAPIs_TrUtf83(const char* s, const char* c, int n) {
|
||||
QString _ret = QsciAbstractAPIs::trUtf8(s, c, static_cast<int>(n));
|
||||
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
||||
QByteArray _b = _ret.toUtf8();
|
||||
struct miqt_string _ms;
|
||||
_ms.len = _b.length();
|
||||
_ms.data = static_cast<char*>(malloc(_ms.len));
|
||||
memcpy(_ms.data, _b.data(), _ms.len);
|
||||
return _ms;
|
||||
}
|
||||
|
||||
void QsciAbstractAPIs_Delete(QsciAbstractAPIs* self) {
|
||||
delete self;
|
||||
}
|
||||
|
205
qt-restricted-extras/qscintilla/gen_qsciabstractapis.go
Normal file
205
qt-restricted-extras/qscintilla/gen_qsciabstractapis.go
Normal file
@ -0,0 +1,205 @@
|
||||
package qscintilla
|
||||
|
||||
/*
|
||||
|
||||
#include "gen_qsciabstractapis.h"
|
||||
#include <stdlib.h>
|
||||
|
||||
*/
|
||||
import "C"
|
||||
|
||||
import (
|
||||
"github.com/mappu/miqt/qt"
|
||||
"runtime"
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
type QsciAbstractAPIs struct {
|
||||
h *C.QsciAbstractAPIs
|
||||
*qt.QObject
|
||||
}
|
||||
|
||||
func (this *QsciAbstractAPIs) cPointer() *C.QsciAbstractAPIs {
|
||||
if this == nil {
|
||||
return nil
|
||||
}
|
||||
return this.h
|
||||
}
|
||||
|
||||
func (this *QsciAbstractAPIs) UnsafePointer() unsafe.Pointer {
|
||||
if this == nil {
|
||||
return nil
|
||||
}
|
||||
return unsafe.Pointer(this.h)
|
||||
}
|
||||
|
||||
func newQsciAbstractAPIs(h *C.QsciAbstractAPIs) *QsciAbstractAPIs {
|
||||
if h == nil {
|
||||
return nil
|
||||
}
|
||||
return &QsciAbstractAPIs{h: h, QObject: qt.UnsafeNewQObject(unsafe.Pointer(h))}
|
||||
}
|
||||
|
||||
func UnsafeNewQsciAbstractAPIs(h unsafe.Pointer) *QsciAbstractAPIs {
|
||||
return newQsciAbstractAPIs((*C.QsciAbstractAPIs)(h))
|
||||
}
|
||||
|
||||
func (this *QsciAbstractAPIs) MetaObject() *qt.QMetaObject {
|
||||
return qt.UnsafeNewQMetaObject(unsafe.Pointer(C.QsciAbstractAPIs_MetaObject(this.h)))
|
||||
}
|
||||
|
||||
func (this *QsciAbstractAPIs) Metacast(param1 string) unsafe.Pointer {
|
||||
param1_Cstring := C.CString(param1)
|
||||
defer C.free(unsafe.Pointer(param1_Cstring))
|
||||
return (unsafe.Pointer)(C.QsciAbstractAPIs_Metacast(this.h, param1_Cstring))
|
||||
}
|
||||
|
||||
func QsciAbstractAPIs_Tr(s string) string {
|
||||
s_Cstring := C.CString(s)
|
||||
defer C.free(unsafe.Pointer(s_Cstring))
|
||||
var _ms C.struct_miqt_string = C.QsciAbstractAPIs_Tr(s_Cstring)
|
||||
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
||||
C.free(unsafe.Pointer(_ms.data))
|
||||
return _ret
|
||||
}
|
||||
|
||||
func QsciAbstractAPIs_TrUtf8(s string) string {
|
||||
s_Cstring := C.CString(s)
|
||||
defer C.free(unsafe.Pointer(s_Cstring))
|
||||
var _ms C.struct_miqt_string = C.QsciAbstractAPIs_TrUtf8(s_Cstring)
|
||||
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
||||
C.free(unsafe.Pointer(_ms.data))
|
||||
return _ret
|
||||
}
|
||||
|
||||
func (this *QsciAbstractAPIs) Lexer() *QsciLexer {
|
||||
return UnsafeNewQsciLexer(unsafe.Pointer(C.QsciAbstractAPIs_Lexer(this.h)))
|
||||
}
|
||||
|
||||
func (this *QsciAbstractAPIs) UpdateAutoCompletionList(context []string, list []string) {
|
||||
// For the C ABI, malloc a C array of structs
|
||||
context_CArray := (*[0xffff]C.struct_miqt_string)(C.malloc(C.size_t(int(unsafe.Sizeof(C.struct_miqt_string{})) * len(context))))
|
||||
defer C.free(unsafe.Pointer(context_CArray))
|
||||
for i := range context {
|
||||
context_i_ms := C.struct_miqt_string{}
|
||||
context_i_ms.data = C.CString(context[i])
|
||||
context_i_ms.len = C.size_t(len(context[i]))
|
||||
defer C.free(unsafe.Pointer(context_i_ms.data))
|
||||
context_CArray[i] = context_i_ms
|
||||
}
|
||||
context_ma := &C.struct_miqt_array{len: C.size_t(len(context)), data: unsafe.Pointer(context_CArray)}
|
||||
defer runtime.KeepAlive(unsafe.Pointer(context_ma))
|
||||
// For the C ABI, malloc a C array of structs
|
||||
list_CArray := (*[0xffff]C.struct_miqt_string)(C.malloc(C.size_t(int(unsafe.Sizeof(C.struct_miqt_string{})) * len(list))))
|
||||
defer C.free(unsafe.Pointer(list_CArray))
|
||||
for i := range list {
|
||||
list_i_ms := C.struct_miqt_string{}
|
||||
list_i_ms.data = C.CString(list[i])
|
||||
list_i_ms.len = C.size_t(len(list[i]))
|
||||
defer C.free(unsafe.Pointer(list_i_ms.data))
|
||||
list_CArray[i] = list_i_ms
|
||||
}
|
||||
list_ma := &C.struct_miqt_array{len: C.size_t(len(list)), data: unsafe.Pointer(list_CArray)}
|
||||
defer runtime.KeepAlive(unsafe.Pointer(list_ma))
|
||||
C.QsciAbstractAPIs_UpdateAutoCompletionList(this.h, context_ma, list_ma)
|
||||
}
|
||||
|
||||
func (this *QsciAbstractAPIs) AutoCompletionSelected(selection string) {
|
||||
selection_ms := C.struct_miqt_string{}
|
||||
selection_ms.data = C.CString(selection)
|
||||
selection_ms.len = C.size_t(len(selection))
|
||||
defer C.free(unsafe.Pointer(selection_ms.data))
|
||||
C.QsciAbstractAPIs_AutoCompletionSelected(this.h, selection_ms)
|
||||
}
|
||||
|
||||
func (this *QsciAbstractAPIs) CallTips(context []string, commas int, style QsciScintilla__CallTipsStyle, shifts []int) []string {
|
||||
// For the C ABI, malloc a C array of structs
|
||||
context_CArray := (*[0xffff]C.struct_miqt_string)(C.malloc(C.size_t(int(unsafe.Sizeof(C.struct_miqt_string{})) * len(context))))
|
||||
defer C.free(unsafe.Pointer(context_CArray))
|
||||
for i := range context {
|
||||
context_i_ms := C.struct_miqt_string{}
|
||||
context_i_ms.data = C.CString(context[i])
|
||||
context_i_ms.len = C.size_t(len(context[i]))
|
||||
defer C.free(unsafe.Pointer(context_i_ms.data))
|
||||
context_CArray[i] = context_i_ms
|
||||
}
|
||||
context_ma := &C.struct_miqt_array{len: C.size_t(len(context)), data: unsafe.Pointer(context_CArray)}
|
||||
defer runtime.KeepAlive(unsafe.Pointer(context_ma))
|
||||
// For the C ABI, malloc a C array of raw pointers
|
||||
shifts_CArray := (*[0xffff]C.int)(C.malloc(C.size_t(8 * len(shifts))))
|
||||
defer C.free(unsafe.Pointer(shifts_CArray))
|
||||
for i := range shifts {
|
||||
shifts_CArray[i] = (C.int)(shifts[i])
|
||||
}
|
||||
shifts_ma := &C.struct_miqt_array{len: C.size_t(len(shifts)), data: unsafe.Pointer(shifts_CArray)}
|
||||
defer runtime.KeepAlive(unsafe.Pointer(shifts_ma))
|
||||
var _ma *C.struct_miqt_array = C.QsciAbstractAPIs_CallTips(this.h, context_ma, (C.int)(commas), (C.int)(style), shifts_ma)
|
||||
_ret := make([]string, int(_ma.len))
|
||||
_outCast := (*[0xffff]C.struct_miqt_string)(unsafe.Pointer(_ma.data)) // hey ya
|
||||
for i := 0; i < int(_ma.len); i++ {
|
||||
var _lv_ms C.struct_miqt_string = _outCast[i]
|
||||
_lv_ret := C.GoStringN(_lv_ms.data, C.int(int64(_lv_ms.len)))
|
||||
C.free(unsafe.Pointer(_lv_ms.data))
|
||||
_ret[i] = _lv_ret
|
||||
}
|
||||
C.free(unsafe.Pointer(_ma))
|
||||
return _ret
|
||||
}
|
||||
|
||||
func QsciAbstractAPIs_Tr2(s string, c string) string {
|
||||
s_Cstring := C.CString(s)
|
||||
defer C.free(unsafe.Pointer(s_Cstring))
|
||||
c_Cstring := C.CString(c)
|
||||
defer C.free(unsafe.Pointer(c_Cstring))
|
||||
var _ms C.struct_miqt_string = C.QsciAbstractAPIs_Tr2(s_Cstring, c_Cstring)
|
||||
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
||||
C.free(unsafe.Pointer(_ms.data))
|
||||
return _ret
|
||||
}
|
||||
|
||||
func QsciAbstractAPIs_Tr3(s string, c string, n int) string {
|
||||
s_Cstring := C.CString(s)
|
||||
defer C.free(unsafe.Pointer(s_Cstring))
|
||||
c_Cstring := C.CString(c)
|
||||
defer C.free(unsafe.Pointer(c_Cstring))
|
||||
var _ms C.struct_miqt_string = C.QsciAbstractAPIs_Tr3(s_Cstring, c_Cstring, (C.int)(n))
|
||||
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
||||
C.free(unsafe.Pointer(_ms.data))
|
||||
return _ret
|
||||
}
|
||||
|
||||
func QsciAbstractAPIs_TrUtf82(s string, c string) string {
|
||||
s_Cstring := C.CString(s)
|
||||
defer C.free(unsafe.Pointer(s_Cstring))
|
||||
c_Cstring := C.CString(c)
|
||||
defer C.free(unsafe.Pointer(c_Cstring))
|
||||
var _ms C.struct_miqt_string = C.QsciAbstractAPIs_TrUtf82(s_Cstring, c_Cstring)
|
||||
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
||||
C.free(unsafe.Pointer(_ms.data))
|
||||
return _ret
|
||||
}
|
||||
|
||||
func QsciAbstractAPIs_TrUtf83(s string, c string, n int) string {
|
||||
s_Cstring := C.CString(s)
|
||||
defer C.free(unsafe.Pointer(s_Cstring))
|
||||
c_Cstring := C.CString(c)
|
||||
defer C.free(unsafe.Pointer(c_Cstring))
|
||||
var _ms C.struct_miqt_string = C.QsciAbstractAPIs_TrUtf83(s_Cstring, c_Cstring, (C.int)(n))
|
||||
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
||||
C.free(unsafe.Pointer(_ms.data))
|
||||
return _ret
|
||||
}
|
||||
|
||||
// Delete this object from C++ memory.
|
||||
func (this *QsciAbstractAPIs) Delete() {
|
||||
C.QsciAbstractAPIs_Delete(this.h)
|
||||
}
|
||||
|
||||
// GoGC adds a Go Finalizer to this pointer, so that it will be deleted
|
||||
// from C++ memory once it is unreachable from Go memory.
|
||||
func (this *QsciAbstractAPIs) GoGC() {
|
||||
runtime.SetFinalizer(this, func(this *QsciAbstractAPIs) {
|
||||
this.Delete()
|
||||
runtime.KeepAlive(this.h)
|
||||
})
|
||||
}
|
44
qt-restricted-extras/qscintilla/gen_qsciabstractapis.h
Normal file
44
qt-restricted-extras/qscintilla/gen_qsciabstractapis.h
Normal file
@ -0,0 +1,44 @@
|
||||
#ifndef GEN_QSCIABSTRACTAPIS_H
|
||||
#define GEN_QSCIABSTRACTAPIS_H
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||
|
||||
#include "../../libmiqt/libmiqt.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
class QMetaObject;
|
||||
class QsciAbstractAPIs;
|
||||
class QsciLexer;
|
||||
#else
|
||||
typedef struct QMetaObject QMetaObject;
|
||||
typedef struct QsciAbstractAPIs QsciAbstractAPIs;
|
||||
typedef struct QsciLexer QsciLexer;
|
||||
#endif
|
||||
|
||||
QMetaObject* QsciAbstractAPIs_MetaObject(const QsciAbstractAPIs* self);
|
||||
void* QsciAbstractAPIs_Metacast(QsciAbstractAPIs* self, const char* param1);
|
||||
struct miqt_string QsciAbstractAPIs_Tr(const char* s);
|
||||
struct miqt_string QsciAbstractAPIs_TrUtf8(const char* s);
|
||||
QsciLexer* QsciAbstractAPIs_Lexer(const QsciAbstractAPIs* self);
|
||||
void QsciAbstractAPIs_UpdateAutoCompletionList(QsciAbstractAPIs* self, struct miqt_array* /* of struct miqt_string */ context, struct miqt_array* /* of struct miqt_string */ list);
|
||||
void QsciAbstractAPIs_AutoCompletionSelected(QsciAbstractAPIs* self, struct miqt_string selection);
|
||||
struct miqt_array* QsciAbstractAPIs_CallTips(QsciAbstractAPIs* self, struct miqt_array* /* of struct miqt_string */ context, int commas, int style, struct miqt_array* /* of int */ shifts);
|
||||
struct miqt_string QsciAbstractAPIs_Tr2(const char* s, const char* c);
|
||||
struct miqt_string QsciAbstractAPIs_Tr3(const char* s, const char* c, int n);
|
||||
struct miqt_string QsciAbstractAPIs_TrUtf82(const char* s, const char* c);
|
||||
struct miqt_string QsciAbstractAPIs_TrUtf83(const char* s, const char* c, int n);
|
||||
void QsciAbstractAPIs_Delete(QsciAbstractAPIs* self);
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern C */
|
||||
#endif
|
||||
|
||||
#endif
|
267
qt-restricted-extras/qscintilla/gen_qsciapis.cpp
Normal file
267
qt-restricted-extras/qscintilla/gen_qsciapis.cpp
Normal file
@ -0,0 +1,267 @@
|
||||
#include <QEvent>
|
||||
#include <QList>
|
||||
#include <QMetaObject>
|
||||
#include <QString>
|
||||
#include <QByteArray>
|
||||
#include <cstring>
|
||||
#include <qsciapis.h>
|
||||
#include "gen_qsciapis.h"
|
||||
#include "_cgo_export.h"
|
||||
|
||||
QsciAPIs* QsciAPIs_new(QsciLexer* lexer) {
|
||||
return new QsciAPIs(lexer);
|
||||
}
|
||||
|
||||
QMetaObject* QsciAPIs_MetaObject(const QsciAPIs* self) {
|
||||
return (QMetaObject*) self->metaObject();
|
||||
}
|
||||
|
||||
void* QsciAPIs_Metacast(QsciAPIs* self, const char* param1) {
|
||||
return self->qt_metacast(param1);
|
||||
}
|
||||
|
||||
struct miqt_string QsciAPIs_Tr(const char* s) {
|
||||
QString _ret = QsciAPIs::tr(s);
|
||||
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
||||
QByteArray _b = _ret.toUtf8();
|
||||
struct miqt_string _ms;
|
||||
_ms.len = _b.length();
|
||||
_ms.data = static_cast<char*>(malloc(_ms.len));
|
||||
memcpy(_ms.data, _b.data(), _ms.len);
|
||||
return _ms;
|
||||
}
|
||||
|
||||
struct miqt_string QsciAPIs_TrUtf8(const char* s) {
|
||||
QString _ret = QsciAPIs::trUtf8(s);
|
||||
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
||||
QByteArray _b = _ret.toUtf8();
|
||||
struct miqt_string _ms;
|
||||
_ms.len = _b.length();
|
||||
_ms.data = static_cast<char*>(malloc(_ms.len));
|
||||
memcpy(_ms.data, _b.data(), _ms.len);
|
||||
return _ms;
|
||||
}
|
||||
|
||||
void QsciAPIs_Add(QsciAPIs* self, struct miqt_string entry) {
|
||||
QString entry_QString = QString::fromUtf8(entry.data, entry.len);
|
||||
self->add(entry_QString);
|
||||
}
|
||||
|
||||
void QsciAPIs_Clear(QsciAPIs* self) {
|
||||
self->clear();
|
||||
}
|
||||
|
||||
bool QsciAPIs_Load(QsciAPIs* self, struct miqt_string filename) {
|
||||
QString filename_QString = QString::fromUtf8(filename.data, filename.len);
|
||||
return self->load(filename_QString);
|
||||
}
|
||||
|
||||
void QsciAPIs_Remove(QsciAPIs* self, struct miqt_string entry) {
|
||||
QString entry_QString = QString::fromUtf8(entry.data, entry.len);
|
||||
self->remove(entry_QString);
|
||||
}
|
||||
|
||||
void QsciAPIs_Prepare(QsciAPIs* self) {
|
||||
self->prepare();
|
||||
}
|
||||
|
||||
void QsciAPIs_CancelPreparation(QsciAPIs* self) {
|
||||
self->cancelPreparation();
|
||||
}
|
||||
|
||||
struct miqt_string QsciAPIs_DefaultPreparedName(const QsciAPIs* self) {
|
||||
QString _ret = self->defaultPreparedName();
|
||||
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
||||
QByteArray _b = _ret.toUtf8();
|
||||
struct miqt_string _ms;
|
||||
_ms.len = _b.length();
|
||||
_ms.data = static_cast<char*>(malloc(_ms.len));
|
||||
memcpy(_ms.data, _b.data(), _ms.len);
|
||||
return _ms;
|
||||
}
|
||||
|
||||
bool QsciAPIs_IsPrepared(const QsciAPIs* self) {
|
||||
return self->isPrepared();
|
||||
}
|
||||
|
||||
bool QsciAPIs_LoadPrepared(QsciAPIs* self) {
|
||||
return self->loadPrepared();
|
||||
}
|
||||
|
||||
bool QsciAPIs_SavePrepared(const QsciAPIs* self) {
|
||||
return self->savePrepared();
|
||||
}
|
||||
|
||||
void QsciAPIs_UpdateAutoCompletionList(QsciAPIs* self, struct miqt_array* /* of struct miqt_string */ context, struct miqt_array* /* of struct miqt_string */ list) {
|
||||
QStringList context_QList;
|
||||
context_QList.reserve(context->len);
|
||||
struct miqt_string* context_arr = static_cast<struct miqt_string*>(context->data);
|
||||
for(size_t i = 0; i < context->len; ++i) {
|
||||
QString context_arr_i_QString = QString::fromUtf8(context_arr[i].data, context_arr[i].len);
|
||||
context_QList.push_back(context_arr_i_QString);
|
||||
}
|
||||
QStringList list_QList;
|
||||
list_QList.reserve(list->len);
|
||||
struct miqt_string* list_arr = static_cast<struct miqt_string*>(list->data);
|
||||
for(size_t i = 0; i < list->len; ++i) {
|
||||
QString list_arr_i_QString = QString::fromUtf8(list_arr[i].data, list_arr[i].len);
|
||||
list_QList.push_back(list_arr_i_QString);
|
||||
}
|
||||
self->updateAutoCompletionList(context_QList, list_QList);
|
||||
}
|
||||
|
||||
void QsciAPIs_AutoCompletionSelected(QsciAPIs* self, struct miqt_string sel) {
|
||||
QString sel_QString = QString::fromUtf8(sel.data, sel.len);
|
||||
self->autoCompletionSelected(sel_QString);
|
||||
}
|
||||
|
||||
struct miqt_array* QsciAPIs_CallTips(QsciAPIs* self, struct miqt_array* /* of struct miqt_string */ context, int commas, int style, struct miqt_array* /* of int */ shifts) {
|
||||
QStringList context_QList;
|
||||
context_QList.reserve(context->len);
|
||||
struct miqt_string* context_arr = static_cast<struct miqt_string*>(context->data);
|
||||
for(size_t i = 0; i < context->len; ++i) {
|
||||
QString context_arr_i_QString = QString::fromUtf8(context_arr[i].data, context_arr[i].len);
|
||||
context_QList.push_back(context_arr_i_QString);
|
||||
}
|
||||
QList<int> shifts_QList;
|
||||
shifts_QList.reserve(shifts->len);
|
||||
int* shifts_arr = static_cast<int*>(shifts->data);
|
||||
for(size_t i = 0; i < shifts->len; ++i) {
|
||||
shifts_QList.push_back(static_cast<int>(shifts_arr[i]));
|
||||
}
|
||||
QStringList _ret = self->callTips(context_QList, static_cast<int>(commas), static_cast<QsciScintilla::CallTipsStyle>(style), shifts_QList);
|
||||
// Convert QList<> from C++ memory to manually-managed C memory
|
||||
struct miqt_string* _arr = static_cast<struct miqt_string*>(malloc(sizeof(struct miqt_string) * _ret.length()));
|
||||
for (size_t i = 0, e = _ret.length(); i < e; ++i) {
|
||||
QString _lv_ret = _ret[i];
|
||||
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
||||
QByteArray _lv_b = _lv_ret.toUtf8();
|
||||
struct miqt_string _lv_ms;
|
||||
_lv_ms.len = _lv_b.length();
|
||||
_lv_ms.data = static_cast<char*>(malloc(_lv_ms.len));
|
||||
memcpy(_lv_ms.data, _lv_b.data(), _lv_ms.len);
|
||||
_arr[i] = _lv_ms;
|
||||
}
|
||||
struct miqt_array* _out = static_cast<struct miqt_array*>(malloc(sizeof(struct miqt_array)));
|
||||
_out->len = _ret.length();
|
||||
_out->data = static_cast<void*>(_arr);
|
||||
return _out;
|
||||
}
|
||||
|
||||
bool QsciAPIs_Event(QsciAPIs* self, QEvent* e) {
|
||||
return self->event(e);
|
||||
}
|
||||
|
||||
struct miqt_array* QsciAPIs_InstalledAPIFiles(const QsciAPIs* self) {
|
||||
QStringList _ret = self->installedAPIFiles();
|
||||
// Convert QList<> from C++ memory to manually-managed C memory
|
||||
struct miqt_string* _arr = static_cast<struct miqt_string*>(malloc(sizeof(struct miqt_string) * _ret.length()));
|
||||
for (size_t i = 0, e = _ret.length(); i < e; ++i) {
|
||||
QString _lv_ret = _ret[i];
|
||||
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
||||
QByteArray _lv_b = _lv_ret.toUtf8();
|
||||
struct miqt_string _lv_ms;
|
||||
_lv_ms.len = _lv_b.length();
|
||||
_lv_ms.data = static_cast<char*>(malloc(_lv_ms.len));
|
||||
memcpy(_lv_ms.data, _lv_b.data(), _lv_ms.len);
|
||||
_arr[i] = _lv_ms;
|
||||
}
|
||||
struct miqt_array* _out = static_cast<struct miqt_array*>(malloc(sizeof(struct miqt_array)));
|
||||
_out->len = _ret.length();
|
||||
_out->data = static_cast<void*>(_arr);
|
||||
return _out;
|
||||
}
|
||||
|
||||
void QsciAPIs_ApiPreparationCancelled(QsciAPIs* self) {
|
||||
self->apiPreparationCancelled();
|
||||
}
|
||||
|
||||
void QsciAPIs_connect_ApiPreparationCancelled(QsciAPIs* self, intptr_t slot) {
|
||||
QsciAPIs::connect(self, static_cast<void (QsciAPIs::*)()>(&QsciAPIs::apiPreparationCancelled), self, [=]() {
|
||||
miqt_exec_callback_QsciAPIs_ApiPreparationCancelled(slot);
|
||||
});
|
||||
}
|
||||
|
||||
void QsciAPIs_ApiPreparationStarted(QsciAPIs* self) {
|
||||
self->apiPreparationStarted();
|
||||
}
|
||||
|
||||
void QsciAPIs_connect_ApiPreparationStarted(QsciAPIs* self, intptr_t slot) {
|
||||
QsciAPIs::connect(self, static_cast<void (QsciAPIs::*)()>(&QsciAPIs::apiPreparationStarted), self, [=]() {
|
||||
miqt_exec_callback_QsciAPIs_ApiPreparationStarted(slot);
|
||||
});
|
||||
}
|
||||
|
||||
void QsciAPIs_ApiPreparationFinished(QsciAPIs* self) {
|
||||
self->apiPreparationFinished();
|
||||
}
|
||||
|
||||
void QsciAPIs_connect_ApiPreparationFinished(QsciAPIs* self, intptr_t slot) {
|
||||
QsciAPIs::connect(self, static_cast<void (QsciAPIs::*)()>(&QsciAPIs::apiPreparationFinished), self, [=]() {
|
||||
miqt_exec_callback_QsciAPIs_ApiPreparationFinished(slot);
|
||||
});
|
||||
}
|
||||
|
||||
struct miqt_string QsciAPIs_Tr2(const char* s, const char* c) {
|
||||
QString _ret = QsciAPIs::tr(s, c);
|
||||
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
||||
QByteArray _b = _ret.toUtf8();
|
||||
struct miqt_string _ms;
|
||||
_ms.len = _b.length();
|
||||
_ms.data = static_cast<char*>(malloc(_ms.len));
|
||||
memcpy(_ms.data, _b.data(), _ms.len);
|
||||
return _ms;
|
||||
}
|
||||
|
||||
struct miqt_string QsciAPIs_Tr3(const char* s, const char* c, int n) {
|
||||
QString _ret = QsciAPIs::tr(s, c, static_cast<int>(n));
|
||||
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
||||
QByteArray _b = _ret.toUtf8();
|
||||
struct miqt_string _ms;
|
||||
_ms.len = _b.length();
|
||||
_ms.data = static_cast<char*>(malloc(_ms.len));
|
||||
memcpy(_ms.data, _b.data(), _ms.len);
|
||||
return _ms;
|
||||
}
|
||||
|
||||
struct miqt_string QsciAPIs_TrUtf82(const char* s, const char* c) {
|
||||
QString _ret = QsciAPIs::trUtf8(s, c);
|
||||
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
||||
QByteArray _b = _ret.toUtf8();
|
||||
struct miqt_string _ms;
|
||||
_ms.len = _b.length();
|
||||
_ms.data = static_cast<char*>(malloc(_ms.len));
|
||||
memcpy(_ms.data, _b.data(), _ms.len);
|
||||
return _ms;
|
||||
}
|
||||
|
||||
struct miqt_string QsciAPIs_TrUtf83(const char* s, const char* c, int n) {
|
||||
QString _ret = QsciAPIs::trUtf8(s, c, static_cast<int>(n));
|
||||
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
||||
QByteArray _b = _ret.toUtf8();
|
||||
struct miqt_string _ms;
|
||||
_ms.len = _b.length();
|
||||
_ms.data = static_cast<char*>(malloc(_ms.len));
|
||||
memcpy(_ms.data, _b.data(), _ms.len);
|
||||
return _ms;
|
||||
}
|
||||
|
||||
bool QsciAPIs_IsPrepared1(const QsciAPIs* self, struct miqt_string filename) {
|
||||
QString filename_QString = QString::fromUtf8(filename.data, filename.len);
|
||||
return self->isPrepared(filename_QString);
|
||||
}
|
||||
|
||||
bool QsciAPIs_LoadPrepared1(QsciAPIs* self, struct miqt_string filename) {
|
||||
QString filename_QString = QString::fromUtf8(filename.data, filename.len);
|
||||
return self->loadPrepared(filename_QString);
|
||||
}
|
||||
|
||||
bool QsciAPIs_SavePrepared1(const QsciAPIs* self, struct miqt_string filename) {
|
||||
QString filename_QString = QString::fromUtf8(filename.data, filename.len);
|
||||
return self->savePrepared(filename_QString);
|
||||
}
|
||||
|
||||
void QsciAPIs_Delete(QsciAPIs* self) {
|
||||
delete self;
|
||||
}
|
||||
|
356
qt-restricted-extras/qscintilla/gen_qsciapis.go
Normal file
356
qt-restricted-extras/qscintilla/gen_qsciapis.go
Normal file
@ -0,0 +1,356 @@
|
||||
package qscintilla
|
||||
|
||||
/*
|
||||
|
||||
#include "gen_qsciapis.h"
|
||||
#include <stdlib.h>
|
||||
|
||||
*/
|
||||
import "C"
|
||||
|
||||
import (
|
||||
"github.com/mappu/miqt/qt"
|
||||
"runtime"
|
||||
"runtime/cgo"
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
type QsciAPIs struct {
|
||||
h *C.QsciAPIs
|
||||
*QsciAbstractAPIs
|
||||
}
|
||||
|
||||
func (this *QsciAPIs) cPointer() *C.QsciAPIs {
|
||||
if this == nil {
|
||||
return nil
|
||||
}
|
||||
return this.h
|
||||
}
|
||||
|
||||
func (this *QsciAPIs) UnsafePointer() unsafe.Pointer {
|
||||
if this == nil {
|
||||
return nil
|
||||
}
|
||||
return unsafe.Pointer(this.h)
|
||||
}
|
||||
|
||||
func newQsciAPIs(h *C.QsciAPIs) *QsciAPIs {
|
||||
if h == nil {
|
||||
return nil
|
||||
}
|
||||
return &QsciAPIs{h: h, QsciAbstractAPIs: UnsafeNewQsciAbstractAPIs(unsafe.Pointer(h))}
|
||||
}
|
||||
|
||||
func UnsafeNewQsciAPIs(h unsafe.Pointer) *QsciAPIs {
|
||||
return newQsciAPIs((*C.QsciAPIs)(h))
|
||||
}
|
||||
|
||||
// NewQsciAPIs constructs a new QsciAPIs object.
|
||||
func NewQsciAPIs(lexer *QsciLexer) *QsciAPIs {
|
||||
ret := C.QsciAPIs_new(lexer.cPointer())
|
||||
return newQsciAPIs(ret)
|
||||
}
|
||||
|
||||
func (this *QsciAPIs) MetaObject() *qt.QMetaObject {
|
||||
return qt.UnsafeNewQMetaObject(unsafe.Pointer(C.QsciAPIs_MetaObject(this.h)))
|
||||
}
|
||||
|
||||
func (this *QsciAPIs) Metacast(param1 string) unsafe.Pointer {
|
||||
param1_Cstring := C.CString(param1)
|
||||
defer C.free(unsafe.Pointer(param1_Cstring))
|
||||
return (unsafe.Pointer)(C.QsciAPIs_Metacast(this.h, param1_Cstring))
|
||||
}
|
||||
|
||||
func QsciAPIs_Tr(s string) string {
|
||||
s_Cstring := C.CString(s)
|
||||
defer C.free(unsafe.Pointer(s_Cstring))
|
||||
var _ms C.struct_miqt_string = C.QsciAPIs_Tr(s_Cstring)
|
||||
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
||||
C.free(unsafe.Pointer(_ms.data))
|
||||
return _ret
|
||||
}
|
||||
|
||||
func QsciAPIs_TrUtf8(s string) string {
|
||||
s_Cstring := C.CString(s)
|
||||
defer C.free(unsafe.Pointer(s_Cstring))
|
||||
var _ms C.struct_miqt_string = C.QsciAPIs_TrUtf8(s_Cstring)
|
||||
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
||||
C.free(unsafe.Pointer(_ms.data))
|
||||
return _ret
|
||||
}
|
||||
|
||||
func (this *QsciAPIs) Add(entry string) {
|
||||
entry_ms := C.struct_miqt_string{}
|
||||
entry_ms.data = C.CString(entry)
|
||||
entry_ms.len = C.size_t(len(entry))
|
||||
defer C.free(unsafe.Pointer(entry_ms.data))
|
||||
C.QsciAPIs_Add(this.h, entry_ms)
|
||||
}
|
||||
|
||||
func (this *QsciAPIs) Clear() {
|
||||
C.QsciAPIs_Clear(this.h)
|
||||
}
|
||||
|
||||
func (this *QsciAPIs) Load(filename string) bool {
|
||||
filename_ms := C.struct_miqt_string{}
|
||||
filename_ms.data = C.CString(filename)
|
||||
filename_ms.len = C.size_t(len(filename))
|
||||
defer C.free(unsafe.Pointer(filename_ms.data))
|
||||
return (bool)(C.QsciAPIs_Load(this.h, filename_ms))
|
||||
}
|
||||
|
||||
func (this *QsciAPIs) Remove(entry string) {
|
||||
entry_ms := C.struct_miqt_string{}
|
||||
entry_ms.data = C.CString(entry)
|
||||
entry_ms.len = C.size_t(len(entry))
|
||||
defer C.free(unsafe.Pointer(entry_ms.data))
|
||||
C.QsciAPIs_Remove(this.h, entry_ms)
|
||||
}
|
||||
|
||||
func (this *QsciAPIs) Prepare() {
|
||||
C.QsciAPIs_Prepare(this.h)
|
||||
}
|
||||
|
||||
func (this *QsciAPIs) CancelPreparation() {
|
||||
C.QsciAPIs_CancelPreparation(this.h)
|
||||
}
|
||||
|
||||
func (this *QsciAPIs) DefaultPreparedName() string {
|
||||
var _ms C.struct_miqt_string = C.QsciAPIs_DefaultPreparedName(this.h)
|
||||
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
||||
C.free(unsafe.Pointer(_ms.data))
|
||||
return _ret
|
||||
}
|
||||
|
||||
func (this *QsciAPIs) IsPrepared() bool {
|
||||
return (bool)(C.QsciAPIs_IsPrepared(this.h))
|
||||
}
|
||||
|
||||
func (this *QsciAPIs) LoadPrepared() bool {
|
||||
return (bool)(C.QsciAPIs_LoadPrepared(this.h))
|
||||
}
|
||||
|
||||
func (this *QsciAPIs) SavePrepared() bool {
|
||||
return (bool)(C.QsciAPIs_SavePrepared(this.h))
|
||||
}
|
||||
|
||||
func (this *QsciAPIs) UpdateAutoCompletionList(context []string, list []string) {
|
||||
// For the C ABI, malloc a C array of structs
|
||||
context_CArray := (*[0xffff]C.struct_miqt_string)(C.malloc(C.size_t(int(unsafe.Sizeof(C.struct_miqt_string{})) * len(context))))
|
||||
defer C.free(unsafe.Pointer(context_CArray))
|
||||
for i := range context {
|
||||
context_i_ms := C.struct_miqt_string{}
|
||||
context_i_ms.data = C.CString(context[i])
|
||||
context_i_ms.len = C.size_t(len(context[i]))
|
||||
defer C.free(unsafe.Pointer(context_i_ms.data))
|
||||
context_CArray[i] = context_i_ms
|
||||
}
|
||||
context_ma := &C.struct_miqt_array{len: C.size_t(len(context)), data: unsafe.Pointer(context_CArray)}
|
||||
defer runtime.KeepAlive(unsafe.Pointer(context_ma))
|
||||
// For the C ABI, malloc a C array of structs
|
||||
list_CArray := (*[0xffff]C.struct_miqt_string)(C.malloc(C.size_t(int(unsafe.Sizeof(C.struct_miqt_string{})) * len(list))))
|
||||
defer C.free(unsafe.Pointer(list_CArray))
|
||||
for i := range list {
|
||||
list_i_ms := C.struct_miqt_string{}
|
||||
list_i_ms.data = C.CString(list[i])
|
||||
list_i_ms.len = C.size_t(len(list[i]))
|
||||
defer C.free(unsafe.Pointer(list_i_ms.data))
|
||||
list_CArray[i] = list_i_ms
|
||||
}
|
||||
list_ma := &C.struct_miqt_array{len: C.size_t(len(list)), data: unsafe.Pointer(list_CArray)}
|
||||
defer runtime.KeepAlive(unsafe.Pointer(list_ma))
|
||||
C.QsciAPIs_UpdateAutoCompletionList(this.h, context_ma, list_ma)
|
||||
}
|
||||
|
||||
func (this *QsciAPIs) AutoCompletionSelected(sel string) {
|
||||
sel_ms := C.struct_miqt_string{}
|
||||
sel_ms.data = C.CString(sel)
|
||||
sel_ms.len = C.size_t(len(sel))
|
||||
defer C.free(unsafe.Pointer(sel_ms.data))
|
||||
C.QsciAPIs_AutoCompletionSelected(this.h, sel_ms)
|
||||
}
|
||||
|
||||
func (this *QsciAPIs) CallTips(context []string, commas int, style QsciScintilla__CallTipsStyle, shifts []int) []string {
|
||||
// For the C ABI, malloc a C array of structs
|
||||
context_CArray := (*[0xffff]C.struct_miqt_string)(C.malloc(C.size_t(int(unsafe.Sizeof(C.struct_miqt_string{})) * len(context))))
|
||||
defer C.free(unsafe.Pointer(context_CArray))
|
||||
for i := range context {
|
||||
context_i_ms := C.struct_miqt_string{}
|
||||
context_i_ms.data = C.CString(context[i])
|
||||
context_i_ms.len = C.size_t(len(context[i]))
|
||||
defer C.free(unsafe.Pointer(context_i_ms.data))
|
||||
context_CArray[i] = context_i_ms
|
||||
}
|
||||
context_ma := &C.struct_miqt_array{len: C.size_t(len(context)), data: unsafe.Pointer(context_CArray)}
|
||||
defer runtime.KeepAlive(unsafe.Pointer(context_ma))
|
||||
// For the C ABI, malloc a C array of raw pointers
|
||||
shifts_CArray := (*[0xffff]C.int)(C.malloc(C.size_t(8 * len(shifts))))
|
||||
defer C.free(unsafe.Pointer(shifts_CArray))
|
||||
for i := range shifts {
|
||||
shifts_CArray[i] = (C.int)(shifts[i])
|
||||
}
|
||||
shifts_ma := &C.struct_miqt_array{len: C.size_t(len(shifts)), data: unsafe.Pointer(shifts_CArray)}
|
||||
defer runtime.KeepAlive(unsafe.Pointer(shifts_ma))
|
||||
var _ma *C.struct_miqt_array = C.QsciAPIs_CallTips(this.h, context_ma, (C.int)(commas), (C.int)(style), shifts_ma)
|
||||
_ret := make([]string, int(_ma.len))
|
||||
_outCast := (*[0xffff]C.struct_miqt_string)(unsafe.Pointer(_ma.data)) // hey ya
|
||||
for i := 0; i < int(_ma.len); i++ {
|
||||
var _lv_ms C.struct_miqt_string = _outCast[i]
|
||||
_lv_ret := C.GoStringN(_lv_ms.data, C.int(int64(_lv_ms.len)))
|
||||
C.free(unsafe.Pointer(_lv_ms.data))
|
||||
_ret[i] = _lv_ret
|
||||
}
|
||||
C.free(unsafe.Pointer(_ma))
|
||||
return _ret
|
||||
}
|
||||
|
||||
func (this *QsciAPIs) Event(e *qt.QEvent) bool {
|
||||
return (bool)(C.QsciAPIs_Event(this.h, (*C.QEvent)(e.UnsafePointer())))
|
||||
}
|
||||
|
||||
func (this *QsciAPIs) InstalledAPIFiles() []string {
|
||||
var _ma *C.struct_miqt_array = C.QsciAPIs_InstalledAPIFiles(this.h)
|
||||
_ret := make([]string, int(_ma.len))
|
||||
_outCast := (*[0xffff]C.struct_miqt_string)(unsafe.Pointer(_ma.data)) // hey ya
|
||||
for i := 0; i < int(_ma.len); i++ {
|
||||
var _lv_ms C.struct_miqt_string = _outCast[i]
|
||||
_lv_ret := C.GoStringN(_lv_ms.data, C.int(int64(_lv_ms.len)))
|
||||
C.free(unsafe.Pointer(_lv_ms.data))
|
||||
_ret[i] = _lv_ret
|
||||
}
|
||||
C.free(unsafe.Pointer(_ma))
|
||||
return _ret
|
||||
}
|
||||
|
||||
func (this *QsciAPIs) ApiPreparationCancelled() {
|
||||
C.QsciAPIs_ApiPreparationCancelled(this.h)
|
||||
}
|
||||
func (this *QsciAPIs) OnApiPreparationCancelled(slot func()) {
|
||||
C.QsciAPIs_connect_ApiPreparationCancelled(this.h, C.intptr_t(cgo.NewHandle(slot)))
|
||||
}
|
||||
|
||||
//export miqt_exec_callback_QsciAPIs_ApiPreparationCancelled
|
||||
func miqt_exec_callback_QsciAPIs_ApiPreparationCancelled(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 *QsciAPIs) ApiPreparationStarted() {
|
||||
C.QsciAPIs_ApiPreparationStarted(this.h)
|
||||
}
|
||||
func (this *QsciAPIs) OnApiPreparationStarted(slot func()) {
|
||||
C.QsciAPIs_connect_ApiPreparationStarted(this.h, C.intptr_t(cgo.NewHandle(slot)))
|
||||
}
|
||||
|
||||
//export miqt_exec_callback_QsciAPIs_ApiPreparationStarted
|
||||
func miqt_exec_callback_QsciAPIs_ApiPreparationStarted(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 *QsciAPIs) ApiPreparationFinished() {
|
||||
C.QsciAPIs_ApiPreparationFinished(this.h)
|
||||
}
|
||||
func (this *QsciAPIs) OnApiPreparationFinished(slot func()) {
|
||||
C.QsciAPIs_connect_ApiPreparationFinished(this.h, C.intptr_t(cgo.NewHandle(slot)))
|
||||
}
|
||||
|
||||
//export miqt_exec_callback_QsciAPIs_ApiPreparationFinished
|
||||
func miqt_exec_callback_QsciAPIs_ApiPreparationFinished(cb C.intptr_t) {
|
||||
gofunc, ok := cgo.Handle(cb).Value().(func())
|
||||
if !ok {
|
||||
panic("miqt: callback of non-callback type (heap corruption?)")
|
||||
}
|
||||
|
||||
gofunc()
|
||||
}
|
||||
|
||||
func QsciAPIs_Tr2(s string, c string) string {
|
||||
s_Cstring := C.CString(s)
|
||||
defer C.free(unsafe.Pointer(s_Cstring))
|
||||
c_Cstring := C.CString(c)
|
||||
defer C.free(unsafe.Pointer(c_Cstring))
|
||||
var _ms C.struct_miqt_string = C.QsciAPIs_Tr2(s_Cstring, c_Cstring)
|
||||
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
||||
C.free(unsafe.Pointer(_ms.data))
|
||||
return _ret
|
||||
}
|
||||
|
||||
func QsciAPIs_Tr3(s string, c string, n int) string {
|
||||
s_Cstring := C.CString(s)
|
||||
defer C.free(unsafe.Pointer(s_Cstring))
|
||||
c_Cstring := C.CString(c)
|
||||
defer C.free(unsafe.Pointer(c_Cstring))
|
||||
var _ms C.struct_miqt_string = C.QsciAPIs_Tr3(s_Cstring, c_Cstring, (C.int)(n))
|
||||
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
||||
C.free(unsafe.Pointer(_ms.data))
|
||||
return _ret
|
||||
}
|
||||
|
||||
func QsciAPIs_TrUtf82(s string, c string) string {
|
||||
s_Cstring := C.CString(s)
|
||||
defer C.free(unsafe.Pointer(s_Cstring))
|
||||
c_Cstring := C.CString(c)
|
||||
defer C.free(unsafe.Pointer(c_Cstring))
|
||||
var _ms C.struct_miqt_string = C.QsciAPIs_TrUtf82(s_Cstring, c_Cstring)
|
||||
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
||||
C.free(unsafe.Pointer(_ms.data))
|
||||
return _ret
|
||||
}
|
||||
|
||||
func QsciAPIs_TrUtf83(s string, c string, n int) string {
|
||||
s_Cstring := C.CString(s)
|
||||
defer C.free(unsafe.Pointer(s_Cstring))
|
||||
c_Cstring := C.CString(c)
|
||||
defer C.free(unsafe.Pointer(c_Cstring))
|
||||
var _ms C.struct_miqt_string = C.QsciAPIs_TrUtf83(s_Cstring, c_Cstring, (C.int)(n))
|
||||
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
||||
C.free(unsafe.Pointer(_ms.data))
|
||||
return _ret
|
||||
}
|
||||
|
||||
func (this *QsciAPIs) IsPrepared1(filename string) bool {
|
||||
filename_ms := C.struct_miqt_string{}
|
||||
filename_ms.data = C.CString(filename)
|
||||
filename_ms.len = C.size_t(len(filename))
|
||||
defer C.free(unsafe.Pointer(filename_ms.data))
|
||||
return (bool)(C.QsciAPIs_IsPrepared1(this.h, filename_ms))
|
||||
}
|
||||
|
||||
func (this *QsciAPIs) LoadPrepared1(filename string) bool {
|
||||
filename_ms := C.struct_miqt_string{}
|
||||
filename_ms.data = C.CString(filename)
|
||||
filename_ms.len = C.size_t(len(filename))
|
||||
defer C.free(unsafe.Pointer(filename_ms.data))
|
||||
return (bool)(C.QsciAPIs_LoadPrepared1(this.h, filename_ms))
|
||||
}
|
||||
|
||||
func (this *QsciAPIs) SavePrepared1(filename string) bool {
|
||||
filename_ms := C.struct_miqt_string{}
|
||||
filename_ms.data = C.CString(filename)
|
||||
filename_ms.len = C.size_t(len(filename))
|
||||
defer C.free(unsafe.Pointer(filename_ms.data))
|
||||
return (bool)(C.QsciAPIs_SavePrepared1(this.h, filename_ms))
|
||||
}
|
||||
|
||||
// Delete this object from C++ memory.
|
||||
func (this *QsciAPIs) Delete() {
|
||||
C.QsciAPIs_Delete(this.h)
|
||||
}
|
||||
|
||||
// GoGC adds a Go Finalizer to this pointer, so that it will be deleted
|
||||
// from C++ memory once it is unreachable from Go memory.
|
||||
func (this *QsciAPIs) GoGC() {
|
||||
runtime.SetFinalizer(this, func(this *QsciAPIs) {
|
||||
this.Delete()
|
||||
runtime.KeepAlive(this.h)
|
||||
})
|
||||
}
|
67
qt-restricted-extras/qscintilla/gen_qsciapis.h
Normal file
67
qt-restricted-extras/qscintilla/gen_qsciapis.h
Normal file
@ -0,0 +1,67 @@
|
||||
#ifndef GEN_QSCIAPIS_H
|
||||
#define GEN_QSCIAPIS_H
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||
|
||||
#include "../../libmiqt/libmiqt.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
class QEvent;
|
||||
class QMetaObject;
|
||||
class QsciAPIs;
|
||||
class QsciLexer;
|
||||
#else
|
||||
typedef struct QEvent QEvent;
|
||||
typedef struct QMetaObject QMetaObject;
|
||||
typedef struct QsciAPIs QsciAPIs;
|
||||
typedef struct QsciLexer QsciLexer;
|
||||
#endif
|
||||
|
||||
QsciAPIs* QsciAPIs_new(QsciLexer* lexer);
|
||||
QMetaObject* QsciAPIs_MetaObject(const QsciAPIs* self);
|
||||
void* QsciAPIs_Metacast(QsciAPIs* self, const char* param1);
|
||||
struct miqt_string QsciAPIs_Tr(const char* s);
|
||||
struct miqt_string QsciAPIs_TrUtf8(const char* s);
|
||||
void QsciAPIs_Add(QsciAPIs* self, struct miqt_string entry);
|
||||
void QsciAPIs_Clear(QsciAPIs* self);
|
||||
bool QsciAPIs_Load(QsciAPIs* self, struct miqt_string filename);
|
||||
void QsciAPIs_Remove(QsciAPIs* self, struct miqt_string entry);
|
||||
void QsciAPIs_Prepare(QsciAPIs* self);
|
||||
void QsciAPIs_CancelPreparation(QsciAPIs* self);
|
||||
struct miqt_string QsciAPIs_DefaultPreparedName(const QsciAPIs* self);
|
||||
bool QsciAPIs_IsPrepared(const QsciAPIs* self);
|
||||
bool QsciAPIs_LoadPrepared(QsciAPIs* self);
|
||||
bool QsciAPIs_SavePrepared(const QsciAPIs* self);
|
||||
void QsciAPIs_UpdateAutoCompletionList(QsciAPIs* self, struct miqt_array* /* of struct miqt_string */ context, struct miqt_array* /* of struct miqt_string */ list);
|
||||
void QsciAPIs_AutoCompletionSelected(QsciAPIs* self, struct miqt_string sel);
|
||||
struct miqt_array* QsciAPIs_CallTips(QsciAPIs* self, struct miqt_array* /* of struct miqt_string */ context, int commas, int style, struct miqt_array* /* of int */ shifts);
|
||||
bool QsciAPIs_Event(QsciAPIs* self, QEvent* e);
|
||||
struct miqt_array* QsciAPIs_InstalledAPIFiles(const QsciAPIs* self);
|
||||
void QsciAPIs_ApiPreparationCancelled(QsciAPIs* self);
|
||||
void QsciAPIs_connect_ApiPreparationCancelled(QsciAPIs* self, intptr_t slot);
|
||||
void QsciAPIs_ApiPreparationStarted(QsciAPIs* self);
|
||||
void QsciAPIs_connect_ApiPreparationStarted(QsciAPIs* self, intptr_t slot);
|
||||
void QsciAPIs_ApiPreparationFinished(QsciAPIs* self);
|
||||
void QsciAPIs_connect_ApiPreparationFinished(QsciAPIs* self, intptr_t slot);
|
||||
struct miqt_string QsciAPIs_Tr2(const char* s, const char* c);
|
||||
struct miqt_string QsciAPIs_Tr3(const char* s, const char* c, int n);
|
||||
struct miqt_string QsciAPIs_TrUtf82(const char* s, const char* c);
|
||||
struct miqt_string QsciAPIs_TrUtf83(const char* s, const char* c, int n);
|
||||
bool QsciAPIs_IsPrepared1(const QsciAPIs* self, struct miqt_string filename);
|
||||
bool QsciAPIs_LoadPrepared1(QsciAPIs* self, struct miqt_string filename);
|
||||
bool QsciAPIs_SavePrepared1(const QsciAPIs* self, struct miqt_string filename);
|
||||
void QsciAPIs_Delete(QsciAPIs* self);
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern C */
|
||||
#endif
|
||||
|
||||
#endif
|
51
qt-restricted-extras/qscintilla/gen_qscicommand.cpp
Normal file
51
qt-restricted-extras/qscintilla/gen_qscicommand.cpp
Normal file
@ -0,0 +1,51 @@
|
||||
#include <QString>
|
||||
#include <QByteArray>
|
||||
#include <cstring>
|
||||
#include <qscicommand.h>
|
||||
#include "gen_qscicommand.h"
|
||||
#include "_cgo_export.h"
|
||||
|
||||
int QsciCommand_Command(const QsciCommand* self) {
|
||||
QsciCommand::Command _ret = self->command();
|
||||
return static_cast<int>(_ret);
|
||||
}
|
||||
|
||||
void QsciCommand_Execute(QsciCommand* self) {
|
||||
self->execute();
|
||||
}
|
||||
|
||||
void QsciCommand_SetKey(QsciCommand* self, int key) {
|
||||
self->setKey(static_cast<int>(key));
|
||||
}
|
||||
|
||||
void QsciCommand_SetAlternateKey(QsciCommand* self, int altkey) {
|
||||
self->setAlternateKey(static_cast<int>(altkey));
|
||||
}
|
||||
|
||||
int QsciCommand_Key(const QsciCommand* self) {
|
||||
return self->key();
|
||||
}
|
||||
|
||||
int QsciCommand_AlternateKey(const QsciCommand* self) {
|
||||
return self->alternateKey();
|
||||
}
|
||||
|
||||
bool QsciCommand_ValidKey(int key) {
|
||||
return QsciCommand::validKey(static_cast<int>(key));
|
||||
}
|
||||
|
||||
struct miqt_string QsciCommand_Description(const QsciCommand* self) {
|
||||
QString _ret = self->description();
|
||||
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
||||
QByteArray _b = _ret.toUtf8();
|
||||
struct miqt_string _ms;
|
||||
_ms.len = _b.length();
|
||||
_ms.data = static_cast<char*>(malloc(_ms.len));
|
||||
memcpy(_ms.data, _b.data(), _ms.len);
|
||||
return _ms;
|
||||
}
|
||||
|
||||
void QsciCommand_Delete(QsciCommand* self) {
|
||||
delete self;
|
||||
}
|
||||
|
196
qt-restricted-extras/qscintilla/gen_qscicommand.go
Normal file
196
qt-restricted-extras/qscintilla/gen_qscicommand.go
Normal file
@ -0,0 +1,196 @@
|
||||
package qscintilla
|
||||
|
||||
/*
|
||||
|
||||
#include "gen_qscicommand.h"
|
||||
#include <stdlib.h>
|
||||
|
||||
*/
|
||||
import "C"
|
||||
|
||||
import (
|
||||
"runtime"
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
type QsciCommand__Command int
|
||||
|
||||
const (
|
||||
QsciCommand__LineDown QsciCommand__Command = 2300
|
||||
QsciCommand__LineDownExtend QsciCommand__Command = 2301
|
||||
QsciCommand__LineDownRectExtend QsciCommand__Command = 2426
|
||||
QsciCommand__LineScrollDown QsciCommand__Command = 2342
|
||||
QsciCommand__LineUp QsciCommand__Command = 2302
|
||||
QsciCommand__LineUpExtend QsciCommand__Command = 2303
|
||||
QsciCommand__LineUpRectExtend QsciCommand__Command = 2427
|
||||
QsciCommand__LineScrollUp QsciCommand__Command = 2343
|
||||
QsciCommand__ScrollToStart QsciCommand__Command = 2628
|
||||
QsciCommand__ScrollToEnd QsciCommand__Command = 2629
|
||||
QsciCommand__VerticalCentreCaret QsciCommand__Command = 2619
|
||||
QsciCommand__ParaDown QsciCommand__Command = 2413
|
||||
QsciCommand__ParaDownExtend QsciCommand__Command = 2414
|
||||
QsciCommand__ParaUp QsciCommand__Command = 2415
|
||||
QsciCommand__ParaUpExtend QsciCommand__Command = 2416
|
||||
QsciCommand__CharLeft QsciCommand__Command = 2304
|
||||
QsciCommand__CharLeftExtend QsciCommand__Command = 2305
|
||||
QsciCommand__CharLeftRectExtend QsciCommand__Command = 2428
|
||||
QsciCommand__CharRight QsciCommand__Command = 2306
|
||||
QsciCommand__CharRightExtend QsciCommand__Command = 2307
|
||||
QsciCommand__CharRightRectExtend QsciCommand__Command = 2429
|
||||
QsciCommand__WordLeft QsciCommand__Command = 2308
|
||||
QsciCommand__WordLeftExtend QsciCommand__Command = 2309
|
||||
QsciCommand__WordRight QsciCommand__Command = 2310
|
||||
QsciCommand__WordRightExtend QsciCommand__Command = 2311
|
||||
QsciCommand__WordLeftEnd QsciCommand__Command = 2439
|
||||
QsciCommand__WordLeftEndExtend QsciCommand__Command = 2440
|
||||
QsciCommand__WordRightEnd QsciCommand__Command = 2441
|
||||
QsciCommand__WordRightEndExtend QsciCommand__Command = 2442
|
||||
QsciCommand__WordPartLeft QsciCommand__Command = 2390
|
||||
QsciCommand__WordPartLeftExtend QsciCommand__Command = 2391
|
||||
QsciCommand__WordPartRight QsciCommand__Command = 2392
|
||||
QsciCommand__WordPartRightExtend QsciCommand__Command = 2393
|
||||
QsciCommand__Home QsciCommand__Command = 2312
|
||||
QsciCommand__HomeExtend QsciCommand__Command = 2313
|
||||
QsciCommand__HomeRectExtend QsciCommand__Command = 2430
|
||||
QsciCommand__HomeDisplay QsciCommand__Command = 2345
|
||||
QsciCommand__HomeDisplayExtend QsciCommand__Command = 2346
|
||||
QsciCommand__HomeWrap QsciCommand__Command = 2349
|
||||
QsciCommand__HomeWrapExtend QsciCommand__Command = 2450
|
||||
QsciCommand__VCHome QsciCommand__Command = 2331
|
||||
QsciCommand__VCHomeExtend QsciCommand__Command = 2332
|
||||
QsciCommand__VCHomeRectExtend QsciCommand__Command = 2431
|
||||
QsciCommand__VCHomeWrap QsciCommand__Command = 2453
|
||||
QsciCommand__VCHomeWrapExtend QsciCommand__Command = 2454
|
||||
QsciCommand__LineEnd QsciCommand__Command = 2314
|
||||
QsciCommand__LineEndExtend QsciCommand__Command = 2315
|
||||
QsciCommand__LineEndRectExtend QsciCommand__Command = 2432
|
||||
QsciCommand__LineEndDisplay QsciCommand__Command = 2347
|
||||
QsciCommand__LineEndDisplayExtend QsciCommand__Command = 2348
|
||||
QsciCommand__LineEndWrap QsciCommand__Command = 2451
|
||||
QsciCommand__LineEndWrapExtend QsciCommand__Command = 2452
|
||||
QsciCommand__DocumentStart QsciCommand__Command = 2316
|
||||
QsciCommand__DocumentStartExtend QsciCommand__Command = 2317
|
||||
QsciCommand__DocumentEnd QsciCommand__Command = 2318
|
||||
QsciCommand__DocumentEndExtend QsciCommand__Command = 2319
|
||||
QsciCommand__PageUp QsciCommand__Command = 2320
|
||||
QsciCommand__PageUpExtend QsciCommand__Command = 2321
|
||||
QsciCommand__PageUpRectExtend QsciCommand__Command = 2433
|
||||
QsciCommand__PageDown QsciCommand__Command = 2322
|
||||
QsciCommand__PageDownExtend QsciCommand__Command = 2323
|
||||
QsciCommand__PageDownRectExtend QsciCommand__Command = 2434
|
||||
QsciCommand__StutteredPageUp QsciCommand__Command = 2435
|
||||
QsciCommand__StutteredPageUpExtend QsciCommand__Command = 2436
|
||||
QsciCommand__StutteredPageDown QsciCommand__Command = 2437
|
||||
QsciCommand__StutteredPageDownExtend QsciCommand__Command = 2438
|
||||
QsciCommand__Delete QsciCommand__Command = 2180
|
||||
QsciCommand__DeleteBack QsciCommand__Command = 2326
|
||||
QsciCommand__DeleteBackNotLine QsciCommand__Command = 2344
|
||||
QsciCommand__DeleteWordLeft QsciCommand__Command = 2335
|
||||
QsciCommand__DeleteWordRight QsciCommand__Command = 2336
|
||||
QsciCommand__DeleteWordRightEnd QsciCommand__Command = 2518
|
||||
QsciCommand__DeleteLineLeft QsciCommand__Command = 2395
|
||||
QsciCommand__DeleteLineRight QsciCommand__Command = 2396
|
||||
QsciCommand__LineDelete QsciCommand__Command = 2338
|
||||
QsciCommand__LineCut QsciCommand__Command = 2337
|
||||
QsciCommand__LineCopy QsciCommand__Command = 2455
|
||||
QsciCommand__LineTranspose QsciCommand__Command = 2339
|
||||
QsciCommand__LineDuplicate QsciCommand__Command = 2404
|
||||
QsciCommand__SelectAll QsciCommand__Command = 2013
|
||||
QsciCommand__MoveSelectedLinesUp QsciCommand__Command = 2620
|
||||
QsciCommand__MoveSelectedLinesDown QsciCommand__Command = 2621
|
||||
QsciCommand__SelectionDuplicate QsciCommand__Command = 2469
|
||||
QsciCommand__SelectionLowerCase QsciCommand__Command = 2340
|
||||
QsciCommand__SelectionUpperCase QsciCommand__Command = 2341
|
||||
QsciCommand__SelectionCut QsciCommand__Command = 2177
|
||||
QsciCommand__SelectionCopy QsciCommand__Command = 2178
|
||||
QsciCommand__Paste QsciCommand__Command = 2179
|
||||
QsciCommand__EditToggleOvertype QsciCommand__Command = 2324
|
||||
QsciCommand__Newline QsciCommand__Command = 2329
|
||||
QsciCommand__Formfeed QsciCommand__Command = 2330
|
||||
QsciCommand__Tab QsciCommand__Command = 2327
|
||||
QsciCommand__Backtab QsciCommand__Command = 2328
|
||||
QsciCommand__Cancel QsciCommand__Command = 2325
|
||||
QsciCommand__Undo QsciCommand__Command = 2176
|
||||
QsciCommand__Redo QsciCommand__Command = 2011
|
||||
QsciCommand__ZoomIn QsciCommand__Command = 2333
|
||||
QsciCommand__ZoomOut QsciCommand__Command = 2334
|
||||
QsciCommand__ReverseLines QsciCommand__Command = 2354
|
||||
)
|
||||
|
||||
type QsciCommand struct {
|
||||
h *C.QsciCommand
|
||||
}
|
||||
|
||||
func (this *QsciCommand) cPointer() *C.QsciCommand {
|
||||
if this == nil {
|
||||
return nil
|
||||
}
|
||||
return this.h
|
||||
}
|
||||
|
||||
func (this *QsciCommand) UnsafePointer() unsafe.Pointer {
|
||||
if this == nil {
|
||||
return nil
|
||||
}
|
||||
return unsafe.Pointer(this.h)
|
||||
}
|
||||
|
||||
func newQsciCommand(h *C.QsciCommand) *QsciCommand {
|
||||
if h == nil {
|
||||
return nil
|
||||
}
|
||||
return &QsciCommand{h: h}
|
||||
}
|
||||
|
||||
func UnsafeNewQsciCommand(h unsafe.Pointer) *QsciCommand {
|
||||
return newQsciCommand((*C.QsciCommand)(h))
|
||||
}
|
||||
|
||||
func (this *QsciCommand) Command() QsciCommand__Command {
|
||||
return (QsciCommand__Command)(C.QsciCommand_Command(this.h))
|
||||
}
|
||||
|
||||
func (this *QsciCommand) Execute() {
|
||||
C.QsciCommand_Execute(this.h)
|
||||
}
|
||||
|
||||
func (this *QsciCommand) SetKey(key int) {
|
||||
C.QsciCommand_SetKey(this.h, (C.int)(key))
|
||||
}
|
||||
|
||||
func (this *QsciCommand) SetAlternateKey(altkey int) {
|
||||
C.QsciCommand_SetAlternateKey(this.h, (C.int)(altkey))
|
||||
}
|
||||
|
||||
func (this *QsciCommand) Key() int {
|
||||
return (int)(C.QsciCommand_Key(this.h))
|
||||
}
|
||||
|
||||
func (this *QsciCommand) AlternateKey() int {
|
||||
return (int)(C.QsciCommand_AlternateKey(this.h))
|
||||
}
|
||||
|
||||
func QsciCommand_ValidKey(key int) bool {
|
||||
return (bool)(C.QsciCommand_ValidKey((C.int)(key)))
|
||||
}
|
||||
|
||||
func (this *QsciCommand) Description() string {
|
||||
var _ms C.struct_miqt_string = C.QsciCommand_Description(this.h)
|
||||
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
||||
C.free(unsafe.Pointer(_ms.data))
|
||||
return _ret
|
||||
}
|
||||
|
||||
// Delete this object from C++ memory.
|
||||
func (this *QsciCommand) Delete() {
|
||||
C.QsciCommand_Delete(this.h)
|
||||
}
|
||||
|
||||
// GoGC adds a Go Finalizer to this pointer, so that it will be deleted
|
||||
// from C++ memory once it is unreachable from Go memory.
|
||||
func (this *QsciCommand) GoGC() {
|
||||
runtime.SetFinalizer(this, func(this *QsciCommand) {
|
||||
this.Delete()
|
||||
runtime.KeepAlive(this.h)
|
||||
})
|
||||
}
|
36
qt-restricted-extras/qscintilla/gen_qscicommand.h
Normal file
36
qt-restricted-extras/qscintilla/gen_qscicommand.h
Normal file
@ -0,0 +1,36 @@
|
||||
#ifndef GEN_QSCICOMMAND_H
|
||||
#define GEN_QSCICOMMAND_H
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||
|
||||
#include "../../libmiqt/libmiqt.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
class QsciCommand;
|
||||
#else
|
||||
typedef struct QsciCommand QsciCommand;
|
||||
#endif
|
||||
|
||||
int QsciCommand_Command(const QsciCommand* self);
|
||||
void QsciCommand_Execute(QsciCommand* self);
|
||||
void QsciCommand_SetKey(QsciCommand* self, int key);
|
||||
void QsciCommand_SetAlternateKey(QsciCommand* self, int altkey);
|
||||
int QsciCommand_Key(const QsciCommand* self);
|
||||
int QsciCommand_AlternateKey(const QsciCommand* self);
|
||||
bool QsciCommand_ValidKey(int key);
|
||||
struct miqt_string QsciCommand_Description(const QsciCommand* self);
|
||||
void QsciCommand_Delete(QsciCommand* self);
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern C */
|
||||
#endif
|
||||
|
||||
#endif
|
51
qt-restricted-extras/qscintilla/gen_qscicommandset.cpp
Normal file
51
qt-restricted-extras/qscintilla/gen_qscicommandset.cpp
Normal file
@ -0,0 +1,51 @@
|
||||
#include <QList>
|
||||
#include <QSettings>
|
||||
#include <qscicommandset.h>
|
||||
#include "gen_qscicommandset.h"
|
||||
#include "_cgo_export.h"
|
||||
|
||||
bool QsciCommandSet_ReadSettings(QsciCommandSet* self, QSettings* qs) {
|
||||
return self->readSettings(*qs);
|
||||
}
|
||||
|
||||
bool QsciCommandSet_WriteSettings(QsciCommandSet* self, QSettings* qs) {
|
||||
return self->writeSettings(*qs);
|
||||
}
|
||||
|
||||
struct miqt_array* QsciCommandSet_Commands(QsciCommandSet* self) {
|
||||
QList<QsciCommand *>& _ret = self->commands();
|
||||
// Convert QList<> from C++ memory to manually-managed C memory
|
||||
QsciCommand** _arr = static_cast<QsciCommand**>(malloc(sizeof(QsciCommand*) * _ret.length()));
|
||||
for (size_t i = 0, e = _ret.length(); i < e; ++i) {
|
||||
_arr[i] = _ret[i];
|
||||
}
|
||||
struct miqt_array* _out = static_cast<struct miqt_array*>(malloc(sizeof(struct miqt_array)));
|
||||
_out->len = _ret.length();
|
||||
_out->data = static_cast<void*>(_arr);
|
||||
return _out;
|
||||
}
|
||||
|
||||
void QsciCommandSet_ClearKeys(QsciCommandSet* self) {
|
||||
self->clearKeys();
|
||||
}
|
||||
|
||||
void QsciCommandSet_ClearAlternateKeys(QsciCommandSet* self) {
|
||||
self->clearAlternateKeys();
|
||||
}
|
||||
|
||||
QsciCommand* QsciCommandSet_BoundTo(const QsciCommandSet* self, int key) {
|
||||
return self->boundTo(static_cast<int>(key));
|
||||
}
|
||||
|
||||
QsciCommand* QsciCommandSet_Find(const QsciCommandSet* self, int command) {
|
||||
return self->find(static_cast<QsciCommand::Command>(command));
|
||||
}
|
||||
|
||||
bool QsciCommandSet_ReadSettings2(QsciCommandSet* self, QSettings* qs, const char* prefix) {
|
||||
return self->readSettings(*qs, prefix);
|
||||
}
|
||||
|
||||
bool QsciCommandSet_WriteSettings2(QsciCommandSet* self, QSettings* qs, const char* prefix) {
|
||||
return self->writeSettings(*qs, prefix);
|
||||
}
|
||||
|
90
qt-restricted-extras/qscintilla/gen_qscicommandset.go
Normal file
90
qt-restricted-extras/qscintilla/gen_qscicommandset.go
Normal file
@ -0,0 +1,90 @@
|
||||
package qscintilla
|
||||
|
||||
/*
|
||||
|
||||
#include "gen_qscicommandset.h"
|
||||
#include <stdlib.h>
|
||||
|
||||
*/
|
||||
import "C"
|
||||
|
||||
import (
|
||||
"github.com/mappu/miqt/qt"
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
type QsciCommandSet struct {
|
||||
h *C.QsciCommandSet
|
||||
}
|
||||
|
||||
func (this *QsciCommandSet) cPointer() *C.QsciCommandSet {
|
||||
if this == nil {
|
||||
return nil
|
||||
}
|
||||
return this.h
|
||||
}
|
||||
|
||||
func (this *QsciCommandSet) UnsafePointer() unsafe.Pointer {
|
||||
if this == nil {
|
||||
return nil
|
||||
}
|
||||
return unsafe.Pointer(this.h)
|
||||
}
|
||||
|
||||
func newQsciCommandSet(h *C.QsciCommandSet) *QsciCommandSet {
|
||||
if h == nil {
|
||||
return nil
|
||||
}
|
||||
return &QsciCommandSet{h: h}
|
||||
}
|
||||
|
||||
func UnsafeNewQsciCommandSet(h unsafe.Pointer) *QsciCommandSet {
|
||||
return newQsciCommandSet((*C.QsciCommandSet)(h))
|
||||
}
|
||||
|
||||
func (this *QsciCommandSet) ReadSettings(qs *qt.QSettings) bool {
|
||||
return (bool)(C.QsciCommandSet_ReadSettings(this.h, (*C.QSettings)(qs.UnsafePointer())))
|
||||
}
|
||||
|
||||
func (this *QsciCommandSet) WriteSettings(qs *qt.QSettings) bool {
|
||||
return (bool)(C.QsciCommandSet_WriteSettings(this.h, (*C.QSettings)(qs.UnsafePointer())))
|
||||
}
|
||||
|
||||
func (this *QsciCommandSet) Commands() []*QsciCommand {
|
||||
var _ma *C.struct_miqt_array = C.QsciCommandSet_Commands(this.h)
|
||||
_ret := make([]*QsciCommand, int(_ma.len))
|
||||
_outCast := (*[0xffff]*C.QsciCommand)(unsafe.Pointer(_ma.data)) // hey ya
|
||||
for i := 0; i < int(_ma.len); i++ {
|
||||
_ret[i] = UnsafeNewQsciCommand(unsafe.Pointer(_outCast[i]))
|
||||
}
|
||||
C.free(unsafe.Pointer(_ma))
|
||||
return _ret
|
||||
}
|
||||
|
||||
func (this *QsciCommandSet) ClearKeys() {
|
||||
C.QsciCommandSet_ClearKeys(this.h)
|
||||
}
|
||||
|
||||
func (this *QsciCommandSet) ClearAlternateKeys() {
|
||||
C.QsciCommandSet_ClearAlternateKeys(this.h)
|
||||
}
|
||||
|
||||
func (this *QsciCommandSet) BoundTo(key int) *QsciCommand {
|
||||
return UnsafeNewQsciCommand(unsafe.Pointer(C.QsciCommandSet_BoundTo(this.h, (C.int)(key))))
|
||||
}
|
||||
|
||||
func (this *QsciCommandSet) Find(command QsciCommand__Command) *QsciCommand {
|
||||
return UnsafeNewQsciCommand(unsafe.Pointer(C.QsciCommandSet_Find(this.h, (C.int)(command))))
|
||||
}
|
||||
|
||||
func (this *QsciCommandSet) ReadSettings2(qs *qt.QSettings, prefix string) bool {
|
||||
prefix_Cstring := C.CString(prefix)
|
||||
defer C.free(unsafe.Pointer(prefix_Cstring))
|
||||
return (bool)(C.QsciCommandSet_ReadSettings2(this.h, (*C.QSettings)(qs.UnsafePointer()), prefix_Cstring))
|
||||
}
|
||||
|
||||
func (this *QsciCommandSet) WriteSettings2(qs *qt.QSettings, prefix string) bool {
|
||||
prefix_Cstring := C.CString(prefix)
|
||||
defer C.free(unsafe.Pointer(prefix_Cstring))
|
||||
return (bool)(C.QsciCommandSet_WriteSettings2(this.h, (*C.QSettings)(qs.UnsafePointer()), prefix_Cstring))
|
||||
}
|
40
qt-restricted-extras/qscintilla/gen_qscicommandset.h
Normal file
40
qt-restricted-extras/qscintilla/gen_qscicommandset.h
Normal file
@ -0,0 +1,40 @@
|
||||
#ifndef GEN_QSCICOMMANDSET_H
|
||||
#define GEN_QSCICOMMANDSET_H
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||
|
||||
#include "../../libmiqt/libmiqt.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
class QSettings;
|
||||
class QsciCommand;
|
||||
class QsciCommandSet;
|
||||
#else
|
||||
typedef struct QSettings QSettings;
|
||||
typedef struct QsciCommand QsciCommand;
|
||||
typedef struct QsciCommandSet QsciCommandSet;
|
||||
#endif
|
||||
|
||||
bool QsciCommandSet_ReadSettings(QsciCommandSet* self, QSettings* qs);
|
||||
bool QsciCommandSet_WriteSettings(QsciCommandSet* self, QSettings* qs);
|
||||
struct miqt_array* QsciCommandSet_Commands(QsciCommandSet* self);
|
||||
void QsciCommandSet_ClearKeys(QsciCommandSet* self);
|
||||
void QsciCommandSet_ClearAlternateKeys(QsciCommandSet* self);
|
||||
QsciCommand* QsciCommandSet_BoundTo(const QsciCommandSet* self, int key);
|
||||
QsciCommand* QsciCommandSet_Find(const QsciCommandSet* self, int command);
|
||||
bool QsciCommandSet_ReadSettings2(QsciCommandSet* self, QSettings* qs, const char* prefix);
|
||||
bool QsciCommandSet_WriteSettings2(QsciCommandSet* self, QSettings* qs, const char* prefix);
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern C */
|
||||
#endif
|
||||
|
||||
#endif
|
20
qt-restricted-extras/qscintilla/gen_qscidocument.cpp
Normal file
20
qt-restricted-extras/qscintilla/gen_qscidocument.cpp
Normal file
@ -0,0 +1,20 @@
|
||||
#include <qscidocument.h>
|
||||
#include "gen_qscidocument.h"
|
||||
#include "_cgo_export.h"
|
||||
|
||||
QsciDocument* QsciDocument_new() {
|
||||
return new QsciDocument();
|
||||
}
|
||||
|
||||
QsciDocument* QsciDocument_new2(QsciDocument* param1) {
|
||||
return new QsciDocument(*param1);
|
||||
}
|
||||
|
||||
void QsciDocument_OperatorAssign(QsciDocument* self, QsciDocument* param1) {
|
||||
self->operator=(*param1);
|
||||
}
|
||||
|
||||
void QsciDocument_Delete(QsciDocument* self) {
|
||||
delete self;
|
||||
}
|
||||
|
73
qt-restricted-extras/qscintilla/gen_qscidocument.go
Normal file
73
qt-restricted-extras/qscintilla/gen_qscidocument.go
Normal file
@ -0,0 +1,73 @@
|
||||
package qscintilla
|
||||
|
||||
/*
|
||||
|
||||
#include "gen_qscidocument.h"
|
||||
#include <stdlib.h>
|
||||
|
||||
*/
|
||||
import "C"
|
||||
|
||||
import (
|
||||
"runtime"
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
type QsciDocument struct {
|
||||
h *C.QsciDocument
|
||||
}
|
||||
|
||||
func (this *QsciDocument) cPointer() *C.QsciDocument {
|
||||
if this == nil {
|
||||
return nil
|
||||
}
|
||||
return this.h
|
||||
}
|
||||
|
||||
func (this *QsciDocument) UnsafePointer() unsafe.Pointer {
|
||||
if this == nil {
|
||||
return nil
|
||||
}
|
||||
return unsafe.Pointer(this.h)
|
||||
}
|
||||
|
||||
func newQsciDocument(h *C.QsciDocument) *QsciDocument {
|
||||
if h == nil {
|
||||
return nil
|
||||
}
|
||||
return &QsciDocument{h: h}
|
||||
}
|
||||
|
||||
func UnsafeNewQsciDocument(h unsafe.Pointer) *QsciDocument {
|
||||
return newQsciDocument((*C.QsciDocument)(h))
|
||||
}
|
||||
|
||||
// NewQsciDocument constructs a new QsciDocument object.
|
||||
func NewQsciDocument() *QsciDocument {
|
||||
ret := C.QsciDocument_new()
|
||||
return newQsciDocument(ret)
|
||||
}
|
||||
|
||||
// NewQsciDocument2 constructs a new QsciDocument object.
|
||||
func NewQsciDocument2(param1 *QsciDocument) *QsciDocument {
|
||||
ret := C.QsciDocument_new2(param1.cPointer())
|
||||
return newQsciDocument(ret)
|
||||
}
|
||||
|
||||
func (this *QsciDocument) OperatorAssign(param1 *QsciDocument) {
|
||||
C.QsciDocument_OperatorAssign(this.h, param1.cPointer())
|
||||
}
|
||||
|
||||
// Delete this object from C++ memory.
|
||||
func (this *QsciDocument) Delete() {
|
||||
C.QsciDocument_Delete(this.h)
|
||||
}
|
||||
|
||||
// GoGC adds a Go Finalizer to this pointer, so that it will be deleted
|
||||
// from C++ memory once it is unreachable from Go memory.
|
||||
func (this *QsciDocument) GoGC() {
|
||||
runtime.SetFinalizer(this, func(this *QsciDocument) {
|
||||
this.Delete()
|
||||
runtime.KeepAlive(this.h)
|
||||
})
|
||||
}
|
31
qt-restricted-extras/qscintilla/gen_qscidocument.h
Normal file
31
qt-restricted-extras/qscintilla/gen_qscidocument.h
Normal file
@ -0,0 +1,31 @@
|
||||
#ifndef GEN_QSCIDOCUMENT_H
|
||||
#define GEN_QSCIDOCUMENT_H
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||
|
||||
#include "../../libmiqt/libmiqt.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
class QsciDocument;
|
||||
#else
|
||||
typedef struct QsciDocument QsciDocument;
|
||||
#endif
|
||||
|
||||
QsciDocument* QsciDocument_new();
|
||||
QsciDocument* QsciDocument_new2(QsciDocument* param1);
|
||||
void QsciDocument_OperatorAssign(QsciDocument* self, QsciDocument* param1);
|
||||
void QsciDocument_Delete(QsciDocument* self);
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern C */
|
||||
#endif
|
||||
|
||||
#endif
|
391
qt-restricted-extras/qscintilla/gen_qscilexer.cpp
Normal file
391
qt-restricted-extras/qscintilla/gen_qscilexer.cpp
Normal file
@ -0,0 +1,391 @@
|
||||
#include <QColor>
|
||||
#include <QFont>
|
||||
#include <QList>
|
||||
#include <QMetaObject>
|
||||
#include <QSettings>
|
||||
#include <QString>
|
||||
#include <QByteArray>
|
||||
#include <cstring>
|
||||
#include <qscilexer.h>
|
||||
#include "gen_qscilexer.h"
|
||||
#include "_cgo_export.h"
|
||||
|
||||
QMetaObject* QsciLexer_MetaObject(const QsciLexer* self) {
|
||||
return (QMetaObject*) self->metaObject();
|
||||
}
|
||||
|
||||
void* QsciLexer_Metacast(QsciLexer* self, const char* param1) {
|
||||
return self->qt_metacast(param1);
|
||||
}
|
||||
|
||||
struct miqt_string QsciLexer_Tr(const char* s) {
|
||||
QString _ret = QsciLexer::tr(s);
|
||||
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
||||
QByteArray _b = _ret.toUtf8();
|
||||
struct miqt_string _ms;
|
||||
_ms.len = _b.length();
|
||||
_ms.data = static_cast<char*>(malloc(_ms.len));
|
||||
memcpy(_ms.data, _b.data(), _ms.len);
|
||||
return _ms;
|
||||
}
|
||||
|
||||
struct miqt_string QsciLexer_TrUtf8(const char* s) {
|
||||
QString _ret = QsciLexer::trUtf8(s);
|
||||
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
||||
QByteArray _b = _ret.toUtf8();
|
||||
struct miqt_string _ms;
|
||||
_ms.len = _b.length();
|
||||
_ms.data = static_cast<char*>(malloc(_ms.len));
|
||||
memcpy(_ms.data, _b.data(), _ms.len);
|
||||
return _ms;
|
||||
}
|
||||
|
||||
const char* QsciLexer_Language(const QsciLexer* self) {
|
||||
return (const char*) self->language();
|
||||
}
|
||||
|
||||
const char* QsciLexer_Lexer(const QsciLexer* self) {
|
||||
return (const char*) self->lexer();
|
||||
}
|
||||
|
||||
int QsciLexer_LexerId(const QsciLexer* self) {
|
||||
return self->lexerId();
|
||||
}
|
||||
|
||||
QsciAbstractAPIs* QsciLexer_Apis(const QsciLexer* self) {
|
||||
return self->apis();
|
||||
}
|
||||
|
||||
const char* QsciLexer_AutoCompletionFillups(const QsciLexer* self) {
|
||||
return (const char*) self->autoCompletionFillups();
|
||||
}
|
||||
|
||||
struct miqt_array* QsciLexer_AutoCompletionWordSeparators(const QsciLexer* self) {
|
||||
QStringList _ret = self->autoCompletionWordSeparators();
|
||||
// Convert QList<> from C++ memory to manually-managed C memory
|
||||
struct miqt_string* _arr = static_cast<struct miqt_string*>(malloc(sizeof(struct miqt_string) * _ret.length()));
|
||||
for (size_t i = 0, e = _ret.length(); i < e; ++i) {
|
||||
QString _lv_ret = _ret[i];
|
||||
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
||||
QByteArray _lv_b = _lv_ret.toUtf8();
|
||||
struct miqt_string _lv_ms;
|
||||
_lv_ms.len = _lv_b.length();
|
||||
_lv_ms.data = static_cast<char*>(malloc(_lv_ms.len));
|
||||
memcpy(_lv_ms.data, _lv_b.data(), _lv_ms.len);
|
||||
_arr[i] = _lv_ms;
|
||||
}
|
||||
struct miqt_array* _out = static_cast<struct miqt_array*>(malloc(sizeof(struct miqt_array)));
|
||||
_out->len = _ret.length();
|
||||
_out->data = static_cast<void*>(_arr);
|
||||
return _out;
|
||||
}
|
||||
|
||||
int QsciLexer_AutoIndentStyle(QsciLexer* self) {
|
||||
return self->autoIndentStyle();
|
||||
}
|
||||
|
||||
const char* QsciLexer_BlockEnd(const QsciLexer* self) {
|
||||
return (const char*) self->blockEnd();
|
||||
}
|
||||
|
||||
int QsciLexer_BlockLookback(const QsciLexer* self) {
|
||||
return self->blockLookback();
|
||||
}
|
||||
|
||||
const char* QsciLexer_BlockStart(const QsciLexer* self) {
|
||||
return (const char*) self->blockStart();
|
||||
}
|
||||
|
||||
const char* QsciLexer_BlockStartKeyword(const QsciLexer* self) {
|
||||
return (const char*) self->blockStartKeyword();
|
||||
}
|
||||
|
||||
int QsciLexer_BraceStyle(const QsciLexer* self) {
|
||||
return self->braceStyle();
|
||||
}
|
||||
|
||||
bool QsciLexer_CaseSensitive(const QsciLexer* self) {
|
||||
return self->caseSensitive();
|
||||
}
|
||||
|
||||
QColor* QsciLexer_Color(const QsciLexer* self, int style) {
|
||||
return new QColor(self->color(static_cast<int>(style)));
|
||||
}
|
||||
|
||||
bool QsciLexer_EolFill(const QsciLexer* self, int style) {
|
||||
return self->eolFill(static_cast<int>(style));
|
||||
}
|
||||
|
||||
QFont* QsciLexer_Font(const QsciLexer* self, int style) {
|
||||
return new QFont(self->font(static_cast<int>(style)));
|
||||
}
|
||||
|
||||
int QsciLexer_IndentationGuideView(const QsciLexer* self) {
|
||||
return self->indentationGuideView();
|
||||
}
|
||||
|
||||
const char* QsciLexer_Keywords(const QsciLexer* self, int set) {
|
||||
return (const char*) self->keywords(static_cast<int>(set));
|
||||
}
|
||||
|
||||
int QsciLexer_DefaultStyle(const QsciLexer* self) {
|
||||
return self->defaultStyle();
|
||||
}
|
||||
|
||||
struct miqt_string QsciLexer_Description(const QsciLexer* self, int style) {
|
||||
QString _ret = self->description(static_cast<int>(style));
|
||||
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
||||
QByteArray _b = _ret.toUtf8();
|
||||
struct miqt_string _ms;
|
||||
_ms.len = _b.length();
|
||||
_ms.data = static_cast<char*>(malloc(_ms.len));
|
||||
memcpy(_ms.data, _b.data(), _ms.len);
|
||||
return _ms;
|
||||
}
|
||||
|
||||
QColor* QsciLexer_Paper(const QsciLexer* self, int style) {
|
||||
return new QColor(self->paper(static_cast<int>(style)));
|
||||
}
|
||||
|
||||
QColor* QsciLexer_DefaultColor(const QsciLexer* self) {
|
||||
return new QColor(self->defaultColor());
|
||||
}
|
||||
|
||||
QColor* QsciLexer_DefaultColorWithStyle(const QsciLexer* self, int style) {
|
||||
return new QColor(self->defaultColor(static_cast<int>(style)));
|
||||
}
|
||||
|
||||
bool QsciLexer_DefaultEolFill(const QsciLexer* self, int style) {
|
||||
return self->defaultEolFill(static_cast<int>(style));
|
||||
}
|
||||
|
||||
QFont* QsciLexer_DefaultFont(const QsciLexer* self) {
|
||||
return new QFont(self->defaultFont());
|
||||
}
|
||||
|
||||
QFont* QsciLexer_DefaultFontWithStyle(const QsciLexer* self, int style) {
|
||||
return new QFont(self->defaultFont(static_cast<int>(style)));
|
||||
}
|
||||
|
||||
QColor* QsciLexer_DefaultPaper(const QsciLexer* self) {
|
||||
return new QColor(self->defaultPaper());
|
||||
}
|
||||
|
||||
QColor* QsciLexer_DefaultPaperWithStyle(const QsciLexer* self, int style) {
|
||||
return new QColor(self->defaultPaper(static_cast<int>(style)));
|
||||
}
|
||||
|
||||
QsciScintilla* QsciLexer_Editor(const QsciLexer* self) {
|
||||
return self->editor();
|
||||
}
|
||||
|
||||
void QsciLexer_SetAPIs(QsciLexer* self, QsciAbstractAPIs* apis) {
|
||||
self->setAPIs(apis);
|
||||
}
|
||||
|
||||
void QsciLexer_SetDefaultColor(QsciLexer* self, QColor* c) {
|
||||
self->setDefaultColor(*c);
|
||||
}
|
||||
|
||||
void QsciLexer_SetDefaultFont(QsciLexer* self, QFont* f) {
|
||||
self->setDefaultFont(*f);
|
||||
}
|
||||
|
||||
void QsciLexer_SetDefaultPaper(QsciLexer* self, QColor* c) {
|
||||
self->setDefaultPaper(*c);
|
||||
}
|
||||
|
||||
void QsciLexer_SetEditor(QsciLexer* self, QsciScintilla* editor) {
|
||||
self->setEditor(editor);
|
||||
}
|
||||
|
||||
bool QsciLexer_ReadSettings(QsciLexer* self, QSettings* qs) {
|
||||
return self->readSettings(*qs);
|
||||
}
|
||||
|
||||
void QsciLexer_RefreshProperties(QsciLexer* self) {
|
||||
self->refreshProperties();
|
||||
}
|
||||
|
||||
int QsciLexer_StyleBitsNeeded(const QsciLexer* self) {
|
||||
return self->styleBitsNeeded();
|
||||
}
|
||||
|
||||
const char* QsciLexer_WordCharacters(const QsciLexer* self) {
|
||||
return (const char*) self->wordCharacters();
|
||||
}
|
||||
|
||||
bool QsciLexer_WriteSettings(const QsciLexer* self, QSettings* qs) {
|
||||
return self->writeSettings(*qs);
|
||||
}
|
||||
|
||||
void QsciLexer_SetAutoIndentStyle(QsciLexer* self, int autoindentstyle) {
|
||||
self->setAutoIndentStyle(static_cast<int>(autoindentstyle));
|
||||
}
|
||||
|
||||
void QsciLexer_SetColor(QsciLexer* self, QColor* c) {
|
||||
self->setColor(*c);
|
||||
}
|
||||
|
||||
void QsciLexer_SetEolFill(QsciLexer* self, bool eoffill) {
|
||||
self->setEolFill(eoffill);
|
||||
}
|
||||
|
||||
void QsciLexer_SetFont(QsciLexer* self, QFont* f) {
|
||||
self->setFont(*f);
|
||||
}
|
||||
|
||||
void QsciLexer_SetPaper(QsciLexer* self, QColor* c) {
|
||||
self->setPaper(*c);
|
||||
}
|
||||
|
||||
void QsciLexer_ColorChanged(QsciLexer* self, QColor* c, int style) {
|
||||
self->colorChanged(*c, static_cast<int>(style));
|
||||
}
|
||||
|
||||
void QsciLexer_connect_ColorChanged(QsciLexer* self, intptr_t slot) {
|
||||
QsciLexer::connect(self, static_cast<void (QsciLexer::*)(const QColor&, int)>(&QsciLexer::colorChanged), self, [=](const QColor& c, int style) {
|
||||
const QColor& c_ret = c;
|
||||
// Cast returned reference into pointer
|
||||
QColor* sigval1 = const_cast<QColor*>(&c_ret);
|
||||
int sigval2 = style;
|
||||
miqt_exec_callback_QsciLexer_ColorChanged(slot, sigval1, sigval2);
|
||||
});
|
||||
}
|
||||
|
||||
void QsciLexer_EolFillChanged(QsciLexer* self, bool eolfilled, int style) {
|
||||
self->eolFillChanged(eolfilled, static_cast<int>(style));
|
||||
}
|
||||
|
||||
void QsciLexer_connect_EolFillChanged(QsciLexer* self, intptr_t slot) {
|
||||
QsciLexer::connect(self, static_cast<void (QsciLexer::*)(bool, int)>(&QsciLexer::eolFillChanged), self, [=](bool eolfilled, int style) {
|
||||
bool sigval1 = eolfilled;
|
||||
int sigval2 = style;
|
||||
miqt_exec_callback_QsciLexer_EolFillChanged(slot, sigval1, sigval2);
|
||||
});
|
||||
}
|
||||
|
||||
void QsciLexer_FontChanged(QsciLexer* self, QFont* f, int style) {
|
||||
self->fontChanged(*f, static_cast<int>(style));
|
||||
}
|
||||
|
||||
void QsciLexer_connect_FontChanged(QsciLexer* self, intptr_t slot) {
|
||||
QsciLexer::connect(self, static_cast<void (QsciLexer::*)(const QFont&, int)>(&QsciLexer::fontChanged), self, [=](const QFont& f, int style) {
|
||||
const QFont& f_ret = f;
|
||||
// Cast returned reference into pointer
|
||||
QFont* sigval1 = const_cast<QFont*>(&f_ret);
|
||||
int sigval2 = style;
|
||||
miqt_exec_callback_QsciLexer_FontChanged(slot, sigval1, sigval2);
|
||||
});
|
||||
}
|
||||
|
||||
void QsciLexer_PaperChanged(QsciLexer* self, QColor* c, int style) {
|
||||
self->paperChanged(*c, static_cast<int>(style));
|
||||
}
|
||||
|
||||
void QsciLexer_connect_PaperChanged(QsciLexer* self, intptr_t slot) {
|
||||
QsciLexer::connect(self, static_cast<void (QsciLexer::*)(const QColor&, int)>(&QsciLexer::paperChanged), self, [=](const QColor& c, int style) {
|
||||
const QColor& c_ret = c;
|
||||
// Cast returned reference into pointer
|
||||
QColor* sigval1 = const_cast<QColor*>(&c_ret);
|
||||
int sigval2 = style;
|
||||
miqt_exec_callback_QsciLexer_PaperChanged(slot, sigval1, sigval2);
|
||||
});
|
||||
}
|
||||
|
||||
void QsciLexer_PropertyChanged(QsciLexer* self, const char* prop, const char* val) {
|
||||
self->propertyChanged(prop, val);
|
||||
}
|
||||
|
||||
void QsciLexer_connect_PropertyChanged(QsciLexer* self, intptr_t slot) {
|
||||
QsciLexer::connect(self, static_cast<void (QsciLexer::*)(const char*, const char*)>(&QsciLexer::propertyChanged), self, [=](const char* prop, const char* val) {
|
||||
const char* sigval1 = (const char*) prop;
|
||||
const char* sigval2 = (const char*) val;
|
||||
miqt_exec_callback_QsciLexer_PropertyChanged(slot, sigval1, sigval2);
|
||||
});
|
||||
}
|
||||
|
||||
struct miqt_string QsciLexer_Tr2(const char* s, const char* c) {
|
||||
QString _ret = QsciLexer::tr(s, c);
|
||||
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
||||
QByteArray _b = _ret.toUtf8();
|
||||
struct miqt_string _ms;
|
||||
_ms.len = _b.length();
|
||||
_ms.data = static_cast<char*>(malloc(_ms.len));
|
||||
memcpy(_ms.data, _b.data(), _ms.len);
|
||||
return _ms;
|
||||
}
|
||||
|
||||
struct miqt_string QsciLexer_Tr3(const char* s, const char* c, int n) {
|
||||
QString _ret = QsciLexer::tr(s, c, static_cast<int>(n));
|
||||
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
||||
QByteArray _b = _ret.toUtf8();
|
||||
struct miqt_string _ms;
|
||||
_ms.len = _b.length();
|
||||
_ms.data = static_cast<char*>(malloc(_ms.len));
|
||||
memcpy(_ms.data, _b.data(), _ms.len);
|
||||
return _ms;
|
||||
}
|
||||
|
||||
struct miqt_string QsciLexer_TrUtf82(const char* s, const char* c) {
|
||||
QString _ret = QsciLexer::trUtf8(s, c);
|
||||
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
||||
QByteArray _b = _ret.toUtf8();
|
||||
struct miqt_string _ms;
|
||||
_ms.len = _b.length();
|
||||
_ms.data = static_cast<char*>(malloc(_ms.len));
|
||||
memcpy(_ms.data, _b.data(), _ms.len);
|
||||
return _ms;
|
||||
}
|
||||
|
||||
struct miqt_string QsciLexer_TrUtf83(const char* s, const char* c, int n) {
|
||||
QString _ret = QsciLexer::trUtf8(s, c, static_cast<int>(n));
|
||||
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
||||
QByteArray _b = _ret.toUtf8();
|
||||
struct miqt_string _ms;
|
||||
_ms.len = _b.length();
|
||||
_ms.data = static_cast<char*>(malloc(_ms.len));
|
||||
memcpy(_ms.data, _b.data(), _ms.len);
|
||||
return _ms;
|
||||
}
|
||||
|
||||
const char* QsciLexer_BlockEnd1(const QsciLexer* self, int* style) {
|
||||
return (const char*) self->blockEnd(static_cast<int*>(style));
|
||||
}
|
||||
|
||||
const char* QsciLexer_BlockStart1(const QsciLexer* self, int* style) {
|
||||
return (const char*) self->blockStart(static_cast<int*>(style));
|
||||
}
|
||||
|
||||
const char* QsciLexer_BlockStartKeyword1(const QsciLexer* self, int* style) {
|
||||
return (const char*) self->blockStartKeyword(static_cast<int*>(style));
|
||||
}
|
||||
|
||||
bool QsciLexer_ReadSettings2(QsciLexer* self, QSettings* qs, const char* prefix) {
|
||||
return self->readSettings(*qs, prefix);
|
||||
}
|
||||
|
||||
bool QsciLexer_WriteSettings2(const QsciLexer* self, QSettings* qs, const char* prefix) {
|
||||
return self->writeSettings(*qs, prefix);
|
||||
}
|
||||
|
||||
void QsciLexer_SetColor2(QsciLexer* self, QColor* c, int style) {
|
||||
self->setColor(*c, static_cast<int>(style));
|
||||
}
|
||||
|
||||
void QsciLexer_SetEolFill2(QsciLexer* self, bool eoffill, int style) {
|
||||
self->setEolFill(eoffill, static_cast<int>(style));
|
||||
}
|
||||
|
||||
void QsciLexer_SetFont2(QsciLexer* self, QFont* f, int style) {
|
||||
self->setFont(*f, static_cast<int>(style));
|
||||
}
|
||||
|
||||
void QsciLexer_SetPaper2(QsciLexer* self, QColor* c, int style) {
|
||||
self->setPaper(*c, static_cast<int>(style));
|
||||
}
|
||||
|
||||
void QsciLexer_Delete(QsciLexer* self) {
|
||||
delete self;
|
||||
}
|
||||
|
512
qt-restricted-extras/qscintilla/gen_qscilexer.go
Normal file
512
qt-restricted-extras/qscintilla/gen_qscilexer.go
Normal file
@ -0,0 +1,512 @@
|
||||
package qscintilla
|
||||
|
||||
/*
|
||||
|
||||
#include "gen_qscilexer.h"
|
||||
#include <stdlib.h>
|
||||
|
||||
*/
|
||||
import "C"
|
||||
|
||||
import (
|
||||
"github.com/mappu/miqt/qt"
|
||||
"runtime"
|
||||
"runtime/cgo"
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
type QsciLexer struct {
|
||||
h *C.QsciLexer
|
||||
*qt.QObject
|
||||
}
|
||||
|
||||
func (this *QsciLexer) cPointer() *C.QsciLexer {
|
||||
if this == nil {
|
||||
return nil
|
||||
}
|
||||
return this.h
|
||||
}
|
||||
|
||||
func (this *QsciLexer) UnsafePointer() unsafe.Pointer {
|
||||
if this == nil {
|
||||
return nil
|
||||
}
|
||||
return unsafe.Pointer(this.h)
|
||||
}
|
||||
|
||||
func newQsciLexer(h *C.QsciLexer) *QsciLexer {
|
||||
if h == nil {
|
||||
return nil
|
||||
}
|
||||
return &QsciLexer{h: h, QObject: qt.UnsafeNewQObject(unsafe.Pointer(h))}
|
||||
}
|
||||
|
||||
func UnsafeNewQsciLexer(h unsafe.Pointer) *QsciLexer {
|
||||
return newQsciLexer((*C.QsciLexer)(h))
|
||||
}
|
||||
|
||||
func (this *QsciLexer) MetaObject() *qt.QMetaObject {
|
||||
return qt.UnsafeNewQMetaObject(unsafe.Pointer(C.QsciLexer_MetaObject(this.h)))
|
||||
}
|
||||
|
||||
func (this *QsciLexer) Metacast(param1 string) unsafe.Pointer {
|
||||
param1_Cstring := C.CString(param1)
|
||||
defer C.free(unsafe.Pointer(param1_Cstring))
|
||||
return (unsafe.Pointer)(C.QsciLexer_Metacast(this.h, param1_Cstring))
|
||||
}
|
||||
|
||||
func QsciLexer_Tr(s string) string {
|
||||
s_Cstring := C.CString(s)
|
||||
defer C.free(unsafe.Pointer(s_Cstring))
|
||||
var _ms C.struct_miqt_string = C.QsciLexer_Tr(s_Cstring)
|
||||
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
||||
C.free(unsafe.Pointer(_ms.data))
|
||||
return _ret
|
||||
}
|
||||
|
||||
func QsciLexer_TrUtf8(s string) string {
|
||||
s_Cstring := C.CString(s)
|
||||
defer C.free(unsafe.Pointer(s_Cstring))
|
||||
var _ms C.struct_miqt_string = C.QsciLexer_TrUtf8(s_Cstring)
|
||||
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
||||
C.free(unsafe.Pointer(_ms.data))
|
||||
return _ret
|
||||
}
|
||||
|
||||
func (this *QsciLexer) Language() string {
|
||||
_ret := C.QsciLexer_Language(this.h)
|
||||
return C.GoString(_ret)
|
||||
}
|
||||
|
||||
func (this *QsciLexer) Lexer() string {
|
||||
_ret := C.QsciLexer_Lexer(this.h)
|
||||
return C.GoString(_ret)
|
||||
}
|
||||
|
||||
func (this *QsciLexer) LexerId() int {
|
||||
return (int)(C.QsciLexer_LexerId(this.h))
|
||||
}
|
||||
|
||||
func (this *QsciLexer) Apis() *QsciAbstractAPIs {
|
||||
return UnsafeNewQsciAbstractAPIs(unsafe.Pointer(C.QsciLexer_Apis(this.h)))
|
||||
}
|
||||
|
||||
func (this *QsciLexer) AutoCompletionFillups() string {
|
||||
_ret := C.QsciLexer_AutoCompletionFillups(this.h)
|
||||
return C.GoString(_ret)
|
||||
}
|
||||
|
||||
func (this *QsciLexer) AutoCompletionWordSeparators() []string {
|
||||
var _ma *C.struct_miqt_array = C.QsciLexer_AutoCompletionWordSeparators(this.h)
|
||||
_ret := make([]string, int(_ma.len))
|
||||
_outCast := (*[0xffff]C.struct_miqt_string)(unsafe.Pointer(_ma.data)) // hey ya
|
||||
for i := 0; i < int(_ma.len); i++ {
|
||||
var _lv_ms C.struct_miqt_string = _outCast[i]
|
||||
_lv_ret := C.GoStringN(_lv_ms.data, C.int(int64(_lv_ms.len)))
|
||||
C.free(unsafe.Pointer(_lv_ms.data))
|
||||
_ret[i] = _lv_ret
|
||||
}
|
||||
C.free(unsafe.Pointer(_ma))
|
||||
return _ret
|
||||
}
|
||||
|
||||
func (this *QsciLexer) AutoIndentStyle() int {
|
||||
return (int)(C.QsciLexer_AutoIndentStyle(this.h))
|
||||
}
|
||||
|
||||
func (this *QsciLexer) BlockEnd() string {
|
||||
_ret := C.QsciLexer_BlockEnd(this.h)
|
||||
return C.GoString(_ret)
|
||||
}
|
||||
|
||||
func (this *QsciLexer) BlockLookback() int {
|
||||
return (int)(C.QsciLexer_BlockLookback(this.h))
|
||||
}
|
||||
|
||||
func (this *QsciLexer) BlockStart() string {
|
||||
_ret := C.QsciLexer_BlockStart(this.h)
|
||||
return C.GoString(_ret)
|
||||
}
|
||||
|
||||
func (this *QsciLexer) BlockStartKeyword() string {
|
||||
_ret := C.QsciLexer_BlockStartKeyword(this.h)
|
||||
return C.GoString(_ret)
|
||||
}
|
||||
|
||||
func (this *QsciLexer) BraceStyle() int {
|
||||
return (int)(C.QsciLexer_BraceStyle(this.h))
|
||||
}
|
||||
|
||||
func (this *QsciLexer) CaseSensitive() bool {
|
||||
return (bool)(C.QsciLexer_CaseSensitive(this.h))
|
||||
}
|
||||
|
||||
func (this *QsciLexer) Color(style int) *qt.QColor {
|
||||
_ret := C.QsciLexer_Color(this.h, (C.int)(style))
|
||||
_goptr := qt.UnsafeNewQColor(unsafe.Pointer(_ret))
|
||||
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
|
||||
return _goptr
|
||||
}
|
||||
|
||||
func (this *QsciLexer) EolFill(style int) bool {
|
||||
return (bool)(C.QsciLexer_EolFill(this.h, (C.int)(style)))
|
||||
}
|
||||
|
||||
func (this *QsciLexer) Font(style int) *qt.QFont {
|
||||
_ret := C.QsciLexer_Font(this.h, (C.int)(style))
|
||||
_goptr := qt.UnsafeNewQFont(unsafe.Pointer(_ret))
|
||||
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
|
||||
return _goptr
|
||||
}
|
||||
|
||||
func (this *QsciLexer) IndentationGuideView() int {
|
||||
return (int)(C.QsciLexer_IndentationGuideView(this.h))
|
||||
}
|
||||
|
||||
func (this *QsciLexer) Keywords(set int) string {
|
||||
_ret := C.QsciLexer_Keywords(this.h, (C.int)(set))
|
||||
return C.GoString(_ret)
|
||||
}
|
||||
|
||||
func (this *QsciLexer) DefaultStyle() int {
|
||||
return (int)(C.QsciLexer_DefaultStyle(this.h))
|
||||
}
|
||||
|
||||
func (this *QsciLexer) Description(style int) string {
|
||||
var _ms C.struct_miqt_string = C.QsciLexer_Description(this.h, (C.int)(style))
|
||||
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
||||
C.free(unsafe.Pointer(_ms.data))
|
||||
return _ret
|
||||
}
|
||||
|
||||
func (this *QsciLexer) Paper(style int) *qt.QColor {
|
||||
_ret := C.QsciLexer_Paper(this.h, (C.int)(style))
|
||||
_goptr := qt.UnsafeNewQColor(unsafe.Pointer(_ret))
|
||||
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
|
||||
return _goptr
|
||||
}
|
||||
|
||||
func (this *QsciLexer) DefaultColor() *qt.QColor {
|
||||
_ret := C.QsciLexer_DefaultColor(this.h)
|
||||
_goptr := qt.UnsafeNewQColor(unsafe.Pointer(_ret))
|
||||
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
|
||||
return _goptr
|
||||
}
|
||||
|
||||
func (this *QsciLexer) DefaultColorWithStyle(style int) *qt.QColor {
|
||||
_ret := C.QsciLexer_DefaultColorWithStyle(this.h, (C.int)(style))
|
||||
_goptr := qt.UnsafeNewQColor(unsafe.Pointer(_ret))
|
||||
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
|
||||
return _goptr
|
||||
}
|
||||
|
||||
func (this *QsciLexer) DefaultEolFill(style int) bool {
|
||||
return (bool)(C.QsciLexer_DefaultEolFill(this.h, (C.int)(style)))
|
||||
}
|
||||
|
||||
func (this *QsciLexer) DefaultFont() *qt.QFont {
|
||||
_ret := C.QsciLexer_DefaultFont(this.h)
|
||||
_goptr := qt.UnsafeNewQFont(unsafe.Pointer(_ret))
|
||||
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
|
||||
return _goptr
|
||||
}
|
||||
|
||||
func (this *QsciLexer) DefaultFontWithStyle(style int) *qt.QFont {
|
||||
_ret := C.QsciLexer_DefaultFontWithStyle(this.h, (C.int)(style))
|
||||
_goptr := qt.UnsafeNewQFont(unsafe.Pointer(_ret))
|
||||
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
|
||||
return _goptr
|
||||
}
|
||||
|
||||
func (this *QsciLexer) DefaultPaper() *qt.QColor {
|
||||
_ret := C.QsciLexer_DefaultPaper(this.h)
|
||||
_goptr := qt.UnsafeNewQColor(unsafe.Pointer(_ret))
|
||||
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
|
||||
return _goptr
|
||||
}
|
||||
|
||||
func (this *QsciLexer) DefaultPaperWithStyle(style int) *qt.QColor {
|
||||
_ret := C.QsciLexer_DefaultPaperWithStyle(this.h, (C.int)(style))
|
||||
_goptr := qt.UnsafeNewQColor(unsafe.Pointer(_ret))
|
||||
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
|
||||
return _goptr
|
||||
}
|
||||
|
||||
func (this *QsciLexer) Editor() *QsciScintilla {
|
||||
return UnsafeNewQsciScintilla(unsafe.Pointer(C.QsciLexer_Editor(this.h)))
|
||||
}
|
||||
|
||||
func (this *QsciLexer) SetAPIs(apis *QsciAbstractAPIs) {
|
||||
C.QsciLexer_SetAPIs(this.h, apis.cPointer())
|
||||
}
|
||||
|
||||
func (this *QsciLexer) SetDefaultColor(c *qt.QColor) {
|
||||
C.QsciLexer_SetDefaultColor(this.h, (*C.QColor)(c.UnsafePointer()))
|
||||
}
|
||||
|
||||
func (this *QsciLexer) SetDefaultFont(f *qt.QFont) {
|
||||
C.QsciLexer_SetDefaultFont(this.h, (*C.QFont)(f.UnsafePointer()))
|
||||
}
|
||||
|
||||
func (this *QsciLexer) SetDefaultPaper(c *qt.QColor) {
|
||||
C.QsciLexer_SetDefaultPaper(this.h, (*C.QColor)(c.UnsafePointer()))
|
||||
}
|
||||
|
||||
func (this *QsciLexer) SetEditor(editor *QsciScintilla) {
|
||||
C.QsciLexer_SetEditor(this.h, editor.cPointer())
|
||||
}
|
||||
|
||||
func (this *QsciLexer) ReadSettings(qs *qt.QSettings) bool {
|
||||
return (bool)(C.QsciLexer_ReadSettings(this.h, (*C.QSettings)(qs.UnsafePointer())))
|
||||
}
|
||||
|
||||
func (this *QsciLexer) RefreshProperties() {
|
||||
C.QsciLexer_RefreshProperties(this.h)
|
||||
}
|
||||
|
||||
func (this *QsciLexer) StyleBitsNeeded() int {
|
||||
return (int)(C.QsciLexer_StyleBitsNeeded(this.h))
|
||||
}
|
||||
|
||||
func (this *QsciLexer) WordCharacters() string {
|
||||
_ret := C.QsciLexer_WordCharacters(this.h)
|
||||
return C.GoString(_ret)
|
||||
}
|
||||
|
||||
func (this *QsciLexer) WriteSettings(qs *qt.QSettings) bool {
|
||||
return (bool)(C.QsciLexer_WriteSettings(this.h, (*C.QSettings)(qs.UnsafePointer())))
|
||||
}
|
||||
|
||||
func (this *QsciLexer) SetAutoIndentStyle(autoindentstyle int) {
|
||||
C.QsciLexer_SetAutoIndentStyle(this.h, (C.int)(autoindentstyle))
|
||||
}
|
||||
|
||||
func (this *QsciLexer) SetColor(c *qt.QColor) {
|
||||
C.QsciLexer_SetColor(this.h, (*C.QColor)(c.UnsafePointer()))
|
||||
}
|
||||
|
||||
func (this *QsciLexer) SetEolFill(eoffill bool) {
|
||||
C.QsciLexer_SetEolFill(this.h, (C.bool)(eoffill))
|
||||
}
|
||||
|
||||
func (this *QsciLexer) SetFont(f *qt.QFont) {
|
||||
C.QsciLexer_SetFont(this.h, (*C.QFont)(f.UnsafePointer()))
|
||||
}
|
||||
|
||||
func (this *QsciLexer) SetPaper(c *qt.QColor) {
|
||||
C.QsciLexer_SetPaper(this.h, (*C.QColor)(c.UnsafePointer()))
|
||||
}
|
||||
|
||||
func (this *QsciLexer) ColorChanged(c *qt.QColor, style int) {
|
||||
C.QsciLexer_ColorChanged(this.h, (*C.QColor)(c.UnsafePointer()), (C.int)(style))
|
||||
}
|
||||
func (this *QsciLexer) OnColorChanged(slot func(c *qt.QColor, style int)) {
|
||||
C.QsciLexer_connect_ColorChanged(this.h, C.intptr_t(cgo.NewHandle(slot)))
|
||||
}
|
||||
|
||||
//export miqt_exec_callback_QsciLexer_ColorChanged
|
||||
func miqt_exec_callback_QsciLexer_ColorChanged(cb C.intptr_t, c *C.QColor, style C.int) {
|
||||
gofunc, ok := cgo.Handle(cb).Value().(func(c *qt.QColor, style int))
|
||||
if !ok {
|
||||
panic("miqt: callback of non-callback type (heap corruption?)")
|
||||
}
|
||||
|
||||
// Convert all CABI parameters to Go parameters
|
||||
slotval1 := qt.UnsafeNewQColor(unsafe.Pointer(c))
|
||||
slotval2 := (int)(style)
|
||||
|
||||
gofunc(slotval1, slotval2)
|
||||
}
|
||||
|
||||
func (this *QsciLexer) EolFillChanged(eolfilled bool, style int) {
|
||||
C.QsciLexer_EolFillChanged(this.h, (C.bool)(eolfilled), (C.int)(style))
|
||||
}
|
||||
func (this *QsciLexer) OnEolFillChanged(slot func(eolfilled bool, style int)) {
|
||||
C.QsciLexer_connect_EolFillChanged(this.h, C.intptr_t(cgo.NewHandle(slot)))
|
||||
}
|
||||
|
||||
//export miqt_exec_callback_QsciLexer_EolFillChanged
|
||||
func miqt_exec_callback_QsciLexer_EolFillChanged(cb C.intptr_t, eolfilled C.bool, style C.int) {
|
||||
gofunc, ok := cgo.Handle(cb).Value().(func(eolfilled bool, style int))
|
||||
if !ok {
|
||||
panic("miqt: callback of non-callback type (heap corruption?)")
|
||||
}
|
||||
|
||||
// Convert all CABI parameters to Go parameters
|
||||
slotval1 := (bool)(eolfilled)
|
||||
|
||||
slotval2 := (int)(style)
|
||||
|
||||
gofunc(slotval1, slotval2)
|
||||
}
|
||||
|
||||
func (this *QsciLexer) FontChanged(f *qt.QFont, style int) {
|
||||
C.QsciLexer_FontChanged(this.h, (*C.QFont)(f.UnsafePointer()), (C.int)(style))
|
||||
}
|
||||
func (this *QsciLexer) OnFontChanged(slot func(f *qt.QFont, style int)) {
|
||||
C.QsciLexer_connect_FontChanged(this.h, C.intptr_t(cgo.NewHandle(slot)))
|
||||
}
|
||||
|
||||
//export miqt_exec_callback_QsciLexer_FontChanged
|
||||
func miqt_exec_callback_QsciLexer_FontChanged(cb C.intptr_t, f *C.QFont, style C.int) {
|
||||
gofunc, ok := cgo.Handle(cb).Value().(func(f *qt.QFont, style int))
|
||||
if !ok {
|
||||
panic("miqt: callback of non-callback type (heap corruption?)")
|
||||
}
|
||||
|
||||
// Convert all CABI parameters to Go parameters
|
||||
slotval1 := qt.UnsafeNewQFont(unsafe.Pointer(f))
|
||||
slotval2 := (int)(style)
|
||||
|
||||
gofunc(slotval1, slotval2)
|
||||
}
|
||||
|
||||
func (this *QsciLexer) PaperChanged(c *qt.QColor, style int) {
|
||||
C.QsciLexer_PaperChanged(this.h, (*C.QColor)(c.UnsafePointer()), (C.int)(style))
|
||||
}
|
||||
func (this *QsciLexer) OnPaperChanged(slot func(c *qt.QColor, style int)) {
|
||||
C.QsciLexer_connect_PaperChanged(this.h, C.intptr_t(cgo.NewHandle(slot)))
|
||||
}
|
||||
|
||||
//export miqt_exec_callback_QsciLexer_PaperChanged
|
||||
func miqt_exec_callback_QsciLexer_PaperChanged(cb C.intptr_t, c *C.QColor, style C.int) {
|
||||
gofunc, ok := cgo.Handle(cb).Value().(func(c *qt.QColor, style int))
|
||||
if !ok {
|
||||
panic("miqt: callback of non-callback type (heap corruption?)")
|
||||
}
|
||||
|
||||
// Convert all CABI parameters to Go parameters
|
||||
slotval1 := qt.UnsafeNewQColor(unsafe.Pointer(c))
|
||||
slotval2 := (int)(style)
|
||||
|
||||
gofunc(slotval1, slotval2)
|
||||
}
|
||||
|
||||
func (this *QsciLexer) PropertyChanged(prop string, val string) {
|
||||
prop_Cstring := C.CString(prop)
|
||||
defer C.free(unsafe.Pointer(prop_Cstring))
|
||||
val_Cstring := C.CString(val)
|
||||
defer C.free(unsafe.Pointer(val_Cstring))
|
||||
C.QsciLexer_PropertyChanged(this.h, prop_Cstring, val_Cstring)
|
||||
}
|
||||
func (this *QsciLexer) OnPropertyChanged(slot func(prop string, val string)) {
|
||||
C.QsciLexer_connect_PropertyChanged(this.h, C.intptr_t(cgo.NewHandle(slot)))
|
||||
}
|
||||
|
||||
//export miqt_exec_callback_QsciLexer_PropertyChanged
|
||||
func miqt_exec_callback_QsciLexer_PropertyChanged(cb C.intptr_t, prop *C.const_char, val *C.const_char) {
|
||||
gofunc, ok := cgo.Handle(cb).Value().(func(prop string, val string))
|
||||
if !ok {
|
||||
panic("miqt: callback of non-callback type (heap corruption?)")
|
||||
}
|
||||
|
||||
// Convert all CABI parameters to Go parameters
|
||||
prop_ret := prop
|
||||
slotval1 := C.GoString(prop_ret)
|
||||
|
||||
val_ret := val
|
||||
slotval2 := C.GoString(val_ret)
|
||||
|
||||
gofunc(slotval1, slotval2)
|
||||
}
|
||||
|
||||
func QsciLexer_Tr2(s string, c string) string {
|
||||
s_Cstring := C.CString(s)
|
||||
defer C.free(unsafe.Pointer(s_Cstring))
|
||||
c_Cstring := C.CString(c)
|
||||
defer C.free(unsafe.Pointer(c_Cstring))
|
||||
var _ms C.struct_miqt_string = C.QsciLexer_Tr2(s_Cstring, c_Cstring)
|
||||
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
||||
C.free(unsafe.Pointer(_ms.data))
|
||||
return _ret
|
||||
}
|
||||
|
||||
func QsciLexer_Tr3(s string, c string, n int) string {
|
||||
s_Cstring := C.CString(s)
|
||||
defer C.free(unsafe.Pointer(s_Cstring))
|
||||
c_Cstring := C.CString(c)
|
||||
defer C.free(unsafe.Pointer(c_Cstring))
|
||||
var _ms C.struct_miqt_string = C.QsciLexer_Tr3(s_Cstring, c_Cstring, (C.int)(n))
|
||||
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
||||
C.free(unsafe.Pointer(_ms.data))
|
||||
return _ret
|
||||
}
|
||||
|
||||
func QsciLexer_TrUtf82(s string, c string) string {
|
||||
s_Cstring := C.CString(s)
|
||||
defer C.free(unsafe.Pointer(s_Cstring))
|
||||
c_Cstring := C.CString(c)
|
||||
defer C.free(unsafe.Pointer(c_Cstring))
|
||||
var _ms C.struct_miqt_string = C.QsciLexer_TrUtf82(s_Cstring, c_Cstring)
|
||||
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
||||
C.free(unsafe.Pointer(_ms.data))
|
||||
return _ret
|
||||
}
|
||||
|
||||
func QsciLexer_TrUtf83(s string, c string, n int) string {
|
||||
s_Cstring := C.CString(s)
|
||||
defer C.free(unsafe.Pointer(s_Cstring))
|
||||
c_Cstring := C.CString(c)
|
||||
defer C.free(unsafe.Pointer(c_Cstring))
|
||||
var _ms C.struct_miqt_string = C.QsciLexer_TrUtf83(s_Cstring, c_Cstring, (C.int)(n))
|
||||
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
||||
C.free(unsafe.Pointer(_ms.data))
|
||||
return _ret
|
||||
}
|
||||
|
||||
func (this *QsciLexer) BlockEnd1(style *int) string {
|
||||
_ret := C.QsciLexer_BlockEnd1(this.h, (*C.int)(unsafe.Pointer(style)))
|
||||
return C.GoString(_ret)
|
||||
}
|
||||
|
||||
func (this *QsciLexer) BlockStart1(style *int) string {
|
||||
_ret := C.QsciLexer_BlockStart1(this.h, (*C.int)(unsafe.Pointer(style)))
|
||||
return C.GoString(_ret)
|
||||
}
|
||||
|
||||
func (this *QsciLexer) BlockStartKeyword1(style *int) string {
|
||||
_ret := C.QsciLexer_BlockStartKeyword1(this.h, (*C.int)(unsafe.Pointer(style)))
|
||||
return C.GoString(_ret)
|
||||
}
|
||||
|
||||
func (this *QsciLexer) ReadSettings2(qs *qt.QSettings, prefix string) bool {
|
||||
prefix_Cstring := C.CString(prefix)
|
||||
defer C.free(unsafe.Pointer(prefix_Cstring))
|
||||
return (bool)(C.QsciLexer_ReadSettings2(this.h, (*C.QSettings)(qs.UnsafePointer()), prefix_Cstring))
|
||||
}
|
||||
|
||||
func (this *QsciLexer) WriteSettings2(qs *qt.QSettings, prefix string) bool {
|
||||
prefix_Cstring := C.CString(prefix)
|
||||
defer C.free(unsafe.Pointer(prefix_Cstring))
|
||||
return (bool)(C.QsciLexer_WriteSettings2(this.h, (*C.QSettings)(qs.UnsafePointer()), prefix_Cstring))
|
||||
}
|
||||
|
||||
func (this *QsciLexer) SetColor2(c *qt.QColor, style int) {
|
||||
C.QsciLexer_SetColor2(this.h, (*C.QColor)(c.UnsafePointer()), (C.int)(style))
|
||||
}
|
||||
|
||||
func (this *QsciLexer) SetEolFill2(eoffill bool, style int) {
|
||||
C.QsciLexer_SetEolFill2(this.h, (C.bool)(eoffill), (C.int)(style))
|
||||
}
|
||||
|
||||
func (this *QsciLexer) SetFont2(f *qt.QFont, style int) {
|
||||
C.QsciLexer_SetFont2(this.h, (*C.QFont)(f.UnsafePointer()), (C.int)(style))
|
||||
}
|
||||
|
||||
func (this *QsciLexer) SetPaper2(c *qt.QColor, style int) {
|
||||
C.QsciLexer_SetPaper2(this.h, (*C.QColor)(c.UnsafePointer()), (C.int)(style))
|
||||
}
|
||||
|
||||
// Delete this object from C++ memory.
|
||||
func (this *QsciLexer) Delete() {
|
||||
C.QsciLexer_Delete(this.h)
|
||||
}
|
||||
|
||||
// GoGC adds a Go Finalizer to this pointer, so that it will be deleted
|
||||
// from C++ memory once it is unreachable from Go memory.
|
||||
func (this *QsciLexer) GoGC() {
|
||||
runtime.SetFinalizer(this, func(this *QsciLexer) {
|
||||
this.Delete()
|
||||
runtime.KeepAlive(this.h)
|
||||
})
|
||||
}
|
111
qt-restricted-extras/qscintilla/gen_qscilexer.h
Normal file
111
qt-restricted-extras/qscintilla/gen_qscilexer.h
Normal file
@ -0,0 +1,111 @@
|
||||
#ifndef GEN_QSCILEXER_H
|
||||
#define GEN_QSCILEXER_H
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||
|
||||
#include "../../libmiqt/libmiqt.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
class QColor;
|
||||
class QFont;
|
||||
class QMetaObject;
|
||||
class QSettings;
|
||||
class QsciAbstractAPIs;
|
||||
class QsciLexer;
|
||||
class QsciScintilla;
|
||||
#else
|
||||
typedef struct QColor QColor;
|
||||
typedef struct QFont QFont;
|
||||
typedef struct QMetaObject QMetaObject;
|
||||
typedef struct QSettings QSettings;
|
||||
typedef struct QsciAbstractAPIs QsciAbstractAPIs;
|
||||
typedef struct QsciLexer QsciLexer;
|
||||
typedef struct QsciScintilla QsciScintilla;
|
||||
#endif
|
||||
|
||||
QMetaObject* QsciLexer_MetaObject(const QsciLexer* self);
|
||||
void* QsciLexer_Metacast(QsciLexer* self, const char* param1);
|
||||
struct miqt_string QsciLexer_Tr(const char* s);
|
||||
struct miqt_string QsciLexer_TrUtf8(const char* s);
|
||||
const char* QsciLexer_Language(const QsciLexer* self);
|
||||
const char* QsciLexer_Lexer(const QsciLexer* self);
|
||||
int QsciLexer_LexerId(const QsciLexer* self);
|
||||
QsciAbstractAPIs* QsciLexer_Apis(const QsciLexer* self);
|
||||
const char* QsciLexer_AutoCompletionFillups(const QsciLexer* self);
|
||||
struct miqt_array* QsciLexer_AutoCompletionWordSeparators(const QsciLexer* self);
|
||||
int QsciLexer_AutoIndentStyle(QsciLexer* self);
|
||||
const char* QsciLexer_BlockEnd(const QsciLexer* self);
|
||||
int QsciLexer_BlockLookback(const QsciLexer* self);
|
||||
const char* QsciLexer_BlockStart(const QsciLexer* self);
|
||||
const char* QsciLexer_BlockStartKeyword(const QsciLexer* self);
|
||||
int QsciLexer_BraceStyle(const QsciLexer* self);
|
||||
bool QsciLexer_CaseSensitive(const QsciLexer* self);
|
||||
QColor* QsciLexer_Color(const QsciLexer* self, int style);
|
||||
bool QsciLexer_EolFill(const QsciLexer* self, int style);
|
||||
QFont* QsciLexer_Font(const QsciLexer* self, int style);
|
||||
int QsciLexer_IndentationGuideView(const QsciLexer* self);
|
||||
const char* QsciLexer_Keywords(const QsciLexer* self, int set);
|
||||
int QsciLexer_DefaultStyle(const QsciLexer* self);
|
||||
struct miqt_string QsciLexer_Description(const QsciLexer* self, int style);
|
||||
QColor* QsciLexer_Paper(const QsciLexer* self, int style);
|
||||
QColor* QsciLexer_DefaultColor(const QsciLexer* self);
|
||||
QColor* QsciLexer_DefaultColorWithStyle(const QsciLexer* self, int style);
|
||||
bool QsciLexer_DefaultEolFill(const QsciLexer* self, int style);
|
||||
QFont* QsciLexer_DefaultFont(const QsciLexer* self);
|
||||
QFont* QsciLexer_DefaultFontWithStyle(const QsciLexer* self, int style);
|
||||
QColor* QsciLexer_DefaultPaper(const QsciLexer* self);
|
||||
QColor* QsciLexer_DefaultPaperWithStyle(const QsciLexer* self, int style);
|
||||
QsciScintilla* QsciLexer_Editor(const QsciLexer* self);
|
||||
void QsciLexer_SetAPIs(QsciLexer* self, QsciAbstractAPIs* apis);
|
||||
void QsciLexer_SetDefaultColor(QsciLexer* self, QColor* c);
|
||||
void QsciLexer_SetDefaultFont(QsciLexer* self, QFont* f);
|
||||
void QsciLexer_SetDefaultPaper(QsciLexer* self, QColor* c);
|
||||
void QsciLexer_SetEditor(QsciLexer* self, QsciScintilla* editor);
|
||||
bool QsciLexer_ReadSettings(QsciLexer* self, QSettings* qs);
|
||||
void QsciLexer_RefreshProperties(QsciLexer* self);
|
||||
int QsciLexer_StyleBitsNeeded(const QsciLexer* self);
|
||||
const char* QsciLexer_WordCharacters(const QsciLexer* self);
|
||||
bool QsciLexer_WriteSettings(const QsciLexer* self, QSettings* qs);
|
||||
void QsciLexer_SetAutoIndentStyle(QsciLexer* self, int autoindentstyle);
|
||||
void QsciLexer_SetColor(QsciLexer* self, QColor* c);
|
||||
void QsciLexer_SetEolFill(QsciLexer* self, bool eoffill);
|
||||
void QsciLexer_SetFont(QsciLexer* self, QFont* f);
|
||||
void QsciLexer_SetPaper(QsciLexer* self, QColor* c);
|
||||
void QsciLexer_ColorChanged(QsciLexer* self, QColor* c, int style);
|
||||
void QsciLexer_connect_ColorChanged(QsciLexer* self, intptr_t slot);
|
||||
void QsciLexer_EolFillChanged(QsciLexer* self, bool eolfilled, int style);
|
||||
void QsciLexer_connect_EolFillChanged(QsciLexer* self, intptr_t slot);
|
||||
void QsciLexer_FontChanged(QsciLexer* self, QFont* f, int style);
|
||||
void QsciLexer_connect_FontChanged(QsciLexer* self, intptr_t slot);
|
||||
void QsciLexer_PaperChanged(QsciLexer* self, QColor* c, int style);
|
||||
void QsciLexer_connect_PaperChanged(QsciLexer* self, intptr_t slot);
|
||||
void QsciLexer_PropertyChanged(QsciLexer* self, const char* prop, const char* val);
|
||||
void QsciLexer_connect_PropertyChanged(QsciLexer* self, intptr_t slot);
|
||||
struct miqt_string QsciLexer_Tr2(const char* s, const char* c);
|
||||
struct miqt_string QsciLexer_Tr3(const char* s, const char* c, int n);
|
||||
struct miqt_string QsciLexer_TrUtf82(const char* s, const char* c);
|
||||
struct miqt_string QsciLexer_TrUtf83(const char* s, const char* c, int n);
|
||||
const char* QsciLexer_BlockEnd1(const QsciLexer* self, int* style);
|
||||
const char* QsciLexer_BlockStart1(const QsciLexer* self, int* style);
|
||||
const char* QsciLexer_BlockStartKeyword1(const QsciLexer* self, int* style);
|
||||
bool QsciLexer_ReadSettings2(QsciLexer* self, QSettings* qs, const char* prefix);
|
||||
bool QsciLexer_WriteSettings2(const QsciLexer* self, QSettings* qs, const char* prefix);
|
||||
void QsciLexer_SetColor2(QsciLexer* self, QColor* c, int style);
|
||||
void QsciLexer_SetEolFill2(QsciLexer* self, bool eoffill, int style);
|
||||
void QsciLexer_SetFont2(QsciLexer* self, QFont* f, int style);
|
||||
void QsciLexer_SetPaper2(QsciLexer* self, QColor* c, int style);
|
||||
void QsciLexer_Delete(QsciLexer* self);
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern C */
|
||||
#endif
|
||||
|
||||
#endif
|
156
qt-restricted-extras/qscintilla/gen_qscilexeravs.cpp
Normal file
156
qt-restricted-extras/qscintilla/gen_qscilexeravs.cpp
Normal file
@ -0,0 +1,156 @@
|
||||
#include <QColor>
|
||||
#include <QFont>
|
||||
#include <QMetaObject>
|
||||
#include <QObject>
|
||||
#include <QString>
|
||||
#include <QByteArray>
|
||||
#include <cstring>
|
||||
#include <qscilexeravs.h>
|
||||
#include "gen_qscilexeravs.h"
|
||||
#include "_cgo_export.h"
|
||||
|
||||
QsciLexerAVS* QsciLexerAVS_new() {
|
||||
return new QsciLexerAVS();
|
||||
}
|
||||
|
||||
QsciLexerAVS* QsciLexerAVS_new2(QObject* parent) {
|
||||
return new QsciLexerAVS(parent);
|
||||
}
|
||||
|
||||
QMetaObject* QsciLexerAVS_MetaObject(const QsciLexerAVS* self) {
|
||||
return (QMetaObject*) self->metaObject();
|
||||
}
|
||||
|
||||
void* QsciLexerAVS_Metacast(QsciLexerAVS* self, const char* param1) {
|
||||
return self->qt_metacast(param1);
|
||||
}
|
||||
|
||||
struct miqt_string QsciLexerAVS_Tr(const char* s) {
|
||||
QString _ret = QsciLexerAVS::tr(s);
|
||||
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
||||
QByteArray _b = _ret.toUtf8();
|
||||
struct miqt_string _ms;
|
||||
_ms.len = _b.length();
|
||||
_ms.data = static_cast<char*>(malloc(_ms.len));
|
||||
memcpy(_ms.data, _b.data(), _ms.len);
|
||||
return _ms;
|
||||
}
|
||||
|
||||
struct miqt_string QsciLexerAVS_TrUtf8(const char* s) {
|
||||
QString _ret = QsciLexerAVS::trUtf8(s);
|
||||
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
||||
QByteArray _b = _ret.toUtf8();
|
||||
struct miqt_string _ms;
|
||||
_ms.len = _b.length();
|
||||
_ms.data = static_cast<char*>(malloc(_ms.len));
|
||||
memcpy(_ms.data, _b.data(), _ms.len);
|
||||
return _ms;
|
||||
}
|
||||
|
||||
const char* QsciLexerAVS_Language(const QsciLexerAVS* self) {
|
||||
return (const char*) self->language();
|
||||
}
|
||||
|
||||
const char* QsciLexerAVS_Lexer(const QsciLexerAVS* self) {
|
||||
return (const char*) self->lexer();
|
||||
}
|
||||
|
||||
int QsciLexerAVS_BraceStyle(const QsciLexerAVS* self) {
|
||||
return self->braceStyle();
|
||||
}
|
||||
|
||||
const char* QsciLexerAVS_WordCharacters(const QsciLexerAVS* self) {
|
||||
return (const char*) self->wordCharacters();
|
||||
}
|
||||
|
||||
QColor* QsciLexerAVS_DefaultColor(const QsciLexerAVS* self, int style) {
|
||||
return new QColor(self->defaultColor(static_cast<int>(style)));
|
||||
}
|
||||
|
||||
QFont* QsciLexerAVS_DefaultFont(const QsciLexerAVS* self, int style) {
|
||||
return new QFont(self->defaultFont(static_cast<int>(style)));
|
||||
}
|
||||
|
||||
const char* QsciLexerAVS_Keywords(const QsciLexerAVS* self, int set) {
|
||||
return (const char*) self->keywords(static_cast<int>(set));
|
||||
}
|
||||
|
||||
struct miqt_string QsciLexerAVS_Description(const QsciLexerAVS* self, int style) {
|
||||
QString _ret = self->description(static_cast<int>(style));
|
||||
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
||||
QByteArray _b = _ret.toUtf8();
|
||||
struct miqt_string _ms;
|
||||
_ms.len = _b.length();
|
||||
_ms.data = static_cast<char*>(malloc(_ms.len));
|
||||
memcpy(_ms.data, _b.data(), _ms.len);
|
||||
return _ms;
|
||||
}
|
||||
|
||||
void QsciLexerAVS_RefreshProperties(QsciLexerAVS* self) {
|
||||
self->refreshProperties();
|
||||
}
|
||||
|
||||
bool QsciLexerAVS_FoldComments(const QsciLexerAVS* self) {
|
||||
return self->foldComments();
|
||||
}
|
||||
|
||||
bool QsciLexerAVS_FoldCompact(const QsciLexerAVS* self) {
|
||||
return self->foldCompact();
|
||||
}
|
||||
|
||||
void QsciLexerAVS_SetFoldComments(QsciLexerAVS* self, bool fold) {
|
||||
self->setFoldComments(fold);
|
||||
}
|
||||
|
||||
void QsciLexerAVS_SetFoldCompact(QsciLexerAVS* self, bool fold) {
|
||||
self->setFoldCompact(fold);
|
||||
}
|
||||
|
||||
struct miqt_string QsciLexerAVS_Tr2(const char* s, const char* c) {
|
||||
QString _ret = QsciLexerAVS::tr(s, c);
|
||||
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
||||
QByteArray _b = _ret.toUtf8();
|
||||
struct miqt_string _ms;
|
||||
_ms.len = _b.length();
|
||||
_ms.data = static_cast<char*>(malloc(_ms.len));
|
||||
memcpy(_ms.data, _b.data(), _ms.len);
|
||||
return _ms;
|
||||
}
|
||||
|
||||
struct miqt_string QsciLexerAVS_Tr3(const char* s, const char* c, int n) {
|
||||
QString _ret = QsciLexerAVS::tr(s, c, static_cast<int>(n));
|
||||
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
||||
QByteArray _b = _ret.toUtf8();
|
||||
struct miqt_string _ms;
|
||||
_ms.len = _b.length();
|
||||
_ms.data = static_cast<char*>(malloc(_ms.len));
|
||||
memcpy(_ms.data, _b.data(), _ms.len);
|
||||
return _ms;
|
||||
}
|
||||
|
||||
struct miqt_string QsciLexerAVS_TrUtf82(const char* s, const char* c) {
|
||||
QString _ret = QsciLexerAVS::trUtf8(s, c);
|
||||
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
||||
QByteArray _b = _ret.toUtf8();
|
||||
struct miqt_string _ms;
|
||||
_ms.len = _b.length();
|
||||
_ms.data = static_cast<char*>(malloc(_ms.len));
|
||||
memcpy(_ms.data, _b.data(), _ms.len);
|
||||
return _ms;
|
||||
}
|
||||
|
||||
struct miqt_string QsciLexerAVS_TrUtf83(const char* s, const char* c, int n) {
|
||||
QString _ret = QsciLexerAVS::trUtf8(s, c, static_cast<int>(n));
|
||||
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
||||
QByteArray _b = _ret.toUtf8();
|
||||
struct miqt_string _ms;
|
||||
_ms.len = _b.length();
|
||||
_ms.data = static_cast<char*>(malloc(_ms.len));
|
||||
memcpy(_ms.data, _b.data(), _ms.len);
|
||||
return _ms;
|
||||
}
|
||||
|
||||
void QsciLexerAVS_Delete(QsciLexerAVS* self) {
|
||||
delete self;
|
||||
}
|
||||
|
228
qt-restricted-extras/qscintilla/gen_qscilexeravs.go
Normal file
228
qt-restricted-extras/qscintilla/gen_qscilexeravs.go
Normal file
@ -0,0 +1,228 @@
|
||||
package qscintilla
|
||||
|
||||
/*
|
||||
|
||||
#include "gen_qscilexeravs.h"
|
||||
#include <stdlib.h>
|
||||
|
||||
*/
|
||||
import "C"
|
||||
|
||||
import (
|
||||
"github.com/mappu/miqt/qt"
|
||||
"runtime"
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
type QsciLexerAVS__ int
|
||||
|
||||
const (
|
||||
QsciLexerAVS__Default QsciLexerAVS__ = 0
|
||||
QsciLexerAVS__BlockComment QsciLexerAVS__ = 1
|
||||
QsciLexerAVS__NestedBlockComment QsciLexerAVS__ = 2
|
||||
QsciLexerAVS__LineComment QsciLexerAVS__ = 3
|
||||
QsciLexerAVS__Number QsciLexerAVS__ = 4
|
||||
QsciLexerAVS__Operator QsciLexerAVS__ = 5
|
||||
QsciLexerAVS__Identifier QsciLexerAVS__ = 6
|
||||
QsciLexerAVS__String QsciLexerAVS__ = 7
|
||||
QsciLexerAVS__TripleString QsciLexerAVS__ = 8
|
||||
QsciLexerAVS__Keyword QsciLexerAVS__ = 9
|
||||
QsciLexerAVS__Filter QsciLexerAVS__ = 10
|
||||
QsciLexerAVS__Plugin QsciLexerAVS__ = 11
|
||||
QsciLexerAVS__Function QsciLexerAVS__ = 12
|
||||
QsciLexerAVS__ClipProperty QsciLexerAVS__ = 13
|
||||
QsciLexerAVS__KeywordSet6 QsciLexerAVS__ = 14
|
||||
)
|
||||
|
||||
type QsciLexerAVS struct {
|
||||
h *C.QsciLexerAVS
|
||||
*QsciLexer
|
||||
}
|
||||
|
||||
func (this *QsciLexerAVS) cPointer() *C.QsciLexerAVS {
|
||||
if this == nil {
|
||||
return nil
|
||||
}
|
||||
return this.h
|
||||
}
|
||||
|
||||
func (this *QsciLexerAVS) UnsafePointer() unsafe.Pointer {
|
||||
if this == nil {
|
||||
return nil
|
||||
}
|
||||
return unsafe.Pointer(this.h)
|
||||
}
|
||||
|
||||
func newQsciLexerAVS(h *C.QsciLexerAVS) *QsciLexerAVS {
|
||||
if h == nil {
|
||||
return nil
|
||||
}
|
||||
return &QsciLexerAVS{h: h, QsciLexer: UnsafeNewQsciLexer(unsafe.Pointer(h))}
|
||||
}
|
||||
|
||||
func UnsafeNewQsciLexerAVS(h unsafe.Pointer) *QsciLexerAVS {
|
||||
return newQsciLexerAVS((*C.QsciLexerAVS)(h))
|
||||
}
|
||||
|
||||
// NewQsciLexerAVS constructs a new QsciLexerAVS object.
|
||||
func NewQsciLexerAVS() *QsciLexerAVS {
|
||||
ret := C.QsciLexerAVS_new()
|
||||
return newQsciLexerAVS(ret)
|
||||
}
|
||||
|
||||
// NewQsciLexerAVS2 constructs a new QsciLexerAVS object.
|
||||
func NewQsciLexerAVS2(parent *qt.QObject) *QsciLexerAVS {
|
||||
ret := C.QsciLexerAVS_new2((*C.QObject)(parent.UnsafePointer()))
|
||||
return newQsciLexerAVS(ret)
|
||||
}
|
||||
|
||||
func (this *QsciLexerAVS) MetaObject() *qt.QMetaObject {
|
||||
return qt.UnsafeNewQMetaObject(unsafe.Pointer(C.QsciLexerAVS_MetaObject(this.h)))
|
||||
}
|
||||
|
||||
func (this *QsciLexerAVS) Metacast(param1 string) unsafe.Pointer {
|
||||
param1_Cstring := C.CString(param1)
|
||||
defer C.free(unsafe.Pointer(param1_Cstring))
|
||||
return (unsafe.Pointer)(C.QsciLexerAVS_Metacast(this.h, param1_Cstring))
|
||||
}
|
||||
|
||||
func QsciLexerAVS_Tr(s string) string {
|
||||
s_Cstring := C.CString(s)
|
||||
defer C.free(unsafe.Pointer(s_Cstring))
|
||||
var _ms C.struct_miqt_string = C.QsciLexerAVS_Tr(s_Cstring)
|
||||
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
||||
C.free(unsafe.Pointer(_ms.data))
|
||||
return _ret
|
||||
}
|
||||
|
||||
func QsciLexerAVS_TrUtf8(s string) string {
|
||||
s_Cstring := C.CString(s)
|
||||
defer C.free(unsafe.Pointer(s_Cstring))
|
||||
var _ms C.struct_miqt_string = C.QsciLexerAVS_TrUtf8(s_Cstring)
|
||||
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
||||
C.free(unsafe.Pointer(_ms.data))
|
||||
return _ret
|
||||
}
|
||||
|
||||
func (this *QsciLexerAVS) Language() string {
|
||||
_ret := C.QsciLexerAVS_Language(this.h)
|
||||
return C.GoString(_ret)
|
||||
}
|
||||
|
||||
func (this *QsciLexerAVS) Lexer() string {
|
||||
_ret := C.QsciLexerAVS_Lexer(this.h)
|
||||
return C.GoString(_ret)
|
||||
}
|
||||
|
||||
func (this *QsciLexerAVS) BraceStyle() int {
|
||||
return (int)(C.QsciLexerAVS_BraceStyle(this.h))
|
||||
}
|
||||
|
||||
func (this *QsciLexerAVS) WordCharacters() string {
|
||||
_ret := C.QsciLexerAVS_WordCharacters(this.h)
|
||||
return C.GoString(_ret)
|
||||
}
|
||||
|
||||
func (this *QsciLexerAVS) DefaultColor(style int) *qt.QColor {
|
||||
_ret := C.QsciLexerAVS_DefaultColor(this.h, (C.int)(style))
|
||||
_goptr := qt.UnsafeNewQColor(unsafe.Pointer(_ret))
|
||||
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
|
||||
return _goptr
|
||||
}
|
||||
|
||||
func (this *QsciLexerAVS) DefaultFont(style int) *qt.QFont {
|
||||
_ret := C.QsciLexerAVS_DefaultFont(this.h, (C.int)(style))
|
||||
_goptr := qt.UnsafeNewQFont(unsafe.Pointer(_ret))
|
||||
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
|
||||
return _goptr
|
||||
}
|
||||
|
||||
func (this *QsciLexerAVS) Keywords(set int) string {
|
||||
_ret := C.QsciLexerAVS_Keywords(this.h, (C.int)(set))
|
||||
return C.GoString(_ret)
|
||||
}
|
||||
|
||||
func (this *QsciLexerAVS) Description(style int) string {
|
||||
var _ms C.struct_miqt_string = C.QsciLexerAVS_Description(this.h, (C.int)(style))
|
||||
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
||||
C.free(unsafe.Pointer(_ms.data))
|
||||
return _ret
|
||||
}
|
||||
|
||||
func (this *QsciLexerAVS) RefreshProperties() {
|
||||
C.QsciLexerAVS_RefreshProperties(this.h)
|
||||
}
|
||||
|
||||
func (this *QsciLexerAVS) FoldComments() bool {
|
||||
return (bool)(C.QsciLexerAVS_FoldComments(this.h))
|
||||
}
|
||||
|
||||
func (this *QsciLexerAVS) FoldCompact() bool {
|
||||
return (bool)(C.QsciLexerAVS_FoldCompact(this.h))
|
||||
}
|
||||
|
||||
func (this *QsciLexerAVS) SetFoldComments(fold bool) {
|
||||
C.QsciLexerAVS_SetFoldComments(this.h, (C.bool)(fold))
|
||||
}
|
||||
|
||||
func (this *QsciLexerAVS) SetFoldCompact(fold bool) {
|
||||
C.QsciLexerAVS_SetFoldCompact(this.h, (C.bool)(fold))
|
||||
}
|
||||
|
||||
func QsciLexerAVS_Tr2(s string, c string) string {
|
||||
s_Cstring := C.CString(s)
|
||||
defer C.free(unsafe.Pointer(s_Cstring))
|
||||
c_Cstring := C.CString(c)
|
||||
defer C.free(unsafe.Pointer(c_Cstring))
|
||||
var _ms C.struct_miqt_string = C.QsciLexerAVS_Tr2(s_Cstring, c_Cstring)
|
||||
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
||||
C.free(unsafe.Pointer(_ms.data))
|
||||
return _ret
|
||||
}
|
||||
|
||||
func QsciLexerAVS_Tr3(s string, c string, n int) string {
|
||||
s_Cstring := C.CString(s)
|
||||
defer C.free(unsafe.Pointer(s_Cstring))
|
||||
c_Cstring := C.CString(c)
|
||||
defer C.free(unsafe.Pointer(c_Cstring))
|
||||
var _ms C.struct_miqt_string = C.QsciLexerAVS_Tr3(s_Cstring, c_Cstring, (C.int)(n))
|
||||
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
||||
C.free(unsafe.Pointer(_ms.data))
|
||||
return _ret
|
||||
}
|
||||
|
||||
func QsciLexerAVS_TrUtf82(s string, c string) string {
|
||||
s_Cstring := C.CString(s)
|
||||
defer C.free(unsafe.Pointer(s_Cstring))
|
||||
c_Cstring := C.CString(c)
|
||||
defer C.free(unsafe.Pointer(c_Cstring))
|
||||
var _ms C.struct_miqt_string = C.QsciLexerAVS_TrUtf82(s_Cstring, c_Cstring)
|
||||
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
||||
C.free(unsafe.Pointer(_ms.data))
|
||||
return _ret
|
||||
}
|
||||
|
||||
func QsciLexerAVS_TrUtf83(s string, c string, n int) string {
|
||||
s_Cstring := C.CString(s)
|
||||
defer C.free(unsafe.Pointer(s_Cstring))
|
||||
c_Cstring := C.CString(c)
|
||||
defer C.free(unsafe.Pointer(c_Cstring))
|
||||
var _ms C.struct_miqt_string = C.QsciLexerAVS_TrUtf83(s_Cstring, c_Cstring, (C.int)(n))
|
||||
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
||||
C.free(unsafe.Pointer(_ms.data))
|
||||
return _ret
|
||||
}
|
||||
|
||||
// Delete this object from C++ memory.
|
||||
func (this *QsciLexerAVS) Delete() {
|
||||
C.QsciLexerAVS_Delete(this.h)
|
||||
}
|
||||
|
||||
// GoGC adds a Go Finalizer to this pointer, so that it will be deleted
|
||||
// from C++ memory once it is unreachable from Go memory.
|
||||
func (this *QsciLexerAVS) GoGC() {
|
||||
runtime.SetFinalizer(this, func(this *QsciLexerAVS) {
|
||||
this.Delete()
|
||||
runtime.KeepAlive(this.h)
|
||||
})
|
||||
}
|
59
qt-restricted-extras/qscintilla/gen_qscilexeravs.h
Normal file
59
qt-restricted-extras/qscintilla/gen_qscilexeravs.h
Normal file
@ -0,0 +1,59 @@
|
||||
#ifndef GEN_QSCILEXERAVS_H
|
||||
#define GEN_QSCILEXERAVS_H
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||
|
||||
#include "../../libmiqt/libmiqt.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
class QColor;
|
||||
class QFont;
|
||||
class QMetaObject;
|
||||
class QObject;
|
||||
class QsciLexerAVS;
|
||||
#else
|
||||
typedef struct QColor QColor;
|
||||
typedef struct QFont QFont;
|
||||
typedef struct QMetaObject QMetaObject;
|
||||
typedef struct QObject QObject;
|
||||
typedef struct QsciLexerAVS QsciLexerAVS;
|
||||
#endif
|
||||
|
||||
QsciLexerAVS* QsciLexerAVS_new();
|
||||
QsciLexerAVS* QsciLexerAVS_new2(QObject* parent);
|
||||
QMetaObject* QsciLexerAVS_MetaObject(const QsciLexerAVS* self);
|
||||
void* QsciLexerAVS_Metacast(QsciLexerAVS* self, const char* param1);
|
||||
struct miqt_string QsciLexerAVS_Tr(const char* s);
|
||||
struct miqt_string QsciLexerAVS_TrUtf8(const char* s);
|
||||
const char* QsciLexerAVS_Language(const QsciLexerAVS* self);
|
||||
const char* QsciLexerAVS_Lexer(const QsciLexerAVS* self);
|
||||
int QsciLexerAVS_BraceStyle(const QsciLexerAVS* self);
|
||||
const char* QsciLexerAVS_WordCharacters(const QsciLexerAVS* self);
|
||||
QColor* QsciLexerAVS_DefaultColor(const QsciLexerAVS* self, int style);
|
||||
QFont* QsciLexerAVS_DefaultFont(const QsciLexerAVS* self, int style);
|
||||
const char* QsciLexerAVS_Keywords(const QsciLexerAVS* self, int set);
|
||||
struct miqt_string QsciLexerAVS_Description(const QsciLexerAVS* self, int style);
|
||||
void QsciLexerAVS_RefreshProperties(QsciLexerAVS* self);
|
||||
bool QsciLexerAVS_FoldComments(const QsciLexerAVS* self);
|
||||
bool QsciLexerAVS_FoldCompact(const QsciLexerAVS* self);
|
||||
void QsciLexerAVS_SetFoldComments(QsciLexerAVS* self, bool fold);
|
||||
void QsciLexerAVS_SetFoldCompact(QsciLexerAVS* self, bool fold);
|
||||
struct miqt_string QsciLexerAVS_Tr2(const char* s, const char* c);
|
||||
struct miqt_string QsciLexerAVS_Tr3(const char* s, const char* c, int n);
|
||||
struct miqt_string QsciLexerAVS_TrUtf82(const char* s, const char* c);
|
||||
struct miqt_string QsciLexerAVS_TrUtf83(const char* s, const char* c, int n);
|
||||
void QsciLexerAVS_Delete(QsciLexerAVS* self);
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern C */
|
||||
#endif
|
||||
|
||||
#endif
|
164
qt-restricted-extras/qscintilla/gen_qscilexerbash.cpp
Normal file
164
qt-restricted-extras/qscintilla/gen_qscilexerbash.cpp
Normal file
@ -0,0 +1,164 @@
|
||||
#include <QColor>
|
||||
#include <QFont>
|
||||
#include <QMetaObject>
|
||||
#include <QObject>
|
||||
#include <QString>
|
||||
#include <QByteArray>
|
||||
#include <cstring>
|
||||
#include <qscilexerbash.h>
|
||||
#include "gen_qscilexerbash.h"
|
||||
#include "_cgo_export.h"
|
||||
|
||||
QsciLexerBash* QsciLexerBash_new() {
|
||||
return new QsciLexerBash();
|
||||
}
|
||||
|
||||
QsciLexerBash* QsciLexerBash_new2(QObject* parent) {
|
||||
return new QsciLexerBash(parent);
|
||||
}
|
||||
|
||||
QMetaObject* QsciLexerBash_MetaObject(const QsciLexerBash* self) {
|
||||
return (QMetaObject*) self->metaObject();
|
||||
}
|
||||
|
||||
void* QsciLexerBash_Metacast(QsciLexerBash* self, const char* param1) {
|
||||
return self->qt_metacast(param1);
|
||||
}
|
||||
|
||||
struct miqt_string QsciLexerBash_Tr(const char* s) {
|
||||
QString _ret = QsciLexerBash::tr(s);
|
||||
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
||||
QByteArray _b = _ret.toUtf8();
|
||||
struct miqt_string _ms;
|
||||
_ms.len = _b.length();
|
||||
_ms.data = static_cast<char*>(malloc(_ms.len));
|
||||
memcpy(_ms.data, _b.data(), _ms.len);
|
||||
return _ms;
|
||||
}
|
||||
|
||||
struct miqt_string QsciLexerBash_TrUtf8(const char* s) {
|
||||
QString _ret = QsciLexerBash::trUtf8(s);
|
||||
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
||||
QByteArray _b = _ret.toUtf8();
|
||||
struct miqt_string _ms;
|
||||
_ms.len = _b.length();
|
||||
_ms.data = static_cast<char*>(malloc(_ms.len));
|
||||
memcpy(_ms.data, _b.data(), _ms.len);
|
||||
return _ms;
|
||||
}
|
||||
|
||||
const char* QsciLexerBash_Language(const QsciLexerBash* self) {
|
||||
return (const char*) self->language();
|
||||
}
|
||||
|
||||
const char* QsciLexerBash_Lexer(const QsciLexerBash* self) {
|
||||
return (const char*) self->lexer();
|
||||
}
|
||||
|
||||
int QsciLexerBash_BraceStyle(const QsciLexerBash* self) {
|
||||
return self->braceStyle();
|
||||
}
|
||||
|
||||
const char* QsciLexerBash_WordCharacters(const QsciLexerBash* self) {
|
||||
return (const char*) self->wordCharacters();
|
||||
}
|
||||
|
||||
QColor* QsciLexerBash_DefaultColor(const QsciLexerBash* self, int style) {
|
||||
return new QColor(self->defaultColor(static_cast<int>(style)));
|
||||
}
|
||||
|
||||
bool QsciLexerBash_DefaultEolFill(const QsciLexerBash* self, int style) {
|
||||
return self->defaultEolFill(static_cast<int>(style));
|
||||
}
|
||||
|
||||
QFont* QsciLexerBash_DefaultFont(const QsciLexerBash* self, int style) {
|
||||
return new QFont(self->defaultFont(static_cast<int>(style)));
|
||||
}
|
||||
|
||||
QColor* QsciLexerBash_DefaultPaper(const QsciLexerBash* self, int style) {
|
||||
return new QColor(self->defaultPaper(static_cast<int>(style)));
|
||||
}
|
||||
|
||||
const char* QsciLexerBash_Keywords(const QsciLexerBash* self, int set) {
|
||||
return (const char*) self->keywords(static_cast<int>(set));
|
||||
}
|
||||
|
||||
struct miqt_string QsciLexerBash_Description(const QsciLexerBash* self, int style) {
|
||||
QString _ret = self->description(static_cast<int>(style));
|
||||
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
||||
QByteArray _b = _ret.toUtf8();
|
||||
struct miqt_string _ms;
|
||||
_ms.len = _b.length();
|
||||
_ms.data = static_cast<char*>(malloc(_ms.len));
|
||||
memcpy(_ms.data, _b.data(), _ms.len);
|
||||
return _ms;
|
||||
}
|
||||
|
||||
void QsciLexerBash_RefreshProperties(QsciLexerBash* self) {
|
||||
self->refreshProperties();
|
||||
}
|
||||
|
||||
bool QsciLexerBash_FoldComments(const QsciLexerBash* self) {
|
||||
return self->foldComments();
|
||||
}
|
||||
|
||||
bool QsciLexerBash_FoldCompact(const QsciLexerBash* self) {
|
||||
return self->foldCompact();
|
||||
}
|
||||
|
||||
void QsciLexerBash_SetFoldComments(QsciLexerBash* self, bool fold) {
|
||||
self->setFoldComments(fold);
|
||||
}
|
||||
|
||||
void QsciLexerBash_SetFoldCompact(QsciLexerBash* self, bool fold) {
|
||||
self->setFoldCompact(fold);
|
||||
}
|
||||
|
||||
struct miqt_string QsciLexerBash_Tr2(const char* s, const char* c) {
|
||||
QString _ret = QsciLexerBash::tr(s, c);
|
||||
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
||||
QByteArray _b = _ret.toUtf8();
|
||||
struct miqt_string _ms;
|
||||
_ms.len = _b.length();
|
||||
_ms.data = static_cast<char*>(malloc(_ms.len));
|
||||
memcpy(_ms.data, _b.data(), _ms.len);
|
||||
return _ms;
|
||||
}
|
||||
|
||||
struct miqt_string QsciLexerBash_Tr3(const char* s, const char* c, int n) {
|
||||
QString _ret = QsciLexerBash::tr(s, c, static_cast<int>(n));
|
||||
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
||||
QByteArray _b = _ret.toUtf8();
|
||||
struct miqt_string _ms;
|
||||
_ms.len = _b.length();
|
||||
_ms.data = static_cast<char*>(malloc(_ms.len));
|
||||
memcpy(_ms.data, _b.data(), _ms.len);
|
||||
return _ms;
|
||||
}
|
||||
|
||||
struct miqt_string QsciLexerBash_TrUtf82(const char* s, const char* c) {
|
||||
QString _ret = QsciLexerBash::trUtf8(s, c);
|
||||
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
||||
QByteArray _b = _ret.toUtf8();
|
||||
struct miqt_string _ms;
|
||||
_ms.len = _b.length();
|
||||
_ms.data = static_cast<char*>(malloc(_ms.len));
|
||||
memcpy(_ms.data, _b.data(), _ms.len);
|
||||
return _ms;
|
||||
}
|
||||
|
||||
struct miqt_string QsciLexerBash_TrUtf83(const char* s, const char* c, int n) {
|
||||
QString _ret = QsciLexerBash::trUtf8(s, c, static_cast<int>(n));
|
||||
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
||||
QByteArray _b = _ret.toUtf8();
|
||||
struct miqt_string _ms;
|
||||
_ms.len = _b.length();
|
||||
_ms.data = static_cast<char*>(malloc(_ms.len));
|
||||
memcpy(_ms.data, _b.data(), _ms.len);
|
||||
return _ms;
|
||||
}
|
||||
|
||||
void QsciLexerBash_Delete(QsciLexerBash* self) {
|
||||
delete self;
|
||||
}
|
||||
|
238
qt-restricted-extras/qscintilla/gen_qscilexerbash.go
Normal file
238
qt-restricted-extras/qscintilla/gen_qscilexerbash.go
Normal file
@ -0,0 +1,238 @@
|
||||
package qscintilla
|
||||
|
||||
/*
|
||||
|
||||
#include "gen_qscilexerbash.h"
|
||||
#include <stdlib.h>
|
||||
|
||||
*/
|
||||
import "C"
|
||||
|
||||
import (
|
||||
"github.com/mappu/miqt/qt"
|
||||
"runtime"
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
type QsciLexerBash__ int
|
||||
|
||||
const (
|
||||
QsciLexerBash__Default QsciLexerBash__ = 0
|
||||
QsciLexerBash__Error QsciLexerBash__ = 1
|
||||
QsciLexerBash__Comment QsciLexerBash__ = 2
|
||||
QsciLexerBash__Number QsciLexerBash__ = 3
|
||||
QsciLexerBash__Keyword QsciLexerBash__ = 4
|
||||
QsciLexerBash__DoubleQuotedString QsciLexerBash__ = 5
|
||||
QsciLexerBash__SingleQuotedString QsciLexerBash__ = 6
|
||||
QsciLexerBash__Operator QsciLexerBash__ = 7
|
||||
QsciLexerBash__Identifier QsciLexerBash__ = 8
|
||||
QsciLexerBash__Scalar QsciLexerBash__ = 9
|
||||
QsciLexerBash__ParameterExpansion QsciLexerBash__ = 10
|
||||
QsciLexerBash__Backticks QsciLexerBash__ = 11
|
||||
QsciLexerBash__HereDocumentDelimiter QsciLexerBash__ = 12
|
||||
QsciLexerBash__SingleQuotedHereDocument QsciLexerBash__ = 13
|
||||
)
|
||||
|
||||
type QsciLexerBash struct {
|
||||
h *C.QsciLexerBash
|
||||
*QsciLexer
|
||||
}
|
||||
|
||||
func (this *QsciLexerBash) cPointer() *C.QsciLexerBash {
|
||||
if this == nil {
|
||||
return nil
|
||||
}
|
||||
return this.h
|
||||
}
|
||||
|
||||
func (this *QsciLexerBash) UnsafePointer() unsafe.Pointer {
|
||||
if this == nil {
|
||||
return nil
|
||||
}
|
||||
return unsafe.Pointer(this.h)
|
||||
}
|
||||
|
||||
func newQsciLexerBash(h *C.QsciLexerBash) *QsciLexerBash {
|
||||
if h == nil {
|
||||
return nil
|
||||
}
|
||||
return &QsciLexerBash{h: h, QsciLexer: UnsafeNewQsciLexer(unsafe.Pointer(h))}
|
||||
}
|
||||
|
||||
func UnsafeNewQsciLexerBash(h unsafe.Pointer) *QsciLexerBash {
|
||||
return newQsciLexerBash((*C.QsciLexerBash)(h))
|
||||
}
|
||||
|
||||
// NewQsciLexerBash constructs a new QsciLexerBash object.
|
||||
func NewQsciLexerBash() *QsciLexerBash {
|
||||
ret := C.QsciLexerBash_new()
|
||||
return newQsciLexerBash(ret)
|
||||
}
|
||||
|
||||
// NewQsciLexerBash2 constructs a new QsciLexerBash object.
|
||||
func NewQsciLexerBash2(parent *qt.QObject) *QsciLexerBash {
|
||||
ret := C.QsciLexerBash_new2((*C.QObject)(parent.UnsafePointer()))
|
||||
return newQsciLexerBash(ret)
|
||||
}
|
||||
|
||||
func (this *QsciLexerBash) MetaObject() *qt.QMetaObject {
|
||||
return qt.UnsafeNewQMetaObject(unsafe.Pointer(C.QsciLexerBash_MetaObject(this.h)))
|
||||
}
|
||||
|
||||
func (this *QsciLexerBash) Metacast(param1 string) unsafe.Pointer {
|
||||
param1_Cstring := C.CString(param1)
|
||||
defer C.free(unsafe.Pointer(param1_Cstring))
|
||||
return (unsafe.Pointer)(C.QsciLexerBash_Metacast(this.h, param1_Cstring))
|
||||
}
|
||||
|
||||
func QsciLexerBash_Tr(s string) string {
|
||||
s_Cstring := C.CString(s)
|
||||
defer C.free(unsafe.Pointer(s_Cstring))
|
||||
var _ms C.struct_miqt_string = C.QsciLexerBash_Tr(s_Cstring)
|
||||
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
||||
C.free(unsafe.Pointer(_ms.data))
|
||||
return _ret
|
||||
}
|
||||
|
||||
func QsciLexerBash_TrUtf8(s string) string {
|
||||
s_Cstring := C.CString(s)
|
||||
defer C.free(unsafe.Pointer(s_Cstring))
|
||||
var _ms C.struct_miqt_string = C.QsciLexerBash_TrUtf8(s_Cstring)
|
||||
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
||||
C.free(unsafe.Pointer(_ms.data))
|
||||
return _ret
|
||||
}
|
||||
|
||||
func (this *QsciLexerBash) Language() string {
|
||||
_ret := C.QsciLexerBash_Language(this.h)
|
||||
return C.GoString(_ret)
|
||||
}
|
||||
|
||||
func (this *QsciLexerBash) Lexer() string {
|
||||
_ret := C.QsciLexerBash_Lexer(this.h)
|
||||
return C.GoString(_ret)
|
||||
}
|
||||
|
||||
func (this *QsciLexerBash) BraceStyle() int {
|
||||
return (int)(C.QsciLexerBash_BraceStyle(this.h))
|
||||
}
|
||||
|
||||
func (this *QsciLexerBash) WordCharacters() string {
|
||||
_ret := C.QsciLexerBash_WordCharacters(this.h)
|
||||
return C.GoString(_ret)
|
||||
}
|
||||
|
||||
func (this *QsciLexerBash) DefaultColor(style int) *qt.QColor {
|
||||
_ret := C.QsciLexerBash_DefaultColor(this.h, (C.int)(style))
|
||||
_goptr := qt.UnsafeNewQColor(unsafe.Pointer(_ret))
|
||||
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
|
||||
return _goptr
|
||||
}
|
||||
|
||||
func (this *QsciLexerBash) DefaultEolFill(style int) bool {
|
||||
return (bool)(C.QsciLexerBash_DefaultEolFill(this.h, (C.int)(style)))
|
||||
}
|
||||
|
||||
func (this *QsciLexerBash) DefaultFont(style int) *qt.QFont {
|
||||
_ret := C.QsciLexerBash_DefaultFont(this.h, (C.int)(style))
|
||||
_goptr := qt.UnsafeNewQFont(unsafe.Pointer(_ret))
|
||||
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
|
||||
return _goptr
|
||||
}
|
||||
|
||||
func (this *QsciLexerBash) DefaultPaper(style int) *qt.QColor {
|
||||
_ret := C.QsciLexerBash_DefaultPaper(this.h, (C.int)(style))
|
||||
_goptr := qt.UnsafeNewQColor(unsafe.Pointer(_ret))
|
||||
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
|
||||
return _goptr
|
||||
}
|
||||
|
||||
func (this *QsciLexerBash) Keywords(set int) string {
|
||||
_ret := C.QsciLexerBash_Keywords(this.h, (C.int)(set))
|
||||
return C.GoString(_ret)
|
||||
}
|
||||
|
||||
func (this *QsciLexerBash) Description(style int) string {
|
||||
var _ms C.struct_miqt_string = C.QsciLexerBash_Description(this.h, (C.int)(style))
|
||||
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
||||
C.free(unsafe.Pointer(_ms.data))
|
||||
return _ret
|
||||
}
|
||||
|
||||
func (this *QsciLexerBash) RefreshProperties() {
|
||||
C.QsciLexerBash_RefreshProperties(this.h)
|
||||
}
|
||||
|
||||
func (this *QsciLexerBash) FoldComments() bool {
|
||||
return (bool)(C.QsciLexerBash_FoldComments(this.h))
|
||||
}
|
||||
|
||||
func (this *QsciLexerBash) FoldCompact() bool {
|
||||
return (bool)(C.QsciLexerBash_FoldCompact(this.h))
|
||||
}
|
||||
|
||||
func (this *QsciLexerBash) SetFoldComments(fold bool) {
|
||||
C.QsciLexerBash_SetFoldComments(this.h, (C.bool)(fold))
|
||||
}
|
||||
|
||||
func (this *QsciLexerBash) SetFoldCompact(fold bool) {
|
||||
C.QsciLexerBash_SetFoldCompact(this.h, (C.bool)(fold))
|
||||
}
|
||||
|
||||
func QsciLexerBash_Tr2(s string, c string) string {
|
||||
s_Cstring := C.CString(s)
|
||||
defer C.free(unsafe.Pointer(s_Cstring))
|
||||
c_Cstring := C.CString(c)
|
||||
defer C.free(unsafe.Pointer(c_Cstring))
|
||||
var _ms C.struct_miqt_string = C.QsciLexerBash_Tr2(s_Cstring, c_Cstring)
|
||||
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
||||
C.free(unsafe.Pointer(_ms.data))
|
||||
return _ret
|
||||
}
|
||||
|
||||
func QsciLexerBash_Tr3(s string, c string, n int) string {
|
||||
s_Cstring := C.CString(s)
|
||||
defer C.free(unsafe.Pointer(s_Cstring))
|
||||
c_Cstring := C.CString(c)
|
||||
defer C.free(unsafe.Pointer(c_Cstring))
|
||||
var _ms C.struct_miqt_string = C.QsciLexerBash_Tr3(s_Cstring, c_Cstring, (C.int)(n))
|
||||
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
||||
C.free(unsafe.Pointer(_ms.data))
|
||||
return _ret
|
||||
}
|
||||
|
||||
func QsciLexerBash_TrUtf82(s string, c string) string {
|
||||
s_Cstring := C.CString(s)
|
||||
defer C.free(unsafe.Pointer(s_Cstring))
|
||||
c_Cstring := C.CString(c)
|
||||
defer C.free(unsafe.Pointer(c_Cstring))
|
||||
var _ms C.struct_miqt_string = C.QsciLexerBash_TrUtf82(s_Cstring, c_Cstring)
|
||||
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
||||
C.free(unsafe.Pointer(_ms.data))
|
||||
return _ret
|
||||
}
|
||||
|
||||
func QsciLexerBash_TrUtf83(s string, c string, n int) string {
|
||||
s_Cstring := C.CString(s)
|
||||
defer C.free(unsafe.Pointer(s_Cstring))
|
||||
c_Cstring := C.CString(c)
|
||||
defer C.free(unsafe.Pointer(c_Cstring))
|
||||
var _ms C.struct_miqt_string = C.QsciLexerBash_TrUtf83(s_Cstring, c_Cstring, (C.int)(n))
|
||||
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
||||
C.free(unsafe.Pointer(_ms.data))
|
||||
return _ret
|
||||
}
|
||||
|
||||
// Delete this object from C++ memory.
|
||||
func (this *QsciLexerBash) Delete() {
|
||||
C.QsciLexerBash_Delete(this.h)
|
||||
}
|
||||
|
||||
// GoGC adds a Go Finalizer to this pointer, so that it will be deleted
|
||||
// from C++ memory once it is unreachable from Go memory.
|
||||
func (this *QsciLexerBash) GoGC() {
|
||||
runtime.SetFinalizer(this, func(this *QsciLexerBash) {
|
||||
this.Delete()
|
||||
runtime.KeepAlive(this.h)
|
||||
})
|
||||
}
|
61
qt-restricted-extras/qscintilla/gen_qscilexerbash.h
Normal file
61
qt-restricted-extras/qscintilla/gen_qscilexerbash.h
Normal file
@ -0,0 +1,61 @@
|
||||
#ifndef GEN_QSCILEXERBASH_H
|
||||
#define GEN_QSCILEXERBASH_H
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||
|
||||
#include "../../libmiqt/libmiqt.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
class QColor;
|
||||
class QFont;
|
||||
class QMetaObject;
|
||||
class QObject;
|
||||
class QsciLexerBash;
|
||||
#else
|
||||
typedef struct QColor QColor;
|
||||
typedef struct QFont QFont;
|
||||
typedef struct QMetaObject QMetaObject;
|
||||
typedef struct QObject QObject;
|
||||
typedef struct QsciLexerBash QsciLexerBash;
|
||||
#endif
|
||||
|
||||
QsciLexerBash* QsciLexerBash_new();
|
||||
QsciLexerBash* QsciLexerBash_new2(QObject* parent);
|
||||
QMetaObject* QsciLexerBash_MetaObject(const QsciLexerBash* self);
|
||||
void* QsciLexerBash_Metacast(QsciLexerBash* self, const char* param1);
|
||||
struct miqt_string QsciLexerBash_Tr(const char* s);
|
||||
struct miqt_string QsciLexerBash_TrUtf8(const char* s);
|
||||
const char* QsciLexerBash_Language(const QsciLexerBash* self);
|
||||
const char* QsciLexerBash_Lexer(const QsciLexerBash* self);
|
||||
int QsciLexerBash_BraceStyle(const QsciLexerBash* self);
|
||||
const char* QsciLexerBash_WordCharacters(const QsciLexerBash* self);
|
||||
QColor* QsciLexerBash_DefaultColor(const QsciLexerBash* self, int style);
|
||||
bool QsciLexerBash_DefaultEolFill(const QsciLexerBash* self, int style);
|
||||
QFont* QsciLexerBash_DefaultFont(const QsciLexerBash* self, int style);
|
||||
QColor* QsciLexerBash_DefaultPaper(const QsciLexerBash* self, int style);
|
||||
const char* QsciLexerBash_Keywords(const QsciLexerBash* self, int set);
|
||||
struct miqt_string QsciLexerBash_Description(const QsciLexerBash* self, int style);
|
||||
void QsciLexerBash_RefreshProperties(QsciLexerBash* self);
|
||||
bool QsciLexerBash_FoldComments(const QsciLexerBash* self);
|
||||
bool QsciLexerBash_FoldCompact(const QsciLexerBash* self);
|
||||
void QsciLexerBash_SetFoldComments(QsciLexerBash* self, bool fold);
|
||||
void QsciLexerBash_SetFoldCompact(QsciLexerBash* self, bool fold);
|
||||
struct miqt_string QsciLexerBash_Tr2(const char* s, const char* c);
|
||||
struct miqt_string QsciLexerBash_Tr3(const char* s, const char* c, int n);
|
||||
struct miqt_string QsciLexerBash_TrUtf82(const char* s, const char* c);
|
||||
struct miqt_string QsciLexerBash_TrUtf83(const char* s, const char* c, int n);
|
||||
void QsciLexerBash_Delete(QsciLexerBash* self);
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern C */
|
||||
#endif
|
||||
|
||||
#endif
|
144
qt-restricted-extras/qscintilla/gen_qscilexerbatch.cpp
Normal file
144
qt-restricted-extras/qscintilla/gen_qscilexerbatch.cpp
Normal file
@ -0,0 +1,144 @@
|
||||
#include <QColor>
|
||||
#include <QFont>
|
||||
#include <QMetaObject>
|
||||
#include <QObject>
|
||||
#include <QString>
|
||||
#include <QByteArray>
|
||||
#include <cstring>
|
||||
#include <qscilexerbatch.h>
|
||||
#include "gen_qscilexerbatch.h"
|
||||
#include "_cgo_export.h"
|
||||
|
||||
QsciLexerBatch* QsciLexerBatch_new() {
|
||||
return new QsciLexerBatch();
|
||||
}
|
||||
|
||||
QsciLexerBatch* QsciLexerBatch_new2(QObject* parent) {
|
||||
return new QsciLexerBatch(parent);
|
||||
}
|
||||
|
||||
QMetaObject* QsciLexerBatch_MetaObject(const QsciLexerBatch* self) {
|
||||
return (QMetaObject*) self->metaObject();
|
||||
}
|
||||
|
||||
void* QsciLexerBatch_Metacast(QsciLexerBatch* self, const char* param1) {
|
||||
return self->qt_metacast(param1);
|
||||
}
|
||||
|
||||
struct miqt_string QsciLexerBatch_Tr(const char* s) {
|
||||
QString _ret = QsciLexerBatch::tr(s);
|
||||
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
||||
QByteArray _b = _ret.toUtf8();
|
||||
struct miqt_string _ms;
|
||||
_ms.len = _b.length();
|
||||
_ms.data = static_cast<char*>(malloc(_ms.len));
|
||||
memcpy(_ms.data, _b.data(), _ms.len);
|
||||
return _ms;
|
||||
}
|
||||
|
||||
struct miqt_string QsciLexerBatch_TrUtf8(const char* s) {
|
||||
QString _ret = QsciLexerBatch::trUtf8(s);
|
||||
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
||||
QByteArray _b = _ret.toUtf8();
|
||||
struct miqt_string _ms;
|
||||
_ms.len = _b.length();
|
||||
_ms.data = static_cast<char*>(malloc(_ms.len));
|
||||
memcpy(_ms.data, _b.data(), _ms.len);
|
||||
return _ms;
|
||||
}
|
||||
|
||||
const char* QsciLexerBatch_Language(const QsciLexerBatch* self) {
|
||||
return (const char*) self->language();
|
||||
}
|
||||
|
||||
const char* QsciLexerBatch_Lexer(const QsciLexerBatch* self) {
|
||||
return (const char*) self->lexer();
|
||||
}
|
||||
|
||||
const char* QsciLexerBatch_WordCharacters(const QsciLexerBatch* self) {
|
||||
return (const char*) self->wordCharacters();
|
||||
}
|
||||
|
||||
bool QsciLexerBatch_CaseSensitive(const QsciLexerBatch* self) {
|
||||
return self->caseSensitive();
|
||||
}
|
||||
|
||||
QColor* QsciLexerBatch_DefaultColor(const QsciLexerBatch* self, int style) {
|
||||
return new QColor(self->defaultColor(static_cast<int>(style)));
|
||||
}
|
||||
|
||||
bool QsciLexerBatch_DefaultEolFill(const QsciLexerBatch* self, int style) {
|
||||
return self->defaultEolFill(static_cast<int>(style));
|
||||
}
|
||||
|
||||
QFont* QsciLexerBatch_DefaultFont(const QsciLexerBatch* self, int style) {
|
||||
return new QFont(self->defaultFont(static_cast<int>(style)));
|
||||
}
|
||||
|
||||
QColor* QsciLexerBatch_DefaultPaper(const QsciLexerBatch* self, int style) {
|
||||
return new QColor(self->defaultPaper(static_cast<int>(style)));
|
||||
}
|
||||
|
||||
const char* QsciLexerBatch_Keywords(const QsciLexerBatch* self, int set) {
|
||||
return (const char*) self->keywords(static_cast<int>(set));
|
||||
}
|
||||
|
||||
struct miqt_string QsciLexerBatch_Description(const QsciLexerBatch* self, int style) {
|
||||
QString _ret = self->description(static_cast<int>(style));
|
||||
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
||||
QByteArray _b = _ret.toUtf8();
|
||||
struct miqt_string _ms;
|
||||
_ms.len = _b.length();
|
||||
_ms.data = static_cast<char*>(malloc(_ms.len));
|
||||
memcpy(_ms.data, _b.data(), _ms.len);
|
||||
return _ms;
|
||||
}
|
||||
|
||||
struct miqt_string QsciLexerBatch_Tr2(const char* s, const char* c) {
|
||||
QString _ret = QsciLexerBatch::tr(s, c);
|
||||
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
||||
QByteArray _b = _ret.toUtf8();
|
||||
struct miqt_string _ms;
|
||||
_ms.len = _b.length();
|
||||
_ms.data = static_cast<char*>(malloc(_ms.len));
|
||||
memcpy(_ms.data, _b.data(), _ms.len);
|
||||
return _ms;
|
||||
}
|
||||
|
||||
struct miqt_string QsciLexerBatch_Tr3(const char* s, const char* c, int n) {
|
||||
QString _ret = QsciLexerBatch::tr(s, c, static_cast<int>(n));
|
||||
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
||||
QByteArray _b = _ret.toUtf8();
|
||||
struct miqt_string _ms;
|
||||
_ms.len = _b.length();
|
||||
_ms.data = static_cast<char*>(malloc(_ms.len));
|
||||
memcpy(_ms.data, _b.data(), _ms.len);
|
||||
return _ms;
|
||||
}
|
||||
|
||||
struct miqt_string QsciLexerBatch_TrUtf82(const char* s, const char* c) {
|
||||
QString _ret = QsciLexerBatch::trUtf8(s, c);
|
||||
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
||||
QByteArray _b = _ret.toUtf8();
|
||||
struct miqt_string _ms;
|
||||
_ms.len = _b.length();
|
||||
_ms.data = static_cast<char*>(malloc(_ms.len));
|
||||
memcpy(_ms.data, _b.data(), _ms.len);
|
||||
return _ms;
|
||||
}
|
||||
|
||||
struct miqt_string QsciLexerBatch_TrUtf83(const char* s, const char* c, int n) {
|
||||
QString _ret = QsciLexerBatch::trUtf8(s, c, static_cast<int>(n));
|
||||
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
||||
QByteArray _b = _ret.toUtf8();
|
||||
struct miqt_string _ms;
|
||||
_ms.len = _b.length();
|
||||
_ms.data = static_cast<char*>(malloc(_ms.len));
|
||||
memcpy(_ms.data, _b.data(), _ms.len);
|
||||
return _ms;
|
||||
}
|
||||
|
||||
void QsciLexerBatch_Delete(QsciLexerBatch* self) {
|
||||
delete self;
|
||||
}
|
||||
|
212
qt-restricted-extras/qscintilla/gen_qscilexerbatch.go
Normal file
212
qt-restricted-extras/qscintilla/gen_qscilexerbatch.go
Normal file
@ -0,0 +1,212 @@
|
||||
package qscintilla
|
||||
|
||||
/*
|
||||
|
||||
#include "gen_qscilexerbatch.h"
|
||||
#include <stdlib.h>
|
||||
|
||||
*/
|
||||
import "C"
|
||||
|
||||
import (
|
||||
"github.com/mappu/miqt/qt"
|
||||
"runtime"
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
type QsciLexerBatch__ int
|
||||
|
||||
const (
|
||||
QsciLexerBatch__Default QsciLexerBatch__ = 0
|
||||
QsciLexerBatch__Comment QsciLexerBatch__ = 1
|
||||
QsciLexerBatch__Keyword QsciLexerBatch__ = 2
|
||||
QsciLexerBatch__Label QsciLexerBatch__ = 3
|
||||
QsciLexerBatch__HideCommandChar QsciLexerBatch__ = 4
|
||||
QsciLexerBatch__ExternalCommand QsciLexerBatch__ = 5
|
||||
QsciLexerBatch__Variable QsciLexerBatch__ = 6
|
||||
QsciLexerBatch__Operator QsciLexerBatch__ = 7
|
||||
)
|
||||
|
||||
type QsciLexerBatch struct {
|
||||
h *C.QsciLexerBatch
|
||||
*QsciLexer
|
||||
}
|
||||
|
||||
func (this *QsciLexerBatch) cPointer() *C.QsciLexerBatch {
|
||||
if this == nil {
|
||||
return nil
|
||||
}
|
||||
return this.h
|
||||
}
|
||||
|
||||
func (this *QsciLexerBatch) UnsafePointer() unsafe.Pointer {
|
||||
if this == nil {
|
||||
return nil
|
||||
}
|
||||
return unsafe.Pointer(this.h)
|
||||
}
|
||||
|
||||
func newQsciLexerBatch(h *C.QsciLexerBatch) *QsciLexerBatch {
|
||||
if h == nil {
|
||||
return nil
|
||||
}
|
||||
return &QsciLexerBatch{h: h, QsciLexer: UnsafeNewQsciLexer(unsafe.Pointer(h))}
|
||||
}
|
||||
|
||||
func UnsafeNewQsciLexerBatch(h unsafe.Pointer) *QsciLexerBatch {
|
||||
return newQsciLexerBatch((*C.QsciLexerBatch)(h))
|
||||
}
|
||||
|
||||
// NewQsciLexerBatch constructs a new QsciLexerBatch object.
|
||||
func NewQsciLexerBatch() *QsciLexerBatch {
|
||||
ret := C.QsciLexerBatch_new()
|
||||
return newQsciLexerBatch(ret)
|
||||
}
|
||||
|
||||
// NewQsciLexerBatch2 constructs a new QsciLexerBatch object.
|
||||
func NewQsciLexerBatch2(parent *qt.QObject) *QsciLexerBatch {
|
||||
ret := C.QsciLexerBatch_new2((*C.QObject)(parent.UnsafePointer()))
|
||||
return newQsciLexerBatch(ret)
|
||||
}
|
||||
|
||||
func (this *QsciLexerBatch) MetaObject() *qt.QMetaObject {
|
||||
return qt.UnsafeNewQMetaObject(unsafe.Pointer(C.QsciLexerBatch_MetaObject(this.h)))
|
||||
}
|
||||
|
||||
func (this *QsciLexerBatch) Metacast(param1 string) unsafe.Pointer {
|
||||
param1_Cstring := C.CString(param1)
|
||||
defer C.free(unsafe.Pointer(param1_Cstring))
|
||||
return (unsafe.Pointer)(C.QsciLexerBatch_Metacast(this.h, param1_Cstring))
|
||||
}
|
||||
|
||||
func QsciLexerBatch_Tr(s string) string {
|
||||
s_Cstring := C.CString(s)
|
||||
defer C.free(unsafe.Pointer(s_Cstring))
|
||||
var _ms C.struct_miqt_string = C.QsciLexerBatch_Tr(s_Cstring)
|
||||
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
||||
C.free(unsafe.Pointer(_ms.data))
|
||||
return _ret
|
||||
}
|
||||
|
||||
func QsciLexerBatch_TrUtf8(s string) string {
|
||||
s_Cstring := C.CString(s)
|
||||
defer C.free(unsafe.Pointer(s_Cstring))
|
||||
var _ms C.struct_miqt_string = C.QsciLexerBatch_TrUtf8(s_Cstring)
|
||||
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
||||
C.free(unsafe.Pointer(_ms.data))
|
||||
return _ret
|
||||
}
|
||||
|
||||
func (this *QsciLexerBatch) Language() string {
|
||||
_ret := C.QsciLexerBatch_Language(this.h)
|
||||
return C.GoString(_ret)
|
||||
}
|
||||
|
||||
func (this *QsciLexerBatch) Lexer() string {
|
||||
_ret := C.QsciLexerBatch_Lexer(this.h)
|
||||
return C.GoString(_ret)
|
||||
}
|
||||
|
||||
func (this *QsciLexerBatch) WordCharacters() string {
|
||||
_ret := C.QsciLexerBatch_WordCharacters(this.h)
|
||||
return C.GoString(_ret)
|
||||
}
|
||||
|
||||
func (this *QsciLexerBatch) CaseSensitive() bool {
|
||||
return (bool)(C.QsciLexerBatch_CaseSensitive(this.h))
|
||||
}
|
||||
|
||||
func (this *QsciLexerBatch) DefaultColor(style int) *qt.QColor {
|
||||
_ret := C.QsciLexerBatch_DefaultColor(this.h, (C.int)(style))
|
||||
_goptr := qt.UnsafeNewQColor(unsafe.Pointer(_ret))
|
||||
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
|
||||
return _goptr
|
||||
}
|
||||
|
||||
func (this *QsciLexerBatch) DefaultEolFill(style int) bool {
|
||||
return (bool)(C.QsciLexerBatch_DefaultEolFill(this.h, (C.int)(style)))
|
||||
}
|
||||
|
||||
func (this *QsciLexerBatch) DefaultFont(style int) *qt.QFont {
|
||||
_ret := C.QsciLexerBatch_DefaultFont(this.h, (C.int)(style))
|
||||
_goptr := qt.UnsafeNewQFont(unsafe.Pointer(_ret))
|
||||
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
|
||||
return _goptr
|
||||
}
|
||||
|
||||
func (this *QsciLexerBatch) DefaultPaper(style int) *qt.QColor {
|
||||
_ret := C.QsciLexerBatch_DefaultPaper(this.h, (C.int)(style))
|
||||
_goptr := qt.UnsafeNewQColor(unsafe.Pointer(_ret))
|
||||
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
|
||||
return _goptr
|
||||
}
|
||||
|
||||
func (this *QsciLexerBatch) Keywords(set int) string {
|
||||
_ret := C.QsciLexerBatch_Keywords(this.h, (C.int)(set))
|
||||
return C.GoString(_ret)
|
||||
}
|
||||
|
||||
func (this *QsciLexerBatch) Description(style int) string {
|
||||
var _ms C.struct_miqt_string = C.QsciLexerBatch_Description(this.h, (C.int)(style))
|
||||
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
||||
C.free(unsafe.Pointer(_ms.data))
|
||||
return _ret
|
||||
}
|
||||
|
||||
func QsciLexerBatch_Tr2(s string, c string) string {
|
||||
s_Cstring := C.CString(s)
|
||||
defer C.free(unsafe.Pointer(s_Cstring))
|
||||
c_Cstring := C.CString(c)
|
||||
defer C.free(unsafe.Pointer(c_Cstring))
|
||||
var _ms C.struct_miqt_string = C.QsciLexerBatch_Tr2(s_Cstring, c_Cstring)
|
||||
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
||||
C.free(unsafe.Pointer(_ms.data))
|
||||
return _ret
|
||||
}
|
||||
|
||||
func QsciLexerBatch_Tr3(s string, c string, n int) string {
|
||||
s_Cstring := C.CString(s)
|
||||
defer C.free(unsafe.Pointer(s_Cstring))
|
||||
c_Cstring := C.CString(c)
|
||||
defer C.free(unsafe.Pointer(c_Cstring))
|
||||
var _ms C.struct_miqt_string = C.QsciLexerBatch_Tr3(s_Cstring, c_Cstring, (C.int)(n))
|
||||
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
||||
C.free(unsafe.Pointer(_ms.data))
|
||||
return _ret
|
||||
}
|
||||
|
||||
func QsciLexerBatch_TrUtf82(s string, c string) string {
|
||||
s_Cstring := C.CString(s)
|
||||
defer C.free(unsafe.Pointer(s_Cstring))
|
||||
c_Cstring := C.CString(c)
|
||||
defer C.free(unsafe.Pointer(c_Cstring))
|
||||
var _ms C.struct_miqt_string = C.QsciLexerBatch_TrUtf82(s_Cstring, c_Cstring)
|
||||
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
||||
C.free(unsafe.Pointer(_ms.data))
|
||||
return _ret
|
||||
}
|
||||
|
||||
func QsciLexerBatch_TrUtf83(s string, c string, n int) string {
|
||||
s_Cstring := C.CString(s)
|
||||
defer C.free(unsafe.Pointer(s_Cstring))
|
||||
c_Cstring := C.CString(c)
|
||||
defer C.free(unsafe.Pointer(c_Cstring))
|
||||
var _ms C.struct_miqt_string = C.QsciLexerBatch_TrUtf83(s_Cstring, c_Cstring, (C.int)(n))
|
||||
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
||||
C.free(unsafe.Pointer(_ms.data))
|
||||
return _ret
|
||||
}
|
||||
|
||||
// Delete this object from C++ memory.
|
||||
func (this *QsciLexerBatch) Delete() {
|
||||
C.QsciLexerBatch_Delete(this.h)
|
||||
}
|
||||
|
||||
// GoGC adds a Go Finalizer to this pointer, so that it will be deleted
|
||||
// from C++ memory once it is unreachable from Go memory.
|
||||
func (this *QsciLexerBatch) GoGC() {
|
||||
runtime.SetFinalizer(this, func(this *QsciLexerBatch) {
|
||||
this.Delete()
|
||||
runtime.KeepAlive(this.h)
|
||||
})
|
||||
}
|
56
qt-restricted-extras/qscintilla/gen_qscilexerbatch.h
Normal file
56
qt-restricted-extras/qscintilla/gen_qscilexerbatch.h
Normal file
@ -0,0 +1,56 @@
|
||||
#ifndef GEN_QSCILEXERBATCH_H
|
||||
#define GEN_QSCILEXERBATCH_H
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||
|
||||
#include "../../libmiqt/libmiqt.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
class QColor;
|
||||
class QFont;
|
||||
class QMetaObject;
|
||||
class QObject;
|
||||
class QsciLexerBatch;
|
||||
#else
|
||||
typedef struct QColor QColor;
|
||||
typedef struct QFont QFont;
|
||||
typedef struct QMetaObject QMetaObject;
|
||||
typedef struct QObject QObject;
|
||||
typedef struct QsciLexerBatch QsciLexerBatch;
|
||||
#endif
|
||||
|
||||
QsciLexerBatch* QsciLexerBatch_new();
|
||||
QsciLexerBatch* QsciLexerBatch_new2(QObject* parent);
|
||||
QMetaObject* QsciLexerBatch_MetaObject(const QsciLexerBatch* self);
|
||||
void* QsciLexerBatch_Metacast(QsciLexerBatch* self, const char* param1);
|
||||
struct miqt_string QsciLexerBatch_Tr(const char* s);
|
||||
struct miqt_string QsciLexerBatch_TrUtf8(const char* s);
|
||||
const char* QsciLexerBatch_Language(const QsciLexerBatch* self);
|
||||
const char* QsciLexerBatch_Lexer(const QsciLexerBatch* self);
|
||||
const char* QsciLexerBatch_WordCharacters(const QsciLexerBatch* self);
|
||||
bool QsciLexerBatch_CaseSensitive(const QsciLexerBatch* self);
|
||||
QColor* QsciLexerBatch_DefaultColor(const QsciLexerBatch* self, int style);
|
||||
bool QsciLexerBatch_DefaultEolFill(const QsciLexerBatch* self, int style);
|
||||
QFont* QsciLexerBatch_DefaultFont(const QsciLexerBatch* self, int style);
|
||||
QColor* QsciLexerBatch_DefaultPaper(const QsciLexerBatch* self, int style);
|
||||
const char* QsciLexerBatch_Keywords(const QsciLexerBatch* self, int set);
|
||||
struct miqt_string QsciLexerBatch_Description(const QsciLexerBatch* self, int style);
|
||||
struct miqt_string QsciLexerBatch_Tr2(const char* s, const char* c);
|
||||
struct miqt_string QsciLexerBatch_Tr3(const char* s, const char* c, int n);
|
||||
struct miqt_string QsciLexerBatch_TrUtf82(const char* s, const char* c);
|
||||
struct miqt_string QsciLexerBatch_TrUtf83(const char* s, const char* c, int n);
|
||||
void QsciLexerBatch_Delete(QsciLexerBatch* self);
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern C */
|
||||
#endif
|
||||
|
||||
#endif
|
144
qt-restricted-extras/qscintilla/gen_qscilexercmake.cpp
Normal file
144
qt-restricted-extras/qscintilla/gen_qscilexercmake.cpp
Normal file
@ -0,0 +1,144 @@
|
||||
#include <QColor>
|
||||
#include <QFont>
|
||||
#include <QMetaObject>
|
||||
#include <QObject>
|
||||
#include <QString>
|
||||
#include <QByteArray>
|
||||
#include <cstring>
|
||||
#include <qscilexercmake.h>
|
||||
#include "gen_qscilexercmake.h"
|
||||
#include "_cgo_export.h"
|
||||
|
||||
QsciLexerCMake* QsciLexerCMake_new() {
|
||||
return new QsciLexerCMake();
|
||||
}
|
||||
|
||||
QsciLexerCMake* QsciLexerCMake_new2(QObject* parent) {
|
||||
return new QsciLexerCMake(parent);
|
||||
}
|
||||
|
||||
QMetaObject* QsciLexerCMake_MetaObject(const QsciLexerCMake* self) {
|
||||
return (QMetaObject*) self->metaObject();
|
||||
}
|
||||
|
||||
void* QsciLexerCMake_Metacast(QsciLexerCMake* self, const char* param1) {
|
||||
return self->qt_metacast(param1);
|
||||
}
|
||||
|
||||
struct miqt_string QsciLexerCMake_Tr(const char* s) {
|
||||
QString _ret = QsciLexerCMake::tr(s);
|
||||
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
||||
QByteArray _b = _ret.toUtf8();
|
||||
struct miqt_string _ms;
|
||||
_ms.len = _b.length();
|
||||
_ms.data = static_cast<char*>(malloc(_ms.len));
|
||||
memcpy(_ms.data, _b.data(), _ms.len);
|
||||
return _ms;
|
||||
}
|
||||
|
||||
struct miqt_string QsciLexerCMake_TrUtf8(const char* s) {
|
||||
QString _ret = QsciLexerCMake::trUtf8(s);
|
||||
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
||||
QByteArray _b = _ret.toUtf8();
|
||||
struct miqt_string _ms;
|
||||
_ms.len = _b.length();
|
||||
_ms.data = static_cast<char*>(malloc(_ms.len));
|
||||
memcpy(_ms.data, _b.data(), _ms.len);
|
||||
return _ms;
|
||||
}
|
||||
|
||||
const char* QsciLexerCMake_Language(const QsciLexerCMake* self) {
|
||||
return (const char*) self->language();
|
||||
}
|
||||
|
||||
const char* QsciLexerCMake_Lexer(const QsciLexerCMake* self) {
|
||||
return (const char*) self->lexer();
|
||||
}
|
||||
|
||||
QColor* QsciLexerCMake_DefaultColor(const QsciLexerCMake* self, int style) {
|
||||
return new QColor(self->defaultColor(static_cast<int>(style)));
|
||||
}
|
||||
|
||||
QFont* QsciLexerCMake_DefaultFont(const QsciLexerCMake* self, int style) {
|
||||
return new QFont(self->defaultFont(static_cast<int>(style)));
|
||||
}
|
||||
|
||||
QColor* QsciLexerCMake_DefaultPaper(const QsciLexerCMake* self, int style) {
|
||||
return new QColor(self->defaultPaper(static_cast<int>(style)));
|
||||
}
|
||||
|
||||
const char* QsciLexerCMake_Keywords(const QsciLexerCMake* self, int set) {
|
||||
return (const char*) self->keywords(static_cast<int>(set));
|
||||
}
|
||||
|
||||
struct miqt_string QsciLexerCMake_Description(const QsciLexerCMake* self, int style) {
|
||||
QString _ret = self->description(static_cast<int>(style));
|
||||
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
||||
QByteArray _b = _ret.toUtf8();
|
||||
struct miqt_string _ms;
|
||||
_ms.len = _b.length();
|
||||
_ms.data = static_cast<char*>(malloc(_ms.len));
|
||||
memcpy(_ms.data, _b.data(), _ms.len);
|
||||
return _ms;
|
||||
}
|
||||
|
||||
void QsciLexerCMake_RefreshProperties(QsciLexerCMake* self) {
|
||||
self->refreshProperties();
|
||||
}
|
||||
|
||||
bool QsciLexerCMake_FoldAtElse(const QsciLexerCMake* self) {
|
||||
return self->foldAtElse();
|
||||
}
|
||||
|
||||
void QsciLexerCMake_SetFoldAtElse(QsciLexerCMake* self, bool fold) {
|
||||
self->setFoldAtElse(fold);
|
||||
}
|
||||
|
||||
struct miqt_string QsciLexerCMake_Tr2(const char* s, const char* c) {
|
||||
QString _ret = QsciLexerCMake::tr(s, c);
|
||||
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
||||
QByteArray _b = _ret.toUtf8();
|
||||
struct miqt_string _ms;
|
||||
_ms.len = _b.length();
|
||||
_ms.data = static_cast<char*>(malloc(_ms.len));
|
||||
memcpy(_ms.data, _b.data(), _ms.len);
|
||||
return _ms;
|
||||
}
|
||||
|
||||
struct miqt_string QsciLexerCMake_Tr3(const char* s, const char* c, int n) {
|
||||
QString _ret = QsciLexerCMake::tr(s, c, static_cast<int>(n));
|
||||
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
||||
QByteArray _b = _ret.toUtf8();
|
||||
struct miqt_string _ms;
|
||||
_ms.len = _b.length();
|
||||
_ms.data = static_cast<char*>(malloc(_ms.len));
|
||||
memcpy(_ms.data, _b.data(), _ms.len);
|
||||
return _ms;
|
||||
}
|
||||
|
||||
struct miqt_string QsciLexerCMake_TrUtf82(const char* s, const char* c) {
|
||||
QString _ret = QsciLexerCMake::trUtf8(s, c);
|
||||
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
||||
QByteArray _b = _ret.toUtf8();
|
||||
struct miqt_string _ms;
|
||||
_ms.len = _b.length();
|
||||
_ms.data = static_cast<char*>(malloc(_ms.len));
|
||||
memcpy(_ms.data, _b.data(), _ms.len);
|
||||
return _ms;
|
||||
}
|
||||
|
||||
struct miqt_string QsciLexerCMake_TrUtf83(const char* s, const char* c, int n) {
|
||||
QString _ret = QsciLexerCMake::trUtf8(s, c, static_cast<int>(n));
|
||||
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
||||
QByteArray _b = _ret.toUtf8();
|
||||
struct miqt_string _ms;
|
||||
_ms.len = _b.length();
|
||||
_ms.data = static_cast<char*>(malloc(_ms.len));
|
||||
memcpy(_ms.data, _b.data(), _ms.len);
|
||||
return _ms;
|
||||
}
|
||||
|
||||
void QsciLexerCMake_Delete(QsciLexerCMake* self) {
|
||||
delete self;
|
||||
}
|
||||
|
218
qt-restricted-extras/qscintilla/gen_qscilexercmake.go
Normal file
218
qt-restricted-extras/qscintilla/gen_qscilexercmake.go
Normal file
@ -0,0 +1,218 @@
|
||||
package qscintilla
|
||||
|
||||
/*
|
||||
|
||||
#include "gen_qscilexercmake.h"
|
||||
#include <stdlib.h>
|
||||
|
||||
*/
|
||||
import "C"
|
||||
|
||||
import (
|
||||
"github.com/mappu/miqt/qt"
|
||||
"runtime"
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
type QsciLexerCMake__ int
|
||||
|
||||
const (
|
||||
QsciLexerCMake__Default QsciLexerCMake__ = 0
|
||||
QsciLexerCMake__Comment QsciLexerCMake__ = 1
|
||||
QsciLexerCMake__String QsciLexerCMake__ = 2
|
||||
QsciLexerCMake__StringLeftQuote QsciLexerCMake__ = 3
|
||||
QsciLexerCMake__StringRightQuote QsciLexerCMake__ = 4
|
||||
QsciLexerCMake__Function QsciLexerCMake__ = 5
|
||||
QsciLexerCMake__Variable QsciLexerCMake__ = 6
|
||||
QsciLexerCMake__Label QsciLexerCMake__ = 7
|
||||
QsciLexerCMake__KeywordSet3 QsciLexerCMake__ = 8
|
||||
QsciLexerCMake__BlockWhile QsciLexerCMake__ = 9
|
||||
QsciLexerCMake__BlockForeach QsciLexerCMake__ = 10
|
||||
QsciLexerCMake__BlockIf QsciLexerCMake__ = 11
|
||||
QsciLexerCMake__BlockMacro QsciLexerCMake__ = 12
|
||||
QsciLexerCMake__StringVariable QsciLexerCMake__ = 13
|
||||
QsciLexerCMake__Number QsciLexerCMake__ = 14
|
||||
)
|
||||
|
||||
type QsciLexerCMake struct {
|
||||
h *C.QsciLexerCMake
|
||||
*QsciLexer
|
||||
}
|
||||
|
||||
func (this *QsciLexerCMake) cPointer() *C.QsciLexerCMake {
|
||||
if this == nil {
|
||||
return nil
|
||||
}
|
||||
return this.h
|
||||
}
|
||||
|
||||
func (this *QsciLexerCMake) UnsafePointer() unsafe.Pointer {
|
||||
if this == nil {
|
||||
return nil
|
||||
}
|
||||
return unsafe.Pointer(this.h)
|
||||
}
|
||||
|
||||
func newQsciLexerCMake(h *C.QsciLexerCMake) *QsciLexerCMake {
|
||||
if h == nil {
|
||||
return nil
|
||||
}
|
||||
return &QsciLexerCMake{h: h, QsciLexer: UnsafeNewQsciLexer(unsafe.Pointer(h))}
|
||||
}
|
||||
|
||||
func UnsafeNewQsciLexerCMake(h unsafe.Pointer) *QsciLexerCMake {
|
||||
return newQsciLexerCMake((*C.QsciLexerCMake)(h))
|
||||
}
|
||||
|
||||
// NewQsciLexerCMake constructs a new QsciLexerCMake object.
|
||||
func NewQsciLexerCMake() *QsciLexerCMake {
|
||||
ret := C.QsciLexerCMake_new()
|
||||
return newQsciLexerCMake(ret)
|
||||
}
|
||||
|
||||
// NewQsciLexerCMake2 constructs a new QsciLexerCMake object.
|
||||
func NewQsciLexerCMake2(parent *qt.QObject) *QsciLexerCMake {
|
||||
ret := C.QsciLexerCMake_new2((*C.QObject)(parent.UnsafePointer()))
|
||||
return newQsciLexerCMake(ret)
|
||||
}
|
||||
|
||||
func (this *QsciLexerCMake) MetaObject() *qt.QMetaObject {
|
||||
return qt.UnsafeNewQMetaObject(unsafe.Pointer(C.QsciLexerCMake_MetaObject(this.h)))
|
||||
}
|
||||
|
||||
func (this *QsciLexerCMake) Metacast(param1 string) unsafe.Pointer {
|
||||
param1_Cstring := C.CString(param1)
|
||||
defer C.free(unsafe.Pointer(param1_Cstring))
|
||||
return (unsafe.Pointer)(C.QsciLexerCMake_Metacast(this.h, param1_Cstring))
|
||||
}
|
||||
|
||||
func QsciLexerCMake_Tr(s string) string {
|
||||
s_Cstring := C.CString(s)
|
||||
defer C.free(unsafe.Pointer(s_Cstring))
|
||||
var _ms C.struct_miqt_string = C.QsciLexerCMake_Tr(s_Cstring)
|
||||
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
||||
C.free(unsafe.Pointer(_ms.data))
|
||||
return _ret
|
||||
}
|
||||
|
||||
func QsciLexerCMake_TrUtf8(s string) string {
|
||||
s_Cstring := C.CString(s)
|
||||
defer C.free(unsafe.Pointer(s_Cstring))
|
||||
var _ms C.struct_miqt_string = C.QsciLexerCMake_TrUtf8(s_Cstring)
|
||||
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
||||
C.free(unsafe.Pointer(_ms.data))
|
||||
return _ret
|
||||
}
|
||||
|
||||
func (this *QsciLexerCMake) Language() string {
|
||||
_ret := C.QsciLexerCMake_Language(this.h)
|
||||
return C.GoString(_ret)
|
||||
}
|
||||
|
||||
func (this *QsciLexerCMake) Lexer() string {
|
||||
_ret := C.QsciLexerCMake_Lexer(this.h)
|
||||
return C.GoString(_ret)
|
||||
}
|
||||
|
||||
func (this *QsciLexerCMake) DefaultColor(style int) *qt.QColor {
|
||||
_ret := C.QsciLexerCMake_DefaultColor(this.h, (C.int)(style))
|
||||
_goptr := qt.UnsafeNewQColor(unsafe.Pointer(_ret))
|
||||
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
|
||||
return _goptr
|
||||
}
|
||||
|
||||
func (this *QsciLexerCMake) DefaultFont(style int) *qt.QFont {
|
||||
_ret := C.QsciLexerCMake_DefaultFont(this.h, (C.int)(style))
|
||||
_goptr := qt.UnsafeNewQFont(unsafe.Pointer(_ret))
|
||||
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
|
||||
return _goptr
|
||||
}
|
||||
|
||||
func (this *QsciLexerCMake) DefaultPaper(style int) *qt.QColor {
|
||||
_ret := C.QsciLexerCMake_DefaultPaper(this.h, (C.int)(style))
|
||||
_goptr := qt.UnsafeNewQColor(unsafe.Pointer(_ret))
|
||||
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
|
||||
return _goptr
|
||||
}
|
||||
|
||||
func (this *QsciLexerCMake) Keywords(set int) string {
|
||||
_ret := C.QsciLexerCMake_Keywords(this.h, (C.int)(set))
|
||||
return C.GoString(_ret)
|
||||
}
|
||||
|
||||
func (this *QsciLexerCMake) Description(style int) string {
|
||||
var _ms C.struct_miqt_string = C.QsciLexerCMake_Description(this.h, (C.int)(style))
|
||||
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
||||
C.free(unsafe.Pointer(_ms.data))
|
||||
return _ret
|
||||
}
|
||||
|
||||
func (this *QsciLexerCMake) RefreshProperties() {
|
||||
C.QsciLexerCMake_RefreshProperties(this.h)
|
||||
}
|
||||
|
||||
func (this *QsciLexerCMake) FoldAtElse() bool {
|
||||
return (bool)(C.QsciLexerCMake_FoldAtElse(this.h))
|
||||
}
|
||||
|
||||
func (this *QsciLexerCMake) SetFoldAtElse(fold bool) {
|
||||
C.QsciLexerCMake_SetFoldAtElse(this.h, (C.bool)(fold))
|
||||
}
|
||||
|
||||
func QsciLexerCMake_Tr2(s string, c string) string {
|
||||
s_Cstring := C.CString(s)
|
||||
defer C.free(unsafe.Pointer(s_Cstring))
|
||||
c_Cstring := C.CString(c)
|
||||
defer C.free(unsafe.Pointer(c_Cstring))
|
||||
var _ms C.struct_miqt_string = C.QsciLexerCMake_Tr2(s_Cstring, c_Cstring)
|
||||
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
||||
C.free(unsafe.Pointer(_ms.data))
|
||||
return _ret
|
||||
}
|
||||
|
||||
func QsciLexerCMake_Tr3(s string, c string, n int) string {
|
||||
s_Cstring := C.CString(s)
|
||||
defer C.free(unsafe.Pointer(s_Cstring))
|
||||
c_Cstring := C.CString(c)
|
||||
defer C.free(unsafe.Pointer(c_Cstring))
|
||||
var _ms C.struct_miqt_string = C.QsciLexerCMake_Tr3(s_Cstring, c_Cstring, (C.int)(n))
|
||||
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
||||
C.free(unsafe.Pointer(_ms.data))
|
||||
return _ret
|
||||
}
|
||||
|
||||
func QsciLexerCMake_TrUtf82(s string, c string) string {
|
||||
s_Cstring := C.CString(s)
|
||||
defer C.free(unsafe.Pointer(s_Cstring))
|
||||
c_Cstring := C.CString(c)
|
||||
defer C.free(unsafe.Pointer(c_Cstring))
|
||||
var _ms C.struct_miqt_string = C.QsciLexerCMake_TrUtf82(s_Cstring, c_Cstring)
|
||||
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
||||
C.free(unsafe.Pointer(_ms.data))
|
||||
return _ret
|
||||
}
|
||||
|
||||
func QsciLexerCMake_TrUtf83(s string, c string, n int) string {
|
||||
s_Cstring := C.CString(s)
|
||||
defer C.free(unsafe.Pointer(s_Cstring))
|
||||
c_Cstring := C.CString(c)
|
||||
defer C.free(unsafe.Pointer(c_Cstring))
|
||||
var _ms C.struct_miqt_string = C.QsciLexerCMake_TrUtf83(s_Cstring, c_Cstring, (C.int)(n))
|
||||
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
||||
C.free(unsafe.Pointer(_ms.data))
|
||||
return _ret
|
||||
}
|
||||
|
||||
// Delete this object from C++ memory.
|
||||
func (this *QsciLexerCMake) Delete() {
|
||||
C.QsciLexerCMake_Delete(this.h)
|
||||
}
|
||||
|
||||
// GoGC adds a Go Finalizer to this pointer, so that it will be deleted
|
||||
// from C++ memory once it is unreachable from Go memory.
|
||||
func (this *QsciLexerCMake) GoGC() {
|
||||
runtime.SetFinalizer(this, func(this *QsciLexerCMake) {
|
||||
this.Delete()
|
||||
runtime.KeepAlive(this.h)
|
||||
})
|
||||
}
|
56
qt-restricted-extras/qscintilla/gen_qscilexercmake.h
Normal file
56
qt-restricted-extras/qscintilla/gen_qscilexercmake.h
Normal file
@ -0,0 +1,56 @@
|
||||
#ifndef GEN_QSCILEXERCMAKE_H
|
||||
#define GEN_QSCILEXERCMAKE_H
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||
|
||||
#include "../../libmiqt/libmiqt.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
class QColor;
|
||||
class QFont;
|
||||
class QMetaObject;
|
||||
class QObject;
|
||||
class QsciLexerCMake;
|
||||
#else
|
||||
typedef struct QColor QColor;
|
||||
typedef struct QFont QFont;
|
||||
typedef struct QMetaObject QMetaObject;
|
||||
typedef struct QObject QObject;
|
||||
typedef struct QsciLexerCMake QsciLexerCMake;
|
||||
#endif
|
||||
|
||||
QsciLexerCMake* QsciLexerCMake_new();
|
||||
QsciLexerCMake* QsciLexerCMake_new2(QObject* parent);
|
||||
QMetaObject* QsciLexerCMake_MetaObject(const QsciLexerCMake* self);
|
||||
void* QsciLexerCMake_Metacast(QsciLexerCMake* self, const char* param1);
|
||||
struct miqt_string QsciLexerCMake_Tr(const char* s);
|
||||
struct miqt_string QsciLexerCMake_TrUtf8(const char* s);
|
||||
const char* QsciLexerCMake_Language(const QsciLexerCMake* self);
|
||||
const char* QsciLexerCMake_Lexer(const QsciLexerCMake* self);
|
||||
QColor* QsciLexerCMake_DefaultColor(const QsciLexerCMake* self, int style);
|
||||
QFont* QsciLexerCMake_DefaultFont(const QsciLexerCMake* self, int style);
|
||||
QColor* QsciLexerCMake_DefaultPaper(const QsciLexerCMake* self, int style);
|
||||
const char* QsciLexerCMake_Keywords(const QsciLexerCMake* self, int set);
|
||||
struct miqt_string QsciLexerCMake_Description(const QsciLexerCMake* self, int style);
|
||||
void QsciLexerCMake_RefreshProperties(QsciLexerCMake* self);
|
||||
bool QsciLexerCMake_FoldAtElse(const QsciLexerCMake* self);
|
||||
void QsciLexerCMake_SetFoldAtElse(QsciLexerCMake* self, bool fold);
|
||||
struct miqt_string QsciLexerCMake_Tr2(const char* s, const char* c);
|
||||
struct miqt_string QsciLexerCMake_Tr3(const char* s, const char* c, int n);
|
||||
struct miqt_string QsciLexerCMake_TrUtf82(const char* s, const char* c);
|
||||
struct miqt_string QsciLexerCMake_TrUtf83(const char* s, const char* c, int n);
|
||||
void QsciLexerCMake_Delete(QsciLexerCMake* self);
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern C */
|
||||
#endif
|
||||
|
||||
#endif
|
225
qt-restricted-extras/qscintilla/gen_qscilexercoffeescript.cpp
Normal file
225
qt-restricted-extras/qscintilla/gen_qscilexercoffeescript.cpp
Normal file
@ -0,0 +1,225 @@
|
||||
#include <QColor>
|
||||
#include <QFont>
|
||||
#include <QList>
|
||||
#include <QMetaObject>
|
||||
#include <QObject>
|
||||
#include <QString>
|
||||
#include <QByteArray>
|
||||
#include <cstring>
|
||||
#include <qscilexercoffeescript.h>
|
||||
#include "gen_qscilexercoffeescript.h"
|
||||
#include "_cgo_export.h"
|
||||
|
||||
QsciLexerCoffeeScript* QsciLexerCoffeeScript_new() {
|
||||
return new QsciLexerCoffeeScript();
|
||||
}
|
||||
|
||||
QsciLexerCoffeeScript* QsciLexerCoffeeScript_new2(QObject* parent) {
|
||||
return new QsciLexerCoffeeScript(parent);
|
||||
}
|
||||
|
||||
QMetaObject* QsciLexerCoffeeScript_MetaObject(const QsciLexerCoffeeScript* self) {
|
||||
return (QMetaObject*) self->metaObject();
|
||||
}
|
||||
|
||||
void* QsciLexerCoffeeScript_Metacast(QsciLexerCoffeeScript* self, const char* param1) {
|
||||
return self->qt_metacast(param1);
|
||||
}
|
||||
|
||||
struct miqt_string QsciLexerCoffeeScript_Tr(const char* s) {
|
||||
QString _ret = QsciLexerCoffeeScript::tr(s);
|
||||
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
||||
QByteArray _b = _ret.toUtf8();
|
||||
struct miqt_string _ms;
|
||||
_ms.len = _b.length();
|
||||
_ms.data = static_cast<char*>(malloc(_ms.len));
|
||||
memcpy(_ms.data, _b.data(), _ms.len);
|
||||
return _ms;
|
||||
}
|
||||
|
||||
struct miqt_string QsciLexerCoffeeScript_TrUtf8(const char* s) {
|
||||
QString _ret = QsciLexerCoffeeScript::trUtf8(s);
|
||||
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
||||
QByteArray _b = _ret.toUtf8();
|
||||
struct miqt_string _ms;
|
||||
_ms.len = _b.length();
|
||||
_ms.data = static_cast<char*>(malloc(_ms.len));
|
||||
memcpy(_ms.data, _b.data(), _ms.len);
|
||||
return _ms;
|
||||
}
|
||||
|
||||
const char* QsciLexerCoffeeScript_Language(const QsciLexerCoffeeScript* self) {
|
||||
return (const char*) self->language();
|
||||
}
|
||||
|
||||
const char* QsciLexerCoffeeScript_Lexer(const QsciLexerCoffeeScript* self) {
|
||||
return (const char*) self->lexer();
|
||||
}
|
||||
|
||||
struct miqt_array* QsciLexerCoffeeScript_AutoCompletionWordSeparators(const QsciLexerCoffeeScript* self) {
|
||||
QStringList _ret = self->autoCompletionWordSeparators();
|
||||
// Convert QList<> from C++ memory to manually-managed C memory
|
||||
struct miqt_string* _arr = static_cast<struct miqt_string*>(malloc(sizeof(struct miqt_string) * _ret.length()));
|
||||
for (size_t i = 0, e = _ret.length(); i < e; ++i) {
|
||||
QString _lv_ret = _ret[i];
|
||||
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
||||
QByteArray _lv_b = _lv_ret.toUtf8();
|
||||
struct miqt_string _lv_ms;
|
||||
_lv_ms.len = _lv_b.length();
|
||||
_lv_ms.data = static_cast<char*>(malloc(_lv_ms.len));
|
||||
memcpy(_lv_ms.data, _lv_b.data(), _lv_ms.len);
|
||||
_arr[i] = _lv_ms;
|
||||
}
|
||||
struct miqt_array* _out = static_cast<struct miqt_array*>(malloc(sizeof(struct miqt_array)));
|
||||
_out->len = _ret.length();
|
||||
_out->data = static_cast<void*>(_arr);
|
||||
return _out;
|
||||
}
|
||||
|
||||
const char* QsciLexerCoffeeScript_BlockEnd(const QsciLexerCoffeeScript* self) {
|
||||
return (const char*) self->blockEnd();
|
||||
}
|
||||
|
||||
const char* QsciLexerCoffeeScript_BlockStart(const QsciLexerCoffeeScript* self) {
|
||||
return (const char*) self->blockStart();
|
||||
}
|
||||
|
||||
const char* QsciLexerCoffeeScript_BlockStartKeyword(const QsciLexerCoffeeScript* self) {
|
||||
return (const char*) self->blockStartKeyword();
|
||||
}
|
||||
|
||||
int QsciLexerCoffeeScript_BraceStyle(const QsciLexerCoffeeScript* self) {
|
||||
return self->braceStyle();
|
||||
}
|
||||
|
||||
const char* QsciLexerCoffeeScript_WordCharacters(const QsciLexerCoffeeScript* self) {
|
||||
return (const char*) self->wordCharacters();
|
||||
}
|
||||
|
||||
QColor* QsciLexerCoffeeScript_DefaultColor(const QsciLexerCoffeeScript* self, int style) {
|
||||
return new QColor(self->defaultColor(static_cast<int>(style)));
|
||||
}
|
||||
|
||||
bool QsciLexerCoffeeScript_DefaultEolFill(const QsciLexerCoffeeScript* self, int style) {
|
||||
return self->defaultEolFill(static_cast<int>(style));
|
||||
}
|
||||
|
||||
QFont* QsciLexerCoffeeScript_DefaultFont(const QsciLexerCoffeeScript* self, int style) {
|
||||
return new QFont(self->defaultFont(static_cast<int>(style)));
|
||||
}
|
||||
|
||||
QColor* QsciLexerCoffeeScript_DefaultPaper(const QsciLexerCoffeeScript* self, int style) {
|
||||
return new QColor(self->defaultPaper(static_cast<int>(style)));
|
||||
}
|
||||
|
||||
const char* QsciLexerCoffeeScript_Keywords(const QsciLexerCoffeeScript* self, int set) {
|
||||
return (const char*) self->keywords(static_cast<int>(set));
|
||||
}
|
||||
|
||||
struct miqt_string QsciLexerCoffeeScript_Description(const QsciLexerCoffeeScript* self, int style) {
|
||||
QString _ret = self->description(static_cast<int>(style));
|
||||
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
||||
QByteArray _b = _ret.toUtf8();
|
||||
struct miqt_string _ms;
|
||||
_ms.len = _b.length();
|
||||
_ms.data = static_cast<char*>(malloc(_ms.len));
|
||||
memcpy(_ms.data, _b.data(), _ms.len);
|
||||
return _ms;
|
||||
}
|
||||
|
||||
void QsciLexerCoffeeScript_RefreshProperties(QsciLexerCoffeeScript* self) {
|
||||
self->refreshProperties();
|
||||
}
|
||||
|
||||
bool QsciLexerCoffeeScript_DollarsAllowed(const QsciLexerCoffeeScript* self) {
|
||||
return self->dollarsAllowed();
|
||||
}
|
||||
|
||||
void QsciLexerCoffeeScript_SetDollarsAllowed(QsciLexerCoffeeScript* self, bool allowed) {
|
||||
self->setDollarsAllowed(allowed);
|
||||
}
|
||||
|
||||
bool QsciLexerCoffeeScript_FoldComments(const QsciLexerCoffeeScript* self) {
|
||||
return self->foldComments();
|
||||
}
|
||||
|
||||
void QsciLexerCoffeeScript_SetFoldComments(QsciLexerCoffeeScript* self, bool fold) {
|
||||
self->setFoldComments(fold);
|
||||
}
|
||||
|
||||
bool QsciLexerCoffeeScript_FoldCompact(const QsciLexerCoffeeScript* self) {
|
||||
return self->foldCompact();
|
||||
}
|
||||
|
||||
void QsciLexerCoffeeScript_SetFoldCompact(QsciLexerCoffeeScript* self, bool fold) {
|
||||
self->setFoldCompact(fold);
|
||||
}
|
||||
|
||||
bool QsciLexerCoffeeScript_StylePreprocessor(const QsciLexerCoffeeScript* self) {
|
||||
return self->stylePreprocessor();
|
||||
}
|
||||
|
||||
void QsciLexerCoffeeScript_SetStylePreprocessor(QsciLexerCoffeeScript* self, bool style) {
|
||||
self->setStylePreprocessor(style);
|
||||
}
|
||||
|
||||
struct miqt_string QsciLexerCoffeeScript_Tr2(const char* s, const char* c) {
|
||||
QString _ret = QsciLexerCoffeeScript::tr(s, c);
|
||||
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
||||
QByteArray _b = _ret.toUtf8();
|
||||
struct miqt_string _ms;
|
||||
_ms.len = _b.length();
|
||||
_ms.data = static_cast<char*>(malloc(_ms.len));
|
||||
memcpy(_ms.data, _b.data(), _ms.len);
|
||||
return _ms;
|
||||
}
|
||||
|
||||
struct miqt_string QsciLexerCoffeeScript_Tr3(const char* s, const char* c, int n) {
|
||||
QString _ret = QsciLexerCoffeeScript::tr(s, c, static_cast<int>(n));
|
||||
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
||||
QByteArray _b = _ret.toUtf8();
|
||||
struct miqt_string _ms;
|
||||
_ms.len = _b.length();
|
||||
_ms.data = static_cast<char*>(malloc(_ms.len));
|
||||
memcpy(_ms.data, _b.data(), _ms.len);
|
||||
return _ms;
|
||||
}
|
||||
|
||||
struct miqt_string QsciLexerCoffeeScript_TrUtf82(const char* s, const char* c) {
|
||||
QString _ret = QsciLexerCoffeeScript::trUtf8(s, c);
|
||||
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
||||
QByteArray _b = _ret.toUtf8();
|
||||
struct miqt_string _ms;
|
||||
_ms.len = _b.length();
|
||||
_ms.data = static_cast<char*>(malloc(_ms.len));
|
||||
memcpy(_ms.data, _b.data(), _ms.len);
|
||||
return _ms;
|
||||
}
|
||||
|
||||
struct miqt_string QsciLexerCoffeeScript_TrUtf83(const char* s, const char* c, int n) {
|
||||
QString _ret = QsciLexerCoffeeScript::trUtf8(s, c, static_cast<int>(n));
|
||||
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
||||
QByteArray _b = _ret.toUtf8();
|
||||
struct miqt_string _ms;
|
||||
_ms.len = _b.length();
|
||||
_ms.data = static_cast<char*>(malloc(_ms.len));
|
||||
memcpy(_ms.data, _b.data(), _ms.len);
|
||||
return _ms;
|
||||
}
|
||||
|
||||
const char* QsciLexerCoffeeScript_BlockEnd1(const QsciLexerCoffeeScript* self, int* style) {
|
||||
return (const char*) self->blockEnd(static_cast<int*>(style));
|
||||
}
|
||||
|
||||
const char* QsciLexerCoffeeScript_BlockStart1(const QsciLexerCoffeeScript* self, int* style) {
|
||||
return (const char*) self->blockStart(static_cast<int*>(style));
|
||||
}
|
||||
|
||||
const char* QsciLexerCoffeeScript_BlockStartKeyword1(const QsciLexerCoffeeScript* self, int* style) {
|
||||
return (const char*) self->blockStartKeyword(static_cast<int*>(style));
|
||||
}
|
||||
|
||||
void QsciLexerCoffeeScript_Delete(QsciLexerCoffeeScript* self) {
|
||||
delete self;
|
||||
}
|
||||
|
308
qt-restricted-extras/qscintilla/gen_qscilexercoffeescript.go
Normal file
308
qt-restricted-extras/qscintilla/gen_qscilexercoffeescript.go
Normal file
@ -0,0 +1,308 @@
|
||||
package qscintilla
|
||||
|
||||
/*
|
||||
|
||||
#include "gen_qscilexercoffeescript.h"
|
||||
#include <stdlib.h>
|
||||
|
||||
*/
|
||||
import "C"
|
||||
|
||||
import (
|
||||
"github.com/mappu/miqt/qt"
|
||||
"runtime"
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
type QsciLexerCoffeeScript__ int
|
||||
|
||||
const (
|
||||
QsciLexerCoffeeScript__Default QsciLexerCoffeeScript__ = 0
|
||||
QsciLexerCoffeeScript__Comment QsciLexerCoffeeScript__ = 1
|
||||
QsciLexerCoffeeScript__CommentLine QsciLexerCoffeeScript__ = 2
|
||||
QsciLexerCoffeeScript__CommentDoc QsciLexerCoffeeScript__ = 3
|
||||
QsciLexerCoffeeScript__Number QsciLexerCoffeeScript__ = 4
|
||||
QsciLexerCoffeeScript__Keyword QsciLexerCoffeeScript__ = 5
|
||||
QsciLexerCoffeeScript__DoubleQuotedString QsciLexerCoffeeScript__ = 6
|
||||
QsciLexerCoffeeScript__SingleQuotedString QsciLexerCoffeeScript__ = 7
|
||||
QsciLexerCoffeeScript__UUID QsciLexerCoffeeScript__ = 8
|
||||
QsciLexerCoffeeScript__PreProcessor QsciLexerCoffeeScript__ = 9
|
||||
QsciLexerCoffeeScript__Operator QsciLexerCoffeeScript__ = 10
|
||||
QsciLexerCoffeeScript__Identifier QsciLexerCoffeeScript__ = 11
|
||||
QsciLexerCoffeeScript__UnclosedString QsciLexerCoffeeScript__ = 12
|
||||
QsciLexerCoffeeScript__VerbatimString QsciLexerCoffeeScript__ = 13
|
||||
QsciLexerCoffeeScript__Regex QsciLexerCoffeeScript__ = 14
|
||||
QsciLexerCoffeeScript__CommentLineDoc QsciLexerCoffeeScript__ = 15
|
||||
QsciLexerCoffeeScript__KeywordSet2 QsciLexerCoffeeScript__ = 16
|
||||
QsciLexerCoffeeScript__CommentDocKeyword QsciLexerCoffeeScript__ = 17
|
||||
QsciLexerCoffeeScript__CommentDocKeywordError QsciLexerCoffeeScript__ = 18
|
||||
QsciLexerCoffeeScript__GlobalClass QsciLexerCoffeeScript__ = 19
|
||||
QsciLexerCoffeeScript__CommentBlock QsciLexerCoffeeScript__ = 22
|
||||
QsciLexerCoffeeScript__BlockRegex QsciLexerCoffeeScript__ = 23
|
||||
QsciLexerCoffeeScript__BlockRegexComment QsciLexerCoffeeScript__ = 24
|
||||
QsciLexerCoffeeScript__InstanceProperty QsciLexerCoffeeScript__ = 25
|
||||
)
|
||||
|
||||
type QsciLexerCoffeeScript struct {
|
||||
h *C.QsciLexerCoffeeScript
|
||||
*QsciLexer
|
||||
}
|
||||
|
||||
func (this *QsciLexerCoffeeScript) cPointer() *C.QsciLexerCoffeeScript {
|
||||
if this == nil {
|
||||
return nil
|
||||
}
|
||||
return this.h
|
||||
}
|
||||
|
||||
func (this *QsciLexerCoffeeScript) UnsafePointer() unsafe.Pointer {
|
||||
if this == nil {
|
||||
return nil
|
||||
}
|
||||
return unsafe.Pointer(this.h)
|
||||
}
|
||||
|
||||
func newQsciLexerCoffeeScript(h *C.QsciLexerCoffeeScript) *QsciLexerCoffeeScript {
|
||||
if h == nil {
|
||||
return nil
|
||||
}
|
||||
return &QsciLexerCoffeeScript{h: h, QsciLexer: UnsafeNewQsciLexer(unsafe.Pointer(h))}
|
||||
}
|
||||
|
||||
func UnsafeNewQsciLexerCoffeeScript(h unsafe.Pointer) *QsciLexerCoffeeScript {
|
||||
return newQsciLexerCoffeeScript((*C.QsciLexerCoffeeScript)(h))
|
||||
}
|
||||
|
||||
// NewQsciLexerCoffeeScript constructs a new QsciLexerCoffeeScript object.
|
||||
func NewQsciLexerCoffeeScript() *QsciLexerCoffeeScript {
|
||||
ret := C.QsciLexerCoffeeScript_new()
|
||||
return newQsciLexerCoffeeScript(ret)
|
||||
}
|
||||
|
||||
// NewQsciLexerCoffeeScript2 constructs a new QsciLexerCoffeeScript object.
|
||||
func NewQsciLexerCoffeeScript2(parent *qt.QObject) *QsciLexerCoffeeScript {
|
||||
ret := C.QsciLexerCoffeeScript_new2((*C.QObject)(parent.UnsafePointer()))
|
||||
return newQsciLexerCoffeeScript(ret)
|
||||
}
|
||||
|
||||
func (this *QsciLexerCoffeeScript) MetaObject() *qt.QMetaObject {
|
||||
return qt.UnsafeNewQMetaObject(unsafe.Pointer(C.QsciLexerCoffeeScript_MetaObject(this.h)))
|
||||
}
|
||||
|
||||
func (this *QsciLexerCoffeeScript) Metacast(param1 string) unsafe.Pointer {
|
||||
param1_Cstring := C.CString(param1)
|
||||
defer C.free(unsafe.Pointer(param1_Cstring))
|
||||
return (unsafe.Pointer)(C.QsciLexerCoffeeScript_Metacast(this.h, param1_Cstring))
|
||||
}
|
||||
|
||||
func QsciLexerCoffeeScript_Tr(s string) string {
|
||||
s_Cstring := C.CString(s)
|
||||
defer C.free(unsafe.Pointer(s_Cstring))
|
||||
var _ms C.struct_miqt_string = C.QsciLexerCoffeeScript_Tr(s_Cstring)
|
||||
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
||||
C.free(unsafe.Pointer(_ms.data))
|
||||
return _ret
|
||||
}
|
||||
|
||||
func QsciLexerCoffeeScript_TrUtf8(s string) string {
|
||||
s_Cstring := C.CString(s)
|
||||
defer C.free(unsafe.Pointer(s_Cstring))
|
||||
var _ms C.struct_miqt_string = C.QsciLexerCoffeeScript_TrUtf8(s_Cstring)
|
||||
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
||||
C.free(unsafe.Pointer(_ms.data))
|
||||
return _ret
|
||||
}
|
||||
|
||||
func (this *QsciLexerCoffeeScript) Language() string {
|
||||
_ret := C.QsciLexerCoffeeScript_Language(this.h)
|
||||
return C.GoString(_ret)
|
||||
}
|
||||
|
||||
func (this *QsciLexerCoffeeScript) Lexer() string {
|
||||
_ret := C.QsciLexerCoffeeScript_Lexer(this.h)
|
||||
return C.GoString(_ret)
|
||||
}
|
||||
|
||||
func (this *QsciLexerCoffeeScript) AutoCompletionWordSeparators() []string {
|
||||
var _ma *C.struct_miqt_array = C.QsciLexerCoffeeScript_AutoCompletionWordSeparators(this.h)
|
||||
_ret := make([]string, int(_ma.len))
|
||||
_outCast := (*[0xffff]C.struct_miqt_string)(unsafe.Pointer(_ma.data)) // hey ya
|
||||
for i := 0; i < int(_ma.len); i++ {
|
||||
var _lv_ms C.struct_miqt_string = _outCast[i]
|
||||
_lv_ret := C.GoStringN(_lv_ms.data, C.int(int64(_lv_ms.len)))
|
||||
C.free(unsafe.Pointer(_lv_ms.data))
|
||||
_ret[i] = _lv_ret
|
||||
}
|
||||
C.free(unsafe.Pointer(_ma))
|
||||
return _ret
|
||||
}
|
||||
|
||||
func (this *QsciLexerCoffeeScript) BlockEnd() string {
|
||||
_ret := C.QsciLexerCoffeeScript_BlockEnd(this.h)
|
||||
return C.GoString(_ret)
|
||||
}
|
||||
|
||||
func (this *QsciLexerCoffeeScript) BlockStart() string {
|
||||
_ret := C.QsciLexerCoffeeScript_BlockStart(this.h)
|
||||
return C.GoString(_ret)
|
||||
}
|
||||
|
||||
func (this *QsciLexerCoffeeScript) BlockStartKeyword() string {
|
||||
_ret := C.QsciLexerCoffeeScript_BlockStartKeyword(this.h)
|
||||
return C.GoString(_ret)
|
||||
}
|
||||
|
||||
func (this *QsciLexerCoffeeScript) BraceStyle() int {
|
||||
return (int)(C.QsciLexerCoffeeScript_BraceStyle(this.h))
|
||||
}
|
||||
|
||||
func (this *QsciLexerCoffeeScript) WordCharacters() string {
|
||||
_ret := C.QsciLexerCoffeeScript_WordCharacters(this.h)
|
||||
return C.GoString(_ret)
|
||||
}
|
||||
|
||||
func (this *QsciLexerCoffeeScript) DefaultColor(style int) *qt.QColor {
|
||||
_ret := C.QsciLexerCoffeeScript_DefaultColor(this.h, (C.int)(style))
|
||||
_goptr := qt.UnsafeNewQColor(unsafe.Pointer(_ret))
|
||||
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
|
||||
return _goptr
|
||||
}
|
||||
|
||||
func (this *QsciLexerCoffeeScript) DefaultEolFill(style int) bool {
|
||||
return (bool)(C.QsciLexerCoffeeScript_DefaultEolFill(this.h, (C.int)(style)))
|
||||
}
|
||||
|
||||
func (this *QsciLexerCoffeeScript) DefaultFont(style int) *qt.QFont {
|
||||
_ret := C.QsciLexerCoffeeScript_DefaultFont(this.h, (C.int)(style))
|
||||
_goptr := qt.UnsafeNewQFont(unsafe.Pointer(_ret))
|
||||
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
|
||||
return _goptr
|
||||
}
|
||||
|
||||
func (this *QsciLexerCoffeeScript) DefaultPaper(style int) *qt.QColor {
|
||||
_ret := C.QsciLexerCoffeeScript_DefaultPaper(this.h, (C.int)(style))
|
||||
_goptr := qt.UnsafeNewQColor(unsafe.Pointer(_ret))
|
||||
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
|
||||
return _goptr
|
||||
}
|
||||
|
||||
func (this *QsciLexerCoffeeScript) Keywords(set int) string {
|
||||
_ret := C.QsciLexerCoffeeScript_Keywords(this.h, (C.int)(set))
|
||||
return C.GoString(_ret)
|
||||
}
|
||||
|
||||
func (this *QsciLexerCoffeeScript) Description(style int) string {
|
||||
var _ms C.struct_miqt_string = C.QsciLexerCoffeeScript_Description(this.h, (C.int)(style))
|
||||
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
||||
C.free(unsafe.Pointer(_ms.data))
|
||||
return _ret
|
||||
}
|
||||
|
||||
func (this *QsciLexerCoffeeScript) RefreshProperties() {
|
||||
C.QsciLexerCoffeeScript_RefreshProperties(this.h)
|
||||
}
|
||||
|
||||
func (this *QsciLexerCoffeeScript) DollarsAllowed() bool {
|
||||
return (bool)(C.QsciLexerCoffeeScript_DollarsAllowed(this.h))
|
||||
}
|
||||
|
||||
func (this *QsciLexerCoffeeScript) SetDollarsAllowed(allowed bool) {
|
||||
C.QsciLexerCoffeeScript_SetDollarsAllowed(this.h, (C.bool)(allowed))
|
||||
}
|
||||
|
||||
func (this *QsciLexerCoffeeScript) FoldComments() bool {
|
||||
return (bool)(C.QsciLexerCoffeeScript_FoldComments(this.h))
|
||||
}
|
||||
|
||||
func (this *QsciLexerCoffeeScript) SetFoldComments(fold bool) {
|
||||
C.QsciLexerCoffeeScript_SetFoldComments(this.h, (C.bool)(fold))
|
||||
}
|
||||
|
||||
func (this *QsciLexerCoffeeScript) FoldCompact() bool {
|
||||
return (bool)(C.QsciLexerCoffeeScript_FoldCompact(this.h))
|
||||
}
|
||||
|
||||
func (this *QsciLexerCoffeeScript) SetFoldCompact(fold bool) {
|
||||
C.QsciLexerCoffeeScript_SetFoldCompact(this.h, (C.bool)(fold))
|
||||
}
|
||||
|
||||
func (this *QsciLexerCoffeeScript) StylePreprocessor() bool {
|
||||
return (bool)(C.QsciLexerCoffeeScript_StylePreprocessor(this.h))
|
||||
}
|
||||
|
||||
func (this *QsciLexerCoffeeScript) SetStylePreprocessor(style bool) {
|
||||
C.QsciLexerCoffeeScript_SetStylePreprocessor(this.h, (C.bool)(style))
|
||||
}
|
||||
|
||||
func QsciLexerCoffeeScript_Tr2(s string, c string) string {
|
||||
s_Cstring := C.CString(s)
|
||||
defer C.free(unsafe.Pointer(s_Cstring))
|
||||
c_Cstring := C.CString(c)
|
||||
defer C.free(unsafe.Pointer(c_Cstring))
|
||||
var _ms C.struct_miqt_string = C.QsciLexerCoffeeScript_Tr2(s_Cstring, c_Cstring)
|
||||
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
||||
C.free(unsafe.Pointer(_ms.data))
|
||||
return _ret
|
||||
}
|
||||
|
||||
func QsciLexerCoffeeScript_Tr3(s string, c string, n int) string {
|
||||
s_Cstring := C.CString(s)
|
||||
defer C.free(unsafe.Pointer(s_Cstring))
|
||||
c_Cstring := C.CString(c)
|
||||
defer C.free(unsafe.Pointer(c_Cstring))
|
||||
var _ms C.struct_miqt_string = C.QsciLexerCoffeeScript_Tr3(s_Cstring, c_Cstring, (C.int)(n))
|
||||
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
||||
C.free(unsafe.Pointer(_ms.data))
|
||||
return _ret
|
||||
}
|
||||
|
||||
func QsciLexerCoffeeScript_TrUtf82(s string, c string) string {
|
||||
s_Cstring := C.CString(s)
|
||||
defer C.free(unsafe.Pointer(s_Cstring))
|
||||
c_Cstring := C.CString(c)
|
||||
defer C.free(unsafe.Pointer(c_Cstring))
|
||||
var _ms C.struct_miqt_string = C.QsciLexerCoffeeScript_TrUtf82(s_Cstring, c_Cstring)
|
||||
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
||||
C.free(unsafe.Pointer(_ms.data))
|
||||
return _ret
|
||||
}
|
||||
|
||||
func QsciLexerCoffeeScript_TrUtf83(s string, c string, n int) string {
|
||||
s_Cstring := C.CString(s)
|
||||
defer C.free(unsafe.Pointer(s_Cstring))
|
||||
c_Cstring := C.CString(c)
|
||||
defer C.free(unsafe.Pointer(c_Cstring))
|
||||
var _ms C.struct_miqt_string = C.QsciLexerCoffeeScript_TrUtf83(s_Cstring, c_Cstring, (C.int)(n))
|
||||
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
||||
C.free(unsafe.Pointer(_ms.data))
|
||||
return _ret
|
||||
}
|
||||
|
||||
func (this *QsciLexerCoffeeScript) BlockEnd1(style *int) string {
|
||||
_ret := C.QsciLexerCoffeeScript_BlockEnd1(this.h, (*C.int)(unsafe.Pointer(style)))
|
||||
return C.GoString(_ret)
|
||||
}
|
||||
|
||||
func (this *QsciLexerCoffeeScript) BlockStart1(style *int) string {
|
||||
_ret := C.QsciLexerCoffeeScript_BlockStart1(this.h, (*C.int)(unsafe.Pointer(style)))
|
||||
return C.GoString(_ret)
|
||||
}
|
||||
|
||||
func (this *QsciLexerCoffeeScript) BlockStartKeyword1(style *int) string {
|
||||
_ret := C.QsciLexerCoffeeScript_BlockStartKeyword1(this.h, (*C.int)(unsafe.Pointer(style)))
|
||||
return C.GoString(_ret)
|
||||
}
|
||||
|
||||
// Delete this object from C++ memory.
|
||||
func (this *QsciLexerCoffeeScript) Delete() {
|
||||
C.QsciLexerCoffeeScript_Delete(this.h)
|
||||
}
|
||||
|
||||
// GoGC adds a Go Finalizer to this pointer, so that it will be deleted
|
||||
// from C++ memory once it is unreachable from Go memory.
|
||||
func (this *QsciLexerCoffeeScript) GoGC() {
|
||||
runtime.SetFinalizer(this, func(this *QsciLexerCoffeeScript) {
|
||||
this.Delete()
|
||||
runtime.KeepAlive(this.h)
|
||||
})
|
||||
}
|
72
qt-restricted-extras/qscintilla/gen_qscilexercoffeescript.h
Normal file
72
qt-restricted-extras/qscintilla/gen_qscilexercoffeescript.h
Normal file
@ -0,0 +1,72 @@
|
||||
#ifndef GEN_QSCILEXERCOFFEESCRIPT_H
|
||||
#define GEN_QSCILEXERCOFFEESCRIPT_H
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||
|
||||
#include "../../libmiqt/libmiqt.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
class QColor;
|
||||
class QFont;
|
||||
class QMetaObject;
|
||||
class QObject;
|
||||
class QsciLexerCoffeeScript;
|
||||
#else
|
||||
typedef struct QColor QColor;
|
||||
typedef struct QFont QFont;
|
||||
typedef struct QMetaObject QMetaObject;
|
||||
typedef struct QObject QObject;
|
||||
typedef struct QsciLexerCoffeeScript QsciLexerCoffeeScript;
|
||||
#endif
|
||||
|
||||
QsciLexerCoffeeScript* QsciLexerCoffeeScript_new();
|
||||
QsciLexerCoffeeScript* QsciLexerCoffeeScript_new2(QObject* parent);
|
||||
QMetaObject* QsciLexerCoffeeScript_MetaObject(const QsciLexerCoffeeScript* self);
|
||||
void* QsciLexerCoffeeScript_Metacast(QsciLexerCoffeeScript* self, const char* param1);
|
||||
struct miqt_string QsciLexerCoffeeScript_Tr(const char* s);
|
||||
struct miqt_string QsciLexerCoffeeScript_TrUtf8(const char* s);
|
||||
const char* QsciLexerCoffeeScript_Language(const QsciLexerCoffeeScript* self);
|
||||
const char* QsciLexerCoffeeScript_Lexer(const QsciLexerCoffeeScript* self);
|
||||
struct miqt_array* QsciLexerCoffeeScript_AutoCompletionWordSeparators(const QsciLexerCoffeeScript* self);
|
||||
const char* QsciLexerCoffeeScript_BlockEnd(const QsciLexerCoffeeScript* self);
|
||||
const char* QsciLexerCoffeeScript_BlockStart(const QsciLexerCoffeeScript* self);
|
||||
const char* QsciLexerCoffeeScript_BlockStartKeyword(const QsciLexerCoffeeScript* self);
|
||||
int QsciLexerCoffeeScript_BraceStyle(const QsciLexerCoffeeScript* self);
|
||||
const char* QsciLexerCoffeeScript_WordCharacters(const QsciLexerCoffeeScript* self);
|
||||
QColor* QsciLexerCoffeeScript_DefaultColor(const QsciLexerCoffeeScript* self, int style);
|
||||
bool QsciLexerCoffeeScript_DefaultEolFill(const QsciLexerCoffeeScript* self, int style);
|
||||
QFont* QsciLexerCoffeeScript_DefaultFont(const QsciLexerCoffeeScript* self, int style);
|
||||
QColor* QsciLexerCoffeeScript_DefaultPaper(const QsciLexerCoffeeScript* self, int style);
|
||||
const char* QsciLexerCoffeeScript_Keywords(const QsciLexerCoffeeScript* self, int set);
|
||||
struct miqt_string QsciLexerCoffeeScript_Description(const QsciLexerCoffeeScript* self, int style);
|
||||
void QsciLexerCoffeeScript_RefreshProperties(QsciLexerCoffeeScript* self);
|
||||
bool QsciLexerCoffeeScript_DollarsAllowed(const QsciLexerCoffeeScript* self);
|
||||
void QsciLexerCoffeeScript_SetDollarsAllowed(QsciLexerCoffeeScript* self, bool allowed);
|
||||
bool QsciLexerCoffeeScript_FoldComments(const QsciLexerCoffeeScript* self);
|
||||
void QsciLexerCoffeeScript_SetFoldComments(QsciLexerCoffeeScript* self, bool fold);
|
||||
bool QsciLexerCoffeeScript_FoldCompact(const QsciLexerCoffeeScript* self);
|
||||
void QsciLexerCoffeeScript_SetFoldCompact(QsciLexerCoffeeScript* self, bool fold);
|
||||
bool QsciLexerCoffeeScript_StylePreprocessor(const QsciLexerCoffeeScript* self);
|
||||
void QsciLexerCoffeeScript_SetStylePreprocessor(QsciLexerCoffeeScript* self, bool style);
|
||||
struct miqt_string QsciLexerCoffeeScript_Tr2(const char* s, const char* c);
|
||||
struct miqt_string QsciLexerCoffeeScript_Tr3(const char* s, const char* c, int n);
|
||||
struct miqt_string QsciLexerCoffeeScript_TrUtf82(const char* s, const char* c);
|
||||
struct miqt_string QsciLexerCoffeeScript_TrUtf83(const char* s, const char* c, int n);
|
||||
const char* QsciLexerCoffeeScript_BlockEnd1(const QsciLexerCoffeeScript* self, int* style);
|
||||
const char* QsciLexerCoffeeScript_BlockStart1(const QsciLexerCoffeeScript* self, int* style);
|
||||
const char* QsciLexerCoffeeScript_BlockStartKeyword1(const QsciLexerCoffeeScript* self, int* style);
|
||||
void QsciLexerCoffeeScript_Delete(QsciLexerCoffeeScript* self);
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern C */
|
||||
#endif
|
||||
|
||||
#endif
|
285
qt-restricted-extras/qscintilla/gen_qscilexercpp.cpp
Normal file
285
qt-restricted-extras/qscintilla/gen_qscilexercpp.cpp
Normal file
@ -0,0 +1,285 @@
|
||||
#include <QColor>
|
||||
#include <QFont>
|
||||
#include <QList>
|
||||
#include <QMetaObject>
|
||||
#include <QObject>
|
||||
#include <QString>
|
||||
#include <QByteArray>
|
||||
#include <cstring>
|
||||
#include <qscilexercpp.h>
|
||||
#include "gen_qscilexercpp.h"
|
||||
#include "_cgo_export.h"
|
||||
|
||||
QsciLexerCPP* QsciLexerCPP_new() {
|
||||
return new QsciLexerCPP();
|
||||
}
|
||||
|
||||
QsciLexerCPP* QsciLexerCPP_new2(QObject* parent) {
|
||||
return new QsciLexerCPP(parent);
|
||||
}
|
||||
|
||||
QsciLexerCPP* QsciLexerCPP_new3(QObject* parent, bool caseInsensitiveKeywords) {
|
||||
return new QsciLexerCPP(parent, caseInsensitiveKeywords);
|
||||
}
|
||||
|
||||
QMetaObject* QsciLexerCPP_MetaObject(const QsciLexerCPP* self) {
|
||||
return (QMetaObject*) self->metaObject();
|
||||
}
|
||||
|
||||
void* QsciLexerCPP_Metacast(QsciLexerCPP* self, const char* param1) {
|
||||
return self->qt_metacast(param1);
|
||||
}
|
||||
|
||||
struct miqt_string QsciLexerCPP_Tr(const char* s) {
|
||||
QString _ret = QsciLexerCPP::tr(s);
|
||||
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
||||
QByteArray _b = _ret.toUtf8();
|
||||
struct miqt_string _ms;
|
||||
_ms.len = _b.length();
|
||||
_ms.data = static_cast<char*>(malloc(_ms.len));
|
||||
memcpy(_ms.data, _b.data(), _ms.len);
|
||||
return _ms;
|
||||
}
|
||||
|
||||
struct miqt_string QsciLexerCPP_TrUtf8(const char* s) {
|
||||
QString _ret = QsciLexerCPP::trUtf8(s);
|
||||
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
||||
QByteArray _b = _ret.toUtf8();
|
||||
struct miqt_string _ms;
|
||||
_ms.len = _b.length();
|
||||
_ms.data = static_cast<char*>(malloc(_ms.len));
|
||||
memcpy(_ms.data, _b.data(), _ms.len);
|
||||
return _ms;
|
||||
}
|
||||
|
||||
const char* QsciLexerCPP_Language(const QsciLexerCPP* self) {
|
||||
return (const char*) self->language();
|
||||
}
|
||||
|
||||
const char* QsciLexerCPP_Lexer(const QsciLexerCPP* self) {
|
||||
return (const char*) self->lexer();
|
||||
}
|
||||
|
||||
struct miqt_array* QsciLexerCPP_AutoCompletionWordSeparators(const QsciLexerCPP* self) {
|
||||
QStringList _ret = self->autoCompletionWordSeparators();
|
||||
// Convert QList<> from C++ memory to manually-managed C memory
|
||||
struct miqt_string* _arr = static_cast<struct miqt_string*>(malloc(sizeof(struct miqt_string) * _ret.length()));
|
||||
for (size_t i = 0, e = _ret.length(); i < e; ++i) {
|
||||
QString _lv_ret = _ret[i];
|
||||
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
||||
QByteArray _lv_b = _lv_ret.toUtf8();
|
||||
struct miqt_string _lv_ms;
|
||||
_lv_ms.len = _lv_b.length();
|
||||
_lv_ms.data = static_cast<char*>(malloc(_lv_ms.len));
|
||||
memcpy(_lv_ms.data, _lv_b.data(), _lv_ms.len);
|
||||
_arr[i] = _lv_ms;
|
||||
}
|
||||
struct miqt_array* _out = static_cast<struct miqt_array*>(malloc(sizeof(struct miqt_array)));
|
||||
_out->len = _ret.length();
|
||||
_out->data = static_cast<void*>(_arr);
|
||||
return _out;
|
||||
}
|
||||
|
||||
const char* QsciLexerCPP_BlockEnd(const QsciLexerCPP* self) {
|
||||
return (const char*) self->blockEnd();
|
||||
}
|
||||
|
||||
const char* QsciLexerCPP_BlockStart(const QsciLexerCPP* self) {
|
||||
return (const char*) self->blockStart();
|
||||
}
|
||||
|
||||
const char* QsciLexerCPP_BlockStartKeyword(const QsciLexerCPP* self) {
|
||||
return (const char*) self->blockStartKeyword();
|
||||
}
|
||||
|
||||
int QsciLexerCPP_BraceStyle(const QsciLexerCPP* self) {
|
||||
return self->braceStyle();
|
||||
}
|
||||
|
||||
const char* QsciLexerCPP_WordCharacters(const QsciLexerCPP* self) {
|
||||
return (const char*) self->wordCharacters();
|
||||
}
|
||||
|
||||
QColor* QsciLexerCPP_DefaultColor(const QsciLexerCPP* self, int style) {
|
||||
return new QColor(self->defaultColor(static_cast<int>(style)));
|
||||
}
|
||||
|
||||
bool QsciLexerCPP_DefaultEolFill(const QsciLexerCPP* self, int style) {
|
||||
return self->defaultEolFill(static_cast<int>(style));
|
||||
}
|
||||
|
||||
QFont* QsciLexerCPP_DefaultFont(const QsciLexerCPP* self, int style) {
|
||||
return new QFont(self->defaultFont(static_cast<int>(style)));
|
||||
}
|
||||
|
||||
QColor* QsciLexerCPP_DefaultPaper(const QsciLexerCPP* self, int style) {
|
||||
return new QColor(self->defaultPaper(static_cast<int>(style)));
|
||||
}
|
||||
|
||||
const char* QsciLexerCPP_Keywords(const QsciLexerCPP* self, int set) {
|
||||
return (const char*) self->keywords(static_cast<int>(set));
|
||||
}
|
||||
|
||||
struct miqt_string QsciLexerCPP_Description(const QsciLexerCPP* self, int style) {
|
||||
QString _ret = self->description(static_cast<int>(style));
|
||||
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
||||
QByteArray _b = _ret.toUtf8();
|
||||
struct miqt_string _ms;
|
||||
_ms.len = _b.length();
|
||||
_ms.data = static_cast<char*>(malloc(_ms.len));
|
||||
memcpy(_ms.data, _b.data(), _ms.len);
|
||||
return _ms;
|
||||
}
|
||||
|
||||
void QsciLexerCPP_RefreshProperties(QsciLexerCPP* self) {
|
||||
self->refreshProperties();
|
||||
}
|
||||
|
||||
bool QsciLexerCPP_FoldAtElse(const QsciLexerCPP* self) {
|
||||
return self->foldAtElse();
|
||||
}
|
||||
|
||||
bool QsciLexerCPP_FoldComments(const QsciLexerCPP* self) {
|
||||
return self->foldComments();
|
||||
}
|
||||
|
||||
bool QsciLexerCPP_FoldCompact(const QsciLexerCPP* self) {
|
||||
return self->foldCompact();
|
||||
}
|
||||
|
||||
bool QsciLexerCPP_FoldPreprocessor(const QsciLexerCPP* self) {
|
||||
return self->foldPreprocessor();
|
||||
}
|
||||
|
||||
bool QsciLexerCPP_StylePreprocessor(const QsciLexerCPP* self) {
|
||||
return self->stylePreprocessor();
|
||||
}
|
||||
|
||||
void QsciLexerCPP_SetDollarsAllowed(QsciLexerCPP* self, bool allowed) {
|
||||
self->setDollarsAllowed(allowed);
|
||||
}
|
||||
|
||||
bool QsciLexerCPP_DollarsAllowed(const QsciLexerCPP* self) {
|
||||
return self->dollarsAllowed();
|
||||
}
|
||||
|
||||
void QsciLexerCPP_SetHighlightTripleQuotedStrings(QsciLexerCPP* self, bool enabled) {
|
||||
self->setHighlightTripleQuotedStrings(enabled);
|
||||
}
|
||||
|
||||
bool QsciLexerCPP_HighlightTripleQuotedStrings(const QsciLexerCPP* self) {
|
||||
return self->highlightTripleQuotedStrings();
|
||||
}
|
||||
|
||||
void QsciLexerCPP_SetHighlightHashQuotedStrings(QsciLexerCPP* self, bool enabled) {
|
||||
self->setHighlightHashQuotedStrings(enabled);
|
||||
}
|
||||
|
||||
bool QsciLexerCPP_HighlightHashQuotedStrings(const QsciLexerCPP* self) {
|
||||
return self->highlightHashQuotedStrings();
|
||||
}
|
||||
|
||||
void QsciLexerCPP_SetHighlightBackQuotedStrings(QsciLexerCPP* self, bool enabled) {
|
||||
self->setHighlightBackQuotedStrings(enabled);
|
||||
}
|
||||
|
||||
bool QsciLexerCPP_HighlightBackQuotedStrings(const QsciLexerCPP* self) {
|
||||
return self->highlightBackQuotedStrings();
|
||||
}
|
||||
|
||||
void QsciLexerCPP_SetHighlightEscapeSequences(QsciLexerCPP* self, bool enabled) {
|
||||
self->setHighlightEscapeSequences(enabled);
|
||||
}
|
||||
|
||||
bool QsciLexerCPP_HighlightEscapeSequences(const QsciLexerCPP* self) {
|
||||
return self->highlightEscapeSequences();
|
||||
}
|
||||
|
||||
void QsciLexerCPP_SetVerbatimStringEscapeSequencesAllowed(QsciLexerCPP* self, bool allowed) {
|
||||
self->setVerbatimStringEscapeSequencesAllowed(allowed);
|
||||
}
|
||||
|
||||
bool QsciLexerCPP_VerbatimStringEscapeSequencesAllowed(const QsciLexerCPP* self) {
|
||||
return self->verbatimStringEscapeSequencesAllowed();
|
||||
}
|
||||
|
||||
void QsciLexerCPP_SetFoldAtElse(QsciLexerCPP* self, bool fold) {
|
||||
self->setFoldAtElse(fold);
|
||||
}
|
||||
|
||||
void QsciLexerCPP_SetFoldComments(QsciLexerCPP* self, bool fold) {
|
||||
self->setFoldComments(fold);
|
||||
}
|
||||
|
||||
void QsciLexerCPP_SetFoldCompact(QsciLexerCPP* self, bool fold) {
|
||||
self->setFoldCompact(fold);
|
||||
}
|
||||
|
||||
void QsciLexerCPP_SetFoldPreprocessor(QsciLexerCPP* self, bool fold) {
|
||||
self->setFoldPreprocessor(fold);
|
||||
}
|
||||
|
||||
void QsciLexerCPP_SetStylePreprocessor(QsciLexerCPP* self, bool style) {
|
||||
self->setStylePreprocessor(style);
|
||||
}
|
||||
|
||||
struct miqt_string QsciLexerCPP_Tr2(const char* s, const char* c) {
|
||||
QString _ret = QsciLexerCPP::tr(s, c);
|
||||
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
||||
QByteArray _b = _ret.toUtf8();
|
||||
struct miqt_string _ms;
|
||||
_ms.len = _b.length();
|
||||
_ms.data = static_cast<char*>(malloc(_ms.len));
|
||||
memcpy(_ms.data, _b.data(), _ms.len);
|
||||
return _ms;
|
||||
}
|
||||
|
||||
struct miqt_string QsciLexerCPP_Tr3(const char* s, const char* c, int n) {
|
||||
QString _ret = QsciLexerCPP::tr(s, c, static_cast<int>(n));
|
||||
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
||||
QByteArray _b = _ret.toUtf8();
|
||||
struct miqt_string _ms;
|
||||
_ms.len = _b.length();
|
||||
_ms.data = static_cast<char*>(malloc(_ms.len));
|
||||
memcpy(_ms.data, _b.data(), _ms.len);
|
||||
return _ms;
|
||||
}
|
||||
|
||||
struct miqt_string QsciLexerCPP_TrUtf82(const char* s, const char* c) {
|
||||
QString _ret = QsciLexerCPP::trUtf8(s, c);
|
||||
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
||||
QByteArray _b = _ret.toUtf8();
|
||||
struct miqt_string _ms;
|
||||
_ms.len = _b.length();
|
||||
_ms.data = static_cast<char*>(malloc(_ms.len));
|
||||
memcpy(_ms.data, _b.data(), _ms.len);
|
||||
return _ms;
|
||||
}
|
||||
|
||||
struct miqt_string QsciLexerCPP_TrUtf83(const char* s, const char* c, int n) {
|
||||
QString _ret = QsciLexerCPP::trUtf8(s, c, static_cast<int>(n));
|
||||
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
||||
QByteArray _b = _ret.toUtf8();
|
||||
struct miqt_string _ms;
|
||||
_ms.len = _b.length();
|
||||
_ms.data = static_cast<char*>(malloc(_ms.len));
|
||||
memcpy(_ms.data, _b.data(), _ms.len);
|
||||
return _ms;
|
||||
}
|
||||
|
||||
const char* QsciLexerCPP_BlockEnd1(const QsciLexerCPP* self, int* style) {
|
||||
return (const char*) self->blockEnd(static_cast<int*>(style));
|
||||
}
|
||||
|
||||
const char* QsciLexerCPP_BlockStart1(const QsciLexerCPP* self, int* style) {
|
||||
return (const char*) self->blockStart(static_cast<int*>(style));
|
||||
}
|
||||
|
||||
const char* QsciLexerCPP_BlockStartKeyword1(const QsciLexerCPP* self, int* style) {
|
||||
return (const char*) self->blockStartKeyword(static_cast<int*>(style));
|
||||
}
|
||||
|
||||
void QsciLexerCPP_Delete(QsciLexerCPP* self) {
|
||||
delete self;
|
||||
}
|
||||
|
402
qt-restricted-extras/qscintilla/gen_qscilexercpp.go
Normal file
402
qt-restricted-extras/qscintilla/gen_qscilexercpp.go
Normal file
@ -0,0 +1,402 @@
|
||||
package qscintilla
|
||||
|
||||
/*
|
||||
|
||||
#include "gen_qscilexercpp.h"
|
||||
#include <stdlib.h>
|
||||
|
||||
*/
|
||||
import "C"
|
||||
|
||||
import (
|
||||
"github.com/mappu/miqt/qt"
|
||||
"runtime"
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
type QsciLexerCPP__ int
|
||||
|
||||
const (
|
||||
QsciLexerCPP__Default QsciLexerCPP__ = 0
|
||||
QsciLexerCPP__InactiveDefault QsciLexerCPP__ = 64
|
||||
QsciLexerCPP__Comment QsciLexerCPP__ = 1
|
||||
QsciLexerCPP__InactiveComment QsciLexerCPP__ = 65
|
||||
QsciLexerCPP__CommentLine QsciLexerCPP__ = 2
|
||||
QsciLexerCPP__InactiveCommentLine QsciLexerCPP__ = 66
|
||||
QsciLexerCPP__CommentDoc QsciLexerCPP__ = 3
|
||||
QsciLexerCPP__InactiveCommentDoc QsciLexerCPP__ = 67
|
||||
QsciLexerCPP__Number QsciLexerCPP__ = 4
|
||||
QsciLexerCPP__InactiveNumber QsciLexerCPP__ = 68
|
||||
QsciLexerCPP__Keyword QsciLexerCPP__ = 5
|
||||
QsciLexerCPP__InactiveKeyword QsciLexerCPP__ = 69
|
||||
QsciLexerCPP__DoubleQuotedString QsciLexerCPP__ = 6
|
||||
QsciLexerCPP__InactiveDoubleQuotedString QsciLexerCPP__ = 70
|
||||
QsciLexerCPP__SingleQuotedString QsciLexerCPP__ = 7
|
||||
QsciLexerCPP__InactiveSingleQuotedString QsciLexerCPP__ = 71
|
||||
QsciLexerCPP__UUID QsciLexerCPP__ = 8
|
||||
QsciLexerCPP__InactiveUUID QsciLexerCPP__ = 72
|
||||
QsciLexerCPP__PreProcessor QsciLexerCPP__ = 9
|
||||
QsciLexerCPP__InactivePreProcessor QsciLexerCPP__ = 73
|
||||
QsciLexerCPP__Operator QsciLexerCPP__ = 10
|
||||
QsciLexerCPP__InactiveOperator QsciLexerCPP__ = 74
|
||||
QsciLexerCPP__Identifier QsciLexerCPP__ = 11
|
||||
QsciLexerCPP__InactiveIdentifier QsciLexerCPP__ = 75
|
||||
QsciLexerCPP__UnclosedString QsciLexerCPP__ = 12
|
||||
QsciLexerCPP__InactiveUnclosedString QsciLexerCPP__ = 76
|
||||
QsciLexerCPP__VerbatimString QsciLexerCPP__ = 13
|
||||
QsciLexerCPP__InactiveVerbatimString QsciLexerCPP__ = 77
|
||||
QsciLexerCPP__Regex QsciLexerCPP__ = 14
|
||||
QsciLexerCPP__InactiveRegex QsciLexerCPP__ = 78
|
||||
QsciLexerCPP__CommentLineDoc QsciLexerCPP__ = 15
|
||||
QsciLexerCPP__InactiveCommentLineDoc QsciLexerCPP__ = 79
|
||||
QsciLexerCPP__KeywordSet2 QsciLexerCPP__ = 16
|
||||
QsciLexerCPP__InactiveKeywordSet2 QsciLexerCPP__ = 80
|
||||
QsciLexerCPP__CommentDocKeyword QsciLexerCPP__ = 17
|
||||
QsciLexerCPP__InactiveCommentDocKeyword QsciLexerCPP__ = 81
|
||||
QsciLexerCPP__CommentDocKeywordError QsciLexerCPP__ = 18
|
||||
QsciLexerCPP__InactiveCommentDocKeywordError QsciLexerCPP__ = 82
|
||||
QsciLexerCPP__GlobalClass QsciLexerCPP__ = 19
|
||||
QsciLexerCPP__InactiveGlobalClass QsciLexerCPP__ = 83
|
||||
QsciLexerCPP__RawString QsciLexerCPP__ = 20
|
||||
QsciLexerCPP__InactiveRawString QsciLexerCPP__ = 84
|
||||
QsciLexerCPP__TripleQuotedVerbatimString QsciLexerCPP__ = 21
|
||||
QsciLexerCPP__InactiveTripleQuotedVerbatimString QsciLexerCPP__ = 85
|
||||
QsciLexerCPP__HashQuotedString QsciLexerCPP__ = 22
|
||||
QsciLexerCPP__InactiveHashQuotedString QsciLexerCPP__ = 86
|
||||
QsciLexerCPP__PreProcessorComment QsciLexerCPP__ = 23
|
||||
QsciLexerCPP__InactivePreProcessorComment QsciLexerCPP__ = 87
|
||||
QsciLexerCPP__PreProcessorCommentLineDoc QsciLexerCPP__ = 24
|
||||
QsciLexerCPP__InactivePreProcessorCommentLineDoc QsciLexerCPP__ = 88
|
||||
QsciLexerCPP__UserLiteral QsciLexerCPP__ = 25
|
||||
QsciLexerCPP__InactiveUserLiteral QsciLexerCPP__ = 89
|
||||
QsciLexerCPP__TaskMarker QsciLexerCPP__ = 26
|
||||
QsciLexerCPP__InactiveTaskMarker QsciLexerCPP__ = 90
|
||||
QsciLexerCPP__EscapeSequence QsciLexerCPP__ = 27
|
||||
QsciLexerCPP__InactiveEscapeSequence QsciLexerCPP__ = 91
|
||||
)
|
||||
|
||||
type QsciLexerCPP struct {
|
||||
h *C.QsciLexerCPP
|
||||
*QsciLexer
|
||||
}
|
||||
|
||||
func (this *QsciLexerCPP) cPointer() *C.QsciLexerCPP {
|
||||
if this == nil {
|
||||
return nil
|
||||
}
|
||||
return this.h
|
||||
}
|
||||
|
||||
func (this *QsciLexerCPP) UnsafePointer() unsafe.Pointer {
|
||||
if this == nil {
|
||||
return nil
|
||||
}
|
||||
return unsafe.Pointer(this.h)
|
||||
}
|
||||
|
||||
func newQsciLexerCPP(h *C.QsciLexerCPP) *QsciLexerCPP {
|
||||
if h == nil {
|
||||
return nil
|
||||
}
|
||||
return &QsciLexerCPP{h: h, QsciLexer: UnsafeNewQsciLexer(unsafe.Pointer(h))}
|
||||
}
|
||||
|
||||
func UnsafeNewQsciLexerCPP(h unsafe.Pointer) *QsciLexerCPP {
|
||||
return newQsciLexerCPP((*C.QsciLexerCPP)(h))
|
||||
}
|
||||
|
||||
// NewQsciLexerCPP constructs a new QsciLexerCPP object.
|
||||
func NewQsciLexerCPP() *QsciLexerCPP {
|
||||
ret := C.QsciLexerCPP_new()
|
||||
return newQsciLexerCPP(ret)
|
||||
}
|
||||
|
||||
// NewQsciLexerCPP2 constructs a new QsciLexerCPP object.
|
||||
func NewQsciLexerCPP2(parent *qt.QObject) *QsciLexerCPP {
|
||||
ret := C.QsciLexerCPP_new2((*C.QObject)(parent.UnsafePointer()))
|
||||
return newQsciLexerCPP(ret)
|
||||
}
|
||||
|
||||
// NewQsciLexerCPP3 constructs a new QsciLexerCPP object.
|
||||
func NewQsciLexerCPP3(parent *qt.QObject, caseInsensitiveKeywords bool) *QsciLexerCPP {
|
||||
ret := C.QsciLexerCPP_new3((*C.QObject)(parent.UnsafePointer()), (C.bool)(caseInsensitiveKeywords))
|
||||
return newQsciLexerCPP(ret)
|
||||
}
|
||||
|
||||
func (this *QsciLexerCPP) MetaObject() *qt.QMetaObject {
|
||||
return qt.UnsafeNewQMetaObject(unsafe.Pointer(C.QsciLexerCPP_MetaObject(this.h)))
|
||||
}
|
||||
|
||||
func (this *QsciLexerCPP) Metacast(param1 string) unsafe.Pointer {
|
||||
param1_Cstring := C.CString(param1)
|
||||
defer C.free(unsafe.Pointer(param1_Cstring))
|
||||
return (unsafe.Pointer)(C.QsciLexerCPP_Metacast(this.h, param1_Cstring))
|
||||
}
|
||||
|
||||
func QsciLexerCPP_Tr(s string) string {
|
||||
s_Cstring := C.CString(s)
|
||||
defer C.free(unsafe.Pointer(s_Cstring))
|
||||
var _ms C.struct_miqt_string = C.QsciLexerCPP_Tr(s_Cstring)
|
||||
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
||||
C.free(unsafe.Pointer(_ms.data))
|
||||
return _ret
|
||||
}
|
||||
|
||||
func QsciLexerCPP_TrUtf8(s string) string {
|
||||
s_Cstring := C.CString(s)
|
||||
defer C.free(unsafe.Pointer(s_Cstring))
|
||||
var _ms C.struct_miqt_string = C.QsciLexerCPP_TrUtf8(s_Cstring)
|
||||
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
||||
C.free(unsafe.Pointer(_ms.data))
|
||||
return _ret
|
||||
}
|
||||
|
||||
func (this *QsciLexerCPP) Language() string {
|
||||
_ret := C.QsciLexerCPP_Language(this.h)
|
||||
return C.GoString(_ret)
|
||||
}
|
||||
|
||||
func (this *QsciLexerCPP) Lexer() string {
|
||||
_ret := C.QsciLexerCPP_Lexer(this.h)
|
||||
return C.GoString(_ret)
|
||||
}
|
||||
|
||||
func (this *QsciLexerCPP) AutoCompletionWordSeparators() []string {
|
||||
var _ma *C.struct_miqt_array = C.QsciLexerCPP_AutoCompletionWordSeparators(this.h)
|
||||
_ret := make([]string, int(_ma.len))
|
||||
_outCast := (*[0xffff]C.struct_miqt_string)(unsafe.Pointer(_ma.data)) // hey ya
|
||||
for i := 0; i < int(_ma.len); i++ {
|
||||
var _lv_ms C.struct_miqt_string = _outCast[i]
|
||||
_lv_ret := C.GoStringN(_lv_ms.data, C.int(int64(_lv_ms.len)))
|
||||
C.free(unsafe.Pointer(_lv_ms.data))
|
||||
_ret[i] = _lv_ret
|
||||
}
|
||||
C.free(unsafe.Pointer(_ma))
|
||||
return _ret
|
||||
}
|
||||
|
||||
func (this *QsciLexerCPP) BlockEnd() string {
|
||||
_ret := C.QsciLexerCPP_BlockEnd(this.h)
|
||||
return C.GoString(_ret)
|
||||
}
|
||||
|
||||
func (this *QsciLexerCPP) BlockStart() string {
|
||||
_ret := C.QsciLexerCPP_BlockStart(this.h)
|
||||
return C.GoString(_ret)
|
||||
}
|
||||
|
||||
func (this *QsciLexerCPP) BlockStartKeyword() string {
|
||||
_ret := C.QsciLexerCPP_BlockStartKeyword(this.h)
|
||||
return C.GoString(_ret)
|
||||
}
|
||||
|
||||
func (this *QsciLexerCPP) BraceStyle() int {
|
||||
return (int)(C.QsciLexerCPP_BraceStyle(this.h))
|
||||
}
|
||||
|
||||
func (this *QsciLexerCPP) WordCharacters() string {
|
||||
_ret := C.QsciLexerCPP_WordCharacters(this.h)
|
||||
return C.GoString(_ret)
|
||||
}
|
||||
|
||||
func (this *QsciLexerCPP) DefaultColor(style int) *qt.QColor {
|
||||
_ret := C.QsciLexerCPP_DefaultColor(this.h, (C.int)(style))
|
||||
_goptr := qt.UnsafeNewQColor(unsafe.Pointer(_ret))
|
||||
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
|
||||
return _goptr
|
||||
}
|
||||
|
||||
func (this *QsciLexerCPP) DefaultEolFill(style int) bool {
|
||||
return (bool)(C.QsciLexerCPP_DefaultEolFill(this.h, (C.int)(style)))
|
||||
}
|
||||
|
||||
func (this *QsciLexerCPP) DefaultFont(style int) *qt.QFont {
|
||||
_ret := C.QsciLexerCPP_DefaultFont(this.h, (C.int)(style))
|
||||
_goptr := qt.UnsafeNewQFont(unsafe.Pointer(_ret))
|
||||
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
|
||||
return _goptr
|
||||
}
|
||||
|
||||
func (this *QsciLexerCPP) DefaultPaper(style int) *qt.QColor {
|
||||
_ret := C.QsciLexerCPP_DefaultPaper(this.h, (C.int)(style))
|
||||
_goptr := qt.UnsafeNewQColor(unsafe.Pointer(_ret))
|
||||
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
|
||||
return _goptr
|
||||
}
|
||||
|
||||
func (this *QsciLexerCPP) Keywords(set int) string {
|
||||
_ret := C.QsciLexerCPP_Keywords(this.h, (C.int)(set))
|
||||
return C.GoString(_ret)
|
||||
}
|
||||
|
||||
func (this *QsciLexerCPP) Description(style int) string {
|
||||
var _ms C.struct_miqt_string = C.QsciLexerCPP_Description(this.h, (C.int)(style))
|
||||
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
||||
C.free(unsafe.Pointer(_ms.data))
|
||||
return _ret
|
||||
}
|
||||
|
||||
func (this *QsciLexerCPP) RefreshProperties() {
|
||||
C.QsciLexerCPP_RefreshProperties(this.h)
|
||||
}
|
||||
|
||||
func (this *QsciLexerCPP) FoldAtElse() bool {
|
||||
return (bool)(C.QsciLexerCPP_FoldAtElse(this.h))
|
||||
}
|
||||
|
||||
func (this *QsciLexerCPP) FoldComments() bool {
|
||||
return (bool)(C.QsciLexerCPP_FoldComments(this.h))
|
||||
}
|
||||
|
||||
func (this *QsciLexerCPP) FoldCompact() bool {
|
||||
return (bool)(C.QsciLexerCPP_FoldCompact(this.h))
|
||||
}
|
||||
|
||||
func (this *QsciLexerCPP) FoldPreprocessor() bool {
|
||||
return (bool)(C.QsciLexerCPP_FoldPreprocessor(this.h))
|
||||
}
|
||||
|
||||
func (this *QsciLexerCPP) StylePreprocessor() bool {
|
||||
return (bool)(C.QsciLexerCPP_StylePreprocessor(this.h))
|
||||
}
|
||||
|
||||
func (this *QsciLexerCPP) SetDollarsAllowed(allowed bool) {
|
||||
C.QsciLexerCPP_SetDollarsAllowed(this.h, (C.bool)(allowed))
|
||||
}
|
||||
|
||||
func (this *QsciLexerCPP) DollarsAllowed() bool {
|
||||
return (bool)(C.QsciLexerCPP_DollarsAllowed(this.h))
|
||||
}
|
||||
|
||||
func (this *QsciLexerCPP) SetHighlightTripleQuotedStrings(enabled bool) {
|
||||
C.QsciLexerCPP_SetHighlightTripleQuotedStrings(this.h, (C.bool)(enabled))
|
||||
}
|
||||
|
||||
func (this *QsciLexerCPP) HighlightTripleQuotedStrings() bool {
|
||||
return (bool)(C.QsciLexerCPP_HighlightTripleQuotedStrings(this.h))
|
||||
}
|
||||
|
||||
func (this *QsciLexerCPP) SetHighlightHashQuotedStrings(enabled bool) {
|
||||
C.QsciLexerCPP_SetHighlightHashQuotedStrings(this.h, (C.bool)(enabled))
|
||||
}
|
||||
|
||||
func (this *QsciLexerCPP) HighlightHashQuotedStrings() bool {
|
||||
return (bool)(C.QsciLexerCPP_HighlightHashQuotedStrings(this.h))
|
||||
}
|
||||
|
||||
func (this *QsciLexerCPP) SetHighlightBackQuotedStrings(enabled bool) {
|
||||
C.QsciLexerCPP_SetHighlightBackQuotedStrings(this.h, (C.bool)(enabled))
|
||||
}
|
||||
|
||||
func (this *QsciLexerCPP) HighlightBackQuotedStrings() bool {
|
||||
return (bool)(C.QsciLexerCPP_HighlightBackQuotedStrings(this.h))
|
||||
}
|
||||
|
||||
func (this *QsciLexerCPP) SetHighlightEscapeSequences(enabled bool) {
|
||||
C.QsciLexerCPP_SetHighlightEscapeSequences(this.h, (C.bool)(enabled))
|
||||
}
|
||||
|
||||
func (this *QsciLexerCPP) HighlightEscapeSequences() bool {
|
||||
return (bool)(C.QsciLexerCPP_HighlightEscapeSequences(this.h))
|
||||
}
|
||||
|
||||
func (this *QsciLexerCPP) SetVerbatimStringEscapeSequencesAllowed(allowed bool) {
|
||||
C.QsciLexerCPP_SetVerbatimStringEscapeSequencesAllowed(this.h, (C.bool)(allowed))
|
||||
}
|
||||
|
||||
func (this *QsciLexerCPP) VerbatimStringEscapeSequencesAllowed() bool {
|
||||
return (bool)(C.QsciLexerCPP_VerbatimStringEscapeSequencesAllowed(this.h))
|
||||
}
|
||||
|
||||
func (this *QsciLexerCPP) SetFoldAtElse(fold bool) {
|
||||
C.QsciLexerCPP_SetFoldAtElse(this.h, (C.bool)(fold))
|
||||
}
|
||||
|
||||
func (this *QsciLexerCPP) SetFoldComments(fold bool) {
|
||||
C.QsciLexerCPP_SetFoldComments(this.h, (C.bool)(fold))
|
||||
}
|
||||
|
||||
func (this *QsciLexerCPP) SetFoldCompact(fold bool) {
|
||||
C.QsciLexerCPP_SetFoldCompact(this.h, (C.bool)(fold))
|
||||
}
|
||||
|
||||
func (this *QsciLexerCPP) SetFoldPreprocessor(fold bool) {
|
||||
C.QsciLexerCPP_SetFoldPreprocessor(this.h, (C.bool)(fold))
|
||||
}
|
||||
|
||||
func (this *QsciLexerCPP) SetStylePreprocessor(style bool) {
|
||||
C.QsciLexerCPP_SetStylePreprocessor(this.h, (C.bool)(style))
|
||||
}
|
||||
|
||||
func QsciLexerCPP_Tr2(s string, c string) string {
|
||||
s_Cstring := C.CString(s)
|
||||
defer C.free(unsafe.Pointer(s_Cstring))
|
||||
c_Cstring := C.CString(c)
|
||||
defer C.free(unsafe.Pointer(c_Cstring))
|
||||
var _ms C.struct_miqt_string = C.QsciLexerCPP_Tr2(s_Cstring, c_Cstring)
|
||||
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
||||
C.free(unsafe.Pointer(_ms.data))
|
||||
return _ret
|
||||
}
|
||||
|
||||
func QsciLexerCPP_Tr3(s string, c string, n int) string {
|
||||
s_Cstring := C.CString(s)
|
||||
defer C.free(unsafe.Pointer(s_Cstring))
|
||||
c_Cstring := C.CString(c)
|
||||
defer C.free(unsafe.Pointer(c_Cstring))
|
||||
var _ms C.struct_miqt_string = C.QsciLexerCPP_Tr3(s_Cstring, c_Cstring, (C.int)(n))
|
||||
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
||||
C.free(unsafe.Pointer(_ms.data))
|
||||
return _ret
|
||||
}
|
||||
|
||||
func QsciLexerCPP_TrUtf82(s string, c string) string {
|
||||
s_Cstring := C.CString(s)
|
||||
defer C.free(unsafe.Pointer(s_Cstring))
|
||||
c_Cstring := C.CString(c)
|
||||
defer C.free(unsafe.Pointer(c_Cstring))
|
||||
var _ms C.struct_miqt_string = C.QsciLexerCPP_TrUtf82(s_Cstring, c_Cstring)
|
||||
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
||||
C.free(unsafe.Pointer(_ms.data))
|
||||
return _ret
|
||||
}
|
||||
|
||||
func QsciLexerCPP_TrUtf83(s string, c string, n int) string {
|
||||
s_Cstring := C.CString(s)
|
||||
defer C.free(unsafe.Pointer(s_Cstring))
|
||||
c_Cstring := C.CString(c)
|
||||
defer C.free(unsafe.Pointer(c_Cstring))
|
||||
var _ms C.struct_miqt_string = C.QsciLexerCPP_TrUtf83(s_Cstring, c_Cstring, (C.int)(n))
|
||||
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
||||
C.free(unsafe.Pointer(_ms.data))
|
||||
return _ret
|
||||
}
|
||||
|
||||
func (this *QsciLexerCPP) BlockEnd1(style *int) string {
|
||||
_ret := C.QsciLexerCPP_BlockEnd1(this.h, (*C.int)(unsafe.Pointer(style)))
|
||||
return C.GoString(_ret)
|
||||
}
|
||||
|
||||
func (this *QsciLexerCPP) BlockStart1(style *int) string {
|
||||
_ret := C.QsciLexerCPP_BlockStart1(this.h, (*C.int)(unsafe.Pointer(style)))
|
||||
return C.GoString(_ret)
|
||||
}
|
||||
|
||||
func (this *QsciLexerCPP) BlockStartKeyword1(style *int) string {
|
||||
_ret := C.QsciLexerCPP_BlockStartKeyword1(this.h, (*C.int)(unsafe.Pointer(style)))
|
||||
return C.GoString(_ret)
|
||||
}
|
||||
|
||||
// Delete this object from C++ memory.
|
||||
func (this *QsciLexerCPP) Delete() {
|
||||
C.QsciLexerCPP_Delete(this.h)
|
||||
}
|
||||
|
||||
// GoGC adds a Go Finalizer to this pointer, so that it will be deleted
|
||||
// from C++ memory once it is unreachable from Go memory.
|
||||
func (this *QsciLexerCPP) GoGC() {
|
||||
runtime.SetFinalizer(this, func(this *QsciLexerCPP) {
|
||||
this.Delete()
|
||||
runtime.KeepAlive(this.h)
|
||||
})
|
||||
}
|
87
qt-restricted-extras/qscintilla/gen_qscilexercpp.h
Normal file
87
qt-restricted-extras/qscintilla/gen_qscilexercpp.h
Normal file
@ -0,0 +1,87 @@
|
||||
#ifndef GEN_QSCILEXERCPP_H
|
||||
#define GEN_QSCILEXERCPP_H
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||
|
||||
#include "../../libmiqt/libmiqt.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
class QColor;
|
||||
class QFont;
|
||||
class QMetaObject;
|
||||
class QObject;
|
||||
class QsciLexerCPP;
|
||||
#else
|
||||
typedef struct QColor QColor;
|
||||
typedef struct QFont QFont;
|
||||
typedef struct QMetaObject QMetaObject;
|
||||
typedef struct QObject QObject;
|
||||
typedef struct QsciLexerCPP QsciLexerCPP;
|
||||
#endif
|
||||
|
||||
QsciLexerCPP* QsciLexerCPP_new();
|
||||
QsciLexerCPP* QsciLexerCPP_new2(QObject* parent);
|
||||
QsciLexerCPP* QsciLexerCPP_new3(QObject* parent, bool caseInsensitiveKeywords);
|
||||
QMetaObject* QsciLexerCPP_MetaObject(const QsciLexerCPP* self);
|
||||
void* QsciLexerCPP_Metacast(QsciLexerCPP* self, const char* param1);
|
||||
struct miqt_string QsciLexerCPP_Tr(const char* s);
|
||||
struct miqt_string QsciLexerCPP_TrUtf8(const char* s);
|
||||
const char* QsciLexerCPP_Language(const QsciLexerCPP* self);
|
||||
const char* QsciLexerCPP_Lexer(const QsciLexerCPP* self);
|
||||
struct miqt_array* QsciLexerCPP_AutoCompletionWordSeparators(const QsciLexerCPP* self);
|
||||
const char* QsciLexerCPP_BlockEnd(const QsciLexerCPP* self);
|
||||
const char* QsciLexerCPP_BlockStart(const QsciLexerCPP* self);
|
||||
const char* QsciLexerCPP_BlockStartKeyword(const QsciLexerCPP* self);
|
||||
int QsciLexerCPP_BraceStyle(const QsciLexerCPP* self);
|
||||
const char* QsciLexerCPP_WordCharacters(const QsciLexerCPP* self);
|
||||
QColor* QsciLexerCPP_DefaultColor(const QsciLexerCPP* self, int style);
|
||||
bool QsciLexerCPP_DefaultEolFill(const QsciLexerCPP* self, int style);
|
||||
QFont* QsciLexerCPP_DefaultFont(const QsciLexerCPP* self, int style);
|
||||
QColor* QsciLexerCPP_DefaultPaper(const QsciLexerCPP* self, int style);
|
||||
const char* QsciLexerCPP_Keywords(const QsciLexerCPP* self, int set);
|
||||
struct miqt_string QsciLexerCPP_Description(const QsciLexerCPP* self, int style);
|
||||
void QsciLexerCPP_RefreshProperties(QsciLexerCPP* self);
|
||||
bool QsciLexerCPP_FoldAtElse(const QsciLexerCPP* self);
|
||||
bool QsciLexerCPP_FoldComments(const QsciLexerCPP* self);
|
||||
bool QsciLexerCPP_FoldCompact(const QsciLexerCPP* self);
|
||||
bool QsciLexerCPP_FoldPreprocessor(const QsciLexerCPP* self);
|
||||
bool QsciLexerCPP_StylePreprocessor(const QsciLexerCPP* self);
|
||||
void QsciLexerCPP_SetDollarsAllowed(QsciLexerCPP* self, bool allowed);
|
||||
bool QsciLexerCPP_DollarsAllowed(const QsciLexerCPP* self);
|
||||
void QsciLexerCPP_SetHighlightTripleQuotedStrings(QsciLexerCPP* self, bool enabled);
|
||||
bool QsciLexerCPP_HighlightTripleQuotedStrings(const QsciLexerCPP* self);
|
||||
void QsciLexerCPP_SetHighlightHashQuotedStrings(QsciLexerCPP* self, bool enabled);
|
||||
bool QsciLexerCPP_HighlightHashQuotedStrings(const QsciLexerCPP* self);
|
||||
void QsciLexerCPP_SetHighlightBackQuotedStrings(QsciLexerCPP* self, bool enabled);
|
||||
bool QsciLexerCPP_HighlightBackQuotedStrings(const QsciLexerCPP* self);
|
||||
void QsciLexerCPP_SetHighlightEscapeSequences(QsciLexerCPP* self, bool enabled);
|
||||
bool QsciLexerCPP_HighlightEscapeSequences(const QsciLexerCPP* self);
|
||||
void QsciLexerCPP_SetVerbatimStringEscapeSequencesAllowed(QsciLexerCPP* self, bool allowed);
|
||||
bool QsciLexerCPP_VerbatimStringEscapeSequencesAllowed(const QsciLexerCPP* self);
|
||||
void QsciLexerCPP_SetFoldAtElse(QsciLexerCPP* self, bool fold);
|
||||
void QsciLexerCPP_SetFoldComments(QsciLexerCPP* self, bool fold);
|
||||
void QsciLexerCPP_SetFoldCompact(QsciLexerCPP* self, bool fold);
|
||||
void QsciLexerCPP_SetFoldPreprocessor(QsciLexerCPP* self, bool fold);
|
||||
void QsciLexerCPP_SetStylePreprocessor(QsciLexerCPP* self, bool style);
|
||||
struct miqt_string QsciLexerCPP_Tr2(const char* s, const char* c);
|
||||
struct miqt_string QsciLexerCPP_Tr3(const char* s, const char* c, int n);
|
||||
struct miqt_string QsciLexerCPP_TrUtf82(const char* s, const char* c);
|
||||
struct miqt_string QsciLexerCPP_TrUtf83(const char* s, const char* c, int n);
|
||||
const char* QsciLexerCPP_BlockEnd1(const QsciLexerCPP* self, int* style);
|
||||
const char* QsciLexerCPP_BlockStart1(const QsciLexerCPP* self, int* style);
|
||||
const char* QsciLexerCPP_BlockStartKeyword1(const QsciLexerCPP* self, int* style);
|
||||
void QsciLexerCPP_Delete(QsciLexerCPP* self);
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern C */
|
||||
#endif
|
||||
|
||||
#endif
|
132
qt-restricted-extras/qscintilla/gen_qscilexercsharp.cpp
Normal file
132
qt-restricted-extras/qscintilla/gen_qscilexercsharp.cpp
Normal file
@ -0,0 +1,132 @@
|
||||
#include <QColor>
|
||||
#include <QFont>
|
||||
#include <QMetaObject>
|
||||
#include <QObject>
|
||||
#include <QString>
|
||||
#include <QByteArray>
|
||||
#include <cstring>
|
||||
#include <qscilexercsharp.h>
|
||||
#include "gen_qscilexercsharp.h"
|
||||
#include "_cgo_export.h"
|
||||
|
||||
QsciLexerCSharp* QsciLexerCSharp_new() {
|
||||
return new QsciLexerCSharp();
|
||||
}
|
||||
|
||||
QsciLexerCSharp* QsciLexerCSharp_new2(QObject* parent) {
|
||||
return new QsciLexerCSharp(parent);
|
||||
}
|
||||
|
||||
QMetaObject* QsciLexerCSharp_MetaObject(const QsciLexerCSharp* self) {
|
||||
return (QMetaObject*) self->metaObject();
|
||||
}
|
||||
|
||||
void* QsciLexerCSharp_Metacast(QsciLexerCSharp* self, const char* param1) {
|
||||
return self->qt_metacast(param1);
|
||||
}
|
||||
|
||||
struct miqt_string QsciLexerCSharp_Tr(const char* s) {
|
||||
QString _ret = QsciLexerCSharp::tr(s);
|
||||
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
||||
QByteArray _b = _ret.toUtf8();
|
||||
struct miqt_string _ms;
|
||||
_ms.len = _b.length();
|
||||
_ms.data = static_cast<char*>(malloc(_ms.len));
|
||||
memcpy(_ms.data, _b.data(), _ms.len);
|
||||
return _ms;
|
||||
}
|
||||
|
||||
struct miqt_string QsciLexerCSharp_TrUtf8(const char* s) {
|
||||
QString _ret = QsciLexerCSharp::trUtf8(s);
|
||||
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
||||
QByteArray _b = _ret.toUtf8();
|
||||
struct miqt_string _ms;
|
||||
_ms.len = _b.length();
|
||||
_ms.data = static_cast<char*>(malloc(_ms.len));
|
||||
memcpy(_ms.data, _b.data(), _ms.len);
|
||||
return _ms;
|
||||
}
|
||||
|
||||
const char* QsciLexerCSharp_Language(const QsciLexerCSharp* self) {
|
||||
return (const char*) self->language();
|
||||
}
|
||||
|
||||
QColor* QsciLexerCSharp_DefaultColor(const QsciLexerCSharp* self, int style) {
|
||||
return new QColor(self->defaultColor(static_cast<int>(style)));
|
||||
}
|
||||
|
||||
bool QsciLexerCSharp_DefaultEolFill(const QsciLexerCSharp* self, int style) {
|
||||
return self->defaultEolFill(static_cast<int>(style));
|
||||
}
|
||||
|
||||
QFont* QsciLexerCSharp_DefaultFont(const QsciLexerCSharp* self, int style) {
|
||||
return new QFont(self->defaultFont(static_cast<int>(style)));
|
||||
}
|
||||
|
||||
QColor* QsciLexerCSharp_DefaultPaper(const QsciLexerCSharp* self, int style) {
|
||||
return new QColor(self->defaultPaper(static_cast<int>(style)));
|
||||
}
|
||||
|
||||
const char* QsciLexerCSharp_Keywords(const QsciLexerCSharp* self, int set) {
|
||||
return (const char*) self->keywords(static_cast<int>(set));
|
||||
}
|
||||
|
||||
struct miqt_string QsciLexerCSharp_Description(const QsciLexerCSharp* self, int style) {
|
||||
QString _ret = self->description(static_cast<int>(style));
|
||||
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
||||
QByteArray _b = _ret.toUtf8();
|
||||
struct miqt_string _ms;
|
||||
_ms.len = _b.length();
|
||||
_ms.data = static_cast<char*>(malloc(_ms.len));
|
||||
memcpy(_ms.data, _b.data(), _ms.len);
|
||||
return _ms;
|
||||
}
|
||||
|
||||
struct miqt_string QsciLexerCSharp_Tr2(const char* s, const char* c) {
|
||||
QString _ret = QsciLexerCSharp::tr(s, c);
|
||||
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
||||
QByteArray _b = _ret.toUtf8();
|
||||
struct miqt_string _ms;
|
||||
_ms.len = _b.length();
|
||||
_ms.data = static_cast<char*>(malloc(_ms.len));
|
||||
memcpy(_ms.data, _b.data(), _ms.len);
|
||||
return _ms;
|
||||
}
|
||||
|
||||
struct miqt_string QsciLexerCSharp_Tr3(const char* s, const char* c, int n) {
|
||||
QString _ret = QsciLexerCSharp::tr(s, c, static_cast<int>(n));
|
||||
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
||||
QByteArray _b = _ret.toUtf8();
|
||||
struct miqt_string _ms;
|
||||
_ms.len = _b.length();
|
||||
_ms.data = static_cast<char*>(malloc(_ms.len));
|
||||
memcpy(_ms.data, _b.data(), _ms.len);
|
||||
return _ms;
|
||||
}
|
||||
|
||||
struct miqt_string QsciLexerCSharp_TrUtf82(const char* s, const char* c) {
|
||||
QString _ret = QsciLexerCSharp::trUtf8(s, c);
|
||||
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
||||
QByteArray _b = _ret.toUtf8();
|
||||
struct miqt_string _ms;
|
||||
_ms.len = _b.length();
|
||||
_ms.data = static_cast<char*>(malloc(_ms.len));
|
||||
memcpy(_ms.data, _b.data(), _ms.len);
|
||||
return _ms;
|
||||
}
|
||||
|
||||
struct miqt_string QsciLexerCSharp_TrUtf83(const char* s, const char* c, int n) {
|
||||
QString _ret = QsciLexerCSharp::trUtf8(s, c, static_cast<int>(n));
|
||||
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
||||
QByteArray _b = _ret.toUtf8();
|
||||
struct miqt_string _ms;
|
||||
_ms.len = _b.length();
|
||||
_ms.data = static_cast<char*>(malloc(_ms.len));
|
||||
memcpy(_ms.data, _b.data(), _ms.len);
|
||||
return _ms;
|
||||
}
|
||||
|
||||
void QsciLexerCSharp_Delete(QsciLexerCSharp* self) {
|
||||
delete self;
|
||||
}
|
||||
|
185
qt-restricted-extras/qscintilla/gen_qscilexercsharp.go
Normal file
185
qt-restricted-extras/qscintilla/gen_qscilexercsharp.go
Normal file
@ -0,0 +1,185 @@
|
||||
package qscintilla
|
||||
|
||||
/*
|
||||
|
||||
#include "gen_qscilexercsharp.h"
|
||||
#include <stdlib.h>
|
||||
|
||||
*/
|
||||
import "C"
|
||||
|
||||
import (
|
||||
"github.com/mappu/miqt/qt"
|
||||
"runtime"
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
type QsciLexerCSharp struct {
|
||||
h *C.QsciLexerCSharp
|
||||
*QsciLexerCPP
|
||||
}
|
||||
|
||||
func (this *QsciLexerCSharp) cPointer() *C.QsciLexerCSharp {
|
||||
if this == nil {
|
||||
return nil
|
||||
}
|
||||
return this.h
|
||||
}
|
||||
|
||||
func (this *QsciLexerCSharp) UnsafePointer() unsafe.Pointer {
|
||||
if this == nil {
|
||||
return nil
|
||||
}
|
||||
return unsafe.Pointer(this.h)
|
||||
}
|
||||
|
||||
func newQsciLexerCSharp(h *C.QsciLexerCSharp) *QsciLexerCSharp {
|
||||
if h == nil {
|
||||
return nil
|
||||
}
|
||||
return &QsciLexerCSharp{h: h, QsciLexerCPP: UnsafeNewQsciLexerCPP(unsafe.Pointer(h))}
|
||||
}
|
||||
|
||||
func UnsafeNewQsciLexerCSharp(h unsafe.Pointer) *QsciLexerCSharp {
|
||||
return newQsciLexerCSharp((*C.QsciLexerCSharp)(h))
|
||||
}
|
||||
|
||||
// NewQsciLexerCSharp constructs a new QsciLexerCSharp object.
|
||||
func NewQsciLexerCSharp() *QsciLexerCSharp {
|
||||
ret := C.QsciLexerCSharp_new()
|
||||
return newQsciLexerCSharp(ret)
|
||||
}
|
||||
|
||||
// NewQsciLexerCSharp2 constructs a new QsciLexerCSharp object.
|
||||
func NewQsciLexerCSharp2(parent *qt.QObject) *QsciLexerCSharp {
|
||||
ret := C.QsciLexerCSharp_new2((*C.QObject)(parent.UnsafePointer()))
|
||||
return newQsciLexerCSharp(ret)
|
||||
}
|
||||
|
||||
func (this *QsciLexerCSharp) MetaObject() *qt.QMetaObject {
|
||||
return qt.UnsafeNewQMetaObject(unsafe.Pointer(C.QsciLexerCSharp_MetaObject(this.h)))
|
||||
}
|
||||
|
||||
func (this *QsciLexerCSharp) Metacast(param1 string) unsafe.Pointer {
|
||||
param1_Cstring := C.CString(param1)
|
||||
defer C.free(unsafe.Pointer(param1_Cstring))
|
||||
return (unsafe.Pointer)(C.QsciLexerCSharp_Metacast(this.h, param1_Cstring))
|
||||
}
|
||||
|
||||
func QsciLexerCSharp_Tr(s string) string {
|
||||
s_Cstring := C.CString(s)
|
||||
defer C.free(unsafe.Pointer(s_Cstring))
|
||||
var _ms C.struct_miqt_string = C.QsciLexerCSharp_Tr(s_Cstring)
|
||||
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
||||
C.free(unsafe.Pointer(_ms.data))
|
||||
return _ret
|
||||
}
|
||||
|
||||
func QsciLexerCSharp_TrUtf8(s string) string {
|
||||
s_Cstring := C.CString(s)
|
||||
defer C.free(unsafe.Pointer(s_Cstring))
|
||||
var _ms C.struct_miqt_string = C.QsciLexerCSharp_TrUtf8(s_Cstring)
|
||||
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
||||
C.free(unsafe.Pointer(_ms.data))
|
||||
return _ret
|
||||
}
|
||||
|
||||
func (this *QsciLexerCSharp) Language() string {
|
||||
_ret := C.QsciLexerCSharp_Language(this.h)
|
||||
return C.GoString(_ret)
|
||||
}
|
||||
|
||||
func (this *QsciLexerCSharp) DefaultColor(style int) *qt.QColor {
|
||||
_ret := C.QsciLexerCSharp_DefaultColor(this.h, (C.int)(style))
|
||||
_goptr := qt.UnsafeNewQColor(unsafe.Pointer(_ret))
|
||||
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
|
||||
return _goptr
|
||||
}
|
||||
|
||||
func (this *QsciLexerCSharp) DefaultEolFill(style int) bool {
|
||||
return (bool)(C.QsciLexerCSharp_DefaultEolFill(this.h, (C.int)(style)))
|
||||
}
|
||||
|
||||
func (this *QsciLexerCSharp) DefaultFont(style int) *qt.QFont {
|
||||
_ret := C.QsciLexerCSharp_DefaultFont(this.h, (C.int)(style))
|
||||
_goptr := qt.UnsafeNewQFont(unsafe.Pointer(_ret))
|
||||
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
|
||||
return _goptr
|
||||
}
|
||||
|
||||
func (this *QsciLexerCSharp) DefaultPaper(style int) *qt.QColor {
|
||||
_ret := C.QsciLexerCSharp_DefaultPaper(this.h, (C.int)(style))
|
||||
_goptr := qt.UnsafeNewQColor(unsafe.Pointer(_ret))
|
||||
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
|
||||
return _goptr
|
||||
}
|
||||
|
||||
func (this *QsciLexerCSharp) Keywords(set int) string {
|
||||
_ret := C.QsciLexerCSharp_Keywords(this.h, (C.int)(set))
|
||||
return C.GoString(_ret)
|
||||
}
|
||||
|
||||
func (this *QsciLexerCSharp) Description(style int) string {
|
||||
var _ms C.struct_miqt_string = C.QsciLexerCSharp_Description(this.h, (C.int)(style))
|
||||
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
||||
C.free(unsafe.Pointer(_ms.data))
|
||||
return _ret
|
||||
}
|
||||
|
||||
func QsciLexerCSharp_Tr2(s string, c string) string {
|
||||
s_Cstring := C.CString(s)
|
||||
defer C.free(unsafe.Pointer(s_Cstring))
|
||||
c_Cstring := C.CString(c)
|
||||
defer C.free(unsafe.Pointer(c_Cstring))
|
||||
var _ms C.struct_miqt_string = C.QsciLexerCSharp_Tr2(s_Cstring, c_Cstring)
|
||||
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
||||
C.free(unsafe.Pointer(_ms.data))
|
||||
return _ret
|
||||
}
|
||||
|
||||
func QsciLexerCSharp_Tr3(s string, c string, n int) string {
|
||||
s_Cstring := C.CString(s)
|
||||
defer C.free(unsafe.Pointer(s_Cstring))
|
||||
c_Cstring := C.CString(c)
|
||||
defer C.free(unsafe.Pointer(c_Cstring))
|
||||
var _ms C.struct_miqt_string = C.QsciLexerCSharp_Tr3(s_Cstring, c_Cstring, (C.int)(n))
|
||||
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
||||
C.free(unsafe.Pointer(_ms.data))
|
||||
return _ret
|
||||
}
|
||||
|
||||
func QsciLexerCSharp_TrUtf82(s string, c string) string {
|
||||
s_Cstring := C.CString(s)
|
||||
defer C.free(unsafe.Pointer(s_Cstring))
|
||||
c_Cstring := C.CString(c)
|
||||
defer C.free(unsafe.Pointer(c_Cstring))
|
||||
var _ms C.struct_miqt_string = C.QsciLexerCSharp_TrUtf82(s_Cstring, c_Cstring)
|
||||
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
||||
C.free(unsafe.Pointer(_ms.data))
|
||||
return _ret
|
||||
}
|
||||
|
||||
func QsciLexerCSharp_TrUtf83(s string, c string, n int) string {
|
||||
s_Cstring := C.CString(s)
|
||||
defer C.free(unsafe.Pointer(s_Cstring))
|
||||
c_Cstring := C.CString(c)
|
||||
defer C.free(unsafe.Pointer(c_Cstring))
|
||||
var _ms C.struct_miqt_string = C.QsciLexerCSharp_TrUtf83(s_Cstring, c_Cstring, (C.int)(n))
|
||||
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
||||
C.free(unsafe.Pointer(_ms.data))
|
||||
return _ret
|
||||
}
|
||||
|
||||
// Delete this object from C++ memory.
|
||||
func (this *QsciLexerCSharp) Delete() {
|
||||
C.QsciLexerCSharp_Delete(this.h)
|
||||
}
|
||||
|
||||
// GoGC adds a Go Finalizer to this pointer, so that it will be deleted
|
||||
// from C++ memory once it is unreachable from Go memory.
|
||||
func (this *QsciLexerCSharp) GoGC() {
|
||||
runtime.SetFinalizer(this, func(this *QsciLexerCSharp) {
|
||||
this.Delete()
|
||||
runtime.KeepAlive(this.h)
|
||||
})
|
||||
}
|
53
qt-restricted-extras/qscintilla/gen_qscilexercsharp.h
Normal file
53
qt-restricted-extras/qscintilla/gen_qscilexercsharp.h
Normal file
@ -0,0 +1,53 @@
|
||||
#ifndef GEN_QSCILEXERCSHARP_H
|
||||
#define GEN_QSCILEXERCSHARP_H
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||
|
||||
#include "../../libmiqt/libmiqt.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
class QColor;
|
||||
class QFont;
|
||||
class QMetaObject;
|
||||
class QObject;
|
||||
class QsciLexerCSharp;
|
||||
#else
|
||||
typedef struct QColor QColor;
|
||||
typedef struct QFont QFont;
|
||||
typedef struct QMetaObject QMetaObject;
|
||||
typedef struct QObject QObject;
|
||||
typedef struct QsciLexerCSharp QsciLexerCSharp;
|
||||
#endif
|
||||
|
||||
QsciLexerCSharp* QsciLexerCSharp_new();
|
||||
QsciLexerCSharp* QsciLexerCSharp_new2(QObject* parent);
|
||||
QMetaObject* QsciLexerCSharp_MetaObject(const QsciLexerCSharp* self);
|
||||
void* QsciLexerCSharp_Metacast(QsciLexerCSharp* self, const char* param1);
|
||||
struct miqt_string QsciLexerCSharp_Tr(const char* s);
|
||||
struct miqt_string QsciLexerCSharp_TrUtf8(const char* s);
|
||||
const char* QsciLexerCSharp_Language(const QsciLexerCSharp* self);
|
||||
QColor* QsciLexerCSharp_DefaultColor(const QsciLexerCSharp* self, int style);
|
||||
bool QsciLexerCSharp_DefaultEolFill(const QsciLexerCSharp* self, int style);
|
||||
QFont* QsciLexerCSharp_DefaultFont(const QsciLexerCSharp* self, int style);
|
||||
QColor* QsciLexerCSharp_DefaultPaper(const QsciLexerCSharp* self, int style);
|
||||
const char* QsciLexerCSharp_Keywords(const QsciLexerCSharp* self, int set);
|
||||
struct miqt_string QsciLexerCSharp_Description(const QsciLexerCSharp* self, int style);
|
||||
struct miqt_string QsciLexerCSharp_Tr2(const char* s, const char* c);
|
||||
struct miqt_string QsciLexerCSharp_Tr3(const char* s, const char* c, int n);
|
||||
struct miqt_string QsciLexerCSharp_TrUtf82(const char* s, const char* c);
|
||||
struct miqt_string QsciLexerCSharp_TrUtf83(const char* s, const char* c, int n);
|
||||
void QsciLexerCSharp_Delete(QsciLexerCSharp* self);
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern C */
|
||||
#endif
|
||||
|
||||
#endif
|
192
qt-restricted-extras/qscintilla/gen_qscilexercss.cpp
Normal file
192
qt-restricted-extras/qscintilla/gen_qscilexercss.cpp
Normal file
@ -0,0 +1,192 @@
|
||||
#include <QColor>
|
||||
#include <QFont>
|
||||
#include <QMetaObject>
|
||||
#include <QObject>
|
||||
#include <QString>
|
||||
#include <QByteArray>
|
||||
#include <cstring>
|
||||
#include <qscilexercss.h>
|
||||
#include "gen_qscilexercss.h"
|
||||
#include "_cgo_export.h"
|
||||
|
||||
QsciLexerCSS* QsciLexerCSS_new() {
|
||||
return new QsciLexerCSS();
|
||||
}
|
||||
|
||||
QsciLexerCSS* QsciLexerCSS_new2(QObject* parent) {
|
||||
return new QsciLexerCSS(parent);
|
||||
}
|
||||
|
||||
QMetaObject* QsciLexerCSS_MetaObject(const QsciLexerCSS* self) {
|
||||
return (QMetaObject*) self->metaObject();
|
||||
}
|
||||
|
||||
void* QsciLexerCSS_Metacast(QsciLexerCSS* self, const char* param1) {
|
||||
return self->qt_metacast(param1);
|
||||
}
|
||||
|
||||
struct miqt_string QsciLexerCSS_Tr(const char* s) {
|
||||
QString _ret = QsciLexerCSS::tr(s);
|
||||
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
||||
QByteArray _b = _ret.toUtf8();
|
||||
struct miqt_string _ms;
|
||||
_ms.len = _b.length();
|
||||
_ms.data = static_cast<char*>(malloc(_ms.len));
|
||||
memcpy(_ms.data, _b.data(), _ms.len);
|
||||
return _ms;
|
||||
}
|
||||
|
||||
struct miqt_string QsciLexerCSS_TrUtf8(const char* s) {
|
||||
QString _ret = QsciLexerCSS::trUtf8(s);
|
||||
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
||||
QByteArray _b = _ret.toUtf8();
|
||||
struct miqt_string _ms;
|
||||
_ms.len = _b.length();
|
||||
_ms.data = static_cast<char*>(malloc(_ms.len));
|
||||
memcpy(_ms.data, _b.data(), _ms.len);
|
||||
return _ms;
|
||||
}
|
||||
|
||||
const char* QsciLexerCSS_Language(const QsciLexerCSS* self) {
|
||||
return (const char*) self->language();
|
||||
}
|
||||
|
||||
const char* QsciLexerCSS_Lexer(const QsciLexerCSS* self) {
|
||||
return (const char*) self->lexer();
|
||||
}
|
||||
|
||||
const char* QsciLexerCSS_BlockEnd(const QsciLexerCSS* self) {
|
||||
return (const char*) self->blockEnd();
|
||||
}
|
||||
|
||||
const char* QsciLexerCSS_BlockStart(const QsciLexerCSS* self) {
|
||||
return (const char*) self->blockStart();
|
||||
}
|
||||
|
||||
const char* QsciLexerCSS_WordCharacters(const QsciLexerCSS* self) {
|
||||
return (const char*) self->wordCharacters();
|
||||
}
|
||||
|
||||
QColor* QsciLexerCSS_DefaultColor(const QsciLexerCSS* self, int style) {
|
||||
return new QColor(self->defaultColor(static_cast<int>(style)));
|
||||
}
|
||||
|
||||
QFont* QsciLexerCSS_DefaultFont(const QsciLexerCSS* self, int style) {
|
||||
return new QFont(self->defaultFont(static_cast<int>(style)));
|
||||
}
|
||||
|
||||
const char* QsciLexerCSS_Keywords(const QsciLexerCSS* self, int set) {
|
||||
return (const char*) self->keywords(static_cast<int>(set));
|
||||
}
|
||||
|
||||
struct miqt_string QsciLexerCSS_Description(const QsciLexerCSS* self, int style) {
|
||||
QString _ret = self->description(static_cast<int>(style));
|
||||
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
||||
QByteArray _b = _ret.toUtf8();
|
||||
struct miqt_string _ms;
|
||||
_ms.len = _b.length();
|
||||
_ms.data = static_cast<char*>(malloc(_ms.len));
|
||||
memcpy(_ms.data, _b.data(), _ms.len);
|
||||
return _ms;
|
||||
}
|
||||
|
||||
void QsciLexerCSS_RefreshProperties(QsciLexerCSS* self) {
|
||||
self->refreshProperties();
|
||||
}
|
||||
|
||||
bool QsciLexerCSS_FoldComments(const QsciLexerCSS* self) {
|
||||
return self->foldComments();
|
||||
}
|
||||
|
||||
bool QsciLexerCSS_FoldCompact(const QsciLexerCSS* self) {
|
||||
return self->foldCompact();
|
||||
}
|
||||
|
||||
void QsciLexerCSS_SetHSSLanguage(QsciLexerCSS* self, bool enabled) {
|
||||
self->setHSSLanguage(enabled);
|
||||
}
|
||||
|
||||
bool QsciLexerCSS_HSSLanguage(const QsciLexerCSS* self) {
|
||||
return self->HSSLanguage();
|
||||
}
|
||||
|
||||
void QsciLexerCSS_SetLessLanguage(QsciLexerCSS* self, bool enabled) {
|
||||
self->setLessLanguage(enabled);
|
||||
}
|
||||
|
||||
bool QsciLexerCSS_LessLanguage(const QsciLexerCSS* self) {
|
||||
return self->LessLanguage();
|
||||
}
|
||||
|
||||
void QsciLexerCSS_SetSCSSLanguage(QsciLexerCSS* self, bool enabled) {
|
||||
self->setSCSSLanguage(enabled);
|
||||
}
|
||||
|
||||
bool QsciLexerCSS_SCSSLanguage(const QsciLexerCSS* self) {
|
||||
return self->SCSSLanguage();
|
||||
}
|
||||
|
||||
void QsciLexerCSS_SetFoldComments(QsciLexerCSS* self, bool fold) {
|
||||
self->setFoldComments(fold);
|
||||
}
|
||||
|
||||
void QsciLexerCSS_SetFoldCompact(QsciLexerCSS* self, bool fold) {
|
||||
self->setFoldCompact(fold);
|
||||
}
|
||||
|
||||
struct miqt_string QsciLexerCSS_Tr2(const char* s, const char* c) {
|
||||
QString _ret = QsciLexerCSS::tr(s, c);
|
||||
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
||||
QByteArray _b = _ret.toUtf8();
|
||||
struct miqt_string _ms;
|
||||
_ms.len = _b.length();
|
||||
_ms.data = static_cast<char*>(malloc(_ms.len));
|
||||
memcpy(_ms.data, _b.data(), _ms.len);
|
||||
return _ms;
|
||||
}
|
||||
|
||||
struct miqt_string QsciLexerCSS_Tr3(const char* s, const char* c, int n) {
|
||||
QString _ret = QsciLexerCSS::tr(s, c, static_cast<int>(n));
|
||||
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
||||
QByteArray _b = _ret.toUtf8();
|
||||
struct miqt_string _ms;
|
||||
_ms.len = _b.length();
|
||||
_ms.data = static_cast<char*>(malloc(_ms.len));
|
||||
memcpy(_ms.data, _b.data(), _ms.len);
|
||||
return _ms;
|
||||
}
|
||||
|
||||
struct miqt_string QsciLexerCSS_TrUtf82(const char* s, const char* c) {
|
||||
QString _ret = QsciLexerCSS::trUtf8(s, c);
|
||||
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
||||
QByteArray _b = _ret.toUtf8();
|
||||
struct miqt_string _ms;
|
||||
_ms.len = _b.length();
|
||||
_ms.data = static_cast<char*>(malloc(_ms.len));
|
||||
memcpy(_ms.data, _b.data(), _ms.len);
|
||||
return _ms;
|
||||
}
|
||||
|
||||
struct miqt_string QsciLexerCSS_TrUtf83(const char* s, const char* c, int n) {
|
||||
QString _ret = QsciLexerCSS::trUtf8(s, c, static_cast<int>(n));
|
||||
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
||||
QByteArray _b = _ret.toUtf8();
|
||||
struct miqt_string _ms;
|
||||
_ms.len = _b.length();
|
||||
_ms.data = static_cast<char*>(malloc(_ms.len));
|
||||
memcpy(_ms.data, _b.data(), _ms.len);
|
||||
return _ms;
|
||||
}
|
||||
|
||||
const char* QsciLexerCSS_BlockEnd1(const QsciLexerCSS* self, int* style) {
|
||||
return (const char*) self->blockEnd(static_cast<int*>(style));
|
||||
}
|
||||
|
||||
const char* QsciLexerCSS_BlockStart1(const QsciLexerCSS* self, int* style) {
|
||||
return (const char*) self->blockStart(static_cast<int*>(style));
|
||||
}
|
||||
|
||||
void QsciLexerCSS_Delete(QsciLexerCSS* self) {
|
||||
delete self;
|
||||
}
|
||||
|
277
qt-restricted-extras/qscintilla/gen_qscilexercss.go
Normal file
277
qt-restricted-extras/qscintilla/gen_qscilexercss.go
Normal file
@ -0,0 +1,277 @@
|
||||
package qscintilla
|
||||
|
||||
/*
|
||||
|
||||
#include "gen_qscilexercss.h"
|
||||
#include <stdlib.h>
|
||||
|
||||
*/
|
||||
import "C"
|
||||
|
||||
import (
|
||||
"github.com/mappu/miqt/qt"
|
||||
"runtime"
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
type QsciLexerCSS__ int
|
||||
|
||||
const (
|
||||
QsciLexerCSS__Default QsciLexerCSS__ = 0
|
||||
QsciLexerCSS__Tag QsciLexerCSS__ = 1
|
||||
QsciLexerCSS__ClassSelector QsciLexerCSS__ = 2
|
||||
QsciLexerCSS__PseudoClass QsciLexerCSS__ = 3
|
||||
QsciLexerCSS__UnknownPseudoClass QsciLexerCSS__ = 4
|
||||
QsciLexerCSS__Operator QsciLexerCSS__ = 5
|
||||
QsciLexerCSS__CSS1Property QsciLexerCSS__ = 6
|
||||
QsciLexerCSS__UnknownProperty QsciLexerCSS__ = 7
|
||||
QsciLexerCSS__Value QsciLexerCSS__ = 8
|
||||
QsciLexerCSS__Comment QsciLexerCSS__ = 9
|
||||
QsciLexerCSS__IDSelector QsciLexerCSS__ = 10
|
||||
QsciLexerCSS__Important QsciLexerCSS__ = 11
|
||||
QsciLexerCSS__AtRule QsciLexerCSS__ = 12
|
||||
QsciLexerCSS__DoubleQuotedString QsciLexerCSS__ = 13
|
||||
QsciLexerCSS__SingleQuotedString QsciLexerCSS__ = 14
|
||||
QsciLexerCSS__CSS2Property QsciLexerCSS__ = 15
|
||||
QsciLexerCSS__Attribute QsciLexerCSS__ = 16
|
||||
QsciLexerCSS__CSS3Property QsciLexerCSS__ = 17
|
||||
QsciLexerCSS__PseudoElement QsciLexerCSS__ = 18
|
||||
QsciLexerCSS__ExtendedCSSProperty QsciLexerCSS__ = 19
|
||||
QsciLexerCSS__ExtendedPseudoClass QsciLexerCSS__ = 20
|
||||
QsciLexerCSS__ExtendedPseudoElement QsciLexerCSS__ = 21
|
||||
QsciLexerCSS__MediaRule QsciLexerCSS__ = 22
|
||||
QsciLexerCSS__Variable QsciLexerCSS__ = 23
|
||||
)
|
||||
|
||||
type QsciLexerCSS struct {
|
||||
h *C.QsciLexerCSS
|
||||
*QsciLexer
|
||||
}
|
||||
|
||||
func (this *QsciLexerCSS) cPointer() *C.QsciLexerCSS {
|
||||
if this == nil {
|
||||
return nil
|
||||
}
|
||||
return this.h
|
||||
}
|
||||
|
||||
func (this *QsciLexerCSS) UnsafePointer() unsafe.Pointer {
|
||||
if this == nil {
|
||||
return nil
|
||||
}
|
||||
return unsafe.Pointer(this.h)
|
||||
}
|
||||
|
||||
func newQsciLexerCSS(h *C.QsciLexerCSS) *QsciLexerCSS {
|
||||
if h == nil {
|
||||
return nil
|
||||
}
|
||||
return &QsciLexerCSS{h: h, QsciLexer: UnsafeNewQsciLexer(unsafe.Pointer(h))}
|
||||
}
|
||||
|
||||
func UnsafeNewQsciLexerCSS(h unsafe.Pointer) *QsciLexerCSS {
|
||||
return newQsciLexerCSS((*C.QsciLexerCSS)(h))
|
||||
}
|
||||
|
||||
// NewQsciLexerCSS constructs a new QsciLexerCSS object.
|
||||
func NewQsciLexerCSS() *QsciLexerCSS {
|
||||
ret := C.QsciLexerCSS_new()
|
||||
return newQsciLexerCSS(ret)
|
||||
}
|
||||
|
||||
// NewQsciLexerCSS2 constructs a new QsciLexerCSS object.
|
||||
func NewQsciLexerCSS2(parent *qt.QObject) *QsciLexerCSS {
|
||||
ret := C.QsciLexerCSS_new2((*C.QObject)(parent.UnsafePointer()))
|
||||
return newQsciLexerCSS(ret)
|
||||
}
|
||||
|
||||
func (this *QsciLexerCSS) MetaObject() *qt.QMetaObject {
|
||||
return qt.UnsafeNewQMetaObject(unsafe.Pointer(C.QsciLexerCSS_MetaObject(this.h)))
|
||||
}
|
||||
|
||||
func (this *QsciLexerCSS) Metacast(param1 string) unsafe.Pointer {
|
||||
param1_Cstring := C.CString(param1)
|
||||
defer C.free(unsafe.Pointer(param1_Cstring))
|
||||
return (unsafe.Pointer)(C.QsciLexerCSS_Metacast(this.h, param1_Cstring))
|
||||
}
|
||||
|
||||
func QsciLexerCSS_Tr(s string) string {
|
||||
s_Cstring := C.CString(s)
|
||||
defer C.free(unsafe.Pointer(s_Cstring))
|
||||
var _ms C.struct_miqt_string = C.QsciLexerCSS_Tr(s_Cstring)
|
||||
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
||||
C.free(unsafe.Pointer(_ms.data))
|
||||
return _ret
|
||||
}
|
||||
|
||||
func QsciLexerCSS_TrUtf8(s string) string {
|
||||
s_Cstring := C.CString(s)
|
||||
defer C.free(unsafe.Pointer(s_Cstring))
|
||||
var _ms C.struct_miqt_string = C.QsciLexerCSS_TrUtf8(s_Cstring)
|
||||
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
||||
C.free(unsafe.Pointer(_ms.data))
|
||||
return _ret
|
||||
}
|
||||
|
||||
func (this *QsciLexerCSS) Language() string {
|
||||
_ret := C.QsciLexerCSS_Language(this.h)
|
||||
return C.GoString(_ret)
|
||||
}
|
||||
|
||||
func (this *QsciLexerCSS) Lexer() string {
|
||||
_ret := C.QsciLexerCSS_Lexer(this.h)
|
||||
return C.GoString(_ret)
|
||||
}
|
||||
|
||||
func (this *QsciLexerCSS) BlockEnd() string {
|
||||
_ret := C.QsciLexerCSS_BlockEnd(this.h)
|
||||
return C.GoString(_ret)
|
||||
}
|
||||
|
||||
func (this *QsciLexerCSS) BlockStart() string {
|
||||
_ret := C.QsciLexerCSS_BlockStart(this.h)
|
||||
return C.GoString(_ret)
|
||||
}
|
||||
|
||||
func (this *QsciLexerCSS) WordCharacters() string {
|
||||
_ret := C.QsciLexerCSS_WordCharacters(this.h)
|
||||
return C.GoString(_ret)
|
||||
}
|
||||
|
||||
func (this *QsciLexerCSS) DefaultColor(style int) *qt.QColor {
|
||||
_ret := C.QsciLexerCSS_DefaultColor(this.h, (C.int)(style))
|
||||
_goptr := qt.UnsafeNewQColor(unsafe.Pointer(_ret))
|
||||
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
|
||||
return _goptr
|
||||
}
|
||||
|
||||
func (this *QsciLexerCSS) DefaultFont(style int) *qt.QFont {
|
||||
_ret := C.QsciLexerCSS_DefaultFont(this.h, (C.int)(style))
|
||||
_goptr := qt.UnsafeNewQFont(unsafe.Pointer(_ret))
|
||||
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
|
||||
return _goptr
|
||||
}
|
||||
|
||||
func (this *QsciLexerCSS) Keywords(set int) string {
|
||||
_ret := C.QsciLexerCSS_Keywords(this.h, (C.int)(set))
|
||||
return C.GoString(_ret)
|
||||
}
|
||||
|
||||
func (this *QsciLexerCSS) Description(style int) string {
|
||||
var _ms C.struct_miqt_string = C.QsciLexerCSS_Description(this.h, (C.int)(style))
|
||||
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
||||
C.free(unsafe.Pointer(_ms.data))
|
||||
return _ret
|
||||
}
|
||||
|
||||
func (this *QsciLexerCSS) RefreshProperties() {
|
||||
C.QsciLexerCSS_RefreshProperties(this.h)
|
||||
}
|
||||
|
||||
func (this *QsciLexerCSS) FoldComments() bool {
|
||||
return (bool)(C.QsciLexerCSS_FoldComments(this.h))
|
||||
}
|
||||
|
||||
func (this *QsciLexerCSS) FoldCompact() bool {
|
||||
return (bool)(C.QsciLexerCSS_FoldCompact(this.h))
|
||||
}
|
||||
|
||||
func (this *QsciLexerCSS) SetHSSLanguage(enabled bool) {
|
||||
C.QsciLexerCSS_SetHSSLanguage(this.h, (C.bool)(enabled))
|
||||
}
|
||||
|
||||
func (this *QsciLexerCSS) HSSLanguage() bool {
|
||||
return (bool)(C.QsciLexerCSS_HSSLanguage(this.h))
|
||||
}
|
||||
|
||||
func (this *QsciLexerCSS) SetLessLanguage(enabled bool) {
|
||||
C.QsciLexerCSS_SetLessLanguage(this.h, (C.bool)(enabled))
|
||||
}
|
||||
|
||||
func (this *QsciLexerCSS) LessLanguage() bool {
|
||||
return (bool)(C.QsciLexerCSS_LessLanguage(this.h))
|
||||
}
|
||||
|
||||
func (this *QsciLexerCSS) SetSCSSLanguage(enabled bool) {
|
||||
C.QsciLexerCSS_SetSCSSLanguage(this.h, (C.bool)(enabled))
|
||||
}
|
||||
|
||||
func (this *QsciLexerCSS) SCSSLanguage() bool {
|
||||
return (bool)(C.QsciLexerCSS_SCSSLanguage(this.h))
|
||||
}
|
||||
|
||||
func (this *QsciLexerCSS) SetFoldComments(fold bool) {
|
||||
C.QsciLexerCSS_SetFoldComments(this.h, (C.bool)(fold))
|
||||
}
|
||||
|
||||
func (this *QsciLexerCSS) SetFoldCompact(fold bool) {
|
||||
C.QsciLexerCSS_SetFoldCompact(this.h, (C.bool)(fold))
|
||||
}
|
||||
|
||||
func QsciLexerCSS_Tr2(s string, c string) string {
|
||||
s_Cstring := C.CString(s)
|
||||
defer C.free(unsafe.Pointer(s_Cstring))
|
||||
c_Cstring := C.CString(c)
|
||||
defer C.free(unsafe.Pointer(c_Cstring))
|
||||
var _ms C.struct_miqt_string = C.QsciLexerCSS_Tr2(s_Cstring, c_Cstring)
|
||||
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
||||
C.free(unsafe.Pointer(_ms.data))
|
||||
return _ret
|
||||
}
|
||||
|
||||
func QsciLexerCSS_Tr3(s string, c string, n int) string {
|
||||
s_Cstring := C.CString(s)
|
||||
defer C.free(unsafe.Pointer(s_Cstring))
|
||||
c_Cstring := C.CString(c)
|
||||
defer C.free(unsafe.Pointer(c_Cstring))
|
||||
var _ms C.struct_miqt_string = C.QsciLexerCSS_Tr3(s_Cstring, c_Cstring, (C.int)(n))
|
||||
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
||||
C.free(unsafe.Pointer(_ms.data))
|
||||
return _ret
|
||||
}
|
||||
|
||||
func QsciLexerCSS_TrUtf82(s string, c string) string {
|
||||
s_Cstring := C.CString(s)
|
||||
defer C.free(unsafe.Pointer(s_Cstring))
|
||||
c_Cstring := C.CString(c)
|
||||
defer C.free(unsafe.Pointer(c_Cstring))
|
||||
var _ms C.struct_miqt_string = C.QsciLexerCSS_TrUtf82(s_Cstring, c_Cstring)
|
||||
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
||||
C.free(unsafe.Pointer(_ms.data))
|
||||
return _ret
|
||||
}
|
||||
|
||||
func QsciLexerCSS_TrUtf83(s string, c string, n int) string {
|
||||
s_Cstring := C.CString(s)
|
||||
defer C.free(unsafe.Pointer(s_Cstring))
|
||||
c_Cstring := C.CString(c)
|
||||
defer C.free(unsafe.Pointer(c_Cstring))
|
||||
var _ms C.struct_miqt_string = C.QsciLexerCSS_TrUtf83(s_Cstring, c_Cstring, (C.int)(n))
|
||||
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
||||
C.free(unsafe.Pointer(_ms.data))
|
||||
return _ret
|
||||
}
|
||||
|
||||
func (this *QsciLexerCSS) BlockEnd1(style *int) string {
|
||||
_ret := C.QsciLexerCSS_BlockEnd1(this.h, (*C.int)(unsafe.Pointer(style)))
|
||||
return C.GoString(_ret)
|
||||
}
|
||||
|
||||
func (this *QsciLexerCSS) BlockStart1(style *int) string {
|
||||
_ret := C.QsciLexerCSS_BlockStart1(this.h, (*C.int)(unsafe.Pointer(style)))
|
||||
return C.GoString(_ret)
|
||||
}
|
||||
|
||||
// Delete this object from C++ memory.
|
||||
func (this *QsciLexerCSS) Delete() {
|
||||
C.QsciLexerCSS_Delete(this.h)
|
||||
}
|
||||
|
||||
// GoGC adds a Go Finalizer to this pointer, so that it will be deleted
|
||||
// from C++ memory once it is unreachable from Go memory.
|
||||
func (this *QsciLexerCSS) GoGC() {
|
||||
runtime.SetFinalizer(this, func(this *QsciLexerCSS) {
|
||||
this.Delete()
|
||||
runtime.KeepAlive(this.h)
|
||||
})
|
||||
}
|
68
qt-restricted-extras/qscintilla/gen_qscilexercss.h
Normal file
68
qt-restricted-extras/qscintilla/gen_qscilexercss.h
Normal file
@ -0,0 +1,68 @@
|
||||
#ifndef GEN_QSCILEXERCSS_H
|
||||
#define GEN_QSCILEXERCSS_H
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||
|
||||
#include "../../libmiqt/libmiqt.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
class QColor;
|
||||
class QFont;
|
||||
class QMetaObject;
|
||||
class QObject;
|
||||
class QsciLexerCSS;
|
||||
#else
|
||||
typedef struct QColor QColor;
|
||||
typedef struct QFont QFont;
|
||||
typedef struct QMetaObject QMetaObject;
|
||||
typedef struct QObject QObject;
|
||||
typedef struct QsciLexerCSS QsciLexerCSS;
|
||||
#endif
|
||||
|
||||
QsciLexerCSS* QsciLexerCSS_new();
|
||||
QsciLexerCSS* QsciLexerCSS_new2(QObject* parent);
|
||||
QMetaObject* QsciLexerCSS_MetaObject(const QsciLexerCSS* self);
|
||||
void* QsciLexerCSS_Metacast(QsciLexerCSS* self, const char* param1);
|
||||
struct miqt_string QsciLexerCSS_Tr(const char* s);
|
||||
struct miqt_string QsciLexerCSS_TrUtf8(const char* s);
|
||||
const char* QsciLexerCSS_Language(const QsciLexerCSS* self);
|
||||
const char* QsciLexerCSS_Lexer(const QsciLexerCSS* self);
|
||||
const char* QsciLexerCSS_BlockEnd(const QsciLexerCSS* self);
|
||||
const char* QsciLexerCSS_BlockStart(const QsciLexerCSS* self);
|
||||
const char* QsciLexerCSS_WordCharacters(const QsciLexerCSS* self);
|
||||
QColor* QsciLexerCSS_DefaultColor(const QsciLexerCSS* self, int style);
|
||||
QFont* QsciLexerCSS_DefaultFont(const QsciLexerCSS* self, int style);
|
||||
const char* QsciLexerCSS_Keywords(const QsciLexerCSS* self, int set);
|
||||
struct miqt_string QsciLexerCSS_Description(const QsciLexerCSS* self, int style);
|
||||
void QsciLexerCSS_RefreshProperties(QsciLexerCSS* self);
|
||||
bool QsciLexerCSS_FoldComments(const QsciLexerCSS* self);
|
||||
bool QsciLexerCSS_FoldCompact(const QsciLexerCSS* self);
|
||||
void QsciLexerCSS_SetHSSLanguage(QsciLexerCSS* self, bool enabled);
|
||||
bool QsciLexerCSS_HSSLanguage(const QsciLexerCSS* self);
|
||||
void QsciLexerCSS_SetLessLanguage(QsciLexerCSS* self, bool enabled);
|
||||
bool QsciLexerCSS_LessLanguage(const QsciLexerCSS* self);
|
||||
void QsciLexerCSS_SetSCSSLanguage(QsciLexerCSS* self, bool enabled);
|
||||
bool QsciLexerCSS_SCSSLanguage(const QsciLexerCSS* self);
|
||||
void QsciLexerCSS_SetFoldComments(QsciLexerCSS* self, bool fold);
|
||||
void QsciLexerCSS_SetFoldCompact(QsciLexerCSS* self, bool fold);
|
||||
struct miqt_string QsciLexerCSS_Tr2(const char* s, const char* c);
|
||||
struct miqt_string QsciLexerCSS_Tr3(const char* s, const char* c, int n);
|
||||
struct miqt_string QsciLexerCSS_TrUtf82(const char* s, const char* c);
|
||||
struct miqt_string QsciLexerCSS_TrUtf83(const char* s, const char* c, int n);
|
||||
const char* QsciLexerCSS_BlockEnd1(const QsciLexerCSS* self, int* style);
|
||||
const char* QsciLexerCSS_BlockStart1(const QsciLexerCSS* self, int* style);
|
||||
void QsciLexerCSS_Delete(QsciLexerCSS* self);
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern C */
|
||||
#endif
|
||||
|
||||
#endif
|
114
qt-restricted-extras/qscintilla/gen_qscilexercustom.cpp
Normal file
114
qt-restricted-extras/qscintilla/gen_qscilexercustom.cpp
Normal file
@ -0,0 +1,114 @@
|
||||
#include <QMetaObject>
|
||||
#include <QString>
|
||||
#include <QByteArray>
|
||||
#include <cstring>
|
||||
#include <qscilexercustom.h>
|
||||
#include "gen_qscilexercustom.h"
|
||||
#include "_cgo_export.h"
|
||||
|
||||
QMetaObject* QsciLexerCustom_MetaObject(const QsciLexerCustom* self) {
|
||||
return (QMetaObject*) self->metaObject();
|
||||
}
|
||||
|
||||
void* QsciLexerCustom_Metacast(QsciLexerCustom* self, const char* param1) {
|
||||
return self->qt_metacast(param1);
|
||||
}
|
||||
|
||||
struct miqt_string QsciLexerCustom_Tr(const char* s) {
|
||||
QString _ret = QsciLexerCustom::tr(s);
|
||||
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
||||
QByteArray _b = _ret.toUtf8();
|
||||
struct miqt_string _ms;
|
||||
_ms.len = _b.length();
|
||||
_ms.data = static_cast<char*>(malloc(_ms.len));
|
||||
memcpy(_ms.data, _b.data(), _ms.len);
|
||||
return _ms;
|
||||
}
|
||||
|
||||
struct miqt_string QsciLexerCustom_TrUtf8(const char* s) {
|
||||
QString _ret = QsciLexerCustom::trUtf8(s);
|
||||
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
||||
QByteArray _b = _ret.toUtf8();
|
||||
struct miqt_string _ms;
|
||||
_ms.len = _b.length();
|
||||
_ms.data = static_cast<char*>(malloc(_ms.len));
|
||||
memcpy(_ms.data, _b.data(), _ms.len);
|
||||
return _ms;
|
||||
}
|
||||
|
||||
void QsciLexerCustom_SetStyling(QsciLexerCustom* self, int length, int style) {
|
||||
self->setStyling(static_cast<int>(length), static_cast<int>(style));
|
||||
}
|
||||
|
||||
void QsciLexerCustom_SetStyling2(QsciLexerCustom* self, int length, QsciStyle* style) {
|
||||
self->setStyling(static_cast<int>(length), *style);
|
||||
}
|
||||
|
||||
void QsciLexerCustom_StartStyling(QsciLexerCustom* self, int pos) {
|
||||
self->startStyling(static_cast<int>(pos));
|
||||
}
|
||||
|
||||
void QsciLexerCustom_StyleText(QsciLexerCustom* self, int start, int end) {
|
||||
self->styleText(static_cast<int>(start), static_cast<int>(end));
|
||||
}
|
||||
|
||||
void QsciLexerCustom_SetEditor(QsciLexerCustom* self, QsciScintilla* editor) {
|
||||
self->setEditor(editor);
|
||||
}
|
||||
|
||||
int QsciLexerCustom_StyleBitsNeeded(const QsciLexerCustom* self) {
|
||||
return self->styleBitsNeeded();
|
||||
}
|
||||
|
||||
struct miqt_string QsciLexerCustom_Tr2(const char* s, const char* c) {
|
||||
QString _ret = QsciLexerCustom::tr(s, c);
|
||||
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
||||
QByteArray _b = _ret.toUtf8();
|
||||
struct miqt_string _ms;
|
||||
_ms.len = _b.length();
|
||||
_ms.data = static_cast<char*>(malloc(_ms.len));
|
||||
memcpy(_ms.data, _b.data(), _ms.len);
|
||||
return _ms;
|
||||
}
|
||||
|
||||
struct miqt_string QsciLexerCustom_Tr3(const char* s, const char* c, int n) {
|
||||
QString _ret = QsciLexerCustom::tr(s, c, static_cast<int>(n));
|
||||
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
||||
QByteArray _b = _ret.toUtf8();
|
||||
struct miqt_string _ms;
|
||||
_ms.len = _b.length();
|
||||
_ms.data = static_cast<char*>(malloc(_ms.len));
|
||||
memcpy(_ms.data, _b.data(), _ms.len);
|
||||
return _ms;
|
||||
}
|
||||
|
||||
struct miqt_string QsciLexerCustom_TrUtf82(const char* s, const char* c) {
|
||||
QString _ret = QsciLexerCustom::trUtf8(s, c);
|
||||
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
||||
QByteArray _b = _ret.toUtf8();
|
||||
struct miqt_string _ms;
|
||||
_ms.len = _b.length();
|
||||
_ms.data = static_cast<char*>(malloc(_ms.len));
|
||||
memcpy(_ms.data, _b.data(), _ms.len);
|
||||
return _ms;
|
||||
}
|
||||
|
||||
struct miqt_string QsciLexerCustom_TrUtf83(const char* s, const char* c, int n) {
|
||||
QString _ret = QsciLexerCustom::trUtf8(s, c, static_cast<int>(n));
|
||||
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
||||
QByteArray _b = _ret.toUtf8();
|
||||
struct miqt_string _ms;
|
||||
_ms.len = _b.length();
|
||||
_ms.data = static_cast<char*>(malloc(_ms.len));
|
||||
memcpy(_ms.data, _b.data(), _ms.len);
|
||||
return _ms;
|
||||
}
|
||||
|
||||
void QsciLexerCustom_StartStyling2(QsciLexerCustom* self, int pos, int styleBits) {
|
||||
self->startStyling(static_cast<int>(pos), static_cast<int>(styleBits));
|
||||
}
|
||||
|
||||
void QsciLexerCustom_Delete(QsciLexerCustom* self) {
|
||||
delete self;
|
||||
}
|
||||
|
159
qt-restricted-extras/qscintilla/gen_qscilexercustom.go
Normal file
159
qt-restricted-extras/qscintilla/gen_qscilexercustom.go
Normal file
@ -0,0 +1,159 @@
|
||||
package qscintilla
|
||||
|
||||
/*
|
||||
|
||||
#include "gen_qscilexercustom.h"
|
||||
#include <stdlib.h>
|
||||
|
||||
*/
|
||||
import "C"
|
||||
|
||||
import (
|
||||
"github.com/mappu/miqt/qt"
|
||||
"runtime"
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
type QsciLexerCustom struct {
|
||||
h *C.QsciLexerCustom
|
||||
*QsciLexer
|
||||
}
|
||||
|
||||
func (this *QsciLexerCustom) cPointer() *C.QsciLexerCustom {
|
||||
if this == nil {
|
||||
return nil
|
||||
}
|
||||
return this.h
|
||||
}
|
||||
|
||||
func (this *QsciLexerCustom) UnsafePointer() unsafe.Pointer {
|
||||
if this == nil {
|
||||
return nil
|
||||
}
|
||||
return unsafe.Pointer(this.h)
|
||||
}
|
||||
|
||||
func newQsciLexerCustom(h *C.QsciLexerCustom) *QsciLexerCustom {
|
||||
if h == nil {
|
||||
return nil
|
||||
}
|
||||
return &QsciLexerCustom{h: h, QsciLexer: UnsafeNewQsciLexer(unsafe.Pointer(h))}
|
||||
}
|
||||
|
||||
func UnsafeNewQsciLexerCustom(h unsafe.Pointer) *QsciLexerCustom {
|
||||
return newQsciLexerCustom((*C.QsciLexerCustom)(h))
|
||||
}
|
||||
|
||||
func (this *QsciLexerCustom) MetaObject() *qt.QMetaObject {
|
||||
return qt.UnsafeNewQMetaObject(unsafe.Pointer(C.QsciLexerCustom_MetaObject(this.h)))
|
||||
}
|
||||
|
||||
func (this *QsciLexerCustom) Metacast(param1 string) unsafe.Pointer {
|
||||
param1_Cstring := C.CString(param1)
|
||||
defer C.free(unsafe.Pointer(param1_Cstring))
|
||||
return (unsafe.Pointer)(C.QsciLexerCustom_Metacast(this.h, param1_Cstring))
|
||||
}
|
||||
|
||||
func QsciLexerCustom_Tr(s string) string {
|
||||
s_Cstring := C.CString(s)
|
||||
defer C.free(unsafe.Pointer(s_Cstring))
|
||||
var _ms C.struct_miqt_string = C.QsciLexerCustom_Tr(s_Cstring)
|
||||
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
||||
C.free(unsafe.Pointer(_ms.data))
|
||||
return _ret
|
||||
}
|
||||
|
||||
func QsciLexerCustom_TrUtf8(s string) string {
|
||||
s_Cstring := C.CString(s)
|
||||
defer C.free(unsafe.Pointer(s_Cstring))
|
||||
var _ms C.struct_miqt_string = C.QsciLexerCustom_TrUtf8(s_Cstring)
|
||||
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
||||
C.free(unsafe.Pointer(_ms.data))
|
||||
return _ret
|
||||
}
|
||||
|
||||
func (this *QsciLexerCustom) SetStyling(length int, style int) {
|
||||
C.QsciLexerCustom_SetStyling(this.h, (C.int)(length), (C.int)(style))
|
||||
}
|
||||
|
||||
func (this *QsciLexerCustom) SetStyling2(length int, style *QsciStyle) {
|
||||
C.QsciLexerCustom_SetStyling2(this.h, (C.int)(length), style.cPointer())
|
||||
}
|
||||
|
||||
func (this *QsciLexerCustom) StartStyling(pos int) {
|
||||
C.QsciLexerCustom_StartStyling(this.h, (C.int)(pos))
|
||||
}
|
||||
|
||||
func (this *QsciLexerCustom) StyleText(start int, end int) {
|
||||
C.QsciLexerCustom_StyleText(this.h, (C.int)(start), (C.int)(end))
|
||||
}
|
||||
|
||||
func (this *QsciLexerCustom) SetEditor(editor *QsciScintilla) {
|
||||
C.QsciLexerCustom_SetEditor(this.h, editor.cPointer())
|
||||
}
|
||||
|
||||
func (this *QsciLexerCustom) StyleBitsNeeded() int {
|
||||
return (int)(C.QsciLexerCustom_StyleBitsNeeded(this.h))
|
||||
}
|
||||
|
||||
func QsciLexerCustom_Tr2(s string, c string) string {
|
||||
s_Cstring := C.CString(s)
|
||||
defer C.free(unsafe.Pointer(s_Cstring))
|
||||
c_Cstring := C.CString(c)
|
||||
defer C.free(unsafe.Pointer(c_Cstring))
|
||||
var _ms C.struct_miqt_string = C.QsciLexerCustom_Tr2(s_Cstring, c_Cstring)
|
||||
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
||||
C.free(unsafe.Pointer(_ms.data))
|
||||
return _ret
|
||||
}
|
||||
|
||||
func QsciLexerCustom_Tr3(s string, c string, n int) string {
|
||||
s_Cstring := C.CString(s)
|
||||
defer C.free(unsafe.Pointer(s_Cstring))
|
||||
c_Cstring := C.CString(c)
|
||||
defer C.free(unsafe.Pointer(c_Cstring))
|
||||
var _ms C.struct_miqt_string = C.QsciLexerCustom_Tr3(s_Cstring, c_Cstring, (C.int)(n))
|
||||
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
||||
C.free(unsafe.Pointer(_ms.data))
|
||||
return _ret
|
||||
}
|
||||
|
||||
func QsciLexerCustom_TrUtf82(s string, c string) string {
|
||||
s_Cstring := C.CString(s)
|
||||
defer C.free(unsafe.Pointer(s_Cstring))
|
||||
c_Cstring := C.CString(c)
|
||||
defer C.free(unsafe.Pointer(c_Cstring))
|
||||
var _ms C.struct_miqt_string = C.QsciLexerCustom_TrUtf82(s_Cstring, c_Cstring)
|
||||
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
||||
C.free(unsafe.Pointer(_ms.data))
|
||||
return _ret
|
||||
}
|
||||
|
||||
func QsciLexerCustom_TrUtf83(s string, c string, n int) string {
|
||||
s_Cstring := C.CString(s)
|
||||
defer C.free(unsafe.Pointer(s_Cstring))
|
||||
c_Cstring := C.CString(c)
|
||||
defer C.free(unsafe.Pointer(c_Cstring))
|
||||
var _ms C.struct_miqt_string = C.QsciLexerCustom_TrUtf83(s_Cstring, c_Cstring, (C.int)(n))
|
||||
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
||||
C.free(unsafe.Pointer(_ms.data))
|
||||
return _ret
|
||||
}
|
||||
|
||||
func (this *QsciLexerCustom) StartStyling2(pos int, styleBits int) {
|
||||
C.QsciLexerCustom_StartStyling2(this.h, (C.int)(pos), (C.int)(styleBits))
|
||||
}
|
||||
|
||||
// Delete this object from C++ memory.
|
||||
func (this *QsciLexerCustom) Delete() {
|
||||
C.QsciLexerCustom_Delete(this.h)
|
||||
}
|
||||
|
||||
// GoGC adds a Go Finalizer to this pointer, so that it will be deleted
|
||||
// from C++ memory once it is unreachable from Go memory.
|
||||
func (this *QsciLexerCustom) GoGC() {
|
||||
runtime.SetFinalizer(this, func(this *QsciLexerCustom) {
|
||||
this.Delete()
|
||||
runtime.KeepAlive(this.h)
|
||||
})
|
||||
}
|
49
qt-restricted-extras/qscintilla/gen_qscilexercustom.h
Normal file
49
qt-restricted-extras/qscintilla/gen_qscilexercustom.h
Normal file
@ -0,0 +1,49 @@
|
||||
#ifndef GEN_QSCILEXERCUSTOM_H
|
||||
#define GEN_QSCILEXERCUSTOM_H
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||
|
||||
#include "../../libmiqt/libmiqt.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
class QMetaObject;
|
||||
class QsciLexerCustom;
|
||||
class QsciScintilla;
|
||||
class QsciStyle;
|
||||
#else
|
||||
typedef struct QMetaObject QMetaObject;
|
||||
typedef struct QsciLexerCustom QsciLexerCustom;
|
||||
typedef struct QsciScintilla QsciScintilla;
|
||||
typedef struct QsciStyle QsciStyle;
|
||||
#endif
|
||||
|
||||
QMetaObject* QsciLexerCustom_MetaObject(const QsciLexerCustom* self);
|
||||
void* QsciLexerCustom_Metacast(QsciLexerCustom* self, const char* param1);
|
||||
struct miqt_string QsciLexerCustom_Tr(const char* s);
|
||||
struct miqt_string QsciLexerCustom_TrUtf8(const char* s);
|
||||
void QsciLexerCustom_SetStyling(QsciLexerCustom* self, int length, int style);
|
||||
void QsciLexerCustom_SetStyling2(QsciLexerCustom* self, int length, QsciStyle* style);
|
||||
void QsciLexerCustom_StartStyling(QsciLexerCustom* self, int pos);
|
||||
void QsciLexerCustom_StyleText(QsciLexerCustom* self, int start, int end);
|
||||
void QsciLexerCustom_SetEditor(QsciLexerCustom* self, QsciScintilla* editor);
|
||||
int QsciLexerCustom_StyleBitsNeeded(const QsciLexerCustom* self);
|
||||
struct miqt_string QsciLexerCustom_Tr2(const char* s, const char* c);
|
||||
struct miqt_string QsciLexerCustom_Tr3(const char* s, const char* c, int n);
|
||||
struct miqt_string QsciLexerCustom_TrUtf82(const char* s, const char* c);
|
||||
struct miqt_string QsciLexerCustom_TrUtf83(const char* s, const char* c, int n);
|
||||
void QsciLexerCustom_StartStyling2(QsciLexerCustom* self, int pos, int styleBits);
|
||||
void QsciLexerCustom_Delete(QsciLexerCustom* self);
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern C */
|
||||
#endif
|
||||
|
||||
#endif
|
217
qt-restricted-extras/qscintilla/gen_qscilexerd.cpp
Normal file
217
qt-restricted-extras/qscintilla/gen_qscilexerd.cpp
Normal file
@ -0,0 +1,217 @@
|
||||
#include <QColor>
|
||||
#include <QFont>
|
||||
#include <QList>
|
||||
#include <QMetaObject>
|
||||
#include <QObject>
|
||||
#include <QString>
|
||||
#include <QByteArray>
|
||||
#include <cstring>
|
||||
#include <qscilexerd.h>
|
||||
#include "gen_qscilexerd.h"
|
||||
#include "_cgo_export.h"
|
||||
|
||||
QsciLexerD* QsciLexerD_new() {
|
||||
return new QsciLexerD();
|
||||
}
|
||||
|
||||
QsciLexerD* QsciLexerD_new2(QObject* parent) {
|
||||
return new QsciLexerD(parent);
|
||||
}
|
||||
|
||||
QMetaObject* QsciLexerD_MetaObject(const QsciLexerD* self) {
|
||||
return (QMetaObject*) self->metaObject();
|
||||
}
|
||||
|
||||
void* QsciLexerD_Metacast(QsciLexerD* self, const char* param1) {
|
||||
return self->qt_metacast(param1);
|
||||
}
|
||||
|
||||
struct miqt_string QsciLexerD_Tr(const char* s) {
|
||||
QString _ret = QsciLexerD::tr(s);
|
||||
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
||||
QByteArray _b = _ret.toUtf8();
|
||||
struct miqt_string _ms;
|
||||
_ms.len = _b.length();
|
||||
_ms.data = static_cast<char*>(malloc(_ms.len));
|
||||
memcpy(_ms.data, _b.data(), _ms.len);
|
||||
return _ms;
|
||||
}
|
||||
|
||||
struct miqt_string QsciLexerD_TrUtf8(const char* s) {
|
||||
QString _ret = QsciLexerD::trUtf8(s);
|
||||
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
||||
QByteArray _b = _ret.toUtf8();
|
||||
struct miqt_string _ms;
|
||||
_ms.len = _b.length();
|
||||
_ms.data = static_cast<char*>(malloc(_ms.len));
|
||||
memcpy(_ms.data, _b.data(), _ms.len);
|
||||
return _ms;
|
||||
}
|
||||
|
||||
const char* QsciLexerD_Language(const QsciLexerD* self) {
|
||||
return (const char*) self->language();
|
||||
}
|
||||
|
||||
const char* QsciLexerD_Lexer(const QsciLexerD* self) {
|
||||
return (const char*) self->lexer();
|
||||
}
|
||||
|
||||
struct miqt_array* QsciLexerD_AutoCompletionWordSeparators(const QsciLexerD* self) {
|
||||
QStringList _ret = self->autoCompletionWordSeparators();
|
||||
// Convert QList<> from C++ memory to manually-managed C memory
|
||||
struct miqt_string* _arr = static_cast<struct miqt_string*>(malloc(sizeof(struct miqt_string) * _ret.length()));
|
||||
for (size_t i = 0, e = _ret.length(); i < e; ++i) {
|
||||
QString _lv_ret = _ret[i];
|
||||
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
||||
QByteArray _lv_b = _lv_ret.toUtf8();
|
||||
struct miqt_string _lv_ms;
|
||||
_lv_ms.len = _lv_b.length();
|
||||
_lv_ms.data = static_cast<char*>(malloc(_lv_ms.len));
|
||||
memcpy(_lv_ms.data, _lv_b.data(), _lv_ms.len);
|
||||
_arr[i] = _lv_ms;
|
||||
}
|
||||
struct miqt_array* _out = static_cast<struct miqt_array*>(malloc(sizeof(struct miqt_array)));
|
||||
_out->len = _ret.length();
|
||||
_out->data = static_cast<void*>(_arr);
|
||||
return _out;
|
||||
}
|
||||
|
||||
const char* QsciLexerD_BlockEnd(const QsciLexerD* self) {
|
||||
return (const char*) self->blockEnd();
|
||||
}
|
||||
|
||||
const char* QsciLexerD_BlockStart(const QsciLexerD* self) {
|
||||
return (const char*) self->blockStart();
|
||||
}
|
||||
|
||||
const char* QsciLexerD_BlockStartKeyword(const QsciLexerD* self) {
|
||||
return (const char*) self->blockStartKeyword();
|
||||
}
|
||||
|
||||
int QsciLexerD_BraceStyle(const QsciLexerD* self) {
|
||||
return self->braceStyle();
|
||||
}
|
||||
|
||||
const char* QsciLexerD_WordCharacters(const QsciLexerD* self) {
|
||||
return (const char*) self->wordCharacters();
|
||||
}
|
||||
|
||||
QColor* QsciLexerD_DefaultColor(const QsciLexerD* self, int style) {
|
||||
return new QColor(self->defaultColor(static_cast<int>(style)));
|
||||
}
|
||||
|
||||
bool QsciLexerD_DefaultEolFill(const QsciLexerD* self, int style) {
|
||||
return self->defaultEolFill(static_cast<int>(style));
|
||||
}
|
||||
|
||||
QFont* QsciLexerD_DefaultFont(const QsciLexerD* self, int style) {
|
||||
return new QFont(self->defaultFont(static_cast<int>(style)));
|
||||
}
|
||||
|
||||
QColor* QsciLexerD_DefaultPaper(const QsciLexerD* self, int style) {
|
||||
return new QColor(self->defaultPaper(static_cast<int>(style)));
|
||||
}
|
||||
|
||||
const char* QsciLexerD_Keywords(const QsciLexerD* self, int set) {
|
||||
return (const char*) self->keywords(static_cast<int>(set));
|
||||
}
|
||||
|
||||
struct miqt_string QsciLexerD_Description(const QsciLexerD* self, int style) {
|
||||
QString _ret = self->description(static_cast<int>(style));
|
||||
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
||||
QByteArray _b = _ret.toUtf8();
|
||||
struct miqt_string _ms;
|
||||
_ms.len = _b.length();
|
||||
_ms.data = static_cast<char*>(malloc(_ms.len));
|
||||
memcpy(_ms.data, _b.data(), _ms.len);
|
||||
return _ms;
|
||||
}
|
||||
|
||||
void QsciLexerD_RefreshProperties(QsciLexerD* self) {
|
||||
self->refreshProperties();
|
||||
}
|
||||
|
||||
bool QsciLexerD_FoldAtElse(const QsciLexerD* self) {
|
||||
return self->foldAtElse();
|
||||
}
|
||||
|
||||
bool QsciLexerD_FoldComments(const QsciLexerD* self) {
|
||||
return self->foldComments();
|
||||
}
|
||||
|
||||
bool QsciLexerD_FoldCompact(const QsciLexerD* self) {
|
||||
return self->foldCompact();
|
||||
}
|
||||
|
||||
void QsciLexerD_SetFoldAtElse(QsciLexerD* self, bool fold) {
|
||||
self->setFoldAtElse(fold);
|
||||
}
|
||||
|
||||
void QsciLexerD_SetFoldComments(QsciLexerD* self, bool fold) {
|
||||
self->setFoldComments(fold);
|
||||
}
|
||||
|
||||
void QsciLexerD_SetFoldCompact(QsciLexerD* self, bool fold) {
|
||||
self->setFoldCompact(fold);
|
||||
}
|
||||
|
||||
struct miqt_string QsciLexerD_Tr2(const char* s, const char* c) {
|
||||
QString _ret = QsciLexerD::tr(s, c);
|
||||
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
||||
QByteArray _b = _ret.toUtf8();
|
||||
struct miqt_string _ms;
|
||||
_ms.len = _b.length();
|
||||
_ms.data = static_cast<char*>(malloc(_ms.len));
|
||||
memcpy(_ms.data, _b.data(), _ms.len);
|
||||
return _ms;
|
||||
}
|
||||
|
||||
struct miqt_string QsciLexerD_Tr3(const char* s, const char* c, int n) {
|
||||
QString _ret = QsciLexerD::tr(s, c, static_cast<int>(n));
|
||||
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
||||
QByteArray _b = _ret.toUtf8();
|
||||
struct miqt_string _ms;
|
||||
_ms.len = _b.length();
|
||||
_ms.data = static_cast<char*>(malloc(_ms.len));
|
||||
memcpy(_ms.data, _b.data(), _ms.len);
|
||||
return _ms;
|
||||
}
|
||||
|
||||
struct miqt_string QsciLexerD_TrUtf82(const char* s, const char* c) {
|
||||
QString _ret = QsciLexerD::trUtf8(s, c);
|
||||
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
||||
QByteArray _b = _ret.toUtf8();
|
||||
struct miqt_string _ms;
|
||||
_ms.len = _b.length();
|
||||
_ms.data = static_cast<char*>(malloc(_ms.len));
|
||||
memcpy(_ms.data, _b.data(), _ms.len);
|
||||
return _ms;
|
||||
}
|
||||
|
||||
struct miqt_string QsciLexerD_TrUtf83(const char* s, const char* c, int n) {
|
||||
QString _ret = QsciLexerD::trUtf8(s, c, static_cast<int>(n));
|
||||
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
||||
QByteArray _b = _ret.toUtf8();
|
||||
struct miqt_string _ms;
|
||||
_ms.len = _b.length();
|
||||
_ms.data = static_cast<char*>(malloc(_ms.len));
|
||||
memcpy(_ms.data, _b.data(), _ms.len);
|
||||
return _ms;
|
||||
}
|
||||
|
||||
const char* QsciLexerD_BlockEnd1(const QsciLexerD* self, int* style) {
|
||||
return (const char*) self->blockEnd(static_cast<int*>(style));
|
||||
}
|
||||
|
||||
const char* QsciLexerD_BlockStart1(const QsciLexerD* self, int* style) {
|
||||
return (const char*) self->blockStart(static_cast<int*>(style));
|
||||
}
|
||||
|
||||
const char* QsciLexerD_BlockStartKeyword1(const QsciLexerD* self, int* style) {
|
||||
return (const char*) self->blockStartKeyword(static_cast<int*>(style));
|
||||
}
|
||||
|
||||
void QsciLexerD_Delete(QsciLexerD* self) {
|
||||
delete self;
|
||||
}
|
||||
|
299
qt-restricted-extras/qscintilla/gen_qscilexerd.go
Normal file
299
qt-restricted-extras/qscintilla/gen_qscilexerd.go
Normal file
@ -0,0 +1,299 @@
|
||||
package qscintilla
|
||||
|
||||
/*
|
||||
|
||||
#include "gen_qscilexerd.h"
|
||||
#include <stdlib.h>
|
||||
|
||||
*/
|
||||
import "C"
|
||||
|
||||
import (
|
||||
"github.com/mappu/miqt/qt"
|
||||
"runtime"
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
type QsciLexerD__ int
|
||||
|
||||
const (
|
||||
QsciLexerD__Default QsciLexerD__ = 0
|
||||
QsciLexerD__Comment QsciLexerD__ = 1
|
||||
QsciLexerD__CommentLine QsciLexerD__ = 2
|
||||
QsciLexerD__CommentDoc QsciLexerD__ = 3
|
||||
QsciLexerD__CommentNested QsciLexerD__ = 4
|
||||
QsciLexerD__Number QsciLexerD__ = 5
|
||||
QsciLexerD__Keyword QsciLexerD__ = 6
|
||||
QsciLexerD__KeywordSecondary QsciLexerD__ = 7
|
||||
QsciLexerD__KeywordDoc QsciLexerD__ = 8
|
||||
QsciLexerD__Typedefs QsciLexerD__ = 9
|
||||
QsciLexerD__String QsciLexerD__ = 10
|
||||
QsciLexerD__UnclosedString QsciLexerD__ = 11
|
||||
QsciLexerD__Character QsciLexerD__ = 12
|
||||
QsciLexerD__Operator QsciLexerD__ = 13
|
||||
QsciLexerD__Identifier QsciLexerD__ = 14
|
||||
QsciLexerD__CommentLineDoc QsciLexerD__ = 15
|
||||
QsciLexerD__CommentDocKeyword QsciLexerD__ = 16
|
||||
QsciLexerD__CommentDocKeywordError QsciLexerD__ = 17
|
||||
QsciLexerD__BackquoteString QsciLexerD__ = 18
|
||||
QsciLexerD__RawString QsciLexerD__ = 19
|
||||
QsciLexerD__KeywordSet5 QsciLexerD__ = 20
|
||||
QsciLexerD__KeywordSet6 QsciLexerD__ = 21
|
||||
QsciLexerD__KeywordSet7 QsciLexerD__ = 22
|
||||
)
|
||||
|
||||
type QsciLexerD struct {
|
||||
h *C.QsciLexerD
|
||||
*QsciLexer
|
||||
}
|
||||
|
||||
func (this *QsciLexerD) cPointer() *C.QsciLexerD {
|
||||
if this == nil {
|
||||
return nil
|
||||
}
|
||||
return this.h
|
||||
}
|
||||
|
||||
func (this *QsciLexerD) UnsafePointer() unsafe.Pointer {
|
||||
if this == nil {
|
||||
return nil
|
||||
}
|
||||
return unsafe.Pointer(this.h)
|
||||
}
|
||||
|
||||
func newQsciLexerD(h *C.QsciLexerD) *QsciLexerD {
|
||||
if h == nil {
|
||||
return nil
|
||||
}
|
||||
return &QsciLexerD{h: h, QsciLexer: UnsafeNewQsciLexer(unsafe.Pointer(h))}
|
||||
}
|
||||
|
||||
func UnsafeNewQsciLexerD(h unsafe.Pointer) *QsciLexerD {
|
||||
return newQsciLexerD((*C.QsciLexerD)(h))
|
||||
}
|
||||
|
||||
// NewQsciLexerD constructs a new QsciLexerD object.
|
||||
func NewQsciLexerD() *QsciLexerD {
|
||||
ret := C.QsciLexerD_new()
|
||||
return newQsciLexerD(ret)
|
||||
}
|
||||
|
||||
// NewQsciLexerD2 constructs a new QsciLexerD object.
|
||||
func NewQsciLexerD2(parent *qt.QObject) *QsciLexerD {
|
||||
ret := C.QsciLexerD_new2((*C.QObject)(parent.UnsafePointer()))
|
||||
return newQsciLexerD(ret)
|
||||
}
|
||||
|
||||
func (this *QsciLexerD) MetaObject() *qt.QMetaObject {
|
||||
return qt.UnsafeNewQMetaObject(unsafe.Pointer(C.QsciLexerD_MetaObject(this.h)))
|
||||
}
|
||||
|
||||
func (this *QsciLexerD) Metacast(param1 string) unsafe.Pointer {
|
||||
param1_Cstring := C.CString(param1)
|
||||
defer C.free(unsafe.Pointer(param1_Cstring))
|
||||
return (unsafe.Pointer)(C.QsciLexerD_Metacast(this.h, param1_Cstring))
|
||||
}
|
||||
|
||||
func QsciLexerD_Tr(s string) string {
|
||||
s_Cstring := C.CString(s)
|
||||
defer C.free(unsafe.Pointer(s_Cstring))
|
||||
var _ms C.struct_miqt_string = C.QsciLexerD_Tr(s_Cstring)
|
||||
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
||||
C.free(unsafe.Pointer(_ms.data))
|
||||
return _ret
|
||||
}
|
||||
|
||||
func QsciLexerD_TrUtf8(s string) string {
|
||||
s_Cstring := C.CString(s)
|
||||
defer C.free(unsafe.Pointer(s_Cstring))
|
||||
var _ms C.struct_miqt_string = C.QsciLexerD_TrUtf8(s_Cstring)
|
||||
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
||||
C.free(unsafe.Pointer(_ms.data))
|
||||
return _ret
|
||||
}
|
||||
|
||||
func (this *QsciLexerD) Language() string {
|
||||
_ret := C.QsciLexerD_Language(this.h)
|
||||
return C.GoString(_ret)
|
||||
}
|
||||
|
||||
func (this *QsciLexerD) Lexer() string {
|
||||
_ret := C.QsciLexerD_Lexer(this.h)
|
||||
return C.GoString(_ret)
|
||||
}
|
||||
|
||||
func (this *QsciLexerD) AutoCompletionWordSeparators() []string {
|
||||
var _ma *C.struct_miqt_array = C.QsciLexerD_AutoCompletionWordSeparators(this.h)
|
||||
_ret := make([]string, int(_ma.len))
|
||||
_outCast := (*[0xffff]C.struct_miqt_string)(unsafe.Pointer(_ma.data)) // hey ya
|
||||
for i := 0; i < int(_ma.len); i++ {
|
||||
var _lv_ms C.struct_miqt_string = _outCast[i]
|
||||
_lv_ret := C.GoStringN(_lv_ms.data, C.int(int64(_lv_ms.len)))
|
||||
C.free(unsafe.Pointer(_lv_ms.data))
|
||||
_ret[i] = _lv_ret
|
||||
}
|
||||
C.free(unsafe.Pointer(_ma))
|
||||
return _ret
|
||||
}
|
||||
|
||||
func (this *QsciLexerD) BlockEnd() string {
|
||||
_ret := C.QsciLexerD_BlockEnd(this.h)
|
||||
return C.GoString(_ret)
|
||||
}
|
||||
|
||||
func (this *QsciLexerD) BlockStart() string {
|
||||
_ret := C.QsciLexerD_BlockStart(this.h)
|
||||
return C.GoString(_ret)
|
||||
}
|
||||
|
||||
func (this *QsciLexerD) BlockStartKeyword() string {
|
||||
_ret := C.QsciLexerD_BlockStartKeyword(this.h)
|
||||
return C.GoString(_ret)
|
||||
}
|
||||
|
||||
func (this *QsciLexerD) BraceStyle() int {
|
||||
return (int)(C.QsciLexerD_BraceStyle(this.h))
|
||||
}
|
||||
|
||||
func (this *QsciLexerD) WordCharacters() string {
|
||||
_ret := C.QsciLexerD_WordCharacters(this.h)
|
||||
return C.GoString(_ret)
|
||||
}
|
||||
|
||||
func (this *QsciLexerD) DefaultColor(style int) *qt.QColor {
|
||||
_ret := C.QsciLexerD_DefaultColor(this.h, (C.int)(style))
|
||||
_goptr := qt.UnsafeNewQColor(unsafe.Pointer(_ret))
|
||||
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
|
||||
return _goptr
|
||||
}
|
||||
|
||||
func (this *QsciLexerD) DefaultEolFill(style int) bool {
|
||||
return (bool)(C.QsciLexerD_DefaultEolFill(this.h, (C.int)(style)))
|
||||
}
|
||||
|
||||
func (this *QsciLexerD) DefaultFont(style int) *qt.QFont {
|
||||
_ret := C.QsciLexerD_DefaultFont(this.h, (C.int)(style))
|
||||
_goptr := qt.UnsafeNewQFont(unsafe.Pointer(_ret))
|
||||
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
|
||||
return _goptr
|
||||
}
|
||||
|
||||
func (this *QsciLexerD) DefaultPaper(style int) *qt.QColor {
|
||||
_ret := C.QsciLexerD_DefaultPaper(this.h, (C.int)(style))
|
||||
_goptr := qt.UnsafeNewQColor(unsafe.Pointer(_ret))
|
||||
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
|
||||
return _goptr
|
||||
}
|
||||
|
||||
func (this *QsciLexerD) Keywords(set int) string {
|
||||
_ret := C.QsciLexerD_Keywords(this.h, (C.int)(set))
|
||||
return C.GoString(_ret)
|
||||
}
|
||||
|
||||
func (this *QsciLexerD) Description(style int) string {
|
||||
var _ms C.struct_miqt_string = C.QsciLexerD_Description(this.h, (C.int)(style))
|
||||
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
||||
C.free(unsafe.Pointer(_ms.data))
|
||||
return _ret
|
||||
}
|
||||
|
||||
func (this *QsciLexerD) RefreshProperties() {
|
||||
C.QsciLexerD_RefreshProperties(this.h)
|
||||
}
|
||||
|
||||
func (this *QsciLexerD) FoldAtElse() bool {
|
||||
return (bool)(C.QsciLexerD_FoldAtElse(this.h))
|
||||
}
|
||||
|
||||
func (this *QsciLexerD) FoldComments() bool {
|
||||
return (bool)(C.QsciLexerD_FoldComments(this.h))
|
||||
}
|
||||
|
||||
func (this *QsciLexerD) FoldCompact() bool {
|
||||
return (bool)(C.QsciLexerD_FoldCompact(this.h))
|
||||
}
|
||||
|
||||
func (this *QsciLexerD) SetFoldAtElse(fold bool) {
|
||||
C.QsciLexerD_SetFoldAtElse(this.h, (C.bool)(fold))
|
||||
}
|
||||
|
||||
func (this *QsciLexerD) SetFoldComments(fold bool) {
|
||||
C.QsciLexerD_SetFoldComments(this.h, (C.bool)(fold))
|
||||
}
|
||||
|
||||
func (this *QsciLexerD) SetFoldCompact(fold bool) {
|
||||
C.QsciLexerD_SetFoldCompact(this.h, (C.bool)(fold))
|
||||
}
|
||||
|
||||
func QsciLexerD_Tr2(s string, c string) string {
|
||||
s_Cstring := C.CString(s)
|
||||
defer C.free(unsafe.Pointer(s_Cstring))
|
||||
c_Cstring := C.CString(c)
|
||||
defer C.free(unsafe.Pointer(c_Cstring))
|
||||
var _ms C.struct_miqt_string = C.QsciLexerD_Tr2(s_Cstring, c_Cstring)
|
||||
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
||||
C.free(unsafe.Pointer(_ms.data))
|
||||
return _ret
|
||||
}
|
||||
|
||||
func QsciLexerD_Tr3(s string, c string, n int) string {
|
||||
s_Cstring := C.CString(s)
|
||||
defer C.free(unsafe.Pointer(s_Cstring))
|
||||
c_Cstring := C.CString(c)
|
||||
defer C.free(unsafe.Pointer(c_Cstring))
|
||||
var _ms C.struct_miqt_string = C.QsciLexerD_Tr3(s_Cstring, c_Cstring, (C.int)(n))
|
||||
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
||||
C.free(unsafe.Pointer(_ms.data))
|
||||
return _ret
|
||||
}
|
||||
|
||||
func QsciLexerD_TrUtf82(s string, c string) string {
|
||||
s_Cstring := C.CString(s)
|
||||
defer C.free(unsafe.Pointer(s_Cstring))
|
||||
c_Cstring := C.CString(c)
|
||||
defer C.free(unsafe.Pointer(c_Cstring))
|
||||
var _ms C.struct_miqt_string = C.QsciLexerD_TrUtf82(s_Cstring, c_Cstring)
|
||||
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
||||
C.free(unsafe.Pointer(_ms.data))
|
||||
return _ret
|
||||
}
|
||||
|
||||
func QsciLexerD_TrUtf83(s string, c string, n int) string {
|
||||
s_Cstring := C.CString(s)
|
||||
defer C.free(unsafe.Pointer(s_Cstring))
|
||||
c_Cstring := C.CString(c)
|
||||
defer C.free(unsafe.Pointer(c_Cstring))
|
||||
var _ms C.struct_miqt_string = C.QsciLexerD_TrUtf83(s_Cstring, c_Cstring, (C.int)(n))
|
||||
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
||||
C.free(unsafe.Pointer(_ms.data))
|
||||
return _ret
|
||||
}
|
||||
|
||||
func (this *QsciLexerD) BlockEnd1(style *int) string {
|
||||
_ret := C.QsciLexerD_BlockEnd1(this.h, (*C.int)(unsafe.Pointer(style)))
|
||||
return C.GoString(_ret)
|
||||
}
|
||||
|
||||
func (this *QsciLexerD) BlockStart1(style *int) string {
|
||||
_ret := C.QsciLexerD_BlockStart1(this.h, (*C.int)(unsafe.Pointer(style)))
|
||||
return C.GoString(_ret)
|
||||
}
|
||||
|
||||
func (this *QsciLexerD) BlockStartKeyword1(style *int) string {
|
||||
_ret := C.QsciLexerD_BlockStartKeyword1(this.h, (*C.int)(unsafe.Pointer(style)))
|
||||
return C.GoString(_ret)
|
||||
}
|
||||
|
||||
// Delete this object from C++ memory.
|
||||
func (this *QsciLexerD) Delete() {
|
||||
C.QsciLexerD_Delete(this.h)
|
||||
}
|
||||
|
||||
// GoGC adds a Go Finalizer to this pointer, so that it will be deleted
|
||||
// from C++ memory once it is unreachable from Go memory.
|
||||
func (this *QsciLexerD) GoGC() {
|
||||
runtime.SetFinalizer(this, func(this *QsciLexerD) {
|
||||
this.Delete()
|
||||
runtime.KeepAlive(this.h)
|
||||
})
|
||||
}
|
70
qt-restricted-extras/qscintilla/gen_qscilexerd.h
Normal file
70
qt-restricted-extras/qscintilla/gen_qscilexerd.h
Normal file
@ -0,0 +1,70 @@
|
||||
#ifndef GEN_QSCILEXERD_H
|
||||
#define GEN_QSCILEXERD_H
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||
|
||||
#include "../../libmiqt/libmiqt.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
class QColor;
|
||||
class QFont;
|
||||
class QMetaObject;
|
||||
class QObject;
|
||||
class QsciLexerD;
|
||||
#else
|
||||
typedef struct QColor QColor;
|
||||
typedef struct QFont QFont;
|
||||
typedef struct QMetaObject QMetaObject;
|
||||
typedef struct QObject QObject;
|
||||
typedef struct QsciLexerD QsciLexerD;
|
||||
#endif
|
||||
|
||||
QsciLexerD* QsciLexerD_new();
|
||||
QsciLexerD* QsciLexerD_new2(QObject* parent);
|
||||
QMetaObject* QsciLexerD_MetaObject(const QsciLexerD* self);
|
||||
void* QsciLexerD_Metacast(QsciLexerD* self, const char* param1);
|
||||
struct miqt_string QsciLexerD_Tr(const char* s);
|
||||
struct miqt_string QsciLexerD_TrUtf8(const char* s);
|
||||
const char* QsciLexerD_Language(const QsciLexerD* self);
|
||||
const char* QsciLexerD_Lexer(const QsciLexerD* self);
|
||||
struct miqt_array* QsciLexerD_AutoCompletionWordSeparators(const QsciLexerD* self);
|
||||
const char* QsciLexerD_BlockEnd(const QsciLexerD* self);
|
||||
const char* QsciLexerD_BlockStart(const QsciLexerD* self);
|
||||
const char* QsciLexerD_BlockStartKeyword(const QsciLexerD* self);
|
||||
int QsciLexerD_BraceStyle(const QsciLexerD* self);
|
||||
const char* QsciLexerD_WordCharacters(const QsciLexerD* self);
|
||||
QColor* QsciLexerD_DefaultColor(const QsciLexerD* self, int style);
|
||||
bool QsciLexerD_DefaultEolFill(const QsciLexerD* self, int style);
|
||||
QFont* QsciLexerD_DefaultFont(const QsciLexerD* self, int style);
|
||||
QColor* QsciLexerD_DefaultPaper(const QsciLexerD* self, int style);
|
||||
const char* QsciLexerD_Keywords(const QsciLexerD* self, int set);
|
||||
struct miqt_string QsciLexerD_Description(const QsciLexerD* self, int style);
|
||||
void QsciLexerD_RefreshProperties(QsciLexerD* self);
|
||||
bool QsciLexerD_FoldAtElse(const QsciLexerD* self);
|
||||
bool QsciLexerD_FoldComments(const QsciLexerD* self);
|
||||
bool QsciLexerD_FoldCompact(const QsciLexerD* self);
|
||||
void QsciLexerD_SetFoldAtElse(QsciLexerD* self, bool fold);
|
||||
void QsciLexerD_SetFoldComments(QsciLexerD* self, bool fold);
|
||||
void QsciLexerD_SetFoldCompact(QsciLexerD* self, bool fold);
|
||||
struct miqt_string QsciLexerD_Tr2(const char* s, const char* c);
|
||||
struct miqt_string QsciLexerD_Tr3(const char* s, const char* c, int n);
|
||||
struct miqt_string QsciLexerD_TrUtf82(const char* s, const char* c);
|
||||
struct miqt_string QsciLexerD_TrUtf83(const char* s, const char* c, int n);
|
||||
const char* QsciLexerD_BlockEnd1(const QsciLexerD* self, int* style);
|
||||
const char* QsciLexerD_BlockStart1(const QsciLexerD* self, int* style);
|
||||
const char* QsciLexerD_BlockStartKeyword1(const QsciLexerD* self, int* style);
|
||||
void QsciLexerD_Delete(QsciLexerD* self);
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern C */
|
||||
#endif
|
||||
|
||||
#endif
|
123
qt-restricted-extras/qscintilla/gen_qscilexerdiff.cpp
Normal file
123
qt-restricted-extras/qscintilla/gen_qscilexerdiff.cpp
Normal file
@ -0,0 +1,123 @@
|
||||
#include <QColor>
|
||||
#include <QMetaObject>
|
||||
#include <QObject>
|
||||
#include <QString>
|
||||
#include <QByteArray>
|
||||
#include <cstring>
|
||||
#include <qscilexerdiff.h>
|
||||
#include "gen_qscilexerdiff.h"
|
||||
#include "_cgo_export.h"
|
||||
|
||||
QsciLexerDiff* QsciLexerDiff_new() {
|
||||
return new QsciLexerDiff();
|
||||
}
|
||||
|
||||
QsciLexerDiff* QsciLexerDiff_new2(QObject* parent) {
|
||||
return new QsciLexerDiff(parent);
|
||||
}
|
||||
|
||||
QMetaObject* QsciLexerDiff_MetaObject(const QsciLexerDiff* self) {
|
||||
return (QMetaObject*) self->metaObject();
|
||||
}
|
||||
|
||||
void* QsciLexerDiff_Metacast(QsciLexerDiff* self, const char* param1) {
|
||||
return self->qt_metacast(param1);
|
||||
}
|
||||
|
||||
struct miqt_string QsciLexerDiff_Tr(const char* s) {
|
||||
QString _ret = QsciLexerDiff::tr(s);
|
||||
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
||||
QByteArray _b = _ret.toUtf8();
|
||||
struct miqt_string _ms;
|
||||
_ms.len = _b.length();
|
||||
_ms.data = static_cast<char*>(malloc(_ms.len));
|
||||
memcpy(_ms.data, _b.data(), _ms.len);
|
||||
return _ms;
|
||||
}
|
||||
|
||||
struct miqt_string QsciLexerDiff_TrUtf8(const char* s) {
|
||||
QString _ret = QsciLexerDiff::trUtf8(s);
|
||||
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
||||
QByteArray _b = _ret.toUtf8();
|
||||
struct miqt_string _ms;
|
||||
_ms.len = _b.length();
|
||||
_ms.data = static_cast<char*>(malloc(_ms.len));
|
||||
memcpy(_ms.data, _b.data(), _ms.len);
|
||||
return _ms;
|
||||
}
|
||||
|
||||
const char* QsciLexerDiff_Language(const QsciLexerDiff* self) {
|
||||
return (const char*) self->language();
|
||||
}
|
||||
|
||||
const char* QsciLexerDiff_Lexer(const QsciLexerDiff* self) {
|
||||
return (const char*) self->lexer();
|
||||
}
|
||||
|
||||
const char* QsciLexerDiff_WordCharacters(const QsciLexerDiff* self) {
|
||||
return (const char*) self->wordCharacters();
|
||||
}
|
||||
|
||||
QColor* QsciLexerDiff_DefaultColor(const QsciLexerDiff* self, int style) {
|
||||
return new QColor(self->defaultColor(static_cast<int>(style)));
|
||||
}
|
||||
|
||||
struct miqt_string QsciLexerDiff_Description(const QsciLexerDiff* self, int style) {
|
||||
QString _ret = self->description(static_cast<int>(style));
|
||||
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
||||
QByteArray _b = _ret.toUtf8();
|
||||
struct miqt_string _ms;
|
||||
_ms.len = _b.length();
|
||||
_ms.data = static_cast<char*>(malloc(_ms.len));
|
||||
memcpy(_ms.data, _b.data(), _ms.len);
|
||||
return _ms;
|
||||
}
|
||||
|
||||
struct miqt_string QsciLexerDiff_Tr2(const char* s, const char* c) {
|
||||
QString _ret = QsciLexerDiff::tr(s, c);
|
||||
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
||||
QByteArray _b = _ret.toUtf8();
|
||||
struct miqt_string _ms;
|
||||
_ms.len = _b.length();
|
||||
_ms.data = static_cast<char*>(malloc(_ms.len));
|
||||
memcpy(_ms.data, _b.data(), _ms.len);
|
||||
return _ms;
|
||||
}
|
||||
|
||||
struct miqt_string QsciLexerDiff_Tr3(const char* s, const char* c, int n) {
|
||||
QString _ret = QsciLexerDiff::tr(s, c, static_cast<int>(n));
|
||||
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
||||
QByteArray _b = _ret.toUtf8();
|
||||
struct miqt_string _ms;
|
||||
_ms.len = _b.length();
|
||||
_ms.data = static_cast<char*>(malloc(_ms.len));
|
||||
memcpy(_ms.data, _b.data(), _ms.len);
|
||||
return _ms;
|
||||
}
|
||||
|
||||
struct miqt_string QsciLexerDiff_TrUtf82(const char* s, const char* c) {
|
||||
QString _ret = QsciLexerDiff::trUtf8(s, c);
|
||||
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
||||
QByteArray _b = _ret.toUtf8();
|
||||
struct miqt_string _ms;
|
||||
_ms.len = _b.length();
|
||||
_ms.data = static_cast<char*>(malloc(_ms.len));
|
||||
memcpy(_ms.data, _b.data(), _ms.len);
|
||||
return _ms;
|
||||
}
|
||||
|
||||
struct miqt_string QsciLexerDiff_TrUtf83(const char* s, const char* c, int n) {
|
||||
QString _ret = QsciLexerDiff::trUtf8(s, c, static_cast<int>(n));
|
||||
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
||||
QByteArray _b = _ret.toUtf8();
|
||||
struct miqt_string _ms;
|
||||
_ms.len = _b.length();
|
||||
_ms.data = static_cast<char*>(malloc(_ms.len));
|
||||
memcpy(_ms.data, _b.data(), _ms.len);
|
||||
return _ms;
|
||||
}
|
||||
|
||||
void QsciLexerDiff_Delete(QsciLexerDiff* self) {
|
||||
delete self;
|
||||
}
|
||||
|
189
qt-restricted-extras/qscintilla/gen_qscilexerdiff.go
Normal file
189
qt-restricted-extras/qscintilla/gen_qscilexerdiff.go
Normal file
@ -0,0 +1,189 @@
|
||||
package qscintilla
|
||||
|
||||
/*
|
||||
|
||||
#include "gen_qscilexerdiff.h"
|
||||
#include <stdlib.h>
|
||||
|
||||
*/
|
||||
import "C"
|
||||
|
||||
import (
|
||||
"github.com/mappu/miqt/qt"
|
||||
"runtime"
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
type QsciLexerDiff__ int
|
||||
|
||||
const (
|
||||
QsciLexerDiff__Default QsciLexerDiff__ = 0
|
||||
QsciLexerDiff__Comment QsciLexerDiff__ = 1
|
||||
QsciLexerDiff__Command QsciLexerDiff__ = 2
|
||||
QsciLexerDiff__Header QsciLexerDiff__ = 3
|
||||
QsciLexerDiff__Position QsciLexerDiff__ = 4
|
||||
QsciLexerDiff__LineRemoved QsciLexerDiff__ = 5
|
||||
QsciLexerDiff__LineAdded QsciLexerDiff__ = 6
|
||||
QsciLexerDiff__LineChanged QsciLexerDiff__ = 7
|
||||
QsciLexerDiff__AddingPatchAdded QsciLexerDiff__ = 8
|
||||
QsciLexerDiff__RemovingPatchAdded QsciLexerDiff__ = 9
|
||||
QsciLexerDiff__AddingPatchRemoved QsciLexerDiff__ = 10
|
||||
QsciLexerDiff__RemovingPatchRemoved QsciLexerDiff__ = 11
|
||||
)
|
||||
|
||||
type QsciLexerDiff struct {
|
||||
h *C.QsciLexerDiff
|
||||
*QsciLexer
|
||||
}
|
||||
|
||||
func (this *QsciLexerDiff) cPointer() *C.QsciLexerDiff {
|
||||
if this == nil {
|
||||
return nil
|
||||
}
|
||||
return this.h
|
||||
}
|
||||
|
||||
func (this *QsciLexerDiff) UnsafePointer() unsafe.Pointer {
|
||||
if this == nil {
|
||||
return nil
|
||||
}
|
||||
return unsafe.Pointer(this.h)
|
||||
}
|
||||
|
||||
func newQsciLexerDiff(h *C.QsciLexerDiff) *QsciLexerDiff {
|
||||
if h == nil {
|
||||
return nil
|
||||
}
|
||||
return &QsciLexerDiff{h: h, QsciLexer: UnsafeNewQsciLexer(unsafe.Pointer(h))}
|
||||
}
|
||||
|
||||
func UnsafeNewQsciLexerDiff(h unsafe.Pointer) *QsciLexerDiff {
|
||||
return newQsciLexerDiff((*C.QsciLexerDiff)(h))
|
||||
}
|
||||
|
||||
// NewQsciLexerDiff constructs a new QsciLexerDiff object.
|
||||
func NewQsciLexerDiff() *QsciLexerDiff {
|
||||
ret := C.QsciLexerDiff_new()
|
||||
return newQsciLexerDiff(ret)
|
||||
}
|
||||
|
||||
// NewQsciLexerDiff2 constructs a new QsciLexerDiff object.
|
||||
func NewQsciLexerDiff2(parent *qt.QObject) *QsciLexerDiff {
|
||||
ret := C.QsciLexerDiff_new2((*C.QObject)(parent.UnsafePointer()))
|
||||
return newQsciLexerDiff(ret)
|
||||
}
|
||||
|
||||
func (this *QsciLexerDiff) MetaObject() *qt.QMetaObject {
|
||||
return qt.UnsafeNewQMetaObject(unsafe.Pointer(C.QsciLexerDiff_MetaObject(this.h)))
|
||||
}
|
||||
|
||||
func (this *QsciLexerDiff) Metacast(param1 string) unsafe.Pointer {
|
||||
param1_Cstring := C.CString(param1)
|
||||
defer C.free(unsafe.Pointer(param1_Cstring))
|
||||
return (unsafe.Pointer)(C.QsciLexerDiff_Metacast(this.h, param1_Cstring))
|
||||
}
|
||||
|
||||
func QsciLexerDiff_Tr(s string) string {
|
||||
s_Cstring := C.CString(s)
|
||||
defer C.free(unsafe.Pointer(s_Cstring))
|
||||
var _ms C.struct_miqt_string = C.QsciLexerDiff_Tr(s_Cstring)
|
||||
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
||||
C.free(unsafe.Pointer(_ms.data))
|
||||
return _ret
|
||||
}
|
||||
|
||||
func QsciLexerDiff_TrUtf8(s string) string {
|
||||
s_Cstring := C.CString(s)
|
||||
defer C.free(unsafe.Pointer(s_Cstring))
|
||||
var _ms C.struct_miqt_string = C.QsciLexerDiff_TrUtf8(s_Cstring)
|
||||
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
||||
C.free(unsafe.Pointer(_ms.data))
|
||||
return _ret
|
||||
}
|
||||
|
||||
func (this *QsciLexerDiff) Language() string {
|
||||
_ret := C.QsciLexerDiff_Language(this.h)
|
||||
return C.GoString(_ret)
|
||||
}
|
||||
|
||||
func (this *QsciLexerDiff) Lexer() string {
|
||||
_ret := C.QsciLexerDiff_Lexer(this.h)
|
||||
return C.GoString(_ret)
|
||||
}
|
||||
|
||||
func (this *QsciLexerDiff) WordCharacters() string {
|
||||
_ret := C.QsciLexerDiff_WordCharacters(this.h)
|
||||
return C.GoString(_ret)
|
||||
}
|
||||
|
||||
func (this *QsciLexerDiff) DefaultColor(style int) *qt.QColor {
|
||||
_ret := C.QsciLexerDiff_DefaultColor(this.h, (C.int)(style))
|
||||
_goptr := qt.UnsafeNewQColor(unsafe.Pointer(_ret))
|
||||
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
|
||||
return _goptr
|
||||
}
|
||||
|
||||
func (this *QsciLexerDiff) Description(style int) string {
|
||||
var _ms C.struct_miqt_string = C.QsciLexerDiff_Description(this.h, (C.int)(style))
|
||||
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
||||
C.free(unsafe.Pointer(_ms.data))
|
||||
return _ret
|
||||
}
|
||||
|
||||
func QsciLexerDiff_Tr2(s string, c string) string {
|
||||
s_Cstring := C.CString(s)
|
||||
defer C.free(unsafe.Pointer(s_Cstring))
|
||||
c_Cstring := C.CString(c)
|
||||
defer C.free(unsafe.Pointer(c_Cstring))
|
||||
var _ms C.struct_miqt_string = C.QsciLexerDiff_Tr2(s_Cstring, c_Cstring)
|
||||
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
||||
C.free(unsafe.Pointer(_ms.data))
|
||||
return _ret
|
||||
}
|
||||
|
||||
func QsciLexerDiff_Tr3(s string, c string, n int) string {
|
||||
s_Cstring := C.CString(s)
|
||||
defer C.free(unsafe.Pointer(s_Cstring))
|
||||
c_Cstring := C.CString(c)
|
||||
defer C.free(unsafe.Pointer(c_Cstring))
|
||||
var _ms C.struct_miqt_string = C.QsciLexerDiff_Tr3(s_Cstring, c_Cstring, (C.int)(n))
|
||||
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
||||
C.free(unsafe.Pointer(_ms.data))
|
||||
return _ret
|
||||
}
|
||||
|
||||
func QsciLexerDiff_TrUtf82(s string, c string) string {
|
||||
s_Cstring := C.CString(s)
|
||||
defer C.free(unsafe.Pointer(s_Cstring))
|
||||
c_Cstring := C.CString(c)
|
||||
defer C.free(unsafe.Pointer(c_Cstring))
|
||||
var _ms C.struct_miqt_string = C.QsciLexerDiff_TrUtf82(s_Cstring, c_Cstring)
|
||||
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
||||
C.free(unsafe.Pointer(_ms.data))
|
||||
return _ret
|
||||
}
|
||||
|
||||
func QsciLexerDiff_TrUtf83(s string, c string, n int) string {
|
||||
s_Cstring := C.CString(s)
|
||||
defer C.free(unsafe.Pointer(s_Cstring))
|
||||
c_Cstring := C.CString(c)
|
||||
defer C.free(unsafe.Pointer(c_Cstring))
|
||||
var _ms C.struct_miqt_string = C.QsciLexerDiff_TrUtf83(s_Cstring, c_Cstring, (C.int)(n))
|
||||
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
||||
C.free(unsafe.Pointer(_ms.data))
|
||||
return _ret
|
||||
}
|
||||
|
||||
// Delete this object from C++ memory.
|
||||
func (this *QsciLexerDiff) Delete() {
|
||||
C.QsciLexerDiff_Delete(this.h)
|
||||
}
|
||||
|
||||
// GoGC adds a Go Finalizer to this pointer, so that it will be deleted
|
||||
// from C++ memory once it is unreachable from Go memory.
|
||||
func (this *QsciLexerDiff) GoGC() {
|
||||
runtime.SetFinalizer(this, func(this *QsciLexerDiff) {
|
||||
this.Delete()
|
||||
runtime.KeepAlive(this.h)
|
||||
})
|
||||
}
|
49
qt-restricted-extras/qscintilla/gen_qscilexerdiff.h
Normal file
49
qt-restricted-extras/qscintilla/gen_qscilexerdiff.h
Normal file
@ -0,0 +1,49 @@
|
||||
#ifndef GEN_QSCILEXERDIFF_H
|
||||
#define GEN_QSCILEXERDIFF_H
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||
|
||||
#include "../../libmiqt/libmiqt.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
class QColor;
|
||||
class QMetaObject;
|
||||
class QObject;
|
||||
class QsciLexerDiff;
|
||||
#else
|
||||
typedef struct QColor QColor;
|
||||
typedef struct QMetaObject QMetaObject;
|
||||
typedef struct QObject QObject;
|
||||
typedef struct QsciLexerDiff QsciLexerDiff;
|
||||
#endif
|
||||
|
||||
QsciLexerDiff* QsciLexerDiff_new();
|
||||
QsciLexerDiff* QsciLexerDiff_new2(QObject* parent);
|
||||
QMetaObject* QsciLexerDiff_MetaObject(const QsciLexerDiff* self);
|
||||
void* QsciLexerDiff_Metacast(QsciLexerDiff* self, const char* param1);
|
||||
struct miqt_string QsciLexerDiff_Tr(const char* s);
|
||||
struct miqt_string QsciLexerDiff_TrUtf8(const char* s);
|
||||
const char* QsciLexerDiff_Language(const QsciLexerDiff* self);
|
||||
const char* QsciLexerDiff_Lexer(const QsciLexerDiff* self);
|
||||
const char* QsciLexerDiff_WordCharacters(const QsciLexerDiff* self);
|
||||
QColor* QsciLexerDiff_DefaultColor(const QsciLexerDiff* self, int style);
|
||||
struct miqt_string QsciLexerDiff_Description(const QsciLexerDiff* self, int style);
|
||||
struct miqt_string QsciLexerDiff_Tr2(const char* s, const char* c);
|
||||
struct miqt_string QsciLexerDiff_Tr3(const char* s, const char* c, int n);
|
||||
struct miqt_string QsciLexerDiff_TrUtf82(const char* s, const char* c);
|
||||
struct miqt_string QsciLexerDiff_TrUtf83(const char* s, const char* c, int n);
|
||||
void QsciLexerDiff_Delete(QsciLexerDiff* self);
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern C */
|
||||
#endif
|
||||
|
||||
#endif
|
119
qt-restricted-extras/qscintilla/gen_qscilexeredifact.cpp
Normal file
119
qt-restricted-extras/qscintilla/gen_qscilexeredifact.cpp
Normal file
@ -0,0 +1,119 @@
|
||||
#include <QColor>
|
||||
#include <QMetaObject>
|
||||
#include <QObject>
|
||||
#include <QString>
|
||||
#include <QByteArray>
|
||||
#include <cstring>
|
||||
#include <qscilexeredifact.h>
|
||||
#include "gen_qscilexeredifact.h"
|
||||
#include "_cgo_export.h"
|
||||
|
||||
QsciLexerEDIFACT* QsciLexerEDIFACT_new() {
|
||||
return new QsciLexerEDIFACT();
|
||||
}
|
||||
|
||||
QsciLexerEDIFACT* QsciLexerEDIFACT_new2(QObject* parent) {
|
||||
return new QsciLexerEDIFACT(parent);
|
||||
}
|
||||
|
||||
QMetaObject* QsciLexerEDIFACT_MetaObject(const QsciLexerEDIFACT* self) {
|
||||
return (QMetaObject*) self->metaObject();
|
||||
}
|
||||
|
||||
void* QsciLexerEDIFACT_Metacast(QsciLexerEDIFACT* self, const char* param1) {
|
||||
return self->qt_metacast(param1);
|
||||
}
|
||||
|
||||
struct miqt_string QsciLexerEDIFACT_Tr(const char* s) {
|
||||
QString _ret = QsciLexerEDIFACT::tr(s);
|
||||
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
||||
QByteArray _b = _ret.toUtf8();
|
||||
struct miqt_string _ms;
|
||||
_ms.len = _b.length();
|
||||
_ms.data = static_cast<char*>(malloc(_ms.len));
|
||||
memcpy(_ms.data, _b.data(), _ms.len);
|
||||
return _ms;
|
||||
}
|
||||
|
||||
struct miqt_string QsciLexerEDIFACT_TrUtf8(const char* s) {
|
||||
QString _ret = QsciLexerEDIFACT::trUtf8(s);
|
||||
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
||||
QByteArray _b = _ret.toUtf8();
|
||||
struct miqt_string _ms;
|
||||
_ms.len = _b.length();
|
||||
_ms.data = static_cast<char*>(malloc(_ms.len));
|
||||
memcpy(_ms.data, _b.data(), _ms.len);
|
||||
return _ms;
|
||||
}
|
||||
|
||||
const char* QsciLexerEDIFACT_Language(const QsciLexerEDIFACT* self) {
|
||||
return (const char*) self->language();
|
||||
}
|
||||
|
||||
const char* QsciLexerEDIFACT_Lexer(const QsciLexerEDIFACT* self) {
|
||||
return (const char*) self->lexer();
|
||||
}
|
||||
|
||||
QColor* QsciLexerEDIFACT_DefaultColor(const QsciLexerEDIFACT* self, int style) {
|
||||
return new QColor(self->defaultColor(static_cast<int>(style)));
|
||||
}
|
||||
|
||||
struct miqt_string QsciLexerEDIFACT_Description(const QsciLexerEDIFACT* self, int style) {
|
||||
QString _ret = self->description(static_cast<int>(style));
|
||||
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
||||
QByteArray _b = _ret.toUtf8();
|
||||
struct miqt_string _ms;
|
||||
_ms.len = _b.length();
|
||||
_ms.data = static_cast<char*>(malloc(_ms.len));
|
||||
memcpy(_ms.data, _b.data(), _ms.len);
|
||||
return _ms;
|
||||
}
|
||||
|
||||
struct miqt_string QsciLexerEDIFACT_Tr2(const char* s, const char* c) {
|
||||
QString _ret = QsciLexerEDIFACT::tr(s, c);
|
||||
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
||||
QByteArray _b = _ret.toUtf8();
|
||||
struct miqt_string _ms;
|
||||
_ms.len = _b.length();
|
||||
_ms.data = static_cast<char*>(malloc(_ms.len));
|
||||
memcpy(_ms.data, _b.data(), _ms.len);
|
||||
return _ms;
|
||||
}
|
||||
|
||||
struct miqt_string QsciLexerEDIFACT_Tr3(const char* s, const char* c, int n) {
|
||||
QString _ret = QsciLexerEDIFACT::tr(s, c, static_cast<int>(n));
|
||||
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
||||
QByteArray _b = _ret.toUtf8();
|
||||
struct miqt_string _ms;
|
||||
_ms.len = _b.length();
|
||||
_ms.data = static_cast<char*>(malloc(_ms.len));
|
||||
memcpy(_ms.data, _b.data(), _ms.len);
|
||||
return _ms;
|
||||
}
|
||||
|
||||
struct miqt_string QsciLexerEDIFACT_TrUtf82(const char* s, const char* c) {
|
||||
QString _ret = QsciLexerEDIFACT::trUtf8(s, c);
|
||||
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
||||
QByteArray _b = _ret.toUtf8();
|
||||
struct miqt_string _ms;
|
||||
_ms.len = _b.length();
|
||||
_ms.data = static_cast<char*>(malloc(_ms.len));
|
||||
memcpy(_ms.data, _b.data(), _ms.len);
|
||||
return _ms;
|
||||
}
|
||||
|
||||
struct miqt_string QsciLexerEDIFACT_TrUtf83(const char* s, const char* c, int n) {
|
||||
QString _ret = QsciLexerEDIFACT::trUtf8(s, c, static_cast<int>(n));
|
||||
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
||||
QByteArray _b = _ret.toUtf8();
|
||||
struct miqt_string _ms;
|
||||
_ms.len = _b.length();
|
||||
_ms.data = static_cast<char*>(malloc(_ms.len));
|
||||
memcpy(_ms.data, _b.data(), _ms.len);
|
||||
return _ms;
|
||||
}
|
||||
|
||||
void QsciLexerEDIFACT_Delete(QsciLexerEDIFACT* self) {
|
||||
delete self;
|
||||
}
|
||||
|
181
qt-restricted-extras/qscintilla/gen_qscilexeredifact.go
Normal file
181
qt-restricted-extras/qscintilla/gen_qscilexeredifact.go
Normal file
@ -0,0 +1,181 @@
|
||||
package qscintilla
|
||||
|
||||
/*
|
||||
|
||||
#include "gen_qscilexeredifact.h"
|
||||
#include <stdlib.h>
|
||||
|
||||
*/
|
||||
import "C"
|
||||
|
||||
import (
|
||||
"github.com/mappu/miqt/qt"
|
||||
"runtime"
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
type QsciLexerEDIFACT__ int
|
||||
|
||||
const (
|
||||
QsciLexerEDIFACT__Default QsciLexerEDIFACT__ = 0
|
||||
QsciLexerEDIFACT__SegmentStart QsciLexerEDIFACT__ = 1
|
||||
QsciLexerEDIFACT__SegmentEnd QsciLexerEDIFACT__ = 2
|
||||
QsciLexerEDIFACT__ElementSeparator QsciLexerEDIFACT__ = 3
|
||||
QsciLexerEDIFACT__CompositeSeparator QsciLexerEDIFACT__ = 4
|
||||
QsciLexerEDIFACT__ReleaseSeparator QsciLexerEDIFACT__ = 5
|
||||
QsciLexerEDIFACT__UNASegmentHeader QsciLexerEDIFACT__ = 6
|
||||
QsciLexerEDIFACT__UNHSegmentHeader QsciLexerEDIFACT__ = 7
|
||||
QsciLexerEDIFACT__BadSegment QsciLexerEDIFACT__ = 8
|
||||
)
|
||||
|
||||
type QsciLexerEDIFACT struct {
|
||||
h *C.QsciLexerEDIFACT
|
||||
*QsciLexer
|
||||
}
|
||||
|
||||
func (this *QsciLexerEDIFACT) cPointer() *C.QsciLexerEDIFACT {
|
||||
if this == nil {
|
||||
return nil
|
||||
}
|
||||
return this.h
|
||||
}
|
||||
|
||||
func (this *QsciLexerEDIFACT) UnsafePointer() unsafe.Pointer {
|
||||
if this == nil {
|
||||
return nil
|
||||
}
|
||||
return unsafe.Pointer(this.h)
|
||||
}
|
||||
|
||||
func newQsciLexerEDIFACT(h *C.QsciLexerEDIFACT) *QsciLexerEDIFACT {
|
||||
if h == nil {
|
||||
return nil
|
||||
}
|
||||
return &QsciLexerEDIFACT{h: h, QsciLexer: UnsafeNewQsciLexer(unsafe.Pointer(h))}
|
||||
}
|
||||
|
||||
func UnsafeNewQsciLexerEDIFACT(h unsafe.Pointer) *QsciLexerEDIFACT {
|
||||
return newQsciLexerEDIFACT((*C.QsciLexerEDIFACT)(h))
|
||||
}
|
||||
|
||||
// NewQsciLexerEDIFACT constructs a new QsciLexerEDIFACT object.
|
||||
func NewQsciLexerEDIFACT() *QsciLexerEDIFACT {
|
||||
ret := C.QsciLexerEDIFACT_new()
|
||||
return newQsciLexerEDIFACT(ret)
|
||||
}
|
||||
|
||||
// NewQsciLexerEDIFACT2 constructs a new QsciLexerEDIFACT object.
|
||||
func NewQsciLexerEDIFACT2(parent *qt.QObject) *QsciLexerEDIFACT {
|
||||
ret := C.QsciLexerEDIFACT_new2((*C.QObject)(parent.UnsafePointer()))
|
||||
return newQsciLexerEDIFACT(ret)
|
||||
}
|
||||
|
||||
func (this *QsciLexerEDIFACT) MetaObject() *qt.QMetaObject {
|
||||
return qt.UnsafeNewQMetaObject(unsafe.Pointer(C.QsciLexerEDIFACT_MetaObject(this.h)))
|
||||
}
|
||||
|
||||
func (this *QsciLexerEDIFACT) Metacast(param1 string) unsafe.Pointer {
|
||||
param1_Cstring := C.CString(param1)
|
||||
defer C.free(unsafe.Pointer(param1_Cstring))
|
||||
return (unsafe.Pointer)(C.QsciLexerEDIFACT_Metacast(this.h, param1_Cstring))
|
||||
}
|
||||
|
||||
func QsciLexerEDIFACT_Tr(s string) string {
|
||||
s_Cstring := C.CString(s)
|
||||
defer C.free(unsafe.Pointer(s_Cstring))
|
||||
var _ms C.struct_miqt_string = C.QsciLexerEDIFACT_Tr(s_Cstring)
|
||||
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
||||
C.free(unsafe.Pointer(_ms.data))
|
||||
return _ret
|
||||
}
|
||||
|
||||
func QsciLexerEDIFACT_TrUtf8(s string) string {
|
||||
s_Cstring := C.CString(s)
|
||||
defer C.free(unsafe.Pointer(s_Cstring))
|
||||
var _ms C.struct_miqt_string = C.QsciLexerEDIFACT_TrUtf8(s_Cstring)
|
||||
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
||||
C.free(unsafe.Pointer(_ms.data))
|
||||
return _ret
|
||||
}
|
||||
|
||||
func (this *QsciLexerEDIFACT) Language() string {
|
||||
_ret := C.QsciLexerEDIFACT_Language(this.h)
|
||||
return C.GoString(_ret)
|
||||
}
|
||||
|
||||
func (this *QsciLexerEDIFACT) Lexer() string {
|
||||
_ret := C.QsciLexerEDIFACT_Lexer(this.h)
|
||||
return C.GoString(_ret)
|
||||
}
|
||||
|
||||
func (this *QsciLexerEDIFACT) DefaultColor(style int) *qt.QColor {
|
||||
_ret := C.QsciLexerEDIFACT_DefaultColor(this.h, (C.int)(style))
|
||||
_goptr := qt.UnsafeNewQColor(unsafe.Pointer(_ret))
|
||||
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
|
||||
return _goptr
|
||||
}
|
||||
|
||||
func (this *QsciLexerEDIFACT) Description(style int) string {
|
||||
var _ms C.struct_miqt_string = C.QsciLexerEDIFACT_Description(this.h, (C.int)(style))
|
||||
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
||||
C.free(unsafe.Pointer(_ms.data))
|
||||
return _ret
|
||||
}
|
||||
|
||||
func QsciLexerEDIFACT_Tr2(s string, c string) string {
|
||||
s_Cstring := C.CString(s)
|
||||
defer C.free(unsafe.Pointer(s_Cstring))
|
||||
c_Cstring := C.CString(c)
|
||||
defer C.free(unsafe.Pointer(c_Cstring))
|
||||
var _ms C.struct_miqt_string = C.QsciLexerEDIFACT_Tr2(s_Cstring, c_Cstring)
|
||||
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
||||
C.free(unsafe.Pointer(_ms.data))
|
||||
return _ret
|
||||
}
|
||||
|
||||
func QsciLexerEDIFACT_Tr3(s string, c string, n int) string {
|
||||
s_Cstring := C.CString(s)
|
||||
defer C.free(unsafe.Pointer(s_Cstring))
|
||||
c_Cstring := C.CString(c)
|
||||
defer C.free(unsafe.Pointer(c_Cstring))
|
||||
var _ms C.struct_miqt_string = C.QsciLexerEDIFACT_Tr3(s_Cstring, c_Cstring, (C.int)(n))
|
||||
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
||||
C.free(unsafe.Pointer(_ms.data))
|
||||
return _ret
|
||||
}
|
||||
|
||||
func QsciLexerEDIFACT_TrUtf82(s string, c string) string {
|
||||
s_Cstring := C.CString(s)
|
||||
defer C.free(unsafe.Pointer(s_Cstring))
|
||||
c_Cstring := C.CString(c)
|
||||
defer C.free(unsafe.Pointer(c_Cstring))
|
||||
var _ms C.struct_miqt_string = C.QsciLexerEDIFACT_TrUtf82(s_Cstring, c_Cstring)
|
||||
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
||||
C.free(unsafe.Pointer(_ms.data))
|
||||
return _ret
|
||||
}
|
||||
|
||||
func QsciLexerEDIFACT_TrUtf83(s string, c string, n int) string {
|
||||
s_Cstring := C.CString(s)
|
||||
defer C.free(unsafe.Pointer(s_Cstring))
|
||||
c_Cstring := C.CString(c)
|
||||
defer C.free(unsafe.Pointer(c_Cstring))
|
||||
var _ms C.struct_miqt_string = C.QsciLexerEDIFACT_TrUtf83(s_Cstring, c_Cstring, (C.int)(n))
|
||||
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
||||
C.free(unsafe.Pointer(_ms.data))
|
||||
return _ret
|
||||
}
|
||||
|
||||
// Delete this object from C++ memory.
|
||||
func (this *QsciLexerEDIFACT) Delete() {
|
||||
C.QsciLexerEDIFACT_Delete(this.h)
|
||||
}
|
||||
|
||||
// GoGC adds a Go Finalizer to this pointer, so that it will be deleted
|
||||
// from C++ memory once it is unreachable from Go memory.
|
||||
func (this *QsciLexerEDIFACT) GoGC() {
|
||||
runtime.SetFinalizer(this, func(this *QsciLexerEDIFACT) {
|
||||
this.Delete()
|
||||
runtime.KeepAlive(this.h)
|
||||
})
|
||||
}
|
48
qt-restricted-extras/qscintilla/gen_qscilexeredifact.h
Normal file
48
qt-restricted-extras/qscintilla/gen_qscilexeredifact.h
Normal file
@ -0,0 +1,48 @@
|
||||
#ifndef GEN_QSCILEXEREDIFACT_H
|
||||
#define GEN_QSCILEXEREDIFACT_H
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||
|
||||
#include "../../libmiqt/libmiqt.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
class QColor;
|
||||
class QMetaObject;
|
||||
class QObject;
|
||||
class QsciLexerEDIFACT;
|
||||
#else
|
||||
typedef struct QColor QColor;
|
||||
typedef struct QMetaObject QMetaObject;
|
||||
typedef struct QObject QObject;
|
||||
typedef struct QsciLexerEDIFACT QsciLexerEDIFACT;
|
||||
#endif
|
||||
|
||||
QsciLexerEDIFACT* QsciLexerEDIFACT_new();
|
||||
QsciLexerEDIFACT* QsciLexerEDIFACT_new2(QObject* parent);
|
||||
QMetaObject* QsciLexerEDIFACT_MetaObject(const QsciLexerEDIFACT* self);
|
||||
void* QsciLexerEDIFACT_Metacast(QsciLexerEDIFACT* self, const char* param1);
|
||||
struct miqt_string QsciLexerEDIFACT_Tr(const char* s);
|
||||
struct miqt_string QsciLexerEDIFACT_TrUtf8(const char* s);
|
||||
const char* QsciLexerEDIFACT_Language(const QsciLexerEDIFACT* self);
|
||||
const char* QsciLexerEDIFACT_Lexer(const QsciLexerEDIFACT* self);
|
||||
QColor* QsciLexerEDIFACT_DefaultColor(const QsciLexerEDIFACT* self, int style);
|
||||
struct miqt_string QsciLexerEDIFACT_Description(const QsciLexerEDIFACT* self, int style);
|
||||
struct miqt_string QsciLexerEDIFACT_Tr2(const char* s, const char* c);
|
||||
struct miqt_string QsciLexerEDIFACT_Tr3(const char* s, const char* c, int n);
|
||||
struct miqt_string QsciLexerEDIFACT_TrUtf82(const char* s, const char* c);
|
||||
struct miqt_string QsciLexerEDIFACT_TrUtf83(const char* s, const char* c, int n);
|
||||
void QsciLexerEDIFACT_Delete(QsciLexerEDIFACT* self);
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern C */
|
||||
#endif
|
||||
|
||||
#endif
|
107
qt-restricted-extras/qscintilla/gen_qscilexerfortran.cpp
Normal file
107
qt-restricted-extras/qscintilla/gen_qscilexerfortran.cpp
Normal file
@ -0,0 +1,107 @@
|
||||
#include <QMetaObject>
|
||||
#include <QObject>
|
||||
#include <QString>
|
||||
#include <QByteArray>
|
||||
#include <cstring>
|
||||
#include <qscilexerfortran.h>
|
||||
#include "gen_qscilexerfortran.h"
|
||||
#include "_cgo_export.h"
|
||||
|
||||
QsciLexerFortran* QsciLexerFortran_new() {
|
||||
return new QsciLexerFortran();
|
||||
}
|
||||
|
||||
QsciLexerFortran* QsciLexerFortran_new2(QObject* parent) {
|
||||
return new QsciLexerFortran(parent);
|
||||
}
|
||||
|
||||
QMetaObject* QsciLexerFortran_MetaObject(const QsciLexerFortran* self) {
|
||||
return (QMetaObject*) self->metaObject();
|
||||
}
|
||||
|
||||
void* QsciLexerFortran_Metacast(QsciLexerFortran* self, const char* param1) {
|
||||
return self->qt_metacast(param1);
|
||||
}
|
||||
|
||||
struct miqt_string QsciLexerFortran_Tr(const char* s) {
|
||||
QString _ret = QsciLexerFortran::tr(s);
|
||||
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
||||
QByteArray _b = _ret.toUtf8();
|
||||
struct miqt_string _ms;
|
||||
_ms.len = _b.length();
|
||||
_ms.data = static_cast<char*>(malloc(_ms.len));
|
||||
memcpy(_ms.data, _b.data(), _ms.len);
|
||||
return _ms;
|
||||
}
|
||||
|
||||
struct miqt_string QsciLexerFortran_TrUtf8(const char* s) {
|
||||
QString _ret = QsciLexerFortran::trUtf8(s);
|
||||
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
||||
QByteArray _b = _ret.toUtf8();
|
||||
struct miqt_string _ms;
|
||||
_ms.len = _b.length();
|
||||
_ms.data = static_cast<char*>(malloc(_ms.len));
|
||||
memcpy(_ms.data, _b.data(), _ms.len);
|
||||
return _ms;
|
||||
}
|
||||
|
||||
const char* QsciLexerFortran_Language(const QsciLexerFortran* self) {
|
||||
return (const char*) self->language();
|
||||
}
|
||||
|
||||
const char* QsciLexerFortran_Lexer(const QsciLexerFortran* self) {
|
||||
return (const char*) self->lexer();
|
||||
}
|
||||
|
||||
const char* QsciLexerFortran_Keywords(const QsciLexerFortran* self, int set) {
|
||||
return (const char*) self->keywords(static_cast<int>(set));
|
||||
}
|
||||
|
||||
struct miqt_string QsciLexerFortran_Tr2(const char* s, const char* c) {
|
||||
QString _ret = QsciLexerFortran::tr(s, c);
|
||||
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
||||
QByteArray _b = _ret.toUtf8();
|
||||
struct miqt_string _ms;
|
||||
_ms.len = _b.length();
|
||||
_ms.data = static_cast<char*>(malloc(_ms.len));
|
||||
memcpy(_ms.data, _b.data(), _ms.len);
|
||||
return _ms;
|
||||
}
|
||||
|
||||
struct miqt_string QsciLexerFortran_Tr3(const char* s, const char* c, int n) {
|
||||
QString _ret = QsciLexerFortran::tr(s, c, static_cast<int>(n));
|
||||
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
||||
QByteArray _b = _ret.toUtf8();
|
||||
struct miqt_string _ms;
|
||||
_ms.len = _b.length();
|
||||
_ms.data = static_cast<char*>(malloc(_ms.len));
|
||||
memcpy(_ms.data, _b.data(), _ms.len);
|
||||
return _ms;
|
||||
}
|
||||
|
||||
struct miqt_string QsciLexerFortran_TrUtf82(const char* s, const char* c) {
|
||||
QString _ret = QsciLexerFortran::trUtf8(s, c);
|
||||
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
||||
QByteArray _b = _ret.toUtf8();
|
||||
struct miqt_string _ms;
|
||||
_ms.len = _b.length();
|
||||
_ms.data = static_cast<char*>(malloc(_ms.len));
|
||||
memcpy(_ms.data, _b.data(), _ms.len);
|
||||
return _ms;
|
||||
}
|
||||
|
||||
struct miqt_string QsciLexerFortran_TrUtf83(const char* s, const char* c, int n) {
|
||||
QString _ret = QsciLexerFortran::trUtf8(s, c, static_cast<int>(n));
|
||||
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
||||
QByteArray _b = _ret.toUtf8();
|
||||
struct miqt_string _ms;
|
||||
_ms.len = _b.length();
|
||||
_ms.data = static_cast<char*>(malloc(_ms.len));
|
||||
memcpy(_ms.data, _b.data(), _ms.len);
|
||||
return _ms;
|
||||
}
|
||||
|
||||
void QsciLexerFortran_Delete(QsciLexerFortran* self) {
|
||||
delete self;
|
||||
}
|
||||
|
158
qt-restricted-extras/qscintilla/gen_qscilexerfortran.go
Normal file
158
qt-restricted-extras/qscintilla/gen_qscilexerfortran.go
Normal file
@ -0,0 +1,158 @@
|
||||
package qscintilla
|
||||
|
||||
/*
|
||||
|
||||
#include "gen_qscilexerfortran.h"
|
||||
#include <stdlib.h>
|
||||
|
||||
*/
|
||||
import "C"
|
||||
|
||||
import (
|
||||
"github.com/mappu/miqt/qt"
|
||||
"runtime"
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
type QsciLexerFortran struct {
|
||||
h *C.QsciLexerFortran
|
||||
*QsciLexerFortran77
|
||||
}
|
||||
|
||||
func (this *QsciLexerFortran) cPointer() *C.QsciLexerFortran {
|
||||
if this == nil {
|
||||
return nil
|
||||
}
|
||||
return this.h
|
||||
}
|
||||
|
||||
func (this *QsciLexerFortran) UnsafePointer() unsafe.Pointer {
|
||||
if this == nil {
|
||||
return nil
|
||||
}
|
||||
return unsafe.Pointer(this.h)
|
||||
}
|
||||
|
||||
func newQsciLexerFortran(h *C.QsciLexerFortran) *QsciLexerFortran {
|
||||
if h == nil {
|
||||
return nil
|
||||
}
|
||||
return &QsciLexerFortran{h: h, QsciLexerFortran77: UnsafeNewQsciLexerFortran77(unsafe.Pointer(h))}
|
||||
}
|
||||
|
||||
func UnsafeNewQsciLexerFortran(h unsafe.Pointer) *QsciLexerFortran {
|
||||
return newQsciLexerFortran((*C.QsciLexerFortran)(h))
|
||||
}
|
||||
|
||||
// NewQsciLexerFortran constructs a new QsciLexerFortran object.
|
||||
func NewQsciLexerFortran() *QsciLexerFortran {
|
||||
ret := C.QsciLexerFortran_new()
|
||||
return newQsciLexerFortran(ret)
|
||||
}
|
||||
|
||||
// NewQsciLexerFortran2 constructs a new QsciLexerFortran object.
|
||||
func NewQsciLexerFortran2(parent *qt.QObject) *QsciLexerFortran {
|
||||
ret := C.QsciLexerFortran_new2((*C.QObject)(parent.UnsafePointer()))
|
||||
return newQsciLexerFortran(ret)
|
||||
}
|
||||
|
||||
func (this *QsciLexerFortran) MetaObject() *qt.QMetaObject {
|
||||
return qt.UnsafeNewQMetaObject(unsafe.Pointer(C.QsciLexerFortran_MetaObject(this.h)))
|
||||
}
|
||||
|
||||
func (this *QsciLexerFortran) Metacast(param1 string) unsafe.Pointer {
|
||||
param1_Cstring := C.CString(param1)
|
||||
defer C.free(unsafe.Pointer(param1_Cstring))
|
||||
return (unsafe.Pointer)(C.QsciLexerFortran_Metacast(this.h, param1_Cstring))
|
||||
}
|
||||
|
||||
func QsciLexerFortran_Tr(s string) string {
|
||||
s_Cstring := C.CString(s)
|
||||
defer C.free(unsafe.Pointer(s_Cstring))
|
||||
var _ms C.struct_miqt_string = C.QsciLexerFortran_Tr(s_Cstring)
|
||||
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
||||
C.free(unsafe.Pointer(_ms.data))
|
||||
return _ret
|
||||
}
|
||||
|
||||
func QsciLexerFortran_TrUtf8(s string) string {
|
||||
s_Cstring := C.CString(s)
|
||||
defer C.free(unsafe.Pointer(s_Cstring))
|
||||
var _ms C.struct_miqt_string = C.QsciLexerFortran_TrUtf8(s_Cstring)
|
||||
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
||||
C.free(unsafe.Pointer(_ms.data))
|
||||
return _ret
|
||||
}
|
||||
|
||||
func (this *QsciLexerFortran) Language() string {
|
||||
_ret := C.QsciLexerFortran_Language(this.h)
|
||||
return C.GoString(_ret)
|
||||
}
|
||||
|
||||
func (this *QsciLexerFortran) Lexer() string {
|
||||
_ret := C.QsciLexerFortran_Lexer(this.h)
|
||||
return C.GoString(_ret)
|
||||
}
|
||||
|
||||
func (this *QsciLexerFortran) Keywords(set int) string {
|
||||
_ret := C.QsciLexerFortran_Keywords(this.h, (C.int)(set))
|
||||
return C.GoString(_ret)
|
||||
}
|
||||
|
||||
func QsciLexerFortran_Tr2(s string, c string) string {
|
||||
s_Cstring := C.CString(s)
|
||||
defer C.free(unsafe.Pointer(s_Cstring))
|
||||
c_Cstring := C.CString(c)
|
||||
defer C.free(unsafe.Pointer(c_Cstring))
|
||||
var _ms C.struct_miqt_string = C.QsciLexerFortran_Tr2(s_Cstring, c_Cstring)
|
||||
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
||||
C.free(unsafe.Pointer(_ms.data))
|
||||
return _ret
|
||||
}
|
||||
|
||||
func QsciLexerFortran_Tr3(s string, c string, n int) string {
|
||||
s_Cstring := C.CString(s)
|
||||
defer C.free(unsafe.Pointer(s_Cstring))
|
||||
c_Cstring := C.CString(c)
|
||||
defer C.free(unsafe.Pointer(c_Cstring))
|
||||
var _ms C.struct_miqt_string = C.QsciLexerFortran_Tr3(s_Cstring, c_Cstring, (C.int)(n))
|
||||
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
||||
C.free(unsafe.Pointer(_ms.data))
|
||||
return _ret
|
||||
}
|
||||
|
||||
func QsciLexerFortran_TrUtf82(s string, c string) string {
|
||||
s_Cstring := C.CString(s)
|
||||
defer C.free(unsafe.Pointer(s_Cstring))
|
||||
c_Cstring := C.CString(c)
|
||||
defer C.free(unsafe.Pointer(c_Cstring))
|
||||
var _ms C.struct_miqt_string = C.QsciLexerFortran_TrUtf82(s_Cstring, c_Cstring)
|
||||
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
||||
C.free(unsafe.Pointer(_ms.data))
|
||||
return _ret
|
||||
}
|
||||
|
||||
func QsciLexerFortran_TrUtf83(s string, c string, n int) string {
|
||||
s_Cstring := C.CString(s)
|
||||
defer C.free(unsafe.Pointer(s_Cstring))
|
||||
c_Cstring := C.CString(c)
|
||||
defer C.free(unsafe.Pointer(c_Cstring))
|
||||
var _ms C.struct_miqt_string = C.QsciLexerFortran_TrUtf83(s_Cstring, c_Cstring, (C.int)(n))
|
||||
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
||||
C.free(unsafe.Pointer(_ms.data))
|
||||
return _ret
|
||||
}
|
||||
|
||||
// Delete this object from C++ memory.
|
||||
func (this *QsciLexerFortran) Delete() {
|
||||
C.QsciLexerFortran_Delete(this.h)
|
||||
}
|
||||
|
||||
// GoGC adds a Go Finalizer to this pointer, so that it will be deleted
|
||||
// from C++ memory once it is unreachable from Go memory.
|
||||
func (this *QsciLexerFortran) GoGC() {
|
||||
runtime.SetFinalizer(this, func(this *QsciLexerFortran) {
|
||||
this.Delete()
|
||||
runtime.KeepAlive(this.h)
|
||||
})
|
||||
}
|
45
qt-restricted-extras/qscintilla/gen_qscilexerfortran.h
Normal file
45
qt-restricted-extras/qscintilla/gen_qscilexerfortran.h
Normal file
@ -0,0 +1,45 @@
|
||||
#ifndef GEN_QSCILEXERFORTRAN_H
|
||||
#define GEN_QSCILEXERFORTRAN_H
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||
|
||||
#include "../../libmiqt/libmiqt.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
class QMetaObject;
|
||||
class QObject;
|
||||
class QsciLexerFortran;
|
||||
#else
|
||||
typedef struct QMetaObject QMetaObject;
|
||||
typedef struct QObject QObject;
|
||||
typedef struct QsciLexerFortran QsciLexerFortran;
|
||||
#endif
|
||||
|
||||
QsciLexerFortran* QsciLexerFortran_new();
|
||||
QsciLexerFortran* QsciLexerFortran_new2(QObject* parent);
|
||||
QMetaObject* QsciLexerFortran_MetaObject(const QsciLexerFortran* self);
|
||||
void* QsciLexerFortran_Metacast(QsciLexerFortran* self, const char* param1);
|
||||
struct miqt_string QsciLexerFortran_Tr(const char* s);
|
||||
struct miqt_string QsciLexerFortran_TrUtf8(const char* s);
|
||||
const char* QsciLexerFortran_Language(const QsciLexerFortran* self);
|
||||
const char* QsciLexerFortran_Lexer(const QsciLexerFortran* self);
|
||||
const char* QsciLexerFortran_Keywords(const QsciLexerFortran* self, int set);
|
||||
struct miqt_string QsciLexerFortran_Tr2(const char* s, const char* c);
|
||||
struct miqt_string QsciLexerFortran_Tr3(const char* s, const char* c, int n);
|
||||
struct miqt_string QsciLexerFortran_TrUtf82(const char* s, const char* c);
|
||||
struct miqt_string QsciLexerFortran_TrUtf83(const char* s, const char* c, int n);
|
||||
void QsciLexerFortran_Delete(QsciLexerFortran* self);
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern C */
|
||||
#endif
|
||||
|
||||
#endif
|
152
qt-restricted-extras/qscintilla/gen_qscilexerfortran77.cpp
Normal file
152
qt-restricted-extras/qscintilla/gen_qscilexerfortran77.cpp
Normal file
@ -0,0 +1,152 @@
|
||||
#include <QColor>
|
||||
#include <QFont>
|
||||
#include <QMetaObject>
|
||||
#include <QObject>
|
||||
#include <QString>
|
||||
#include <QByteArray>
|
||||
#include <cstring>
|
||||
#include <qscilexerfortran77.h>
|
||||
#include "gen_qscilexerfortran77.h"
|
||||
#include "_cgo_export.h"
|
||||
|
||||
QsciLexerFortran77* QsciLexerFortran77_new() {
|
||||
return new QsciLexerFortran77();
|
||||
}
|
||||
|
||||
QsciLexerFortran77* QsciLexerFortran77_new2(QObject* parent) {
|
||||
return new QsciLexerFortran77(parent);
|
||||
}
|
||||
|
||||
QMetaObject* QsciLexerFortran77_MetaObject(const QsciLexerFortran77* self) {
|
||||
return (QMetaObject*) self->metaObject();
|
||||
}
|
||||
|
||||
void* QsciLexerFortran77_Metacast(QsciLexerFortran77* self, const char* param1) {
|
||||
return self->qt_metacast(param1);
|
||||
}
|
||||
|
||||
struct miqt_string QsciLexerFortran77_Tr(const char* s) {
|
||||
QString _ret = QsciLexerFortran77::tr(s);
|
||||
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
||||
QByteArray _b = _ret.toUtf8();
|
||||
struct miqt_string _ms;
|
||||
_ms.len = _b.length();
|
||||
_ms.data = static_cast<char*>(malloc(_ms.len));
|
||||
memcpy(_ms.data, _b.data(), _ms.len);
|
||||
return _ms;
|
||||
}
|
||||
|
||||
struct miqt_string QsciLexerFortran77_TrUtf8(const char* s) {
|
||||
QString _ret = QsciLexerFortran77::trUtf8(s);
|
||||
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
||||
QByteArray _b = _ret.toUtf8();
|
||||
struct miqt_string _ms;
|
||||
_ms.len = _b.length();
|
||||
_ms.data = static_cast<char*>(malloc(_ms.len));
|
||||
memcpy(_ms.data, _b.data(), _ms.len);
|
||||
return _ms;
|
||||
}
|
||||
|
||||
const char* QsciLexerFortran77_Language(const QsciLexerFortran77* self) {
|
||||
return (const char*) self->language();
|
||||
}
|
||||
|
||||
const char* QsciLexerFortran77_Lexer(const QsciLexerFortran77* self) {
|
||||
return (const char*) self->lexer();
|
||||
}
|
||||
|
||||
int QsciLexerFortran77_BraceStyle(const QsciLexerFortran77* self) {
|
||||
return self->braceStyle();
|
||||
}
|
||||
|
||||
QColor* QsciLexerFortran77_DefaultColor(const QsciLexerFortran77* self, int style) {
|
||||
return new QColor(self->defaultColor(static_cast<int>(style)));
|
||||
}
|
||||
|
||||
bool QsciLexerFortran77_DefaultEolFill(const QsciLexerFortran77* self, int style) {
|
||||
return self->defaultEolFill(static_cast<int>(style));
|
||||
}
|
||||
|
||||
QFont* QsciLexerFortran77_DefaultFont(const QsciLexerFortran77* self, int style) {
|
||||
return new QFont(self->defaultFont(static_cast<int>(style)));
|
||||
}
|
||||
|
||||
QColor* QsciLexerFortran77_DefaultPaper(const QsciLexerFortran77* self, int style) {
|
||||
return new QColor(self->defaultPaper(static_cast<int>(style)));
|
||||
}
|
||||
|
||||
const char* QsciLexerFortran77_Keywords(const QsciLexerFortran77* self, int set) {
|
||||
return (const char*) self->keywords(static_cast<int>(set));
|
||||
}
|
||||
|
||||
struct miqt_string QsciLexerFortran77_Description(const QsciLexerFortran77* self, int style) {
|
||||
QString _ret = self->description(static_cast<int>(style));
|
||||
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
||||
QByteArray _b = _ret.toUtf8();
|
||||
struct miqt_string _ms;
|
||||
_ms.len = _b.length();
|
||||
_ms.data = static_cast<char*>(malloc(_ms.len));
|
||||
memcpy(_ms.data, _b.data(), _ms.len);
|
||||
return _ms;
|
||||
}
|
||||
|
||||
void QsciLexerFortran77_RefreshProperties(QsciLexerFortran77* self) {
|
||||
self->refreshProperties();
|
||||
}
|
||||
|
||||
bool QsciLexerFortran77_FoldCompact(const QsciLexerFortran77* self) {
|
||||
return self->foldCompact();
|
||||
}
|
||||
|
||||
void QsciLexerFortran77_SetFoldCompact(QsciLexerFortran77* self, bool fold) {
|
||||
self->setFoldCompact(fold);
|
||||
}
|
||||
|
||||
struct miqt_string QsciLexerFortran77_Tr2(const char* s, const char* c) {
|
||||
QString _ret = QsciLexerFortran77::tr(s, c);
|
||||
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
||||
QByteArray _b = _ret.toUtf8();
|
||||
struct miqt_string _ms;
|
||||
_ms.len = _b.length();
|
||||
_ms.data = static_cast<char*>(malloc(_ms.len));
|
||||
memcpy(_ms.data, _b.data(), _ms.len);
|
||||
return _ms;
|
||||
}
|
||||
|
||||
struct miqt_string QsciLexerFortran77_Tr3(const char* s, const char* c, int n) {
|
||||
QString _ret = QsciLexerFortran77::tr(s, c, static_cast<int>(n));
|
||||
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
||||
QByteArray _b = _ret.toUtf8();
|
||||
struct miqt_string _ms;
|
||||
_ms.len = _b.length();
|
||||
_ms.data = static_cast<char*>(malloc(_ms.len));
|
||||
memcpy(_ms.data, _b.data(), _ms.len);
|
||||
return _ms;
|
||||
}
|
||||
|
||||
struct miqt_string QsciLexerFortran77_TrUtf82(const char* s, const char* c) {
|
||||
QString _ret = QsciLexerFortran77::trUtf8(s, c);
|
||||
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
||||
QByteArray _b = _ret.toUtf8();
|
||||
struct miqt_string _ms;
|
||||
_ms.len = _b.length();
|
||||
_ms.data = static_cast<char*>(malloc(_ms.len));
|
||||
memcpy(_ms.data, _b.data(), _ms.len);
|
||||
return _ms;
|
||||
}
|
||||
|
||||
struct miqt_string QsciLexerFortran77_TrUtf83(const char* s, const char* c, int n) {
|
||||
QString _ret = QsciLexerFortran77::trUtf8(s, c, static_cast<int>(n));
|
||||
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
||||
QByteArray _b = _ret.toUtf8();
|
||||
struct miqt_string _ms;
|
||||
_ms.len = _b.length();
|
||||
_ms.data = static_cast<char*>(malloc(_ms.len));
|
||||
memcpy(_ms.data, _b.data(), _ms.len);
|
||||
return _ms;
|
||||
}
|
||||
|
||||
void QsciLexerFortran77_Delete(QsciLexerFortran77* self) {
|
||||
delete self;
|
||||
}
|
||||
|
226
qt-restricted-extras/qscintilla/gen_qscilexerfortran77.go
Normal file
226
qt-restricted-extras/qscintilla/gen_qscilexerfortran77.go
Normal file
@ -0,0 +1,226 @@
|
||||
package qscintilla
|
||||
|
||||
/*
|
||||
|
||||
#include "gen_qscilexerfortran77.h"
|
||||
#include <stdlib.h>
|
||||
|
||||
*/
|
||||
import "C"
|
||||
|
||||
import (
|
||||
"github.com/mappu/miqt/qt"
|
||||
"runtime"
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
type QsciLexerFortran77__ int
|
||||
|
||||
const (
|
||||
QsciLexerFortran77__Default QsciLexerFortran77__ = 0
|
||||
QsciLexerFortran77__Comment QsciLexerFortran77__ = 1
|
||||
QsciLexerFortran77__Number QsciLexerFortran77__ = 2
|
||||
QsciLexerFortran77__SingleQuotedString QsciLexerFortran77__ = 3
|
||||
QsciLexerFortran77__DoubleQuotedString QsciLexerFortran77__ = 4
|
||||
QsciLexerFortran77__UnclosedString QsciLexerFortran77__ = 5
|
||||
QsciLexerFortran77__Operator QsciLexerFortran77__ = 6
|
||||
QsciLexerFortran77__Identifier QsciLexerFortran77__ = 7
|
||||
QsciLexerFortran77__Keyword QsciLexerFortran77__ = 8
|
||||
QsciLexerFortran77__IntrinsicFunction QsciLexerFortran77__ = 9
|
||||
QsciLexerFortran77__ExtendedFunction QsciLexerFortran77__ = 10
|
||||
QsciLexerFortran77__PreProcessor QsciLexerFortran77__ = 11
|
||||
QsciLexerFortran77__DottedOperator QsciLexerFortran77__ = 12
|
||||
QsciLexerFortran77__Label QsciLexerFortran77__ = 13
|
||||
QsciLexerFortran77__Continuation QsciLexerFortran77__ = 14
|
||||
)
|
||||
|
||||
type QsciLexerFortran77 struct {
|
||||
h *C.QsciLexerFortran77
|
||||
*QsciLexer
|
||||
}
|
||||
|
||||
func (this *QsciLexerFortran77) cPointer() *C.QsciLexerFortran77 {
|
||||
if this == nil {
|
||||
return nil
|
||||
}
|
||||
return this.h
|
||||
}
|
||||
|
||||
func (this *QsciLexerFortran77) UnsafePointer() unsafe.Pointer {
|
||||
if this == nil {
|
||||
return nil
|
||||
}
|
||||
return unsafe.Pointer(this.h)
|
||||
}
|
||||
|
||||
func newQsciLexerFortran77(h *C.QsciLexerFortran77) *QsciLexerFortran77 {
|
||||
if h == nil {
|
||||
return nil
|
||||
}
|
||||
return &QsciLexerFortran77{h: h, QsciLexer: UnsafeNewQsciLexer(unsafe.Pointer(h))}
|
||||
}
|
||||
|
||||
func UnsafeNewQsciLexerFortran77(h unsafe.Pointer) *QsciLexerFortran77 {
|
||||
return newQsciLexerFortran77((*C.QsciLexerFortran77)(h))
|
||||
}
|
||||
|
||||
// NewQsciLexerFortran77 constructs a new QsciLexerFortran77 object.
|
||||
func NewQsciLexerFortran77() *QsciLexerFortran77 {
|
||||
ret := C.QsciLexerFortran77_new()
|
||||
return newQsciLexerFortran77(ret)
|
||||
}
|
||||
|
||||
// NewQsciLexerFortran772 constructs a new QsciLexerFortran77 object.
|
||||
func NewQsciLexerFortran772(parent *qt.QObject) *QsciLexerFortran77 {
|
||||
ret := C.QsciLexerFortran77_new2((*C.QObject)(parent.UnsafePointer()))
|
||||
return newQsciLexerFortran77(ret)
|
||||
}
|
||||
|
||||
func (this *QsciLexerFortran77) MetaObject() *qt.QMetaObject {
|
||||
return qt.UnsafeNewQMetaObject(unsafe.Pointer(C.QsciLexerFortran77_MetaObject(this.h)))
|
||||
}
|
||||
|
||||
func (this *QsciLexerFortran77) Metacast(param1 string) unsafe.Pointer {
|
||||
param1_Cstring := C.CString(param1)
|
||||
defer C.free(unsafe.Pointer(param1_Cstring))
|
||||
return (unsafe.Pointer)(C.QsciLexerFortran77_Metacast(this.h, param1_Cstring))
|
||||
}
|
||||
|
||||
func QsciLexerFortran77_Tr(s string) string {
|
||||
s_Cstring := C.CString(s)
|
||||
defer C.free(unsafe.Pointer(s_Cstring))
|
||||
var _ms C.struct_miqt_string = C.QsciLexerFortran77_Tr(s_Cstring)
|
||||
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
||||
C.free(unsafe.Pointer(_ms.data))
|
||||
return _ret
|
||||
}
|
||||
|
||||
func QsciLexerFortran77_TrUtf8(s string) string {
|
||||
s_Cstring := C.CString(s)
|
||||
defer C.free(unsafe.Pointer(s_Cstring))
|
||||
var _ms C.struct_miqt_string = C.QsciLexerFortran77_TrUtf8(s_Cstring)
|
||||
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
||||
C.free(unsafe.Pointer(_ms.data))
|
||||
return _ret
|
||||
}
|
||||
|
||||
func (this *QsciLexerFortran77) Language() string {
|
||||
_ret := C.QsciLexerFortran77_Language(this.h)
|
||||
return C.GoString(_ret)
|
||||
}
|
||||
|
||||
func (this *QsciLexerFortran77) Lexer() string {
|
||||
_ret := C.QsciLexerFortran77_Lexer(this.h)
|
||||
return C.GoString(_ret)
|
||||
}
|
||||
|
||||
func (this *QsciLexerFortran77) BraceStyle() int {
|
||||
return (int)(C.QsciLexerFortran77_BraceStyle(this.h))
|
||||
}
|
||||
|
||||
func (this *QsciLexerFortran77) DefaultColor(style int) *qt.QColor {
|
||||
_ret := C.QsciLexerFortran77_DefaultColor(this.h, (C.int)(style))
|
||||
_goptr := qt.UnsafeNewQColor(unsafe.Pointer(_ret))
|
||||
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
|
||||
return _goptr
|
||||
}
|
||||
|
||||
func (this *QsciLexerFortran77) DefaultEolFill(style int) bool {
|
||||
return (bool)(C.QsciLexerFortran77_DefaultEolFill(this.h, (C.int)(style)))
|
||||
}
|
||||
|
||||
func (this *QsciLexerFortran77) DefaultFont(style int) *qt.QFont {
|
||||
_ret := C.QsciLexerFortran77_DefaultFont(this.h, (C.int)(style))
|
||||
_goptr := qt.UnsafeNewQFont(unsafe.Pointer(_ret))
|
||||
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
|
||||
return _goptr
|
||||
}
|
||||
|
||||
func (this *QsciLexerFortran77) DefaultPaper(style int) *qt.QColor {
|
||||
_ret := C.QsciLexerFortran77_DefaultPaper(this.h, (C.int)(style))
|
||||
_goptr := qt.UnsafeNewQColor(unsafe.Pointer(_ret))
|
||||
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
|
||||
return _goptr
|
||||
}
|
||||
|
||||
func (this *QsciLexerFortran77) Keywords(set int) string {
|
||||
_ret := C.QsciLexerFortran77_Keywords(this.h, (C.int)(set))
|
||||
return C.GoString(_ret)
|
||||
}
|
||||
|
||||
func (this *QsciLexerFortran77) Description(style int) string {
|
||||
var _ms C.struct_miqt_string = C.QsciLexerFortran77_Description(this.h, (C.int)(style))
|
||||
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
||||
C.free(unsafe.Pointer(_ms.data))
|
||||
return _ret
|
||||
}
|
||||
|
||||
func (this *QsciLexerFortran77) RefreshProperties() {
|
||||
C.QsciLexerFortran77_RefreshProperties(this.h)
|
||||
}
|
||||
|
||||
func (this *QsciLexerFortran77) FoldCompact() bool {
|
||||
return (bool)(C.QsciLexerFortran77_FoldCompact(this.h))
|
||||
}
|
||||
|
||||
func (this *QsciLexerFortran77) SetFoldCompact(fold bool) {
|
||||
C.QsciLexerFortran77_SetFoldCompact(this.h, (C.bool)(fold))
|
||||
}
|
||||
|
||||
func QsciLexerFortran77_Tr2(s string, c string) string {
|
||||
s_Cstring := C.CString(s)
|
||||
defer C.free(unsafe.Pointer(s_Cstring))
|
||||
c_Cstring := C.CString(c)
|
||||
defer C.free(unsafe.Pointer(c_Cstring))
|
||||
var _ms C.struct_miqt_string = C.QsciLexerFortran77_Tr2(s_Cstring, c_Cstring)
|
||||
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
||||
C.free(unsafe.Pointer(_ms.data))
|
||||
return _ret
|
||||
}
|
||||
|
||||
func QsciLexerFortran77_Tr3(s string, c string, n int) string {
|
||||
s_Cstring := C.CString(s)
|
||||
defer C.free(unsafe.Pointer(s_Cstring))
|
||||
c_Cstring := C.CString(c)
|
||||
defer C.free(unsafe.Pointer(c_Cstring))
|
||||
var _ms C.struct_miqt_string = C.QsciLexerFortran77_Tr3(s_Cstring, c_Cstring, (C.int)(n))
|
||||
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
||||
C.free(unsafe.Pointer(_ms.data))
|
||||
return _ret
|
||||
}
|
||||
|
||||
func QsciLexerFortran77_TrUtf82(s string, c string) string {
|
||||
s_Cstring := C.CString(s)
|
||||
defer C.free(unsafe.Pointer(s_Cstring))
|
||||
c_Cstring := C.CString(c)
|
||||
defer C.free(unsafe.Pointer(c_Cstring))
|
||||
var _ms C.struct_miqt_string = C.QsciLexerFortran77_TrUtf82(s_Cstring, c_Cstring)
|
||||
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
||||
C.free(unsafe.Pointer(_ms.data))
|
||||
return _ret
|
||||
}
|
||||
|
||||
func QsciLexerFortran77_TrUtf83(s string, c string, n int) string {
|
||||
s_Cstring := C.CString(s)
|
||||
defer C.free(unsafe.Pointer(s_Cstring))
|
||||
c_Cstring := C.CString(c)
|
||||
defer C.free(unsafe.Pointer(c_Cstring))
|
||||
var _ms C.struct_miqt_string = C.QsciLexerFortran77_TrUtf83(s_Cstring, c_Cstring, (C.int)(n))
|
||||
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
||||
C.free(unsafe.Pointer(_ms.data))
|
||||
return _ret
|
||||
}
|
||||
|
||||
// Delete this object from C++ memory.
|
||||
func (this *QsciLexerFortran77) Delete() {
|
||||
C.QsciLexerFortran77_Delete(this.h)
|
||||
}
|
||||
|
||||
// GoGC adds a Go Finalizer to this pointer, so that it will be deleted
|
||||
// from C++ memory once it is unreachable from Go memory.
|
||||
func (this *QsciLexerFortran77) GoGC() {
|
||||
runtime.SetFinalizer(this, func(this *QsciLexerFortran77) {
|
||||
this.Delete()
|
||||
runtime.KeepAlive(this.h)
|
||||
})
|
||||
}
|
58
qt-restricted-extras/qscintilla/gen_qscilexerfortran77.h
Normal file
58
qt-restricted-extras/qscintilla/gen_qscilexerfortran77.h
Normal file
@ -0,0 +1,58 @@
|
||||
#ifndef GEN_QSCILEXERFORTRAN77_H
|
||||
#define GEN_QSCILEXERFORTRAN77_H
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||
|
||||
#include "../../libmiqt/libmiqt.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
class QColor;
|
||||
class QFont;
|
||||
class QMetaObject;
|
||||
class QObject;
|
||||
class QsciLexerFortran77;
|
||||
#else
|
||||
typedef struct QColor QColor;
|
||||
typedef struct QFont QFont;
|
||||
typedef struct QMetaObject QMetaObject;
|
||||
typedef struct QObject QObject;
|
||||
typedef struct QsciLexerFortran77 QsciLexerFortran77;
|
||||
#endif
|
||||
|
||||
QsciLexerFortran77* QsciLexerFortran77_new();
|
||||
QsciLexerFortran77* QsciLexerFortran77_new2(QObject* parent);
|
||||
QMetaObject* QsciLexerFortran77_MetaObject(const QsciLexerFortran77* self);
|
||||
void* QsciLexerFortran77_Metacast(QsciLexerFortran77* self, const char* param1);
|
||||
struct miqt_string QsciLexerFortran77_Tr(const char* s);
|
||||
struct miqt_string QsciLexerFortran77_TrUtf8(const char* s);
|
||||
const char* QsciLexerFortran77_Language(const QsciLexerFortran77* self);
|
||||
const char* QsciLexerFortran77_Lexer(const QsciLexerFortran77* self);
|
||||
int QsciLexerFortran77_BraceStyle(const QsciLexerFortran77* self);
|
||||
QColor* QsciLexerFortran77_DefaultColor(const QsciLexerFortran77* self, int style);
|
||||
bool QsciLexerFortran77_DefaultEolFill(const QsciLexerFortran77* self, int style);
|
||||
QFont* QsciLexerFortran77_DefaultFont(const QsciLexerFortran77* self, int style);
|
||||
QColor* QsciLexerFortran77_DefaultPaper(const QsciLexerFortran77* self, int style);
|
||||
const char* QsciLexerFortran77_Keywords(const QsciLexerFortran77* self, int set);
|
||||
struct miqt_string QsciLexerFortran77_Description(const QsciLexerFortran77* self, int style);
|
||||
void QsciLexerFortran77_RefreshProperties(QsciLexerFortran77* self);
|
||||
bool QsciLexerFortran77_FoldCompact(const QsciLexerFortran77* self);
|
||||
void QsciLexerFortran77_SetFoldCompact(QsciLexerFortran77* self, bool fold);
|
||||
struct miqt_string QsciLexerFortran77_Tr2(const char* s, const char* c);
|
||||
struct miqt_string QsciLexerFortran77_Tr3(const char* s, const char* c, int n);
|
||||
struct miqt_string QsciLexerFortran77_TrUtf82(const char* s, const char* c);
|
||||
struct miqt_string QsciLexerFortran77_TrUtf83(const char* s, const char* c, int n);
|
||||
void QsciLexerFortran77_Delete(QsciLexerFortran77* self);
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern C */
|
||||
#endif
|
||||
|
||||
#endif
|
204
qt-restricted-extras/qscintilla/gen_qscilexerhtml.cpp
Normal file
204
qt-restricted-extras/qscintilla/gen_qscilexerhtml.cpp
Normal file
@ -0,0 +1,204 @@
|
||||
#include <QColor>
|
||||
#include <QFont>
|
||||
#include <QMetaObject>
|
||||
#include <QObject>
|
||||
#include <QString>
|
||||
#include <QByteArray>
|
||||
#include <cstring>
|
||||
#include <qscilexerhtml.h>
|
||||
#include "gen_qscilexerhtml.h"
|
||||
#include "_cgo_export.h"
|
||||
|
||||
QsciLexerHTML* QsciLexerHTML_new() {
|
||||
return new QsciLexerHTML();
|
||||
}
|
||||
|
||||
QsciLexerHTML* QsciLexerHTML_new2(QObject* parent) {
|
||||
return new QsciLexerHTML(parent);
|
||||
}
|
||||
|
||||
QMetaObject* QsciLexerHTML_MetaObject(const QsciLexerHTML* self) {
|
||||
return (QMetaObject*) self->metaObject();
|
||||
}
|
||||
|
||||
void* QsciLexerHTML_Metacast(QsciLexerHTML* self, const char* param1) {
|
||||
return self->qt_metacast(param1);
|
||||
}
|
||||
|
||||
struct miqt_string QsciLexerHTML_Tr(const char* s) {
|
||||
QString _ret = QsciLexerHTML::tr(s);
|
||||
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
||||
QByteArray _b = _ret.toUtf8();
|
||||
struct miqt_string _ms;
|
||||
_ms.len = _b.length();
|
||||
_ms.data = static_cast<char*>(malloc(_ms.len));
|
||||
memcpy(_ms.data, _b.data(), _ms.len);
|
||||
return _ms;
|
||||
}
|
||||
|
||||
struct miqt_string QsciLexerHTML_TrUtf8(const char* s) {
|
||||
QString _ret = QsciLexerHTML::trUtf8(s);
|
||||
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
||||
QByteArray _b = _ret.toUtf8();
|
||||
struct miqt_string _ms;
|
||||
_ms.len = _b.length();
|
||||
_ms.data = static_cast<char*>(malloc(_ms.len));
|
||||
memcpy(_ms.data, _b.data(), _ms.len);
|
||||
return _ms;
|
||||
}
|
||||
|
||||
const char* QsciLexerHTML_Language(const QsciLexerHTML* self) {
|
||||
return (const char*) self->language();
|
||||
}
|
||||
|
||||
const char* QsciLexerHTML_Lexer(const QsciLexerHTML* self) {
|
||||
return (const char*) self->lexer();
|
||||
}
|
||||
|
||||
const char* QsciLexerHTML_AutoCompletionFillups(const QsciLexerHTML* self) {
|
||||
return (const char*) self->autoCompletionFillups();
|
||||
}
|
||||
|
||||
const char* QsciLexerHTML_WordCharacters(const QsciLexerHTML* self) {
|
||||
return (const char*) self->wordCharacters();
|
||||
}
|
||||
|
||||
QColor* QsciLexerHTML_DefaultColor(const QsciLexerHTML* self, int style) {
|
||||
return new QColor(self->defaultColor(static_cast<int>(style)));
|
||||
}
|
||||
|
||||
bool QsciLexerHTML_DefaultEolFill(const QsciLexerHTML* self, int style) {
|
||||
return self->defaultEolFill(static_cast<int>(style));
|
||||
}
|
||||
|
||||
QFont* QsciLexerHTML_DefaultFont(const QsciLexerHTML* self, int style) {
|
||||
return new QFont(self->defaultFont(static_cast<int>(style)));
|
||||
}
|
||||
|
||||
QColor* QsciLexerHTML_DefaultPaper(const QsciLexerHTML* self, int style) {
|
||||
return new QColor(self->defaultPaper(static_cast<int>(style)));
|
||||
}
|
||||
|
||||
const char* QsciLexerHTML_Keywords(const QsciLexerHTML* self, int set) {
|
||||
return (const char*) self->keywords(static_cast<int>(set));
|
||||
}
|
||||
|
||||
struct miqt_string QsciLexerHTML_Description(const QsciLexerHTML* self, int style) {
|
||||
QString _ret = self->description(static_cast<int>(style));
|
||||
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
||||
QByteArray _b = _ret.toUtf8();
|
||||
struct miqt_string _ms;
|
||||
_ms.len = _b.length();
|
||||
_ms.data = static_cast<char*>(malloc(_ms.len));
|
||||
memcpy(_ms.data, _b.data(), _ms.len);
|
||||
return _ms;
|
||||
}
|
||||
|
||||
void QsciLexerHTML_RefreshProperties(QsciLexerHTML* self) {
|
||||
self->refreshProperties();
|
||||
}
|
||||
|
||||
bool QsciLexerHTML_CaseSensitiveTags(const QsciLexerHTML* self) {
|
||||
return self->caseSensitiveTags();
|
||||
}
|
||||
|
||||
void QsciLexerHTML_SetDjangoTemplates(QsciLexerHTML* self, bool enabled) {
|
||||
self->setDjangoTemplates(enabled);
|
||||
}
|
||||
|
||||
bool QsciLexerHTML_DjangoTemplates(const QsciLexerHTML* self) {
|
||||
return self->djangoTemplates();
|
||||
}
|
||||
|
||||
bool QsciLexerHTML_FoldCompact(const QsciLexerHTML* self) {
|
||||
return self->foldCompact();
|
||||
}
|
||||
|
||||
bool QsciLexerHTML_FoldPreprocessor(const QsciLexerHTML* self) {
|
||||
return self->foldPreprocessor();
|
||||
}
|
||||
|
||||
void QsciLexerHTML_SetFoldScriptComments(QsciLexerHTML* self, bool fold) {
|
||||
self->setFoldScriptComments(fold);
|
||||
}
|
||||
|
||||
bool QsciLexerHTML_FoldScriptComments(const QsciLexerHTML* self) {
|
||||
return self->foldScriptComments();
|
||||
}
|
||||
|
||||
void QsciLexerHTML_SetFoldScriptHeredocs(QsciLexerHTML* self, bool fold) {
|
||||
self->setFoldScriptHeredocs(fold);
|
||||
}
|
||||
|
||||
bool QsciLexerHTML_FoldScriptHeredocs(const QsciLexerHTML* self) {
|
||||
return self->foldScriptHeredocs();
|
||||
}
|
||||
|
||||
void QsciLexerHTML_SetMakoTemplates(QsciLexerHTML* self, bool enabled) {
|
||||
self->setMakoTemplates(enabled);
|
||||
}
|
||||
|
||||
bool QsciLexerHTML_MakoTemplates(const QsciLexerHTML* self) {
|
||||
return self->makoTemplates();
|
||||
}
|
||||
|
||||
void QsciLexerHTML_SetFoldCompact(QsciLexerHTML* self, bool fold) {
|
||||
self->setFoldCompact(fold);
|
||||
}
|
||||
|
||||
void QsciLexerHTML_SetFoldPreprocessor(QsciLexerHTML* self, bool fold) {
|
||||
self->setFoldPreprocessor(fold);
|
||||
}
|
||||
|
||||
void QsciLexerHTML_SetCaseSensitiveTags(QsciLexerHTML* self, bool sens) {
|
||||
self->setCaseSensitiveTags(sens);
|
||||
}
|
||||
|
||||
struct miqt_string QsciLexerHTML_Tr2(const char* s, const char* c) {
|
||||
QString _ret = QsciLexerHTML::tr(s, c);
|
||||
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
||||
QByteArray _b = _ret.toUtf8();
|
||||
struct miqt_string _ms;
|
||||
_ms.len = _b.length();
|
||||
_ms.data = static_cast<char*>(malloc(_ms.len));
|
||||
memcpy(_ms.data, _b.data(), _ms.len);
|
||||
return _ms;
|
||||
}
|
||||
|
||||
struct miqt_string QsciLexerHTML_Tr3(const char* s, const char* c, int n) {
|
||||
QString _ret = QsciLexerHTML::tr(s, c, static_cast<int>(n));
|
||||
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
||||
QByteArray _b = _ret.toUtf8();
|
||||
struct miqt_string _ms;
|
||||
_ms.len = _b.length();
|
||||
_ms.data = static_cast<char*>(malloc(_ms.len));
|
||||
memcpy(_ms.data, _b.data(), _ms.len);
|
||||
return _ms;
|
||||
}
|
||||
|
||||
struct miqt_string QsciLexerHTML_TrUtf82(const char* s, const char* c) {
|
||||
QString _ret = QsciLexerHTML::trUtf8(s, c);
|
||||
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
||||
QByteArray _b = _ret.toUtf8();
|
||||
struct miqt_string _ms;
|
||||
_ms.len = _b.length();
|
||||
_ms.data = static_cast<char*>(malloc(_ms.len));
|
||||
memcpy(_ms.data, _b.data(), _ms.len);
|
||||
return _ms;
|
||||
}
|
||||
|
||||
struct miqt_string QsciLexerHTML_TrUtf83(const char* s, const char* c, int n) {
|
||||
QString _ret = QsciLexerHTML::trUtf8(s, c, static_cast<int>(n));
|
||||
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
||||
QByteArray _b = _ret.toUtf8();
|
||||
struct miqt_string _ms;
|
||||
_ms.len = _b.length();
|
||||
_ms.data = static_cast<char*>(malloc(_ms.len));
|
||||
memcpy(_ms.data, _b.data(), _ms.len);
|
||||
return _ms;
|
||||
}
|
||||
|
||||
void QsciLexerHTML_Delete(QsciLexerHTML* self) {
|
||||
delete self;
|
||||
}
|
||||
|
375
qt-restricted-extras/qscintilla/gen_qscilexerhtml.go
Normal file
375
qt-restricted-extras/qscintilla/gen_qscilexerhtml.go
Normal file
@ -0,0 +1,375 @@
|
||||
package qscintilla
|
||||
|
||||
/*
|
||||
|
||||
#include "gen_qscilexerhtml.h"
|
||||
#include <stdlib.h>
|
||||
|
||||
*/
|
||||
import "C"
|
||||
|
||||
import (
|
||||
"github.com/mappu/miqt/qt"
|
||||
"runtime"
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
type QsciLexerHTML__ int
|
||||
|
||||
const (
|
||||
QsciLexerHTML__Default QsciLexerHTML__ = 0
|
||||
QsciLexerHTML__Tag QsciLexerHTML__ = 1
|
||||
QsciLexerHTML__UnknownTag QsciLexerHTML__ = 2
|
||||
QsciLexerHTML__Attribute QsciLexerHTML__ = 3
|
||||
QsciLexerHTML__UnknownAttribute QsciLexerHTML__ = 4
|
||||
QsciLexerHTML__HTMLNumber QsciLexerHTML__ = 5
|
||||
QsciLexerHTML__HTMLDoubleQuotedString QsciLexerHTML__ = 6
|
||||
QsciLexerHTML__HTMLSingleQuotedString QsciLexerHTML__ = 7
|
||||
QsciLexerHTML__OtherInTag QsciLexerHTML__ = 8
|
||||
QsciLexerHTML__HTMLComment QsciLexerHTML__ = 9
|
||||
QsciLexerHTML__Entity QsciLexerHTML__ = 10
|
||||
QsciLexerHTML__XMLTagEnd QsciLexerHTML__ = 11
|
||||
QsciLexerHTML__XMLStart QsciLexerHTML__ = 12
|
||||
QsciLexerHTML__XMLEnd QsciLexerHTML__ = 13
|
||||
QsciLexerHTML__Script QsciLexerHTML__ = 14
|
||||
QsciLexerHTML__ASPAtStart QsciLexerHTML__ = 15
|
||||
QsciLexerHTML__ASPStart QsciLexerHTML__ = 16
|
||||
QsciLexerHTML__CDATA QsciLexerHTML__ = 17
|
||||
QsciLexerHTML__PHPStart QsciLexerHTML__ = 18
|
||||
QsciLexerHTML__HTMLValue QsciLexerHTML__ = 19
|
||||
QsciLexerHTML__ASPXCComment QsciLexerHTML__ = 20
|
||||
QsciLexerHTML__SGMLDefault QsciLexerHTML__ = 21
|
||||
QsciLexerHTML__SGMLCommand QsciLexerHTML__ = 22
|
||||
QsciLexerHTML__SGMLParameter QsciLexerHTML__ = 23
|
||||
QsciLexerHTML__SGMLDoubleQuotedString QsciLexerHTML__ = 24
|
||||
QsciLexerHTML__SGMLSingleQuotedString QsciLexerHTML__ = 25
|
||||
QsciLexerHTML__SGMLError QsciLexerHTML__ = 26
|
||||
QsciLexerHTML__SGMLSpecial QsciLexerHTML__ = 27
|
||||
QsciLexerHTML__SGMLEntity QsciLexerHTML__ = 28
|
||||
QsciLexerHTML__SGMLComment QsciLexerHTML__ = 29
|
||||
QsciLexerHTML__SGMLParameterComment QsciLexerHTML__ = 30
|
||||
QsciLexerHTML__SGMLBlockDefault QsciLexerHTML__ = 31
|
||||
QsciLexerHTML__JavaScriptStart QsciLexerHTML__ = 40
|
||||
QsciLexerHTML__JavaScriptDefault QsciLexerHTML__ = 41
|
||||
QsciLexerHTML__JavaScriptComment QsciLexerHTML__ = 42
|
||||
QsciLexerHTML__JavaScriptCommentLine QsciLexerHTML__ = 43
|
||||
QsciLexerHTML__JavaScriptCommentDoc QsciLexerHTML__ = 44
|
||||
QsciLexerHTML__JavaScriptNumber QsciLexerHTML__ = 45
|
||||
QsciLexerHTML__JavaScriptWord QsciLexerHTML__ = 46
|
||||
QsciLexerHTML__JavaScriptKeyword QsciLexerHTML__ = 47
|
||||
QsciLexerHTML__JavaScriptDoubleQuotedString QsciLexerHTML__ = 48
|
||||
QsciLexerHTML__JavaScriptSingleQuotedString QsciLexerHTML__ = 49
|
||||
QsciLexerHTML__JavaScriptSymbol QsciLexerHTML__ = 50
|
||||
QsciLexerHTML__JavaScriptUnclosedString QsciLexerHTML__ = 51
|
||||
QsciLexerHTML__JavaScriptRegex QsciLexerHTML__ = 52
|
||||
QsciLexerHTML__ASPJavaScriptStart QsciLexerHTML__ = 55
|
||||
QsciLexerHTML__ASPJavaScriptDefault QsciLexerHTML__ = 56
|
||||
QsciLexerHTML__ASPJavaScriptComment QsciLexerHTML__ = 57
|
||||
QsciLexerHTML__ASPJavaScriptCommentLine QsciLexerHTML__ = 58
|
||||
QsciLexerHTML__ASPJavaScriptCommentDoc QsciLexerHTML__ = 59
|
||||
QsciLexerHTML__ASPJavaScriptNumber QsciLexerHTML__ = 60
|
||||
QsciLexerHTML__ASPJavaScriptWord QsciLexerHTML__ = 61
|
||||
QsciLexerHTML__ASPJavaScriptKeyword QsciLexerHTML__ = 62
|
||||
QsciLexerHTML__ASPJavaScriptDoubleQuotedString QsciLexerHTML__ = 63
|
||||
QsciLexerHTML__ASPJavaScriptSingleQuotedString QsciLexerHTML__ = 64
|
||||
QsciLexerHTML__ASPJavaScriptSymbol QsciLexerHTML__ = 65
|
||||
QsciLexerHTML__ASPJavaScriptUnclosedString QsciLexerHTML__ = 66
|
||||
QsciLexerHTML__ASPJavaScriptRegex QsciLexerHTML__ = 67
|
||||
QsciLexerHTML__VBScriptStart QsciLexerHTML__ = 70
|
||||
QsciLexerHTML__VBScriptDefault QsciLexerHTML__ = 71
|
||||
QsciLexerHTML__VBScriptComment QsciLexerHTML__ = 72
|
||||
QsciLexerHTML__VBScriptNumber QsciLexerHTML__ = 73
|
||||
QsciLexerHTML__VBScriptKeyword QsciLexerHTML__ = 74
|
||||
QsciLexerHTML__VBScriptString QsciLexerHTML__ = 75
|
||||
QsciLexerHTML__VBScriptIdentifier QsciLexerHTML__ = 76
|
||||
QsciLexerHTML__VBScriptUnclosedString QsciLexerHTML__ = 77
|
||||
QsciLexerHTML__ASPVBScriptStart QsciLexerHTML__ = 80
|
||||
QsciLexerHTML__ASPVBScriptDefault QsciLexerHTML__ = 81
|
||||
QsciLexerHTML__ASPVBScriptComment QsciLexerHTML__ = 82
|
||||
QsciLexerHTML__ASPVBScriptNumber QsciLexerHTML__ = 83
|
||||
QsciLexerHTML__ASPVBScriptKeyword QsciLexerHTML__ = 84
|
||||
QsciLexerHTML__ASPVBScriptString QsciLexerHTML__ = 85
|
||||
QsciLexerHTML__ASPVBScriptIdentifier QsciLexerHTML__ = 86
|
||||
QsciLexerHTML__ASPVBScriptUnclosedString QsciLexerHTML__ = 87
|
||||
QsciLexerHTML__PythonStart QsciLexerHTML__ = 90
|
||||
QsciLexerHTML__PythonDefault QsciLexerHTML__ = 91
|
||||
QsciLexerHTML__PythonComment QsciLexerHTML__ = 92
|
||||
QsciLexerHTML__PythonNumber QsciLexerHTML__ = 93
|
||||
QsciLexerHTML__PythonDoubleQuotedString QsciLexerHTML__ = 94
|
||||
QsciLexerHTML__PythonSingleQuotedString QsciLexerHTML__ = 95
|
||||
QsciLexerHTML__PythonKeyword QsciLexerHTML__ = 96
|
||||
QsciLexerHTML__PythonTripleSingleQuotedString QsciLexerHTML__ = 97
|
||||
QsciLexerHTML__PythonTripleDoubleQuotedString QsciLexerHTML__ = 98
|
||||
QsciLexerHTML__PythonClassName QsciLexerHTML__ = 99
|
||||
QsciLexerHTML__PythonFunctionMethodName QsciLexerHTML__ = 100
|
||||
QsciLexerHTML__PythonOperator QsciLexerHTML__ = 101
|
||||
QsciLexerHTML__PythonIdentifier QsciLexerHTML__ = 102
|
||||
QsciLexerHTML__ASPPythonStart QsciLexerHTML__ = 105
|
||||
QsciLexerHTML__ASPPythonDefault QsciLexerHTML__ = 106
|
||||
QsciLexerHTML__ASPPythonComment QsciLexerHTML__ = 107
|
||||
QsciLexerHTML__ASPPythonNumber QsciLexerHTML__ = 108
|
||||
QsciLexerHTML__ASPPythonDoubleQuotedString QsciLexerHTML__ = 109
|
||||
QsciLexerHTML__ASPPythonSingleQuotedString QsciLexerHTML__ = 110
|
||||
QsciLexerHTML__ASPPythonKeyword QsciLexerHTML__ = 111
|
||||
QsciLexerHTML__ASPPythonTripleSingleQuotedString QsciLexerHTML__ = 112
|
||||
QsciLexerHTML__ASPPythonTripleDoubleQuotedString QsciLexerHTML__ = 113
|
||||
QsciLexerHTML__ASPPythonClassName QsciLexerHTML__ = 114
|
||||
QsciLexerHTML__ASPPythonFunctionMethodName QsciLexerHTML__ = 115
|
||||
QsciLexerHTML__ASPPythonOperator QsciLexerHTML__ = 116
|
||||
QsciLexerHTML__ASPPythonIdentifier QsciLexerHTML__ = 117
|
||||
QsciLexerHTML__PHPDefault QsciLexerHTML__ = 118
|
||||
QsciLexerHTML__PHPDoubleQuotedString QsciLexerHTML__ = 119
|
||||
QsciLexerHTML__PHPSingleQuotedString QsciLexerHTML__ = 120
|
||||
QsciLexerHTML__PHPKeyword QsciLexerHTML__ = 121
|
||||
QsciLexerHTML__PHPNumber QsciLexerHTML__ = 122
|
||||
QsciLexerHTML__PHPVariable QsciLexerHTML__ = 123
|
||||
QsciLexerHTML__PHPComment QsciLexerHTML__ = 124
|
||||
QsciLexerHTML__PHPCommentLine QsciLexerHTML__ = 125
|
||||
QsciLexerHTML__PHPDoubleQuotedVariable QsciLexerHTML__ = 126
|
||||
QsciLexerHTML__PHPOperator QsciLexerHTML__ = 127
|
||||
)
|
||||
|
||||
type QsciLexerHTML struct {
|
||||
h *C.QsciLexerHTML
|
||||
*QsciLexer
|
||||
}
|
||||
|
||||
func (this *QsciLexerHTML) cPointer() *C.QsciLexerHTML {
|
||||
if this == nil {
|
||||
return nil
|
||||
}
|
||||
return this.h
|
||||
}
|
||||
|
||||
func (this *QsciLexerHTML) UnsafePointer() unsafe.Pointer {
|
||||
if this == nil {
|
||||
return nil
|
||||
}
|
||||
return unsafe.Pointer(this.h)
|
||||
}
|
||||
|
||||
func newQsciLexerHTML(h *C.QsciLexerHTML) *QsciLexerHTML {
|
||||
if h == nil {
|
||||
return nil
|
||||
}
|
||||
return &QsciLexerHTML{h: h, QsciLexer: UnsafeNewQsciLexer(unsafe.Pointer(h))}
|
||||
}
|
||||
|
||||
func UnsafeNewQsciLexerHTML(h unsafe.Pointer) *QsciLexerHTML {
|
||||
return newQsciLexerHTML((*C.QsciLexerHTML)(h))
|
||||
}
|
||||
|
||||
// NewQsciLexerHTML constructs a new QsciLexerHTML object.
|
||||
func NewQsciLexerHTML() *QsciLexerHTML {
|
||||
ret := C.QsciLexerHTML_new()
|
||||
return newQsciLexerHTML(ret)
|
||||
}
|
||||
|
||||
// NewQsciLexerHTML2 constructs a new QsciLexerHTML object.
|
||||
func NewQsciLexerHTML2(parent *qt.QObject) *QsciLexerHTML {
|
||||
ret := C.QsciLexerHTML_new2((*C.QObject)(parent.UnsafePointer()))
|
||||
return newQsciLexerHTML(ret)
|
||||
}
|
||||
|
||||
func (this *QsciLexerHTML) MetaObject() *qt.QMetaObject {
|
||||
return qt.UnsafeNewQMetaObject(unsafe.Pointer(C.QsciLexerHTML_MetaObject(this.h)))
|
||||
}
|
||||
|
||||
func (this *QsciLexerHTML) Metacast(param1 string) unsafe.Pointer {
|
||||
param1_Cstring := C.CString(param1)
|
||||
defer C.free(unsafe.Pointer(param1_Cstring))
|
||||
return (unsafe.Pointer)(C.QsciLexerHTML_Metacast(this.h, param1_Cstring))
|
||||
}
|
||||
|
||||
func QsciLexerHTML_Tr(s string) string {
|
||||
s_Cstring := C.CString(s)
|
||||
defer C.free(unsafe.Pointer(s_Cstring))
|
||||
var _ms C.struct_miqt_string = C.QsciLexerHTML_Tr(s_Cstring)
|
||||
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
||||
C.free(unsafe.Pointer(_ms.data))
|
||||
return _ret
|
||||
}
|
||||
|
||||
func QsciLexerHTML_TrUtf8(s string) string {
|
||||
s_Cstring := C.CString(s)
|
||||
defer C.free(unsafe.Pointer(s_Cstring))
|
||||
var _ms C.struct_miqt_string = C.QsciLexerHTML_TrUtf8(s_Cstring)
|
||||
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
||||
C.free(unsafe.Pointer(_ms.data))
|
||||
return _ret
|
||||
}
|
||||
|
||||
func (this *QsciLexerHTML) Language() string {
|
||||
_ret := C.QsciLexerHTML_Language(this.h)
|
||||
return C.GoString(_ret)
|
||||
}
|
||||
|
||||
func (this *QsciLexerHTML) Lexer() string {
|
||||
_ret := C.QsciLexerHTML_Lexer(this.h)
|
||||
return C.GoString(_ret)
|
||||
}
|
||||
|
||||
func (this *QsciLexerHTML) AutoCompletionFillups() string {
|
||||
_ret := C.QsciLexerHTML_AutoCompletionFillups(this.h)
|
||||
return C.GoString(_ret)
|
||||
}
|
||||
|
||||
func (this *QsciLexerHTML) WordCharacters() string {
|
||||
_ret := C.QsciLexerHTML_WordCharacters(this.h)
|
||||
return C.GoString(_ret)
|
||||
}
|
||||
|
||||
func (this *QsciLexerHTML) DefaultColor(style int) *qt.QColor {
|
||||
_ret := C.QsciLexerHTML_DefaultColor(this.h, (C.int)(style))
|
||||
_goptr := qt.UnsafeNewQColor(unsafe.Pointer(_ret))
|
||||
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
|
||||
return _goptr
|
||||
}
|
||||
|
||||
func (this *QsciLexerHTML) DefaultEolFill(style int) bool {
|
||||
return (bool)(C.QsciLexerHTML_DefaultEolFill(this.h, (C.int)(style)))
|
||||
}
|
||||
|
||||
func (this *QsciLexerHTML) DefaultFont(style int) *qt.QFont {
|
||||
_ret := C.QsciLexerHTML_DefaultFont(this.h, (C.int)(style))
|
||||
_goptr := qt.UnsafeNewQFont(unsafe.Pointer(_ret))
|
||||
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
|
||||
return _goptr
|
||||
}
|
||||
|
||||
func (this *QsciLexerHTML) DefaultPaper(style int) *qt.QColor {
|
||||
_ret := C.QsciLexerHTML_DefaultPaper(this.h, (C.int)(style))
|
||||
_goptr := qt.UnsafeNewQColor(unsafe.Pointer(_ret))
|
||||
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
|
||||
return _goptr
|
||||
}
|
||||
|
||||
func (this *QsciLexerHTML) Keywords(set int) string {
|
||||
_ret := C.QsciLexerHTML_Keywords(this.h, (C.int)(set))
|
||||
return C.GoString(_ret)
|
||||
}
|
||||
|
||||
func (this *QsciLexerHTML) Description(style int) string {
|
||||
var _ms C.struct_miqt_string = C.QsciLexerHTML_Description(this.h, (C.int)(style))
|
||||
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
||||
C.free(unsafe.Pointer(_ms.data))
|
||||
return _ret
|
||||
}
|
||||
|
||||
func (this *QsciLexerHTML) RefreshProperties() {
|
||||
C.QsciLexerHTML_RefreshProperties(this.h)
|
||||
}
|
||||
|
||||
func (this *QsciLexerHTML) CaseSensitiveTags() bool {
|
||||
return (bool)(C.QsciLexerHTML_CaseSensitiveTags(this.h))
|
||||
}
|
||||
|
||||
func (this *QsciLexerHTML) SetDjangoTemplates(enabled bool) {
|
||||
C.QsciLexerHTML_SetDjangoTemplates(this.h, (C.bool)(enabled))
|
||||
}
|
||||
|
||||
func (this *QsciLexerHTML) DjangoTemplates() bool {
|
||||
return (bool)(C.QsciLexerHTML_DjangoTemplates(this.h))
|
||||
}
|
||||
|
||||
func (this *QsciLexerHTML) FoldCompact() bool {
|
||||
return (bool)(C.QsciLexerHTML_FoldCompact(this.h))
|
||||
}
|
||||
|
||||
func (this *QsciLexerHTML) FoldPreprocessor() bool {
|
||||
return (bool)(C.QsciLexerHTML_FoldPreprocessor(this.h))
|
||||
}
|
||||
|
||||
func (this *QsciLexerHTML) SetFoldScriptComments(fold bool) {
|
||||
C.QsciLexerHTML_SetFoldScriptComments(this.h, (C.bool)(fold))
|
||||
}
|
||||
|
||||
func (this *QsciLexerHTML) FoldScriptComments() bool {
|
||||
return (bool)(C.QsciLexerHTML_FoldScriptComments(this.h))
|
||||
}
|
||||
|
||||
func (this *QsciLexerHTML) SetFoldScriptHeredocs(fold bool) {
|
||||
C.QsciLexerHTML_SetFoldScriptHeredocs(this.h, (C.bool)(fold))
|
||||
}
|
||||
|
||||
func (this *QsciLexerHTML) FoldScriptHeredocs() bool {
|
||||
return (bool)(C.QsciLexerHTML_FoldScriptHeredocs(this.h))
|
||||
}
|
||||
|
||||
func (this *QsciLexerHTML) SetMakoTemplates(enabled bool) {
|
||||
C.QsciLexerHTML_SetMakoTemplates(this.h, (C.bool)(enabled))
|
||||
}
|
||||
|
||||
func (this *QsciLexerHTML) MakoTemplates() bool {
|
||||
return (bool)(C.QsciLexerHTML_MakoTemplates(this.h))
|
||||
}
|
||||
|
||||
func (this *QsciLexerHTML) SetFoldCompact(fold bool) {
|
||||
C.QsciLexerHTML_SetFoldCompact(this.h, (C.bool)(fold))
|
||||
}
|
||||
|
||||
func (this *QsciLexerHTML) SetFoldPreprocessor(fold bool) {
|
||||
C.QsciLexerHTML_SetFoldPreprocessor(this.h, (C.bool)(fold))
|
||||
}
|
||||
|
||||
func (this *QsciLexerHTML) SetCaseSensitiveTags(sens bool) {
|
||||
C.QsciLexerHTML_SetCaseSensitiveTags(this.h, (C.bool)(sens))
|
||||
}
|
||||
|
||||
func QsciLexerHTML_Tr2(s string, c string) string {
|
||||
s_Cstring := C.CString(s)
|
||||
defer C.free(unsafe.Pointer(s_Cstring))
|
||||
c_Cstring := C.CString(c)
|
||||
defer C.free(unsafe.Pointer(c_Cstring))
|
||||
var _ms C.struct_miqt_string = C.QsciLexerHTML_Tr2(s_Cstring, c_Cstring)
|
||||
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
||||
C.free(unsafe.Pointer(_ms.data))
|
||||
return _ret
|
||||
}
|
||||
|
||||
func QsciLexerHTML_Tr3(s string, c string, n int) string {
|
||||
s_Cstring := C.CString(s)
|
||||
defer C.free(unsafe.Pointer(s_Cstring))
|
||||
c_Cstring := C.CString(c)
|
||||
defer C.free(unsafe.Pointer(c_Cstring))
|
||||
var _ms C.struct_miqt_string = C.QsciLexerHTML_Tr3(s_Cstring, c_Cstring, (C.int)(n))
|
||||
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
||||
C.free(unsafe.Pointer(_ms.data))
|
||||
return _ret
|
||||
}
|
||||
|
||||
func QsciLexerHTML_TrUtf82(s string, c string) string {
|
||||
s_Cstring := C.CString(s)
|
||||
defer C.free(unsafe.Pointer(s_Cstring))
|
||||
c_Cstring := C.CString(c)
|
||||
defer C.free(unsafe.Pointer(c_Cstring))
|
||||
var _ms C.struct_miqt_string = C.QsciLexerHTML_TrUtf82(s_Cstring, c_Cstring)
|
||||
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
||||
C.free(unsafe.Pointer(_ms.data))
|
||||
return _ret
|
||||
}
|
||||
|
||||
func QsciLexerHTML_TrUtf83(s string, c string, n int) string {
|
||||
s_Cstring := C.CString(s)
|
||||
defer C.free(unsafe.Pointer(s_Cstring))
|
||||
c_Cstring := C.CString(c)
|
||||
defer C.free(unsafe.Pointer(c_Cstring))
|
||||
var _ms C.struct_miqt_string = C.QsciLexerHTML_TrUtf83(s_Cstring, c_Cstring, (C.int)(n))
|
||||
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
||||
C.free(unsafe.Pointer(_ms.data))
|
||||
return _ret
|
||||
}
|
||||
|
||||
// Delete this object from C++ memory.
|
||||
func (this *QsciLexerHTML) Delete() {
|
||||
C.QsciLexerHTML_Delete(this.h)
|
||||
}
|
||||
|
||||
// GoGC adds a Go Finalizer to this pointer, so that it will be deleted
|
||||
// from C++ memory once it is unreachable from Go memory.
|
||||
func (this *QsciLexerHTML) GoGC() {
|
||||
runtime.SetFinalizer(this, func(this *QsciLexerHTML) {
|
||||
this.Delete()
|
||||
runtime.KeepAlive(this.h)
|
||||
})
|
||||
}
|
71
qt-restricted-extras/qscintilla/gen_qscilexerhtml.h
Normal file
71
qt-restricted-extras/qscintilla/gen_qscilexerhtml.h
Normal file
@ -0,0 +1,71 @@
|
||||
#ifndef GEN_QSCILEXERHTML_H
|
||||
#define GEN_QSCILEXERHTML_H
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||
|
||||
#include "../../libmiqt/libmiqt.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
class QColor;
|
||||
class QFont;
|
||||
class QMetaObject;
|
||||
class QObject;
|
||||
class QsciLexerHTML;
|
||||
#else
|
||||
typedef struct QColor QColor;
|
||||
typedef struct QFont QFont;
|
||||
typedef struct QMetaObject QMetaObject;
|
||||
typedef struct QObject QObject;
|
||||
typedef struct QsciLexerHTML QsciLexerHTML;
|
||||
#endif
|
||||
|
||||
QsciLexerHTML* QsciLexerHTML_new();
|
||||
QsciLexerHTML* QsciLexerHTML_new2(QObject* parent);
|
||||
QMetaObject* QsciLexerHTML_MetaObject(const QsciLexerHTML* self);
|
||||
void* QsciLexerHTML_Metacast(QsciLexerHTML* self, const char* param1);
|
||||
struct miqt_string QsciLexerHTML_Tr(const char* s);
|
||||
struct miqt_string QsciLexerHTML_TrUtf8(const char* s);
|
||||
const char* QsciLexerHTML_Language(const QsciLexerHTML* self);
|
||||
const char* QsciLexerHTML_Lexer(const QsciLexerHTML* self);
|
||||
const char* QsciLexerHTML_AutoCompletionFillups(const QsciLexerHTML* self);
|
||||
const char* QsciLexerHTML_WordCharacters(const QsciLexerHTML* self);
|
||||
QColor* QsciLexerHTML_DefaultColor(const QsciLexerHTML* self, int style);
|
||||
bool QsciLexerHTML_DefaultEolFill(const QsciLexerHTML* self, int style);
|
||||
QFont* QsciLexerHTML_DefaultFont(const QsciLexerHTML* self, int style);
|
||||
QColor* QsciLexerHTML_DefaultPaper(const QsciLexerHTML* self, int style);
|
||||
const char* QsciLexerHTML_Keywords(const QsciLexerHTML* self, int set);
|
||||
struct miqt_string QsciLexerHTML_Description(const QsciLexerHTML* self, int style);
|
||||
void QsciLexerHTML_RefreshProperties(QsciLexerHTML* self);
|
||||
bool QsciLexerHTML_CaseSensitiveTags(const QsciLexerHTML* self);
|
||||
void QsciLexerHTML_SetDjangoTemplates(QsciLexerHTML* self, bool enabled);
|
||||
bool QsciLexerHTML_DjangoTemplates(const QsciLexerHTML* self);
|
||||
bool QsciLexerHTML_FoldCompact(const QsciLexerHTML* self);
|
||||
bool QsciLexerHTML_FoldPreprocessor(const QsciLexerHTML* self);
|
||||
void QsciLexerHTML_SetFoldScriptComments(QsciLexerHTML* self, bool fold);
|
||||
bool QsciLexerHTML_FoldScriptComments(const QsciLexerHTML* self);
|
||||
void QsciLexerHTML_SetFoldScriptHeredocs(QsciLexerHTML* self, bool fold);
|
||||
bool QsciLexerHTML_FoldScriptHeredocs(const QsciLexerHTML* self);
|
||||
void QsciLexerHTML_SetMakoTemplates(QsciLexerHTML* self, bool enabled);
|
||||
bool QsciLexerHTML_MakoTemplates(const QsciLexerHTML* self);
|
||||
void QsciLexerHTML_SetFoldCompact(QsciLexerHTML* self, bool fold);
|
||||
void QsciLexerHTML_SetFoldPreprocessor(QsciLexerHTML* self, bool fold);
|
||||
void QsciLexerHTML_SetCaseSensitiveTags(QsciLexerHTML* self, bool sens);
|
||||
struct miqt_string QsciLexerHTML_Tr2(const char* s, const char* c);
|
||||
struct miqt_string QsciLexerHTML_Tr3(const char* s, const char* c, int n);
|
||||
struct miqt_string QsciLexerHTML_TrUtf82(const char* s, const char* c);
|
||||
struct miqt_string QsciLexerHTML_TrUtf83(const char* s, const char* c, int n);
|
||||
void QsciLexerHTML_Delete(QsciLexerHTML* self);
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern C */
|
||||
#endif
|
||||
|
||||
#endif
|
119
qt-restricted-extras/qscintilla/gen_qscilexeridl.cpp
Normal file
119
qt-restricted-extras/qscintilla/gen_qscilexeridl.cpp
Normal file
@ -0,0 +1,119 @@
|
||||
#include <QColor>
|
||||
#include <QMetaObject>
|
||||
#include <QObject>
|
||||
#include <QString>
|
||||
#include <QByteArray>
|
||||
#include <cstring>
|
||||
#include <qscilexeridl.h>
|
||||
#include "gen_qscilexeridl.h"
|
||||
#include "_cgo_export.h"
|
||||
|
||||
QsciLexerIDL* QsciLexerIDL_new() {
|
||||
return new QsciLexerIDL();
|
||||
}
|
||||
|
||||
QsciLexerIDL* QsciLexerIDL_new2(QObject* parent) {
|
||||
return new QsciLexerIDL(parent);
|
||||
}
|
||||
|
||||
QMetaObject* QsciLexerIDL_MetaObject(const QsciLexerIDL* self) {
|
||||
return (QMetaObject*) self->metaObject();
|
||||
}
|
||||
|
||||
void* QsciLexerIDL_Metacast(QsciLexerIDL* self, const char* param1) {
|
||||
return self->qt_metacast(param1);
|
||||
}
|
||||
|
||||
struct miqt_string QsciLexerIDL_Tr(const char* s) {
|
||||
QString _ret = QsciLexerIDL::tr(s);
|
||||
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
||||
QByteArray _b = _ret.toUtf8();
|
||||
struct miqt_string _ms;
|
||||
_ms.len = _b.length();
|
||||
_ms.data = static_cast<char*>(malloc(_ms.len));
|
||||
memcpy(_ms.data, _b.data(), _ms.len);
|
||||
return _ms;
|
||||
}
|
||||
|
||||
struct miqt_string QsciLexerIDL_TrUtf8(const char* s) {
|
||||
QString _ret = QsciLexerIDL::trUtf8(s);
|
||||
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
||||
QByteArray _b = _ret.toUtf8();
|
||||
struct miqt_string _ms;
|
||||
_ms.len = _b.length();
|
||||
_ms.data = static_cast<char*>(malloc(_ms.len));
|
||||
memcpy(_ms.data, _b.data(), _ms.len);
|
||||
return _ms;
|
||||
}
|
||||
|
||||
const char* QsciLexerIDL_Language(const QsciLexerIDL* self) {
|
||||
return (const char*) self->language();
|
||||
}
|
||||
|
||||
QColor* QsciLexerIDL_DefaultColor(const QsciLexerIDL* self, int style) {
|
||||
return new QColor(self->defaultColor(static_cast<int>(style)));
|
||||
}
|
||||
|
||||
const char* QsciLexerIDL_Keywords(const QsciLexerIDL* self, int set) {
|
||||
return (const char*) self->keywords(static_cast<int>(set));
|
||||
}
|
||||
|
||||
struct miqt_string QsciLexerIDL_Description(const QsciLexerIDL* self, int style) {
|
||||
QString _ret = self->description(static_cast<int>(style));
|
||||
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
||||
QByteArray _b = _ret.toUtf8();
|
||||
struct miqt_string _ms;
|
||||
_ms.len = _b.length();
|
||||
_ms.data = static_cast<char*>(malloc(_ms.len));
|
||||
memcpy(_ms.data, _b.data(), _ms.len);
|
||||
return _ms;
|
||||
}
|
||||
|
||||
struct miqt_string QsciLexerIDL_Tr2(const char* s, const char* c) {
|
||||
QString _ret = QsciLexerIDL::tr(s, c);
|
||||
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
||||
QByteArray _b = _ret.toUtf8();
|
||||
struct miqt_string _ms;
|
||||
_ms.len = _b.length();
|
||||
_ms.data = static_cast<char*>(malloc(_ms.len));
|
||||
memcpy(_ms.data, _b.data(), _ms.len);
|
||||
return _ms;
|
||||
}
|
||||
|
||||
struct miqt_string QsciLexerIDL_Tr3(const char* s, const char* c, int n) {
|
||||
QString _ret = QsciLexerIDL::tr(s, c, static_cast<int>(n));
|
||||
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
||||
QByteArray _b = _ret.toUtf8();
|
||||
struct miqt_string _ms;
|
||||
_ms.len = _b.length();
|
||||
_ms.data = static_cast<char*>(malloc(_ms.len));
|
||||
memcpy(_ms.data, _b.data(), _ms.len);
|
||||
return _ms;
|
||||
}
|
||||
|
||||
struct miqt_string QsciLexerIDL_TrUtf82(const char* s, const char* c) {
|
||||
QString _ret = QsciLexerIDL::trUtf8(s, c);
|
||||
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
||||
QByteArray _b = _ret.toUtf8();
|
||||
struct miqt_string _ms;
|
||||
_ms.len = _b.length();
|
||||
_ms.data = static_cast<char*>(malloc(_ms.len));
|
||||
memcpy(_ms.data, _b.data(), _ms.len);
|
||||
return _ms;
|
||||
}
|
||||
|
||||
struct miqt_string QsciLexerIDL_TrUtf83(const char* s, const char* c, int n) {
|
||||
QString _ret = QsciLexerIDL::trUtf8(s, c, static_cast<int>(n));
|
||||
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
||||
QByteArray _b = _ret.toUtf8();
|
||||
struct miqt_string _ms;
|
||||
_ms.len = _b.length();
|
||||
_ms.data = static_cast<char*>(malloc(_ms.len));
|
||||
memcpy(_ms.data, _b.data(), _ms.len);
|
||||
return _ms;
|
||||
}
|
||||
|
||||
void QsciLexerIDL_Delete(QsciLexerIDL* self) {
|
||||
delete self;
|
||||
}
|
||||
|
167
qt-restricted-extras/qscintilla/gen_qscilexeridl.go
Normal file
167
qt-restricted-extras/qscintilla/gen_qscilexeridl.go
Normal file
@ -0,0 +1,167 @@
|
||||
package qscintilla
|
||||
|
||||
/*
|
||||
|
||||
#include "gen_qscilexeridl.h"
|
||||
#include <stdlib.h>
|
||||
|
||||
*/
|
||||
import "C"
|
||||
|
||||
import (
|
||||
"github.com/mappu/miqt/qt"
|
||||
"runtime"
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
type QsciLexerIDL struct {
|
||||
h *C.QsciLexerIDL
|
||||
*QsciLexerCPP
|
||||
}
|
||||
|
||||
func (this *QsciLexerIDL) cPointer() *C.QsciLexerIDL {
|
||||
if this == nil {
|
||||
return nil
|
||||
}
|
||||
return this.h
|
||||
}
|
||||
|
||||
func (this *QsciLexerIDL) UnsafePointer() unsafe.Pointer {
|
||||
if this == nil {
|
||||
return nil
|
||||
}
|
||||
return unsafe.Pointer(this.h)
|
||||
}
|
||||
|
||||
func newQsciLexerIDL(h *C.QsciLexerIDL) *QsciLexerIDL {
|
||||
if h == nil {
|
||||
return nil
|
||||
}
|
||||
return &QsciLexerIDL{h: h, QsciLexerCPP: UnsafeNewQsciLexerCPP(unsafe.Pointer(h))}
|
||||
}
|
||||
|
||||
func UnsafeNewQsciLexerIDL(h unsafe.Pointer) *QsciLexerIDL {
|
||||
return newQsciLexerIDL((*C.QsciLexerIDL)(h))
|
||||
}
|
||||
|
||||
// NewQsciLexerIDL constructs a new QsciLexerIDL object.
|
||||
func NewQsciLexerIDL() *QsciLexerIDL {
|
||||
ret := C.QsciLexerIDL_new()
|
||||
return newQsciLexerIDL(ret)
|
||||
}
|
||||
|
||||
// NewQsciLexerIDL2 constructs a new QsciLexerIDL object.
|
||||
func NewQsciLexerIDL2(parent *qt.QObject) *QsciLexerIDL {
|
||||
ret := C.QsciLexerIDL_new2((*C.QObject)(parent.UnsafePointer()))
|
||||
return newQsciLexerIDL(ret)
|
||||
}
|
||||
|
||||
func (this *QsciLexerIDL) MetaObject() *qt.QMetaObject {
|
||||
return qt.UnsafeNewQMetaObject(unsafe.Pointer(C.QsciLexerIDL_MetaObject(this.h)))
|
||||
}
|
||||
|
||||
func (this *QsciLexerIDL) Metacast(param1 string) unsafe.Pointer {
|
||||
param1_Cstring := C.CString(param1)
|
||||
defer C.free(unsafe.Pointer(param1_Cstring))
|
||||
return (unsafe.Pointer)(C.QsciLexerIDL_Metacast(this.h, param1_Cstring))
|
||||
}
|
||||
|
||||
func QsciLexerIDL_Tr(s string) string {
|
||||
s_Cstring := C.CString(s)
|
||||
defer C.free(unsafe.Pointer(s_Cstring))
|
||||
var _ms C.struct_miqt_string = C.QsciLexerIDL_Tr(s_Cstring)
|
||||
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
||||
C.free(unsafe.Pointer(_ms.data))
|
||||
return _ret
|
||||
}
|
||||
|
||||
func QsciLexerIDL_TrUtf8(s string) string {
|
||||
s_Cstring := C.CString(s)
|
||||
defer C.free(unsafe.Pointer(s_Cstring))
|
||||
var _ms C.struct_miqt_string = C.QsciLexerIDL_TrUtf8(s_Cstring)
|
||||
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
||||
C.free(unsafe.Pointer(_ms.data))
|
||||
return _ret
|
||||
}
|
||||
|
||||
func (this *QsciLexerIDL) Language() string {
|
||||
_ret := C.QsciLexerIDL_Language(this.h)
|
||||
return C.GoString(_ret)
|
||||
}
|
||||
|
||||
func (this *QsciLexerIDL) DefaultColor(style int) *qt.QColor {
|
||||
_ret := C.QsciLexerIDL_DefaultColor(this.h, (C.int)(style))
|
||||
_goptr := qt.UnsafeNewQColor(unsafe.Pointer(_ret))
|
||||
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
|
||||
return _goptr
|
||||
}
|
||||
|
||||
func (this *QsciLexerIDL) Keywords(set int) string {
|
||||
_ret := C.QsciLexerIDL_Keywords(this.h, (C.int)(set))
|
||||
return C.GoString(_ret)
|
||||
}
|
||||
|
||||
func (this *QsciLexerIDL) Description(style int) string {
|
||||
var _ms C.struct_miqt_string = C.QsciLexerIDL_Description(this.h, (C.int)(style))
|
||||
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
||||
C.free(unsafe.Pointer(_ms.data))
|
||||
return _ret
|
||||
}
|
||||
|
||||
func QsciLexerIDL_Tr2(s string, c string) string {
|
||||
s_Cstring := C.CString(s)
|
||||
defer C.free(unsafe.Pointer(s_Cstring))
|
||||
c_Cstring := C.CString(c)
|
||||
defer C.free(unsafe.Pointer(c_Cstring))
|
||||
var _ms C.struct_miqt_string = C.QsciLexerIDL_Tr2(s_Cstring, c_Cstring)
|
||||
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
||||
C.free(unsafe.Pointer(_ms.data))
|
||||
return _ret
|
||||
}
|
||||
|
||||
func QsciLexerIDL_Tr3(s string, c string, n int) string {
|
||||
s_Cstring := C.CString(s)
|
||||
defer C.free(unsafe.Pointer(s_Cstring))
|
||||
c_Cstring := C.CString(c)
|
||||
defer C.free(unsafe.Pointer(c_Cstring))
|
||||
var _ms C.struct_miqt_string = C.QsciLexerIDL_Tr3(s_Cstring, c_Cstring, (C.int)(n))
|
||||
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
||||
C.free(unsafe.Pointer(_ms.data))
|
||||
return _ret
|
||||
}
|
||||
|
||||
func QsciLexerIDL_TrUtf82(s string, c string) string {
|
||||
s_Cstring := C.CString(s)
|
||||
defer C.free(unsafe.Pointer(s_Cstring))
|
||||
c_Cstring := C.CString(c)
|
||||
defer C.free(unsafe.Pointer(c_Cstring))
|
||||
var _ms C.struct_miqt_string = C.QsciLexerIDL_TrUtf82(s_Cstring, c_Cstring)
|
||||
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
||||
C.free(unsafe.Pointer(_ms.data))
|
||||
return _ret
|
||||
}
|
||||
|
||||
func QsciLexerIDL_TrUtf83(s string, c string, n int) string {
|
||||
s_Cstring := C.CString(s)
|
||||
defer C.free(unsafe.Pointer(s_Cstring))
|
||||
c_Cstring := C.CString(c)
|
||||
defer C.free(unsafe.Pointer(c_Cstring))
|
||||
var _ms C.struct_miqt_string = C.QsciLexerIDL_TrUtf83(s_Cstring, c_Cstring, (C.int)(n))
|
||||
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
||||
C.free(unsafe.Pointer(_ms.data))
|
||||
return _ret
|
||||
}
|
||||
|
||||
// Delete this object from C++ memory.
|
||||
func (this *QsciLexerIDL) Delete() {
|
||||
C.QsciLexerIDL_Delete(this.h)
|
||||
}
|
||||
|
||||
// GoGC adds a Go Finalizer to this pointer, so that it will be deleted
|
||||
// from C++ memory once it is unreachable from Go memory.
|
||||
func (this *QsciLexerIDL) GoGC() {
|
||||
runtime.SetFinalizer(this, func(this *QsciLexerIDL) {
|
||||
this.Delete()
|
||||
runtime.KeepAlive(this.h)
|
||||
})
|
||||
}
|
48
qt-restricted-extras/qscintilla/gen_qscilexeridl.h
Normal file
48
qt-restricted-extras/qscintilla/gen_qscilexeridl.h
Normal file
@ -0,0 +1,48 @@
|
||||
#ifndef GEN_QSCILEXERIDL_H
|
||||
#define GEN_QSCILEXERIDL_H
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||
|
||||
#include "../../libmiqt/libmiqt.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
class QColor;
|
||||
class QMetaObject;
|
||||
class QObject;
|
||||
class QsciLexerIDL;
|
||||
#else
|
||||
typedef struct QColor QColor;
|
||||
typedef struct QMetaObject QMetaObject;
|
||||
typedef struct QObject QObject;
|
||||
typedef struct QsciLexerIDL QsciLexerIDL;
|
||||
#endif
|
||||
|
||||
QsciLexerIDL* QsciLexerIDL_new();
|
||||
QsciLexerIDL* QsciLexerIDL_new2(QObject* parent);
|
||||
QMetaObject* QsciLexerIDL_MetaObject(const QsciLexerIDL* self);
|
||||
void* QsciLexerIDL_Metacast(QsciLexerIDL* self, const char* param1);
|
||||
struct miqt_string QsciLexerIDL_Tr(const char* s);
|
||||
struct miqt_string QsciLexerIDL_TrUtf8(const char* s);
|
||||
const char* QsciLexerIDL_Language(const QsciLexerIDL* self);
|
||||
QColor* QsciLexerIDL_DefaultColor(const QsciLexerIDL* self, int style);
|
||||
const char* QsciLexerIDL_Keywords(const QsciLexerIDL* self, int set);
|
||||
struct miqt_string QsciLexerIDL_Description(const QsciLexerIDL* self, int style);
|
||||
struct miqt_string QsciLexerIDL_Tr2(const char* s, const char* c);
|
||||
struct miqt_string QsciLexerIDL_Tr3(const char* s, const char* c, int n);
|
||||
struct miqt_string QsciLexerIDL_TrUtf82(const char* s, const char* c);
|
||||
struct miqt_string QsciLexerIDL_TrUtf83(const char* s, const char* c, int n);
|
||||
void QsciLexerIDL_Delete(QsciLexerIDL* self);
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern C */
|
||||
#endif
|
||||
|
||||
#endif
|
103
qt-restricted-extras/qscintilla/gen_qscilexerjava.cpp
Normal file
103
qt-restricted-extras/qscintilla/gen_qscilexerjava.cpp
Normal file
@ -0,0 +1,103 @@
|
||||
#include <QMetaObject>
|
||||
#include <QObject>
|
||||
#include <QString>
|
||||
#include <QByteArray>
|
||||
#include <cstring>
|
||||
#include <qscilexerjava.h>
|
||||
#include "gen_qscilexerjava.h"
|
||||
#include "_cgo_export.h"
|
||||
|
||||
QsciLexerJava* QsciLexerJava_new() {
|
||||
return new QsciLexerJava();
|
||||
}
|
||||
|
||||
QsciLexerJava* QsciLexerJava_new2(QObject* parent) {
|
||||
return new QsciLexerJava(parent);
|
||||
}
|
||||
|
||||
QMetaObject* QsciLexerJava_MetaObject(const QsciLexerJava* self) {
|
||||
return (QMetaObject*) self->metaObject();
|
||||
}
|
||||
|
||||
void* QsciLexerJava_Metacast(QsciLexerJava* self, const char* param1) {
|
||||
return self->qt_metacast(param1);
|
||||
}
|
||||
|
||||
struct miqt_string QsciLexerJava_Tr(const char* s) {
|
||||
QString _ret = QsciLexerJava::tr(s);
|
||||
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
||||
QByteArray _b = _ret.toUtf8();
|
||||
struct miqt_string _ms;
|
||||
_ms.len = _b.length();
|
||||
_ms.data = static_cast<char*>(malloc(_ms.len));
|
||||
memcpy(_ms.data, _b.data(), _ms.len);
|
||||
return _ms;
|
||||
}
|
||||
|
||||
struct miqt_string QsciLexerJava_TrUtf8(const char* s) {
|
||||
QString _ret = QsciLexerJava::trUtf8(s);
|
||||
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
||||
QByteArray _b = _ret.toUtf8();
|
||||
struct miqt_string _ms;
|
||||
_ms.len = _b.length();
|
||||
_ms.data = static_cast<char*>(malloc(_ms.len));
|
||||
memcpy(_ms.data, _b.data(), _ms.len);
|
||||
return _ms;
|
||||
}
|
||||
|
||||
const char* QsciLexerJava_Language(const QsciLexerJava* self) {
|
||||
return (const char*) self->language();
|
||||
}
|
||||
|
||||
const char* QsciLexerJava_Keywords(const QsciLexerJava* self, int set) {
|
||||
return (const char*) self->keywords(static_cast<int>(set));
|
||||
}
|
||||
|
||||
struct miqt_string QsciLexerJava_Tr2(const char* s, const char* c) {
|
||||
QString _ret = QsciLexerJava::tr(s, c);
|
||||
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
||||
QByteArray _b = _ret.toUtf8();
|
||||
struct miqt_string _ms;
|
||||
_ms.len = _b.length();
|
||||
_ms.data = static_cast<char*>(malloc(_ms.len));
|
||||
memcpy(_ms.data, _b.data(), _ms.len);
|
||||
return _ms;
|
||||
}
|
||||
|
||||
struct miqt_string QsciLexerJava_Tr3(const char* s, const char* c, int n) {
|
||||
QString _ret = QsciLexerJava::tr(s, c, static_cast<int>(n));
|
||||
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
||||
QByteArray _b = _ret.toUtf8();
|
||||
struct miqt_string _ms;
|
||||
_ms.len = _b.length();
|
||||
_ms.data = static_cast<char*>(malloc(_ms.len));
|
||||
memcpy(_ms.data, _b.data(), _ms.len);
|
||||
return _ms;
|
||||
}
|
||||
|
||||
struct miqt_string QsciLexerJava_TrUtf82(const char* s, const char* c) {
|
||||
QString _ret = QsciLexerJava::trUtf8(s, c);
|
||||
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
||||
QByteArray _b = _ret.toUtf8();
|
||||
struct miqt_string _ms;
|
||||
_ms.len = _b.length();
|
||||
_ms.data = static_cast<char*>(malloc(_ms.len));
|
||||
memcpy(_ms.data, _b.data(), _ms.len);
|
||||
return _ms;
|
||||
}
|
||||
|
||||
struct miqt_string QsciLexerJava_TrUtf83(const char* s, const char* c, int n) {
|
||||
QString _ret = QsciLexerJava::trUtf8(s, c, static_cast<int>(n));
|
||||
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
||||
QByteArray _b = _ret.toUtf8();
|
||||
struct miqt_string _ms;
|
||||
_ms.len = _b.length();
|
||||
_ms.data = static_cast<char*>(malloc(_ms.len));
|
||||
memcpy(_ms.data, _b.data(), _ms.len);
|
||||
return _ms;
|
||||
}
|
||||
|
||||
void QsciLexerJava_Delete(QsciLexerJava* self) {
|
||||
delete self;
|
||||
}
|
||||
|
153
qt-restricted-extras/qscintilla/gen_qscilexerjava.go
Normal file
153
qt-restricted-extras/qscintilla/gen_qscilexerjava.go
Normal file
@ -0,0 +1,153 @@
|
||||
package qscintilla
|
||||
|
||||
/*
|
||||
|
||||
#include "gen_qscilexerjava.h"
|
||||
#include <stdlib.h>
|
||||
|
||||
*/
|
||||
import "C"
|
||||
|
||||
import (
|
||||
"github.com/mappu/miqt/qt"
|
||||
"runtime"
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
type QsciLexerJava struct {
|
||||
h *C.QsciLexerJava
|
||||
*QsciLexerCPP
|
||||
}
|
||||
|
||||
func (this *QsciLexerJava) cPointer() *C.QsciLexerJava {
|
||||
if this == nil {
|
||||
return nil
|
||||
}
|
||||
return this.h
|
||||
}
|
||||
|
||||
func (this *QsciLexerJava) UnsafePointer() unsafe.Pointer {
|
||||
if this == nil {
|
||||
return nil
|
||||
}
|
||||
return unsafe.Pointer(this.h)
|
||||
}
|
||||
|
||||
func newQsciLexerJava(h *C.QsciLexerJava) *QsciLexerJava {
|
||||
if h == nil {
|
||||
return nil
|
||||
}
|
||||
return &QsciLexerJava{h: h, QsciLexerCPP: UnsafeNewQsciLexerCPP(unsafe.Pointer(h))}
|
||||
}
|
||||
|
||||
func UnsafeNewQsciLexerJava(h unsafe.Pointer) *QsciLexerJava {
|
||||
return newQsciLexerJava((*C.QsciLexerJava)(h))
|
||||
}
|
||||
|
||||
// NewQsciLexerJava constructs a new QsciLexerJava object.
|
||||
func NewQsciLexerJava() *QsciLexerJava {
|
||||
ret := C.QsciLexerJava_new()
|
||||
return newQsciLexerJava(ret)
|
||||
}
|
||||
|
||||
// NewQsciLexerJava2 constructs a new QsciLexerJava object.
|
||||
func NewQsciLexerJava2(parent *qt.QObject) *QsciLexerJava {
|
||||
ret := C.QsciLexerJava_new2((*C.QObject)(parent.UnsafePointer()))
|
||||
return newQsciLexerJava(ret)
|
||||
}
|
||||
|
||||
func (this *QsciLexerJava) MetaObject() *qt.QMetaObject {
|
||||
return qt.UnsafeNewQMetaObject(unsafe.Pointer(C.QsciLexerJava_MetaObject(this.h)))
|
||||
}
|
||||
|
||||
func (this *QsciLexerJava) Metacast(param1 string) unsafe.Pointer {
|
||||
param1_Cstring := C.CString(param1)
|
||||
defer C.free(unsafe.Pointer(param1_Cstring))
|
||||
return (unsafe.Pointer)(C.QsciLexerJava_Metacast(this.h, param1_Cstring))
|
||||
}
|
||||
|
||||
func QsciLexerJava_Tr(s string) string {
|
||||
s_Cstring := C.CString(s)
|
||||
defer C.free(unsafe.Pointer(s_Cstring))
|
||||
var _ms C.struct_miqt_string = C.QsciLexerJava_Tr(s_Cstring)
|
||||
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
||||
C.free(unsafe.Pointer(_ms.data))
|
||||
return _ret
|
||||
}
|
||||
|
||||
func QsciLexerJava_TrUtf8(s string) string {
|
||||
s_Cstring := C.CString(s)
|
||||
defer C.free(unsafe.Pointer(s_Cstring))
|
||||
var _ms C.struct_miqt_string = C.QsciLexerJava_TrUtf8(s_Cstring)
|
||||
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
||||
C.free(unsafe.Pointer(_ms.data))
|
||||
return _ret
|
||||
}
|
||||
|
||||
func (this *QsciLexerJava) Language() string {
|
||||
_ret := C.QsciLexerJava_Language(this.h)
|
||||
return C.GoString(_ret)
|
||||
}
|
||||
|
||||
func (this *QsciLexerJava) Keywords(set int) string {
|
||||
_ret := C.QsciLexerJava_Keywords(this.h, (C.int)(set))
|
||||
return C.GoString(_ret)
|
||||
}
|
||||
|
||||
func QsciLexerJava_Tr2(s string, c string) string {
|
||||
s_Cstring := C.CString(s)
|
||||
defer C.free(unsafe.Pointer(s_Cstring))
|
||||
c_Cstring := C.CString(c)
|
||||
defer C.free(unsafe.Pointer(c_Cstring))
|
||||
var _ms C.struct_miqt_string = C.QsciLexerJava_Tr2(s_Cstring, c_Cstring)
|
||||
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
||||
C.free(unsafe.Pointer(_ms.data))
|
||||
return _ret
|
||||
}
|
||||
|
||||
func QsciLexerJava_Tr3(s string, c string, n int) string {
|
||||
s_Cstring := C.CString(s)
|
||||
defer C.free(unsafe.Pointer(s_Cstring))
|
||||
c_Cstring := C.CString(c)
|
||||
defer C.free(unsafe.Pointer(c_Cstring))
|
||||
var _ms C.struct_miqt_string = C.QsciLexerJava_Tr3(s_Cstring, c_Cstring, (C.int)(n))
|
||||
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
||||
C.free(unsafe.Pointer(_ms.data))
|
||||
return _ret
|
||||
}
|
||||
|
||||
func QsciLexerJava_TrUtf82(s string, c string) string {
|
||||
s_Cstring := C.CString(s)
|
||||
defer C.free(unsafe.Pointer(s_Cstring))
|
||||
c_Cstring := C.CString(c)
|
||||
defer C.free(unsafe.Pointer(c_Cstring))
|
||||
var _ms C.struct_miqt_string = C.QsciLexerJava_TrUtf82(s_Cstring, c_Cstring)
|
||||
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
||||
C.free(unsafe.Pointer(_ms.data))
|
||||
return _ret
|
||||
}
|
||||
|
||||
func QsciLexerJava_TrUtf83(s string, c string, n int) string {
|
||||
s_Cstring := C.CString(s)
|
||||
defer C.free(unsafe.Pointer(s_Cstring))
|
||||
c_Cstring := C.CString(c)
|
||||
defer C.free(unsafe.Pointer(c_Cstring))
|
||||
var _ms C.struct_miqt_string = C.QsciLexerJava_TrUtf83(s_Cstring, c_Cstring, (C.int)(n))
|
||||
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
||||
C.free(unsafe.Pointer(_ms.data))
|
||||
return _ret
|
||||
}
|
||||
|
||||
// Delete this object from C++ memory.
|
||||
func (this *QsciLexerJava) Delete() {
|
||||
C.QsciLexerJava_Delete(this.h)
|
||||
}
|
||||
|
||||
// GoGC adds a Go Finalizer to this pointer, so that it will be deleted
|
||||
// from C++ memory once it is unreachable from Go memory.
|
||||
func (this *QsciLexerJava) GoGC() {
|
||||
runtime.SetFinalizer(this, func(this *QsciLexerJava) {
|
||||
this.Delete()
|
||||
runtime.KeepAlive(this.h)
|
||||
})
|
||||
}
|
44
qt-restricted-extras/qscintilla/gen_qscilexerjava.h
Normal file
44
qt-restricted-extras/qscintilla/gen_qscilexerjava.h
Normal file
@ -0,0 +1,44 @@
|
||||
#ifndef GEN_QSCILEXERJAVA_H
|
||||
#define GEN_QSCILEXERJAVA_H
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||
|
||||
#include "../../libmiqt/libmiqt.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
class QMetaObject;
|
||||
class QObject;
|
||||
class QsciLexerJava;
|
||||
#else
|
||||
typedef struct QMetaObject QMetaObject;
|
||||
typedef struct QObject QObject;
|
||||
typedef struct QsciLexerJava QsciLexerJava;
|
||||
#endif
|
||||
|
||||
QsciLexerJava* QsciLexerJava_new();
|
||||
QsciLexerJava* QsciLexerJava_new2(QObject* parent);
|
||||
QMetaObject* QsciLexerJava_MetaObject(const QsciLexerJava* self);
|
||||
void* QsciLexerJava_Metacast(QsciLexerJava* self, const char* param1);
|
||||
struct miqt_string QsciLexerJava_Tr(const char* s);
|
||||
struct miqt_string QsciLexerJava_TrUtf8(const char* s);
|
||||
const char* QsciLexerJava_Language(const QsciLexerJava* self);
|
||||
const char* QsciLexerJava_Keywords(const QsciLexerJava* self, int set);
|
||||
struct miqt_string QsciLexerJava_Tr2(const char* s, const char* c);
|
||||
struct miqt_string QsciLexerJava_Tr3(const char* s, const char* c, int n);
|
||||
struct miqt_string QsciLexerJava_TrUtf82(const char* s, const char* c);
|
||||
struct miqt_string QsciLexerJava_TrUtf83(const char* s, const char* c, int n);
|
||||
void QsciLexerJava_Delete(QsciLexerJava* self);
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern C */
|
||||
#endif
|
||||
|
||||
#endif
|
132
qt-restricted-extras/qscintilla/gen_qscilexerjavascript.cpp
Normal file
132
qt-restricted-extras/qscintilla/gen_qscilexerjavascript.cpp
Normal file
@ -0,0 +1,132 @@
|
||||
#include <QColor>
|
||||
#include <QFont>
|
||||
#include <QMetaObject>
|
||||
#include <QObject>
|
||||
#include <QString>
|
||||
#include <QByteArray>
|
||||
#include <cstring>
|
||||
#include <qscilexerjavascript.h>
|
||||
#include "gen_qscilexerjavascript.h"
|
||||
#include "_cgo_export.h"
|
||||
|
||||
QsciLexerJavaScript* QsciLexerJavaScript_new() {
|
||||
return new QsciLexerJavaScript();
|
||||
}
|
||||
|
||||
QsciLexerJavaScript* QsciLexerJavaScript_new2(QObject* parent) {
|
||||
return new QsciLexerJavaScript(parent);
|
||||
}
|
||||
|
||||
QMetaObject* QsciLexerJavaScript_MetaObject(const QsciLexerJavaScript* self) {
|
||||
return (QMetaObject*) self->metaObject();
|
||||
}
|
||||
|
||||
void* QsciLexerJavaScript_Metacast(QsciLexerJavaScript* self, const char* param1) {
|
||||
return self->qt_metacast(param1);
|
||||
}
|
||||
|
||||
struct miqt_string QsciLexerJavaScript_Tr(const char* s) {
|
||||
QString _ret = QsciLexerJavaScript::tr(s);
|
||||
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
||||
QByteArray _b = _ret.toUtf8();
|
||||
struct miqt_string _ms;
|
||||
_ms.len = _b.length();
|
||||
_ms.data = static_cast<char*>(malloc(_ms.len));
|
||||
memcpy(_ms.data, _b.data(), _ms.len);
|
||||
return _ms;
|
||||
}
|
||||
|
||||
struct miqt_string QsciLexerJavaScript_TrUtf8(const char* s) {
|
||||
QString _ret = QsciLexerJavaScript::trUtf8(s);
|
||||
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
||||
QByteArray _b = _ret.toUtf8();
|
||||
struct miqt_string _ms;
|
||||
_ms.len = _b.length();
|
||||
_ms.data = static_cast<char*>(malloc(_ms.len));
|
||||
memcpy(_ms.data, _b.data(), _ms.len);
|
||||
return _ms;
|
||||
}
|
||||
|
||||
const char* QsciLexerJavaScript_Language(const QsciLexerJavaScript* self) {
|
||||
return (const char*) self->language();
|
||||
}
|
||||
|
||||
QColor* QsciLexerJavaScript_DefaultColor(const QsciLexerJavaScript* self, int style) {
|
||||
return new QColor(self->defaultColor(static_cast<int>(style)));
|
||||
}
|
||||
|
||||
bool QsciLexerJavaScript_DefaultEolFill(const QsciLexerJavaScript* self, int style) {
|
||||
return self->defaultEolFill(static_cast<int>(style));
|
||||
}
|
||||
|
||||
QFont* QsciLexerJavaScript_DefaultFont(const QsciLexerJavaScript* self, int style) {
|
||||
return new QFont(self->defaultFont(static_cast<int>(style)));
|
||||
}
|
||||
|
||||
QColor* QsciLexerJavaScript_DefaultPaper(const QsciLexerJavaScript* self, int style) {
|
||||
return new QColor(self->defaultPaper(static_cast<int>(style)));
|
||||
}
|
||||
|
||||
const char* QsciLexerJavaScript_Keywords(const QsciLexerJavaScript* self, int set) {
|
||||
return (const char*) self->keywords(static_cast<int>(set));
|
||||
}
|
||||
|
||||
struct miqt_string QsciLexerJavaScript_Description(const QsciLexerJavaScript* self, int style) {
|
||||
QString _ret = self->description(static_cast<int>(style));
|
||||
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
||||
QByteArray _b = _ret.toUtf8();
|
||||
struct miqt_string _ms;
|
||||
_ms.len = _b.length();
|
||||
_ms.data = static_cast<char*>(malloc(_ms.len));
|
||||
memcpy(_ms.data, _b.data(), _ms.len);
|
||||
return _ms;
|
||||
}
|
||||
|
||||
struct miqt_string QsciLexerJavaScript_Tr2(const char* s, const char* c) {
|
||||
QString _ret = QsciLexerJavaScript::tr(s, c);
|
||||
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
||||
QByteArray _b = _ret.toUtf8();
|
||||
struct miqt_string _ms;
|
||||
_ms.len = _b.length();
|
||||
_ms.data = static_cast<char*>(malloc(_ms.len));
|
||||
memcpy(_ms.data, _b.data(), _ms.len);
|
||||
return _ms;
|
||||
}
|
||||
|
||||
struct miqt_string QsciLexerJavaScript_Tr3(const char* s, const char* c, int n) {
|
||||
QString _ret = QsciLexerJavaScript::tr(s, c, static_cast<int>(n));
|
||||
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
||||
QByteArray _b = _ret.toUtf8();
|
||||
struct miqt_string _ms;
|
||||
_ms.len = _b.length();
|
||||
_ms.data = static_cast<char*>(malloc(_ms.len));
|
||||
memcpy(_ms.data, _b.data(), _ms.len);
|
||||
return _ms;
|
||||
}
|
||||
|
||||
struct miqt_string QsciLexerJavaScript_TrUtf82(const char* s, const char* c) {
|
||||
QString _ret = QsciLexerJavaScript::trUtf8(s, c);
|
||||
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
||||
QByteArray _b = _ret.toUtf8();
|
||||
struct miqt_string _ms;
|
||||
_ms.len = _b.length();
|
||||
_ms.data = static_cast<char*>(malloc(_ms.len));
|
||||
memcpy(_ms.data, _b.data(), _ms.len);
|
||||
return _ms;
|
||||
}
|
||||
|
||||
struct miqt_string QsciLexerJavaScript_TrUtf83(const char* s, const char* c, int n) {
|
||||
QString _ret = QsciLexerJavaScript::trUtf8(s, c, static_cast<int>(n));
|
||||
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
||||
QByteArray _b = _ret.toUtf8();
|
||||
struct miqt_string _ms;
|
||||
_ms.len = _b.length();
|
||||
_ms.data = static_cast<char*>(malloc(_ms.len));
|
||||
memcpy(_ms.data, _b.data(), _ms.len);
|
||||
return _ms;
|
||||
}
|
||||
|
||||
void QsciLexerJavaScript_Delete(QsciLexerJavaScript* self) {
|
||||
delete self;
|
||||
}
|
||||
|
185
qt-restricted-extras/qscintilla/gen_qscilexerjavascript.go
Normal file
185
qt-restricted-extras/qscintilla/gen_qscilexerjavascript.go
Normal file
@ -0,0 +1,185 @@
|
||||
package qscintilla
|
||||
|
||||
/*
|
||||
|
||||
#include "gen_qscilexerjavascript.h"
|
||||
#include <stdlib.h>
|
||||
|
||||
*/
|
||||
import "C"
|
||||
|
||||
import (
|
||||
"github.com/mappu/miqt/qt"
|
||||
"runtime"
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
type QsciLexerJavaScript struct {
|
||||
h *C.QsciLexerJavaScript
|
||||
*QsciLexerCPP
|
||||
}
|
||||
|
||||
func (this *QsciLexerJavaScript) cPointer() *C.QsciLexerJavaScript {
|
||||
if this == nil {
|
||||
return nil
|
||||
}
|
||||
return this.h
|
||||
}
|
||||
|
||||
func (this *QsciLexerJavaScript) UnsafePointer() unsafe.Pointer {
|
||||
if this == nil {
|
||||
return nil
|
||||
}
|
||||
return unsafe.Pointer(this.h)
|
||||
}
|
||||
|
||||
func newQsciLexerJavaScript(h *C.QsciLexerJavaScript) *QsciLexerJavaScript {
|
||||
if h == nil {
|
||||
return nil
|
||||
}
|
||||
return &QsciLexerJavaScript{h: h, QsciLexerCPP: UnsafeNewQsciLexerCPP(unsafe.Pointer(h))}
|
||||
}
|
||||
|
||||
func UnsafeNewQsciLexerJavaScript(h unsafe.Pointer) *QsciLexerJavaScript {
|
||||
return newQsciLexerJavaScript((*C.QsciLexerJavaScript)(h))
|
||||
}
|
||||
|
||||
// NewQsciLexerJavaScript constructs a new QsciLexerJavaScript object.
|
||||
func NewQsciLexerJavaScript() *QsciLexerJavaScript {
|
||||
ret := C.QsciLexerJavaScript_new()
|
||||
return newQsciLexerJavaScript(ret)
|
||||
}
|
||||
|
||||
// NewQsciLexerJavaScript2 constructs a new QsciLexerJavaScript object.
|
||||
func NewQsciLexerJavaScript2(parent *qt.QObject) *QsciLexerJavaScript {
|
||||
ret := C.QsciLexerJavaScript_new2((*C.QObject)(parent.UnsafePointer()))
|
||||
return newQsciLexerJavaScript(ret)
|
||||
}
|
||||
|
||||
func (this *QsciLexerJavaScript) MetaObject() *qt.QMetaObject {
|
||||
return qt.UnsafeNewQMetaObject(unsafe.Pointer(C.QsciLexerJavaScript_MetaObject(this.h)))
|
||||
}
|
||||
|
||||
func (this *QsciLexerJavaScript) Metacast(param1 string) unsafe.Pointer {
|
||||
param1_Cstring := C.CString(param1)
|
||||
defer C.free(unsafe.Pointer(param1_Cstring))
|
||||
return (unsafe.Pointer)(C.QsciLexerJavaScript_Metacast(this.h, param1_Cstring))
|
||||
}
|
||||
|
||||
func QsciLexerJavaScript_Tr(s string) string {
|
||||
s_Cstring := C.CString(s)
|
||||
defer C.free(unsafe.Pointer(s_Cstring))
|
||||
var _ms C.struct_miqt_string = C.QsciLexerJavaScript_Tr(s_Cstring)
|
||||
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
||||
C.free(unsafe.Pointer(_ms.data))
|
||||
return _ret
|
||||
}
|
||||
|
||||
func QsciLexerJavaScript_TrUtf8(s string) string {
|
||||
s_Cstring := C.CString(s)
|
||||
defer C.free(unsafe.Pointer(s_Cstring))
|
||||
var _ms C.struct_miqt_string = C.QsciLexerJavaScript_TrUtf8(s_Cstring)
|
||||
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
||||
C.free(unsafe.Pointer(_ms.data))
|
||||
return _ret
|
||||
}
|
||||
|
||||
func (this *QsciLexerJavaScript) Language() string {
|
||||
_ret := C.QsciLexerJavaScript_Language(this.h)
|
||||
return C.GoString(_ret)
|
||||
}
|
||||
|
||||
func (this *QsciLexerJavaScript) DefaultColor(style int) *qt.QColor {
|
||||
_ret := C.QsciLexerJavaScript_DefaultColor(this.h, (C.int)(style))
|
||||
_goptr := qt.UnsafeNewQColor(unsafe.Pointer(_ret))
|
||||
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
|
||||
return _goptr
|
||||
}
|
||||
|
||||
func (this *QsciLexerJavaScript) DefaultEolFill(style int) bool {
|
||||
return (bool)(C.QsciLexerJavaScript_DefaultEolFill(this.h, (C.int)(style)))
|
||||
}
|
||||
|
||||
func (this *QsciLexerJavaScript) DefaultFont(style int) *qt.QFont {
|
||||
_ret := C.QsciLexerJavaScript_DefaultFont(this.h, (C.int)(style))
|
||||
_goptr := qt.UnsafeNewQFont(unsafe.Pointer(_ret))
|
||||
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
|
||||
return _goptr
|
||||
}
|
||||
|
||||
func (this *QsciLexerJavaScript) DefaultPaper(style int) *qt.QColor {
|
||||
_ret := C.QsciLexerJavaScript_DefaultPaper(this.h, (C.int)(style))
|
||||
_goptr := qt.UnsafeNewQColor(unsafe.Pointer(_ret))
|
||||
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
|
||||
return _goptr
|
||||
}
|
||||
|
||||
func (this *QsciLexerJavaScript) Keywords(set int) string {
|
||||
_ret := C.QsciLexerJavaScript_Keywords(this.h, (C.int)(set))
|
||||
return C.GoString(_ret)
|
||||
}
|
||||
|
||||
func (this *QsciLexerJavaScript) Description(style int) string {
|
||||
var _ms C.struct_miqt_string = C.QsciLexerJavaScript_Description(this.h, (C.int)(style))
|
||||
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
||||
C.free(unsafe.Pointer(_ms.data))
|
||||
return _ret
|
||||
}
|
||||
|
||||
func QsciLexerJavaScript_Tr2(s string, c string) string {
|
||||
s_Cstring := C.CString(s)
|
||||
defer C.free(unsafe.Pointer(s_Cstring))
|
||||
c_Cstring := C.CString(c)
|
||||
defer C.free(unsafe.Pointer(c_Cstring))
|
||||
var _ms C.struct_miqt_string = C.QsciLexerJavaScript_Tr2(s_Cstring, c_Cstring)
|
||||
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
||||
C.free(unsafe.Pointer(_ms.data))
|
||||
return _ret
|
||||
}
|
||||
|
||||
func QsciLexerJavaScript_Tr3(s string, c string, n int) string {
|
||||
s_Cstring := C.CString(s)
|
||||
defer C.free(unsafe.Pointer(s_Cstring))
|
||||
c_Cstring := C.CString(c)
|
||||
defer C.free(unsafe.Pointer(c_Cstring))
|
||||
var _ms C.struct_miqt_string = C.QsciLexerJavaScript_Tr3(s_Cstring, c_Cstring, (C.int)(n))
|
||||
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
||||
C.free(unsafe.Pointer(_ms.data))
|
||||
return _ret
|
||||
}
|
||||
|
||||
func QsciLexerJavaScript_TrUtf82(s string, c string) string {
|
||||
s_Cstring := C.CString(s)
|
||||
defer C.free(unsafe.Pointer(s_Cstring))
|
||||
c_Cstring := C.CString(c)
|
||||
defer C.free(unsafe.Pointer(c_Cstring))
|
||||
var _ms C.struct_miqt_string = C.QsciLexerJavaScript_TrUtf82(s_Cstring, c_Cstring)
|
||||
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
||||
C.free(unsafe.Pointer(_ms.data))
|
||||
return _ret
|
||||
}
|
||||
|
||||
func QsciLexerJavaScript_TrUtf83(s string, c string, n int) string {
|
||||
s_Cstring := C.CString(s)
|
||||
defer C.free(unsafe.Pointer(s_Cstring))
|
||||
c_Cstring := C.CString(c)
|
||||
defer C.free(unsafe.Pointer(c_Cstring))
|
||||
var _ms C.struct_miqt_string = C.QsciLexerJavaScript_TrUtf83(s_Cstring, c_Cstring, (C.int)(n))
|
||||
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
||||
C.free(unsafe.Pointer(_ms.data))
|
||||
return _ret
|
||||
}
|
||||
|
||||
// Delete this object from C++ memory.
|
||||
func (this *QsciLexerJavaScript) Delete() {
|
||||
C.QsciLexerJavaScript_Delete(this.h)
|
||||
}
|
||||
|
||||
// GoGC adds a Go Finalizer to this pointer, so that it will be deleted
|
||||
// from C++ memory once it is unreachable from Go memory.
|
||||
func (this *QsciLexerJavaScript) GoGC() {
|
||||
runtime.SetFinalizer(this, func(this *QsciLexerJavaScript) {
|
||||
this.Delete()
|
||||
runtime.KeepAlive(this.h)
|
||||
})
|
||||
}
|
53
qt-restricted-extras/qscintilla/gen_qscilexerjavascript.h
Normal file
53
qt-restricted-extras/qscintilla/gen_qscilexerjavascript.h
Normal file
@ -0,0 +1,53 @@
|
||||
#ifndef GEN_QSCILEXERJAVASCRIPT_H
|
||||
#define GEN_QSCILEXERJAVASCRIPT_H
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||
|
||||
#include "../../libmiqt/libmiqt.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
class QColor;
|
||||
class QFont;
|
||||
class QMetaObject;
|
||||
class QObject;
|
||||
class QsciLexerJavaScript;
|
||||
#else
|
||||
typedef struct QColor QColor;
|
||||
typedef struct QFont QFont;
|
||||
typedef struct QMetaObject QMetaObject;
|
||||
typedef struct QObject QObject;
|
||||
typedef struct QsciLexerJavaScript QsciLexerJavaScript;
|
||||
#endif
|
||||
|
||||
QsciLexerJavaScript* QsciLexerJavaScript_new();
|
||||
QsciLexerJavaScript* QsciLexerJavaScript_new2(QObject* parent);
|
||||
QMetaObject* QsciLexerJavaScript_MetaObject(const QsciLexerJavaScript* self);
|
||||
void* QsciLexerJavaScript_Metacast(QsciLexerJavaScript* self, const char* param1);
|
||||
struct miqt_string QsciLexerJavaScript_Tr(const char* s);
|
||||
struct miqt_string QsciLexerJavaScript_TrUtf8(const char* s);
|
||||
const char* QsciLexerJavaScript_Language(const QsciLexerJavaScript* self);
|
||||
QColor* QsciLexerJavaScript_DefaultColor(const QsciLexerJavaScript* self, int style);
|
||||
bool QsciLexerJavaScript_DefaultEolFill(const QsciLexerJavaScript* self, int style);
|
||||
QFont* QsciLexerJavaScript_DefaultFont(const QsciLexerJavaScript* self, int style);
|
||||
QColor* QsciLexerJavaScript_DefaultPaper(const QsciLexerJavaScript* self, int style);
|
||||
const char* QsciLexerJavaScript_Keywords(const QsciLexerJavaScript* self, int set);
|
||||
struct miqt_string QsciLexerJavaScript_Description(const QsciLexerJavaScript* self, int style);
|
||||
struct miqt_string QsciLexerJavaScript_Tr2(const char* s, const char* c);
|
||||
struct miqt_string QsciLexerJavaScript_Tr3(const char* s, const char* c, int n);
|
||||
struct miqt_string QsciLexerJavaScript_TrUtf82(const char* s, const char* c);
|
||||
struct miqt_string QsciLexerJavaScript_TrUtf83(const char* s, const char* c, int n);
|
||||
void QsciLexerJavaScript_Delete(QsciLexerJavaScript* self);
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern C */
|
||||
#endif
|
||||
|
||||
#endif
|
164
qt-restricted-extras/qscintilla/gen_qscilexerjson.cpp
Normal file
164
qt-restricted-extras/qscintilla/gen_qscilexerjson.cpp
Normal file
@ -0,0 +1,164 @@
|
||||
#include <QColor>
|
||||
#include <QFont>
|
||||
#include <QMetaObject>
|
||||
#include <QObject>
|
||||
#include <QString>
|
||||
#include <QByteArray>
|
||||
#include <cstring>
|
||||
#include <qscilexerjson.h>
|
||||
#include "gen_qscilexerjson.h"
|
||||
#include "_cgo_export.h"
|
||||
|
||||
QsciLexerJSON* QsciLexerJSON_new() {
|
||||
return new QsciLexerJSON();
|
||||
}
|
||||
|
||||
QsciLexerJSON* QsciLexerJSON_new2(QObject* parent) {
|
||||
return new QsciLexerJSON(parent);
|
||||
}
|
||||
|
||||
QMetaObject* QsciLexerJSON_MetaObject(const QsciLexerJSON* self) {
|
||||
return (QMetaObject*) self->metaObject();
|
||||
}
|
||||
|
||||
void* QsciLexerJSON_Metacast(QsciLexerJSON* self, const char* param1) {
|
||||
return self->qt_metacast(param1);
|
||||
}
|
||||
|
||||
struct miqt_string QsciLexerJSON_Tr(const char* s) {
|
||||
QString _ret = QsciLexerJSON::tr(s);
|
||||
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
||||
QByteArray _b = _ret.toUtf8();
|
||||
struct miqt_string _ms;
|
||||
_ms.len = _b.length();
|
||||
_ms.data = static_cast<char*>(malloc(_ms.len));
|
||||
memcpy(_ms.data, _b.data(), _ms.len);
|
||||
return _ms;
|
||||
}
|
||||
|
||||
struct miqt_string QsciLexerJSON_TrUtf8(const char* s) {
|
||||
QString _ret = QsciLexerJSON::trUtf8(s);
|
||||
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
||||
QByteArray _b = _ret.toUtf8();
|
||||
struct miqt_string _ms;
|
||||
_ms.len = _b.length();
|
||||
_ms.data = static_cast<char*>(malloc(_ms.len));
|
||||
memcpy(_ms.data, _b.data(), _ms.len);
|
||||
return _ms;
|
||||
}
|
||||
|
||||
const char* QsciLexerJSON_Language(const QsciLexerJSON* self) {
|
||||
return (const char*) self->language();
|
||||
}
|
||||
|
||||
const char* QsciLexerJSON_Lexer(const QsciLexerJSON* self) {
|
||||
return (const char*) self->lexer();
|
||||
}
|
||||
|
||||
QColor* QsciLexerJSON_DefaultColor(const QsciLexerJSON* self, int style) {
|
||||
return new QColor(self->defaultColor(static_cast<int>(style)));
|
||||
}
|
||||
|
||||
bool QsciLexerJSON_DefaultEolFill(const QsciLexerJSON* self, int style) {
|
||||
return self->defaultEolFill(static_cast<int>(style));
|
||||
}
|
||||
|
||||
QFont* QsciLexerJSON_DefaultFont(const QsciLexerJSON* self, int style) {
|
||||
return new QFont(self->defaultFont(static_cast<int>(style)));
|
||||
}
|
||||
|
||||
QColor* QsciLexerJSON_DefaultPaper(const QsciLexerJSON* self, int style) {
|
||||
return new QColor(self->defaultPaper(static_cast<int>(style)));
|
||||
}
|
||||
|
||||
const char* QsciLexerJSON_Keywords(const QsciLexerJSON* self, int set) {
|
||||
return (const char*) self->keywords(static_cast<int>(set));
|
||||
}
|
||||
|
||||
struct miqt_string QsciLexerJSON_Description(const QsciLexerJSON* self, int style) {
|
||||
QString _ret = self->description(static_cast<int>(style));
|
||||
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
||||
QByteArray _b = _ret.toUtf8();
|
||||
struct miqt_string _ms;
|
||||
_ms.len = _b.length();
|
||||
_ms.data = static_cast<char*>(malloc(_ms.len));
|
||||
memcpy(_ms.data, _b.data(), _ms.len);
|
||||
return _ms;
|
||||
}
|
||||
|
||||
void QsciLexerJSON_RefreshProperties(QsciLexerJSON* self) {
|
||||
self->refreshProperties();
|
||||
}
|
||||
|
||||
void QsciLexerJSON_SetHighlightComments(QsciLexerJSON* self, bool highlight) {
|
||||
self->setHighlightComments(highlight);
|
||||
}
|
||||
|
||||
bool QsciLexerJSON_HighlightComments(const QsciLexerJSON* self) {
|
||||
return self->highlightComments();
|
||||
}
|
||||
|
||||
void QsciLexerJSON_SetHighlightEscapeSequences(QsciLexerJSON* self, bool highlight) {
|
||||
self->setHighlightEscapeSequences(highlight);
|
||||
}
|
||||
|
||||
bool QsciLexerJSON_HighlightEscapeSequences(const QsciLexerJSON* self) {
|
||||
return self->highlightEscapeSequences();
|
||||
}
|
||||
|
||||
void QsciLexerJSON_SetFoldCompact(QsciLexerJSON* self, bool fold) {
|
||||
self->setFoldCompact(fold);
|
||||
}
|
||||
|
||||
bool QsciLexerJSON_FoldCompact(const QsciLexerJSON* self) {
|
||||
return self->foldCompact();
|
||||
}
|
||||
|
||||
struct miqt_string QsciLexerJSON_Tr2(const char* s, const char* c) {
|
||||
QString _ret = QsciLexerJSON::tr(s, c);
|
||||
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
||||
QByteArray _b = _ret.toUtf8();
|
||||
struct miqt_string _ms;
|
||||
_ms.len = _b.length();
|
||||
_ms.data = static_cast<char*>(malloc(_ms.len));
|
||||
memcpy(_ms.data, _b.data(), _ms.len);
|
||||
return _ms;
|
||||
}
|
||||
|
||||
struct miqt_string QsciLexerJSON_Tr3(const char* s, const char* c, int n) {
|
||||
QString _ret = QsciLexerJSON::tr(s, c, static_cast<int>(n));
|
||||
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
||||
QByteArray _b = _ret.toUtf8();
|
||||
struct miqt_string _ms;
|
||||
_ms.len = _b.length();
|
||||
_ms.data = static_cast<char*>(malloc(_ms.len));
|
||||
memcpy(_ms.data, _b.data(), _ms.len);
|
||||
return _ms;
|
||||
}
|
||||
|
||||
struct miqt_string QsciLexerJSON_TrUtf82(const char* s, const char* c) {
|
||||
QString _ret = QsciLexerJSON::trUtf8(s, c);
|
||||
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
||||
QByteArray _b = _ret.toUtf8();
|
||||
struct miqt_string _ms;
|
||||
_ms.len = _b.length();
|
||||
_ms.data = static_cast<char*>(malloc(_ms.len));
|
||||
memcpy(_ms.data, _b.data(), _ms.len);
|
||||
return _ms;
|
||||
}
|
||||
|
||||
struct miqt_string QsciLexerJSON_TrUtf83(const char* s, const char* c, int n) {
|
||||
QString _ret = QsciLexerJSON::trUtf8(s, c, static_cast<int>(n));
|
||||
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
||||
QByteArray _b = _ret.toUtf8();
|
||||
struct miqt_string _ms;
|
||||
_ms.len = _b.length();
|
||||
_ms.data = static_cast<char*>(malloc(_ms.len));
|
||||
memcpy(_ms.data, _b.data(), _ms.len);
|
||||
return _ms;
|
||||
}
|
||||
|
||||
void QsciLexerJSON_Delete(QsciLexerJSON* self) {
|
||||
delete self;
|
||||
}
|
||||
|
237
qt-restricted-extras/qscintilla/gen_qscilexerjson.go
Normal file
237
qt-restricted-extras/qscintilla/gen_qscilexerjson.go
Normal file
@ -0,0 +1,237 @@
|
||||
package qscintilla
|
||||
|
||||
/*
|
||||
|
||||
#include "gen_qscilexerjson.h"
|
||||
#include <stdlib.h>
|
||||
|
||||
*/
|
||||
import "C"
|
||||
|
||||
import (
|
||||
"github.com/mappu/miqt/qt"
|
||||
"runtime"
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
type QsciLexerJSON__ int
|
||||
|
||||
const (
|
||||
QsciLexerJSON__Default QsciLexerJSON__ = 0
|
||||
QsciLexerJSON__Number QsciLexerJSON__ = 1
|
||||
QsciLexerJSON__String QsciLexerJSON__ = 2
|
||||
QsciLexerJSON__UnclosedString QsciLexerJSON__ = 3
|
||||
QsciLexerJSON__Property QsciLexerJSON__ = 4
|
||||
QsciLexerJSON__EscapeSequence QsciLexerJSON__ = 5
|
||||
QsciLexerJSON__CommentLine QsciLexerJSON__ = 6
|
||||
QsciLexerJSON__CommentBlock QsciLexerJSON__ = 7
|
||||
QsciLexerJSON__Operator QsciLexerJSON__ = 8
|
||||
QsciLexerJSON__IRI QsciLexerJSON__ = 9
|
||||
QsciLexerJSON__IRICompact QsciLexerJSON__ = 10
|
||||
QsciLexerJSON__Keyword QsciLexerJSON__ = 11
|
||||
QsciLexerJSON__KeywordLD QsciLexerJSON__ = 12
|
||||
QsciLexerJSON__Error QsciLexerJSON__ = 13
|
||||
)
|
||||
|
||||
type QsciLexerJSON struct {
|
||||
h *C.QsciLexerJSON
|
||||
*QsciLexer
|
||||
}
|
||||
|
||||
func (this *QsciLexerJSON) cPointer() *C.QsciLexerJSON {
|
||||
if this == nil {
|
||||
return nil
|
||||
}
|
||||
return this.h
|
||||
}
|
||||
|
||||
func (this *QsciLexerJSON) UnsafePointer() unsafe.Pointer {
|
||||
if this == nil {
|
||||
return nil
|
||||
}
|
||||
return unsafe.Pointer(this.h)
|
||||
}
|
||||
|
||||
func newQsciLexerJSON(h *C.QsciLexerJSON) *QsciLexerJSON {
|
||||
if h == nil {
|
||||
return nil
|
||||
}
|
||||
return &QsciLexerJSON{h: h, QsciLexer: UnsafeNewQsciLexer(unsafe.Pointer(h))}
|
||||
}
|
||||
|
||||
func UnsafeNewQsciLexerJSON(h unsafe.Pointer) *QsciLexerJSON {
|
||||
return newQsciLexerJSON((*C.QsciLexerJSON)(h))
|
||||
}
|
||||
|
||||
// NewQsciLexerJSON constructs a new QsciLexerJSON object.
|
||||
func NewQsciLexerJSON() *QsciLexerJSON {
|
||||
ret := C.QsciLexerJSON_new()
|
||||
return newQsciLexerJSON(ret)
|
||||
}
|
||||
|
||||
// NewQsciLexerJSON2 constructs a new QsciLexerJSON object.
|
||||
func NewQsciLexerJSON2(parent *qt.QObject) *QsciLexerJSON {
|
||||
ret := C.QsciLexerJSON_new2((*C.QObject)(parent.UnsafePointer()))
|
||||
return newQsciLexerJSON(ret)
|
||||
}
|
||||
|
||||
func (this *QsciLexerJSON) MetaObject() *qt.QMetaObject {
|
||||
return qt.UnsafeNewQMetaObject(unsafe.Pointer(C.QsciLexerJSON_MetaObject(this.h)))
|
||||
}
|
||||
|
||||
func (this *QsciLexerJSON) Metacast(param1 string) unsafe.Pointer {
|
||||
param1_Cstring := C.CString(param1)
|
||||
defer C.free(unsafe.Pointer(param1_Cstring))
|
||||
return (unsafe.Pointer)(C.QsciLexerJSON_Metacast(this.h, param1_Cstring))
|
||||
}
|
||||
|
||||
func QsciLexerJSON_Tr(s string) string {
|
||||
s_Cstring := C.CString(s)
|
||||
defer C.free(unsafe.Pointer(s_Cstring))
|
||||
var _ms C.struct_miqt_string = C.QsciLexerJSON_Tr(s_Cstring)
|
||||
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
||||
C.free(unsafe.Pointer(_ms.data))
|
||||
return _ret
|
||||
}
|
||||
|
||||
func QsciLexerJSON_TrUtf8(s string) string {
|
||||
s_Cstring := C.CString(s)
|
||||
defer C.free(unsafe.Pointer(s_Cstring))
|
||||
var _ms C.struct_miqt_string = C.QsciLexerJSON_TrUtf8(s_Cstring)
|
||||
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
||||
C.free(unsafe.Pointer(_ms.data))
|
||||
return _ret
|
||||
}
|
||||
|
||||
func (this *QsciLexerJSON) Language() string {
|
||||
_ret := C.QsciLexerJSON_Language(this.h)
|
||||
return C.GoString(_ret)
|
||||
}
|
||||
|
||||
func (this *QsciLexerJSON) Lexer() string {
|
||||
_ret := C.QsciLexerJSON_Lexer(this.h)
|
||||
return C.GoString(_ret)
|
||||
}
|
||||
|
||||
func (this *QsciLexerJSON) DefaultColor(style int) *qt.QColor {
|
||||
_ret := C.QsciLexerJSON_DefaultColor(this.h, (C.int)(style))
|
||||
_goptr := qt.UnsafeNewQColor(unsafe.Pointer(_ret))
|
||||
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
|
||||
return _goptr
|
||||
}
|
||||
|
||||
func (this *QsciLexerJSON) DefaultEolFill(style int) bool {
|
||||
return (bool)(C.QsciLexerJSON_DefaultEolFill(this.h, (C.int)(style)))
|
||||
}
|
||||
|
||||
func (this *QsciLexerJSON) DefaultFont(style int) *qt.QFont {
|
||||
_ret := C.QsciLexerJSON_DefaultFont(this.h, (C.int)(style))
|
||||
_goptr := qt.UnsafeNewQFont(unsafe.Pointer(_ret))
|
||||
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
|
||||
return _goptr
|
||||
}
|
||||
|
||||
func (this *QsciLexerJSON) DefaultPaper(style int) *qt.QColor {
|
||||
_ret := C.QsciLexerJSON_DefaultPaper(this.h, (C.int)(style))
|
||||
_goptr := qt.UnsafeNewQColor(unsafe.Pointer(_ret))
|
||||
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
|
||||
return _goptr
|
||||
}
|
||||
|
||||
func (this *QsciLexerJSON) Keywords(set int) string {
|
||||
_ret := C.QsciLexerJSON_Keywords(this.h, (C.int)(set))
|
||||
return C.GoString(_ret)
|
||||
}
|
||||
|
||||
func (this *QsciLexerJSON) Description(style int) string {
|
||||
var _ms C.struct_miqt_string = C.QsciLexerJSON_Description(this.h, (C.int)(style))
|
||||
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
||||
C.free(unsafe.Pointer(_ms.data))
|
||||
return _ret
|
||||
}
|
||||
|
||||
func (this *QsciLexerJSON) RefreshProperties() {
|
||||
C.QsciLexerJSON_RefreshProperties(this.h)
|
||||
}
|
||||
|
||||
func (this *QsciLexerJSON) SetHighlightComments(highlight bool) {
|
||||
C.QsciLexerJSON_SetHighlightComments(this.h, (C.bool)(highlight))
|
||||
}
|
||||
|
||||
func (this *QsciLexerJSON) HighlightComments() bool {
|
||||
return (bool)(C.QsciLexerJSON_HighlightComments(this.h))
|
||||
}
|
||||
|
||||
func (this *QsciLexerJSON) SetHighlightEscapeSequences(highlight bool) {
|
||||
C.QsciLexerJSON_SetHighlightEscapeSequences(this.h, (C.bool)(highlight))
|
||||
}
|
||||
|
||||
func (this *QsciLexerJSON) HighlightEscapeSequences() bool {
|
||||
return (bool)(C.QsciLexerJSON_HighlightEscapeSequences(this.h))
|
||||
}
|
||||
|
||||
func (this *QsciLexerJSON) SetFoldCompact(fold bool) {
|
||||
C.QsciLexerJSON_SetFoldCompact(this.h, (C.bool)(fold))
|
||||
}
|
||||
|
||||
func (this *QsciLexerJSON) FoldCompact() bool {
|
||||
return (bool)(C.QsciLexerJSON_FoldCompact(this.h))
|
||||
}
|
||||
|
||||
func QsciLexerJSON_Tr2(s string, c string) string {
|
||||
s_Cstring := C.CString(s)
|
||||
defer C.free(unsafe.Pointer(s_Cstring))
|
||||
c_Cstring := C.CString(c)
|
||||
defer C.free(unsafe.Pointer(c_Cstring))
|
||||
var _ms C.struct_miqt_string = C.QsciLexerJSON_Tr2(s_Cstring, c_Cstring)
|
||||
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
||||
C.free(unsafe.Pointer(_ms.data))
|
||||
return _ret
|
||||
}
|
||||
|
||||
func QsciLexerJSON_Tr3(s string, c string, n int) string {
|
||||
s_Cstring := C.CString(s)
|
||||
defer C.free(unsafe.Pointer(s_Cstring))
|
||||
c_Cstring := C.CString(c)
|
||||
defer C.free(unsafe.Pointer(c_Cstring))
|
||||
var _ms C.struct_miqt_string = C.QsciLexerJSON_Tr3(s_Cstring, c_Cstring, (C.int)(n))
|
||||
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
||||
C.free(unsafe.Pointer(_ms.data))
|
||||
return _ret
|
||||
}
|
||||
|
||||
func QsciLexerJSON_TrUtf82(s string, c string) string {
|
||||
s_Cstring := C.CString(s)
|
||||
defer C.free(unsafe.Pointer(s_Cstring))
|
||||
c_Cstring := C.CString(c)
|
||||
defer C.free(unsafe.Pointer(c_Cstring))
|
||||
var _ms C.struct_miqt_string = C.QsciLexerJSON_TrUtf82(s_Cstring, c_Cstring)
|
||||
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
||||
C.free(unsafe.Pointer(_ms.data))
|
||||
return _ret
|
||||
}
|
||||
|
||||
func QsciLexerJSON_TrUtf83(s string, c string, n int) string {
|
||||
s_Cstring := C.CString(s)
|
||||
defer C.free(unsafe.Pointer(s_Cstring))
|
||||
c_Cstring := C.CString(c)
|
||||
defer C.free(unsafe.Pointer(c_Cstring))
|
||||
var _ms C.struct_miqt_string = C.QsciLexerJSON_TrUtf83(s_Cstring, c_Cstring, (C.int)(n))
|
||||
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
||||
C.free(unsafe.Pointer(_ms.data))
|
||||
return _ret
|
||||
}
|
||||
|
||||
// Delete this object from C++ memory.
|
||||
func (this *QsciLexerJSON) Delete() {
|
||||
C.QsciLexerJSON_Delete(this.h)
|
||||
}
|
||||
|
||||
// GoGC adds a Go Finalizer to this pointer, so that it will be deleted
|
||||
// from C++ memory once it is unreachable from Go memory.
|
||||
func (this *QsciLexerJSON) GoGC() {
|
||||
runtime.SetFinalizer(this, func(this *QsciLexerJSON) {
|
||||
this.Delete()
|
||||
runtime.KeepAlive(this.h)
|
||||
})
|
||||
}
|
61
qt-restricted-extras/qscintilla/gen_qscilexerjson.h
Normal file
61
qt-restricted-extras/qscintilla/gen_qscilexerjson.h
Normal file
@ -0,0 +1,61 @@
|
||||
#ifndef GEN_QSCILEXERJSON_H
|
||||
#define GEN_QSCILEXERJSON_H
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||
|
||||
#include "../../libmiqt/libmiqt.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
class QColor;
|
||||
class QFont;
|
||||
class QMetaObject;
|
||||
class QObject;
|
||||
class QsciLexerJSON;
|
||||
#else
|
||||
typedef struct QColor QColor;
|
||||
typedef struct QFont QFont;
|
||||
typedef struct QMetaObject QMetaObject;
|
||||
typedef struct QObject QObject;
|
||||
typedef struct QsciLexerJSON QsciLexerJSON;
|
||||
#endif
|
||||
|
||||
QsciLexerJSON* QsciLexerJSON_new();
|
||||
QsciLexerJSON* QsciLexerJSON_new2(QObject* parent);
|
||||
QMetaObject* QsciLexerJSON_MetaObject(const QsciLexerJSON* self);
|
||||
void* QsciLexerJSON_Metacast(QsciLexerJSON* self, const char* param1);
|
||||
struct miqt_string QsciLexerJSON_Tr(const char* s);
|
||||
struct miqt_string QsciLexerJSON_TrUtf8(const char* s);
|
||||
const char* QsciLexerJSON_Language(const QsciLexerJSON* self);
|
||||
const char* QsciLexerJSON_Lexer(const QsciLexerJSON* self);
|
||||
QColor* QsciLexerJSON_DefaultColor(const QsciLexerJSON* self, int style);
|
||||
bool QsciLexerJSON_DefaultEolFill(const QsciLexerJSON* self, int style);
|
||||
QFont* QsciLexerJSON_DefaultFont(const QsciLexerJSON* self, int style);
|
||||
QColor* QsciLexerJSON_DefaultPaper(const QsciLexerJSON* self, int style);
|
||||
const char* QsciLexerJSON_Keywords(const QsciLexerJSON* self, int set);
|
||||
struct miqt_string QsciLexerJSON_Description(const QsciLexerJSON* self, int style);
|
||||
void QsciLexerJSON_RefreshProperties(QsciLexerJSON* self);
|
||||
void QsciLexerJSON_SetHighlightComments(QsciLexerJSON* self, bool highlight);
|
||||
bool QsciLexerJSON_HighlightComments(const QsciLexerJSON* self);
|
||||
void QsciLexerJSON_SetHighlightEscapeSequences(QsciLexerJSON* self, bool highlight);
|
||||
bool QsciLexerJSON_HighlightEscapeSequences(const QsciLexerJSON* self);
|
||||
void QsciLexerJSON_SetFoldCompact(QsciLexerJSON* self, bool fold);
|
||||
bool QsciLexerJSON_FoldCompact(const QsciLexerJSON* self);
|
||||
struct miqt_string QsciLexerJSON_Tr2(const char* s, const char* c);
|
||||
struct miqt_string QsciLexerJSON_Tr3(const char* s, const char* c, int n);
|
||||
struct miqt_string QsciLexerJSON_TrUtf82(const char* s, const char* c);
|
||||
struct miqt_string QsciLexerJSON_TrUtf83(const char* s, const char* c, int n);
|
||||
void QsciLexerJSON_Delete(QsciLexerJSON* self);
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern C */
|
||||
#endif
|
||||
|
||||
#endif
|
181
qt-restricted-extras/qscintilla/gen_qscilexerlua.cpp
Normal file
181
qt-restricted-extras/qscintilla/gen_qscilexerlua.cpp
Normal file
@ -0,0 +1,181 @@
|
||||
#include <QColor>
|
||||
#include <QFont>
|
||||
#include <QList>
|
||||
#include <QMetaObject>
|
||||
#include <QObject>
|
||||
#include <QString>
|
||||
#include <QByteArray>
|
||||
#include <cstring>
|
||||
#include <qscilexerlua.h>
|
||||
#include "gen_qscilexerlua.h"
|
||||
#include "_cgo_export.h"
|
||||
|
||||
QsciLexerLua* QsciLexerLua_new() {
|
||||
return new QsciLexerLua();
|
||||
}
|
||||
|
||||
QsciLexerLua* QsciLexerLua_new2(QObject* parent) {
|
||||
return new QsciLexerLua(parent);
|
||||
}
|
||||
|
||||
QMetaObject* QsciLexerLua_MetaObject(const QsciLexerLua* self) {
|
||||
return (QMetaObject*) self->metaObject();
|
||||
}
|
||||
|
||||
void* QsciLexerLua_Metacast(QsciLexerLua* self, const char* param1) {
|
||||
return self->qt_metacast(param1);
|
||||
}
|
||||
|
||||
struct miqt_string QsciLexerLua_Tr(const char* s) {
|
||||
QString _ret = QsciLexerLua::tr(s);
|
||||
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
||||
QByteArray _b = _ret.toUtf8();
|
||||
struct miqt_string _ms;
|
||||
_ms.len = _b.length();
|
||||
_ms.data = static_cast<char*>(malloc(_ms.len));
|
||||
memcpy(_ms.data, _b.data(), _ms.len);
|
||||
return _ms;
|
||||
}
|
||||
|
||||
struct miqt_string QsciLexerLua_TrUtf8(const char* s) {
|
||||
QString _ret = QsciLexerLua::trUtf8(s);
|
||||
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
||||
QByteArray _b = _ret.toUtf8();
|
||||
struct miqt_string _ms;
|
||||
_ms.len = _b.length();
|
||||
_ms.data = static_cast<char*>(malloc(_ms.len));
|
||||
memcpy(_ms.data, _b.data(), _ms.len);
|
||||
return _ms;
|
||||
}
|
||||
|
||||
const char* QsciLexerLua_Language(const QsciLexerLua* self) {
|
||||
return (const char*) self->language();
|
||||
}
|
||||
|
||||
const char* QsciLexerLua_Lexer(const QsciLexerLua* self) {
|
||||
return (const char*) self->lexer();
|
||||
}
|
||||
|
||||
struct miqt_array* QsciLexerLua_AutoCompletionWordSeparators(const QsciLexerLua* self) {
|
||||
QStringList _ret = self->autoCompletionWordSeparators();
|
||||
// Convert QList<> from C++ memory to manually-managed C memory
|
||||
struct miqt_string* _arr = static_cast<struct miqt_string*>(malloc(sizeof(struct miqt_string) * _ret.length()));
|
||||
for (size_t i = 0, e = _ret.length(); i < e; ++i) {
|
||||
QString _lv_ret = _ret[i];
|
||||
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
||||
QByteArray _lv_b = _lv_ret.toUtf8();
|
||||
struct miqt_string _lv_ms;
|
||||
_lv_ms.len = _lv_b.length();
|
||||
_lv_ms.data = static_cast<char*>(malloc(_lv_ms.len));
|
||||
memcpy(_lv_ms.data, _lv_b.data(), _lv_ms.len);
|
||||
_arr[i] = _lv_ms;
|
||||
}
|
||||
struct miqt_array* _out = static_cast<struct miqt_array*>(malloc(sizeof(struct miqt_array)));
|
||||
_out->len = _ret.length();
|
||||
_out->data = static_cast<void*>(_arr);
|
||||
return _out;
|
||||
}
|
||||
|
||||
const char* QsciLexerLua_BlockStart(const QsciLexerLua* self) {
|
||||
return (const char*) self->blockStart();
|
||||
}
|
||||
|
||||
int QsciLexerLua_BraceStyle(const QsciLexerLua* self) {
|
||||
return self->braceStyle();
|
||||
}
|
||||
|
||||
QColor* QsciLexerLua_DefaultColor(const QsciLexerLua* self, int style) {
|
||||
return new QColor(self->defaultColor(static_cast<int>(style)));
|
||||
}
|
||||
|
||||
bool QsciLexerLua_DefaultEolFill(const QsciLexerLua* self, int style) {
|
||||
return self->defaultEolFill(static_cast<int>(style));
|
||||
}
|
||||
|
||||
QFont* QsciLexerLua_DefaultFont(const QsciLexerLua* self, int style) {
|
||||
return new QFont(self->defaultFont(static_cast<int>(style)));
|
||||
}
|
||||
|
||||
QColor* QsciLexerLua_DefaultPaper(const QsciLexerLua* self, int style) {
|
||||
return new QColor(self->defaultPaper(static_cast<int>(style)));
|
||||
}
|
||||
|
||||
const char* QsciLexerLua_Keywords(const QsciLexerLua* self, int set) {
|
||||
return (const char*) self->keywords(static_cast<int>(set));
|
||||
}
|
||||
|
||||
struct miqt_string QsciLexerLua_Description(const QsciLexerLua* self, int style) {
|
||||
QString _ret = self->description(static_cast<int>(style));
|
||||
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
||||
QByteArray _b = _ret.toUtf8();
|
||||
struct miqt_string _ms;
|
||||
_ms.len = _b.length();
|
||||
_ms.data = static_cast<char*>(malloc(_ms.len));
|
||||
memcpy(_ms.data, _b.data(), _ms.len);
|
||||
return _ms;
|
||||
}
|
||||
|
||||
void QsciLexerLua_RefreshProperties(QsciLexerLua* self) {
|
||||
self->refreshProperties();
|
||||
}
|
||||
|
||||
bool QsciLexerLua_FoldCompact(const QsciLexerLua* self) {
|
||||
return self->foldCompact();
|
||||
}
|
||||
|
||||
void QsciLexerLua_SetFoldCompact(QsciLexerLua* self, bool fold) {
|
||||
self->setFoldCompact(fold);
|
||||
}
|
||||
|
||||
struct miqt_string QsciLexerLua_Tr2(const char* s, const char* c) {
|
||||
QString _ret = QsciLexerLua::tr(s, c);
|
||||
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
||||
QByteArray _b = _ret.toUtf8();
|
||||
struct miqt_string _ms;
|
||||
_ms.len = _b.length();
|
||||
_ms.data = static_cast<char*>(malloc(_ms.len));
|
||||
memcpy(_ms.data, _b.data(), _ms.len);
|
||||
return _ms;
|
||||
}
|
||||
|
||||
struct miqt_string QsciLexerLua_Tr3(const char* s, const char* c, int n) {
|
||||
QString _ret = QsciLexerLua::tr(s, c, static_cast<int>(n));
|
||||
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
||||
QByteArray _b = _ret.toUtf8();
|
||||
struct miqt_string _ms;
|
||||
_ms.len = _b.length();
|
||||
_ms.data = static_cast<char*>(malloc(_ms.len));
|
||||
memcpy(_ms.data, _b.data(), _ms.len);
|
||||
return _ms;
|
||||
}
|
||||
|
||||
struct miqt_string QsciLexerLua_TrUtf82(const char* s, const char* c) {
|
||||
QString _ret = QsciLexerLua::trUtf8(s, c);
|
||||
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
||||
QByteArray _b = _ret.toUtf8();
|
||||
struct miqt_string _ms;
|
||||
_ms.len = _b.length();
|
||||
_ms.data = static_cast<char*>(malloc(_ms.len));
|
||||
memcpy(_ms.data, _b.data(), _ms.len);
|
||||
return _ms;
|
||||
}
|
||||
|
||||
struct miqt_string QsciLexerLua_TrUtf83(const char* s, const char* c, int n) {
|
||||
QString _ret = QsciLexerLua::trUtf8(s, c, static_cast<int>(n));
|
||||
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
||||
QByteArray _b = _ret.toUtf8();
|
||||
struct miqt_string _ms;
|
||||
_ms.len = _b.length();
|
||||
_ms.data = static_cast<char*>(malloc(_ms.len));
|
||||
memcpy(_ms.data, _b.data(), _ms.len);
|
||||
return _ms;
|
||||
}
|
||||
|
||||
const char* QsciLexerLua_BlockStart1(const QsciLexerLua* self, int* style) {
|
||||
return (const char*) self->blockStart(static_cast<int*>(style));
|
||||
}
|
||||
|
||||
void QsciLexerLua_Delete(QsciLexerLua* self) {
|
||||
delete self;
|
||||
}
|
||||
|
255
qt-restricted-extras/qscintilla/gen_qscilexerlua.go
Normal file
255
qt-restricted-extras/qscintilla/gen_qscilexerlua.go
Normal file
@ -0,0 +1,255 @@
|
||||
package qscintilla
|
||||
|
||||
/*
|
||||
|
||||
#include "gen_qscilexerlua.h"
|
||||
#include <stdlib.h>
|
||||
|
||||
*/
|
||||
import "C"
|
||||
|
||||
import (
|
||||
"github.com/mappu/miqt/qt"
|
||||
"runtime"
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
type QsciLexerLua__ int
|
||||
|
||||
const (
|
||||
QsciLexerLua__Default QsciLexerLua__ = 0
|
||||
QsciLexerLua__Comment QsciLexerLua__ = 1
|
||||
QsciLexerLua__LineComment QsciLexerLua__ = 2
|
||||
QsciLexerLua__Number QsciLexerLua__ = 4
|
||||
QsciLexerLua__Keyword QsciLexerLua__ = 5
|
||||
QsciLexerLua__String QsciLexerLua__ = 6
|
||||
QsciLexerLua__Character QsciLexerLua__ = 7
|
||||
QsciLexerLua__LiteralString QsciLexerLua__ = 8
|
||||
QsciLexerLua__Preprocessor QsciLexerLua__ = 9
|
||||
QsciLexerLua__Operator QsciLexerLua__ = 10
|
||||
QsciLexerLua__Identifier QsciLexerLua__ = 11
|
||||
QsciLexerLua__UnclosedString QsciLexerLua__ = 12
|
||||
QsciLexerLua__BasicFunctions QsciLexerLua__ = 13
|
||||
QsciLexerLua__StringTableMathsFunctions QsciLexerLua__ = 14
|
||||
QsciLexerLua__CoroutinesIOSystemFacilities QsciLexerLua__ = 15
|
||||
QsciLexerLua__KeywordSet5 QsciLexerLua__ = 16
|
||||
QsciLexerLua__KeywordSet6 QsciLexerLua__ = 17
|
||||
QsciLexerLua__KeywordSet7 QsciLexerLua__ = 18
|
||||
QsciLexerLua__KeywordSet8 QsciLexerLua__ = 19
|
||||
QsciLexerLua__Label QsciLexerLua__ = 20
|
||||
)
|
||||
|
||||
type QsciLexerLua struct {
|
||||
h *C.QsciLexerLua
|
||||
*QsciLexer
|
||||
}
|
||||
|
||||
func (this *QsciLexerLua) cPointer() *C.QsciLexerLua {
|
||||
if this == nil {
|
||||
return nil
|
||||
}
|
||||
return this.h
|
||||
}
|
||||
|
||||
func (this *QsciLexerLua) UnsafePointer() unsafe.Pointer {
|
||||
if this == nil {
|
||||
return nil
|
||||
}
|
||||
return unsafe.Pointer(this.h)
|
||||
}
|
||||
|
||||
func newQsciLexerLua(h *C.QsciLexerLua) *QsciLexerLua {
|
||||
if h == nil {
|
||||
return nil
|
||||
}
|
||||
return &QsciLexerLua{h: h, QsciLexer: UnsafeNewQsciLexer(unsafe.Pointer(h))}
|
||||
}
|
||||
|
||||
func UnsafeNewQsciLexerLua(h unsafe.Pointer) *QsciLexerLua {
|
||||
return newQsciLexerLua((*C.QsciLexerLua)(h))
|
||||
}
|
||||
|
||||
// NewQsciLexerLua constructs a new QsciLexerLua object.
|
||||
func NewQsciLexerLua() *QsciLexerLua {
|
||||
ret := C.QsciLexerLua_new()
|
||||
return newQsciLexerLua(ret)
|
||||
}
|
||||
|
||||
// NewQsciLexerLua2 constructs a new QsciLexerLua object.
|
||||
func NewQsciLexerLua2(parent *qt.QObject) *QsciLexerLua {
|
||||
ret := C.QsciLexerLua_new2((*C.QObject)(parent.UnsafePointer()))
|
||||
return newQsciLexerLua(ret)
|
||||
}
|
||||
|
||||
func (this *QsciLexerLua) MetaObject() *qt.QMetaObject {
|
||||
return qt.UnsafeNewQMetaObject(unsafe.Pointer(C.QsciLexerLua_MetaObject(this.h)))
|
||||
}
|
||||
|
||||
func (this *QsciLexerLua) Metacast(param1 string) unsafe.Pointer {
|
||||
param1_Cstring := C.CString(param1)
|
||||
defer C.free(unsafe.Pointer(param1_Cstring))
|
||||
return (unsafe.Pointer)(C.QsciLexerLua_Metacast(this.h, param1_Cstring))
|
||||
}
|
||||
|
||||
func QsciLexerLua_Tr(s string) string {
|
||||
s_Cstring := C.CString(s)
|
||||
defer C.free(unsafe.Pointer(s_Cstring))
|
||||
var _ms C.struct_miqt_string = C.QsciLexerLua_Tr(s_Cstring)
|
||||
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
||||
C.free(unsafe.Pointer(_ms.data))
|
||||
return _ret
|
||||
}
|
||||
|
||||
func QsciLexerLua_TrUtf8(s string) string {
|
||||
s_Cstring := C.CString(s)
|
||||
defer C.free(unsafe.Pointer(s_Cstring))
|
||||
var _ms C.struct_miqt_string = C.QsciLexerLua_TrUtf8(s_Cstring)
|
||||
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
||||
C.free(unsafe.Pointer(_ms.data))
|
||||
return _ret
|
||||
}
|
||||
|
||||
func (this *QsciLexerLua) Language() string {
|
||||
_ret := C.QsciLexerLua_Language(this.h)
|
||||
return C.GoString(_ret)
|
||||
}
|
||||
|
||||
func (this *QsciLexerLua) Lexer() string {
|
||||
_ret := C.QsciLexerLua_Lexer(this.h)
|
||||
return C.GoString(_ret)
|
||||
}
|
||||
|
||||
func (this *QsciLexerLua) AutoCompletionWordSeparators() []string {
|
||||
var _ma *C.struct_miqt_array = C.QsciLexerLua_AutoCompletionWordSeparators(this.h)
|
||||
_ret := make([]string, int(_ma.len))
|
||||
_outCast := (*[0xffff]C.struct_miqt_string)(unsafe.Pointer(_ma.data)) // hey ya
|
||||
for i := 0; i < int(_ma.len); i++ {
|
||||
var _lv_ms C.struct_miqt_string = _outCast[i]
|
||||
_lv_ret := C.GoStringN(_lv_ms.data, C.int(int64(_lv_ms.len)))
|
||||
C.free(unsafe.Pointer(_lv_ms.data))
|
||||
_ret[i] = _lv_ret
|
||||
}
|
||||
C.free(unsafe.Pointer(_ma))
|
||||
return _ret
|
||||
}
|
||||
|
||||
func (this *QsciLexerLua) BlockStart() string {
|
||||
_ret := C.QsciLexerLua_BlockStart(this.h)
|
||||
return C.GoString(_ret)
|
||||
}
|
||||
|
||||
func (this *QsciLexerLua) BraceStyle() int {
|
||||
return (int)(C.QsciLexerLua_BraceStyle(this.h))
|
||||
}
|
||||
|
||||
func (this *QsciLexerLua) DefaultColor(style int) *qt.QColor {
|
||||
_ret := C.QsciLexerLua_DefaultColor(this.h, (C.int)(style))
|
||||
_goptr := qt.UnsafeNewQColor(unsafe.Pointer(_ret))
|
||||
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
|
||||
return _goptr
|
||||
}
|
||||
|
||||
func (this *QsciLexerLua) DefaultEolFill(style int) bool {
|
||||
return (bool)(C.QsciLexerLua_DefaultEolFill(this.h, (C.int)(style)))
|
||||
}
|
||||
|
||||
func (this *QsciLexerLua) DefaultFont(style int) *qt.QFont {
|
||||
_ret := C.QsciLexerLua_DefaultFont(this.h, (C.int)(style))
|
||||
_goptr := qt.UnsafeNewQFont(unsafe.Pointer(_ret))
|
||||
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
|
||||
return _goptr
|
||||
}
|
||||
|
||||
func (this *QsciLexerLua) DefaultPaper(style int) *qt.QColor {
|
||||
_ret := C.QsciLexerLua_DefaultPaper(this.h, (C.int)(style))
|
||||
_goptr := qt.UnsafeNewQColor(unsafe.Pointer(_ret))
|
||||
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
|
||||
return _goptr
|
||||
}
|
||||
|
||||
func (this *QsciLexerLua) Keywords(set int) string {
|
||||
_ret := C.QsciLexerLua_Keywords(this.h, (C.int)(set))
|
||||
return C.GoString(_ret)
|
||||
}
|
||||
|
||||
func (this *QsciLexerLua) Description(style int) string {
|
||||
var _ms C.struct_miqt_string = C.QsciLexerLua_Description(this.h, (C.int)(style))
|
||||
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
||||
C.free(unsafe.Pointer(_ms.data))
|
||||
return _ret
|
||||
}
|
||||
|
||||
func (this *QsciLexerLua) RefreshProperties() {
|
||||
C.QsciLexerLua_RefreshProperties(this.h)
|
||||
}
|
||||
|
||||
func (this *QsciLexerLua) FoldCompact() bool {
|
||||
return (bool)(C.QsciLexerLua_FoldCompact(this.h))
|
||||
}
|
||||
|
||||
func (this *QsciLexerLua) SetFoldCompact(fold bool) {
|
||||
C.QsciLexerLua_SetFoldCompact(this.h, (C.bool)(fold))
|
||||
}
|
||||
|
||||
func QsciLexerLua_Tr2(s string, c string) string {
|
||||
s_Cstring := C.CString(s)
|
||||
defer C.free(unsafe.Pointer(s_Cstring))
|
||||
c_Cstring := C.CString(c)
|
||||
defer C.free(unsafe.Pointer(c_Cstring))
|
||||
var _ms C.struct_miqt_string = C.QsciLexerLua_Tr2(s_Cstring, c_Cstring)
|
||||
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
||||
C.free(unsafe.Pointer(_ms.data))
|
||||
return _ret
|
||||
}
|
||||
|
||||
func QsciLexerLua_Tr3(s string, c string, n int) string {
|
||||
s_Cstring := C.CString(s)
|
||||
defer C.free(unsafe.Pointer(s_Cstring))
|
||||
c_Cstring := C.CString(c)
|
||||
defer C.free(unsafe.Pointer(c_Cstring))
|
||||
var _ms C.struct_miqt_string = C.QsciLexerLua_Tr3(s_Cstring, c_Cstring, (C.int)(n))
|
||||
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
||||
C.free(unsafe.Pointer(_ms.data))
|
||||
return _ret
|
||||
}
|
||||
|
||||
func QsciLexerLua_TrUtf82(s string, c string) string {
|
||||
s_Cstring := C.CString(s)
|
||||
defer C.free(unsafe.Pointer(s_Cstring))
|
||||
c_Cstring := C.CString(c)
|
||||
defer C.free(unsafe.Pointer(c_Cstring))
|
||||
var _ms C.struct_miqt_string = C.QsciLexerLua_TrUtf82(s_Cstring, c_Cstring)
|
||||
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
||||
C.free(unsafe.Pointer(_ms.data))
|
||||
return _ret
|
||||
}
|
||||
|
||||
func QsciLexerLua_TrUtf83(s string, c string, n int) string {
|
||||
s_Cstring := C.CString(s)
|
||||
defer C.free(unsafe.Pointer(s_Cstring))
|
||||
c_Cstring := C.CString(c)
|
||||
defer C.free(unsafe.Pointer(c_Cstring))
|
||||
var _ms C.struct_miqt_string = C.QsciLexerLua_TrUtf83(s_Cstring, c_Cstring, (C.int)(n))
|
||||
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
||||
C.free(unsafe.Pointer(_ms.data))
|
||||
return _ret
|
||||
}
|
||||
|
||||
func (this *QsciLexerLua) BlockStart1(style *int) string {
|
||||
_ret := C.QsciLexerLua_BlockStart1(this.h, (*C.int)(unsafe.Pointer(style)))
|
||||
return C.GoString(_ret)
|
||||
}
|
||||
|
||||
// Delete this object from C++ memory.
|
||||
func (this *QsciLexerLua) Delete() {
|
||||
C.QsciLexerLua_Delete(this.h)
|
||||
}
|
||||
|
||||
// GoGC adds a Go Finalizer to this pointer, so that it will be deleted
|
||||
// from C++ memory once it is unreachable from Go memory.
|
||||
func (this *QsciLexerLua) GoGC() {
|
||||
runtime.SetFinalizer(this, func(this *QsciLexerLua) {
|
||||
this.Delete()
|
||||
runtime.KeepAlive(this.h)
|
||||
})
|
||||
}
|
61
qt-restricted-extras/qscintilla/gen_qscilexerlua.h
Normal file
61
qt-restricted-extras/qscintilla/gen_qscilexerlua.h
Normal file
@ -0,0 +1,61 @@
|
||||
#ifndef GEN_QSCILEXERLUA_H
|
||||
#define GEN_QSCILEXERLUA_H
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||
|
||||
#include "../../libmiqt/libmiqt.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
class QColor;
|
||||
class QFont;
|
||||
class QMetaObject;
|
||||
class QObject;
|
||||
class QsciLexerLua;
|
||||
#else
|
||||
typedef struct QColor QColor;
|
||||
typedef struct QFont QFont;
|
||||
typedef struct QMetaObject QMetaObject;
|
||||
typedef struct QObject QObject;
|
||||
typedef struct QsciLexerLua QsciLexerLua;
|
||||
#endif
|
||||
|
||||
QsciLexerLua* QsciLexerLua_new();
|
||||
QsciLexerLua* QsciLexerLua_new2(QObject* parent);
|
||||
QMetaObject* QsciLexerLua_MetaObject(const QsciLexerLua* self);
|
||||
void* QsciLexerLua_Metacast(QsciLexerLua* self, const char* param1);
|
||||
struct miqt_string QsciLexerLua_Tr(const char* s);
|
||||
struct miqt_string QsciLexerLua_TrUtf8(const char* s);
|
||||
const char* QsciLexerLua_Language(const QsciLexerLua* self);
|
||||
const char* QsciLexerLua_Lexer(const QsciLexerLua* self);
|
||||
struct miqt_array* QsciLexerLua_AutoCompletionWordSeparators(const QsciLexerLua* self);
|
||||
const char* QsciLexerLua_BlockStart(const QsciLexerLua* self);
|
||||
int QsciLexerLua_BraceStyle(const QsciLexerLua* self);
|
||||
QColor* QsciLexerLua_DefaultColor(const QsciLexerLua* self, int style);
|
||||
bool QsciLexerLua_DefaultEolFill(const QsciLexerLua* self, int style);
|
||||
QFont* QsciLexerLua_DefaultFont(const QsciLexerLua* self, int style);
|
||||
QColor* QsciLexerLua_DefaultPaper(const QsciLexerLua* self, int style);
|
||||
const char* QsciLexerLua_Keywords(const QsciLexerLua* self, int set);
|
||||
struct miqt_string QsciLexerLua_Description(const QsciLexerLua* self, int style);
|
||||
void QsciLexerLua_RefreshProperties(QsciLexerLua* self);
|
||||
bool QsciLexerLua_FoldCompact(const QsciLexerLua* self);
|
||||
void QsciLexerLua_SetFoldCompact(QsciLexerLua* self, bool fold);
|
||||
struct miqt_string QsciLexerLua_Tr2(const char* s, const char* c);
|
||||
struct miqt_string QsciLexerLua_Tr3(const char* s, const char* c, int n);
|
||||
struct miqt_string QsciLexerLua_TrUtf82(const char* s, const char* c);
|
||||
struct miqt_string QsciLexerLua_TrUtf83(const char* s, const char* c, int n);
|
||||
const char* QsciLexerLua_BlockStart1(const QsciLexerLua* self, int* style);
|
||||
void QsciLexerLua_Delete(QsciLexerLua* self);
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern C */
|
||||
#endif
|
||||
|
||||
#endif
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user