native

package
v0.0.0-...-e111b83 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2015 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Overview

Package native represents a layer between the operating system and ui2go. It defines functions and interfaces, that are implemented operating system specific.

Index

Constants

This section is empty.

Variables

View Source
var NewWindow = func() Window {
	panic("Function NewWindow not defined." +
		"Possible cause: No operating system specific implementation.")
}

NewWindow is a function that returns a user interface window. It must be implemented individually by different window subsystems.

Functions

This section is empty.

Types

type Window

type Window interface {
	// Returns a cairo surface that can be used for drawing.
	Surface() *cairo.Surface
	// Flush flushes pending messages to the unterlying window system.
	Flush()
	// EventChan returns a channel of window events.
	EventChan() <-chan interface{}
	Close() error
}

Window represents a typical user interface window in an operating system independent way.

func NewXWindow

func NewXWindow() Window

type XWindow

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

XWindow implements the Window interface for X-Windows. X-Window communication is done by using XCB directly.

XCB resources:

https://en.wikipedia.org/wiki/XCB
http://static.usenix.org/publications/library/proceedings/als01/full_papers/massey/massey.pdf
http://xcb.freedesktop.org/

func (*XWindow) Close

func (x *XWindow) Close() error

func (*XWindow) EventChan

func (x *XWindow) EventChan() <-chan interface{}

func (*XWindow) Flush

func (x *XWindow) Flush()

func (*XWindow) Surface

func (x *XWindow) Surface() *cairo.Surface

Jump to

Keyboard shortcuts

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