mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-07 18:35:34 +00:00
app: rename UpdateEvent to FrameEvent and add Frame field
While "DrawEvent" was too specific (op.Ops contains non-draw events), "Update" is too vague: it's a common word, and could be misunderstood to mean update parts of a window, not replace it. "FrameEvent" is more specific, and is the usual way to refer to immediate mode drawing. While we're here, unexport Window.Update and add a Frame function to FrameEvent, to emphasize that updating the window frame is only appropriate during the handling of a FrameEvent. Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
+1
-1
@@ -407,7 +407,7 @@ func (w *window) draw(sync bool) {
|
||||
w.height = int(r.bottom - r.top)
|
||||
cfg := configForDC(w.hdc)
|
||||
cfg.now = time.Now()
|
||||
w.w.event(UpdateEvent{
|
||||
w.w.event(FrameEvent{
|
||||
Size: image.Point{
|
||||
X: w.width,
|
||||
Y: w.height,
|
||||
|
||||
Reference in New Issue
Block a user