aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCoşku Baş <cosku.bas@gmail.com>2015-01-19 09:53:14 +0100
committerDmitri Shuralyov <shurcooL@gmail.com>2015-02-21 18:51:43 -0800
commitd097dca2deb07203ace155a04d2113b2837d16e9 (patch)
tree26bb7028eee08ad21700e94c2ac369c482b61628
parent228af4312a951da0a736bdae0eb82a3af7742dab (diff)
downloadglfw-d097dca2deb07203ace155a04d2113b2837d16e9.tar.gz
VideoMode to VidMode
-rw-r--r--monitor.go12
1 files changed, 6 insertions, 6 deletions
diff --git a/monitor.go b/monitor.go
index 50a7e31..6444f39 100644
--- a/monitor.go
+++ b/monitor.go
@@ -33,7 +33,7 @@ const (
)
// VideoMode describes a single video mode.
-type VideoMode struct {
+type VidMode struct {
Width int // The width, in pixels, of the video mode.
Height int // The height, in pixels, of the video mode.
RedBits int // The bit depth of the red channel of the video mode.
@@ -123,7 +123,7 @@ func SetMonitorCallback(cbfun func(monitor *Monitor, event MonitorEvent)) error
// The returned array is sorted in ascending order, first by color bit depth
// (the sum of all channel depths) and then by resolution area (the product of
// width and height).
-func (m *Monitor) GetVideoModes() ([]*VideoMode, error) {
+func (m *Monitor) GetVideoModes() ([]*VidMode, error) {
var length int
vC := C.glfwGetVideoModes(m.data, (*C.int)(unsafe.Pointer(&length)))
@@ -131,11 +131,11 @@ func (m *Monitor) GetVideoModes() ([]*VideoMode, error) {
return nil, fetchError()
}
- v := make([]*VideoMode, length)
+ v := make([]*VidMode, length)
for i := 0; i < length; i++ {
t := C.GetVidmodeAtIndex(vC, C.int(i))
- v[i] = &VideoMode{int(t.width), int(t.height), int(t.redBits), int(t.greenBits), int(t.blueBits), int(t.refreshRate)}
+ v[i] = &VidMode{int(t.width), int(t.height), int(t.redBits), int(t.greenBits), int(t.blueBits), int(t.refreshRate)}
}
return v, nil
@@ -144,12 +144,12 @@ func (m *Monitor) GetVideoModes() ([]*VideoMode, error) {
// GetVideoMode returns the current video mode of the monitor. If you
// are using a full screen window, the return value will therefore depend on
// whether it is focused.
-func (m *Monitor) GetVideoMode() (*VideoMode, error) {
+func (m *Monitor) GetVideoMode() (*VidMode, error) {
t := C.glfwGetVideoMode(m.data)
if t == nil {
return nil, fetchError()
}
- return &VideoMode{int(t.width), int(t.height), int(t.redBits), int(t.greenBits), int(t.blueBits), int(t.refreshRate)}, nil
+ return &VidMode{int(t.width), int(t.height), int(t.redBits), int(t.greenBits), int(t.blueBits), int(t.refreshRate)}, nil
}
// SetGamma generates a 256-element gamma ramp from the specified exponent and then calls