-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(win32-api): declare wingdi.enum.ts
- Loading branch information
1 parent
b128127
commit b94a11d
Showing
5 changed files
with
68 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
|
||
export * from './lib/consts/wingdi.enum.js' | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
|
||
/** | ||
* Specifies the clockwise rotation of the display. | ||
* @link https://docs.microsoft.com/en-us/windows/win32/api/wingdi/ne-wingdi-displayconfig_rotation | ||
*/ | ||
export const enum DISPLAYCONFIG_ROTATION { | ||
DISPLAYCONFIG_ROTATION_IDENTITY = 1, | ||
DISPLAYCONFIG_ROTATION_ROTATE90 = 2, | ||
DISPLAYCONFIG_ROTATION_ROTATE180 = 3, | ||
DISPLAYCONFIG_ROTATION_ROTATE270 = 4, | ||
DISPLAYCONFIG_ROTATION_FORCE_UINT32 = 0xFFFFFFFF | ||
} | ||
|
||
/** | ||
* Specifies the scaling transformation applied to content displayed | ||
* on a video present network (VidPN) present path. | ||
* @link https://docs.microsoft.com/en-us/windows/win32/api/wingdi/ne-wingdi-displayconfig_scaling | ||
*/ | ||
export const enum DISPLAYCONFIG_SCALING { | ||
DISPLAYCONFIG_SCALING_IDENTITY = 1, | ||
DISPLAYCONFIG_SCALING_CENTERED = 2, | ||
DISPLAYCONFIG_SCALING_STRETCHED = 3, | ||
DISPLAYCONFIG_SCALING_ASPECTRATIOCENTEREDMAX = 4, | ||
DISPLAYCONFIG_SCALING_CUSTOM = 5, | ||
DISPLAYCONFIG_SCALING_PREFERRED = 128, | ||
DISPLAYCONFIG_SCALING_FORCE_UINT32 = 0xFFFFFFFF | ||
} | ||
|
||
/** | ||
* Specifies the method that the display uses to create an image on a screen. | ||
* @link https://docs.microsoft.com/en-us/windows/win32/api/wingdi/ne-wingdi-displayconfig_scanline_ordering | ||
*/ | ||
export const enum DISPLAYCONFIG_SCANLINE_ORDERING { | ||
DISPLAYCONFIG_SCANLINE_ORDERING_UNSPECIFIED = 0, | ||
DISPLAYCONFIG_SCANLINE_ORDERING_PROGRESSIVE = 1, | ||
DISPLAYCONFIG_SCANLINE_ORDERING_INTERLACED = 2, | ||
DISPLAYCONFIG_SCANLINE_ORDERING_INTERLACED_UPPERFIELDFIRST, | ||
DISPLAYCONFIG_SCANLINE_ORDERING_INTERLACED_LOWERFIELDFIRST = 3, | ||
DISPLAYCONFIG_SCANLINE_ORDERING_FORCE_UINT32 = 0xFFFFFFFF | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import assert from 'node:assert/strict' | ||
|
||
import { fileShortPath } from '@waiting/shared-core' | ||
|
||
import * as consts from '../../src/index.consts.js' | ||
|
||
|
||
describe(fileShortPath(import.meta.url), () => { | ||
|
||
describe('wingdi.h should work', () => { | ||
it('normal', () => { | ||
assert(Object.keys(consts).length > 0) | ||
assert(consts.DISPLAYCONFIG_ROTATION.DISPLAYCONFIG_ROTATION_IDENTITY === 1) | ||
}) | ||
}) | ||
|
||
}) | ||
|