1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

gg: add text rendering, keyboard event handling for JS and other fixes (#12932)

This commit is contained in:
playX
2021-12-22 13:26:52 +03:00
committed by GitHub
parent 6eb44f472a
commit 2b9f993574
12 changed files with 596 additions and 25 deletions

View File

@ -462,6 +462,7 @@ pub interface JS.CanvasRenderingContext2D {
translate(x JS.Number, y JS.Number)
drawFocusIfNeeded(path JS.Path2D, element JS.Element)
stroke()
fillText(text JS.String, x JS.Number, y JS.Number)
mut:
lineCap JS.String
lineDashOffset JS.Number
@ -472,6 +473,7 @@ mut:
strokeStyle FillStyle
globalAlpha JS.Number
globalCompositeOperation JS.String
font JS.String
}
pub interface JS.CanvasGradient {
@ -990,3 +992,16 @@ pub interface JS.ProgressEvent {
target JS.Any
total JS.Number
}
pub interface JS.KeyboardEvent {
JS.UIEvent
altKey JS.Boolean
code JS.String
ctrlKey JS.Boolean
isComposing JS.Boolean
key JS.String
location JS.Number
metaKey JS.Boolean
repeat JS.Boolean
shiftKey JS.Boolean
}