Changeset 432a269 in mainline for uspace/srv/hid/fb/fb.h
- Timestamp:
- 2011-09-16T21:13:57Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 3a11f17
- Parents:
- c0e53ff (diff), fd07e526 (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. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/hid/fb/fb.h
rc0e53ff r432a269 1 1 /* 2 * Copyright (c) 20 06 Ondrej Palkovsky2 * Copyright (c) 2011 Martin Decky 3 3 * All rights reserved. 4 4 * … … 27 27 */ 28 28 29 /** @addtogroup fb30 * @ingroup fbs31 * @{32 */33 /** @file34 */35 36 29 #ifndef FB_FB_H_ 37 30 #define FB_FB_H_ 38 31 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> 40 41 41 extern int fb_init(void); 42 struct fbdev; 43 struct fbvp; 44 45 typedef 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 76 typedef 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 95 typedef 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 119 typedef struct { 120 link_t link; 121 122 size_t size; 123 unsigned int flags; 124 void *data; 125 } frontbuf_t; 126 127 typedef 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 136 typedef struct { 137 link_t link; 138 139 list_t imagemaps; 140 size_t count; 141 } sequence_t; 142 143 typedef struct { 144 link_t link; 145 146 sequence_t *seq; 147 size_t current; 148 } sequence_vp_t; 149 150 extern fbdev_t *fbdev_register(fbdev_ops_t *, void *); 42 151 43 152 #endif 44 45 /** @}46 */
Note:
See TracChangeset
for help on using the changeset viewer.