home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1992 March / Source_Code_CD-ROM_Walnut_Creek_March_1992.iso / usenet / altsrcs / 2 / 2306 / resource.h < prev    next >
C/C++ Source or Header  |  1990-12-28  |  4KB  |  143 lines

  1. /*
  2.  * Author: Jason Baietto, jason@ssd.csd.harris.com
  3.  * xdiary Copyright 1990 Harris Corporation
  4.  *
  5.  * Permission to use, copy, modify, and distribute, this software and its
  6.  * documentation for any purpose is hereby granted without fee, provided that
  7.  * the above copyright notice appear in all copies and that both that
  8.  * copyright notice and this permission notice appear in supporting
  9.  * documentation, and that the name of the copyright holder be used in
  10.  * advertising or publicity pertaining to distribution of the software with
  11.  * specific, written prior permission, and that no fee is charged for further
  12.  * distribution of this software, or any modifications thereof.  The copyright
  13.  * holder makes no representations about the suitability of this software for
  14.  * any purpose.  It is provided "as is" without express or implied warranty.
  15.  *
  16.  * THE COPYRIGHT HOLDER DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
  17.  * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, AND IN NO
  18.  * EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY SPECIAL, INDIRECT OR
  19.  * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM ITS USE,
  20.  * LOSS OF DATA, PROFITS, QPA OR GPA, WHETHER IN AN ACTION OF CONTRACT,
  21.  * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
  22.  * THE USE OR PERFORMANCE OF THIS SOFTWARE.
  23.  */
  24.  
  25. /* Application Resources */
  26.  
  27. typedef struct {
  28.    String  language;
  29.    String  diaryfile;
  30.    String  templatefile;
  31.    Boolean nocalendar;
  32.    Boolean nodiary;
  33.    Boolean long_opt;
  34.    int     abbrev;
  35.    Boolean fullyear;
  36.    Boolean singlemonth;
  37. } app_data_type, *app_data_ptr_type;
  38.  
  39. #define XtNlanguage     "language"
  40. #define XtNdiaryFile    "diaryFile"
  41. #define XtNtemplateFile "templateFile"
  42. #define XtNnoCalendar   "noCalendar"
  43. #define XtNnoDiary      "noDiary"
  44. #define XtNlong         "long"
  45. #define XtNabbrev       "abbrev"
  46. #define XtNfullYear     "fullYear"
  47. #define XtNsingleMonth  "singleMonth"
  48.  
  49. #define XtCLanguage     "Language"
  50. #define XtCDiaryFile    "DiaryFile"
  51. #define XtCTemplateFile "TemplateFile"
  52. #define XtCNoCalendar   "NoCalendar"
  53. #define XtCNoDiary      "NoDiary"
  54. #define XtCLong         "Long"
  55. #define XtCAbbrev       "Abbrev"
  56. #define XtCFullYear     "FullYear"
  57. #define XtCSingleMonth  "SingleMonth"
  58.  
  59. #define offset(field) XtOffset(app_data_ptr_type, field)
  60. XtResource application_resources[] = {
  61.    {
  62.       XtNlanguage,
  63.       XtCLanguage,
  64.       XtRString,
  65.       sizeof(String),
  66.       offset(language),
  67.       XtRImmediate,
  68.       (XtPointer)NULL
  69.    },
  70.    {
  71.       XtNdiaryFile,
  72.       XtCDiaryFile,
  73.       XtRString,
  74.       sizeof(String),
  75.       offset(diaryfile),
  76.       XtRImmediate,
  77.       (XtPointer)NULL
  78.    },
  79.    {
  80.       XtNtemplateFile,
  81.       XtCTemplateFile,
  82.       XtRString,
  83.       sizeof(String),
  84.       offset(templatefile),
  85.       XtRImmediate,
  86.       (XtPointer)NULL
  87.    },
  88.    {
  89.       XtNnoCalendar,
  90.       XtCNoCalendar,
  91.       XtRBoolean,
  92.       sizeof(Boolean),
  93.       offset(nocalendar),
  94.       XtRImmediate,
  95.       (XtPointer)False
  96.    },
  97.    {
  98.       XtNnoDiary,
  99.       XtCNoDiary,
  100.       XtRBoolean,
  101.       sizeof(Boolean),
  102.       offset(nodiary),
  103.       XtRImmediate,
  104.       (XtPointer)False
  105.    },
  106.    {
  107.       XtNlong,
  108.       XtCLong,
  109.       XtRBoolean,
  110.       sizeof(Boolean),
  111.       offset(long_opt),
  112.       XtRImmediate,
  113.       (XtPointer)False
  114.    },
  115.    {
  116.       XtNabbrev,
  117.       XtCAbbrev,
  118.       XtRInt,
  119.       sizeof(int),
  120.       offset(abbrev),
  121.       XtRImmediate,
  122.       (XtPointer)0
  123.    },
  124.    {
  125.       XtNfullYear,
  126.       XtCFullYear,
  127.       XtRBoolean,
  128.       sizeof(Boolean),
  129.       offset(fullyear),
  130.       XtRImmediate,
  131.       (XtPointer)False
  132.    },
  133.    {
  134.       XtNsingleMonth,
  135.       XtCSingleMonth,
  136.       XtRBoolean,
  137.       sizeof(Boolean),
  138.       offset(singlemonth),
  139.       XtRImmediate,
  140.       (XtPointer)False
  141.    }
  142. };
  143.