index
This commit is contained in:
@@ -306,7 +306,7 @@ The value is converted to JavaScript source text before the generated JavaScript
|
|||||||
is returned.
|
is returned.
|
||||||
}
|
}
|
||||||
|
|
||||||
@section{Example}
|
@section[#:tag "js-transform-example"]{Example}
|
||||||
|
|
||||||
The following example combines function definition, method calls, list
|
The following example combines function definition, method calls, list
|
||||||
construction, sequential bindings and a lambda expression passed to a JavaScript
|
construction, sequential bindings and a lambda expression passed to a JavaScript
|
||||||
|
|||||||
+3
-3
@@ -18,7 +18,7 @@ Menu data structures used by the webview library.
|
|||||||
This module provides constructors, predicates, traversal helpers, mutation
|
This module provides constructors, predicates, traversal helpers, mutation
|
||||||
operations, and JSON conversion for menu trees.
|
operations, and JSON conversion for menu trees.
|
||||||
|
|
||||||
@section{Overview}
|
@section[#:tag "menu-overview"]{Overview}
|
||||||
|
|
||||||
A menu is represented as a tree. A menu consists of menu items, and a menu item
|
A menu is represented as a tree. A menu consists of menu items, and a menu item
|
||||||
may optionally contain a submenu.
|
may optionally contain a submenu.
|
||||||
@@ -36,7 +36,7 @@ structure constructors and predicates are not exported directly. The public API
|
|||||||
uses constructor procedures and helper functions operating on those internal
|
uses constructor procedures and helper functions operating on those internal
|
||||||
values.
|
values.
|
||||||
|
|
||||||
@section{Predicates}
|
@section[#:tag "menu-predicates"]{Predicates}
|
||||||
|
|
||||||
@defproc[(is-wv-menu? [mnu any/c]) boolean?]{
|
@defproc[(is-wv-menu? [mnu any/c]) boolean?]{
|
||||||
|
|
||||||
@@ -154,7 +154,7 @@ Sets the callback of the menu item identified by @racket[id].
|
|||||||
@racket[menu] value.
|
@racket[menu] value.
|
||||||
}
|
}
|
||||||
|
|
||||||
@section{Conversion}
|
@section[#:tag "menu-conversion"]{Conversion}
|
||||||
|
|
||||||
@defproc[(wv-menu->json [menu any/c]) string?]{
|
@defproc[(wv-menu->json [menu any/c]) string?]{
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
scribble/core
|
scribble/core
|
||||||
)
|
)
|
||||||
|
|
||||||
@title{@elem{racket-webview}}
|
@title[#:tag "racket-webview-manual"]{@elem{racket-webview}}
|
||||||
|
|
||||||
@table-of-contents[]
|
@table-of-contents[]
|
||||||
|
|
||||||
|
|||||||
@@ -26,9 +26,9 @@
|
|||||||
@title{Racket Webview - v@version - Introduction}
|
@title{Racket Webview - v@version - Introduction}
|
||||||
@author[@author+email["Hans Dijkema" "hans@dijkewijk.nl"]]
|
@author[@author+email["Hans Dijkema" "hans@dijkewijk.nl"]]
|
||||||
|
|
||||||
@defmodule{racket-webview}
|
@defmodule[racket-webview]
|
||||||
|
|
||||||
@section{Overview}
|
@section[#:tag "racket-webview-intro-overview"]{Overview}
|
||||||
|
|
||||||
This documentation is provided for version @bold{@version} of racket webview.
|
This documentation is provided for version @bold{@version} of racket webview.
|
||||||
|
|
||||||
|
|||||||
@@ -1,11 +1,12 @@
|
|||||||
#lang scribble/manual
|
#lang scribble/manual
|
||||||
|
|
||||||
@defmodule{racket-webview/racket-webview-qt}
|
|
||||||
|
|
||||||
@title{Racket FFI Interface for @tt{rktwebview_qt}}
|
@title{Racket FFI Interface for @tt{rktwebview_qt}}
|
||||||
|
|
||||||
|
@defmodule[racket-webview/racket-webview-qt]
|
||||||
@author[@author+email["Hans Dijkema" "hans@dijkewijk.nl"]]
|
@author[@author+email["Hans Dijkema" "hans@dijkewijk.nl"]]
|
||||||
|
|
||||||
@section{Overview}
|
@section[#:tag "racket-webview-qt-overview"]{Overview}
|
||||||
|
|
||||||
The module @tt{racket-webview-qt.rkt} provides a Racket FFI wrapper around the
|
The module @tt{racket-webview-qt.rkt} provides a Racket FFI wrapper around the
|
||||||
native @tt{rktwebview_qt} library. It loads the shared library, initializes the
|
native @tt{rktwebview_qt} library. It loads the shared library, initializes the
|
||||||
@@ -413,7 +414,7 @@ Requests a file-save dialog.
|
|||||||
Shows a native message box.
|
Shows a native message box.
|
||||||
}
|
}
|
||||||
|
|
||||||
@section{Event Delivery}
|
@section[#:tag "racket-webview-qt-event-delivery"]{Event Delivery}
|
||||||
|
|
||||||
Each webview has an associated event callback.
|
Each webview has an associated event callback.
|
||||||
|
|
||||||
@@ -461,7 +462,7 @@ Example result:
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
@section{Example}
|
@section[#:tag "racket-webview-qt-example"]{Example}
|
||||||
|
|
||||||
@racketblock[
|
@racketblock[
|
||||||
(define ctx
|
(define ctx
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
@(require racket/base
|
@(require racket/base
|
||||||
scribble/core)
|
scribble/core)
|
||||||
|
|
||||||
@title{racket-webview}
|
@title[#:tag "racket-webview-functional"]{racket-webview}
|
||||||
@author[@author+email["Hans Dijkema" "hans@dijkewijk.nl"]]
|
@author[@author+email["Hans Dijkema" "hans@dijkewijk.nl"]]
|
||||||
|
|
||||||
@defmodule[racket-webview/racket-webview]
|
@defmodule[racket-webview/racket-webview]
|
||||||
@@ -31,7 +31,7 @@ JavaScript calls. When an HTML file is
|
|||||||
served, the context's CSS boilerplate is injected immediately before the
|
served, the context's CSS boilerplate is injected immediately before the
|
||||||
closing @tt{</head>} tag.
|
closing @tt{</head>} tag.
|
||||||
|
|
||||||
@section{Contexts}
|
@section[#:tag "racket-webview-contexts"]{Contexts}
|
||||||
|
|
||||||
|
|
||||||
@defproc[(webview-new-context
|
@defproc[(webview-new-context
|
||||||
@@ -196,7 +196,7 @@ structure, an exception is raised.
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@section{Dialogs}
|
@section[#:tag "racket-webview-dialogs"]{Dialogs}
|
||||||
|
|
||||||
Dialog functions return immediately. Results are delivered asynchronously via
|
Dialog functions return immediately. Results are delivered asynchronously via
|
||||||
events.
|
events.
|
||||||
|
|||||||
+3
-3
@@ -16,7 +16,7 @@ RGBA color support used by the webview library.
|
|||||||
This module exports a transparent @racket[rgba] structure together with
|
This module exports a transparent @racket[rgba] structure together with
|
||||||
predicates and conversion procedures for working with CSS-style color values.
|
predicates and conversion procedures for working with CSS-style color values.
|
||||||
|
|
||||||
@section{Overview}
|
@section[#:tag "rgba-overview"]{Overview}
|
||||||
|
|
||||||
An @racket[rgba] value represents a color using red, green, blue, and alpha
|
An @racket[rgba] value represents a color using red, green, blue, and alpha
|
||||||
components.
|
components.
|
||||||
@@ -35,7 +35,7 @@ The intended external representation is the CSS form:
|
|||||||
"rgba(r,g,b,a)"
|
"rgba(r,g,b,a)"
|
||||||
]
|
]
|
||||||
|
|
||||||
@section{Predicates}
|
@section[#:tag "rgba-predicates"]{Predicates}
|
||||||
|
|
||||||
@defproc[(rgba/color? [v any/c]) boolean?]{
|
@defproc[(rgba/color? [v any/c]) boolean?]{
|
||||||
|
|
||||||
@@ -68,7 +68,7 @@ components. The field @racket[a] is the alpha component.
|
|||||||
The structure is transparent.
|
The structure is transparent.
|
||||||
}
|
}
|
||||||
|
|
||||||
@section{Conversion}
|
@section[#:tag "rgba-conversion"]{Conversion}
|
||||||
|
|
||||||
@defproc[(rgba->string [c rgba?]) string?]{
|
@defproc[(rgba->string [c rgba?]) string?]{
|
||||||
|
|
||||||
|
|||||||
+36
-36
@@ -1,6 +1,6 @@
|
|||||||
#lang scribble/manual
|
#lang scribble/manual
|
||||||
|
|
||||||
@defmodule[racket-webview/c-api]
|
@bold{Interface:} @tt{racket-webview/c-api}
|
||||||
|
|
||||||
@author[@author+email["Hans Dijkema" "hans@dijkewijk.nl"]]
|
@author[@author+email["Hans Dijkema" "hans@dijkewijk.nl"]]
|
||||||
|
|
||||||
@@ -106,7 +106,7 @@ This applies to values returned by @tt{rkt_webview_info()},
|
|||||||
|
|
||||||
@section{Environment and Runtime Control}
|
@section{Environment and Runtime Control}
|
||||||
|
|
||||||
@defproc[(rkt_webview_env [env_cmds any/c]) void?]{
|
@defproc[#:link-target? #f (rkt_webview_env [env_cmds any/c]) void?]{
|
||||||
C signature:
|
C signature:
|
||||||
|
|
||||||
@verbatim{
|
@verbatim{
|
||||||
@@ -120,7 +120,7 @@ form @tt{"NAME=value"}.
|
|||||||
Return value: none.
|
Return value: none.
|
||||||
}
|
}
|
||||||
|
|
||||||
@defproc[(rkt_webview_init) void?]{
|
@defproc[#:link-target? #f (rkt_webview_init) void?]{
|
||||||
C signature:
|
C signature:
|
||||||
|
|
||||||
@verbatim{
|
@verbatim{
|
||||||
@@ -133,7 +133,7 @@ helper process.
|
|||||||
Return value: none.
|
Return value: none.
|
||||||
}
|
}
|
||||||
|
|
||||||
@defproc[(rkt_webview_cleanup) void?]{
|
@defproc[#:link-target? #f (rkt_webview_cleanup) void?]{
|
||||||
C signature:
|
C signature:
|
||||||
|
|
||||||
@verbatim{
|
@verbatim{
|
||||||
@@ -146,7 +146,7 @@ previously returned context and webview handles are invalid.
|
|||||||
Return value: none.
|
Return value: none.
|
||||||
}
|
}
|
||||||
|
|
||||||
@defproc[(rkt_webview_set_loglevel [l any/c]) void?]{
|
@defproc[#:link-target? #f (rkt_webview_set_loglevel [l any/c]) void?]{
|
||||||
C signature:
|
C signature:
|
||||||
|
|
||||||
@verbatim{
|
@verbatim{
|
||||||
@@ -158,7 +158,7 @@ Sets the backend log level.
|
|||||||
Return value: none.
|
Return value: none.
|
||||||
}
|
}
|
||||||
|
|
||||||
@defproc[(rkt_webview_info) any/c]{
|
@defproc[#:link-target? #f (rkt_webview_info) any/c]{
|
||||||
C signature:
|
C signature:
|
||||||
|
|
||||||
@verbatim{
|
@verbatim{
|
||||||
@@ -171,7 +171,7 @@ Returns a pointer to @tt{rkt_data_t}. The returned object has
|
|||||||
Return value: @tt{rkt_data_t *}, caller-owned.
|
Return value: @tt{rkt_data_t *}, caller-owned.
|
||||||
}
|
}
|
||||||
|
|
||||||
@defproc[(rkt_webview_version) any/c]{
|
@defproc[#:link-target? #f (rkt_webview_version) any/c]{
|
||||||
C signature:
|
C signature:
|
||||||
|
|
||||||
@verbatim{
|
@verbatim{
|
||||||
@@ -184,9 +184,9 @@ Returns a pointer to @tt{rkt_data_t}. The returned object has
|
|||||||
Return value: @tt{rkt_data_t *}, caller-owned.
|
Return value: @tt{rkt_data_t *}, caller-owned.
|
||||||
}
|
}
|
||||||
|
|
||||||
@subsection{Events}
|
@subsection[#:tag "rktwebview-c-api-events"]{Events}
|
||||||
|
|
||||||
@defproc[(rkt_webview_events_waiting) exact-integer?]{
|
@defproc[#:link-target? #f (rkt_webview_events_waiting) exact-integer?]{
|
||||||
C signature:
|
C signature:
|
||||||
|
|
||||||
@verbatim{
|
@verbatim{
|
||||||
@@ -198,7 +198,7 @@ Returns the number of events currently waiting in the event queue.
|
|||||||
Return value: @tt{int}.
|
Return value: @tt{int}.
|
||||||
}
|
}
|
||||||
|
|
||||||
@defproc[(rkt_webview_get_event) any/c]{
|
@defproc[#:link-target? #f (rkt_webview_get_event) any/c]{
|
||||||
C signature:
|
C signature:
|
||||||
|
|
||||||
@verbatim{
|
@verbatim{
|
||||||
@@ -221,9 +221,9 @@ This keeps the event queue flowing, allows asynchronous operations such as
|
|||||||
dialogs to complete in a timely manner, and avoids the impression that the system
|
dialogs to complete in a timely manner, and avoids the impression that the system
|
||||||
has stalled while the Racket side is simply not looking.
|
has stalled while the Racket side is simply not looking.
|
||||||
|
|
||||||
@section{Contexts}
|
@section[#:tag "rktwebview-c-api-contexts"]{Contexts}
|
||||||
|
|
||||||
@defproc[(rkt_webview_new_context [boilerplate_js string?]
|
@defproc[#:link-target? #f (rkt_webview_new_context [boilerplate_js string?]
|
||||||
[optional_server_cert_pem string?])
|
[optional_server_cert_pem string?])
|
||||||
exact-integer?]{
|
exact-integer?]{
|
||||||
C signature:
|
C signature:
|
||||||
@@ -241,7 +241,7 @@ Return value: @tt{rkt_wv_context_t}.
|
|||||||
|
|
||||||
@section{Webviews}
|
@section{Webviews}
|
||||||
|
|
||||||
@defproc[(rkt_webview_create [context exact-integer?]
|
@defproc[#:link-target? #f (rkt_webview_create [context exact-integer?]
|
||||||
[parent exact-integer?])
|
[parent exact-integer?])
|
||||||
exact-integer?]{
|
exact-integer?]{
|
||||||
C signature:
|
C signature:
|
||||||
@@ -257,7 +257,7 @@ otherwise it is created as a top-level window.
|
|||||||
Return value: webview handle as @tt{int}.
|
Return value: webview handle as @tt{int}.
|
||||||
}
|
}
|
||||||
|
|
||||||
@defproc[(rkt_webview_close [wv exact-integer?]) void?]{
|
@defproc[#:link-target? #f (rkt_webview_close [wv exact-integer?]) void?]{
|
||||||
C signature:
|
C signature:
|
||||||
|
|
||||||
@verbatim{
|
@verbatim{
|
||||||
@@ -269,7 +269,7 @@ Closes the specified webview.
|
|||||||
Return value: none.
|
Return value: none.
|
||||||
}
|
}
|
||||||
|
|
||||||
@defproc[(rkt_webview_valid [wv exact-integer?]) boolean?]{
|
@defproc[#:link-target? #f (rkt_webview_valid [wv exact-integer?]) boolean?]{
|
||||||
C signature:
|
C signature:
|
||||||
|
|
||||||
@verbatim{
|
@verbatim{
|
||||||
@@ -281,7 +281,7 @@ Checks whether @tt{wv} is a valid webview handle.
|
|||||||
Return value: @tt{bool}.
|
Return value: @tt{bool}.
|
||||||
}
|
}
|
||||||
|
|
||||||
@defproc[(rkt_webview_set_title [wv exact-integer?] [title string?])
|
@defproc[#:link-target? #f (rkt_webview_set_title [wv exact-integer?] [title string?])
|
||||||
exact-integer?]{
|
exact-integer?]{
|
||||||
C signature:
|
C signature:
|
||||||
|
|
||||||
@@ -294,7 +294,7 @@ Sets the window title of the specified webview.
|
|||||||
Return value: @tt{result_t}.
|
Return value: @tt{result_t}.
|
||||||
}
|
}
|
||||||
|
|
||||||
@defproc[(rkt_webview_set_ou_token [wv exact-integer?] [token string?]) void?]{
|
@defproc[#:link-target? #f (rkt_webview_set_ou_token [wv exact-integer?] [token string?]) void?]{
|
||||||
C signature:
|
C signature:
|
||||||
|
|
||||||
@verbatim{
|
@verbatim{
|
||||||
@@ -309,7 +309,7 @@ Return value: none.
|
|||||||
|
|
||||||
@section{Navigation and JavaScript}
|
@section{Navigation and JavaScript}
|
||||||
|
|
||||||
@defproc[(rkt_webview_set_url [wv exact-integer?] [url string?]) exact-integer?]{
|
@defproc[#:link-target? #f (rkt_webview_set_url [wv exact-integer?] [url string?]) exact-integer?]{
|
||||||
C signature:
|
C signature:
|
||||||
|
|
||||||
@verbatim{
|
@verbatim{
|
||||||
@@ -321,7 +321,7 @@ Navigates the specified webview to the given URL.
|
|||||||
Return value: @tt{result_t}.
|
Return value: @tt{result_t}.
|
||||||
}
|
}
|
||||||
|
|
||||||
@defproc[(rkt_webview_set_html [wv exact-integer?] [html string?]) exact-integer?]{
|
@defproc[#:link-target? #f (rkt_webview_set_html [wv exact-integer?] [html string?]) exact-integer?]{
|
||||||
C signature:
|
C signature:
|
||||||
|
|
||||||
@verbatim{
|
@verbatim{
|
||||||
@@ -333,7 +333,7 @@ Loads raw HTML into the specified webview.
|
|||||||
Return value: @tt{result_t}.
|
Return value: @tt{result_t}.
|
||||||
}
|
}
|
||||||
|
|
||||||
@defproc[(rkt_webview_run_js [wv exact-integer?] [js string?]) exact-integer?]{
|
@defproc[#:link-target? #f (rkt_webview_run_js [wv exact-integer?] [js string?]) exact-integer?]{
|
||||||
C signature:
|
C signature:
|
||||||
|
|
||||||
@verbatim{
|
@verbatim{
|
||||||
@@ -345,7 +345,7 @@ Executes JavaScript asynchronously in the specified webview.
|
|||||||
Return value: @tt{result_t}.
|
Return value: @tt{result_t}.
|
||||||
}
|
}
|
||||||
|
|
||||||
@defproc[(rkt_webview_call_js [wv exact-integer?] [js string?]) any/c]{
|
@defproc[#:link-target? #f (rkt_webview_call_js [wv exact-integer?] [js string?]) any/c]{
|
||||||
C signature:
|
C signature:
|
||||||
|
|
||||||
@verbatim{
|
@verbatim{
|
||||||
@@ -365,7 +365,7 @@ result string.
|
|||||||
Return value: @tt{rkt_data_t *}, caller-owned.
|
Return value: @tt{rkt_data_t *}, caller-owned.
|
||||||
}
|
}
|
||||||
|
|
||||||
@defproc[(rkt_webview_open_devtools [wv exact-integer?]) exact-integer?]{
|
@defproc[#:link-target? #f (rkt_webview_open_devtools [wv exact-integer?]) exact-integer?]{
|
||||||
C signature:
|
C signature:
|
||||||
|
|
||||||
@verbatim{
|
@verbatim{
|
||||||
@@ -379,7 +379,7 @@ Return value: @tt{result_t}.
|
|||||||
|
|
||||||
@section{Window Management}
|
@section{Window Management}
|
||||||
|
|
||||||
@defproc[(rkt_webview_move [w exact-integer?] [x exact-integer?] [y exact-integer?])
|
@defproc[#:link-target? #f (rkt_webview_move [w exact-integer?] [x exact-integer?] [y exact-integer?])
|
||||||
exact-integer?]{
|
exact-integer?]{
|
||||||
C signature:
|
C signature:
|
||||||
|
|
||||||
@@ -392,7 +392,7 @@ Moves the specified window to the given screen coordinates.
|
|||||||
Return value: @tt{result_t}.
|
Return value: @tt{result_t}.
|
||||||
}
|
}
|
||||||
|
|
||||||
@defproc[(rkt_webview_resize [w exact-integer?]
|
@defproc[#:link-target? #f (rkt_webview_resize [w exact-integer?]
|
||||||
[width exact-integer?]
|
[width exact-integer?]
|
||||||
[height exact-integer?])
|
[height exact-integer?])
|
||||||
exact-integer?]{
|
exact-integer?]{
|
||||||
@@ -407,7 +407,7 @@ Resizes the specified window.
|
|||||||
Return value: @tt{result_t}.
|
Return value: @tt{result_t}.
|
||||||
}
|
}
|
||||||
|
|
||||||
@defproc[(rkt_webview_hide [w exact-integer?]) exact-integer?]{
|
@defproc[#:link-target? #f (rkt_webview_hide [w exact-integer?]) exact-integer?]{
|
||||||
C signature:
|
C signature:
|
||||||
|
|
||||||
@verbatim{
|
@verbatim{
|
||||||
@@ -419,7 +419,7 @@ Hides the specified window.
|
|||||||
Return value: @tt{result_t}.
|
Return value: @tt{result_t}.
|
||||||
}
|
}
|
||||||
|
|
||||||
@defproc[(rkt_webview_show [w exact-integer?]) exact-integer?]{
|
@defproc[#:link-target? #f (rkt_webview_show [w exact-integer?]) exact-integer?]{
|
||||||
C signature:
|
C signature:
|
||||||
|
|
||||||
@verbatim{
|
@verbatim{
|
||||||
@@ -431,7 +431,7 @@ Shows the specified window.
|
|||||||
Return value: @tt{result_t}.
|
Return value: @tt{result_t}.
|
||||||
}
|
}
|
||||||
|
|
||||||
@defproc[(rkt_webview_show_normal [w exact-integer?]) exact-integer?]{
|
@defproc[#:link-target? #f (rkt_webview_show_normal [w exact-integer?]) exact-integer?]{
|
||||||
C signature:
|
C signature:
|
||||||
|
|
||||||
@verbatim{
|
@verbatim{
|
||||||
@@ -443,7 +443,7 @@ Restores the specified window to its normal state.
|
|||||||
Return value: @tt{result_t}.
|
Return value: @tt{result_t}.
|
||||||
}
|
}
|
||||||
|
|
||||||
@defproc[(rkt_webview_present [w exact-integer?]) exact-integer?]{
|
@defproc[#:link-target? #f (rkt_webview_present [w exact-integer?]) exact-integer?]{
|
||||||
C signature:
|
C signature:
|
||||||
|
|
||||||
@verbatim{
|
@verbatim{
|
||||||
@@ -455,7 +455,7 @@ Presents the specified window to the user.
|
|||||||
Return value: @tt{result_t}.
|
Return value: @tt{result_t}.
|
||||||
}
|
}
|
||||||
|
|
||||||
@defproc[(rkt_webview_maximize [w exact-integer?]) exact-integer?]{
|
@defproc[#:link-target? #f (rkt_webview_maximize [w exact-integer?]) exact-integer?]{
|
||||||
C signature:
|
C signature:
|
||||||
|
|
||||||
@verbatim{
|
@verbatim{
|
||||||
@@ -467,7 +467,7 @@ Maximizes the specified window.
|
|||||||
Return value: @tt{result_t}.
|
Return value: @tt{result_t}.
|
||||||
}
|
}
|
||||||
|
|
||||||
@defproc[(rkt_webview_minimize [w exact-integer?]) exact-integer?]{
|
@defproc[#:link-target? #f (rkt_webview_minimize [w exact-integer?]) exact-integer?]{
|
||||||
C signature:
|
C signature:
|
||||||
|
|
||||||
@verbatim{
|
@verbatim{
|
||||||
@@ -479,7 +479,7 @@ Minimizes the specified window.
|
|||||||
Return value: @tt{result_t}.
|
Return value: @tt{result_t}.
|
||||||
}
|
}
|
||||||
|
|
||||||
@defproc[(rkt_webview_window_state [w exact-integer?]) exact-integer?]{
|
@defproc[#:link-target? #f (rkt_webview_window_state [w exact-integer?]) exact-integer?]{
|
||||||
C signature:
|
C signature:
|
||||||
|
|
||||||
@verbatim{
|
@verbatim{
|
||||||
@@ -491,7 +491,7 @@ Returns the current state of the specified window.
|
|||||||
Return value: @tt{window_state_t}.
|
Return value: @tt{window_state_t}.
|
||||||
}
|
}
|
||||||
|
|
||||||
@section{Dialogs}
|
@section[#:tag "rktwebview-c-api-dialogs"]{Dialogs}
|
||||||
|
|
||||||
The dialog functions are asynchronous. They request that the dialog be opened on
|
The dialog functions are asynchronous. They request that the dialog be opened on
|
||||||
the Qt side, but do not block the Racket side while the dialog is shown. This is
|
the Qt side, but do not block the Racket side while the dialog is shown. This is
|
||||||
@@ -502,7 +502,7 @@ Completion of a dialog is therefore observed through events, not by blocking the
|
|||||||
calling thread.
|
calling thread.
|
||||||
|
|
||||||
|
|
||||||
@defproc[(rkt_webview_choose_dir [w exact-integer?]
|
@defproc[#:link-target? #f (rkt_webview_choose_dir [w exact-integer?]
|
||||||
[title string?]
|
[title string?]
|
||||||
[base_dir string?])
|
[base_dir string?])
|
||||||
exact-integer?]{
|
exact-integer?]{
|
||||||
@@ -519,7 +519,7 @@ reported through events.
|
|||||||
Return value: @tt{result_t}.
|
Return value: @tt{result_t}.
|
||||||
}
|
}
|
||||||
|
|
||||||
@defproc[(rkt_webview_file_open [w exact-integer?]
|
@defproc[#:link-target? #f (rkt_webview_file_open [w exact-integer?]
|
||||||
[title string?]
|
[title string?]
|
||||||
[base_dir string?]
|
[base_dir string?]
|
||||||
[permitted_exts string?])
|
[permitted_exts string?])
|
||||||
@@ -537,7 +537,7 @@ reported through events.
|
|||||||
Return value: @tt{result_t}.
|
Return value: @tt{result_t}.
|
||||||
}
|
}
|
||||||
|
|
||||||
@defproc[(rkt_webview_file_save [w exact-integer?]
|
@defproc[#:link-target? #f (rkt_webview_file_save [w exact-integer?]
|
||||||
[title string?]
|
[title string?]
|
||||||
[base_dir string?]
|
[base_dir string?]
|
||||||
[permitted_exts string?])
|
[permitted_exts string?])
|
||||||
@@ -555,7 +555,7 @@ reported through events.
|
|||||||
Return value: @tt{result_t}.
|
Return value: @tt{result_t}.
|
||||||
}
|
}
|
||||||
|
|
||||||
@defproc[(rkt_webview_message_box [w exact-integer?]
|
@defproc[#:link-target? #f (rkt_webview_message_box [w exact-integer?]
|
||||||
[title string?]
|
[title string?]
|
||||||
[message string?]
|
[message string?]
|
||||||
[submessage string?]
|
[submessage string?]
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#lang scribble/manual
|
#lang scribble/manual
|
||||||
@(require racket/runtime-path)
|
@(require racket/runtime-path)
|
||||||
|
|
||||||
@defmodule{racket-webview/internals}
|
@bold{Internal component:} @tt{racket-webview/internals}
|
||||||
|
|
||||||
@title{Qt WebView Backend Architecture}
|
@title{Qt WebView Backend Architecture}
|
||||||
@author[@author+email["Hans Dijkema" "hans@dijkewijk.nl"]]
|
@author[@author+email["Hans Dijkema" "hans@dijkewijk.nl"]]
|
||||||
@@ -44,7 +44,7 @@ reconfigure the organ. No attempt is made to unify the instruments. Such efforts
|
|||||||
|
|
||||||
From the outside, one hears only a simple exchange: a call, a response. Internally, the balance is carefully maintained. For now, this is sufficient. And it holds.
|
From the outside, one hears only a simple exchange: a call, a response. Internally, the balance is carefully maintained. For now, this is sufficient. And it holds.
|
||||||
|
|
||||||
@section{Overview}
|
@section[#:tag "rktwebview-qt-internals-overview"]{Overview}
|
||||||
|
|
||||||
This backend provides a webview implementation by delegating all GUI and browser
|
This backend provides a webview implementation by delegating all GUI and browser
|
||||||
functionality to a separate Qt process.
|
functionality to a separate Qt process.
|
||||||
@@ -93,7 +93,7 @@ thread.
|
|||||||
From the caller’s perspective, a synchronous call returns only after the GUI
|
From the caller’s perspective, a synchronous call returns only after the GUI
|
||||||
thread has completed the action.
|
thread has completed the action.
|
||||||
|
|
||||||
@section{Event Delivery}
|
@section[#:tag "rktwebview-qt-internals-event-delivery"]{Event Delivery}
|
||||||
|
|
||||||
Many relevant events are not tied to a specific command. Page loading, navigation
|
Many relevant events are not tied to a specific command. Page loading, navigation
|
||||||
attempts, window movement, and JavaScript-originated events are delivered through
|
attempts, window movement, and JavaScript-originated events are delivered through
|
||||||
|
|||||||
@@ -15,14 +15,14 @@
|
|||||||
|
|
||||||
@defmodule[racket-webview/wv-context]
|
@defmodule[racket-webview/wv-context]
|
||||||
|
|
||||||
@section{Overview}
|
@section[#:tag "wv-context-overview"]{Overview}
|
||||||
|
|
||||||
The library is organized around two main concepts: contexts and windows.
|
The library is organized around two main concepts: contexts and windows.
|
||||||
|
|
||||||
A context represents the shared runtime environment for one or more webview
|
A context represents the shared runtime environment for one or more webview
|
||||||
windows. It owns the underlying webview context, provides the base URL used by
|
windows. It owns the underlying webview context, provides the base URL used by
|
||||||
those windows, and gives access to persistent settings through
|
those windows, and gives access to persistent settings through
|
||||||
@racketmodname[wv-settings].
|
@racketmodname[racket-webview/wv-settings].
|
||||||
|
|
||||||
A context stores both JavaScript and CSS boilerplate. The JavaScript boilerplate
|
A context stores both JavaScript and CSS boilerplate. The JavaScript boilerplate
|
||||||
is passed to the native runtime, while the CSS boilerplate is injected into HTML
|
is passed to the native runtime, while the CSS boilerplate is injected into HTML
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ Dialog-window wrapper built on top of @racket[wv-window%].
|
|||||||
This module exports the @racket[wv-dialog%] class. It is a specialized window
|
This module exports the @racket[wv-dialog%] class. It is a specialized window
|
||||||
class whose initial size and position are derived from its parent window.
|
class whose initial size and position are derived from its parent window.
|
||||||
|
|
||||||
@section{Overview}
|
@section[#:tag "wv-dialog-overview"]{Overview}
|
||||||
|
|
||||||
A @racket[wv-dialog%] object is a @racket[wv-window%] that initializes itself as
|
A @racket[wv-dialog%] object is a @racket[wv-window%] that initializes itself as
|
||||||
a dialog relative to its parent window.
|
a dialog relative to its parent window.
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ represent one DOM element within a @racket[wv-window%] and provide a small
|
|||||||
object-oriented interface for event dispatch, content replacement, CSS class
|
object-oriented interface for event dispatch, content replacement, CSS class
|
||||||
manipulation, style access, and attribute access.
|
manipulation, style access, and attribute access.
|
||||||
|
|
||||||
@section{Overview}
|
@section[#:tag "wv-element-overview"]{Overview}
|
||||||
|
|
||||||
A @racket[wv-element%] object is associated with:
|
A @racket[wv-element%] object is associated with:
|
||||||
|
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ This module exports a family of classes derived from @racket[wv-element%]. Each
|
|||||||
class represents one DOM input element and provides a typed @racket[get] method
|
class represents one DOM input element and provides a typed @racket[get] method
|
||||||
together with a @racket[set!] method.
|
together with a @racket[set!] method.
|
||||||
|
|
||||||
@section{Overview}
|
@section[#:tag "wv-input-overview"]{Overview}
|
||||||
|
|
||||||
All classes in this module inherit from @racket[wv-element%].
|
All classes in this module inherit from @racket[wv-element%].
|
||||||
|
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ This module exports the @racket[wv-settings%] class, which provides a small
|
|||||||
object-oriented interface over an @racket[ini] settings backend. Settings are
|
object-oriented interface over an @racket[ini] settings backend. Settings are
|
||||||
accessed relative to a context.
|
accessed relative to a context.
|
||||||
|
|
||||||
@section{Overview}
|
@section[#:tag "wv-settings-overview"]{Overview}
|
||||||
|
|
||||||
A @racket[wv-settings%] object combines:
|
A @racket[wv-settings%] object combines:
|
||||||
|
|
||||||
|
|||||||
@@ -23,10 +23,10 @@
|
|||||||
Window abstraction built on top of @racketmodname[racket-webview].
|
Window abstraction built on top of @racketmodname[racket-webview].
|
||||||
|
|
||||||
This module exports the @racket[wv-window%] class and re-exports the APIs from
|
This module exports the @racket[wv-window%] class and re-exports the APIs from
|
||||||
@racketmodname[wv-element], @racketmodname[wv-input], @racketmodname[rgba], and
|
@racketmodname[racket-webview/wv-element], @racketmodname[racket-webview/wv-input], @racketmodname[racket-webview/rgba], and
|
||||||
@racketmodname[wv-settings].
|
@racketmodname[racket-webview/wv-settings].
|
||||||
|
|
||||||
@section{Overview}
|
@section[#:tag "wv-window-overview"]{Overview}
|
||||||
|
|
||||||
A @racket[wv-window%] object represents one webview window.
|
A @racket[wv-window%] object represents one webview window.
|
||||||
|
|
||||||
@@ -479,7 +479,7 @@ The resulting geometry is then applied through @racket[move] and @racket[resize]
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@section{Events}
|
@section[#:tag "wv-window-events"]{Events}
|
||||||
|
|
||||||
The window installs an internal event handler when it is created.
|
The window installs an internal event handler when it is created.
|
||||||
|
|
||||||
@@ -533,9 +533,9 @@ Only the first optional @racket[not-found-handler] is used.
|
|||||||
This module also re-exports the public APIs from:
|
This module also re-exports the public APIs from:
|
||||||
|
|
||||||
@itemlist[#:style 'compact
|
@itemlist[#:style 'compact
|
||||||
@item{@racketmodname[wv-element]}
|
@item{@racketmodname[racket-webview/wv-element]}
|
||||||
@item{@racketmodname[wv-input]}
|
@item{@racketmodname[racket-webview/wv-input]}
|
||||||
@item{@racketmodname[rgba]}
|
@item{@racketmodname[racket-webview/rgba]}
|
||||||
@item{@racketmodname[wv-settings]}]
|
@item{@racketmodname[racket-webview/wv-settings]}]
|
||||||
|
|
||||||
It also re-exports @racket[webview-version].
|
It also re-exports @racket[webview-version].
|
||||||
|
|||||||
Reference in New Issue
Block a user