dsplay 2.0.0
Gets display resolution in windows
To use this package, run the following command in your project's root directory:
Manual usage
Put the following dependency into your project's dependences section:
dsplay
DUB package used to get a device's display resolution for the D programming language.
This is a wrapper for a couple winuser functions, meaning you'll have to import it. More on this down below.
Because of this, the package only works for windows; linux and mac are not compatible.
Installation
In your project directory enter the following commands:
dub add dsplay
Installs dsplay.
Usage
This package has 2 functions:
getScreenWidth()
getScreenHeight()
Prime example:
Prints the display resolution.
import std.stdio;
import dsplay;
import core.sys.windows.winuser;
void main()
{
int x = getScreenWidth();
int y = getScreenHeight();
writeln(x,"x", y);
}
Output on a 1920x1080 display:
1920x1080
License
This package is licensed under:
Boost Software License 1.0
which you can view here.
- Registered by Dogey11
- 2.0.0 released 2 years ago
- Dogey11/dsplay
- Boost
- Copyright © 2022, dogey11
- Authors:
- Dependencies:
- none
- Versions:
-
2.0.4 2022-May-03 2.0.3 2022-Apr-03 2.0.2 2022-Mar-30 2.0.1 2022-Mar-30 2.0.0 2022-Mar-30 - Download Stats:
-
-
0 downloads today
-
0 downloads this week
-
0 downloads this month
-
20 downloads total
-
- Score:
- 0.3
- Short URL:
- dsplay.dub.pm