GithubHelp home page GithubHelp logo

syrou / desktopduplikation Goto Github PK

View Code? Open in Web Editor NEW
4.0 1.0 0.0 91 KB

A Windows Desktop Duplication library for Kotlin Native Mingw64

License: Apache License 2.0

Kotlin 100.00%
desktop-duplication desktop-duplication-api directx-11 directx11 kotlin-native mingw-w64 mingw64

desktopduplikation's Introduction

Desktop Duplikation

A library to make usage of Windows Desktop Duplication API easy on Kotlin Native for target mingw64.

Kotlin

Dependencies

In order to build this project you need to install directx 11 headers to your msys2 installation. Either create a system environment variable called MINGW64_DIR and point to your msys2 installation, or install it under C:/msys64/mingw64

$ pacman -S mingw-w64-x86_64-headers-git

If you wish to use this code as a pre-compiled library, put this into your gradle mingw64 dependencies:

implementation("io.github.syrou:desktopduplikation:0.0.3")

Usage

In order to automatically clear arena allocation, use the .use {} lambda

val desktopDuplikationManager = DesktopDuplikationManager()
desktopDuplikationManager.use {
    if(!desktopDuplikationManager.initialize()) return
    desktopDuplikationManager.captureNext { sr, desc ->
        desktopDuplikationManager.dumpBitmap(
            "c:\\test.bmp",
            sr.pData as CArrayPointer<ByteVar>,
            sr.RowPitch.toInt(),
            desc.Width.toInt(),
            desc.Height.toInt()
        )
    }
}

desktopduplikation's People

Contributors

syrou avatar

Stargazers

 avatar  avatar  avatar  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.