Ignore:
Timestamp:
Nov 24, 2006, 6:51:10 AM (13 years ago)
Author:
Sam Hocevar
Message:
  • Added caca_set_cursor(). Not yet functional.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcaca/trunk/caca/graphics.c

    r1392 r1430  
    178178}
    179179
     180/** \brief Show or hide the cursor.
     181 *
     182 *  Show or hide the cursor, for devices that support such a feature.
     183 *
     184 *  If an error occurs, -1 is returned and \b errno is set accordingly:
     185 *  - \c ENOSYS Display driver does not support showing the cursor.
     186 *
     187 *  \param dp The libcaca display context.
     188 *  \param flag 0 hides the cursor, 1 shows the system's default cursor
     189 *              (usually a white rectangle). Other values are reserved for
     190 *              future use.
     191 *  \return 0 upon success, -1 if an error occurred.
     192 */
     193int caca_set_cursor(caca_display_t *dp, int flag)
     194{
     195    if(!dp->drv.set_cursor)
     196    {
     197        seterrno(ENOSYS);
     198        return -1;
     199    }
     200
     201    dp->drv.set_cursor(dp, flag);
     202    return 0;
     203}
     204
    180205/** \brief Show or hide the mouse pointer.
    181206 *
Note: See TracChangeset for help on using the changeset viewer.