vapp.h Header
Apps › Core
Types
| struct | ListEntry | One row of the data that an app supplies to a list through VApp::set_list(). |
| struct | ListAction | Target of a list action button, a button with Intent: "list:<action>" inside a list's row template. |
| struct | HttpRequest | HTTP request that app code sends through VApp::http(). |
| struct | HttpResponse | Reply to an HttpRequest. |
| struct | UploadResult | Result of a file upload through VApp::pick_and_upload(). |
| struct | PickRequest | Options for the file dialog that VApp::pick_path() opens. |
| struct | PurchaseResult | Result of a store purchase through VApp::start_purchase(). |
| class | VApp | App's handle on the Vortex core, which each platform's runner passes to build_app(). |
Type Aliases
| using | HttpCallback | Receives the reply to an HTTP request. |
| using | UploadCallback | Receives the result of a file upload. |
| using | PickCallback | Receives the absolute path that the user picked, or an empty string when they canceled. |
| using | BackHandler | App hook that decides what the system back button does, installed with VApp::set_back_handler(). |
| using | SaveTextCallback | Receives whether the file was saved, which is false when the user canceled. |
| using | ProcessLineCallback | Receives one line of a process's output, from stdout and stderr combined. |
| using | ProcessExitCallback | Receives a process's exit code when it ends, which is -1 when it failed to start or crashed. |
| using | PurchaseCallback | Receives the result of a store purchase. |
| using | QueryPurchasesCallback | Receives the tokens of purchases that the server hasn't verified, or an error. An empty list means none are waiting. |
Type Alias Documentation
using HttpCallback = std::function<void (const HttpResponse &)>
Receives the reply to an HTTP request.
using UploadCallback = std::function<void (const UploadResult &)>
Receives the result of a file upload.
using PickCallback = std::function<void (const std::string &)>
Receives the absolute path that the user picked, or an empty string when they canceled.
using BackHandler = std::function<bool (bool)>
App hook that decides what the system back button does, installed with
VApp::set_back_handler().
The app installs one handler for its whole order of steps back, like closing the top dialog, else leaving the current view, else returning to the home tab. The platform calls it two ways:
commit true when the user presses back. The handler takes one
step back and returns whether it did. false means there's nothing
left to close, so the system handles back by leaving the app.commit false to ask whether a press would be handled. This call
must not change anything. Android asks after every update, so that a
press that would leave the app shows the system's back preview.Android only: the desktop and web shells never call it.
using SaveTextCallback = std::function<void (bool)>
Receives whether the file was saved, which is false when the user
canceled.
On web, a download has no cancel signal, so saved is true once the
download starts.
using ProcessLineCallback = std::function<void (const std::string &)>
Receives one line of a process's output, from stdout and stderr combined.
using ProcessExitCallback = std::function<void (int)>
Receives a process's exit code when it ends, which is -1 when it failed to start or crashed.
using PurchaseCallback = std::function<void (const PurchaseResult &)>
Receives the result of a store purchase.
using QueryPurchasesCallback = std::function<void (const int &, const std::string &)>
Receives the tokens of purchases that the server hasn't verified, or an
error. An empty list means none are waiting.