1
/* Copyright (C) 2001-2008 Artifex Software, Inc.
4
This software is provided AS-IS with no warranty, either express or
7
This software is distributed under license and may not be copied, modified
8
or distributed except as expressly authorized under the terms of that
9
license. Refer to licensing information at http://www.artifex.com/
10
or contact Artifex Software, Inc., 7 Mt. Lassen Drive - Suite A-134,
11
San Rafael, CA 94903, U.S.A., +1(415)492-9861, for further information.
13
/* $Id: dwimg.h 9043 2008-08-28 22:48:19Z giles $ */
15
#ifndef dwimg_INCLUDED
16
# define dwimg_INCLUDED
19
/* Windows Image Window structure */
21
typedef struct IMAGE_DEVICEN_S IMAGE_DEVICEN;
22
struct IMAGE_DEVICEN_S {
23
int used; /* non-zero if in use */
24
int visible; /* show on window */
30
int menu; /* non-zero if menu item added to system menu */
32
#define IMAGE_DEVICEN_MAX 8
34
typedef struct IMAGE_S IMAGE;
39
HBRUSH hBrush; /* background */
43
BITMAPINFOHEADER bmih;
46
int devicen_gray; /* true if a single separation should be shown gray */
47
IMAGE_DEVICEN devicen[IMAGE_DEVICEN_MAX];
49
/* periodic redrawing */
50
UINT update_timer; /* identifier */
51
int update_tick; /* timer duration in milliseconds */
52
int update_count; /* Number of WM_TIMER messages received */
53
int update_interval; /* Number of WM_TIMER until refresh */
54
int pending_update; /* We have asked for periodic updates */
55
int pending_sync; /* We have asked for a SYNC */
57
/* Window scrolling stuff */
58
int cxClient, cyClient;
59
int cxAdjust, cyAdjust;
60
int nVscrollPos, nVscrollMax;
61
int nHscrollPos, nHscrollMax;
63
/* thread synchronisation */
68
HWND hwndtext; /* handle to text window */
70
int x, y, cx, cy; /* window position */
73
extern IMAGE *first_image;
75
/* Main thread only */
76
IMAGE *image_find(void *handle, void *device);
77
IMAGE *image_new(void *handle, void *device);
78
void image_delete(IMAGE *img);
79
int image_size(IMAGE *img, int new_width, int new_height, int new_raster,
80
unsigned int new_format, void *pimage);
81
int image_separation(IMAGE *img, int comp_num, const char *name,
82
unsigned short c, unsigned short m, unsigned short y, unsigned short k);
85
void image_open(IMAGE *img);
86
void image_close(IMAGE *img);
87
void image_sync(IMAGE *img);
88
void image_page(IMAGE *img);
89
void image_presize(IMAGE *img, int new_width, int new_height, int new_raster,
90
unsigned int new_format);
91
void image_poll(IMAGE *img);
92
void image_updatesize(IMAGE *img);
94
/* To be called during initialization after the text window has been created */
95
void image_textwindow(HWND hwnd);
98
#endif /* dwimg_INCLUDED */