summaryrefslogtreecommitdiff
path: root/api
diff options
context:
space:
mode:
authorportix <none@none>2012-10-02 23:59:15 +0200
committerportix <none@none>2012-10-02 23:59:15 +0200
commit24ef749b95bfb684bdc465b8a6748873514a69b8 (patch)
tree3926bfe8a8195d5a73c61959213dac22107b4d81 /api
parent0ef10deba55e01d553b887c3017cf63fcbe16565 (diff)
downloaddwb-24ef749b95bfb684bdc465b8a6748873514a69b8.zip
Update statusbar from scripts
Diffstat (limited to 'api')
-rw-r--r--api/dwb-js.7102
-rw-r--r--api/jsapi.7.txt36
-rw-r--r--api/jsapi.txt57
3 files changed, 192 insertions, 3 deletions
diff --git a/api/dwb-js.7 b/api/dwb-js.7
index 46e78cb8..dd810e73 100644
--- a/api/dwb-js.7
+++ b/api/dwb-js.7
@@ -2,12 +2,12 @@
.\" Title: dwb-js
.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
.\" Generator: DocBook XSL Stylesheets v1.77.1 <http://docbook.sf.net/>
-.\" Date: 09/25/2012
+.\" Date: 10/02/2012
.\" Manual: \ \&
.\" Source: \ \&
.\" Language: English
.\"
-.TH "DWB\-JS" "7" "09/25/2012" "\ \&" "\ \&"
+.TH "DWB\-JS" "7" "10/02/2012" "\ \&" "\ \&"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
@@ -591,6 +591,27 @@ A string with the file content
.nr an-break-flag 1
.br
.ps +1
+\fBString io.statusBar(Object text)\fR
+.RS 4
+.sp
+Sets the statusbar text\&. The statusbar consists of two labels, a \fImiddle\fR label and a \fIright\fR label, on both labels pango markup can be used
+.PP
+\fItext\&.middle\fR
+.RS 4
+Text for the middle label
+.RE
+.PP
+\fItext\&.right\fR
+.RS 4
+Text for the right label
+.RE
+.RE
+.sp
+.it 1 an-trap
+.nr an-no-space-flag 1
+.nr an-break-flag 1
+.br
+.ps +1
\fBBoolean io.write(String path, String mode, String text)\fR
.RS 4
.sp
@@ -827,6 +848,28 @@ a hostname
.RS 4
the base domain
.RE
+.RE
+.sp
+.it 1 an-trap
+.nr an-no-space-flag 1
+.nr an-break-flag 1
+.br
+.ps +1
+\fBString util.markupEscape(String text)\fR
+.RS 4
+.sp
+Escapes text for usage with pango markup\&.
+.PP
+\fItext\fR
+.RS 4
+A text to escape
+.RE
+.PP
+\fIreturns\fR
+.RS 4
+The escaped text or
+\fInull\fR;
+.RE
.sp
dwb also adds additional methods to builtin objects
.RE
@@ -2099,6 +2142,61 @@ The network response
.nr an-break-flag 1
.br
.ps +1
+\fBstatusBarChange\fR
+.RS 4
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+signals\&.connect("statusBarChange", function(webview, data));
+.fi
+.if n \{\
+.RE
+.\}
+.sp
+Emitted before the status bar is updated, return false if dwb should not update the statusbar\&.
+.PP
+\fIwebview\fR
+.RS 4
+The focused webview
+.RE
+.PP
+\fIdata\&.ssl\fR
+.RS 4
+SSL\-State of the page, can either be
+\fItrusted\fR,
+\fIuntrusted\fR
+or
+\fInone\fR
+.RE
+.PP
+\fIdata\&.canGoBack\fR
+.RS 4
+Whether it is possible to navigate back in the webview
+.RE
+.PP
+\fIdata\&.canGoForward\fR
+.RS 4
+Whether it is possible to navigate forward in the webview
+.RE
+.PP
+\fIdata\&.scriptsBlocked\fR
+.RS 4
+Whether scripts are blocked
+.RE
+.PP
+\fIdata\&.pluginsBlocked\fR
+.RS 4
+Whether plugins are blocked
+.RE
+.RE
+.sp
+.it 1 an-trap
+.nr an-no-space-flag 1
+.nr an-break-flag 1
+.br
+.ps +1
\fBtabFocus\fR
.RS 4
.sp
diff --git a/api/jsapi.7.txt b/api/jsapi.7.txt
index d03cba61..227342c0 100644
--- a/api/jsapi.7.txt
+++ b/api/jsapi.7.txt
@@ -272,6 +272,16 @@ _path_;; Path to a file that should be read
_returns_;; A string with the file content
****
+==== String io.statusBar(Object text)
+****
+
+Sets the statusbar text. The statusbar consists of two labels, a 'middle' label and
+a 'right' label, on both labels pango markup can be used
+
+_text.middle_;; Text for the middle label
+_text.right_;; Text for the right label
+****
+
==== Boolean io.write(String path, String mode, String text)
****
@@ -382,6 +392,15 @@ _hostname_;; a hostname
_returns_;; the base domain
****
+==== String util.markupEscape(String text)
+****
+
+Escapes text for usage with pango markup.
+
+_text_;; A text to escape
+_returns_;; The escaped text or 'null';
+****
+
dwb also adds additional methods to builtin objects
==== void Object.forEach(Function func(String key, Object value, Object this))
@@ -957,6 +976,23 @@ _request_;; The network request
_response_;; The network response
****
+==== statusBarChange
+****
+----
+signals.connect("statusBarChange", function(webview, data));
+----
+
+Emitted before the status bar is updated, return false if dwb should not update
+the statusbar.
+
+_webview_;; The focused webview
+_data.ssl_;; SSL-State of the page, can either be 'trusted', 'untrusted' or 'none'
+_data.canGoBack_;; Whether it is possible to navigate back in the webview
+_data.canGoForward_;; Whether it is possible to navigate forward in the webview
+_data.scriptsBlocked_;; Whether scripts are blocked
+_data.pluginsBlocked_;; Whether plugins are blocked
+****
+
==== tabFocus
****
----
diff --git a/api/jsapi.txt b/api/jsapi.txt
index 8541ec05..442d6e33 100644
--- a/api/jsapi.txt
+++ b/api/jsapi.txt
@@ -428,7 +428,6 @@ prompt, default +true+, optional
_returns_;; The text that was entered or +null+
****
-
****
[[read]]
[float]
@@ -448,6 +447,25 @@ _returns_;; A string with the file content
****
****
+[[statusBar]]
+[float]
+==== *statusBar()* ====
+
+[source,javascript]
+----
+void io.statusBar(Object text)
+----
+
+Sets the statusbar text. The statusbar consists of two labels, a 'middle' label and
+a 'right' label, on both labels pango markup can be used
+
+ ::
+
+_text.middle_;; Text for the middle label
+_text.right_;; Text for the right label
+****
+
+****
[[write]]
[float]
==== *write()* ====
@@ -712,6 +730,22 @@ _hostname_;; a hostname
_returns_;; the base domain
****
+****
+[[markupEscape]]
+[float]
+==== *markupEscape()* ====
+
+[source,javascript]
+----
+String util.markupEscape(String text)
+----
+
+Escapes text for usage with pango markup.
+
+_text_;; A text to escape
+_returns_;; The escaped text or 'null';
+****
+
dwb also adds additional methods to builtin objects
****
@@ -1731,6 +1765,27 @@ _response_;; The network response
****
****
+[[statusBarChange]]
+[float]
+==== *statusBarChange* ====
+
+[source,javascript]
+----
+Boolean callback(webview, json)
+----
+
+Emitted before the status bar is updated, return +false+ if dwb should not update
+the statusbar.
+
+_webview_;; The focused webview
+_data.ssl_;; SSL-State of the page, can either be 'trusted', 'untrusted' or 'none'
+_data.canGoBack_;; Whether it is possible to navigate back in the webview
+_data.canGoForward_;; Whether it is possible to navigate forward in the webview
+_data.scriptsBlocked_;; Whether scripts are blocked
+_data.pluginsBlocked_;; Whether plugins are blocked
+****
+
+****
[[tabFocus]]
[float]
==== *tabFocus* ====