33 #include <X11/Intrinsic.h>
34 #include <X11/Shell.h>
38 #include <Xm/RowColumn.h>
41 #include <Xm/CascadeB.h>
45 typedef unsigned short s_char;
46 #define Y_XmTextSetCursorPosition(a,b) _XmTextSetCursorPosition(a,b,NULL)
49 #define Y_XmTextSetCursorPosition(a,b) _XmTextSetCursorPosition(a,b)
55 #define memcpy_(a,b,c) memcpy((char *)(a),(char *)(b),c)
56 #define memcmp_(a,b,c) memcmp((char *)(a),(char *)(b),c)
57 #define memset_(a,b,c) memset((char *)(a),b,c)
61 #define MIN_(x,a) if(x > (a)) x = a
62 #define MAX_(x,a) if(x < (a)) x = a
63 #define Swap(x,y) (x ^= (y ^= (x ^= y)))
64 #define FtoI(a) ((a < 0) ? a-0.5 : a+0.5)
65 #define Zabs(a) ((a < 0) ? -a : a)
66 #define Sign(a) ((a < 0) ? -1 : 1)
67 #define max(a,b) (((a) > (b)) ? (a) : (b))
68 #define min(a,b) (((a) < (b)) ? (a) : (b))
72 #define GetOut(wd) (((XmTextWidget) (wd))->text.output)
73 #define GetInp(wd) (((XmTextWidget) (wd))->text.input)
74 #define GetSource(wd) (((XmTextWidget) (wd))->text.source)
75 #define GetPart(wd) (((XmTextWidget) (wd))->text)
76 #define GetCurs(wd) (((XmTextWidget) (wd))->text).cursor_position
77 #define GetCurF(wd) (((XmTextWidget) (wd))->text).first_position
78 #define GetCurL(wd) (((XmTextWidget) (wd))->text).last_position
79 #define GetPrim(wd) (((XmTextWidget) (wd))->primitive)
80 #define GetUser(wd) (((XmTextWidget) (wd))->primitive).user_data
81 #define GetUserT(wd) (((XmTextWidget) (wd))->primitive).user_data
82 #define GetUserB(wd) (((XmPushButtonWidget) (wd))->primitive).user_data
83 #define GetUserD(wd) (((XmDrawingAreaRec*)(wd))->manager).user_data
85 #define GetFrameF(wd) (((XmFrameWidget) (wd))->manager).foreground
86 #define GetFrameGCb(wd) (((XmFrameWidget) (wd))->manager).background_GC
88 #define XtAddCallback_(a,b,c,d) XtAddCallback((Widget)a,b,(XtCallbackProc)(c),(XtPointer)(d))
89 #define YtSetTranslation_(a,b,c,d) YtSetTranslation((Widget)(a),b,c,(XtActionProc)(d))
91 #define YtCoreClassPart(w) ((CoreClassPart*)(w)->core.widget_class)
92 #define YtRealezeProc(w) YtCoreClassPart(w)->realize
93 #define YtExposeProc(w) YtCoreClassPart(w)->expose
95 #define GetWidgetX(w) (w)->core.x
96 #define GetWidgetY(w) (w)->core.y
98 #define GetWidgetWidth(w) (w)->core.width
99 #define GetWidgetHeight(w) (w)->core.height
108 #define YtSetArg(name, d) YtSetArg_(name,(XtArgVal)(d))
109 #define YtSetArg0(name, d) YtSetArg0_(name,(XtArgVal)(d))
122 #define YmNormText 10
123 #define YmTitleText 11
125 #define YmSelectText 13
126 #define YmHiSelectText 14
130 #define NFrameRes (YmSFrame-YmWork+1)
131 #define NButtonRes (YmSButton2-YmQButton+1)
132 #define NTextRes (YmHiSelectText-YmNormText+1)
137 XmStringCharSet L_charset;
138 XmStringCharSet A_charset;
146 #define FRAME_Narg 5+1
147 #define BUTTON_Narg 10
148 #define SLIDER_Narg 3
168 Yres *res[Nnames*Screen_N];
177 #define StructYres(a,b) struct {short i,n; Arg arg[b];} a; a.i = 0; a.n = b;
180 typedef int (*CallB)(int);
183 typedef void (*PrnText)();
198 #define YAddType_ 0x000000ff
199 #define YType_ 0x0000ff00
200 #define dLURD 0x000f0000
201 #define dLURD_ 0x00f00000
202 #define MnstrType(a_) ((a_) & YType_)
204 #define dLeft 0x00010000
206 #define dUp 0x00020000
207 #define dRight 0x00040000
209 #define dDown 0x00080000
211 #define dDnLt 0x00090000
212 #define dDnRt 0x000c0000
213 #define dRtDn 0x000c0000
214 #define dDnLtRt 0x000d0000
215 #define dUpLtRt 0x00070000
216 #define dDnUp 0x000a0000
217 #define dLtRt 0x00050000
218 #define dRtLt 0x00050000
220 #define dLeft_ 0x00100000
221 #define dUp_ 0x00200000
222 #define dRight_ 0x00400000
223 #define dDown_ 0x00800000
224 #define dDownF 0x00800000
225 #define dBottom (dDown | dLeft_)
226 #define dAttach_ 0x00ff0000
228 #define dIOEvent 0x01000000
229 #define dScreen 0x02000000
230 #define dUnSensitive 0x04000000
231 #define dArmed 0x08000000
233 #define dUnmap 0x10000000
234 #define dUnvisible 0x10000000
235 #define dUserRes 0x20000000
236 #define dTitle 0x40000000
237 #define dTear 0x40000000
238 #define dHelp 0x80000000
249 #define dBeginning 0x0002
251 #define dRowCol 0x0008
252 #define dScrWin 0x0010
253 #define dMenuBar 0x0020
254 #define dPopMenu 0x0040
255 #define YFrameMB_ 0x0120
256 #define YFrame_ 0x0100
257 #define YFrameR_ 0x0108
258 #define YFrameL_ 0x0101
260 #define YFrame_R (YFrame_ | dRight)
261 #define YFrameR_R (YFrameR_ | dRight)
263 #define YFrame_D (YFrame_ | dDown)
264 #define YFrameR_D (YFrameR_ | dDown)
266 #define YFrame_RD (YFrame_ | dDown | dRight)
267 #define YFrameR_RD (YFrameR_ | dDown | dRight)
268 #define YFrame_DR (YFrame_ | dDown | dRight)
269 #define YFrameR_DR (YFrameR_ | dDown | dRight)
271 #define YFrame_LR (YFrame_ | dLeft | dRight)
272 #define YFrameR_RL (YFrameR_ | dLeft | dRight)
273 #define YFrame_RL (YFrame_ | dLeft | dRight)
274 #define YFrameR_LR (YFrameR_ | dLeft | dRight)
276 #define YFrame_U (YFrame_ | dUp)
277 #define YFrameR_U (YFrameR_ | dUp)
279 #define YFrame_B (YFrame_ | dBeginning)
280 #define YFrameR_B (YFrameR_ | dBeginning)
282 #define YFrame_RB (YFrame_ | dRight | dBeginning)
283 #define YFrameR_RB (YFrameR_ | dRight | dBeginning)
285 #define YFrame_DB (YFrame_ | dDown | dBeginning)
286 #define YFrameR_DB (YFrameR_ | dDown | dBeginning)
288 #define YFrame_UB (YFrame_ | dUp | dBeginning)
289 #define YFrameR_UB (YFrameR_ | dUp | dBeginning)
292 #define YMnstr_ 0x0200
293 #define dMenuShell 0x0004
294 #define dFDialog 0x0001
295 #define dBBDialog 0x0002
296 #define dSDialog 0x0003
297 #define dDialog 0x0007
298 #define dModal 0x0008
299 #define YMnstrD_ 0x0201
300 #define YMnstrSD_ 0x0203
301 #define YMnstrDS_ 0x0203
302 #define dNoResize 0x0080
307 #define YText_ 0x0400
310 #define dFloat 0x0002
313 #define dScale 0x0008
314 #define dUnmapS 0x0080
315 #define dScaleU 0x0088
316 #define dScaleUnmap 0x0088
317 #define dSscaleUp_ 0x0020
318 #define dScaleUp 0x0028
320 #define dFirst 0x02000000
321 #define dNoInverse 0x0040
322 #define YTextI_ 0x0401
323 #define YTextC_ 0x0404
324 #define YTextF_ 0x0402
325 #define YTextIS_ 0x0409
326 #define YTextFS_ 0x040a
327 #define YText_R ( YText_ | dRight)
328 #define YText_L ( YText_ | dLeft)
329 #define YTextC_D ( YTextC_ | dDown )
330 #define YTextC_DR ( YTextC_ | dRight | dDown)
331 #define YTextC_RD ( YTextC_ | dRight | dDown)
332 #define YTextC_LR ( YTextC_ | dRight | dLeft)
333 #define YTextC_RL ( YTextC_ | dRight | dLeft)
334 #define YTextFU_ ( YTextF_ | dUserRes)
335 #define YTextIU_ ( YTextI_ | dUserRes)
336 #define YTextCU_ ( YTextC_ | dUserRes)
338 #define YTextI_DR ( YTextI_ | dRight | dDown)
339 #define YTextI_RD ( YTextI_ | dRight | dDown)
340 #define YTextI_R ( YTextI_ | dRight)
341 #define YTextI_L ( YTextI_ | dLeft)
342 #define YTextI_LD ( YTextI_ | dLeft | dDown)
343 #define YTextI_LR ( YTextI_ | dRight | dLeft)
344 #define YTextI_RL ( YTextI_ | dRight | dLeft)
345 #define YTextI_LRD ( YTextI_ | dRight | dDown | dLeft)
346 #define YTextI_LDR ( YTextI_ | dRight | dDown | dLeft)
347 #define YTextI_DLR ( YTextI_ | dRight | dDown | dLeft)
348 #define YTextI_DRL ( YTextI_ | dRight | dDown | dLeft)
349 #define YTextI_RDL ( YTextI_ | dRight | dDown | dLeft)
350 #define YTextI_RLD ( YTextI_ | dRight | dDown | dLeft)
352 #define YTextF_DR ( YTextF_ | dRight | dDown)
353 #define YTextF_RD ( YTextF_ | dRight | dDown)
354 #define YTextF_R ( YTextF_ | dRight)
355 #define YTextF_L ( YTextF_ | dLeft)
356 #define YTextF_LD ( YTextF_ | dLeft | dDown)
357 #define YTextF_LR ( YTextF_ | dRight | dLeft)
358 #define YTextF_RL ( YTextF_ | dRight | dLeft)
359 #define YTextF_LRD ( YTextF_ | dRight | dDown | dLeft)
360 #define YTextF_LDR ( YTextF_ | dRight | dDown | dLeft)
361 #define YTextF_DLR ( YTextF_ | dRight | dDown | dLeft)
362 #define YTextF_DRL ( YTextF_ | dRight | dDown | dLeft)
363 #define YTextF_RDL ( YTextF_ | dRight | dDown | dLeft)
364 #define YTextF_RLD ( YTextF_ | dRight | dDown | dLeft)
366 #define YTextW_ 0x0500
370 #define TextBackward 1
371 #define TextForward 0
381 #define dToggle 0x0004
382 #define dDrawn 0x0008
383 #define dCascade 0x0002
384 #define YButton_ 0x0800
385 #define YButtonT_ 0x0804
386 #define YButtonD_ 0x0808
387 #define YButtonC_ 0x0802
389 #define YButtonC_R (YButtonC_ | dRight)
390 #define YButton_R (YButton_ | dRight)
391 #define YButton_D (YButton_ | dDown)
392 #define YButton_L (YButton_ | dLeft)
393 #define YButton_RD (YButton_ | dRight | dDown)
394 #define YButton_LD (YButton_ | dLeft | dDown)
395 #define YButton_DL (YButton_ | dLeft | dDown)
396 #define YButton_LDR (YButton_ | dLeft | dDown | dRight)
397 #define YButton_DLR (YButton_ | dLeft | dDown | dRight)
398 #define YButtonT_R (YButtonT_ | dRight)
400 #define YButtonK YButton
401 #define YButtonK_ YButton_
402 #define YButtonKT_ YButtonT_
403 #define YButtonTK_ YButtonT_
405 #define YLabel_ 0x1000
406 #define YLabel_R (YLabel_ | dRight)
407 #define YLabel_L (YLabel_ | dLeft)
408 #define YLabel_D (YLabel_ | dDown)
409 #define YLabel_U (YLabel_ | dUp)
410 #define YLabel_RL (YLabel_ | dRight | dLeft)
411 #define YLabel_LR (YLabel_ | dRight | dLeft)
412 #define YLabel_DL (YLabel_ | dDown | dLeft)
413 #define YLabel_RD (YLabel_ | dDown | dRight)
414 #define YLabel_LD (YLabel_ | dDown | dLeft)
415 #define YLabel_LDR (YLabel_ | dDown | dLeft | dRight)
416 #define YLabel_DLR (YLabel_ | dDown | dLeft | dRight)
422 #define dPixmap_ 0x0004
423 #define dImage_ 0x0008
426 #define YDraw_ 0x2000
427 #define YDrawV_ 0x2002
428 #define YDrawH_ 0x2001
429 #define YDrawVH_ 0x2003
430 #define YDrawHV_ 0x2003
431 #define YDraw_P 0x2004
432 #define YDrawV_P 0x2006
433 #define YDrawH_P 0x2005
434 #define YDrawVH_P 0x2007
435 #define YDrawHV_P 0x2007
437 #define YDraw_I (0x2000 | dImage_)
438 #define YDrawV_I (0x2002 | dImage_)
439 #define YDrawH_I (0x2001 | dImage_)
440 #define YDrawVH_I (0x2003 | dImage_)
441 #define YDrawHV_I (0x2003 | dImage_)
442 #define YDraw_PI (0x2004 | dImage_)
443 #define YDrawV_PI (0x2006 | dImage_)
444 #define YDrawH_PI (0x2005 | dImage_)
445 #define YDrawVH_PI (0x2007 | dImage_)
446 #define YDrawHV_PI (0x2007 | dImage_)
449 #define dShowValue 0x0004
450 #define YScale_ 0x5000
451 #define YScaleU_ (YScale_ | dUserRes)
452 #define YScaleH_ (YScale_ | dHor)
453 #define YScaleV_ (YScale_ | dVer)
455 #define YScale_L (YScale_ | dLeft)
456 #define YScaleH_L (YScale_ | dHor | dLeft)
457 #define YScaleV_L (YScale_ | dVer | dLeft)
459 #define YScale_R (YScale_ | dRight)
460 #define YScaleH_R (YScale_ | dHor | dRight)
461 #define YScaleV_R (YScale_ | dVer | dRight)
463 #define YScale_RL (YScale_ | dRight | dLeft)
464 #define YScaleH_RL (YScale_ | dHor | dRight | dLeft)
465 #define YScaleV_RL (YScale_ | dVer | dRight | dLeft)
467 #define YScale_D (YScale_ | dDown)
468 #define YScaleH_D (YScale_ | dHor | dDown)
469 #define YScaleV_D (YScale_ | dVer | dDown)
473 #define dDrawSB_ 0x08
474 #define YScrollBar_ 0x4000
475 #define YScrollBarH_ (YScrollBar_ | dHor)
476 #define YScrollBarV_ (YScrollBar_ | dVer)
478 #define YScrollBar_L (YScrollBar_ | dLeft)
479 #define YScrollBarH_L (YScrollBar_ | dHor | dLeft)
480 #define YScrollBarV_L (YScrollBar_ | dVer | dLeft)
482 #define YScrollBar_R (YScrollBar_ | dRight)
483 #define YScrollBarH_R (YScrollBar_ | dHor | dRight)
484 #define YScrollBarV_R (YScrollBar_ | dVer | dRight)
486 #define YScrollBar_RL (YScrollBar_ | dRight | dLeft)
487 #define YScrollBarH_RL (YScrollBar_ | dHor | dRight | dLeft)
488 #define YScrollBarV_RL (YScrollBar_ | dVer | dRight | dLeft)
490 #define YScrollBar_D (YScrollBar_ | dDown)
491 #define YScrollBarH_D (YScrollBar_ | dHor | dDown)
492 #define YScrollBarV_D (YScrollBar_ | dVer | dDown)
495 #define YSeparator_ 0x8000
496 #define YSeparatorH_ (YSeparator_ | dHor)
497 #define YSeparatorV_ (YSeparator_ | dVer)
499 #define YSeparator_L (YSeparator_ | dLeft)
500 #define YSeparatorH_L (YSeparator_ | dHor | dLeft)
501 #define YSeparatorV_L (YSeparator_ | dVer | dLeft)
503 #define YSeparator_R (YSeparator_ | dRight)
504 #define YSeparatorH_R (YSeparator_ | dHor | dRight)
505 #define YSeparatorV_R (YSeparator_ | dVer | dRight)
507 #define YSeparator_RL (YSeparator_ | dRight | dLeft)
508 #define YSeparatorH_RL (YSeparator_ | dHor | dRight | dLeft)
509 #define YSeparatorV_RL (YSeparator_ | dVer | dRight | dLeft)
511 #define YSeparator_D (YSeparator_ | dDown)
512 #define YSeparatorH_D (YSeparator_ | dHor | dDown)
513 #define YSeparatorV_D (YSeparator_ | dVer | dDown)
516 #define YActivate 0x4001
517 #define YLoose 0x4002
519 #define YEnter 0x4004
520 #define YDisArm 0x4005
521 #define YFocus 0x4006
523 #define YSelect 0x4008
524 #define YExpose 0x4009
525 #define YInput 0x400a
526 #define YResize 0x400b
527 #define YClick 0x400c
528 #define YChanged 0x400d
530 #define YCancel 0x400e
533 #define YApply 0x4011
535 #define YInitZoom 0x4013
536 #define YTimeOut 0x4014
537 #define YClient 0x4015
538 #define YNewClient 0x4016
539 #define YKillClient 0x4017
540 #define YResizeR 0x4018
541 #define YModify 0x4019
542 #define YRefresh 0x401a
543 #define YCreate 0x401b
544 #define YPrimLoose 0x401c
545 #define YPrimFocus 0x401d
546 #define YDragScale 0x401e
548 #define YXorExpose 0x4020
553 #define YIncrementV 0x01
554 #define YDecrementV 0x02
555 #define YChangedV 0x03
557 #define YIncrementH 0x11
558 #define YDecrementH 0x12
559 #define YChangedH 0x13
566 unsigned char* data_name;
568 short icon_file, icon_depth;
569 short icon_width,icon_height;
641 short thickness,length;
666 unsigned int eType, keycode;
667 int foreground, background;
668 char mode,clip,WinDraw,CgmDraw;
676 short x1, y1, w1, h1;
679 int CgmWidth,CgmHeight,CgmX,CgmY;
725 #define YTextS YTextC
783 short thickness,width,height;
853 short thickness,length;
877 unsigned int eType, keycode;
878 int foreground, background;
879 char mode,clip,WinDraw,PixmapDraw;
887 short x1, y1, w1, h1;
890 int CgmWidth,CgmHeight,CgmX,CgmY;
940 #define YrTextS YrTextC
1002 short thickness,width,height;
1056 #define DLabel(var, type,name,res, Ic) \
1057 YLabel var = {YLabel_|type,name,res,0,Ic}
1059 #define DrLabel(var, type,name,res, Ic,args) \
1060 YrLabel var = {YLabel_|dUserRes|type,name,res,0,Ic,args}
1062 #define DTextF(var, type,name,res,cb, len,P,value,minv,maxv) \
1063 YTextF var = {YTextF_|type,name,res,cb,0,len,P,value,minv,maxv}
1065 #define DrTextF(var, type,name,res,cb, len,P,value,minv,maxv, args) \
1066 YrTextF var = {YTextFU_|type,name,res,cb,0,len,P,value,minv,maxv,0,args}
1068 #define DTextC( var, type,name,res,cb, len,maxlen,value) \
1069 YTextC var = {YTextC_|type,name,res,cb,0,len,maxlen,value}
1071 #define DrTextC(var, type,name,res,cb, len,maxlen,value,args) \
1072 YrTextC var = {YTextCU_|type,name,res,cb,0,len,maxlen,value,args}
1074 #define DTextI(var, type,name,res,cb, len,P,value,minv,maxv) \
1075 YTextI var = {YTextI_|type,name,res,cb,0,len,P,value,minv,maxv}
1077 #define DrTextI(var, type,name,res,cb, len,P,value,minv,maxv, args) \
1078 YrTextI var = {YTextIU_|type,name,res,cb,0,len,P,value,minv,maxv,0,args}
1080 #define DText(var, type,name,res,cb, len) \
1081 YText var = {YText_|type,name,res,cb,0,len}
1083 #define DrText(var, type,name,res,cb, len,args) \
1084 YrText var = {YText_|dUserRes|type,name,res,cb,0,len,args}
1087 #define DrScale(var, type,name,res,cb, val,mi,ma,thck,len,incr,d,args) \
1088 YrScale var = {YScaleU_|type,name,res,cb,0,val,mi,ma,thck,len,incr,d,args}
1090 #define DScale(var, type,name,res,cb, val,mi,ma,thck,len,incr,d) \
1091 YScale var = {YScale_|type,name,res,cb,0,val,mi,ma,thck,len,incr,d}
1093 #define DButton(var, type,name,res,cb, kIn,kOut,Ic) \
1094 YButton var = {YButton_|type,name,res,cb,0,kIn,kOut,Ic}
1096 #define DrButton(var, type,name,res,cb, kIn,kOut,Ic,args) \
1097 YButton var = {YButton_|type,name,res,cb,0,kIn,kOut,Ic,args}
1099 #define DButtonT(var, type,name,res,cb, kIn,kOut,Ic) \
1100 YButton var = {YButtonT_|type,name,res,cb,0,kIn,kOut,Ic}
1102 #define DrButtonT(var, type,name,res,cb, kIn,kOut,Ic,args) \
1103 YButton var = {YButtonT_|type,name,res,cb,0,kIn,kOut,Ic,args}
1105 #define DButtonC(var, type,name,res,cb, kIn,kOut,Ic,n,T) \
1106 YButtonC var = {YButtonC_|type,name,res,cb,0,kIn,kOut,Ic,n,T}
1108 #define DrButtonC(var, type,name,res,cb, kIn,kOut,Ic,args,n,T) \
1109 YrButtonC var = {YButtonC_|dUserRes|type,name,res,cb,0,kIn,kOut,Ic,args,n,T}
1111 #define DMnstrD(var, type,name,res,n, F,I) \
1112 YMnstr var = {YMnstrD_|type,name,res,n,0,F,I}
1114 #define DrMnstrD(var, type,name,res,n, F,I, args) \
1115 YrMnstr var = {YMnstrD_|dUserRes|type,name,res,n,0,F,I,0,args}
1117 #define DFrame(var, type,name,res,n, F) \
1118 YFrame var = {YFrame_|type,name,res,n,0,F}
1120 #define DrFrame(var, type,name,res,n, F,args) \
1121 YrFrame var = {YFrame_|dUserRes|type,name,res,n,0,F,args}
1123 #define DFrameR(var, type,name,res,n, F,row) \
1124 YFrameR var = {YFrameR_|type,name,res,n,0,F,row}
1126 #define DrFrameR(var, type,name,res,n, F,row,args) \
1127 YrFrameR var = {YFrameR_|dUserRes|type,name,res,n,0,F,row,args}
1132 #define ClearFlag(a,f) a &= ~(f)
1133 #define SetFlag(a,f) a |= (f)
1134 #define Is(a,f) if(((a) & (f)) == (f))
1135 #define IsNo(a,f) if(((a) & (f)) != (f))
1136 #define IsNot(a,f) if(((a) & (f)) == 0)
1137 #define Cpy(a,b1) strcpy(a,b1)
1138 #define CpyCat(a,b1,b2) strcat(strcpy(a,b1),b2)
1139 #define CpyCatCat(a,b1,b2,b3) strcat(strcat(strcpy(a,b1),b2),b3)
1140 #define CpyCatCatCat(a,b1,b2,b3,b4) strcat(strcat(strcat(strcpy(a,b1),b2),b3),b4)
1141 #define Cat(a,b1) strcat(a,b1)
1142 #define CatCat(a,b1,b2) strcat(strcat(a,b1),b2)
1143 #define CatCatCat(a,b1,b2,b3) strcat(strcat(strcat(a,b1),b2),b3)
1146 #define YmSetValueT(a,b) YmSetValue((YType*) (a),b)
1147 #define CloseMonstr(a) YmCloseMonstr_((YType*) (a))
1148 #define YmCloseMonstr(a) YmCloseMonstr_((YType*) (a))
1149 #define KillMonstr(a) YmKillMonstr_((YType*) (a))
1150 #define YmKillMonstr(a) YmKillMonstr_((YType*) (a))
1151 #define IsMonstrKilled(a) (Boolean)YtWidget((YType*)(a))
1152 #define YtWidget(a) YtWidget_((YType*)(a))
1153 #define YmWidget(a) YtWidget_((YType*)(a))
1154 #define YtSetSensitive(t,b) YtSetSensitive_((YType*)(t),b)
1155 #define YtGetSensitive(t) YtGetSensitive_((YType*)(t))
1156 #define YmSetVisible(t,b) YmSetVisible_((YType*)(t),b)
1157 #define YmGetVisible(t) YmGetVisible_((YType*)(t))
1158 #define YmWidth(t) YmWidth_((YType*)(t))
1159 #define YmHeight(t) YmHeight_((YType*)(t))
1160 #define YmResizeMonstr(t,a,b) YmResizeMonstr_((YType*)(t),a,b)
1161 #define YmNOutKey(cb,n,a) YmNOutKey_(cb,n,(caddr_t)a)
1162 #define YmResizeParentMonstr(t,a,b) YmResizeParentMonstr_((YType*)(t),a,b)
1167 void ChangeFileExt();
1180 void* YmStringFree();
1182 Widget YmInitShell();
1183 Widget YmCreateMonstr();
1184 void YmCreateMonstrTime();
1185 void YmKillMonstr_();
1186 void YmCloseMonstr_();
1187 Widget YmCreateWidget();
1188 Widget CreateDialog();
1189 void YmRealizeMainMonstr();
1190 int YmResizeMonstr_();
1191 int YmResizeParentMonstr_();
1192 void YtJumpWidget();
1193 int YmUpdateDisplay();
1194 int YtUpdateFrame();
1195 int YtSetBorderValues();
1196 void YtJampWidget();
1206 int YtSetArgPtrVerify();
1208 int YtCopyArgPtrDef();
1212 void YtSetValuesPtr();
1213 int YtGetValuesPtr();
1214 int YtGetValuePtr();
1215 XtArgVal YtGetValue();
1217 void YtCopyWidgetValue();
1219 int YtGetValueDef();
1221 int YmSetArgDefName();
1222 int YtSetColorArgPtrDef();
1223 int YtGetAllResource();
1224 int YtSetResourceArg();
1228 XmString YmNlabelString ();
1229 XmString YmNacceleratorText();
1230 char* YmSetLabelName();
1232 XImage* YtCreateDefaultImage();
1233 int YtWarning(
char *format, ...);
1234 void YtSetTranslation();
1236 int YtSetAction_Num();
1237 void PrintActions();
1241 void YmGetTextValue();
1242 double SetNumberTextValue();
1244 int YmScrollBarGetValues();
1245 int YmScrollBarSetValues();
1246 int YmScrollBarSetValues_();
1247 Boolean YmToggleButtonGetState();
1248 int YmToggleButtonSetState();
1249 Boolean YtGetSensitive_();
1250 int YtSetSensitive_();
1251 Boolean YmGetVisible_();
1252 int YmSetVisible_();
1253 void SetWidgetColor();
1256 void YmSetColorNameRes();
1257 void YmSetInverseColorNameRes();
1258 void YmSendClientMessage();
1259 Window* YtSetOutputWindows();
1263 int FreeFontStructs();
1264 XGCValues* YmGetGCValues();
1265 int YmDeleteFontCursor();
1266 int YmCreateFontCursor();
1268 void YmTextSetCursorPosition();
1269 int YtGetWindowXY();
1270 Window YtGetParentWindow();
1272 void YtSetWidgetColor();
1273 int YmButtonArmDisArm();
1274 int AddOutputWindow();
1275 int DelOutputWindow();
1276 int YErrorHandler();
1277 YType* WidgetToYType();
1278 int YtSetInputMonstr();
1279 void YmSendClientMessage();
1281 void YClientMessage();
1282 Display* YDisplay_();
1285 Window YmRootWindow_();
1286 Window YtRootWindow();
1289 GC ScreenDefaultGC();
1290 Window ScreenRootWindow();
1291 void YmChangeTextLabel ();
1292 void YmNoEditBorder ();
1296 char* SetStrLen(
char* str,
int len);
1297 void ChangeFileExt(
char *filename,
char *ext);
1298 int Call_Back(CallB cb,
int key);
1299 int YmTimeOut(CallB cb,
int t);
1300 int YmNOut(CallB cb,
int t);
1301 int YmNOutKey_(CallB cb,
int t,caddr_t key);
1302 int Get_Time(
int i);
1304 int YtMalloc(
void* buf,
long sz);
1305 void* YtFree(
void *buf);
1306 void* YuFree(
void *buf);
1307 void* YFree(
void *buf);
1308 void* YmStringFree(XmString buf);
1310 Widget YmInitShell(
char* name,
char* resname,
int argc,
char **argv);
1311 Widget YmCreateMonstr(Widget parent,
char* dpyName,
YMnstr* ms);
1312 void YmCreateMonstrTime(Widget parent,
char* dpyName,
YMnstr* t);
1313 void YmKillMonstr_(
YType* m);
1314 void YmCloseMonstr_(
YType* t);
1315 Widget YmCreateWidget(Widget parent,
int parentType,
YType* t);
1316 Widget CreateDialog(Widget parent,
char *name);
1317 void YmRealizeMainMonstr(
YMnstr* t);
1318 int YmResizeMonstr_(
YType* t,
int width,
int height);
1319 int YmResizeParentMonstr_(
YType* t,
int width,
int height);
1320 void YtJumpWidget(
YType* t);
1321 int YmUpdateDisplay(
YType* t);
1323 int YtSetBorderValues(Widget w,
int shadowTyp,
int shadowTh,
1324 int borderW,
int highlightTh);
1325 void YtJampWidget(
YType* t);
1326 int YtWidth(Widget w);
1327 int YtHeight(Widget w);
1328 int YmWidth_(
YType* t);
1329 int YmHeight_(
YType* t);
1330 Widget YtWidget_(
YType* t);
1332 int YtSetArg_ (
char* name,XtArgVal d);
1333 int YtSetArg0_(
char* name,XtArgVal d);
1334 int YtSetArgPtr(
Yres* res,
char* name,XtArgVal value);
1335 int YtSetArgPtrVerify(
Yres* res,
char* name,XtArgVal value);
1336 int YtCopyArgPtr(
Yres* yr1,
Yres* yr2,
char *name1,
char *name2);
1337 int YtCopyArgPtrDef(
Yres* yr1,
int defname,
char *name1,
char *name2);
1338 int YtDeleteArg(
char* name);
1339 void YtGetValues(Widget w);
1340 void YtSetValues(Widget w);
1341 void YtSetValuesPtr(Widget w,
Yres* res);
1342 int YtGetValuesPtr(Widget w,
Yres* res);
1343 int YtGetValuePtr(
Yres* yr2,
char *name,XtArgVal* val);
1344 XtArgVal YtGetValue(Widget w,
char* name);
1345 void YtSetValue(Widget w,
char* name, XtArgVal value);
1346 void YtCopyWidgetValue(Widget w,
char* name1,
char* name2);
1347 int YtFindArg(
char* name1,
char* name2,
int nname);
1348 int YtGetValueDef(
int defname,
char *name,XtArgVal* val);
1349 int YmSetArgDef(
YType* t);
1350 int YmSetArgDefName(
int res,
int OnlyColor);
1351 int YtSetColorArgPtrDef(
Yres* yr,
int nname);
1352 int YtGetAllResource(Widget parent);
1353 int YtSetResourceArg(
int nname);
1354 void YmAttach(Widget L,Widget T,Widget R,Widget B,
1355 int sl,
int st,
int sr,
int sb);
1357 void YmNilAttach(
void);
1358 XmString YmNlabelString (
char *label,
int mnemonic);
1359 XmString YmNacceleratorText(
char* accel_name,
char* accel_key);
1360 char* YmSetLabelName(
char* name);
1362 XImage* YtCreateDefaultImage(
char *bits,
int width,
int height);
1363 int YtWarning(
char *format, ...);
1364 void YtSetTranslation(
1365 Widget w,
char* app_name,
char* key_sym, XtActionProc proc);
1366 int YtSetAction(Widget w,
char *name,
char *sym);
1367 int YtSetAction_Num(Widget w,
char *name,
char *sym,
int i);
1368 void PrintActions(Widget w);
1370 void YmNoEditBorder (
YType* t);
1371 void YmChangeTextLabel (
YType* t,
char* str);
1373 void PrintValue(
YType* t,
double val);
1374 int YmSetValue(
YType* t,
void* value);
1375 void YmGetTextValue(
YType* t);
1376 double SetNumberTextValue(
YType* t,
double value);
1377 void YmTypeText(Widget w,
char* str);
1381 int minimum,
int maximum,
int value,
1382 int slider_size,
int increment,
int page_increment);
1383 Boolean YmToggleButtonGetState(
YType* t);
1384 int YmToggleButtonSetState(
YType* t,
int state);
1385 Boolean YtGetSensitive_(
YType* t);
1386 int YtSetSensitive_(
YType* t,
int state);
1387 Boolean YmGetVisible_(
YType* t);
1388 int YmSetVisible_(
YType* t,
int b);
1389 void SetWidgetColor(Widget w,
int name);
1390 void YmSetColor(
YType* t,
int foreground,
int background);
1391 int YmGetColor(
YType* t,
int *foreground,
int *background);
1392 void YmSetColorNameRes(
YType* t,
int name);
1393 void YmSetInverseColorNameRes(
YType* t,
int name);
1394 void YmSendClientMessage(
void* data,
int type,Window* win,
int nn);
1395 Window* YtSetOutputWindows(
char* Wname[],
int n,
int *nn);
1396 int YmLoadFont(
YType* t,
char *FontName);
1397 int YtLoadFont(Widget w,
char *FontName);
1398 int YtLoadFont_(
char* FontName,
int dr);
1399 int FreeFontStructs(
void);
1400 XGCValues* YmGetGCValues(GC gc);
1401 int YmDeleteFontCursor(
YDraw* yd);
1402 int YmCreateFontCursor(
YDraw* yd,
int cyrsor_type);
1404 void YmTextSetCursorPosition(Widget w, XmTextPosition p);
1405 int YtGetWindowXY(Window win,
int *x,
int *y);
1406 Window YtGetParentWindow(Display* dpy,Window win);
1407 void YGeometry(Widget w,
int type);
1408 void YtSetWidgetColor(Widget w,
int fg,
int bg);
1409 int YmButtonArmDisArm(
YType* t);
1410 int AddOutputWindow(Window win);
1411 int DelOutputWindow(Window win);
1412 int YErrorHandler(Display* disp,XErrorEvent* er);
1413 YType* WidgetToYType(Widget w);
1414 int YtSetInputMonstr(
YType* t);
1415 void YmSendClientMessage(
void* data,
int type,Window* win,
int nn);
1416 void YSendEvent(
int type,
int keycode,
int x,
int y);
1418 Display* YDisplay_(
YType* t);
1419 Screen* YScreen_(
YType* t);
1420 Screen* YtScreen(Widget w);
1421 Window YmRootWindow_(
YType* t);
1422 Window YtRootWindow(Widget w);
1423 Window ScreenRootWindow(Screen* scr);
1424 GC YDefaultGC_(
YType* t);
1425 GC YtDefaultGC(Widget w);
1426 GC ScreenDefaultGC(Screen* scr);
1428 void YClientMessage(
1429 Widget w,
char* name,Atom a,
int format, EventMask mask);
1430 void YmChangeTextLabel (
YType* t,
char* str);
1431 void YmNoEditBorder (
YType* t);
1436 #define YtDisplay(w) XtDisplay(w)
1437 #define YDisplay(t) YDisplay_((YType*) t)
1438 #define YmDisplay(t) YDisplay_((YType*) t)
1440 #define YScreen(t) YScreen_((YType*) t)
1441 #define YmScreen_(t) YScreen_((YType*) t)
1443 #define YmRootWindow(t) YmRootWindow_((YType*) t)
1445 #define YDefaultGC(t) YDefaultGC_((YType*) t)
1446 #define YmDefaultGC(t) YDefaultGC_((YType*) t)
1449 extern int ScreenId;
1450 extern XtAppContext app_context;
1451 extern Display* display;
1452 extern Colormap Ycmap;
1453 extern XEvent YEvent;
1454 extern XKeyEvent* TB_event;
1455 extern char* YTextPntr;
1456 extern int YTextLength;
1457 extern Window YRootWindow;
1458 extern short YRootWidth,YRootHeight;
1459 extern int YRootForeground,YRootBackground;
1461 extern int YDefaultScreen;
1463 extern Widget Top_level;
1464 extern Widget YMenu_Bar;
1465 extern Widget ButtonW;
1466 extern YType* MnstrD;
1467 extern YDraw* Draw_s;
1468 extern XEvent* Draw_event;
1469 extern Window Draw_win;
1472 extern char* YmFontName;
1475 extern Arg NilBord[];
1476 extern XClientMessageEvent* YClientEvent;
1483 #define Yarg GRes.arg
Definition: ymprog.h:1019
Definition: ymprog.h:1007