/* 
 * Motif Tools Library, Version 2.0
 * $Id: Cursor.c,v 2.10 1994/07/04 03:03:50 david Exp $
 * 
 * Written by David Flanagan.
 * Copyright (c) 1992, 1993, 1994 by Dovetail Systems.
 * All Rights Reserved.  See the file COPYRIGHT for details.
 * This is not free software.  See the file SHAREWARE for details.
 * There is no warranty for this software.  See NO_WARRANTY for details.
 */

#include <Xmt/Xmt.h>
#include <Xmt/AppResP.h>

#if NeedFunctionPrototypes
void XmtDisplayBusyCursor(Widget w)
#else
void XmtDisplayBusyCursor(w)
Widget w;
#endif
{
    Widget shell = XmtGetShell(w);
    Display *dpy = XtDisplay(shell);
    XmtAppResources *app = XmtGetApplicationResources(shell);
    
    if (!XtIsRealized(shell)) return;
    XDefineCursor(dpy, XtWindow(shell), app->busy_cursor);
    XFlush(dpy);
}

#if NeedFunctionPrototypes
void XmtDisplayDefaultCursor(Widget w)
#else
void XmtDisplayDefaultCursor(w)
Widget w;
#endif
{
    Widget shell = XmtGetShell(w);
    Display *dpy = XtDisplay(shell);
    XmtAppResources *app = XmtGetApplicationResources(shell);
    
    if (!XtIsRealized(shell)) return;
    XDefineCursor(dpy, XtWindow(shell), app->cursor);
    XFlush(dpy);
}


#if NeedFunctionPrototypes
void XmtDisplayCursor(Widget w, Cursor c)
#else
void XmtDisplayCursor(w, c)
Widget w;
Cursor c;
#endif
{
    Widget shell = XmtGetShell(w);
    Display *dpy = XtDisplay(shell);
    
    if (!XtIsRealized(shell)) return;
    XDefineCursor(dpy, XtWindow(shell), c);
    XFlush(dpy);
}

