v/vlib/gg/gg.v

37 lines
837 B
V
Raw Normal View History

2022-01-04 10:21:08 +01:00
// Copyright (c) 2019-2022 Alexander Medvednikov. All rights reserved.
2020-07-06 20:29:05 +02:00
// Use of this source code is governed by an MIT license that can be found in the LICENSE file.
2019-06-22 20:20:28 +02:00
module gg
import gx
2019-06-22 20:20:28 +02:00
pub type FNCb = fn (data voidptr)
pub type FNEvent = fn (e &Event, data voidptr)
pub type FNFail = fn (msg string, data voidptr)
2020-08-01 23:40:25 +02:00
pub type FNKeyDown = fn (c KeyCode, m Modifier, data voidptr)
2020-08-01 23:40:25 +02:00
pub type FNKeyUp = fn (c KeyCode, m Modifier, data voidptr)
2020-08-01 23:40:25 +02:00
pub type FNMove = fn (x f32, y f32, data voidptr)
2020-08-01 23:40:25 +02:00
pub type FNClick = fn (x f32, y f32, button MouseButton, data voidptr)
2020-09-21 02:42:28 +02:00
pub type FNUnClick = fn (x f32, y f32, button MouseButton, data voidptr)
pub type FNChar = fn (c u32, data voidptr)
2019-06-22 20:20:28 +02:00
pub struct PenConfig {
color gx.Color
line_type PenLineType = .solid
thickness int = 1
}
2020-08-01 23:40:25 +02:00
pub struct Size {
pub mut:
2020-08-01 23:40:25 +02:00
width int
height int
}