Golang bindings of Sciter: the Embeddable HTML/CSS/script engine for modern UI development

Go bindings for Sciter

Build status Build Status License Join the forums at https://sciter.com/forums

Check this page for other language bindings (Delphi / D / Go / .NET / Python / Rust).


Attention

The ownership of project is transferred to this new organization. Thus the import path for golang should now be github.com/sciter-sdk/go-sciter, but the package name is still sciter.

Introduction

This package provides a Golang bindings of Sciter using cgo. Using go sciter you must have the platform specified sciter dynamic library downloaded from sciter-sdk, the library itself is rather small (under 5MB, less than 2MB when upxed) .

Most Sciter API are supported, including:

  • Html string/file loading
  • DOM manipulation/callback/event handling
  • DOM state/attribute handling
  • Custom resource loading
  • Sciter Behavior
  • Sciter Options
  • Sciter Value support
  • NativeFunctor (used in sciter scripting)

And the API are organized in more or less a gopher friendly way.

Things that are not supported:

  • Sciter Node API
  • TIScript Engine API

Getting Started

At the moment only Go 1.10 or higher is supported (issue #136).

  1. Download the sciter-sdk

  2. Extract the sciter runtime library from sciter-sdk to system PATH

    The runtime libraries lives in bin bin.lnx bin.osx with suffix like dll so or dylib

    • Windows: simply copying bin\64\sciter.dll to c:\windows\system32 is just enough
    • Linux:
      • cd sciter-sdk/bin.lnx/x64
      • export LIBRARY_PATH=$PWD
      • echo $PWD >> libsciter.conf
      • sudo cp libsciter.conf /etc/ld.so.conf.d/
      • sudo ldconfig
      • ldconfig -p | grep sciter should print libsciter-gtk.so location
    • OSX:
      • cd sciter-sdk/bin.osx/
      • export DYLD_LIBRARY_PATH=$PWD
  3. Set up GCC envrionmnet for CGO

    mingw64-gcc (5.2.0 and 7.2.0 are tested) is recommended for Windows users.

    Under Linux gcc(4.8 or above) and gtk+-3.0 are needed.

  4. go get -x github.com/sciter-sdk/go-sciter

  5. Run the example and enjoy :)

Sciter Desktop UI Examples

Sciter Version Support

Currently supports Sciter version 4.0.0.0 and higher.

About Sciter

Sciter is an Embeddable HTML/CSS/script engine for modern UI development, Web designers, and developers, can reuse their experience and expertise in creating modern looking desktop applications.

In my opinion, Sciter , though not open sourced, is an great desktop UI development envrionment using the full stack of web technologies, which is rather small (under 5MB) especially compared to CEF,Node Webkit and Atom Electron. :)

Finally, according to Andrew Fedoniouk the author and the Sciter END USER LICENSE AGREEMENT , the binary form of the Sciter dynamic libraries are totally free to use for commercial or non-commercial applications.

The Tailored Sciter C Headers

This binding ueses a tailored version of the sciter C Headers, which lives in directory: include. The included c headers are a modified version of the sciter-sdk standard headers.

It seems Sciter is developed using C++, and the included headers in the Sciter SDK are a mixture of C and C++, which is not quite suitable for an easy golang binding.

I'm not much fond of C++ since I started to use Golang, so I made this modification and hope Andrew Fedoniouk the author would provide pure C header files for Sciter. :)

Owner
Terra Informatica Software, Inc
Sciter SDK bindings
Terra Informatica Software, Inc
Comments
  • go build error under OSX

    go build error under OSX

    github.com/oskca/sciter

    In file included from ./sciter.go:11: In file included from include/sciter-x.h:4: include/sciter-x-types.h:115:11: error: unknown type name 'uint16_t' typedef uint16_t WCHAR; ^ include/sciter-x-types.h:121:11: error: unknown type name 'size_t' typedef size_t UINT_PTR; ^ 2 errors generated.

  • Async in tiscript doesn't work.

    Async in tiscript doesn't work.

    My code is below

    async function someLongOp() {
      $(#btnGo).state.disabled = true;
    
      var result = await longOp();
    
      $(#btnGo).state.disabled = false;
    } 
    
    self.post(function() {
      $(#btnGo).on("click", function() {
        someLongOp();
      })
    })
    

    It suppose to be a async call, but the main thread is blocked. Am I using await in the right way?

  • missed uchar.h on osx

    missed uchar.h on osx

    github.com/sciter-sdk/go-sciter

    In file included from ./sciter.go:11: In file included from include/sciter-x.h:20: include/sciter-x-types.h:30:12: fatal error: 'uchar.h' file not found #include <uchar.h> ^ 1 error generated.

  • Sciter bindings maintenance discussion

    Sciter bindings maintenance discussion

    Hi there,

    According to your attention ad:

    This project is not maintained for a quite long time and is looking for a new project owner or some active contributors.

    May it would be better to create organization for Sciter bindings and transfer our repositories there?

    Also it would be easier to accept PRs, for example. I was going to update your Go bindings, but now I think that its even better to collect all repositories in single place.

    cc @c-smile @pravic @midiway @da-baranov @oskca

    Update: https://github.com/sciter-sdk here it is.

  • update to Sciter v4 needed or not ?

    update to Sciter v4 needed or not ?

    Hello all,

    just begin to read Sciter docs and looking here to use it with Go, but didn't tried anything yet. I saw that Sciter is now at v4.x, but it's indicate here a support of v3.3.03.

    is it a problem ? should I search to download an old Sciter version ? should I wait for an update of oskca/sciter ? is there an update planned..??

    thanks. ffred

  • .SetOption(sciter.SCITER_SET_GFX_LAYER,4) Do not work

    .SetOption(sciter.SCITER_SET_GFX_LAYER,4) Do not work

    hello , I use xxx.exe -sciter-fgx=skia , It can work;

    but this code is do not work

    w,err := .......
    .....
    w.SetOption(sciter.SCITER_SET_GFX_LAYER,4)
    

    please help me fix it ,thank you !

  • SetText adds strange spacing before text

    SetText adds strange spacing before text

    Hi, I'm trying to get familiar with Sciter, so I tried to call some common DOM functions from Go using Go-sciter.

    Using SetText("") inside a "for" loop to change text periodically adds strange spaces before the text everytime the text gets updated.

    Notes: Using the inspector, I couldn't spot any space characters being added. Also, the inspector doesn't update with new text when SetText is used. The problem doesn't occur when SetHtml is used, and the updates are instantly reflected on the inspector. When display: inline-block is set on the element, the spacing disappears.

    UPDATE: using the inspector's this.text doesn't show the same behavior, it updates the text without the strange space

    The code below produces the described incidence.

    Click to expand!

    main.go

    
    https://user-images.githubusercontent.com/8347078/105359287-545ff280-5c08-11eb-8c53-91bddbfc3781.mp4
    
    
    package main
    
    import (
    	"time"
    
    	"github.com/lxn/win"
    	"github.com/sciter-sdk/go-sciter"
    	"github.com/sciter-sdk/go-sciter/window"
    )
    
    func main() {
    	rect := createRectInTheMiddle(1280, 720)
    	w, err := window.New(sciter.SW_RESIZEABLE|sciter.SW_CONTROLS|
    		sciter.SW_MAIN|sciter.SW_ENABLE_DEBUG,
    		rect)
    	if err != nil {
    		panic(err)
    	}
    
    	err = w.Sciter.LoadFile("./index.html")
    	if err != nil {
    		panic(err)
    	}
    
    	w.Show()
    	go func() {
    		root, err := w.GetRootElement()
    		if err != nil {
    			panic(err)
    		}
    		app, err := root.SelectById("app")
    		if err != nil {
    			panic(err)
    		}
    		el, err := sciter.CreateElement("H1", "Hi")
    		if err != nil {
    			panic(err)
    		}
    		app.Append(el)
    		//el.SetStyle("display", "inline-block")
    		Is := ""
    		for i := 0; i < 100; i++ {
    			text := "Hi"
    			Is += "i"
    			el.SetText(text+Is)
    			time.Sleep(time.Second)
    		}
    	}()
    	w.Run()
    }
    
    func createRectInTheMiddle(width, height int) *sciter.Rect {
    	screenWidth := int(win.GetSystemMetrics(win.SM_CXSCREEN))
    	screenHeight := int(win.GetSystemMetrics(win.SM_CYSCREEN))
    	top := (screenHeight - height) / 2
    	left := (screenWidth - width) / 2
    	return sciter.NewRect(top, left, width, height)
    }
    

    index.html

    <!DOCTYPE html>
    <html lang="en">
    <head>
    	<meta charset="UTF-8">
    	<meta name="viewport" content="width=device-width, initial-scale=1.0">
    	<title>Document</title>
    </head>
    <body>
    	<div id="app"></div>
    </body>
    </html>
    

    A video demonstrating the problem.

    https://user-images.githubusercontent.com/8347078/105359325-60e44b00-5c08-11eb-81cc-3b3d064a1b92.mp4

  • No longer compiles after go 1.15 released

    No longer compiles after go 1.15 released

    program stops compiling after 1.15 go release:

    [sciter]$ go build

    github.com/sciter-sdk/go-sciter

    ../../../go/pkg/mod/github.com/sciter-sdk/[email protected]/sciter.go:110:145: cannot use _cgo0 (type _Ctype_HWINDOW) as type unsafe.Pointer in argument to _Cfunc_SciterDataReady ../../../go/pkg/mod/github.com/sciter-sdk/[email protected]/sciter.go:141:85: cannot use _cgo0 (type _Ctype_HWINDOW) as type unsafe.Pointer in argument to _Cfunc_SciterDataReadyAsync ../../../go/pkg/mod/github.com/sciter-sdk/[email protected]/sciter.go:151:120: cannot use _cgo0 (type _Ctype_HWINDOW) as type unsafe.Pointer in argument to _Cfunc_SciterLoadFile ../../../go/pkg/mod/github.com/sciter-sdk/[email protected]/sciter.go:174:104: cannot use _cgo0 (type _Ctype_HWINDOW) as type unsafe.Pointer in argument to _Cfunc_SciterLoadHtml ../../../go/pkg/mod/github.com/sciter-sdk/[email protected]/sciter.go:242:142: cannot use _cgo0 (type _Ctype_HWINDOW) as type unsafe.Pointer in argument to _Cfunc_SciterSetCallback ../../../go/pkg/mod/github.com/sciter-sdk/[email protected]/sciter.go:296:60: cannot use _cgo0 (type _Ctype_HWINDOW) as type unsafe.Pointer in argument to _Cfunc_SciterSetCSS ../../../go/pkg/mod/github.com/sciter-sdk/[email protected]/sciter.go:319:110: cannot use _cgo0 (type _Ctype_HWINDOW) as type unsafe.Pointer in argument to _Cfunc_SciterSetMediaType ../../../go/pkg/mod/github.com/sciter-sdk/[email protected]/sciter.go:330:96: cannot use _cgo0 (type _Ctype_HWINDOW) as type unsafe.Pointer in argument to _Cfunc_SciterGetMinWidth ../../../go/pkg/mod/github.com/sciter-sdk/[email protected]/sciter.go:339:106: cannot use _cgo0 (type _Ctype_HWINDOW) as type unsafe.Pointer in argument to _Cfunc_SciterGetMinHeight ../../../go/pkg/mod/github.com/sciter-sdk/[email protected]/sciter.go:359:48: cannot use _cgo0 (type _Ctype_HWINDOW) as type unsafe.Pointer in argument to _Cfunc_SciterCall ../../../go/pkg/mod/github.com/sciter-sdk/[email protected]/sciter.go:359:48: too many errors

  • Added Vendoring support to project, now sciter-x.h file not found

    Added Vendoring support to project, now sciter-x.h file not found

    I have the dylib in the project folder and I also tried setting the path to it via export DYLD_LIBRARY_PATH and still get this error unless I delete the vendor folder.

    go build . main.tech.com/go/dupcheck/vendor/github.com/sciter-sdk/go-sciter vendor/github.com/sciter-sdk/go-sciter/sciter.go:11:10: fatal error: 'sciter-x.h' file not found #include "sciter-x.h" ^~~~~~~~~~~~ 1 error generated.

  •  Unhandled sciter event case: 32768 cause panic in windows 10

    Unhandled sciter event case: 32768 cause panic in windows 10

    err1 err2 err3

    Here is my code:

    // handling callback for element event
    func (dom *DomOpt) SetElementHandlers() {
    	// handling for btn1
    	btn1, _ := dom.Root.SelectById("btn1")
    	btn1.DefineMethod("btn1ClickHandler", func(args ...*sciter.Value) *sciter.Value {
    		for _, arg := range args {
    			fmt.Print(arg.String() + " ")
    		}
    		return sciter.NullValue()
    	})
    
    	// handling for btn2
    	btn2, _ := dom.Root.SelectById("btn2")
    	data, _ := btn2.CallMethod("btn2ClickHandler",
    		sciter.NewValue("1"),
    		sciter.NewValue("2"),
    		sciter.NewValue("3"))
    
    	fmt.Println(data.String())
    }
    

    It works when doing comment in sciter.go:

    // log.Panic("Unhandled sciter event case: ", evtg)
    

    [email protected] MINGW32 /d/workspace/gopro/gui $ ./mixure.exe function def of btn2--->test2 "1" "2" "3" 2020/06/21 23:33:28 Unhandled sciter event case: 32768 panic: Unhandled sciter event case: 32768

    goroutine 1 [running]: log.Panic(0xc000087bc8, 0x2, 0x2) D:/devenv/go/src/log/log.go:351 +0xb3 github.com/sciter-sdk/go-sciter.goElementEventProc(0x0, 0x0, 0x8000, 0xb9ec50, 0x38) D:/devenv/golib/pkg/mod/github.com/sciter-sdk/[email protected]/sciter.go:1468 +0x300 github.com/sciter-sdk/go-sciter._cgoexpwrap_a267971ed125_goElementEventProc(0x0, 0x0, 0x8000, 0xb9ec50, 0xb9ed90) _cgo_gotypes.go:2030 +0x50 syscall.Syscall(0x7ff8488943a0, 0x2, 0x5c0818, 0x5, 0x0, 0x0, 0x0, 0x0) D:/devenv/go/src/runtime/syscall_windows.go:188 +0xe9 github.com/lxn/win.ShowWindow(0x5c0818, 0xc000000005, 0xc00000a640) D:/devenv/golib/pkg/mod/github.com/lxn/[email protected]/user32.go:3273 +0x6a github.com/sciter-sdk/go-sciter/window.(*Window).Show(0xc00003ed70) D:/devenv/golib/pkg/mod/github.com/sciter-sdk/[email protected]/window/window_windows.go:42 +0x45 main.main() D:/workspace/gopro/gui/main.go:100 +0x3d2

  • default callback handler that resolve files archived using packfolder

    default callback handler that resolve files archived using packfolder

    There should be a defaultCallBackHandler function that resolves files from archive.

    Function

    func (sc *Sciter) DefaultCallBackHandler() {
    	callback := &CallbackHandler{
    		OnLoadData: func(params *ScnLoadData) int {
    			if strings.HasPrefix(params.Uri(), "file://") {
    				fileData := sc.GetArchiveItem(params.Uri()[7:])
    				sc.DataReady(params.Uri()[7:], fileData)
    			}
    			return 0
    		},
    	}
    	sc.SetCallback(callback)
    }
    

    Useage

    func main() {
    	
    	rect := sciter.NewRect(100, 100, 300, 500)	
    	win, _ := window.New(sciter.SW_MAIN|sciter.SW_CONTROLS|sciter.SW_ENABLE_DEBUG, rect)
     
    	win.DefaultCallBackHandler() //  Will resolved file path during OnLoadData event
    	win.OpenArchive(resources)
    
    	htbytes := win.GetArchiveItem("notepad.htm")
    	win.LoadHtml(string(htbytes), "")
    	win.SetTitle("Demo")
    
    	win.Show()
    	win.Run()
    
    	win.CloseArchive()
    }
    
    
  • Systray not working

    Systray not working

    [xcb] Unknown sequence number while processing queue [xcb] Most likely this is a multi-threaded client and XInitThreads has not been called [xcb] Aborting, sorry about that. HelloSciter: ../../src/xcb_io.c:278: poll_for_event: Assertion `!xcb_xlib_threads_sequence_lost' failed. SIGABRT: abort PC=0x7f651748983c m=0 sigcode=18446744073709551610 signal arrived during cgo execution

    goroutine 1 [syscall, locked to thread]: runtime.cgocall(0x581510, 0xc000119f40) /usr/lib/go-1.19/src/runtime/cgocall.go:158 +0x5c fp=0xc000119f18 sp=0xc000119ee0 pc=0x40bd1c github.com/getlantern/systray._Cfunc_nativeLoop() _cgo_gotypes.go:140 +0x48 fp=0xc000119f40 sp=0xc000119f18 pc=0x56f468 github.com/getlantern/systray.nativeLoop(...) /home/kali/go/pkg/mod/github.com/getlantern/[email protected]/systray_nonwindows.go:18 github.com/getlantern/systray.Run(0x59d180?, 0xc0000061a0?) /home/kali/go/pkg/mod/github.com/getlantern/[email protected]/systray.go:78 +0x1f fp=0xc000119f60 sp=0xc000119f40 pc=0x56ea9f main.main() /home/kali/go/src/HelloSciter/main.go:14 +0x27 fp=0xc000119f80 sp=0xc000119f60 pc=0x580d07 runtime.main() /usr/lib/go-1.19/src/runtime/proc.go:250 +0x212 fp=0xc000119fe0 sp=0xc000119f80 pc=0x43fc12 runtime.goexit() /usr/lib/go-1.19/src/runtime/asm_amd64.s:1594 +0x1 fp=0xc000119fe8 sp=0xc000119fe0 pc=0x46c581

    goroutine 2 [force gc (idle)]: runtime.gopark(0x0?, 0x0?, 0x0?, 0x0?, 0x0?) /usr/lib/go-1.19/src/runtime/proc.go:363 +0xd6 fp=0xc00003cfb0 sp=0xc00003cf90 pc=0x43ffd6 runtime.goparkunlock(...) /usr/lib/go-1.19/src/runtime/proc.go:369 runtime.forcegchelper() /usr/lib/go-1.19/src/runtime/proc.go:302 +0xad fp=0xc00003cfe0 sp=0xc00003cfb0 pc=0x43fe6d runtime.goexit() /usr/lib/go-1.19/src/runtime/asm_amd64.s:1594 +0x1 fp=0xc00003cfe8 sp=0xc00003cfe0 pc=0x46c581 created by runtime.init.6 /usr/lib/go-1.19/src/runtime/proc.go:290 +0x25

    goroutine 3 [GC sweep wait]: runtime.gopark(0x0?, 0x0?, 0x0?, 0x0?, 0x0?) /usr/lib/go-1.19/src/runtime/proc.go:363 +0xd6 fp=0xc00003d790 sp=0xc00003d770 pc=0x43ffd6 runtime.goparkunlock(...) /usr/lib/go-1.19/src/runtime/proc.go:369 runtime.bgsweep(0x0?) /usr/lib/go-1.19/src/runtime/mgcsweep.go:278 +0x8e fp=0xc00003d7c8 sp=0xc00003d790 pc=0x42c82e runtime.gcenable.func1() /usr/lib/go-1.19/src/runtime/mgc.go:178 +0x26 fp=0xc00003d7e0 sp=0xc00003d7c8 pc=0x4216e6 runtime.goexit() /usr/lib/go-1.19/src/runtime/asm_amd64.s:1594 +0x1 fp=0xc00003d7e8 sp=0xc00003d7e0 pc=0x46c581 created by runtime.gcenable /usr/lib/go-1.19/src/runtime/mgc.go:178 +0x6b

    goroutine 4 [GC scavenge wait]: runtime.gopark(0xc000064000?, 0x630510?, 0x1?, 0x0?, 0x0?) /usr/lib/go-1.19/src/runtime/proc.go:363 +0xd6 fp=0xc00003df70 sp=0xc00003df50 pc=0x43ffd6 runtime.goparkunlock(...) /usr/lib/go-1.19/src/runtime/proc.go:369 runtime.(*scavengerState).park(0x74d540) /usr/lib/go-1.19/src/runtime/mgcscavenge.go:389 +0x53 fp=0xc00003dfa0 sp=0xc00003df70 pc=0x42a8d3 runtime.bgscavenge(0x0?) /usr/lib/go-1.19/src/runtime/mgcscavenge.go:617 +0x45 fp=0xc00003dfc8 sp=0xc00003dfa0 pc=0x42aea5 runtime.gcenable.func2() /usr/lib/go-1.19/src/runtime/mgc.go:179 +0x26 fp=0xc00003dfe0 sp=0xc00003dfc8 pc=0x421686 runtime.goexit() /usr/lib/go-1.19/src/runtime/asm_amd64.s:1594 +0x1 fp=0xc00003dfe8 sp=0xc00003dfe0 pc=0x46c581 created by runtime.gcenable /usr/lib/go-1.19/src/runtime/mgc.go:179 +0xaa

    goroutine 5 [finalizer wait]: runtime.gopark(0x74dac0?, 0xc000007860?, 0x0?, 0x0?, 0xc00003c770?) /usr/lib/go-1.19/src/runtime/proc.go:363 +0xd6 fp=0xc00003c628 sp=0xc00003c608 pc=0x43ffd6 runtime.goparkunlock(...) /usr/lib/go-1.19/src/runtime/proc.go:369 runtime.runfinq() /usr/lib/go-1.19/src/runtime/mfinal.go:180 +0x10f fp=0xc00003c7e0 sp=0xc00003c628 pc=0x4207ef runtime.goexit() /usr/lib/go-1.19/src/runtime/asm_amd64.s:1594 +0x1 fp=0xc00003c7e8 sp=0xc00003c7e0 pc=0x46c581 created by runtime.createfing /usr/lib/go-1.19/src/runtime/mfinal.go:157 +0x45

    goroutine 10 [syscall]: runtime.cgocall(0x5831e0, 0xc00003fdc8) /usr/lib/go-1.19/src/runtime/cgocall.go:158 +0x5c fp=0xc00003fda0 sp=0xc00003fd68 pc=0x40bd1c github.com/sciter-sdk/go-sciter._Cfunc_SciterLoadFile(0x7f64d80f90f0, 0xc0000a00c0) _cgo_gotypes.go:1576 +0x4c fp=0xc00003fdc8 sp=0xc00003fda0 pc=0x570e8c github.com/sciter-sdk/go-sciter.(*Sciter).LoadFile.func1(0x0?, {0x5db591?, 0xc00003fe40?}) /home/kali/go/pkg/mod/github.com/sciter-sdk/[email protected]/sciter.go:158 +0x68 fp=0xc00003fe08 sp=0xc00003fdc8 pc=0x571a48 github.com/sciter-sdk/go-sciter.(*Sciter).LoadFile(0xc000000282?, {0x5db591, 0xb}) /home/kali/go/pkg/mod/github.com/sciter-sdk/[email protected]/sciter.go:158 +0x25 fp=0xc00003fe50 sp=0xc00003fe08 pc=0x571945 main.showGUI() /home/kali/go/src/HelloSciter/main.go:66 +0x72 fp=0xc00003fea0 sp=0xc00003fe50 pc=0x5812d2 main.onReady.func1() /home/kali/go/src/HelloSciter/main.go:31 +0x1aa fp=0xc00003ffe0 sp=0xc00003fea0 pc=0x58106a runtime.goexit() /usr/lib/go-1.19/src/runtime/asm_amd64.s:1594 +0x1 fp=0xc00003ffe8 sp=0xc00003ffe0 pc=0x46c581 created by main.onReady /home/kali/go/src/HelloSciter/main.go:27 +0x17b

    rax 0x0 rbx 0x7f651640cf00 rcx 0x7f651748983c rdx 0x6 rdi 0xc5ea rsi 0xc5ea rbp 0xc5ea rsp 0x7ffc2062eed0 r8 0x7ffc2062efa0 r9 0x12c8780 r10 0x8 r11 0x246 r12 0x6 r13 0x116 r14 0x7f6517080c68 r15 0x11b7560 rip 0x7f651748983c rflags 0x246 cs 0x33 fs 0x0 gs 0x0

    My source code: https://sciter.com/forums/topic/simple-example-not-working/

  • cannot use _cgo0 (type _Ctype_HWINDOW) as type unsafe.Pointer in argument to _Cfunc_SciterDataReady

    cannot use _cgo0 (type _Ctype_HWINDOW) as type unsafe.Pointer in argument to _Cfunc_SciterDataReady

    go get -x github.com/sciter-sdk/go-sciter 出错啊。 ../../../../go/pkg/mod/github.com/sciter-sdk/[email protected]/sciter.go:110:85: cannot use _cgo0 (type _Ctype_HWINDOW) as type unsafe.Pointer in argument to _Cfunc_SciterDataReady ../../../../go/pkg/mod/github.com/sciter-sdk/[email protected]/sciter.go:141:85: cannot use _cgo0 (type _Ctype_HWINDOW) as type unsafe.Pointer in argument to _Cfunc_SciterDataReadyAsync ../../../../go/pkg/mod/github.com/sciter-sdk/[email protected]/sciter.go:151:120: cannot use _cgo0 (type _Ctype_HWINDOW) as type unsafe.Pointer in argument to _Cfunc_SciterLoadFile ../../../../go/pkg/mod/github.com/sciter-sdk/[email protected]/sciter.go:174:104: cannot use _cgo0 (type _Ctype_HWINDOW) as type unsafe.Pointer in argument to _Cfunc_SciterLoadHtml ../../../../go/pkg/mod/github.com/sciter-sdk/[email protected]/sciter.go:242:142: cannot use _cgo0 (type _Ctype_HWINDOW) as type unsafe.Pointer in argument to _Cfunc_SciterSetCallback ../../../../go/pkg/mod/github.com/sciter-sdk/[email protected]/sciter.go:296:60: cannot use _cgo0 (type _Ctype_HWINDOW) as type unsafe.Pointer in argument to _Cfunc_SciterSetCSS ../../../../go/pkg/mod/github.com/sciter-sdk/[email protected]/sciter.go:319:110: cannot use _cgo0 (type _Ctype_HWINDOW) as type unsafe.Pointer in argument to _Cfunc_SciterSetMediaType ../../../../go/pkg/mod/github.com/sciter-sdk/[email protected]/sciter.go:330:96: cannot use _cgo0 (type _Ctype_HWINDOW) as type unsafe.Pointer in argument to _Cfunc_SciterGetMinWidth ../../../../go/pkg/mod/github.com/sciter-sdk/[email protected]/sciter.go:339:106: cannot use _cgo0 (type _Ctype_HWINDOW) as type unsafe.Pointer in argument to _Cfunc_SciterGetMinHeight ../../../../go/pkg/mod/github.com/sciter-sdk/[email protected]/sciter.go:359:48: cannot use _cgo0 (type _Ctype_HWINDOW) as type unsafe.Pointer in argument to _Cfunc_SciterCall ../../../../go/pkg/mod/github.com/sciter-sdk/[email protected]/sciter.go:359:48: too many errors

  • Panicf is excessive

    Panicf is excessive

    Here: https://github.com/sciter-sdk/go-sciter/blob/99cd4de65a26163ff93872ef7bba888b479081dc/sciter.go#L1518 Panicf is excessive - not future compatible.

    Please see: https://sciter.com/forums/topic/build-success-on-mac-os-but-run-error/ for the details.

  • Does go-sciter have a use case for video rendering?

    Does go-sciter have a use case for video rendering?

    I need to do video rendering about video frame

    Render the h264 frame decoded by libavcodec to the display

    Only see sciter VIDEO_BIND_RQ but no use case

    或者任何 in-memory:cursor demo

  • Click Me button does nothing in callback example

    Click Me button does nothing in callback example

    Click Me button does nothing in callback example:

    Configuration:

    [email protected]:~/go-sciter/examples/callback$ go env
    GO111MODULE="auto"
    GOARCH="amd64"
    GOBIN=""
    GOCACHE="/home/vadym/.cache/go-build"
    GOENV="/home/vadym/.config/go/env"
    GOEXE=""
    GOEXPERIMENT=""
    GOFLAGS=""
    GOHOSTARCH="amd64"
    GOHOSTOS="linux"
    GOINSECURE=""
    GOMODCACHE="/home/vadym/go/pkg/mod"
    GONOPROXY=""
    GONOSUMDB=""
    GOOS="linux"
    GOPATH="/home/vadym/go"
    GOPRIVATE=""
    GOPROXY="https://proxy.golang.org,direct"
    GOROOT="/usr/local/go"
    GOSUMDB="sum.golang.org"
    GOTMPDIR=""
    GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64"
    GOVCS=""
    GOVERSION="go1.17.6"
    GCCGO="gccgo"
    AR="ar"
    CC="gcc"
    CXX="g++"
    CGO_ENABLED="1"
    GOMOD="/home/vadym/go-sciter/go.mod"
    CGO_CFLAGS="-g -O2"
    CGO_CPPFLAGS=""
    CGO_CXXFLAGS="-g -O2"
    CGO_FFLAGS="-g -O2"
    CGO_LDFLAGS="-g -O2"
    PKG_CONFIG="pkg-config"
    GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build3178077507=/tmp/go-build -gno-record-gcc-switches"
    

    go.mod:

    [email protected]:~/go-sciter/examples/callback$ cat ../../go.mod 
    module examples/simple
    
    go 1.17
    
    require (
    	github.com/GeertJohan/go.rice v1.0.2
    	github.com/lxn/win v0.0.0-20210218163916-a377121e959e
    	github.com/sciter-sdk/go-sciter v0.5.1-0.20220216200553-99cd4de65a26
    )
    
    require (
    	github.com/daaku/go.zipexe v1.0.0 // indirect
    	golang.org/x/sys v0.0.0-20201018230417-eeed37f84f13 // indirect
    )
    

    Checked in Ubuntu 20: 2022-02-17_14h19_36

    Windows 10:

    2022-02-17_14h19_15

    and MacOS 12.2.1: 2022-02-17_14h28_18

    Corresponding cross-compilation commands were done as well:

    [email protected]:~/go-sciter/examples/callback$ GOOS=windows CGO_ENABLED=1 CXX=x86_64-w64-mingw32-g++ CC=x86_64-w64-mingw32-gcc go build -ldflags="-H=windowsgui"
    [email protected]:~/go-sciter/examples/callback$ sudo /usr/bin/env PATH=$PATH:/usr/local/go/bin:/home/vadym/osxcross/target/bin CC=/home/vadym/osxcross/target/bin/o64-clang CXX=/home/vadym/osxcross/target/bin/o64-clang++ GOOS=darwin CGO_ENABLED=1 go build
    
Elk is a tiny embeddable JavaScript engine that implements a small but usable subset of ES6
Elk is a tiny embeddable JavaScript engine that implements a small but usable subset of ES6

Elk is a tiny embeddable JavaScript engine that implements a small but usable subset of ES6. It is designed for microcontroller development. Instead of writing firmware code in C/C++, Elk allows to develop in JavaScript. Another use case is providing customers with a secure, protected scripting environment for product customisation.

Nov 25, 2022
List of Persian Colors and hex colors for CSS, SCSS, PHP, JS, Python, and Ruby.

Persian Colors (Iranian colors) List of Persian Colors and hex colors for CSS, SCSS, PHP, C++, QML, JS, Python, Ruby and CSharp. Persian colors Name H

Sep 3, 2022
Fast C/C++ CSS Parser (Cascading Style Sheets Parser)

MyCSS — a pure C CSS parser MyCSS is a fast CSS Parser implemented as a pure C99 library with the ability to build without dependencies. Mailing List:

Sep 22, 2022
Port of Golang channels to C++

Copper is a C++ library of a powerful queue object for communication between threads. It is based on Go's channels and follows the quote: Don't commun

Jul 18, 2022
Free,Open-Source,Cross-platform agent and Post-exploiton tool written in Golang and C++, the architecture and usage like Cobalt Strike
Free,Open-Source,Cross-platform agent and Post-exploiton tool written in Golang and C++, the architecture and usage like Cobalt Strike

Khepri Free,Open-Source,Cross-platform agent and Post-exploiton tool written in Golang and C++ Description Khepri is a Cross-platform agent, the archi

Dec 3, 2022
Standalone MinHook wrapper for Golang.

Standalone version of GoMinHook! Credit to https://github.com/NaniteFactory/gominhook and https://github.com/TsudaKageyu/minhook as almost all of the

Jun 4, 2022
Sample module for FreeSWITCH using golang

freeswitch_module_golang_sample Sample module for FreeSWITCH using golang tl; dr

Nov 5, 2022
Imphash-like calculation on Golang binaries

gimphash gimphash is a proposed method to calculate an imphash equivalent for Go binaries. It's name stands for Go-import-hash. Golang binaries contai

Nov 18, 2022
A dependency free, embeddable debugger for Lua in a single file (.lua or .c)
A dependency free, embeddable debugger for Lua in a single file (.lua or .c)

debugger.lua A simple, embedabble debugger for Lua 5.x, and LuaJIT 2.x. debugger.lua is a simple, single file, pure Lua debugger that is easy to integ

Nov 29, 2022
Zep - An embeddable editor, with optional support for using vim keystrokes.
Zep - An embeddable editor, with optional support for using vim keystrokes.

Zep - A Mini Editor Zep is a simple embeddable editor, with a rendering agnostic design and optional Vim mode. It is built as a shared modern-cmake li

Nov 26, 2022
Android Bindings for QuickJS, A fine little javascript engine.

quickjs-android quickjs-android 是 QuickJS JavaScript 引擎的 Android 接口框架,整体基于面向对象设计,提供了自动GC功能,使用简单。armeabi-v7a 的大小仅 350KB,是 Google V8 不错的替代品,启动速度比 V8 快,内

Nov 14, 2022
A Flutter Web Plugin to display Text Widget as Html for SEO purpose
A Flutter Web Plugin to display Text Widget as Html for SEO purpose

SEO Renderer A flutter plugin (under development) to render text widgets as html elements for SEO purpose. Created specifically for issue https://gith

Nov 21, 2022
📃 Export WeChat chat histories to HTML files.
📃 Export WeChat chat histories to HTML files.

wechat-export Export WeChat chat histories to HTML files. Preview This script generates a HTML file for each contact's chat history. Currently it supp

Nov 21, 2022
Convert LLVM coverage information into HTML reports

llvm-coverage-to-html converter The clang compiler supports source based coverage tracking, but the default reporting options are very basic. This too

Oct 11, 2021
A python script loader for Grand Theft Auto San Andreas

PyLoader Introduction This is a .asi plugin that allows writing custom Python scripts for GTA SanAndreas. This plugin is still in the early stages of

Nov 14, 2022
Simple and easy script language for your dead brain, or break time of you.

What is this trush? Shut up, this isnt a trush. Lol This is a easy and simple script language. Change the world. Rotation the world. BIG REVOLUTION OF

May 28, 2021
A new JS script plugin for flutter

js_script Run JS script. Usage // Create a JS context. JsScript script = JsScript(); // Define a class. var classInfo = ClassInfo<TestClass>( newI

Mar 8, 2022
This is Script tools from all attack Denial of service by C programming

RemaxDos Paltfrom Attack RemaxDos This is Script tools from all attack Denial of service Remax Box Team !. Features ! Cam overflow Syn Flooding. Smurf

Sep 11, 2022
A Roblox Script Executor made by me

Roblox Executor A self made Roblox Executor. Works with most scripts and rarely crashes How to use the Roblox Executor [+] - Download it, then compile

Jun 5, 2022