Code Monkey home page Code Monkey logo

dsplay's Introduction

I have archived this as it had no use and was created solely for learning purposes.

dsplay DUB

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 core.sys.windows.winuser;
import dsplay;

pragma(lib, "User32.lib");

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.

dsplay's People

Contributors

1404er avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.