Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface ClipboardManager

Clipboard manager. Used to get, set, and listen to clipboard content.

Using const { clipboardManager } = require('clip_manager') to import it.

Hierarchy

  • EventEmitter
    • ClipboardManager

Index

Methods

addListener

  • addListener(event: string | symbol, listener: (...args: any[]) => void): ClipboardManager
  • Parameters

    • event: string | symbol
    • listener: (...args: any[]) => void
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns ClipboardManager

clearClip

  • clearClip(): void
  • Clear clipboard content.

    Returns void

emit

  • emit(event: string | symbol, ...args: any[]): boolean
  • Parameters

    • event: string | symbol
    • Rest ...args: any[]

    Returns boolean

eventNames

  • eventNames(): (string | symbol)[]
  • Returns (string | symbol)[]

getClip

  • getClip(): null | string
  • Get clipboard content.

    Returns null | string

    Text content

getMaxListeners

  • getMaxListeners(): number
  • Returns number

hasClip

  • hasClip(): boolean
  • Determine if clipboard has content.

    Returns boolean

    If there is content, return true, otherwise return false.

listenerCount

  • listenerCount(event: string | symbol): number
  • Parameters

    • event: string | symbol

    Returns number

listeners

  • listeners(event: string | symbol): Function[]
  • Parameters

    • event: string | symbol

    Returns Function[]

off

  • off(event: string | symbol, listener: (...args: any[]) => void): ClipboardManager
  • Parameters

    • event: string | symbol
    • listener: (...args: any[]) => void
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns ClipboardManager

on

  • Clipboard change event. Triggered when the current clipboard content changes.

    Parameters

    • event: "clip_changed"
    • listener: () => void
        • (): void
        • Returns void

    Returns ClipboardManager

once

  • once(event: string | symbol, listener: (...args: any[]) => void): ClipboardManager
  • Parameters

    • event: string | symbol
    • listener: (...args: any[]) => void
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns ClipboardManager

prependListener

  • prependListener(event: string | symbol, listener: (...args: any[]) => void): ClipboardManager
  • Parameters

    • event: string | symbol
    • listener: (...args: any[]) => void
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns ClipboardManager

prependOnceListener

  • prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): ClipboardManager
  • Parameters

    • event: string | symbol
    • listener: (...args: any[]) => void
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns ClipboardManager

rawListeners

  • rawListeners(event: string | symbol): Function[]
  • Parameters

    • event: string | symbol

    Returns Function[]

removeAllListeners

  • Parameters

    • Optional event: string | symbol

    Returns ClipboardManager

removeListener

  • removeListener(event: string | symbol, listener: (...args: any[]) => void): ClipboardManager
  • Parameters

    • event: string | symbol
    • listener: (...args: any[]) => void
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns ClipboardManager

setClip

  • setClip(text: string): void
  • Set clipboard content.

    Parameters

    • text: string

      Text content

    Returns void

setMaxListeners

  • Parameters

    • n: number

    Returns ClipboardManager