Coder Social home page Coder Social logo

sciter-sdk / go-sciter Goto Github PK

View Code? Open in Web Editor NEW
2.6K 129.0 266.0 2.36 MB

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

Home Page: https://sciter.com

C 17.07% Go 40.75% C++ 42.18%
gui sciter tiscript htmlayout go-binding golang-bindings

go-sciter's Introduction

Go bindings for Sciter

AppVeyor status Travis 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. :)

go-sciter's People

Contributors

105th avatar a9 avatar ashfordn avatar c-smile avatar dadido3 avatar dodobyte avatar golint-fixer avatar inkeliz avatar jerrykwan avatar jqqjj avatar kuznetsovin avatar markusbauer avatar mchampaneri avatar mrg0lden avatar oskca avatar pravic avatar prinzhorn avatar sckelemen avatar shumatech avatar taonylu avatar tejohnso avatar znbang avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

go-sciter's Issues

sciter.Value SetString got wired \u000

in "sciter.go", func (pdst *Value) SetString
variable "chars" is utf16 of param str,
but "numChars" == len(str), which is the length of utf8(str). (as I remember)

some language like Chinese will got unexpected "\u0000\u0000‎" at the end after SetValue and read from tiscript

I think it's a bug here

Resizable

On Windows by default the sciter window is always resizable even if I dont use

SW_RESIZEABLE

At creation... Any solutions?

invoke callback crash

html

<div>
    <button id="btn">Click Me</button>
</div>
<script type="text/tiscript">
function callback(abc){
    view.msgbox(#information,abc);
}

$(#btn).on("click",function(){
    view.getNetInformation(1,"test",callback);
});
</script>

go

package main

import (
    "log"

    "github.com/oskca/sciter"
    "github.com/oskca/sciter/window"
)

func main() {
    w, err := window.New(sciter.SW_TITLEBAR|sciter.SW_RESIZEABLE|sciter.SW_CONTROLS|sciter.SW_MAIN|sciter.SW_ENABLE_DEBUG, nil)
    if err != nil {
        log.Fatal("Create Window Error: ", err)
    }
    w.LoadFile("resource/index.html")
    setEventHandler(w)
    w.Show()
    w.Run()
}

func setEventHandler(w *window.Window) {
    w.DefineFunction("getNetInformation", func(args ...*sciter.Value) *sciter.Value {
        log.Println("Args Length:", len(args))
        log.Println("Arg 0:", args[0], args[0].IsInt())
        log.Println("Arg 1:", args[1], args[1].IsString())
        log.Println("Arg 2:", args[2], args[2].IsFunction())
        fn := args[2]
        fn.Invoke(sciter.NullValue(), "[Native Script]", sciter.NewValue("OK"))
        ret := sciter.NewValue()
        ret.Set("ip", sciter.NewValue("127.0.0.1"))
        return ret
    })
}

output

2016/02/23 16:16:34 Args Length: 3
2016/02/23 16:16:34 Arg 0: 1 true
2016/02/23 16:16:34 Arg 1: test true
2016/02/23 16:16:34 Arg 2:  false
runtime: newstack sp=0x12183ea0 stack=[0x12180000, 0x12183fd8]
    morebuf={pc:0x426408 sp:0x12183ea4 lr:0x0}
    sched={pc:0x42755f sp:0x12183ea0 lr:0x0 ctxt:0x0}
syscall.Syscall(0x7600788b, 0x1, 0x12183f30, 0x0, 0x0, 0x0, 0xf, 0x0)
    c:/go/src/runtime/syscall_windows.go:128 +0x4a
github.com/lxn/win.DispatchMessage(0x12183f30, 0x0)
    D:/Working/Go/Packages/src/github.com/lxn/win/user32.go:1924 +0x43
github.com/oskca/sciter/window.(*Window).Run(0x12170100)
    D:/Working/Go/Packages/src/github.com/oskca/sciter/window/window_windows.go:58 +0x7c
main.main()
    D:/Working/Go/NetworkTools/src/NetworkTools/main.go:18 +0x17e
fatal error: runtime: stack split at bad time

runtime stack:
runtime.throw(0x52c2c0, 0x20)
    c:/go/src/runtime/panic.go:527 +0x7f
runtime.newstack()
    c:/go/src/runtime/stack1.go:694 +0x505
runtime.morestack()
    c:/go/src/runtime/asm_386.s:336 +0x6f

goroutine 1 [syscall, locked to thread]:
runtime.throw(0x532540, 0x2d)
    c:/go/src/runtime/panic.go:521 +0x8 fp=0x12183eb0 sp=0x12183ea4
runtime.exitsyscall(0x0)
    c:/go/src/runtime/proc1.go:1978 +0x52 fp=0x12183ecc sp=0x12183eb0
runtime.cgocall(0x44c250, 0x5adc5c, 0x0)
    c:/go/src/runtime/cgocall.go:122 +0x125 fp=0x12183ee4 sp=0x12183ecc
syscall.Syscall(0x7600788b, 0x1, 0x12183f30, 0x0, 0x0, 0x0, 0xf, 0x0)
    c:/go/src/runtime/syscall_windows.go:128 +0x4a fp=0x12183ef8 sp=0x12183ee4
github.com/lxn/win.DispatchMessage(0x12183f30, 0x0)
    D:/Working/Go/Packages/src/github.com/lxn/win/user32.go:1924 +0x43 fp=0x12183f1c sp=0x12183ef8
github.com/oskca/sciter/window.(*Window).Run(0x12170100)
    D:/Working/Go/Packages/src/github.com/oskca/sciter/window/window_windows.go:58 +0x7c fp=0x12183f50 sp=0x12183f1c
main.main()
    D:/Working/Go/NetworkTools/src/NetworkTools/main.go:18 +0x17e fp=0x12183fa0 sp=0x12183f50
runtime.main()
    c:/go/src/runtime/proc.go:111 +0x234 fp=0x12183fc8 sp=0x12183fa0
runtime.goexit()
    c:/go/src/runtime/asm_386.s:1662 +0x1 fp=0x12183fcc sp=0x12183fc8

goroutine 17 [syscall, locked to thread]:
runtime.goexit()
    c:/go/src/runtime/asm_386.s:1662 +0x1

Is there any problem with my code?

Error caused by go1.6 cgo major change

Run example error

D:\>go version
go version go1.6 windows/amd64
D:\Working\Go\Packages\src\github.com\oskca\sciter\examples\handlers>handlers.exe a.html
2016/02/23 13:48:08 Sciter Version: 30003 10007
panic: runtime error: cgo argument has Go pointer to Go pointer

goroutine 1 [running, locked to thread]:
panic(0x7d0620, 0xc0824205c0)
        c:/go/src/runtime/panic.go:464 +0x3f4
github.com/oskca/sciter.(*Sciter).SetCallback(0xc08209dda0, 0xc08239a6f0)
        D:/Working/Go/Packages/src/github.com/oskca/sciter/sciter.go:222 +0xc8
github.com/oskca/sciter/rice.HandleDataLoad(0xc08209dda0)
        D:/Working/Go/Packages/src/github.com/oskca/sciter/rice/rice.go:73 +0x40
main.main()
        D:/Working/Go/Packages/src/github.com/oskca/sciter/examples/handlers/handlers.go:116 +0x3fe

ele.Html function

I had problem using this function, I used it on 32bit windows 7 like this:
t, _ := ele.Html(true)


The error msg is:
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xc0000005 code=0x1 addr=0x0 pc=0x45c5c8]
goroutine 1 [running, locked to thread]:
panic(0x4f2140, 0x117e8030)
c:/go/src/runtime/panic.go:481 +0x326
github.com/oskca/sciter.goLPCBYTE_RECEIVER(0x35f97474, 0x3f, 0x117e8118, 0x4454e0)
D:/goLib/src/github.com/oskca/sciter/sciter.go:629 +0x78
github.com/oskca/sciter._cgoexpwrap_e84e2fff2be5_goLPCBYTE_RECEIVER(0x35f97474, 0x3f, 0x117e8118, 0x0)
??:0 +0x31
github.com/oskca/sciter._Cfunc_SciterGetElementHtmlCB(0x35fd01a8, 0x1, 0x59d4c0, 0x117e8118, 0x0)
??:0 +0x3d
github.com/oskca/sciter.(*Element).Html(0x117d6c10, 0x508101, 0x0, 0x0, 0x0, 0x0)
D:/goLib/src/github.com/oskca/sciter/sciter.go:675 +0x114
main.main()
C:/Users/Administrator/Desktop/gethtml.go:22 +0x1cc

How to set window title icon

I do not find a method to set an icon for a window and it seems sciter does not implement that, now I have tried to add an icon for the built file but still when running the default icon is shown on the title, I want to know is there an approach to make that in Go, thanks

Error with func (e *Element) Insert(el *Element, index int) error

The log print that i get from the code below is:
"el.Insert(ul, 0) SCDOM_INVALID_HANDLE: SciterInsertElement".

I'm using Sciter Version: 30003 6

go version 1.5.2

    el, err := this.Root.SelectFirst(id)
    if err == nil {
        clearElement(el)
        if errorcount > 0 {
            // add the new errors or messages.
            // ul element
            ul, err := sciter.CreateElement("ul", "")
            if err != nil {
                log.Printf("sciter.CreateElement('ul', '') %s", err.Error())
                return
            }
            err = el.Insert(ul, 0)
            if err != nil {
                log.Printf("el.Insert(ul, 0) %s", err.Error())
                return
            }

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.

OSX Support

I have a Macbook Pro, could someone guide me on how to test everything so we can have OSX support?

Thanks.

handlers example : no html file found

Keep in mind that I'm very new to go (like... 30 minutes new).
I installed everything, it did work, I successfully tested the simple example, but I have no success with handlers : I always get a "no html file found" error.
It probably got to do with rice though, does anyone has a lead to where I should start looking?

Cant' get cause of import cycle

go get -x github.com/oskca/sciter
then I got the following error.

import cycle not allowed
package github.com/oskca/sciter
imports fmt
imports errors
imports runtime
imports runtime/internal/atomic
imports runtime

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

Usage of NthElementKey

I want to enumerate the javascript object keys. Can I use NthElementKey?
I try to use it, but failed, got nil.

Can anyone give me some help.

{
    "string":"hello",
    "number":123
}

I want to get "string" and "number", thanks

examples

import the path of the old. github.com/datagoes/sciter
Examples of the download in win10 seems to have problems , directly out of the middle somewhere .

Getting Started

Hi, it would be very helpful to have a getting started guide. I see the samples folder but couldn't find information about setting up the sciter-sdk-3.

Thanks

Error whilst installing with gccgo

Really want to get started with this, but after yielding:

go get -x github.com/oskca/sciter

I face an error wall that looks like so:

WORK=/tmp/go-build855795623
mkdir -p $WORK/github.com/oskca/sciter/_obj/
mkdir -p $WORK/github.com/oskca/
cd /home/vincent/Downloads/code/golang/src/github.com/oskca/sciter
pkg-config --cflags gtk+-3.0
pkg-config --libs gtk+-3.0
CGO_LDFLAGS="-g" "-O2" "-ldl" "-lgtk-3" "-lgdk-3" "-lpangocairo-1.0" "-lpango-1.0" "-latk-1.0" "-lcairo-gobject" "-lcairo" "-lgdk_pixbuf-2.0" "-lgio-2.0" "-lgobject-2.0" "-lglib-2.0" /usr/lib/gcc/x86_64-unknown-linux-gnu/5.2.0/cgo -objdir $WORK/github.com/oskca/sciter/_obj/ -gccgo -gccgopkgpath=github.com/oskca/sciter -- -pthread -I/usr/include/gtk-3.0 -I/usr/include/at-spi2-atk/2.0 -I/usr/include/at-spi-2.0 -I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include -I/usr/include/gtk-3.0 -I/usr/include/gio-unix-2.0/ -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/harfbuzz -I/usr/include/freetype2 -I/usr/include/harfbuzz -I/usr/include/libdrm -I/usr/include/libpng16 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng16 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I $WORK/github.com/oskca/sciter/_obj/ -g -w -std=c11 -Iinclude -Iinclude -Iinclude sciter.go sciter_linux.go types.go utils.go
/usr/bin/gcc -Wall -g -I $WORK/github.com/oskca/sciter/_obj/ -I /usr/pkg/linux_amd64 -o $WORK/github.com/oskca/sciter/_obj/_cgo_defun.o -D GOOS_linux -D GOARCH_amd64 -m64 -D "GOPKGPATH=\"github_com_oskca_sciter\"" -c $WORK/github.com/oskca/sciter/_obj/_cgo_defun.c
/usr/bin/gcc -I . -fPIC -m64 -pthread -fmessage-length=0 -print-libgcc-file-name
/usr/bin/gcc -I . -fPIC -m64 -pthread -fmessage-length=0 -pthread -I/usr/include/gtk-3.0 -I/usr/include/at-spi2-atk/2.0 -I/usr/include/at-spi-2.0 -I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include -I/usr/include/gtk-3.0 -I/usr/include/gio-unix-2.0/ -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/harfbuzz -I/usr/include/freetype2 -I/usr/include/harfbuzz -I/usr/include/libdrm -I/usr/include/libpng16 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng16 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I $WORK/github.com/oskca/sciter/_obj/ -g -O2 -g -w -std=c11 -Iinclude -Iinclude -Iinclude -o $WORK/github.com/oskca/sciter/_obj/_cgo_main.o -c $WORK/github.com/oskca/sciter/_obj/_cgo_main.c
# github.com/oskca/sciter
In file included from $WORK/github.com/oskca/sciter/_obj/_cgo_main.c:33:0:
../../sciter.go:12:25: error: ‘SciterElementCallback_cgo’ redeclared as different kind of symbol
 extern BOOL SC_CALLBACK SciterElementCallback_cgo(HELEMENT he, LPVOID param);
                         ^
/tmp/go-build855795623/github.com/oskca/sciter/_obj/_cgo_main.c:27:13: note: previous declaration of ‘SciterElementCallback_cgo’ was here
 extern char SciterElementCallback_cgo[];
             ^
In file included from $WORK/github.com/oskca/sciter/_obj/_cgo_main.c:33:0:
../../sciter.go:13:25: error: ‘LPCSTR_RECEIVER_cgo’ redeclared as different kind of symbol
 extern VOID SC_CALLBACK LPCSTR_RECEIVER_cgo( LPCSTR str, UINT str_length, LPVOID param );
                         ^
/tmp/go-build855795623/github.com/oskca/sciter/_obj/_cgo_main.c:15:13: note: previous declaration of ‘LPCSTR_RECEIVER_cgo’ was here
 extern char LPCSTR_RECEIVER_cgo[];
             ^
In file included from $WORK/github.com/oskca/sciter/_obj/_cgo_main.c:33:0:
../../sciter.go:14:25: error: ‘LPCWSTR_RECEIVER_cgo’ redeclared as different kind of symbol
 extern VOID SC_CALLBACK LPCWSTR_RECEIVER_cgo( LPCWSTR str, UINT str_length, LPVOID param );
                         ^
/tmp/go-build855795623/github.com/oskca/sciter/_obj/_cgo_main.c:18:13: note: previous declaration of ‘LPCWSTR_RECEIVER_cgo’ was here
 extern char LPCWSTR_RECEIVER_cgo[];
             ^
In file included from $WORK/github.com/oskca/sciter/_obj/_cgo_main.c:33:0:
../../sciter.go:15:25: error: ‘LPCBYTE_RECEIVER_cgo’ redeclared as different kind of symbol
 extern VOID SC_CALLBACK LPCBYTE_RECEIVER_cgo( LPCBYTE bytes, UINT num_bytes, LPVOID param );
                         ^
/tmp/go-build855795623/github.com/oskca/sciter/_obj/_cgo_main.c:12:13: note: previous declaration of ‘LPCBYTE_RECEIVER_cgo’ was here
 extern char LPCBYTE_RECEIVER_cgo[];
             ^
In file included from $WORK/github.com/oskca/sciter/_obj/_cgo_main.c:33:0:
../../sciter.go:16:25: error: ‘ElementEventProc_cgo’ redeclared as different kind of symbol
 extern BOOL SC_CALLBACK ElementEventProc_cgo(LPVOID tag, HELEMENT he, UINT evtg, LPVOID prms );
                         ^
/tmp/go-build855795623/github.com/oskca/sciter/_obj/_cgo_main.c:9:13: note: previous declaration of ‘ElementEventProc_cgo’ was here
 extern char ElementEventProc_cgo[];
             ^
In file included from $WORK/github.com/oskca/sciter/_obj/_cgo_main.c:33:0:
../../sciter.go:17:25: error: ‘SciterHostCallback_cgo’ redeclared as different kind of symbol
 extern UINT SC_CALLBACK SciterHostCallback_cgo( LPSCITER_CALLBACK_NOTIFICATION pns, LPVOID callbackParam );
                         ^
/tmp/go-build855795623/github.com/oskca/sciter/_obj/_cgo_main.c:30:13: note: previous declaration of ‘SciterHostCallback_cgo’ was here
 extern char SciterHostCallback_cgo[];
             ^
In file included from $WORK/github.com/oskca/sciter/_obj/_cgo_main.c:33:0:
../../sciter.go:19:13: error: ‘NATIVE_FUNCTOR_INVOKE_cgo’ redeclared as different kind of symbol
 extern VOID NATIVE_FUNCTOR_INVOKE_cgo( VOID* tag, UINT argc, const VALUE* argv, VALUE* retval);
             ^
/tmp/go-build855795623/github.com/oskca/sciter/_obj/_cgo_main.c:21:13: note: previous declaration of ‘NATIVE_FUNCTOR_INVOKE_cgo’ was here
 extern char NATIVE_FUNCTOR_INVOKE_cgo[];
             ^
In file included from $WORK/github.com/oskca/sciter/_obj/_cgo_main.c:33:0:
../../sciter.go:20:13: error: ‘NATIVE_FUNCTOR_RELEASE_cgo’ redeclared as different kind of symbol
 extern VOID NATIVE_FUNCTOR_RELEASE_cgo( VOID* tag );
             ^
/tmp/go-build855795623/github.com/oskca/sciter/_obj/_cgo_main.c:24:13: note: previous declaration of ‘NATIVE_FUNCTOR_RELEASE_cgo’ was here
 extern char NATIVE_FUNCTOR_RELEASE_cgo[];
             ^
In file included from $WORK/github.com/oskca/sciter/_obj/_cgo_main.c:33:0:
../../sciter.go:22:24: error: ‘ELEMENT_COMPARATOR_cgo’ redeclared as different kind of symbol
 extern INT SC_CALLBACK ELEMENT_COMPARATOR_cgo( HELEMENT he1, HELEMENT he2, LPVOID param );
                        ^
/tmp/go-build855795623/github.com/oskca/sciter/_obj/_cgo_main.c:6:13: note: previous declaration of ‘ELEMENT_COMPARATOR_cgo’ was here
 extern char ELEMENT_COMPARATOR_cgo[];
             ^

Uname:

Linux kronos 4.2.3-1-ARCH #1 SMP PREEMPT Sat Oct 3 18:52:50 CEST 2015 x86_64 GNU/Linux

GCC version:

Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-unknown-linux-gnu/5.2.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: /build/gcc/src/gcc-5.2.0/configure --prefix=/usr --libdir=/usr/lib --libexecdir=/usr/lib --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=https://bugs.archlinux.org/ --enable-languages=c,c++,ada,fortran,go,lto,objc,obj-c++ --enable-shared --enable-threads=posix --enable-libmpx --with-system-zlib --with-isl --enable-__cxa_atexit --disable-libunwind-exceptions --enable-clocale=gnu --disable-libstdcxx-pch --disable-libssp --enable-gnu-unique-object --enable-linker-build-id --enable-lto --enable-plugin --enable-install-libiberty --with-linker-hash-style=gnu --enable-gnu-indirect-function --disable-multilib --disable-werror --enable-checking=release --with-default-libstdcxx-abi=gcc4-compatible
Thread model: posix
gcc version 5.2.0 (GCC) 

Go version:

go version go1.4.2 gccgo (GCC) 5.2.0 linux/amd64

I know you haven't tested it on ArchLinux yet, but I figured I'd drop the errors here regardless . Figured the problem could be caused by something I'm overlooking.

Can you help me? self.ready err!!!

self.ready err: View (View([object View])) has no method - getNetInformation at ...

callback.go

package main

import (
    "log"

    "github.com/oskca/sciter"
    "github.com/oskca/sciter/window"
)

func main() {
    w, err := window.New(sciter.SW_TITLEBAR|sciter.SW_RESIZEABLE|sciter.SW_CONTROLS|sciter.SW_MAIN|sciter.SW_ENABLE_DEBUG, nil)
    if err != nil {
        log.Fatal("Create Window Error: ", err)
    }
    w.LoadFile("index.html")
    w.SetTitle("hello")
    setEventHandler(w)
    w.Show()
    w.Run()
}

func setEventHandler(w *window.Window) {
    w.DefineFunction("getNetInformation", func(args ...*sciter.Value) *sciter.Value {
        log.Println("Args Length:", len(args))
        ret := sciter.NewValue("hello")
        return ret
    })
}

index.html

<html>
<head>
    <title>callback demo</title>
    <style>
    #btn {
        color: red;
    }
    </style>
</head>
<body>
<div>
    <div id="btn">Click Me</div>
    <div id="res"></div>
</div>
<script type="text/tiscript">
self.ready=function(){  
$(body).timer(40ms, function() { });
        var message = "Hello another world!";
        try {
            $(#res).text = view.getNetInformation(1,"test");
        } catch(e) {
            $(#res).text=e;
        }
};

$(#btn).on("click",function(){
    var str=view.getNetInformation(1,"test");
    $(#res).html=str;
});
</script>
</body>
</html>

Support for Off-Screen Rendering?

I might've missed it somewhere, but I was wondering if it's possible to render Sciter in opengl context?
My use case is GUI for game engine.

Sciter using outdated libcurl

Appearently this uses an outdated version of libcurl? On Arch I get "Unable to load library: /usr/lib/libcurl.so.4: version `CURL_OPENSSL_3' not found" when trying to running any of the examples.

I am aware that this sciter issue obviously cannot be fixed here but maybe someone has an idea how to workaround this without having to use outdated libs. I mean is everyone who is using those bindings shipping outdated libcurls, and even if how do you perform the actual developement without using the outdated lib?

setHtml cannot set ""

ele.SetHtml("", 0) will cause error
SetHtml(" ", 0) is ok
Not sure if this is a bug

windows 10 build error

go get -x github.com/oskca/sciter
WORK=C:\Users\user1\AppData\Local\Temp\go-build053903754
mkdir -p $WORK\github.com\oskca\sciter_obj
mkdir -p $WORK\github.com\oskca
cd C:\Users\user1\My Projects\go\src\github.com\oskca\sciter
CGO_LDFLAGS="-g" "-O2" "C:\Go\pkg\tool\windows_amd64\cgo.exe" -objdir "C:\Users\user1\AppData\Local\Temp\go-build053903754\github.com\oskca\sciter_obj" -importpath github.com/oskca/sciter -- -I "C:\Users\user1\AppData\Local\Temp\go-build053903754\github.com\oskca\sciter_obj" -g -w -std=c11 -Iinclude -Iinclude -Iinclude sciter.go sciter_windows.go types.go utils.go

github.com/oskca/sciter

cc1.exe: sorry, unimplemented: 64-bit mode not compiled in

gcc --version
gcc (i686-posix-dwarf-rev0, Built by MinGW-W64 project) 5.2.0
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

I also get this cc1.exe error with "go build".

packfolder

I want to use the ui resources by packfolder, how can i use it?which use it in c++ like this below:
sciter::archive::instance().open(aux::elements_of(resources));
SciterLoadFile(hWnd, L"this://app/index.html");

panic: runtime error: cgo argument has Go pointer to Go pointer

Is anyone else still getting this error? Not sure if it is caused by the sciter lib or if i broke some tiscript that I was adding while waiting for lib fixes.

I just updated the sciter lib using $ go get -u -x github.com/oskca/sciter
Then I rebuilt my app with go build.
Then I ran the app.

The second line in my code ( shown below ) generates the fatal.
`
fnvalue := sciter.NewValue()

fnvalue.SetNativeFunctor(myMenuHandlerFunc)
`

Here is the fatal.

panic: runtime error: cgo argument has Go pointer to Go pointer

goroutine 1 [running, locked to thread]:
panic(0x5c89c0, 0xc0820035c0)
C:/Go/src/runtime/panic.go:464 +0x3f4
github.com/oskca/sciter._cgoCheckPointer0(0x585ee0, 0xc082020050, 0x0, 0x0, 0x0, 0x1)
??:0 +0x54
github.com/oskca/sciter.(*Value).SetNativeFunctor(0xc0820035b0, 0xc082074cc0, 0x0, 0x0)
C:/Users/user1/MyProjects/go/src/github.com/oskca/sciter/sciter.go:2242 +0xf4

local image can't be shown

env: win10,golan1.7-32bit,mingw-w64
local image can't be shown , but it‘s nomal when the same html file is loaded using sciter demo app without golang and cgo.

pls help!!

Console window

Is it possible to close/hide the console window while running a scither window?

error in func (e *Element) SetText(text string)

Here:

func (e *Element) SetText(text string) error {
    // args
    ctext := C.LPCWSTR(StringToWcharPtr(text))
    clength := C.UINT(len(text))
    // cgo call
    r := C.SciterSetElementText(e.handle, ctext, clength)
    return wrapDomResult(r, "SciterSetElementText")
}

wrong string length is passed to SciterSetElementText function.

SciterSetElementText expects ctext length - number of UTF16 code units in that ctext.
But in the code above clength is a number of characters (what are they in go?) in text.

compiling on osx

I read that you dont have OSX to tets with, but i saw that OSX PR's were kindly added, and i really want to try sciter. Electron, CEF, nwjs drive me nuts.

@kuznetsovin

I have the SDK. Looks obvious..
But i have no glue about mingw64-gcc on OSX

I did not find this though !! ?? Not sure...
https://gist.github.com/Drakulix/9881160

Really appreciate help. If i can get it working then anyone can :)

go get -x github.com/oskca/sciter
cd .
git clone https://github.com/oskca/sciter /Users/apple/workspace/go/src/github.com/oskca/sciter
cd /Users/apple/workspace/go/src/github.com/oskca/sciter
git submodule update --init --recursive
cd /Users/apple/workspace/go/src/github.com/oskca/sciter
git show-ref
cd /Users/apple/workspace/go/src/github.com/oskca/sciter
git submodule update --init --recursive
WORK=/var/folders/wp/ff6sz9qs6g71jnm12nj2kbyw0000gp/T/go-build337155746
mkdir -p $WORK/github.com/oskca/sciter/_obj/
mkdir -p $WORK/github.com/oskca/
cd /Users/apple/workspace/go/src/github.com/oskca/sciter
CGO_LDFLAGS="-g" "-O2" /usr/local/go/pkg/tool/darwin_amd64/cgo -objdir $WORK/github.com/oskca/sciter/_obj/ -importpath github.com/oskca/sciter -- -I $WORK/github.com/oskca/sciter/_obj/ -g -w -std=c11 -Iinclude -Iinclude -Iinclude sciter.go sciter_darwin.go types.go utils.go
clang -I . -fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fno-common -I $WORK/github.com/oskca/sciter/_obj/ -g -O2 -g -w -std=c11 -Iinclude -Iinclude -Iinclude -o $WORK/github.com/oskca/sciter/_obj/_cgo_main.o -c $WORK/github.com/oskca/sciter/_obj/_cgo_main.c
clang -I . -fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fno-common -I $WORK/github.com/oskca/sciter/_obj/ -g -O2 -g -w -std=c11 -Iinclude -Iinclude -Iinclude -o $WORK/github.com/oskca/sciter/_obj/_cgo_export.o -c $WORK/github.com/oskca/sciter/_obj/_cgo_export.c
clang -I . -fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fno-common -I $WORK/github.com/oskca/sciter/_obj/ -g -O2 -g -w -std=c11 -Iinclude -Iinclude -Iinclude -o $WORK/github.com/oskca/sciter/_obj/sciter.cgo2.o -c $WORK/github.com/oskca/sciter/_obj/sciter.cgo2.c
clang -I . -fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fno-common -I $WORK/github.com/oskca/sciter/_obj/ -g -O2 -g -w -std=c11 -Iinclude -Iinclude -Iinclude -o $WORK/github.com/oskca/sciter/_obj/sciter_darwin.cgo2.o -c $WORK/github.com/oskca/sciter/_obj/sciter_darwin.cgo2.c
clang -I . -fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fno-common -I $WORK/github.com/oskca/sciter/_obj/ -g -O2 -g -w -std=c11 -Iinclude -Iinclude -Iinclude -o $WORK/github.com/oskca/sciter/_obj/types.cgo2.o -c $WORK/github.com/oskca/sciter/_obj/types.cgo2.c
clang -I . -fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fno-common -I $WORK/github.com/oskca/sciter/_obj/ -g -O2 -g -w -std=c11 -Iinclude -Iinclude -Iinclude -o $WORK/github.com/oskca/sciter/_obj/utils.cgo2.o -c $WORK/github.com/oskca/sciter/_obj/utils.cgo2.c
clang -I . -fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fno-common -I $WORK/github.com/oskca/sciter/_obj/ -g -O2 -g -w -std=c11 -Iinclude -Iinclude -Iinclude -o $WORK/github.com/oskca/sciter/_obj/callbacks.o -c ./callbacks.c
clang -I . -fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fno-common -I $WORK/github.com/oskca/sciter/_obj/ -g -O2 -g -w -std=c11 -Iinclude -Iinclude -Iinclude -o $WORK/github.com/oskca/sciter/_obj/sciter-x-api.o -c ./sciter-x-api.c
clang -I . -fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fno-common -o $WORK/github.com/oskca/sciter/_obj/_cgo_.o $WORK/github.com/oskca/sciter/_obj/_cgo_main.o $WORK/github.com/oskca/sciter/_obj/_cgo_export.o $WORK/github.com/oskca/sciter/_obj/sciter.cgo2.o $WORK/github.com/oskca/sciter/_obj/sciter_darwin.cgo2.o $WORK/github.com/oskca/sciter/_obj/types.cgo2.o $WORK/github.com/oskca/sciter/_obj/utils.cgo2.o $WORK/github.com/oskca/sciter/_obj/callbacks.o $WORK/github.com/oskca/sciter/_obj/sciter-x-api.o -g -O2
/usr/local/go/pkg/tool/darwin_amd64/cgo -objdir $WORK/github.com/oskca/sciter/_obj/ -dynpackage sciter -dynimport $WORK/github.com/oskca/sciter/_obj/_cgo_.o -dynout $WORK/github.com/oskca/sciter/_obj/_cgo_import.go
clang -I . -fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fno-common -o $WORK/github.com/oskca/sciter/_obj/_all.o $WORK/github.com/oskca/sciter/_obj/_cgo_export.o $WORK/github.com/oskca/sciter/_obj/sciter.cgo2.o $WORK/github.com/oskca/sciter/_obj/sciter_darwin.cgo2.o $WORK/github.com/oskca/sciter/_obj/types.cgo2.o $WORK/github.com/oskca/sciter/_obj/utils.cgo2.o $WORK/github.com/oskca/sciter/_obj/callbacks.o $WORK/github.com/oskca/sciter/_obj/sciter-x-api.o -g -O2 -Wl,-r -nostdlib
/usr/local/go/pkg/tool/darwin_amd64/compile -o $WORK/github.com/oskca/sciter.a -trimpath $WORK -p github.com/oskca/sciter -buildid 8af082282a81ce32fdfbef27637b9288095af414 -D _/Users/apple/workspace/go/src/github.com/oskca/sciter -I $WORK -pack ./generate.go ./types_string.go ./value.go ./wrapper.go $WORK/github.com/oskca/sciter/_obj/_cgo_gotypes.go $WORK/github.com/oskca/sciter/_obj/sciter.cgo1.go $WORK/github.com/oskca/sciter/_obj/sciter_darwin.cgo1.go $WORK/github.com/oskca/sciter/_obj/types.cgo1.go $WORK/github.com/oskca/sciter/_obj/utils.cgo1.go $WORK/github.com/oskca/sciter/_obj/_cgo_import.go
pack r $WORK/github.com/oskca/sciter.a $WORK/github.com/oskca/sciter/_obj/_all.o # internal
mkdir -p /Users/apple/workspace/go/pkg/darwin_amd64/github.com/oskca/
mv $WORK/github.com/oskca/sciter.a /Users/apple/workspace/go/pkg/darwin_amd64/github.com/oskca/sciter.a
x-MacBook-Pro:example apple$ 

三个例子运行后没有任何反应?

三个例子都可以编译通过,但是运行却没有任何反应?
WIN7 64位
D:\go\gopath\src\github.com\oskca\sciter\examples\simple>gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=d:/qt/qt5.1.1/tools/mingw48_32/bin/../libexec/gcc/i686-w64-m
ingw32/4.8.0/lto-wrapper.exe
Target: i686-w64-mingw32
Configured with: ../../../src/gcc-4.8.0/configure --host=i686-w64-mingw32 --buil
d=i686-w64-mingw32 --target=i686-w64-mingw32 --prefix=/mingw32 --with-sysroot=/t
emp/x32-480-posix-dwarf-r2/mingw32 --enable-shared --enable-static --disable-mul
tilib --enable-languages=c,c++,fortran,lto --enable-libstdcxx-time=yes --enable-
threads=posix --enable-libgomp --enable-lto --enable-graphite --enable-checking=
release --enable-fully-dynamic-string --enable-version-specific-runtime-libs --d
isable-sjlj-exceptions --with-dwarf2 --disable-isl-version-check --disable-cloog
-version-check --disable-libstdcxx-pch --disable-libstdcxx-debug --disable-boots
trap --disable-rpath --disable-win32-registry --disable-nls --disable-werror --d
isable-symvers --with-gnu-as --with-gnu-ld --with-arch=i686 --with-tune=generic
--with-host-libstdcxx='-static -lstdc++' --with-libiconv --with-system-zlib --wi
th-gmp=/temp/mingw-prereq/i686-w64-mingw32-static --with-mpfr=/temp/mingw-prereq
/i686-w64-mingw32-static --with-mpc=/temp/mingw-prereq/i686-w64-mingw32-static -
-with-isl=/temp/mingw-prereq/i686-w64-mingw32-static --with-cloog=/temp/mingw-pr
ereq/i686-w64-mingw32-static --enable-cloog-backend=isl --with-pkgversion='rev2,
Built by MinGW-builds project' --with-bugurl=http://sourceforge.net/projects/mi
ngwbuilds/ CFLAGS='-O2 -pipe -I/temp/x32-480-posix-dwarf-r2/libs/include -I/temp
/mingw-prereq/x32-zlib/include -I/temp/mingw-prereq/i686-w64-mingw32-static/incl
ude' CXXFLAGS='-O2 -pipe -I/temp/x32-480-posix-dwarf-r2/libs/include -I/temp/min
gw-prereq/x32-zlib/include -I/temp/mingw-prereq/i686-w64-mingw32-static/include'
CPPFLAGS= LDFLAGS='-pipe -L/temp/x32-480-posix-dwarf-r2/libs/lib -L/temp/mingw-
prereq/x32-zlib/lib -L/temp/mingw-prereq/i686-w64-mingw32-static/lib -L/temp/x32
-480-posix-dwarf-r2/mingw32/opt/lib'
Thread model: posix
gcc version 4.8.0 (rev2, Built by MinGW-builds project)

D:\go\gopath\src\github.com\oskca\sciter\examples\simple>go version
go version go1.5.1 windows/386

setIcon function

Currently the output exe file is without any icon.
I used an icon changer to give it an icon, and as a result the taskbar and exe icons looked fine, but the top-left icon remained unchanged.
It would be great if this function is available.
Thanks.

NthAttr(int) returning the attr name.

The problem is that NthAttr(int) is not returning the value but the name.
See the end of this post for the correction to sciter.go

print out:

2015/12/29 21:17:58 el.NthAttrName(0) is "id"
2015/12/29 21:17:58 el.NthAttr(0) is "id"
2015/12/29 21:17:58 el.NthAttrName(1) is "itemid"
2015/12/29 21:17:58 el.NthAttr(1) is "itemid"

code snipet

        name, err := el.NthAttrName(i)
        if err != nil {
            log.Printf("el.NthAttrName() error is %q", err.Error())
            return "", err
        }
        log.Printf("el.NthAttrName(%d) is %q", i, name)
        value, err := el.NthAttr(i)
        if err != nil {
            log.Printf("el.NthAttr(i) error is %q", err.Error())
            return "", err
        } else {
            log.Printf("el.NthAttr(%d) is %q", i, value)
        }

also el.Attr(string) panics with index out of bounds.

Here is the fix for NthAttr that i made to sciter.go:
lines 752 & 753 are commented out and the proper two lines are below them

    //r := C.SciterGetNthAttributeNameCB(e.handle, cn, lpcstr_receiver, cparam)
    //err = wrapDomResult(r, "SciterGetNthAttributeNameCB")
    r := C.SciterGetNthAttributeValueCB(e.handle, cn, lpcwstr_receiver, cparam)
    err = wrapDomResult(r, "SciterGetNthAttributeValueCB")

Unable to load library

the compilation I have a type error: sciter-x-api.c Unable to load library: /tmp/go-build517969141/command-line-arguments/_obj/exe/sciter-gtk-64.so: cannot open shared object file: No such file or directory on archlinux and fedora 24. Thank you for your help.

Does not working on Linux/Ubuntu16.04

I've tried to install for few days this things, but cannot run or compile nothin because of error below.

# github.com/oskca/sciter/window
../github.com/oskca/sciter/window/window_linux.go: In function ‘gwindow’:
../github.com/oskca/sciter/window/window_linux.go:8:9: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘GtkWidget * {aka struct _GtkWidget *}’ [-Wformat=]
  printf("hwnd:%d\n", hwnd);
         ^

I thought, that the trouble is in unsupported things and reinstalled GTK3. Moved SDK files into go $PATH -- no result.

I am new it this and really want to use it for my small project. Maybe some help for me, because, no answers in google.

windows build Warning: resolving _SciterHostCallback_cgo by linking to _SciterHostCallback_cgo@8

go env
set GOARCH=386
set GOBIN=D:\go\bin
set GOEXE=.exe
set GOHOSTARCH=386
set GOHOSTOS=windows
set GOOS=windows
set GOPATH=G:\gopath
set GORACE=
set GOROOT=D:\go
set GOTOOLDIR=D:\go\pkg\tool\windows_386
set CC=gcc
set GOGCCFLAGS=-m32 -mthreads -fmessage-length=0
set CXX=g++
set CGO_ENABLED=1

go version go1.7.4 windows/386

gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=C:/TDM-GCC-32/bin/../libexec/gcc/mingw32/5.1.0/lto-wrapper.exe
Target: mingw32
Configured with: ../../../src/gcc-5.1.0/configure --build=mingw32 --enable-languages=ada,c,c++,fortran,lto,objc,obj-c++ --enable-libgomp --enable-lto --enable-graphite --enable-libstdcxx-debug --enable-threads=posix --enable-version-specific-runtime-libs --enable-fully-dynamic-string --enable-libstdcxx-threads --enable-libstdcxx-time --with-gnu-ld --disable-werror --disable-nls --disable-win32-registry --disable-symvers --enable-cxx-flags='-fno-function-sections -fno-data-sections -DWINPTHREAD_STATIC' --prefix=/mingw32tdm --with-local-prefix=/mingw32tdm --with-pkgversion=tdm-1 --enable-sjlj-exceptions --with-bugurl=http://tdm-gcc.tdragon.net/bugs
Thread model: posix
gcc version 5.1.0 (tdm-1)

go build warring:

github.com/oskca/sciter

Warning: resolving _SciterHostCallback_cgo by linking to _SciterHostCallback_cgo@8
Use --enable-stdcall-fixup to disable these warnings
Use --disable-stdcall-fixup to disable these fixups
Warning: resolving _SciterElementCallback_cgo by linking to _SciterElementCallback_cgo@8
Warning: resolving _LPCWSTR_RECEIVER_cgo by linking to _LPCWSTR_RECEIVER_cgo@12
Warning: resolving _LPCSTR_RECEIVER_cgo by linking to _LPCSTR_RECEIVER_cgo@12
Warning: resolving _LPCBYTE_RECEIVER_cgo by linking to _LPCBYTE_RECEIVER_cgo@12
Warning: resolving _KeyValueCallback_cgo by linking to _KeyValueCallback_cgo@12
Warning: resolving _ElementEventProc_cgo by linking to _ElementEventProc_cgo@16
Warning: resolving _ELEMENT_COMPARATOR_cgo by linking to _ELEMENT_COMPARATOR_cgo@12

ele.SetText function

ele.SetText is ok for English words, but not for Asian words. There will be 2 useless characters to the end of the target text.

Cross-compilation: mac os to windows compile

static-ip-171-25:ui$ GOOS=windows GOARCH=386 go build *.go

github.com/oskca/sciter

src/github.com/oskca/sciter/types_string.go:27: undefined: BehaviorEvent
src/github.com/oskca/sciter/types_string.go:62: undefined: MouseEvent
src/github.com/oskca/sciter/types_string.go:78: undefined: CursorType
src/github.com/oskca/sciter/types_string.go:89: undefined: KeyEvent
src/github.com/oskca/sciter/types_string.go:100: undefined: FocusEvent
src/github.com/oskca/sciter/types_string.go:111: undefined: ScrollEvent
src/github.com/oskca/sciter/types_string.go:122: undefined: GestureCmd
src/github.com/oskca/sciter/types_string.go:139: undefined: GestureState
src/github.com/oskca/sciter/types_string.go:171: undefined: GestureTypeFlag
src/github.com/oskca/sciter/types_string.go:197: undefined: DrawEvent
src/github.com/oskca/sciter/types_string.go:197: too many errors
static-ip-171-25:ui$

Unhandle Event HANDLE_DRAW cause panic in windows 10

I run examples handlers program and followings are log.

2016/02/05 14:02:18 Unhandled sciter event case: 64
panic: Unhandled sciter event case: 64

goroutine 1 [running, locked to thread]:
log.Panic(0xc082071a88, 0x2, 0x2)
c:/go/src/log/log.go:320 +0xc8
github.com/oskca/sciter.goElementEventProc(0xc08244a230, 0x16eca80, 0x40, 0xfff248, 0x0)
D:/AW/networks/wknetworks/netsample/src/github.com/oskca/sciter/sciter.go:1324 +0x57b

I comment out following line and process normal.

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

Masanobu Shimura

callfunction problem with Chinese words

With 01, the alert msgbox has no "ok" button, but no problem with 02.
01:
_, err = root.CallFunction("alert", sciter.NewValue(" 已完成"), sciter.NewValue("alert"))

function alert(a,b){
        view.msgbox { type:#alert, 
              content:a, 
              title:b };
      }

02:
_, err = root.CallFunction("alert", sciter.NewValue("alert"))
function alert(b){
view.msgbox { type:#alert,
content:"已完成",
title:b };
}

MINGW64 build have a error in sciter.go 2081

Error Msg : github.com\oskca\sciter_obj\sciter.cgo1.go:1956]: cannot use cparam (type unsafe.Pointer) as type _Ctype_LPVOID in argument to _Cfunc_ValueEnumElements

You may forget chang unsafe.Pointer to C.LPVOID

change 2079 line like this[cparam := C.LPVOID(unsafe.Pointer(&fn))]is working

shows exec window, rather than GUI Window

All examples show the bash window, rather than just the GUI.

for example the simple example.
On OSX , at least, the executable is a command line executable, not a windowed executable.

x-MacBook-Pro:simple apple$ ls
simple.go   simple.html
x-MacBook-Pro:simple apple$ go build simple.go
x-MacBook-Pro:simple apple$ ./simple 
unrecognized property syntax of '-moz-transform' at (simple.html(26))
unrecognized property syntax of '-webkit-transform' at (simple.html(27))

I think there are various techniques to fix this.

Have you just not optimised for this yt ?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.