Subversion Repositories Kolibri OS

Rev

Rev 2342 | Rev 2351 | 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.     void    *uaddr;
  41.  
  42.     u32     pitch;
  43.     u32     gaddr;
  44.  
  45.     u32     width;
  46.     u32     height;
  47.     u32     max_width;
  48.     u32     max_height;
  49.  
  50.     u32     format;
  51.     struct drm_i915_gem_object *obj;
  52. }bitmap_t;
  53.  
  54.  
  55. struct  io_call_10         /*     SRV_CREATE_SURFACE    */
  56. {
  57.     u32     handle;       // ignored
  58.     void   *data;         // ignored
  59.  
  60.     u32     width;
  61.     u32     height;
  62.     u32     pitch;        // ignored
  63.  
  64.     u32     max_width;
  65.     u32     max_height;
  66.     u32     format;       // reserved mbz
  67. };
  68.  
  69. int create_surface(struct io_call_10 *pbitmap);
  70. int init_bitmaps();
  71.  
  72.