winapi
Misc windows API wrappers
Last updated 4 months ago by idjem .
ISC · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install winapi 
SYNC missed versions from official npm registry.

winapi

Misc natives wrappers for nodejs

require('winapi').getIdleTime()

Return the time the system has been idle (since last user interaction - e.g. mouse, keyboard & stuffs, see GetLastInputInfo) This is really usefull if you want to create a screensaver/like in nodejs / node-webkit.

var winapi = require('winapi');

console.log("System is idle since %s", winapi.getIdleTime() );

require('winapi').GetLastInputInfo()

Use this native binding to get system last input time (see MSDN )

var winapi = require('winapi');

console.log("Last input time is %s", winapi.GetLastInputInfo() );

setTimeout(function(){
  //do not move, it wont change !
  console.log("Last input time is %s", winapi.GetLastInputInfo() );
}, 1000);

require('winapi').GetTickCount()

Retrieves the number of milliseconds that have elapsed since the system was started (uptime). (see MSDN )

Credits

Keywords / shout box

screensaver, windows api, winuser.h, GetLastInputInfo, activity monitor, inactivity trigger, idle timer, system uptime, sytem bootime

Current Tags

  • 2.7.6                                ...           latest (4 months ago)

22 Versions

  • 2.7.6                                ...           4 months ago
  • 2.7.5                                ...           7 months ago
  • 2.7.3                                ...           2 years ago
  • 2.7.2                                ...           2 years ago
  • 2.7.1                                ...           2 years ago
  • 2.7.0                                ...           2 years ago
  • 2.6.0                                ...           2 years ago
  • 2.5.4                                ...           2 years ago
  • 2.5.3                                ...           2 years ago
  • 2.5.2                                ...           2 years ago
  • 2.5.1                                ...           3 years ago
  • 2.5.0                                ...           3 years ago
  • 2.4.0                                ...           3 years ago
  • 2.3.0                                ...           4 years ago
  • 2.2.0                                ...           4 years ago
  • 2.1.0                                ...           4 years ago
  • 2.0.0                                ...           4 years ago
  • 1.1.0                                ...           5 years ago
  • 1.0.1                                ...           5 years ago
  • 1.0.0                                ...           5 years ago
  • 0.10.0                                ...           5 years ago
  • 0.9.0                                ...           5 years ago
Maintainers (2)
Downloads
Today 0
This Week 0
This Month 1
Last Day 0
Last Week 0
Last Month 0
Dependencies (1)
Dev Dependencies (3)

Copyright 2014 - 2017 © taobao.org |