Giter Site home page Giter Site logo

SendInput INPUT struct missing? about win HOT 4 CLOSED

lxn avatar lxn commented on July 18, 2024
SendInput INPUT struct missing?

from win.

Comments (4)

toqueteos avatar toqueteos commented on July 18, 2024

Here's what I translated:

// type INPUT struct {
//   DWORD type;
//   _ANONYMOUS_UNION union {
//      MOUSEINPUT mi;
//      KEYBDINPUT ki;
//      HARDWAREINPUT hi;
//   } DUMMYUNIONNAME;
// } INPUT,*PINPUT,*LPINPUT;

type INPUT struct {
    Type      uint32
    AnonUnion interface{}
}

// typedef struct tagMOUSEINPUT {
//   LONG      dx;
//   LONG      dy;
//   DWORD     mouseData;
//   DWORD     dwFlags;
//   DWORD     time;
//   ULONG_PTR dwExtraInfo;
// } MOUSEINPUT, *PMOUSEINPUT;

type MOUSEINPUT struct {
    Dx          int32
    Dy          int32
    MouseData   uint32
    DwFlags     uint32
    Time        uint32
    DwExtraInfo uintptr // int?
}

// typedef struct tagKEYBDINPUT {
//   WORD      wVk;
//   WORD      wScan;
//   DWORD     dwFlags;
//   DWORD     time;
//   ULONG_PTR dwExtraInfo;
// } KEYBDINPUT, *PKEYBDINPUT;

type KEYBDINPUT struct {
    WVk         int16
    WScan       int16
    DwFlags     uint32
    Time        uint32
    DwExtraInfo uintptr // int?
}

// typedef struct tagHARDWAREINPUT {
//   DWORD uMsg;
//   WORD  wParamL;
//   WORD  wParamH;
// } HARDWAREINPUT, *PHARDWAREINPUT;

type HARDWAREINPUT struct {
    UMsg    uint32
    WParamL int16
    WParamH int16
}

from win.

lxn avatar lxn commented on July 18, 2024

It's already there: https://github.com/lxn/win/blob/master/user32.go#L1376

from win.

toqueteos avatar toqueteos commented on July 18, 2024

Oh god, I searched but GitHub said 0 results πŸ‘Ž

Thanks Alex!

from win.

lxn avatar lxn commented on July 18, 2024

No problemo :-)

from win.

Related Issues (20)

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.