CanvasSegP.h 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554
  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: 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. #ifdef __osf__
  222. typedef struct _dtCvSegment * _DtCvSegmentPointer;
  223. #endif
  224. typedef struct _dtCvContainer {
  225. char *id;
  226. char *justify_char;
  227. _DtCvFrmtOption type;
  228. _DtCvFrmtOption border;
  229. _DtCvFrmtOption justify;
  230. _DtCvFrmtOption vjustify;
  231. _DtCvFrmtOption orient;
  232. _DtCvFrmtOption vorient;
  233. _DtCvFrmtOption flow;
  234. int percent;
  235. _DtCvUnit leading;
  236. _DtCvUnit fmargin;
  237. _DtCvUnit lmargin;
  238. _DtCvUnit rmargin;
  239. _DtCvUnit tmargin;
  240. _DtCvUnit bmargin;
  241. _DtCvLine bdr_info;
  242. #ifdef __osf__
  243. _DtCvSegmentPointer seg_list;
  244. #else
  245. struct _dtCvSegment *seg_list;
  246. #endif
  247. } _DtCvContainer;
  248. typedef struct _DtCvString {
  249. void *string;
  250. _DtCvPointer font;
  251. } _DtCvString;
  252. typedef struct _dtCvRegion {
  253. _DtCvPointer info;
  254. _DtCvUnit width;
  255. _DtCvUnit height;
  256. _DtCvUnit ascent;
  257. } _DtCvRegion;
  258. typedef struct _dtCvTable {
  259. int num_cols;
  260. char **col_w;
  261. _DtCvFrmtOption *col_justify;
  262. char *justify_chars;
  263. char **cell_ids;
  264. struct _dtCvSegment **cells;
  265. } _DtCvTable;
  266. typedef union _dtCvSegHandles {
  267. _DtCvContainer container;
  268. _DtCvString string;
  269. _DtCvRegion region;
  270. _DtCvTable table;
  271. _DtCvLine rule;
  272. char *marker;
  273. } _DtCvSegHandles;
  274. struct _dtCvSegment {
  275. unsigned long type;
  276. int link_idx;
  277. _DtCvSegHandles handle;
  278. struct _dtCvSegment *next_seg;
  279. struct _dtCvSegment *next_disp;
  280. _DtCvPointer client_use;
  281. _DtCvPointer internal_use;
  282. };
  283. struct _dtCvSegPts {
  284. struct _dtCvSegment *segment;
  285. int offset;
  286. int len;
  287. };
  288. #ifdef __osf__
  289. typedef struct _dtCvLinkDb * _DtCvLinkDbPointer;
  290. #endif
  291. typedef struct _dtCvTopicInfo {
  292. char *id_str;
  293. struct _dtCvSegment *seg_list;
  294. _DtCvPointInfo **mark_list;
  295. #ifdef __osf__
  296. _DtCvLinkDbPointer link_data;
  297. #else
  298. struct _dtCvLinkDb *link_data;
  299. #endif
  300. } _DtCvTopicInfo;
  301. typedef struct _dtCvStringClientData {
  302. unsigned int vcc;
  303. unsigned int vclen;
  304. unsigned int hilite_type;
  305. char* bg_color;
  306. char* fg_color;
  307. unsigned long bg_pixel;
  308. unsigned long fg_pixel;
  309. } _DtCvStringClientData;
  310. typedef struct _dtCvRegionClientData {
  311. _DtCvPointer GraphicHandle;
  312. } _DtCvRegionClientData;
  313. typedef union _dtCvClientData {
  314. _DtCvRegionClientData region;
  315. _DtCvStringClientData string;
  316. } _DtCvClientData;
  317. /******** Public Structure Typedef Declarations ********/
  318. /******** Public Prototyped Procedures ********/
  319. /******** Public Macro Declarations ********/
  320. /*
  321. * set segment type
  322. */
  323. #define _DtCvSetTypeToContainer(x) \
  324. (((x) & ~(_DtCvPRIMARY_MASK)) | _DtCvCONTAINER)
  325. #define _DtCvSetTypeToLine(x) \
  326. (((x) & ~(_DtCvPRIMARY_MASK)) | _DtCvLINE)
  327. #define _DtCvSetTypeToMarker(x) \
  328. (((x) & ~(_DtCvPRIMARY_MASK)) | _DtCvMARKER)
  329. #define _DtCvSetTypeToNoop(x) \
  330. (((x) & ~(_DtCvPRIMARY_MASK)) | _DtCvNOOP)
  331. #define _DtCvSetTypeToRegion(x) \
  332. (((x) & ~(_DtCvPRIMARY_MASK)) | _DtCvREGION)
  333. #define _DtCvSetTypeToString(x) \
  334. (((x) & ~(_DtCvPRIMARY_MASK)) | _DtCvSTRING)
  335. #define _DtCvSetTypeToTable(x) \
  336. (((x) & ~(_DtCvPRIMARY_MASK)) | _DtCvTABLE)
  337. /*
  338. * set segment flags
  339. */
  340. #define _DtCvSetTypeToBlockLine(x) ((x) | _DtCvBLOCK_LINE)
  341. #define _DtCvSetTypeToController(x) ((x) | _DtCvCONTROLLER)
  342. #define _DtCvSetTypeToGhostLink(x) ((x) | _DtCvGHOST_LINK)
  343. #define _DtCvSetTypeToHyperText(x) ((x) | _DtCvHYPER_TEXT)
  344. #define _DtCvSetTypeToInLine(x) ((x) | _DtCvIN_LINE)
  345. #define _DtCvSetTypeToNewLine(x) ((x) | _DtCvNEW_LINE)
  346. #define _DtCvSetTypeToNonBreak(x) ((x) | _DtCvNON_BREAK)
  347. #define _DtCvSetTypeToSearch(x) ((x) | _DtCvSEARCH_FLAG)
  348. #define _DtCvSetTypeToSearchBegin(x) ((x) | _DtCvSEARCH_BEGIN)
  349. #define _DtCvSetTypeToSearchEnd(x) ((x) | _DtCvSEARCH_END)
  350. #define _DtCvSetTypeToSubScript(x) ((x) | _DtCvSUB_SCRIPT)
  351. #define _DtCvSetTypeToSuperScript(x) ((x) | _DtCvSUPER_SCRIPT)
  352. /*
  353. * set character size
  354. */
  355. #define _DtCvSetTypeToWideChar(x) ((x) | _DtCvWIDE_CHAR)
  356. /*
  357. * set application flags and/or field
  358. */
  359. #define _DtCvSetAppFlag1(x) ((x) | _DtCvAPP_FLAG1)
  360. #define _DtCvSetAppFlag2(x) ((x) | _DtCvAPP_FLAG2)
  361. #define _DtCvSetAppFlag3(x) ((x) | _DtCvAPP_FLAG3)
  362. #define _DtCvSetAppFlag4(x) ((x) | _DtCvAPP_FLAG4)
  363. #define _DtCvSetAppField(x,y) \
  364. (((x) & ~(_DtCvAPP_FIELD_MASK)) | \
  365. ((y & _DtCvAPP_FIELD_MASK) << _DtCvAPP_FIELD_OFFSET))
  366. #define _DtCvSetAppFieldSmall(x,y) \
  367. (((x) & ~(_DtCvAPP_FIELD_S_MASK)) | \
  368. ((y & _DtCvAPP_FIELD_S_MASK) << _DtCvAPP_FIELD_OFFSET))
  369. /*
  370. * get the application field value
  371. */
  372. #define _DtCvGetAppField(x) \
  373. (((x) & _DtCvAPP_FIELD_MASK) >> _DtCvAPP_FIELD_OFFSET)
  374. #define _DtCvGetAppFieldSmall(x) \
  375. (((x) & _DtCvAPP_FIELD_S_MASK) >> _DtCvAPP_FIELD_OFFSET)
  376. /******** Semi-Public Macro Declarations ********/
  377. /*
  378. * get segment type
  379. */
  380. #define _DtCvPrimaryTypeOfSeg(x) ((x->type) & _DtCvPRIMARY_MASK)
  381. #define _DtCvIsSegContainer(x) \
  382. (((((x)->type) & _DtCvPRIMARY_MASK) == _DtCvCONTAINER) ? 1 : 0)
  383. #define _DtCvIsSegLine(x) \
  384. (((((x)->type) & _DtCvPRIMARY_MASK) == _DtCvLINE) ? 1 : 0)
  385. #define _DtCvIsSegMarker(x) \
  386. (((((x)->type) & _DtCvPRIMARY_MASK) == _DtCvMARKER) ? 1 : 0)
  387. #define _DtCvIsSegNoop(x) \
  388. (((((x)->type) & _DtCvPRIMARY_MASK) == _DtCvNOOP) ? 1 : 0)
  389. #define _DtCvIsSegRegion(x) \
  390. (((((x)->type) & _DtCvPRIMARY_MASK) == _DtCvREGION) ? 1 : 0)
  391. #define _DtCvIsSegString(x) \
  392. (((((x)->type) & _DtCvPRIMARY_MASK) == _DtCvSTRING) ? 1 : 0)
  393. #define _DtCvIsSegTable(x) \
  394. (((((x)->type) & _DtCvPRIMARY_MASK) == _DtCvTABLE) ? 1 : 0)
  395. /*
  396. * get segment flags
  397. */
  398. #define _DtCvIsSegController(x) \
  399. ((((x)->type) & _DtCvCONTROLLER) ? 1 : 0)
  400. #define _DtCvIsSegBlockLine(x) \
  401. ((((x)->type) & _DtCvBLOCK_LINE) ? 1 : 0)
  402. #define _DtCvIsSegGhostLink(x) \
  403. ((((x)->type) & _DtCvGHOST_LINK) ? 1 : 0)
  404. #define _DtCvIsSegHyperText(x) \
  405. ((((x)->type) & _DtCvHYPER_TEXT) ? 1 : 0)
  406. #define _DtCvIsSegInLine(x) \
  407. ((((x)->type) & _DtCvIN_LINE) ? 1 : 0)
  408. #define _DtCvIsSegNewLine(x) \
  409. ((((x)->type) & _DtCvNEW_LINE) ? 1 : 0)
  410. #define _DtCvIsSegNonBreakingChar(x) \
  411. ((((x)->type) & _DtCvNON_BREAK) ? 1 : 0)
  412. #define _DtCvIsSegPageBreak(x) \
  413. ((((x)->type) & _DtCvPAGE_BREAK) ? 1 : 0)
  414. #define _DtCvIsSegRegChar(x) \
  415. ((((x)->type) & _DtCvWIDE_CHAR) ? 0 : 1)
  416. #define _DtCvIsSegSubScript(x) \
  417. ((((x)->type) & _DtCvSUB_SCRIPT) ? 1 : 0)
  418. #define _DtCvIsSegSuperScript(x) \
  419. ((((x)->type) & _DtCvSUPER_SCRIPT) ? 1 : 0)
  420. #define _DtCvIsSegWideChar(x) \
  421. ((((x)->type) & _DtCvWIDE_CHAR) ? 1 : 0)
  422. /*
  423. * segment access
  424. */
  425. #define _DtCvNextSeg(x) ((x)->next_seg)
  426. #define _DtCvNextDisp(x) ((x)->next_disp)
  427. /*
  428. * container access
  429. */
  430. #define _DtCvContainerOfSeg(x) \
  431. ((x)->handle.container)
  432. #define _DtCvContainerBMarginOfSeg(x) \
  433. ((x)->handle.container.bmargin)
  434. #define _DtCvContainerBorderOfSeg(x) \
  435. ((x)->handle.container.border)
  436. #define _DtCvContainerFlowOfSeg(x) \
  437. ((x)->handle.container.flow)
  438. #define _DtCvContainerFMarginOfSeg(x) \
  439. ((x)->handle.container.fmargin)
  440. #define _DtCvContainerIdOfSeg(x) \
  441. ((x)->handle.container.id)
  442. #define _DtCvContainerJustifyCharOfSeg(x) \
  443. ((x)->handle.container.justify_char)
  444. #define _DtCvContainerJustifyOfSeg(x) \
  445. ((x)->handle.container.justify)
  446. #define _DtCvContainerLeadingOfSeg(x) \
  447. ((x)->handle.container.leading)
  448. #define _DtCvContainerLineWidthOfSeg(x) \
  449. ((x)->handle.container.bdr_info.width)
  450. #define _DtCvContainerLineDataOfSeg(x) \
  451. ((x)->handle.container.bdr_info.data)
  452. #define _DtCvContainerListOfSeg(x) \
  453. ((x)->handle.container.seg_list)
  454. #define _DtCvContainerLMarginOfSeg(x) \
  455. ((x)->handle.container.lmargin)
  456. #define _DtCvContainerOrientOfSeg(x) \
  457. ((x)->handle.container.orient)
  458. #define _DtCvContainerPercentOfSeg(x) \
  459. ((x)->handle.container.percent)
  460. #define _DtCvContainerRMarginOfSeg(x) \
  461. ((x)->handle.container.rmargin)
  462. #define _DtCvContainerTMarginOfSeg(x) \
  463. ((x)->handle.container.tmargin)
  464. #define _DtCvContainerTypeOfSeg(x) \
  465. ((x)->handle.container.type)
  466. #define _DtCvContainerVJustifyOfSeg(x) \
  467. ((x)->handle.container.vjustify)
  468. #define _DtCvContainerVOrientOfSeg(x) \
  469. ((x)->handle.container.vorient)
  470. /*
  471. * marker access
  472. */
  473. #define _DtCvIdOfMarkerSeg(x) ((x)->handle.marker)
  474. /*
  475. * marker access
  476. */
  477. #define _DtCvDataOfLineSeg(x) ((x)->handle.rule.data)
  478. #define _DtCvWidthOfLineSeg(x) ((x)->handle.rule.width)
  479. /*
  480. * string access
  481. */
  482. #define _DtCvStringOfStringSeg(x) ((x)->handle.string.string)
  483. #define _DtCvFontOfStringSeg(x) ((x)->handle.string.font)
  484. /*
  485. * region access
  486. */
  487. #define _DtCvInfoOfRegionSeg(x) ((x)->handle.region.info)
  488. #define _DtCvWidthOfRegionSeg(x) ((x)->handle.region.width)
  489. #define _DtCvHeightOfRegionSeg(x) ((x)->handle.region.height)
  490. #define _DtCvAscentOfRegionSeg(x) ((x)->handle.region.ascent)
  491. /*
  492. * table access
  493. */
  494. #define _DtCvNumColsOfTableSeg(x) ((x)->handle.table.num_cols)
  495. #define _DtCvColWOfTableSeg(x) ((x)->handle.table.col_w)
  496. #define _DtCvColJustifyOfTableSeg(x) ((x)->handle.table.col_justify)
  497. #define _DtCvJustifyCharsOfTableSeg(x) ((x)->handle.table.justify_chars)
  498. #define _DtCvCellIdsOfTableSeg(x) ((x)->handle.table.cell_ids)
  499. #define _DtCvCellsOfTableSeg(x) ((x)->handle.table.cells)
  500. /******** Semi-Public Function Declarations ********/
  501. /******** Public Function Declarations ********/
  502. #ifdef __cplusplus
  503. } /* Close scope of 'extern "C"' declaration which encloses file. */
  504. #endif
  505. #endif /* _DtCanvasSegP_h */
  506. /* DON'T ADD ANYTHING AFTER THIS #endif */