home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1992 March / Source_Code_CD-ROM_Walnut_Creek_March_1992.iso / usenet / altsrcs / 2 / 2058 / resources.h < prev    next >
Encoding:
C/C++ Source or Header  |  1990-12-28  |  8.9 KB  |  172 lines

  1. /*
  2.  *    resources.h: All the resource definitions for xkal.
  3.  *
  4.  *    These are only used in xkal.c, other users should simply
  5.  *    include app-resources.h for access to the resources after
  6.  *    they've been loaded.
  7.  *
  8.  */
  9.  
  10. /*
  11.  * Non-widget resources obtained from the resource manager
  12.  */
  13. static XtResource resources[] = {
  14.     { "appoints", "String", XtRString, sizeof(String),
  15.       XtOffset(AppResources *,appoints), XtRImmediate, "~/.appoints" },
  16.     { "date", "String", XtRString, sizeof(String),
  17.       XtOffset(AppResources *,date), XtRImmediate, "" },
  18.     { "numMonths", "Int", XtRInt, sizeof(int),
  19.       XtOffset(AppResources *,numMonths), XtRImmediate, (XtPointer)1 },
  20.     { "bothShown", "Boolean", XtRBoolean, sizeof(Boolean),
  21.       XtOffset(AppResources *,bothShown), XtRImmediate, (XtPointer)True },
  22.     { "listOnly", "Boolean", XtRBoolean, sizeof(Boolean),
  23.       XtOffset(AppResources *,listOnly), XtRImmediate, (XtPointer)False },
  24.     { "silent", "Boolean", XtRBoolean, sizeof(Boolean),
  25.       XtOffset(AppResources *,silent), XtRImmediate, (XtPointer)False },
  26.     { "opaqueDates", "Boolean", XtRBoolean, sizeof(Boolean),
  27.       XtOffset(AppResources *,opaqueDates), XtRImmediate, (XtPointer)False },
  28.     { "dowLabels", "Boolean", XtRBoolean, sizeof(Boolean),
  29.       XtOffset(AppResources *,dowLabels), XtRImmediate, (XtPointer)False },
  30.  
  31.     { "dateFont1", "Font", XtRFont, sizeof(Font),
  32.       XtOffset(AppResources *,dateFont1), XtRString, "*fixed*bold*" },
  33.     { "dateFont3", "Font", XtRFont, sizeof(Font),
  34.       XtOffset(AppResources *,dateFont3), XtRString, "*fixed*bold*" },
  35.     { "dateFont12", "Font", XtRFont, sizeof(Font),
  36.       XtOffset(AppResources *,dateFont12), XtRString, "*fixed*bold*" },
  37.  
  38.     { "datePosition1", "String", XtRString, sizeof(String),
  39.       XtOffset(AppResources *,datePosition1), XtRImmediate, "+10+10" },
  40.     { "datePosition3", "String", XtRString, sizeof(String),
  41.       XtOffset(AppResources *,datePosition3), XtRImmediate, "+10+10" },
  42.     { "datePosition12", "String", XtRString, sizeof(String),
  43.       XtOffset(AppResources *,datePosition12), XtRImmediate, "+10+10" },
  44.  
  45.     { "dateWidth1", "Int", XtRInt, sizeof(int),
  46.       XtOffset(AppResources *,dateWidth1), XtRImmediate, (XtPointer)50 },
  47.     { "dateWidth3", "Int", XtRInt, sizeof(int),
  48.       XtOffset(AppResources *,dateWidth3), XtRImmediate, (XtPointer)18 },
  49.     { "dateWidth12", "Int", XtRInt, sizeof(int),
  50.       XtOffset(AppResources *,dateWidth12), XtRImmediate, (XtPointer)10 },
  51.  
  52.     { "dateHeight1", "Int", XtRInt, sizeof(int),
  53.       XtOffset(AppResources *,dateHeight1), XtRImmediate, (XtPointer)50 },
  54.     { "dateHeight3", "Int", XtRInt, sizeof(int),
  55.       XtOffset(AppResources *,dateHeight3), XtRImmediate, (XtPointer)18 },
  56.     { "dateHeight12", "Int", XtRInt, sizeof(int),
  57.       XtOffset(AppResources *,dateHeight12), XtRImmediate, (XtPointer)10 },
  58.  
  59.     { "noDayShade", "String", XtRString, sizeof(String),
  60.       XtOffset(AppResources *,noDayShade), XtRImmediate, "wide_weave" },
  61.  
  62.     { "shade1", "String", XtRString, sizeof(String),
  63.       XtOffset(AppResources *,shade[1]), XtRImmediate, "gray3" },
  64.     { "shade2", "String", XtRString, sizeof(String),
  65.       XtOffset(AppResources *,shade[2]), XtRImmediate, "gray3" },
  66.     { "shade3", "String", XtRString, sizeof(String),
  67.       XtOffset(AppResources *,shade[3]), XtRImmediate, "light_gray" },
  68.     { "shade4", "String", XtRString, sizeof(String),
  69.       XtOffset(AppResources *,shade[4]), XtRImmediate, "light_gray" },
  70.     { "shade5", "String", XtRString, sizeof(String),
  71.       XtOffset(AppResources *,shade[5]), XtRImmediate, "gray" },
  72.     { "shade6", "String", XtRString, sizeof(String),
  73.       XtOffset(AppResources *,shade[6]), XtRImmediate, "gray" },
  74.     { "shade7", "String", XtRString, sizeof(String),
  75.       XtOffset(AppResources *,shade[7]), XtRImmediate, "flipped_gray" },
  76.     { "shade8", "String", XtRString, sizeof(String),
  77.       XtOffset(AppResources *,shade[8]), XtRImmediate, "flipped_gray" },
  78.     { "shade9", "String", XtRString, sizeof(String),
  79.       XtOffset(AppResources *,shade[9]), XtRImmediate, "flipped_gray" },
  80.     { "shade10", "String", XtRString, sizeof(String),
  81.       XtOffset(AppResources *,shade[10]), XtRImmediate, "flipped_gray" },
  82.     { "shade11", "String", XtRString, sizeof(String),
  83.       XtOffset(AppResources *,shade[11]), XtRImmediate, "flipped_gray" },
  84.     { "shade12", "String", XtRString, sizeof(String),
  85.       XtOffset(AppResources *,shade[12]), XtRImmediate, "flipped_gray" },
  86.     { "shade13", "String", XtRString, sizeof(String),
  87.       XtOffset(AppResources *,shade[13]), XtRImmediate, "flipped_gray" },
  88.     { "shade14", "String", XtRString, sizeof(String),
  89.       XtOffset(AppResources *,shade[14]), XtRImmediate, "flipped_gray" },
  90.     { "shade15", "String", XtRString, sizeof(String),
  91.       XtOffset(AppResources *,shade[15]), XtRImmediate, "flipped_gray" },
  92.     { "shade16", "String", XtRString, sizeof(String),
  93.       XtOffset(AppResources *,shade[16]), XtRImmediate, "flipped_gray" },
  94.     { "shade17", "String", XtRString, sizeof(String),
  95.       XtOffset(AppResources *,shade[17]), XtRImmediate, "flipped_gray" },
  96.     { "shade18", "String", XtRString, sizeof(String),
  97.       XtOffset(AppResources *,shade[18]), XtRImmediate, "flipped_gray" },
  98.     { "shade19", "String", XtRString, sizeof(String),
  99.       XtOffset(AppResources *,shade[19]), XtRImmediate, "flipped_gray" },
  100.     { "shade20", "String", XtRString, sizeof(String),
  101.       XtOffset(AppResources *,shade[20]), XtRImmediate, "flipped_gray" },
  102.     { "shade21", "String", XtRString, sizeof(String),
  103.       XtOffset(AppResources *,shade[21]), XtRImmediate, "flipped_gray" },
  104.     { "shade22", "String", XtRString, sizeof(String),
  105.       XtOffset(AppResources *,shade[22]), XtRImmediate, "flipped_gray" },
  106.  
  107.     { "color1", "Pixel", XtRPixel, sizeof(Pixel),
  108.       XtOffset(AppResources *,color[1]), XtRString, "Green" },
  109.     { "color2", "Pixel", XtRPixel, sizeof(Pixel),
  110.       XtOffset(AppResources *,color[2]), XtRString, "Green" },
  111.     { "color3", "Pixel", XtRPixel, sizeof(Pixel),
  112.       XtOffset(AppResources *,color[3]), XtRString, "Blue" },
  113.     { "color4", "Pixel", XtRPixel, sizeof(Pixel),
  114.       XtOffset(AppResources *,color[4]), XtRString, "Blue" },
  115.     { "color5", "Pixel", XtRPixel, sizeof(Pixel),
  116.       XtOffset(AppResources *,color[5]), XtRString, "Yellow" },
  117.     { "color6", "Pixel", XtRPixel, sizeof(Pixel),
  118.       XtOffset(AppResources *,color[6]), XtRString, "Yellow" },
  119.     { "color7", "Pixel", XtRPixel, sizeof(Pixel),
  120.       XtOffset(AppResources *,color[7]), XtRString, "Red" },
  121.     { "color8", "Pixel", XtRPixel, sizeof(Pixel),
  122.       XtOffset(AppResources *,color[8]), XtRString, "Red" },
  123.     { "color9", "Pixel", XtRPixel, sizeof(Pixel),
  124.       XtOffset(AppResources *,color[9]), XtRString, "Red" },
  125.     { "color10", "Pixel", XtRPixel, sizeof(Pixel),
  126.       XtOffset(AppResources *,color[10]), XtRString, "Red" },
  127.     { "color11", "Pixel", XtRPixel, sizeof(Pixel),
  128.       XtOffset(AppResources *,color[11]), XtRString, "Red" },
  129.     { "color12", "Pixel", XtRPixel, sizeof(Pixel),
  130.       XtOffset(AppResources *,color[12]), XtRString, "Red" },
  131.     { "color13", "Pixel", XtRPixel, sizeof(Pixel),
  132.       XtOffset(AppResources *,color[13]), XtRString, "Red" },
  133.     { "color14", "Pixel", XtRPixel, sizeof(Pixel),
  134.       XtOffset(AppResources *,color[14]), XtRString, "Red" },
  135.     { "color15", "Pixel", XtRPixel, sizeof(Pixel),
  136.       XtOffset(AppResources *,color[15]), XtRString, "Red" },
  137.     { "color16", "Pixel", XtRPixel, sizeof(Pixel),
  138.       XtOffset(AppResources *,color[16]), XtRString, "Red" },
  139.     { "color17", "Pixel", XtRPixel, sizeof(Pixel),
  140.       XtOffset(AppResources *,color[17]), XtRString, "Red" },
  141.     { "color18", "Pixel", XtRPixel, sizeof(Pixel),
  142.       XtOffset(AppResources *,color[18]), XtRString, "Red" },
  143.     { "color19", "Pixel", XtRPixel, sizeof(Pixel),
  144.       XtOffset(AppResources *,color[19]), XtRString, "Red" },
  145.     { "color20", "Pixel", XtRPixel, sizeof(Pixel),
  146.       XtOffset(AppResources *,color[20]), XtRString, "Red" },
  147.     { "color21", "Pixel", XtRPixel, sizeof(Pixel),
  148.       XtOffset(AppResources *,color[21]), XtRString, "Red" },
  149.     { "color22", "Pixel", XtRPixel, sizeof(Pixel),
  150.       XtOffset(AppResources *,color[22]), XtRString, "Red" },
  151.  
  152.     { "revision", "Revision", XtRString, sizeof(String),
  153.       XtOffset(AppResources *,revision), XtRImmediate, "" },
  154. };
  155.  
  156. /*
  157.  *    Non-widget resources settable on command line.
  158.  */
  159. static XrmOptionDescRec options[] = {
  160.     { "-appoints",    ".appoints",    XrmoptionSepArg,    "~/.appoints" },
  161.     { "-date",        ".date",    XrmoptionSepArg,    "" },
  162.     { "-numMonths",    ".numMonths",    XrmoptionSepArg,    "1" },
  163.     { "-bothShown",    ".bothShown",    XrmoptionNoArg,        "True" },
  164.     { "-nobothShown",    ".bothShown",    XrmoptionNoArg,        "False" },
  165.     { "-listOnly",    ".listOnly",    XrmoptionNoArg,        "True" },
  166.     { "-silent",    ".silent",    XrmoptionNoArg,        "True" },
  167.     { "-opaqueDates",    ".opaqueDates",    XrmoptionNoArg,        "True" },
  168.     { "-noopaqueDates",    ".opaqueDates",    XrmoptionNoArg,        "False" },
  169.     { "-dowLabels",    ".dowLabels",    XrmoptionNoArg,        "True" },
  170.     { "-nodowLabels",    ".dowLabels",    XrmoptionNoArg,        "False" },
  171. };
  172.