xoakufont.h 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283
  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. /* xoakufont.h 1.4 - Fujitsu source for CDEnext 96/05/30 11:20:56 */
  24. /* $XConsortium: xoakufont.h /main/4 1996/06/25 20:17:03 cde-fuj $ */
  25. /*
  26. * (c) Copyright 1995 FUJITSU LIMITED
  27. * This is source code modified by FUJITSU LIMITED under the Joint
  28. * Development Agreement for the CDEnext PST.
  29. * This is unpublished proprietary source code of FUJITSU LIMITED
  30. */
  31. #include "fssxeg.h"
  32. extern Widget CreateLabel(Widget owner, String name, String str);
  33. extern int readSNF(FalFontData **fdata,
  34. int *width,
  35. int *height,
  36. char *err);
  37. extern int writeSNF(int restart, int *err);
  38. extern int ptnClose(void);
  39. extern int ptnAdd(int code, char *ptn);
  40. extern int ptnGet(int code, char *ptn);
  41. extern int ptnSense(int code);
  42. extern int ptnDel(int code);
  43. extern int ptnSqToNo(int num);
  44. extern int ptnNoToSq(int ncode);
  45. extern int noToCode(int sno);
  46. extern int codeToNo(int code);
  47. extern int codeCheck(int code);
  48. extern void bitSetInfo(int width, int height);
  49. extern void bitSet(char *ptn, int cx, int cy);
  50. extern void bitReset(char *ptn, int cx, int cy);
  51. extern int bitRead(char *ptn, int cx, int cy);
  52. extern void bitPtnClear(char *ptn);
  53. extern void bitPtnCopy(char *d_ptn, char *s_ptn);
  54. extern int bitDrawLine(char *ptn,
  55. int x1,
  56. int y1,
  57. int x2,
  58. int y2,
  59. int mode);
  60. extern int bitDrawRect(char *ptn,
  61. int x,
  62. int y,
  63. int width,
  64. int height,
  65. int mode);
  66. extern int bitDrawCls(char *ptn,
  67. int x,
  68. int y,
  69. int width,
  70. int height);
  71. extern int bitDrawSet(char *ptn,
  72. int x,
  73. int y,
  74. int width,
  75. int height);
  76. extern int bitDrawRev(char *ptn,
  77. int x,
  78. int y,
  79. int width,
  80. int height);
  81. extern int bitDrawCpy(char *ptn,
  82. int sx,
  83. int sy,
  84. int width,
  85. int height,
  86. int cut_flag);
  87. extern int bitDrawRoll(char *ptn, int x, int y, int width, int height);
  88. extern int bitDrawSymV(char *ptn, int x, int y, int width, int height);
  89. extern int bitDrawSymH(char *ptn, int x, int y, int width, int height);
  90. #define D_MAX 10
  91. #define PROC_POINT 0
  92. #define PROC_LINE 1
  93. #define PROC_RECT 2
  94. #define PROC_CLS 3
  95. #define PROC_SET 4
  96. #define PROC_REV 5
  97. #define PROC_CUT 6
  98. #define PROC_CPY 7
  99. #define PROC_PASTE 8
  100. #define PROC_ROLL 9
  101. #define PROC_SYMV 10
  102. #define PROC_SYMH 11
  103. #define PROC_CIRCLE 12
  104. #define PROC_ERASE 13
  105. #define PROC_SELECT 14
  106. #define RES_MSG (1L<<0)
  107. #define RES_PROC (1L<<1)
  108. #define RES_SLCT (1L<<2)
  109. #define RES_RSV (1L<<3)
  110. #define CPY_COPY 0
  111. #define CPY_OVERLAY 1
  112. #define CODE_ADD 0
  113. #define CODE_DEL 1
  114. #define SET_CDSET1 0
  115. #define SET_CDSET3 1
  116. #define SET_NORMAL_U90_G1 0
  117. #define SET_NORMAL_G1 1
  118. #define SET_SYSTEM_G1 2
  119. #define SET_NORMAL 3
  120. #define SET_JEF 4
  121. #define SET_SYSTEM 5
  122. #define MG_MAXSIZE 100
  123. /**********************************************************************
  124. structure
  125. **********************************************************************/
  126. /* editting character */
  127. typedef struct _EditChar {
  128. FalFontData *fdata;
  129. int width;
  130. int height;
  131. int code;
  132. int ncode;
  133. char ptn[MAXPTNBYTE];
  134. char flag;
  135. } EditChar;
  136. /* character list */
  137. typedef struct _EditList {
  138. int nlist;
  139. int statloc;
  140. int slctloc;
  141. int nptn;
  142. int sqstart;
  143. Dimension list_h;
  144. Dimension elem_w;
  145. Dimension elem_h;
  146. Pixel back;
  147. Pixel border;
  148. } EditList;
  149. /* editting pane */
  150. typedef struct _EditPane {
  151. int width;
  152. int height;
  153. int pix_w;
  154. int pix_h;
  155. int color;
  156. int obj;
  157. Pixel back;
  158. Pixel border;
  159. } EditPane;
  160. /* X library */
  161. typedef struct _XlibInf {
  162. Display *display;
  163. Window root_winID;
  164. Window edit_winID;
  165. Window disp_winID;
  166. Window list_winID; /* 1995.10.02 */
  167. GC borderGC;
  168. GC backGC;
  169. GC rubGC;
  170. GC dashGC;
  171. XImage *dispImage;
  172. } XlibInf;
  173. typedef struct _DelInf {
  174. Dimension elem_w;
  175. Dimension elem_h;
  176. Dimension ptn_w;
  177. Dimension ptn_h;
  178. Dimension list_h;
  179. int s_ncode;
  180. int e_ncode;
  181. int sq_top;
  182. int sq_start;
  183. int sq_end;
  184. int disp_num;
  185. } DelInf;
  186. /* X library */
  187. typedef struct _DelPtnInf {
  188. Window disp_winID;
  189. XImage *dispImage;
  190. char ptn[MAXPTNBYTE];
  191. } DelPtnInf;
  192. /* editting pattern */
  193. typedef struct _EditPtnInf {
  194. char drag_f;
  195. int adj_px;
  196. int adj_py;
  197. int proc;
  198. char slct_f;
  199. int src1_px;
  200. int src1_py;
  201. int src2_px;
  202. int src2_py;
  203. int dest_px;
  204. int dest_py;
  205. char rsv_f;
  206. char rsv_ptn[MAXPTNBYTE];
  207. } EditPtnInf;
  208. /* copy patterns */
  209. typedef struct _CopyPtnInf {
  210. /* int size;*/
  211. FalFontData *fdata;
  212. int s1_code;
  213. int s2_code;
  214. int d1_code;
  215. int proc;
  216. } CopyPtnInf;
  217. /* fonts */
  218. typedef struct _FontInf {
  219. int num;
  220. FalFontDataList *lp;
  221. Widget *RecB;
  222. } FontInf;
  223. /**********************************************************************
  224. **********************************************************************/
  225. extern Widget toplevel;
  226. extern Widget editPtnW;
  227. extern Widget cpyPtnW;
  228. extern Widget mngPtnW;
  229. extern EditChar edg;
  230. extern EditList edlist;
  231. extern EditPane edpane;
  232. extern XlibInf xl;
  233. extern DelInf dn;
  234. extern DelPtnInf dl[D_MAX] ;
  235. extern DelPtnInf dl_glyph[EDLIST_MAX]; /* add dl_disp 1995.09.20 */
  236. extern int sq_disp[EDLIST_MAX]; /* add sq_disp 1995.09.20 */
  237. extern EditPtnInf em;
  238. extern CopyPtnInf cpm;
  239. /*
  240. * resources for font editor
  241. */
  242. #include"ufontrsrc.h" /* 1995.06.28 H.Chiba */
  243. /**********/