maneac / go-ultralight Goto Github PK
View Code? Open in Web Editor NEWUnofficial Golang bindings for the C++ Ultralight UI library
Home Page: https://ultralig.ht
License: MIT License
Unofficial Golang bindings for the C++ Ultralight UI library
Home Page: https://ultralig.ht
License: MIT License
go-ultralight
2020/07/19 16:18:57 Downloading darwin SDK...
Progress: 14 MB/14 MB 2020/07/19 16:19:01
Extracting darwin SDK to /Users/lucasloffel/go/pkg/mod/github.com/maneac/[email protected]/SDK
2020/07/19 16:19:03 Failed to extract archive: open /Users/lucasloffel/go/pkg/mod/github.com/maneac/[email protected]/SDK/CMakeLists.txt: no such file or directory
Hey,
i really like your go bindings for ultralight. I tested lorca and webview and ultralight is according to my tests, the best. Is it possible to return a JSValue to get the result in javascript?
The ultralight-ux/Ultralight/wiki/JavaScript-Integration says it should work using the c library.
Thanks for your answer :))
Sorry for spamming the issues but i am testing you bindings currently 😅
I am trying to set an application icon. I am using winres
to compile my .rc file.
MAIN ICON "www/assets/images/favicon/favicon.ico"
This only sets the taskbar icon and the console icon if i dont compile with -ldflags -H=windowsgui
.
Is there any compile option that i am missing? I know Ultralight has a missing feature (ultralight-ux/Ultralight#172) to set the icon, but i thought i can some how set a flag or something in go????
I think this looks similar to your final comments on issue in #1
~/go/src/github.com/maneac/go-ultralight/examples/browser git:master / 87d 9h 8m
❯ go build
# github.com/maneac/go-ultralight
../../config.go:46:2: could not determine kind of name for C.ulConfigSetDeviceScaleHint
../../config.go:39:2: could not determine kind of name for C.ulConfigSetUseBGRAForOffscreenRendering
Same thing happened when trying to build any of the example/tutorials...
Note that I did run try various rpath and LD_LIBRARY_PATH permutations, but still the same result each time.
❯ go version
go version go1.13.8 linux/amd64
❯ gcc --version
gcc (Ubuntu 9.3.0-10ubuntu2) 9.3.0
Copyright (C) 2019 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.
❯ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=20.04
DISTRIB_CODENAME=focal
DISTRIB_DESCRIPTION="Ubuntu 20.04.1 LTS"
Hello I am sure I am doing something wrong but when I attempt to build one of the example projects from linus for windows I get this error "gcc: error: unrecognized command line option ‘-mthreads’; did you mean ‘-pthread’?" Any help would be awesome. Thank you!
https://i.imgur.com/0UQxyUP.png
Hello. I've written this message to ask if we can add a method called LoadFile. It could be something like this:
func (view *View) LoadHTML(path string) {
htmlFile, err := os.Open(path)
if err != nil {
log.Fatal(err)
}
defer htmlFile.Close()
bytes := new(bytes.Buffer)
bytes.ReadFrom(htmlFile)
contents := buf.String()
C.ulViewLoadHTML(view.v, C.ulCreateString(C.CString(contents)))
}
And thanks for creating this project.
Thanks!
Hey, i was trying to create a PR for the inspector view but my problem is, as far as I understand the Ultralight API, that I cannot replace a view or create an overlay with a view using the C API.
Do you have any ideas? My idea would be to replace a pointer, but with ulOverlayGetView
there is only one structure copy.
Current approach:
func (view *View) GetInspectorView() *View {
return &View{
v: C.ulViewCreateInspectorView(view.v),
}
}
From the browser Example:
void Tab::ToggleInspector() {
if (!inspector_overlay_) {
inspector_overlay_ = Overlay::Create(ui_->window_, *view()->inspector(), 0, 0);
} else {
if (inspector_overlay_->is_hidden())
inspector_overlay_->Show();
else
inspector_overlay_->Hide();
}
// Force resize to update layout
Resize(container_width_, container_height_);
}
If there isn't any approach i already created an issue for the CAPI. ultralight-ux/Ultralight#252
Hello, when I try to build any of the examples I get this error:
# github.com/maneac/go-ultralight
/home/.tucanix/go/src/github.com/maneac/go-ultralight/SDK/bin/linux/libUltralightCore.so: undefined reference to `typeinfo for std::thread::_State@GLIBCXX_3.4.22'
/home/.tucanix/go/src/github.com/maneac/go-ultralight/SDK/bin/linux/libUltralightCore.so: undefined reference to `std::thread::_M_start_thread(std::unique_ptr<std::thread::_State, std::default_delete<std::thread::_State> >, void (*)())@GLIBCXX_3.4.22'
/home/.tucanix/go/src/github.com/maneac/go-ultralight/SDK/bin/linux/libUltralightCore.so: undefined reference to `std::thread::_State::~_State()@GLIBCXX_3.4.22'
collect2: error: ld returned 1 exit status
Version:
go version go1.13.4 linux/amd64
gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.12)
Ubuntu 16.04.6 LTS
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.