Add Role constructor

This commit is contained in:
Sasha Koshka 2023-08-08 03:00:41 -04:00
parent d0f7047fcf
commit 2f5421a5c9
1 changed files with 5 additions and 0 deletions

View File

@ -18,6 +18,11 @@ type Role struct {
Object string
}
// R is shorthand for creating a Role structure.
func R (pack, object string) Role {
return Role { Package: pack, Object: object }
}
// Theme is an object that can apply a visual style to different objects.
type Theme interface {
// Apply applies the theme to the given object, according to the given