DataMuseum.dk

Presents historical artifacts from the history of:

DKUUG/EUUG Conference tapes

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about DKUUG/EUUG Conference tapes

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - metrics - download
Index: T g

⟦3004cca23⟧ TextFile

    Length: 4372 (0x1114)
    Types: TextFile
    Names: »gxdevice.h«

Derivation

└─⟦a05ed705a⟧ Bits:30007078 DKUUG GNU 2/12/89
    └─⟦ff23ba0e6⟧ »./ghostscript-1.3.tar.Z« 
        └─⟦a24a58cd3⟧ 
            └─⟦this⟧ »gxdevice.h« 

TextFile

/* Copyright (C) 1989 Aladdin Enterprises.  All rights reserved.
   Distributed by Free Software Foundation, Inc.

This file is part of Ghostscript.

Ghostscript is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY.  No author or distributor accepts responsibility
to anyone for the consequences of using it or for whether it serves any
particular purpose or works at all, unless he says so in writing.  Refer
to the Ghostscript General Public License for full details.

Everyone is granted permission to copy, modify and redistribute
Ghostscript, but only under the conditions described in the Ghostscript
General Public License.  A copy of this license is supposed to have been
given to you along with Ghostscript so you can know your rights and
responsibilities.  It should be in a file named COPYING.  Among other
things, the copyright notice and this notice must be preserved on all
copies.  */

/* gxdevice.h */
/* Device description structure for GhostScript library */
/* Requires gsmatrix.h */

/* Define the structure for bitmaps (opaquely). */
typedef struct gx_bitmap_s gx_bitmap;

/* Define the type for device color indices. */
typedef unsigned long gx_color_index;
#define gx_no_color_index ((gx_color_index)(-1))	/* transparent */

/* See drivers.doc for documentation of the driver interface. */

/* Structure for device procedures */
typedef struct gx_device_procs_s gx_device_procs;
struct gx_device_procs_s {

	int (*open_device)(P1(struct gx_device_s *));

	int (*close_device)(P1(struct gx_device_s *));

	gx_color_index (*map_rgb_color)(P4(struct gx_device_s *,
		unsigned short /*red*/, unsigned short /*green*/,
		unsigned short /*blue*/));

	int (*map_color_rgb)(P3(struct gx_device_s *,
		gx_color_index, unsigned short [3]));

	int (*sync_output)(P1(struct gx_device_s *));

	int (*fill_rectangle)(P6(struct gx_device_s *,
		int x, int y, int width, int height, gx_color_index color));

	int (*tile_rectangle)(P8(struct gx_device_s *,
		gx_bitmap * tile, int x, int y, int width, int height,
		gx_color_index color0, gx_color_index color1));

	int (*copy_mono)(P10(struct gx_device_s *,
		unsigned char *data, int data_x, int raster,
		int x, int y, int width, int height,
		gx_color_index color0, gx_color_index color1));

	int (*copy_color)(P8(struct gx_device_s *,
		unsigned char *data, int data_x, int raster,
		int x, int y, int width, int height));

	int (*draw_line)(P6(struct gx_device_s *,
		int x0, int y0, int x1, int y1, gx_color_index color));

	int (*fill_trapezoid)(P8(struct gx_device_s *,
		int x0, int y0, int width0, int x1, int y1, int width1,
		gx_color_index color));

	int (*tile_trapezoid)(P10(struct gx_device_s *, gx_bitmap *tile,
		int x0, int y0, int width0, int x1, int y1, int width1,
		gx_color_index color0, gx_color_index color1));

};

/* Default implementations of optional procedures */
extern int
  gx_default_open_device
    (P1(struct gx_device_s *)),
  gx_default_close_device
    (P1(struct gx_device_s *));
extern gx_color_index
  gx_default_map_rgb_color
    (P4(struct gx_device_s *, unsigned short, unsigned short, unsigned short));
extern int
  gx_default_map_color_rgb
    (P3(struct gx_device_s *, gx_color_index, unsigned short *)),
  gx_default_sync_output
    (P1(struct gx_device_s *)),
  gx_default_tile_rectangle
    (P8(struct gx_device_s *, gx_bitmap *, int, int, int, int,
      gx_color_index, gx_color_index)),
  gx_default_draw_line
    (P6(struct gx_device_s *, int, int, int, int, gx_color_index)),
  gx_default_fill_trapezoid
    (P8(struct gx_device_s *, int, int, int, int, int, int, gx_color_index)),
  gx_default_tile_trapezoid
    (P10(struct gx_device_s *, gx_bitmap *, int, int, int, int, int, int,
      gx_color_index, gx_color_index));

/* Structure for generic device description */
#define gx_device_common\
	int params_size;		/* size of this structure */\
	gx_device_procs *procs;\
	gs_matrix initial_matrix;	/* initial transformation */\
	int width;			/* width in pixels */\
	int height;			/* height in pixels */\
	int has_color;			/* true if device supports color */\
	unsigned short max_rgb_value;	/* max r, g, b value */\
	int bits_per_color_pixel;	/* for copy_color */\
	int bits_from_MSB;		/* true if bit-big-endian */\
	int is_open			/* true if device has been opened */
/* A generic device */
struct gx_device_s {
	gx_device_common;
};