Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(219)

Side by Side Diff: src/pkg/exp/nacl/av/event.go

Issue 156115: code review 156115: gofmt -r 'α[β:len(α)] -> α[β:]' -w src/cmd src/pkg (Closed)
Patch Set: code review 156115: gofmt -r 'α[β:len(α)] -> α[β:]' -w src/cmd src/pkg Created 15 years, 4 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/pkg/exp/eval/stmt.go ('k') | src/pkg/exp/nacl/srpc/client.go » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2009 The Go Authors. All rights reserved. 1 // Copyright 2009 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style 2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file. 3 // license that can be found in the LICENSE file.
4 4
5 // NaCl GUI events. 5 // NaCl GUI events.
6 // Clients do not have raw access to the event stream 6 // Clients do not have raw access to the event stream
7 // (only filtered through the lens of package draw) 7 // (only filtered through the lens of package draw)
8 // but perhaps they will. 8 // but perhaps they will.
9 9
10 package av 10 package av
(...skipping 366 matching lines...) Expand 10 before | Expand all | Expand 10 after
377 type event interface{} 377 type event interface{}
378 378
379 type reader []byte 379 type reader []byte
380 380
381 func (r *reader) Read(p []byte) (n int, err os.Error) { 381 func (r *reader) Read(p []byte) (n int, err os.Error) {
382 b := *r; 382 b := *r;
383 if len(b) == 0 && len(p) > 0 { 383 if len(b) == 0 && len(p) > 0 {
384 return 0, os.EOF 384 return 0, os.EOF
385 } 385 }
386 n = bytes.Copy(p, b); 386 n = bytes.Copy(p, b);
387 » *r = b[n:len(b)]; 387 » *r = b[n:];
388 return; 388 return;
389 } 389 }
390 390
391 func (w *Window) readEvents() { 391 func (w *Window) readEvents() {
392 buf := make([]byte, maxEventBytes); 392 buf := make([]byte, maxEventBytes);
393 clean := false; 393 clean := false;
394 var ( 394 var (
395 ea *activeEvent; 395 ea *activeEvent;
396 ee *exposeEvent; 396 ee *exposeEvent;
397 ke *keyboardEvent; 397 ke *keyboardEvent;
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
464 m.Y = int(mbe.Y); 464 m.Y = int(mbe.Y);
465 // TODO(rsc): Remove uint cast once 8g bug is fixed. 465 // TODO(rsc): Remove uint cast once 8g bug is fixed.
466 m.Buttons &^= 1 << uint(mbe.Button-1); 466 m.Buttons &^= 1 << uint(mbe.Button-1);
467 m.Nsec = time.Nanoseconds(); 467 m.Nsec = time.Nanoseconds();
468 _ = w.mousec <- m; 468 _ = w.mousec <- m;
469 case eventQuit: 469 case eventQuit:
470 w.quitc <- true 470 w.quitc <- true
471 } 471 }
472 } 472 }
473 } 473 }
OLDNEW
« no previous file with comments | « src/pkg/exp/eval/stmt.go ('k') | src/pkg/exp/nacl/srpc/client.go » ('j') | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b