Table of Contents

API Reference

Name Description
Event
WinToastHandler Handles Windows toast notification events for an InfiniFrameWindow.
EventSubscription
InfiniFrameDialog Dialog handler for file/folder operations and message boxes.
InfiniFrameWindow Main window class providing WebView-based UI.
Monitor Describes the geometry of a single display.
InfiniFrameInitParams Initialization parameters for InfiniFrame window.
InfiniFrameWindowImpl
MonitorRect Pixel rectangle relative to the virtual desktop.
WINDOWCOMPOSITIONATTRIBDATA Parameter struct for SetWindowCompositionAttribute.

Enumerations

{#dialogresult}

DialogResult

enum DialogResult

Button pressed by the user to dismiss a message box.

Value Description
Cancel
Ok Dialog was cancelled (Escape key or window close)
Yes User pressed OK.
No User pressed Yes.
Abort User pressed No.
Retry User pressed Abort.
Ignore User pressed Retry.

{#dialogbuttons}

DialogButtons

enum DialogButtons

Button set to display in a message box.

Value Description
Ok
OkCancel Single OK button.
YesNo OK and Cancel buttons.
YesNoCancel Yes and No buttons.
RetryCancel Yes, No, and Cancel buttons.
AbortRetryIgnore Retry and Cancel buttons.

{#dialogicon}

DialogIcon

enum DialogIcon

Icon shown in a message box.

Value Description
Info
Warning
Error
Question

{#errorcode}

ErrorCode

enum ErrorCode
Value Description
Success
InvalidArgument
NotInitialized
PlatformNotSupported
WebViewError
EncodingError
MemoryError
IoError
NullPointer
InterfaceNotAvailable
PropertyAccessFailed
WindowNotFound

{#immersive_hc_cache_mode}

IMMERSIVE_HC_CACHE_MODE

enum IMMERSIVE_HC_CACHE_MODE

Controls whether the immersive colour cache is used or refreshed.

Value Description
IHCM_USE_CACHED_VALUE
IHCM_REFRESH Use the previously cached value.

{#preferredappmode}

PreferredAppMode

enum PreferredAppMode

Application colour-mode preference passed to SetPreferredAppMode.

Value Description
Default
AllowDark Follow the system setting.
ForceDark Allow dark mode if the system is dark.
ForceLight Always use dark mode.
Max Always use light mode.

{#windowcompositionattrib}

WINDOWCOMPOSITIONATTRIB

enum WINDOWCOMPOSITIONATTRIB

Window composition attribute identifiers used with SetWindowCompositionAttribute.

Value Description
WCA_UNDEFINED
WCA_NCRENDERING_ENABLED
WCA_NCRENDERING_POLICY Non-client rendering enabled flag.
WCA_TRANSITIONS_FORCEDISABLED Non-client rendering policy.
WCA_ALLOW_NCPAINT
WCA_CAPTION_BUTTON_BOUNDS
WCA_NONCLIENT_RTL_LAYOUT
WCA_FORCE_ICONIC_REPRESENTATION
WCA_EXTENDED_FRAME_BOUNDS
WCA_HAS_ICONIC_BITMAP
WCA_THEME_ATTRIBUTES
WCA_NCRENDERING_EXILED
WCA_NCADORNMENTINFO
WCA_EXCLUDED_FROM_LIVEPREVIEW
WCA_VIDEO_OVERLAY_ACTIVE
WCA_FORCE_ACTIVEWINDOW_APPEARANCE
WCA_DISALLOW_PEEK
WCA_CLOAK
WCA_CLOAKED
WCA_ACCENT_POLICY
WCA_FREEZE_REPRESENTATION
WCA_EVER_UNCLOAKED
WCA_VISUAL_OWNER
WCA_HOLOGRAPHIC
WCA_EXCLUDED_FROM_DDA
WCA_PASSIVEUPDATEMODE
WCA_USEDARKMODECOLORS
WCA_LAST Enable dark mode colours for non-client area.

Typedefs

{#nativestring}

NativeString

std::string NativeString()

{#autostring}

AutoString

char * AutoString()

{#autostringconst}

AutoStringConst

const char * AutoStringConst()

{#result}

Result

template<typename T> std::expected< T, ErrorCode > Result()

{#action}

ACTION

void(*)() ACTION()

Generic parameterless action callback.

{#webmessagereceivedcallback}

WebMessageReceivedCallback

void(*)(AutoString message) WebMessageReceivedCallback()

Called when the WebView receives a message posted from JavaScript via window.chrome.webview.postMessage.

Parameters

  • message UTF-8 encoded message string

{#webresourcerequestedcallback}

WebResourceRequestedCallback

void *(*)(AutoString url, int *outNumBytes, AutoString *outContentType) WebResourceRequestedCallback()

Called when the WebView requests a custom-scheme resource. The handler must return a heap-allocated buffer and set outNumBytes and outContentType.

Parameters

  • url UTF-8 URL of the requested resource

  • outNumBytes Output: byte length of the returned buffer

  • outContentType Output: MIME type string (e.g. "text/html")

Returns

Heap-allocated response body; ownership is transferred to the caller

{#getallmonitorscallback}

GetAllMonitorsCallback

int(*)(const Monitor *monitor) GetAllMonitorsCallback()

Called once per monitor during a GetAllMonitors enumeration.

Parameters

  • monitor Pointer to a Monitor describing geometry and DPI scale for one display

Returns

Non-zero to continue enumeration, zero to stop

{#resizedcallback}

ResizedCallback

void(*)(int width, int height) ResizedCallback()

Called when the window is resized.

Parameters

  • width New client-area width in pixels

  • height New client-area height in pixels

{#maximizedcallback}

MaximizedCallback

void(*)() MaximizedCallback()

Called when the window is maximized.

{#restoredcallback}

RestoredCallback

void(*)() RestoredCallback()

Called when the window is restored from a maximized or minimized state.

{#minimizedcallback}

MinimizedCallback

void(*)() MinimizedCallback()

Called when the window is minimized.

{#movedcallback}

MovedCallback

void(*)(int x, int y) MovedCallback()

Called when the window is moved.

Parameters

  • x New left edge in screen pixels

  • y New top edge in screen pixels

{#closingcallback}

ClosingCallback

bool(*)() ClosingCallback()

Called when the user attempts to close the window.

Returns

true to allow the window to close, false to cancel closing

{#focusincallback}

FocusInCallback

void(*)() FocusInCallback()

Called when the window gains keyboard focus.

{#focusoutcallback}

FocusOutCallback

void(*)() FocusOutCallback()

Called when the window loses keyboard focus.

Functions

{#errorcategory}

errorCategory

inline const std::error_category & errorCategory() noexcept

{#make_error_code}

make_error_code

inline std::error_code make_error_code(ErrorCode e) noexcept

{#clampdimension}

clampDimension

template<typename T> constexpr T clampDimension(T value, T minVal, T maxVal)

{#initdarkmodesupport}

InitDarkModeSupport

void InitDarkModeSupport() noexcept

Detect available dark-mode APIs at runtime and cache the results. Must be called once at startup.

{#isdarkmodeenabled}

IsDarkModeEnabled

bool IsDarkModeEnabled() noexcept

Check whether the current Windows theme is dark.

Returns

true if the system is in dark mode

{#enabledarkmode}

EnableDarkMode

void EnableDarkMode(HWND hwnd, bool enable) noexcept

Apply or remove dark mode colouring on a window's non-client area.

Parameters

  • hwnd Target window handle

  • enable true to enable dark title bar, false to restore light title bar

{#refreshnonclientarea}

RefreshNonClientArea

void RefreshNonClientArea(HWND hwnd) noexcept

Force a repaint of the non-client area (title bar / borders) of a window. Call after toggling dark mode to make the change immediately visible.

Parameters

  • hwnd Target window handle

{#iscolorschemechange}

IsColorSchemeChange

bool IsColorSchemeChange(LPARAM l_param) noexcept

Check whether a WM_SETTINGCHANGE lParam signals a colour-scheme change.

Parameters

  • l_param lParam from a WM_SETTINGCHANGE message

Returns

true if the message indicates an immersive colour-scheme change

Variables

{#maxwindowdimension}

MaxWindowDimension

constexpr int MaxWindowDimension = 10000

{#minwindowdimension}

MinWindowDimension

constexpr int MinWindowDimension = 50

{#defaultwindowwidth}

DefaultWindowWidth

constexpr int DefaultWindowWidth = 800

{#defaultwindowheight}

DefaultWindowHeight

constexpr int DefaultWindowHeight = 600

{#event}

Event

Public Methods

Return Name Description
Event Defaulted constructor.
Event Deleted constructor.
Event Defaulted constructor.
Token Subscribe inline Subscribe to event.
void Unsubscribe inline Unsubscribe from event.
void Raise inline Raise event (invoke all handlers)
bool HasSubscribers const inline Check if event has subscribers.
void Clear inline Clear all subscribers.

{#event-1}

Event

Event() = default

Defaulted constructor.


{#event-2}

Event

Event(const Event &) = delete

Deleted constructor.


{#event-3}

Event

Event(Event &&) = default

Defaulted constructor.


{#subscribe}

Subscribe

inline

inline Token Subscribe(Handler handler)

Subscribe to event.

Parameters

  • handler Callback function to invoke when event is raised

Returns

Token for unsubscribing


{#unsubscribe}

Unsubscribe

inline

inline void Unsubscribe(Token token)

Unsubscribe from event.

Parameters

  • token Token returned from Subscribe

{#raise}

Raise

inline

inline void Raise(Args... args)

Raise event (invoke all handlers)

Parameters

  • args Arguments to pass to handlers

{#hassubscribers}

HasSubscribers

const inline

inline bool HasSubscribers() const

Check if event has subscribers.

Returns

true if at least one handler is subscribed


{#clear}

Clear

inline

inline void Clear()

Clear all subscribers.

Public Types

Name Description
Handler
Token

{#handler}

Handler

std::function< void(Args...)> Handler()

{#token}

Token

size_t Token()

Private Attributes

Return Name Description
std::shared_mutex m_mutex
std::map< Token, Handler > m_handlers
Token m_nextToken

{#m_mutex}

m_mutex

std::shared_mutex m_mutex

{#m_handlers}

m_handlers

std::map< Token, Handler > m_handlers

{#m_nexttoken}

m_nextToken

Token m_nextToken = 0

{#wintoasthandler}

WinToastHandler

#include <ToastHandler.h>

Inherits: IWinToastHandler

Handles Windows toast notification events for an InfiniFrameWindow.

On any activation (click, action button, or text reply) the associated window is shown and brought to the foreground. Dismissal and failure are silently ignored

Public Methods

Return Name Description
WinToastHandler inline explicit Construct a handler bound to a specific window.
void toastActivated const inline Called when the user clicks the notification body; restores and focuses the window.
void toastActivated const inline Called when the user clicks an action button on the notification.
void toastActivated const inline Called when the user submits a text-input reply on the notification.
void toastDismissed const inline Called when the notification is dismissed without activation.
void toastFailed const inline Called when the notification fails to display.

{#wintoasthandler-1}

WinToastHandler

inline explicit

inline explicit WinToastHandler(InfiniFrameWindow * window)

Construct a handler bound to a specific window.

Parameters

  • window The window to bring to the foreground on notification activation

{#toastactivated}

toastActivated

const inline

inline void toastActivated() const

Called when the user clicks the notification body; restores and focuses the window.


{#toastactivated-1}

toastActivated

const inline

inline void toastActivated(int) const

Called when the user clicks an action button on the notification.

Parameters

  • actionIndex Zero-based index of the activated button (unused; delegates to toastActivated())

{#toastactivated-2}

toastActivated

const inline

inline void toastActivated(std::wstring) const

Called when the user submits a text-input reply on the notification.

Parameters


{#toastdismissed}

toastDismissed

const inline

inline void toastDismissed(WinToastDismissalReason) const

Called when the notification is dismissed without activation.

Parameters

  • state Reason for dismissal (timeout, user swipe, app hide, etc.)

{#toastfailed}

toastFailed

const inline

inline void toastFailed() const

Called when the notification fails to display.

Private Attributes

Return Name Description
InfiniFrameWindow * _window

{#_window}

_window

InfiniFrameWindow * _window

{#eventsubscription}

EventSubscription

Public Methods

Return Name Description
EventSubscription Defaulted constructor.
EventSubscription inline
EventSubscription Deleted constructor.
EventSubscription inline
void Unsubscribe inline Manually unsubscribe from event.
bool IsActive const inline Check if subscription is active.

{#eventsubscription-1}

EventSubscription

EventSubscription() = default

Defaulted constructor.


{#eventsubscription-2}

EventSubscription

inline

inline EventSubscription(EventType & event, typename EventType::Handler handler)

{#eventsubscription-3}

EventSubscription

EventSubscription(const EventSubscription &) = delete

Deleted constructor.


{#eventsubscription-4}

EventSubscription

inline

inline EventSubscription(EventSubscription && other) noexcept

{#unsubscribe-1}

Unsubscribe

inline

inline void Unsubscribe()

Manually unsubscribe from event.


{#isactive}

IsActive

const inline

inline bool IsActive() const noexcept

Check if subscription is active.

Returns

true if still subscribed

Public Types

Name Description
EventType
Token

{#eventtype}

EventType

Event< Args... > EventType()

{#token-1}

Token

typename EventType::Token Token()

Private Attributes

Return Name Description
EventType * m_event
Token m_token

{#m_event}

m_event

EventType * m_event = nullptr

{#m_token}

m_token

Token m_token = 0

{#infiniframedialog}

InfiniFrameDialog

#include <InfiniFrameDialog.h>

Dialog handler for file/folder operations and message boxes.

Public Methods

Return Name Description
InfiniFrameDialog Construct dialog handler (Linux/macOS)
~InfiniFrameDialog Destroy dialog handler.
AutoString * ShowOpenFile Show open file dialog.
AutoString * ShowOpenFolder Show open folder dialog.
AutoString ShowSaveFile Show save file dialog.
DialogResult ShowMessage Show message dialog.

{#infiniframedialog-1}

InfiniFrameDialog

InfiniFrameDialog()

Construct dialog handler (Linux/macOS)


{#infiniframedialog-2}

~InfiniFrameDialog

~InfiniFrameDialog()

Destroy dialog handler.


{#showopenfile}

ShowOpenFile

AutoString * ShowOpenFile(AutoString title, AutoString defaultPath, bool multiSelect, AutoString * filters, int filterCount, int * resultCount)

Show open file dialog.

Parameters

  • title Dialog title

  • defaultPath Default path

  • multiSelect Allow multiple selection

  • filters File filters (e.g., ".txt;.doc")

  • filterCount Number of filters

  • resultCount Output: number of selected files

Returns

Array of selected file paths


{#showopenfolder}

ShowOpenFolder

AutoString * ShowOpenFolder(AutoString title, AutoString defaultPath, bool multiSelect, int * resultCount)

Show open folder dialog.

Parameters

  • title Dialog title

  • defaultPath Default path

  • multiSelect Allow multiple selection

  • resultCount Output: number of selected folders

Returns

Array of selected folder paths


{#showsavefile}

ShowSaveFile

AutoString ShowSaveFile(AutoString title, AutoString defaultPath, AutoString * filters, int filterCount, AutoString defaultFileName)

Show save file dialog.

Parameters

  • title Dialog title

  • defaultPath Default path

  • filters File filters

  • filterCount Number of filters

  • defaultFileName Default file name

Returns

Selected file path


{#showmessage}

ShowMessage

DialogResult ShowMessage(AutoString title, AutoString text, DialogButtons buttons, DialogIcon icon)

Show message dialog.

Parameters

  • title Dialog title

  • text Message text

  • buttons Button configuration

  • icon Icon type

Returns

User's response

{#infiniframewindow}

InfiniFrameWindow

#include <InfiniFrameWindow.h>

Main window class providing WebView-based UI.

Uses Pimpl idiom for encapsulation of platform-specific implementation. Supports Windows (Win32 + WebView2), Linux (GTK3 + WebKit2GTK), macOS (Cocoa + WKWebView)

Public Methods

Return Name Description
InfiniFrameWindow explicit Construct new InfiniFrame window.
~InfiniFrameWindow Destroy InfiniFrame window.
InfiniFrameDialog * GetDialog const Get dialog handler.
void Center Center the window on the current screen.
void ClearBrowserAutoFill Clear all browser autofill data (passwords, forms)
void Close Close the window and terminate the message loop.
void GetTransparentEnabled const Get whether transparent background is enabled.
void GetContextMenuEnabled const Get whether the browser context menu is enabled.
void GetZoomEnabled const Get whether user-controlled zoom is enabled.
void GetDevToolsEnabled const Get whether the browser DevTools panel is enabled.
void GetFullScreen const Get whether the window is in fullscreen mode.
void GetGrantBrowserPermissions const Get whether browser permission requests are auto-granted.
AutoString GetUserAgent const Get the custom user-agent string.
void GetMediaAutoplayEnabled const Get whether media autoplay is enabled.
void GetFileSystemAccessEnabled const Get whether the File System Access API is enabled.
void GetWebSecurityEnabled const Get whether web security (same-origin / CORS) is enabled.
void GetJavascriptClipboardAccessEnabled const Get whether JavaScript clipboard read/write access is enabled.
void GetMediaStreamEnabled const Get whether the MediaStream API is enabled.
void GetSmoothScrollingEnabled const Get whether smooth scrolling is enabled.
AutoString GetIconFileName const Get the window icon file path.
void GetMaximized const Get whether the window is maximized.
void GetMinimized const Get whether the window is minimized.
void GetPosition const Get the window position in screen coordinates.
void GetResizable const Get whether the window can be resized by the user.
unsigned int GetScreenDpi const Get the DPI of the screen the window is on.
void GetSize const Get the current window size.
AutoString GetTitle const Get the window title bar text.
void GetTopmost const Get whether the window is always on top of other windows.
void GetZoom const Get the current zoom level.
void GetIgnoreCertificateErrorsEnabled const Get whether TLS certificate errors are silently ignored.
void GetFocused const Get whether the window currently has keyboard focus.
void NavigateToString Load HTML content directly from a string.
void NavigateToUrl Navigate the WebView to a URL.
void Restore Restore the window from a minimized or maximized state.
void SendWebMessage Post a message string to the web content (received via window.chrome.webview.addEventListener)
void SetTransparentEnabled Enable or disable transparent window background.
void SetContextMenuEnabled Enable or disable the browser right-click context menu.
void SetZoomEnabled Enable or disable user-controlled zoom.
void SetDevToolsEnabled Enable or disable the browser DevTools panel.
void SetIconFile Set the window icon from a file.
void SetFullScreen Enter or exit fullscreen mode.
void SetMaximized Maximize or unmaximize the window.
void SetMaxSize Set the maximum allowed window size.
void SetMinimized Minimize or restore the window.
void SetMinSize Set the minimum allowed window size.
void SetPosition Move the window to screen coordinates.
void SetResizable Enable or disable user resizing via window border.
void SetSize Resize the window.
void SetTitle Set the window title bar text.
void SetTopmost Pin or unpin the window above all other windows.
void SetZoom Set the WebView zoom level.
void SetFocused Move keyboard focus into the window.
void ShowNotification Show a native system notification (toast on Windows, libnotify on Linux, UNUserNotification on macOS)
void WaitForExit Block the calling thread until the window is closed; runs the platform message loop. Must be called from the thread that created the window.
void CloseWebView Tear down the WebView control while keeping the native window alive.
void AddCustomSchemeName Register a custom URI scheme to be intercepted by WebResourceRequestedCallback.
void GetAllMonitors const Enumerate all connected monitors by invoking a callback for each one.
void SetClosingCallback Set callback invoked when the user attempts to close the window.
void SetFocusInCallback Set callback invoked when the window gains keyboard focus.
void SetFocusOutCallback Set callback invoked when the window loses keyboard focus.
void SetMovedCallback Set callback invoked when the window is moved.
void SetResizedCallback Set callback invoked when the window is resized.
void SetMaximizedCallback Set callback invoked when the window is maximized.
void SetRestoredCallback Set callback invoked when the window is restored from maximized state.
void SetMinimizedCallback Set callback invoked when the window is minimized.
void Invoke Marshal a callback onto the UI thread and execute it synchronously.
bool InvokeClose const Fire the closing callback.
void InvokeFocusIn const Fire the focus-in callback.
void InvokeFocusOut const Fire the focus-out callback.
void InvokeMove const Fire the moved callback.
void InvokeResize const Fire the resized callback.
void InvokeMaximized const Fire the maximized callback.
void InvokeRestored const Fire the restored callback.
void InvokeMinimized const Fire the minimized callback.

{#infiniframewindow-1}

InfiniFrameWindow

explicit

explicit InfiniFrameWindow(InfiniFrameInitParams * initParams)

Construct new InfiniFrame window.

Parameters

  • initParams Initialization parameters

{#infiniframewindow-2}

~InfiniFrameWindow

~InfiniFrameWindow()

Destroy InfiniFrame window.


{#getdialog}

GetDialog

const

InfiniFrameDialog * GetDialog() const

Get dialog handler.

Returns

Pointer to InfiniFrameDialog


{#center}

Center

void Center()

Center the window on the current screen.


{#clearbrowserautofill}

ClearBrowserAutoFill

void ClearBrowserAutoFill()

Clear all browser autofill data (passwords, forms)


{#close}

Close

void Close()

Close the window and terminate the message loop.


{#gettransparentenabled}

GetTransparentEnabled

const

void GetTransparentEnabled(bool * enabled) const

Get whether transparent background is enabled.

Parameters

  • enabled Output: true if transparent background is active

{#getcontextmenuenabled}

GetContextMenuEnabled

const

void GetContextMenuEnabled(bool * enabled) const

Get whether the browser context menu is enabled.

Parameters

  • enabled Output: true if context menu is shown on right-click

{#getzoomenabled}

GetZoomEnabled

const

void GetZoomEnabled(bool * enabled) const

Get whether user-controlled zoom is enabled.

Parameters

  • enabled Output: true if the user can zoom via keyboard/mouse

{#getdevtoolsenabled}

GetDevToolsEnabled

const

void GetDevToolsEnabled(bool * enabled) const

Get whether the browser DevTools panel is enabled.

Parameters

  • enabled Output: true if DevTools can be opened

{#getfullscreen}

GetFullScreen

const

void GetFullScreen(bool * fullScreen) const

Get whether the window is in fullscreen mode.

Parameters

  • fullScreen Output: true if the window occupies the full screen

{#getgrantbrowserpermissions}

GetGrantBrowserPermissions

const

void GetGrantBrowserPermissions(bool * grant) const

Get whether browser permission requests are auto-granted.

Parameters

  • grant Output: true if permissions (camera, microphone, etc.) are granted without prompting

{#getuseragent}

GetUserAgent

const

AutoString GetUserAgent() const

Get the custom user-agent string.

Returns

UTF-8 user-agent string; caller must free with InfiniFrame_FreeString


{#getmediaautoplayenabled}

GetMediaAutoplayEnabled

const

void GetMediaAutoplayEnabled(bool * enabled) const

Get whether media autoplay is enabled.

Parameters

  • enabled Output: true if audio/video may autoplay without user interaction

{#getfilesystemaccessenabled}

GetFileSystemAccessEnabled

const

void GetFileSystemAccessEnabled(bool * enabled) const

Get whether the File System Access API is enabled.

Parameters

  • enabled Output: true if web content may access the local file system

{#getwebsecurityenabled}

GetWebSecurityEnabled

const

void GetWebSecurityEnabled(bool * enabled) const

Get whether web security (same-origin / CORS) is enabled.

Parameters

  • enabled Output: true if standard web security restrictions are enforced

{#getjavascriptclipboardaccessenabled}

GetJavascriptClipboardAccessEnabled

const

void GetJavascriptClipboardAccessEnabled(bool * enabled) const

Get whether JavaScript clipboard read/write access is enabled.

Parameters

  • enabled Output: true if the Clipboard API is accessible from scripts

{#getmediastreamenabled}

GetMediaStreamEnabled

const

void GetMediaStreamEnabled(bool * enabled) const

Get whether the MediaStream API is enabled.

Parameters

  • enabled Output: true if camera/microphone streaming is permitted

{#getsmoothscrollingenabled}

GetSmoothScrollingEnabled

const

void GetSmoothScrollingEnabled(bool * enabled) const

Get whether smooth scrolling is enabled.

Parameters

  • enabled Output: true if CSS smooth-scroll behaviour is active

{#geticonfilename}

GetIconFileName

const

AutoString GetIconFileName() const

Get the window icon file path.

Returns

UTF-8 path to the icon file; caller must free with InfiniFrame_FreeString


{#getmaximized}

GetMaximized

const

void GetMaximized(bool * isMaximized) const

Get whether the window is maximized.

Parameters

  • isMaximized Output: true if the window is currently maximized

{#getminimized}

GetMinimized

const

void GetMinimized(bool * isMinimized) const

Get whether the window is minimized.

Parameters

  • isMinimized Output: true if the window is currently minimized

{#getposition}

GetPosition

const

void GetPosition(int * x, int * y) const

Get the window position in screen coordinates.

Parameters

  • x Output: left edge position in pixels

  • y Output: top edge position in pixels


{#getresizable}

GetResizable

const

void GetResizable(bool * resizable) const

Get whether the window can be resized by the user.

Parameters

  • resizable Output: true if the window has a resizable border

{#getscreendpi}

GetScreenDpi

const

unsigned int GetScreenDpi() const

Get the DPI of the screen the window is on.

Returns

DPI value (e.g. 96 for 100%, 192 for 200%)


{#getsize}

GetSize

const

void GetSize(int * width, int * height) const

Get the current window size.

Parameters

  • width Output: client-area width in pixels

  • height Output: client-area height in pixels


{#gettitle}

GetTitle

const

AutoString GetTitle() const

Get the window title bar text.

Returns

UTF-8 title string; caller must free with InfiniFrame_FreeString


{#gettopmost}

GetTopmost

const

void GetTopmost(bool * topmost) const

Get whether the window is always on top of other windows.

Parameters

  • topmost Output: true if the always-on-top flag is set

{#getzoom}

GetZoom

const

void GetZoom(int * zoom) const

Get the current zoom level.

Parameters

  • zoom Output: zoom percentage (100 = 100%)

{#getignorecertificateerrorsenabled}

GetIgnoreCertificateErrorsEnabled

const

void GetIgnoreCertificateErrorsEnabled(bool * enabled) const

Get whether TLS certificate errors are silently ignored.

Parameters

  • enabled Output: true if certificate errors are suppressed

{#getfocused}

GetFocused

const

void GetFocused(bool * isFocused) const

Get whether the window currently has keyboard focus.

Parameters

  • isFocused Output: true if the window is the foreground window

{#navigatetostring}

void NavigateToString(AutoString content)

Load HTML content directly from a string.

Parameters

  • content UTF-8 HTML source to display

{#navigatetourl}

void NavigateToUrl(AutoString url)

Navigate the WebView to a URL.

Parameters

  • url UTF-8 URL to load (http/https or custom scheme)

{#restore}

Restore

void Restore()

Restore the window from a minimized or maximized state.


{#sendwebmessage}

SendWebMessage

void SendWebMessage(AutoString message)

Post a message string to the web content (received via window.chrome.webview.addEventListener)

Parameters

  • message UTF-8 message payload

{#settransparentenabled}

SetTransparentEnabled

void SetTransparentEnabled(bool enabled)

Enable or disable transparent window background.

Parameters

  • enabled true to enable transparency

{#setcontextmenuenabled}

SetContextMenuEnabled

void SetContextMenuEnabled(bool enabled)

Enable or disable the browser right-click context menu.

Parameters

  • enabled true to show the context menu

{#setzoomenabled}

SetZoomEnabled

void SetZoomEnabled(bool enabled)

Enable or disable user-controlled zoom.

Parameters

  • enabled true to allow pinch/keyboard zoom

{#setdevtoolsenabled}

SetDevToolsEnabled

void SetDevToolsEnabled(bool enabled)

Enable or disable the browser DevTools panel.

Parameters

  • enabled true to make DevTools accessible

{#seticonfile}

SetIconFile

void SetIconFile(AutoString filename)

Set the window icon from a file.

Parameters

  • filename UTF-8 path to an image file

{#setfullscreen}

SetFullScreen

void SetFullScreen(bool fullScreen)

Enter or exit fullscreen mode.

Parameters

  • fullScreen true to go fullscreen, false to restore

{#setmaximized}

SetMaximized

void SetMaximized(bool maximized)

Maximize or unmaximize the window.

Parameters

  • maximized true to maximize

{#setmaxsize}

SetMaxSize

void SetMaxSize(int width, int height)

Set the maximum allowed window size.

Parameters

  • width Maximum width in pixels (0 = unlimited)

  • height Maximum height in pixels (0 = unlimited)


{#setminimized}

SetMinimized

void SetMinimized(bool minimized)

Minimize or restore the window.

Parameters

  • minimized true to minimize

{#setminsize}

SetMinSize

void SetMinSize(int width, int height)

Set the minimum allowed window size.

Parameters

  • width Minimum width in pixels

  • height Minimum height in pixels


{#setposition}

SetPosition

void SetPosition(int x, int y)

Move the window to screen coordinates.

Parameters

  • x Left edge position in pixels

  • y Top edge position in pixels


{#setresizable}

SetResizable

void SetResizable(bool resizable)

Enable or disable user resizing via window border.

Parameters

  • resizable true to allow resizing

{#setsize}

SetSize

void SetSize(int width, int height)

Resize the window.

Parameters

  • width New width in pixels

  • height New height in pixels


{#settitle}

SetTitle

void SetTitle(AutoString title)

Set the window title bar text.

Parameters

  • title UTF-8 title string

{#settopmost}

SetTopmost

void SetTopmost(bool topmost)

Pin or unpin the window above all other windows.

Parameters

  • topmost true to keep always on top

{#setzoom}

SetZoom

void SetZoom(int zoom)

Set the WebView zoom level.

Parameters

  • zoom Zoom percentage (e.g. 100 for 100%, 150 for 150%)

{#setfocused}

SetFocused

void SetFocused()

Move keyboard focus into the window.


{#shownotification}

ShowNotification

void ShowNotification(AutoString title, AutoString message)

Show a native system notification (toast on Windows, libnotify on Linux, UNUserNotification on macOS)

Parameters

  • title UTF-8 notification title

  • message UTF-8 notification body text


{#waitforexit}

WaitForExit

void WaitForExit()

Block the calling thread until the window is closed; runs the platform message loop. Must be called from the thread that created the window.


{#closewebview}

CloseWebView

void CloseWebView()

Tear down the WebView control while keeping the native window alive.


{#addcustomschemename}

AddCustomSchemeName

void AddCustomSchemeName(const AutoStringConst scheme)

Register a custom URI scheme to be intercepted by WebResourceRequestedCallback.

Parameters

  • scheme UTF-8 scheme name without "://" (e.g. "app")

{#getallmonitors}

GetAllMonitors

const

void GetAllMonitors(GetAllMonitorsCallback callback) const

Enumerate all connected monitors by invoking a callback for each one.

Parameters

  • callback Called once per monitor; receives a Monitor describing geometry and scale

{#setclosingcallback}

SetClosingCallback

void SetClosingCallback(const ClosingCallback callback)

Set callback invoked when the user attempts to close the window.

Parameters

  • callback Returns true to allow closing, false to cancel

{#setfocusincallback}

SetFocusInCallback

void SetFocusInCallback(const FocusInCallback callback)

Set callback invoked when the window gains keyboard focus.

Parameters

  • callback Invoked with no arguments

{#setfocusoutcallback}

SetFocusOutCallback

void SetFocusOutCallback(const FocusOutCallback callback)

Set callback invoked when the window loses keyboard focus.

Parameters

  • callback Invoked with no arguments

{#setmovedcallback}

SetMovedCallback

void SetMovedCallback(const MovedCallback callback)

Set callback invoked when the window is moved.

Parameters

  • callback Receives new (x, y) screen coordinates

{#setresizedcallback}

SetResizedCallback

void SetResizedCallback(const ResizedCallback callback)

Set callback invoked when the window is resized.

Parameters

  • callback Receives new (width, height) in pixels

{#setmaximizedcallback}

SetMaximizedCallback

void SetMaximizedCallback(const MaximizedCallback callback)

Set callback invoked when the window is maximized.

Parameters

  • callback Invoked with no arguments

{#setrestoredcallback}

SetRestoredCallback

void SetRestoredCallback(const RestoredCallback callback)

Set callback invoked when the window is restored from maximized state.

Parameters

  • callback Invoked with no arguments

{#setminimizedcallback}

SetMinimizedCallback

void SetMinimizedCallback(const MinimizedCallback callback)

Set callback invoked when the window is minimized.

Parameters

  • callback Invoked with no arguments

{#invoke}

Invoke

void Invoke(ACTION callback)

Marshal a callback onto the UI thread and execute it synchronously.

Parameters

  • callback Action to invoke on the UI thread

{#invokeclose}

InvokeClose

const

bool InvokeClose() const noexcept

Fire the closing callback.

Returns

true if the window should close, false if the callback cancelled it


{#invokefocusin}

InvokeFocusIn

const

void InvokeFocusIn() const noexcept

Fire the focus-in callback.


{#invokefocusout}

InvokeFocusOut

const

void InvokeFocusOut() const noexcept

Fire the focus-out callback.


{#invokemove}

InvokeMove

const

void InvokeMove(int x, int y) const noexcept

Fire the moved callback.

Parameters

  • x New left edge in screen pixels

  • y New top edge in screen pixels


{#invokeresize}

InvokeResize

const

void InvokeResize(int width, int height) const noexcept

Fire the resized callback.

Parameters

  • width New width in pixels

  • height New height in pixels


{#invokemaximized}

InvokeMaximized

const

void InvokeMaximized() const noexcept

Fire the maximized callback.


{#invokerestored}

InvokeRestored

const

void InvokeRestored() const noexcept

Fire the restored callback.


{#invokeminimized}

InvokeMinimized

const

void InvokeMinimized() const noexcept

Fire the minimized callback.

Private Attributes

Return Name Description
std::unique_ptr< Impl > m_impl

{#m_impl}

m_impl

std::unique_ptr< Impl > m_impl

Private Methods

Return Name Description
void Show
void AttachWebView

{#show}

Show

void Show(bool isAlreadyShown)

{#attachwebview}

AttachWebView

void AttachWebView()

{#monitor}

Monitor

#include <Dialog.h>

Describes the geometry of a single display.

Public Attributes

Return Name Description
struct Monitor::MonitorRect monitor
struct Monitor::MonitorRect work Full monitor bounds (including taskbar)
double scale Work area bounds (excluding taskbar and docked toolbars)

{#monitor-1}

monitor

struct Monitor::MonitorRect monitor

{#work}

work

struct Monitor::MonitorRect work

Full monitor bounds (including taskbar)


{#scale}

scale

double scale

Work area bounds (excluding taskbar and docked toolbars)

{#monitorrect}

MonitorRect

#include <Dialog.h>

Pixel rectangle relative to the virtual desktop.

Public Attributes

Return Name Description
int x
int y
int width Top-left corner in virtual-desktop coordinates.
int height

{#x}

x

int x

{#y}

y

int y

{#width}

width

int width

Top-left corner in virtual-desktop coordinates.


{#height}

height

int height

{#infiniframeinitparams}

InfiniFrameInitParams

#include <InfiniFrameInitParams.h>

Initialization parameters for InfiniFrame window.

Public Attributes

Return Name Description
AutoString StartString
AutoString StartUrl
AutoString Title
AutoString WindowIconFile
AutoString TemporaryFilesPath
AutoString UserAgent
AutoString BrowserControlInitParameters
AutoString NotificationRegistrationId
InfiniFrameWindow * ParentInstance
ClosingCallback ClosingHandler
FocusInCallback FocusInHandler
FocusOutCallback FocusOutHandler
ResizedCallback ResizedHandler
MaximizedCallback MaximizedHandler
RestoredCallback RestoredHandler
MinimizedCallback MinimizedHandler
MovedCallback MovedHandler
WebMessageReceivedCallback WebMessageReceivedHandler
AutoString CustomSchemeNames
WebResourceRequestedCallback CustomSchemeHandler
int Left
int Top
int Width
int Height
int Zoom
int MinWidth
int MinHeight
int MaxWidth
int MaxHeight
bool CenterOnInitialize
bool Chromeless
bool Transparent
bool ContextMenuEnabled
bool ZoomEnabled
bool DevToolsEnabled
bool FullScreen
bool Maximized
bool Minimized
bool Resizable
bool Topmost
bool UseOsDefaultLocation
bool UseOsDefaultSize
bool GrantBrowserPermissions
bool MediaAutoplayEnabled
bool FileSystemAccessEnabled
bool WebSecurityEnabled
bool JavascriptClipboardAccessEnabled
bool MediaStreamEnabled
bool SmoothScrollingEnabled
bool IgnoreCertificateErrorsEnabled
bool NotificationsEnabled
int Size

{#startstring}

StartString

AutoString StartString

{#starturl}

StartUrl

AutoString StartUrl

{#title}

Title

AutoString Title

{#windowiconfile}

WindowIconFile

AutoString WindowIconFile

{#temporaryfilespath}

TemporaryFilesPath

AutoString TemporaryFilesPath

{#useragent}

UserAgent

AutoString UserAgent

{#browsercontrolinitparameters}

BrowserControlInitParameters

AutoString BrowserControlInitParameters

{#notificationregistrationid}

NotificationRegistrationId

AutoString NotificationRegistrationId

{#parentinstance}

ParentInstance

InfiniFrameWindow * ParentInstance

{#closinghandler}

ClosingHandler

ClosingCallback ClosingHandler

{#focusinhandler}

FocusInHandler

FocusInCallback FocusInHandler

{#focusouthandler}

FocusOutHandler

FocusOutCallback FocusOutHandler

{#resizedhandler}

ResizedHandler

ResizedCallback ResizedHandler

{#maximizedhandler}

MaximizedHandler

MaximizedCallback MaximizedHandler

{#restoredhandler}

RestoredHandler

RestoredCallback RestoredHandler

{#minimizedhandler}

MinimizedHandler

MinimizedCallback MinimizedHandler

{#movedhandler}

MovedHandler

MovedCallback MovedHandler

{#webmessagereceivedhandler}

WebMessageReceivedHandler

WebMessageReceivedCallback WebMessageReceivedHandler

{#customschemenames}

CustomSchemeNames

AutoString CustomSchemeNames

{#customschemehandler}

CustomSchemeHandler

WebResourceRequestedCallback CustomSchemeHandler

{#left}

Left

int Left

{#top}

Top

int Top

{#width-1}

Width

int Width

{#height-1}

Height

int Height

{#zoom}

Zoom

int Zoom

{#minwidth}

MinWidth

int MinWidth

{#minheight}

MinHeight

int MinHeight

{#maxwidth}

MaxWidth

int MaxWidth

{#maxheight}

MaxHeight

int MaxHeight

{#centeroninitialize}

CenterOnInitialize

bool CenterOnInitialize

{#chromeless}

Chromeless

bool Chromeless

{#transparent}

Transparent

bool Transparent

{#contextmenuenabled}

ContextMenuEnabled

bool ContextMenuEnabled

{#zoomenabled}

ZoomEnabled

bool ZoomEnabled

{#devtoolsenabled}

DevToolsEnabled

bool DevToolsEnabled

{#fullscreen}

FullScreen

bool FullScreen

{#maximized}

Maximized

bool Maximized

{#minimized}

Minimized

bool Minimized

{#resizable}

Resizable

bool Resizable

{#topmost}

Topmost

bool Topmost

{#useosdefaultlocation}

UseOsDefaultLocation

bool UseOsDefaultLocation

{#useosdefaultsize}

UseOsDefaultSize

bool UseOsDefaultSize

{#grantbrowserpermissions}

GrantBrowserPermissions

bool GrantBrowserPermissions

{#mediaautoplayenabled}

MediaAutoplayEnabled

bool MediaAutoplayEnabled

{#filesystemaccessenabled}

FileSystemAccessEnabled

bool FileSystemAccessEnabled

{#websecurityenabled}

WebSecurityEnabled

bool WebSecurityEnabled

{#javascriptclipboardaccessenabled}

JavascriptClipboardAccessEnabled

bool JavascriptClipboardAccessEnabled

{#mediastreamenabled}

MediaStreamEnabled

bool MediaStreamEnabled

{#smoothscrollingenabled}

SmoothScrollingEnabled

bool SmoothScrollingEnabled

{#ignorecertificateerrorsenabled}

IgnoreCertificateErrorsEnabled

bool IgnoreCertificateErrorsEnabled

{#notificationsenabled}

NotificationsEnabled

bool NotificationsEnabled

{#size}

Size

int Size

{#infiniframewindowimpl}

InfiniFrameWindowImpl

Public Attributes

Return Name Description
WebMessageReceivedCallback _webMessageReceivedCallback
WebResourceRequestedCallback _customSchemeCallback
ResizedCallback _resizedCallback
MaximizedCallback _maximizedCallback
RestoredCallback _restoredCallback
MinimizedCallback _minimizedCallback
MovedCallback _movedCallback
ClosingCallback _closingCallback
FocusInCallback _focusInCallback
FocusOutCallback _focusOutCallback
bool _transparentEnabled
bool _contextMenuEnabled
bool _zoomEnabled
bool _devToolsEnabled
bool _grantBrowserPermissions
bool _mediaAutoplayEnabled
bool _fileSystemAccessEnabled
bool _webSecurityEnabled
bool _javascriptClipboardAccessEnabled
bool _mediaStreamEnabled
bool _smoothScrollingEnabled
bool _ignoreCertificateErrorsEnabled
NativeString _windowTitle
NativeString _startUrl
NativeString _startString
NativeString _userAgent
NativeString _browserControlInitParameters
NativeString _iconFileName
std::vector< NativeString > _customSchemeNames
InfiniFrameWindow * _parent
std::unique_ptr< InfiniFrameDialog > _dialog

{#_webmessagereceivedcallback}

_webMessageReceivedCallback

WebMessageReceivedCallback _webMessageReceivedCallback = nullptr

{#_customschemecallback}

_customSchemeCallback

WebResourceRequestedCallback _customSchemeCallback = nullptr

{#_resizedcallback}

_resizedCallback

ResizedCallback _resizedCallback = nullptr

{#_maximizedcallback}

_maximizedCallback

MaximizedCallback _maximizedCallback = nullptr

{#_restoredcallback}

_restoredCallback

RestoredCallback _restoredCallback = nullptr

{#_minimizedcallback}

_minimizedCallback

MinimizedCallback _minimizedCallback = nullptr

{#_movedcallback}

_movedCallback

MovedCallback _movedCallback = nullptr

{#_closingcallback}

_closingCallback

ClosingCallback _closingCallback = nullptr

{#_focusincallback}

_focusInCallback

FocusInCallback _focusInCallback = nullptr

{#_focusoutcallback}

_focusOutCallback

FocusOutCallback _focusOutCallback = nullptr

{#_transparentenabled}

_transparentEnabled

bool _transparentEnabled = false

{#_contextmenuenabled}

_contextMenuEnabled

bool _contextMenuEnabled = true

{#_zoomenabled}

_zoomEnabled

bool _zoomEnabled = true

{#_devtoolsenabled}

_devToolsEnabled

bool _devToolsEnabled = false

{#_grantbrowserpermissions}

_grantBrowserPermissions

bool _grantBrowserPermissions = false

{#_mediaautoplayenabled}

_mediaAutoplayEnabled

bool _mediaAutoplayEnabled = false

{#_filesystemaccessenabled}

_fileSystemAccessEnabled

bool _fileSystemAccessEnabled = false

{#_websecurityenabled}

_webSecurityEnabled

bool _webSecurityEnabled = true

{#_javascriptclipboardaccessenabled}

_javascriptClipboardAccessEnabled

bool _javascriptClipboardAccessEnabled = false

{#_mediastreamenabled}

_mediaStreamEnabled

bool _mediaStreamEnabled = false

{#_smoothscrollingenabled}

_smoothScrollingEnabled

bool _smoothScrollingEnabled = true

{#_ignorecertificateerrorsenabled}

_ignoreCertificateErrorsEnabled

bool _ignoreCertificateErrorsEnabled = false

{#_windowtitle}

_windowTitle

NativeString _windowTitle

{#_starturl}

_startUrl

NativeString _startUrl

{#_startstring}

_startString

NativeString _startString

{#_useragent}

_userAgent

NativeString _userAgent

{#_browsercontrolinitparameters}

_browserControlInitParameters

NativeString _browserControlInitParameters

{#_iconfilename}

_iconFileName

NativeString _iconFileName

{#_customschemenames}

_customSchemeNames

std::vector< NativeString > _customSchemeNames

{#_parent}

_parent

InfiniFrameWindow * _parent = nullptr

{#_dialog}

_dialog

std::unique_ptr< InfiniFrameDialog > _dialog

{#monitorrect}

MonitorRect

#include <Dialog.h>

Pixel rectangle relative to the virtual desktop.

Public Attributes

Return Name Description
int x
int y
int width Top-left corner in virtual-desktop coordinates.
int height

{#x}

x

int x

{#y}

y

int y

{#width}

width

int width

Top-left corner in virtual-desktop coordinates.


{#height}

height

int height

{#windowcompositionattribdata}

WINDOWCOMPOSITIONATTRIBDATA

#include <DarkMode.h>

Parameter struct for SetWindowCompositionAttribute.

Public Attributes

Return Name Description
WINDOWCOMPOSITIONATTRIB Attrib
PVOID pvData Attribute to get or set.
SIZE_T cbData Pointer to attribute-specific data.

{#attrib}

Attrib

WINDOWCOMPOSITIONATTRIB Attrib

{#pvdata}

pvData

PVOID pvData

Attribute to get or set.


{#cbdata}

cbData

SIZE_T cbData

Pointer to attribute-specific data.

Generated by Moxygen