home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Usenet 1994 January
/
usenetsourcesnewsgroupsinfomagicjanuary1994.iso
/
sources
/
x
/
volume15
/
olvwm-3.0
/
part05
< prev
next >
Wrap
Text File
|
1992-02-03
|
56KB
|
1,906 lines
Path: uunet!sun-barr!ames!pasteur!nntp
From: scott.oaks@East.Sun.COM (Scott Oaks)
Newsgroups: comp.sources.x
Subject: v15i151: OpenLook Virtual Window Mgr (3.0), Part05/21
Message-ID: <1992Feb4.135535.7048@pasteur.Berkeley.EDU>
Date: 4 Feb 92 13:55:35 GMT
References: <csx-15i147-olvwm-3.0@uunet.UU.NET>
Sender: dcmartin@msi.com (David C. Martin - Moderator)
Organization: University of California, at Berkeley
Lines: 1892
Approved: dcmartin@msi.com
Nntp-Posting-Host: postgres.berkeley.edu
Submitted-by: scott.oaks@East.Sun.COM (Scott Oaks)
Posting-number: Volume 15, Issue 151
Archive-name: olvwm-3.0/part05
# This is a shell archive. Remove anything before this line, then feed it
# into a shell via "sh file" or similar. To overwrite existing files,
# type "sh file -c".
# The tool that generated this appeared in the comp.sources.unix newsgroup;
# send mail to comp-sources-unix@uunet.uu.net if you want that tool.
# If this archive is complete, you will see the following message at the end:
# "End of archive 5 (of 21)."
# Contents: images.c winipane.c
# Wrapped by dcmartin@fascet on Tue Jan 14 05:54:42 1992
PATH=/bin:/usr/bin:/usr/ucb ; export PATH
if test -f 'images.c' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'images.c'\"
else
echo shar: Extracting \"'images.c'\" \(38892 characters\)
sed "s/^X//" >'images.c' <<'END_OF_FILE'
X/*
X * (c) Copyright 1991 Scott Oaks. See LEGAL_NOTICE file for terms of the
X * license
X */
X
X#ident "@(#)images.c 1.1 olvwm version 1/3/92"
X
X/* Use small images */
X#define SMALL_IMAGES
X
X#include <X11/X.h>
X#include <X11/Xlib.h>
X#include <X11/Xutil.h>
X#include <olgx/olgx.h>
X#include <stdio.h>
X
X#include "i18n.h"
X#include "olwm.h"
X#include "ollocale.h"
X#include "globals.h"
X#include "win.h"
X#include "menu.h"
X
X/*
X * Frame/icon menu action procs
X */
Xextern int WindowOpenCloseAction(), WindowFullRestoreSizeAction();
Xextern int WindowMoveAction(), WindowResizeAction();
Xextern int WindowPropsAction(), WindowBackAction(), WindowRefreshAction();
Xextern int WindowQuitAction(), WindowDismissThisAction();
Xextern int WindowDismissAllAction(), WindowFlashOwnerAction();
Xextern int WindowStickAction();
X
X/*
X * Buttons used to build the frame and icon menus
X * REMIND: right now, toggles always use the same actions!
X *
X * These buttons are more or less "prototype" buttons; if the UseImages
X * resource is set, their pixlabels may be adjusted
X */
X
Xstatic Button
XopenButton = {
X { { StringLabel, "Open", NULL },
X { StringLabel, "Close", NULL } },
X {"window:Open", "window:Close"},
X 0,
X False,
X True,
X True,
X {
X WindowOpenCloseAction,
X NULL
X },
X NULL,
X};
X
Xstatic Button
XfullSizeButton = {
X { { StringLabel, "Full Size", NULL },
X { StringLabel, "Restore Size", NULL } },
X {"window:FullSize", "window:RestoreSize"},
X 0,
X False,
X True,
X True,
X {
X WindowFullRestoreSizeAction,
X NULL
X },
X NULL,
X};
X
Xstatic Button
XmoveButton = {
X { { StringLabel, "Move", NULL },
X { NoType, NULL, NULL } },
X {"window:Move", NULL},
X 0,
X False,
X True,
X True,
X {
X WindowMoveAction,
X NULL
X },
X NULL,
X};
X
Xstatic Button
XresizeButton = {
X { { StringLabel, "Resize", NULL },
X { NoType, NULL, NULL } },
X {"window:Resize", NULL},
X 0,
X False,
X True,
X True,
X {
X WindowResizeAction,
X NULL
X },
X NULL,
X};
X
Xstatic Button
XstickyButton = {
X { { StringLabel, "Stick", NULL },
X { StringLabel, "Unstick", NULL } },
X {"window:Stick", "window:Unstick"},
X 0,
X False,
X True,
X True,
X {
X WindowStickAction,
X NULL
X },
X NULL,
X};
X
Xstatic Button
XpropertiesButton = {
X { { StringLabel, "Properties", NULL },
X { NoType, NULL, NULL } },
X {"window:Properties", NULL},
X 0,
X False,
X False,
X True,
X {
X WindowPropsAction,
X NULL
X },
X NULL,
X};
X
Xstatic Button
XbackButton = {
X { { StringLabel, "Back", NULL }, /****WINDOW FRONT?*/
X { NoType, NULL, NULL } },
X {"window:Back", NULL},
X 0,
X False,
X True,
X True,
X {
X WindowBackAction,
X NULL
X },
X NULL,
X};
X
Xstatic Button
XrefreshButton = {
X { { StringLabel, "Refresh", NULL },
X { NoType, NULL, NULL } },
X {"window:Refresh", NULL},
X 0,
X False,
X True,
X True,
X {
X WindowRefreshAction,
X NULL
X },
X NULL,
X};
X
Xstatic Button
XquitButton = {
X { { StringLabel, "Quit", NULL },
X { NoType, NULL, NULL } },
X {"window:Quit", NULL},
X 0,
X False,
X True,
X True,
X {
X WindowQuitAction,
X NULL
X },
X NULL,
X};
X
Xstatic Button
XdismissButton = {
X { { StringLabel, "Dismiss", NULL },
X { NoType, NULL, NULL } },
X {"window:Dismiss", NULL},
X 0,
X False,
X True,
X True,
X {
X NULL,
X NULL,
X },
X NULL,
X};
X
Xstatic Button
XdismissThisButton = {
X { { StringLabel, "This Window", NULL},
X { NoType, NULL, NULL } },
X {"window:DismissThis", NULL},
X 0,
X False,
X True,
X True,
X {
X WindowDismissThisAction,
X NULL
X },
X NULL,
X};
X
Xstatic Button
XdismissAllButton = {
X { { StringLabel, "All Pop-ups", NULL},
X { NoType, NULL, NULL } },
X {"window:DismissAll", NULL},
X 0,
X False,
X True,
X True,
X {
X WindowDismissAllAction,
X NULL
X },
X NULL,
X};
X
Xstatic Button
XownerButton = {
X { { StringLabel, "Owner?", NULL},
X { NoType, NULL, NULL } },
X {"window:Owner", NULL},
X 0,
X False,
X True,
X True,
X {
X WindowFlashOwnerAction,
X NULL
X },
X NULL,
X};
X
Xextern int VDMMenuAction();
X/*
X * Menu buttons for VDM motion menu
X */
XButton moveRightButton = {
X { { StringLabel, "Move East", NULL },
X { NoType, NULL, NULL } },
X { "virtual:Move", NULL },
X 0,
X False,
X True,
X True,
X { VDMMenuAction, NULL },
X NULL,
X};
X
XButton moveLeftButton = {
X { { StringLabel, "Move West", NULL },
X { NoType, NULL, NULL } },
X { "virtual:Move", NULL },
X 0,
X False,
X True,
X True,
X { VDMMenuAction, NULL },
X NULL,
X};
X
XButton moveUpButton = {
X { { StringLabel, "Move North", NULL },
X { NoType, NULL, NULL } },
X { "virtual:Move", NULL },
X 0,
X False,
X True,
X True,
X { VDMMenuAction, NULL },
X NULL,
X};
X
XButton moveDownButton = {
X { { StringLabel, "Move South", NULL },
X { NoType, NULL, NULL } },
X { "virtual:Move", NULL },
X 0,
X False,
X True,
X True,
X { VDMMenuAction, NULL },
X NULL,
X};
X
XButton moveUpRightButton = {
X { { StringLabel, "Move NorthEast", NULL },
X { NoType, NULL, NULL } },
X { "virtual:Move", NULL },
X 0,
X False,
X True,
X True,
X { VDMMenuAction, NULL },
X NULL,
X};
X
XButton moveDownRightButton = {
X { { StringLabel, "Move SouthEast", NULL },
X { NoType, NULL, NULL } },
X { "virtual:Move", NULL },
X 0,
X False,
X True,
X True,
X { VDMMenuAction, NULL },
X NULL,
X};
X
XButton moveUpLeftButton = {
X { { StringLabel, "Move NorthWest", NULL },
X { NoType, NULL, NULL } },
X { "virtual:Move", NULL },
X 0,
X False,
X True,
X True,
X { VDMMenuAction, NULL },
X NULL,
X};
X
XButton moveDownLeftButton = {
X { { StringLabel, "Move SouthWest", NULL },
X { NoType, NULL, NULL } },
X { "virtual:Move", NULL },
X 0,
X False,
X True,
X True,
X { VDMMenuAction, NULL },
X NULL,
X};
X
XButton moveHomeButton = {
X { { StringLabel, "Move Home", NULL },
X { NoType, NULL, NULL } },
X { "virtual:Move", NULL },
X 0,
X False,
X True,
X True,
X { VDMMenuAction, NULL },
X NULL,
X};
X
X#ifdef SMALL_IMAGES
X/*
X * Images for Frame Menus and VDM Menus
X */
X
X#define Close_width 16
X#define Close_height 14
Xstatic char Close_bits[] = {
X 0xc0, 0x3f, 0x40, 0x20, 0x40, 0x20, 0x40, 0xa1, 0xc0, 0x60, 0x64, 0xa0,
X 0x5c, 0x60, 0x5c, 0xa0, 0xff, 0x7f, 0x05, 0xaa, 0x07, 0x55, 0x14, 0xaa,
X 0x08, 0x00, 0x14, 0x00,
X};
X
X#define Open_width 16
X#define Open_height 14
Xstatic char Open_bits[] = {
X 0xc0, 0x3f, 0x40, 0x20, 0xc0, 0x27, 0x40, 0xa7, 0x40, 0x67, 0xc0, 0xa4,
X 0x60, 0x60, 0x50, 0xa0, 0xcf, 0x7f, 0x05, 0xaa, 0x07, 0x55, 0x14, 0xaa,
X 0x08, 0x00, 0x14, 0x00,
X};
X
X#define FullSize_width 16
X#define FullSize_height 14
Xstatic char FullSize_bits[] = {
X 0xf8, 0x7, 0x8, 0x4, 0x8, 0x4, 0x8, 0x14, 0x8, 0xc, 0x8, 0x14, 0xc8, 0xc,
X 0xc8, 0x14, 0xc8, 0xc, 0xf8, 0x17, 0xe8, 0xd, 0xc8, 0x14, 0xf8, 0xf, 0x40,
X 0x15,
X};
X
X#define NormalSize_width 16
X#define NormalSize_height 14
Xstatic char NormalSize_bits[] = {
X 0xf8, 0x7, 0x8, 0x4, 0x8, 0x4, 0x8, 0x14, 0x8, 0xc, 0x8, 0x14, 0x8, 0xc,
X 0x8, 0x14, 0xf8, 0xf, 0xc0, 0x14, 0xe0, 0xb, 0xf0, 0x17, 0xc0, 0x0, 0xc0, 0x0,
X};
X
X#define Props_width 16
X#define Props_height 14
Xstatic char Props_bits[] = {
X 0x00, 0x00, 0x00, 0x00, 0xfe, 0x1f, 0x02, 0x10, 0xfa, 0x57, 0x02, 0x30,
X 0xda, 0x56, 0x02, 0x30, 0x02, 0x50, 0xfe, 0x3f, 0x50, 0x55, 0xa8, 0x2a,
X 0x50, 0x55, 0x00, 0x00,
X};
X
X#define Back_width 16
X#define Back_height 14
Xstatic char Back_bits[] = {
X 0xff, 0x00, 0x81, 0x0f, 0x81, 0x3f, 0x81, 0x72, 0x81, 0xc2, 0x81, 0xaa,
X 0x81, 0xb6, 0x81, 0xfa, 0xff, 0x7e, 0x04, 0x3a, 0xfc, 0x37, 0xa0, 0x2a,
X 0x40, 0x05, 0xa0, 0x0a,
X};
X
X#define Refresh_width 16
X#define Refresh_height 14
Xstatic char Refresh_bits[] = {
X 0x00, 0x00, 0xf8, 0x07, 0x48, 0x05, 0xc8, 0x07, 0x08, 0x14, 0x08, 0x0c,
X 0x48, 0x14, 0x28, 0x0d, 0x08, 0x14, 0xf8, 0x0f, 0x40, 0x15, 0xa0, 0x0a,
X 0x40, 0x15, 0x00, 0x00,
X};
X
X#define Stick_width 16
X#define Stick_height 14
Xstatic char Stick_bits[] = {
X 0xb0, 0x0f, 0xf0, 0x1f, 0xb0, 0x23, 0x40, 0x29, 0x80, 0x57, 0x87, 0x8b,
X 0x82, 0x07, 0x82, 0x0b, 0x96, 0x07, 0x8a, 0x0b, 0x82, 0x07, 0x8a, 0x0b,
X 0x00, 0x04, 0x08, 0x0a,
X};
X
X#define UnStick_width 16
X#define UnStick_height 14
Xstatic char UnStick_bits[] = {
X 0x04, 0x00, 0x02, 0x00, 0x03, 0x00, 0x13, 0x00, 0xff, 0x1f, 0xff, 0x1f,
X 0xff, 0x1f, 0x56, 0x55, 0xaf, 0x2a, 0x57, 0x55, 0x08, 0x00, 0x17, 0x00,
X 0x0a, 0x00, 0x02, 0x00,
X};
X
X#define Quit_width 16
X#define Quit_height 14
Xstatic char Quit_bits[] = {
X 0x10, 0x04, 0x38, 0x0e, 0x7c, 0x1f, 0xf8, 0x0f, 0xf0, 0x17, 0xe8, 0x2b,
X 0xf0, 0x17, 0xf8, 0x0f, 0x7c, 0x1f, 0xb8, 0x0e, 0x50, 0x15, 0xa8, 0x2a,
X 0x50, 0x14, 0x20, 0x08,
X};
X
X#define Resize_width 16
X#define Resize_height 14
Xstatic char Resize_bits[] = {
X 0x2e, 0x00, 0x4a, 0x01, 0x8e, 0x01, 0xc0, 0x01, 0x02, 0x00, 0x94, 0xff,
X 0x98, 0x80, 0x9c, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80,
X 0x80, 0x80, 0x80, 0xff};
X
X#define Move_width 16
X#define Move_height 14
Xstatic char Move_bits[] = {
X 0xfe, 0x00, 0x82, 0x00, 0x82, 0x02, 0x82, 0x24, 0x82, 0x28, 0xfe, 0x30,
X 0x00, 0x3c, 0x04, 0x00, 0x48, 0x7f, 0x50, 0x41, 0x60, 0x41, 0x78, 0x41,
X 0x00, 0x41, 0x00, 0x7f};
X
X#else SMALL_IMAGES
X
X#define Back_width 32
X#define Back_height 32
Xstatic char Back_bits[] = {
X 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
X 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xff, 0x00, 0x00,
X 0x14, 0x80, 0x00, 0x00, 0xfc, 0xff, 0x00, 0x00, 0x04, 0x80, 0xff, 0x01,
X 0x04, 0x80, 0xff, 0x07, 0x04, 0x80, 0xff, 0x0f, 0x04, 0x80, 0xff, 0x0f,
X 0x04, 0x80, 0x58, 0x1f, 0x04, 0x80, 0xa9, 0x1e, 0x04, 0x80, 0x58, 0x1c,
X 0x04, 0x80, 0xa9, 0x18, 0x04, 0x80, 0x58, 0x19, 0x04, 0x80, 0xa9, 0x19,
X 0x04, 0x80, 0xd8, 0x0d, 0x04, 0x80, 0xe9, 0x0f, 0xfc, 0xff, 0xf8, 0x07,
X 0x40, 0x55, 0xe9, 0x03, 0x40, 0x00, 0xd8, 0x01, 0xc0, 0xff, 0xaf, 0x01,
X 0x00, 0x54, 0x55, 0x01, 0x00, 0xa8, 0xaa, 0x00, 0x00, 0x54, 0x55, 0x00,
X 0x00, 0xa8, 0xaa, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
X 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
X};
X
X#define Close_width 32
X#define Close_height 32
Xstatic char Close_bits[] = {
X 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
X 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xff, 0x0f, 0x00, 0x40, 0x01, 0x08,
X 0x00, 0xc0, 0xff, 0x0f, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x04, 0x58,
X 0x00, 0x40, 0x0e, 0xa8, 0x00, 0x40, 0x07, 0x58, 0x00, 0xc0, 0x03, 0xa8,
X 0x00, 0xc0, 0x01, 0x58, 0x00, 0xe0, 0x00, 0xa8, 0x00, 0x70, 0x00, 0x58,
X 0x40, 0x78, 0x00, 0xa8, 0xc0, 0x5c, 0x00, 0x58, 0xc0, 0x4f, 0x00, 0xa8,
X 0xc0, 0x47, 0x00, 0x58, 0xc0, 0xc7, 0xff, 0xaf, 0xc0, 0x0f, 0x54, 0x55,
X 0xc0, 0x1f, 0xa8, 0xaa, 0x3f, 0x00, 0x54, 0x55, 0x21, 0x00, 0xa8, 0xaa,
X 0x21, 0x00, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, 0x61, 0x01, 0x00, 0x00,
X 0xbf, 0x02, 0x00, 0x00, 0x50, 0x01, 0x00, 0x00, 0xa0, 0x02, 0x00, 0x00,
X 0x50, 0x01, 0x00, 0x00, 0xa0, 0x02, 0x00, 0x00
X};
X
X#define FullSize_width 32
X#define FullSize_height 32
Xstatic char FullSize_bits[] = {
X 0x00, 0xfc, 0xff, 0x00, 0x00, 0x14, 0x80, 0x00, 0x00, 0xfc, 0xff, 0x00,
X 0x00, 0x04, 0x80, 0x00, 0x00, 0x04, 0x80, 0x05, 0xc0, 0xff, 0x8f, 0x0a,
X 0x40, 0x01, 0x88, 0x05, 0xc0, 0xff, 0x9f, 0x0a, 0x40, 0x00, 0x88, 0x05,
X 0x40, 0x00, 0x98, 0x0a, 0x40, 0x00, 0x88, 0x05, 0x40, 0x00, 0x98, 0x0a,
X 0x40, 0x00, 0x88, 0x05, 0x40, 0x00, 0x98, 0x0a, 0x40, 0x00, 0x88, 0x05,
X 0x40, 0x00, 0x98, 0x0a, 0x40, 0x00, 0x88, 0x05, 0x40, 0x00, 0x98, 0x0a,
X 0x40, 0x00, 0x88, 0x05, 0x40, 0x00, 0x98, 0x0a, 0xc0, 0xff, 0x8f, 0x05,
X 0x00, 0x54, 0x95, 0x0a, 0x00, 0xc4, 0x81, 0x05, 0x00, 0xc4, 0x81, 0x0a,
X 0x00, 0xc4, 0x81, 0x05, 0x00, 0xc4, 0x81, 0x0a, 0x00, 0xc4, 0x81, 0x05,
X 0x00, 0xf4, 0x87, 0x0a, 0x00, 0xe4, 0x83, 0x05, 0x00, 0xc4, 0x81, 0x0a,
X 0x00, 0x84, 0x80, 0x05, 0x00, 0xfc, 0xff, 0x0a
X};
X
X#define Move_width 32
X#define Move_height 32
Xstatic char Move_bits[] = {
X 0x00, 0x00, 0xfc, 0xff, 0x00, 0x00, 0x14, 0x80, 0x00, 0x00, 0xfc, 0xff,
X 0x00, 0x00, 0x04, 0x80, 0x00, 0x00, 0x04, 0x80, 0x00, 0x00, 0xfe, 0x80,
X 0x00, 0x00, 0xfc, 0x80, 0x00, 0x00, 0xf4, 0x80, 0x00, 0x00, 0xfc, 0x80,
X 0x00, 0x00, 0xfc, 0x80, 0x00, 0x00, 0xce, 0x80, 0x00, 0x00, 0x87, 0x80,
X 0x00, 0x80, 0x07, 0x80, 0x00, 0xc0, 0x05, 0x80, 0x00, 0xe0, 0x04, 0x80,
X 0x00, 0x70, 0xfc, 0xff, 0xff, 0x3f, 0x00, 0x00, 0x05, 0x3c, 0x00, 0x00,
X 0xff, 0x3f, 0x00, 0x00, 0x01, 0x20, 0x00, 0x00, 0x01, 0x20, 0x00, 0x00,
X 0x01, 0x20, 0x00, 0x00, 0x01, 0x20, 0x00, 0x00, 0x01, 0x20, 0x00, 0x00,
X 0x01, 0x20, 0x00, 0x00, 0x01, 0x20, 0x00, 0x00, 0x01, 0x20, 0x00, 0x00,
X 0x01, 0x20, 0x00, 0x00, 0x01, 0x20, 0x00, 0x00, 0x01, 0x20, 0x00, 0x00,
X 0x01, 0x20, 0x00, 0x00, 0xff, 0x3f, 0x00, 0x00
X};
X
X#define NormalSize_width 32
X#define NormalSize_height 32
Xstatic char NormalSize_bits[] = {
X 0x00, 0xfc, 0xff, 0x00, 0x00, 0x14, 0x80, 0x00, 0x00, 0xfc, 0xff, 0x00,
X 0x00, 0x04, 0x80, 0x00, 0x00, 0x04, 0x80, 0x05, 0xc0, 0xff, 0x8f, 0x0a,
X 0x40, 0x01, 0x88, 0x05, 0xc0, 0xff, 0x9f, 0x0a, 0x40, 0x00, 0x88, 0x05,
X 0x40, 0x00, 0x98, 0x0a, 0x40, 0x00, 0x88, 0x05, 0x40, 0x00, 0x98, 0x0a,
X 0x40, 0x00, 0x88, 0x05, 0x40, 0x00, 0x98, 0x0a, 0x40, 0x00, 0x88, 0x05,
X 0x40, 0x00, 0x98, 0x0a, 0x40, 0x00, 0x88, 0x05, 0x40, 0x00, 0x98, 0x0a,
X 0x40, 0x00, 0x88, 0x05, 0x40, 0x00, 0x98, 0x0a, 0xc0, 0xff, 0x8f, 0x05,
X 0x00, 0x54, 0x95, 0x0a, 0x00, 0x84, 0x80, 0x05, 0x00, 0xc4, 0x81, 0x0a,
X 0x00, 0xe4, 0x83, 0x05, 0x00, 0xf4, 0x87, 0x0a, 0x00, 0xc4, 0x81, 0x05,
X 0x00, 0xc4, 0x81, 0x0a, 0x00, 0xc4, 0x81, 0x05, 0x00, 0xc4, 0x81, 0x0a,
X 0x00, 0xc4, 0x81, 0x05, 0x00, 0xfc, 0xff, 0x0a
X};
X
X#define Open_width 32
X#define Open_height 32
Xstatic char Open_bits[] = {
X 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
X 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xff, 0x0f, 0x00, 0x40, 0x01, 0x08,
X 0x00, 0xc0, 0xff, 0x0f, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 0x58,
X 0x00, 0xe0, 0x0f, 0xa8, 0x00, 0xc0, 0x0f, 0x58, 0x00, 0x40, 0x0f, 0xa8,
X 0x00, 0xc0, 0x0f, 0x58, 0x00, 0xc0, 0x0f, 0xa8, 0x00, 0xe0, 0x0c, 0x58,
X 0x00, 0x70, 0x08, 0xa8, 0x00, 0x78, 0x00, 0x58, 0x00, 0x5c, 0x00, 0xa8,
X 0x00, 0x4e, 0x00, 0x58, 0x00, 0xc7, 0xff, 0xaf, 0x80, 0x03, 0x54, 0x55,
X 0xc0, 0x01, 0xa8, 0xaa, 0xbf, 0x00, 0x54, 0x55, 0x21, 0x00, 0xa8, 0xaa,
X 0x21, 0x00, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, 0x61, 0x01, 0x00, 0x00,
X 0xbf, 0x02, 0x00, 0x00, 0x50, 0x01, 0x00, 0x00, 0xa0, 0x02, 0x00, 0x00,
X 0x50, 0x01, 0x00, 0x00, 0xa0, 0x02, 0x00, 0x00
X};
X
X#define Props_width 32
X#define Props_height 32
Xstatic char Props_bits[] = {
X 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
X 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
X 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
X 0xc0, 0xff, 0x3f, 0x00, 0x40, 0x02, 0x20, 0x00, 0x40, 0x53, 0x25, 0x00,
X 0x40, 0x00, 0x20, 0x00, 0x40, 0x00, 0x20, 0x00, 0x40, 0x00, 0xa0, 0x02,
X 0x40, 0x04, 0x25, 0x00, 0x40, 0x0a, 0xa2, 0x02, 0x40, 0x00, 0x20, 0x00,
X 0xc0, 0xff, 0xbf, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa8, 0xaa, 0x02,
X 0x00, 0x00, 0x00, 0x00, 0x00, 0xa8, 0xaa, 0x02, 0x00, 0x00, 0x00, 0x00,
X 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
X 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
X 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
X};
X
X#define Quit_width 32
X#define Quit_height 32
Xstatic char Quit_bits[] = {
X 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x01, 0x00, 0x00, 0xff, 0x07, 0x00,
X 0xc0, 0x03, 0x1e, 0x00, 0xe0, 0x00, 0x38, 0x00, 0x70, 0x00, 0x70, 0x00,
X 0xb8, 0xff, 0xff, 0x00, 0x98, 0x02, 0xdc, 0x00, 0x8c, 0xff, 0x9f, 0x01,
X 0x8c, 0x00, 0x97, 0x01, 0x86, 0x80, 0xb3, 0x03, 0x86, 0xc0, 0x51, 0x03,
X 0x86, 0xe0, 0xb0, 0x03, 0x86, 0x70, 0x50, 0x03, 0x86, 0x38, 0xb0, 0x03,
X 0x86, 0x1c, 0x50, 0x03, 0x86, 0x0e, 0xb0, 0x03, 0x8c, 0x07, 0xd0, 0x01,
X 0x8c, 0x03, 0xb0, 0x01, 0xd8, 0x01, 0xd0, 0x01, 0xf8, 0x00, 0xf0, 0x00,
X 0xf0, 0xff, 0x7f, 0x01, 0xe0, 0xa8, 0xba, 0x00, 0xc0, 0x53, 0x5f, 0x01,
X 0x00, 0xff, 0xaf, 0x00, 0x00, 0xfc, 0x55, 0x01, 0x00, 0x00, 0x00, 0x00,
X 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
X 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
X};
X
X#define Refresh_width 32
X#define Refresh_height 32
Xstatic char Refresh_bits[] = {
X 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
X 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
X 0x80, 0xff, 0x1f, 0x00, 0x80, 0x02, 0x10, 0x00, 0x80, 0xff, 0x18, 0x00,
X 0x80, 0x00, 0x10, 0x00, 0x80, 0x00, 0xb0, 0x00, 0x80, 0x00, 0x50, 0x01,
X 0x80, 0xa0, 0xb6, 0x00, 0x80, 0xc8, 0x50, 0x01, 0x80, 0x00, 0xb2, 0x00,
X 0x80, 0x00, 0x50, 0x01, 0x80, 0x00, 0xb0, 0x00, 0x80, 0x7f, 0x50, 0x01,
X 0x80, 0x55, 0xb0, 0x00, 0x80, 0x7f, 0x56, 0x01, 0x80, 0x55, 0xb0, 0x00,
X 0x80, 0xff, 0x5f, 0x01, 0x00, 0xa8, 0xaa, 0x00, 0x00, 0x50, 0x55, 0x01,
X 0x00, 0xa8, 0xaa, 0x00, 0x00, 0x50, 0x55, 0x01, 0x00, 0x00, 0x00, 0x00,
X 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
X 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
X};
X
X#define Resize_width 32
X#define Resize_height 32
Xstatic char Resize_bits[] = {
X 0xff, 0x03, 0x00, 0x00, 0x05, 0x02, 0x00, 0x00, 0xff, 0x03, 0x00, 0x00,
X 0x01, 0x02, 0x00, 0x00, 0x01, 0x02, 0x00, 0x00, 0x01, 0x02, 0x00, 0x00,
X 0x41, 0x02, 0x00, 0x00, 0xe1, 0x02, 0x00, 0x00, 0xc1, 0x03, 0x00, 0x00,
X 0xff, 0x03, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00,
X 0x00, 0x1c, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0xf0, 0xff, 0xff,
X 0x00, 0xe0, 0x01, 0x80, 0x00, 0xc0, 0xff, 0xff, 0x00, 0xc0, 0x33, 0x80,
X 0x00, 0x40, 0x3f, 0x80, 0x00, 0x40, 0x3e, 0x80, 0x00, 0x40, 0x3e, 0x80,
X 0x00, 0x40, 0x3f, 0x80, 0x00, 0xc0, 0x3f, 0x80, 0x00, 0x40, 0x00, 0x80,
X 0x00, 0x40, 0x00, 0x80, 0x00, 0x40, 0x00, 0x80, 0x00, 0x40, 0x00, 0x80,
X 0x00, 0x40, 0x00, 0x80, 0x00, 0x40, 0x00, 0x80, 0x00, 0x40, 0x00, 0x80,
X 0x00, 0x40, 0x00, 0x80, 0x00, 0xc0, 0xff, 0xff
X};
X
X#define Stick_width 32
X#define Stick_height 32
Xstatic char Stick_bits[] = {
X 0x00, 0x0e, 0xff, 0x00, 0x00, 0x9e, 0xff, 0x03, 0x00, 0xfe, 0xff, 0x07,
X 0x00, 0xfe, 0xff, 0x0f, 0x00, 0x9e, 0x5f, 0x0d, 0x00, 0x6e, 0xaf, 0x3a,
X 0x00, 0xd0, 0x56, 0x51, 0x00, 0xa0, 0xae, 0x20, 0x00, 0x50, 0x5f, 0x40,
X 0x00, 0x00, 0x2f, 0x80, 0x00, 0x80, 0x1f, 0x00, 0x00, 0x80, 0x3f, 0x00,
X 0x00, 0x80, 0x5f, 0x00, 0x00, 0x80, 0xbf, 0x00, 0x00, 0x80, 0x5f, 0x00,
X 0x00, 0x80, 0xbf, 0x00, 0x7e, 0x80, 0x5f, 0x00, 0x7e, 0x80, 0xbf, 0x00,
X 0x18, 0x80, 0x5f, 0x00, 0xb8, 0x82, 0xbf, 0x00, 0x58, 0x81, 0x5f, 0x00,
X 0x98, 0x80, 0xbf, 0x00, 0x58, 0x80, 0x5f, 0x00, 0x98, 0x80, 0xbf, 0x00,
X 0x58, 0x80, 0x5f, 0x00, 0x98, 0x80, 0xbf, 0x00, 0x58, 0x80, 0x5f, 0x00,
X 0x98, 0x00, 0xaf, 0x00, 0x40, 0x00, 0x54, 0x00, 0x80, 0x00, 0xa8, 0x00,
X 0x40, 0x00, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00
X};
X
X#define UnStick_width 32
X#define UnStick_height 32
Xstatic char UnStick_bits[] = {
X 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00,
X 0x38, 0x00, 0x00, 0x00, 0x1c, 0x04, 0x00, 0x00, 0x9c, 0x02, 0x00, 0x00,
X 0x5e, 0x01, 0x00, 0x00, 0xbe, 0x00, 0x00, 0x00, 0x5e, 0x00, 0x00, 0x00,
X 0xbe, 0xf8, 0xff, 0x0f, 0x7e, 0xfe, 0xff, 0x1f, 0xfe, 0xff, 0xff, 0x1f,
X 0xfe, 0xff, 0xff, 0x5f, 0x7e, 0xfe, 0xff, 0xbf, 0xbc, 0xfd, 0xff, 0x5f,
X 0xd8, 0xaa, 0xaa, 0xaa, 0x58, 0x51, 0x55, 0x55, 0xbc, 0x80, 0xaa, 0x2a,
X 0x7e, 0x00, 0x00, 0x00, 0xfe, 0x00, 0x00, 0x00, 0x7e, 0x01, 0x00, 0x00,
X 0xa0, 0x02, 0x00, 0x00, 0x7e, 0x01, 0x00, 0x00, 0xfe, 0x02, 0x00, 0x00,
X 0x18, 0x00, 0x00, 0x00, 0xb8, 0x02, 0x00, 0x00, 0x58, 0x01, 0x00, 0x00,
X 0x98, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00,
X 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
X};
X#endif SMALL_IMAGES
X
X/*
X * Images for Virtual Window Menu
X */
X#define ArwUpLeft_width 16
X#define ArwUpLeft_height 14
Xstatic char ArwUpLeft_bits[] = {
X0xfe,0x07, 0x02,0x02, 0x02,0x01, 0x82,0x00, 0x02,0x01, 0x02,0x02, 0x12,0x04,
X0x2a,0x08, 0x46,0x10, 0x82,0x20, 0x00,0x11, 0x00,0x0a, 0x00,0x04, 0x00,0x00,
X};
X
X#define ArwLeft_width 16
X#define ArwLeft_height 14
Xstatic char ArwLeft_bits[] = {
X0x80,0x00, 0xc0,0x00, 0xa0,0x00, 0x90,0x00, 0x88,0x7f, 0x04,0x40, 0x02,0x40,
X0x04,0x40, 0x88,0x7f, 0x90,0x00, 0xa0,0x00, 0xc0,0x00, 0x80,0x00, 0x00,0x00,
X};
X
X#define ArwDownLeft_width 16
X#define ArwDownLeft_height 14
Xstatic char ArwDownLeft_bits[] = {
X0x00,0x00, 0x00,0x04, 0x00,0x0a, 0x00,0x11, 0x82,0x20, 0x46,0x10, 0x2a,0x08,
X0x12,0x04, 0x02,0x02, 0x02,0x01, 0x82,0x00, 0x02,0x01, 0x02,0x02, 0xfe,0x07,
X};
X
X#define ArwUp_width 16
X#define ArwUp_height 14
Xstatic char ArwUp_bits[] = {
X0x80,0x00, 0x40,0x01, 0x20,0x02, 0x10,0x04, 0x08,0x08, 0x04,0x10, 0x3e,0x3e,
X0x20,0x02, 0x20,0x02, 0x20,0x02, 0x20,0x02, 0x20,0x02, 0x20,0x02, 0xe0,0x03,
X};
X
X#define ArwHome_width 16
X#define ArwHome_height 14
Xstatic char ArwHome_bits[] = {
X0x80,0x00, 0x40,0x0d, 0x20,0x0e, 0x10,0x0c, 0x08,0x08, 0x04,0x10, 0xfe,0x3f,
X0x04,0x10, 0x74,0x17, 0x54,0x15, 0x54,0x17, 0x54,0x10, 0xfc,0x1f, 0x00,0x00,
X};
X
X#define ArwDown_width 16
X#define ArwDown_height 14
Xstatic char ArwDown_bits[] = {
X0xe0,0x03, 0x20,0x02, 0x20,0x02, 0x20,0x02, 0x20,0x02, 0x20,0x02, 0x20,0x02,
X0x3e,0x3e, 0x04,0x10, 0x08,0x08, 0x10,0x04, 0x20,0x02, 0x40,0x01, 0x80,0x00,
X};
X
X#define ArwUpRight_width 16
X#define ArwUpRight_height 14
Xstatic char ArwUpRight_bits[] = {
X0xe0,0x7f, 0x40,0x40, 0x80,0x40, 0x00,0x41, 0x80,0x40, 0x40,0x40, 0x20,0x48,
X0x10,0x54, 0x08,0x62, 0x04,0x41, 0x88,0x00, 0x50,0x00, 0x20,0x00, 0x00,0x00,
X};
X
X#define ArwRight_width 16
X#define ArwRight_height 14
Xstatic char ArwRight_bits[] = {
X0x00,0x01, 0x00,0x03, 0x00,0x05, 0x00,0x09, 0xfe,0x11, 0x02,0x20, 0x02,0x40,
X0x02,0x20, 0xfe,0x11, 0x00,0x09, 0x00,0x05, 0x00,0x03, 0x00,0x01, 0x00,0x00,
X};
X
X#define ArwDownRight_width 16
X#define ArwDownRight_height 14
Xstatic char ArwDownRight_bits[] = {
X0x00,0x00, 0x20,0x00, 0x50,0x00, 0x88,0x00, 0x04,0x41, 0x08,0x62, 0x10,0x54,
X0x20,0x48, 0x40,0x40, 0x80,0x40, 0x00,0x41, 0x80,0x40, 0x40,0x40, 0xe0,0x7f,
X};
X
Xextern Button openButton;
X
XButton *
XMakeOpenButton(dpy, scrInfo)
X Display *dpy;
X ScreenInfo *scrInfo;
X{
XButton *b;
Xstatic int openbuttoninit = 0;
X
X openbuttoninit++;
X b = (Button *) MemAlloc(sizeof(Button));
X *b = openButton;
X if (GRV.UseImageMenu == UseAll) {
X b->label[0].pixlabel = (Pixlabel *) MemAlloc(sizeof(Pixlabel));
X b->label[0].pixlabel->pixmap = XCreatePixmapFromBitmapData(dpy,
X scrInfo->rootid,
X Open_bits, Open_width, Open_height,
X scrInfo->colorInfo.fgColor,
X scrInfo->colorInfo.bg1Color,
X scrInfo->depth);
X b->label[0].pixlabel->width = Open_width;
X b->label[0].pixlabel->height = Open_height;
X b->label[0].kind = ComboLabel;
X b->label[1].pixlabel = (Pixlabel *) MemAlloc(sizeof(Pixlabel));
X b->label[1].pixlabel->pixmap = XCreatePixmapFromBitmapData(dpy,
X scrInfo->rootid,
X Close_bits, Close_width, Close_height,
X scrInfo->colorInfo.fgColor,
X scrInfo->colorInfo.bg1Color,
X scrInfo->depth);
X b->label[1].pixlabel->width = Close_width;
X b->label[1].pixlabel->height = Close_height;
X b->label[1].kind = ComboLabel;
X }
X#ifdef OW_I18N_L3
X b->label[0].string = gettext(b->label[0].string);
X b->label[1].string = gettext(b->label[1].string);
X#endif
X return b;
X}
X
XButton *
XMakeFullSizeButton(dpy, scrInfo)
X Display *dpy;
X ScreenInfo *scrInfo;
X{
XButton *b;
X
X b = (Button *) MemAlloc(sizeof(Button));
X *b = fullSizeButton;
X if (GRV.UseImageMenu == UseAll) {
X b->label[0].pixlabel = (Pixlabel *) MemAlloc(sizeof(Pixlabel));
X b->label[0].pixlabel->pixmap = XCreatePixmapFromBitmapData(dpy,
X scrInfo->rootid,
X FullSize_bits, FullSize_width, FullSize_height,
X scrInfo->colorInfo.fgColor,
X scrInfo->colorInfo.bg1Color,
X scrInfo->depth);
X b->label[0].pixlabel->width = FullSize_width;
X b->label[0].pixlabel->height = FullSize_height;
X b->label[0].kind = ComboLabel;
X b->label[1].pixlabel = (Pixlabel *) MemAlloc(sizeof(Pixlabel));
X b->label[1].pixlabel->pixmap = XCreatePixmapFromBitmapData(dpy,
X scrInfo->rootid, NormalSize_bits,
X NormalSize_width, NormalSize_height,
X scrInfo->colorInfo.fgColor,
X scrInfo->colorInfo.bg1Color,
X scrInfo->depth);
X b->label[1].pixlabel->width = NormalSize_width;
X b->label[1].pixlabel->height = NormalSize_height;
X b->label[1].kind = ComboLabel;
X }
X#ifdef OW_I18N_L3
X b->label[0].string = gettext(b->label[0].string);
X b->label[1].string = gettext(b->label[1].string);
X#endif
X return b;
X}
X
XButton *
XMakeStickyButton(dpy, scrInfo)
X Display *dpy;
X ScreenInfo *scrInfo;
X{
XButton *b;
X
X b = (Button *) MemAlloc(sizeof(Button));
X *b = stickyButton;
X if (GRV.UseImageMenu == UseAll) {
X b->label[0].pixlabel = (Pixlabel *) MemAlloc(sizeof(Pixlabel));
X b->label[0].pixlabel->pixmap = XCreatePixmapFromBitmapData(dpy,
X scrInfo->rootid,
X Stick_bits, Stick_width, Stick_height,
X scrInfo->colorInfo.fgColor,
X scrInfo->colorInfo.bg1Color,
X scrInfo->depth);
X b->label[0].pixlabel->width = Stick_width;
X b->label[0].pixlabel->height = Stick_height;
X b->label[0].kind = ComboLabel;
X b->label[1].pixlabel = (Pixlabel *) MemAlloc(sizeof(Pixlabel));
X b->label[1].pixlabel->pixmap = XCreatePixmapFromBitmapData(dpy,
X scrInfo->rootid, UnStick_bits,
X UnStick_width, UnStick_height,
X scrInfo->colorInfo.fgColor,
X scrInfo->colorInfo.bg1Color,
X scrInfo->depth);
X b->label[1].pixlabel->width = UnStick_width;
X b->label[1].pixlabel->height = UnStick_height;
X b->label[1].kind = ComboLabel;
X }
X#ifdef OW_I18N_L3
X b->label[0].string = gettext(b->label[0].string);
X b->label[1].string = gettext(b->label[1].string);
X#endif
X return b;
X}
X
XButton *
XMakePropertiesButton(dpy, scrInfo)
X Display *dpy;
X ScreenInfo *scrInfo;
X{
XButton *b;
X
X b = (Button *) MemAlloc(sizeof(Button));
X *b = propertiesButton;
X if (GRV.UseImageMenu == UseAll) {
X b->label[0].pixlabel = (Pixlabel *) MemAlloc(sizeof(Pixlabel));
X b->label[0].pixlabel->pixmap = XCreatePixmapFromBitmapData(dpy,
X scrInfo->rootid,
X Props_bits, Props_width, Props_height,
X scrInfo->colorInfo.fgColor,
X scrInfo->colorInfo.bg1Color,
X scrInfo->depth);
X b->label[0].pixlabel->width = Props_width;
X b->label[0].pixlabel->height = Props_height;
X b->label[0].kind = ComboLabel;
X }
X#ifdef OW_I18N_L3
X b->label[0].string = gettext(b->label[0].string);
X b->label[1].string = gettext(b->label[1].string);
X#endif
X return b;
X}
X
XButton *
XMakeBackButton(dpy, scrInfo)
X Display *dpy;
X ScreenInfo *scrInfo;
X{
XButton *b;
X
X b = (Button *) MemAlloc(sizeof(Button));
X *b = backButton;
X if (GRV.UseImageMenu == UseAll) {
X b->label[0].pixlabel = (Pixlabel *) MemAlloc(sizeof(Pixlabel));
X b->label[0].pixlabel->pixmap = XCreatePixmapFromBitmapData(dpy,
X scrInfo->rootid,
X Back_bits, Back_width, Back_height,
X scrInfo->colorInfo.fgColor,
X scrInfo->colorInfo.bg1Color,
X scrInfo->depth);
X b->label[0].pixlabel->width = Back_width;
X b->label[0].pixlabel->height = Back_height;
X b->label[0].kind = ComboLabel;
X }
X#ifdef OW_I18N_L3
X b->label[0].string = gettext(b->label[0].string);
X b->label[1].string = gettext(b->label[1].string);
X#endif
X return b;
X}
X
XButton *
XMakeResizeButton(dpy, scrInfo)
X Display *dpy;
X ScreenInfo *scrInfo;
X{
XButton *b;
X
X b = (Button *) MemAlloc(sizeof(Button));
X *b = resizeButton;
X if (GRV.UseImageMenu == UseAll) {
X b->label[0].pixlabel = (Pixlabel *) MemAlloc(sizeof(Pixlabel));
X b->label[0].pixlabel->pixmap = XCreatePixmapFromBitmapData(dpy,
X scrInfo->rootid,
X Resize_bits, Resize_width, Resize_height,
X scrInfo->colorInfo.fgColor,
X scrInfo->colorInfo.bg1Color,
X scrInfo->depth);
X b->label[0].pixlabel->width = Resize_width;
X b->label[0].pixlabel->height = Resize_height;
X b->label[0].kind = ComboLabel;
X }
X#ifdef OW_I18N_L3
X b->label[0].string = gettext(b->label[0].string);
X b->label[1].string = gettext(b->label[1].string);
X#endif
X return b;
X}
X
XButton *
XMakeMoveButton(dpy, scrInfo)
X Display *dpy;
X ScreenInfo *scrInfo;
X{
XButton *b;
X
X b = (Button *) MemAlloc(sizeof(Button));
X *b = moveButton;
X if (GRV.UseImageMenu == UseAll) {
X b->label[0].pixlabel = (Pixlabel *) MemAlloc(sizeof(Pixlabel));
X b->label[0].pixlabel->pixmap = XCreatePixmapFromBitmapData(dpy,
X scrInfo->rootid,
X Move_bits, Move_width, Move_height,
X scrInfo->colorInfo.fgColor,
X scrInfo->colorInfo.bg1Color,
X scrInfo->depth);
X b->label[0].pixlabel->width = Move_width;
X b->label[0].pixlabel->height = Move_height;
X b->label[0].kind = ComboLabel;
X }
X#ifdef OW_I18N_L3
X b->label[0].string = gettext(b->label[0].string);
X b->label[1].string = gettext(b->label[1].string);
X#endif
X return b;
X}
X
XButton *
XMakeQuitButton(dpy, scrInfo)
X Display *dpy;
X ScreenInfo *scrInfo;
X{
XButton *b;
X
X b = (Button *) MemAlloc(sizeof(Button));
X *b = quitButton;
X if (GRV.UseImageMenu == UseAll) {
X b->label[0].pixlabel = (Pixlabel *) MemAlloc(sizeof(Pixlabel));
X b->label[0].pixlabel->pixmap = XCreatePixmapFromBitmapData(dpy,
X scrInfo->rootid,
X Quit_bits, Quit_width, Quit_height,
X scrInfo->colorInfo.fgColor,
X scrInfo->colorInfo.bg1Color,
X scrInfo->depth);
X b->label[0].pixlabel->width = Quit_width;
X b->label[0].pixlabel->height = Quit_height;
X b->label[0].kind = ComboLabel;
X }
X#ifdef OW_I18N_L3
X b->label[0].string = gettext(b->label[0].string);
X b->label[1].string = gettext(b->label[1].string);
X#endif
X return b;
X}
X
XButton *
XMakeRefreshButton(dpy, scrInfo)
X Display *dpy;
X ScreenInfo *scrInfo;
X{
XButton *b;
X
X b = (Button *) MemAlloc(sizeof(Button));
X *b = refreshButton;
X if (GRV.UseImageMenu == UseAll) {
X b->label[0].pixlabel = (Pixlabel *) MemAlloc(sizeof(Pixlabel));
X b->label[0].pixlabel->pixmap = XCreatePixmapFromBitmapData(dpy,
X scrInfo->rootid,
X Refresh_bits, Refresh_width, Refresh_height,
X scrInfo->colorInfo.fgColor,
X scrInfo->colorInfo.bg1Color,
X scrInfo->depth);
X b->label[0].pixlabel->width = Refresh_width;
X b->label[0].pixlabel->height = Refresh_height;
X b->label[0].kind = ComboLabel;
X }
X#ifdef OW_I18N_L3
X b->label[0].string = gettext(b->label[0].string);
X b->label[1].string = gettext(b->label[1].string);
X#endif
X return b;
X}
X
XButton *
XMakeDismissButton(dpy, scrInfo)
X Display *dpy;
X ScreenInfo *scrInfo;
X{
XButton *b;
X
X b = (Button *) MemAlloc(sizeof(Button));
X *b = dismissButton;
X#ifdef OW_I18N_L3
X b->label[0].string = gettext(b->label[0].string);
X b->label[1].string = gettext(b->label[1].string);
X#endif
X return b;
X}
X
XButton *
XMakeDismissAllButton(dpy, scrInfo)
X Display *dpy;
X ScreenInfo *scrInfo;
X{
XButton *b;
X
X b = (Button *) MemAlloc(sizeof(Button));
X *b = dismissAllButton;
X#ifdef OW_I18N_L3
X b->label[0].string = gettext(b->label[0].string);
X b->label[1].string = gettext(b->label[1].string);
X#endif
X return b;
X}
X
XButton *
XMakeDismissThisButton(dpy, scrInfo)
X Display *dpy;
X ScreenInfo *scrInfo;
X{
XButton *b;
X
X b = (Button *) MemAlloc(sizeof(Button));
X *b = dismissThisButton;
X#ifdef OW_I18N_L3
X b->label[0].string = gettext(b->label[0].string);
X b->label[1].string = gettext(b->label[1].string);
X#endif
X return b;
X}
X
XButton *
XMakeOwnerButton(dpy, scrInfo)
X Display *dpy;
X ScreenInfo *scrInfo;
X{
XButton *b;
X
X b = (Button *) MemAlloc(sizeof(Button));
X *b = ownerButton;
X#ifdef OW_I18N_L3
X b->label[0].string = gettext(b->label[0].string);
X b->label[1].string = gettext(b->label[1].string);
X#endif
X return b;
X}
X
XButton *
XMakeUpLeftButton(dpy, scrInfo)
X Display *dpy;
X ScreenInfo *scrInfo;
X{
XButton *b;
X
X b = (Button *) MemAlloc(sizeof(Button));
X *b = moveUpLeftButton;
X if (GRV.UseImageMenu != UseNone) {
X b->label[0].pixlabel = (Pixlabel *) MemAlloc(sizeof(Pixlabel));
X b->label[0].pixlabel->pixmap = XCreatePixmapFromBitmapData(dpy,
X scrInfo->rootid, ArwUpLeft_bits,
X ArwUpLeft_width, ArwUpLeft_height,
X scrInfo->colorInfo.fgColor,
X scrInfo->colorInfo.bg1Color,
X scrInfo->depth);
X b->label[0].pixlabel->width = ArwUpLeft_width;
X b->label[0].pixlabel->height = ArwUpLeft_height;
X b->label[0].kind = ImageLabel;
X }
X#ifdef OW_I18N_L3
X b->label[0].string = gettext(b->label[0].string);
X b->label[1].string = gettext(b->label[1].string);
X#endif
X return b;
X}
X
XButton *
XMakeLeftButton(dpy, scrInfo)
X Display *dpy;
X ScreenInfo *scrInfo;
X{
XButton *b;
X
X b = (Button *) MemAlloc(sizeof(Button));
X *b = moveLeftButton;
X if (GRV.UseImageMenu != UseNone) {
X b->label[0].pixlabel = (Pixlabel *) MemAlloc(sizeof(Pixlabel));
X b->label[0].pixlabel->pixmap = XCreatePixmapFromBitmapData(dpy,
X scrInfo->rootid,
X ArwLeft_bits, ArwLeft_width, ArwLeft_height,
X scrInfo->colorInfo.fgColor,
X scrInfo->colorInfo.bg1Color,
X scrInfo->depth);
X b->label[0].pixlabel->width = ArwLeft_width;
X b->label[0].pixlabel->height = ArwLeft_height;
X b->label[0].kind = ImageLabel;
X }
X#ifdef OW_I18N_L3
X b->label[0].string = gettext(b->label[0].string);
X b->label[1].string = gettext(b->label[1].string);
X#endif
X return b;
X}
X
XButton *
XMakeDownLeftButton(dpy, scrInfo)
X Display *dpy;
X ScreenInfo *scrInfo;
X{
XButton *b;
X
X b = (Button *) MemAlloc(sizeof(Button));
X *b = moveDownLeftButton;
X if (GRV.UseImageMenu != UseNone) {
X b->label[0].pixlabel = (Pixlabel *) MemAlloc(sizeof(Pixlabel));
X b->label[0].pixlabel->pixmap = XCreatePixmapFromBitmapData(dpy,
X scrInfo->rootid, ArwDownLeft_bits,
X ArwDownLeft_width, ArwDownLeft_height,
X scrInfo->colorInfo.fgColor,
X scrInfo->colorInfo.bg1Color,
X scrInfo->depth);
X b->label[0].pixlabel->width = ArwDownLeft_width;
X b->label[0].pixlabel->height = ArwDownLeft_height;
X b->label[0].kind = ImageLabel;
X }
X#ifdef OW_I18N_L3
X b->label[0].string = gettext(b->label[0].string);
X b->label[1].string = gettext(b->label[1].string);
X#endif
X return b;
X}
X
XButton *
XMakeUpButton(dpy, scrInfo)
X Display *dpy;
X ScreenInfo *scrInfo;
X{
XButton *b;
X
X b = (Button *) MemAlloc(sizeof(Button));
X *b = moveUpButton;
X if (GRV.UseImageMenu != UseNone) {
X b->label[0].pixlabel = (Pixlabel *) MemAlloc(sizeof(Pixlabel));
X b->label[0].pixlabel->pixmap = XCreatePixmapFromBitmapData(dpy,
X scrInfo->rootid,
X ArwUp_bits, ArwUp_width, ArwUp_height,
X scrInfo->colorInfo.fgColor,
X scrInfo->colorInfo.bg1Color,
X scrInfo->depth);
X b->label[0].pixlabel->width = ArwUp_width;
X b->label[0].pixlabel->height = ArwUp_height;
X b->label[0].kind = ImageLabel;
X }
X#ifdef OW_I18N_L3
X b->label[0].string = gettext(b->label[0].string);
X b->label[1].string = gettext(b->label[1].string);
X#endif
X return b;
X}
X
XButton *
XMakeHomeButton(dpy, scrInfo)
X Display *dpy;
X ScreenInfo *scrInfo;
X{
XButton *b;
X
X b = (Button *) MemAlloc(sizeof(Button));
X *b = moveHomeButton;
X if (GRV.UseImageMenu != UseNone) {
X b->label[0].pixlabel = (Pixlabel *) MemAlloc(sizeof(Pixlabel));
X b->label[0].pixlabel->pixmap = XCreatePixmapFromBitmapData(dpy,
X scrInfo->rootid,
X ArwHome_bits, ArwHome_width, ArwHome_height,
X scrInfo->colorInfo.fgColor,
X scrInfo->colorInfo.bg1Color,
X scrInfo->depth);
X b->label[0].pixlabel->width = ArwHome_width;
X b->label[0].pixlabel->height = ArwHome_height;
X b->label[0].kind = ImageLabel;
X }
X#ifdef OW_I18N_L3
X b->label[0].string = gettext(b->label[0].string);
X b->label[1].string = gettext(b->label[1].string);
X#endif
X return b;
X}
X
XButton *
XMakeDownButton(dpy, scrInfo)
X Display *dpy;
X ScreenInfo *scrInfo;
X{
XButton *b;
X
X b = (Button *) MemAlloc(sizeof(Button));
X *b = moveDownButton;
X if (GRV.UseImageMenu != UseNone) {
X b->label[0].pixlabel = (Pixlabel *) MemAlloc(sizeof(Pixlabel));
X b->label[0].pixlabel->pixmap = XCreatePixmapFromBitmapData(dpy,
X scrInfo->rootid,
X ArwDown_bits, ArwDown_width, ArwDown_height,
X scrInfo->colorInfo.fgColor,
X scrInfo->colorInfo.bg1Color,
X scrInfo->depth);
X b->label[0].pixlabel->width = ArwDown_width;
X b->label[0].pixlabel->height = ArwDown_height;
X b->label[0].kind = ImageLabel;
X }
X#ifdef OW_I18N_L3
X b->label[0].string = gettext(b->label[0].string);
X b->label[1].string = gettext(b->label[1].string);
X#endif
X return b;
X}
X
XButton *
XMakeUpRightButton(dpy, scrInfo)
X Display *dpy;
X ScreenInfo *scrInfo;
X{
XButton *b;
X
X b = (Button *) MemAlloc(sizeof(Button));
X *b = moveUpRightButton;
X if (GRV.UseImageMenu != UseNone) {
X b->label[0].pixlabel = (Pixlabel *) MemAlloc(sizeof(Pixlabel));
X b->label[0].pixlabel->pixmap = XCreatePixmapFromBitmapData(dpy,
X scrInfo->rootid, ArwUpRight_bits,
X ArwUpRight_width, ArwUpRight_height,
X scrInfo->colorInfo.fgColor,
X scrInfo->colorInfo.bg1Color,
X scrInfo->depth);
X b->label[0].pixlabel->width = ArwUpRight_width;
X b->label[0].pixlabel->height = ArwUpRight_height;
X b->label[0].kind = ImageLabel;
X }
X#ifdef OW_I18N_L3
X b->label[0].string = gettext(b->label[0].string);
X b->label[1].string = gettext(b->label[1].string);
X#endif
X return b;
X}
X
XButton *
XMakeRightButton(dpy, scrInfo)
X Display *dpy;
X ScreenInfo *scrInfo;
X{
XButton *b;
X
X b = (Button *) MemAlloc(sizeof(Button));
X *b = moveRightButton;
X if (GRV.UseImageMenu != UseNone) {
X b->label[0].pixlabel = (Pixlabel *) MemAlloc(sizeof(Pixlabel));
X b->label[0].pixlabel->pixmap = XCreatePixmapFromBitmapData(dpy,
X scrInfo->rootid,
X ArwRight_bits, ArwRight_width, ArwRight_height,
X scrInfo->colorInfo.fgColor,
X scrInfo->colorInfo.bg1Color,
X scrInfo->depth);
X b->label[0].pixlabel->width = ArwRight_width;
X b->label[0].pixlabel->height = ArwRight_height;
X b->label[0].kind = ImageLabel;
X }
X#ifdef OW_I18N_L3
X b->label[0].string = gettext(b->label[0].string);
X b->label[1].string = gettext(b->label[1].string);
X#endif
X return b;
X}
X
XButton *
XMakeDownRightButton(dpy, scrInfo)
X Display *dpy;
X ScreenInfo *scrInfo;
X{
XButton *b;
X
X b = (Button *) MemAlloc(sizeof(Button));
X *b = moveDownRightButton;
X if (GRV.UseImageMenu != UseNone) {
X b->label[0].pixlabel = (Pixlabel *) MemAlloc(sizeof(Pixlabel));
X b->label[0].pixlabel->pixmap = XCreatePixmapFromBitmapData(dpy,
X scrInfo->rootid, ArwDownRight_bits,
X ArwDownRight_width, ArwDownRight_height,
X scrInfo->colorInfo.fgColor,
X scrInfo->colorInfo.bg1Color,
X scrInfo->depth);
X b->label[0].pixlabel->width = ArwDownRight_width;
X b->label[0].pixlabel->height = ArwDownRight_height;
X b->label[0].kind = ImageLabel;
X }
X#ifdef OW_I18N_L3
X b->label[0].string = gettext(b->label[0].string);
X b->label[1].string = gettext(b->label[1].string);
X#endif
X return b;
X}
END_OF_FILE
if test 38892 -ne `wc -c <'images.c'`; then
echo shar: \"'images.c'\" unpacked with wrong size!
fi
# end of 'images.c'
fi
if test -f 'winipane.c' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'winipane.c'\"
else
echo shar: Extracting \"'winipane.c'\" \(12968 characters\)
sed "s/^X//" >'winipane.c' <<'END_OF_FILE'
X/*
X * (c) Copyright 1989, 1990 Sun Microsystems, Inc. Sun design patents
X * pending in the U.S. and foreign countries. See LEGAL_NOTICE
X * file for terms of the license.
X */
X
X#ident "@(#)winipane.c 1.1 olvwm version 1/3/92"
X
X/*
X * Based on
X#ident "@(#)winipane.c 26.22 91/09/14 SMI"
X *
X */
X
X#include <errno.h>
X#include <stdio.h>
X#include <X11/Xos.h>
X#include <X11/Xlib.h>
X#include <X11/Xutil.h>
X#include <X11/Xatom.h>
X#include <olgx/olgx.h>
X
X#include "i18n.h"
X#include "ollocale.h"
X#include "mem.h"
X#include "olwm.h"
X#include "win.h"
X#include "menu.h"
X#include "globals.h"
X#include "events.h"
X
X/***************************************************************************
X* global data
X***************************************************************************/
X
Xextern Atom AtomChangeState;
Xextern Atom AtomColorMapWindows;
Xextern Atom AtomOlwmTimestamp;
Xextern Window NoFocusWin;
X
X/***************************************************************************
X* private data
X***************************************************************************/
X
X/* border width for reparented windows */
X#define NORMAL_BORDERWIDTH 0
X
X/* This event maks if for wm-created icon panes. */
X#define ICON_EVENT_MASK (ButtonPressMask | ButtonReleaseMask | \
X ButtonMotionMask | ExposureMask | \
X EnterWindowMask)
X
X/* This event mask is for clients who handle their own icons. */
X#define ICON_EVENT_MASK_2 (ButtonPressMask | ButtonReleaseMask | \
X ButtonMotionMask | EnterWindowMask)
X
Xstatic ClassPane classIconPane;
X
X#define IPANE_DEFAULT_PIXMAP(w) (w)->core.client->scrInfo->pixmap[ICON_BITMAP]
X#define IPANE_DEFAULT_MASK(w) (w)->core.client->scrInfo->pixmap[ICON_MASK]
X
X/***************************************************************************
X* private functions
X***************************************************************************/
X
X/*
X * drawIPane -- draw the pane window
X */
X/*ARGSUSED*/ /* dpy arg will be used when multiple Displays supported */
Xstatic int
XdrawIPane(dpy, winInfo)
XDisplay *dpy;
XWinIconPane *winInfo;
X{
X Window pane = winInfo->core.self;
X Client *cli = winInfo->core.client;
X GC gc;
X XGCValues gcv;
X
X if (winInfo->iconClientWindow) {
X if (winInfo->core.client->flags & CLOlwmOwned) {
X XFillRectangle(dpy, pane, WinGC(winInfo, WORKSPACE_GC),
X 0, 0, winInfo->core.width, winInfo->core.height);
X gc = WinGC(winInfo, ICON_MASK_GC);
X XSetClipMask(dpy, gc, winInfo->iconMask);
X XSetBackground(dpy, gc,
X winInfo->core.client->scrInfo->colorInfo.vIconColor);
X XCopyPlane(dpy, winInfo->iconPixmap, pane, gc,
X 0, 0, winInfo->core.width, winInfo->core.height,
X 0, 0, (unsigned long)1L);
X XSetClipMask(dpy, gc, None);
X XSetBackground(dpy, gc,
X winInfo->core.client->scrInfo->colorInfo.bgColor);
X }
X return;
X }
X
X XFillRectangle(dpy, pane, WinGC(winInfo,WORKSPACE_GC),
X 0, 0, winInfo->core.width, winInfo->core.height);
X
X /*
X * REMIND: (1) Need to error-check icon pixmap and mask for being the
X * proper depth. (2) Need to handle color changes better. Should we use
X * a different GC?
X */
X gc = WinGC(winInfo,ICON_NORMAL_GC);
X
X if (winInfo->iconMask != None) {
X gc = WinGC(winInfo,ICON_MASK_GC);
X XSetClipMask(dpy, gc, winInfo->iconMask);
X }
X
X XCopyPlane(dpy, winInfo->iconPixmap, pane, gc,
X 0, 0, winInfo->core.width, winInfo->core.height,
X 0, 0, (unsigned long)1L);
X
X if (winInfo->iconMask != None) {
X XSetClipMask(dpy, gc, None);
X }
X}
X
X
X/*
X * focusIPane -- handle focus change
X */
Xstatic int
XfocusIPane(dpy, winInfo, focus)
XDisplay *dpy;
XWinGeneric *winInfo;
XBool focus;
X{
X /* REMIND: change background pixel of pane window */
X}
X
X/*
X * destroyIPane -- destroy the pane window resources and free any allocated
X * data.
X */
Xstatic int
XdestroyIPane(dpy, winInfo)
XDisplay *dpy;
XWinIconPane *winInfo;
X{
X /* free our data and throw away window */
X if (!winInfo->iconClientWindow)
X {
X /* REMIND there may be other resources to be freed */
X DestroyWindow(winInfo);
X }
X else WIUninstallInfo(winInfo->core.self);
X MemFree(winInfo);
X}
X
X/*
X * setconfigIPane -- change configuration of pane window
X */
X/*ARGSUSED*/ /* dpy arg will be used when multiple Displays supported */
Xstatic int
XsetconfigIPane(dpy, winInfo)
XDisplay *dpy;
XWinIconPane *winInfo;
X{
X XWindowChanges xwc;
X
X if (winInfo->core.dirtyconfig)
X {
X xwc.x = winInfo->core.x;
X xwc.y = winInfo->core.y;
X xwc.width = winInfo->core.width;
X xwc.height = winInfo->core.height;
X ConfigureWindow(dpy, winInfo,
X winInfo->core.dirtyconfig&(CWX|CWY|CWWidth|CWHeight), &xwc);
X winInfo->core.dirtyconfig &= ~(CWX|CWY|CWWidth|CWHeight);
X }
X}
X
X
X/*
X * newconfigIPane - compute a new configuration given an event
X * Note: this function must *always* be called with a configure request
X * event.
X */
Xstatic int
XnewconfigIPane(win, pxcre)
XWinIconPane *win;
XXConfigureRequestEvent *pxcre;
X{
X int oldWidth, oldHeight;
X int oldX, oldY;
X WinIconFrame *winFrame = (WinIconFrame *)(win->core.parent);
X
X if (pxcre == NULL)
X return win->core.dirtyconfig;
X
X oldX = win->core.x;
X oldY = win->core.y;
X oldWidth = win->core.width;
X oldHeight = win->core.height;
X
X if ((pxcre->value_mask & CWHeight) && (pxcre->height != oldHeight))
X {
X win->core.height = pxcre->height;
X win->core.dirtyconfig |= CWHeight;
X }
X
X if ((pxcre->value_mask & CWWidth) && (pxcre->width != oldWidth))
X {
X win->core.width = pxcre->width;
X win->core.dirtyconfig |= CWWidth;
X }
X
X if (pxcre->value_mask & CWBorderWidth)
X {
X win->pcore.oldBorderWidth = pxcre->border_width;
X }
X
X if (pxcre->value_mask & (CWX | CWY))
X {
X FrameSetPosFromPane(winFrame, (pxcre->value_mask & CWX)?(pxcre->x):oldX,
X (pxcre->value_mask & CWY)?(pxcre->y):oldY);
X }
X
X if (pxcre->value_mask & (CWStackMode | CWSibling))
X {
X GFrameSetStack(winFrame, pxcre->value_mask, pxcre->detail, pxcre->above);
X }
X
X return win->core.dirtyconfig;
X}
X
X/*
X * newposIPane - move to a given position (relative to parent)
X */
Xstatic int
XnewposIPane(win,x,y)
XWinIconPane *win;
Xint x, y;
X{
X if (win->core.x != x)
X {
X win->core.x = x;
X win->core.dirtyconfig |= CWX;
X }
X
X if (win->core.y != y)
X {
X win->core.y = y;
X win->core.dirtyconfig |= CWY;
X }
X
X return win->core.dirtyconfig;
X}
X
X/*
X * setsizeIPane - set the pane to a particular size, and initiate a reconfigure
X */
Xstatic int
XsetsizeIPane(win,w,h)
XWinIconPane *win;
Xint w, h;
X{
X if (win->core.width != w)
X {
X win->core.width = w;
X win->core.dirtyconfig |= CWWidth;
X }
X
X if (win->core.height != h)
X {
X win->core.height = h;
X win->core.dirtyconfig |= CWHeight;
X }
X}
X
Xstatic int
XeventEnterNotify(dpy, event, winInfo)
XDisplay *dpy;
XXEvent *event;
XWinIconPane *winInfo;
X{
X if (event->xany.type == EnterNotify)
X ColorWindowCrossing(dpy, event, winInfo);
X}
X
X
X/***************************************************************************
X* global functions
X***************************************************************************/
X
X/*
X * MakeIconPane -- create the pane window. Return a WinGeneric structure.
X */
XWinIconPane *
XMakeIconPane(cli,par,wmHints,fexisting)
XClient *cli;
XWinGeneric *par;
XXWMHints *wmHints;
XBool fexisting;
X{
X WinIconPane *w;
X WinIconFrame *frame = (WinIconFrame *)par;
X XSetWindowAttributes xswa;
X XWindowAttributes attr;
X long valuemask;
X Window iconPane;
X Window winRoot;
X unsigned int borderWidth, depthReturn;
X Display *dpy = cli->dpy;
X int screen = cli->screen;
X Status status;
X WinGeneric *info;
X
X /* create the associated structure */
X w = MemNew(WinIconPane);
X w->class = &classIconPane;
X w->core.kind = WIN_ICONPANE;
X WinAddChild(par,w);
X w->core.children = NULL;
X w->core.client = cli;
X w->core.x = 0;
X w->core.y = 0;
X w->core.colormap = cli->scrInfo->colormap;
X w->core.dirtyconfig = CWX|CWY|CWWidth|CWHeight;
X w->core.exposures = NULL;
X w->core.helpstring = "olwm:Icon";
X w->iconClientWindow = False;
X w->iconPixmap = None;
X w->iconMask = None;
X
X frame->fcore.panewin = (WinGenericPane *)w;
X
X /* first try the client's icon window hint */
X
X if (wmHints && (wmHints->flags & IconWindowHint)) {
X iconPane = wmHints->icon_window;
X info = WIGetInfo(iconPane);
X if (info != NULL && info->core.kind != WIN_PANE) {
X ErrorWarning(gettext(
X "An existing window was named as an icon window."));
X } else {
X if (info != NULL)
X StateWithdrawn(info->core.client);
X
X status = XGetWindowAttributes(dpy, iconPane, &attr);
X
X if (status) {
X w->core.x = attr.x;
X w->core.y = attr.y;
X w->core.width = attr.width;
X w->core.height = attr.height;
X w->core.colormap = attr.colormap;
X
X w->iconClientWindow = True;
X if (cli->flags & CLOlwmOwned)
X XSelectInput(dpy, iconPane, ICON_EVENT_MASK);
X else XSelectInput(dpy, iconPane, ICON_EVENT_MASK_2);
X if (attr.border_width != NORMAL_BORDERWIDTH)
X XSetWindowBorderWidth(dpy, iconPane,
X NORMAL_BORDERWIDTH);
X goto goodicon;
X }
X ErrorWarning(gettext(
X "An invalid window was named as an icon window."));
X }
X }
X
X /* try the client's icon pixmap hint */
X
X if (wmHints && (wmHints->flags & IconPixmapHint)) {
X status = XGetGeometry(dpy, wmHints->icon_pixmap, &winRoot,
X &(w->core.x), &(w->core.y),
X &(w->core.width), &(w->core.height),
X &borderWidth, &depthReturn);
X
X if (status && depthReturn <= 1) {
X /* build icon pixmap window */
X xswa.border_pixel = 0;
X xswa.colormap = cli->scrInfo->colormap;
X xswa.event_mask = ICON_EVENT_MASK;
X valuemask = CWBorderPixel | CWColormap | CWEventMask;
X
X iconPane = XCreateWindow(dpy,WinRootID(par),
X 0, 0, w->core.width, w->core.height, 0,
X cli->scrInfo->depth, InputOutput, cli->scrInfo->visual,
X valuemask, &xswa);
X
X w->iconPixmap = wmHints->icon_pixmap;
X
X /* check for the icon mask */
X
X if (wmHints->flags & IconMaskHint) {
X int junkx, junky;
X unsigned int junkw, junkh;
X
X status = XGetGeometry(dpy, wmHints->icon_mask, &winRoot,
X &junkx, &junky, &junkw, &junkh,
X &borderWidth, &depthReturn);
X
X if (status && depthReturn == 1)
X w->iconMask = wmHints->icon_mask;
X else
X ErrorWarning(gettext(
X "An invalid pixmap was named as an icon mask"));
X }
X goto goodicon;
X
X } else {
X ErrorWarning(gettext(
X "An invalid pixmap was named as an icon pixmap"));
X }
X }
X
X /* use the default icon */
X
X w->iconClientWindow = False;
X w->iconPixmap = IPANE_DEFAULT_PIXMAP(w);
X w->iconMask = IPANE_DEFAULT_MASK(w);
X
X w->core.x = w->core.y = 0;
X w->core.width = cli->scrInfo->dfltIconWidth;
X w->core.height = cli->scrInfo->dfltIconHeight;
X
X xswa.border_pixel = 0;
X xswa.colormap = cli->scrInfo->colormap;
X xswa.event_mask = ICON_EVENT_MASK;
X valuemask = CWBorderPixel | CWColormap | CWEventMask;
X
X iconPane = XCreateWindow(dpy, WinRootID(par),
X 0, 0, w->core.width, w->core.height, 0,
X cli->scrInfo->depth, InputOutput, cli->scrInfo->visual,
X valuemask, &xswa);
X
Xgoodicon:
X
X w->core.self = iconPane;
X
X /* set up icon cursor */
X XDefineCursor(dpy, w->core.self, GRV.IconPointer);
X
X /* register the window */
X WIInstallInfo(w);
X
X return w;
X}
X
X/*
X * IconPaneInit -- initialise the IconPane class function vector
X */
Xvoid
XIconPaneInit(dpy)
XDisplay *dpy;
X{
X classIconPane.core.kind = WIN_ICONPANE;
X classIconPane.core.xevents[Expose] = WinEventExpose;
X classIconPane.core.xevents[ButtonRelease] = PropagateEventToParent;
X classIconPane.core.xevents[MotionNotify] = PropagateEventToParent;
X classIconPane.core.xevents[ButtonPress] = PropagateEventToParent;
X classIconPane.core.xevents[EnterNotify] = eventEnterNotify;
X classIconPane.core.focusfunc = focusIPane;
X classIconPane.core.drawfunc = drawIPane; /* NULL */
X classIconPane.core.destroyfunc = destroyIPane;
X classIconPane.core.selectfunc = drawIPane; /* NULL */
X classIconPane.core.newconfigfunc = newconfigIPane;
X classIconPane.core.newposfunc = newposIPane;
X classIconPane.core.setconfigfunc = setconfigIPane;
X classIconPane.core.createcallback = NULL;
X classIconPane.core.heightfunc = NULL;
X classIconPane.core.widthfunc = NULL;
X classIconPane.pcore.setsizefunc = setsizeIPane;
X}
X
X/*
X * Set the icon pane's pixmap.
X */
Xvoid
XIconPaneSetPixmap(dpy,winInfo,pixmap)
X Display *dpy;
X WinIconPane *winInfo;
X Pixmap pixmap;
X{
X if (winInfo->iconClientWindow)
X return;
X
X if (pixmap == None || pixmap == winInfo->iconPixmap)
X return;
X
X if (winInfo->iconMask == IPANE_DEFAULT_MASK(winInfo))
X winInfo->iconMask = None;
X
X winInfo->iconPixmap = pixmap;
X}
X
X/*
X * Set the icon pane's mask.
X */
Xvoid
XIconPaneSetMask(dpy,winInfo,mask)
X Display *dpy;
X WinIconPane *winInfo;
X Pixmap mask;
X{
X if (winInfo->iconClientWindow)
X return;
X
X if (mask == None || mask == winInfo->iconMask)
X return;
X
X if (winInfo->iconPixmap == IPANE_DEFAULT_PIXMAP(winInfo))
X winInfo->iconPixmap = None;
X
X winInfo->iconMask = mask;
X}
X
X
END_OF_FILE
if test 12968 -ne `wc -c <'winipane.c'`; then
echo shar: \"'winipane.c'\" unpacked with wrong size!
fi
# end of 'winipane.c'
fi
echo shar: End of archive 5 \(of 21\).
cp /dev/null ark5isdone
MISSING=""
for I in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 ; do
if test ! -f ark${I}isdone ; then
MISSING="${MISSING} ${I}"
fi
done
if test "${MISSING}" = "" ; then
echo You have unpacked all 21 archives.
rm -f ark[1-9]isdone ark[1-9][0-9]isdone
else
echo You still need to unpack the following archives:
echo " " ${MISSING}
fi
## End of shell archive.
exit 0
--
Molecular Simulations, Inc. mail: dcmartin@postgres.berkeley.edu
796 N. Pastoria Avenue uucp: uwvax!ucbvax!dcmartin
Sunnyvale, California 94086 at&t: 408/522-9236