summaryrefslogtreecommitdiff
path: root/raveos-hyprland-theme/theme-data/DankMaterialShell/core/internal/screenshot/shm.go
blob: a178cf099fed1eabb5b94e7c912f32f79b3bb4aa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
package screenshot

import "github.com/AvengeMedia/DankMaterialShell/core/internal/wayland/shm"

type PixelFormat = shm.PixelFormat

const (
	FormatARGB8888 = shm.FormatARGB8888
	FormatXRGB8888 = shm.FormatXRGB8888
	FormatABGR8888 = shm.FormatABGR8888
	FormatXBGR8888 = shm.FormatXBGR8888
	FormatRGB888   = shm.FormatRGB888
	FormatBGR888   = shm.FormatBGR888
)

const (
	TransformNormal     = shm.TransformNormal
	Transform90         = shm.Transform90
	Transform180        = shm.Transform180
	Transform270        = shm.Transform270
	TransformFlipped    = shm.TransformFlipped
	TransformFlipped90  = shm.TransformFlipped90
	TransformFlipped180 = shm.TransformFlipped180
	TransformFlipped270 = shm.TransformFlipped270
)

type ShmBuffer = shm.Buffer

func CreateShmBuffer(width, height, stride int) (*ShmBuffer, error) {
	return shm.CreateBuffer(width, height, stride)
}

func InverseTransform(transform int32) int32 {
	return shm.InverseTransform(transform)
}