Diff for /qemu/console.h between versions 1.1.1.4 and 1.1.1.10

version 1.1.1.4, 2018/04/24 17:20:49 version 1.1.1.10, 2018/04/24 19:34:30
Line 2 Line 2
 #define CONSOLE_H  #define CONSOLE_H
   
 #include "qemu-char.h"  #include "qemu-char.h"
   #include "qdict.h"
   #include "notify.h"
   #include "monitor.h"
   #include "trace.h"
   
 /* keyboard/mouse support */  /* keyboard/mouse support */
   
Line 9 Line 13
 #define MOUSE_EVENT_RBUTTON 0x02  #define MOUSE_EVENT_RBUTTON 0x02
 #define MOUSE_EVENT_MBUTTON 0x04  #define MOUSE_EVENT_MBUTTON 0x04
   
   /* identical to the ps/2 keyboard bits */
   #define QEMU_SCROLL_LOCK_LED (1 << 0)
   #define QEMU_NUM_LOCK_LED    (1 << 1)
   #define QEMU_CAPS_LOCK_LED   (1 << 2)
   
 /* in ms */  /* in ms */
 #define GUI_REFRESH_INTERVAL 30  #define GUI_REFRESH_INTERVAL 30
   
 typedef void QEMUPutKBDEvent(void *opaque, int keycode);  typedef void QEMUPutKBDEvent(void *opaque, int keycode);
   typedef void QEMUPutLEDEvent(void *opaque, int ledstate);
 typedef void QEMUPutMouseEvent(void *opaque, int dx, int dy, int dz, int buttons_state);  typedef void QEMUPutMouseEvent(void *opaque, int dx, int dy, int dz, int buttons_state);
   
 typedef struct QEMUPutMouseEntry {  typedef struct QEMUPutMouseEntry {
Line 21  typedef struct QEMUPutMouseEntry { Line 31  typedef struct QEMUPutMouseEntry {
     int qemu_put_mouse_event_absolute;      int qemu_put_mouse_event_absolute;
     char *qemu_put_mouse_event_name;      char *qemu_put_mouse_event_name;
   
       int index;
   
     /* used internally by qemu for handling mice */      /* used internally by qemu for handling mice */
     struct QEMUPutMouseEntry *next;      QTAILQ_ENTRY(QEMUPutMouseEntry) node;
 } QEMUPutMouseEntry;  } QEMUPutMouseEntry;
   
   typedef struct QEMUPutLEDEntry {
       QEMUPutLEDEvent *put_led;
       void *opaque;
       QTAILQ_ENTRY(QEMUPutLEDEntry) next;
   } QEMUPutLEDEntry;
   
 void qemu_add_kbd_event_handler(QEMUPutKBDEvent *func, void *opaque);  void qemu_add_kbd_event_handler(QEMUPutKBDEvent *func, void *opaque);
   void qemu_remove_kbd_event_handler(void);
 QEMUPutMouseEntry *qemu_add_mouse_event_handler(QEMUPutMouseEvent *func,  QEMUPutMouseEntry *qemu_add_mouse_event_handler(QEMUPutMouseEvent *func,
                                                 void *opaque, int absolute,                                                  void *opaque, int absolute,
                                                 const char *name);                                                  const char *name);
 void qemu_remove_mouse_event_handler(QEMUPutMouseEntry *entry);  void qemu_remove_mouse_event_handler(QEMUPutMouseEntry *entry);
   void qemu_activate_mouse_event_handler(QEMUPutMouseEntry *entry);
   
   QEMUPutLEDEntry *qemu_add_led_event_handler(QEMUPutLEDEvent *func, void *opaque);
   void qemu_remove_led_event_handler(QEMUPutLEDEntry *entry);
   
 void kbd_put_keycode(int keycode);  void kbd_put_keycode(int keycode);
   void kbd_put_ledstate(int ledstate);
 void kbd_mouse_event(int dx, int dy, int dz, int buttons_state);  void kbd_mouse_event(int dx, int dy, int dz, int buttons_state);
   
   /* Does the current mouse generate absolute events */
 int kbd_mouse_is_absolute(void);  int kbd_mouse_is_absolute(void);
   void qemu_add_mouse_mode_change_notifier(Notifier *notify);
   void qemu_remove_mouse_mode_change_notifier(Notifier *notify);
   
   /* Of all the mice, is there one that generates absolute events */
   int kbd_mouse_has_absolute(void);
   
 struct MouseTransformInfo {  struct MouseTransformInfo {
     /* Touchscreen resolution */      /* Touchscreen resolution */
Line 43  struct MouseTransformInfo { Line 74  struct MouseTransformInfo {
     int a[7];      int a[7];
 };  };
   
 void do_info_mice(Monitor *mon);  void do_mouse_set(Monitor *mon, const QDict *qdict);
 void do_mouse_set(Monitor *mon, int index);  
   
 /* keysym is a unicode code except for special keys (see QEMU_KEY_xxx  /* keysym is a unicode code except for special keys (see QEMU_KEY_xxx
    constants) */     constants) */
Line 97  struct DisplaySurface { Line 127  struct DisplaySurface {
     struct PixelFormat pf;      struct PixelFormat pf;
 };  };
   
   /* cursor data format is 32bit RGBA */
   typedef struct QEMUCursor {
       int                 width, height;
       int                 hot_x, hot_y;
       int                 refcount;
       uint32_t            data[];
   } QEMUCursor;
   
   QEMUCursor *cursor_alloc(int width, int height);
   void cursor_get(QEMUCursor *c);
   void cursor_put(QEMUCursor *c);
   QEMUCursor *cursor_builtin_hidden(void);
   QEMUCursor *cursor_builtin_left_ptr(void);
   void cursor_print_ascii_art(QEMUCursor *c, const char *prefix);
   int cursor_get_mono_bpl(QEMUCursor *c);
   void cursor_set_mono(QEMUCursor *c,
                        uint32_t foreground, uint32_t background, uint8_t *image,
                        int transparent, uint8_t *mask);
   void cursor_get_mono_image(QEMUCursor *c, int foreground, uint8_t *mask);
   void cursor_get_mono_mask(QEMUCursor *c, int transparent, uint8_t *mask);
   
 struct DisplayChangeListener {  struct DisplayChangeListener {
     int idle;      int idle;
     uint64_t gui_timer_interval;      uint64_t gui_timer_interval;
Line 129  struct DisplayState { Line 180  struct DisplayState {
     struct DisplayChangeListener* listeners;      struct DisplayChangeListener* listeners;
   
     void (*mouse_set)(int x, int y, int on);      void (*mouse_set)(int x, int y, int on);
     void (*cursor_define)(int width, int height, int bpp, int hot_x, int hot_y,      void (*cursor_define)(QEMUCursor *cursor);
                           uint8_t *image, uint8_t *mask);  
   
     struct DisplayState *next;      struct DisplayState *next;
 };  };
Line 139  void register_displaystate(DisplayState  Line 189  void register_displaystate(DisplayState 
 DisplayState *get_displaystate(void);  DisplayState *get_displaystate(void);
 DisplaySurface* qemu_create_displaysurface_from(int width, int height, int bpp,  DisplaySurface* qemu_create_displaysurface_from(int width, int height, int bpp,
                                                 int linesize, uint8_t *data);                                                  int linesize, uint8_t *data);
   void qemu_alloc_display(DisplaySurface *surface, int width, int height,
                           int linesize, PixelFormat pf, int newflags);
 PixelFormat qemu_different_endianness_pixelformat(int bpp);  PixelFormat qemu_different_endianness_pixelformat(int bpp);
 PixelFormat qemu_default_pixelformat(int bpp);  PixelFormat qemu_default_pixelformat(int bpp);
   
 extern struct DisplayAllocator default_allocator;  
 DisplayAllocator *register_displayallocator(DisplayState *ds, DisplayAllocator *da);  DisplayAllocator *register_displayallocator(DisplayState *ds, DisplayAllocator *da);
 DisplaySurface* defaultallocator_create_displaysurface(int width, int height);  
 DisplaySurface* defaultallocator_resize_displaysurface(DisplaySurface *surface, int width, int height);  
 void defaultallocator_free_displaysurface(DisplaySurface *surface);  
   
 static inline DisplaySurface* qemu_create_displaysurface(DisplayState *ds, int width, int height)  static inline DisplaySurface* qemu_create_displaysurface(DisplayState *ds, int width, int height)
 {  {
Line 155  static inline DisplaySurface* qemu_creat Line 203  static inline DisplaySurface* qemu_creat
   
 static inline DisplaySurface* qemu_resize_displaysurface(DisplayState *ds, int width, int height)  static inline DisplaySurface* qemu_resize_displaysurface(DisplayState *ds, int width, int height)
 {  {
       trace_displaysurface_resize(ds, ds->surface, width, height);
     return ds->allocator->resize_displaysurface(ds->surface, width, height);      return ds->allocator->resize_displaysurface(ds->surface, width, height);
 }  }
   
 static inline void qemu_free_displaysurface(DisplayState *ds)  static inline void qemu_free_displaysurface(DisplayState *ds)
 {  {
       trace_displaysurface_free(ds, ds->surface);
     ds->allocator->free_displaysurface(ds->surface);      ds->allocator->free_displaysurface(ds->surface);
 }  }
   
Line 278  static inline int ds_get_bytes_per_pixel Line 328  static inline int ds_get_bytes_per_pixel
     return ds->surface->pf.bytes_per_pixel;      return ds->surface->pf.bytes_per_pixel;
 }  }
   
   #ifdef CONFIG_CURSES
   #include <curses.h>
   typedef chtype console_ch_t;
   #else
 typedef unsigned long console_ch_t;  typedef unsigned long console_ch_t;
   #endif
 static inline void console_write_ch(console_ch_t *dest, uint32_t ch)  static inline void console_write_ch(console_ch_t *dest, uint32_t ch)
 {  {
     cpu_to_le32wu((uint32_t *) dest, ch);      if (!(ch & 0xff))
           ch |= ' ';
       *dest = ch;
 }  }
   
 typedef void (*vga_hw_update_ptr)(void *);  typedef void (*vga_hw_update_ptr)(void *);
 typedef void (*vga_hw_invalidate_ptr)(void *);  typedef void (*vga_hw_invalidate_ptr)(void *);
 typedef void (*vga_hw_screen_dump_ptr)(void *, const char *);  typedef void (*vga_hw_screen_dump_ptr)(void *, const char *, bool cswitch);
 typedef void (*vga_hw_text_update_ptr)(void *, console_ch_t *);  typedef void (*vga_hw_text_update_ptr)(void *, console_ch_t *);
   
 DisplayState *graphic_console_init(vga_hw_update_ptr update,  DisplayState *graphic_console_init(vga_hw_update_ptr update,
Line 302  void vga_hw_text_update(console_ch_t *ch Line 359  void vga_hw_text_update(console_ch_t *ch
   
 int is_graphic_console(void);  int is_graphic_console(void);
 int is_fixedsize_console(void);  int is_fixedsize_console(void);
 CharDriverState *text_console_init(const char *p);  CharDriverState *text_console_init(QemuOpts *opts);
 void text_consoles_set_display(DisplayState *ds);  void text_consoles_set_display(DisplayState *ds);
 void console_select(unsigned int index);  void console_select(unsigned int index);
 void console_color_init(DisplayState *ds);  void console_color_init(DisplayState *ds);
Line 320  void cocoa_display_init(DisplayState *ds Line 377  void cocoa_display_init(DisplayState *ds
 void vnc_display_init(DisplayState *ds);  void vnc_display_init(DisplayState *ds);
 void vnc_display_close(DisplayState *ds);  void vnc_display_close(DisplayState *ds);
 int vnc_display_open(DisplayState *ds, const char *display);  int vnc_display_open(DisplayState *ds, const char *display);
 int vnc_display_password(DisplayState *ds, const char *password);  void vnc_display_add_client(DisplayState *ds, int csock, int skipauth);
 void do_info_vnc(Monitor *mon);  int vnc_display_disable_login(DisplayState *ds);
 char *vnc_display_local_addr(DisplayState *ds);  char *vnc_display_local_addr(DisplayState *ds);
   #ifdef CONFIG_VNC
   int vnc_display_password(DisplayState *ds, const char *password);
   int vnc_display_pw_expire(DisplayState *ds, time_t expires);
   #else
   static inline int vnc_display_password(DisplayState *ds, const char *password)
   {
       return -ENODEV;
   }
   static inline int vnc_display_pw_expire(DisplayState *ds, time_t expires)
   {
       return -ENODEV;
   };
   #endif
   
 /* curses.c */  /* curses.c */
 void curses_display_init(DisplayState *ds, int full_screen);  void curses_display_init(DisplayState *ds, int full_screen);

Removed from v.1.1.1.4  
changed lines
  Added in v.1.1.1.10


unix.superglobalmegacorp.com