mirror of
https://github.com/Interlisp/maiko.git
synced 2026-01-17 00:22:59 +00:00
Add some missing default function result types (int). Add some missing void result types where appropriate. modified: src/Cldeetr.c modified: src/atom.c modified: src/bbtsub.c modified: src/bitblt.c modified: src/byteswap.c modified: src/chardev.c modified: src/chatter.c modified: src/colorbltfns.c modified: src/common.c modified: src/dir.c modified: src/dlpi.c modified: src/doskbd.c modified: src/dosmouse.c modified: src/draw.c modified: src/dsk.c modified: src/dspsubrs.c modified: src/ejlisp.c modified: src/ether.c modified: src/imagefile.c modified: src/imagefile2.c modified: src/inet.c modified: src/initdsp.c modified: src/initkbd.c modified: src/kbdsubrs.c modified: src/ldeboot.c modified: src/llcolor.c modified: src/llstk.c modified: src/loader.c modified: src/loopsops.c modified: src/lpdual.c modified: src/lpmain.c modified: src/lpread.c modified: src/lptran.c modified: src/lpwrite.c modified: src/main.c modified: src/misc7.c modified: src/mkatom.c modified: src/mnwevent.c modified: src/mnxmeth.c modified: src/mouseif.c modified: src/ocr.c modified: src/ocrproc.c modified: src/oether.c modified: src/oldeether.c modified: src/osmsg.c modified: src/picture.c modified: src/rawcolor.c modified: src/rawrs232c.c modified: src/rpc.c modified: src/rs232c.c modified: src/socdvr.c modified: src/socket.c modified: src/testdsp.c modified: src/testtool.c modified: src/timeoday.c modified: src/timeofday.c modified: src/timer.c modified: src/truecolor.c modified: src/tty.c modified: src/ufn.c modified: src/ufs.c modified: src/unixcomm.c modified: src/unixfork.c modified: src/unwind.c modified: src/uraid.c modified: src/vesainit.c modified: src/vgainit.c modified: src/vmemsave.c modified: src/xcursor.c modified: src/xinit.c modified: src/xlspwin.c modified: src/xmkicon.c modified: src/xrdopt.c modified: src/xwinman.c
91 lines
2.9 KiB
C
91 lines
2.9 KiB
C
/* $Id: xmkicon.c,v 1.3 2001/12/24 01:09:09 sybalsky Exp $ (C) Copyright Venue, All Rights Reserved
|
|
*/
|
|
static char *id = "$Id: xmkicon.c,v 1.3 2001/12/24 01:09:09 sybalsky Exp $ Copyright (C) Venue";
|
|
|
|
/************************************************************************/
|
|
/* */
|
|
/* (C) Copyright 1989, 1990, 1990, 1991, 1992, 1993, 1994, 1995 Venue. */
|
|
/* All Rights Reserved. */
|
|
/* Manufactured in the United States of America. */
|
|
/* */
|
|
/* The contents of this file are proprietary information */
|
|
/* belonging to Venue, and are provided to you under license. */
|
|
/* They may not be further distributed or disclosed to third */
|
|
/* parties without the specific permission of Venue. */
|
|
/* */
|
|
/************************************************************************/
|
|
|
|
#include "version.h"
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <X11/Xlib.h>
|
|
#include <X11/Xutil.h>
|
|
#include "lispemul.h"
|
|
#include "dbprint.h"
|
|
|
|
#include "xdefs.h"
|
|
#include "devif.h"
|
|
|
|
XImage IconImage;
|
|
|
|
extern int Bitmap_Pad, Default_Depth, Lisp_icon_width, Lisp_icon_height;
|
|
extern char Lisp_icon[];
|
|
|
|
extern Pixmap IconPixmap;
|
|
extern char iconpixmapfile[1024];
|
|
|
|
/************************************************************************/
|
|
/* */
|
|
/* m a k e _ X i c o n */
|
|
/* */
|
|
/* Make the icon for the shrunken Medley window. */
|
|
/* */
|
|
/************************************************************************/
|
|
|
|
Pixmap make_Xicon(DspInterface dsp)
|
|
{
|
|
unsigned int width, height;
|
|
int value, x_hot, y_hot;
|
|
char *getenv();
|
|
|
|
#ifdef TRACE
|
|
printf("In make_Xicon().\n");
|
|
#endif
|
|
value = XReadBitmapFile(dsp->display_id, RootWindow(dsp->display_id, 0), iconpixmapfile, &width,
|
|
&height, &IconPixmap, &x_hot, &y_hot);
|
|
if (value == BitmapOpenFailed) {
|
|
IconImage.width = Lisp_icon_width;
|
|
IconImage.height = Lisp_icon_height;
|
|
IconImage.xoffset = 0;
|
|
IconImage.format = XYBitmap;
|
|
IconImage.data = (char *)Lisp_icon;
|
|
#if defined(BYTESWAP)
|
|
IconImage.byte_order = LSBFirst;
|
|
#else /* BYTESWAP */
|
|
IconImage.byte_order = MSBFirst;
|
|
#endif /* BYTESWAP */
|
|
IconImage.bitmap_unit = 8;
|
|
IconImage.bitmap_pad = Bitmap_Pad;
|
|
IconImage.depth = 1;
|
|
IconImage.bytes_per_line = Lisp_icon_width / 8;
|
|
#if defined(X_ICON_IN_X_BITMAP_FORMAT)
|
|
IconImage.bitmap_bit_order = LSBFirst;
|
|
#else
|
|
IconImage.bitmap_bit_order = MSBFirst;
|
|
#endif
|
|
|
|
IconPixmap = XCreatePixmap(
|
|
dsp->display_id, dsp->LispWindow, Lisp_icon_width, Lisp_icon_height,
|
|
DefaultDepthOfScreen(ScreenOfDisplay(dsp->display_id, DefaultScreen(dsp->display_id))));
|
|
|
|
XPutImage(dsp->display_id, IconPixmap, dsp->Copy_GC, &IconImage, 0, 0, 0, 0, Lisp_icon_width,
|
|
Lisp_icon_height);
|
|
|
|
} else if (value == BitmapFileInvalid)
|
|
fprintf(stderr, "Iconpixmapfile %s contains invalid bitmap data\n", iconpixmapfile);
|
|
else if (value == BitmapNoMemory)
|
|
fprintf(stderr, "Not enough memory to allocate icon pixmap\n");
|
|
return (IconPixmap);
|
|
} /* end make_Xicon */
|