clipwindow

package
v0.0.0-...-1b113c7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 6, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ERROR_NO_MORE_FILES = 0x12
	MAX_PATH            = 260
)

Variables

This section is empty.

Functions

func CheckTopWindow

func CheckTopWindow[T int | string](titleOrPid T) bool

CheckTopWindow top(focus) window

func Clear

func Clear()

Clear the clipboard data

func Find

func Find(pid int, title string) <-chan int

Find window

func FindPid

func FindPid(pid int) <-chan int

FindPid window

func FindTitle

func FindTitle(title string) <-chan int

FindTitle window

func Get

func Get() string

Get get the clipboard data

func LostPid

func LostPid(pid int) <-chan struct{}

LostPid window

func LostTitle

func LostTitle(title string) <-chan struct{}

LostTitle window

func Set

func Set(text string)

Set the clipboard data

func SetTopWindow

func SetTopWindow[T int | string](titleOrPid T) bool

SetTopWindow top(focus) window

func SetTopWindowClick

func SetTopWindowClick[T int | string](titleOrPid T) bool

SetTopWindowClick top(focus) window

Types

type ATOM

type ATOM WORD

type DWORD

type DWORD uint32

type HWND

type HWND unsafe.Pointer

type POINT

type POINT struct {
	X, Y int32
}

type PROCESSENTRY32

type PROCESSENTRY32 struct {
	ExeFile           [MAX_PATH]uint16
	PriorityClassBase int32
	Size              uint32
	CntUsage          uint32
	ProcessID         uint32
	ModuleID          uint32
	CntThreads        uint32
	ParentProcessID   uint32
	Flags             uint32
	DefaultHeapID     uintptr
}

PROCESSENTRY32 - process of exec (win handler)

type Process

type Process struct {
	// contains filtered or unexported fields
}

Process of exec

func FindProcess

func FindProcess(pid int) (*Process, error)

FindProcess window. TODO

type Procs

type Procs interface {
	*syscall.Proc | *syscall.LazyProc
	Call(...uintptr) (uintptr, uintptr, error)
}

Procs - processes interface

type RECT

type RECT struct {
	Left, Top, Right, Bottom int32
}

RECT - process of exec (win handler)

type UINT

type UINT uint32

type WINDOWINFO

type WINDOWINFO struct {
	CbSize          DWORD
	RcWindow        RECT
	RcClient        RECT
	DwStyle         DWORD
	DwExStyle       DWORD
	DwWindowStatus  DWORD
	CxWindowBorders UINT
	CyWindowBorders UINT
	AtomWindowType  ATOM
	WCreatorVersion WORD
}

WINDOWINFO - process of exec (win handler)

type WORD

type WORD uint16

type WinWin

type WinWin struct {
	Title     string
	ProcessID uintptr
	Handle    uintptr
}

WinWin - Window in WindowsOS

func FindWindow

func FindWindow[T int | string](titleOrPid T) *WinWin

FindWindow check windows by pid/title

func (*WinWin) CheckTopWindow

func (w *WinWin) CheckTopWindow() bool

CheckTopWindow check top(focus) window

func (*WinWin) FindWindow

func (w *WinWin) FindWindow(titleOrPid string) bool

FindWindow window by the pid or the part title

func (*WinWin) SetTopClickCenterWindow

func (w *WinWin) SetTopClickCenterWindow() bool

SetTopClickCenterWindow top(focus) window with click

func (*WinWin) SetTopWindow

func (w *WinWin) SetTopWindow() bool

SetTopWindow top(focus) window

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL