pack merges event provider GUID and the hook ID into `Type` array. The type provides a convenient way for comparing event types.
(g windows.GUID, id uint16)
| 622 | // pack merges event provider GUID and the hook ID into `Type` array. |
| 623 | // The type provides a convenient way for comparing event types. |
| 624 | func pack(g windows.GUID, id uint16) Type { |
| 625 | return [18]byte{ |
| 626 | byte(g.Data1 >> 24), byte(g.Data1 >> 16), byte(g.Data1 >> 8), byte(g.Data1), |
| 627 | byte(g.Data2 >> 8), byte(g.Data2), |
| 628 | byte(g.Data3 >> 8), byte(g.Data3), |
| 629 | g.Data4[0], |
| 630 | g.Data4[1], |
| 631 | g.Data4[2], |
| 632 | g.Data4[3], |
| 633 | g.Data4[4], |
| 634 | g.Data4[5], |
| 635 | g.Data4[6], |
| 636 | g.Data4[7], |
| 637 | byte(id >> 8), byte(id), |
| 638 | } |
| 639 | } |
| 640 | |
| 641 | // color return the colorized event type to render by the color formatter. |
| 642 | func (t Type) color() string { |
no outgoing calls