diff options
author | kaleb <empty> | 1995-06-06 20:50:30 +0000 |
---|---|---|
committer | kaleb <empty> | 1995-06-06 20:50:30 +0000 |
commit | b59496630a380e76de9191e9e6544a54ce159500 (patch) | |
tree | c90319f20af0d9ab7316fe55f54101dca00a5a87 /xc | |
parent | 3f1eb9c7aa1428d6c9d66ee2fe58bbf057d185cb (diff) |
XBUG 7454. Use of _Xt private functions prone to errors when Xt's
private APIs change.
Diffstat (limited to 'xc')
-rw-r--r-- | xc/lib/Xaw/AsciiText.c | 20 | ||||
-rw-r--r-- | xc/lib/Xaw/Text.c | 16 | ||||
-rw-r--r-- | xc/lib/Xaw/TextAction.c | 6 | ||||
-rw-r--r-- | xc/lib/Xaw/XawImP.h | 4 |
4 files changed, 27 insertions, 19 deletions
diff --git a/xc/lib/Xaw/AsciiText.c b/xc/lib/Xaw/AsciiText.c index 5f3817096..39089fc8e 100644 --- a/xc/lib/Xaw/AsciiText.c +++ b/xc/lib/Xaw/AsciiText.c @@ -1,4 +1,4 @@ -/* $XConsortium: AsciiText.c,v 1.45 94/01/31 10:50:02 kaleb Exp $ */ +/* $XConsortium: AsciiText.c,v 1.46 94/04/17 20:11:50 kaleb Exp kaleb $ */ /* @@ -182,14 +182,16 @@ Cardinal *num_args; /* If we are using a MultiSink we need to tell the input method stuff. */ if ( w->simple.international == True ) { - - sink = (MultiSinkObject)w->text.sink; - _XawImRegister( new ); - _XawImVASetValues( new, XtNfontSet, sink->multi_sink.fontset, - XtNinsertPosition, w->text.insertPos, - XtNforeground, sink->text_sink.foreground, - XtNbackground, sink->text_sink.background, - NULL ); + Arg list[4]; + Cardinal ac = 0; + + sink = (MultiSinkObject)w->text.sink; + _XawImRegister( new ); + XtSetArg (list[ac], XtNfontSet, sink->multi_sink.fontset); ac++; + XtSetArg (list[ac], XtNinsertPosition, w->text.insertPos); ac++; + XtSetArg (list[ac], XtNforeground, sink->text_sink.foreground); ac++; + XtSetArg (list[ac], XtNbackground, sink->text_sink.background); ac++; + _XawImSetValues(new, list, ac); } } diff --git a/xc/lib/Xaw/Text.c b/xc/lib/Xaw/Text.c index 0f9118dc2..22a9569cb 100644 --- a/xc/lib/Xaw/Text.c +++ b/xc/lib/Xaw/Text.c @@ -1,4 +1,4 @@ -/* $XConsortium: Text.c,v 1.193 94/04/17 20:13:03 kaleb Exp $ */ +/* $XConsortium: Text.c,v 1.194 94/07/08 09:45:41 kaleb Exp kaleb $ */ /*********************************************************** @@ -67,7 +67,7 @@ SOFTWARE. #include <X11/Xaw/Scrollbar.h> #include <X11/Xaw/TextP.h> #include <X11/Xaw/MultiSinkP.h> -#include <X11/Xaw/XawImP.h> /* for _XawImVASetValues */ +#include <X11/Xaw/XawImP.h> #include <X11/Xfuncs.h> #include <ctype.h> /* for isprint() */ @@ -662,9 +662,12 @@ XawTextInsertState state; /* Keep Input Method up to speed */ - if ( ctx->simple.international ) - _XawImVASetValues( w, XtNinsertPosition, ctx->text.insertPos, NULL ); + if ( ctx->simple.international ) { + Arg list[1]; + XtSetArg (list[1], XtNinsertPosition, ctx->text.insertPos); + _XawImSetValues (w, list, 1); + } } /* @@ -1143,6 +1146,7 @@ int n; { XawTextPosition top, target; int y; + Arg list[1]; XawTextLineTable * lt = &(ctx->text.lt); if (abs(n) > ctx->text.lt.lines) @@ -1213,8 +1217,8 @@ int n; else if (lt->top != target) DisplayTextWindow((Widget)ctx); } - _XawImVASetValues( (Widget) ctx, XtNinsertPosition, /*i18n patch3*/ - (ctx->text.lt.top + ctx->text.lt.lines), NULL); /*i18n patch3*/ + XtSetArg (list[0], XtNinsertPosition, ctx->text.lt.top+ctx->text.lt.lines); + _XawImSetValues ((Widget) ctx, list, 1); } /*ARGSUSED*/ diff --git a/xc/lib/Xaw/TextAction.c b/xc/lib/Xaw/TextAction.c index 8f704297a..f348047ff 100644 --- a/xc/lib/Xaw/TextAction.c +++ b/xc/lib/Xaw/TextAction.c @@ -1,4 +1,4 @@ -/* $XConsortium: TextAction.c,v 1.50 94/03/30 21:28:42 kaleb Exp $ */ +/* $XConsortium: TextAction.c,v 1.51 94/04/17 20:13:07 kaleb Exp kaleb $ */ /* @@ -1441,7 +1441,7 @@ Cardinal* n; TextWidget ctx = (TextWidget) w; /* Let the input method know focus has arrived. */ - _XawImVASetFocusValues(w, NULL); + _XawImSetFocusValues (w, NULL, 0); if ( event->xfocus.detail == NotifyPointer ) return; ctx->text.hasfocus = TRUE; @@ -1475,7 +1475,7 @@ TextEnterWindow( w, event, params, num_params ) if ((event->xcrossing.detail != NotifyInferior) && event->xcrossing.focus && !ctx->text.hasfocus) { - _XawImVASetFocusValues(w, NULL); + _XawImSetFocusValues(w, NULL, 0); } } diff --git a/xc/lib/Xaw/XawImP.h b/xc/lib/Xaw/XawImP.h index 9c4c54de8..365319b51 100644 --- a/xc/lib/Xaw/XawImP.h +++ b/xc/lib/Xaw/XawImP.h @@ -1,4 +1,4 @@ -/* $XConsortium: XawImP.h,v 1.2 94/02/17 14:02:03 kaleb Exp $ */ +/* $XConsortium: XawImP.h,v 1.3 94/04/17 20:13:32 kaleb Exp kaleb $ */ /* * Copyright 1991 by OMRON Corporation @@ -181,6 +181,7 @@ void _XawImSetValues( #endif ); +/* DON'T USE THIS FUNCTION -- it's going away in the next release */ void _XawImVASetValues( #if NeedVarargsPrototypes Widget, /* w */ @@ -196,6 +197,7 @@ void _XawImSetFocusValues( #endif ); +/* DON'T USE THIS FUNCTION -- it's going away in the next release */ void _XawImVASetFocusValues( #if NeedVarargsPrototypes Widget, /* w */ |