2023-03-28 23:55:57 +03:00
|
|
|
// Copyright (c) 2019-2023 Alexander Medvednikov. All rights reserved.
|
2020-07-06 21:29:05 +03:00
|
|
|
// Use of this source code is governed by an MIT license that can be found in the LICENSE file.
|
2021-06-24 11:02:04 +03:00
|
|
|
|
2019-06-22 21:20:28 +03:00
|
|
|
module gg
|
|
|
|
|
2020-04-26 12:42:44 +03:00
|
|
|
import gx
|
2019-06-22 21:20:28 +03:00
|
|
|
|
2021-06-24 11:02:04 +03: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-02 00:40:25 +03:00
|
|
|
|
2021-06-24 11:02:04 +03:00
|
|
|
pub type FNKeyDown = fn (c KeyCode, m Modifier, data voidptr)
|
2020-08-02 00:40:25 +03:00
|
|
|
|
2021-06-24 11:02:04 +03:00
|
|
|
pub type FNKeyUp = fn (c KeyCode, m Modifier, data voidptr)
|
2020-08-02 00:40:25 +03:00
|
|
|
|
2021-06-24 11:02:04 +03:00
|
|
|
pub type FNMove = fn (x f32, y f32, data voidptr)
|
2020-08-02 00:40:25 +03:00
|
|
|
|
2021-06-24 11:02:04 +03:00
|
|
|
pub type FNClick = fn (x f32, y f32, button MouseButton, data voidptr)
|
2020-09-21 03:42:28 +03:00
|
|
|
|
2021-06-24 11:02:04 +03:00
|
|
|
pub type FNUnClick = fn (x f32, y f32, button MouseButton, data voidptr)
|
2021-05-28 12:46:23 +03:00
|
|
|
|
2021-06-24 11:02:04 +03:00
|
|
|
pub type FNChar = fn (c u32, data voidptr)
|
2019-06-22 21:20:28 +03:00
|
|
|
|
2021-06-19 21:32:08 +03:00
|
|
|
pub struct PenConfig {
|
|
|
|
color gx.Color
|
|
|
|
line_type PenLineType = .solid
|
|
|
|
thickness int = 1
|
|
|
|
}
|
|
|
|
|
2020-08-02 00:40:25 +03:00
|
|
|
pub struct Size {
|
2021-12-22 13:26:52 +03:00
|
|
|
pub mut:
|
2020-08-02 00:40:25 +03:00
|
|
|
width int
|
|
|
|
height int
|
|
|
|
}
|