sciter-sdk/go-sciter 1889
Golang bindings of Sciter: the Embeddable HTML/CSS/script engine for modern UI development
Windows Kernel-Mode Drivers written in Rust
Python bindings for Sciter
Rust GFX examples with Sciter UI.
Rust environment for the Windows Kernel-Mode Drivers
cargo subcommand to print package metadata like pip show, apt-cache show, npm view, gem query, etc.
pravic/sciter-wxwidgets-sample 4
Sciter integration for wxWidgets
sciter-sdk/json-value-visualizer 4
sciter::value visualizer for Visual Studio
Zoomquilt Sciter sample
EyeLeo applet for Sciter
issue commentsciter-sdk/rust-sciter
How to embed into GameMaker window?
It's not immediately clear to me how this allows me to route window events to Sciter, but is it at least possible?
Something like this:
let hwnd = window_handle as sciter::types:_HWINDOW;
hook_messages(hwnd);
let mut frame = sciter::Window::attach(hwnd);
fn hook_messages(hwnd: HWINDOW) {
use sciter::types::*;
#[link(name="user32")]
extern "system"
{
fn SetWindowLongPtrW(hwnd: HWINDOW, index: i32, new_data: WndProc) -> WndProc;
fn CallWindowProcW(prev: WndProc, hwnd: HWINDOW, msg: UINT, wp: WPARAM, lp: LPARAM) -> LRESULT;
}
type WndProc = extern "system" fn (hwnd: HWINDOW, msg: UINT, wp: WPARAM, lp: LPARAM) -> LRESULT;
type PrevProcs = std::collections::HashMap<HWINDOW, WndProc>;
thread_local! {
static PREV_PROC: std::cell::RefCell<PrevProcs> = Default::default();
}
// https://sciter.com/developers/embedding-principles/
extern "system" fn wnd_proc(hwnd: HWINDOW, msg: UINT, wp: WPARAM, lp: LPARAM) -> LRESULT {
// first, pass the message to Sciter.
let mut handled = false as BOOL;
let lr = (_API.SciterProcND)(hwnd, msg, wp, lp, &mut handled);
// if it was handled by Sciter, we're done here.
if handled != 0 {
return lr;
}
// if not, call the original window proc.
let mut lr: LRESULT = 0;
PREV_PROC.with(|procs| {
let prev_proc = *procs.borrow().get(&hwnd).expect("An unregistered WindowProc is called somehow.");
lr = unsafe { CallWindowProcW(prev_proc, hwnd, msg, wp, lp) }
});
// and return its result
lr
}
// Subclass the window in order to receive its messages.
const GWLP_WNDPROC: i32 = -4;
let prev_proc = unsafe { SetWindowLongPtrW(hwnd, GWLP_WNDPROC, wnd_proc) };
PREV_PROC.with(|procs| {
procs.borrow_mut().insert(hwnd, prev_proc);
});
}
comment created time in a day
issue commentsciter-sdk/rust-sciter
How to embed into GameMaker window?
I will add that replacing frame.run_app() with frame.run_loop() makes no difference at all.
- No, you don't need
run_app()- it runs its own message loop and the host application (GameMaker) will be frozen at that time. Or will behave like this:
Also, using sciter::Window::new() instead of sciter::Window::attach() before the program's own window is displayed, causes the Sciter window to be displayed, and the GameMaker window doesn't appear until after the Sciter window is closed.
Window.attachis about attaching Sciter (as an HTML engine) to an existing native window.
Window.create creates a new native window and then attaches Sciter to it. So, the difference is about who creates a native window.
In any case, you have to route some WinAPI messages to Sciter in order to get UI working. And it can be done via SciterProcND - apparently, I haven't exposed it properly in Rust bindings, need to do.
So, you have to intercept messages in an existing window (for example, via SetWindowLongPtrW + GWLP_WNDPROC) and route messages to Sciter. Check out this article about some details.
Feel free to ask questions. Also, you can share your code or tell how you are trying to use that GameMaker, perhaps there is a better way.
comment created time in 3 days
push eventsciter-sdk/rust-sciter
commit sha 6758752f4de931f4232be4d32fd2dac5b88bb80b
fix: Fix clippy warnings.
push time in 14 days
issue commentsciter-sdk/rust-sciter
How to embed into GameMaker window?
I believe the issue is with the difference in pumping messages. Do you attach from a different thread?
comment created time in 14 days
issue commentsciter-sdk/rust-sciter
How to embed into GameMaker window?
What's GameMaker?
comment created time in 14 days
pull request commentsciter-sdk/go-sciter
A reminder for me to test this.
comment created time in 25 days
issue closedsciter-sdk/go-sciter
Issue in getting the package...
When I run the command "go get -x github.com/sciter-sdk/go-sciter" it is giving me error "cannot use _cgo1 (type *_Ctype_HWINDOW) as type **_Ctype_struct__GtkWidget in argument to _Cfunc_SciterGetElementHwnd" How to resolve it?
closed time in a month
harshaldhoneissue commentsciter-sdk/go-sciter
Issue in getting the package...
#245
comment created time in a month
starteddwmkerr/hacker-laws
started time in a month
pull request commentmozilla-services/syncstorage-rs
skipping audit pending https://github.com/bodil/sized-chunks/issues/11
There's cargo audit --ignore ADVISORY_ID that might help.
comment created time in a month
issue commentsciter-sdk/go-sciter
sample build report error under macOS; go is 1.15
Indeed
comment created time in 2 months
issue commentsciter-sdk/go-sciter
No longer compiles OSX after go 1.15 released
Does anybody have any idea what is wrong with cgo in 1.15?
comment created time in 2 months
issue closedsciter-sdk/go-sciter
Im getting this error when i run go get -x github.com/sciter-sdk/go-sciter
cgo1.go $WORK/b001/utils.cgo1.go $WORK/b001/_cgo_import.go
github.com/sciter-sdk/go-sciter
../../../go/src/github.com/sciter-sdk/go-sciter/sciter.go:1052:142: cannot use _cgo1 (type *_Ctype_HWINDOW) as type **_Ctype_struct__GtkWidget in argument to _Cfunc_SciterGetElementHwnd
closed time in 2 months
hcharlie1201issue openeddeprecrated/net2-rs
github.com/deprecated-rs maybe?
Why github.com/deprecated? Should this namespace cover other languages than Rust?
If Rust only, then it's better to name it github.com/deprecated-rs.
created time in 2 months
starteddtolnay/cxx
started time in 2 months
issue commentsciter-sdk/rust-sciter
How to obtain current GL context under X11?
No preferences. Feel free to decide)
comment created time in 2 months
issue commentsciter-sdk/go-sciter
No longer compiles OSX after go 1.15 released
A problem indeed but I haven't looked on Go 1.15 yet.
comment created time in 2 months
issue closedsciter-sdk/go-sciter
”go get -x github.com/sciter-sdk/go-sciter“ is error in “cgo”
Hello, I have encountered the following error:
/usr/lib/go/pkg/tool/linux_amd64/compile -o $WORK/b001/_pkg_.a -trimpath "$WORK/b001=>" -p github.com/sciter-sdk/go-sciter -buildid 1Kajp57NcmyFvaNCGAVK/1Kajp57NcmyFvaNCGAVK -goversion go1.15 -D "" -importcfg $WORK/b001/importcfg -pack -c=4 ./generate.go ./types_string.go ./value.go ./wrapper.go $WORK/b001/_cgo_gotypes.go $WORK/b001/sciter.cgo1.go $WORK/b001/sciter_linux.cgo1.go $WORK/b001/types.cgo1.go $WORK/b001/utils.cgo1.go $WORK/b001/_cgo_import.go
# github.com/sciter-sdk/go-sciter
go/pkg/mod/github.com/sciter-sdk/[email protected]/sciter.go:1025:142: cannot use _cgo1 (type *_Ctype_HWINDOW) as type **_Ctype_struct__GtkWidget in argument to _Cfunc_SciterGetElementHwnd

go version:
go version go1.15 linux/amd64
closed time in 2 months
xiaonaoerissue commentsciter-sdk/go-sciter
”go get -x github.com/sciter-sdk/go-sciter“ is error in “cgo”
Duplicate of #245
comment created time in 2 months
issue commentsciter-sdk/rust-sciter
How to obtain current GL context under X11?
https://sciter.com/forums/topic/porting-opengl-behavior-to-linux-rust/
Isn't Rust-specific.
comment created time in 2 months
issue commentsharkdp/dbg-macro
Sorry for the confusion.
I was talking about Windows support: GetConsoleMode (and a workaround for msys via GetFileInformationByHandleEx).
comment created time in 2 months
pull request commentsciter-sdk/go-sciter
fix SYS INFO is not available in demo9.go
Thanks!
comment created time in 2 months
push eventsciter-sdk/go-sciter
commit sha 43da399191e2ff21fbb86e13d116a97eab0fd5ef
fix SYS INFO is not available in demo9.go
push time in 2 months
issue openedsharkdp/dbg-macro
Is here: https://github.com/softprops/atty/blob/master/src/lib.rs#L66
created time in 3 months
issue commentsciter-sdk/go-sciter
SciterSetupDebugOutput is supposed to print the output. I'll check it.
comment created time in 3 months
issue commentsciter-sdk/go-sciter
Demonstrate 04 code button 1 will cause a crash How to fix it?
Was fixed already. See #239.
comment created time in 3 months