win32 Dart Packages

repository·main·Indexed 21 days ago

https://github.com/halildurmus/win32

A collection of Dart packages for building native Windows applications using Dart and Flutter. It provides low-level FFI bindings for the Win32 API and high-level, type-safe wrappers for common Windows functionalities, including COM interop, service management, and application manifest configuration.

Tokens
45.5K
Snippets
137
Records
218
Agent score
73%

What's inside win32

  1. Overview of the Desktop Window Manager (DWM) API

    main

    The Desktop Window Manager (DWM) API provides access to desktop composition features. DWM is responsible for desktop composition, which enables various visual effects and system features, including:

    • Glass window frames
    • 3-D window transition animations
    • Windows Flip and Windows Flip3D
    • High resolution support
  2. Overview of Windows Kernel APIs

    main

    The win32 package provides access to the Win32 base APIs. These APIs allow for low-level interaction with the Windows operating system, specifically covering:

    • Memory Management: Allocating, freeing, and managing system memory.
    • Input/Output (I/O) Operations: Interacting with files, devices, and other I/O streams.
    • Process and Thread Creation: Managing the lifecycle of system processes and execution threads.
    • Synchronization Functions: Coordinating access to shared resources using primitives like mutexes, semaphores, and events.
  3. Overview of the Advanced Base API Library (advapi32)

    main

    The advapi32 library provides implementations for Windows API functions related to core system management. It is primarily used for interacting with:

    • Windows Registry: Managing registry keys, values, and hives.
    • Services: Controlling, querying, and managing Windows services.
    • User Accounts: Managing user profiles and account security.
    • Applications: Interacting with application-level system APIs.
  4. Overview of the win32 Dart package family

    main

    The win32 monorepo provides a comprehensive suite of Dart packages designed for building Windows-native applications using Dart and Flutter. The ecosystem includes low-level Win32 and COM API bindings via FFI, as well as high-level, type-safe APIs for common Windows features.

    Developers can choose between direct Win32 API calls or specialized packages for specific tasks like Registry management, Clipboard access, or Gamepad input.

  5. Overview of Windows User APIs

    main

    The Windows User APIs allow for the creation and manipulation of standard Windows user interface elements. This includes managing the desktop, windows, and menus. Common operations include:

    • Creating and managing windows
    • Receiving and handling window messages
    • Displaying text within a window
    • Displaying message boxes
  6. Overview of win32 Dart examples

    main

    The win32 package provides a comprehensive set of examples demonstrating idiomatic use of Windows APIs from Dart. These examples cover a wide range of low-level and high-level Windows interactions, including:

    • C-style Win32 APIs: Managing struct layouts, pointer management, and lifetime control.
    • Classic Desktop UI: Building applications using user32, gdi32, and common dialogs (commdlg32).
    • Native Callbacks: Registering and using native callback functions safely within Dart.
    • COM (Component Object Model): Creating and consuming COM objects via IUnknown and IDispatch.
    • Flutter Integration: Integrating low-level Windows APIs into Flutter desktop applications.
  7. Overview of DartNote features

    main

    DartNote is a Win32 Notepad-style application written in Dart. It provides native Win32 look, behavior, and message handling. Key features include:

    • File Management: Create, open, edit, and save plain-text files.
    • Search & Replace: Incremental find with match highlighting and replace support.
    • Customization: Font family, size, and style customization.
    • Shortcuts: Comprehensive keyboard shortcuts for common actions (e.g., Ctrl+S, Ctrl+F).
  8. Overview of the Shell Lightweight Utility Library (shlwapi)

    main

    The Shell Lightweight Utility Library (shlwapi) provides a collection of functions designed to simplify common shell-related operations in Windows. It is primarily used for:

    • File and Folder Manipulation: Operations for managing the file system.
    • User Interface Elements: Functions for interacting with shell-based UI components.
    • Internet-related Tasks: Utilities for handling internet and network-related shell operations.
  9. Overview of ffi_leak_tracker

    main

    What is ffi_leak_tracker?

    package:ffi_leak_tracker is a tool for finding and diagnosing native memory leaks in Dart FFI code. It works by tracking allocations made through its custom allocators.

    Key Capabilities

    • Allocation Tracking: Records size, type, call stack, and timestamp for every allocation.
    • Leak Detection: Allows you to assert that all memory has been freed or inspect live allocations programmatically.
    • Diagnostic Reporting: Enables emitting reports to identify the origin of leaks.
    • Zero Release Overhead: The adaptive allocators (adaptiveCalloc(), adaptiveMalloc()) are designed to compile away to standard calloc() and malloc() in release builds, meaning they can be left in your code unconditionally without impacting production performance.
    • Flexible Scoping: Tracking can be enabled globally or scoped to a specific Zone to isolate tests or benchmarks.
  10. Overview of package:win32

    main

    What is package:win32?

    package:win32 provides a curated surface of Win32 and COM (Component Object Model) APIs for Dart, exposed via Dart FFI. It allows developers to access Windows-specific functionality that is not available through standard Dart libraries (dart:io), Flutter plugins, or platform channels.

    Common Use Cases

    • Flutter apps on Windows: Access system settings, hardware devices, registry data, and native dialogs.
    • Platform-specific implementations: Create cross-platform packages that use a Windows-specific backend.
    • Advanced tooling: Build command-line tools or background services requiring native file, process, or security APIs.
  11. Overview of Windows GDI support

    main

    The win32 package provides access to the Windows Graphics Device Interface (GDI). GDI is used for low-level primitive drawing operations, including:

    • Drawing primitives: Lines, rectangles, ellipses, etc.
    • Text output: Rendering text to video displays or printers.
    • Font management: Handling and manipulating system fonts.

    Traditional Windows applications use these functions to perform direct output to video displays and printers.