All Rights Reserved.
This software is provided AS-IS with no warranty, either express or
implied.
This software is distributed under license and may not be copied,
modified or distributed except as expressly authorized under the terms
of the license contained in the file LICENSE in this distribution.
Refer to licensing information at http://www.artifex.com or contact
Artifex Software, Inc., 39 Mesa Street, Suite 108A, San Francisco,
CA 94129, USA, for further information.
*/
#ifndef dwimg_INCLUDED
# define dwimg_INCLUDED
#include "windows_.h"
typedef struct IMAGE_DEVICEN_S IMAGE_DEVICEN;
struct IMAGE_DEVICEN_S {
int used;
int visible;
char name[64];
int cyan;
int magenta;
int yellow;
int black;
int menu;
};
#define IMAGE_DEVICEN_MAX 8
typedef struct IMAGE_S IMAGE;
struct IMAGE_S {
void *handle;
void *device;
HWND hwnd;
HBRUSH hBrush;
int raster;
unsigned int format;
unsigned char *image;
BITMAPINFOHEADER bmih;
HPALETTE palette;
int bytewidth;
int devicen_gray;
IMAGE_DEVICEN devicen[IMAGE_DEVICEN_MAX];
UINT update_timer;
int update_tick;
int update_count;
int update_interval;
int pending_update;
int pending_sync;
int cxClient, cyClient;
int cxAdjust, cyAdjust;
int nVscrollPos, nVscrollMax;
int nHscrollPos, nHscrollMax;
HANDLE hmutex;
IMAGE *next;
HWND hwndtext;
int x, y, cx, cy;
};
extern IMAGE *first_image;
IMAGE *image_find(void *handle, void *device);
IMAGE *image_new(void *handle, void *device);
void image_delete(IMAGE *img);
int image_size(IMAGE *img, int new_width, int new_height, int new_raster,
unsigned int new_format, void *pimage);
int image_separation(IMAGE *img, int comp_num, const char *name,
unsigned short c, unsigned short m, unsigned short y, unsigned short k);
void image_open(IMAGE *img);
void image_close(IMAGE *img);
void image_sync(IMAGE *img);
void image_page(IMAGE *img);
void image_presize(IMAGE *img, int new_width, int new_height, int new_raster,
unsigned int new_format);
void image_poll(IMAGE *img);
void image_updatesize(IMAGE *img);
void image_textwindow(HWND hwnd);
#endif