k2/gui [ Modules ]

[ Top ] [ Modules ]

NAME

   gui

FUNCTION

This module is intended to abstract platform-specific details of providing a graphical user interface for the Kestrel-2EX emulator. In most cases, because kicking off the GUI is a function of the main() procedure, main() or its equivalent (e.g., WinMain()) will appear in this module.


gui/gui_s, gui_t [ Structures ]

[ Top ] [ gui ] [ Structures ]

NAME

   struct gui_s
   gui_t

FUNCTION

This structure records the entire state of the graphical interface, including which windows are open, toolbar items, and so forth.

MEMBERS

   Screen_width and screen_height record the number of pixels wide and
   tall the virtual video output will be.  For example, if emulating
   a stock MGIA video output core, these might be set to 640 and 480,
   respectively.

   Screen_base is a virtual base address for the currently displayed
   bitmapped image.  For example, assuming an unmodified MGIA, this
   will default to 0xFFFF6A00, placing the video frame buffer at the
   very end of system RAM.

BUGS

   The slots field most likely does not belong in this structure.

SOURCE

typedef struct gui_s {
        gint            screen_width;
        gint            screen_height;
        uint32_t        screen_base;

        GtkApplication* app;
        GtkWindow*      window;
        GtkWidget*      vbox;
        GtkToolbar*     toolbar;
        GtkToolItem*    tool_quit;
        GtkDrawingArea* screen;

        slots_t         slots;
        bool            shifted;
} gui_t;