console.h (223cd0e13f2e46078d7b573f0b8402bfbee339be) | console.h (e2f82e924d057935dd4c61c0c53e11b15762eda2) |
---|---|
1#ifndef CONSOLE_H 2#define CONSOLE_H 3 4#include "ui/qemu-pixman.h" 5#include "qom/object.h" 6#include "qapi/qmp/qdict.h" 7#include "qemu/notify.h" 8#include "qapi-types.h" --- 322 unchanged lines hidden (view full) --- 331 return DIV_ROUND_UP(bits, 8); 332} 333 334static inline pixman_format_code_t surface_format(DisplaySurface *s) 335{ 336 return s->format; 337} 338 | 1#ifndef CONSOLE_H 2#define CONSOLE_H 3 4#include "ui/qemu-pixman.h" 5#include "qom/object.h" 6#include "qapi/qmp/qdict.h" 7#include "qemu/notify.h" 8#include "qapi-types.h" --- 322 unchanged lines hidden (view full) --- 331 return DIV_ROUND_UP(bits, 8); 332} 333 334static inline pixman_format_code_t surface_format(DisplaySurface *s) 335{ 336 return s->format; 337} 338 |
339#ifdef CONFIG_CURSES 340/* KEY_EVENT is defined in wincon.h and in curses.h. Avoid redefinition. */ 341#undef KEY_EVENT 342#include <curses.h> 343#undef KEY_EVENT 344typedef chtype console_ch_t; 345extern chtype vga_to_curses[]; 346#else 347typedef unsigned long console_ch_t; 348#endif | 339typedef uint32_t console_ch_t; 340 |
349static inline void console_write_ch(console_ch_t *dest, uint32_t ch) 350{ | 341static inline void console_write_ch(console_ch_t *dest, uint32_t ch) 342{ |
351 uint8_t c = ch; 352#ifdef CONFIG_CURSES 353 if (vga_to_curses[c]) { 354 ch &= ~(console_ch_t)0xff; 355 ch |= vga_to_curses[c]; 356 } 357#else 358 if (c == '\0') { 359 ch |= ' '; 360 } 361#endif | |
362 *dest = ch; 363} 364 365typedef struct GraphicHwOps { 366 void (*invalidate)(void *opaque); 367 void (*gfx_update)(void *opaque); 368 void (*text_update)(void *opaque, console_ch_t *text); 369 void (*update_interval)(void *opaque, uint64_t interval); --- 164 unchanged lines hidden --- | 343 *dest = ch; 344} 345 346typedef struct GraphicHwOps { 347 void (*invalidate)(void *opaque); 348 void (*gfx_update)(void *opaque); 349 void (*text_update)(void *opaque, console_ch_t *text); 350 void (*update_interval)(void *opaque, uint64_t interval); --- 164 unchanged lines hidden --- |