Documentation work.

This commit is contained in:
Camilla Berglund
2014-10-02 17:35:10 +02:00
parent 4dd669661b
commit 95654cfada
13 changed files with 207 additions and 153 deletions

View File

@@ -65,7 +65,7 @@ glfwPostEmptyEvent.
glfwPostEmptyEvent();
@endcode
Do not assume that callbacks will *only* be called through either of the above
Do not assume that callbacks will _only_ be called through either of the above
functions. While it is necessary to process events in the event queue, some
window systems will send some events directly to the application, which in turn
causes callbacks to be called outside of regular event processing.
@@ -86,7 +86,7 @@ same keyboard layout, input method or even operating system as you.
@subsection input_key Key input
If you wish to be notified when a physical key is pressed or released or when it
repeats, set a key callback with @ref glfwSetKeyCallback.
repeats, set a key callback.
@code
glfwSetKeyCallback(window, key_callback);
@@ -110,7 +110,7 @@ have unique, if platform-specific scancodes.
The scancode is unique for every key but is platform-specific, so a scancode
will map to different keys on different platforms.
The key will be `GLFW_KEY_UNKNOWN` for special keys like *E-mail* or *Play* that
The key will be `GLFW_KEY_UNKNOWN` for special keys like _E-mail_ or _Play_ that
don't have a key token. Those keys will still have unique, if platform-specific
scancodes.
@@ -148,8 +148,7 @@ The `GLFW_KEY_LAST` constant holds the highest value of any
@subsection input_char Unicode character input
If you wish to receive Unicode code point input, set a character callback with
@ref glfwSetCharCallback.
If you wish to receive Unicode code point input, set a character callback.
@code
glfwSetCharCallback(window, character_callback);
@@ -166,7 +165,7 @@ void character_callback(GLFWwindow* window, unsigned int codepoint)
If you wish to receive all Unicode code point events generated by the system, or
just want to know exactly what modifier keys were used, set a character with
modifiers callback with @ref glfwSetCharModsCallback.
modifiers callback.
@code
glfwSetCharCallback(window, charmods_callback);
@@ -192,7 +191,7 @@ these are supported by GLFW.
@subsection input_cursor_pos Cursor position
If you wish to be notified when the system cursor moves over the window, set
a cursor position callback with @ref glfwSetCursorPosCallback.
a cursor position callback.
@code
glfwSetCursorPosCallback(window, cursor_pos_callback);
@@ -287,6 +286,9 @@ image.pixels = pixels;
GLFWcursor* cursor = glfwCreateCursor(&image, 0, 0);
@endcode
If cursor creation fails, `NULL` will be returned, so it is necessary to check
the return value.
The image data is 32-bit RGBA, i.e. eight bits per channel. The pixels are
arranged canonically as sequental rows, starting from the top-left corner.
@@ -299,7 +301,7 @@ When a cursor is no longer needed, destroy it with @ref glfwDestroyCursor.
glfwDestroyCursor(cursor);
@endcode
Cursor destruction always succeeds. All cursors remaining at the time of @ref
Cursor destruction always succeeds. All cursors remaining when @ref
glfwTerminate is called are destroyed as well.
@@ -330,7 +332,7 @@ does not affect the cursor modes of those windows.
@subsection input_cursor_enter Cursor enter/leave events
If you wish to be notified when the cursor enters or leaves the client area of
a window, set a cursor enter/leave callback with @ref glfwSetCursorEnterCallback.
a window, set a cursor enter/leave callback.
@code
glfwSetCursorEnterCallback(window, cursor_enter_callback);
@@ -356,7 +358,7 @@ void cursor_enter_callback(GLFWwindow* window, int entered)
@subsection input_mouse_button Mouse button input
If you wish to be notified when a mouse button is pressed or released, set
a mouse button callback with @ref glfwSetMouseButtonCallback.
a mouse button callback.
@code
glfwSetMouseButtonCallback(window, mouse_button_callback);
@@ -412,7 +414,7 @@ The `GLFW_MOUSE_BUTTON_LAST` constant holds the highest value of any
@subsection input_scroll Scroll input
If you wish to be notified when the user scrolls, whether with a mouse wheel or
touchpad gesture, set a scroll callback with @ref glfwSetScrollCallback.
touchpad gesture, set a scroll callback.
@code
glfwSetScrollCallback(window, scroll_callback);
@@ -539,7 +541,7 @@ window may be used.
@section input_drop Path drop input
If you wish to receive the paths of files and/or directories dropped on
a window, set a file drop callback with @ref glfwSetDropCallback.
a window, set a file drop callback.
@code
glfwSetDropCallback(window, drop_callback);