Versions in this module Expand all Collapse all v1 v1.24.0 Mar 4, 2024 Changes in this version type LayerSurface + func (sfc LayerSurface) Scale() float64 v1.23.12 Dec 2, 2023 Changes in this version + const AnchorBottom + const AnchorFill + const AnchorLeft + const AnchorRight + const AnchorTop + const Button0 + const Button1 + const Button2 + const Button3 + const Button4 + const Button5 + const Button6 + const Button7 + const Button8 + const Button9 + const ButtonA + const ButtonB + const ButtonBack + const ButtonBase + const ButtonBase2 + const ButtonBase3 + const ButtonBase4 + const ButtonBase5 + const ButtonBase6 + const ButtonC + const ButtonDead + const ButtonDigi + const ButtonEast + const ButtonExtra + const ButtonForward + const ButtonGamepad + const ButtonGearDown + const ButtonGearUp + const ButtonJoystick + const ButtonLeft + const ButtonMiddle + const ButtonMisc + const ButtonMode + const ButtonMouse + const ButtonNorth + const ButtonPinkie + const ButtonRight + const ButtonSelect + const ButtonSide + const ButtonSouth + const ButtonStart + const ButtonStylus + const ButtonStylus2 + const ButtonStylus3 + const ButtonTask + const ButtonThumb + const ButtonThumb2 + const ButtonThumbl + const ButtonThumbr + const ButtonTl + const ButtonTl2 + const ButtonToolAirbrush + const ButtonToolBrush + const ButtonToolDoubletap + const ButtonToolFinger + const ButtonToolLens + const ButtonToolMouse + const ButtonToolPen + const ButtonToolPencil + const ButtonToolQuadtap + const ButtonToolQuinttap + const ButtonToolRubber + const ButtonToolTripletap + const ButtonTop + const ButtonTop2 + const ButtonTouch + const ButtonTr + const ButtonTr2 + const ButtonTrigger + const ButtonWest + const ButtonWheel + const ButtonX + const ButtonY + const ButtonZ + const CursorShapeAlias + const CursorShapeAllScroll + const CursorShapeCell + const CursorShapeColResize + const CursorShapeContextMenu + const CursorShapeCopy + const CursorShapeCrosshair + const CursorShapeDefault + const CursorShapeEResize + const CursorShapeEwResize + const CursorShapeGrab + const CursorShapeGrabbing + const CursorShapeHelp + const CursorShapeMove + const CursorShapeNResize + const CursorShapeNeResize + const CursorShapeNeswResize + const CursorShapeNoDrop + const CursorShapeNotAllowed + const CursorShapeNsResize + const CursorShapeNwResize + const CursorShapeNwseResize + const CursorShapePointer + const CursorShapeProgress + const CursorShapeRowResize + const CursorShapeSResize + const CursorShapeSeResize + const CursorShapeSwResize + const CursorShapeText + const CursorShapeVerticalText + const CursorShapeWResize + const CursorShapeWait + const CursorShapeZoomIn + const CursorShapeZoomOut + const ErrorBackendInit + const ErrorCairoInit + const ErrorCairoSurfaceInit + const ErrorDisplayConnect + const ErrorFailed + const ErrorFrameInit + const ErrorLayerSurfaceInit + const ErrorMemory + const ErrorNoBackendSupport + const ErrorNoCompositor + const ErrorNoCursorShapeManager + const ErrorNoLayerShell + const ErrorNoOutputs + const ErrorNoSHM + const ErrorNoScreencopyManager + const ErrorNoXDGOutputManager + const ErrorNone + const ErrorNotImplemented + const ErrorOpenGLBindAPI + const ErrorOpenGLConfig + const ErrorOpenGLContextInit + const ErrorOpenGLDisplayConnect + const ErrorOpenGLInitialize + const ErrorOpenGLLoadProc + const ErrorOpenGLSurfaceInit + const ErrorOpenGLwl_egl_windowInit + const ErrorOutputInit + const ErrorSharedBufferBufferInit + const ErrorSharedBufferFdInit + const ErrorSharedBufferInit + const ErrorSharedBufferMmap + const ErrorSharedBufferPoolInit + const ErrorSharedBufferTruncate + const ErrorSurfaceInit + const Key0 + const Key1 + const Key2 + const Key3 + const Key4 + const Key5 + const Key6 + const Key7 + const Key8 + const Key9 + const KeyA + const KeyAgain + const KeyAllApplications + const KeyAlterase + const KeyApostrophe + const KeyB + const KeyBack + const KeyBackslash + const KeyBackspace + const KeyBassboost + const KeyBattery + const KeyBluetooth + const KeyBookmarks + const KeyBrightnessAuto + const KeyBrightnessCycle + const KeyBrightnessZero + const KeyBrightnessdown + const KeyBrightnessup + const KeyC + const KeyCalc + const KeyCamera + const KeyCancel + const KeyCapslock + const KeyChat + const KeyClose + const KeyClosecd + const KeyCoffee + const KeyComma + const KeyCompose + const KeyComputer + const KeyConfig + const KeyConnect + const KeyCopy + const KeyCut + const KeyCyclewindows + const KeyD + const KeyDashboard + const KeyDelete + const KeyDeletefile + const KeyDirection + const KeyDisplayOff + const KeyDocuments + const KeyDot + const KeyDown + const KeyE + const KeyEdit + const KeyEjectcd + const KeyEjectclosecd + const KeyEmail + const KeyEnd + const KeyEnter + const KeyEqual + const KeyEsc + const KeyExit + const KeyF + const KeyF1 + const KeyF10 + const KeyF11 + const KeyF12 + const KeyF13 + const KeyF14 + const KeyF15 + const KeyF16 + const KeyF17 + const KeyF18 + const KeyF19 + const KeyF2 + const KeyF20 + const KeyF21 + const KeyF22 + const KeyF23 + const KeyF24 + const KeyF3 + const KeyF4 + const KeyF5 + const KeyF6 + const KeyF7 + const KeyF8 + const KeyF9 + const KeyFastforward + const KeyFile + const KeyFinance + const KeyFind + const KeyForward + const KeyForwardmail + const KeyFront + const KeyG + const KeyGrave + const KeyH + const KeyHangeul + const KeyHanguel + const KeyHanja + const KeyHelp + const KeyHenkan + const KeyHiragana + const KeyHome + const KeyHomepage + const KeyHp + const KeyI + const KeyInsert + const KeyIso + const KeyJ + const KeyK + const KeyKatakana + const KeyKatakanahiragana + const KeyKbdillumdown + const KeyKbdillumtoggle + const KeyKbdillumup + const KeyKp0 + const KeyKp1 + const KeyKp2 + const KeyKp3 + const KeyKp4 + const KeyKp5 + const KeyKp6 + const KeyKp7 + const KeyKp8 + const KeyKp9 + const KeyKpasterisk + const KeyKpcomma + const KeyKpdot + const KeyKpenter + const KeyKpequal + const KeyKpjpcomma + const KeyKpleftparen + const KeyKpminus + const KeyKpplus + const KeyKpplusminus + const KeyKprightparen + const KeyKpslash + const KeyL + const KeyLeft + const KeyLeftalt + const KeyLeftbrace + const KeyLeftctrl + const KeyLeftmeta + const KeyLeftshift + const KeyLinefeed + const KeyM + const KeyMacro + const KeyMail + const KeyMedia + const KeyMenu + const KeyMicmute + const KeyMinus + const KeyMove + const KeyMsdos + const KeyMuhenkan + const KeyMute + const KeyN + const KeyNew + const KeyNextsong + const KeyNumlock + const KeyO + const KeyOpen + const KeyP + const KeyPagedown + const KeyPageup + const KeyPaste + const KeyPause + const KeyPausecd + const KeyPhone + const KeyPlay + const KeyPlaycd + const KeyPlaypause + const KeyPower + const KeyPrevioussong + const KeyPrint + const KeyProg1 + const KeyProg2 + const KeyProg3 + const KeyProg4 + const KeyProps + const KeyQ + const KeyQuestion + const KeyR + const KeyRecord + const KeyRedo + const KeyRefresh + const KeyReply + const KeyReserved + const KeyRewind + const KeyRfkill + const KeyRight + const KeyRightalt + const KeyRightbrace + const KeyRightctrl + const KeyRightmeta + const KeyRightshift + const KeyRo + const KeyRotateDisplay + const KeyS + const KeySave + const KeyScale + const KeyScreenlock + const KeyScrolldown + const KeyScrolllock + const KeyScrollup + const KeySearch + const KeySemicolon + const KeySend + const KeySendfile + const KeySetup + const KeyShop + const KeySlash + const KeySleep + const KeySound + const KeySpace + const KeySport + const KeyStop + const KeyStopcd + const KeySuspend + const KeySwitchvideomode + const KeySysrq + const KeyT + const KeyTab + const KeyU + const KeyUndo + const KeyUnknown + const KeyUp + const KeyUwb + const KeyV + const KeyVideoNext + const KeyVideoPrev + const KeyVolumedown + const KeyVolumeup + const KeyW + const KeyWakeup + const KeyWimax + const KeyWlan + const KeyWwan + const KeyWww + const KeyX + const KeyXfer + const KeyY + const KeyYen + const KeyZ + const KeyZenkakuhankaku + const Key_102Nd + const LayerBackground + const LayerBottom + const LayerOverlay + const LayerTop + const RenderStateAlways + const RenderStateNone + const RenderStateOnce + const StatePressed + const StateReleased + func AddGlobalApp(a App) int + func AddGlobalBackend(bak Backend) int + type App interface + OnEvent func(ctx Context, event interface{}) + OnRender func(ctx Context, layerSurface LayerSurface, outputGeo Rect) + OnUpdate func(ctx Context, deltaTime float64) + func GetGlobalApp(idx int) App + type Backend interface + AssociateLayerSurface func(ctx Context, layerSurface LayerSurface) uint64 + Destroy func(ctx Context) + Init func(ctx Context) error + OnLayerSurfaceConfigure func(ctx Context, layerSurface LayerSurface, width, height int) + RenderEnd func(ctx Context, layerSurface LayerSurface) + RenderStart func(ctx Context, layerSurface LayerSurface) + UnassociateLayerSurface func(ctx Context, layerSurface LayerSurface) + func GetGlobalBackend(idx int) Backend + type Context struct + Handle *C.struct_samure_context + func CreateContextWithBackend(cfg *ContextConfig, bak Backend) (Context, error) + func (ctx Context) Compositor() unsafe.Pointer + func (ctx Context) CreateOutputLayerSurfaces() error + func (ctx Context) Destroy() + func (ctx Context) Display() unsafe.Pointer + func (ctx Context) Flush() + func (ctx Context) GetOutputRect() Rect + func (ctx Context) LayerShell() unsafe.Pointer + func (ctx Context) LenOutputs() int + func (ctx Context) LenSeats() int + func (ctx Context) Output(idx int) Output + func (ctx Context) OutputManager() unsafe.Pointer + func (ctx Context) ProcessEvents() + func (ctx Context) RenderLayerSurface(sfc LayerSurface, o Rect) + func (ctx Context) RenderOutput(o Output) + func (ctx Context) Run() + func (ctx Context) ScreencopyManager() unsafe.Pointer + func (ctx Context) Seat(idx int) Seat + func (ctx Context) SetInputRegions(rs []Rect) + func (ctx Context) SetKeyboardInteraction(enable bool) + func (ctx Context) SetPointerInteraction(enable bool) + func (ctx Context) SetPointerShape(shape int) + func (ctx Context) SetRenderState(v int) + func (ctx Context) SetRunning(v bool) + func (ctx Context) Shm() unsafe.Pointer + func (ctx Context) Update(deltaTime float64) + type ContextConfig struct + App App + ForceClientCursors bool + GL OpenGLConfig + KeyboardInteraction bool + MaxUpdateFrequency int + NotCreateOutputLayerSurfaces bool + NotRequestFrame bool + PointerInteraction bool + TouchInteraction bool + func CreateContextConfig(a App) *ContextConfig + type Error struct + func NewError(errorCode uint64) *Error + func (err *Error) Error() string + type EventKeyboardEnter struct + Output Output + Seat Seat + Surface LayerSurface + type EventKeyboardKey struct + Key int + Seat Seat + State int + type EventKeyboardLeave struct + Seat Seat + type EventPointerButton struct + Button int + Seat Seat + State int + type EventPointerEnter struct + Output Output + Seat Seat + Surface LayerSurface + X float64 + Y float64 + type EventPointerLeave struct + Output Output + Seat Seat + Surface LayerSurface + type EventPointerMotion struct + Seat Seat + X float64 + Y float64 + type EventTouchDown struct + Output Output + Seat Seat + Surface LayerSurface + TouchID int + X float64 + Y float64 + type EventTouchMotion struct + Seat Seat + TouchID int + X float64 + Y float64 + type EventTouchUp struct + Seat Seat + TouchID int + type Focus struct + Handle C.struct_samure_focus + func (f Focus) Output() Output + func (f Focus) Surface() LayerSurface + type LayerSurface struct + Handle *C.struct_samure_layer_surface + func CreateLayerSurface(ctx Context, o *Output, layer, anchor int, ...) (LayerSurface, error) + func (sfc LayerSurface) BackendData() unsafe.Pointer + func (sfc LayerSurface) Destroy(ctx Context) + func (sfc LayerSurface) DrawBuffer(b SharedBuffer) + func (sfc LayerSurface) FrameDeltaTime() float64 + func (sfc LayerSurface) H() int + func (sfc LayerSurface) LayerSurface() unsafe.Pointer + func (sfc LayerSurface) Surface() unsafe.Pointer + func (sfc LayerSurface) W() int + type OpenGLConfig struct + AlphaSize int + BlueSize int + ColorSpace int + Debug int + DepthSize int + GreenSize int + MajorVersion int + MinorVersion int + ProfileMask int + RedSize int + RenderBuffer int + Samples int + func DefaultOpenGLConfig() OpenGLConfig + type Output struct + Handle *C.struct_samure_output + func (o Output) AttachLayerSurface(sfc LayerSurface) + func (o Output) CircleInOutput(cx, cy, r int) bool + func (o Output) Geo() Rect + func (o Output) LenSurfaces() int + func (o Output) Name() string + func (o Output) Output() unsafe.Pointer + func (o Output) PointInOutput(x, y int) bool + func (o Output) RectInOutput(x, y, w, h int) bool + func (o Output) RefreshRate() int + func (o Output) Scale() int + func (o Output) Screenshot(ctx Context, captureCursor bool) (SharedBuffer, error) + func (o Output) SetInputRegions(ctx Context, rs []Rect) + func (o Output) SetKeyboardInteraction(enable bool) + func (o Output) SetPointerInteraction(ctx Context, enable bool) + func (o Output) SquareInOutput(x, y, size int) bool + func (o Output) Surface(idx int) LayerSurface + func (o Output) TriangleInOutput(x1, y1, x2, y2, x3, y3 int) bool + func (o Output) XdgOutput() unsafe.Pointer + type RawBackend struct + func (raw *RawBackend) AssociateLayerSurface(ctx Context, layerSurface LayerSurface) uint64 + func (raw *RawBackend) Destroy(ctx Context) + func (raw *RawBackend) Init(ctx Context) error + func (raw *RawBackend) OnLayerSurfaceConfigure(ctx Context, layerSurface LayerSurface, width, height int) + func (raw *RawBackend) RenderEnd(ctx Context, layerSurface LayerSurface) + func (raw *RawBackend) RenderStart(ctx Context, layerSurface LayerSurface) + func (raw *RawBackend) UnassociateLayerSurface(ctx Context, layerSurface LayerSurface) + type RawSurface struct + Handle *C.struct_samure_raw_surface + func GetRaw(sfc LayerSurface) RawSurface + func (r RawSurface) Buffer() SharedBuffer + func (r RawSurface) Data() unsafe.Pointer + type Rect struct + H int + W int + X int + Y int + func (o Rect) CircleInOutput(cx, cy, r int) bool + func (o Rect) PointInOutput(x, y int) bool + func (o Rect) RectInOutput(x, y, w, h int) bool + func (o Rect) RelX(x float64) float64 + func (o Rect) RelY(y float64) float64 + func (o Rect) SquareInOutput(x, y, size int) bool + func (o Rect) TriangleInOutput(x1, y1, x2, y2, x3, y3 int) bool + type Seat struct + Handle *C.struct_samure_seat + func (s Seat) Keyboard() unsafe.Pointer + func (s Seat) KeyboardFocus() Focus + func (s Seat) Name() string + func (s Seat) Pointer() unsafe.Pointer + func (s Seat) PointerFocus() Focus + func (s Seat) Seat() unsafe.Pointer + func (s Seat) Touch() unsafe.Pointer + func (s Seat) TouchFocus() Focus + type SharedBuffer struct + Handle *C.struct_samure_shared_buffer + func (b SharedBuffer) Buffer() unsafe.Pointer + func (b SharedBuffer) Copy(src SharedBuffer) error + func (b SharedBuffer) Data() unsafe.Pointer + func (b SharedBuffer) Destroy() + func (b SharedBuffer) Fd() int + func (b SharedBuffer) Format() int + func (b SharedBuffer) Height() int + func (b SharedBuffer) Width() int