diff options
author | Coşku Baş <cosku.bas@gmail.com> | 2015-01-19 13:13:18 +0100 |
---|---|---|
committer | Dmitri Shuralyov <shurcooL@gmail.com> | 2015-02-21 18:51:44 -0800 |
commit | bf4a6c4398fc9c5c6c42d832e9a73b0eab1cb454 (patch) | |
tree | d42a82e7cb2b4c09090233ee920b97fd85179233 | |
parent | d28b7b56f289e1c549cbc410268d1f20401bdc3c (diff) | |
download | glfw-bf4a6c4398fc9c5c6c42d832e9a73b0eab1cb454.tar.gz |
More naming and doc updates
-rw-r--r-- | input.go | 10 | ||||
-rw-r--r-- | monitor.go | 4 | ||||
-rw-r--r-- | window.go | 12 |
3 files changed, 13 insertions, 13 deletions
@@ -338,7 +338,7 @@ func (w *Window) GetMouseButton(button MouseButton) (Action, error) { return Action(C.glfwGetMouseButton(w.data, C.int(button))), fetchError() } -// GetCursorPosition returns the last reported position of the cursor. +// GetCursorPos returns the last reported position of the cursor. // // If the cursor is disabled (with CursorDisabled) then the cursor position is // unbounded and limited only by the minimum and maximum values of a double. @@ -352,7 +352,7 @@ func (w *Window) GetCursorPos() (x, y float64, err error) { return float64(xpos), float64(ypos), fetchError() } -// SetCursorPosition sets the position of the cursor. The specified window must +// SetCursorPos sets the position of the cursor. The specified window must // be focused. If the window does not have focus when this function is called, // it fails silently. // @@ -504,12 +504,12 @@ func (w *Window) SetMouseButtonCallback(cbfun MouseButtonCallback) (previous Mou return previous, fetchError() } -type CursorPositionCallback func(w *Window, xpos float64, ypos float64) +type CursorPosCallback func(w *Window, xpos float64, ypos float64) -// SetCursorPositionCallback sets the cursor position callback which is called +// SetCursorPosCallback sets the cursor position callback which is called // when the cursor is moved. The callback is provided with the position relative // to the upper-left corner of the client area of the window. -func (w *Window) SetCursorPosCallback(cbfun CursorPositionCallback) (previous CursorPositionCallback, err error) { +func (w *Window) SetCursorPosCallback(cbfun CursorPosCallback) (previous CursorPosCallback, err error) { previous = w.fCursorPosHolder w.fCursorPosHolder = cbfun if cbfun == nil { @@ -32,7 +32,7 @@ const ( Disconnected MonitorEvent = C.GLFW_DISCONNECTED ) -// VideoMode describes a single video mode. +// VidMode describes a single video mode. type VidMode struct { Width int // The width, in pixels, of the video mode. Height int // The height, in pixels, of the video mode. @@ -77,7 +77,7 @@ func GetPrimaryMonitor() (*Monitor, error) { return &Monitor{m}, nil } -// GetPosition returns the position, in screen coordinates, of the upper-left +// GetPos returns the position, in screen coordinates, of the upper-left // corner of the monitor. func (m *Monitor) GetPos() (x, y int, err error) { var xpos, ypos C.int @@ -296,7 +296,7 @@ func (w *Window) SetTitle(title string) error { return fetchError() } -// GetPosition returns the position, in screen coordinates, of the upper-left +// GetPos returns the position, in screen coordinates, of the upper-left // corner of the client area of the window. func (w *Window) GetPos() (x, y int, err error) { var xpos, ypos C.int @@ -304,7 +304,7 @@ func (w *Window) GetPos() (x, y int, err error) { return int(xpos), int(ypos), fetchError() } -// SetPosition sets the position, in screen coordinates, of the upper-left corner +// SetPos sets the position, in screen coordinates, of the upper-left corner // of the client area of the window. // // If it is a full screen window, this function does nothing. @@ -404,7 +404,7 @@ func (w *Window) GetMonitor() (*Monitor, error) { return &Monitor{m}, nil } -// GetAttribute returns an attribute of the window. There are many attributes, +// GetAttrib returns an attribute of the window. There are many attributes, // some related to the window and others to its context. func (w *Window) GetAttrib(attrib Hint) (int, error) { return int(C.glfwGetWindowAttrib(w.data, C.int(attrib))), fetchError() @@ -423,12 +423,12 @@ func (w *Window) GetUserPointer() (unsafe.Pointer, error) { return C.glfwGetWindowUserPointer(w.data), fetchError() } -type PositionCallback func(w *Window, xpos int, ypos int) +type PosCallback func(w *Window, xpos int, ypos int) -// SetPositionCallback sets the position callback of the window, which is called +// SetPosCallback sets the position callback of the window, which is called // when the window is moved. The callback is provided with the screen position // of the upper-left corner of the client area of the window. -func (w *Window) SetPosCallback(cbfun PositionCallback) (previous PositionCallback, err error) { +func (w *Window) SetPosCallback(cbfun PosCallback) (previous PosCallback, err error) { previous = w.fPosHolder w.fPosHolder = cbfun if cbfun == nil { |