- Author
- Albert Huang aka alberthrocks alber.nosp@m.thro.nosp@m.cks.p.nosp@m.ubli.nosp@m.c@gma.nosp@m.il.c.nosp@m.om
-
Julian Mackeben aka compu compu.nosp@m.juck.nosp@m.el@go.nosp@m.ogle.nosp@m.mail..nosp@m.com
- Version
- 3.0
LICENSE
This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
DESCRIPTION
Cursor functions
void nio_cursor_custom |
( |
nio_console * |
c, |
|
|
unsigned char |
cursor_data[6] |
|
) |
| |
Sets the console cursor width.
- Parameters
-
c | Console |
cursor_data | The custom cursor data. This is in the form of a char[6] array. This pretty much uses the format (and the drawing code) for character drawing, so take a look at charmap.h for examples. Note that the characters in charmap.h are truncated, so they will display differently. |
By default, if this is not specified and the cursor type is set to the custom cursor type (3), the custom cursor will be set to {0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF} (a block cursor).
void nio_cursor_width |
( |
nio_console * |
c, |
|
|
int |
cursor_width |
|
) |
| |
Sets the console cursor width.
- Parameters
-
c | Console |
cursor_width | The cursor line width. This only applies to cursors 1 and 2 (underscore and vertical bar). All others cursor types will not be affected by this setting. |
For the underscore cursor, it must be greater than 0 and less than or equal to CHAR_HEIGHT (as defined by charmap.h). At the time of writing, CHAR_HEIGHT is 8. Therefore, for an underscore cursor, 0 < cursor_width <= 8.
For a vertical bar cursor, it must be greater than 0 and less than or equal to CHAR_WIDTH (as defined by charmap.h). At the time of writing, CHAR_WIDTH is 6. Therefore, for a vertical bar cursor, 0 < cursor_width < 6.
If you wish to draw a blank cursor, you probably should disable the cursor altogether with EnableCursor(nio_console, FALSE).
Note that if you specify an out-of-range value, NspireIO will silently fail and reset the cursor width to 1.