Skip to content

andrestubbe/FastDWM

Repository files navigation

FastDWM — Native Windows Timing & Composition [v0.1.0]

Low-latency access to the Windows Desktop Window Manager (DWM). High-precision multimedia timers and VSync synchronization for the FastJava ecosystem.

Status Java Platform JitPack


Table of Contents

Features

  • ⏱️ Multimedia Timers: 1ms kernel-level precision via timeSetEvent.
  • 📺 VSync Sync: Align Java updates with monitor refresh rates.
  • 🖥️ DWM Composition: Access to system-level composition timing info.
  • 🚀 Ultra-Low Overhead: Direct JNI calls with zero allocation.

Quick Start

# Clone the repository
git clone https://github.com/andrestubbe/FastDWM.git
cd FastDWM

# Build and register locally
.\compile.bat

# Run the Drift Test Demo
.\run-demo.bat

Installation

Option 1: Maven (Recommended)

Add the JitPack repository and the dependencies to your pom.xml:

<repositories>
    <repository>
        <id>jitpack.io</id>
        <url>https://jitpack.io</url>
    </repository>
</repositories>

<dependencies>
    <!-- FastDWM Library -->
    <dependency>
        <groupId>io.github.andrestubbe</groupId>
        <artifactId>fastdwm</artifactId>
        <version>0.1.0</version>
    </dependency>

    <!-- FastCore (Required Native Loader) -->
    <dependency>
        <groupId>com.github.andrestubbe</groupId>
        <artifactId>fastcore</artifactId>
        <version>v1.0.0</version>
    </dependency>
</dependencies>

Option 2: Gradle (via JitPack)

repositories {
    maven { url 'https://jitpack.io' }
}

dependencies {
    implementation 'io.github.andrestubbe:fastdwm:0.1.0'
    implementation 'com.github.andrestubbe:fastcore:v1.0.0'
}

Option 3: Direct Download (No Build Tool)

Download the latest JARs directly to add them to your classpath:

  1. 📦 fastdwm-v0.1.0.jar (The Core Library)
  2. ⚙️ fastcore-v1.0.0.jar (The Mandatory Native Loader)

Important

Both JARs must be in your classpath for the native JNI calls to function correctly.

Running the Demo

We've included a native timing drift test to showcase the precision:

  1. Run compile.bat to build the native DLL.
  2. Run run-demo.bat to launch the Drift Test.

Build from Source

  • JDK 17+
  • Visual Studio 2022 (C++20)
  • Windows 10/11

See COMPILE.md for detailed build instructions.

Roadmap

  • Initial JNI Bridge: Base support for multimedia timers.
  • VSync Pulse: Event-driven VSync callbacks.
  • DWM Transparency: Advanced window composition controls.

License

MIT License — See LICENSE for details.


Part of the FastJava EcosystemMaking the JVM faster.

About

Native Windows Desktop Window Manager (DWM) access. High-precision multimedia timers and VSync synchronization for the FastJava ecosystem.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors