{"_id":"@bun-win32/uxtheme","_rev":"3-02acd6624d1646234f49baec6842ff48","name":"@bun-win32/uxtheme","dist-tags":{"latest":"2.0.1"},"versions":{"1.0.0":{"name":"@bun-win32/uxtheme","version":"1.0.0","keywords":["bun","ffi","win32","windows","uxtheme","theming","visual-styles","bindings","typescript","dll"],"author":"Stev Peifer <stev@bell.net>","license":"MIT","_id":"@bun-win32/uxtheme@1.0.0","maintainers":[{"name":"obscuritysrl","email":"stev@bell.net"}],"homepage":"https://github.com/ObscuritySRL/bun-win32#readme","bugs":{"url":"https://github.com/ObscuritySRL/bun-win32/issues"},"dist":{"shasum":"322881f7f6d6595a7ae97e1a4e1cffddaa21e49c","tarball":"https://registry.npmjs.org/@bun-win32/uxtheme/-/uxtheme-1.0.0.tgz","fileCount":6,"integrity":"sha512-ZDQ3PwiS7/0jTvQpa222cy6ANfFiNeGomIb8G4+K+PQ73RcCDUAy4fYkcIcd7gu3tZe9vqu3gham/MqLGwfUsQ==","signatures":[{"sig":"MEYCIQCUC3aCKrCXXc0SLQk1tgjDEfNhSf6iw9IXXHnzDBKrfgIhAPf/PTFByVdzudxJZ661Nx6Kv6KbRyw8X9hcERMhgKnR","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":45086},"main":"./index.ts","type":"module","module":"index.ts","shasum":"322881f7f6d6595a7ae97e1a4e1cffddaa21e49c","engines":{"bun":">=1.1.0"},"exports":{".":"./index.ts"},"private":false,"scripts":{"example:theme-audit":"bun ./example/theme-audit.ts","example:button-cinema":"bun ./example/button-cinema.ts"},"_npmUser":{"name":"obscuritysrl","email":"stev@bell.net"},"_integrity":"sha512-ZDQ3PwiS7/0jTvQpa222cy6ANfFiNeGomIb8G4+K+PQ73RcCDUAy4fYkcIcd7gu3tZe9vqu3gham/MqLGwfUsQ==","repository":{"url":"git://github.com/ObscuritySRL/bun-win32.git","type":"git","directory":"packages/uxtheme"},"_npmVersion":"10.8.3","description":"Zero-dependency, zero-overhead Win32 UXTHEME bindings for Bun (FFI) on Windows.","directories":{},"sideEffects":false,"_nodeVersion":"24.3.0","dependencies":{"@bun-win32/core":"1.1.2"},"_hasShrinkwrap":false,"devDependencies":{"@types/bun":"latest"},"peerDependencies":{"typescript":"^5"},"_npmOperationalInternal":{"tmp":"tmp/uxtheme_1.0.0_1775710111393_0.7753455341073461","host":"s3://npm-registry-packages-npm-production"}},"2.0.0":{"name":"@bun-win32/uxtheme","version":"2.0.0","keywords":["bun","ffi","win32","windows","uxtheme","theming","visual-styles","bindings","typescript","dll"],"author":"Stev Peifer <stev.p@outlook.com>","license":"MIT","_id":"@bun-win32/uxtheme@2.0.0","maintainers":[{"name":"obscuritysrl","email":"stev.p@outlook.com"}],"homepage":"https://github.com/ObscuritySRL/bun-win32#readme","bugs":{"url":"https://github.com/ObscuritySRL/bun-win32/issues"},"dist":{"shasum":"53986cab78e71254cad96301ee930d8d3584ad66","tarball":"https://registry.npmjs.org/@bun-win32/uxtheme/-/uxtheme-2.0.0.tgz","fileCount":6,"integrity":"sha512-iwbQSHnqEH2Y5IyCl3lFyG5omGp7kUHjUpr7vV1NyyucVdx+rrrd/bXXHwMVlKog6jEcIxruOCTjyHNCN/MP0g==","signatures":[{"sig":"MEYCIQCrfsABF9zxtRlA9JCAw8sMB1uM0R4U/3fS7HFLVm1O3QIhAJf9Fl2JRBuxA+aFqz48apeLwKB+lJ0it83LqdIKrP5G","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":46898},"main":"./index.ts","type":"module","module":"index.ts","shasum":"53986cab78e71254cad96301ee930d8d3584ad66","engines":{"bun":">=1.1.0"},"exports":{".":"./index.ts"},"private":false,"scripts":{"example:theme-audit":"bun ./example/theme-audit.ts","example:button-cinema":"bun ./example/button-cinema.ts"},"_npmUser":{"name":"obscuritysrl","email":"stev.p@outlook.com"},"_integrity":"sha512-iwbQSHnqEH2Y5IyCl3lFyG5omGp7kUHjUpr7vV1NyyucVdx+rrrd/bXXHwMVlKog6jEcIxruOCTjyHNCN/MP0g==","repository":{"url":"git://github.com/ObscuritySRL/bun-win32.git","type":"git","directory":"packages/uxtheme"},"_npmVersion":"10.8.3","description":"Zero-dependency, zero-overhead Win32 UXTHEME bindings for Bun (FFI) on Windows.","directories":{},"sideEffects":false,"_nodeVersion":"26.3.0","dependencies":{"@bun-win32/core":"2.0.0"},"_hasShrinkwrap":false,"devDependencies":{"@types/bun":"latest"},"peerDependencies":{"typescript":"^5"},"_npmOperationalInternal":{"tmp":"tmp/uxtheme_2.0.0_1782435976222_0.6270832216470448","host":"s3://npm-registry-packages-npm-production"}},"2.0.1":{"author":"Stev Peifer <stev.p@outlook.com>","bugs":{"url":"https://github.com/ObscuritySRL/bun-win32/issues"},"dependencies":{"@bun-win32/core":"2.0.1"},"description":"Zero-dependency, zero-overhead Win32 UXTHEME bindings for Bun (FFI) on Windows.","devDependencies":{"@types/bun":"latest"},"exports":{".":"./index.ts"},"license":"MIT","module":"index.ts","name":"@bun-win32/uxtheme","peerDependencies":{"typescript":"^5"},"private":false,"homepage":"https://github.com/ObscuritySRL/bun-win32#readme","repository":{"type":"git","url":"git://github.com/ObscuritySRL/bun-win32.git","directory":"packages/uxtheme"},"type":"module","version":"2.0.1","main":"./index.ts","keywords":["bun","ffi","win32","windows","uxtheme","theming","visual-styles","bindings","typescript","dll"],"sideEffects":false,"engines":{"bun":">=1.1.0"},"scripts":{"example:button-cinema":"bun ./example/button-cinema.ts","example:theme-audit":"bun ./example/theme-audit.ts"},"_id":"@bun-win32/uxtheme@2.0.1","_integrity":"sha512-Nl7L4r1MJ+TwUcbLwim3lmjHUVu7SkhEnPuDz0ZXSQbYhRlNR8ipftoFNFvX3gBNx2Orcddf5dVEzWNpZIRXBg==","_nodeVersion":"26.3.0","_npmVersion":"10.8.3","shasum":"4d6af60a8787fdd17a69e1a65fe7d83396773c0d","dist":{"integrity":"sha512-Nl7L4r1MJ+TwUcbLwim3lmjHUVu7SkhEnPuDz0ZXSQbYhRlNR8ipftoFNFvX3gBNx2Orcddf5dVEzWNpZIRXBg==","shasum":"4d6af60a8787fdd17a69e1a65fe7d83396773c0d","tarball":"https://registry.npmjs.org/@bun-win32/uxtheme/-/uxtheme-2.0.1.tgz","fileCount":6,"unpackedSize":46898,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIBiJibeZTsi+4pXCOPNsNfBtrDl599n3BOo9FJ5crZhmAiAVpfpMR+iQ4YVgcSglPenLfJgScX3DuM3Cg8eQHV7lfQ=="}]},"_npmUser":{"name":"obscuritysrl","email":"stev.p@outlook.com"},"directories":{},"maintainers":[{"name":"obscuritysrl","email":"stev.p@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/uxtheme_2.0.1_1782438202531_0.7223528619898067"},"_hasShrinkwrap":false}},"time":{"created":"2026-04-09T04:48:31.299Z","modified":"2026-06-26T01:43:22.774Z","1.0.0":"2026-04-09T04:48:31.549Z","2.0.0":"2026-06-26T01:06:16.403Z","2.0.1":"2026-06-26T01:43:22.656Z"},"bugs":{"url":"https://github.com/ObscuritySRL/bun-win32/issues"},"author":"Stev Peifer <stev.p@outlook.com>","license":"MIT","homepage":"https://github.com/ObscuritySRL/bun-win32#readme","keywords":["bun","ffi","win32","windows","uxtheme","theming","visual-styles","bindings","typescript","dll"],"repository":{"type":"git","url":"git://github.com/ObscuritySRL/bun-win32.git","directory":"packages/uxtheme"},"description":"Zero-dependency, zero-overhead Win32 UXTHEME bindings for Bun (FFI) on Windows.","maintainers":[{"name":"obscuritysrl","email":"stev.p@outlook.com"}],"readme":"# @bun-win32/uxtheme\n\nZero-dependency, zero-overhead Win32 UxTheme bindings for [Bun](https://bun.sh) on Windows.\n\r\n## Overview\r\n\r\n`@bun-win32/uxtheme` exposes the `uxtheme.dll` exports using [Bun](https://bun.sh)'s FFI. It provides a single class, `Uxtheme`, which lazily binds native symbols on first use. You can optionally preload a subset or all symbols up-front via `Preload()`.\n\r\nThe bindings are strongly typed for a smooth DX in TypeScript.\r\n\r\n## Features\r\n\r\n- [Bun](https://bun.sh)-first ergonomics on Windows 10/11.\r\n- Direct FFI to `uxtheme.dll` (77 bindings covering visual styles, buffered painting, theme metrics, and themed drawing).\n- In-source docs in `structs/Uxtheme.ts` with links to Microsoft Learn.\n- Lazy binding on first call; optional eager preload (`Uxtheme.Preload()`).\n- No wrapper overhead; calls map 1:1 to native APIs.\n- Strongly-typed Win32 aliases, enums, and constants (see `types/Uxtheme.ts`).\n\r\n## Requirements\r\n\r\n- [Bun](https://bun.sh) runtime\r\n- Windows 10 or later\r\n\r\n## Installation\r\n\r\n```sh\r\nbun add @bun-win32/uxtheme\n```\r\n\r\n## Quick Start\n\n```ts\nimport Uxtheme, { MAX_THEMECOLOR, MAX_THEMESIZE } from '@bun-win32/uxtheme';\n\nconst themePath = Buffer.alloc(520 * 2);\nconst colorName = Buffer.alloc(MAX_THEMECOLOR * 2);\nconst sizeName = Buffer.alloc(MAX_THEMESIZE * 2);\n\nconst status = Uxtheme.GetCurrentThemeName(\n  themePath.ptr,\n  themePath.byteLength / 2,\n  colorName.ptr,\n  MAX_THEMECOLOR,\n  sizeName.ptr,\n  MAX_THEMESIZE,\n);\n\nif (status !== 0) {\n  throw new Error(`GetCurrentThemeName failed: 0x${(status >>> 0).toString(16)}`);\n}\n\nconsole.log('Theme file:', themePath.toString('utf16le').replace(/\\0.*$/, ''));\nconsole.log('Color scheme:', colorName.toString('utf16le').replace(/\\0.*$/, ''));\nconsole.log('Size scheme:', sizeName.toString('utf16le').replace(/\\0.*$/, ''));\n```\n\n> [!NOTE]\n> AI agents: see `AI.md` for the package binding contract and source-navigation guidance. It explains how to use the package without scanning the entire implementation.\n\n## Examples\n\r\nRun the included examples:\n\n```sh\nbun run example:button-cinema\nbun run example:theme-audit\n```\n\r\n## Notes\r\n\r\n- Either rely on lazy binding or call `Uxtheme.Preload()`.\n- Windows only. Bun runtime required.\n- **SAL types & naming:** nullability is in the **type** — `Optional<T>` (formally optional, SAL `_*opt_`) and `Nullable<T>` (plain `[in]`/`[out]` the docs say can be NULL), the null sentinel derived from `T` (`null` for pointers `LP*`/`P*`, `0n` for handles/by-value addresses); direction is in the **parameter name** — `_out` (`_Out_`), `_in_out` (`_Inout_`), `_In_` bare. See `AI.md` and the repo `AGENTS.md`.\n","readmeFilename":"README.md"}