LayoutUtilI.h 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193
  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 librararies 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: LayoutUtilI.h /main/13 1996/10/10 12:24:06 cde-hp $ */
  24. /************************************<+>*************************************
  25. ****************************************************************************
  26. **
  27. ** File: LayoutUtilI.h
  28. **
  29. ** Project: Cde DtHelp
  30. **
  31. ** Description:
  32. **
  33. ** (c) Copyright 1987, 1988, 1989, 1990, 1991, 1992 Hewlett-Packard Company
  34. **
  35. ** (c) Copyright 1993, 1994 Hewlett-Packard Company
  36. ** (c) Copyright 1993, 1994 International Business Machines Corp.
  37. ** (c) Copyright 1993, 1994 Sun Microsystems, Inc.
  38. ** (c) Copyright 1993, 1994 Novell, Inc.
  39. **
  40. **
  41. **
  42. ****************************************************************************
  43. ************************************<+>*************************************/
  44. #ifndef _CELayoutUtilI_h
  45. #define _CELayoutUtilI_h
  46. #ifdef __cplusplus
  47. extern "C" {
  48. #endif
  49. /******** Private Defines Declarations ********/
  50. #define _CEFORMAT_ALL -1
  51. /******** Private Typedef Declarations ********/
  52. /******** Private Structures Declarations ********/
  53. typedef struct _dtCvLayoutStruct {
  54. _DtCvSegmentI *line_seg;
  55. unsigned int line_start;
  56. unsigned int line_bytes;
  57. _DtCvUnit cur_len;
  58. _DtCvUnit max_x_pos;
  59. _DtCvUnit cur_max_x;
  60. _DtCvUnit y_pos;
  61. _DtCvUnit text_x_pos;
  62. _DtCvUnit leading;
  63. int lst_hyper;
  64. int format_y;
  65. int join_line;
  66. _DtCvValue lst_vis;
  67. _DtCvValue join;
  68. _DtCvValue align_flag;
  69. const char *align_char;
  70. _DtCvUnit align_pos;
  71. int delayed_search_saves;
  72. } _DtCvLayoutInfo;
  73. /*****************************************************************************
  74. * Private Macro Declarations
  75. *****************************************************************************/
  76. /******** Private Function Declarations ********/
  77. extern void _DtCvAddSpace (
  78. _DtCvUnit number,
  79. _DtCvUnit *ret_y);
  80. extern int _DtCvAddToMarkList(
  81. _DtCanvasStruct *canvas,
  82. _DtCvPointer client_data,
  83. _DtCvValue flag,
  84. _DtCvSelectData *beg,
  85. _DtCvSelectData *end);
  86. extern int _DtCvCalcMarkPos (
  87. _DtCanvasStruct *canvas,
  88. int entry,
  89. _DtCvUnit *ret_x,
  90. _DtCvUnit *ret_y,
  91. _DtCvUnit *ret_width,
  92. _DtCvUnit *ret_height);
  93. extern void _DtCvCheckAddHyperToTravList (
  94. _DtCanvasStruct *canvas,
  95. _DtCvSegmentI *p_seg,
  96. _DtCvValue flag,
  97. _DtCvValue *lst_vis,
  98. int *lst_hyper,
  99. _DtCvUnit *cur_len);
  100. extern _DtCvValue _DtCvCheckLineSyntax (
  101. _DtCanvasStruct *canvas,
  102. _DtCvSegmentI *pSeg,
  103. int start,
  104. int str_len,
  105. _DtCvValue skip_last_ck);
  106. extern _DtCvValue _DtCvCheckOneByteCantBeginList (
  107. char c,
  108. char *cant_begin_list);
  109. extern _DtCvValue _DtCvCheckOneByteCantEndList (
  110. char c,
  111. char *cant_end_list);
  112. extern _DtCvStatus _DtCvCvtSegsToPts (
  113. _DtCanvasStruct *canvas,
  114. _DtCvSegPtsI **segs,
  115. _DtCvSelectData *beg,
  116. _DtCvSelectData *end,
  117. _DtCvUnit *ret_y1,
  118. _DtCvUnit *ret_y2,
  119. _DtCvSegmentI **ret_seg);
  120. extern int _DtCvGetNextTravEntry (
  121. _DtCanvasStruct *canvas);
  122. extern int _DtCvGetNextWidth (
  123. _DtCanvasStruct *canvas,
  124. int old_type,
  125. int lst_hyper,
  126. _DtCvSegmentI *pSeg,
  127. int start,
  128. _DtCvSegmentI *prev_seg,
  129. _DtCvSegmentI **nextSeg,
  130. int *nextStart,
  131. int *widthCount);
  132. extern int _DtCvGetTraversalWidth (
  133. _DtCanvasStruct *canvas,
  134. _DtCvSegmentI *p_seg,
  135. int lst_hyper);
  136. extern void _DtCvInitLayoutInfo (
  137. _DtCanvasStruct *canvas,
  138. _DtCvLayoutInfo *layout);
  139. extern int _DtCvProcessStringSegment(
  140. _DtCanvasStruct *canvas,
  141. _DtCvLayoutInfo *lay_info,
  142. _DtCvUnit max_width,
  143. _DtCvUnit l_margin,
  144. _DtCvUnit r_margin,
  145. _DtCvSegmentI *cur_seg,
  146. unsigned int *cur_start,
  147. _DtCvFrmtOption txt_justify,
  148. _DtCvValue stat_flag);
  149. extern void _DtCvSaveInfo (
  150. _DtCanvasStruct *canvas,
  151. _DtCvLayoutInfo *layout,
  152. _DtCvUnit max_width,
  153. _DtCvUnit r_margin,
  154. _DtCvFrmtOption txt_justify);
  155. extern void _DtCvSetJoinInfo (
  156. _DtCvLayoutInfo *layout,
  157. _DtCvValue flag,
  158. int txt_ln);
  159. extern int _DtCvSetTravEntryInfo (
  160. _DtCanvasStruct *canvas,
  161. int entry,
  162. _DtCvTraversalType type,
  163. _DtCvSegmentI *p_seg,
  164. int line_idx,
  165. _DtCvValue inc);
  166. extern int _DtCvSetTravEntryPos (
  167. _DtCanvasStruct *canvas,
  168. int entry,
  169. _DtCvUnit x,
  170. _DtCvUnit y,
  171. _DtCvUnit width,
  172. _DtCvUnit height);
  173. extern void _DtCvSortTraversalList (
  174. _DtCanvasStruct *canvas,
  175. _DtCvValue retain);
  176. extern int _DtCvSetSearchEntryInfo (
  177. _DtCanvasStruct* canvas,
  178. int line_idx);
  179. #ifdef __cplusplus
  180. } /* Close scope of 'extern "C"' declaration which encloses file. */
  181. #endif
  182. #endif /* _CELayoutUtilI_h */
  183. /* DON'T ADD ANYTHING AFTER THIS #endif */