Annotation of uae/src/include/xwin.h, revision 1.1.1.7

1.1.1.3   root        1:  /*
1.1       root        2:   * UAE - The Un*x Amiga Emulator
1.1.1.3   root        3:   *
1.1       root        4:   * Interface to the graphics system (X, SVGAlib)
1.1.1.3   root        5:   *
                      6:   * Copyright 1995-1997 Bernd Schmidt
1.1       root        7:   */
                      8: 
                      9: typedef long int xcolnr;
                     10: 
1.1.1.2   root       11: typedef int (*allocfunc_type)(int, int, int, xcolnr *);
1.1       root       12: 
                     13: extern xcolnr xcolors[4096];
                     14: 
                     15: extern int buttonstate[3];
                     16: extern int newmousecounters;
                     17: 
1.1.1.4   root       18: extern int graphics_setup (void);
                     19: extern int graphics_init (void);
                     20: extern void graphics_leave (void);
                     21: extern void handle_events (void);
                     22: extern void setup_brkhandler (void);
                     23: 
                     24: extern void flush_line (int);
                     25: extern void flush_block (int, int);
                     26: extern void flush_screen (int, int);
                     27: 
                     28: extern int lockscr (void);
                     29: extern void unlockscr (void);
                     30: 
                     31: extern int debuggable (void);
                     32: extern int needmousehack (void);
                     33: extern void togglemouse (void);
                     34: extern void LED (int);
                     35: 
                     36: extern int bits_in_mask (unsigned long mask);
                     37: extern int mask_shift (unsigned long mask);
                     38: extern unsigned long doMask (int p, int bits, int shift);
                     39: extern unsigned long doMask256 (int p, int bits, int shift);
                     40: extern void setup_maxcol (int);
                     41: extern void alloc_colors256 (int (*)(int, int, int, xcolnr *));
                     42: extern void alloc_colors64k (int, int, int, int, int, int);
                     43: extern void setup_greydither (int bits, allocfunc_type allocfunc);
                     44: extern void setup_greydither_maxcol (int maxcol, allocfunc_type allocfunc);
                     45: extern void setup_dither (int bits, allocfunc_type allocfunc);
                     46: extern void DitherLine (uae_u8 *l, uae_u16 *r4g4b4, int x, int y, uae_s16 len, int bits) ASM_SYM_FOR_FUNC("DitherLine");
1.1       root       47: 
                     48: struct vidbuf_description
                     49: {
1.1.1.4   root       50:     /* The graphics code has a choice whether it wants to use a large buffer
                     51:      * for the whole display, or only a small buffer for a single line.
                     52:      * If you use a large buffer:
                     53:      *   - set bufmem to point at it
                     54:      *   - set linemem to 0
                     55:      *   - if memcpy within bufmem would be very slow, i.e. because bufmem is
1.1.1.6   root       56:      *     in graphics card memory, also set emergmem to point to a buffer
1.1.1.4   root       57:      *     that is large enough to hold a single line.
                     58:      *   - implement flush_line to be a no-op.
                     59:      * If you use a single line buffer:
                     60:      *   - set bufmem and emergmem to 0
                     61:      *   - set linemem to point at your buffer
                     62:      *   - implement flush_line to copy a single line to the screen
                     63:      */
                     64:     char *bufmem;
                     65:     char *linemem;
                     66:     char *emergmem;
1.1.1.2   root       67:     int rowbytes; /* Bytes per row in the memory pointed at by bufmem. */
                     68:     int pixbytes; /* Bytes per pixel. */
1.1.1.3   root       69:     int width;
                     70:     int height;
1.1.1.2   root       71:     int maxblocklines; /* Set to 0 if you want calls to flush_line after each drawn line, or the number of
                     72:                        * lines that flush_block wants to/can handle (it isn't really useful to use another
                     73:                        * value than maxline here). */
1.1.1.3   root       74:     int can_double; /* Set if the high part of each entry in xcolors contains the same value
                     75:                     * as the low part, so that two pixels can be drawn at once. */
1.1       root       76: };
                     77: 
                     78: extern struct vidbuf_description gfxvidinfo;
1.1.1.3   root       79: 
                     80: /* For ports using tui.c, this should be built by graphics_setup(). */
                     81: extern struct bstring *video_mode_menu;
                     82: extern void vidmode_menu_selected(int);

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.