dthello.h 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153
  1. /*
  2. * CDE - Common Desktop Environment
  3. *
  4. * Copyright (c) 1993-2012, The Open Group. All rights reserved.
  5. *
  6. * These libraries and programs are free software; you can
  7. * redistribute them and/or modify them under the terms of the GNU
  8. * Lesser General Public License as published by the Free Software
  9. * Foundation; either version 2 of the License, or (at your option)
  10. * any later version.
  11. *
  12. * These libraries and programs are distributed in the hope that
  13. * they will be useful, but WITHOUT ANY WARRANTY; without even the
  14. * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
  15. * PURPOSE. See the GNU Lesser General Public License for more
  16. * details.
  17. *
  18. * You should have received a copy of the GNU Lesser General Public
  19. * License along with these libraries and programs; if not, write
  20. * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
  21. * Floor, Boston, MA 02110-1301 USA
  22. */
  23. /* $XConsortium: dthello.h /main/6 1996/10/30 18:19:18 mgreess $ */
  24. /* *
  25. * (c) Copyright 1993, 1994 Hewlett-Packard Company *
  26. * (c) Copyright 1993, 1994 International Business Machines Corp. *
  27. * (c) Copyright 1993, 1994 Sun Microsystems, Inc. *
  28. * (c) Copyright 1993, 1994 Novell, Inc. *
  29. */
  30. #define DTHELLO_ID 0
  31. #define DTCOLOR_ID 1
  32. #define DTCOLOR_PROGNAME "dtcolor"
  33. #define DTHELLO_PROGNAME "dthello"
  34. #define DTHELLO_RES_NAME "dthello"
  35. #define DTHELLO_CLASS_NAME "Dthello"
  36. #define DTHELLO_CLASS "Dthello"
  37. struct globalStruct {
  38. char resname [80];
  39. char classname [80];
  40. };
  41. /*
  42. * Definitions and Macros
  43. */
  44. #if 0
  45. #define DEFAULT_FILE "/etc/copyright"
  46. #endif
  47. #define DEFAULT_FONT_LARGE "-dt-interface system-medium-r-normal-xl*-*-*-*-*-*-*-*-*"
  48. #define DEFAULT_FONT_MEDIUM "-dt-interface system-medium-r-normal-l*-*-*-*-*-*-*-*-*"
  49. #define DEFAULT_FONT_SMALL "-dt-interface system-medium-r-normal-m*-*-*-*-*-*-*-*-*"
  50. #define DEFAULT_FONT "-*-*-*-R-*-*-*-120-*-*-*-*"
  51. #define FIXED_FONT "fixed"
  52. #define DEFAULT_BG "cornflowerblue"
  53. #define DEFAULT_LOW_BG "black"
  54. #define DEFAULT_FG "white"
  55. #define DEFAULT_LOW_FG "white"
  56. #define DEFAULT_TIME "240"
  57. #define DEFAULT_XOFFSET_SMALL 25
  58. #define DEFAULT_XOFFSET_MEDIUM 50
  59. #define DEFAULT_XOFFSET_LARGE 125
  60. #define BOX_LINE_WIDTH_SMALL 4
  61. #define BOX_LINE_WIDTH_MEDIUM (BOX_LINE_WIDTH_SMALL + 2)
  62. #define BOX_LINE_WIDTH_LARGE (BOX_LINE_WIDTH_SMALL * 2)
  63. #define MAX_FILES 5
  64. #define MAX_LINES 100
  65. #define MAX_COLUMNS 160
  66. /*
  67. * My resources
  68. */
  69. #define vNfont "vfont"
  70. #define vCFont "Vfont"
  71. #define vNxoffset "xoffset"
  72. #define vCXoffset "Xoffset"
  73. #define vNbackground "vbackground"
  74. #define vCBackground "Vbackground"
  75. #define vNforeground "vforeground"
  76. #define vCForeground "Vforeground"
  77. #define vNfile "file"
  78. #define vCFile "File"
  79. #define vNstring "string"
  80. #define vCString "String"
  81. #define vNtimeout "timeout"
  82. #define vCTimeout "Timeout"
  83. #ifndef True
  84. #define True 1
  85. #endif
  86. #ifndef False
  87. #define False 0
  88. #endif
  89. /*
  90. * Data definitions
  91. */
  92. typedef struct
  93. {
  94. char *name;
  95. int len;
  96. } ArgSpec;
  97. typedef struct
  98. {
  99. char *resname;
  100. char *resclass;
  101. char **ppvalue;
  102. int *size;
  103. } VhResourceEntry;
  104. /******** Public Function Declarations ********/
  105. extern int main(
  106. int argc,
  107. char **argv) ;
  108. extern int ArgMatch(
  109. char *pch,
  110. int arn) ;
  111. extern char * GetMessage( int set, int n, char *s);
  112. extern unsigned char * SkipWhitespace(
  113. unsigned char *pch) ;
  114. extern void KillNewlines(
  115. unsigned char *pch) ;
  116. extern void ReadInTextLines(
  117. FILE *fp,
  118. XFontSet fontset,
  119. unsigned int *pMaxWidth) ;
  120. extern void SeparateTextLines(
  121. unsigned char *pchIn) ;
  122. extern void CatchAlarm(
  123. int sig) ;
  124. extern void VhGetResources(
  125. Display *dpy,
  126. char *name,
  127. char *class,
  128. VhResourceEntry *res,
  129. int num) ;
  130. extern void PaintText( void ) ;
  131. extern void DrawBox( void ) ;