Subversion Repositories Kolibri OS

Rev

Rev 2340 | Rev 2344 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed

  1.  
  2. typedef struct tag_object  kobj_t;
  3. typedef struct tag_display display_t;
  4.  
  5. struct hman
  6. {
  7.     u32  *table;
  8.     u32   next;
  9.     u32   avail;
  10.     u32   count;
  11. };
  12.  
  13. extern struct hman bm_man;
  14.  
  15. int init_hman(struct hman *man, u32 count);
  16. u32  alloc_handle(struct hman *man);
  17. int free_handle(struct hman *man, u32 handle);
  18.  
  19. #define hman_get_data(man, handle)                  \
  20.         ((man)->table[(handle)-1])
  21.  
  22. #define hman_set_data(man, handle, val)             \
  23.         ((man)->table[(handle)-1]) = (u32)(val)
  24.  
  25.  
  26. struct tag_object
  27. {
  28.     uint32_t   magic;
  29.     void      *destroy;
  30.     kobj_t    *fd;
  31.     kobj_t    *bk;
  32.     uint32_t   pid;
  33. };
  34.  
  35. typedef struct
  36. {
  37.     kobj_t   header;
  38.  
  39.     u32       handle;
  40.     u32       width;
  41.     u32       height;
  42.     u32       pitch;
  43.     u32       gaddr;
  44.     void     *uaddr;
  45.     struct drm_i915_gem_object *obj;
  46. }bitmap_t;
  47.  
  48.  
  49. struct ubitmap
  50. {
  51.     u32    width;
  52.     u32    height;
  53.     u32    pitch;
  54.     u32    handle;
  55.     void  *data;
  56. };
  57.  
  58. int create_bitmap(struct ubitmap *pbitmap);
  59. int init_bitmaps();
  60.  
  61.