-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Formatting , Fixed Naming and Build Spaces
- Loading branch information
olekukonko
committed
Jan 15, 2014
1 parent
4417e82
commit f223bba
Showing
8 changed files
with
36 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 1,29 @@ | ||
package ts | ||
|
||
// Return System Size | ||
type Size struct { | ||
row uint16 | ||
col uint16 | ||
xpixel uint16 | ||
ypixel uint16 | ||
row uint16 | ||
col uint16 | ||
posX uint16 | ||
posY uint16 | ||
} | ||
|
||
// Get Terminal Width | ||
func (w Size) Col() int { | ||
return int(w.row) | ||
} | ||
|
||
// Get Terminal Height | ||
func (w Size) Row() int { | ||
return int(w.row) | ||
} | ||
|
||
func (w Size) Xpixel() int { | ||
return int(w.xpixel) | ||
// Get Position X | ||
func (w Size) PosX() int { | ||
return int(w.posX) | ||
} | ||
|
||
func (w Size) Ypixel() int { | ||
return int(w.ypixel) | ||
// Get Position Y | ||
func (w Size) PosY() int { | ||
return int(w.posY) | ||
} | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 1,5 @@ | ||
// build darwin | ||
|
||
package ts | ||
|
||
const ( | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 1,5 @@ | ||
// build linux | ||
|
||
package ts | ||
|
||
const ( | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 1,7 @@ | ||
// build !darwin,!freebsd,!netbsd,!openbsd,!linux | ||
// build !windows,!darwin,!freebsd,!netbsd,!openbsd,!linux | ||
|
||
package ts | ||
|
||
const ( | ||
TIOCGWINSZ = 0 | ||
) | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 1,7 @@ | ||
// build freebsd netbsd openbsd | ||
|
||
package ts | ||
|
||
const ( | ||
TIOCGWINSZ = 0x40087468 | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters