Comparing version 0.0.3 to 0.1.0
"use strict"; | ||
exports.__esModule = true; | ||
exports.MacModule = void 0; | ||
var mac_1 = require("../ffi/mac"); | ||
var MacModule = /** @class */ (function () { | ||
@@ -12,8 +13,9 @@ function MacModule() { | ||
MacModule.prototype.preventFromShowDesktop = function (win) { | ||
throw new Error('It does not support OS other than Windows.'); | ||
return false; | ||
mac_1.SetCollectionBehavior(win, mac_1.GetNSWindowCollectionBehaviorCanJoinAllSpaces() | | ||
mac_1.GetNSWindowCollectionBehaviorStationary()); | ||
return true; | ||
}; | ||
MacModule.prototype.cancelPreventFromShowDesktop = function (win) { | ||
throw new Error('It does not support OS other than Windows.'); | ||
return false; | ||
mac_1.SetCollectionBehavior(win, mac_1.GetNSWindowCollectionBehaviorDefault()); | ||
return true; | ||
}; | ||
@@ -20,0 +22,0 @@ MacModule.prototype.preventChangeZOrder = function (browserWindow) { |
@@ -0,1 +1,2 @@ | ||
import { SetCollectionBehavior, GetNSWindowCollectionBehaviorDefault, GetNSWindowCollectionBehaviorCanJoinAllSpaces, GetNSWindowCollectionBehaviorStationary, } from '../ffi/mac'; | ||
var MacModule = /** @class */ (function () { | ||
@@ -9,8 +10,9 @@ function MacModule() { | ||
MacModule.prototype.preventFromShowDesktop = function (win) { | ||
throw new Error('It does not support OS other than Windows.'); | ||
return false; | ||
SetCollectionBehavior(win, GetNSWindowCollectionBehaviorCanJoinAllSpaces() | | ||
GetNSWindowCollectionBehaviorStationary()); | ||
return true; | ||
}; | ||
MacModule.prototype.cancelPreventFromShowDesktop = function (win) { | ||
throw new Error('It does not support OS other than Windows.'); | ||
return false; | ||
SetCollectionBehavior(win, GetNSWindowCollectionBehaviorDefault()); | ||
return true; | ||
}; | ||
@@ -17,0 +19,0 @@ MacModule.prototype.preventChangeZOrder = function (browserWindow) { |
/// <reference types="node" /> | ||
import { BrowserWindow } from 'electron'; | ||
import { Win } from '../ffi/windows'; | ||
import { Win } from '../helper'; | ||
export interface ElectgetModule { | ||
@@ -5,0 +5,0 @@ preventFromAeroPeek(win: Win): boolean; |
import { BrowserWindow } from 'electron'; | ||
import { ElectgetModule } from '.'; | ||
import { Win } from '../ffi/windows'; | ||
import { Win } from '../helper'; | ||
export declare class MacModule implements ElectgetModule { | ||
@@ -5,0 +5,0 @@ preventFromAeroPeek(win: Win): boolean; |
import { BrowserWindow } from 'electron'; | ||
import { ElectgetModule } from '.'; | ||
import { Win } from '../ffi/windows'; | ||
import { Win } from '../helper'; | ||
export declare class WindowsModule implements ElectgetModule { | ||
@@ -5,0 +5,0 @@ preventFromAeroPeek(win: Win): boolean; |
/// <reference types="node" /> | ||
import ffi from 'ffi-napi'; | ||
import ref from 'ref-napi'; | ||
import { BrowserWindow } from 'electron'; | ||
export declare type Win = BrowserWindow | Buffer | number; | ||
import { Win } from '../helper'; | ||
export declare const isWindows: boolean; | ||
@@ -22,3 +21,3 @@ export declare const user32: { | ||
export declare function getSHELLDLL_DefViewHandle(): number; | ||
export declare function setOwnerWindow(win: Win, target: Win): boolean; | ||
export declare function setOwnerWindow(win: Win, target: Win | number): boolean; | ||
export declare function setParentWindow(win: Win, target: Win): void; | ||
@@ -25,0 +24,0 @@ export declare function ignoreChangeZOrder(wParam: Buffer, lParam: Buffer): void; |
/// <reference types="node" /> | ||
/// <reference types="ref-napi" /> | ||
import { Win } from './ffi/windows'; | ||
export declare function getHWnd(win: Win): number; | ||
import { BrowserWindow } from 'electron'; | ||
export declare type Win = BrowserWindow | Buffer; | ||
export declare function getHWnd(win: Win | number): number; | ||
export declare function readBufferByOS(buf: Buffer): number; |
{ | ||
"name": "electget", | ||
"version": "0.0.3", | ||
"version": "0.1.0", | ||
"description": "Electron tools for creating Windows widgets that are fixed to desktop.", | ||
@@ -39,2 +39,3 @@ "main": "dist/cjs/index.js", | ||
"ffi-napi": "4.0.3", | ||
"nswindow-napi": "0.0.3", | ||
"ref-napi": "3.0.3", | ||
@@ -41,0 +42,0 @@ "ref-struct-di": "1.1.1" |
# Electget | ||
<div align="center"> | ||
<img alt="electget" src="https://raw.githubusercontent.com/lowfront/electget/master/logo.svg" height="170px" /> | ||
</div> | ||
`Electron` tools for creating Windows widgets that are fixed to desktop. | ||
@@ -7,7 +11,7 @@ | ||
- Prevent `BrowserWindow` from being hidden in ShowDesktop. | ||
- Prevent `BrowserWindow` from being minimized. | ||
- Prevent `BrowserWindow` from being hidden in AeroPeek. | ||
- Prevent changes in the `BrowserWindow` order. | ||
- Move `BrowserWindow` to the bottom of the windows. | ||
- [Windows, macOS] Prevent `BrowserWindow` from being hidden in ShowDesktop. | ||
- [Windows] Prevent `BrowserWindow` from being minimized. | ||
- [Windows] Prevent `BrowserWindow` from being hidden in AeroPeek. | ||
- [Windows] Prevent changes in the `BrowserWindow` order. | ||
- [Windows] Move `BrowserWindow` to the bottom of the windows. | ||
@@ -14,0 +18,0 @@ ## Install |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
36285
26
700
133
0
4
+ Addednswindow-napi@0.0.3
+ Addedbindings@1.5.0(transitive)
+ Addedfile-uri-to-path@1.0.0(transitive)
+ Addednswindow-napi@0.0.3(transitive)