Annotation of researchv9/X11/src/X.V11R1/clients/xfd/wsimple.h, revision 1.1.1.1

1.1       root        1: /* $Header: wsimple.h,v 1.1 87/09/11 08:19:42 toddb Exp $ */
                      2: /*
                      3:  * Just_display.h: This file contains the definitions needed to use the
                      4:  *                 functions in just_display.c.  It also declares the global
                      5:  *                 variables dpy, screen, and program_name which are needed to
                      6:  *                 use just_display.c.
                      7:  *
                      8:  * Written by Mark Lillibridge.   Last updated 7/1/87
                      9:  *
                     10:  * Send bugs, etc. to [email protected].
                     11:  */
                     12: 
                     13:     /* Global variables used by routines in just_display.c */
                     14: 
                     15: char *program_name = "unknown_program";       /* Name of this program */
                     16: Display *dpy;                                 /* The current display */
                     17: int screen;                                   /* The current screen */
                     18: 
                     19: #define INIT_NAME program_name=argv[0]        /* use this in main to setup
                     20:                                                  program_name */
                     21: 
                     22:     /* Declaritions for functions in just_display.c */
                     23: 
                     24: void Fatal_Error();
                     25: char *Malloc();
                     26: char *Realloc();
                     27: char *Get_Display_Name();
                     28: Display *Open_Display();
                     29: void Setup_Display_And_Screen();
                     30: XFontStruct *Open_Font();
                     31: void Beep();
                     32: Pixmap ReadBitmapFile();
                     33: void WriteBitmapFile();
                     34: Window Select_Window_Args();
                     35: 
                     36: #define X_USAGE "[host:display]"              /* X arguments handled by
                     37:                                                 Get_Display_Name */
                     38: #define SELECT_USAGE "[{-root|-id <id>|-font <font>|-name <name>}]"
                     39: 
                     40: /*
                     41:  * Just_one_window.h: This file contains the definitions needed to use the
                     42:  *                    functions in just_display.c and just_one_window.c.
                     43:  *                    It also declares the global variables dpy, screen,
                     44:  *                    window, and program_name which are needed to use
                     45:  *                    just_display.c and just_one_window.c.
                     46:  *
                     47:  * Written by Mark Lillibridge.   Last updated 6/16/87
                     48:  *
                     49:  * Send bugs, etc. to [email protected].
                     50:  */
                     51: 
                     52: 
                     53:     /* All functions in just_display.c are usable from just_one_window */
                     54: 
                     55: 
                     56: 
                     57:     /* INIT_NAME changes slightly since we need to save command arguments
                     58:        before munging them */
                     59: 
                     60: #undef INIT_NAME
                     61: #define INIT_NAME _Save_Commands(argc, argv)
                     62: 
                     63: 
                     64:     /* Declarations for new functions in just_one_window.c */
                     65: 
                     66: void Get_X_Defaults();
                     67: void Get_X_Arguments();
                     68: void Get_X_Options();
                     69: void Resolve_X_Options();
                     70: void Resolve_X_Colors();
                     71: void Create_Default_Window();
                     72: GC Get_Default_GC();
                     73: 
                     74: 
                     75:     /* New global variables */
                     76: 
                     77: Window wind;                                  /* The current window */
                     78: char **_commands;                             /* internal variable */
                     79: int _number_of_commands;                      /* internal variable */
                     80: 
                     81:      /* The X Options themselves - the variables that store them */
                     82: 
                     83: #undef X_USAGE                                /* now what X options handled */
                     84: #define X_USAGE "[host:display] [=geom] [-fw] [-rv] [-bw <borderwidth>] [-bd <color>] [-fg <color>] [-bg <color>] [-bf <fontname>] [-tl <title>] [-in <icon name>] [-icon <icon bitmap filename>]"
                     85: 
                     86: /*
                     87:  * Universe-wide defaults used in absence of a .Xdefault setting,
                     88:  * command line argument, or program specific default setting.
                     89:  */
                     90: 
                     91: #ifndef TITLE_DEFAULT               /* Title of application */
                     92: #define TITLE_DEFAULT "No_name"
                     93: #endif
                     94: #ifndef ICON_NAME_DEFAULT           /* Name to use for the application */
                     95: #define ICON_NAME_DEFAULT 0            /* Use title of application */
                     96: #endif
                     97: #ifndef DEFX_DEFAULT                /* Put window in upper left hand corner */
                     98: #define DEFX_DEFAULT 0
                     99: #endif
                    100: #ifndef DEFY_DEFAULT
                    101: #define DEFY_DEFAULT 0
                    102: #endif
                    103: #ifndef DEFWIDTH_DEFAULT            /* Window size is 300 by 300 */
                    104: #define DEFWIDTH_DEFAULT 300
                    105: #endif
                    106: #ifndef DEFHEIGHT_DEFAULT
                    107: #define DEFHEIGHT_DEFAULT 300
                    108: #endif
                    109: #ifndef BORDER_WIDTH_DEFAULT        /* Border size is 2 */
                    110: #define BORDER_WIDTH_DEFAULT 2
                    111: #endif
                    112: #ifndef REVERSE_DEFAULT             /* Normal video */
                    113: #define REVERSE_DEFAULT 0
                    114: #endif
                    115: #ifndef BORDER_DEFAULT              /* Black border */
                    116: #define BORDER_DEFAULT "black"
                    117: #endif
                    118: #ifndef BACK_COLOR_DEFAULT          /* White background */
                    119: #define BACK_COLOR_DEFAULT "white"
                    120: #endif
                    121: #ifndef FORE_COLOR_DEFAULT          /* Black foreground */
                    122: #define FORE_COLOR_DEFAULT "black"
                    123: #endif
                    124: #ifndef BODY_FONT_DEFAULT           /* Use fixed as the body font */
                    125: #define BODY_FONT_DEFAULT "fixed"
                    126: #endif
                    127: 
                    128: /*
                    129:  * The X options:
                    130:  */
                    131: 
                    132: /* These hold names for the values some options should have */
                    133: char *geometry = NULL;                    /*The window geometry the user gave*/
                    134: char *border_color = BORDER_DEFAULT;      /* The color for the border */
                    135: char *back_color = BACK_COLOR_DEFAULT;    /* The color for the background */
                    136: char *fore_color = FORE_COLOR_DEFAULT;    /* The color for the foreground */
                    137: char *body_font_name = BODY_FONT_DEFAULT; /*The name of the font for the body*/
                    138: char *icon_bitmap_file = NULL;            /* Name of bitmap to use for icon */
                    139: 
                    140: /* These hold the actual values of the options */
                    141: char *title = TITLE_DEFAULT;              /* Title of application */
                    142: char *icon_name = ICON_NAME_DEFAULT;      /* Name of the icon */
                    143: int border_width = BORDER_WIDTH_DEFAULT;  /* Width of the border */
                    144: int reverse = REVERSE_DEFAULT;            /* Non-zero iff reverse video */
                    145: unsigned long border;                     /* Color of the border */
                    146: unsigned long background;                 /* Color of the background */
                    147: unsigned long foreground;                 /* Color of the foreground */
                    148: XFontStruct *body_font;                   /* Data for the body font */
                    149: Pixmap icon_pixmap = NULL;                /* The actual pixmap for icon */
                    150: 
                    151: /* size_hints holds the size hints we are to give the window manager */
                    152: XSizeHints size_hints = { PPosition | PSize |
                    153: #ifdef MIN_X_SIZE
                    154:                          PMinSize |
                    155: #endif
                    156: #ifdef MAX_X_SIZE
                    157:                          PMaxSize |
                    158: #endif
                    159: #ifdef RESIZE_X_INC
                    160:                          PResizeInc |
                    161: #endif
                    162:                          0, DEFX_DEFAULT, DEFY_DEFAULT,
                    163:                          DEFWIDTH_DEFAULT, DEFHEIGHT_DEFAULT,
                    164: #ifdef MIN_X_SIZE
                    165:                          MIN_X_SIZE, MIN_Y_SIZE,
                    166: #else
                    167:                          0, 0,
                    168: #endif
                    169: #ifdef MAX_X_SIZE
                    170:                          MAX_X_SIZE, MAX_Y_SIZE,
                    171: #else
                    172:                          0, 0,
                    173: #endif
                    174: #ifdef RESIZE_X_INC
                    175:                          RESIZE_X_INC, RESIZE_Y_INC,
                    176: #else
                    177:                          0, 0,
                    178: #endif
                    179:                          { 0, 0 }, { 0, 0 } };
                    180: /*
                    181:  * Other_stuff.h: Definitions of routines in other_stuff.
                    182:  *
                    183:  * Written by Mark Lillibridge.   Last updated 7/1/87
                    184:  *
                    185:  * Send bugs, etc. to [email protected].
                    186:  */
                    187: 
                    188: unsigned long Resolve_Color();
                    189: Pixmap Bitmap_To_Pixmap();
                    190: Window Select_Window();
                    191: void out();
                    192: void blip();
                    193: Window Window_With_Name();

unix.superglobalmegacorp.com

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