mirror of
git://git.code.sf.net/p/cdesktopenv/code
synced 2025-02-15 04:32:24 +00:00
DtWidget: resolved some compiler warnings
This commit is contained in:
parent
c67763c82d
commit
ae16363537
4 changed files with 25 additions and 19 deletions
|
@ -117,6 +117,9 @@ express or implied warranty.
|
||||||
/* some unpublished Motif interfaces */
|
/* some unpublished Motif interfaces */
|
||||||
#include <Xm/XmPrivate.h>
|
#include <Xm/XmPrivate.h>
|
||||||
|
|
||||||
|
/* From MenuUtilP.h */
|
||||||
|
extern int _XmGrabKeyboard(Widget widget, int owner_events, int pointer_mode,
|
||||||
|
int keyboard_mode, Time time) ;
|
||||||
/*
|
/*
|
||||||
* MotifBc
|
* MotifBc
|
||||||
*/
|
*/
|
||||||
|
@ -2286,7 +2289,7 @@ list_event_handler( Widget widget,
|
||||||
if ( ShellPoppedUp(((ShellWidget)(Shell(combo_w)))) ) {
|
if ( ShellPoppedUp(((ShellWidget)(Shell(combo_w)))) ) {
|
||||||
_XmGrabKeyboard(widget, False, GrabModeAsync, GrabModeAsync,
|
_XmGrabKeyboard(widget, False, GrabModeAsync, GrabModeAsync,
|
||||||
CurrentTime);
|
CurrentTime);
|
||||||
XtSetKeyboardFocus(List(combo_w), RevertToNone);
|
XtSetKeyboardFocus(List(combo_w), None);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case EnterNotify:
|
case EnterNotify:
|
||||||
|
|
|
@ -784,7 +784,7 @@ CreateChildren(
|
||||||
XtManageChild (btn);
|
XtManageChild (btn);
|
||||||
XtAddCallback (btn, XmNactivateCallback,
|
XtAddCallback (btn, XmNactivateCallback,
|
||||||
(XtCallbackProc)ButtonCallback,
|
(XtCallbackProc)ButtonCallback,
|
||||||
(XtPointer)(i+1));
|
(XtPointer)((long)(i+1)));
|
||||||
|
|
||||||
button[i] = btn;
|
button[i] = btn;
|
||||||
l_p += b_delta;
|
l_p += b_delta;
|
||||||
|
|
|
@ -85,6 +85,10 @@ extern void _DtRegisterNewConverters ( void );
|
||||||
extern char * _XmExtObjAlloc(int size);
|
extern char * _XmExtObjAlloc(int size);
|
||||||
extern void _XmExtObjFree(XtPointer element);
|
extern void _XmExtObjFree(XtPointer element);
|
||||||
extern void _XmSelectColorDefault ( Widget, int, XrmValue * );
|
extern void _XmSelectColorDefault ( Widget, int, XrmValue * );
|
||||||
|
/* From XmP.h */
|
||||||
|
extern void _XmExtImportArgs( Widget w, ArgList args, Cardinal *num_args);
|
||||||
|
/* From TravActI.h */
|
||||||
|
extern void _XmEnterGadget( Widget wid, XEvent *event, String*,Cardinal*);
|
||||||
|
|
||||||
#define SPACING_DEFAULT 2
|
#define SPACING_DEFAULT 2
|
||||||
#define MARGIN_DEFAULT 2
|
#define MARGIN_DEFAULT 2
|
||||||
|
@ -1860,10 +1864,10 @@ Initialize(
|
||||||
{
|
{
|
||||||
G_MarginWidth (new) =
|
G_MarginWidth (new) =
|
||||||
XmeToHorizontalPixels ((Widget)new, G_UnitType (new),
|
XmeToHorizontalPixels ((Widget)new, G_UnitType (new),
|
||||||
(XtArgVal *)G_MarginWidth (new));
|
(XtArgVal *)((long)G_MarginWidth (new)));
|
||||||
G_MarginHeight (new) =
|
G_MarginHeight (new) =
|
||||||
XmeToVerticalPixels ((Widget)new, G_UnitType (new),
|
XmeToVerticalPixels ((Widget)new, G_UnitType (new),
|
||||||
(XtArgVal *)G_MarginHeight (new));
|
(XtArgVal *)((long)G_MarginHeight (new)));
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Check for unspecified margins.
|
/* Check for unspecified margins.
|
||||||
|
@ -1887,9 +1891,9 @@ Initialize(
|
||||||
(G_PixmapPosition (new) == XmPIXMAP_LEFT ||
|
(G_PixmapPosition (new) == XmPIXMAP_LEFT ||
|
||||||
G_PixmapPosition (new) == XmPIXMAP_RIGHT)
|
G_PixmapPosition (new) == XmPIXMAP_RIGHT)
|
||||||
? XmeToHorizontalPixels ((Widget)new, G_UnitType (new),
|
? XmeToHorizontalPixels ((Widget)new, G_UnitType (new),
|
||||||
(XtArgVal *)G_Spacing (new))
|
(XtArgVal *)((long)G_Spacing (new)))
|
||||||
: XmeToVerticalPixels ((Widget)new, G_UnitType (new),
|
: XmeToVerticalPixels ((Widget)new, G_UnitType (new),
|
||||||
(XtArgVal *)G_Spacing (new));
|
(XtArgVal *)((long)G_Spacing (new)));
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Set width and height.
|
/* Set width and height.
|
||||||
|
@ -2402,10 +2406,10 @@ SetValues(
|
||||||
{
|
{
|
||||||
G_MarginWidth (new) =
|
G_MarginWidth (new) =
|
||||||
XmeToHorizontalPixels ((Widget)new, G_UnitType (new),
|
XmeToHorizontalPixels ((Widget)new, G_UnitType (new),
|
||||||
(XtArgVal *)G_MarginWidth (new));
|
(XtArgVal *)((long)G_MarginWidth (new)));
|
||||||
G_MarginHeight (new) =
|
G_MarginHeight (new) =
|
||||||
XmeToVerticalPixels ((Widget)new, G_UnitType (new),
|
XmeToVerticalPixels ((Widget)new, G_UnitType (new),
|
||||||
(XtArgVal *)G_MarginHeight (new));
|
(XtArgVal *)((long)G_MarginHeight (new)));
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Convert spacing.
|
/* Convert spacing.
|
||||||
|
@ -2417,9 +2421,9 @@ SetValues(
|
||||||
(G_PixmapPosition (new) == XmPIXMAP_LEFT ||
|
(G_PixmapPosition (new) == XmPIXMAP_LEFT ||
|
||||||
G_PixmapPosition (new) == XmPIXMAP_RIGHT)
|
G_PixmapPosition (new) == XmPIXMAP_RIGHT)
|
||||||
? XmeToHorizontalPixels ((Widget)new, G_UnitType (new),
|
? XmeToHorizontalPixels ((Widget)new, G_UnitType (new),
|
||||||
(XtArgVal *)G_Spacing (new))
|
(XtArgVal *)((long)G_Spacing (new)))
|
||||||
: XmeToVerticalPixels ((Widget)new, G_UnitType (new),
|
: XmeToVerticalPixels ((Widget)new, G_UnitType (new),
|
||||||
(XtArgVal *)G_Spacing (new));
|
(XtArgVal *)((long)G_Spacing (new)));
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Process change in string or font list.
|
/* Process change in string or font list.
|
||||||
|
@ -2771,18 +2775,15 @@ InputDispatch(
|
||||||
IconDisarm (w, (XEvent*) event);
|
IconDisarm (w, (XEvent*) event);
|
||||||
}
|
}
|
||||||
else if (event_mask & XmHELP_EVENT)
|
else if (event_mask & XmHELP_EVENT)
|
||||||
_XmSocorro (w, (XEvent *)event,
|
_XmSocorro (w, (XEvent *)event,NULL,NULL);
|
||||||
(String *)NULL,(Cardinal)0);
|
|
||||||
else if (event_mask & XmENTER_EVENT)
|
else if (event_mask & XmENTER_EVENT)
|
||||||
IconEnter (w, (XEvent *)event);
|
IconEnter (w, (XEvent *)event);
|
||||||
else if (event_mask & XmLEAVE_EVENT)
|
else if (event_mask & XmLEAVE_EVENT)
|
||||||
IconLeave (w, (XEvent *)event);
|
IconLeave (w, (XEvent *)event);
|
||||||
else if (event_mask & XmFOCUS_IN_EVENT)
|
else if (event_mask & XmFOCUS_IN_EVENT)
|
||||||
_XmFocusInGadget (w, (XEvent *)event,
|
_XmFocusInGadget (w, (XEvent *)event,NULL,NULL);
|
||||||
(String *)NULL,(Cardinal)0);
|
|
||||||
else if (event_mask & XmFOCUS_OUT_EVENT)
|
else if (event_mask & XmFOCUS_OUT_EVENT)
|
||||||
_XmFocusOutGadget (w, (XEvent *)event,
|
_XmFocusOutGadget (w, (XEvent *)event,NULL,NULL);
|
||||||
(String *)NULL,(Cardinal)0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -3331,7 +3332,7 @@ Draw(
|
||||||
|
|
||||||
/* Draw shadow.
|
/* Draw shadow.
|
||||||
*/
|
*/
|
||||||
if (G_ShadowThickness (g) > 0 && G_DrawShadow(g))
|
if (G_ShadowThickness (g) > 0 && G_DrawShadow(g)){
|
||||||
if(G_BorderType(g) == DtRECTANGLE || !G_Pixmap(g))
|
if(G_BorderType(g) == DtRECTANGLE || !G_Pixmap(g))
|
||||||
{
|
{
|
||||||
unsigned char shadow_type;
|
unsigned char shadow_type;
|
||||||
|
@ -3358,6 +3359,7 @@ Draw(
|
||||||
_DtProcessUnlock();
|
_DtProcessUnlock();
|
||||||
(*call_callback) (g, G_Callback (g), XmCR_SHADOW, NULL);
|
(*call_callback) (g, G_Callback (g), XmCR_SHADOW, NULL);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -369,7 +369,7 @@ static void
|
||||||
DrawMenuGlyph(
|
DrawMenuGlyph(
|
||||||
DtMenuButtonWidget mb )
|
DtMenuButtonWidget mb )
|
||||||
{
|
{
|
||||||
if ((MB_GLYPH_WIDTH(mb) != 0))
|
if ((MB_GLYPH_WIDTH(mb) != 0)){
|
||||||
if(MB_PIXMAP(mb) != XmUNSPECIFIED_PIXMAP)
|
if(MB_PIXMAP(mb) != XmUNSPECIFIED_PIXMAP)
|
||||||
XCopyArea (XtDisplay(mb),
|
XCopyArea (XtDisplay(mb),
|
||||||
MB_PIXMAP(mb),
|
MB_PIXMAP(mb),
|
||||||
|
@ -378,7 +378,8 @@ DrawMenuGlyph(
|
||||||
MB_GLYPH_WIDTH(mb), MB_GLYPH_HEIGHT(mb),
|
MB_GLYPH_WIDTH(mb), MB_GLYPH_HEIGHT(mb),
|
||||||
MB_GLYPH_X(mb), MB_GLYPH_Y(mb));
|
MB_GLYPH_X(mb), MB_GLYPH_Y(mb));
|
||||||
else
|
else
|
||||||
DrawArrow((Widget)mb);
|
DrawArrow((Widget)mb);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Reference in a new issue