diff --git a/README.md b/README.md index d085f22..d9fc51d 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,7 @@ +#### DEPRECATED - This package is no longer supporter or maintained. + + + ![Logo Thrust](http://i.imgur.com/IviZAGZ.png) **Chromium-based cross-platform / cross-language application framework** @@ -10,8 +14,6 @@ Thrust is based on Chromium's Content Module and is supported on Linux, MacOSX a ![Cross-Platform Screenshots](http://i.imgur.com/7K98jyW.png) *Screenshot of Thrust Getting Started example running on each major platform.* -Thrust will be powering the next versions of [Breach](http://breach.cc) - To better understand what Thrust can do, check out **[JankyBrowser](https://gist.github.com/morganrallen/f07f59802884bcdcad4a)** by @morganrallen, the cross-platform browser that fits in a gist: ``` @@ -24,6 +26,9 @@ npm install -g \ - [NodeJS](#nodejs) - [Go](#go) - [Python](#python) + - [Scala](#scala) + - [Clojure](#clojure) + - [Perl](#perl) - [API Reference](#api-reference) - [Architecture](#architecture) - [Community](#community) @@ -46,14 +51,13 @@ All these Getting Started example work as is on each major platform (MacOSX, Windows, Linux) ### NodeJS - ##### Getting Started First install with `npm install node-thrust` ```Javascript require('node-thrust')(function(err, api) { - api.window({ root_url: 'https://breach.cc' }).show(); + api.window({ root_url: 'https://google.com' }).show(); }); ``` @@ -68,23 +72,31 @@ require('node-thrust')(function(err, api) { First download with `go get -u github.com/miketheprogrammer/go-thrust/` ```Go +``` package main import ( - "github.com/miketheprogrammer/go-thrust/dispatcher" - "github.com/miketheprogrammer/go-thrust/spawn" - "github.com/miketheprogrammer/go-thrust/window" + "github.com/miketheprogrammer/go-thrust/lib/dispatcher" + "github.com/miketheprogrammer/go-thrust/lib/spawn" + "github.com/miketheprogrammer/go-thrust/lib/bindings/window" + "github.com/miketheprogrammer/go-thrust/lib/commands" ) func main() { spawn.Run() - thrustWindow := window.NewWindow("http://breach.cc/", nil) + size := commands.SizeHW{} + opts := window.Options{ + RootUrl: "http://google.com", + Size: size, + Title: "Demo window", + HasFrame: true, + } + thrustWindow := window.NewWindow(opts) thrustWindow.Show() thrustWindow.Maximize() thrustWindow.Focus() dispatcher.RunLoop() } -``` ##### Library @@ -103,7 +115,7 @@ loop = asyncio.get_event_loop() api = pythrust.API(loop) asyncio.async(api.spawn()) -asyncio.async(api.window({ 'root_url': 'http://breach.cc' }).show()) +asyncio.async(api.window({ 'root_url': 'http://google.com' }).show()) loop.run_forever() ``` @@ -112,6 +124,102 @@ loop.run_forever() - **pythrust** [breach/pythrust](https://github.com/breach/pythrust/) +### Scala + +##### Getting Started + +Include scala-thrust jar on your classpath. (Add to lib in your project.) + +```Scala +import scala.concurrent.ExecutionContext.Implicits.global +import com.github.eklavya.thrust._ + +object Main extends App { + Window.create("http://google.com").foreach { w => + w.show + w.maximize + w.openDevtools + w.focus(true) + w.onBlur(() => println("we were blurred")) + w.onFocus(() => println("we were focused")) + Menu.create("MyMenu").foreach { m => + val i = MenuItem("Item1", _ => println("Item1 was clicked")) + m.addItem(i) + m.popup(w) + } + } +} +``` + +##### Library + +- **scala-thrust** [eklavya/scala-thrust](https://github.com/eklavya/scala-thrust/) + +### Clojure + +##### Getting Started + +- [Installation](https://github.com/solicode/clj-thrust#installation) +- [Sample Project](https://github.com/solicode/clj-thrust#sample-project) + +```clojure +(ns my-app.core + (:require [clj-thrust.core :refer [create-process destroy-process]] + [clj-thrust.window :as w])) + +(let [process (create-process) ; `create-process` also takes path to Thrust directory + window (w/create-window process + :root-url "http://localhost:8080" ; URL to your web app + :size {:width 400 :height 300})] + (w/listen-closed window + (fn [e] + (destroy-process process))) ; Optionally call `(System/exit 0)` here. + (w/show window) + (w/focus window true)) +``` + +##### Library + +- **clj-thrust** [solicode/clj-thrust](https://github.com/solicode/clj-thrust) + +### Perl + +##### Getting Started + +Install with `cpanm Thrust [--sudo]` + +Simple command line test: + +``` +perl -MThrust -e 'Thrust->window->show->maximize->open_devtools->run' +``` + +Basic program + +```Perl +use Thrust; + +my $t = Thrust->new; + +my $w = $t->window( + root_url => 'data:text/html,Hello World!', + title => 'My App', + size => { width => 800, height => 600 }, + ); + +$w->on(closed => sub { exit }); + +$w->show; + +$t->run; ## enter event loop +``` + +##### Library + +- [metacpan](https://metacpan.org/pod/Thrust) +- [github](https://github.com/hoytech/Thrust) + + *** ## API Reference @@ -155,15 +263,8 @@ are availble in the [docs/](https://github.com/breach/thrust/tree/master/docs) - List of people relying on Thrust: [List of Thrust Users](https://github.com/breach/thrust/wiki/List-of-Thrust-Users) -##### Thrust7.5k Contest - -- 7.5k max Browser implementation based on Thrust. *Coming soon*. Ping -dev@breach.cc if interested! (Credits to @morganrallen for the awesome idea) - ##### Getting Involved - -- Mailing list: [breach-dev@googlegroups.com](https://groups.google.com/d/forum/breach-dev) -- IRC Channel: #breach on Freenode +No longer maintained actively. *** ## Features & Roadmap @@ -204,4 +305,3 @@ Build both the `Release` and `Debug` targets with the following commands: Note that `bootstrap.py` may take some time as it checks out `brightray` and downloads `libchromiumcontent` for your platform. - diff --git a/src/renderer/extensions/resources/web_view.js b/src/renderer/extensions/resources/web_view.js index ab10ba3..cee9aa0 100644 --- a/src/renderer/extensions/resources/web_view.js +++ b/src/renderer/extensions/resources/web_view.js @@ -844,6 +844,7 @@ function registerBrowserPluginElement() { this.setAttribute('type', 'application/browser-plugin'); this.setAttribute('id', 'browser-plugin-' + getNextId()); // The node fills in the container. + this.style.display = 'block'; this.style.width = '100%'; this.style.height = '100%'; }; diff --git a/vendor/brightray b/vendor/brightray index ddfebd0..7b6e79b 160000 --- a/vendor/brightray +++ b/vendor/brightray @@ -1 +1 @@ -Subproject commit ddfebd06326a956145dfde6ed5f863396953da6d +Subproject commit 7b6e79b706a5334cf19286c93c539b3e3c3028d5 diff --git a/vendor/depot_tools b/vendor/depot_tools index 8b4900e..0c806a7 160000 --- a/vendor/depot_tools +++ b/vendor/depot_tools @@ -1 +1 @@ -Subproject commit 8b4900e77f4eed3446eb54a4af5ffbb243940d07 +Subproject commit 0c806a71c5d02df483587f6aea70cc20f0173ec4