Window Events#

Classes#

omni::kit::IAppWindow

Application window.

omni::kit::IAppWindowFactory

Application window creation factory.

Functions#

void omni::kit::IAppWindow::broadcastInputBlockingState(bool shouldBlock)

Sets the forced rejecting of all input events for all device types.

void omni::kit::IAppWindow::focusWindow()=0

Focus the window and bring to front, if applicable.

const char * omni::kit::IAppWindow::getActionMappingSetPath()=0

Gets current action mapping set settings path.

const char * omni::kit::IAppWindow::getClipboard()=0

Gets the text from the clipboard associated with the window.

bool omni::kit::IAppWindow::getCursorBlink() const =0

float omni::kit::IAppWindow::getDpiScale() const =0

float omni::kit::IAppWindow::getDpiScaleOverride() const =0

Gets DPI scale override.

std::pair< carb::RStringKey, uintptr_t > omni::kit::IAppWindow::getEventKey() const noexcept

Obtains the event key for use with filtering events with IEventDispatcher .

carb::input::Gamepad * omni::kit::IAppWindow::getGamepad(size_t index)=0

Gets one of the gamepads available.

uint32_t omni::kit::IAppWindow::getHeight()=0

bool omni::kit::IAppWindow::getInputBlockingState(carb::input::DeviceType deviceType) const =0

Gets whether the input for a certain device types is being blocked.

carb::input::Keyboard * omni::kit::IAppWindow::getKeyboard()=0

Gets the keyboard associated with the window.

carb::input::Mouse * omni::kit::IAppWindow::getMouse()=0

Gets the mouse associated with the window.

carb::Int2 omni::kit::IAppWindow::getPosition()=0

carb::Uint2 omni::kit::IAppWindow::getSize()=0

const char * omni::kit::IAppWindow::getTitle()=0

float omni::kit::IAppWindow::getUiScale() const =0

float omni::kit::IAppWindow::getUiScaleMultiplier() const =0

uint32_t omni::kit::IAppWindow::getWidth()=0

carb::windowing::Window * omni::kit::IAppWindow::getWindow()=0

Returns the Carbonite window the editor is working with, or nullptr if headless.

carb::events::IEventStream * omni::kit::IAppWindow::getWindowCloseEventStream()=0

carb::events::IEventStream * omni::kit::IAppWindow::getWindowContentScaleEventStream()=0

carb::events::IEventStream * omni::kit::IAppWindow::getWindowDropEventStream()=0

carb::events::IEventStream * omni::kit::IAppWindow::getWindowFocusEventStream()=0

carb::events::IEventStream * omni::kit::IAppWindow::getWindowMinimizeEventStream()=0

carb::events::IEventStream * omni::kit::IAppWindow::getWindowMoveEventStream()=0

carb::events::IEventStream * omni::kit::IAppWindow::getWindowResizeEventStream()=0

WindowType omni::kit::IAppWindow::getWindowType() const =0

Gets the window type: Virtual/OS window.

bool omni::kit::IAppWindow::isFullscreen()=0

Gets the fullscreen state of editor Window.

bool omni::kit::IAppWindow::isMaximized()=0

Gets the maximized state of editor Window.

void omni::kit::IAppWindow::maximizeWindow()=0

Maximize the editor window.

void omni::kit::IAppWindow::move(int x, int y)=0

Moves the window.

void omni::kit::IAppWindow::resize(uint32_t width, uint32_t height)=0

Resizes the window.

void omni::kit::IAppWindow::restoreWindow()=0

Restore the editor window (exit maximize/minimize).

void omni::kit::IAppWindow::setClipboard(const char *text)=0

Sets the text in the clipboard associated with the window.

void omni::kit::IAppWindow::setDpiScaleOverride(float dpiScaleOverride)=0

Sets the DPI scale override.

void omni::kit::IAppWindow::setFullscreen(bool fullscreen)=0

Sets fullscreen state of editor Window.

void omni::kit::IAppWindow::setInputBlockingState(carb::input::DeviceType deviceType, bool shouldBlock)=0

Sets the forced rejecting of all input events from a certain device type.

void omni::kit::IAppWindow::setKeyboard(carb::input::Keyboard *keyboard)=0

Allows to replace the keyboard.

void omni::kit::IAppWindow::setUiScaleMultiplier(float uiScaleMultiplier)=0

Sets the UI scale multiplier that is applied on top of OS DPI scale.

bool omni::kit::IAppWindow::shutdown()=0

Deinitializes the window.

bool omni::kit::IAppWindow::startup(const char *name)=0

Initializes the window taking parameters from carb::settings.

bool omni::kit::IAppWindow::startupWithDesc(const char *name, const WindowDesc &desc)=0

Initializes the window with custom description.

void omni::kit::IAppWindow::update(float dt=-1.0f)=0

Call one update loop iteration on application.

IAppWindowPtr omni::kit::IAppWindowFactory::createWindowByType(WindowType windowType)

Create window according to the input window type.

IAppWindowPtr omni::kit::IAppWindowFactory::createWindowFromSettings()

Create new application window.

IAppWindow * omni::kit::IAppWindowFactory::createWindowPtrByType(WindowType windowType)=0

Create window according to the input window type.

IAppWindow * omni::kit::IAppWindowFactory::createWindowPtrFromSettings()=0

Create new application window.

void omni::kit::IAppWindowFactory::destroyWindowPtr(IAppWindow *appWindow)=0

Destroy the input application window.

carb::input::ActionMappingSet * omni::kit::IAppWindowFactory::getActionMappingSet() const =0

Get window action mapping set.

IAppWindow * omni::kit::IAppWindowFactory::getAppWindowFromHandle(int64_t appWindowHandle)=0

Get application window from handle.

IAppWindow * omni::kit::IAppWindowFactory::getDefaultWindow()=0

Get default application window.

IAppWindow * omni::kit::IAppWindowFactory::getWindowAt(size_t index)=0

Get application window by index.

size_t omni::kit::IAppWindowFactory::getWindowCount()=0

Get the number of application windows.

carb::events::IEventStream * omni::kit::IAppWindowFactory::getWindowCreationEventStream()=0

Get event stream of application window creation.

void omni::kit::IAppWindowFactory::setDefaultWindow(IAppWindow *)=0

Set default application window.

bool omni::kit::IAppWindowFactory::shutdown()=0

Application window shutdown.

void omni::kit::IAppWindowFactory::shutdownActionMappingSet()=0

Shutdown action mapping set.

bool omni::kit::IAppWindowFactory::startup()=0

Application window startup.

void omni::kit::IAppWindowFactory::startupActionMappingSet()=0

Start up action mapping set.

IAppWindow * omni::kit::getDefaultAppWindow()

Get default application window.

Typedefs#

Variables#

CursorBlink omni::kit::WindowDesc::cursorBlink

If cursor (caret) blinks in input fields or not.

Decorations omni::kit::WindowDesc::decorations

If window has full decorations.

float omni::kit::WindowDesc::dpiScaleOverride

DPI scale overrides value.

Floating omni::kit::WindowDesc::floating

If window is floating.

Fullscreen omni::kit::WindowDesc::fullscreen

If window is fullscreen.

uint64_t omni::kit::WindowDesc::height

Window height.

Resize omni::kit::WindowDesc::resize

If allows window resize.

Scaling omni::kit::WindowDesc::scaling

If window is scaled to monitor.

size_t omni::kit::WindowDesc::structSize

This field is needed to maintain ABI stability.

const char * omni::kit::WindowDesc::title

The window title.

uint64_t omni::kit::WindowDesc::width

Window width.

WindowState omni::kit::WindowDesc::windowState

window state: normal, minimized or maximized.

uint64_t omni::kit::WindowDesc::x

The x coordinate of the window.

uint64_t omni::kit::WindowDesc::y

The Y coordinate of the window.

const auto omni::kit::kGlobalEventWindowClose

Event that is dispatched when a window is closed.

const auto omni::kit::kGlobalEventWindowContentScale

Event that is dispatched when content scale changes for a window (deferred)

const auto omni::kit::kGlobalEventWindowContentScaleImmediate

Event that is dispatched when content scale changes for a window (immediate)

const auto omni::kit::kGlobalEventWindowDrop

Event that is dispatched when a drag-and-drop event completes for a window (deferred)

const auto omni::kit::kGlobalEventWindowDropImmediate

Event that is dispatched when a drag-and-drop event completes for a window (immediate)

const auto omni::kit::kGlobalEventWindowFocus

Event that is dispatched when focus changes for a window (deferred)

const auto omni::kit::kGlobalEventWindowFocusImmediate

Event that is dispatched when focus changes for a window (immediate)

const auto omni::kit::kGlobalEventWindowMinimize

Event that is dispatched when minimize state changes for a window (deferred)

const auto omni::kit::kGlobalEventWindowMinimizeImmediate

Event that is dispatched when minimize state changes for a window (immediate)

const auto omni::kit::kGlobalEventWindowMove

Event that is dispatched when a window moves (deferred)

const auto omni::kit::kGlobalEventWindowMoveImmediate

Event that is dispatched when a window moves (immediate)

const auto omni::kit::kGlobalEventWindowResize

Event that is dispatched when a window resizes (deferred)

const auto omni::kit::kGlobalEventWindowResizeImmediate

Event that is dispatched when a window resizes (immediate)

Functions#

inline IAppWindow *omni::kit::getDefaultAppWindow()#

Get default application window.

Returns:

application window pointer, return nullptr if factory is nullptr.

Typedefs#

using omni::kit::IAppWindowPtr = carb::ObjectPtr<IAppWindow>#

Variables#

const auto omni::kit::kGlobalEventWindowClose = carb::RString("omni.appwindow:window:close")#

Event that is dispatched when a window is closed.

const auto omni::kit::kGlobalEventWindowContentScale = carb::RString("omni.appwindow:window:content_scale")#

Event that is dispatched when content scale changes for a window (deferred)

const auto omni::kit::kGlobalEventWindowContentScaleImmediate = carb::RString("omni.appwindow:window:content_scale:immediate")#

Event that is dispatched when content scale changes for a window (immediate)

const auto omni::kit::kGlobalEventWindowDrop = carb::RString("omni.appwindow:window:drop")#

Event that is dispatched when a drag-and-drop event completes for a window (deferred)

const auto omni::kit::kGlobalEventWindowDropImmediate = carb::RString("omni.appwindow:window:drop:immediate")#

Event that is dispatched when a drag-and-drop event completes for a window (immediate)

const auto omni::kit::kGlobalEventWindowFocus = carb::RString("omni.appwindow:window:focus")#

Event that is dispatched when focus changes for a window (deferred)

const auto omni::kit::kGlobalEventWindowFocusImmediate = carb::RString("omni.appwindow:window:focus:immediate")#

Event that is dispatched when focus changes for a window (immediate)

const auto omni::kit::kGlobalEventWindowMinimize = carb::RString("omni.appwindow:window:minimize")#

Event that is dispatched when minimize state changes for a window (deferred)

const auto omni::kit::kGlobalEventWindowMinimizeImmediate = carb::RString("omni.appwindow:window:minimize:immediate")#

Event that is dispatched when minimize state changes for a window (immediate)

const auto omni::kit::kGlobalEventWindowMove = carb::RString("omni.appwindow:window:move")#

Event that is dispatched when a window moves (deferred)

const auto omni::kit::kGlobalEventWindowMoveImmediate = carb::RString("omni.appwindow:window:move:immediate")#

Event that is dispatched when a window moves (immediate)

const auto omni::kit::kGlobalEventWindowResize = carb::RString("omni.appwindow:window:resize")#

Event that is dispatched when a window resizes (deferred)

const auto omni::kit::kGlobalEventWindowResizeImmediate = carb::RString("omni.appwindow:window:resize:immediate")#

Event that is dispatched when a window resizes (immediate)