2021-01-18 13:20:06 +01:00
|
|
|
// Copyright (c) 2019-2021 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.
|
2021-06-24 10:02:04 +02:00
|
|
|
|
2019-06-22 20:20:28 +02:00
|
|
|
module gg
|
|
|
|
|
2020-04-26 11:42:44 +02:00
|
|
|
import gx
|
2019-06-22 20:20:28 +02:00
|
|
|
|
2021-06-24 10:02:04 +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
|
|
|
|
2021-06-24 10:02:04 +02:00
|
|
|
pub type FNKeyDown = fn (c KeyCode, m Modifier, data voidptr)
|
2020-08-01 23:40:25 +02:00
|
|
|
|
2021-06-24 10:02:04 +02:00
|
|
|
pub type FNKeyUp = fn (c KeyCode, m Modifier, data voidptr)
|
2020-08-01 23:40:25 +02:00
|
|
|
|
2021-06-24 10:02:04 +02:00
|
|
|
pub type FNMove = fn (x f32, y f32, data voidptr)
|
2020-08-01 23:40:25 +02:00
|
|
|
|
2021-06-24 10:02:04 +02:00
|
|
|
pub type FNClick = fn (x f32, y f32, button MouseButton, data voidptr)
|
2020-09-21 02:42:28 +02:00
|
|
|
|
2021-06-24 10:02:04 +02:00
|
|
|
pub type FNUnClick = fn (x f32, y f32, button MouseButton, data voidptr)
|
2021-05-28 11:46:23 +02:00
|
|
|
|
2021-06-24 10:02:04 +02:00
|
|
|
pub type FNChar = fn (c u32, data voidptr)
|
2019-06-22 20:20:28 +02:00
|
|
|
|
2021-06-19 20:32:08 +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 {
|
2021-12-22 11:26:52 +01:00
|
|
|
pub mut:
|
2020-08-01 23:40:25 +02:00
|
|
|
width int
|
|
|
|
height int
|
|
|
|
}
|