Blame lib/Xm/DragIcon.c

Packit b099d7
/* 
Packit b099d7
 * Motif
Packit b099d7
 *
Packit b099d7
 * Copyright (c) 1987-2012, The Open Group. All rights reserved.
Packit b099d7
 *
Packit b099d7
 * These libraries and programs are free software; you can
Packit b099d7
 * redistribute them and/or modify them under the terms of the GNU
Packit b099d7
 * Lesser General Public License as published by the Free Software
Packit b099d7
 * Foundation; either version 2 of the License, or (at your option)
Packit b099d7
 * any later version.
Packit b099d7
 *
Packit b099d7
 * These libraries and programs are distributed in the hope that
Packit b099d7
 * they will be useful, but WITHOUT ANY WARRANTY; without even the
Packit b099d7
 * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
Packit b099d7
 * PURPOSE. See the GNU Lesser General Public License for more
Packit b099d7
 * details.
Packit b099d7
 *
Packit b099d7
 * You should have received a copy of the GNU Lesser General Public
Packit b099d7
 * License along with these librararies and programs; if not, write
Packit b099d7
 * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
Packit b099d7
 * Floor, Boston, MA 02110-1301 USA
Packit b099d7
*/ 
Packit b099d7
/* 
Packit b099d7
 * HISTORY
Packit b099d7
*/ 
Packit b099d7
Packit b099d7
/* 
Packit b099d7
 * (c) Copyright 1989, 1990, 1991, 1992, 1993 OPEN SOFTWARE FOUNDATION, INC. 
Packit b099d7
 * ALL RIGHTS RESERVED 
Packit b099d7
*/ 
Packit b099d7
#ifdef REV_INFO
Packit b099d7
#ifndef lint
Packit b099d7
static char rcsid[] = "$XConsortium: DragIcon.c /main/17 1996/10/14 10:44:37 pascale $"
Packit b099d7
#endif
Packit b099d7
#endif
Packit b099d7
/* (c) Copyright 1990, 1991, 1992 HEWLETT-PACKARD COMPANY */
Packit b099d7
Packit b099d7
#ifdef HAVE_CONFIG_H
Packit b099d7
#include <config.h>
Packit b099d7
#endif
Packit b099d7
Packit b099d7
Packit b099d7
#include <Xm/Xm.h>		/* To make cpp on Sun happy. CR 5943 */
Packit b099d7
#include <Xm/DisplayP.h>
Packit b099d7
#include <Xm/DragIconP.h>
Packit b099d7
#include "TextDIconI.h"
Packit b099d7
#include "DragCI.h"
Packit b099d7
#include "DragICCI.h"
Packit b099d7
#include "DragIconI.h"
Packit b099d7
#include "ImageCachI.h"
Packit b099d7
#include "MessagesI.h"
Packit b099d7
#include "RegionI.h"
Packit b099d7
#include "ScreenI.h"
Packit b099d7
#include "XmI.h"
Packit b099d7
Packit b099d7
#define MESSAGE1	_XmMMsgDragIcon_0000
Packit b099d7
#define MESSAGE2	_XmMMsgDragIcon_0001
Packit b099d7
Packit b099d7
#define PIXMAP_MAX_WIDTH	128
Packit b099d7
#define PIXMAP_MAX_HEIGHT	128
Packit b099d7
Packit b099d7
#define TheDisplay(dd) (XtDisplayOfObject(XtParent(dd)))
Packit b099d7
Packit b099d7
typedef struct {
Packit b099d7
  unsigned int		width, height;
Packit b099d7
  int			hot_x, hot_y;
Packit b099d7
  int			offset_x, offset_y;
Packit b099d7
  char			*dataName;
Packit b099d7
  XmConst unsigned char	*data;
Packit b099d7
  char			*maskDataName;
Packit b099d7
  XmConst unsigned char	*maskData;
Packit b099d7
} XmCursorDataRec, *XmCursorData;
Packit b099d7
Packit b099d7
Packit b099d7
/********    Static Function Declarations    ********/
Packit b099d7
Packit b099d7
static void DragIconInitialize( 
Packit b099d7
                        Widget req,
Packit b099d7
                        Widget new_w,
Packit b099d7
                        ArgList args,
Packit b099d7
                        Cardinal *numArgs) ;
Packit b099d7
static Boolean SetValues( 
Packit b099d7
                        Widget current,
Packit b099d7
                        Widget req,
Packit b099d7
                        Widget new_w,
Packit b099d7
                        ArgList args,
Packit b099d7
                        Cardinal *num_args) ;
Packit b099d7
static void Destroy( 
Packit b099d7
                        Widget w) ;
Packit b099d7
Packit b099d7
static void ScreenObjectDestroy(
Packit b099d7
                        Widget w,
Packit b099d7
                        XtPointer client_data,
Packit b099d7
                        XtPointer call_data) ;
Packit b099d7
/********    End Static Function Declarations    ********/
Packit b099d7

Packit b099d7
#define valid_width 16
Packit b099d7
#define valid_height 16
Packit b099d7
#define valid_x_hot 1
Packit b099d7
#define valid_y_hot 1
Packit b099d7
#define valid_x_offset 7
Packit b099d7
#define valid_y_offset 7
Packit b099d7
Packit b099d7
static XmConst unsigned char valid_bits[] = {
Packit b099d7
   0x00, 0x00, 0xfe, 0x01, 0xfe, 0x00, 0x7e, 0x00, 0x3e, 0x00, 0x1e, 0x00,
Packit b099d7
   0x0e, 0x00, 0x06, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
Packit b099d7
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
Packit b099d7
Packit b099d7
static XmConst unsigned char valid_m_bits[] = {
Packit b099d7
   0xff, 0x07, 0xff, 0x03, 0xff, 0x01, 0xff, 0x00, 0x7f, 0x00, 0x3f, 0x00,
Packit b099d7
   0x1f, 0x00, 0x0f, 0x00, 0x07, 0x00, 0x03, 0x00, 0x01, 0x00, 0x00, 0x00,
Packit b099d7
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
Packit b099d7
Packit b099d7
static XmConst XmCursorDataRec validCursorDataRec =
Packit b099d7
{
Packit b099d7
   valid_width, valid_height,
Packit b099d7
   valid_x_hot, valid_y_hot,
Packit b099d7
   valid_x_offset, valid_y_offset,
Packit b099d7
   "valid",
Packit b099d7
   valid_bits,
Packit b099d7
   "valid_m",
Packit b099d7
   valid_m_bits,
Packit b099d7
};
Packit b099d7
   
Packit b099d7
Packit b099d7
#define invalid_width 16
Packit b099d7
#define invalid_height 16
Packit b099d7
#define invalid_x_hot 1
Packit b099d7
#define invalid_y_hot 1
Packit b099d7
#define invalid_x_offset 7
Packit b099d7
#define invalid_y_offset 7
Packit b099d7
Packit b099d7
Packit b099d7
static XmConst unsigned char invalid_bits[] = {
Packit b099d7
   0x00, 0x00, 0xe0, 0x03, 0xf8, 0x0f, 0x1c, 0x1c, 0x0c, 0x1e, 0x06, 0x37,
Packit b099d7
   0x86, 0x33, 0xc6, 0x31, 0xe6, 0x30, 0x76, 0x30, 0x3c, 0x18, 0x1c, 0x1c,
Packit b099d7
   0xf8, 0x0f, 0xe0, 0x03, 0x00, 0x00, 0x00, 0x00};
Packit b099d7
Packit b099d7
static XmConst unsigned char invalid_m_bits[] = {
Packit b099d7
   0xe0, 0x03, 0xf8, 0x0f, 0xfc, 0x1f, 0xfe, 0x3f, 0x1e, 0x3f, 0x8f, 0x7f,
Packit b099d7
   0xcf, 0x7f, 0xef, 0x7b, 0xff, 0x79, 0xff, 0x78, 0x7e, 0x3c, 0xfe, 0x3f,
Packit b099d7
   0xfc, 0x1f, 0xf8, 0x0f, 0xe0, 0x03, 0x00, 0x00};
Packit b099d7
Packit b099d7
static XmConst XmCursorDataRec invalidCursorDataRec =
Packit b099d7
{
Packit b099d7
   invalid_width, invalid_height,
Packit b099d7
   invalid_x_hot, invalid_y_hot,
Packit b099d7
   invalid_x_offset, invalid_y_offset,
Packit b099d7
   "invalid",
Packit b099d7
   invalid_bits,
Packit b099d7
   "invalid_m",
Packit b099d7
   invalid_m_bits,
Packit b099d7
};
Packit b099d7
Packit b099d7
Packit b099d7
#define none_width 16
Packit b099d7
#define none_height 16
Packit b099d7
#define none_x_hot 1
Packit b099d7
#define none_y_hot 1 
Packit b099d7
#define none_x_offset 7
Packit b099d7
#define none_y_offset 7
Packit b099d7
Packit b099d7
static XmConst unsigned char none_bits[] = {
Packit b099d7
   0x00, 0x00, 0xe0, 0x03, 0xf8, 0x0f, 0x1c, 0x1c, 0x0c, 0x1e, 0x06, 0x37,
Packit b099d7
   0x86, 0x33, 0xc6, 0x31, 0xe6, 0x30, 0x76, 0x30, 0x3c, 0x18, 0x1c, 0x1c,
Packit b099d7
   0xf8, 0x0f, 0xe0, 0x03, 0x00, 0x00, 0x00, 0x00};
Packit b099d7
Packit b099d7
static XmConst unsigned char none_m_bits[] = {
Packit b099d7
   0xe0, 0x03, 0xf8, 0x0f, 0xfc, 0x1f, 0xfe, 0x3f, 0x1e, 0x3f, 0x8f, 0x7f,
Packit b099d7
   0xcf, 0x7f, 0xef, 0x7b, 0xff, 0x79, 0xff, 0x78, 0x7e, 0x3c, 0xfe, 0x3f,
Packit b099d7
   0xfc, 0x1f, 0xf8, 0x0f, 0xe0, 0x03, 0x00, 0x00};
Packit b099d7
Packit b099d7
static XmConst XmCursorDataRec noneCursorDataRec =
Packit b099d7
{
Packit b099d7
   none_width, none_height,
Packit b099d7
   none_x_hot, none_y_hot,
Packit b099d7
   none_x_offset, none_y_offset,
Packit b099d7
   "none",
Packit b099d7
   none_bits,
Packit b099d7
   "none_m",
Packit b099d7
   none_m_bits,
Packit b099d7
};
Packit b099d7
Packit b099d7
#define move_width 16
Packit b099d7
#define move_height 16
Packit b099d7
#define move_x_hot 1
Packit b099d7
#define move_y_hot 1
Packit b099d7
#define move_x_offset 14
Packit b099d7
#define move_y_offset 14
Packit b099d7
Packit b099d7
static XmConst unsigned char move_bits[] = {
Packit b099d7
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
Packit b099d7
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
Packit b099d7
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
Packit b099d7
Packit b099d7
Packit b099d7
static XmConst unsigned char move_m_bits[] = {
Packit b099d7
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
Packit b099d7
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
Packit b099d7
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
Packit b099d7
Packit b099d7
static XmConst XmCursorDataRec moveCursorDataRec =
Packit b099d7
{
Packit b099d7
   move_width, move_height,
Packit b099d7
   move_x_hot, move_y_hot,
Packit b099d7
   move_x_offset, move_y_offset,
Packit b099d7
   "move",
Packit b099d7
   move_bits,
Packit b099d7
   "move_m",
Packit b099d7
   move_m_bits,
Packit b099d7
};
Packit b099d7
Packit b099d7
#define copy_width 16
Packit b099d7
#define copy_height 16
Packit b099d7
#define copy_x_hot 1
Packit b099d7
#define copy_y_hot 1
Packit b099d7
#define copy_x_offset 14 
Packit b099d7
#define copy_y_offset 14
Packit b099d7
Packit b099d7
static XmConst unsigned char copy_bits[] = {
Packit b099d7
   0x00, 0x00, 0xfe, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x1f, 0x02, 0x11,
Packit b099d7
   0x02, 0x11, 0x02, 0x11, 0x02, 0x11, 0x02, 0x11, 0xfe, 0x11, 0x20, 0x10,
Packit b099d7
   0x20, 0x10, 0xe0, 0x1f, 0x00, 0x00, 0x00, 0x00};
Packit b099d7
Packit b099d7
Packit b099d7
static XmConst unsigned char copy_m_bits[] = {
Packit b099d7
   0xff, 0x03, 0xff, 0x03, 0xff, 0x03, 0xff, 0x3f, 0xff, 0x3f, 0xff, 0x3f,
Packit b099d7
   0xff, 0x3f, 0xff, 0x3f, 0xff, 0x3f, 0xff, 0x3f, 0xff, 0x3f, 0xff, 0x3f,
Packit b099d7
   0xf0, 0x3f, 0xf0, 0x3f, 0xf0, 0x3f, 0x00, 0x00};
Packit b099d7
Packit b099d7
static XmConst XmCursorDataRec copyCursorDataRec =
Packit b099d7
{
Packit b099d7
   copy_width, copy_height,
Packit b099d7
   copy_x_hot, copy_y_hot,
Packit b099d7
   copy_x_offset, copy_y_offset,
Packit b099d7
   "copy",
Packit b099d7
   copy_bits,
Packit b099d7
   "copy_m",
Packit b099d7
   copy_m_bits,
Packit b099d7
};
Packit b099d7
Packit b099d7
#define link_width 16
Packit b099d7
#define link_height 16
Packit b099d7
#define link_x_hot 1
Packit b099d7
#define link_y_hot 1
Packit b099d7
#define link_x_offset 14
Packit b099d7
#define link_y_offset 14
Packit b099d7
Packit b099d7
Packit b099d7
static XmConst unsigned char link_bits[] = {
Packit b099d7
   0x00, 0x00, 0xfe, 0x03, 0x02, 0x02, 0x02, 0x02, 0x32, 0x02, 0x32, 0x3e,
Packit b099d7
   0x42, 0x20, 0x82, 0x20, 0x02, 0x21, 0x3e, 0x26, 0x20, 0x26, 0x20, 0x20,
Packit b099d7
   0x20, 0x20, 0xe0, 0x3f, 0x00, 0x00, 0x00, 0x00};
Packit b099d7
Packit b099d7
Packit b099d7
static XmConst unsigned char link_m_bits[] = {
Packit b099d7
   0xff, 0x07, 0xff, 0x07, 0xff, 0x07, 0xff, 0x07, 0xff, 0x7f, 0xff, 0x7f,
Packit b099d7
   0xff, 0x7f, 0xff, 0x7f, 0xff, 0x7f, 0xff, 0x7f, 0xff, 0x7f, 0xf0, 0x7f,
Packit b099d7
   0xf0, 0x7f, 0xf0, 0x7f, 0xf0, 0x7f, 0x00, 0x00};
Packit b099d7
Packit b099d7
static XmConst XmCursorDataRec linkCursorDataRec =
Packit b099d7
{
Packit b099d7
   link_width, link_height,
Packit b099d7
   link_x_hot, link_y_hot,
Packit b099d7
   link_x_offset, link_y_offset,
Packit b099d7
   "link",
Packit b099d7
   link_bits,
Packit b099d7
   "link_m",
Packit b099d7
   link_m_bits,
Packit b099d7
};
Packit b099d7
Packit b099d7
#define Altsource16_width 16
Packit b099d7
#define Altsource16_height 16
Packit b099d7
#define Altsource16_x_hot  2
Packit b099d7
#define Altsource16_y_hot  2
Packit b099d7
Packit b099d7
static XmConst unsigned char Altsource16_bits[] = {
Packit b099d7
   0xfc, 0x03, 0x04, 0x06, 0x04, 0x0a, 0x04, 0x12, 0x04, 0x3e, 0x04, 0x20,
Packit b099d7
   0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20,
Packit b099d7
   0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0xfc, 0x3f};
Packit b099d7
Packit b099d7
static XmConst unsigned char Altsource16_m_bits[] = {
Packit b099d7
   0xfc, 0x03, 0xfc, 0x07, 0xfc, 0x0f, 0xfc, 0x1f, 0xfc, 0x3f, 0xfc, 0x3f,
Packit b099d7
   0xfc, 0x3f, 0xfc, 0x3f, 0xfc, 0x3f, 0xfc, 0x3f, 0xfc, 0x3f, 0xfc, 0x3f,
Packit b099d7
   0xfc, 0x3f, 0xfc, 0x3f, 0xfc, 0x3f, 0xfc, 0x3f};
Packit b099d7
Packit b099d7
static XmConst XmCursorDataRec Altsource16CursorDataRec =
Packit b099d7
{
Packit b099d7
   Altsource16_width, Altsource16_height,
Packit b099d7
   Altsource16_x_hot, Altsource16_y_hot,
Packit b099d7
   0, 0,
Packit b099d7
   "Altsource16",
Packit b099d7
   Altsource16_bits,
Packit b099d7
   "Altsource16_m",
Packit b099d7
   Altsource16_m_bits,
Packit b099d7
};
Packit b099d7
Packit b099d7
Packit b099d7
#define Altsource_width 32
Packit b099d7
#define Altsource_height 32
Packit b099d7
#define Altsource_x_hot 3
Packit b099d7
#define Altsource_y_hot 3 
Packit b099d7
Packit b099d7
static XmConst unsigned char Altsource_bits[] = {
Packit b099d7
   0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0x7f, 0x00, 0x10, 0x00, 0xc0, 0x00,
Packit b099d7
   0x10, 0x00, 0x40, 0x01, 0x10, 0x00, 0x40, 0x02, 0x10, 0x00, 0x40, 0x04,
Packit b099d7
   0x10, 0x00, 0xc0, 0x0f, 0x10, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x08,
Packit b099d7
   0x10, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x08,
Packit b099d7
   0x10, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x08,
Packit b099d7
   0x10, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x08,
Packit b099d7
   0x10, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x08,
Packit b099d7
   0x10, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x08,
Packit b099d7
   0x10, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x08,
Packit b099d7
   0x10, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x08,
Packit b099d7
   0x10, 0x00, 0x00, 0x08, 0xf0, 0xff, 0xff, 0x0f};
Packit b099d7
Packit b099d7
static XmConst unsigned char Altsource_m_bits[] = {
Packit b099d7
   0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0x7f, 0x00, 0xf0, 0xff, 0xff, 0x00,
Packit b099d7
   0xf0, 0xff, 0xff, 0x01, 0xf0, 0xff, 0xff, 0x03, 0xf0, 0xff, 0xff, 0x07,
Packit b099d7
   0xf0, 0xff, 0xff, 0x0f, 0xf0, 0xff, 0xff, 0x0f, 0xf0, 0xff, 0xff, 0x0f,
Packit b099d7
   0xf0, 0xff, 0xff, 0x0f, 0xf0, 0xff, 0xff, 0x0f, 0xf0, 0xff, 0xff, 0x0f,
Packit b099d7
   0xf0, 0xff, 0xff, 0x0f, 0xf0, 0xff, 0xff, 0x0f, 0xf0, 0xff, 0xff, 0x0f,
Packit b099d7
   0xf0, 0xff, 0xff, 0x0f, 0xf0, 0xff, 0xff, 0x0f, 0xf0, 0xff, 0xff, 0x0f,
Packit b099d7
   0xf0, 0xff, 0xff, 0x0f, 0xf0, 0xff, 0xff, 0x0f, 0xf0, 0xff, 0xff, 0x0f,
Packit b099d7
   0xf0, 0xff, 0xff, 0x0f, 0xf0, 0xff, 0xff, 0x0f, 0xf0, 0xff, 0xff, 0x0f,
Packit b099d7
   0xf0, 0xff, 0xff, 0x0f, 0xf0, 0xff, 0xff, 0x0f, 0xf0, 0xff, 0xff, 0x0f,
Packit b099d7
   0xf0, 0xff, 0xff, 0x0f, 0xf0, 0xff, 0xff, 0x0f, 0xf0, 0xff, 0xff, 0x0f,
Packit b099d7
   0xf0, 0xff, 0xff, 0x0f, 0xf0, 0xff, 0xff, 0x0f};
Packit b099d7
Packit b099d7
static XmConst XmCursorDataRec AltsourceCursorDataRec =
Packit b099d7
{
Packit b099d7
   Altsource_width, Altsource_height,
Packit b099d7
   Altsource_x_hot, Altsource_y_hot,
Packit b099d7
   0, 0,
Packit b099d7
   "Altsource",
Packit b099d7
   Altsource_bits,
Packit b099d7
   "Altsource_m",
Packit b099d7
   Altsource_m_bits,
Packit b099d7
};
Packit b099d7
Packit b099d7
/*
Packit b099d7
 *  The 16x16 default icon data.
Packit b099d7
 */
Packit b099d7
Packit b099d7
#define state16_width 16
Packit b099d7
#define state16_height 16
Packit b099d7
#define state16_x_hot 1
Packit b099d7
#define state16_y_hot 1
Packit b099d7
#define state16_x_offset -8
Packit b099d7
#define state16_y_offset -2
Packit b099d7
static XmConst unsigned char state16_bits[] =
Packit b099d7
{
Packit b099d7
   0x00, 0x00, 0x3e, 0x00, 0x1e, 0x00, 0x0e, 0x00, 0x06, 0x00, 0x02, 0x00,
Packit b099d7
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
Packit b099d7
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
Packit b099d7
};
Packit b099d7
static XmConst unsigned char state16M_bits[] =
Packit b099d7
{
Packit b099d7
   0x7f, 0x00, 0x7f, 0x00, 0x7f, 0x00, 0x3f, 0x00, 0x1f, 0x00, 0x0f, 0x00,
Packit b099d7
   0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
Packit b099d7
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
Packit b099d7
};
Packit b099d7
static XmConst XmCursorDataRec state16CursorDataRec =
Packit b099d7
{
Packit b099d7
    state16_width, state16_height,
Packit b099d7
    state16_x_hot, state16_y_hot,
Packit b099d7
    state16_x_offset, state16_y_offset,
Packit b099d7
    "state16",
Packit b099d7
    state16_bits,
Packit b099d7
    "state16M",
Packit b099d7
    state16M_bits,
Packit b099d7
};
Packit b099d7
Packit b099d7
#define move16_width 16
Packit b099d7
#define move16_height 16
Packit b099d7
#define move16_x_hot 1
Packit b099d7
#define move16_y_hot 1
Packit b099d7
#define move16_x_offset -8
Packit b099d7
#define move16_y_offset -2
Packit b099d7
static XmConst unsigned char move16_bits[] =
Packit b099d7
{
Packit b099d7
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x07, 0x40, 0x0c,
Packit b099d7
   0x40, 0x1c, 0x40, 0x3c, 0x40, 0x20, 0x40, 0x20, 0x40, 0x20, 0x40, 0x20,
Packit b099d7
   0x40, 0x20, 0x40, 0x20, 0xc0, 0x3f, 0x00, 0x00
Packit b099d7
};
Packit b099d7
static XmConst unsigned char move16M_bits[] =
Packit b099d7
{
Packit b099d7
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x0f, 0xe0, 0x1f, 0xe0, 0x3f,
Packit b099d7
   0xe0, 0x7f, 0xe0, 0x7f, 0xe0, 0x7f, 0xe0, 0x7f, 0xe0, 0x7f, 0xe0, 0x7f,
Packit b099d7
   0xe0, 0x7f, 0xe0, 0x7f, 0xe0, 0x7f, 0xe0, 0x7f
Packit b099d7
};
Packit b099d7
static XmConst XmCursorDataRec move16CursorDataRec =
Packit b099d7
{
Packit b099d7
    move16_width, move16_height,
Packit b099d7
    move16_x_hot, move16_y_hot,
Packit b099d7
    move16_x_offset, move16_y_offset,
Packit b099d7
    "move16",
Packit b099d7
    move16_bits,
Packit b099d7
    "move16M",
Packit b099d7
    move16M_bits,
Packit b099d7
};
Packit b099d7
Packit b099d7
#define copy16_width 16
Packit b099d7
#define copy16_height 16
Packit b099d7
#define copy16_x_hot 1
Packit b099d7
#define copy16_y_hot 1
Packit b099d7
#define copy16_x_offset -8
Packit b099d7
#define copy16_y_offset -2
Packit b099d7
static XmConst unsigned char copy16_bits[] =
Packit b099d7
{
Packit b099d7
   0x00, 0x00, 0x00, 0x00, 0x80, 0x0f, 0x80, 0x18, 0x80, 0x38, 0xb0, 0x78,
Packit b099d7
   0x90, 0x40, 0x90, 0x40, 0x90, 0x40, 0x90, 0x40, 0x90, 0x40, 0x90, 0x7f,
Packit b099d7
   0x10, 0x00, 0x10, 0x08, 0xf0, 0x0f, 0x00, 0x00
Packit b099d7
};
Packit b099d7
static XmConst unsigned char copy16M_bits[] =
Packit b099d7
{
Packit b099d7
   0x00, 0x00, 0xc0, 0x1f, 0xc0, 0x3f, 0xc0, 0x7f, 0xf8, 0xff, 0xf8, 0xff,
Packit b099d7
   0xf8, 0xff, 0xf8, 0xff, 0xf8, 0xff, 0xf8, 0xff, 0xf8, 0xff, 0xf8, 0xff,
Packit b099d7
   0xf8, 0xff, 0xf8, 0x1f, 0xf8, 0x1f, 0xf8, 0x1f
Packit b099d7
};
Packit b099d7
static XmConst XmCursorDataRec copy16CursorDataRec =
Packit b099d7
{
Packit b099d7
    copy16_width, copy16_height,
Packit b099d7
    copy16_x_hot, copy16_y_hot,
Packit b099d7
    copy16_x_offset, copy16_y_offset,
Packit b099d7
    "copy16",
Packit b099d7
    copy16_bits,
Packit b099d7
    "copy16M",
Packit b099d7
    copy16M_bits,
Packit b099d7
};
Packit b099d7
Packit b099d7
#define link16_width 16
Packit b099d7
#define link16_height 16
Packit b099d7
#define link16_x_hot 1
Packit b099d7
#define link16_y_hot 1
Packit b099d7
#define link16_x_offset -8
Packit b099d7
#define link16_y_offset -2
Packit b099d7
static XmConst unsigned char link16_bits[] =
Packit b099d7
{
Packit b099d7
   0x00, 0x00, 0x80, 0x0f, 0x80, 0x18, 0x80, 0x38, 0x80, 0x78, 0xb8, 0x40,
Packit b099d7
   0x88, 0x4e, 0x88, 0x4c, 0x08, 0x4a, 0x08, 0x41, 0xa8, 0x7c, 0x68, 0x00,
Packit b099d7
   0xe8, 0x04, 0x08, 0x04, 0xf8, 0x07, 0x00, 0x00
Packit b099d7
};
Packit b099d7
static XmConst unsigned char link16M_bits[] =
Packit b099d7
{
Packit b099d7
   0xc0, 0x1f, 0xc0, 0x3f, 0xc0, 0x7f, 0xc0, 0xff, 0xfc, 0xff, 0xfc, 0xff,
Packit b099d7
   0xfc, 0xff, 0xfc, 0xff, 0xfc, 0xff, 0xfc, 0xff, 0xfc, 0xff, 0xfc, 0xff,
Packit b099d7
   0xfc, 0x0f, 0xfc, 0x0f, 0xfc, 0x0f, 0xfc, 0x0f
Packit b099d7
};
Packit b099d7
static XmConst XmCursorDataRec link16CursorDataRec =
Packit b099d7
{
Packit b099d7
    link16_width, link16_height,
Packit b099d7
    link16_x_hot, link16_y_hot,
Packit b099d7
    link16_x_offset, link16_y_offset,
Packit b099d7
    "link16",
Packit b099d7
    link16_bits,
Packit b099d7
    "link16M",
Packit b099d7
    link16M_bits,
Packit b099d7
};
Packit b099d7
Packit b099d7
#define source16_width 16
Packit b099d7
#define source16_height 16
Packit b099d7
#define source16_x_hot 0
Packit b099d7
#define source16_y_hot 0
Packit b099d7
static XmConst unsigned char source16_bits[] = 
Packit b099d7
{
Packit b099d7
   0x00, 0x00, 0xaa, 0xca, 0x54, 0x85, 0xaa, 0xca, 0x54, 0xe0, 0x2a, 0xe3,
Packit b099d7
   0x94, 0x81, 0xea, 0xf8, 0x54, 0xd4, 0xaa, 0xac, 0x94, 0xd9, 0xca, 0xac,
Packit b099d7
   0x64, 0xd6, 0x32, 0xab, 0xa4, 0xd6, 0xfe, 0xff
Packit b099d7
};
Packit b099d7
static XmConst XmCursorDataRec source16CursorDataRec =
Packit b099d7
{
Packit b099d7
    source16_width, source16_height,
Packit b099d7
    source16_x_hot, source16_y_hot,
Packit b099d7
    0, 0,
Packit b099d7
    "source16",
Packit b099d7
    /* a file icon */
Packit b099d7
    source16_bits,
Packit b099d7
    NULL,
Packit b099d7
    NULL,
Packit b099d7
};
Packit b099d7
Packit b099d7
/*
Packit b099d7
 *  The 32x32 default icon data.
Packit b099d7
 */
Packit b099d7
Packit b099d7
#define state32_width 32
Packit b099d7
#define state32_height 32
Packit b099d7
#define state32_x_hot 1
Packit b099d7
#define state32_y_hot 1
Packit b099d7
#define state32_x_offset -16
Packit b099d7
#define state32_y_offset -4
Packit b099d7
static XmConst unsigned char state32_bits[] = 
Packit b099d7
{
Packit b099d7
   0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00,
Packit b099d7
   0x1e, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x00, 0x7e, 0x00, 0x00, 0x00,
Packit b099d7
   0x0e, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00,
Packit b099d7
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
Packit b099d7
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
Packit b099d7
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
Packit b099d7
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
Packit b099d7
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
Packit b099d7
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
Packit b099d7
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
Packit b099d7
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
Packit b099d7
};
Packit b099d7
static XmConst unsigned char state32M_bits[] =
Packit b099d7
{
Packit b099d7
   0x0f, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x00,
Packit b099d7
   0x7f, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00,
Packit b099d7
   0xff, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x00,
Packit b099d7
   0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
Packit b099d7
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
Packit b099d7
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
Packit b099d7
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
Packit b099d7
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
Packit b099d7
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
Packit b099d7
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
Packit b099d7
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
Packit b099d7
};
Packit b099d7
static XmConst XmCursorDataRec state32CursorDataRec =
Packit b099d7
{
Packit b099d7
    state32_width, state32_height,
Packit b099d7
    state32_x_hot, state32_y_hot,
Packit b099d7
    state32_x_offset, state32_y_offset,
Packit b099d7
    "state32",
Packit b099d7
    state32_bits,
Packit b099d7
    "state32M",
Packit b099d7
    state32M_bits,
Packit b099d7
};
Packit b099d7
Packit b099d7
#define move32_width 32
Packit b099d7
#define move32_height 32
Packit b099d7
#define move32_x_hot 1
Packit b099d7
#define move32_y_hot 1
Packit b099d7
#define move32_x_offset -16
Packit b099d7
#define move32_y_offset -4
Packit b099d7
static XmConst unsigned char move32_bits[] =
Packit b099d7
{
Packit b099d7
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
Packit b099d7
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
Packit b099d7
   0x00, 0x00, 0x00, 0x00, 0xe0, 0x3f, 0x00, 0x00, 0x20, 0x60, 0x00, 0x00,
Packit b099d7
   0x20, 0xe0, 0x00, 0x00, 0x20, 0xe0, 0x01, 0x00, 0x20, 0xe0, 0x03, 0x00,
Packit b099d7
   0x20, 0xe0, 0x07, 0x00, 0x20, 0x00, 0x0c, 0x00, 0x20, 0x00, 0x0c, 0x00,
Packit b099d7
   0x20, 0x00, 0x0c, 0x00, 0x20, 0x00, 0x0c, 0x00, 0x20, 0x00, 0x0c, 0x00,
Packit b099d7
   0x20, 0x00, 0x0c, 0x00, 0x20, 0x00, 0x0c, 0x00, 0x20, 0x00, 0x0c, 0x00,
Packit b099d7
   0x20, 0x00, 0x0c, 0x00, 0x20, 0x00, 0x0c, 0x00, 0x20, 0x00, 0x0c, 0x00,
Packit b099d7
   0xe0, 0xff, 0x0f, 0x00, 0xc0, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00,
Packit b099d7
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
Packit b099d7
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
Packit b099d7
};
Packit b099d7
static XmConst unsigned char move32M_bits[] =
Packit b099d7
{
Packit b099d7
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
Packit b099d7
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
Packit b099d7
   0xf0, 0x7f, 0x00, 0x00, 0xf0, 0xff, 0x00, 0x00, 0xf0, 0xff, 0x01, 0x00,
Packit b099d7
   0xf0, 0xff, 0x03, 0x00, 0xf0, 0xff, 0x07, 0x00, 0xf0, 0xff, 0x0f, 0x00,
Packit b099d7
   0xf0, 0xff, 0x1f, 0x00, 0xf0, 0xff, 0x1f, 0x00, 0xf0, 0xff, 0x1f, 0x00,
Packit b099d7
   0xf0, 0xff, 0x1f, 0x00, 0xf0, 0xff, 0x1f, 0x00, 0xf0, 0xff, 0x1f, 0x00,
Packit b099d7
   0xf0, 0xff, 0x1f, 0x00, 0xf0, 0xff, 0x1f, 0x00, 0xf0, 0xff, 0x1f, 0x00,
Packit b099d7
   0xf0, 0xff, 0x1f, 0x00, 0xf0, 0xff, 0x1f, 0x00, 0xf0, 0xff, 0x1f, 0x00,
Packit b099d7
   0xf0, 0xff, 0x1f, 0x00, 0xf0, 0xff, 0x1f, 0x00, 0xe0, 0xff, 0x1f, 0x00,
Packit b099d7
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
Packit b099d7
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
Packit b099d7
};
Packit b099d7
static XmConst XmCursorDataRec move32CursorDataRec =
Packit b099d7
{
Packit b099d7
    move32_width, move32_height,
Packit b099d7
    move32_x_hot, move32_y_hot,
Packit b099d7
    move32_x_offset, move32_y_offset,
Packit b099d7
    "move32",
Packit b099d7
    move32_bits,
Packit b099d7
    "move32M",
Packit b099d7
    move32M_bits,
Packit b099d7
};
Packit b099d7
Packit b099d7
#define copy32_width 32
Packit b099d7
#define copy32_height 32
Packit b099d7
#define copy32_x_hot 1
Packit b099d7
#define copy32_y_hot 1
Packit b099d7
#define copy32_x_offset -16
Packit b099d7
#define copy32_y_offset -4
Packit b099d7
static XmConst unsigned char copy32_bits[] = 
Packit b099d7
{
Packit b099d7
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
Packit b099d7
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
Packit b099d7
   0x00, 0x00, 0x00, 0x00, 0xe0, 0x3f, 0x00, 0x00, 0x20, 0x60, 0x00, 0x00,
Packit b099d7
   0x20, 0xe0, 0x00, 0x00, 0x20, 0xe0, 0x01, 0x00, 0x20, 0xe0, 0x03, 0x00,
Packit b099d7
   0x20, 0xe0, 0x07, 0x00, 0x20, 0x00, 0x0c, 0x00, 0x20, 0x00, 0x0c, 0x00,
Packit b099d7
   0x20, 0x00, 0x2c, 0x00, 0x20, 0x00, 0x6c, 0x00, 0x20, 0x00, 0xec, 0x00,
Packit b099d7
   0x20, 0x00, 0x8c, 0x01, 0x20, 0x00, 0x8c, 0x01, 0x20, 0x00, 0x8c, 0x01,
Packit b099d7
   0x20, 0x00, 0x8c, 0x01, 0x20, 0x00, 0x8c, 0x01, 0x20, 0x00, 0x8c, 0x01,
Packit b099d7
   0xe0, 0xff, 0x8f, 0x01, 0xc0, 0xff, 0x8f, 0x01, 0x00, 0x00, 0x80, 0x01,
Packit b099d7
   0x00, 0x04, 0x80, 0x01, 0x00, 0x04, 0x80, 0x01, 0x00, 0xfc, 0xff, 0x01,
Packit b099d7
   0x00, 0xf8, 0xff, 0x01, 0x00, 0x00, 0x00, 0x00
Packit b099d7
};
Packit b099d7
static XmConst unsigned char copy32M_bits[] = 
Packit b099d7
{
Packit b099d7
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
Packit b099d7
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
Packit b099d7
   0xf0, 0x7f, 0x00, 0x00, 0xf0, 0xff, 0x00, 0x00, 0xf0, 0xff, 0x01, 0x00,
Packit b099d7
   0xf0, 0xff, 0x03, 0x00, 0xf0, 0xff, 0x07, 0x00, 0xf0, 0xff, 0x0f, 0x00,
Packit b099d7
   0xf0, 0xff, 0x1f, 0x00, 0xf0, 0xff, 0x1f, 0x00, 0xf0, 0xff, 0x7f, 0x00,
Packit b099d7
   0xf0, 0xff, 0xff, 0x00, 0xf0, 0xff, 0xff, 0x01, 0xf0, 0xff, 0xff, 0x03,
Packit b099d7
   0xf0, 0xff, 0xff, 0x03, 0xf0, 0xff, 0xff, 0x03, 0xf0, 0xff, 0xff, 0x03,
Packit b099d7
   0xf0, 0xff, 0xff, 0x03, 0xf0, 0xff, 0xff, 0x03, 0xf0, 0xff, 0xff, 0x03,
Packit b099d7
   0xf0, 0xff, 0xff, 0x03, 0xf0, 0xff, 0xff, 0x03, 0xe0, 0xff, 0xff, 0x03,
Packit b099d7
   0x00, 0xfe, 0xff, 0x03, 0x00, 0xfe, 0xff, 0x03, 0x00, 0xfe, 0xff, 0x03,
Packit b099d7
   0x00, 0xfe, 0xff, 0x03, 0x00, 0xfc, 0xff, 0x03
Packit b099d7
};
Packit b099d7
static XmConst XmCursorDataRec copy32CursorDataRec =
Packit b099d7
{
Packit b099d7
    copy32_width, copy32_height,
Packit b099d7
    copy32_x_hot, copy32_y_hot,
Packit b099d7
    copy32_x_offset, copy32_y_offset,
Packit b099d7
    "copy32",
Packit b099d7
    copy32_bits,
Packit b099d7
    "copy32M",
Packit b099d7
    copy32M_bits,
Packit b099d7
};
Packit b099d7
Packit b099d7
#define link32_width 32
Packit b099d7
#define link32_height 32
Packit b099d7
#define link32_x_hot 1
Packit b099d7
#define link32_y_hot 1
Packit b099d7
#define link32_x_offset -16
Packit b099d7
#define link32_y_offset -4
Packit b099d7
static XmConst unsigned char link32_bits[] =
Packit b099d7
{
Packit b099d7
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
Packit b099d7
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
Packit b099d7
   0x00, 0x00, 0x00, 0x00, 0xe0, 0x1f, 0x00, 0x00, 0x20, 0x30, 0x00, 0x00,
Packit b099d7
   0x20, 0x70, 0x00, 0x00, 0x20, 0xf0, 0x00, 0x00, 0x20, 0xf0, 0x01, 0x00,
Packit b099d7
   0x20, 0x00, 0x7b, 0x00, 0x20, 0x00, 0xc3, 0x00, 0x20, 0x04, 0xc3, 0x01,
Packit b099d7
   0x20, 0x06, 0xc3, 0x03, 0x20, 0x0f, 0xc2, 0x07, 0x20, 0x36, 0x00, 0x0c,
Packit b099d7
   0x20, 0xc4, 0x00, 0x0c, 0x20, 0x00, 0x23, 0x0c, 0x20, 0x00, 0x6c, 0x0c,
Packit b099d7
   0x20, 0x00, 0xf0, 0x0c, 0xe0, 0xff, 0x61, 0x0c, 0xc0, 0xff, 0x23, 0x0c,
Packit b099d7
   0x00, 0x00, 0x00, 0x0c, 0x00, 0x80, 0x00, 0x0c, 0x00, 0x80, 0x00, 0x0c,
Packit b099d7
   0x00, 0x80, 0xff, 0x0f, 0x00, 0x00, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00,
Packit b099d7
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
Packit b099d7
};
Packit b099d7
static XmConst unsigned char link32M_bits[] =
Packit b099d7
{
Packit b099d7
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
Packit b099d7
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
Packit b099d7
   0xf0, 0x3f, 0x00, 0x00, 0xf0, 0x7f, 0x00, 0x00, 0xf0, 0xff, 0x00, 0x00,
Packit b099d7
   0xf0, 0xff, 0x01, 0x00, 0xf0, 0xff, 0x03, 0x00, 0xf0, 0xff, 0xff, 0x00,
Packit b099d7
   0xf0, 0xff, 0xff, 0x01, 0xf0, 0xff, 0xff, 0x03, 0xf0, 0xff, 0xff, 0x07,
Packit b099d7
   0xf0, 0xff, 0xff, 0x0f, 0xf0, 0xff, 0xff, 0x1f, 0xf0, 0xff, 0xff, 0x1f,
Packit b099d7
   0xf0, 0xff, 0xff, 0x1f, 0xf0, 0xff, 0xff, 0x1f, 0xf0, 0xff, 0xff, 0x1f,
Packit b099d7
   0xf0, 0xff, 0xff, 0x1f, 0xf0, 0xff, 0xff, 0x1f, 0xf0, 0xff, 0xff, 0x1f,
Packit b099d7
   0xe0, 0xff, 0xff, 0x1f, 0x00, 0xc0, 0xff, 0x1f, 0x00, 0xc0, 0xff, 0x1f,
Packit b099d7
   0x00, 0xc0, 0xff, 0x1f, 0x00, 0xc0, 0xff, 0x1f, 0x00, 0x80, 0xff, 0x1f,
Packit b099d7
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
Packit b099d7
};
Packit b099d7
static XmConst XmCursorDataRec link32CursorDataRec =
Packit b099d7
{
Packit b099d7
    link32_width, link32_height,
Packit b099d7
    link32_x_hot, link32_y_hot,
Packit b099d7
    link32_x_offset, link32_y_offset,
Packit b099d7
    "link32",
Packit b099d7
    link32_bits,
Packit b099d7
    "link32M",
Packit b099d7
    link32M_bits,
Packit b099d7
};
Packit b099d7
Packit b099d7
#define source32_width 32
Packit b099d7
#define source32_height 32
Packit b099d7
#define source32_x_hot 0
Packit b099d7
#define source32_y_hot 0
Packit b099d7
static XmConst unsigned char source32_bits[] =
Packit b099d7
{
Packit b099d7
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x54, 0x55, 0x55, 0xd5,
Packit b099d7
   0xa8, 0xaa, 0xaa, 0xea, 0x54, 0x55, 0x55, 0xd1, 0xa8, 0xaa, 0xaa, 0xe0,
Packit b099d7
   0x54, 0x55, 0x55, 0xd0, 0xa8, 0xaa, 0xaa, 0xf0, 0x54, 0x55, 0x55, 0xd9,
Packit b099d7
   0xa8, 0xaa, 0x00, 0xee, 0x54, 0x55, 0x00, 0xd6, 0xa8, 0x2a, 0x3f, 0xea,
Packit b099d7
   0x54, 0x95, 0x05, 0xd7, 0xa8, 0xea, 0x82, 0xee, 0x54, 0x45, 0xc1, 0xd5,
Packit b099d7
   0xa8, 0xaa, 0xf4, 0x81, 0x54, 0xd5, 0x78, 0xff, 0xa8, 0xaa, 0xa0, 0xea,
Packit b099d7
   0x54, 0x95, 0x41, 0xd5, 0xa8, 0x4a, 0x87, 0xea, 0x54, 0x85, 0x0d, 0xd5,
Packit b099d7
   0xa8, 0xc2, 0x9a, 0xea, 0x54, 0x61, 0x05, 0xd5, 0xa8, 0xb0, 0xc2, 0xea,
Packit b099d7
   0x54, 0x58, 0x61, 0xd5, 0x28, 0xac, 0xb0, 0xea, 0x14, 0x56, 0x58, 0xd5,
Packit b099d7
   0x08, 0xab, 0xa8, 0xea, 0x14, 0x55, 0x51, 0xd5, 0x28, 0xaa, 0xaa, 0xea,
Packit b099d7
   0xfc, 0xff, 0xff, 0xff, 0xfe, 0xff, 0xff, 0xff,
Packit b099d7
};
Packit b099d7
Packit b099d7
static XmConst XmCursorDataRec source32CursorDataRec =
Packit b099d7
{
Packit b099d7
    source32_width, source32_height,
Packit b099d7
    source32_x_hot, source32_y_hot,
Packit b099d7
    0, 0,
Packit b099d7
    "source32",
Packit b099d7
    /* a file icon */
Packit b099d7
    source32_bits,
Packit b099d7
    NULL,
Packit b099d7
    NULL,
Packit b099d7
};
Packit b099d7
Packit b099d7
typedef struct _XmQuarkToCursorEntryRec{
Packit b099d7
  XrmQuark		  *xrmName;
Packit b099d7
  XmConst XmCursorDataRec *cursor;
Packit b099d7
} XmQuarkToCursorEntryRec, *XmQuarkToCursorEntry;
Packit b099d7
Packit b099d7
/* Used to be XmConst, but this was not linking on Solaris */
Packit b099d7
static XmQuarkToCursorEntryRec AltquarkToCursorTable[] = {
Packit b099d7
    { &_XmValidCursorIconQuark,  &state32CursorDataRec},
Packit b099d7
    { &_XmInvalidCursorIconQuark,&state32CursorDataRec},
Packit b099d7
    { &_XmNoneCursorIconQuark,   &state32CursorDataRec},
Packit b099d7
    { &_XmMoveCursorIconQuark,   &move32CursorDataRec},
Packit b099d7
    { &_XmCopyCursorIconQuark,   &copy32CursorDataRec},
Packit b099d7
    { &_XmLinkCursorIconQuark,   &link32CursorDataRec},
Packit b099d7
    { &_XmDefaultDragIconQuark,  &AltsourceCursorDataRec},
Packit b099d7
};
Packit b099d7
Packit b099d7
/* Used to be XmConst, but this was not linking on Solaris */
Packit b099d7
static XmQuarkToCursorEntryRec AltquarkTo16CursorTable[] = {
Packit b099d7
    { &_XmValidCursorIconQuark,  &validCursorDataRec},
Packit b099d7
    { &_XmInvalidCursorIconQuark,&invalidCursorDataRec},
Packit b099d7
    { &_XmNoneCursorIconQuark,   &noneCursorDataRec},
Packit b099d7
    { &_XmMoveCursorIconQuark,   &moveCursorDataRec},
Packit b099d7
    { &_XmCopyCursorIconQuark,   &copyCursorDataRec},
Packit b099d7
    { &_XmLinkCursorIconQuark,   &linkCursorDataRec},
Packit b099d7
    { &_XmDefaultDragIconQuark,  &Altsource16CursorDataRec},
Packit b099d7
};
Packit b099d7
Packit b099d7
/* Used to be XmConst, but this was not linking on Solaris */
Packit b099d7
static XmQuarkToCursorEntryRec	quarkToCursorTable[] = {
Packit b099d7
    {&_XmValidCursorIconQuark, 	&state32CursorDataRec},
Packit b099d7
    {&_XmInvalidCursorIconQuark,&state32CursorDataRec},
Packit b099d7
    {&_XmNoneCursorIconQuark, 	&state32CursorDataRec},
Packit b099d7
    {&_XmMoveCursorIconQuark,	&move32CursorDataRec},
Packit b099d7
    {&_XmCopyCursorIconQuark,	&copy32CursorDataRec},
Packit b099d7
    {&_XmLinkCursorIconQuark,	&link32CursorDataRec},
Packit b099d7
    {&_XmDefaultDragIconQuark, 	&source32CursorDataRec},
Packit b099d7
};
Packit b099d7
Packit b099d7
/* Used to be XmConst, but this was not linking on Solaris */
Packit b099d7
static XmQuarkToCursorEntryRec	quarkTo16CursorTable[] = {
Packit b099d7
    {&_XmValidCursorIconQuark, 	&state16CursorDataRec},
Packit b099d7
    {&_XmInvalidCursorIconQuark,&state16CursorDataRec},
Packit b099d7
    {&_XmNoneCursorIconQuark, 	&state16CursorDataRec},
Packit b099d7
    {&_XmMoveCursorIconQuark,	&move16CursorDataRec},
Packit b099d7
    {&_XmCopyCursorIconQuark,	&copy16CursorDataRec},
Packit b099d7
    {&_XmLinkCursorIconQuark,	&link16CursorDataRec},
Packit b099d7
    {&_XmDefaultDragIconQuark, 	&source16CursorDataRec},
Packit b099d7
};
Packit b099d7
Packit b099d7
#undef Offset
Packit b099d7
#define Offset(x) (XtOffsetOf( struct _XmDragIconRec, drag.x))
Packit b099d7
Packit b099d7
static XContext _XmTextualDragIconContext = (XContext) NULL;
Packit b099d7
Packit b099d7
static XtResource resources[]=
Packit b099d7
{
Packit b099d7
    {
Packit b099d7
	XmNdepth, XmCDepth, XmRInt,
Packit b099d7
        sizeof(int), Offset(depth), 
Packit b099d7
        XmRImmediate, (XtPointer)1,
Packit b099d7
    },
Packit b099d7
    {
Packit b099d7
	XmNwidth, XmCWidth, XmRHorizontalDimension,
Packit b099d7
	sizeof(Dimension), Offset(width),
Packit b099d7
	XmRImmediate, (XtPointer) 0,
Packit b099d7
    },
Packit b099d7
    {
Packit b099d7
	XmNheight, XmCHeight, XmRVerticalDimension,
Packit b099d7
	sizeof(Dimension), Offset(height),
Packit b099d7
	XmRImmediate, (XtPointer) 0,
Packit b099d7
    },
Packit b099d7
    {
Packit b099d7
	XmNhotX, XmCHot, XmRPosition,
Packit b099d7
        sizeof(Position), Offset(hot_x), 
Packit b099d7
        XmRImmediate, (XtPointer)0,
Packit b099d7
    },
Packit b099d7
    {
Packit b099d7
	XmNhotY, XmCHot, XmRPosition,
Packit b099d7
        sizeof(Position), Offset(hot_y),
Packit b099d7
        XmRImmediate, (XtPointer)0,
Packit b099d7
    },
Packit b099d7
    {
Packit b099d7
	XmNmask, XmCPixmap, XmRBitmap,
Packit b099d7
        sizeof(Pixmap), Offset(mask),
Packit b099d7
        XmRImmediate, (XtPointer)XmUNSPECIFIED_PIXMAP,
Packit b099d7
    },
Packit b099d7
    {
Packit b099d7
	XmNpixmap, XmCPixmap, XmRDynamicPixmap,
Packit b099d7
        sizeof(Pixmap), Offset(pixmap),
Packit b099d7
        XmRImmediate, (XtPointer)XmUNSPECIFIED_PIXMAP,
Packit b099d7
    },
Packit b099d7
    {
Packit b099d7
	XmNoffsetX, XmCOffset, XmRPosition,
Packit b099d7
        sizeof(Position), Offset(offset_x), 
Packit b099d7
        XmRImmediate, (XtPointer)0,
Packit b099d7
    },
Packit b099d7
    {
Packit b099d7
	XmNoffsetY, XmCOffset, XmRPosition,
Packit b099d7
        sizeof(Position), Offset(offset_y),
Packit b099d7
        XmRImmediate, (XtPointer)0,
Packit b099d7
    },
Packit b099d7
    {
Packit b099d7
	XmNattachment, XmCAttachment, XmRIconAttachment,
Packit b099d7
		sizeof(unsigned char), Offset(attachment),
Packit b099d7
		XmRImmediate, (XtPointer) XmATTACH_NORTH_WEST
Packit b099d7
    },
Packit b099d7
};
Packit b099d7
Packit b099d7
externaldef(xmdragiconclassrec)
Packit b099d7
XmDragIconClassRec xmDragIconClassRec = {
Packit b099d7
    {	
Packit b099d7
	(WidgetClass) &objectClassRec,	/* superclass		*/   
Packit b099d7
	"XmDragIcon",			/* class_name 		*/   
Packit b099d7
	sizeof(XmDragIconRec),		/* size 		*/   
Packit b099d7
	NULL,	                        /* Class Initializer 	*/   
Packit b099d7
	NULL,				/* class_part_init 	*/ 
Packit b099d7
	FALSE, 				/* Class init'ed ? 	*/   
Packit b099d7
	DragIconInitialize,		/* initialize         	*/   
Packit b099d7
	NULL, 				/* initialize_notify    */ 
Packit b099d7
	NULL,	 			/* realize            	*/   
Packit b099d7
	NULL,	 			/* actions            	*/   
Packit b099d7
	0,				/* num_actions        	*/   
Packit b099d7
	(XtResourceList)resources,	/* resources          	*/   
Packit b099d7
	XtNumber(resources),		/* resource_count     	*/   
Packit b099d7
	NULLQUARK, 			/* xrm_class          	*/   
Packit b099d7
	FALSE, 				/* compress_motion    	*/   
Packit b099d7
	XtExposeNoCompress, 		/* compress_exposure  	*/   
Packit b099d7
	FALSE, 				/* compress_enterleave	*/   
Packit b099d7
	FALSE, 				/* visible_interest   	*/   
Packit b099d7
	Destroy,			/* destroy            	*/   
Packit b099d7
	NULL,		 		/* resize             	*/   
Packit b099d7
	NULL,				/* expose             	*/   
Packit b099d7
	SetValues, 			/* set_values		*/
Packit b099d7
	NULL, 				/* set_values_hook      */ 
Packit b099d7
	XtInheritSetValuesAlmost,	/* set_values_almost    */ 
Packit b099d7
	NULL,				/* get_values_hook      */ 
Packit b099d7
	NULL, 				/* accept_focus       	*/   
Packit b099d7
	XtVersion, 			/* intrinsics version 	*/   
Packit b099d7
	NULL, 				/* callback offsets   	*/   
Packit b099d7
	NULL,				/* tm_table           	*/   
Packit b099d7
	NULL, 				/* query_geometry       */ 
Packit b099d7
	NULL,				/* display_accelerator  */ 
Packit b099d7
	NULL, 				/* extension            */ 
Packit b099d7
    },	
Packit b099d7
    {					/* dragIcon		*/
Packit b099d7
	NULL,				/* extension		*/
Packit b099d7
    },
Packit b099d7
};
Packit b099d7
Packit b099d7
externaldef(dragIconobjectclass) WidgetClass 
Packit b099d7
      xmDragIconObjectClass = (WidgetClass) &xmDragIconClassRec;
Packit b099d7
Packit b099d7
Packit b099d7
/************************************************************************
Packit b099d7
 *
Packit b099d7
 *  DragIconInitialize
Packit b099d7
 *
Packit b099d7
 ************************************************************************/
Packit b099d7
Packit b099d7
/*ARGSUSED*/
Packit b099d7
static void 
Packit b099d7
DragIconInitialize(
Packit b099d7
        Widget req,		/* unused */
Packit b099d7
        Widget new_w,
Packit b099d7
        ArgList args,		/* unused */
Packit b099d7
        Cardinal *numArgs )	/* unused */
Packit b099d7
{
Packit b099d7
    XmDragIconObject	dragIcon = (XmDragIconObject)new_w;
Packit b099d7
    Screen		*screen = XtScreenOfObject(XtParent(dragIcon));
Packit b099d7
    Display *		display = XtDisplay(new_w);
Packit b099d7
    XmDisplay		xmdpy = (XmDisplay) XmGetXmDisplay(display);
Packit b099d7
    Boolean		use_alt = xmdpy -> display.enable_drag_icon;
Packit b099d7
Packit b099d7
    dragIcon->drag.isDirty = False;
Packit b099d7
    if (dragIcon->drag.pixmap == XmUNSPECIFIED_PIXMAP) {
Packit b099d7
Packit b099d7
	XmCursorData	cursorData = NULL;
Packit b099d7
	Cardinal	i = 0;
Packit b099d7
	XImage 		*image = NULL;
Packit b099d7
	Dimension	maxW, maxH;
Packit b099d7
Packit b099d7
	/*
Packit b099d7
	 *  If this is one of the default cursors (recognized by name)
Packit b099d7
	 *  then we use the built in images to generate the pixmap, its
Packit b099d7
	 *  mask (as appropriate), and its dimensions and hot spot.
Packit b099d7
	 */ 
Packit b099d7
Packit b099d7
	XmeQueryBestCursorSize (XtParent(dragIcon), &maxW, &maxH);
Packit b099d7
Packit b099d7
	if (maxW < 32 || maxH < 32) {
Packit b099d7
	    /*
Packit b099d7
	     *  Use small icons.
Packit b099d7
	     */
Packit b099d7
	  if (! use_alt) {
Packit b099d7
	    for (i = 0; i < XtNumber(quarkTo16CursorTable); i++) {
Packit b099d7
	      if ((*(quarkTo16CursorTable[i].xrmName)) ==
Packit b099d7
		  dragIcon->object.xrm_name) {
Packit b099d7
		cursorData = (XmCursorData) quarkTo16CursorTable[i].cursor;
Packit b099d7
		break;
Packit b099d7
	      }
Packit b099d7
	    }
Packit b099d7
	  } else {
Packit b099d7
	    for (i = 0; i < XtNumber(quarkTo16CursorTable); i++) {
Packit b099d7
	      if ((*(AltquarkTo16CursorTable[i].xrmName)) ==
Packit b099d7
		  dragIcon->object.xrm_name) {
Packit b099d7
		cursorData = (XmCursorData) AltquarkTo16CursorTable[i].cursor;
Packit b099d7
		break;
Packit b099d7
	      }
Packit b099d7
	    }
Packit b099d7
	  }
Packit b099d7
	}
Packit b099d7
	else {
Packit b099d7
	    /*
Packit b099d7
	     *  Use large icons.
Packit b099d7
	     */
Packit b099d7
	  if (! use_alt) {
Packit b099d7
	    for (i = 0; i < XtNumber(quarkToCursorTable); i++) {
Packit b099d7
	      if ((*(quarkToCursorTable[i].xrmName)) ==
Packit b099d7
		  dragIcon->object.xrm_name) {
Packit b099d7
		cursorData = (XmCursorData) quarkToCursorTable[i].cursor;
Packit b099d7
		break;
Packit b099d7
	      }
Packit b099d7
	    }
Packit b099d7
	  } else {
Packit b099d7
	    for (i = 0; i < XtNumber(quarkToCursorTable); i++) {
Packit b099d7
	      if ((*(AltquarkToCursorTable[i].xrmName)) ==
Packit b099d7
		  dragIcon->object.xrm_name) {
Packit b099d7
		cursorData = (XmCursorData) AltquarkToCursorTable[i].cursor;
Packit b099d7
		break;
Packit b099d7
	      }
Packit b099d7
	    }
Packit b099d7
	  }
Packit b099d7
	}
Packit b099d7
Packit b099d7
	if (cursorData) {
Packit b099d7
	    dragIcon->drag.depth = 1;
Packit b099d7
	    dragIcon->drag.width = cursorData->width;
Packit b099d7
	    dragIcon->drag.height = cursorData->height;
Packit b099d7
	    dragIcon->drag.hot_x = cursorData->hot_x;
Packit b099d7
	    dragIcon->drag.hot_y = cursorData->hot_y;
Packit b099d7
	    dragIcon->drag.offset_x = cursorData->offset_x;
Packit b099d7
	    dragIcon->drag.offset_y = cursorData->offset_y;
Packit b099d7
Packit b099d7
	    _XmCreateImage(image, display, (char *)cursorData->data,
Packit b099d7
			dragIcon->drag.width, dragIcon->drag.height, 
Packit b099d7
			LSBFirst);
Packit b099d7
    
Packit b099d7
	    _XmInstallImage(image, cursorData->dataName, 	
Packit b099d7
		            (int)dragIcon->drag.hot_x, 
Packit b099d7
		            (int)dragIcon->drag.hot_y);
Packit b099d7
	    dragIcon->drag.pixmap =
Packit b099d7
		XmGetPixmapByDepth (screen, cursorData->dataName, 1, 0, 1);
Packit b099d7
    
Packit b099d7
	    if (cursorData->maskData) {
Packit b099d7
		_XmCreateImage(image, display, (char *)cursorData->maskData,
Packit b099d7
			    dragIcon->drag.width, dragIcon->drag.height, 
Packit b099d7
			    LSBFirst);
Packit b099d7
	
Packit b099d7
		_XmInstallImage (image, cursorData->maskDataName, 0, 0);
Packit b099d7
	
Packit b099d7
		dragIcon->drag.mask =
Packit b099d7
		    XmGetPixmapByDepth(screen, cursorData->maskDataName, 
Packit b099d7
				       1, 0, 1);
Packit b099d7
	    }
Packit b099d7
	}
Packit b099d7
	dragIcon->drag.region = NULL;
Packit b099d7
    }
Packit b099d7
    else if (dragIcon->drag.pixmap != XmUNSPECIFIED_PIXMAP) {
Packit b099d7
      int		depth;
Packit b099d7
      unsigned int	width, height;
Packit b099d7
      int		hot_x, hot_y;
Packit b099d7
      String		name;
Packit b099d7
      Pixel		foreground, background;
Packit b099d7
      if ((dragIcon->drag.width == 0) || (dragIcon->drag.height == 0)) {
Packit b099d7
	    if (XmeGetPixmapData(screen,
Packit b099d7
				 dragIcon->drag.pixmap,
Packit b099d7
				 &name,
Packit b099d7
				 &depth, 
Packit b099d7
				 &foreground, &background,
Packit b099d7
				 &hot_x, &hot_y,
Packit b099d7
				 &width, &height)) {
Packit b099d7
		dragIcon->drag.depth = depth;
Packit b099d7
		dragIcon->drag.hot_x = hot_x;
Packit b099d7
		dragIcon->drag.hot_y = hot_y;
Packit b099d7
		dragIcon->drag.width = (Dimension)width;
Packit b099d7
		dragIcon->drag.height = (Dimension)height;
Packit b099d7
	    }
Packit b099d7
	    else {
Packit b099d7
		dragIcon->drag.width = 
Packit b099d7
		  dragIcon->drag.height = 0;
Packit b099d7
		dragIcon->drag.pixmap = XmUNSPECIFIED_PIXMAP;
Packit b099d7
		XmeWarning ((Widget) new_w, MESSAGE1);
Packit b099d7
	    }
Packit b099d7
	}
Packit b099d7
        if (dragIcon->drag.mask != XmUNSPECIFIED_PIXMAP) {
Packit b099d7
           XImage * image;
Packit b099d7
Packit b099d7
           if (dragIcon->drag.width > 0 && dragIcon->drag.height > 0) {
Packit b099d7
                image = XGetImage(display, (Drawable) dragIcon->drag.mask,
Packit b099d7
				  0, 0, dragIcon->drag.width,
Packit b099d7
				  dragIcon->drag.height, 1L, XYPixmap);
Packit b099d7
Packit b099d7
	        dragIcon->drag.region = (Region) _XmRegionFromImage(image);
Packit b099d7
		if (image)
Packit b099d7
		    XDestroyImage(image);
Packit b099d7
            } else
Packit b099d7
	        dragIcon->drag.region = NULL;
Packit b099d7
	   
Packit b099d7
        } else
Packit b099d7
	   dragIcon->drag.region = NULL;
Packit b099d7
    }
Packit b099d7
Packit b099d7
    dragIcon->drag.restore_region = NULL;
Packit b099d7
    dragIcon->drag.x_offset = 0;
Packit b099d7
    dragIcon->drag.y_offset = 0;
Packit b099d7
Packit b099d7
    if (dragIcon->drag.pixmap == XmUNSPECIFIED_PIXMAP) {
Packit b099d7
	XmeWarning ((Widget) new_w, MESSAGE2);
Packit b099d7
    }
Packit b099d7
}
Packit b099d7
Packit b099d7
/************************************************************************
Packit b099d7
 *
Packit b099d7
 *  XmCreateDragIcon
Packit b099d7
 *
Packit b099d7
 ************************************************************************/
Packit b099d7
Packit b099d7
Widget 
Packit b099d7
XmCreateDragIcon(
Packit b099d7
        Widget parent,
Packit b099d7
        String name,
Packit b099d7
        ArgList argList,
Packit b099d7
        Cardinal argCount )
Packit b099d7
{
Packit b099d7
    return (XtCreateWidget (name, xmDragIconObjectClass, parent,
Packit b099d7
		            argList, argCount));
Packit b099d7
}
Packit b099d7
Packit b099d7
/************************************************************************
Packit b099d7
 *
Packit b099d7
 *  _XmDestroyDefaultDragIcon ()
Packit b099d7
 *
Packit b099d7
 *  A default XmDragIcon's pixmap and mask (if present) were installed in
Packit b099d7
 *  the Xm pixmap cache from built-in images when the XmDragIcon was
Packit b099d7
 *  initialized.
Packit b099d7
 ************************************************************************/
Packit b099d7
Packit b099d7
void 
Packit b099d7
_XmDestroyDefaultDragIcon(
Packit b099d7
	XmDragIconObject icon)
Packit b099d7
{
Packit b099d7
    Screen	*screen = XtScreenOfObject(XtParent(icon));
Packit b099d7
Packit b099d7
    if (icon->drag.pixmap != XmUNSPECIFIED_PIXMAP) {
Packit b099d7
	XmDestroyPixmap (screen, icon->drag.pixmap);
Packit b099d7
	icon->drag.pixmap = XmUNSPECIFIED_PIXMAP;
Packit b099d7
    }
Packit b099d7
    if (icon->drag.mask != XmUNSPECIFIED_PIXMAP) {
Packit b099d7
	XmDestroyPixmap (screen, icon->drag.mask);
Packit b099d7
	icon->drag.mask = XmUNSPECIFIED_PIXMAP;
Packit b099d7
    }
Packit b099d7
    XtDestroyWidget ((Widget) icon);
Packit b099d7
}
Packit b099d7
Packit b099d7
/************************************************************************
Packit b099d7
 *
Packit b099d7
 *  _XmDragIconIsDirty ()
Packit b099d7
 *
Packit b099d7
 *  Test the isDirty member of XmDragIconObject.
Packit b099d7
 ************************************************************************/
Packit b099d7
Packit b099d7
Boolean 
Packit b099d7
_XmDragIconIsDirty(
Packit b099d7
	XmDragIconObject icon)
Packit b099d7
{
Packit b099d7
    return (icon->drag.isDirty);
Packit b099d7
}
Packit b099d7
Packit b099d7
/************************************************************************
Packit b099d7
 *
Packit b099d7
 *  _XmDragIconClean ()
Packit b099d7
 *
Packit b099d7
 *  Clear the isDirty member of XmDragIconObjects.
Packit b099d7
 ************************************************************************/
Packit b099d7
Packit b099d7
void
Packit b099d7
_XmDragIconClean(
Packit b099d7
	XmDragIconObject icon1,
Packit b099d7
	XmDragIconObject icon2,
Packit b099d7
	XmDragIconObject icon3)
Packit b099d7
{
Packit b099d7
    if (icon1)
Packit b099d7
	icon1->drag.isDirty = False;
Packit b099d7
    if (icon2)
Packit b099d7
	icon2->drag.isDirty = False;
Packit b099d7
    if (icon3)
Packit b099d7
	icon3->drag.isDirty = False;
Packit b099d7
}
Packit b099d7
Packit b099d7
/************************************************************************
Packit b099d7
 *
Packit b099d7
 *  SetValues
Packit b099d7
 *
Packit b099d7
 ************************************************************************/
Packit b099d7
Packit b099d7
/*ARGSUSED*/
Packit b099d7
static Boolean
Packit b099d7
SetValues(
Packit b099d7
    Widget	current,
Packit b099d7
    Widget	req,		/* unused */
Packit b099d7
    Widget	new_w,
Packit b099d7
    ArgList	args,		/* unused */
Packit b099d7
    Cardinal	*num_args)	/* unused */
Packit b099d7
{
Packit b099d7
    XmDragIconObject	newIcon = (XmDragIconObject) new_w;
Packit b099d7
    XmDragIconObject	oldIcon = (XmDragIconObject) current;
Packit b099d7
Packit b099d7
    /*
Packit b099d7
     *  Mark the icon as dirty if any of its resources have changed.
Packit b099d7
     */
Packit b099d7
Packit b099d7
    if ((newIcon->drag.depth != oldIcon->drag.depth) ||
Packit b099d7
	(newIcon->drag.pixmap != oldIcon->drag.pixmap) ||
Packit b099d7
	(newIcon->drag.mask != oldIcon->drag.mask) ||
Packit b099d7
	(newIcon->drag.width != oldIcon->drag.width) ||
Packit b099d7
	(newIcon->drag.height != oldIcon->drag.height) ||
Packit b099d7
	(newIcon->drag.attachment != oldIcon->drag.attachment) ||
Packit b099d7
	(newIcon->drag.offset_x != oldIcon->drag.offset_x) ||
Packit b099d7
        (newIcon->drag.offset_y != oldIcon->drag.offset_y) ||
Packit b099d7
	(newIcon->drag.hot_x != oldIcon->drag.hot_x) ||
Packit b099d7
        (newIcon->drag.hot_y != oldIcon->drag.hot_y)) {
Packit b099d7
Packit b099d7
	newIcon->drag.isDirty = True;
Packit b099d7
    }
Packit b099d7
Packit b099d7
    if (newIcon->drag.mask != oldIcon->drag.mask) {
Packit b099d7
       if (newIcon->drag.mask != XmUNSPECIFIED_PIXMAP) {
Packit b099d7
	   XImage * image;
Packit b099d7
Packit b099d7
	   if (newIcon->drag.width > 0 && newIcon->drag.height > 0) {
Packit b099d7
		image = XGetImage(XtDisplay(new_w),
Packit b099d7
				  (Drawable) newIcon->drag.mask,
Packit b099d7
				  0, 0, newIcon->drag.width,
Packit b099d7
				  newIcon->drag.height, 1L, XYPixmap);
Packit b099d7
Packit b099d7
		newIcon->drag.region = (Region) _XmRegionFromImage(image);
Packit b099d7
		if (image)
Packit b099d7
		    XDestroyImage(image);
Packit b099d7
	    }
Packit b099d7
	    else
Packit b099d7
		newIcon->drag.region = NULL;
Packit b099d7
       }
Packit b099d7
       else
Packit b099d7
	    newIcon->drag.region = NULL;
Packit b099d7
Packit b099d7
       if (oldIcon->drag.region) {
Packit b099d7
	  XDestroyRegion(oldIcon->drag.region);
Packit b099d7
	  oldIcon->drag.region = NULL;
Packit b099d7
       }
Packit b099d7
    }
Packit b099d7
Packit b099d7
    return False;
Packit b099d7
}
Packit b099d7
Packit b099d7
/************************************************************************
Packit b099d7
 *
Packit b099d7
 *  Destroy
Packit b099d7
 *
Packit b099d7
 *  Remove any cached cursors referencing this icon.
Packit b099d7
 ************************************************************************/
Packit b099d7
Packit b099d7
static void 
Packit b099d7
Destroy(
Packit b099d7
        Widget w )
Packit b099d7
{
Packit b099d7
     XmDragIconObject	dragIcon = (XmDragIconObject) w;
Packit b099d7
Packit b099d7
     if (dragIcon->drag.region != NULL) {
Packit b099d7
        XDestroyRegion(dragIcon->drag.region);
Packit b099d7
        dragIcon->drag.region = NULL;
Packit b099d7
     }
Packit b099d7
Packit b099d7
     if (dragIcon->drag.restore_region != NULL) {
Packit b099d7
        XDestroyRegion(dragIcon->drag.restore_region);
Packit b099d7
        dragIcon->drag.restore_region = NULL;
Packit b099d7
     }
Packit b099d7
Packit b099d7
    _XmScreenRemoveFromCursorCache (dragIcon);
Packit b099d7
}
Packit b099d7
Packit b099d7
Packit b099d7
Packit b099d7
/* ARGSUSED */
Packit b099d7
static void
Packit b099d7
ScreenObjectDestroy(
Packit b099d7
        Widget w,
Packit b099d7
        XtPointer client_data,
Packit b099d7
        XtPointer call_data )
Packit b099d7
{
Packit b099d7
   Widget drag_icon = (Widget) client_data;
Packit b099d7
Packit b099d7
   XtDestroyWidget(drag_icon);  /* destroy drag_icon */
Packit b099d7
   _XmProcessLock();
Packit b099d7
   XDeleteContext(XtDisplay(w), RootWindowOfScreen(XtScreen(w)),  
Packit b099d7
		  _XmTextualDragIconContext);
Packit b099d7
   _XmProcessUnlock();
Packit b099d7
}
Packit b099d7
Packit b099d7
Packit b099d7
Widget
Packit b099d7
XmeGetTextualDragIcon(
Packit b099d7
        Widget w )
Packit b099d7
{
Packit b099d7
    Widget drag_icon;
Packit b099d7
    Arg args[10];
Packit b099d7
    int n = 0;
Packit b099d7
    Pixmap icon, icon_mask;
Packit b099d7
    Screen *screen = XtScreen(w);
Packit b099d7
    XImage *image = NULL;
Packit b099d7
    Window      root;
Packit b099d7
    Widget screen_object;
Packit b099d7
    XmDisplay dpy;
Packit b099d7
    Boolean use_alt;
Packit b099d7
    XContext loc_context;
Packit b099d7
    _XmWidgetToAppContext(w);
Packit b099d7
Packit b099d7
   _XmAppLock(app);
Packit b099d7
   root = RootWindowOfScreen(XtScreen(w));
Packit b099d7
   dpy = (XmDisplay) XmGetXmDisplay(XtDisplay(w));
Packit b099d7
   use_alt = dpy -> display.enable_drag_icon;
Packit b099d7
Packit b099d7
   _XmProcessLock();
Packit b099d7
   if (_XmTextualDragIconContext == (XContext) NULL)
Packit b099d7
      _XmTextualDragIconContext = XUniqueContext();
Packit b099d7
   loc_context = _XmTextualDragIconContext;
Packit b099d7
   _XmProcessUnlock();
Packit b099d7
Packit b099d7
   if (XFindContext(XtDisplay(w), root,
Packit b099d7
                    loc_context, (char **) &drag_icon)) {
Packit b099d7
       Dimension height, width;
Packit b099d7
       int x_hot, y_hot;
Packit b099d7
       XmConst unsigned char *icon_bits;
Packit b099d7
       XmConst unsigned char *icon_mask_bits;
Packit b099d7
Packit b099d7
       XmeQueryBestCursorSize(w, &width, &height);
Packit b099d7
Packit b099d7
       if (width < 64 && height < 64) {
Packit b099d7
	 if (use_alt) {
Packit b099d7
	   icon_bits = XmTEXTUAL_DRAG_ICON_BITS_Alt_16;
Packit b099d7
	   icon_mask_bits = XmTEXTUAL_DRAG_ICON_MASK_BITS_Alt_16;
Packit b099d7
	   height = XmTEXTUAL_DRAG_ICON_HEIGHT_Alt_16;
Packit b099d7
	   width = XmTEXTUAL_DRAG_ICON_WIDTH_Alt_16;
Packit b099d7
	   x_hot = XmTEXTUAL_DRAG_ICON_X_HOT_Alt_16;
Packit b099d7
	   y_hot = XmTEXTUAL_DRAG_ICON_Y_HOT_Alt_16;
Packit b099d7
	 } else {
Packit b099d7
	   icon_bits = XmTEXTUAL_DRAG_ICON_BITS_16;
Packit b099d7
	   icon_mask_bits = XmTEXTUAL_DRAG_ICON_MASK_BITS_16;
Packit b099d7
	   height = XmTEXTUAL_DRAG_ICON_HEIGHT_16;
Packit b099d7
	   width = XmTEXTUAL_DRAG_ICON_WIDTH_16;
Packit b099d7
	   x_hot = XmTEXTUAL_DRAG_ICON_X_HOT_16;
Packit b099d7
	   y_hot = XmTEXTUAL_DRAG_ICON_Y_HOT_16;
Packit b099d7
	 }
Packit b099d7
       } else {
Packit b099d7
	 if (use_alt) {
Packit b099d7
	   icon_bits = XmTEXTUAL_DRAG_ICON_BITS_Alt_32;
Packit b099d7
	   icon_mask_bits = XmTEXTUAL_DRAG_ICON_MASK_BITS_Alt_32;
Packit b099d7
	   height = XmTEXTUAL_DRAG_ICON_HEIGHT_Alt_32;
Packit b099d7
	   width = XmTEXTUAL_DRAG_ICON_WIDTH_Alt_32;
Packit b099d7
	   x_hot = XmTEXTUAL_DRAG_ICON_X_HOT_Alt_32;
Packit b099d7
	   y_hot = XmTEXTUAL_DRAG_ICON_Y_HOT_Alt_32;
Packit b099d7
	 } else {
Packit b099d7
	   icon_bits = XmTEXTUAL_DRAG_ICON_BITS_32;
Packit b099d7
	   icon_mask_bits = XmTEXTUAL_DRAG_ICON_MASK_BITS_32;
Packit b099d7
	   height = XmTEXTUAL_DRAG_ICON_HEIGHT_32;
Packit b099d7
	   width = XmTEXTUAL_DRAG_ICON_WIDTH_32;
Packit b099d7
	   x_hot = XmTEXTUAL_DRAG_ICON_X_HOT_32;
Packit b099d7
	   y_hot = XmTEXTUAL_DRAG_ICON_Y_HOT_32;
Packit b099d7
	 }
Packit b099d7
       }
Packit b099d7
Packit b099d7
       _XmCreateImage(image, XtDisplay(w), (char *)icon_bits, 
Packit b099d7
		width, height, LSBFirst);
Packit b099d7
       _XmInstallImage(image, "XmTextualDragIcon", x_hot, y_hot);
Packit b099d7
       icon = XmGetPixmapByDepth(screen, "XmTextualDragIcon", 1, 0, 1);
Packit b099d7
Packit b099d7
       _XmCreateImage(image, XtDisplay(w), (char *)icon_mask_bits, 
Packit b099d7
		   width, height, LSBFirst);
Packit b099d7
       _XmInstallImage(image, "XmTextualDragIconMask", x_hot, y_hot);
Packit b099d7
       icon_mask = XmGetPixmapByDepth(screen, "XmTextualDragIconMask", 
Packit b099d7
				      1, 0, 1);
Packit b099d7
       screen_object = XmGetXmScreen(XtScreen(w));
Packit b099d7
Packit b099d7
       XtSetArg(args[n], XmNhotX, x_hot);  n++;
Packit b099d7
       XtSetArg(args[n], XmNhotY, y_hot);  n++;
Packit b099d7
       XtSetArg(args[n], XmNheight, height);  n++;
Packit b099d7
       XtSetArg(args[n], XmNwidth, width);  n++;
Packit b099d7
       XtSetArg(args[n], XmNmaxHeight, height);  n++;
Packit b099d7
       XtSetArg(args[n], XmNmaxWidth, width);  n++;
Packit b099d7
       XtSetArg(args[n], XmNmask, icon_mask);  n++;
Packit b099d7
       XtSetArg(args[n], XmNpixmap, icon);  n++;
Packit b099d7
       drag_icon = XtCreateWidget("drag_icon", xmDragIconObjectClass,
Packit b099d7
                                  screen_object, args, n);
Packit b099d7
Packit b099d7
       XSaveContext(XtDisplay(w), root,
Packit b099d7
                    loc_context, (char *) drag_icon);
Packit b099d7
Packit b099d7
       XtAddCallback(screen_object, XmNdestroyCallback, ScreenObjectDestroy,
Packit b099d7
                       (XtPointer) drag_icon);
Packit b099d7
   }
Packit b099d7
Packit b099d7
   _XmAppUnlock(app);
Packit b099d7
   return drag_icon;
Packit b099d7
}
Packit b099d7