mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-05 01:15:35 +00:00
ui: rename block to macro
It is a more precise name. Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
@@ -6,8 +6,8 @@ type OpType byte
|
||||
const firstOpIndex = 200
|
||||
|
||||
const (
|
||||
TypeBlockDef OpType = iota + firstOpIndex
|
||||
TypeBlock
|
||||
TypeMacroDef OpType = iota + firstOpIndex
|
||||
TypeMacro
|
||||
TypeTransform
|
||||
TypeLayer
|
||||
TypeInvalidate
|
||||
@@ -27,8 +27,8 @@ const (
|
||||
)
|
||||
|
||||
const (
|
||||
TypeBlockDefLen = 1 + 4 + 4
|
||||
TypeBlockLen = 1 + 4 + 4 + 4
|
||||
TypeMacroDefLen = 1 + 4 + 4
|
||||
TypeMacroLen = 1 + 4 + 4 + 4
|
||||
TypeTransformLen = 1 + 4*2
|
||||
TypeLayerLen = 1
|
||||
TypeRedrawLen = 1 + 8
|
||||
@@ -49,8 +49,8 @@ const (
|
||||
|
||||
func (t OpType) Size() int {
|
||||
return [...]int{
|
||||
TypeBlockDefLen,
|
||||
TypeBlockLen,
|
||||
TypeMacroDefLen,
|
||||
TypeMacroLen,
|
||||
TypeTransformLen,
|
||||
TypeLayerLen,
|
||||
TypeRedrawLen,
|
||||
@@ -72,7 +72,7 @@ func (t OpType) Size() int {
|
||||
|
||||
func (t OpType) NumRefs() int {
|
||||
switch t {
|
||||
case TypeBlock, TypeImage, TypeKeyHandler, TypePointerHandler, TypeProfile:
|
||||
case TypeMacro, TypeImage, TypeKeyHandler, TypePointerHandler, TypeProfile:
|
||||
return 1
|
||||
default:
|
||||
return 0
|
||||
|
||||
Reference in New Issue
Block a user