mirror of
git://git.code.sf.net/p/cdesktopenv/code
synced 2025-02-15 04:32:24 +00:00
Remove examples/motif
This commit is contained in:
parent
8eb01941d3
commit
158fc36af4
52 changed files with 45 additions and 9806 deletions
|
@ -429,12 +429,6 @@ then
|
|||
|
||||
fi
|
||||
|
||||
if [ ! -f /usr/dt/share/examples/motif/dogs/Dog.c ]; then
|
||||
|
||||
SUNWmfdm=SUNWmfdm
|
||||
|
||||
fi
|
||||
|
||||
fi
|
||||
|
||||
pkglist="${DEV_PKGS} ${SUNWmfman} ${SUNWmfdm}"
|
||||
|
|
|
@ -788,253 +788,6 @@ examples/template/C/template.t.pm
|
|||
install_target = /usr/dt/share/examples/template/C/template.t.pm
|
||||
}
|
||||
|
||||
#
|
||||
# examples for Motif
|
||||
#
|
||||
|
||||
# periodic example
|
||||
|
||||
examples/motif/periodic/periodic.c
|
||||
{ default
|
||||
install_target = /usr/dt/share/examples/motif/periodic/periodic.c
|
||||
}
|
||||
|
||||
examples/motif/periodic/periodic.uil
|
||||
{ default
|
||||
install_target = /usr/dt/share/examples/motif/periodic/periodic.uil
|
||||
}
|
||||
|
||||
examples/motif/periodic/periodic_local.uil
|
||||
{ default
|
||||
install_target = /usr/dt/share/examples/motif/periodic/periodic_local.uil
|
||||
}
|
||||
|
||||
examples/motif/periodic/Periodic.ad
|
||||
{ default
|
||||
install_target = /usr/dt/share/examples/motif/periodic/Periodic
|
||||
}
|
||||
|
||||
examples/motif/periodic/README
|
||||
{ default
|
||||
install_target = /usr/dt/share/examples/motif/periodic/README
|
||||
}
|
||||
|
||||
examples/motif/periodic/Makefile.ibm
|
||||
{ default
|
||||
install_target = /usr/dt/share/examples/motif/periodic/Makefile.IBM
|
||||
}
|
||||
|
||||
examples/motif/periodic/Makefile.hp
|
||||
{ default
|
||||
install_target = /usr/dt/share/examples/motif/periodic/Makefile.HP
|
||||
}
|
||||
|
||||
examples/motif/periodic/Makefile.sun
|
||||
{ default
|
||||
install_target = /usr/dt/share/examples/motif/periodic/Makefile.SUN
|
||||
}
|
||||
|
||||
examples/motif/periodic/Makefile.uxp
|
||||
{ default
|
||||
install_target = /usr/dt/share/examples/motif/periodic/Makefile.UXP
|
||||
}
|
||||
|
||||
examples/motif/periodic/Makefile.novell
|
||||
{ default
|
||||
install_target = /usr/dt/share/examples/motif/periodic/Makefile.NOVELL
|
||||
}
|
||||
|
||||
# clipboard example
|
||||
|
||||
examples/motif/clipboard/cutpaste.c
|
||||
{ default
|
||||
install_target = /usr/dt/share/examples/motif/clipboard/cutpaste.c
|
||||
}
|
||||
|
||||
examples/motif/clipboard/cutpaste.uil
|
||||
{ default
|
||||
install_target = /usr/dt/share/examples/motif/clipboard/cutpaste.uil
|
||||
}
|
||||
|
||||
examples/motif/clipboard/cutpaste_local.uil
|
||||
{ default
|
||||
install_target = /usr/dt/share/examples/motif/clipboard/cutpaste_local.uil
|
||||
}
|
||||
|
||||
examples/motif/clipboard/README
|
||||
{ default
|
||||
install_target = /usr/dt/share/examples/motif/clipboard/README
|
||||
}
|
||||
|
||||
examples/motif/clipboard/Makefile.ibm
|
||||
{ default
|
||||
install_target = /usr/dt/share/examples/motif/clipboard/Makefile.IBM
|
||||
}
|
||||
|
||||
examples/motif/clipboard/Makefile.hp
|
||||
{ default
|
||||
install_target = /usr/dt/share/examples/motif/clipboard/Makefile.HP
|
||||
}
|
||||
|
||||
examples/motif/clipboard/Makefile.sun
|
||||
{ default
|
||||
install_target = /usr/dt/share/examples/motif/clipboard/Makefile.SUN
|
||||
}
|
||||
|
||||
examples/motif/clipboard/Makefile.uxp
|
||||
{ default
|
||||
install_target = /usr/dt/share/examples/motif/clipboard/Makefile.UXP
|
||||
}
|
||||
|
||||
examples/motif/clipboard/Makefile.novell
|
||||
{ default
|
||||
install_target = /usr/dt/share/examples/motif/clipboard/Makefile.NOVELL
|
||||
}
|
||||
|
||||
# draganddrop example
|
||||
|
||||
examples/motif/draganddrop/DNDDemo.c
|
||||
{ default
|
||||
install_target = /usr/dt/share/examples/motif/draganddrop/DNDDemo.c
|
||||
}
|
||||
|
||||
examples/motif/draganddrop/DNDDemo.h
|
||||
{ default
|
||||
install_target = /usr/dt/share/examples/motif/draganddrop/DNDDemo.h
|
||||
}
|
||||
|
||||
examples/motif/draganddrop/DNDDraw.c
|
||||
{ default
|
||||
install_target = /usr/dt/share/examples/motif/draganddrop/DNDDraw.c
|
||||
}
|
||||
|
||||
examples/motif/draganddrop/README
|
||||
{ default
|
||||
install_target = /usr/dt/share/examples/motif/draganddrop/README
|
||||
}
|
||||
|
||||
examples/motif/draganddrop/Makefile.ibm
|
||||
{ default
|
||||
install_target = /usr/dt/share/examples/motif/draganddrop/Makefile.IBM
|
||||
}
|
||||
|
||||
examples/motif/draganddrop/Makefile.hp
|
||||
{ default
|
||||
install_target = /usr/dt/share/examples/motif/draganddrop/Makefile.HP
|
||||
}
|
||||
|
||||
examples/motif/draganddrop/Makefile.sun
|
||||
{ default
|
||||
install_target = /usr/dt/share/examples/motif/draganddrop/Makefile.SUN
|
||||
}
|
||||
|
||||
examples/motif/draganddrop/Makefile.uxp
|
||||
{ default
|
||||
install_target = /usr/dt/share/examples/motif/draganddrop/Makefile.UXP
|
||||
}
|
||||
|
||||
examples/motif/draganddrop/Makefile.novell
|
||||
{ default
|
||||
install_target = /usr/dt/share/examples/motif/draganddrop/Makefile.NOVELL
|
||||
}
|
||||
|
||||
# dogs example
|
||||
|
||||
examples/motif/dogs/dogs.c
|
||||
{ default
|
||||
install_target = /usr/dt/share/examples/motif/dogs/dogs.c
|
||||
}
|
||||
|
||||
examples/motif/dogs/dogs.uil
|
||||
{ default
|
||||
install_target = /usr/dt/share/examples/motif/dogs/dogs.uil
|
||||
}
|
||||
|
||||
examples/motif/dogs/Dog.h
|
||||
{ default
|
||||
install_target = /usr/dt/share/examples/motif/dogs/Dog.h
|
||||
}
|
||||
|
||||
examples/motif/dogs/DogP.h
|
||||
{ default
|
||||
install_target = /usr/dt/share/examples/motif/dogs/DogP.h
|
||||
}
|
||||
|
||||
examples/motif/dogs/Dog.c
|
||||
{ default
|
||||
install_target = /usr/dt/share/examples/motif/dogs/Dog.c
|
||||
}
|
||||
|
||||
examples/motif/dogs/up.bm
|
||||
{ default
|
||||
install_target = /usr/dt/share/examples/motif/dogs/up.bm
|
||||
}
|
||||
|
||||
examples/motif/dogs/down.bm
|
||||
{ default
|
||||
install_target = /usr/dt/share/examples/motif/dogs/down.bm
|
||||
}
|
||||
|
||||
examples/motif/dogs/bark.bm
|
||||
{ default
|
||||
install_target = /usr/dt/share/examples/motif/dogs/bark.bm
|
||||
}
|
||||
|
||||
examples/motif/dogs/Dog.uil
|
||||
{ default
|
||||
install_target = /usr/dt/share/examples/motif/dogs/Dog.uil
|
||||
}
|
||||
|
||||
examples/motif/dogs/Square.h
|
||||
{ default
|
||||
install_target = /usr/dt/share/examples/motif/dogs/Square.h
|
||||
}
|
||||
|
||||
examples/motif/dogs/SquareP.h
|
||||
{ default
|
||||
install_target = /usr/dt/share/examples/motif/dogs/SquareP.h
|
||||
}
|
||||
|
||||
examples/motif/dogs/Square.c
|
||||
{ default
|
||||
install_target = /usr/dt/share/examples/motif/dogs/Square.c
|
||||
}
|
||||
|
||||
examples/motif/dogs/Square.uil
|
||||
{ default
|
||||
install_target = /usr/dt/share/examples/motif/dogs/Square.uil
|
||||
}
|
||||
|
||||
examples/motif/dogs/README
|
||||
{ default
|
||||
install_target = /usr/dt/share/examples/motif/dogs/README
|
||||
}
|
||||
|
||||
examples/motif/dogs/Makefile.ibm
|
||||
{ default
|
||||
install_target = /usr/dt/share/examples/motif/dogs/Makefile.IBM
|
||||
}
|
||||
|
||||
examples/motif/dogs/Makefile.hp
|
||||
{ default
|
||||
install_target = /usr/dt/share/examples/motif/dogs/Makefile.HP
|
||||
}
|
||||
|
||||
examples/motif/dogs/Makefile.sun
|
||||
{ default
|
||||
install_target = /usr/dt/share/examples/motif/dogs/Makefile.SUN
|
||||
}
|
||||
|
||||
examples/motif/dogs/Makefile.uxp
|
||||
{ default
|
||||
install_target = /usr/dt/share/examples/motif/dogs/Makefile.UXP
|
||||
}
|
||||
|
||||
examples/motif/dogs/Makefile.novell
|
||||
{ default
|
||||
install_target = /usr/dt/share/examples/motif/dogs/Makefile.NOVELL
|
||||
}
|
||||
|
||||
#
|
||||
# examples README
|
||||
#
|
||||
|
|
|
@ -146,7 +146,7 @@ instance structure, which it reads from the currently linked Motif library.
|
|||
Motif reference- resolving mechanism if you want your application to be binary
|
||||
compatible with future releases of the Common Desktop Environment.</para>
|
||||
</note>
|
||||
<para>For details regarding this Motif mechanism, consult the Motif 2.1 <filename>XmResolvePartOffsets(3x)</filename> and <filename>XmResolveAllPartOffsets(3x)</filename> man pages and the <emphasis>Motif Programmer's Reference</emphasis>. You can find example source code in <filename>/usr/dt/examples/motif/dogs</filename><literal><indexterm><primary>guidelines</primary><secondary>Common
|
||||
<para>For details regarding this Motif mechanism, consult the Motif 2.1 <filename>XmResolvePartOffsets(3x)</filename> and <filename>XmResolveAllPartOffsets(3x)</filename> man pages and the <emphasis>Motif Programmer's Reference</emphasis>. You can find example source code in Motif's example code<literal><indexterm><primary>guidelines</primary><secondary>Common
|
||||
Desktop Environment Motif widget binary compatibility</secondary></indexterm><indexterm>
|
||||
<primary>compatibility</primary><secondary>guidelines, for Common Desktop
|
||||
Environment widgets</secondary></indexterm><indexterm><primary>widget</primary>
|
||||
|
|
|
@ -1,52 +0,0 @@
|
|||
# $XConsortium: Makefile.hp /main/2 1996/05/13 11:55:06 drk $
|
||||
##########################################################################
|
||||
#
|
||||
# Makefile for Motif clipboard examples (HP)
|
||||
#
|
||||
# (c) Copyright 1993, 1994 Hewlett-Packard Company
|
||||
# (c) Copyright 1993, 1994 International Business Machines Corp.
|
||||
# (c) Copyright 1993, 1994 Sun Microsystems, Inc.
|
||||
# (c) Copyright 1993, 1994 Novell, Inc.
|
||||
#
|
||||
##########################################################################
|
||||
|
||||
CC = cc
|
||||
RM = rm -f
|
||||
UIL = /usr/dt/bin/uil
|
||||
|
||||
PROGRAM = cutpaste
|
||||
SOURCES = cutpaste.c
|
||||
OBJECTS = cutpaste.o
|
||||
UID = cutpaste.uid
|
||||
UILSOURCE = cutpaste.uil
|
||||
|
||||
DEFINES =
|
||||
CDEBUGFLAGS = -O
|
||||
CFLAGS = -Aa -z $(DEFINES) $(CDEBUGFLAGS)
|
||||
|
||||
DTINCLUDE = -I/usr/dt/include
|
||||
X11INCLUDE = -I/usr/include/X11R5
|
||||
|
||||
INCLUDES = $(DTINCLUDE) $(X11INCLUDE)
|
||||
|
||||
DTLIBS = -L/usr/dt/lib -lMrm -lXm
|
||||
X11LIBS = -L/usr/lib/X11R5 -lXt -lX11
|
||||
SYSLIBS =
|
||||
|
||||
LIBRARIES = $(DTLIBS) $(X11LIBS) $(SYSLIBS)
|
||||
LDFLAGS =
|
||||
|
||||
.c.o:
|
||||
${CC} -c $(CFLAGS) $(INCLUDES) $<
|
||||
|
||||
all:: $(PROGRAM) $(UID)
|
||||
|
||||
$(PROGRAM):: $(OBJECTS)
|
||||
$(CC) -o $(PROGRAM) $(LDFLAGS) $(OBJECTS) $(LIBRARIES)
|
||||
|
||||
$(UID):: $(UILSOURCE)
|
||||
$(UIL) -o $(UID) $(UILSOURCE)
|
||||
|
||||
clean::
|
||||
$(RM) $(PROGRAM) $(OBJECTS) $(UID)
|
||||
|
|
@ -1,51 +0,0 @@
|
|||
# $XConsortium: Makefile.ibm /main/2 1996/05/13 11:55:26 drk $
|
||||
##########################################################################
|
||||
#
|
||||
# Makefile for Motif clipboard examples (IBM)
|
||||
#
|
||||
# (c) Copyright 1993, 1994 Hewlett-Packard Company
|
||||
# (c) Copyright 1993, 1994 International Business Machines Corp.
|
||||
# (c) Copyright 1993, 1994 Sun Microsystems, Inc.
|
||||
# (c) Copyright 1993, 1994 Novell, Inc.
|
||||
#
|
||||
##########################################################################
|
||||
|
||||
CC = cc
|
||||
RM = rm -f
|
||||
UIL = /usr/dt/bin/uil
|
||||
|
||||
PROGRAM = cutpaste
|
||||
SOURCES = cutpaste.c
|
||||
OBJECTS = cutpaste.o
|
||||
UID = cutpaste.uid
|
||||
UILSOURCE = cutpaste.uil
|
||||
|
||||
DEFINES =
|
||||
CDEBUGFLAGS = -O
|
||||
CFLAGS = $(DEFINES) $(CDEBUGFLAGS)
|
||||
|
||||
DTINCLUDE = -I/usr/dt/include
|
||||
X11INCLUDE = -I/usr/include
|
||||
|
||||
INCLUDES = $(DTINCLUDE) $(X11INCLUDE)
|
||||
|
||||
DTLIBS = -L/usr/dt/lib -lMrm -lXm
|
||||
X11LIBS = -L/usr/lib -lXt -lX11
|
||||
SYSLIBS =
|
||||
|
||||
LIBRARIES = $(DTLIBS) $(X11LIBS) $(SYSLIBS)
|
||||
LDFLAGS =
|
||||
|
||||
.c.o:
|
||||
$(CC) -c $(CFLAGS) $(INCLUDES) $<
|
||||
|
||||
all:: $(PROGRAM) $(UID)
|
||||
|
||||
$(PROGRAM):: $(OBJECTS)
|
||||
$(CC) -o $(PROGRAM) $(LDFLAGS) $(OBJECTS) $(LIBRARIES)
|
||||
|
||||
$(UID):: $(UILSOURCE)
|
||||
$(UIL) -o $(UID) $(UILSOURCE)
|
||||
|
||||
clean::
|
||||
$(RM) $(PROGRAM) $(OBJECTS) $(UID)
|
|
@ -1,52 +0,0 @@
|
|||
# $XConsortium: Makefile.novell /main/2 1996/05/13 11:55:41 drk $
|
||||
##########################################################################
|
||||
#
|
||||
# Makefile for Motif clipboard examples (Novell)
|
||||
#
|
||||
# (c) Copyright 1993, 1994 Hewlett-Packard Company
|
||||
# (c) Copyright 1993, 1994 International Business Machines Corp.
|
||||
# (c) Copyright 1993, 1994 Sun Microsystems, Inc.
|
||||
# (c) Copyright 1993, 1994 Novell, Inc.
|
||||
#
|
||||
##########################################################################
|
||||
|
||||
CC = cc
|
||||
RM = rm -f
|
||||
UIL = /usr/dt/bin/uil
|
||||
|
||||
PROGRAM = cutpaste
|
||||
SOURCES = cutpaste.c
|
||||
OBJECTS = cutpaste.o
|
||||
UID = cutpaste.uid
|
||||
UILSOURCE = cutpaste.uil
|
||||
|
||||
DEFINES =
|
||||
CDEBUGFLAGS = -O
|
||||
CFLAGS = -Xc $(DEFINES) $(CDEBUGFLAGS)
|
||||
|
||||
DTINCLUDE = -I/usr/dt/include
|
||||
X11INCLUDE = -I/usr/X/include
|
||||
|
||||
INCLUDES = $(DTINCLUDE) $(X11INCLUDE)
|
||||
|
||||
DTLIBS = -L/usr/dt/lib -lMrm -lXm
|
||||
X11LIBS = -L/usr/X/lib -lXt -lX11
|
||||
SYSLIBS = -lw -lgen -lnsl -lresolv -lsocket -lXIM
|
||||
|
||||
LIBRARIES = $(DTLIBS) $(X11LIBS) $(SYSLIBS)
|
||||
LDFLAGS =
|
||||
|
||||
.c.o:
|
||||
$(CC) -c $(CFLAGS) $(INCLUDES) $<
|
||||
|
||||
all:: $(PROGRAM) $(UID)
|
||||
|
||||
$(PROGRAM):: $(OBJECTS)
|
||||
$(CC) -o $(PROGRAM) $(LDFLAGS) $(OBJECTS) $(LIBRARIES)
|
||||
|
||||
$(UID):: $(UILSOURCE)
|
||||
$(UIL) -o $(UID) $(UILSOURCE)
|
||||
|
||||
clean::
|
||||
$(RM) $(PROGRAM) $(OBJECTS) $(UID)
|
||||
|
|
@ -1,51 +0,0 @@
|
|||
# $XConsortium: Makefile.sun /main/2 1996/05/13 11:55:58 drk $
|
||||
##########################################################################
|
||||
#
|
||||
# Makefile for Motif clipboard examples (SUN)
|
||||
#
|
||||
# (c) Copyright 1993, 1994 Hewlett-Packard Company
|
||||
# (c) Copyright 1993, 1994 International Business Machines Corp.
|
||||
# (c) Copyright 1993, 1994 Sun Microsystems, Inc.
|
||||
# (c) Copyright 1993, 1994 Novell, Inc.
|
||||
#
|
||||
##########################################################################
|
||||
|
||||
CC = cc
|
||||
RM = rm -f
|
||||
UIL = /usr/dt/bin/uil
|
||||
|
||||
PROGRAM = cutpaste
|
||||
SOURCES = cutpaste.c
|
||||
OBJECTS = cutpaste.o
|
||||
UID = cutpaste.uid
|
||||
UILSOURCE = cutpaste.uil
|
||||
|
||||
DEFINES =
|
||||
CDEBUGFLAGS = -O
|
||||
CFLAGS = $(DEFINES) $(CDEBUGFLAGS)
|
||||
|
||||
DTINCLUDE = -I/usr/dt/include
|
||||
X11INCLUDE = -I/usr/openwin/include
|
||||
|
||||
INCLUDES = $(DTINCLUDE) $(X11INCLUDE)
|
||||
|
||||
DTLIBS = -L/usr/dt/lib -lMrm -lXm
|
||||
X11LIBS = -L/usr/openwin/lib -lXt -lX11
|
||||
SYSLIBS = -ldl -lw -lgen
|
||||
|
||||
LIBRARIES = $(DTLIBS) $(X11LIBS) $(SYSLIBS)
|
||||
LDFLAGS = -R/usr/dt/lib:/usr/openwin/lib
|
||||
|
||||
.c.o:
|
||||
$(CC) -c $(CFLAGS) $(INCLUDES) $<
|
||||
|
||||
all:: $(PROGRAM) $(UID)
|
||||
|
||||
$(PROGRAM):: $(OBJECTS)
|
||||
$(CC) -o $(PROGRAM) $(LDFLAGS) $(OBJECTS) $(LIBRARIES)
|
||||
|
||||
$(UID):: $(UILSOURCE)
|
||||
$(UIL) -o $(UID) $(UILSOURCE)
|
||||
|
||||
clean::
|
||||
$(RM) $(PROGRAM) $(OBJECTS) $(UID)
|
|
@ -1,53 +0,0 @@
|
|||
# $XConsortium: Makefile.uxp /main/2 1996/05/13 11:56:16 drk $
|
||||
##########################################################################
|
||||
#
|
||||
# Makefile for Motif clipboard examples (UXP)
|
||||
#
|
||||
# (Fujitsu.patch applied)
|
||||
#
|
||||
# (c) Copyright 1993, 1994 Hewlett-Packard Company
|
||||
# (c) Copyright 1993, 1994 International Business Machines Corp.
|
||||
# (c) Copyright 1993, 1994 Sun Microsystems, Inc.
|
||||
# (c) Copyright 1993, 1994 Novell, Inc.
|
||||
#
|
||||
##########################################################################
|
||||
|
||||
CC = cc
|
||||
RM = rm -f
|
||||
UIL = /usr/dt/bin/uil
|
||||
|
||||
PROGRAM = cutpaste
|
||||
SOURCES = cutpaste.c
|
||||
OBJECTS = cutpaste.o
|
||||
UID = cutpaste.uid
|
||||
UILSOURCE = cutpaste.uil
|
||||
|
||||
DEFINES =
|
||||
CDEBUGFLAGS = -O
|
||||
CFLAGS = -Xc $(DEFINES) $(CDEBUGFLAGS)
|
||||
|
||||
DTINCLUDE = -I/usr/dt/include
|
||||
|
||||
INCLUDES = $(DTINCLUDE)
|
||||
|
||||
DTLIBS = -L/usr/dt/lib -lMrm -lXm
|
||||
X11LIBS = -lXt -lX11
|
||||
SYSLIBS = -lw -lgen -lnsl -lresolv -lsocket
|
||||
|
||||
LIBRARIES = $(DTLIBS) $(X11LIBS) $(SYSLIBS)
|
||||
LDFLAGS =
|
||||
|
||||
.c.o:
|
||||
$(CC) -c $(CFLAGS) $(INCLUDES) $<
|
||||
|
||||
all:: $(PROGRAM) $(UID)
|
||||
|
||||
$(PROGRAM):: $(OBJECTS)
|
||||
$(CC) -o $(PROGRAM) $(LDFLAGS) $(OBJECTS) $(LIBRARIES)
|
||||
|
||||
$(UID):: $(UILSOURCE)
|
||||
$(UIL) -o $(UID) $(UILSOURCE)
|
||||
|
||||
clean::
|
||||
$(RM) $(PROGRAM) $(OBJECTS) $(UID)
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
/* $XConsortium: README /main/2 1996/07/15 14:03:37 drk $ */
|
||||
|
||||
This directory contains demonstrations of the Motif Clipboard.
|
||||
|
||||
cutpaste - Examples of cutting and pasting application defined
|
||||
data formats using the XmClipboard API.
|
||||
|
||||
Run two cutpaste clients, and transfer graph values
|
||||
using the pulldown and popup menus.
|
|
@ -1,328 +0,0 @@
|
|||
/*
|
||||
* CDE - Common Desktop Environment
|
||||
*
|
||||
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
|
||||
*
|
||||
* These libraries and programs are free software; you can
|
||||
* redistribute them and/or modify them under the terms of the GNU
|
||||
* Lesser General Public License as published by the Free Software
|
||||
* Foundation; either version 2 of the License, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* These libraries and programs are distributed in the hope that
|
||||
* they will be useful, but WITHOUT ANY WARRANTY; without even the
|
||||
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU Lesser General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with these libraries and programs; if not, write
|
||||
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
|
||||
* Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/* $XConsortium: cutpaste.c /main/4 1995/10/27 10:41:39 rswiston $ */
|
||||
/*
|
||||
* (c) Copyright 1989, 1990, 1991, 1992 OPEN SOFTWARE FOUNDATION, INC.
|
||||
* ALL RIGHTS RESERVED
|
||||
*/
|
||||
/*
|
||||
* Motif Release 1.2
|
||||
*/
|
||||
|
||||
/******************************************************************************
|
||||
* cutpaste.c
|
||||
*
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <Xm/Xm.h>
|
||||
#include <Xm/CutPaste.h>
|
||||
#include <Mrm/MrmPublic.h>
|
||||
|
||||
|
||||
static Boolean CopyToClipboard(
|
||||
Time time);
|
||||
static Boolean PasteClipboard(
|
||||
Time time );
|
||||
static void PopupHandler(
|
||||
Widget w,
|
||||
Widget pw,
|
||||
XEvent *event,
|
||||
Boolean *ctd );
|
||||
static void ManageCb(
|
||||
Widget w,
|
||||
String id,
|
||||
XtPointer cb );
|
||||
static void InitPopupCb(
|
||||
Widget w,
|
||||
String id,
|
||||
XtPointer cb );
|
||||
static void CutCb(
|
||||
Widget w,
|
||||
XtPointer cd,
|
||||
XmPushButtonCallbackStruct *cb );
|
||||
static void CopyCb(
|
||||
Widget w,
|
||||
XtPointer cd,
|
||||
XmPushButtonCallbackStruct *cb );
|
||||
static void PasteCb(
|
||||
Widget w,
|
||||
XtPointer cd,
|
||||
XmPushButtonCallbackStruct *cb );
|
||||
static void ExitCb(
|
||||
Widget w,
|
||||
XtPointer cd,
|
||||
XtPointer cb );
|
||||
|
||||
|
||||
static MrmHierarchy mrm_id;
|
||||
static char *mrm_vec[]={"cutpaste.uid"};
|
||||
static MrmCode mrm_class;
|
||||
static MRMRegisterArg mrm_names[] = {
|
||||
{"InitPopupCb", (XtPointer)InitPopupCb },
|
||||
{"ManageCb", (XtPointer)ManageCb },
|
||||
{"CutCb", (XtPointer)CutCb },
|
||||
{"CopyCb", (XtPointer)CopyCb },
|
||||
{"PasteCb", (XtPointer)PasteCb },
|
||||
{"ExitCb", (XtPointer)ExitCb }
|
||||
};
|
||||
|
||||
#define GraphFormat "MY_GRAPH_DATA"
|
||||
|
||||
#define MIN(x,y) ((x) > (y) ? (y) : (x))
|
||||
|
||||
static XtAppContext appContext;
|
||||
static Widget shell;
|
||||
static Widget *bars;
|
||||
static Cardinal nbars;
|
||||
|
||||
int
|
||||
main(
|
||||
int argc,
|
||||
char *argv[] )
|
||||
{
|
||||
Widget app_main;
|
||||
Display *display;
|
||||
Arg args[2];
|
||||
Widget *children;
|
||||
|
||||
XtToolkitInitialize();
|
||||
MrmInitialize ();
|
||||
appContext = XtCreateApplicationContext();
|
||||
display = XtOpenDisplay(appContext, NULL, argv[0], "Cutpaste",
|
||||
NULL, 0, &argc, argv);
|
||||
if (display == NULL) {
|
||||
fprintf(stderr, "%s: Can't open display\n", argv[0]);
|
||||
exit(1);
|
||||
}
|
||||
shell = XtAppCreateShell(argv[0], NULL, applicationShellWidgetClass,
|
||||
display, NULL, 0);
|
||||
if (MrmOpenHierarchy (1, mrm_vec, NULL, &mrm_id) != MrmSUCCESS) exit(0);
|
||||
MrmRegisterNames(mrm_names, XtNumber(mrm_names));
|
||||
MrmFetchWidget (mrm_id, "appMain", shell, &app_main, &mrm_class);
|
||||
XtManageChild(app_main);
|
||||
|
||||
/* define graph data format */
|
||||
|
||||
while (XmClipboardRegisterFormat (display, GraphFormat, 32) ==
|
||||
XmClipboardLocked) { }
|
||||
|
||||
XtSetArg (args[0], XmNchildren, &children);
|
||||
XtSetArg (args[1], XmNnumChildren, &nbars);
|
||||
XtGetValues (XtNameToWidget (shell, "*graphForm"), args, 2);
|
||||
bars = (Widget *) XtMalloc (nbars * sizeof(Widget));
|
||||
memcpy (bars, children, nbars * sizeof(Widget));
|
||||
|
||||
XtRealizeWidget(shell);
|
||||
|
||||
XtAppMainLoop(appContext);
|
||||
}
|
||||
|
||||
static void
|
||||
ManageCb(
|
||||
Widget w,
|
||||
String id,
|
||||
XtPointer cb )
|
||||
|
||||
{
|
||||
XtManageChild (XtNameToWidget (shell, id));
|
||||
}
|
||||
|
||||
static void
|
||||
ExitCb(
|
||||
Widget w,
|
||||
XtPointer cd,
|
||||
XtPointer cb )
|
||||
{
|
||||
exit(0);
|
||||
}
|
||||
|
||||
/*****************************************************************
|
||||
*
|
||||
* PopupMenu support
|
||||
*
|
||||
*****************************************************************/
|
||||
|
||||
static void
|
||||
InitPopupCb(
|
||||
Widget w,
|
||||
String id,
|
||||
XtPointer cb )
|
||||
{
|
||||
Widget popupWindow = XtNameToWidget (shell, id);
|
||||
|
||||
XtAddEventHandler (popupWindow, ButtonPressMask, False,
|
||||
(XtEventHandler)PopupHandler, (XtPointer) w);
|
||||
}
|
||||
|
||||
static void
|
||||
PopupHandler (
|
||||
Widget w,
|
||||
Widget pw,
|
||||
XEvent *event,
|
||||
Boolean *ctd )
|
||||
{
|
||||
if (((XButtonEvent *)event)->button != Button3) return;
|
||||
|
||||
XmMenuPosition((Widget) pw, (XButtonEvent *)event);
|
||||
XtManageChild ((Widget) pw);
|
||||
}
|
||||
|
||||
/*****************************************************************
|
||||
*
|
||||
* Clipboard support
|
||||
*
|
||||
*****************************************************************/
|
||||
|
||||
static void
|
||||
CutCb(
|
||||
Widget w,
|
||||
XtPointer cd,
|
||||
XmPushButtonCallbackStruct *cb )
|
||||
{
|
||||
XButtonEvent *be = (XButtonEvent *)cb->event;
|
||||
Arg args[1];
|
||||
int i;
|
||||
|
||||
if (CopyToClipboard(be->time) == True) {
|
||||
|
||||
/* clear graph data */
|
||||
|
||||
XtSetArg (args[0], XmNvalue, 0);
|
||||
for (i=0; i < nbars; i++)
|
||||
XtSetValues (bars[i], args, 1);
|
||||
}
|
||||
else {
|
||||
XBell (XtDisplay(w), 0);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
CopyCb(
|
||||
Widget w,
|
||||
XtPointer cd,
|
||||
XmPushButtonCallbackStruct *cb )
|
||||
{
|
||||
XButtonEvent *be = (XButtonEvent *)cb->event;
|
||||
|
||||
if (CopyToClipboard(be->time) != True) {
|
||||
XBell (XtDisplay(w), 0);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
PasteCb(
|
||||
Widget w,
|
||||
XtPointer cd,
|
||||
XmPushButtonCallbackStruct *cb )
|
||||
{
|
||||
XButtonEvent *be = (XButtonEvent *)cb->event;
|
||||
|
||||
if (PasteClipboard(be->time) != True) {
|
||||
XBell (XtDisplay(w), 0);
|
||||
}
|
||||
}
|
||||
|
||||
static Boolean
|
||||
CopyToClipboard(
|
||||
Time time )
|
||||
{
|
||||
Display *dpy = XtDisplay (shell);
|
||||
Window window = XtWindow (shell);
|
||||
long itemId = 0;
|
||||
XmString clipLabel;
|
||||
long *graphData;
|
||||
int value;
|
||||
int i;
|
||||
Arg args[1];
|
||||
|
||||
if (XmClipboardLock (dpy, window) == XmClipboardLocked)
|
||||
return (False);
|
||||
|
||||
clipLabel = XmStringCreateLtoR ("cutpaste", XmFONTLIST_DEFAULT_TAG);
|
||||
|
||||
XmClipboardStartCopy ( dpy, window, clipLabel, time, NULL, NULL, &itemId);
|
||||
|
||||
/* copy graph data */
|
||||
|
||||
graphData = (long *)XtMalloc (nbars * sizeof (long));
|
||||
XtSetArg (args[0], XmNvalue, &value);
|
||||
for (i=0; i < nbars; i++) {
|
||||
XtGetValues (bars[i], args, 1);
|
||||
graphData[i] = (long)value;
|
||||
}
|
||||
|
||||
XmClipboardCopy (dpy, window, itemId, GraphFormat, (XtPointer)graphData,
|
||||
(nbars * sizeof(long)), 0, NULL);
|
||||
|
||||
XmClipboardEndCopy (dpy, window, itemId);
|
||||
|
||||
XmClipboardUnlock (dpy, window, False);
|
||||
|
||||
XtFree ((char *)clipLabel);
|
||||
XtFree ((char *)graphData);
|
||||
|
||||
return (True);
|
||||
}
|
||||
|
||||
static Boolean
|
||||
PasteClipboard(
|
||||
Time time )
|
||||
{
|
||||
Display *dpy = XtDisplay (shell);
|
||||
Window window = XtWindow (shell);
|
||||
unsigned long length = 0;
|
||||
long *graphData;
|
||||
int i;
|
||||
int setBars;
|
||||
Arg args[1];
|
||||
|
||||
if (XmClipboardStartRetrieve (dpy, window, time) == XmClipboardLocked)
|
||||
return (False);
|
||||
|
||||
XmClipboardInquireLength(dpy, window, GraphFormat, &length);
|
||||
|
||||
if (length == 0) {
|
||||
XmClipboardEndRetrieve (dpy, window);
|
||||
return (False);
|
||||
}
|
||||
|
||||
graphData = (long *)XtMalloc (length * sizeof (long));
|
||||
|
||||
XmClipboardRetrieve(dpy, window, GraphFormat, graphData, length,
|
||||
NULL, NULL);
|
||||
|
||||
XmClipboardEndRetrieve(dpy, window);
|
||||
|
||||
setBars = MIN (nbars, length);
|
||||
for (i = 0; i < setBars; i++) {
|
||||
XtSetArg (args[0], XmNvalue, graphData[i]);
|
||||
XtSetValues (bars[i], args, 1);
|
||||
}
|
||||
|
||||
XtFree ((char *)graphData);
|
||||
|
||||
return (True);
|
||||
}
|
||||
|
|
@ -1,293 +0,0 @@
|
|||
! (c) Copyright 1989, 1990, 1991, 1992, 1993 OPEN SOFTWARE FOUNDATION, INC.
|
||||
! ALL RIGHTS RESERVED
|
||||
!
|
||||
! Motif Release 1.2.2
|
||||
|
||||
|
||||
module cutpaste
|
||||
version = 'v1.2'
|
||||
names = case_sensitive
|
||||
character_set=iso_latin1
|
||||
objects = {
|
||||
XmLabel = widget;
|
||||
XmPushButton = widget;
|
||||
XmToggleButton = widget;
|
||||
XmCascadeButton = widget;
|
||||
XmSeparator = widget;
|
||||
}
|
||||
|
||||
include file ("cutpaste_local.uil");
|
||||
|
||||
procedure
|
||||
InitPopupCb(string);
|
||||
ManageCb(string);
|
||||
CutCb();
|
||||
CopyCb();
|
||||
PasteCb();
|
||||
ExitCb();
|
||||
|
||||
list scrollArgs : arguments {
|
||||
XmNleftAttachment = XmATTACH_POSITION;
|
||||
XmNrightAttachment = XmATTACH_POSITION;
|
||||
XmNtopAttachment = XmATTACH_FORM;
|
||||
XmNbottomAttachment = XmATTACH_FORM;
|
||||
XmNshowArrows = false;
|
||||
XmNsliderSize = 5;
|
||||
XmNtraversalOn = true;
|
||||
XmNhighlightThickness = 1;
|
||||
XmNprocessingDirection = XmMAX_ON_TOP;
|
||||
};
|
||||
|
||||
|
||||
!
|
||||
! Main window
|
||||
!
|
||||
object appMain : XmMainWindow {
|
||||
arguments {
|
||||
XmNmenuBar = XmMenuBar menuBar;
|
||||
};
|
||||
controls {
|
||||
XmMenuBar menuBar;
|
||||
XmFrame workArea;
|
||||
unmanaged XmInformationDialog helpDialog;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
!
|
||||
! Menu bar and pulldown menus
|
||||
!
|
||||
|
||||
object menuBar : XmMenuBar {
|
||||
arguments {
|
||||
XmNmenuHelpWidget = XmCascadeButton helpCascade;
|
||||
};
|
||||
controls {
|
||||
XmCascadeButton fileCascade;
|
||||
XmCascadeButton editCascade;
|
||||
XmCascadeButton helpCascade;
|
||||
};
|
||||
};
|
||||
|
||||
object fileCascade : XmCascadeButton {
|
||||
arguments {
|
||||
XmNlabelString = fileCascadeText;
|
||||
XmNmnemonic = keysym(fileCascadeMnem);
|
||||
};
|
||||
controls { XmPulldownMenu {
|
||||
! arguments { XmNtearOffModel = XmTEAR_OFF_ENABLED; };
|
||||
controls {
|
||||
XmPushButton exitButton;
|
||||
}; };
|
||||
};
|
||||
};
|
||||
|
||||
object exitButton : XmPushButton {
|
||||
arguments {
|
||||
XmNlabelString = exitButtonText;
|
||||
XmNmnemonic = keysym(exitButtonMnem);
|
||||
};
|
||||
callbacks { XmNactivateCallback = procedure ExitCb(); };
|
||||
};
|
||||
object editCascade : XmCascadeButton {
|
||||
arguments {
|
||||
XmNlabelString = editCascadeText;
|
||||
XmNmnemonic = keysym(editCascadeMnem);
|
||||
};
|
||||
controls { XmPulldownMenu {
|
||||
arguments { XmNtearOffModel = XmTEAR_OFF_ENABLED; };
|
||||
controls {
|
||||
XmPushButton cutButton;
|
||||
XmPushButton copyButton;
|
||||
XmPushButton pasteButton;
|
||||
}; };
|
||||
};
|
||||
};
|
||||
|
||||
object helpCascade : XmCascadeButton {
|
||||
arguments {
|
||||
XmNlabelString = helpCascadeText;
|
||||
XmNmnemonic = keysym(helpCascadeMnem);
|
||||
};
|
||||
controls { XmPulldownMenu {
|
||||
arguments { XmNtearOffModel = XmTEAR_OFF_ENABLED; };
|
||||
controls {
|
||||
XmPushButton helpButton;
|
||||
}; };
|
||||
};
|
||||
};
|
||||
object helpButton : XmPushButton {
|
||||
arguments {
|
||||
XmNlabelString = helpButtonText;
|
||||
XmNmnemonic = keysym(helpButtonMnem);
|
||||
};
|
||||
callbacks { XmNactivateCallback = procedure ManageCb("*helpDialog"); };
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
!
|
||||
! Popup menu
|
||||
!
|
||||
|
||||
object popupMenu : XmPopupMenu {
|
||||
arguments { XmNtearOffModel = XmTEAR_OFF_ENABLED; };
|
||||
controls {
|
||||
XmLabel { arguments { XmNlabelString = popupTitleText; }; };
|
||||
XmSeparator { arguments { XmNseparatorType = XmDOUBLE_LINE; }; };
|
||||
XmPushButton cutButton;
|
||||
XmPushButton copyButton;
|
||||
XmPushButton pasteButton;
|
||||
};
|
||||
callbacks {
|
||||
MrmNcreateCallback = procedure InitPopupCb("*displayArea");
|
||||
};
|
||||
};
|
||||
|
||||
object cutButton : XmPushButton {
|
||||
arguments {
|
||||
XmNlabelString = menuCutText;
|
||||
XmNmnemonic = keysym(menuCutMnem);
|
||||
};
|
||||
callbacks { XmNactivateCallback = procedure CutCb(); };
|
||||
};
|
||||
object copyButton : XmPushButton {
|
||||
arguments {
|
||||
XmNlabelString = menuCopyText;
|
||||
XmNmnemonic = keysym(menuCopyMnem);
|
||||
};
|
||||
callbacks { XmNactivateCallback = procedure CopyCb(); };
|
||||
};
|
||||
object pasteButton : XmPushButton {
|
||||
arguments {
|
||||
XmNlabelString = menuPasteText;
|
||||
XmNmnemonic = keysym(menuPasteMnem);
|
||||
};
|
||||
callbacks { XmNactivateCallback = procedure PasteCb(); };
|
||||
};
|
||||
|
||||
|
||||
!
|
||||
! Work area
|
||||
!
|
||||
|
||||
object workArea : XmFrame {
|
||||
arguments {
|
||||
XmNmarginWidth = 20;
|
||||
XmNmarginHeight = 20;
|
||||
};
|
||||
controls { XmFrame displayArea; };
|
||||
};
|
||||
|
||||
object displayArea : XmFrame {
|
||||
arguments {
|
||||
XmNmarginWidth = 10;
|
||||
XmNmarginHeight = 10;
|
||||
XmNshadowType = XmSHADOW_OUT;
|
||||
XmNshadowThickness = 1;
|
||||
};
|
||||
controls {
|
||||
XmLabel graphLabel;
|
||||
XmForm graphForm;
|
||||
unmanaged XmPopupMenu popupMenu;
|
||||
};
|
||||
};
|
||||
|
||||
object graphLabel : XmLabel {
|
||||
arguments {
|
||||
XmNchildType = XmFRAME_TITLE_CHILD;
|
||||
XmNchildHorizontalAlignment = XmALIGNMENT_END;
|
||||
XmNlabelString = graphLabelText;
|
||||
};
|
||||
};
|
||||
|
||||
object graphForm : XmForm {
|
||||
arguments {
|
||||
XmNfractionBase = 15;
|
||||
};
|
||||
controls {
|
||||
XmScrollBar { arguments {
|
||||
arguments scrollArgs;
|
||||
XmNleftPosition = 0; XmNrightPosition = 1;
|
||||
}; };
|
||||
XmScrollBar { arguments {
|
||||
arguments scrollArgs;
|
||||
XmNleftPosition = 1; XmNrightPosition = 2;
|
||||
}; };
|
||||
XmScrollBar { arguments {
|
||||
arguments scrollArgs;
|
||||
XmNleftPosition = 2; XmNrightPosition = 3;
|
||||
}; };
|
||||
XmScrollBar { arguments {
|
||||
arguments scrollArgs;
|
||||
XmNleftPosition = 3; XmNrightPosition = 4;
|
||||
}; };
|
||||
XmScrollBar { arguments {
|
||||
arguments scrollArgs;
|
||||
XmNleftPosition = 4; XmNrightPosition = 5;
|
||||
}; };
|
||||
XmScrollBar { arguments {
|
||||
arguments scrollArgs;
|
||||
XmNleftPosition = 5; XmNrightPosition = 6;
|
||||
}; };
|
||||
XmScrollBar { arguments {
|
||||
arguments scrollArgs;
|
||||
XmNleftPosition = 6; XmNrightPosition = 7;
|
||||
}; };
|
||||
XmScrollBar { arguments {
|
||||
arguments scrollArgs;
|
||||
XmNleftPosition = 7; XmNrightPosition = 8;
|
||||
}; };
|
||||
XmScrollBar { arguments {
|
||||
arguments scrollArgs;
|
||||
XmNleftPosition = 8; XmNrightPosition = 9;
|
||||
}; };
|
||||
XmScrollBar { arguments {
|
||||
arguments scrollArgs;
|
||||
XmNleftPosition = 9; XmNrightPosition = 10;
|
||||
}; };
|
||||
XmScrollBar { arguments {
|
||||
arguments scrollArgs;
|
||||
XmNleftPosition = 10; XmNrightPosition = 11;
|
||||
}; };
|
||||
XmScrollBar { arguments {
|
||||
arguments scrollArgs;
|
||||
XmNleftPosition = 11; XmNrightPosition = 12;
|
||||
}; };
|
||||
XmScrollBar { arguments {
|
||||
arguments scrollArgs;
|
||||
XmNleftPosition = 12; XmNrightPosition = 13;
|
||||
}; };
|
||||
XmScrollBar { arguments {
|
||||
arguments scrollArgs;
|
||||
XmNleftPosition = 13; XmNrightPosition = 14;
|
||||
}; };
|
||||
XmScrollBar { arguments {
|
||||
arguments scrollArgs;
|
||||
XmNleftPosition = 14; XmNrightPosition = 15;
|
||||
}; };
|
||||
};
|
||||
};
|
||||
|
||||
!
|
||||
! Help dialog
|
||||
!
|
||||
|
||||
object helpDialog : XmInformationDialog {
|
||||
arguments {
|
||||
XmNdialogTitle = helpTitleText;
|
||||
XmNcancelLabelString = helpCancelText;
|
||||
XmNmessageString = helpMessageText;
|
||||
};
|
||||
controls {
|
||||
Xm_OK unmanaged { };
|
||||
Xm_Help unmanaged { };
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
|
||||
end module;
|
|
@ -1,62 +0,0 @@
|
|||
! (c) Copyright 1989, 1990, 1991, 1992 OPEN SOFTWARE FOUNDATION, INC.
|
||||
! ALL RIGHTS RESERVED
|
||||
!
|
||||
! Motif Release 1.2
|
||||
|
||||
! Main Window
|
||||
|
||||
! Menu bar
|
||||
|
||||
value
|
||||
|
||||
fileCascadeText : "File";
|
||||
fileCascadeMnem : "F";
|
||||
exitButtonText : "Exit";
|
||||
exitButtonMnem : "E";
|
||||
|
||||
editCascadeText : "Edit";
|
||||
editCascadeMnem : "E";
|
||||
|
||||
menuCutText : "Cut";
|
||||
menuCutMnem : "t";
|
||||
menuCopyText : "Copy";
|
||||
menuCopyMnem : "C";
|
||||
menuPasteText : "Paste";
|
||||
menuPasteMnem : "P";
|
||||
|
||||
helpCascadeText : "Help";
|
||||
helpCascadeMnem : "H";
|
||||
helpButtonText : "Overiew";
|
||||
helpButtonMnem : "O";
|
||||
|
||||
! work area
|
||||
|
||||
graphLabelText : "Distribution";
|
||||
|
||||
! Help dialog
|
||||
|
||||
helpTitleText : "cutpaste";
|
||||
helpCancelText : "Dismiss";
|
||||
helpMessageText :
|
||||
compound_string ("cutpaste", separate=true) &
|
||||
compound_string ("", separate=true) &
|
||||
compound_string ("Set graph slider values.", separate=true) &
|
||||
compound_string ("", separate=true) &
|
||||
compound_string ("Copy graph values between ") &
|
||||
compound_string ("cutpaste clients", separate=true) &
|
||||
compound_string ("using popup and pulldown menu commands.") &
|
||||
compound_string ("", separate=true) &
|
||||
compound_string ("");
|
||||
|
||||
! Popup menu
|
||||
|
||||
popupTitleText : "Edit";
|
||||
popupCutText : "Cut";
|
||||
popupCutMnem : "t";
|
||||
popupCopyText : "Copy";
|
||||
popupCopyMnem : "C";
|
||||
popupPasteText : "Paste";
|
||||
popupPasteMnem : "P";
|
||||
|
||||
|
||||
|
|
@ -1,523 +0,0 @@
|
|||
/*
|
||||
* CDE - Common Desktop Environment
|
||||
*
|
||||
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
|
||||
*
|
||||
* These libraries and programs are free software; you can
|
||||
* redistribute them and/or modify them under the terms of the GNU
|
||||
* Lesser General Public License as published by the Free Software
|
||||
* Foundation; either version 2 of the License, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* These libraries and programs are distributed in the hope that
|
||||
* they will be useful, but WITHOUT ANY WARRANTY; without even the
|
||||
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU Lesser General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with these libraries and programs; if not, write
|
||||
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
|
||||
* Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/*
|
||||
* (c) Copyright 1989, 1990, 1991, 1992 OPEN SOFTWARE FOUNDATION, INC.
|
||||
* ALL RIGHTS RESERVED
|
||||
*/
|
||||
/*
|
||||
* Motif Release 1.2
|
||||
*/
|
||||
#ifdef REV_INFO
|
||||
#ifndef lint
|
||||
static char rcsid[] = "$XConsortium: Dog.c /main/4 1995/10/27 10:41:52 rswiston $"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/*****************************************************************************
|
||||
*
|
||||
* Dog.c - Dog widget source file
|
||||
*
|
||||
******************************************************************************/
|
||||
#include <stdio.h>
|
||||
#include <X11/StringDefs.h>
|
||||
#include <Xm/Xm.h>
|
||||
#include <Mrm/MrmPublic.h>
|
||||
#include "DogP.h"
|
||||
|
||||
#include "up.bm"
|
||||
#include "down.bm"
|
||||
#include "bark.bm"
|
||||
|
||||
#ifndef MAX
|
||||
#define MAX(x,y) ((x) > (y) ? (x) : (y))
|
||||
#endif
|
||||
|
||||
#define WagTime(w) XmField(w,offsets,Dog,wag_time, int)
|
||||
#define BarkTime(w) XmField(w,offsets,Dog,bark_time, int)
|
||||
#define BarkCallback(w) XmField(w,offsets,Dog,bark_callback,XtCallbackList)
|
||||
#define UpPixmap(w) XmField(w,offsets,Dog,up_pixmap,Pixmap)
|
||||
#define DownPixmap(w) XmField(w,offsets,Dog,down_pixmap,Pixmap)
|
||||
#define BarkPixmap(w) XmField(w,offsets,Dog,bark_pixmap,Pixmap)
|
||||
#define CurrPixmap(w) XmField(w,offsets,Dog,curr_pixmap,Pixmap)
|
||||
#define CurrPx(w) XmField(w,offsets,Dog,curr_px,int)
|
||||
#define Wagging(w) XmField(w,offsets,Dog,wagging,Boolean)
|
||||
#define Barking(w) XmField(w,offsets,Dog,barking,Boolean)
|
||||
#define DrawGC(w) XmField(w,offsets,Dog,draw_GC,GC)
|
||||
#define PixmapX(w) XmField(w,offsets,Dog,pixmap_x,Position)
|
||||
#define PixmapY(w) XmField(w,offsets,Dog,pixmap_y,Position)
|
||||
#define DrawX(w) XmField(w,offsets,Dog,draw_x,Position)
|
||||
#define DrawY(w) XmField(w,offsets,Dog,draw_y,Position)
|
||||
#define DrawWidth(w) XmField(w,offsets,Dog,draw_width,Dimension)
|
||||
#define DrawHeight(w) XmField(w,offsets,Dog,draw_height,Dimension)
|
||||
#define CurrWidth(w) XmField(w,offsets,Dog,curr_width,Dimension)
|
||||
#define CurrHeight(w) XmField(w,offsets,Dog,curr_height,Dimension)
|
||||
#define HighlightThickness(w) \
|
||||
XmField(w,offsets,XmPrimitive,highlight_thickness,Dimension)
|
||||
#define ShadowThickness(w) \
|
||||
XmField(w,offsets,XmPrimitive,shadow_thickness,Dimension)
|
||||
#define Foreground(w) XmField(w,offsets,XmPrimitive,foreground,Pixel)
|
||||
#define Highlighted(w) XmField(w,offsets,XmPrimitive,highlighted,Boolean)
|
||||
#define TopShadowGC(w) XmField(w,offsets,XmPrimitive,top_shadow_GC,GC)
|
||||
#define BottomShadowGC(w) XmField(w,offsets,XmPrimitive,bottom_shadow_GC,GC)
|
||||
#define BackgroundPixel(w) XmField(w,offsets,Core,background_pixel,Pixel)
|
||||
#define Width(w) XmField(w,offsets,Core,width,Dimension)
|
||||
#define Height(w) XmField(w,offsets,Core,height,Dimension)
|
||||
|
||||
#define SetPixmap(w, px, pixmap, width, height) \
|
||||
CurrPx(w) = px; CurrPixmap(w) = pixmap; \
|
||||
CurrWidth(w) = width; CurrHeight(w) = height
|
||||
|
||||
#define MakePixmap(b,wd,ht) \
|
||||
XCreatePixmapFromBitmapData(XtDisplay(w),RootWindowOfScreen(XtScreen(w)), \
|
||||
(char*)(b), (wd), (ht), Foreground(w), BackgroundPixel(w), \
|
||||
DefaultDepthOfScreen(XtScreen(w)))
|
||||
|
||||
static void ClassInitialize();
|
||||
static void Initialize();
|
||||
static void Redisplay();
|
||||
static void Resize();
|
||||
static void Destroy();
|
||||
static Boolean SetValues();
|
||||
static XtGeometryResult QueryGeometry();
|
||||
|
||||
static void bark_dog();
|
||||
static void end_bark();
|
||||
static void start_wag();
|
||||
static void stop_wag();
|
||||
static void do_wag();
|
||||
|
||||
static char defaultTranslations[] =
|
||||
"<Btn1Down>: Bark()\n\
|
||||
~Shift<Btn2Down>: StartWag()\n\
|
||||
Shift<Btn2Down>: StopWag()\n\
|
||||
<Key>Return: Bark()\n\
|
||||
Ctrl <Key>Return: Bark()\n\
|
||||
<Key>osfActivate: Bark()\n\
|
||||
<Key>space: Bark()\n\
|
||||
Ctrl <Key>space: Bark()\n\
|
||||
<Key>osfSelect: Bark()\n\
|
||||
<Key>W: StartWag()\n\
|
||||
<Key>S: StopWag()\n\
|
||||
<Key>osfHelp: PrimitiveHelp()";
|
||||
|
||||
static XtActionsRec actionsList[] = {
|
||||
{ "Bark", (XtActionProc) bark_dog},
|
||||
{ "StartWag", (XtActionProc) start_wag},
|
||||
{ "StopWag", (XtActionProc) stop_wag}
|
||||
};
|
||||
|
||||
static XmPartResource resources[] = {
|
||||
{DogNwagTime, DogCWagTime, XtRInt, sizeof(int),
|
||||
XmPartOffset(Dog,wag_time), XmRImmediate, (XtPointer)100},
|
||||
{DogNbarkTime, DogCBarkTime, XtRInt, sizeof(int),
|
||||
XmPartOffset(Dog,bark_time), XmRImmediate, (XtPointer)1000},
|
||||
{DogNbarkCallback, XtCCallback, XtRCallback, sizeof(XtPointer),
|
||||
XmPartOffset(Dog,bark_callback), XtRCallback, NULL}
|
||||
};
|
||||
|
||||
DogClassRec dogClassRec = {
|
||||
{ /* core_class fields */
|
||||
(WidgetClass) &xmPrimitiveClassRec, /* superclass */
|
||||
"Dog", /* class_name */
|
||||
sizeof(DogPart), /* widget_size */
|
||||
ClassInitialize, /* class_initialize */
|
||||
NULL, /* class_part_initialize*/
|
||||
False, /* class_inited */
|
||||
Initialize, /* initialize */
|
||||
NULL, /* initialize_notify */
|
||||
XtInheritRealize, /* realize */
|
||||
actionsList, /* actions */
|
||||
XtNumber(actionsList), /* num_actions */
|
||||
(XtResourceList)resources, /* resources */
|
||||
XtNumber(resources), /* num_resources */
|
||||
NULLQUARK, /* xrm_class */
|
||||
True, /* compress_motion */
|
||||
True, /* compress_exposure */
|
||||
True, /* compress_enterleave */
|
||||
False, /* visible_interest */
|
||||
Destroy, /* destroy */
|
||||
Resize, /* resize */
|
||||
Redisplay, /* expose */
|
||||
SetValues, /* set_values */
|
||||
NULL, /* set_values_hook */
|
||||
XtInheritSetValuesAlmost, /* set_values_almost */
|
||||
NULL, /* get_values_hook */
|
||||
NULL, /* accept_focus */
|
||||
XtVersionDontCheck, /* version */
|
||||
NULL, /* callback_private */
|
||||
defaultTranslations, /* tm_table */
|
||||
QueryGeometry, /* query_geometry */
|
||||
NULL, /* disp accelerator */
|
||||
NULL /* extension */
|
||||
},
|
||||
{ /* primitive_class record */
|
||||
XmInheritWidgetProc, /* border_highlight */
|
||||
XmInheritWidgetProc, /* border_unhighlight */
|
||||
XtInheritTranslations, /* translations */
|
||||
bark_dog, /* arm_and_activate */
|
||||
NULL, /* syn resources */
|
||||
0, /* num syn_resources */
|
||||
NULL, /* extension */
|
||||
},
|
||||
{ /* dog_class record */
|
||||
NULL, /* extension */
|
||||
}
|
||||
};
|
||||
|
||||
externaldef(dogwidgetclass) WidgetClass dogWidgetClass =
|
||||
(WidgetClass) &dogClassRec;
|
||||
|
||||
static XmOffsetPtr offsets; /* Part Offset table for XmResolvePartOffsets */
|
||||
|
||||
/**********************************************************************
|
||||
*
|
||||
* DogCreate - Convenience routine, used by Uil/Mrm.
|
||||
*
|
||||
*********************************************************************/
|
||||
|
||||
Widget DogCreate(parent, name, arglist, nargs)
|
||||
Widget parent;
|
||||
char *name;
|
||||
Arg *arglist;
|
||||
int nargs;
|
||||
{
|
||||
return(XtCreateWidget (name, dogWidgetClass, parent, arglist, nargs));
|
||||
}
|
||||
|
||||
/**********************************************************************
|
||||
*
|
||||
* DogMrmInitialize - register Dog widget class with Mrm
|
||||
*
|
||||
*********************************************************************/
|
||||
|
||||
int DogMrmInitialize()
|
||||
{
|
||||
return(MrmRegisterClass (MrmwcUnknown, "Dog" , "DogCreate", DogCreate,
|
||||
(WidgetClass)&dogClassRec));
|
||||
}
|
||||
|
||||
/**********************************************************************
|
||||
*
|
||||
* _DogDrawPixmap - draw the current pixmap
|
||||
*
|
||||
*********************************************************************/
|
||||
|
||||
void _DogDrawPixmap(w)
|
||||
DogWidget w;
|
||||
{
|
||||
if (XtIsRealized(w)) {
|
||||
XCopyArea(XtDisplay(w),CurrPixmap(w),
|
||||
XtWindow(w),DrawGC(w),
|
||||
PixmapX(w), PixmapY(w),
|
||||
DrawWidth(w), DrawHeight(w),
|
||||
DrawX(w), DrawY(w));
|
||||
}
|
||||
}
|
||||
|
||||
/**********************************************************************
|
||||
*
|
||||
* _DogPosition(w) - position the current pixmap
|
||||
*
|
||||
*********************************************************************/
|
||||
|
||||
void _DogPosition(w)
|
||||
DogWidget w;
|
||||
{
|
||||
Dimension margin = ShadowThickness(w) + HighlightThickness(w);
|
||||
|
||||
if (CurrWidth(w) < MAX(Width(w) - 2u * margin,0)) {
|
||||
PixmapX(w) = 0;
|
||||
DrawX(w) = Width(w)/2 - CurrWidth(w)/2;
|
||||
DrawWidth(w) = CurrWidth(w);
|
||||
}
|
||||
else {
|
||||
PixmapX(w) = (CurrWidth(w) - (Width(w) - 2 * margin))/2u;
|
||||
DrawX(w) = margin;
|
||||
DrawWidth(w) = Width(w) - 2 * margin;
|
||||
}
|
||||
|
||||
if (CurrHeight(w) < MAX(Height(w) - 2u * margin,0)) {
|
||||
PixmapY(w)= 0;
|
||||
DrawY(w) = Height(w)/2 - CurrHeight(w)/2;
|
||||
DrawHeight(w) = CurrHeight(w);
|
||||
}
|
||||
else {
|
||||
PixmapY(w) = (CurrHeight(w) - (Height(w) - 2 * margin))/2u;
|
||||
DrawY(w) = margin;
|
||||
DrawHeight(w) = Height(w) - 2 * margin;
|
||||
}
|
||||
}
|
||||
|
||||
/**********************************************************************
|
||||
*
|
||||
* Class methods
|
||||
*
|
||||
*********************************************************************/
|
||||
|
||||
static void ClassInitialize()
|
||||
{
|
||||
XmResolvePartOffsets(dogWidgetClass, &offsets);
|
||||
}
|
||||
|
||||
|
||||
static create_GC(w)
|
||||
DogWidget w;
|
||||
{
|
||||
XGCValues values;
|
||||
XtGCMask valueMask;
|
||||
|
||||
valueMask = GCForeground | GCBackground | GCGraphicsExposures;
|
||||
values.foreground = Foreground(w);
|
||||
values.background = BackgroundPixel(w);
|
||||
values.graphics_exposures = False;
|
||||
DrawGC(w) = XtGetGC((Widget)w,valueMask,&values);
|
||||
}
|
||||
|
||||
static create_pixmaps(w)
|
||||
DogWidget w;
|
||||
{
|
||||
UpPixmap(w) = MakePixmap(up_bits, up_width, up_height);
|
||||
DownPixmap(w) = MakePixmap(down_bits, down_width, down_height);
|
||||
BarkPixmap(w) = MakePixmap(bark_bits, bark_width, bark_height);
|
||||
}
|
||||
|
||||
static void Initialize(request, new)
|
||||
DogWidget request;
|
||||
DogWidget new;
|
||||
{
|
||||
if (Width(request) == 0)
|
||||
Width(new) = MAX(MAX(up_width, down_width),bark_width) +
|
||||
2*(ShadowThickness(new)+HighlightThickness(new));
|
||||
if (Height(request) == 0)
|
||||
Height(new) = MAX(MAX(up_height, down_height),bark_height) +
|
||||
2*(ShadowThickness(new)+HighlightThickness(new));
|
||||
create_GC(new);
|
||||
create_pixmaps(new);
|
||||
SetPixmap(new, DownPx, DownPixmap(new), down_width, down_height);
|
||||
Wagging(new) = False;
|
||||
Barking(new) = False;
|
||||
Resize(new);
|
||||
}
|
||||
|
||||
static destroy_pixmaps(w)
|
||||
DogWidget w;
|
||||
{
|
||||
XFreePixmap (XtDisplay(w), UpPixmap(w));
|
||||
XFreePixmap (XtDisplay(w), DownPixmap(w));
|
||||
XFreePixmap (XtDisplay(w), BarkPixmap(w));
|
||||
}
|
||||
|
||||
|
||||
static void Destroy(w)
|
||||
DogWidget w;
|
||||
{
|
||||
XtReleaseGC ((Widget)w, DrawGC(w));
|
||||
destroy_pixmaps(w);
|
||||
XtRemoveAllCallbacks ((Widget)w, DogNbarkCallback);
|
||||
}
|
||||
|
||||
static void Resize(w)
|
||||
DogWidget w;
|
||||
{
|
||||
_DogPosition(w);
|
||||
}
|
||||
|
||||
static Boolean DifferentBackground(w, p)
|
||||
Widget w;
|
||||
Widget p;
|
||||
{
|
||||
if (XmIsPrimitive(w) && XmIsManager(p))
|
||||
{
|
||||
Pixel w_bg, p_bg;
|
||||
Pixmap w_px, p_px;
|
||||
|
||||
XtVaGetValues(w, XmNbackground, &w_bg, XmNbackgroundPixmap, &w_px, NULL);
|
||||
XtVaGetValues(p, XmNbackground, &p_bg, XmNbackgroundPixmap, &p_px, NULL);
|
||||
|
||||
return ((w_bg == p_bg) && (w_px == p_px));
|
||||
}
|
||||
|
||||
return (False);
|
||||
}
|
||||
|
||||
static void Redisplay(w, event, region)
|
||||
DogWidget w;
|
||||
XEvent *event;
|
||||
Region region;
|
||||
{
|
||||
if (XtIsRealized(w)) {
|
||||
XmeDrawShadows (XtDisplay (w), XtWindow (w),
|
||||
TopShadowGC(w), BottomShadowGC(w),
|
||||
HighlightThickness(w), HighlightThickness(w),
|
||||
Width(w) - 2 * HighlightThickness(w),
|
||||
Height(w) - 2 * HighlightThickness(w),
|
||||
ShadowThickness(w),
|
||||
XmSHADOW_OUT);
|
||||
|
||||
if (Highlighted(w))
|
||||
(*((DogWidgetClass)XtClass(w)) ->
|
||||
primitive_class.border_highlight)((Widget)w);
|
||||
else if (DifferentBackground ((Widget)w, XtParent (w)))
|
||||
(*((DogWidgetClass)XtClass(w)) ->
|
||||
primitive_class.border_unhighlight)((Widget)w);
|
||||
|
||||
_DogDrawPixmap(w);
|
||||
}
|
||||
}
|
||||
|
||||
static Boolean SetValues(current, request, new)
|
||||
DogWidget current;
|
||||
DogWidget request;
|
||||
DogWidget new;
|
||||
|
||||
{
|
||||
Boolean redraw = False;
|
||||
|
||||
if (ShadowThickness(new) != ShadowThickness(current) ||
|
||||
HighlightThickness(new) != HighlightThickness(current)) {
|
||||
_DogPosition(new);
|
||||
redraw = True;
|
||||
}
|
||||
if (Foreground(new) != Foreground(current) ||
|
||||
BackgroundPixel(new) != BackgroundPixel(current)) {
|
||||
XtReleaseGC ((Widget)current, DrawGC(current));
|
||||
create_GC(new);
|
||||
destroy_pixmaps(new);
|
||||
create_pixmaps(new);
|
||||
switch (CurrPx(new)) {
|
||||
case(UpPx) :
|
||||
SetPixmap(new,UpPx,UpPixmap(new),up_width,up_height);
|
||||
break;
|
||||
case(DownPx) :
|
||||
SetPixmap(new,DownPx,DownPixmap(new),down_width,down_height);
|
||||
break;
|
||||
case(BarkPx) :
|
||||
SetPixmap(new,BarkPx,BarkPixmap(new),bark_width,bark_height);
|
||||
break;
|
||||
}
|
||||
redraw = True;
|
||||
}
|
||||
return (redraw);
|
||||
}
|
||||
|
||||
static XtGeometryResult QueryGeometry (w, intended, reply)
|
||||
DogWidget w;
|
||||
XtWidgetGeometry *intended;
|
||||
XtWidgetGeometry *reply;
|
||||
{
|
||||
reply->request_mode = 0;
|
||||
|
||||
if (intended->request_mode & (~(CWWidth | CWHeight)) != 0)
|
||||
return (XtGeometryNo);
|
||||
|
||||
reply->request_mode = (CWWidth | CWHeight);
|
||||
reply->width = MAX(MAX(down_width,up_width),bark_width) +
|
||||
2*(ShadowThickness(w)+HighlightThickness(w));
|
||||
reply->height = MAX(MAX(down_height,up_height),bark_height) +
|
||||
2*(ShadowThickness(w)+HighlightThickness(w));
|
||||
|
||||
if (reply->width != intended->width ||
|
||||
reply->height != intended->height ||
|
||||
intended->request_mode != reply->request_mode)
|
||||
return (XtGeometryAlmost);
|
||||
else {
|
||||
reply->request_mode = 0;
|
||||
return (XtGeometryYes);
|
||||
}
|
||||
}
|
||||
/**********************************************************************
|
||||
*
|
||||
* Widget actions
|
||||
*
|
||||
*********************************************************************/
|
||||
|
||||
static void bark_dog(w, event)
|
||||
DogWidget w;
|
||||
XEvent *event;
|
||||
{
|
||||
XmProcessTraversal((Widget)w, XmTRAVERSE_CURRENT);
|
||||
XtCallCallbacks ((Widget)w, DogNbarkCallback, NULL);
|
||||
if (Barking(w) == True) return;
|
||||
Barking(w) = True;
|
||||
SetPixmap(w,BarkPx,BarkPixmap(w),bark_width,bark_height);
|
||||
_DogPosition(w);
|
||||
_DogDrawPixmap(w);
|
||||
XtAppAddTimeOut (XtWidgetToApplicationContext((Widget)w),
|
||||
BarkTime((Widget)w), end_bark, w);
|
||||
}
|
||||
|
||||
static void end_bark(w, t)
|
||||
DogWidget w;
|
||||
XtIntervalId *t;
|
||||
{
|
||||
SetPixmap(w,DownPx,DownPixmap(w),down_width,down_height);
|
||||
_DogPosition(w);
|
||||
_DogDrawPixmap(w);
|
||||
Barking(w) = False;
|
||||
if (Wagging(w) == True)
|
||||
XtAppAddTimeOut(XtWidgetToApplicationContext((Widget)w),
|
||||
WagTime(w), do_wag, w);
|
||||
}
|
||||
|
||||
static void start_wag(w, event)
|
||||
DogWidget w;
|
||||
XEvent *event;
|
||||
{
|
||||
XmProcessTraversal((Widget)w, XmTRAVERSE_CURRENT);
|
||||
if (Wagging(w) == True) return;
|
||||
Wagging(w) = True;
|
||||
if (Barking(w) == True) return;
|
||||
XtAppAddTimeOut (XtWidgetToApplicationContext((Widget)w),
|
||||
WagTime(w), do_wag, w);
|
||||
}
|
||||
|
||||
static void stop_wag(w, event)
|
||||
DogWidget w;
|
||||
XEvent *event;
|
||||
{
|
||||
XmProcessTraversal((Widget)w, XmTRAVERSE_CURRENT);
|
||||
Wagging(w) = False;
|
||||
}
|
||||
|
||||
static void do_wag(cd, t)
|
||||
XtPointer cd;
|
||||
XtIntervalId *t;
|
||||
{
|
||||
DogWidget w = (DogWidget)cd;
|
||||
|
||||
if (Barking(w) == True) return;
|
||||
if (Wagging(w) == False) return;
|
||||
switch(CurrPx(w)) {
|
||||
case(UpPx):
|
||||
SetPixmap(w,DownPx,DownPixmap(w),down_width,down_height);
|
||||
break;
|
||||
case(DownPx):
|
||||
SetPixmap(w,UpPx,UpPixmap(w),up_width,up_height);
|
||||
break;
|
||||
}
|
||||
_DogPosition(w);
|
||||
_DogDrawPixmap(w);
|
||||
XtAppAddTimeOut (XtWidgetToApplicationContext((Widget)w),
|
||||
WagTime(w), do_wag, (XtPointer)w);
|
||||
}
|
||||
|
|
@ -1,59 +0,0 @@
|
|||
/*
|
||||
* CDE - Common Desktop Environment
|
||||
*
|
||||
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
|
||||
*
|
||||
* These libraries and programs are free software; you can
|
||||
* redistribute them and/or modify them under the terms of the GNU
|
||||
* Lesser General Public License as published by the Free Software
|
||||
* Foundation; either version 2 of the License, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* These libraries and programs are distributed in the hope that
|
||||
* they will be useful, but WITHOUT ANY WARRANTY; without even the
|
||||
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU Lesser General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with these libraries and programs; if not, write
|
||||
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
|
||||
* Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/*
|
||||
* (c) Copyright 1989, 1990, 1991, 1992 OPEN SOFTWARE FOUNDATION, INC.
|
||||
* ALL RIGHTS RESERVED
|
||||
*/
|
||||
/*
|
||||
* Motif Release 1.2
|
||||
*/
|
||||
/* $XConsortium: Dog.h /main/3 1995/10/27 10:42:01 rswiston $ */
|
||||
|
||||
/*****************************************************************************
|
||||
*
|
||||
* Dog.h - widget public header file
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
#ifndef _Dog_h
|
||||
#define _Dog_h
|
||||
|
||||
externalref WidgetClass dogWidgetClass;
|
||||
|
||||
typedef struct _DogClassRec *DogWidgetClass;
|
||||
typedef struct _DogRec *DogWidget;
|
||||
|
||||
#define DogNbarkCallback "barkCallback"
|
||||
#define DogNwagTime "wagTime"
|
||||
#define DogNbarkTime "barkTime"
|
||||
|
||||
#define DogCWagTime "WagTime"
|
||||
#define DogCBarkTime "BarkTime"
|
||||
|
||||
#define IsDog(w) XtIsSubclass((w), dogWidgetClass)
|
||||
|
||||
extern Widget DogCreate();
|
||||
extern int DogMrmInitialize();
|
||||
|
||||
#endif /* _Dog_h */
|
||||
/* DON'T ADD ANYTHING AFTER THIS #endif */
|
|
@ -1,26 +0,0 @@
|
|||
!
|
||||
! (c) Copyright 1989, 1990, 1991, 1992 OPEN SOFTWARE FOUNDATION, INC.
|
||||
! ALL RIGHTS RESERVED
|
||||
!
|
||||
!
|
||||
! Motif Release 1.2
|
||||
!
|
||||
! $XConsortium: Dog.uil /main/3 1995/10/27 10:42:11 rswiston $
|
||||
!******************************************************************************
|
||||
|
||||
!****************************************************************************
|
||||
!*
|
||||
!* Dog.uil - Dog widget UIL header file
|
||||
!*
|
||||
!****************************************************************************
|
||||
|
||||
! resources
|
||||
|
||||
value
|
||||
DogNwagTime : private argument ('wagTime', integer);
|
||||
DogNbarkTime : private argument ('barkTime', integer);
|
||||
DogNbarkCallback : reason ('barkCallback');
|
||||
|
||||
! widget create procedure
|
||||
|
||||
procedure DogCreate();
|
|
@ -1,96 +0,0 @@
|
|||
/*
|
||||
* CDE - Common Desktop Environment
|
||||
*
|
||||
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
|
||||
*
|
||||
* These libraries and programs are free software; you can
|
||||
* redistribute them and/or modify them under the terms of the GNU
|
||||
* Lesser General Public License as published by the Free Software
|
||||
* Foundation; either version 2 of the License, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* These libraries and programs are distributed in the hope that
|
||||
* they will be useful, but WITHOUT ANY WARRANTY; without even the
|
||||
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU Lesser General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with these libraries and programs; if not, write
|
||||
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
|
||||
* Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/*
|
||||
* (c) Copyright 1989, 1990, 1991, 1992 OPEN SOFTWARE FOUNDATION, INC.
|
||||
* ALL RIGHTS RESERVED
|
||||
*/
|
||||
/*
|
||||
* Motif Release 1.2
|
||||
*/
|
||||
/* $XConsortium: DogP.h /main/3 1995/10/27 10:42:18 rswiston $ */
|
||||
|
||||
/*****************************************************************************
|
||||
*
|
||||
* DogP.H - widget private header file
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
#ifndef _DogP_h
|
||||
#define _DogP_h
|
||||
|
||||
#include "Dog.h"
|
||||
#include <Xm/XmP.h>
|
||||
#include <Xm/PrimitiveP.h>
|
||||
|
||||
void _DogDrawPixmap();
|
||||
void _DogPosition();
|
||||
|
||||
#define DogIndex (XmPrimitiveIndex + 1)
|
||||
|
||||
typedef struct _DogClassPart {
|
||||
int reserved;
|
||||
} DogClassPart;
|
||||
|
||||
typedef struct _DogClassRec {
|
||||
CoreClassPart core_class;
|
||||
XmPrimitiveClassPart primitive_class;
|
||||
DogClassPart dog_class;
|
||||
} DogClassRec;
|
||||
|
||||
extern DogClassRec dogClassRec;
|
||||
|
||||
typedef struct _DogPart {
|
||||
int wag_time;
|
||||
int bark_time;
|
||||
XtCallbackList bark_callback;
|
||||
|
||||
Boolean wagging;
|
||||
Boolean barking;
|
||||
GC draw_GC;
|
||||
Pixmap up_pixmap;
|
||||
Pixmap down_pixmap;
|
||||
Pixmap bark_pixmap;
|
||||
Position pixmap_x;
|
||||
Position pixmap_y;
|
||||
Position draw_x;
|
||||
Position draw_y;
|
||||
Dimension draw_width;
|
||||
Dimension draw_height;
|
||||
int curr_px;
|
||||
Pixmap curr_pixmap;
|
||||
Dimension curr_width;
|
||||
Dimension curr_height;
|
||||
} DogPart;
|
||||
|
||||
typedef struct _DogRec {
|
||||
CorePart core;
|
||||
XmPrimitivePart primitive;
|
||||
DogPart dog;
|
||||
} DogRec;
|
||||
|
||||
#define UpPx 0
|
||||
#define DownPx 1
|
||||
#define BarkPx 2
|
||||
|
||||
#endif /* _DogP_h */
|
||||
/* DON'T ADD ANYTHING AFTER THIS #endif */
|
|
@ -1,52 +0,0 @@
|
|||
# $XConsortium: Makefile.hp /main/2 1996/05/13 11:56:33 drk $
|
||||
##########################################################################
|
||||
#
|
||||
# Makefile for Motif dog widget demo (HP)
|
||||
#
|
||||
# (c) Copyright 1993, 1994 Hewlett-Packard Company
|
||||
# (c) Copyright 1993, 1994 International Business Machines Corp.
|
||||
# (c) Copyright 1993, 1994 Sun Microsystems, Inc.
|
||||
# (c) Copyright 1993, 1994 Novell, Inc.
|
||||
#
|
||||
##########################################################################
|
||||
|
||||
CC = cc
|
||||
RM = rm -f
|
||||
UIL = /usr/dt/bin/uil
|
||||
|
||||
PROGRAM = dogs
|
||||
SOURCES = dogs.c Dog.c Square.c
|
||||
OBJECTS = dogs.o Dog.o Square.o
|
||||
UID = dogs.uid
|
||||
UILSOURCE = dogs.uil
|
||||
|
||||
DEFINES =
|
||||
CDEBUGFLAGS = -O
|
||||
CFLAGS = -Aa -z $(DEFINES) $(CDEBUGFLAGS)
|
||||
|
||||
DTINCLUDE = -I/usr/dt/include
|
||||
X11INCLUDE = -I/usr/include/X11R5
|
||||
|
||||
INCLUDES = $(DTINCLUDE) $(X11INCLUDE)
|
||||
|
||||
DTLIBS = -L/usr/dt/lib -lMrm -lXm
|
||||
X11LIBS = -L/usr/lib/X11R5 -lXt -lX11
|
||||
SYSLIBS =
|
||||
|
||||
LIBRARIES = $(DTLIBS) $(X11LIBS) $(SYSLIBS)
|
||||
LDFLAGS =
|
||||
|
||||
.c.o:
|
||||
${CC} -c $(CFLAGS) $(INCLUDES) $<
|
||||
|
||||
all:: $(PROGRAM) $(UID)
|
||||
|
||||
$(PROGRAM):: $(OBJECTS)
|
||||
$(CC) -o $(PROGRAM) $(LDFLAGS) $(OBJECTS) $(LIBRARIES)
|
||||
|
||||
$(UID):: $(UILSOURCE)
|
||||
$(UIL) -o $(UID) $(UILSOURCE)
|
||||
|
||||
clean::
|
||||
$(RM) $(PROGRAM) $(OBJECTS) $(UID)
|
||||
|
|
@ -1,51 +0,0 @@
|
|||
# $XConsortium: Makefile.ibm /main/2 1996/05/13 11:56:51 drk $
|
||||
##########################################################################
|
||||
#
|
||||
# Makefile for Motif dog widget demo (IBM)
|
||||
#
|
||||
# (c) Copyright 1993, 1994 Hewlett-Packard Company
|
||||
# (c) Copyright 1993, 1994 International Business Machines Corp.
|
||||
# (c) Copyright 1993, 1994 Sun Microsystems, Inc.
|
||||
# (c) Copyright 1993, 1994 Novell, Inc.
|
||||
#
|
||||
##########################################################################
|
||||
|
||||
CC = cc
|
||||
RM = rm -f
|
||||
UIL = /usr/dt/bin/uil
|
||||
|
||||
PROGRAM = dogs
|
||||
SOURCES = dogs.c Dog.c Square.c
|
||||
OBJECTS = dogs.o Dog.o Square.o
|
||||
UID = dogs.uid
|
||||
UILSOURCE = dogs.uil
|
||||
|
||||
DEFINES =
|
||||
CDEBUGFLAGS = -O
|
||||
CFLAGS = $(DEFINES) $(CDEBUGFLAGS)
|
||||
|
||||
DTINCLUDE = -I/usr/dt/include
|
||||
X11INCLUDE = -I/usr/include
|
||||
|
||||
INCLUDES = $(DTINCLUDE) $(X11INCLUDE)
|
||||
|
||||
DTLIBS = -L/usr/dt/lib -lMrm -lXm
|
||||
X11LIBS = -L/usr/lib -lXt -lX11
|
||||
SYSLIBS =
|
||||
|
||||
LIBRARIES = $(DTLIBS) $(X11LIBS) $(SYSLIBS)
|
||||
LDFLAGS =
|
||||
|
||||
.c.o:
|
||||
$(CC) -c $(CFLAGS) $(INCLUDES) $<
|
||||
|
||||
all:: $(PROGRAM) $(UID)
|
||||
|
||||
$(PROGRAM):: $(OBJECTS)
|
||||
$(CC) -o $(PROGRAM) $(LDFLAGS) $(OBJECTS) $(LIBRARIES)
|
||||
|
||||
$(UID):: $(UILSOURCE)
|
||||
$(UIL) -o $(UID) $(UILSOURCE)
|
||||
|
||||
clean::
|
||||
$(RM) $(PROGRAM) $(OBJECTS) $(UID)
|
|
@ -1,52 +0,0 @@
|
|||
# $XConsortium: Makefile.novell /main/2 1996/05/13 11:57:07 drk $
|
||||
##########################################################################
|
||||
#
|
||||
# Makefile for Motif dog widget demo (Novell)
|
||||
#
|
||||
# (c) Copyright 1993, 1994 Hewlett-Packard Company
|
||||
# (c) Copyright 1993, 1994 International Business Machines Corp.
|
||||
# (c) Copyright 1993, 1994 Sun Microsystems, Inc.
|
||||
# (c) Copyright 1993, 1994 Novell, Inc.
|
||||
#
|
||||
##########################################################################
|
||||
|
||||
CC = cc
|
||||
RM = rm -f
|
||||
UIL = /usr/dt/bin/uil
|
||||
|
||||
PROGRAM = dogs
|
||||
SOURCES = dogs.c Dog.c Square.c
|
||||
OBJECTS = dogs.o Dog.o Square.o
|
||||
UID = dogs.uid
|
||||
UILSOURCE = dogs.uil
|
||||
|
||||
DEFINES =
|
||||
CDEBUGFLAGS = -O
|
||||
CFLAGS = -Xc $(DEFINES) $(CDEBUGFLAGS)
|
||||
|
||||
DTINCLUDE = -I/usr/dt/include
|
||||
X11INCLUDE = -I/usr/X/include
|
||||
|
||||
INCLUDES = $(DTINCLUDE) $(X11INCLUDE)
|
||||
|
||||
DTLIBS = -L/usr/dt/lib -lMrm -lXm
|
||||
X11LIBS = -L/usr/X/lib -lXt -lX11
|
||||
SYSLIBS = -lw -lgen -lnsl -lresolv -lsocket -lXIM
|
||||
|
||||
LIBRARIES = $(DTLIBS) $(X11LIBS) $(SYSLIBS)
|
||||
LDFLAGS =
|
||||
|
||||
.c.o:
|
||||
$(CC) -c $(CFLAGS) $(INCLUDES) $<
|
||||
|
||||
all:: $(PROGRAM) $(UID)
|
||||
|
||||
$(PROGRAM):: $(OBJECTS)
|
||||
$(CC) -o $(PROGRAM) $(LDFLAGS) $(OBJECTS) $(LIBRARIES)
|
||||
|
||||
$(UID):: $(UILSOURCE)
|
||||
$(UIL) -o $(UID) $(UILSOURCE)
|
||||
|
||||
clean::
|
||||
$(RM) $(PROGRAM) $(OBJECTS) $(UID)
|
||||
|
|
@ -1,51 +0,0 @@
|
|||
# $XConsortium: Makefile.sun /main/2 1996/05/13 11:57:24 drk $
|
||||
##########################################################################
|
||||
#
|
||||
# Makefile for Motif dog widget demo (SUN)
|
||||
#
|
||||
# (c) Copyright 1993, 1994 Hewlett-Packard Company
|
||||
# (c) Copyright 1993, 1994 International Business Machines Corp.
|
||||
# (c) Copyright 1993, 1994 Sun Microsystems, Inc.
|
||||
# (c) Copyright 1993, 1994 Novell, Inc.
|
||||
#
|
||||
##########################################################################
|
||||
|
||||
CC = cc
|
||||
RM = rm -f
|
||||
UIL = /usr/dt/bin/uil
|
||||
|
||||
PROGRAM = dogs
|
||||
SOURCES = dogs.c Dog.c Square.c
|
||||
OBJECTS = dogs.o Dog.o Square.o
|
||||
UID = dogs.uid
|
||||
UILSOURCE = dogs.uil
|
||||
|
||||
DEFINES =
|
||||
CDEBUGFLAGS = -O
|
||||
CFLAGS = $(DEFINES) $(CDEBUGFLAGS)
|
||||
|
||||
DTINCLUDE = -I/usr/dt/include
|
||||
X11INCLUDE = -I/usr/openwin/include
|
||||
|
||||
INCLUDES = $(DTINCLUDE) $(X11INCLUDE)
|
||||
|
||||
DTLIBS = -L/usr/dt/lib -lMrm -lXm
|
||||
X11LIBS = -L/usr/openwin/lib -lXt -lX11
|
||||
SYSLIBS = -ldl -lw -lgen
|
||||
|
||||
LIBRARIES = $(DTLIBS) $(X11LIBS) $(SYSLIBS)
|
||||
LDFLAGS = -R/usr/dt/lib:/usr/openwin/lib
|
||||
|
||||
.c.o:
|
||||
$(CC) -c $(CFLAGS) $(INCLUDES) $<
|
||||
|
||||
all:: $(PROGRAM) $(UID)
|
||||
|
||||
$(PROGRAM):: $(OBJECTS)
|
||||
$(CC) -o $(PROGRAM) $(LDFLAGS) $(OBJECTS) $(LIBRARIES)
|
||||
|
||||
$(UID):: $(UILSOURCE)
|
||||
$(UIL) -o $(UID) $(UILSOURCE)
|
||||
|
||||
clean::
|
||||
$(RM) $(PROGRAM) $(OBJECTS) $(UID)
|
|
@ -1,52 +0,0 @@
|
|||
# $XConsortium: Makefile.uxp /main/2 1996/05/13 11:57:42 drk $
|
||||
##########################################################################
|
||||
#
|
||||
# Makefile for Motif dog widget demo (UXP)
|
||||
#
|
||||
# (Fujitsu.patch applied)
|
||||
#
|
||||
# (c) Copyright 1993, 1994 Hewlett-Packard Company
|
||||
# (c) Copyright 1993, 1994 International Business Machines Corp.
|
||||
# (c) Copyright 1993, 1994 Sun Microsystems, Inc.
|
||||
# (c) Copyright 1993, 1994 Novell, Inc.
|
||||
#
|
||||
##########################################################################
|
||||
|
||||
CC = cc
|
||||
RM = rm -f
|
||||
UIL = /usr/dt/bin/uil
|
||||
|
||||
PROGRAM = dogs
|
||||
SOURCES = dogs.c Dog.c Square.c
|
||||
OBJECTS = dogs.o Dog.o Square.o
|
||||
UID = dogs.uid
|
||||
UILSOURCE = dogs.uil
|
||||
|
||||
DEFINES =
|
||||
CDEBUGFLAGS = -O
|
||||
CFLAGS = -Xc $(DEFINES) $(CDEBUGFLAGS)
|
||||
|
||||
DTINCLUDE = -I/usr/dt/include
|
||||
|
||||
INCLUDES = $(DTINCLUDE)
|
||||
|
||||
DTLIBS = -L/usr/dt/lib -lMrm -lXm
|
||||
X11LIBS = -lXt -lX11
|
||||
SYSLIBS = -lw -lgen -lnsl -lresolv -lsocket
|
||||
|
||||
LIBRARIES = $(DTLIBS) $(X11LIBS) $(SYSLIBS)
|
||||
LDFLAGS =
|
||||
|
||||
.c.o:
|
||||
$(CC) -c $(CFLAGS) $(INCLUDES) $<
|
||||
|
||||
all:: $(PROGRAM) $(UID)
|
||||
|
||||
$(PROGRAM):: $(OBJECTS)
|
||||
$(CC) -o $(PROGRAM) $(LDFLAGS) $(OBJECTS) $(LIBRARIES)
|
||||
|
||||
$(UID):: $(UILSOURCE)
|
||||
$(UIL) -o $(UID) $(UILSOURCE)
|
||||
|
||||
clean::
|
||||
$(RM) $(PROGRAM) $(OBJECTS) $(UID)
|
|
@ -1,231 +0,0 @@
|
|||
/* $XConsortium: README /main/2 1996/07/15 14:04:15 drk $ */
|
||||
|
||||
This directory contains the sources of the Dog widget, the Square widget,
|
||||
and the dogs demo.
|
||||
|
||||
DOG WIDGET
|
||||
----------
|
||||
The Dog widget demonstrates how to subclass a primitive widget which
|
||||
will remain binary compatible with future versions of Motif. It uses
|
||||
XmResolvePartOffsets(), and associated macros, and implements all
|
||||
the recommendations in the XmResolvePartOffsets manpage.
|
||||
|
||||
The Dog widget is a subclass of XmPrimitive. It can bark and wag its
|
||||
tail. If you want more exotic tricks - feel free to subclass it, or
|
||||
replace up.bm, down.bm and bark.bm with more interesting bitmaps.
|
||||
|
||||
It has the following resources:
|
||||
|
||||
DogNwagTime - time in milliseconds between each wag.
|
||||
DogNbarkTime - time in milliseconds the bark graphic is displayed.
|
||||
DogNbarkCallback - callback called by the bark action.
|
||||
|
||||
It has the following translations:
|
||||
|
||||
osfActivate/Return/Space/MB1 = Bark
|
||||
W/MB2 = Wag tail.
|
||||
S/Shift-MB2 = Stop wagging tail.
|
||||
osfHelp = Help
|
||||
|
||||
SQUARE WIDGET
|
||||
-------------
|
||||
The Square widget demonstrates how to subclass a constraint widget which
|
||||
will remain binary compatible with future versions of Motif. It uses
|
||||
XmResolveAllPartOffsets(), and associated macros, and implements all
|
||||
the recommendations in the XmResolveAllPartOffsets manpage.
|
||||
|
||||
The Square Widget is a subclass of XmBulletinBoard. It forces its children
|
||||
to be square using a constraint resource.
|
||||
|
||||
It has one resource:
|
||||
|
||||
SquareNmajorDimension - determines which dimension will be used
|
||||
for the new size of the child. Values are
|
||||
SquareWIDTH or SquareHEIGHT.
|
||||
|
||||
It has one constraint resource:
|
||||
|
||||
SquareNmakeSquare - determines whether the child is forced
|
||||
to be square or set to its preferred size.
|
||||
|
||||
|
||||
DOGS DEMO
|
||||
---------
|
||||
The dogs demo uses the Dog and Square widgets. It illustrates how
|
||||
to incorporate new widgets into UIL source, using the user_defined
|
||||
function.
|
||||
|
||||
It allows you to dynamically change the DogNwagTime and SquareNmakeSquare
|
||||
resources.
|
||||
|
||||
If you have a machine with any sound generation features at all, you may
|
||||
want to change the bark callback to something better than XBell().
|
||||
|
||||
|
||||
ADDITIONAL INFORMATION ON THE MOTIF BINARY COMPATIBILITY MECHANISM
|
||||
------------------------------------------------------------------
|
||||
|
||||
Why is it needed?:
|
||||
Motif custom widget subclasses compiled against Motif 1.2 may
|
||||
not be binary compatible with future major releases of Motif, and
|
||||
will cause fatal errors when used. To fix the problem the widget will
|
||||
need to be recompiled against the new version of Motif.
|
||||
|
||||
The incompatibility will occur because a subclass must contain
|
||||
compiled-in references to its instance fields which will be
|
||||
specified relative to the start address of the widget instance.
|
||||
When a new Motif library is installed in which the widget's
|
||||
superclass instance structures have been extended, the compiled-in
|
||||
references will point to the wrong memory location, and general
|
||||
chaos will ensue.
|
||||
|
||||
The solution:
|
||||
Motif provides a solution to this problem in the form of a new
|
||||
mechanism for defining resources and accessing widget fields.
|
||||
|
||||
The mechanism allows all references to fields in the instance and
|
||||
constraint structures to be specified relative to the start of the
|
||||
widget *part* structure instead of the overall widget structures
|
||||
(which include the superclass part structures.) The mechanism resolves
|
||||
these relative references at runtime when the widget class is
|
||||
first initialized. This involves factoring in the true size of
|
||||
the widget's superclass instance structures read from the currently-
|
||||
linked Motif library.
|
||||
|
||||
Converting a Widget To Use The Motif Widget Binary Compatibility Mechanism
|
||||
--------------------------------------------------------------------------
|
||||
|
||||
The guidelines for converting a widget to use the mechanism illustrate
|
||||
each stage with examples from a hypothetical widget named 'XmpNew'.
|
||||
|
||||
The mechanism requires changes only to the widget's source file and
|
||||
not to any public header file.
|
||||
|
||||
For additional information, see the Motif 1.2 man pages for
|
||||
XmResolvePartOffsets() and XmResolveAllPartOffsets().
|
||||
|
||||
Edit your widget source file and proceed through the file, implementing
|
||||
these guidelines:
|
||||
|
||||
1) Provide a clear indication that the widget uses the Motif widget
|
||||
binary compatibility mechanism. The Motif changes are not part of the
|
||||
standard Xt widget-writing specification, and may be confusing
|
||||
to the future maintainers of the widget. Add the following comment
|
||||
near the start of the file and tag each change in the file with
|
||||
a brief comment:
|
||||
|
||||
/*
|
||||
* The XmpNew widget is rigged with the Motif widget binary compatibility
|
||||
* mechanism. All Motif-specific changes for this mechanism are preceded
|
||||
* by a comment including the string "MotifBc".
|
||||
*
|
||||
* For a description of the Motif widget binary compatibility mechanism,
|
||||
* see the reference manual entry on XmResolveAllPartOffsets().
|
||||
*
|
||||
*/
|
||||
|
||||
2) Define an index value for your class. The value should be one
|
||||
greater than the predefined index for your widget's superclass:
|
||||
|
||||
For a subclass of XmPrimitive:
|
||||
|
||||
#define XmpNewIndex (XmPrimitiveIndex + 1)
|
||||
|
||||
For a subclass of XmManager:
|
||||
|
||||
#define XmpNewIndex (XmManagerIndex + 1)
|
||||
|
||||
3) Define variables to hold the dynamic offset tables. They
|
||||
should be statically defined, but global to the widget source
|
||||
file:
|
||||
|
||||
static XmOffsetPtr ipot; /* Instance part offset table */
|
||||
|
||||
For subclasses of XmManager, you also need:
|
||||
|
||||
static XmOffsetPtr cpot; /* Constraint part offset table */
|
||||
|
||||
4) Define macros to provide access to your widget's fields:
|
||||
|
||||
For all widget instance fields:
|
||||
|
||||
#define MarginWidth(w) XmField(w,ipot,XmpNew,margin_width,Dimension)
|
||||
|
||||
For all widget constraint fields:
|
||||
|
||||
#define ChildType(w) \
|
||||
XmConstraintField(w,cpot,XmpNew,child_type,unsigned char)
|
||||
|
||||
(The last parameter is the data type of the instance or constraint field.)
|
||||
|
||||
5) Modify the definition of all widget resources, synthetic resources,
|
||||
constraint resources and synthetic constraint resources to use dynamic
|
||||
offset calculation macros:
|
||||
|
||||
Change the type of widget resource lists and constraint resource
|
||||
lists from:
|
||||
XtResource foo[] = { };
|
||||
to:
|
||||
XmPartResource foo[] = { };
|
||||
|
||||
Change all widget resource and synthetic resource offset entries from:
|
||||
XtOffsetOf( struct _XmpNewRec, new.margin_width)
|
||||
to:
|
||||
XmPartOffset(XmpNew,margin_width)
|
||||
|
||||
Change all widget constraint resource and synthetic constraint resource
|
||||
offset entries from:
|
||||
XtOffsetOf( struct _XmpNewConstraintRec, new.child_type),
|
||||
to:
|
||||
XmConstraintPartOffset(XmpNew,child_type)
|
||||
|
||||
6) In the widget class record change the widget 'size' and 'constraint_size'
|
||||
fields to be the size of the widget part structure, not the size
|
||||
of the entire widget structure:
|
||||
|
||||
Change the Core class 'size' field from:
|
||||
sizeof(XmpNewWidgetRec) /* widget size */
|
||||
to:
|
||||
sizeof(XmpNewWidgetPart), /* widget size */
|
||||
|
||||
Change the Constraint class 'constraint_size' field from:
|
||||
sizeof(XmpNewConstraintRec), /* constraint_size */
|
||||
to:
|
||||
sizeof(XmpNewConstraintPart), /* constraint_size */
|
||||
|
||||
7) Change the Core class 'version' field to disable version checking:
|
||||
XtVersion, /* version */
|
||||
becomes:
|
||||
XtVersionDontCheck /* version */
|
||||
|
||||
8) In the widget's ClassInitialize method, add the call which will
|
||||
resolve the part-relative references:
|
||||
|
||||
For a subclass of XmPrimitive:
|
||||
XmResolvePartOffsets(xmpNewWidgetClass, &ipot);
|
||||
|
||||
For a subclass of XmManager:
|
||||
XmResolveAllPartOffsets(xmpNewWidgetClass, &ipot, &cpot);
|
||||
|
||||
9) Ensure that references to all instance and constraint fields in the
|
||||
widget source use the macros defined in (4) above. There must be no direct
|
||||
access to these fields.
|
||||
|
||||
Superclass instance and constraint fields can still be accessed normally,
|
||||
however, to keep the widget source readable and consistent it is
|
||||
recommended that macros are also defined and used for those fields. e.g
|
||||
|
||||
#define Width(w) ((w)->core.width)
|
||||
#define NumChildren(w) ((w)->composite.num_children)
|
||||
#define ShadowThickness(w) ((w)->manager.shadow_thickness)
|
||||
|
||||
10) Test the results. The easiest way to do this is go to the lib/Xm
|
||||
directory, add some new fields to PrimitiveP.h and ManagerP.h, and rebuild
|
||||
the libXm library. Test your widget with this new library (without
|
||||
recompiling the widget source!)
|
||||
|
||||
|
||||
|
||||
----- End Included Message -----
|
||||
|
||||
|
|
@ -1,275 +0,0 @@
|
|||
/*
|
||||
* CDE - Common Desktop Environment
|
||||
*
|
||||
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
|
||||
*
|
||||
* These libraries and programs are free software; you can
|
||||
* redistribute them and/or modify them under the terms of the GNU
|
||||
* Lesser General Public License as published by the Free Software
|
||||
* Foundation; either version 2 of the License, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* These libraries and programs are distributed in the hope that
|
||||
* they will be useful, but WITHOUT ANY WARRANTY; without even the
|
||||
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU Lesser General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with these libraries and programs; if not, write
|
||||
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
|
||||
* Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/*
|
||||
* (c) Copyright 1989, 1990, 1991, 1992 OPEN SOFTWARE FOUNDATION, INC.
|
||||
* ALL RIGHTS RESERVED
|
||||
*/
|
||||
/*
|
||||
* Motif Release 1.2
|
||||
*/
|
||||
#ifdef REV_INFO
|
||||
#ifndef lint
|
||||
static char rcsid[] = "$XConsortium: Square.c /main/3 1995/10/27 10:42:28 rswiston $"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/*****************************************************************************
|
||||
*
|
||||
* Square.c - widget source file
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <Xm/Xm.h>
|
||||
#include <Mrm/MrmPublic.h>
|
||||
#include <Xm/BulletinBP.h>
|
||||
#include "SquareP.h"
|
||||
|
||||
#define Width(w) XmField((w),square_offsets,Core,width,Dimension)
|
||||
#define Height(w) XmField((w),square_offsets,Core,height,Dimension)
|
||||
#define BorderWidth(w) XmField((w),square_offsets,Core,border_width,Dimension)
|
||||
#define MajorDimension(w) XmField((w),square_offsets,Square,major_dimension,int)
|
||||
|
||||
#define MakeSquare(w) XmConstraintField((w),square_constraint_offsets, \
|
||||
Square,make_square, Boolean)
|
||||
|
||||
static void ClassInitialize();
|
||||
static void Initialize();
|
||||
static Boolean SetValues();
|
||||
static void ConstraintInitialize();
|
||||
static Boolean ConstraintSetValues();
|
||||
|
||||
static XmPartResource resources[] = {
|
||||
{
|
||||
SquareNmajorDimension, SquareCMajorDimension, XmRInt, sizeof(int),
|
||||
XmPartOffset(Square,major_dimension), XmRImmediate, (XtPointer)SquareWIDTH
|
||||
}
|
||||
};
|
||||
|
||||
static XmPartResource constraints[] = {
|
||||
{
|
||||
SquareNmakeSquare, SquareCMakeSquare, XmRBoolean, sizeof(Boolean),
|
||||
XmConstraintPartOffset(Square,make_square),
|
||||
XmRImmediate, (XtPointer)False
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
externaldef(squareclassrec) SquareClassRec squareClassRec =
|
||||
{
|
||||
{ /* core_class fields */
|
||||
(WidgetClass) &xmBulletinBoardClassRec, /* superclass */
|
||||
"Square", /* class_name */
|
||||
sizeof(SquarePart), /* widget_size */
|
||||
ClassInitialize, /* class_initialize */
|
||||
NULL, /* class init part proc */
|
||||
False, /* class_inited */
|
||||
Initialize, /* initialize */
|
||||
NULL, /* initialize_notify */
|
||||
XtInheritRealize, /* realize */
|
||||
NULL, /* actions */
|
||||
0, /* num_actions */
|
||||
(XtResourceList)resources,/* resources */
|
||||
XtNumber(resources), /* num_resources */
|
||||
NULLQUARK, /* xrm_class */
|
||||
False, /* compress_motion */
|
||||
XtExposeCompressMaximal, /* compress_exposure */
|
||||
False, /* compress_enterleave */
|
||||
False, /* visible_interest */
|
||||
NULL, /* destroy */
|
||||
XtInheritResize, /* resize */
|
||||
XtInheritExpose, /* expose */
|
||||
SetValues, /* set_values */
|
||||
NULL, /* set_values_hook */
|
||||
XtInheritSetValuesAlmost, /* set_values_almost */
|
||||
NULL, /* get_values_hook */
|
||||
NULL, /* accept_focus */
|
||||
XtVersionDontCheck, /* version */
|
||||
NULL, /* callback_private */
|
||||
XtInheritTranslations, /* tm_table */
|
||||
XtInheritQueryGeometry, /* Query Geometry proc */
|
||||
NULL, /* disp accelerator */
|
||||
NULL, /* extension */
|
||||
},
|
||||
|
||||
{ /* composite_class fields */
|
||||
XtInheritGeometryManager, /* geometry_manager */
|
||||
XtInheritChangeManaged, /* change_managed */
|
||||
XtInheritInsertChild, /* insert_child */
|
||||
XtInheritDeleteChild, /* delete_child */
|
||||
NULL, /* extension */
|
||||
},
|
||||
|
||||
{ /* constraint_class fields */
|
||||
(XtResourceList)constraints, /* constraint resource */
|
||||
XtNumber(constraints), /* number of constraints */
|
||||
sizeof(SquareConstraintPart), /* size of constraint */
|
||||
ConstraintInitialize, /* initialization */
|
||||
NULL, /* destroy proc */
|
||||
ConstraintSetValues, /* set_values proc */
|
||||
NULL, /* extension */
|
||||
},
|
||||
|
||||
{ /* manager_class fields */
|
||||
XtInheritTranslations, /* translations */
|
||||
NULL, /* syn_resources */
|
||||
0, /* num_syn_resources */
|
||||
NULL, /* syn_cont_resources */
|
||||
0, /* num_syn_cont_resources */
|
||||
XmInheritParentProcess, /* parent_process */
|
||||
NULL, /* extension */
|
||||
},
|
||||
|
||||
{ /* bulletin_board_class fields */
|
||||
FALSE, /* always_install_accelerators */
|
||||
NULL, /* geo_matrix_create */
|
||||
XtInheritFocusMovedProc, /* focus_moved_proc */
|
||||
NULL, /* extension */
|
||||
},
|
||||
|
||||
{ /* square_class fields */
|
||||
NULL, /* extension */
|
||||
}
|
||||
};
|
||||
|
||||
externaldef(squarewidgetclass) WidgetClass
|
||||
squareWidgetClass = (WidgetClass) &squareClassRec;
|
||||
|
||||
static XmOffsetPtr square_offsets; /* Part offsets table */
|
||||
static XmOffsetPtr square_constraint_offsets; /* Constraint offsets table */
|
||||
|
||||
/**********************************************************************
|
||||
*
|
||||
* SquareCreate - Convenience routine, used by Uil/Mrm.
|
||||
*
|
||||
*********************************************************************/
|
||||
|
||||
Widget SquareCreate(parent, name, arglist, nargs)
|
||||
Widget parent;
|
||||
char *name;
|
||||
Arg *arglist;
|
||||
int nargs;
|
||||
{
|
||||
return(XtCreateWidget (name, squareWidgetClass, parent, arglist, nargs));
|
||||
}
|
||||
|
||||
/**********************************************************************
|
||||
*
|
||||
* SquareMrmInitialize - register Square widget class with Mrm
|
||||
*
|
||||
*********************************************************************/
|
||||
|
||||
int SquareMrmInitialize()
|
||||
{
|
||||
return(MrmRegisterClass (MrmwcUnknown, "Square", "SquareCreate",
|
||||
SquareCreate, (WidgetClass)&squareClassRec));
|
||||
}
|
||||
|
||||
/**********************************************************************
|
||||
*
|
||||
* Class methods
|
||||
*
|
||||
*********************************************************************/
|
||||
|
||||
static void ClassInitialize()
|
||||
{
|
||||
XmResolveAllPartOffsets(squareWidgetClass, &square_offsets,
|
||||
&square_constraint_offsets);
|
||||
}
|
||||
|
||||
static void Initialize(req, new)
|
||||
SquareWidget req;
|
||||
SquareWidget new;
|
||||
{
|
||||
if (MajorDimension(new) != SquareWIDTH &&
|
||||
MajorDimension(new) != SquareHEIGHT) {
|
||||
XtWarning("Square: invalid majorDimension");
|
||||
MajorDimension(new) = SquareWIDTH;
|
||||
}
|
||||
}
|
||||
|
||||
static Boolean SetValues(curr, req, new)
|
||||
SquareWidget curr;
|
||||
SquareWidget req;
|
||||
SquareWidget new;
|
||||
{
|
||||
if (MajorDimension(new) != SquareWIDTH &&
|
||||
MajorDimension(new) != SquareHEIGHT) {
|
||||
XtWarning("Square: invalid majorDimension");
|
||||
MajorDimension(new) = MajorDimension(curr);
|
||||
}
|
||||
return (False);
|
||||
}
|
||||
|
||||
static void ConstraintInitialize (req, new)
|
||||
Widget req;
|
||||
Widget new;
|
||||
{
|
||||
Dimension m;
|
||||
|
||||
if(MakeSquare(new) == True) {
|
||||
if (MajorDimension(XtParent(new))==SquareWIDTH)
|
||||
m = Width(new);
|
||||
else
|
||||
m = Height(new);
|
||||
|
||||
XtResizeWidget(new, m, m, BorderWidth(new));
|
||||
}
|
||||
}
|
||||
|
||||
static Boolean ConstraintSetValues (old, ref, new)
|
||||
Widget old;
|
||||
Widget ref;
|
||||
Widget new;
|
||||
{
|
||||
Boolean redraw = False;
|
||||
|
||||
if (MakeSquare(new) != MakeSquare(old)) {
|
||||
if(MakeSquare(new)==True) {
|
||||
if (MajorDimension(XtParent(new))==SquareWIDTH)
|
||||
Height(new) = Width(new);
|
||||
else
|
||||
Width(new) = Height(new);
|
||||
}
|
||||
else {
|
||||
XtWidgetGeometry gi;
|
||||
XtWidgetGeometry gp;
|
||||
|
||||
if (MajorDimension(XtParent(new))==SquareWIDTH)
|
||||
Height(new) = Height(new)/2;
|
||||
else
|
||||
Width(new) = Width(new)/2;
|
||||
|
||||
gi.request_mode = CWWidth | CWHeight;
|
||||
gi.width = Width(new);
|
||||
gi.height = Height(new);
|
||||
if (XtQueryGeometry(new, &gi, &gp) == XtGeometryAlmost) {
|
||||
if (gp.request_mode && CWWidth != 0) Width(new) = gp.width;
|
||||
if (gp.request_mode && CWHeight != 0) Height(new) = gp.height;
|
||||
}
|
||||
}
|
||||
redraw = True;
|
||||
}
|
||||
return (redraw);
|
||||
}
|
||||
|
|
@ -1,63 +0,0 @@
|
|||
/*
|
||||
* CDE - Common Desktop Environment
|
||||
*
|
||||
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
|
||||
*
|
||||
* These libraries and programs are free software; you can
|
||||
* redistribute them and/or modify them under the terms of the GNU
|
||||
* Lesser General Public License as published by the Free Software
|
||||
* Foundation; either version 2 of the License, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* These libraries and programs are distributed in the hope that
|
||||
* they will be useful, but WITHOUT ANY WARRANTY; without even the
|
||||
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU Lesser General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with these libraries and programs; if not, write
|
||||
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
|
||||
* Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/*
|
||||
* (c) Copyright 1989, 1990, 1991, 1992 OPEN SOFTWARE FOUNDATION, INC.
|
||||
* ALL RIGHTS RESERVED
|
||||
*/
|
||||
/*
|
||||
* Motif Release 1.2
|
||||
*/
|
||||
/* $XConsortium: Square.h /main/3 1995/10/27 10:42:37 rswiston $ */
|
||||
|
||||
/*****************************************************************************
|
||||
*
|
||||
* Square.h - widget public header file
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
#ifndef _Square_h
|
||||
#define _Square_h
|
||||
|
||||
#include <Xm/BulletinB.h>
|
||||
|
||||
externalref WidgetClass squareWidgetClass;
|
||||
|
||||
typedef struct _SquareClassRec *SquareWidgetClass;
|
||||
typedef struct _SquareRec *SquareWidget;
|
||||
|
||||
extern Widget SquareCreate();
|
||||
extern int SquareMrmInitialize();
|
||||
|
||||
#define IsSquare(w) XtIsSubclass((w), squareWidgetClass)
|
||||
|
||||
#define SquareWIDTH 0
|
||||
#define SquareHEIGHT 1
|
||||
|
||||
#define SquareNmajorDimension "majorDimension"
|
||||
#define SquareCMajorDimension "MajorDimension"
|
||||
|
||||
#define SquareNmakeSquare "makeSquare"
|
||||
#define SquareCMakeSquare "MakeSquare"
|
||||
|
||||
#endif /* _Square_h */
|
||||
/* DON'T ADD ANYTHING AFTER THIS #endif */
|
|
@ -1,31 +0,0 @@
|
|||
!
|
||||
! (c) Copyright 1989, 1990, 1991, 1992 OPEN SOFTWARE FOUNDATION, INC.
|
||||
! ALL RIGHTS RESERVED
|
||||
!
|
||||
!
|
||||
! Motif Release 1.2
|
||||
!
|
||||
! $XConsortium: Square.uil /main/3 1995/10/27 10:42:46 rswiston $
|
||||
!******************************************************************************
|
||||
|
||||
!****************************************************************************
|
||||
!*
|
||||
!* Square.uil - Square widget UIL header file
|
||||
!*
|
||||
!****************************************************************************
|
||||
|
||||
! resources
|
||||
|
||||
value
|
||||
SquareNmajorDimension : private argument ('majorDimension', integer);
|
||||
SquareNmakeSquare : private argument ('makeSquare', boolean);
|
||||
|
||||
! resource values
|
||||
|
||||
value
|
||||
SquareWIDTH : 0;
|
||||
SquareHEIGHT : 1;
|
||||
|
||||
! widget create procedure
|
||||
|
||||
procedure SquareCreate();
|
|
@ -1,90 +0,0 @@
|
|||
/*
|
||||
* CDE - Common Desktop Environment
|
||||
*
|
||||
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
|
||||
*
|
||||
* These libraries and programs are free software; you can
|
||||
* redistribute them and/or modify them under the terms of the GNU
|
||||
* Lesser General Public License as published by the Free Software
|
||||
* Foundation; either version 2 of the License, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* These libraries and programs are distributed in the hope that
|
||||
* they will be useful, but WITHOUT ANY WARRANTY; without even the
|
||||
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU Lesser General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with these libraries and programs; if not, write
|
||||
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
|
||||
* Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/*
|
||||
* (c) Copyright 1989, 1990, 1991, 1992 OPEN SOFTWARE FOUNDATION, INC.
|
||||
* ALL RIGHTS RESERVED
|
||||
*/
|
||||
/*
|
||||
* Motif Release 1.2
|
||||
*/
|
||||
/* $XConsortium: SquareP.h /main/3 1995/10/27 10:42:55 rswiston $ */
|
||||
|
||||
|
||||
#ifndef _SquareP_h
|
||||
#define _SquareP_h
|
||||
|
||||
#include "Square.h"
|
||||
#include <Xm/BulletinBP.h>
|
||||
|
||||
#define SquareIndex (XmBulletinBIndex + 1)
|
||||
|
||||
typedef struct _SquareClassPart
|
||||
{
|
||||
int reserved;
|
||||
} SquareClassPart;
|
||||
|
||||
|
||||
typedef struct _SquareClassRec
|
||||
{
|
||||
CoreClassPart core_class;
|
||||
CompositeClassPart composite_class;
|
||||
ConstraintClassPart constraint_class;
|
||||
XmManagerClassPart manager_class;
|
||||
XmBulletinBoardClassPart bulletin_board_class;
|
||||
SquareClassPart square_class;
|
||||
} SquareClassRec;
|
||||
|
||||
externalref SquareClassRec squareClassRec;
|
||||
|
||||
typedef struct _SquarePart
|
||||
{
|
||||
int major_dimension;
|
||||
} SquarePart;
|
||||
|
||||
|
||||
/* Full instance record declaration */
|
||||
|
||||
typedef struct _SquareRec
|
||||
{
|
||||
CorePart core;
|
||||
CompositePart composite;
|
||||
ConstraintPart constraint;
|
||||
XmManagerPart manager;
|
||||
XmBulletinBoardPart bulletin_board;
|
||||
SquarePart square;
|
||||
} SquareRec;
|
||||
|
||||
typedef struct _SquareConstraintPart
|
||||
{
|
||||
Boolean make_square;
|
||||
} SquareConstraintPart;
|
||||
|
||||
typedef struct _SquareConstraintRec
|
||||
{
|
||||
XmManagerConstraintPart manager;
|
||||
SquareConstraintPart square;
|
||||
} SquareConstraintRec, *SquareConstraint;
|
||||
|
||||
|
||||
#endif /* _SquareP_h */
|
||||
/* DON'T ADD ANYTHING AFTER THIS #endif */
|
|
@ -1,151 +0,0 @@
|
|||
/* $XConsortium: bark.bm /main/2 1995/07/17 18:03:47 drk $ */
|
||||
#define bark_width 152
|
||||
#define bark_height 91
|
||||
#define bark_x_hot 0
|
||||
#define bark_y_hot 0
|
||||
static unsigned char bark_bits[] = {
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80,
|
||||
0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x07, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x80, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x80, 0xfb, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xfd,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xd5, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x80, 0xeb, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0xe0, 0xff, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x80, 0xeb, 0x07, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xff, 0x3f, 0x00, 0x00,
|
||||
0x00, 0x00, 0x80, 0x57, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x7f, 0x55, 0xfd, 0x00, 0x00, 0x00, 0x00, 0x80, 0x57, 0x07,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0x55, 0xfd,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0xae, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0xc0, 0xea, 0xba, 0xea, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0xae, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xea,
|
||||
0xba, 0xea, 0x00, 0x00, 0x00, 0x00, 0x00, 0x56, 0x1d, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0x7d, 0x7d, 0xd5, 0x07, 0x00, 0x00,
|
||||
0x00, 0x00, 0x56, 0x1d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x78, 0x7d, 0x7d, 0xd5, 0x07, 0x00, 0x00, 0x00, 0x00, 0xbe, 0x1a, 0x00,
|
||||
0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xae, 0xab, 0xae, 0xbe, 0x07,
|
||||
0x00, 0x00, 0x00, 0x00, 0xbe, 0x1a, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff,
|
||||
0x00, 0x00, 0xae, 0xab, 0xae, 0xbe, 0x07, 0x00, 0x00, 0x00, 0x00, 0x78,
|
||||
0xf5, 0x80, 0xff, 0x57, 0x55, 0x55, 0x55, 0xff, 0xc1, 0xd5, 0xd7, 0x5f,
|
||||
0x7f, 0xff, 0x03, 0x00, 0x00, 0x00, 0x78, 0xf5, 0x80, 0xff, 0x57, 0x55,
|
||||
0x55, 0x55, 0xff, 0xc1, 0xd5, 0xd7, 0x5f, 0x7f, 0xff, 0x03, 0x00, 0x00,
|
||||
0x00, 0xf8, 0xea, 0xff, 0xab, 0xaa, 0xaa, 0xaa, 0xaa, 0xfe, 0xff, 0xab,
|
||||
0xeb, 0xab, 0xaa, 0xea, 0x7f, 0x00, 0x00, 0x00, 0xc0, 0xaa, 0xaa, 0xaa,
|
||||
0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xea, 0xaf, 0xff, 0xaa, 0xaa, 0xaa, 0x73,
|
||||
0x00, 0x00, 0x00, 0xc0, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55,
|
||||
0xd5, 0x57, 0x7f, 0x55, 0x55, 0xd5, 0x73, 0x00, 0x00, 0x00, 0xc0, 0x57,
|
||||
0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x7f, 0x55, 0x55, 0xfd,
|
||||
0xd5, 0x7f, 0x00, 0x00, 0x00, 0xc0, 0xaf, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
|
||||
0xaa, 0xaa, 0xaa, 0xbe, 0xaa, 0xaa, 0xba, 0xaa, 0x3f, 0x00, 0x00, 0x00,
|
||||
0x00, 0xbf, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xfe, 0xaa,
|
||||
0xaa, 0x2a, 0xbf, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x5f, 0x55, 0x55, 0x55,
|
||||
0x55, 0x55, 0x55, 0x55, 0x55, 0xff, 0x55, 0x55, 0x75, 0xde, 0x0f, 0x00,
|
||||
0x00, 0x00, 0x00, 0xe0, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55,
|
||||
0xfd, 0x55, 0xd5, 0xd7, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xaa,
|
||||
0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xfa, 0xaa, 0xea, 0xaf, 0x30,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
|
||||
0xaa, 0xaa, 0xea, 0xab, 0xea, 0xfd, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0xe0, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0xd5, 0x57, 0xd5,
|
||||
0xf0, 0x01, 0x1f, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x55, 0x55, 0x55, 0x55,
|
||||
0x55, 0x55, 0x55, 0x55, 0xd5, 0x57, 0x7d, 0x00, 0x00, 0xf0, 0x01, 0x00,
|
||||
0x00, 0x00, 0xe0, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
|
||||
0xbf, 0x0f, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xaa, 0xaa,
|
||||
0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xbf, 0x0f, 0x00, 0x00, 0x01,
|
||||
0x00, 0x00, 0x00, 0x00, 0xf8, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55,
|
||||
0x55, 0x55, 0xff, 0x03, 0x00, 0x10, 0x06, 0x00, 0x00, 0x00, 0x00, 0xf8,
|
||||
0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0xff, 0x03, 0x00,
|
||||
0x10, 0x0c, 0x00, 0x00, 0x00, 0x00, 0xb8, 0xaa, 0xae, 0xaa, 0xaa, 0xaa,
|
||||
0xaa, 0xaa, 0xaa, 0xaa, 0x1f, 0x00, 0x00, 0x10, 0x10, 0x00, 0x00, 0x00,
|
||||
0x00, 0xb8, 0xaa, 0xae, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0x1f,
|
||||
0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5f, 0xd5, 0x5f, 0x55,
|
||||
0x55, 0x55, 0xf5, 0xff, 0x55, 0xd5, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x5f, 0xd5, 0x5f, 0x55, 0x55, 0x55, 0xf5, 0xff, 0x55,
|
||||
0xd5, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0xaf, 0xaa,
|
||||
0xfb, 0xea, 0xea, 0xff, 0xff, 0xeb, 0xab, 0x3a, 0x00, 0x00, 0x00, 0x20,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0xaf, 0xaa, 0xfb, 0xea, 0xea, 0xff, 0xff,
|
||||
0xeb, 0xab, 0x3a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0,
|
||||
0x57, 0xf5, 0xd5, 0xff, 0x1f, 0x00, 0x00, 0x7f, 0x55, 0x3f, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x57, 0xf5, 0xd5, 0xff, 0x1f,
|
||||
0x00, 0x00, 0x7f, 0x55, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0xf8, 0xaa, 0xfe, 0xaa, 0x07, 0x00, 0x00, 0x00, 0xfc, 0xea, 0x07,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb8, 0xaa, 0xfe, 0xab,
|
||||
0x07, 0x00, 0x00, 0x00, 0xbc, 0xfa, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x78, 0x55, 0xfd, 0x55, 0x07, 0x00, 0x00, 0x00, 0x5c,
|
||||
0xf5, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0xf5,
|
||||
0x83, 0x55, 0x07, 0x00, 0x00, 0x00, 0x57, 0x7f, 0x3f, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0xbe, 0xea, 0x83, 0xab, 0x07, 0x00, 0x00,
|
||||
0x00, 0xab, 0xbe, 0x3e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80,
|
||||
0xaf, 0xfa, 0x80, 0xaf, 0x1f, 0x00, 0x00, 0xe0, 0xab, 0xae, 0x3a, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x57, 0xfd, 0x80, 0x5f, 0x1f,
|
||||
0x00, 0x00, 0xe0, 0x57, 0x5f, 0x3d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0xf0, 0x57, 0x1f, 0x00, 0x7e, 0xfd, 0x00, 0x00, 0xf8, 0xf5, 0x7f,
|
||||
0x3d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xaf, 0x1f, 0x00,
|
||||
0xbe, 0xfa, 0x00, 0x00, 0xf8, 0xea, 0xbf, 0x3a, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0xf0, 0xaa, 0x07, 0x00, 0xf0, 0xef, 0x00, 0x00, 0xbe,
|
||||
0x7e, 0xb0, 0xfa, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x55,
|
||||
0x07, 0x00, 0xf0, 0xf7, 0x00, 0x00, 0x5e, 0x7d, 0x70, 0xfd, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x55, 0x1f, 0x00, 0x00, 0xff, 0x00,
|
||||
0x00, 0x56, 0x1d, 0xf0, 0xd7, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0xf0, 0xab, 0x1f, 0x00, 0x00, 0xff, 0x00, 0x00, 0xae, 0x1e, 0xf0, 0xef,
|
||||
0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xbe, 0xfa, 0x00, 0x00,
|
||||
0x00, 0x00, 0xc0, 0xaf, 0x03, 0x00, 0xbe, 0x1f, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0xf8, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x7f,
|
||||
0x00, 0xf8, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x1f,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x7f, 0x00, 0xf8, 0x1f, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0xe0, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0xc0, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x1f, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00};
|
|
@ -1,198 +0,0 @@
|
|||
/*
|
||||
* CDE - Common Desktop Environment
|
||||
*
|
||||
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
|
||||
*
|
||||
* These libraries and programs are free software; you can
|
||||
* redistribute them and/or modify them under the terms of the GNU
|
||||
* Lesser General Public License as published by the Free Software
|
||||
* Foundation; either version 2 of the License, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* These libraries and programs are distributed in the hope that
|
||||
* they will be useful, but WITHOUT ANY WARRANTY; without even the
|
||||
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU Lesser General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with these libraries and programs; if not, write
|
||||
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
|
||||
* Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/*
|
||||
* (c) Copyright 1989, 1990, 1991, 1992 OPEN SOFTWARE FOUNDATION, INC.
|
||||
* ALL RIGHTS RESERVED
|
||||
*/
|
||||
/*
|
||||
* Motif Release 1.2
|
||||
*/
|
||||
#ifdef REV_INFO
|
||||
#ifndef lint
|
||||
static char rcsid[] = "$XConsortium: dogs.c /main/3 1995/10/27 10:43:03 rswiston $"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/*****************************************************************************
|
||||
*
|
||||
* dogs.c - Square & Dog widget demo source file.
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <Xm/Xm.h>
|
||||
#include <Mrm/MrmPublic.h>
|
||||
#include "Square.h"
|
||||
#include "Dog.h"
|
||||
|
||||
XtAppContext app_context;
|
||||
|
||||
#define k_dog1_id 1
|
||||
#define k_dog2_id 2
|
||||
#define k_dog3_id 3
|
||||
#define k_help_id 4
|
||||
|
||||
static void create_cb();
|
||||
static void bark_cb();
|
||||
static void tb_cb();
|
||||
static void scale_cb();
|
||||
static void help_cb();
|
||||
static void exit_cb();
|
||||
|
||||
static MrmHierarchy mrm_id = 0;
|
||||
static char *mrm_vec[]={"dogs.uid", NULL};
|
||||
static MrmCode mrm_class;
|
||||
static MRMRegisterArg mrm_names[] = {
|
||||
{"create_cb", (XtPointer)create_cb },
|
||||
{"bark_cb", (XtPointer)bark_cb },
|
||||
{"tb_cb", (XtPointer)tb_cb },
|
||||
{"scale_cb", (XtPointer)scale_cb },
|
||||
{"help_cb", (XtPointer)help_cb },
|
||||
{"exit_cb", (XtPointer)exit_cb }
|
||||
};
|
||||
|
||||
static Widget dog1_id;
|
||||
static Widget dog2_id;
|
||||
static Widget dog3_id;
|
||||
static Widget help_id;
|
||||
|
||||
main(argc, argv)
|
||||
int argc;
|
||||
char **argv;
|
||||
{
|
||||
Widget shell;
|
||||
Display *display;
|
||||
Widget app_main = NULL;
|
||||
Arg args[3];
|
||||
|
||||
MrmInitialize ();
|
||||
SquareMrmInitialize();
|
||||
DogMrmInitialize();
|
||||
|
||||
XtToolkitInitialize();
|
||||
app_context = XtCreateApplicationContext();
|
||||
display = XtOpenDisplay(app_context, NULL, argv[0], "Dogs",
|
||||
NULL, 0, &argc, argv);
|
||||
|
||||
if (display == NULL) {
|
||||
fprintf(stderr, "%s: Can't open display\n", argv[0]);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
XtSetArg (args[0], XtNallowShellResize, True);
|
||||
XtSetArg (args[1], XtNminWidth, 620);
|
||||
XtSetArg (args[2], XtNminHeight, 370);
|
||||
shell = XtAppCreateShell(argv[0], NULL, applicationShellWidgetClass,
|
||||
display, args, 3);
|
||||
|
||||
if (MrmOpenHierarchy(1, mrm_vec, NULL, &mrm_id) != MrmSUCCESS) exit(0);
|
||||
MrmRegisterNames(mrm_names, XtNumber(mrm_names));
|
||||
MrmFetchWidget (mrm_id, "app_main", shell, &app_main, &mrm_class);
|
||||
|
||||
XtManageChild(app_main);
|
||||
XtRealizeWidget(shell);
|
||||
XtAppMainLoop(app_context);
|
||||
}
|
||||
|
||||
static void create_cb(w, id, reason)
|
||||
Widget w;
|
||||
int *id;
|
||||
unsigned long *reason;
|
||||
{
|
||||
switch (*id) {
|
||||
case k_dog1_id: dog1_id = w; break;
|
||||
case k_dog2_id: dog2_id = w; break;
|
||||
case k_dog3_id: dog3_id = w; break;
|
||||
case k_help_id:
|
||||
help_id = w;
|
||||
XtUnmanageChild((Widget)XmMessageBoxGetChild(help_id,
|
||||
XmDIALOG_CANCEL_BUTTON));
|
||||
XtUnmanageChild((Widget)XmMessageBoxGetChild(help_id,
|
||||
XmDIALOG_HELP_BUTTON));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
static void bark_cb (w, volume, cb)
|
||||
Widget w;
|
||||
int *volume;
|
||||
XtPointer cb;
|
||||
{
|
||||
XBell(XtDisplay(w), *volume);
|
||||
}
|
||||
|
||||
static void tb_cb (w, tag, cb)
|
||||
Widget w;
|
||||
int *tag;
|
||||
XmToggleButtonCallbackStruct *cb;
|
||||
{
|
||||
Arg args[1];
|
||||
Widget dog;
|
||||
|
||||
switch (*tag) {
|
||||
case(1) : dog = dog1_id; break;
|
||||
case(2) : dog = dog2_id; break;
|
||||
case(3) : dog = dog3_id; break;
|
||||
}
|
||||
XtSetArg(args[0], SquareNmakeSquare, cb->set);
|
||||
XtSetValues(dog, args, 1);
|
||||
}
|
||||
|
||||
static void scale_cb(w, tag, cb)
|
||||
Widget w;
|
||||
int *tag;
|
||||
XmScaleCallbackStruct *cb;
|
||||
{
|
||||
Arg args[1];
|
||||
Widget dog;
|
||||
|
||||
switch (*tag) {
|
||||
case(1) : dog = dog1_id; break;
|
||||
case(2) : dog = dog2_id; break;
|
||||
case(3) : dog = dog3_id; break;
|
||||
}
|
||||
XtSetArg(args[0], DogNwagTime, cb->value);
|
||||
XtSetValues(dog, args, 1);
|
||||
}
|
||||
|
||||
static void help_cb (w, name, cb)
|
||||
Widget w;
|
||||
XmString name;
|
||||
XtPointer cb;
|
||||
{
|
||||
Arg args[1];
|
||||
|
||||
if (name == NULL) return;
|
||||
XtSetArg (args[0], XmNmessageString, name);
|
||||
XtSetValues(help_id, args, 1);
|
||||
XtManageChild(help_id);
|
||||
}
|
||||
|
||||
static void exit_cb (w, name, cb)
|
||||
Widget w;
|
||||
XmString name;
|
||||
XtPointer cb;
|
||||
{
|
||||
exit(0);
|
||||
}
|
||||
|
|
@ -1,332 +0,0 @@
|
|||
!
|
||||
! (c) Copyright 1989, 1990, 1991, 1992 OPEN SOFTWARE FOUNDATION, INC.
|
||||
! ALL RIGHTS RESERVED
|
||||
!
|
||||
!
|
||||
! Motif Release 1.2
|
||||
!
|
||||
! $XConsortium: dogs.uil /main/3 1995/10/27 10:43:12 rswiston $
|
||||
!******************************************************************************
|
||||
|
||||
!******************************************************************************
|
||||
!*
|
||||
!* dogs.uil - Square & Dog widget demo, application UIL file.
|
||||
!*
|
||||
!******************************************************************************
|
||||
|
||||
module squares
|
||||
version = 'v1.0'
|
||||
names = case_sensitive
|
||||
character_set=iso_latin1
|
||||
objects = { XmPushButton = gadget; XmToggleButton = gadget; }
|
||||
|
||||
include file 'Square.uil';
|
||||
include file 'Dog.uil';
|
||||
|
||||
procedure
|
||||
create_cb(integer);
|
||||
bark_cb(integer);
|
||||
tb_cb(integer);
|
||||
scale_cb(integer);
|
||||
help_cb(compound_string);
|
||||
exit_cb();
|
||||
|
||||
value
|
||||
k_dog1_id : 1;
|
||||
k_dog2_id : 2;
|
||||
k_dog3_id : 3;
|
||||
k_help_id : 4;
|
||||
|
||||
value
|
||||
dog1_bark_volume : 90;
|
||||
dog1_bark_time : 1100;
|
||||
dog1_wag_time : 100;
|
||||
dog1_square : false;
|
||||
|
||||
dog2_bark_volume : 40;
|
||||
dog2_bark_time : 400;
|
||||
dog2_wag_time : 100;
|
||||
dog2_square : false;
|
||||
|
||||
dog3_bark_volume : 70;
|
||||
dog3_bark_time : 700;
|
||||
dog3_wag_time : 100;
|
||||
dog3_square : false;
|
||||
|
||||
value help_text :
|
||||
compound_string(" ", separate=true) &
|
||||
compound_string(" ", separate=true) &
|
||||
compound_string("osfActivate/MB1 = Bark.", separate=true) &
|
||||
compound_string("W/MB2 = Wag tail.", separate=true) &
|
||||
compound_string("S/Shift-MB2 = Stop.", separate=true) &
|
||||
compound_string("osfHelp = Help.", separate=true) &
|
||||
compound_string("");
|
||||
|
||||
|
||||
object app_main : XmMainWindow {
|
||||
controls {
|
||||
XmMenuBar bar;
|
||||
XmForm work;
|
||||
unmanaged XmInformationDialog help_box;
|
||||
};
|
||||
callbacks {
|
||||
XmNhelpCallback=procedure help_cb(compound_string("Dogs") & help_text);
|
||||
};
|
||||
};
|
||||
|
||||
object help_box : XmInformationDialog {
|
||||
arguments {
|
||||
XmNmessageAlignment = XmALIGNMENT_BEGINNING;
|
||||
XmNdialogTitle = "Help";
|
||||
XmNokLabelString = "Dismiss";
|
||||
};
|
||||
callbacks {
|
||||
MrmNcreateCallback = procedure create_cb(k_help_id);
|
||||
};
|
||||
};
|
||||
|
||||
object bar : XmMenuBar {
|
||||
arguments {
|
||||
XmNmenuHelpWidget = XmCascadeButton help;
|
||||
};
|
||||
controls {
|
||||
XmCascadeButton file;
|
||||
XmCascadeButton help;
|
||||
};
|
||||
};
|
||||
|
||||
object file : XmCascadeButton {
|
||||
arguments { XmNlabelString = "File"; XmNmnemonic = keysym('F'); };
|
||||
controls { XmPulldownMenu file_pd; };
|
||||
};
|
||||
object file_pd : XmPulldownMenu {
|
||||
controls {
|
||||
XmPushButton exit_pb;
|
||||
};
|
||||
};
|
||||
object exit_pb : XmPushButton {
|
||||
arguments { XmNlabelString = "Exit"; XmNmnemonic = keysym('E');};
|
||||
callbacks { XmNactivateCallback = procedure exit_cb(); };
|
||||
};
|
||||
|
||||
object help : XmCascadeButton {
|
||||
arguments { XmNlabelString = "Help"; XmNmnemonic = keysym('H'); };
|
||||
controls { XmPulldownMenu help_pd; };
|
||||
};
|
||||
object help_pd : XmPulldownMenu {
|
||||
arguments { XmNtearOffModel = XmTEAR_OFF_ENABLED; };
|
||||
controls {
|
||||
XmPushButton help_pb;
|
||||
};
|
||||
};
|
||||
object help_pb : XmPushButton {
|
||||
arguments { XmNlabelString = "On Dogs"; XmNmnemonic = keysym('D');};
|
||||
callbacks { XmNactivateCallback = procedure help_cb
|
||||
(compound_string("Dogs") & help_text); };
|
||||
};
|
||||
|
||||
|
||||
object work : XmForm {
|
||||
controls {
|
||||
XmFrame frame;
|
||||
XmScale scale1;
|
||||
XmScale scale2;
|
||||
XmScale scale3;
|
||||
XmSeparator sep;
|
||||
XmToggleButton tb1;
|
||||
XmToggleButton tb2;
|
||||
XmToggleButton tb3;
|
||||
};
|
||||
};
|
||||
|
||||
object frame : XmFrame {
|
||||
arguments {
|
||||
XmNrightAttachment = XmATTACH_FORM; XmNrightOffset = 5;
|
||||
XmNleftAttachment = XmATTACH_FORM; XmNleftOffset = 5;
|
||||
XmNtopAttachment = XmATTACH_FORM; XmNtopOffset = 5;
|
||||
XmNbottomAttachment = XmATTACH_WIDGET; XmNbottomOffset = 10;
|
||||
XmNbottomWidget = XmScale scale1;
|
||||
};
|
||||
controls {
|
||||
user_defined square;
|
||||
};
|
||||
};
|
||||
|
||||
object square : user_defined procedure SquareCreate {
|
||||
arguments {
|
||||
XmNwidth = 600;
|
||||
XmNheight = 220;
|
||||
XmNresizePolicy = XmRESIZE_GROW;
|
||||
SquareNmajorDimension = SquareWIDTH;
|
||||
};
|
||||
controls {
|
||||
user_defined dog1;
|
||||
user_defined dog2;
|
||||
user_defined dog3;
|
||||
};
|
||||
};
|
||||
|
||||
object dog1 : user_defined procedure DogCreate {
|
||||
arguments {
|
||||
SquareNmakeSquare = dog1_square;
|
||||
XmNx = 20;
|
||||
XmNy = 20;
|
||||
XmNforeground = color('red', foreground);
|
||||
XmNbackground = color('lightblue', background);
|
||||
XmNshadowThickness = 12;
|
||||
DogNwagTime = dog1_wag_time;
|
||||
DogNbarkTime = dog1_bark_time;
|
||||
};
|
||||
callbacks {
|
||||
MrmNcreateCallback = procedure create_cb(k_dog1_id);
|
||||
DogNbarkCallback = procedure bark_cb(dog1_bark_volume);
|
||||
XmNhelpCallback = procedure help_cb
|
||||
(compound_string("Rover") & help_text);
|
||||
};
|
||||
};
|
||||
|
||||
object dog2 : user_defined procedure DogCreate {
|
||||
arguments {
|
||||
SquareNmakeSquare = dog2_square;
|
||||
XmNx = 220;
|
||||
XmNy = 20;
|
||||
XmNforeground = color('black', foreground);
|
||||
XmNbackground = color('lightblue', background);
|
||||
XmNshadowThickness = 4;
|
||||
DogNwagTime = dog2_wag_time;
|
||||
DogNbarkTime = dog2_bark_time;
|
||||
};
|
||||
callbacks {
|
||||
MrmNcreateCallback = procedure create_cb(k_dog2_id);
|
||||
DogNbarkCallback = procedure bark_cb(dog2_bark_volume);
|
||||
XmNhelpCallback = procedure help_cb
|
||||
(compound_string("Spot") & help_text);
|
||||
};
|
||||
};
|
||||
|
||||
object dog3 : user_defined procedure DogCreate {
|
||||
arguments {
|
||||
SquareNmakeSquare = dog3_square;
|
||||
XmNx = 420;
|
||||
XmNy = 20;
|
||||
XmNforeground = color('Brown', foreground);
|
||||
XmNbackground = color('lightblue', background);
|
||||
XmNshadowThickness = 10;
|
||||
DogNwagTime = dog3_wag_time;
|
||||
DogNbarkTime = dog3_bark_time;
|
||||
};
|
||||
callbacks {
|
||||
MrmNcreateCallback = procedure create_cb(k_dog3_id);
|
||||
DogNbarkCallback = procedure bark_cb(dog3_bark_volume);
|
||||
XmNhelpCallback = procedure help_cb
|
||||
(compound_string("Fido") & help_text);
|
||||
};
|
||||
};
|
||||
|
||||
object scale1 : XmScale {
|
||||
arguments {
|
||||
XmNleftAttachment = XmATTACH_FORM; XmNleftOffset = 5;
|
||||
XmNrightAttachment = XmATTACH_POSITION; XmNrightPosition = 30;
|
||||
XmNbottomAttachment = XmATTACH_WIDGET; XmNbottomOffset = 5;
|
||||
XmNbottomWidget = XmSeparator sep;
|
||||
XmNminimum = 1;
|
||||
XmNmaximum = 200;
|
||||
XmNtitleString = 'Wag Rate';
|
||||
XmNorientation = XmHORIZONTAL;
|
||||
XmNprocessingDirection = XmMAX_ON_LEFT;
|
||||
XmNvalue = dog1_wag_time;
|
||||
};
|
||||
callbacks {
|
||||
XmNvalueChangedCallback = procedure scale_cb(1);
|
||||
XmNdragCallback = procedure scale_cb(1);
|
||||
};
|
||||
};
|
||||
|
||||
object scale2 : XmScale {
|
||||
arguments {
|
||||
XmNleftAttachment = XmATTACH_POSITION; XmNleftPosition = 36;
|
||||
XmNrightAttachment = XmATTACH_POSITION; XmNrightPosition = 63;
|
||||
XmNbottomAttachment = XmATTACH_WIDGET; XmNbottomOffset = 5;
|
||||
XmNbottomWidget = XmSeparator sep;
|
||||
XmNminimum = 1;
|
||||
XmNmaximum = 200;
|
||||
XmNtitleString = 'Wag Rate';
|
||||
XmNorientation = XmHORIZONTAL;
|
||||
XmNprocessingDirection = XmMAX_ON_LEFT;
|
||||
XmNvalue = dog2_wag_time;
|
||||
};
|
||||
callbacks {
|
||||
XmNvalueChangedCallback = procedure scale_cb(2);
|
||||
XmNdragCallback = procedure scale_cb(2);
|
||||
};
|
||||
};
|
||||
|
||||
object scale3 : XmScale {
|
||||
arguments {
|
||||
XmNleftAttachment = XmATTACH_POSITION; XmNleftPosition = 69;
|
||||
XmNrightAttachment = XmATTACH_FORM; XmNrightOffset = 5;
|
||||
XmNbottomAttachment = XmATTACH_WIDGET; XmNbottomOffset = 5;
|
||||
XmNbottomWidget = XmSeparator sep;
|
||||
XmNminimum = 1;
|
||||
XmNmaximum = 200;
|
||||
XmNtitleString = 'Wag Rate';
|
||||
XmNorientation = XmHORIZONTAL;
|
||||
XmNprocessingDirection = XmMAX_ON_LEFT;
|
||||
XmNvalue = dog3_wag_time;
|
||||
};
|
||||
callbacks {
|
||||
XmNvalueChangedCallback = procedure scale_cb(3);
|
||||
XmNdragCallback = procedure scale_cb(3);
|
||||
};
|
||||
};
|
||||
|
||||
object sep : XmSeparator {
|
||||
arguments {
|
||||
XmNleftAttachment = XmATTACH_FORM;
|
||||
XmNrightAttachment = XmATTACH_FORM;
|
||||
XmNbottomAttachment = XmATTACH_WIDGET; XmNbottomOffset = 5;
|
||||
XmNbottomWidget = XmToggleButton tb1;
|
||||
};
|
||||
};
|
||||
|
||||
object tb1 : XmToggleButton {
|
||||
arguments {
|
||||
XmNleftAttachment = XmATTACH_FORM; XmNleftOffset = 5;
|
||||
XmNbottomAttachment = XmATTACH_FORM; XmNbottomOffset = 5;
|
||||
|
||||
XmNset = dog1_square;
|
||||
XmNlabelString = 'Make Square';
|
||||
};
|
||||
callbacks {
|
||||
XmNvalueChangedCallback = procedure tb_cb(1);
|
||||
};
|
||||
};
|
||||
|
||||
object tb2 : XmToggleButton {
|
||||
arguments {
|
||||
XmNleftAttachment = XmATTACH_POSITION; XmNleftPosition = 36;
|
||||
XmNbottomAttachment = XmATTACH_FORM; XmNbottomOffset = 5;
|
||||
|
||||
XmNset = dog2_square;
|
||||
XmNlabelString = 'Make Square';
|
||||
};
|
||||
callbacks {
|
||||
XmNvalueChangedCallback = procedure tb_cb(2);
|
||||
};
|
||||
};
|
||||
|
||||
object tb3 : XmToggleButton {
|
||||
arguments {
|
||||
XmNleftAttachment = XmATTACH_POSITION; XmNleftPosition = 69;
|
||||
XmNbottomAttachment = XmATTACH_FORM; XmNbottomOffset = 5;
|
||||
|
||||
XmNset = dog3_square;
|
||||
XmNlabelString = 'Make Square';
|
||||
};
|
||||
callbacks {
|
||||
XmNvalueChangedCallback = procedure tb_cb(3);
|
||||
};
|
||||
};
|
||||
|
||||
end module;
|
||||
|
|
@ -1,151 +0,0 @@
|
|||
/* $XConsortium: down.bm /main/2 1995/07/17 18:03:57 drk $ */
|
||||
#define down_width 152
|
||||
#define down_height 91
|
||||
#define down_x_hot 0
|
||||
#define down_y_hot 0
|
||||
static unsigned char down_bits[] = {
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0xe0, 0xff, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xff, 0x3f, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x7f, 0x55, 0xfd, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0x55, 0xfd,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0xc0, 0xea, 0xba, 0xea, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xea,
|
||||
0xba, 0xea, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0x7d, 0x7d, 0xd5, 0x07, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x78, 0x7d, 0x7d, 0xd5, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xae, 0xab, 0xae, 0xbe, 0x07,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff,
|
||||
0x00, 0x00, 0xae, 0xab, 0xae, 0xbe, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x80, 0xff, 0x57, 0x55, 0x55, 0x55, 0xff, 0xc1, 0xd5, 0xd7, 0x5f,
|
||||
0x7f, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xff, 0x57, 0x55,
|
||||
0x55, 0x55, 0xff, 0xc1, 0xd5, 0xd7, 0x5f, 0x7f, 0xff, 0x03, 0x00, 0x00,
|
||||
0x00, 0x00, 0xc0, 0xff, 0xab, 0xaa, 0xaa, 0xaa, 0xaa, 0xfe, 0xff, 0xab,
|
||||
0xeb, 0xab, 0xaa, 0xea, 0x7f, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xaa, 0xaa,
|
||||
0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xea, 0xaf, 0xff, 0xaa, 0xaa, 0xaa, 0x73,
|
||||
0x00, 0x00, 0x00, 0x00, 0x7e, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55,
|
||||
0xd5, 0x57, 0x7f, 0x55, 0x55, 0xd5, 0x73, 0x00, 0x00, 0x00, 0x80, 0x5f,
|
||||
0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x7f, 0x55, 0x55, 0xfd,
|
||||
0xd5, 0x7f, 0x00, 0x00, 0x00, 0xe0, 0xab, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
|
||||
0xaa, 0xaa, 0xaa, 0xbe, 0xaa, 0xaa, 0xfa, 0xaa, 0x7f, 0x00, 0x00, 0x00,
|
||||
0xf8, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xfe, 0xaa,
|
||||
0xaa, 0xea, 0xbf, 0x0f, 0x00, 0x00, 0x00, 0x7c, 0x55, 0x55, 0x55, 0x55,
|
||||
0x55, 0x55, 0x55, 0x55, 0x55, 0xff, 0x55, 0x55, 0xd5, 0xdf, 0x0f, 0x00,
|
||||
0x00, 0x00, 0x5e, 0xf5, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55,
|
||||
0xfd, 0x55, 0xd5, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x80, 0xaf, 0xfe, 0xaa,
|
||||
0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xfa, 0xaa, 0xea, 0xff, 0x7f,
|
||||
0x00, 0x00, 0x00, 0xc0, 0xab, 0xef, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
|
||||
0xaa, 0xaa, 0xea, 0xab, 0xea, 0x01, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xf5,
|
||||
0xe3, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0xd5, 0x57, 0xd5,
|
||||
0x01, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xfd, 0xe0, 0x55, 0x55, 0x55, 0x55,
|
||||
0x55, 0x55, 0x55, 0x55, 0xd5, 0x57, 0xfd, 0x01, 0x00, 0x00, 0x00, 0x00,
|
||||
0xf8, 0x3e, 0xe0, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
|
||||
0xbf, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb8, 0x1e, 0xe0, 0xaa, 0xaa,
|
||||
0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xbf, 0x0f, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x58, 0x07, 0xf8, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55,
|
||||
0x55, 0x55, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd8, 0x01, 0xf8,
|
||||
0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0xff, 0x03, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0xf8, 0x00, 0xb8, 0xaa, 0xae, 0xaa, 0xaa, 0xaa,
|
||||
0xaa, 0xaa, 0xaa, 0xaa, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38,
|
||||
0x00, 0xb8, 0xaa, 0xae, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0x1f,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5f, 0xd5, 0x5f, 0x55,
|
||||
0x55, 0x55, 0xf5, 0xff, 0x55, 0xd5, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x5f, 0xd5, 0x5f, 0x55, 0x55, 0x55, 0xf5, 0xff, 0x55,
|
||||
0xd5, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xaf, 0xaa,
|
||||
0xfb, 0xea, 0xea, 0xff, 0xff, 0xeb, 0xab, 0x3a, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0xaf, 0xaa, 0xfb, 0xea, 0xea, 0xff, 0xff,
|
||||
0xeb, 0xab, 0x3a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0,
|
||||
0x57, 0xf5, 0xd5, 0xff, 0x1f, 0x00, 0x00, 0x7f, 0x55, 0x3f, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x57, 0xf5, 0xd5, 0xff, 0x1f,
|
||||
0x00, 0x00, 0x7f, 0x55, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0xf8, 0xaa, 0xfe, 0xaa, 0x07, 0x00, 0x00, 0x00, 0xfc, 0xea, 0x07,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb8, 0xaa, 0xfe, 0xab,
|
||||
0x07, 0x00, 0x00, 0x00, 0xbc, 0xfa, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x78, 0x55, 0xfd, 0x55, 0x07, 0x00, 0x00, 0x00, 0x5c,
|
||||
0xf5, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0xf5,
|
||||
0x83, 0x55, 0x07, 0x00, 0x00, 0x00, 0x57, 0x7f, 0x3f, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0xbe, 0xea, 0x83, 0xab, 0x07, 0x00, 0x00,
|
||||
0x00, 0xab, 0xbe, 0x3e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80,
|
||||
0xaf, 0xfa, 0x80, 0xaf, 0x1f, 0x00, 0x00, 0xe0, 0xab, 0xae, 0x3a, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x57, 0xfd, 0x80, 0x5f, 0x1f,
|
||||
0x00, 0x00, 0xe0, 0x57, 0x5f, 0x3d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0xf0, 0x57, 0x1f, 0x00, 0x7e, 0xfd, 0x00, 0x00, 0xf8, 0xf5, 0x7f,
|
||||
0x3d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xaf, 0x1f, 0x00,
|
||||
0xbe, 0xfa, 0x00, 0x00, 0xf8, 0xea, 0xbf, 0x3a, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0xf0, 0xaa, 0x07, 0x00, 0xf0, 0xef, 0x00, 0x00, 0xbe,
|
||||
0x7e, 0xb0, 0xfa, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x55,
|
||||
0x07, 0x00, 0xf0, 0xf7, 0x00, 0x00, 0x5e, 0x7d, 0x70, 0xfd, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x55, 0x1f, 0x00, 0x00, 0xff, 0x00,
|
||||
0x00, 0x56, 0x1d, 0xf0, 0xd7, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0xf0, 0xab, 0x1f, 0x00, 0x00, 0xff, 0x00, 0x00, 0xae, 0x1e, 0xf0, 0xef,
|
||||
0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xbe, 0xfa, 0x00, 0x00,
|
||||
0x00, 0x00, 0xc0, 0xaf, 0x03, 0x00, 0xbe, 0x1f, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0xf8, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x7f,
|
||||
0x00, 0xf8, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x1f,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x7f, 0x00, 0xf8, 0x1f, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0xe0, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0xc0, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x1f, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00};
|
|
@ -1,151 +0,0 @@
|
|||
/* $XConsortium: up.bm /main/2 1995/07/17 18:04:05 drk $ */
|
||||
#define up_width 152
|
||||
#define up_height 91
|
||||
#define up_x_hot 0
|
||||
#define up_y_hot 0
|
||||
static unsigned char up_bits[] = {
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80,
|
||||
0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x07, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x80, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x80, 0xfb, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xfd,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xd5, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x80, 0xeb, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0xe0, 0xff, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x80, 0xeb, 0x07, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xff, 0x3f, 0x00, 0x00,
|
||||
0x00, 0x00, 0x80, 0x57, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x7f, 0x55, 0xfd, 0x00, 0x00, 0x00, 0x00, 0x80, 0x57, 0x07,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0x55, 0xfd,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0xae, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0xc0, 0xea, 0xba, 0xea, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0xae, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xea,
|
||||
0xba, 0xea, 0x00, 0x00, 0x00, 0x00, 0x00, 0x56, 0x1d, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0x7d, 0x7d, 0xd5, 0x07, 0x00, 0x00,
|
||||
0x00, 0x00, 0x56, 0x1d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x78, 0x7d, 0x7d, 0xd5, 0x07, 0x00, 0x00, 0x00, 0x00, 0xbe, 0x1a, 0x00,
|
||||
0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xae, 0xab, 0xae, 0xbe, 0x07,
|
||||
0x00, 0x00, 0x00, 0x00, 0xbe, 0x1a, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff,
|
||||
0x00, 0x00, 0xae, 0xab, 0xae, 0xbe, 0x07, 0x00, 0x00, 0x00, 0x00, 0x78,
|
||||
0xf5, 0x80, 0xff, 0x57, 0x55, 0x55, 0x55, 0xff, 0xc1, 0xd5, 0xd7, 0x5f,
|
||||
0x7f, 0xff, 0x03, 0x00, 0x00, 0x00, 0x78, 0xf5, 0x80, 0xff, 0x57, 0x55,
|
||||
0x55, 0x55, 0xff, 0xc1, 0xd5, 0xd7, 0x5f, 0x7f, 0xff, 0x03, 0x00, 0x00,
|
||||
0x00, 0xf8, 0xea, 0xff, 0xab, 0xaa, 0xaa, 0xaa, 0xaa, 0xfe, 0xff, 0xab,
|
||||
0xeb, 0xab, 0xaa, 0xea, 0x7f, 0x00, 0x00, 0x00, 0xc0, 0xaa, 0xaa, 0xaa,
|
||||
0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xea, 0xaf, 0xff, 0xaa, 0xaa, 0xaa, 0x73,
|
||||
0x00, 0x00, 0x00, 0xc0, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55,
|
||||
0xd5, 0x57, 0x7f, 0x55, 0x55, 0xd5, 0x73, 0x00, 0x00, 0x00, 0xc0, 0x57,
|
||||
0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x7f, 0x55, 0x55, 0xfd,
|
||||
0xd5, 0x7f, 0x00, 0x00, 0x00, 0xc0, 0xaf, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
|
||||
0xaa, 0xaa, 0xaa, 0xbe, 0xaa, 0xaa, 0xfa, 0xaa, 0x7f, 0x00, 0x00, 0x00,
|
||||
0x00, 0xbf, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xfe, 0xaa,
|
||||
0xaa, 0xea, 0xbf, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x5f, 0x55, 0x55, 0x55,
|
||||
0x55, 0x55, 0x55, 0x55, 0x55, 0xff, 0x55, 0x55, 0xd5, 0xdf, 0x0f, 0x00,
|
||||
0x00, 0x00, 0x00, 0xe0, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55,
|
||||
0xfd, 0x55, 0xd5, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xaa,
|
||||
0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xfa, 0xaa, 0xea, 0xff, 0x7f,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
|
||||
0xaa, 0xaa, 0xea, 0xab, 0xea, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0xe0, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0xd5, 0x57, 0xd5,
|
||||
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x55, 0x55, 0x55, 0x55,
|
||||
0x55, 0x55, 0x55, 0x55, 0xd5, 0x57, 0xfd, 0x01, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0xe0, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
|
||||
0xbf, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xaa, 0xaa,
|
||||
0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xbf, 0x0f, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0xf8, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55,
|
||||
0x55, 0x55, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8,
|
||||
0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0xff, 0x03, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb8, 0xaa, 0xae, 0xaa, 0xaa, 0xaa,
|
||||
0xaa, 0xaa, 0xaa, 0xaa, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0xb8, 0xaa, 0xae, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0x1f,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5f, 0xd5, 0x5f, 0x55,
|
||||
0x55, 0x55, 0xf5, 0xff, 0x55, 0xd5, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x5f, 0xd5, 0x5f, 0x55, 0x55, 0x55, 0xf5, 0xff, 0x55,
|
||||
0xd5, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xaf, 0xaa,
|
||||
0xfb, 0xea, 0xea, 0xff, 0xff, 0xeb, 0xab, 0x3a, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0xaf, 0xaa, 0xfb, 0xea, 0xea, 0xff, 0xff,
|
||||
0xeb, 0xab, 0x3a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0,
|
||||
0x57, 0xf5, 0xd5, 0xff, 0x1f, 0x00, 0x00, 0x7f, 0x55, 0x3f, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x57, 0xf5, 0xd5, 0xff, 0x1f,
|
||||
0x00, 0x00, 0x7f, 0x55, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0xf8, 0xaa, 0xfe, 0xaa, 0x07, 0x00, 0x00, 0x00, 0xfc, 0xea, 0x07,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb8, 0xaa, 0xfe, 0xab,
|
||||
0x07, 0x00, 0x00, 0x00, 0xbc, 0xfa, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x78, 0x55, 0xfd, 0x55, 0x07, 0x00, 0x00, 0x00, 0x5c,
|
||||
0xf5, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0xf5,
|
||||
0x83, 0x55, 0x07, 0x00, 0x00, 0x00, 0x57, 0x7f, 0x3f, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0xbe, 0xea, 0x83, 0xab, 0x07, 0x00, 0x00,
|
||||
0x00, 0xab, 0xbe, 0x3e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80,
|
||||
0xaf, 0xfa, 0x80, 0xaf, 0x1f, 0x00, 0x00, 0xe0, 0xab, 0xae, 0x3a, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x57, 0xfd, 0x80, 0x5f, 0x1f,
|
||||
0x00, 0x00, 0xe0, 0x57, 0x5f, 0x3d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0xf0, 0x57, 0x1f, 0x00, 0x7e, 0xfd, 0x00, 0x00, 0xf8, 0xf5, 0x7f,
|
||||
0x3d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xaf, 0x1f, 0x00,
|
||||
0xbe, 0xfa, 0x00, 0x00, 0xf8, 0xea, 0xbf, 0x3a, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0xf0, 0xaa, 0x07, 0x00, 0xf0, 0xef, 0x00, 0x00, 0xbe,
|
||||
0x7e, 0xb0, 0xfa, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x55,
|
||||
0x07, 0x00, 0xf0, 0xf7, 0x00, 0x00, 0x5e, 0x7d, 0x70, 0xfd, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x55, 0x1f, 0x00, 0x00, 0xff, 0x00,
|
||||
0x00, 0x56, 0x1d, 0xf0, 0xd7, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0xf0, 0xab, 0x1f, 0x00, 0x00, 0xff, 0x00, 0x00, 0xae, 0x1e, 0xf0, 0xef,
|
||||
0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xbe, 0xfa, 0x00, 0x00,
|
||||
0x00, 0x00, 0xc0, 0xaf, 0x03, 0x00, 0xbe, 0x1f, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0xf8, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x7f,
|
||||
0x00, 0xf8, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x1f,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x7f, 0x00, 0xf8, 0x1f, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0xe0, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0xc0, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x1f, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00};
|
File diff suppressed because it is too large
Load diff
|
@ -1,213 +0,0 @@
|
|||
/*
|
||||
* CDE - Common Desktop Environment
|
||||
*
|
||||
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
|
||||
*
|
||||
* These libraries and programs are free software; you can
|
||||
* redistribute them and/or modify them under the terms of the GNU
|
||||
* Lesser General Public License as published by the Free Software
|
||||
* Foundation; either version 2 of the License, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* These libraries and programs are distributed in the hope that
|
||||
* they will be useful, but WITHOUT ANY WARRANTY; without even the
|
||||
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU Lesser General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with these libraries and programs; if not, write
|
||||
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
|
||||
* Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/*
|
||||
* (c) Copyright 1989, 1990, 1991, 1992, 1993 OPEN SOFTWARE FOUNDATION, INC.
|
||||
* ALL RIGHTS RESERVED
|
||||
*/
|
||||
/*
|
||||
* Motif Release 1.2.2
|
||||
*/
|
||||
/* $XConsortium: DNDDemo.h /main/4 1995/10/27 10:43:48 rswiston $ */
|
||||
/*
|
||||
* (c) Copyright 1987, 1988, 1989 HEWLETT-PACKARD COMPANY */
|
||||
/*
|
||||
* file: DNDDemo.h
|
||||
*
|
||||
* Header file for the program DNDDemo.
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <X11/Xatom.h>
|
||||
#include <X11/Intrinsic.h>
|
||||
#include <Xm/Xm.h>
|
||||
#include <Xm/AtomMgr.h>
|
||||
#include <Xm/MainW.h>
|
||||
#include <Xm/DrawingA.h>
|
||||
#include <Xm/SeparatoG.h>
|
||||
#include <Xm/Form.h>
|
||||
#include <Xm/RowColumn.h>
|
||||
#include <Xm/PushB.h>
|
||||
#include <Xm/MessageB.h>
|
||||
#include <Xm/DragDrop.h>
|
||||
#include <Xm/Screen.h>
|
||||
|
||||
|
||||
/* The following is used to layout the color labels */
|
||||
#define BOX_WIDTH 85
|
||||
#define BOX_HEIGHT 25
|
||||
#define BOX_X_OFFSET 95
|
||||
#define BOX_Y_OFFSET 35
|
||||
#define BOX_X_MARGIN 10
|
||||
#define BOX_Y_MARGIN 10
|
||||
|
||||
/* The following are used in setting up the drag icons */
|
||||
#define ICON_WIDTH 32
|
||||
#define ICON_HEIGHT 32
|
||||
#define SMALL_ICON_WIDTH 16
|
||||
#define SMALL_ICON_HEIGHT 16
|
||||
#define ICON_X_HOT 0
|
||||
#define ICON_Y_HOT 0
|
||||
|
||||
/* Some scales or text entry field could be added to change this value */
|
||||
#define RECT_WIDTH 20
|
||||
#define RECT_HEIGHT 50
|
||||
|
||||
/* The following defines could be setup as application resources */
|
||||
#define RECT_START_COLOR "black"
|
||||
#define HIGHLIGHT_THICKNESS 3
|
||||
#define HIGHLIGHT_COLOR "Black" /* this is equivalent to gray60
|
||||
in the R5 rgb.txt */
|
||||
#define DRAW_AREA_BG_COLOR "white"
|
||||
#define DRAW_AREA_FG_COLOR "black" /* 5127 fix */
|
||||
#define LABEL1_COLOR "#ff5026" /* a slight softer shade of red,
|
||||
red was too dark */
|
||||
#define LABEL2_COLOR "orange"
|
||||
#define LABEL3_COLOR "yellow"
|
||||
#define LABEL4_COLOR "violet"
|
||||
#define LABEL5_COLOR "#00C3ff" /* a blue green color,
|
||||
blue was too dark */
|
||||
#define LABEL6_COLOR "green"
|
||||
|
||||
#define VALID_CURSOR_FG_COLOR "black"
|
||||
#define INVALID_CURSOR_FG_COLOR "maroon"
|
||||
#define NONE_CURSOR_FG_COLOR "maroon"
|
||||
|
||||
|
||||
/*
|
||||
* This struct is used to contain information about each rectangle
|
||||
* to use in the dislay routines
|
||||
*/
|
||||
typedef struct _RectStruct {
|
||||
Position x;
|
||||
Position y;
|
||||
Dimension width;
|
||||
Dimension height;
|
||||
Pixel color;
|
||||
Pixmap pixmap; /* currently not in use */
|
||||
} RectStruct, *RectPtr;
|
||||
|
||||
/* This struct is used to hold global application information */
|
||||
typedef struct _AppInfoRec {
|
||||
GC rectGC; /* graphic context used to draw the rectangles */
|
||||
Pixel currentColor; /* color that is currently in the GC */
|
||||
RectPtr *rectDpyTable; /* the rectangle display table */
|
||||
int rectsAllocd; /* keeps track of how much the above
|
||||
table has been alloc'd */
|
||||
int numRects; /* the number of rects that are visible */
|
||||
RectPtr highlightRect; /* the current highlighted rectangle */
|
||||
RectPtr clearRect; /* the rectangle that is being moved */
|
||||
Boolean doMove; /* indicates that a move is being performed */
|
||||
Boolean creatingRect; /* indicates that a rect create is being
|
||||
performed */
|
||||
unsigned char operation;/* indicates the drop help operation */
|
||||
unsigned int maxCursorWidth; /* the maximum allowable cursor width */
|
||||
unsigned int maxCursorHeight; /* the maximum allowable cursor height */
|
||||
Position rectX;
|
||||
Position rectY;
|
||||
Position rectX2;
|
||||
Position rectY2;
|
||||
} AppInfoRec, *AppInfo;
|
||||
|
||||
/*
|
||||
* This struct is used to pass information
|
||||
* from the dropProc to the transferProc
|
||||
*/
|
||||
typedef struct _DropTransferRec {
|
||||
Widget widget;
|
||||
Position x;
|
||||
Position y;
|
||||
} DropTransferRec, *DropTransfer;
|
||||
|
||||
/*
|
||||
* This struct is used to pass information
|
||||
* from the rectangle dragStart proc to it's associated
|
||||
* callback procs.
|
||||
*/
|
||||
typedef struct _DragConvertRec {
|
||||
Widget widget;
|
||||
RectPtr rect;
|
||||
} DragConvertRec, *DragConvertPtr;
|
||||
|
||||
|
||||
|
||||
extern void InitializeAppInfo(void );
|
||||
extern void StartRect(Widget , XEvent *, String *, Cardinal *);
|
||||
extern void ExtendRect(Widget , XEvent *, String *, Cardinal *);
|
||||
extern void EndRect(Widget , XEvent *, String *, Cardinal *);
|
||||
extern RectPtr RectCreate(Position , Position , Dimension ,
|
||||
Dimension , Pixel , Pixmap );
|
||||
extern RectPtr RectFind(Position , Position );
|
||||
extern void RectSetColor(RectPtr , Display *, Window , Pixel );
|
||||
extern Pixel RectGetColor(RectPtr );
|
||||
extern Pixmap GetBitmapFromRect(Widget , RectPtr , Pixel , Pixel ,
|
||||
Dimension *, Dimension *);
|
||||
extern void RectHide(Display *, Window , RectPtr );
|
||||
extern void RectFree(RectPtr );
|
||||
extern void RedrawRectangles(Widget );
|
||||
extern void RectDrawStippled(Display *, Window , RectPtr );
|
||||
extern void RectHighlight(Widget , RectPtr );
|
||||
extern void RectUnhighlight(Widget );
|
||||
extern void RectSetPixmap(RectPtr , Display *, Window , Pixmap );
|
||||
extern void RectRegister(RectPtr , Position , Position );
|
||||
extern void InitializeRectDpyTable(void );
|
||||
extern void CreateLayout(void );
|
||||
extern void CreateRectGC(void );
|
||||
extern Pixel GetColor(char *);
|
||||
extern void ColorRect(Widget , XEvent *, String *, Cardinal *);
|
||||
|
||||
|
||||
|
||||
/* The following character arrays hold the bits for
|
||||
* the source and state icons for both 32x32 and 16x16 drag icons.
|
||||
* The source is a color palatte icon and the state is a paint brush icon.
|
||||
*/
|
||||
extern unsigned char SOURCE_ICON_BITS[];
|
||||
extern unsigned char SOURCE_ICON_MASK[];
|
||||
extern unsigned char STATE_ICON_BITS[];
|
||||
extern unsigned char STATE_ICON_MASK[];
|
||||
extern unsigned char INVALID_ICON_BITS[];
|
||||
extern unsigned char SMALL_SOURCE_ICON_BITS[];
|
||||
extern unsigned char SMALL_SOURCE_ICON_MASK[];
|
||||
extern unsigned char SMALL_STATE_ICON_BITS[];
|
||||
extern unsigned char SMALL_STATE_ICON_MASK[];
|
||||
extern unsigned char SMALL_INVALID_ICON_BITS[];
|
||||
|
||||
/* The following character arrays are for use with the drop help
|
||||
* dialogs. For internationalization, message catalogs should
|
||||
* replace these static declarations.
|
||||
*/
|
||||
extern char HELP_MSG1[];
|
||||
extern char HELP_MSG2[];
|
||||
extern char HELP_MSG3[];
|
||||
extern char HELP_MSG4[];
|
||||
extern char HELP_MSG5[];
|
||||
|
||||
|
||||
/* Globals variables */
|
||||
extern AppInfo appInfo;
|
||||
extern Widget topLevel;
|
||||
extern Widget drawingArea;
|
||||
extern Widget helpDialog;
|
||||
extern Widget helpLabel, helpMenu;
|
||||
extern XtAppContext appContext;
|
||||
|
File diff suppressed because it is too large
Load diff
|
@ -1,45 +0,0 @@
|
|||
# $XConsortium: Makefile.hp /main/2 1996/05/13 11:58:02 drk $
|
||||
##########################################################################
|
||||
#
|
||||
# Makefile for motif drag and drop examples (HP)
|
||||
#
|
||||
# (c) Copyright 1993, 1994 Hewlett-Packard Company
|
||||
# (c) Copyright 1993, 1994 International Business Machines Corp.
|
||||
# (c) Copyright 1993, 1994 Sun Microsystems, Inc.
|
||||
# (c) Copyright 1993, 1994 Novell, Inc.
|
||||
#
|
||||
##########################################################################
|
||||
|
||||
CC = cc
|
||||
RM = rm -f
|
||||
|
||||
PROGRAM = DNDDemo
|
||||
SOURCES = DNDDemo.c DNDDraw.c
|
||||
OBJECTS = DNDDemo.o DNDDraw.o
|
||||
|
||||
DEFINES =
|
||||
CDEBUGFLAGS = -O
|
||||
CFLAGS = -Aa -z $(DEFINES) $(CDEBUGFLAGS)
|
||||
|
||||
DTINCLUDE = -I/usr/dt/include
|
||||
X11INCLUDE = -I/usr/include/X11R5
|
||||
|
||||
INCLUDES = $(DTINCLUDE) $(X11INCLUDE)
|
||||
|
||||
DTLIBS = -L/usr/dt/lib -lDtWidget -lXm
|
||||
X11LIBS = -L/usr/lib/X11R5 -lXt -lX11
|
||||
SYSLIBS =
|
||||
|
||||
LIBRARIES = $(DTLIBS) $(X11LIBS) $(SYSLIBS)
|
||||
LDFLAGS =
|
||||
|
||||
.c.o:
|
||||
${CC} -c $(CFLAGS) $(INCLUDES) $<
|
||||
|
||||
all:: $(PROGRAM)
|
||||
|
||||
$(PROGRAM):: $(OBJECTS)
|
||||
${CC} -o $(PROGRAM) $(LDFLAGS) $(OBJECTS) $(LIBRARIES)
|
||||
|
||||
clean::
|
||||
${RM} $(PROGRAM) $(OBJECTS)
|
|
@ -1,45 +0,0 @@
|
|||
# $XConsortium: Makefile.ibm /main/2 1996/05/13 11:58:19 drk $
|
||||
##########################################################################
|
||||
#
|
||||
# Makefile for motif drag and drop examples (IBM)
|
||||
#
|
||||
# (c) Copyright 1993, 1994 Hewlett-Packard Company
|
||||
# (c) Copyright 1993, 1994 International Business Machines Corp.
|
||||
# (c) Copyright 1993, 1994 Sun Microsystems, Inc.
|
||||
# (c) Copyright 1993, 1994 Novell, Inc.
|
||||
#
|
||||
##########################################################################
|
||||
|
||||
CC = cc
|
||||
RM = rm -f
|
||||
|
||||
PROGRAM = DNDDemo
|
||||
SOURCES = DNDDemo.c DNDDraw.c
|
||||
OBJECTS = DNDDemo.o DNDDraw.o
|
||||
|
||||
DEFINES =
|
||||
CDEBUGFLAGS = -O
|
||||
CFLAGS = $(DEFINES) $(CDEBUGFLAGS)
|
||||
|
||||
DTINCLUDE = -I/usr/dt/include
|
||||
X11INCLUDE = -I/usr/include
|
||||
|
||||
INCLUDES = $(DTINCLUDE) $(X11INCLUDE)
|
||||
|
||||
DTLIBS = -L/usr/dt/lib -lDtWidget -lXm
|
||||
X11LIBS = -L/usr/lib -lXt -lX11
|
||||
SYSLIBS =
|
||||
|
||||
LIBRARIES = $(DTLIBS) $(X11LIBS) $(SYSLIBS)
|
||||
LDFLAGS =
|
||||
|
||||
.c.o:
|
||||
$(CC) -c $(CFLAGS) $(INCLUDES) $<
|
||||
|
||||
all:: $(PROGRAM)
|
||||
|
||||
$(PROGRAM):: $(OBJECTS)
|
||||
$(CC) -o $(PROGRAM) $(LDFLAGS) $(OBJECTS) $(LIBRARIES)
|
||||
|
||||
clean::
|
||||
$(RM) $(PROGRAM) $(OBJECTS)
|
|
@ -1,45 +0,0 @@
|
|||
# $XConsortium: Makefile.novell /main/2 1996/05/13 11:58:35 drk $
|
||||
##########################################################################
|
||||
#
|
||||
# Makefile for motif drag and drop examples (Novell)
|
||||
#
|
||||
# (c) Copyright 1993, 1994 Hewlett-Packard Company
|
||||
# (c) Copyright 1993, 1994 International Business Machines Corp.
|
||||
# (c) Copyright 1993, 1994 Sun Microsystems, Inc.
|
||||
# (c) Copyright 1993, 1994 Novell, Inc.
|
||||
#
|
||||
##########################################################################
|
||||
|
||||
CC = cc
|
||||
RM = rm -f
|
||||
|
||||
PROGRAM = DNDDemo
|
||||
SOURCES = DNDDemo.c DNDDraw.c
|
||||
OBJECTS = DNDDemo.o DNDDraw.o
|
||||
|
||||
DEFINES =
|
||||
CDEBUGFLAGS = -O
|
||||
CFLAGS = -Xc $(DEFINES) $(CDEBUGFLAGS)
|
||||
|
||||
DTINCLUDE = -I/usr/dt/include
|
||||
X11INCLUDE = -I/usr/X/include
|
||||
|
||||
INCLUDES = $(DTINCLUDE) $(X11INCLUDE)
|
||||
|
||||
DTLIBS = -L/usr/dt/lib -lDtWidget -lXm
|
||||
X11LIBS = -L/usr/X/lib -lXt -lX11
|
||||
SYSLIBS = -lw -lgen -lnsl -lresolv -lsocket -lXIM
|
||||
|
||||
LIBRARIES = $(DTLIBS) $(X11LIBS) $(SYSLIBS)
|
||||
LDFLAGS =
|
||||
|
||||
.c.o:
|
||||
$(CC) -c $(CFLAGS) $(INCLUDES) $<
|
||||
|
||||
all:: $(PROGRAM)
|
||||
|
||||
$(PROGRAM):: $(OBJECTS)
|
||||
$(CC) -o $(PROGRAM) $(LDFLAGS) $(OBJECTS) $(LIBRARIES)
|
||||
|
||||
clean::
|
||||
$(RM) $(PROGRAM) $(OBJECTS)
|
|
@ -1,45 +0,0 @@
|
|||
# $XConsortium: Makefile.sun /main/2 1996/05/13 11:58:52 drk $
|
||||
##########################################################################
|
||||
#
|
||||
# Makefile for motif drag and drop examples (SUN)
|
||||
#
|
||||
# (c) Copyright 1993, 1994 Hewlett-Packard Company
|
||||
# (c) Copyright 1993, 1994 International Business Machines Corp.
|
||||
# (c) Copyright 1993, 1994 Sun Microsystems, Inc.
|
||||
# (c) Copyright 1993, 1994 Novell, Inc.
|
||||
#
|
||||
##########################################################################
|
||||
|
||||
CC = cc
|
||||
RM = rm -f
|
||||
|
||||
PROGRAM = DNDDemo
|
||||
SOURCES = DNDDemo.c DNDDraw.c
|
||||
OBJECTS = DNDDemo.o DNDDraw.o
|
||||
|
||||
DEFINES =
|
||||
CDEBUGFLAGS = -O
|
||||
CFLAGS = $(DEFINES) $(CDEBUGFLAGS)
|
||||
|
||||
DTINCLUDE = -I/usr/dt/include
|
||||
X11INCLUDE = -I/usr/openwin/include
|
||||
|
||||
INCLUDES = $(DTINCLUDE) $(X11INCLUDE)
|
||||
|
||||
DTLIBS = -L/usr/dt/lib -lDtWidget -lXm
|
||||
X11LIBS = -L/usr/openwin/lib -lXt -lX11
|
||||
SYSLIBS = -ldl -lw -lgen
|
||||
|
||||
LIBRARIES = $(DTLIBS) $(X11LIBS) $(SYSLIBS)
|
||||
LDFLAGS = -R/usr/dt/lib:/usr/openwin/lib
|
||||
|
||||
.c.o:
|
||||
$(CC) -c $(CFLAGS) $(INCLUDES) $<
|
||||
|
||||
all:: $(PROGRAM)
|
||||
|
||||
$(PROGRAM):: $(OBJECTS)
|
||||
$(CC) -o $(PROGRAM) $(LDFLAGS) $(OBJECTS) $(LIBRARIES)
|
||||
|
||||
clean::
|
||||
$(RM) $(PROGRAM) $(OBJECTS)
|
|
@ -1,46 +0,0 @@
|
|||
# $XConsortium: Makefile.uxp /main/2 1996/05/13 11:59:16 drk $
|
||||
##########################################################################
|
||||
#
|
||||
# Makefile for motif drag and drop examples (UXP)
|
||||
#
|
||||
# (Fujitsu.patch applied)
|
||||
#
|
||||
# (c) Copyright 1993, 1994 Hewlett-Packard Company
|
||||
# (c) Copyright 1993, 1994 International Business Machines Corp.
|
||||
# (c) Copyright 1993, 1994 Sun Microsystems, Inc.
|
||||
# (c) Copyright 1993, 1994 Novell, Inc.
|
||||
#
|
||||
##########################################################################
|
||||
|
||||
CC = cc
|
||||
RM = rm -f
|
||||
|
||||
PROGRAM = DNDDemo
|
||||
SOURCES = DNDDemo.c DNDDraw.c
|
||||
OBJECTS = DNDDemo.o DNDDraw.o
|
||||
|
||||
DEFINES =
|
||||
CDEBUGFLAGS = -O
|
||||
CFLAGS = -Xc $(DEFINES) $(CDEBUGFLAGS)
|
||||
|
||||
DTINCLUDE = -I/usr/dt/include
|
||||
|
||||
INCLUDES = $(DTINCLUDE)
|
||||
|
||||
DTLIBS = -L/usr/dt/lib -lDtWidget -lDtSvc -ltt -lXm
|
||||
X11LIBS = -lXt -lX11
|
||||
SYSLIBS = -lw -lgen -lnsl -lresolv -lsocket
|
||||
|
||||
LIBRARIES = $(DTLIBS) $(X11LIBS) $(SYSLIBS)
|
||||
LDFLAGS =
|
||||
|
||||
.c.o:
|
||||
$(CC) -c $(CFLAGS) $(INCLUDES) $<
|
||||
|
||||
all:: $(PROGRAM)
|
||||
|
||||
$(PROGRAM):: $(OBJECTS)
|
||||
$(CC) -o $(PROGRAM) $(LDFLAGS) $(OBJECTS) $(LIBRARIES)
|
||||
|
||||
clean::
|
||||
$(RM) $(PROGRAM) $(OBJECTS)
|
|
@ -1,76 +0,0 @@
|
|||
/* $XConsortium: README /main/2 1996/07/15 14:04:42 drk $ */
|
||||
|
||||
This directory contains an example illustrating a typical use of
|
||||
the Motif DragAndDrop feature.
|
||||
|
||||
When the demo comes up, it does not have any valid drop sites. It
|
||||
comes up with different color rectangles which act as drag sources
|
||||
for dragging the colors around. You can create the drop sites as
|
||||
follows:
|
||||
Move the pointer into the drawing area (with white background).
|
||||
Press MouseBtn1 and drag. You will see the rubberbanding effect.
|
||||
Release MouseBtn1 after dragging some distance. A rectangle
|
||||
will appear with one of its corners corresponding to the point
|
||||
of MouseBtn1 press, and the diagonally opposite corner
|
||||
corresponding to the point of MouseBtn1 release. The rectangle
|
||||
comes up filled with black by default. You can create any number
|
||||
of rectangles like this.
|
||||
|
||||
To initiate a drag, you move the pointer over to the drag source,
|
||||
press BTransfer (which is MouseBtn2 by default), and start dragging.
|
||||
Immediately, you will notice that the cursor changes to a painter's
|
||||
palette in the same color as the color rectangle from which the
|
||||
drag is initiated.
|
||||
|
||||
The rectanlges inside the drawing area that you created will act
|
||||
as valid drop sites for colors. You can test this by, for example,
|
||||
initiating the drag from the yellow color rectangle, dragging over
|
||||
to one of the rectangles inside the drawing area, and releasing
|
||||
BTransfer.
|
||||
|
||||
While you are dragging, you will notice several things.
|
||||
When you are dragging over root window, the dragicon consists of
|
||||
only the painter's palette. When you drag over parts of the
|
||||
drawing area where there are no rectangles, you will notice that
|
||||
the dragicon changes to include a "DO NOT ENTER!" sign on top of
|
||||
the painter's palette; when you are dragging over any of the
|
||||
rectangles inside the drawing area, you will see that the
|
||||
"DO NOT ENTER!" sign gets replaced with a painter's brush.
|
||||
|
||||
To attempt a drop, you will release BTransfer. If you release
|
||||
BTranfer with the pointer over any part of drawing area outside
|
||||
of the rectangles, or anywhere on the root window, you will see
|
||||
that the dragicon snaps back to the point of drag initiation,
|
||||
and disappears. This is an indication that the drop you
|
||||
attempted was a failure. On the other hand, if you release
|
||||
BTransfer with the pointer over any of the rectangles inside
|
||||
the drawing area, you will see that the dragicon melts into
|
||||
the background and disappears; this indicates that the drop
|
||||
you attempted was a success. Also, when the rectangle on which
|
||||
the drop was attempted, gets filled with the color that was
|
||||
being dragged around (yellow, in our example).
|
||||
|
||||
The rectangles inside the drawing area themselves act as drag
|
||||
sources. You can initiate the drag with the pointer on any
|
||||
rectangle, and you will notice that the cursor changes to
|
||||
a rectangle (either of the same size or a smaller size depending
|
||||
on X cursor size constraints). You can drag a rectangle from
|
||||
one place and drop it onto a new place inside the drawing area.
|
||||
The rectangle gets physically moved to the new position. If,
|
||||
on the other hand, you want to copy the rectangle to a new
|
||||
position, you can use the appropriate modifier key while dragging,
|
||||
and/or at the time you attempt the drop (<Ctrl> is the modifier
|
||||
key for copy in the current implementation). When you drag
|
||||
a rectangle with no modifier key pressed or with <Shift>
|
||||
pressed, you will notice that the solid rectangle from where
|
||||
you initiated the drag gets replaced by a hollow rectangle with
|
||||
dotted-line borders. It will continue to be this way, for
|
||||
the duration of the drag or until you press the <Ctrl> key,
|
||||
which will change the operation to Copy; at which time it will
|
||||
regain its original solid form.
|
||||
|
||||
A couple of other things to note. Anytime during dragging, you
|
||||
can cancel that drag by hitting the Cancel key. Also, during
|
||||
dragging, anytime you hit the Help key, you will get a dialog
|
||||
giving you some information about whether the drop will
|
||||
succeed, what are the drop operations possible, etc.
|
|
@ -1,52 +0,0 @@
|
|||
# $XConsortium: Makefile.hp /main/2 1996/05/13 11:59:34 drk $
|
||||
##########################################################################
|
||||
#
|
||||
# Makefile for Motif periodic table of widgets (HP)
|
||||
#
|
||||
# (c) Copyright 1993, 1994 Hewlett-Packard Company
|
||||
# (c) Copyright 1993, 1994 International Business Machines Corp.
|
||||
# (c) Copyright 1993, 1994 Sun Microsystems, Inc.
|
||||
# (c) Copyright 1993, 1994 Novell, Inc.
|
||||
#
|
||||
##########################################################################
|
||||
|
||||
CC = cc
|
||||
RM = rm -f
|
||||
UIL = /usr/dt/bin/uil
|
||||
|
||||
PROGRAM = periodic
|
||||
SOURCES = periodic.c
|
||||
OBJECTS = periodic.o
|
||||
UID = periodic.uid
|
||||
UILSOURCE = periodic.uil
|
||||
|
||||
DEFINES =
|
||||
CDEBUGFLAGS = -O
|
||||
CFLAGS = -Aa -z $(DEFINES) $(CDEBUGFLAGS)
|
||||
|
||||
DTINCLUDE = -I/usr/dt/include
|
||||
X11INCLUDE = -I/usr/include/X11R5
|
||||
|
||||
INCLUDES = $(DTINCLUDE) $(X11INCLUDE)
|
||||
|
||||
DTLIBS = -L/usr/dt/lib -lMrm -lXm
|
||||
X11LIBS = -L/usr/lib/X11R5 -lXt -lX11
|
||||
SYSLIBS =
|
||||
|
||||
LIBRARIES = $(DTLIBS) $(X11LIBS) $(SYSLIBS)
|
||||
LDFLAGS =
|
||||
|
||||
.c.o:
|
||||
${CC} -c $(CFLAGS) $(INCLUDES) $<
|
||||
|
||||
all:: $(PROGRAM) $(UID)
|
||||
|
||||
$(PROGRAM):: $(OBJECTS)
|
||||
$(CC) -o $(PROGRAM) $(LDFLAGS) $(OBJECTS) $(LIBRARIES)
|
||||
|
||||
$(UID):: $(UILSOURCE)
|
||||
$(UIL) -o $(UID) $(UILSOURCE)
|
||||
|
||||
clean::
|
||||
$(RM) $(PROGRAM) $(OBJECTS) $(UID)
|
||||
|
|
@ -1,51 +0,0 @@
|
|||
# $XConsortium: Makefile.ibm /main/2 1996/05/13 11:59:52 drk $
|
||||
##########################################################################
|
||||
#
|
||||
# Makefile for Motif periodic table of widgets (IBM)
|
||||
#
|
||||
# (c) Copyright 1993, 1994 Hewlett-Packard Company
|
||||
# (c) Copyright 1993, 1994 International Business Machines Corp.
|
||||
# (c) Copyright 1993, 1994 Sun Microsystems, Inc.
|
||||
# (c) Copyright 1993, 1994 Novell, Inc.
|
||||
#
|
||||
##########################################################################
|
||||
|
||||
CC = cc
|
||||
RM = rm -f
|
||||
UIL = /usr/dt/bin/uil
|
||||
|
||||
PROGRAM = periodic
|
||||
SOURCES = periodic.c
|
||||
OBJECTS = periodic.o
|
||||
UID = periodic.uid
|
||||
UILSOURCE = periodic.uil
|
||||
|
||||
DEFINES =
|
||||
CDEBUGFLAGS = -O
|
||||
CFLAGS = $(DEFINES) $(CDEBUGFLAGS)
|
||||
|
||||
DTINCLUDE = -I/usr/dt/include
|
||||
X11INCLUDE = -I/usr/include
|
||||
|
||||
INCLUDES = $(DTINCLUDE) $(X11INCLUDE)
|
||||
|
||||
DTLIBS = -L/usr/dt/lib -lMrm -lXm
|
||||
X11LIBS = -L/usr/lib -lXt -lX11
|
||||
SYSLIBS =
|
||||
|
||||
LIBRARIES = $(DTLIBS) $(X11LIBS) $(SYSLIBS)
|
||||
LDFLAGS =
|
||||
|
||||
.c.o:
|
||||
$(CC) -c $(CFLAGS) $(INCLUDES) $<
|
||||
|
||||
all:: $(PROGRAM) $(UID)
|
||||
|
||||
$(PROGRAM):: $(OBJECTS)
|
||||
$(CC) -o $(PROGRAM) $(LDFLAGS) $(OBJECTS) $(LIBRARIES)
|
||||
|
||||
$(UID):: $(UILSOURCE)
|
||||
$(UIL) -o $(UID) $(UILSOURCE)
|
||||
|
||||
clean::
|
||||
$(RM) $(PROGRAM) $(OBJECTS) $(UID)
|
|
@ -1,52 +0,0 @@
|
|||
# $XConsortium: Makefile.novell /main/2 1996/05/13 12:00:12 drk $
|
||||
##########################################################################
|
||||
#
|
||||
# Makefile for Motif periodic table of widgets (Novell)
|
||||
#
|
||||
# (c) Copyright 1993, 1994 Hewlett-Packard Company
|
||||
# (c) Copyright 1993, 1994 International Business Machines Corp.
|
||||
# (c) Copyright 1993, 1994 Sun Microsystems, Inc.
|
||||
# (c) Copyright 1993, 1994 Novell, Inc.
|
||||
#
|
||||
##########################################################################
|
||||
|
||||
CC = cc
|
||||
RM = rm -f
|
||||
UIL = /usr/dt/bin/uil
|
||||
|
||||
PROGRAM = periodic
|
||||
SOURCES = periodic.c
|
||||
OBJECTS = periodic.o
|
||||
UID = periodic.uid
|
||||
UILSOURCE = periodic.uil
|
||||
|
||||
DEFINES =
|
||||
CDEBUGFLAGS = -O
|
||||
CFLAGS = -Xc $(DEFINES) $(CDEBUGFLAGS)
|
||||
|
||||
DTINCLUDE = -I/usr/dt/include
|
||||
X11INCLUDE = -I/usr/X/include
|
||||
|
||||
INCLUDES = $(DTINCLUDE) $(X11INCLUDE)
|
||||
|
||||
DTLIBS = -L/usr/dt/lib -lMrm -lXm
|
||||
X11LIBS = -L/usr/X/lib -lXt -lX11
|
||||
SYSLIBS = -lw -lgen -lnsl -lresolv -lsocket -lXIM
|
||||
|
||||
LIBRARIES = $(DTLIBS) $(X11LIBS) $(SYSLIBS)
|
||||
LDFLAGS =
|
||||
|
||||
.c.o:
|
||||
$(CC) -c $(CFLAGS) $(INCLUDES) $<
|
||||
|
||||
all:: $(PROGRAM) $(UID)
|
||||
|
||||
$(PROGRAM):: $(OBJECTS)
|
||||
$(CC) -o $(PROGRAM) $(LDFLAGS) $(OBJECTS) $(LIBRARIES)
|
||||
|
||||
$(UID):: $(UILSOURCE)
|
||||
$(UIL) -o $(UID) $(UILSOURCE)
|
||||
|
||||
clean::
|
||||
$(RM) $(PROGRAM) $(OBJECTS) $(UID)
|
||||
|
|
@ -1,51 +0,0 @@
|
|||
# $XConsortium: Makefile.sun /main/2 1996/05/13 12:00:27 drk $
|
||||
##########################################################################
|
||||
#
|
||||
# Makefile for Motif periodic table of widgets (SUN)
|
||||
#
|
||||
# (c) Copyright 1993, 1994 Hewlett-Packard Company
|
||||
# (c) Copyright 1993, 1994 International Business Machines Corp.
|
||||
# (c) Copyright 1993, 1994 Sun Microsystems, Inc.
|
||||
# (c) Copyright 1993, 1994 Novell, Inc.
|
||||
#
|
||||
##########################################################################
|
||||
|
||||
CC = cc
|
||||
RM = rm -f
|
||||
UIL = /usr/dt/bin/uil
|
||||
|
||||
PROGRAM = periodic
|
||||
SOURCES = periodic.c
|
||||
OBJECTS = periodic.o
|
||||
UID = periodic.uid
|
||||
UILSOURCE = periodic.uil
|
||||
|
||||
DEFINES =
|
||||
CDEBUGFLAGS = -O
|
||||
CFLAGS = $(DEFINES) $(CDEBUGFLAGS)
|
||||
|
||||
DTINCLUDE = -I/usr/dt/include
|
||||
X11INCLUDE = -I/usr/openwin/include
|
||||
|
||||
INCLUDES = $(DTINCLUDE) $(X11INCLUDE)
|
||||
|
||||
DTLIBS = -L/usr/dt/lib -lMrm -lXm
|
||||
X11LIBS = -L/usr/openwin/lib -lXt -lX11
|
||||
SYSLIBS = -ldl -lw -lgen
|
||||
|
||||
LIBRARIES = $(DTLIBS) $(X11LIBS) $(SYSLIBS)
|
||||
LDFLAGS = -R/usr/dt/lib:/usr/openwin/lib
|
||||
|
||||
.c.o:
|
||||
$(CC) -c $(CFLAGS) $(INCLUDES) $<
|
||||
|
||||
all:: $(PROGRAM) $(UID)
|
||||
|
||||
$(PROGRAM):: $(OBJECTS)
|
||||
$(CC) -o $(PROGRAM) $(LDFLAGS) $(OBJECTS) $(LIBRARIES)
|
||||
|
||||
$(UID):: $(UILSOURCE)
|
||||
$(UIL) -o $(UID) $(UILSOURCE)
|
||||
|
||||
clean::
|
||||
$(RM) $(PROGRAM) $(OBJECTS) $(UID)
|
|
@ -1,53 +0,0 @@
|
|||
# $XConsortium: Makefile.uxp /main/2 1996/05/13 12:00:43 drk $
|
||||
##########################################################################
|
||||
#
|
||||
# Makefile for Motif periodic table of widgets (UXP)
|
||||
#
|
||||
# (Fujitsu.patch applied)
|
||||
#
|
||||
# (c) Copyright 1993, 1994 Hewlett-Packard Company
|
||||
# (c) Copyright 1993, 1994 International Business Machines Corp.
|
||||
# (c) Copyright 1993, 1994 Sun Microsystems, Inc.
|
||||
# (c) Copyright 1993, 1994 Novell, Inc.
|
||||
#
|
||||
##########################################################################
|
||||
|
||||
CC = cc
|
||||
RM = rm -f
|
||||
UIL = /usr/dt/bin/uil
|
||||
|
||||
PROGRAM = periodic
|
||||
SOURCES = periodic.c
|
||||
OBJECTS = periodic.o
|
||||
UID = periodic.uid
|
||||
UILSOURCE = periodic.uil
|
||||
|
||||
DEFINES =
|
||||
CDEBUGFLAGS = -O
|
||||
CFLAGS = -Xc $(DEFINES) $(CDEBUGFLAGS)
|
||||
|
||||
DTINCLUDE = -I/usr/dt/include
|
||||
|
||||
INCLUDES = $(DTINCLUDE)
|
||||
|
||||
DTLIBS = -L/usr/dt/lib -lMrm -lXm
|
||||
X11LIBS = -lXt -lX11
|
||||
SYSLIBS = -lw -lgen -lnsl -lresolv -lsocket
|
||||
|
||||
LIBRARIES = $(DTLIBS) $(X11LIBS) $(SYSLIBS)
|
||||
LDFLAGS =
|
||||
|
||||
.c.o:
|
||||
$(CC) -c $(CFLAGS) $(INCLUDES) $<
|
||||
|
||||
all:: $(PROGRAM) $(UID)
|
||||
|
||||
$(PROGRAM):: $(OBJECTS)
|
||||
$(CC) -o $(PROGRAM) $(LDFLAGS) $(OBJECTS) $(LIBRARIES)
|
||||
|
||||
$(UID):: $(UILSOURCE)
|
||||
$(UIL) -o $(UID) $(UILSOURCE)
|
||||
|
||||
clean::
|
||||
$(RM) $(PROGRAM) $(OBJECTS) $(UID)
|
||||
|
|
@ -1,26 +0,0 @@
|
|||
! $XConsortium: Periodic.ad /main/2 1995/07/17 18:52:14 drk $
|
||||
periodic*XmText.columns: 10
|
||||
periodic*XmTextField.columns: 10
|
||||
periodic*scaleFrame*XmScale.width: 50
|
||||
periodic*scrollFrame*XmScrollBar.width: 50
|
||||
|
||||
periodic*fontList: *-*-Helvetica-medium-r-*-*-*-100-*-*-p-*-*-*
|
||||
|
||||
periodic*titleLabel.fontList: *-*-Helvetica-bold-r-*-*-*-180-*-*-p-*-*-*
|
||||
periodic*subtitleLabel.fontList: *-*-Helvetica-bold-r-*-*-*-140-*-*-p-*-*-*
|
||||
periodic*labelLabel.fontList: *-*-Helvetica-bold-r-*-*-*-180-*-*-p-*-*-*
|
||||
periodic*menuBar*fontList: *-*-Helvetica-medium-r-*-*-*-120-*-*-p-*-*-*
|
||||
periodic*popupMenu*fontList: *-*-Helvetica-medium-r-*-*-*-120-*-*-p-*-*-*
|
||||
periodic*XmMessageBox*fontList: *-*-Helvetica-medium-r-*-*-*-120-*-*-p-*-*-*
|
||||
periodic*fileDialog*fontList: *-*-Helvetica-medium-r-*-*-*-120-*-*-p-*-*-*
|
||||
periodic*selectDialog*fontList: *-*-Helvetica-medium-r-*-*-*-120-*-*-p-*-*-*
|
||||
periodic*promptDialog*fontList: *-*-Helvetica-medium-r-*-*-*-120-*-*-p-*-*-*
|
||||
|
||||
!periodic*background: gray
|
||||
!periodic*XmFrame.XmLabel.foreground: yellow
|
||||
!periodic*drawArea.background: mediumaquamarine
|
||||
!periodic*drawnButton.foreground: red
|
||||
!periodic*highlightColor: red
|
||||
|
||||
periodic*listFrame*selectionPolicy: XmEXTENDED_SELECT
|
||||
|
|
@ -1,21 +0,0 @@
|
|||
/* $XConsortium: README /main/2 1996/07/15 14:05:10 drk $ */
|
||||
|
||||
README for The Periodic Table of Motif Widgets
|
||||
|
||||
|
||||
PERIODIC v1.2
|
||||
-------------
|
||||
|
||||
This directory contains the sources for periodic. Periodic is a
|
||||
demo of the displayable widgets in Motif. Periodic presents many
|
||||
Motif widgets for your visual and sensual enjoyment.
|
||||
|
||||
The resources in the file Periodic.ad should be used. Either
|
||||
merge the file with your .Xdefaults, or copy it to your
|
||||
home directory and rename it to 'Periodic' - it will then be
|
||||
used as the application defaults file.
|
||||
|
||||
Ignore the color resources if you are displaying on a monochrome
|
||||
server. If the fonts do not exist on your server, change the
|
||||
resource to use a font of similar size.
|
||||
|
|
@ -1,657 +0,0 @@
|
|||
/*
|
||||
* CDE - Common Desktop Environment
|
||||
*
|
||||
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
|
||||
*
|
||||
* These libraries and programs are free software; you can
|
||||
* redistribute them and/or modify them under the terms of the GNU
|
||||
* Lesser General Public License as published by the Free Software
|
||||
* Foundation; either version 2 of the License, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* These libraries and programs are distributed in the hope that
|
||||
* they will be useful, but WITHOUT ANY WARRANTY; without even the
|
||||
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU Lesser General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with these libraries and programs; if not, write
|
||||
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
|
||||
* Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/*
|
||||
* (c) Copyright 1989, 1990, 1991, 1992, 1993 OPEN SOFTWARE FOUNDATION, INC.
|
||||
* ALL RIGHTS RESERVED
|
||||
*/
|
||||
/*
|
||||
* Motif Release 1.2.2
|
||||
*/
|
||||
#ifdef REV_INFO
|
||||
#ifndef lint
|
||||
static char rcsid[] = "$XConsortium: periodic.c /main/4 1995/10/27 10:44:10 rswiston $"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/******************************************************************************
|
||||
* periodic.c
|
||||
*
|
||||
* Copy and rename the file periodic.ad to Periodic in your home directory
|
||||
* or app-defaults directory, or merge it with your .Xdefaults file.
|
||||
*
|
||||
* It provides useful default values for Periodic fonts and colors
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <Xm/Xm.h>
|
||||
#include <Xm/Scale.h>
|
||||
#include <Xm/ToggleB.h>
|
||||
#include <Mrm/MrmPublic.h>
|
||||
|
||||
|
||||
typedef struct _DrawData {
|
||||
GC gc;
|
||||
Position drawX;
|
||||
Position drawY;
|
||||
Dimension drawWidth;
|
||||
Dimension drawHeight;
|
||||
} DrawData;
|
||||
|
||||
|
||||
static GC GetGC(
|
||||
Widget w );
|
||||
static void ConfigureDrawData(
|
||||
Widget w,
|
||||
DrawData *data );
|
||||
static void DrawButton(
|
||||
Widget w );
|
||||
static void DrawArea(
|
||||
Widget w );
|
||||
static void PopupHandler(
|
||||
Widget w,
|
||||
Widget pw,
|
||||
XEvent *event,
|
||||
Boolean *ctd );
|
||||
|
||||
static void ManageCb(
|
||||
Widget w,
|
||||
String id,
|
||||
XmToggleButtonCallbackStruct *cb );
|
||||
static void UnmapCb(
|
||||
Widget w,
|
||||
XtPointer cd,
|
||||
XtPointer cb );
|
||||
static void UnmanageCb(
|
||||
Widget w,
|
||||
String id,
|
||||
XtPointer cb );
|
||||
static void InitPopupCb(
|
||||
Widget w,
|
||||
String id,
|
||||
XtPointer cb );
|
||||
static void PopdownCb(
|
||||
Widget w,
|
||||
XtPointer cd,
|
||||
XtPointer cb );
|
||||
static void DaExposeCb(
|
||||
Widget w,
|
||||
XtPointer cd,
|
||||
XtPointer cb );
|
||||
static void DaResizeCb(
|
||||
Widget w,
|
||||
XtPointer cd,
|
||||
XtPointer cb );
|
||||
static void DbExposeCb(
|
||||
Widget w,
|
||||
XtPointer cd,
|
||||
XtPointer cb );
|
||||
static void DbResizeCb(
|
||||
Widget w,
|
||||
XtPointer cd,
|
||||
XtPointer cb );
|
||||
static void ScaleCb(
|
||||
Widget w,
|
||||
XtPointer cd,
|
||||
XtPointer cb );
|
||||
static void SetScaleCb(
|
||||
Widget w,
|
||||
int *value,
|
||||
XmToggleButtonCallbackStruct *cb );
|
||||
static void ViewCb(
|
||||
Widget w,
|
||||
XtPointer cd,
|
||||
XmToggleButtonCallbackStruct *cb );
|
||||
static void LayoutCb(
|
||||
Widget w,
|
||||
XtPointer cd,
|
||||
XmToggleButtonCallbackStruct *cb );
|
||||
static void ToggleLightsCb(
|
||||
Widget w,
|
||||
XtPointer cd,
|
||||
XmToggleButtonCallbackStruct *cb );
|
||||
static void ShowCb(
|
||||
Widget w,
|
||||
String id,
|
||||
XtPointer cb );
|
||||
static void ExitCb(
|
||||
Widget w,
|
||||
XtPointer cd,
|
||||
XtPointer cb );
|
||||
|
||||
static MrmHierarchy mrmId;
|
||||
static char *mrmFile[]={"periodic.uid"};
|
||||
static MrmCode mrmClass;
|
||||
static MRMRegisterArg mrmNames[] = {
|
||||
{"InitPopupCb", (XtPointer)InitPopupCb },
|
||||
{"PopdownCb", (XtPointer)PopdownCb },
|
||||
{"UnmapCb", (XtPointer)UnmapCb },
|
||||
{"UnmanageCb", (XtPointer)UnmanageCb },
|
||||
{"ManageCb", (XtPointer)ManageCb },
|
||||
{"DaExposeCb", (XtPointer)DaExposeCb },
|
||||
{"DaResizeCb", (XtPointer)DaResizeCb },
|
||||
{"DbExposeCb", (XtPointer)DbExposeCb },
|
||||
{"DbResizeCb", (XtPointer)DbResizeCb },
|
||||
{"ScaleCb", (XtPointer)ScaleCb },
|
||||
{"SetScaleCb", (XtPointer)SetScaleCb },
|
||||
{"ViewCb", (XtPointer)ViewCb },
|
||||
{"LayoutCb", (XtPointer)LayoutCb },
|
||||
{"ToggleLightsCb", (XtPointer)ToggleLightsCb },
|
||||
{"ShowCb", (XtPointer)ShowCb },
|
||||
{"ExitCb", (XtPointer)ExitCb }
|
||||
};
|
||||
|
||||
static String fallbackResources[] = {
|
||||
"periodic*XmText.columns: 10",
|
||||
"periodic*XmTextField.columns: 10",
|
||||
"periodic*scaleFrame*XmScale.width: 50",
|
||||
"periodic*scrollFrame*XmScrollBar.width: 50",
|
||||
|
||||
"periodic*fontList: *-*-*-medium-r-*-*-*-100-*-*-p-*-*-*",
|
||||
|
||||
"periodic*titleLabel.fontList: *-*-*-bold-r-*-*-*-180-*-*-p-*-*-*",
|
||||
"periodic*subtitleLabel.fontList: *-*-*-bold-r-*-*-*-140-*-*-p-*-*-*",
|
||||
"periodic*labelLabel.fontList: *-*-*-bold-r-*-*-*-180-*-*-p-*-*-*",
|
||||
"periodic*menuBar*fontList: *-*-*-medium-r-*-*-*-120-*-*-p-*-*-*",
|
||||
"periodic*popupMenu*fontList: *-*-*-medium-r-*-*-*-120-*-*-p-*-*-*",
|
||||
"periodic*XmMessageBox*fontList: *-*-*-medium-r-*-*-*-120-*-*-p-*-*-*",
|
||||
"periodic*fileDialog*fontList: *-*-*-medium-r-*-*-*-120-*-*-p-*-*-*",
|
||||
"periodic*selectDialog*fontList: *-*-*-medium-r-*-*-*-120-*-*-p-*-*-*",
|
||||
"periodic*promptDialog*fontList: *-*-*-medium-r-*-*-*-120-*-*-p-*-*-*",
|
||||
NULL
|
||||
};
|
||||
|
||||
static XtAppContext appContext;
|
||||
static Widget shell;
|
||||
|
||||
int
|
||||
main(
|
||||
int argc,
|
||||
char *argv[] )
|
||||
{
|
||||
Widget appMain;
|
||||
Display *display;
|
||||
Arg args[2];
|
||||
|
||||
XtToolkitInitialize();
|
||||
MrmInitialize ();
|
||||
appContext = XtCreateApplicationContext();
|
||||
XtAppSetFallbackResources (appContext, fallbackResources);
|
||||
display = XtOpenDisplay(appContext, NULL, "periodic", "Periodic",
|
||||
NULL, 0, &argc, argv);
|
||||
if (display == NULL) {
|
||||
fprintf(stderr, "%s: Can't open display\n", argv[0]);
|
||||
exit(1);
|
||||
}
|
||||
XtSetArg (args[0], XmNargc, argc);
|
||||
XtSetArg (args[1], XmNargv, argv);
|
||||
shell = XtAppCreateShell("periodic", "Periodic", applicationShellWidgetClass,
|
||||
display, args, 2);
|
||||
if (MrmOpenHierarchy (1, mrmFile, NULL, &mrmId) != MrmSUCCESS) exit(0);
|
||||
MrmRegisterNames(mrmNames, XtNumber(mrmNames));
|
||||
MrmFetchWidget (mrmId, "appMain", shell, &appMain, &mrmClass);
|
||||
XtManageChild(appMain);
|
||||
XtRealizeWidget(shell);
|
||||
XtAppMainLoop(appContext);
|
||||
}
|
||||
|
||||
static void
|
||||
ExitCb(
|
||||
Widget w,
|
||||
XtPointer cd,
|
||||
XtPointer cb )
|
||||
{
|
||||
exit(0);
|
||||
}
|
||||
|
||||
|
||||
/*****************************************************************
|
||||
*
|
||||
* Display selected Dialog widget
|
||||
*
|
||||
*****************************************************************/
|
||||
|
||||
static Widget managedToggle = NULL;
|
||||
|
||||
static void
|
||||
ManageCb(
|
||||
Widget w,
|
||||
String id,
|
||||
XmToggleButtonCallbackStruct *cb )
|
||||
{
|
||||
Widget dialog = XtNameToWidget (shell, id);
|
||||
|
||||
if (cb->set) {
|
||||
if (managedToggle != NULL)
|
||||
XmToggleButtonSetState (managedToggle, False, True);
|
||||
managedToggle = w;
|
||||
XtManageChild (dialog);
|
||||
}
|
||||
else {
|
||||
XtUnmanageChild (dialog);
|
||||
managedToggle = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
UnmapCb(
|
||||
Widget w,
|
||||
XtPointer cd,
|
||||
XtPointer cb )
|
||||
{
|
||||
XmToggleButtonSetState (managedToggle, False, True);
|
||||
}
|
||||
|
||||
static void
|
||||
UnmanageCb(
|
||||
Widget w,
|
||||
String id,
|
||||
XtPointer cb )
|
||||
{
|
||||
XtUnmanageChild (XtNameToWidget (shell, id));
|
||||
}
|
||||
|
||||
static void
|
||||
ShowCb(
|
||||
Widget w,
|
||||
String id,
|
||||
XtPointer cb )
|
||||
{
|
||||
static Widget tb = NULL;
|
||||
static Widget sc = NULL;
|
||||
int value;
|
||||
|
||||
if (tb == NULL) tb = XtNameToWidget (shell, "*toggleButton");
|
||||
if (sc == NULL) sc = XtNameToWidget (shell, "*valueScale");
|
||||
|
||||
XmScaleGetValue (sc, &value);
|
||||
if (XmToggleButtonGetState(tb) == True && value == 1012)
|
||||
XtManageChild (XtNameToWidget (shell, id));
|
||||
}
|
||||
|
||||
|
||||
/*****************************************************************
|
||||
*
|
||||
* Provide RadioBox behavior inside a PulldownMenu
|
||||
*
|
||||
*****************************************************************/
|
||||
|
||||
static void
|
||||
ViewCb(
|
||||
Widget w,
|
||||
XtPointer cd,
|
||||
XmToggleButtonCallbackStruct *cb )
|
||||
{
|
||||
static Widget viewToggle = NULL;
|
||||
|
||||
if (cb->set) {
|
||||
if (viewToggle) XmToggleButtonSetState (viewToggle, False, False);
|
||||
viewToggle = w;
|
||||
}
|
||||
else {
|
||||
if (w == viewToggle) XmToggleButtonSetState (w, True, False);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
LayoutCb(
|
||||
Widget w,
|
||||
XtPointer cd,
|
||||
XmToggleButtonCallbackStruct *cb )
|
||||
{
|
||||
static Widget layoutToggle = NULL;
|
||||
|
||||
if (cb->set) {
|
||||
if (layoutToggle) XmToggleButtonSetState (layoutToggle, False, False);
|
||||
layoutToggle = w;
|
||||
}
|
||||
else {
|
||||
if (w == layoutToggle) XmToggleButtonSetState (w, True, False);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*****************************************************************
|
||||
*
|
||||
* PopupMenu support
|
||||
*
|
||||
*****************************************************************/
|
||||
|
||||
static Time popupLastEventTime = 0;
|
||||
|
||||
static void
|
||||
InitPopupCb(
|
||||
Widget w,
|
||||
String id,
|
||||
XtPointer cb )
|
||||
{
|
||||
Widget popupWindow = XtNameToWidget (shell, id);
|
||||
|
||||
XtAddEventHandler (popupWindow, ButtonPressMask, False,
|
||||
(XtEventHandler)PopupHandler, (XtPointer)w);
|
||||
}
|
||||
|
||||
static void
|
||||
PopupHandler (
|
||||
Widget w,
|
||||
Widget pw,
|
||||
XEvent *event,
|
||||
Boolean *ctd )
|
||||
{
|
||||
if (((XButtonEvent *)event)->button != Button3) return;
|
||||
if (((XButtonEvent *)event)->time <= popupLastEventTime) return;
|
||||
|
||||
XmMenuPosition((Widget) pw, (XButtonEvent *)event);
|
||||
XtManageChild ((Widget) pw);
|
||||
}
|
||||
|
||||
/* By default, cancelling a popup menu with Button 3 will cause the
|
||||
* popup to be reposted at the location of the cancelling click.
|
||||
*
|
||||
* To switch off this behavior, remember when the menu was popped down.
|
||||
* In PopupHandler, don't repost the menu if the posting click just
|
||||
* cancelled a popup menu.
|
||||
*/
|
||||
static void
|
||||
PopdownCb(
|
||||
Widget w,
|
||||
XtPointer cd,
|
||||
XtPointer cb )
|
||||
{
|
||||
popupLastEventTime = XtLastTimestampProcessed (XtDisplay(w));
|
||||
}
|
||||
|
||||
|
||||
/*****************************************************************
|
||||
*
|
||||
* Draw utilities
|
||||
*
|
||||
*****************************************************************/
|
||||
|
||||
static DrawData *drawData = NULL;
|
||||
static DrawData *buttonData = NULL;
|
||||
|
||||
static GC
|
||||
GetGC(
|
||||
Widget w )
|
||||
{
|
||||
Arg args[2];
|
||||
XGCValues gcv;
|
||||
Pixel fg;
|
||||
Pixel bg;
|
||||
GC gc;
|
||||
|
||||
XtSetArg (args[0], XmNforeground, &fg);
|
||||
XtSetArg (args[1], XmNbackground, &bg);
|
||||
XtGetValues (w, args, 2);
|
||||
gcv.foreground = fg;
|
||||
gcv.background = bg;
|
||||
gcv.line_width = 1;
|
||||
gc = XtGetGC (w, GCForeground | GCBackground | GCLineWidth, &gcv);
|
||||
|
||||
return (gc);
|
||||
}
|
||||
|
||||
static void
|
||||
ConfigureDrawData(
|
||||
Widget w,
|
||||
DrawData *data )
|
||||
{
|
||||
Arg args[6];
|
||||
Dimension width, height, st, ht, mw, mh;
|
||||
Dimension totalMarginWidth;
|
||||
Dimension totalMarginHeight;
|
||||
|
||||
width = height = st = ht = mw = mh = 0;
|
||||
XtSetArg (args[0], XmNwidth, &width);
|
||||
XtSetArg (args[1], XmNheight, &height);
|
||||
XtSetArg (args[2], XmNshadowThickness, &st);
|
||||
XtSetArg (args[3], XmNhighlightThickness, &ht);
|
||||
XtSetArg (args[4], XmNmarginWidth, &mw);
|
||||
XtSetArg (args[5], XmNmarginHeight, &mh);
|
||||
XtGetValues (w, args, 6);
|
||||
|
||||
totalMarginWidth = st + ht + mw;
|
||||
totalMarginHeight = st + ht + mh;
|
||||
|
||||
if (2u * totalMarginWidth < width && 2u * totalMarginHeight < height) {
|
||||
data->drawX = totalMarginWidth;
|
||||
data->drawY = totalMarginHeight;
|
||||
data->drawWidth = width - 2 * totalMarginWidth;
|
||||
data->drawHeight = height - 2 * totalMarginHeight;
|
||||
}
|
||||
else {
|
||||
data->drawWidth = 0;
|
||||
data->drawHeight = 0;
|
||||
}
|
||||
}
|
||||
|
||||
/*****************************************************************
|
||||
*
|
||||
* DrawingArea display code
|
||||
*
|
||||
*****************************************************************/
|
||||
|
||||
static void
|
||||
DaResizeCb(
|
||||
Widget w,
|
||||
XtPointer cd,
|
||||
XtPointer cb )
|
||||
{
|
||||
if (drawData == NULL) return;
|
||||
|
||||
ConfigureDrawData (w, drawData);
|
||||
XClearArea (XtDisplay(w), XtWindow(w),
|
||||
drawData->drawX, drawData->drawY,
|
||||
drawData->drawWidth, drawData->drawHeight,
|
||||
False);
|
||||
DrawArea (w);
|
||||
}
|
||||
|
||||
static void
|
||||
DaExposeCb(
|
||||
Widget w,
|
||||
XtPointer cd,
|
||||
XtPointer cb )
|
||||
{
|
||||
if (drawData == NULL) {
|
||||
drawData = (DrawData *)XtMalloc (sizeof(DrawData));
|
||||
drawData->gc = GetGC (w);
|
||||
ConfigureDrawData (w, drawData);
|
||||
}
|
||||
DrawArea(w);
|
||||
}
|
||||
|
||||
#define NPOINTS 40u
|
||||
|
||||
static void
|
||||
DrawArea(
|
||||
Widget w )
|
||||
{
|
||||
int i, x, y;
|
||||
unsigned int m;
|
||||
|
||||
XPoint p[NPOINTS];
|
||||
|
||||
if (drawData->drawWidth == 0) return;
|
||||
|
||||
XClearArea (XtDisplay(w), XtWindow(w),
|
||||
drawData->drawX, drawData->drawY,
|
||||
drawData->drawWidth, drawData->drawHeight,
|
||||
False);
|
||||
XDrawRectangle (XtDisplay(w), XtWindow(w), drawData->gc,
|
||||
drawData->drawX, drawData->drawY,
|
||||
drawData->drawWidth, drawData->drawHeight);
|
||||
XDrawLine (XtDisplay(w), XtWindow(w), drawData->gc,
|
||||
drawData->drawX, drawData->drawY + drawData->drawHeight/2,
|
||||
drawData->drawX + drawData->drawWidth,
|
||||
drawData->drawY + drawData->drawHeight/2);
|
||||
|
||||
m = 20 * drawData->drawHeight / 100u;
|
||||
p[0].x = drawData->drawX;
|
||||
p[0].y = drawData->drawY + drawData->drawHeight/2;
|
||||
for (i = 1; i < NPOINTS-1; i++) {
|
||||
p[i].x = drawData->drawX + (i * drawData->drawWidth)/NPOINTS;
|
||||
p[i].y = drawData->drawY + m/2u + (rand() % (drawData->drawHeight - m));
|
||||
}
|
||||
p[NPOINTS-1].x = drawData->drawX + drawData->drawWidth;
|
||||
p[NPOINTS-1].y = drawData->drawY + drawData->drawHeight/2;
|
||||
|
||||
XDrawLines (XtDisplay(w), XtWindow(w), drawData->gc,
|
||||
p, NPOINTS, CoordModeOrigin);
|
||||
}
|
||||
|
||||
static void
|
||||
ScaleCb(
|
||||
Widget w,
|
||||
XtPointer cd,
|
||||
XtPointer cb )
|
||||
{
|
||||
static Widget da = NULL;
|
||||
|
||||
if (drawData == NULL) return;
|
||||
|
||||
if (da == NULL) da = XtNameToWidget (shell, "*drawArea");
|
||||
|
||||
DrawArea (da);
|
||||
}
|
||||
|
||||
static void
|
||||
SetScaleCb(
|
||||
Widget w,
|
||||
int *value,
|
||||
XmToggleButtonCallbackStruct *cb )
|
||||
{
|
||||
static Widget da = NULL;
|
||||
static Widget sc = NULL;
|
||||
|
||||
if (drawData == NULL) return;
|
||||
|
||||
if (da == NULL) da = XtNameToWidget (shell, "*drawArea");
|
||||
if (sc == NULL) sc = XtNameToWidget (shell, "*valueScale");
|
||||
|
||||
XmScaleSetValue (sc, *value);
|
||||
|
||||
DrawArea (da);
|
||||
}
|
||||
|
||||
/*****************************************************************
|
||||
*
|
||||
* DrawnButton display code
|
||||
*
|
||||
*****************************************************************/
|
||||
|
||||
static Boolean lightsOn = False;
|
||||
|
||||
static void
|
||||
DbResizeCb(
|
||||
Widget w,
|
||||
XtPointer cd,
|
||||
XtPointer cb )
|
||||
{
|
||||
if (buttonData == NULL) return;
|
||||
|
||||
ConfigureDrawData (w, buttonData);
|
||||
XClearArea (XtDisplay(w), XtWindow(w),
|
||||
buttonData->drawX, buttonData->drawY,
|
||||
buttonData->drawWidth, buttonData->drawHeight,
|
||||
False);
|
||||
DrawButton (w);
|
||||
}
|
||||
|
||||
static void
|
||||
DbExposeCb(
|
||||
Widget w,
|
||||
XtPointer cd,
|
||||
XtPointer cb )
|
||||
{
|
||||
if (buttonData == NULL) {
|
||||
buttonData = (DrawData *)XtMalloc (sizeof(DrawData));
|
||||
buttonData->gc = GetGC (w);
|
||||
ConfigureDrawData (w, buttonData);
|
||||
}
|
||||
DrawButton(w);
|
||||
}
|
||||
|
||||
#define NARCS 6u
|
||||
|
||||
static void
|
||||
DrawButton(
|
||||
Widget w )
|
||||
{
|
||||
int i, x, y, incX, incY;
|
||||
XArc a[NARCS];
|
||||
|
||||
if (buttonData->drawWidth == 0 || !lightsOn) return;
|
||||
|
||||
a[0].x = buttonData->drawX + (buttonData->drawWidth - 1)/2u;
|
||||
a[0].y = buttonData->drawY + (buttonData->drawHeight - 1)/2u;
|
||||
a[0].width = 1;
|
||||
a[0].height = 1;
|
||||
a[0].angle1 = 0;
|
||||
a[0].angle2 = 360*64;
|
||||
incX = (buttonData->drawWidth - 1)/(2u * NARCS);
|
||||
incY = (buttonData->drawHeight - 1)/(2u * NARCS);
|
||||
|
||||
for (i = 1; i < NARCS; i++) {
|
||||
a[i].x = a[i-1].x - incX;
|
||||
a[i].y = a[i-1].y - incY;
|
||||
a[i].width = a[i-1].width + 2 * incX;
|
||||
a[i].height = a[i-1].height + 2 * incY;
|
||||
#ifndef BROKEN_SERVER_ARCS
|
||||
a[i].angle1 = 0;
|
||||
a[i].angle2 = 360 * 64;
|
||||
#else
|
||||
XDrawRectangle (XtDisplay(w), XtWindow(w), buttonData->gc,
|
||||
a[i].x, a[i].y, a[i].width, a[i].height);
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifndef BROKEN_SERVER_ARCS
|
||||
XDrawArcs (XtDisplay(w), XtWindow(w), buttonData->gc, a, NARCS);
|
||||
#endif
|
||||
}
|
||||
|
||||
static void
|
||||
ToggleLightsCb(
|
||||
Widget w,
|
||||
XtPointer cd,
|
||||
XmToggleButtonCallbackStruct *cb )
|
||||
{
|
||||
static Widget db = NULL;
|
||||
|
||||
if (buttonData == NULL) return;
|
||||
|
||||
if (db == NULL) db = XtNameToWidget (shell, "*drawnButton");
|
||||
|
||||
lightsOn = cb->set;
|
||||
|
||||
if (lightsOn)
|
||||
DrawButton (db);
|
||||
else
|
||||
XClearArea (XtDisplay(db), XtWindow(db),
|
||||
buttonData->drawX, buttonData->drawY,
|
||||
buttonData->drawWidth, buttonData->drawHeight,
|
||||
False);
|
||||
}
|
||||
|
File diff suppressed because it is too large
Load diff
|
@ -1,315 +0,0 @@
|
|||
! (c) Copyright 1989, 1990, 1991, 1992 OPEN SOFTWARE FOUNDATION, INC.
|
||||
! ALL RIGHTS RESERVED
|
||||
!
|
||||
! Motif Release 1.2
|
||||
|
||||
|
||||
value
|
||||
|
||||
greekAlphabet : string_table (
|
||||
"alpha", "beta", "gamma", "delta",
|
||||
"epsilon", "zeta", "eta", "theta",
|
||||
"iota", "kappa", "lambda", "mu",
|
||||
"nu", "xi", "omicron", "pi",
|
||||
"rho", "sigma", "tau", "upsilon",
|
||||
"phi", "chi", "psi", "omega");
|
||||
|
||||
! Main Window
|
||||
|
||||
! File menu
|
||||
|
||||
fileCascadeText : "File";
|
||||
fileCascadeMnem : "F";
|
||||
newButtonText : "New";
|
||||
newButtonMnem : "N";
|
||||
openButtonText : "Open...";
|
||||
openButtonMnem : "O";
|
||||
saveButtonText : "Save";
|
||||
saveButtonMnem : "S";
|
||||
saveAsButtonText : "Save As...";
|
||||
saveAsButtonMnem : "A";
|
||||
printButtonText : "Print";
|
||||
printButtonMnem : "P";
|
||||
exitButtonText : "Exit";
|
||||
exitButtonMnem : "E";
|
||||
|
||||
! Edit menu
|
||||
|
||||
editCascadeText : "Edit";
|
||||
editCascadeMnem : "E";
|
||||
undoButtonText : "Undo";
|
||||
undoButtonMnem : "U";
|
||||
cutButtonText : "Cut";
|
||||
cutButtonMnem : "t";
|
||||
copyButtonText : "Copy";
|
||||
copyButtonMnem : "C";
|
||||
pasteButtonText : "Paste";
|
||||
pasteButtonMnem : "P";
|
||||
clearButtonText : "Clear";
|
||||
clearButtonMnem : "e";
|
||||
deleteButtonText : "Delete";
|
||||
deleteButtonMnem : "D";
|
||||
|
||||
! View menu
|
||||
|
||||
viewCascadeText : "View";
|
||||
viewCascadeMnem : "V";
|
||||
stackButtonText : "Stack";
|
||||
stackButtonMnem : "S";
|
||||
tileButtonText : "Tile";
|
||||
tileButtonMnem : "T";
|
||||
dayButtonText : "Day";
|
||||
dayButtonMnem : "D";
|
||||
weekButtonText : "Week";
|
||||
weekButtonMnem : "W";
|
||||
monthButtonText : "Month";
|
||||
monthButtonMnem : "M";
|
||||
yearButtonText : "Year";
|
||||
yearButtonMnem : "Y";
|
||||
|
||||
! Options menu
|
||||
|
||||
optionsCascadeText : "Options";
|
||||
optionsCascadeMnem : "O";
|
||||
fontCascadeText : "Font";
|
||||
fontCascadeMnem : "F";
|
||||
smallFontButtonText : "Small";
|
||||
smallFontButtonMnem : "S";
|
||||
mediumFontButtonText : "Medium";
|
||||
mediumFontButtonMnem : "M";
|
||||
largeFontButtonText : "Large";
|
||||
largeFontButtonMnem : "L";
|
||||
directCascadeText : "Direction";
|
||||
directCascadeMnem : "D";
|
||||
upButtonText : "Up";
|
||||
upButtonMnem : "U";
|
||||
downButtonText : "Down";
|
||||
downButtonMnem : "D";
|
||||
leftButtonText : "Left";
|
||||
leftButtonMnem : "L";
|
||||
rightButtonText : "Right";
|
||||
rightButtonMnem : "R";
|
||||
caseButtonText : "Case Sensitive";
|
||||
caseButtonMnem : "C";
|
||||
wrapButtonText : "Word Wrap";
|
||||
wrapButtonMnem : "W";
|
||||
|
||||
! Help menu
|
||||
|
||||
helpCascadeText : "Help";
|
||||
helpCascadeMnem : "H";
|
||||
contextButtonText : "On Context";
|
||||
contextButtonMnem : "C";
|
||||
windowButtonText : "On Window";
|
||||
windowButtonMnem : "W";
|
||||
tutorButtonText : "Tutorial";
|
||||
tutorButtonMnem : "T";
|
||||
versionButtonText : "On Version";
|
||||
versionButtonMnem : "V";
|
||||
|
||||
! periodic title
|
||||
|
||||
titleLabelText : "The Periodic Table of Motif Widgets";
|
||||
subtitleLabelText : "Open Software Foundation";
|
||||
|
||||
! widget names
|
||||
|
||||
separatorFrameText : "Separator";
|
||||
arrowFrameText : "ArrowButton";
|
||||
pushFrameText : "PushButton";
|
||||
toggleFrameText : "ToggleButton";
|
||||
labelFrameText : "Label";
|
||||
optionFrameText : "OptionMenu";
|
||||
scaleFrameText : "Scale";
|
||||
radioFrameText : "RadioBox";
|
||||
textFrameText : "Text";
|
||||
scrollFrameText : "ScrollBar";
|
||||
listFrameText : "ScrolledList";
|
||||
paneFrameText : "PanedWindow";
|
||||
popupFrameText : "PopupMenu";
|
||||
drawFrameText : "DrawingArea";
|
||||
drawBtnFrameText : "DrawnButton";
|
||||
commandFrameText : "Command";
|
||||
|
||||
dialogFrameText : "Dialogs";
|
||||
templateTitleText : "TemplateDialog";
|
||||
warningTitleText : "WarningDialog";
|
||||
workingTitleText : "WorkingDialog";
|
||||
informationTitleText : "InformationDialog";
|
||||
questionTitleText : "QuestionDialog";
|
||||
errorTitleText : "ErrorDialog";
|
||||
fileTitleText : "FileSelectionDialog";
|
||||
selectTitleText : "SelectionDialog";
|
||||
promptTitleText : "PromptDialog";
|
||||
|
||||
! widget text
|
||||
|
||||
pushButtonText : compound_string("Explode", separate = true) &
|
||||
compound_string("Building");
|
||||
|
||||
toggleButtonText : "Lights";
|
||||
|
||||
labelText : compound_string("DON'T", separate = true) &
|
||||
compound_string("PANIC");
|
||||
|
||||
scaleTitleText : "MHz";
|
||||
scaleMinimum : 885;
|
||||
scaleMaximum : 1079;
|
||||
scaleValue : 1017;
|
||||
|
||||
radio1Text : "WFNX";
|
||||
radio1Value : 1017;
|
||||
radio2Text : "WJUL";
|
||||
radio2Value : 915;
|
||||
radio3Text : "WGBH";
|
||||
radio3Value : 897;
|
||||
|
||||
pane1Text : "Open Software Foundation";
|
||||
pane2Text : "OSF/Motif Release 1.2\n";
|
||||
|
||||
popupWindowText : compound_string ("Press", separate = true) &
|
||||
compound_string ("Button 3", separate = true) &
|
||||
compound_string ("or", separate = true) &
|
||||
compound_string ("Menu");
|
||||
|
||||
popupTitleText : "Edit Menu";
|
||||
|
||||
popupUndoText : "Undo";
|
||||
popupUndoMnem : "U";
|
||||
popupCutText : "Cut";
|
||||
popupCutMnem : "t";
|
||||
popupCopyText : "Copy";
|
||||
popupCopyMnem : "C";
|
||||
popupPasteText : "Paste";
|
||||
popupPasteMnem : "P";
|
||||
popupClearText : "Clear";
|
||||
popupClearMnem : "e";
|
||||
popupDeleteText : "Delete";
|
||||
popupDeleteMnem : "D";
|
||||
|
||||
commandPromptText : "periodic >";
|
||||
|
||||
templatePickText : "Template";
|
||||
infoPickText : "Information";
|
||||
warningPickText : "Warning";
|
||||
errorPickText : "Error";
|
||||
questionPickText : "Question";
|
||||
workingPickText : "Working";
|
||||
filePickText : "FileSelection";
|
||||
selectPickText : "Selection";
|
||||
promptPickText : "Prompt";
|
||||
|
||||
! option menu
|
||||
|
||||
optionMenuText : "Day";
|
||||
optionMenuMnem : "D";
|
||||
sundayButtonText : "Sunday";
|
||||
sundayButtonMnem : "S";
|
||||
mondayButtonText : "Monday";
|
||||
mondayButtonMnem : "M";
|
||||
tuesdayButtonText : "Tuesday";
|
||||
tuesdayButtonMnem : "T";
|
||||
wednesdayButtonText : "Wednesday";
|
||||
wednesdayButtonMnem : "W";
|
||||
thursdayButtonText : "Thursday";
|
||||
thursdayButtonMnem : "h";
|
||||
fridayButtonText : "Friday";
|
||||
fridayButtonMnem : "F";
|
||||
saturdayButtonText : "Saturday";
|
||||
saturdayButtonMnem : "a";
|
||||
|
||||
! Template dialog
|
||||
|
||||
templateCascadeText : "File";
|
||||
templateCascadeMnem : "F";
|
||||
templateOkText : "Send";
|
||||
templateOkMnem : "S";
|
||||
templateCancelText : "Cancel";
|
||||
templateCancelMnem : "C";
|
||||
templateIncludeText : "Include...";
|
||||
templateIncludeMnem : "I";
|
||||
templateDraftText : "Draft";
|
||||
templateDraftMnem : "D";
|
||||
templateSpellText : "Spell";
|
||||
templateSpellMnem : "p";
|
||||
|
||||
! Information dialog
|
||||
|
||||
infoCancelText : "Dismiss";
|
||||
infoMessageText :
|
||||
compound_string("Congratulations!", separate = true) &
|
||||
compound_string("Bandwidth grab successful.", separate = true) &
|
||||
compound_string("", separate = true) &
|
||||
compound_string("Continue oscillation.");
|
||||
|
||||
|
||||
! Warning dialog
|
||||
|
||||
warningOkText : "Proceed";
|
||||
warningCancelText : "Cancel";
|
||||
warningMessageText :
|
||||
compound_string("Warning, Warning,", separate = true) &
|
||||
compound_string("Danger Will Robinson...");
|
||||
|
||||
|
||||
! Error dialog
|
||||
|
||||
errorOkText : "Retry";
|
||||
errorCancelText : "Cancel";
|
||||
errorMessageText :
|
||||
compound_string("Frontal lobe seek error!", separate = true) &
|
||||
compound_string("Intellect not installed.");
|
||||
|
||||
! Question dialog
|
||||
|
||||
questionYesText : "Yes";
|
||||
questionMaybeText : "Maybe";
|
||||
questionNoText : "No";
|
||||
questionMessageText :
|
||||
compound_string("This is Motif 1.2.", separate = true) &
|
||||
compound_string("", separate = true) &
|
||||
compound_string("Any questions ?");
|
||||
|
||||
! Working dialog
|
||||
|
||||
workingCancelText : "Abort";
|
||||
workingScaleText : "Percent Complete";
|
||||
|
||||
! File Selection dialog
|
||||
|
||||
fileSelectText : "Selection";
|
||||
fileListText : "List";
|
||||
fileLoadText : "Load";
|
||||
fileDirListText : "Directories";
|
||||
fileFileListText : "Files";
|
||||
fileFilterLabelText : "Filter";
|
||||
fileNoMatchText : " [ ] ";
|
||||
fileFilterText : "Filter";
|
||||
fileCancelText : "Cancel";
|
||||
fileMergeText : "Merge";
|
||||
fileRemoveText : "Remove";
|
||||
|
||||
formatCascadeText : "Format";
|
||||
formatCascadeMnem : "F";
|
||||
audioButtonText : "Audio";
|
||||
audioButtonMnem : "A";
|
||||
graphicsButtonText : "Graphics";
|
||||
graphicsButtonMnem : "G";
|
||||
textButtonText : "Text";
|
||||
textButtonMnem : "T";
|
||||
|
||||
! Selection dialog
|
||||
|
||||
selectSelectionText : "Selection";
|
||||
selectListText : "Items";
|
||||
selectOkText : "Ok";
|
||||
selectApplyText : "Apply";
|
||||
selectCancelText : "Cancel";
|
||||
|
||||
! Prompt dialog
|
||||
|
||||
promptOkText : "Ok";
|
||||
promptCancelText : "Cancel";
|
||||
promptMessageText : "Name, please?";
|
||||
|
||||
|
|
@ -1,3 +1,25 @@
|
|||
/*
|
||||
* CDE - Common Desktop Environment
|
||||
*
|
||||
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
|
||||
*
|
||||
* These libraries and programs are free software; you can
|
||||
* redistribute them and/or modify them under the terms of the GNU
|
||||
* Lesser General Public License as published by the Free Software
|
||||
* Foundation; either version 2 of the License, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* These libraries and programs are distributed in the hope that
|
||||
* they will be useful, but WITHOUT ANY WARRANTY; without even the
|
||||
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU Lesser General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with these libraries and programs; if not, write
|
||||
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
|
||||
* Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/*
|
||||
* $XConsortium: StringPref.hh /main/3 1996/06/11 16:44:41 cde-hal $
|
||||
*
|
||||
|
|
|
@ -1,3 +1,25 @@
|
|||
/*
|
||||
* CDE - Common Desktop Environment
|
||||
*
|
||||
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
|
||||
*
|
||||
* These libraries and programs are free software; you can
|
||||
* redistribute them and/or modify them under the terms of the GNU
|
||||
* Lesser General Public License as published by the Free Software
|
||||
* Foundation; either version 2 of the License, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* These libraries and programs are distributed in the hope that
|
||||
* they will be useful, but WITHOUT ANY WARRANTY; without even the
|
||||
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU Lesser General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with these libraries and programs; if not, write
|
||||
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
|
||||
* Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/*
|
||||
* $XConsortium: UserPreference.hh /main/3 1996/06/11 16:44:56 cde-hal $
|
||||
*
|
||||
|
|
Loading…
Reference in a new issue