Basic internal structure

This commit is contained in:
2024-06-01 16:39:14 -04:00
parent a3117e4fb9
commit 15165f993c
9 changed files with 119 additions and 0 deletions

7
internal/system/box.go Normal file
View File

@@ -0,0 +1,7 @@
package system
import "git.tebibyte.media/tomo/tomo"
func (this *System) NewBox () tomo.Box {
}

View File

@@ -0,0 +1,7 @@
package system
import "git.tebibyte.media/tomo/tomo"
func (this *System) NewCanvasBox () tomo.CanvasBox {
}

View File

@@ -0,0 +1,7 @@
package system
import "git.tebibyte.media/tomo/tomo"
func (this *System) NewContainerBox () tomo.ContainerBox {
}

View File

@@ -0,0 +1,15 @@
package system
import "git.tebibyte.media/tomo/tomo"
type Hierarchy struct {
link WindowLink
}
type WindowLink interface {
GetWindow () tomo.Window
}
func (this *System) NewHierarchy (link WindowLink) *Hierarchy {
}

View File

@@ -0,0 +1,7 @@
package system
import "git.tebibyte.media/tomo/tomo"
func (this *System) NewSurfaceBox () (tomo.SurfaceBox, error) {
}

27
internal/system/system.go Normal file
View File

@@ -0,0 +1,27 @@
package system
import "io"
import "image"
import "git.tebibyte.media/tomo/tomo/canvas"
type System struct {
link BackendLink
}
type BackendLink interface {
NewTexture (image.Image) canvas.TextureCloser
NewCanvas (image.Rectangle) canvas.Canvas
NewSurface (image.Rectangle) SurfaceLink
}
type SurfaceLink interface {
io.Closer
GetSurface () any
SetSize (image.Rectangle)
}
func New (link BackendLink) *System {
return &System {
link: link,
}
}

View File

@@ -0,0 +1,7 @@
package system
import "git.tebibyte.media/tomo/tomo"
func (this *System) NewTextBox () tomo.TextBox {
}