Skip to content

rayquiro.app

This content is for v0.2.1. Switch to the latest version for up-to-date documentation.

The rayquiro.app module provides direct integration with the operating system window manager, enabling desktop utilities, native alerts, system trays, and window event handling.

import "rayquiro.app";

MethodSignatureDescription
app.windowapp.window(config)Creates and displays a native window.
app.quitapp.quit()Signals the application message loop to exit.
window.isOpenwindow.isOpen()Returns true while the window has not been closed by the user.
window.pollEventswindow.pollEvents()Dispatches pending OS events (mouse, keyboard, redraw).
window.setTitlewindow.setTitle(title)Dynamically changes the window title.
window.setSizewindow.setSize(w, h)Resizes the client area.
window.closewindow.close()Destroys the window handle.

var win = app.window({
title: "My Native App",
width: 1024,
height: 768,
resizable: true,
fullscreen: false,
vsync: true
});

import "rayquiro.app";
var window = app.window({
title: "System Monitor",
width: 640,
height: 480,
resizable: false
});
var frame_count = 0;
while (window.isOpen()) {
window.pollEvents();
frame_count = frame_count + 1;
if (frame_count % 60 == 0) {
window.setTitle("System Monitor - Uptime: " + str(frame_count / 60) + "s");
}
time.sleep(16);
}
print("Application closed gracefully.");