CanvasSegP.h 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538
  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: CanvasSegP.h /main/19 1996/10/04 18:30:19 rswiston $ */
  24. /*************************************<+>*************************************
  25. *****************************************************************************
  26. **
  27. ** File: CanvasSegP.h
  28. **
  29. ** Project:
  30. **
  31. ** Description: Public Header file for Canvas Engine
  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. #ifndef _DtCanvasSegP_h
  42. #define _DtCanvasSegP_h
  43. #ifdef __cplusplus
  44. extern "C" {
  45. #endif
  46. /******** Public Defines Declarations ********/
  47. /*****************************************************************************
  48. * Some bits in passed in as a _DtCvFlags and the 'type' in _DtCvSegment
  49. * must match because they are passed straight thought from the segment
  50. * to the application. The following map is to help prevent colisions.
  51. *
  52. * (-------------------------> _DtCvEND_OF_LINE
  53. * | (-----------------------> _DtCvSELECTED_FLAG
  54. * | |
  55. * | | (-------------------------> _DtCvAPP_FLAG4 \
  56. * | | | (-----------------------> _DtCvAPP_FLAG3 \
  57. * | | | | (---------------------> _DtCvAPP_FLAG2 / _DtCvAPP_FIELD
  58. * | | | | | (-------------------> _DtCvAPP_FLAG1 /
  59. * | | | | | |
  60. * | | | | | | (---------------------> _DtCvTRAVERSAL_END
  61. * | | | | | | | (-------------------> _DtCvTRAVERSAL_BEGIN
  62. * | | | | | | | | (-----------------> _DtCvTRAVERSAL_FLAG
  63. * | | | | | | | | |
  64. * | | | | | | | | | (-------------------> _DtCvMARK_ON
  65. * | | | | | | | | | | (-----------------> _DtCvMARK_END
  66. * | | | | | | | | | | | (---------------> _DtCvMARK_BEGIN
  67. * | | | | | | | | | | | | (-------------> _DtCvMARK_FLAG
  68. * | | | | | | | | | | | | |
  69. * | | | | | | | | | | | | | (-------------> _DtCvSEARCH_CURR
  70. * | | | | | | | | | | | | | | (-----------> _DtCvSEARCH_END
  71. * | | | | | | | | | | | | | | | (---------> _DtCvSEARCH_BEGIN
  72. * | | | | | | | | | | | | | | | | (-------> _DtCvSEARCH_FLAG
  73. * | | | | | | | | | | | | | | | | |
  74. * | | | | | | | | | | | | | | | | | (---------> _DtCvLINK_NEW_WINDOW
  75. * | | | | | | | | | | | | | | | | | | (-------> _DtCvLINK_POP_UP
  76. * | | | | | | | | | | | | | | | | | | | (-----> _DtCvLINK_END
  77. * | | | | | | | | | | | | | | | | | | | | (---> _DtCvLINK_BEGIN
  78. * | | | | | | | | | | | | | | | | | | | | | (-> _DtCvLINK_FLAG
  79. * | | | | | | | | | | | | | | | | | | | | | |
  80. * v v v v v v#v v v v v v v v#v v v v v v v v
  81. * 1 0 9 8 7 6#5 4 3 2 1 0 9 8#7 6 5 4 3 2 1 0
  82. * ------------#---------------#----------------
  83. * |.|.|.|.|.|.#.|.|.|.|.|.|.|.#.|.|.|.|.|.|.|.|
  84. * ------------#---------------#----------------
  85. * ^ ^ ^ ^ ^#^ ^ ^ ^ ^ ^ ^ ^#^ ^ ^ ^ ^^^^^
  86. * | | | | | | | | | | | | | | | | | \|/
  87. * | | | | | | | | | | | | | | | | | |
  88. * | | | | | | | | | | | | | | | | | (-> Segment type
  89. * | | | | | | | | | | | | | | | | (-----> _DtCvWIDE_CHAR
  90. * | | | | | | | | | | | | | | | |
  91. * | | | | | | | | | | | | | | | (-----> _DtCvSEARCH_FLAG
  92. * | | | | | | | | | | | | | | (-------> _DtCvSEARCH_BEGIN
  93. * | | | | | | | | | | | | | (---------> _DtCvSEARCH_END
  94. * | | | | | | | | | | | | (-----------> _DtCvSEARCH_CURR
  95. * | | | | | | | | | | | |
  96. * | | | | | | | | | | | (---------> _DtCvCONTROLLER/_DtCvBLOCK_LINE/
  97. * | | | | | | | | | | | _DtCvNEW_LINE
  98. * | | | | | | | | | | (-----------> _DtCvSUB_SCRIPT
  99. * | | | | | | | | | (-------------> _DtCvSUPER_SCRIPT
  100. * | | | | | | | | (---------------> _DtCvGHOST_LINK
  101. * | | | | | | | (-----------------> _DtCvHYPER_TEXT
  102. * | | | | | | (-------------------> _DtCvNON_BREAK
  103. * | | | | | (---------------------> _DtCvIN_LINE
  104. * | | | | |
  105. * | | | | (---------------> _DtCvAPP_FLAG1 \
  106. * | | | (-----------------> _DtCvAPP_FLAG2 \ _DtCvAPP_FIELD
  107. * | | (-------------------> _DtCvAPP_FLAG3 /
  108. * | (---------------------> _DtCvAPP_FLAG4 /
  109. * |
  110. * (------------------> _DtCvPAGE_BREAK
  111. *
  112. *****************************************************************************/
  113. /*
  114. * segment types
  115. */
  116. #define _DtCvNOOP (0x00)
  117. #define _DtCvCONTAINER (0x01)
  118. #define _DtCvLINE (0x02)
  119. #define _DtCvMARKER (0x03)
  120. #define _DtCvREGION (0x04)
  121. #define _DtCvSTRING (0x05)
  122. #define _DtCvTABLE (0x06)
  123. #define _DtCvPRIMARY_MASK (0x07)
  124. #define _DtCvSHIFT_PAST_PRIMARY 3
  125. /*
  126. * character size manipulation
  127. */
  128. #define _DtCvWIDE_CHAR (0x01 << _DtCvSHIFT_PAST_PRIMARY)
  129. /*
  130. * segment flags
  131. */
  132. /* leave a gap for the search flags defined in CanvasP.h */
  133. #define _DtCvSHIFT_TO_FLAGS 9
  134. /* container only */
  135. #define _DtCvCONTROLLER (0x01 << (_DtCvSHIFT_TO_FLAGS + 0))
  136. /* line type */
  137. #define _DtCvBLOCK_LINE (0x01 << (_DtCvSHIFT_TO_FLAGS + 0))
  138. /* string & region (_DtCvNEW_LINE works on _DtCvNOOP too) */
  139. #define _DtCvNEW_LINE (0x01 << (_DtCvSHIFT_TO_FLAGS + 0))
  140. #define _DtCvSUB_SCRIPT (0x01 << (_DtCvSHIFT_TO_FLAGS + 1))
  141. #define _DtCvSUPER_SCRIPT (0x01 << (_DtCvSHIFT_TO_FLAGS + 2))
  142. #define _DtCvGHOST_LINK (0x01 << (_DtCvSHIFT_TO_FLAGS + 3))
  143. #define _DtCvHYPER_TEXT (0x01 << (_DtCvSHIFT_TO_FLAGS + 4))
  144. #define _DtCvNON_BREAK (0x01 << (_DtCvSHIFT_TO_FLAGS + 5))
  145. /* region only */
  146. #define _DtCvIN_LINE (0x01 << (_DtCvSHIFT_TO_FLAGS + 6))
  147. /* application flags - defined in CanvasP.h (starting at 16th bit for 4 bits) */
  148. /* valid on any segment */
  149. #define _DtCvPAGE_BREAK (0x01 << (_DtCvSHIFT_TO_FLAGS + 11))
  150. /* highlight macros */
  151. #define HILITE_OVERLINE 0
  152. #define HILITE_STRIKETHROUGH 1
  153. #define HILITE_UNDERLINE 2
  154. /******** Public Enum Declarations ********/
  155. enum _dtCvFrmtOption
  156. {
  157. _DtCvOPTION_BAD,
  158. /*
  159. * string breaking types
  160. */
  161. _DtCvLITERAL,
  162. _DtCvDYNAMIC,
  163. /*
  164. * table border types
  165. */
  166. _DtCvBORDER_NONE,
  167. _DtCvBORDER_FULL,
  168. _DtCvBORDER_HORZ,
  169. _DtCvBORDER_VERT,
  170. _DtCvBORDER_TOP,
  171. _DtCvBORDER_BOTTOM,
  172. _DtCvBORDER_LEFT,
  173. _DtCvBORDER_RIGHT,
  174. _DtCvBORDER_TOP_LEFT,
  175. _DtCvBORDER_TOP_RIGHT,
  176. _DtCvBORDER_BOTTOM_LEFT,
  177. _DtCvBORDER_BOTTOM_RIGHT,
  178. /*
  179. * controller horizontal orientation
  180. */
  181. _DtCvJUSTIFY_LEFT_CORNER,
  182. _DtCvJUSTIFY_LEFT, /* also container horizontal text placement */
  183. _DtCvJUSTIFY_LEFT_MARGIN,
  184. _DtCvJUSTIFY_CENTER, /* also container horiz/vert text placement */
  185. _DtCvJUSTIFY_RIGHT_MARGIN,
  186. _DtCvJUSTIFY_RIGHT, /* also container horizontal text placement */
  187. _DtCvJUSTIFY_RIGHT_CORNER,
  188. /*
  189. * extra container horizontal text placement
  190. */
  191. _DtCvJUSTIFY_NUM,
  192. _DtCvJUSTIFY_CHAR,
  193. /*
  194. * inherit the parent's horizontal text placement
  195. */
  196. _DtCvINHERIT,
  197. /*
  198. * controller vertical orientation, includes _DtCvJUSTIFY_CENTER
  199. */
  200. _DtCvJUSTIFY_TOP, /* also container vertical text placement */
  201. _DtCvJUSTIFY_BOTTOM, /* also container vertical text placement */
  202. /*
  203. * controller flow types
  204. */
  205. _DtCvWRAP,
  206. _DtCvWRAP_NONE,
  207. _DtCvWRAP_JOIN
  208. };
  209. typedef enum {
  210. hilite_overline = 0x01 << HILITE_OVERLINE,
  211. hilite_strikethrough = 0x01 << HILITE_STRIKETHROUGH,
  212. hilite_underline = 0x01 << HILITE_UNDERLINE
  213. } text_hilite_t;
  214. /******** Public Enum Typedef Declarations ********/
  215. typedef enum _dtCvFrmtOption _DtCvFrmtOption;
  216. /******** Public Structures Declarations ********/
  217. typedef struct _dtCvLine {
  218. _DtCvUnit width;
  219. _DtCvPointer data;
  220. } _DtCvLine;
  221. typedef struct _dtCvContainer {
  222. char *id;
  223. char *justify_char;
  224. _DtCvFrmtOption type;
  225. _DtCvFrmtOption border;
  226. _DtCvFrmtOption justify;
  227. _DtCvFrmtOption vjustify;
  228. _DtCvFrmtOption orient;
  229. _DtCvFrmtOption vorient;
  230. _DtCvFrmtOption flow;
  231. int percent;
  232. _DtCvUnit leading;
  233. _DtCvUnit fmargin;
  234. _DtCvUnit lmargin;
  235. _DtCvUnit rmargin;
  236. _DtCvUnit tmargin;
  237. _DtCvUnit bmargin;
  238. _DtCvLine bdr_info;
  239. struct _dtCvSegment *seg_list;
  240. } _DtCvContainer;
  241. typedef struct _DtCvString {
  242. void *string;
  243. _DtCvPointer font;
  244. } _DtCvString;
  245. typedef struct _dtCvRegion {
  246. _DtCvPointer info;
  247. _DtCvUnit width;
  248. _DtCvUnit height;
  249. _DtCvUnit ascent;
  250. } _DtCvRegion;
  251. typedef struct _dtCvTable {
  252. int num_cols;
  253. char **col_w;
  254. _DtCvFrmtOption *col_justify;
  255. char *justify_chars;
  256. char **cell_ids;
  257. struct _dtCvSegment **cells;
  258. } _DtCvTable;
  259. typedef union _dtCvSegHandles {
  260. _DtCvContainer container;
  261. _DtCvString string;
  262. _DtCvRegion region;
  263. _DtCvTable table;
  264. _DtCvLine rule;
  265. char *marker;
  266. } _DtCvSegHandles;
  267. struct _dtCvSegment {
  268. unsigned long type;
  269. int link_idx;
  270. _DtCvSegHandles handle;
  271. struct _dtCvSegment *next_seg;
  272. struct _dtCvSegment *next_disp;
  273. _DtCvPointer client_use;
  274. _DtCvPointer internal_use;
  275. };
  276. struct _dtCvSegPts {
  277. struct _dtCvSegment *segment;
  278. int offset;
  279. int len;
  280. };
  281. typedef struct _dtCvTopicInfo {
  282. char *id_str;
  283. struct _dtCvSegment *seg_list;
  284. _DtCvPointInfo **mark_list;
  285. struct _dtCvLinkDb *link_data;
  286. } _DtCvTopicInfo;
  287. typedef struct _dtCvStringClientData {
  288. unsigned int vcc;
  289. unsigned int vclen;
  290. unsigned int hilite_type;
  291. char* bg_color;
  292. char* fg_color;
  293. unsigned long bg_pixel;
  294. unsigned long fg_pixel;
  295. } _DtCvStringClientData;
  296. typedef struct _dtCvRegionClientData {
  297. _DtCvPointer GraphicHandle;
  298. } _DtCvRegionClientData;
  299. typedef union _dtCvClientData {
  300. _DtCvRegionClientData region;
  301. _DtCvStringClientData string;
  302. } _DtCvClientData;
  303. /******** Public Structure Typedef Declarations ********/
  304. /******** Public Prototyped Procedures ********/
  305. /******** Public Macro Declarations ********/
  306. /*
  307. * set segment type
  308. */
  309. #define _DtCvSetTypeToContainer(x) \
  310. (((x) & ~(_DtCvPRIMARY_MASK)) | _DtCvCONTAINER)
  311. #define _DtCvSetTypeToLine(x) \
  312. (((x) & ~(_DtCvPRIMARY_MASK)) | _DtCvLINE)
  313. #define _DtCvSetTypeToMarker(x) \
  314. (((x) & ~(_DtCvPRIMARY_MASK)) | _DtCvMARKER)
  315. #define _DtCvSetTypeToNoop(x) \
  316. (((x) & ~(_DtCvPRIMARY_MASK)) | _DtCvNOOP)
  317. #define _DtCvSetTypeToRegion(x) \
  318. (((x) & ~(_DtCvPRIMARY_MASK)) | _DtCvREGION)
  319. #define _DtCvSetTypeToString(x) \
  320. (((x) & ~(_DtCvPRIMARY_MASK)) | _DtCvSTRING)
  321. #define _DtCvSetTypeToTable(x) \
  322. (((x) & ~(_DtCvPRIMARY_MASK)) | _DtCvTABLE)
  323. /*
  324. * set segment flags
  325. */
  326. #define _DtCvSetTypeToBlockLine(x) ((x) | _DtCvBLOCK_LINE)
  327. #define _DtCvSetTypeToController(x) ((x) | _DtCvCONTROLLER)
  328. #define _DtCvSetTypeToGhostLink(x) ((x) | _DtCvGHOST_LINK)
  329. #define _DtCvSetTypeToHyperText(x) ((x) | _DtCvHYPER_TEXT)
  330. #define _DtCvSetTypeToInLine(x) ((x) | _DtCvIN_LINE)
  331. #define _DtCvSetTypeToNewLine(x) ((x) | _DtCvNEW_LINE)
  332. #define _DtCvSetTypeToNonBreak(x) ((x) | _DtCvNON_BREAK)
  333. #define _DtCvSetTypeToSearch(x) ((x) | _DtCvSEARCH_FLAG)
  334. #define _DtCvSetTypeToSearchBegin(x) ((x) | _DtCvSEARCH_BEGIN)
  335. #define _DtCvSetTypeToSearchEnd(x) ((x) | _DtCvSEARCH_END)
  336. #define _DtCvSetTypeToSubScript(x) ((x) | _DtCvSUB_SCRIPT)
  337. #define _DtCvSetTypeToSuperScript(x) ((x) | _DtCvSUPER_SCRIPT)
  338. /*
  339. * set character size
  340. */
  341. #define _DtCvSetTypeToWideChar(x) ((x) | _DtCvWIDE_CHAR)
  342. /*
  343. * set application flags and/or field
  344. */
  345. #define _DtCvSetAppFlag1(x) ((x) | _DtCvAPP_FLAG1)
  346. #define _DtCvSetAppFlag2(x) ((x) | _DtCvAPP_FLAG2)
  347. #define _DtCvSetAppFlag3(x) ((x) | _DtCvAPP_FLAG3)
  348. #define _DtCvSetAppFlag4(x) ((x) | _DtCvAPP_FLAG4)
  349. #define _DtCvSetAppField(x,y) \
  350. (((x) & ~(_DtCvAPP_FIELD_MASK)) | \
  351. ((y & _DtCvAPP_FIELD_MASK) << _DtCvAPP_FIELD_OFFSET))
  352. #define _DtCvSetAppFieldSmall(x,y) \
  353. (((x) & ~(_DtCvAPP_FIELD_S_MASK)) | \
  354. ((y & _DtCvAPP_FIELD_S_MASK) << _DtCvAPP_FIELD_OFFSET))
  355. /*
  356. * get the application field value
  357. */
  358. #define _DtCvGetAppField(x) \
  359. (((x) & _DtCvAPP_FIELD_MASK) >> _DtCvAPP_FIELD_OFFSET)
  360. #define _DtCvGetAppFieldSmall(x) \
  361. (((x) & _DtCvAPP_FIELD_S_MASK) >> _DtCvAPP_FIELD_OFFSET)
  362. /******** Semi-Public Macro Declarations ********/
  363. /*
  364. * get segment type
  365. */
  366. #define _DtCvPrimaryTypeOfSeg(x) ((x->type) & _DtCvPRIMARY_MASK)
  367. #define _DtCvIsSegContainer(x) \
  368. (((((x)->type) & _DtCvPRIMARY_MASK) == _DtCvCONTAINER) ? 1 : 0)
  369. #define _DtCvIsSegLine(x) \
  370. (((((x)->type) & _DtCvPRIMARY_MASK) == _DtCvLINE) ? 1 : 0)
  371. #define _DtCvIsSegMarker(x) \
  372. (((((x)->type) & _DtCvPRIMARY_MASK) == _DtCvMARKER) ? 1 : 0)
  373. #define _DtCvIsSegNoop(x) \
  374. (((((x)->type) & _DtCvPRIMARY_MASK) == _DtCvNOOP) ? 1 : 0)
  375. #define _DtCvIsSegRegion(x) \
  376. (((((x)->type) & _DtCvPRIMARY_MASK) == _DtCvREGION) ? 1 : 0)
  377. #define _DtCvIsSegString(x) \
  378. (((((x)->type) & _DtCvPRIMARY_MASK) == _DtCvSTRING) ? 1 : 0)
  379. #define _DtCvIsSegTable(x) \
  380. (((((x)->type) & _DtCvPRIMARY_MASK) == _DtCvTABLE) ? 1 : 0)
  381. /*
  382. * get segment flags
  383. */
  384. #define _DtCvIsSegController(x) \
  385. ((((x)->type) & _DtCvCONTROLLER) ? 1 : 0)
  386. #define _DtCvIsSegBlockLine(x) \
  387. ((((x)->type) & _DtCvBLOCK_LINE) ? 1 : 0)
  388. #define _DtCvIsSegGhostLink(x) \
  389. ((((x)->type) & _DtCvGHOST_LINK) ? 1 : 0)
  390. #define _DtCvIsSegHyperText(x) \
  391. ((((x)->type) & _DtCvHYPER_TEXT) ? 1 : 0)
  392. #define _DtCvIsSegInLine(x) \
  393. ((((x)->type) & _DtCvIN_LINE) ? 1 : 0)
  394. #define _DtCvIsSegNewLine(x) \
  395. ((((x)->type) & _DtCvNEW_LINE) ? 1 : 0)
  396. #define _DtCvIsSegNonBreakingChar(x) \
  397. ((((x)->type) & _DtCvNON_BREAK) ? 1 : 0)
  398. #define _DtCvIsSegPageBreak(x) \
  399. ((((x)->type) & _DtCvPAGE_BREAK) ? 1 : 0)
  400. #define _DtCvIsSegRegChar(x) \
  401. ((((x)->type) & _DtCvWIDE_CHAR) ? 0 : 1)
  402. #define _DtCvIsSegSubScript(x) \
  403. ((((x)->type) & _DtCvSUB_SCRIPT) ? 1 : 0)
  404. #define _DtCvIsSegSuperScript(x) \
  405. ((((x)->type) & _DtCvSUPER_SCRIPT) ? 1 : 0)
  406. #define _DtCvIsSegWideChar(x) \
  407. ((((x)->type) & _DtCvWIDE_CHAR) ? 1 : 0)
  408. /*
  409. * segment access
  410. */
  411. #define _DtCvNextSeg(x) ((x)->next_seg)
  412. #define _DtCvNextDisp(x) ((x)->next_disp)
  413. /*
  414. * container access
  415. */
  416. #define _DtCvContainerOfSeg(x) \
  417. ((x)->handle.container)
  418. #define _DtCvContainerBMarginOfSeg(x) \
  419. ((x)->handle.container.bmargin)
  420. #define _DtCvContainerBorderOfSeg(x) \
  421. ((x)->handle.container.border)
  422. #define _DtCvContainerFlowOfSeg(x) \
  423. ((x)->handle.container.flow)
  424. #define _DtCvContainerFMarginOfSeg(x) \
  425. ((x)->handle.container.fmargin)
  426. #define _DtCvContainerIdOfSeg(x) \
  427. ((x)->handle.container.id)
  428. #define _DtCvContainerJustifyCharOfSeg(x) \
  429. ((x)->handle.container.justify_char)
  430. #define _DtCvContainerJustifyOfSeg(x) \
  431. ((x)->handle.container.justify)
  432. #define _DtCvContainerLeadingOfSeg(x) \
  433. ((x)->handle.container.leading)
  434. #define _DtCvContainerLineWidthOfSeg(x) \
  435. ((x)->handle.container.bdr_info.width)
  436. #define _DtCvContainerLineDataOfSeg(x) \
  437. ((x)->handle.container.bdr_info.data)
  438. #define _DtCvContainerListOfSeg(x) \
  439. ((x)->handle.container.seg_list)
  440. #define _DtCvContainerLMarginOfSeg(x) \
  441. ((x)->handle.container.lmargin)
  442. #define _DtCvContainerOrientOfSeg(x) \
  443. ((x)->handle.container.orient)
  444. #define _DtCvContainerPercentOfSeg(x) \
  445. ((x)->handle.container.percent)
  446. #define _DtCvContainerRMarginOfSeg(x) \
  447. ((x)->handle.container.rmargin)
  448. #define _DtCvContainerTMarginOfSeg(x) \
  449. ((x)->handle.container.tmargin)
  450. #define _DtCvContainerTypeOfSeg(x) \
  451. ((x)->handle.container.type)
  452. #define _DtCvContainerVJustifyOfSeg(x) \
  453. ((x)->handle.container.vjustify)
  454. #define _DtCvContainerVOrientOfSeg(x) \
  455. ((x)->handle.container.vorient)
  456. /*
  457. * marker access
  458. */
  459. #define _DtCvIdOfMarkerSeg(x) ((x)->handle.marker)
  460. /*
  461. * marker access
  462. */
  463. #define _DtCvDataOfLineSeg(x) ((x)->handle.rule.data)
  464. #define _DtCvWidthOfLineSeg(x) ((x)->handle.rule.width)
  465. /*
  466. * string access
  467. */
  468. #define _DtCvStringOfStringSeg(x) ((x)->handle.string.string)
  469. #define _DtCvFontOfStringSeg(x) ((x)->handle.string.font)
  470. /*
  471. * region access
  472. */
  473. #define _DtCvInfoOfRegionSeg(x) ((x)->handle.region.info)
  474. #define _DtCvWidthOfRegionSeg(x) ((x)->handle.region.width)
  475. #define _DtCvHeightOfRegionSeg(x) ((x)->handle.region.height)
  476. #define _DtCvAscentOfRegionSeg(x) ((x)->handle.region.ascent)
  477. /*
  478. * table access
  479. */
  480. #define _DtCvNumColsOfTableSeg(x) ((x)->handle.table.num_cols)
  481. #define _DtCvColWOfTableSeg(x) ((x)->handle.table.col_w)
  482. #define _DtCvColJustifyOfTableSeg(x) ((x)->handle.table.col_justify)
  483. #define _DtCvJustifyCharsOfTableSeg(x) ((x)->handle.table.justify_chars)
  484. #define _DtCvCellIdsOfTableSeg(x) ((x)->handle.table.cell_ids)
  485. #define _DtCvCellsOfTableSeg(x) ((x)->handle.table.cells)
  486. /******** Semi-Public Function Declarations ********/
  487. /******** Public Function Declarations ********/
  488. #ifdef __cplusplus
  489. } /* Close scope of 'extern "C"' declaration which encloses file. */
  490. #endif
  491. #endif /* _DtCanvasSegP_h */
  492. /* DON'T ADD ANYTHING AFTER THIS #endif */