X11PlatformOptions
struct · ferroui-x11 · v0.5.0
struct X11PlatformOptions
Platform-specific options which apply to Linux.
Members
rendering_modeoverlay_popupsuse_d_bus_menuuse_d_bus_file_pickerenable_imeenable_input_focus_proxyenable_session_managementshould_render_on_ui_threadgl_profilesglx_renderer_blacklistwm_classenable_multi_touchuse_retained_framebufferuse_x_shm_framebufferuse_g_lib_main_loopenable_drawn_decorationsforce_drawn_decorationsexternal_g_lib_main_loop_exception_loggernew
rendering_mode
rendering_mode: Vec<X11RenderingMode>
Gets or sets the rendering modes with fallbacks.
The first element in the array has the highest priority.
The default value is: X11RenderingMode::Glx, X11RenderingMode::Software.
If application should work on as wide range of devices as possible, at least add
X11RenderingMode::Software as a fallback value.
The platform fails to initialize when no value is matched.
overlay_popups
overlay_popups: bool
Embeds popups to the window when set to true. The default value is false.
use_d_bus_menu
use_d_bus_menu: bool
Enables global menu support on Linux desktop environments where it's supported (e. g. XFCE and MATE with plugin, KDE, etc). The default value is true.
use_d_bus_file_picker
use_d_bus_file_picker: bool
Enables DBus file picker instead of GTK. The default value is true.
enable_ime
enable_ime: Option<bool>
Determines whether to use IME. IME would be enabled by default if the current user input language is one of the following: Mandarin, Japanese, Vietnamese or Korean.
Input method editor is a component that enables users to generate characters not natively available on their input devices by using sequences of characters or mouse operations that are natively available on their input devices.
enable_input_focus_proxy
enable_input_focus_proxy: bool
Determines whether to use Input Focus Proxy. The default value is false.
enable_session_management
enable_session_management: bool
Determines whether to enable support for the X Session Management Protocol.
X Session Management Protocol is a standard implemented on most Linux systems that uses Xorg. This enables apps to control how they can control and/or cancel the pending shutdown requested by the user.
should_render_on_ui_thread
should_render_on_ui_thread: bool
Render directly on the UI thread instead of using a dedicated render thread. This can be usable if your device don't have multiple cores to begin with. This setting is false by default.
gl_profiles
gl_profiles: Vec<ferroui_opengl::GlVersion>
glx_renderer_blacklist
glx_renderer_blacklist: Vec<String>
wm_class
wm_class: Option<String>
enable_multi_touch
enable_multi_touch: Option<bool>
Enables multitouch support. The default value is true.
Multitouch allows a surface (a touchpad or touchscreen) to recognize the presence of more than one point of contact with the surface at the same time.
use_retained_framebuffer
use_retained_framebuffer: Option<bool>
Retain window framebuffer contents if using CPU rendering mode. This will keep an offscreen bitmap for each window with contents of the previous frame While improving performance by saving a blit, it will increase memory consumption if you have many windows
use_x_shm_framebuffer
use_x_shm_framebuffer: Option<bool>
Enables the MIT-SHM extension for CPU rendering mode, which uses shared memory to transfer the framebuffer contents to the X server instead of sending pixels over the connection socket. Only used when set to true and the extension is supported by the server. The default value is null.
use_g_lib_main_loop
use_g_lib_main_loop: bool
If this option is set to true, GMainLoop and GSource based dispatcher implementation will be used instead of epoll-based one. Use this if you need to use GLib-based libraries on the main thread
enable_drawn_decorations
enable_drawn_decorations: Option<bool>
Enables client-side drawn window decorations on X11. When true and ExtendClientAreaToDecorationsHint is set on a window, the framework will draw its own decorations (titlebar, borders, resize grips) instead of using the X11 window manager decorations.
Experimental, used mostly for testing.
force_drawn_decorations
force_drawn_decorations: bool
Forces client-side drawn window decorations on X11 for all windows, even when the app has not opted in via ExtendClientAreaToDecorationsHint. In this mode, Window.ClientSize reflects the usable content area (platform client size minus decoration margins) and the app is unaware of the decorations. Implies EnableDrawnDecorations = true.
Experimental, used mostly for testing.
external_g_lib_main_loop_exception_logger
external_g_lib_main_loop_exception_logger: Option<std::rc::Rc<dyn Fn(&dyn std::any::Any + Send) -> ()>>
If the framework is in control of a run loop, we propagate exceptions by stopping the run loop frame and rethrowing an exception. However, if there is no run loop frame controlled by the framework, there is no way to report such exceptions, since allowing those to escape native->managed call boundary will likely brick GLib machinery since it's not aware of managed Exceptions This property allows to inspect such exceptions before they will be ignored
new
fn new() -> Self
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeBorrow<T>BorrowMut<T>CloneToUninitInto<U>From<T>TryInto<U>TryFrom<U>AnyToOwnedClassDefaultsNoneValueInstrumentWithSubscriberCloneDefaultErasedDestructorIntoEither
Availability
Extracted for x86_64-unknown-linux-gnu, aarch64-apple-darwin. Cargo features are listed in the crate index.