-
-
Notifications
You must be signed in to change notification settings - Fork 60
Engine Xavier
Xavier (Sucrose.Live.Xavier, assembly Sucrose.Live.Xavier.exe) is one of Sucrose's three GIF rendering engines. It animates GIFs through the bundled Sucrose.XamlAnimatedGif library, using its AnimationBehavior attached behavior on a WPF Image. Unlike Vexana, Xavier can stream GIFs from remote URLs because it is configured with an HTTP client and a client user-agent. Xavier renders only the Gif type and, like Vexana, is pure managed WPF with no Chromium or libmpv dependency.
Audience: developers and advanced users. For the user-facing GIF wallpaper guide, see Type-Gif.
- At a glance
- Technology
- Supported wallpaper types
- Runtime requirements
- How it renders
- Setup and playback control
- Hardware acceleration and Stay Awake
- Interactivity and data APIs
- Xavier vs. Vexana
- Strengths and limitations
- See also
| Property | Value |
|---|---|
| Project | Sucrose.Live.Xavier |
| Assembly | Sucrose.Live.Xavier.exe |
| Underlying tech |
Sucrose.XamlAnimatedGif (XAML attached behavior) |
| Preprocessor symbols |
ENGINE, LIVE_XAVIER
|
| Engine enum member | EngineType.XavierLive |
| Allowed for type | Gif |
| Default for | (none — MpvPlayer is the default Gif engine) |
| Native dependency | None (pure managed WPF) |
| Remote GIF over HTTP | Yes |
| Interactive | No |
| Audio / system data | No |
Xavier renders GIFs with Sucrose.XamlAnimatedGif, a bundled XamlAnimatedGif library. The animation is driven by the attached behavior SXAGAB = Sucrose.XamlAnimatedGif.AnimationBehavior applied to a WPF Image. Because XamlAnimatedGif can load a GIF from a URI using a supplied HttpClient, Xavier is able to display remote GIFs as well as local files.
"Xavier" is a branded internal codename; it denotes the XamlAnimatedGif-based engine and is not a third-party product name. Like Vexana, it is pure-WPF — no Chromium and no libmpv.
| Type | Supported |
|---|---|
| Gif | Yes |
| Url | No |
| Web | No |
| Video | No |
| YouTube | No |
| Application | No |
Xavier's window switch handles only the Gif case; any other type routed to it falls through to default → Close().
Xavier has no extra native runtime beyond Sucrose's privately bundled .NET 10 runtime (Sucrose.Runtime). There is no WebView2 runtime, no Visual C++ Redistributable, and no libmpv DLL. It targets .NET 10.0-windows (WPF + WinForms interop) and builds for x86, x64, and ARM64.
See System-Requirements and Runtime-Dependencies.
Xavier follows the shared engine App.xaml.cs skeleton:
- Exception handlers (Thread, FirstChance, Unhandled, UnobservedTask, Dispatcher) route to
Sucrose.Shared.Watchdog. -
OnStartup: single-instance mutex check (SMMRM.Live),Security.Apply(), optional theme cycling, thenChecker()/Configure(). -
Configure(): readsLibraryLocation/LibrarySelected, loadsSucroseInfo.json(SSTHI.ReadJson), verifiesInfo.AppVersion <= app version, resolvesSource, then switches onInfo.Typeand shows the Gif window. - The
BackgroundogflagsPipeRequired,AudioRequired,SignalRequired,PausePerformance,TransmissionRequiredstart off and stay off (Xavier renders no Web data). - Starts
Awakening.Start()(Stay Awake),Crashing.Start(), andCycyling.Start().
Xavier's GIF view (View/Gif.xaml.cs) configures the XamlAnimatedGif behavior:
| Call | Effect |
|---|---|
SetSourceUri |
Sets the GIF source (local path or URL). |
SetRepeatBehavior(Forever) |
Loops the GIF indefinitely. |
SetCacheFramesInMemory(false) |
Disables in-memory frame caching. |
SetAutoStart(true) |
Begins playback automatically. |
SetClientUserAgent(SMMG.UserAgent) |
Sends Sucrose's user-agent for remote GIF requests. |
SetHttpClient(SSDMI.Client) |
Supplies the shared HttpClient, enabling GIF loading from URLs. |
Playback control (Helper/Gif.cs):
| Operation | Behavior |
|---|---|
SetMemory(false) |
Keeps frame caching off. |
SetLoop |
Toggles looping. |
Pause / Resume
|
Pauses or resumes the animation. |
Stretch is not part of Helper/Gif.cs; it is applied each second in the View's timer tick (View/Gif.xaml.cs, GeneralTimer_Tick) via SSEXMI.ImageEngine.Stretch = (Stretch)SSEHD.GetStretch();, using the shared StretchType setting (default UniformToFill).
- HardwareAcceleration: Not applicable. WPF handles compositing; there are no GPU flags to toggle for Xavier.
-
Stay Awake: Applies via the shared
Helper/Awakening.cs30-secondSetThreadExecutionStateloop (ON →ES_CONTINUOUS | ES_SYSTEM_REQUIRED | ES_DISPLAY_REQUIRED; OFF →ES_CONTINUOUS).
Xavier is a non-interactive renderer. It does not reference RawInput.Sharp, so it forwards no input to content, and it does not support the audio-reactive or system-status JavaScript APIs (those require the Web type on a browser engine — see Engine-WebView / Engine-CefSharp, Create-Audio-API, Create-System-API).
Both are pure-WPF GIF engines with no native runtime. The practical differences:
| Xavier | Vexana | |
|---|---|---|
| Decoder |
Sucrose.XamlAnimatedGif AnimationBehavior
|
In-house frame parser (Helper/Parse.cs) + manual timer |
| Frame caching | Off (SetCacheFramesInMemory(false)) |
n/a (own ticker) |
| Remote GIF over HTTP | Yes (HTTP client + user-agent) | No |
| Interactivity / data APIs | No | No |
Choose Xavier when you need to stream a GIF from a URL; choose Vexana for the simplest local frame-player path. For richest control and as the type default, use MpvPlayer.
Strengths
- No native runtime to install — pure managed WPF.
- Can stream GIFs directly from remote URLs.
- Lightweight; frame caching disabled keeps memory use modest.
Limitations
- Gif type only.
- Not interactive; forwards no input.
- No audio reactivity or system-status data injection.
- Engines-Overview — how engines are selected and launched
- Engine-Vexana — the other lightweight GIF engine (local parser)
- Engine-MpvPlayer — the default Gif engine
- Engine-Comparison — full engine matrix
- Type-Gif — using GIF wallpapers
- Choosing-Engines — changing the engine per type
Getting Started
- Installation
- System Requirements
- Quick Start
- Portal Interface Tour
- Updating Sucrose
- Uninstalling Sucrose
Wallpaper Types
Using Sucrose
- Managing Library
- Using Store
- Customizing Wallpaper
- Multi-Monitor
- Wallpaper Cycling
- Choosing Engines
- Performance Rules
- Theme, Tray & Startup
- Discord Rich Presence
Settings Reference
- Settings Overview
- Settings: General
- Settings: Personal
- Settings: Performance
- Settings: Wallpaper
- Settings: System
- Settings: Other
- Settings: All Keys
Creating Wallpapers
- Create Overview
- Create: Step By Step
- Create: Package Format
- Create: Customization Controls
- Create: JS Bridge
- Create: Audio API
- Create: System API
- Create: Property Listener & Filters
- Create: Web Architecture
- Create: Compatibility
- Create: Example Wallpapers
- Create: Sharing & Publishing
Engine Reference
- Engines Overview
- Engine: MpvPlayer
- Engine: VlcPlayer
- Engine: WebView
- Engine: CefSharp
- Engine: Nebula
- Engine: Vexana
- Engine: Xavier
- Engine: Aurora
- Engine Comparison
Automation & Command Line
Architecture & Internals
- Architecture Overview
- Lifecycle
- Commandog Dispatcher
- Single-Instance Mutexes
- IPC
- Backgroundog Service
- Crash Reporting
- Update Internals
- Property Service
- Undo Internals
Data, Files & Diagnostics
Building & Contributing
- Building From Source
- Repository Layout
- Shared Item Projects
- Code Conventions
- Preprocessor Symbols
- Publish Pipeline
- Bundle Installer Internals
- Extending Sucrose
- Contributing
- Translating with Localizer
- Localization Coverage
- Security Policy
- Privacy & Telemetry
Help & Support