Changeset 1231 for libcaca/trunk
- Timestamp:
- Oct 26, 2006, 12:06:21 AM (16 years ago)
- Location:
- libcaca/trunk
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
libcaca/trunk/caca/event.c
r1006 r1231 43 43 /** \brief Get the next mouse or keyboard input event. 44 44 * 45 * This function polls the event queue for mouse or keyboard events matching46 * the event mask and returns the first matching event. Non-matching events47 * arediscarded. If \c event_mask is zero, the function returns immediately.45 * Poll the event queue for mouse or keyboard events matching the event 46 * mask and return the first matching event. Non-matching events are 47 * discarded. If \c event_mask is zero, the function returns immediately. 48 48 * 49 49 * The timeout value tells how long this function needs to wait for an … … 115 115 /** \brief Return the X mouse coordinate. 116 116 * 117 * This function returnsthe X coordinate of the mouse position last time117 * Return the X coordinate of the mouse position last time 118 118 * it was detected. This function is not reliable if the ncurses or S-Lang 119 119 * drivers are being used, because mouse position is only detected when … … 135 135 /** \brief Return the Y mouse coordinate. 136 136 * 137 * This function returnsthe Y coordinate of the mouse position last time137 * Return the Y coordinate of the mouse position last time 138 138 * it was detected. This function is not reliable if the ncurses or S-Lang 139 139 * drivers are being used, because mouse position is only detected when -
libcaca/trunk/caca/graphics.c
r1006 r1231 90 90 /** \brief Set the refresh delay. 91 91 * 92 * This function sets the refresh delay in microseconds. The refresh delay93 * is used bycaca_refresh_display() to achieve constant framerate. See the92 * Set the refresh delay in microseconds. The refresh delay is used by 93 * caca_refresh_display() to achieve constant framerate. See the 94 94 * caca_refresh_display() documentation for more details. 95 95 * … … 111 111 /** \brief Get the display's average rendering time. 112 112 * 113 * This function returns the average rendering time, which is the average114 * measured time between two caca_refresh_display() calls, in microseconds. If115 * constant framerate was activated by calling caca_set_display_time(), the116 * average rendering time will not be considerably shorter than the requested117 * delay even if the realrendering time was shorter.113 * Get the average rendering time, which is the average measured time 114 * between two caca_refresh_display() calls, in microseconds. If constant 115 * framerate was activated by calling caca_set_display_time(), the average 116 * rendering time will be close to the requested delay even if the real 117 * rendering time was shorter. 118 118 * 119 119 * This function never fails. … … 129 129 /** \brief Flush pending changes and redraw the screen. 130 130 * 131 * This function flushes all graphical operations and prints them to the 132 * screen. Nothing will show on the screen until caca_refresh_display() is 133 * called. 131 * Flush all graphical operations and print them to the display device. 132 * Nothing will show on the screen until this function is called. 134 133 * 135 134 * If caca_set_display_time() was called with a non-zero value, … … 183 182 /** \brief Show or hide the mouse pointer. 184 183 * 185 * This function shows or hides the mouse pointer, for devices that 186 * support it. 184 * Show or hide the mouse pointer, for devices that support such a feature. 187 185 * 188 186 * If an error occurs, -1 is returned and \b errno is set accordingly: -
libcaca/trunk/cucul/buffer.c
r1048 r1231 30 30 /** \brief Load a memory area into a buffer. 31 31 * 32 * This function creates a \e libcucul buffer that points to the given33 * memory area. The data is not duplicated and any changes made to the34 * original memory areaappear in the buffer.32 * Create a \e libcucul buffer that points to the given memory area. The 33 * data is not duplicated and any changes made to the original memory area 34 * will appear in the buffer. 35 35 * 36 36 * \param data The memory area to load. … … 56 56 /** \brief Load a file into a buffer. 57 57 * 58 * This function loads a file into memory and returns a \e libcucul buffer59 * for use withother functions.58 * Load a file into memory and returns a \e libcucul buffer for use with 59 * other functions. 60 60 * 61 61 * \param file The filename … … 103 103 /** \brief Get the buffer size. 104 104 * 105 * This function returns the length (in bytes) of the memory area stored106 * in the given\e libcucul buffer.105 * Return the length (in bytes) of the memory area stored in the given 106 * \e libcucul buffer. 107 107 * 108 108 * This function never fails. … … 118 118 /** \brief Get the buffer data. 119 119 * 120 * This function returnsa pointer to the memory area stored in the given120 * Get a pointer to the memory area stored in the given 121 121 * \e libcucul buffer. 122 122 * … … 133 133 /** \brief Free a buffer. 134 134 * 135 * This function frees the structures associated with the given 136 * \e libcucul buffer. 135 * Free the structures associated with the given \e libcucul buffer. 137 136 * 138 137 * This function never fails. -
libcaca/trunk/cucul/canvas.c
r1224 r1231 44 44 /** \brief Print an ASCII or Unicode character. 45 45 * 46 * This function prints an ASCII or Unicode character at the given47 * coordinates, using the default foreground and backgroundvalues.46 * Print an ASCII or Unicode character at the given coordinates, using 47 * the default foreground and background colour values. 48 48 * 49 49 * If the coordinates are outside the canvas boundaries, nothing is printed. 50 * If a fullwidth Unicode character gets overwritten, its remaining parts51 * are replaced with spaces. If the canvas' boundaries would split the50 * If a fullwidth Unicode character gets overwritten, its remaining visible 51 * parts are replaced with spaces. If the canvas' boundaries would split the 52 52 * fullwidth character in two, a space is printed instead. 53 53 * … … 126 126 /** \brief Get the Unicode character at the given coordinates. 127 127 * 128 * This function gets the ASCII or Unicode value of the character at129 * the givencoordinates. If the value is less or equal to 127 (0x7f),128 * Get the ASCII or Unicode value of the character at the given 129 * coordinates. If the value is less or equal to 127 (0x7f), 130 130 * the character can be printed as ASCII. Otherise, it must be handled 131 131 * as a UTF-32 value. … … 145 145 * \param y Y coordinate. 146 146 * \param ch The requested character value. 147 * \return Th e characteralways returns 0.147 * \return This function always returns 0. 148 148 */ 149 149 unsigned long int cucul_getchar(cucul_canvas_t *cv, int x, int y) … … 157 157 /** \brief Print a string. 158 158 * 159 * This function prints an UTF-8 string at the given coordinates, using the160 * default foreground and background values. The coordinates may be outside161 * thecanvas boundaries (eg. a negative Y coordinate) and the string will159 * Print an UTF-8 string at the given coordinates, using the default 160 * foreground and background values. The coordinates may be outside the 161 * canvas boundaries (eg. a negative Y coordinate) and the string will 162 162 * be cropped accordingly if it is too long. 163 163 * … … 199 199 /** \brief Print a formated string. 200 200 * 201 * This function formats a string at the given coordinates, using the202 * default foreground and background values. The coordinates may be outside203 * the canvas boundaries (eg. a negative Y coordinate) and the string will204 * be cropped accordingly if it is too long. The syntax of the format205 * s tring is the same as for the C printf() function.201 * Format a string at the given coordinates, using the default foreground 202 * and background values. The coordinates may be outside the canvas 203 * boundaries (eg. a negative Y coordinate) and the string will be cropped 204 * accordingly if it is too long. The syntax of the format string is the 205 * same as for the C printf() function. 206 206 * 207 207 * This function never fails. … … 245 245 /** \brief Clear the canvas. 246 246 * 247 * This function clears the canvas using the current background colour.247 * Clear the canvas using the current foreground and background colours. 248 248 * 249 249 * This function never fails. … … 268 268 /** \brief Blit a canvas onto another one. 269 269 * 270 * This function blitsa canvas onto another one at the given coordinates.270 * Blit a canvas onto another one at the given coordinates. 271 271 * An optional mask canvas can be used. 272 272 * … … 349 349 /** \brief Set a canvas' new boundaries. 350 350 * 351 * This function sets new boundaries for a canvas. Itcan be used to crop a351 * Set new boundaries for a canvas. This function can be used to crop a 352 352 * canvas, to expand it or for combinations of both actions. 353 353 * -
libcaca/trunk/cucul/charset.c
r1211 r1231 95 95 /** \brief Convert a UTF-8 character to UTF-32. 96 96 * 97 * This function converts a UTF-8 character read from a string and returns98 * its value in the UTF-32 character set. If the second argument is not null,99 * the totalnumber of read bytes is written in it.97 * Convert a UTF-8 character read from a string and return its value in 98 * the UTF-32 character set. If the second argument is not null, the total 99 * number of read bytes is written in it. 100 100 * 101 101 * If a null byte was reached before the expected end of the UTF-8 sequence, … … 139 139 /** \brief Convert a UTF-32 character to UTF-8. 140 140 * 141 * This function converts a UTF-32 character read from a string and writes142 * its value inthe UTF-8 character set into the given buffer.141 * Convert a UTF-32 character read from a string and write its value in 142 * the UTF-8 character set into the given buffer. 143 143 * 144 144 * This function never fails, but its behaviour with illegal UTF-32 characters … … 182 182 /** \brief Convert a UTF-32 character to CP437. 183 183 * 184 * This function converts a UTF-32 character read from a string and returns 185 * its value in the CP437 character set, or "?" if the character has no 186 * equivalent. 184 * Convert a UTF-32 character read from a string and return its value in 185 * the CP437 character set, or "?" if the character has no equivalent. 187 186 * 188 187 * This function never fails. … … 214 213 /** \brief Convert a CP437 character to UTF-32. 215 214 * 216 * This function converts a CP437 character read from a string and returns217 * its value in the UTF-32 character set, or zero if the character is a218 * CP437 controlcharacter.215 * Convert a CP437 character read from a string and return its value in 216 * the UTF-32 character set, or zero if the character is a CP437 control 217 * character. 219 218 * 220 219 * This function never fails. … … 239 238 /** \brief Tell whether a UTF-32 character is fullwidth. 240 239 * 241 * This function returns 1 if the given UTF-32 character should be 242 * printed at twice the normal width (fullwidth), or 0 if it is a 243 * standard-width character or if the library does not know. 240 * Check whether the given UTF-32 character should be printed at twice 241 * the normal width (fullwidth characters). If the character is unknown 242 * or if its status cannot be decided, it is treated as a standard-width 243 * character. 244 244 * 245 245 * This function never fails. -
libcaca/trunk/cucul/colour.c
r1092 r1231 38 38 /** \brief Set the default colour pair. 39 39 * 40 * This function sets the default ANSI colour pair. String functions such as40 * Set the default ANSI colour pair for drawing. String functions such as 41 41 * caca_printf() and graphical primitive functions such as caca_draw_line() 42 42 * will use these colours. … … 71 71 /** \brief Set the default colour pair (truecolor version). 72 72 * 73 * This function sets the default colour pair. String functions such as73 * Set the default colour pair for drawing. String functions such as 74 74 * caca_printf() and graphical primitive functions such as caca_draw_line() 75 75 * will use these colours. … … 111 111 /** \brief Get the colour pair at the given coordinates. 112 112 * 113 * This function gets the internal \e libcucul colour pair value ofthe114 * character at the given coordinates. The colour pair value has 32115 * significant bits: the lower 16 are for the foreground colour, the higher116 * 16 are forthe background.113 * Get the internal \e libcucul colour pair value of the character at the 114 * given coordinates. The colour pair value has 32 significant bits: the 115 * lower 16 bits are for the foreground colour, the higher 16 bits are for 116 * the background. 117 117 * 118 118 * If the coordinates are outside the canvas boundaries, the current colour -
libcaca/trunk/cucul/cucul.c
r1148 r1231 39 39 /** \brief Initialise a \e libcucul canvas. 40 40 * 41 * This function initialises internal \e libcucul structures and the backend42 * that will be used for subsequent graphical operations. It must be the43 * first\e libcucul function to be called in a function. cucul_free_canvas()41 * Initialise internal \e libcucul structures and the backend that will 42 * be used for subsequent graphical operations. It must be the first 43 * \e libcucul function to be called in a function. cucul_free_canvas() 44 44 * should be called at the end of the program to free all allocated resources. 45 45 * … … 125 125 /** \brief Resize a canvas. 126 126 * 127 * This function sets the canvaswidth and height, in character cells.127 * Set the canvas' width and height, in character cells. 128 128 * 129 129 * The contents of the canvas are preserved to the extent of the new … … 164 164 /** \brief Get the canvas width. 165 165 * 166 * This function returns the current canvaswidth, in character cells.166 * Return the current canvas' width, in character cells. 167 167 * 168 168 * This function never fails. … … 178 178 /** \brief Get the canvas height. 179 179 * 180 * This function returns the current canvasheight, in character cells.180 * Returns the current canvas' height, in character cells. 181 181 * 182 182 * This function never fails. … … 192 192 /** \brief Translate a colour index into the colour's name. 193 193 * 194 * T his function translates a cucul_color enum into a human-readable195 * description string of the associatedcolour.194 * Translate a cucul_color enum into a human-readable string describing 195 * the corresponding colour. 196 196 * 197 197 * This function never fails. … … 231 231 /** \brief Uninitialise \e libcucul. 232 232 * 233 * This function freesall resources allocated by cucul_create_canvas(). After234 * cucul_free_canvas()has been called, no other \e libcucul functions may be233 * Free all resources allocated by cucul_create_canvas(). After 234 * this function has been called, no other \e libcucul functions may be 235 235 * used unless a new call to cucul_create_canvas() is done. 236 236 * … … 270 270 271 271 /** \brief Generate a random integer within a range. 272 * 273 * Generate a random integer within the given range. 272 274 * 273 275 * This function never fails. -
libcaca/trunk/cucul/import.c
r1219 r1231 48 48 /** \brief Import a buffer into a canvas 49 49 * 50 * This function importsa libcucul buffer as returned by cucul_load_memory()50 * Import a libcucul buffer as returned by cucul_load_memory() 51 51 * or cucul_load_file() into an internal libcucul canvas. 52 52 * … … 55 55 * - \c "text": import ASCII text files. 56 56 * - \c "ansi": import ANSI files. 57 * - \c "utf8": import UTF-8 files with ANSI colour files.57 * - \c "utf8": import UTF-8 files with ANSI colour codes. 58 58 * - \c "caca": import native libcaca files. 59 59 * -
libcaca/trunk/cucul/sprite.c
r920 r1231 33 33 /** \brief Get the number of frames in a canvas. 34 34 * 35 * This function returns the current canvasframe count.35 * Return the current canvas' frame count. 36 36 * 37 37 * This function never fails. … … 47 47 /** \brief Activate a given canvas frame. 48 48 * 49 * This function sets the active canvas frame. All subsequent drawing50 * operations will be performed on that frame. The current painting51 * c ontext set by cucul_set_color() or cucul_set_truecolor() is inherited.49 * Set the active canvas frame. All subsequent drawing operations will 50 * be performed on that frame. The current painting context set by 51 * cucul_set_color() or cucul_set_truecolor() is inherited. 52 52 * 53 53 * If the frame index is outside the canvas' frame range, nothing happens. … … 80 80 /** \brief Add a frame to a canvas. 81 81 * 82 * This function creates a new frame within the given canvas. Its contents83 * are copiedfrom the currently active frame.82 * Create a new frame within the given canvas. Its contents are copied 83 * from the currently active frame. 84 84 * 85 85 * The frame index indicates where the frame should be inserted. Valid … … 132 132 /** \brief Remove a frame from a canvas. 133 133 * 134 * This function deletes a frame from a given canvas. 135 * 136 * It is not legal to remove the last frame from a canvas. Such a request 137 * will be ignored by cucul_free_canvas_frame(). 134 * Delete a frame from a given canvas. 138 135 * 139 136 * The frame index indicates the frame to delete. Valid values range from -
libcaca/trunk/cucul/transform.c
r1230 r1231 31 31 /** \brief Invert a canvas' colours. 32 32 * 33 * This function inverts a canvas' colours (black becomes white, red34 * becomes cyan, etc.)without changing the characters in it.33 * Invert a canvas' colours (black becomes white, red becomes cyan, etc.) 34 * without changing the characters in it. 35 35 * 36 36 * This function never fails. … … 55 55 /** \brief Flip a canvas horizontally. 56 56 * 57 * This function flips a canvas horizontally, choosing characters that58 * look like themirrored version wherever possible.57 * Flip a canvas horizontally, choosing characters that look like the 58 * mirrored version wherever possible. 59 59 * 60 60 * This function never fails. … … 112 112 /** \brief Flip a canvas vertically. 113 113 * 114 * This function flips a canvas vertically, choosing characters that115 * look like themirrored version wherever possible.114 * Flip a canvas vertically, choosing characters that look like the 115 * mirrored version wherever possible. 116 116 * 117 117 * This function never fails. … … 155 155 /** \brief Rotate a canvas. 156 156 * 157 * This function applies a 180 degrees transformation to a canvas, 158 * choosing characters that look like the mirrored version wherever 159 * possible. 157 * Apply a 180-degree transformation to a canvas, choosing characters 158 * that look like the upside-down version wherever possible. 160 159 * 161 160 * This function never fails.
Note: See TracChangeset
for help on using the changeset viewer.