Enumerations

13 enums defining constants used across the LiteView2 API

Note

Flag enums (marked with Flags) can be combined using bitwise OR.

LiteView2BrowsingDataKinds Flags

Bitfield flags for ClearBrowsingData. Combine with OR (e.g., LV2_DATA_COOKIES Or LV2_DATA_CACHE_STORAGE).

ConstantValueDescription
LV2_DATA_FILE_SYSTEMS1File systems
LV2_DATA_INDEXED_DB2IndexedDB
LV2_DATA_LOCAL_STORAGE4Local storage
LV2_DATA_WEB_SQL8Web SQL
LV2_DATA_CACHE_STORAGE16Cache storage
LV2_DATA_DOM_STORAGE32DOM storage
LV2_DATA_COOKIES64Cookies
LV2_DATA_ALL_SITE128All site data
LV2_DATA_DISK_CACHE256Disk cache
LV2_DATA_DOWNLOAD_HISTORY512Download history
LV2_DATA_GENERAL_AUTOFILL1024Autofill data
LV2_DATA_PASSWORD_AUTOSAVE2048Saved passwords
LV2_DATA_BROWSING_HISTORY4096Browsing history
LV2_DATA_SETTINGS8192Settings
LV2_DATA_ALL_PROFILE16384All profile data
' Clear cookies and cache
m_lv.ClearBrowsingData LV2_DATA_COOKIES Or LV2_DATA_CACHE_STORAGE

LiteView2ResourceContext

Resource types for AddWebResourceRequestedFilter.

ConstantValueDescription
LV2_RESOURCE_ALL0All resources
LV2_RESOURCE_DOCUMENT1HTML documents
LV2_RESOURCE_STYLESHEET2CSS
LV2_RESOURCE_IMAGE3Images
LV2_RESOURCE_MEDIA4Audio/Video
LV2_RESOURCE_FONT5Web fonts
LV2_RESOURCE_SCRIPT6JavaScript
LV2_RESOURCE_XHR7XMLHttpRequest
LV2_RESOURCE_FETCH8Fetch API
LV2_RESOURCE_TEXTTRACK9WebVTT
LV2_RESOURCE_EVENTSOURCE10Server-sent events
LV2_RESOURCE_WEBSOCKET11WebSocket
LV2_RESOURCE_MANIFEST12Web App manifests
LV2_RESOURCE_OTHER13Other

LV2_FOCUS_REASON

Specifies the reason for a focus change.

ConstantValueDescription
LV2_FOCUS_TABFORWARD0Tab forward
LV2_FOCUS_TABBACKWARD1Tab backward
LV2_FOCUS_PROGRAMMATIC2Programmatic focus

LV2_POPUP_MODE

Controls how popup windows are handled.

ConstantValueDescription
LV2_POPUP_ALLOW0Allow popups
LV2_POPUP_BLOCK1Block popups
LV2_POPUP_SAME_WINDOW2Open in same window

LV2_LICENSE_STATE

Indicates the current license status.

ConstantValueDescription
LV2_LICENSE_VALID0License valid
LV2_LICENSE_TRIAL1Trial mode
LV2_LICENSE_EXPIRED2License expired
LV2_LICENSE_INVALID3Invalid license

LV2_COLOR_SCHEME

Sets the preferred color scheme for web content.

ConstantValueDescription
LV2_COLOR_AUTO0Follow system
LV2_COLOR_LIGHT1Force light
LV2_COLOR_DARK2Force dark

LV2_PRINT_ORIENTATION

Page orientation for printing and PDF export.

ConstantValueDescription
LV2_PRINT_PORTRAIT0Portrait
LV2_PRINT_LANDSCAPE1Landscape

LV2_TRACKING_PREVENTION

Tracking prevention level for the browser profile.

ConstantValueDescription
LV2_TRACKING_NONE0No prevention
LV2_TRACKING_BASIC1Basic
LV2_TRACKING_BALANCED2Balanced
LV2_TRACKING_STRICT3Strict

LV2_MEMORY_USAGE

Memory usage target level.

ConstantValueDescription
LV2_MEMORY_NORMAL0Normal
LV2_MEMORY_LOW1Low memory target

LV2_SCROLLBAR_STYLE

Scrollbar rendering style.

ConstantValueDescription
LV2_SCROLLBAR_DEFAULT0Default scrollbar
LV2_SCROLLBAR_FLUENT_OVERLAY1Fluent overlay

LV2_DOWNLOAD_DIALOG_CORNER_ALIGNMENT

Corner alignment for the download dialog.

ConstantValueDescription
LV2_DOWNLOAD_CORNER_TOP_LEFT0Top left
LV2_DOWNLOAD_CORNER_TOP_RIGHT1Top right
LV2_DOWNLOAD_CORNER_BOTTOM_LEFT2Bottom left
LV2_DOWNLOAD_CORNER_BOTTOM_RIGHT3Bottom right

LV2_PDF_TOOLBAR_ITEMS Flags

Bitfield flags for controlling PDF viewer toolbar visibility.

ConstantValueDescription
LV2_PDF_NONE0No items
LV2_PDF_SAVE1Save button
LV2_PDF_PRINT2Print button
LV2_PDF_SAVE_AS4Save As button
LV2_PDF_ZOOM_IN8Zoom In button
LV2_PDF_ZOOM_OUT16Zoom Out button
' Hide Save and Print buttons from PDF toolbar
m_lv.HiddenPdfToolbarItems = LV2_PDF_SAVE Or LV2_PDF_PRINT

LV2_BOUNDS_MODE

Controls how bounds coordinates are interpreted when embedding the browser.

Constant Value Description
LV2_BOUNDS_RAW_PIXELS0Bounds are specified in raw pixels (default). The WebView2 control is positioned using raw pixel coordinates regardless of DPI scaling.
LV2_BOUNDS_RASTERIZATION_SCALE1Bounds use the rasterization scale. Coordinates are automatically adjusted for the current DPI/scaling factor of the display.
' Use DPI-aware bounds
pool.SetBoundsMode browserIndex, LV2_BOUNDS_RASTERIZATION_SCALE
Explore More:
Core API | Events | JSON | Browser Pool | Enumerations