Documentation ¶
Index ¶
- Constants
- func AddGlobalApp(a App) int
- func AddGlobalBackend(bak Backend) int
- type App
- type Backend
- type Context
- 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) 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
- type Error
- type EventKeyboardEnter
- type EventKeyboardKey
- type EventKeyboardLeave
- type EventPointerButton
- type EventPointerEnter
- type EventPointerLeave
- type EventPointerMotion
- type EventTouchDown
- type EventTouchMotion
- type EventTouchUp
- type Focus
- type LayerSurface
- 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
- type 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) 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
- 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
- type Rect
- 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
- type SharedBuffer
- 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
Constants ¶
View Source
const ( RenderStateAlways = C.SAMURE_RENDER_STATE_ALWAYS RenderStateNone = C.SAMURE_RENDER_STATE_NONE RenderStateOnce = C.SAMURE_RENDER_STATE_ONCE )
View Source
const ( ErrorNone = C.SAMURE_ERROR_NONE ErrorFailed = C.SAMURE_ERROR_FAILED ErrorNotImplemented = C.SAMURE_ERROR_NOT_IMPLEMENTED ErrorDisplayConnect = C.SAMURE_ERROR_DISPLAY_CONNECT ErrorNoOutputs = C.SAMURE_ERROR_NO_OUTPUTS ErrorNoXDGOutputManager = C.SAMURE_ERROR_NO_XDG_OUTPUT_MANAGER ErrorNoLayerShell = C.SAMURE_ERROR_NO_LAYER_SHELL ErrorNoSHM = C.SAMURE_ERROR_NO_SHM ErrorNoCompositor = C.SAMURE_ERROR_NO_COMPOSITOR ErrorNoCursorShapeManager = C.SAMURE_ERROR_NO_CURSOR_SHAPE_MANAGER ErrorNoScreencopyManager = C.SAMURE_ERROR_NO_SCREENCOPY_MANAGER ErrorBackendInit = C.SAMURE_ERROR_BACKEND_INIT ErrorNoBackendSupport = C.SAMURE_ERROR_NO_BACKEND_SUPPORT ErrorLayerSurfaceInit = C.SAMURE_ERROR_LAYER_SURFACE_INIT ErrorMemory = C.SAMURE_ERROR_MEMORY ErrorOpenGLLoadProc = C.SAMURE_ERROR_OPENGL_LOAD_PROC ErrorOpenGLDisplayConnect = C.SAMURE_ERROR_OPENGL_DISPLAY_CONNECT ErrorOpenGLInitialize = C.SAMURE_ERROR_OPENGL_INITIALIZE ErrorOpenGLConfig = C.SAMURE_ERROR_OPENGL_CONFIG ErrorOpenGLBindAPI = C.SAMURE_ERROR_OPENGL_BIND_API ErrorOpenGLContextInit = C.SAMURE_ERROR_OPENGL_CONTEXT_INIT ErrorOpenGLwl_egl_windowInit = C.SAMURE_ERROR_OPENGL_WL_EGL_WINDOW_INIT ErrorOpenGLSurfaceInit = C.SAMURE_ERROR_OPENGL_SURFACE_INIT ErrorFrameInit = C.SAMURE_ERROR_FRAME_INIT ErrorCairoSurfaceInit = C.SAMURE_ERROR_CAIRO_SURFACE_INIT ErrorCairoInit = C.SAMURE_ERROR_CAIRO_INIT ErrorSurfaceInit = C.SAMURE_ERROR_SURFACE_INIT ErrorOutputInit = C.SAMURE_ERROR_OUTPUT_INIT )
View Source
const ( KeyReserved = C.KEY_RESERVED KeyEsc = C.KEY_ESC Key1 = C.KEY_1 Key2 = C.KEY_2 Key3 = C.KEY_3 Key4 = C.KEY_4 Key5 = C.KEY_5 Key6 = C.KEY_6 Key7 = C.KEY_7 Key8 = C.KEY_8 Key9 = C.KEY_9 Key0 = C.KEY_0 KeyMinus = C.KEY_MINUS KeyEqual = C.KEY_EQUAL KeyBackspace = C.KEY_BACKSPACE KeyTab = C.KEY_TAB KeyQ = C.KEY_Q KeyW = C.KEY_W KeyE = C.KEY_E KeyR = C.KEY_R KeyT = C.KEY_T KeyY = C.KEY_Y KeyU = C.KEY_U KeyI = C.KEY_I KeyO = C.KEY_O KeyP = C.KEY_P KeyLeftbrace = C.KEY_LEFTBRACE KeyRightbrace = C.KEY_RIGHTBRACE KeyEnter = C.KEY_ENTER KeyLeftctrl = C.KEY_LEFTCTRL KeyA = C.KEY_A KeyS = C.KEY_S KeyD = C.KEY_D KeyF = C.KEY_F KeyG = C.KEY_G KeyH = C.KEY_H KeyJ = C.KEY_J KeyK = C.KEY_K KeyL = C.KEY_L KeySemicolon = C.KEY_SEMICOLON KeyApostrophe = C.KEY_APOSTROPHE KeyGrave = C.KEY_GRAVE KeyLeftshift = C.KEY_LEFTSHIFT KeyBackslash = C.KEY_BACKSLASH KeyZ = C.KEY_Z KeyX = C.KEY_X KeyC = C.KEY_C KeyV = C.KEY_V KeyB = C.KEY_B KeyN = C.KEY_N KeyM = C.KEY_M KeyComma = C.KEY_COMMA KeyDot = C.KEY_DOT KeySlash = C.KEY_SLASH KeyRightshift = C.KEY_RIGHTSHIFT KeyKpasterisk = C.KEY_KPASTERISK KeyLeftalt = C.KEY_LEFTALT KeySpace = C.KEY_SPACE KeyCapslock = C.KEY_CAPSLOCK KeyF1 = C.KEY_F1 KeyF2 = C.KEY_F2 KeyF3 = C.KEY_F3 KeyF4 = C.KEY_F4 KeyF5 = C.KEY_F5 KeyF6 = C.KEY_F6 KeyF7 = C.KEY_F7 KeyF8 = C.KEY_F8 KeyF9 = C.KEY_F9 KeyF10 = C.KEY_F10 KeyNumlock = C.KEY_NUMLOCK KeyScrolllock = C.KEY_SCROLLLOCK KeyKp7 = C.KEY_KP7 KeyKp8 = C.KEY_KP8 KeyKp9 = C.KEY_KP9 KeyKpminus = C.KEY_KPMINUS KeyKp4 = C.KEY_KP4 KeyKp5 = C.KEY_KP5 KeyKp6 = C.KEY_KP6 KeyKpplus = C.KEY_KPPLUS KeyKp1 = C.KEY_KP1 KeyKp2 = C.KEY_KP2 KeyKp3 = C.KEY_KP3 KeyKp0 = C.KEY_KP0 KeyKpdot = C.KEY_KPDOT KeyZenkakuhankaku = C.KEY_ZENKAKUHANKAKU Key_102Nd = C.KEY_102ND KeyF11 = C.KEY_F11 KeyF12 = C.KEY_F12 KeyRo = C.KEY_RO KeyKatakana = C.KEY_KATAKANA KeyHiragana = C.KEY_HIRAGANA KeyHenkan = C.KEY_HENKAN KeyKatakanahiragana = C.KEY_KATAKANAHIRAGANA KeyMuhenkan = C.KEY_MUHENKAN KeyKpjpcomma = C.KEY_KPJPCOMMA KeyKpenter = C.KEY_KPENTER KeyRightctrl = C.KEY_RIGHTCTRL KeyKpslash = C.KEY_KPSLASH KeySysrq = C.KEY_SYSRQ KeyRightalt = C.KEY_RIGHTALT KeyLinefeed = C.KEY_LINEFEED KeyHome = C.KEY_HOME KeyUp = C.KEY_UP KeyPageup = C.KEY_PAGEUP KeyLeft = C.KEY_LEFT KeyRight = C.KEY_RIGHT KeyEnd = C.KEY_END KeyDown = C.KEY_DOWN KeyPagedown = C.KEY_PAGEDOWN KeyInsert = C.KEY_INSERT KeyDelete = C.KEY_DELETE KeyMacro = C.KEY_MACRO KeyMute = C.KEY_MUTE KeyVolumedown = C.KEY_VOLUMEDOWN KeyVolumeup = C.KEY_VOLUMEUP KeyPower = C.KEY_POWER KeyKpequal = C.KEY_KPEQUAL KeyKpplusminus = C.KEY_KPPLUSMINUS KeyPause = C.KEY_PAUSE KeyScale = C.KEY_SCALE KeyKpcomma = C.KEY_KPCOMMA KeyHangeul = C.KEY_HANGEUL KeyHanguel = C.KEY_HANGUEL KeyHanja = C.KEY_HANJA KeyYen = C.KEY_YEN KeyLeftmeta = C.KEY_LEFTMETA KeyRightmeta = C.KEY_RIGHTMETA KeyCompose = C.KEY_COMPOSE KeyStop = C.KEY_STOP KeyAgain = C.KEY_AGAIN KeyProps = C.KEY_PROPS KeyUndo = C.KEY_UNDO KeyFront = C.KEY_FRONT KeyCopy = C.KEY_COPY KeyOpen = C.KEY_OPEN KeyPaste = C.KEY_PASTE KeyFind = C.KEY_FIND KeyCut = C.KEY_CUT KeyHelp = C.KEY_HELP KeyMenu = C.KEY_MENU KeyCalc = C.KEY_CALC KeySetup = C.KEY_SETUP KeySleep = C.KEY_SLEEP KeyWakeup = C.KEY_WAKEUP KeyFile = C.KEY_FILE KeySendfile = C.KEY_SENDFILE KeyDeletefile = C.KEY_DELETEFILE KeyXfer = C.KEY_XFER KeyProg1 = C.KEY_PROG1 KeyProg2 = C.KEY_PROG2 KeyWww = C.KEY_WWW KeyMsdos = C.KEY_MSDOS KeyCoffee = C.KEY_COFFEE KeyScreenlock = C.KEY_SCREENLOCK KeyRotateDisplay = C.KEY_ROTATE_DISPLAY KeyDirection = C.KEY_DIRECTION KeyCyclewindows = C.KEY_CYCLEWINDOWS KeyMail = C.KEY_MAIL KeyBookmarks = C.KEY_BOOKMARKS KeyComputer = C.KEY_COMPUTER KeyBack = C.KEY_BACK KeyForward = C.KEY_FORWARD KeyClosecd = C.KEY_CLOSECD KeyEjectcd = C.KEY_EJECTCD KeyEjectclosecd = C.KEY_EJECTCLOSECD KeyNextsong = C.KEY_NEXTSONG KeyPlaypause = C.KEY_PLAYPAUSE KeyPrevioussong = C.KEY_PREVIOUSSONG KeyStopcd = C.KEY_STOPCD KeyRecord = C.KEY_RECORD KeyRewind = C.KEY_REWIND KeyPhone = C.KEY_PHONE KeyIso = C.KEY_ISO KeyConfig = C.KEY_CONFIG KeyHomepage = C.KEY_HOMEPAGE KeyRefresh = C.KEY_REFRESH KeyExit = C.KEY_EXIT KeyMove = C.KEY_MOVE KeyEdit = C.KEY_EDIT KeyScrollup = C.KEY_SCROLLUP KeyScrolldown = C.KEY_SCROLLDOWN KeyKpleftparen = C.KEY_KPLEFTPAREN KeyKprightparen = C.KEY_KPRIGHTPAREN KeyNew = C.KEY_NEW KeyRedo = C.KEY_REDO KeyF13 = C.KEY_F13 KeyF14 = C.KEY_F14 KeyF15 = C.KEY_F15 KeyF16 = C.KEY_F16 KeyF17 = C.KEY_F17 KeyF18 = C.KEY_F18 KeyF19 = C.KEY_F19 KeyF20 = C.KEY_F20 KeyF21 = C.KEY_F21 KeyF22 = C.KEY_F22 KeyF23 = C.KEY_F23 KeyF24 = C.KEY_F24 KeyPlaycd = C.KEY_PLAYCD KeyPausecd = C.KEY_PAUSECD KeyProg3 = C.KEY_PROG3 KeyProg4 = C.KEY_PROG4 KeyAllApplications = C.KEY_ALL_APPLICATIONS KeyDashboard = C.KEY_DASHBOARD KeySuspend = C.KEY_SUSPEND KeyClose = C.KEY_CLOSE KeyPlay = C.KEY_PLAY KeyFastforward = C.KEY_FASTFORWARD KeyBassboost = C.KEY_BASSBOOST KeyPrint = C.KEY_PRINT KeyHp = C.KEY_HP KeyCamera = C.KEY_CAMERA KeySound = C.KEY_SOUND KeyQuestion = C.KEY_QUESTION KeyEmail = C.KEY_EMAIL KeyChat = C.KEY_CHAT KeySearch = C.KEY_SEARCH KeyConnect = C.KEY_CONNECT KeyFinance = C.KEY_FINANCE KeySport = C.KEY_SPORT KeyShop = C.KEY_SHOP KeyAlterase = C.KEY_ALTERASE KeyCancel = C.KEY_CANCEL KeyBrightnessdown = C.KEY_BRIGHTNESSDOWN KeyBrightnessup = C.KEY_BRIGHTNESSUP KeyMedia = C.KEY_MEDIA KeySwitchvideomode = C.KEY_SWITCHVIDEOMODE KeyKbdillumtoggle = C.KEY_KBDILLUMTOGGLE KeyKbdillumdown = C.KEY_KBDILLUMDOWN KeyKbdillumup = C.KEY_KBDILLUMUP KeySend = C.KEY_SEND KeyReply = C.KEY_REPLY KeyForwardmail = C.KEY_FORWARDMAIL KeySave = C.KEY_SAVE KeyDocuments = C.KEY_DOCUMENTS KeyBattery = C.KEY_BATTERY KeyBluetooth = C.KEY_BLUETOOTH KeyWlan = C.KEY_WLAN KeyUwb = C.KEY_UWB KeyUnknown = C.KEY_UNKNOWN KeyVideoNext = C.KEY_VIDEO_NEXT KeyVideoPrev = C.KEY_VIDEO_PREV KeyBrightnessCycle = C.KEY_BRIGHTNESS_CYCLE KeyBrightnessAuto = C.KEY_BRIGHTNESS_AUTO KeyBrightnessZero = C.KEY_BRIGHTNESS_ZERO KeyDisplayOff = C.KEY_DISPLAY_OFF KeyWwan = C.KEY_WWAN KeyWimax = C.KEY_WIMAX KeyRfkill = C.KEY_RFKILL KeyMicmute = C.KEY_MICMUTE )
Keyboard keys
View Source
const ( ButtonMisc = C.BTN_MISC Button0 = C.BTN_0 Button1 = C.BTN_1 Button2 = C.BTN_2 Button3 = C.BTN_3 Button4 = C.BTN_4 Button5 = C.BTN_5 Button6 = C.BTN_6 Button7 = C.BTN_7 Button8 = C.BTN_8 Button9 = C.BTN_9 ButtonMouse = C.BTN_MOUSE ButtonLeft = C.BTN_LEFT ButtonRight = C.BTN_RIGHT ButtonMiddle = C.BTN_MIDDLE ButtonSide = C.BTN_SIDE ButtonExtra = C.BTN_EXTRA ButtonForward = C.BTN_FORWARD ButtonBack = C.BTN_BACK ButtonTask = C.BTN_TASK ButtonJoystick = C.BTN_JOYSTICK ButtonTrigger = C.BTN_TRIGGER ButtonThumb = C.BTN_THUMB ButtonThumb2 = C.BTN_THUMB2 ButtonTop = C.BTN_TOP ButtonTop2 = C.BTN_TOP2 ButtonPinkie = C.BTN_PINKIE ButtonBase = C.BTN_BASE ButtonBase2 = C.BTN_BASE2 ButtonBase3 = C.BTN_BASE3 ButtonBase4 = C.BTN_BASE4 ButtonBase5 = C.BTN_BASE5 ButtonBase6 = C.BTN_BASE6 ButtonDead = C.BTN_DEAD ButtonGamepad = C.BTN_GAMEPAD ButtonSouth = C.BTN_SOUTH ButtonA = C.BTN_A ButtonEast = C.BTN_EAST ButtonB = C.BTN_B ButtonC = C.BTN_C ButtonNorth = C.BTN_NORTH ButtonX = C.BTN_X ButtonWest = C.BTN_WEST ButtonY = C.BTN_Y ButtonZ = C.BTN_Z ButtonTl = C.BTN_TL ButtonTr = C.BTN_TR ButtonTl2 = C.BTN_TL2 ButtonTr2 = C.BTN_TR2 ButtonSelect = C.BTN_SELECT ButtonStart = C.BTN_START ButtonMode = C.BTN_MODE ButtonThumbl = C.BTN_THUMBL ButtonThumbr = C.BTN_THUMBR ButtonDigi = C.BTN_DIGI ButtonToolPen = C.BTN_TOOL_PEN ButtonToolRubber = C.BTN_TOOL_RUBBER ButtonToolBrush = C.BTN_TOOL_BRUSH ButtonToolPencil = C.BTN_TOOL_PENCIL ButtonToolAirbrush = C.BTN_TOOL_AIRBRUSH ButtonToolFinger = C.BTN_TOOL_FINGER ButtonToolMouse = C.BTN_TOOL_MOUSE ButtonToolLens = C.BTN_TOOL_LENS ButtonToolQuinttap = C.BTN_TOOL_QUINTTAP ButtonStylus3 = C.BTN_STYLUS3 ButtonTouch = C.BTN_TOUCH ButtonStylus = C.BTN_STYLUS ButtonStylus2 = C.BTN_STYLUS2 ButtonToolDoubletap = C.BTN_TOOL_DOUBLETAP ButtonToolTripletap = C.BTN_TOOL_TRIPLETAP ButtonToolQuadtap = C.BTN_TOOL_QUADTAP ButtonWheel = C.BTN_WHEEL ButtonGearDown = C.BTN_GEAR_DOWN ButtonGearUp = C.BTN_GEAR_UP )
Mouse buttons
View Source
const ( StateReleased = C.WL_POINTER_BUTTON_STATE_RELEASED StatePressed = C.WL_POINTER_BUTTON_STATE_PRESSED )
Button and Key states
View Source
const ( AnchorTop = C.ZWLR_LAYER_SURFACE_V1_ANCHOR_TOP AnchorBottom = C.ZWLR_LAYER_SURFACE_V1_ANCHOR_BOTTOM AnchorLeft = C.ZWLR_LAYER_SURFACE_V1_ANCHOR_LEFT AnchorRight = C.ZWLR_LAYER_SURFACE_V1_ANCHOR_RIGHT AnchorFill = AnchorTop | AnchorBottom | AnchorLeft | AnchorRight LayerBackground = C.ZWLR_LAYER_SHELL_V1_LAYER_BACKGROUND LayerBottom = C.ZWLR_LAYER_SHELL_V1_LAYER_BOTTOM LayerTop = C.ZWLR_LAYER_SHELL_V1_LAYER_TOP LayerOverlay = C.ZWLR_LAYER_SHELL_V1_LAYER_OVERLAY )
View Source
const ( CursorShapeDefault = C.WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_DEFAULT CursorShapeContextMenu = C.WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_CONTEXT_MENU CursorShapeHelp = C.WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_HELP CursorShapePointer = C.WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_POINTER CursorShapeProgress = C.WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_PROGRESS CursorShapeWait = C.WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_WAIT CursorShapeCell = C.WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_CELL CursorShapeCrosshair = C.WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_CROSSHAIR CursorShapeText = C.WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_TEXT CursorShapeVerticalText = C.WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_VERTICAL_TEXT CursorShapeAlias = C.WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_ALIAS CursorShapeCopy = C.WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_COPY CursorShapeMove = C.WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_MOVE CursorShapeNoDrop = C.WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_NO_DROP CursorShapeNotAllowed = C.WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_NOT_ALLOWED CursorShapeGrab = C.WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_GRAB CursorShapeGrabbing = C.WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_GRABBING CursorShapeEResize = C.WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_E_RESIZE CursorShapeNResize = C.WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_N_RESIZE CursorShapeNeResize = C.WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_NE_RESIZE CursorShapeNwResize = C.WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_NW_RESIZE CursorShapeSResize = C.WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_S_RESIZE CursorShapeSeResize = C.WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_SE_RESIZE CursorShapeSwResize = C.WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_SW_RESIZE CursorShapeWResize = C.WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_W_RESIZE CursorShapeEwResize = C.WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_EW_RESIZE CursorShapeNsResize = C.WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_NS_RESIZE CursorShapeNeswResize = C.WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_NESW_RESIZE CursorShapeNwseResize = C.WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_NWSE_RESIZE CursorShapeColResize = C.WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_COL_RESIZE CursorShapeRowResize = C.WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_ROW_RESIZE CursorShapeAllScroll = C.WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_ALL_SCROLL CursorShapeZoomIn = C.WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_ZOOM_IN CursorShapeZoomOut = C.WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_ZOOM_OUT )
Variables ¶
This section is empty.
Functions ¶
func AddGlobalApp ¶
func AddGlobalBackend ¶
Types ¶
type App ¶
type App interface { OnEvent(ctx Context, event interface{}) OnRender(ctx Context, layerSurface LayerSurface, outputGeo Rect) OnUpdate(ctx Context, deltaTime float64) }
func GetGlobalApp ¶
type Backend ¶
type Backend interface { Init(ctx Context) error OnLayerSurfaceConfigure(ctx Context, layerSurface LayerSurface, width, height int) RenderStart(ctx Context, layerSurface LayerSurface) RenderEnd(ctx Context, layerSurface LayerSurface) Destroy(ctx Context) AssociateLayerSurface(ctx Context, layerSurface LayerSurface) uint64 UnassociateLayerSurface(ctx Context, layerSurface LayerSurface) }
func GetGlobalBackend ¶
type Context ¶
type Context struct {
Handle *C.struct_samure_context
}
func CreateContextWithBackend ¶
func CreateContextWithBackend(cfg *ContextConfig, bak Backend) (Context, error)
func (Context) Compositor ¶ added in v0.1.4
func (Context) CreateOutputLayerSurfaces ¶
func (Context) LayerShell ¶ added in v0.1.4
func (Context) LenOutputs ¶
func (Context) OutputManager ¶ added in v0.1.4
func (Context) ProcessEvents ¶
func (ctx Context) ProcessEvents()
func (Context) RenderLayerSurface ¶ added in v0.1.3
func (ctx Context) RenderLayerSurface(sfc LayerSurface, o Rect)
func (Context) RenderOutput ¶
func (Context) ScreencopyManager ¶ added in v0.1.4
func (Context) SetInputRegions ¶
func (Context) SetKeyboardInteraction ¶
func (Context) SetPointerInteraction ¶
func (Context) SetPointerShape ¶
func (Context) SetRenderState ¶
func (Context) SetRunning ¶
type ContextConfig ¶
type ContextConfig struct { PointerInteraction bool KeyboardInteraction bool TouchInteraction bool MaxUpdateFrequency int NotCreateOutputLayerSurfaces bool NotRequestFrame bool GL OpenGLConfig App App }
func CreateContextConfig ¶
func CreateContextConfig(a App) *ContextConfig
type EventKeyboardEnter ¶
type EventKeyboardEnter struct { Seat Seat Output Output Surface LayerSurface }
type EventKeyboardKey ¶
type EventKeyboardLeave ¶
type EventKeyboardLeave struct {
Seat Seat
}
type EventPointerButton ¶
type EventPointerEnter ¶
type EventPointerEnter struct { Seat Seat Output Output Surface LayerSurface X float64 Y float64 }
type EventPointerLeave ¶
type EventPointerLeave struct { Seat Seat Output Output Surface LayerSurface }
type EventPointerMotion ¶
type EventTouchDown ¶
type EventTouchUp ¶
type Focus ¶
type Focus struct {
Handle C.struct_samure_focus
}
func (Focus) Surface ¶
func (f Focus) Surface() LayerSurface
type LayerSurface ¶
type LayerSurface struct {
Handle *C.struct_samure_layer_surface
}
func CreateLayerSurface ¶
func (LayerSurface) BackendData ¶
func (sfc LayerSurface) BackendData() unsafe.Pointer
func (LayerSurface) Destroy ¶
func (sfc LayerSurface) Destroy(ctx Context)
func (LayerSurface) DrawBuffer ¶
func (sfc LayerSurface) DrawBuffer(b SharedBuffer)
func (LayerSurface) FrameDeltaTime ¶ added in v0.1.5
func (sfc LayerSurface) FrameDeltaTime() float64
func (LayerSurface) H ¶
func (sfc LayerSurface) H() int
func (LayerSurface) LayerSurface ¶ added in v0.1.4
func (sfc LayerSurface) LayerSurface() unsafe.Pointer
func (LayerSurface) Surface ¶ added in v0.1.4
func (sfc LayerSurface) Surface() unsafe.Pointer
func (LayerSurface) W ¶
func (sfc LayerSurface) W() int
type OpenGLConfig ¶
type OpenGLConfig struct { RedSize int GreenSize int BlueSize int AlphaSize int Samples int DepthSize int MajorVersion int MinorVersion int ProfileMask int Debug int ColorSpace int RenderBuffer int }
func DefaultOpenGLConfig ¶
func DefaultOpenGLConfig() OpenGLConfig
type Output ¶
type Output struct {
Handle *C.struct_samure_output
}
func (Output) AttachLayerSurface ¶
func (o Output) AttachLayerSurface(sfc LayerSurface)
func (Output) CircleInOutput ¶
func (Output) LenSurfaces ¶
func (Output) PointInOutput ¶
func (Output) RectInOutput ¶
func (Output) Screenshot ¶
func (o Output) Screenshot(ctx Context, captureCursor bool) (SharedBuffer, error)
func (Output) SetInputRegions ¶
func (Output) SetKeyboardInteraction ¶
func (Output) SetPointerInteraction ¶
func (Output) SquareInOutput ¶
func (Output) Surface ¶
func (o Output) Surface(idx int) LayerSurface
func (Output) TriangleInOutput ¶
type RawBackend ¶
type RawBackend struct {
// contains filtered or unexported fields
}
func (*RawBackend) AssociateLayerSurface ¶
func (raw *RawBackend) AssociateLayerSurface(ctx Context, layerSurface LayerSurface) uint64
func (*RawBackend) Destroy ¶
func (raw *RawBackend) Destroy(ctx Context)
func (*RawBackend) Init ¶
func (raw *RawBackend) Init(ctx Context) error
func (*RawBackend) OnLayerSurfaceConfigure ¶
func (raw *RawBackend) OnLayerSurfaceConfigure(ctx Context, layerSurface LayerSurface, width, height int)
func (*RawBackend) RenderEnd ¶
func (raw *RawBackend) RenderEnd(ctx Context, layerSurface LayerSurface)
func (*RawBackend) RenderStart ¶
func (raw *RawBackend) RenderStart(ctx Context, layerSurface LayerSurface)
func (*RawBackend) UnassociateLayerSurface ¶
func (raw *RawBackend) UnassociateLayerSurface(ctx Context, layerSurface LayerSurface)
type RawSurface ¶
type RawSurface struct {
Handle *C.struct_samure_raw_surface
}
func GetRaw ¶
func GetRaw(sfc LayerSurface) RawSurface
func (RawSurface) Buffer ¶
func (r RawSurface) Buffer() SharedBuffer
func (RawSurface) Data ¶
func (r RawSurface) Data() unsafe.Pointer
type Rect ¶
type Rect struct {
X, Y, W, H int
}
func (Rect) CircleInOutput ¶
func (Rect) PointInOutput ¶
func (Rect) RectInOutput ¶
func (Rect) SquareInOutput ¶
func (Rect) TriangleInOutput ¶
type Seat ¶
type Seat struct {
Handle *C.struct_samure_seat
}
func (Seat) KeyboardFocus ¶
func (Seat) PointerFocus ¶
func (Seat) TouchFocus ¶ added in v0.1.4
type SharedBuffer ¶
type SharedBuffer struct {
}func (SharedBuffer) Buffer ¶ added in v0.1.4
func (b SharedBuffer) Buffer() unsafe.Pointer
func (SharedBuffer) Copy ¶
func (b SharedBuffer) Copy(src SharedBuffer) error
func (SharedBuffer) Data ¶
func (b SharedBuffer) Data() unsafe.Pointer
func (SharedBuffer) Destroy ¶
func (b SharedBuffer) Destroy()
func (SharedBuffer) Fd ¶
func (b SharedBuffer) Fd() int
func (SharedBuffer) Format ¶
func (b SharedBuffer) Format() int
func (SharedBuffer) Height ¶
func (b SharedBuffer) Height() int
func (SharedBuffer) Width ¶
func (b SharedBuffer) Width() int
Source Files ¶
Click to show internal directories.
Click to hide internal directories.