documentation more consistent

This commit is contained in:
2026-08-03 16:50:36 +02:00
parent e674693a28
commit 16b3a784ad
19 changed files with 136 additions and 130 deletions
+13 -13
View File
@@ -4,7 +4,7 @@
@author[@author+email["Hans Dijkema" "hans@dijkewijk.nl"]]
@title{C API for Racket Integration}
@title[#:tag "rktwebview-api"]{C API for Racket Integration}
This section documents the legacy C API defined in @tt{rktwebview.h} and
@tt{rktwebview_types.h}. The source remains in the backend repository for
@@ -16,7 +16,7 @@ return a @tt{result_t}, and structured values are returned as @tt{rkt_data_t *}.
The latter are caller-owned and must be released with
@tt{rkt_webview_free_data()}.
@section{Version, Export, and Basic Types}
@section[#:tag "rktwebview-api-version-export-and-basic-types"]{Version, Export, and Basic Types}
The public API version is:
@@ -40,7 +40,7 @@ typedef int rkt_wv_context_t;
@tt{rktwebview_t} identifies a webview. @tt{rkt_wv_context_t} identifies a
context.
@section{Enums and Structured Data}
@section[#:tag "rktwebview-api-enums-and-structured-data"]{Enums and Structured Data}
The API defines the following enums: @tt{rkt_webview_loglevel_t},
@tt{result_t}, @tt{window_state_t}, @tt{rkt_messagetype_t}, and
@@ -92,7 +92,7 @@ typedef struct {
The @tt{kind} field determines which member of @tt{data} is valid.
@section{Ownership}
@section[#:tag "rktwebview-api-ownership"]{Ownership}
Any function returning @tt{rkt_data_t *} returns allocated memory. The caller
must release it using:
@@ -105,7 +105,7 @@ This applies to values returned by @tt{rkt_webview_info()},
@tt{rkt_webview_version()}, @tt{rkt_webview_get_event()}, and
@tt{rkt_webview_call_js()}.
@section{Environment and Runtime Control}
@section[#:tag "rktwebview-api-environment-and-runtime-control"]{Environment and Runtime Control}
@defproc[(rkt_webview_env [env_cmds any/c]) void?]{
C signature:
@@ -185,7 +185,7 @@ Returns a pointer to @tt{rkt_data_t}. The returned object has
Return value: @tt{rkt_data_t *}, caller-owned.
}
@subsection{Events}
@subsection[#:tag "rktwebview-api-events"]{Events}
@defproc[(rkt_webview_events_waiting) exact-integer?]{
C signature:
@@ -213,7 +213,7 @@ returned pointer may be null.
Return value: @tt{rkt_data_t *}, caller-owned, or null.
}
@subsubsection{Event Polling}
@subsubsection[#:tag "rktwebview-api-event-polling"]{Event Polling}
Events are retrieved explicitly by polling. In normal use, polling should be
performed regularly; a polling interval of about 10 ms is appropriate.
@@ -222,7 +222,7 @@ 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
has stalled while the Racket side is simply not looking.
@section{Contexts}
@section[#:tag "rktwebview-api-contexts"]{Contexts}
@defproc[(rkt_webview_new_context [boilerplate_js string?]
[optional_server_cert_pem string?])
@@ -240,7 +240,7 @@ self-signed certificate.
Return value: @tt{rkt_wv_context_t}.
}
@section{Webviews}
@section[#:tag "rktwebview-api-webviews"]{Webviews}
@defproc[(rkt_webview_create [context exact-integer?]
[parent exact-integer?])
@@ -308,7 +308,7 @@ specified webview.
Return value: none.
}
@section{Navigation and JavaScript}
@section[#:tag "rktwebview-api-navigation-and-javascript"]{Navigation and JavaScript}
@defproc[(rkt_webview_set_url [wv exact-integer?] [url string?]) exact-integer?]{
C signature:
@@ -378,7 +378,7 @@ Opens developer tools for the specified webview.
Return value: @tt{result_t}.
}
@section{Window Management}
@section[#:tag "rktwebview-api-window-management"]{Window Management}
@defproc[(rkt_webview_move [w exact-integer?] [x exact-integer?] [y exact-integer?])
exact-integer?]{
@@ -492,7 +492,7 @@ Returns the current state of the specified window.
Return value: @tt{window_state_t}.
}
@section{Dialogs}
@section[#:tag "rktwebview-api-dialogs"]{Dialogs}
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
@@ -575,7 +575,7 @@ reported through events.
Return value: @tt{result_t}.
}
@section{Remarks}
@section[#:tag "rktwebview-api-remarks"]{Remarks}
The API is queue-based. Commands are issued through function calls; events are
retrieved explicitly using @tt{rkt_webview_events_waiting()} and