Changeset 3781092 in mainline for uspace/srv/hid/fb/fb.h


Ignore:
Timestamp:
2011-09-09T18:22:33Z (13 years ago)
Author:
Maurizio Lombardi <m.lombardi85@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
40a2af3
Parents:
980671e7 (diff), 5da7199 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

merge mainline changes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/hid/fb/fb.h

    r980671e7 r3781092  
    11/*
    2  * Copyright (c) 2006 Ondrej Palkovsky
     2 * Copyright (c) 2011 Martin Decky
    33 * All rights reserved.
    44 *
     
    2727 */
    2828
    29 /** @addtogroup fb
    30  * @ingroup fbs
    31  * @{
    32  */
    33 /** @file
    34  */
    35 
    3629#ifndef FB_FB_H_
    3730#define FB_FB_H_
    3831
    39 #include <stdint.h>
     32#include <sys/types.h>
     33#include <bool.h>
     34#include <loc.h>
     35#include <io/console.h>
     36#include <io/style.h>
     37#include <io/color.h>
     38#include <fb.h>
     39#include <screenbuffer.h>
     40#include <imgmap.h>
    4041
    41 extern int fb_init(void);
     42struct fbdev;
     43struct fbvp;
     44
     45typedef struct {
     46        int (* yield)(struct fbdev *dev);
     47        int (* claim)(struct fbdev *dev);
     48        void (* pointer_update)(struct fbdev *dev, sysarg_t x, sysarg_t y,
     49            bool visible);
     50       
     51        int (* get_resolution)(struct fbdev *dev, sysarg_t *width,
     52            sysarg_t *height);
     53        void (* font_metrics)(struct fbdev *dev, sysarg_t width,
     54            sysarg_t height, sysarg_t *cols, sysarg_t *rows);
     55       
     56        int (* vp_create)(struct fbdev *dev, struct fbvp *vp);
     57        void (* vp_destroy)(struct fbdev *dev, struct fbvp *vp);
     58       
     59        void (* vp_clear)(struct fbdev *dev, struct fbvp *vp);
     60        console_caps_t (* vp_get_caps)(struct fbdev *dev, struct fbvp *vp);
     61       
     62        void (* vp_cursor_update)(struct fbdev *dev, struct fbvp *vp,
     63            sysarg_t prev_col, sysarg_t prev_row, sysarg_t col, sysarg_t row,
     64            bool visible);
     65        void (* vp_cursor_flash)(struct fbdev *dev, struct fbvp *vp,
     66            sysarg_t col, sysarg_t row);
     67       
     68        void (* vp_char_update)(struct fbdev *dev, struct fbvp *vp, sysarg_t col,
     69            sysarg_t row);
     70       
     71        void (* vp_imgmap_damage)(struct fbdev *dev, struct fbvp *vp,
     72            imgmap_t *imgmap, sysarg_t col, sysarg_t row, sysarg_t cols,
     73            sysarg_t rows);
     74} fbdev_ops_t;
     75
     76typedef struct fbdev {
     77        link_t link;
     78       
     79        atomic_t refcnt;
     80        bool claimed;
     81       
     82        sysarg_t index;
     83        service_id_t dsid;
     84        struct fbvp *active_vp;
     85       
     86        list_t vps;
     87        list_t frontbufs;
     88        list_t imagemaps;
     89        list_t sequences;
     90       
     91        fbdev_ops_t ops;
     92        void *data;
     93} fbdev_t;
     94
     95typedef struct fbvp {
     96        link_t link;
     97       
     98        sysarg_t x;
     99        sysarg_t y;
     100       
     101        sysarg_t width;
     102        sysarg_t height;
     103       
     104        sysarg_t cols;
     105        sysarg_t rows;
     106       
     107        char_attrs_t attrs;
     108        list_t sequences;
     109       
     110        screenbuffer_t *backbuf;
     111        sysarg_t top_row;
     112       
     113        bool cursor_active;
     114        bool cursor_flash;
     115       
     116        void *data;
     117} fbvp_t;
     118
     119typedef struct {
     120        link_t link;
     121       
     122        size_t size;
     123        unsigned int flags;
     124        void *data;
     125} frontbuf_t;
     126
     127typedef struct {
     128        link_t link;
     129        link_t seq_link;
     130       
     131        size_t size;
     132        unsigned int flags;
     133        void *data;
     134} imagemap_t;
     135
     136typedef struct {
     137        link_t link;
     138       
     139        list_t imagemaps;
     140        size_t count;
     141} sequence_t;
     142
     143typedef struct {
     144        link_t link;
     145       
     146        sequence_t *seq;
     147        size_t current;
     148} sequence_vp_t;
     149
     150extern fbdev_t *fbdev_register(fbdev_ops_t *, void *);
    42151
    43152#endif
    44 
    45 /** @}
    46  */
Note: See TracChangeset for help on using the changeset viewer.