Archived
1
0
This repository has been archived on 2025-01-28. You can view files and clone it, but cannot push or open issues or pull requests.
kos_go/kos.go
2023-06-11 03:26:44 +03:00

35 lines
2.1 KiB
Go
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package kos
const (
EVENT_NONE = 0 /* Очередь событий пуста */
EVENT_REDRAW = 1 /* Окно и его элементы должны быть перерисованы */
EVENT_KEY = 2 /* Была нажата клавиша на клавиатуре */
EVENT_BUTTON = 3 /* Была нажата кнопка мыши */
EVENT_DESKTOP = 5 /* Завершена перерисовка рабочего стола */
EVENT_MOUSE = 6 /* Обнаружена активность мыши (движение, нажатие кнопки) */
EVENT_IPC = 7 /* Уведомление о межпроцессорном взаимодействии */
EVENT_NETWORK = 8 /* Событие сети */
EVENT_DEBUG = 9 /* Событие отладочной подсистемы */
EVENT_IRQBEGIN = 16 /* Начало обработки прерывания */
)
func Sleep(ms uint32) __asm__("go.kos.Sleep");
func GetTime() uint32 __asm__("go.kos.GetTime");
func Event() int __asm__("go.kos.Event");
func GetButtonID() int __asm__("go.kos.GetButtonID");
func CreateButton(x, y, xsize, ysize, id int, color uint32) __asm__("go.kos.CreateButton");
func Exit() __asm__("go.kos.Exit");
func Redraw(id int) __asm__("go.kos.Redraw");
func Window(y, x, w, h int, title string) __asm__("go.kos.Window");
func WriteText(x, y int, color uint32, text string) __asm__("go.kos.WriteText");
func WriteText2(x, y, color1, color2 uint32) __asm__("go.kos.WriteText2");
func DrawLine(x1, y1, x2, y2 int, color uint32) uint32 __asm__("go.kos.DrawLine");
func DrawBar(x, y, xsize, ysize int, color uint32) __asm__("go.kos.DrawBar");
func DebugOutHex(value uint32) __asm__("go.kos.DebugOutHex");
func DebugOutChar(ch byte) __asm__("go.kos.DebugOutChar");
func DebugOutStr(str string) __asm__("go.kos.DebugOutStr");
//func Pointer2byteSlice(ptr uint32) *[]byte __asm__("__unsafe_get_addr");
//func Pointer2uint32(ptr interface{}) uint32 __asm__("__unsafe_get_addr");