mirror of
https://github.com/rabbibotton/clog.git
synced 2025-12-06 02:30:42 -08:00
clogframe and start on native apps with WebView.h
This commit is contained in:
parent
e6df0e5ab0
commit
92381b366a
8 changed files with 1727 additions and 2 deletions
34
clogframe/README.md
vendored
Normal file
34
clogframe/README.md
vendored
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
## CLOGFrame
|
||||
|
||||
CLOG Frame uses the native browser control on your platform to create
|
||||
a simple app the displays a 640x480 frame ready to recieve your app.
|
||||
|
||||
clogframe[.exe] "Window Title" port
|
||||
|
||||
in the clogframe directory run:
|
||||
|
||||
|
||||
On Mac (all requirements for build part of OS):
|
||||
|
||||
./make-mac
|
||||
./make-snake
|
||||
|
||||
On Linux
|
||||
|
||||
Development: apt install libgtk-3-dev libwebkit2gtk-4.0-dev
|
||||
Production: apt install libgtk-3-0 libwebkit2gtk-4.0-37
|
||||
|
||||
./make-linux
|
||||
./make-snake
|
||||
|
||||
On Windows
|
||||
|
||||
to do (see https://github.com/webview/webview)
|
||||
|
||||
On All Platfroms:
|
||||
|
||||
This will create two executable clogframe and snake. clogframe
|
||||
must be in the same directory and the sname executable. Then
|
||||
run:
|
||||
|
||||
./snake
|
||||
14
clogframe/clogframe.cpp
vendored
Normal file
14
clogframe/clogframe.cpp
vendored
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
#include <iostream>
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
#include "webview.h"
|
||||
int main(int argc,char* argv[]) {
|
||||
webview::webview w(true, nullptr);
|
||||
w.set_title(argv[1]);
|
||||
w.set_size(640, 480, WEBVIEW_HINT_NONE);
|
||||
std::ostringstream o;
|
||||
o << "http://127.0.0.1:" << argv[2];
|
||||
w.navigate(o.str());
|
||||
w.run();
|
||||
return 0;
|
||||
}
|
||||
1
clogframe/make-linux
vendored
Normal file
1
clogframe/make-linux
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
g++ clogframe.cpp -std=c++11 -Ilibs/webview $(pkg-config --cflags --libs gtk+-3.0 webkit2gtk-4.0) -o clogframe
|
||||
1
clogframe/make-mac
vendored
Executable file
1
clogframe/make-mac
vendored
Executable file
|
|
@ -0,0 +1 @@
|
|||
c++ clogframe.cpp -std=c++11 -framework WebKit -o clogframe
|
||||
1
clogframe/make-snake
vendored
Executable file
1
clogframe/make-snake
vendored
Executable file
|
|
@ -0,0 +1 @@
|
|||
sbcl --eval "(ql:quickload :clog)" --eval "(clog:load-demo 1)" --eval "(sb-ext:save-lisp-and-die #P\"snake\" :toplevel (lambda () (clog-demo-1:start-demo :port 0 :app t :start-browser nil :clogframe t) (loop (sleep 10))) :executable t :compression t)"
|
||||
1666
clogframe/webview.h
vendored
Normal file
1666
clogframe/webview.h
vendored
Normal file
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue