Subversion Repositories Kolibri OS

Rev

Go to most recent revision | Blame | Last modification | View Log | Download | RSS feed

  1. /*
  2.  * Copyright 2009 Vincent Sanders <vince@simtec.co.uk>
  3.  *
  4.  * This file is part of libnsfb, http://www.netsurf-browser.org/
  5.  * Licenced under the MIT License,
  6.  *                http://www.opensource.org/licenses/mit-license.php
  7.  *
  8.  * This is the exported interface for the libnsfb graphics library.
  9.  */
  10.  
  11. #ifndef _LIBNSFB_CURSOR_H
  12. #define _LIBNSFB_CURSOR_H 1
  13.  
  14. /** Initialise the cursor.
  15.  */
  16. bool nsfb_cursor_init(nsfb_t *nsfb);
  17.  
  18. /** Set cursor parameters.
  19.  *
  20.  * Set a cursor bitmap, the cursor will be shown at the location set by
  21.  * nsfb_cursor_loc_set. The pixel data may be referenced untill the cursor
  22.  * is altered or cleared
  23.  *
  24.  * @param nsfb       The frambuffer context
  25.  * @param pixel      The cursor bitmap data
  26.  * @param bmp_width  The width of the cursor bitmap
  27.  * @param bmp_height The height of the cursor bitmap
  28.  * @param bmp_stride The cursor bitmap's row stride
  29.  * @param hotspot_x  Coordinate within cursor image to place over cursor loc
  30.  * @param hotspot_y  Coordinate within cursor image to place over cursor loc
  31.  *
  32.  * (hot_spot_x, hot_spot_y) is from top left.  (0, 0) means top left pixel of
  33.  * cursor bitmap is to be rendered over the cursor location.
  34.  */
  35. bool nsfb_cursor_set(nsfb_t *nsfb, const nsfb_colour_t *pixel, int bmp_width, int bmp_height, int bmp_stride, int hotspot_x, int hotspot_y);
  36.  
  37. /** Set cursor location.
  38.  *
  39.  * @param nsfb The frambuffer context.
  40.  * @param loc The location of the cursor
  41.  */
  42. bool nsfb_cursor_loc_set(nsfb_t *nsfb, const nsfb_bbox_t *loc);
  43.  
  44. /** get the cursor location */
  45. bool nsfb_cursor_loc_get(nsfb_t *nsfb, nsfb_bbox_t *loc);
  46.  
  47.  
  48. #endif
  49.