⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 gvwin.h

📁 GSview 4.6 PostScript previewer。Ghostscript在MS-Windows, OS/2 and Unix下的图形化接口
💻 H
📖 第 1 页 / 共 2 页
字号:
	char *entry;		/* profile entry */
	int title;		/* Resource string */
	TCHAR file[MAXSTR];	/* empty, "beep", or .WAV sound to play */
};
extern struct sound_s sound[NUMSOUND];
#define BEEP "beep"		/* profile entry for a speaker beep */
typedef BOOL (WINAPI *FPSPS)(LPCTSTR, UINT);
extern HINSTANCE hlib_mmsystem;	/* DLL containing sndPlaySound function */
extern FPSPS lpfnSndPlaySound;	/* pointer to sndPlaySound function if loaded */

extern const TCHAR szClassName[];
extern const TCHAR szImgClassName[];
extern const char szScratch[];  /* temporary filename prefix */
extern char *szSpoolPrefix;	/* usually \\spool\ */
extern TCHAR szAppName[MAXSTR];
extern int nHelpTopic;
extern TCHAR szWait[MAXSTR];
extern TCHAR szExePath[MAXSTR];
extern char szIniFile[MAXSTR];
extern char szFindText[MAXSTR];
extern TCHAR szHelpName[MAXSTR];		/* buffer for building help filename */
extern char previous_filename[MAXSTR];	/* to remember name between file dlg boxes */
extern char selectname[MAXSTR];		/* for IDM_SELECT */
extern UINT help_message;		/* message sent by OFN_SHOWHELP */
extern GSVIEW_ARGS args;		/* Parsed arguments */
extern HWND hwndimg;			/* gsview main window */
extern HWND hDlgModeless;		/* any modeless dialog box */
extern HWND hwnd_measure;		/* measure modeless dialog box */
extern HWND hwndimgchild;		/* gswin image child window */
extern HWND hwnd_fullscreen;		/* full screen popup of child window */
extern HWND hwnd_image;			/* full screen or image child window */	
extern HINSTANCE phInstance;		/* instance of gsview */
extern HINSTANCE hlanguage;		/* instance of language resources */
extern UINT nCodePageLanguage;		/* Code page of the GSview language */
extern UINT nCodePageSystem;		/* Code page of the system */
extern BOOL is_win31;			/* To allow selective use of win 3.1 features */
extern BOOL is_winnt;			/* To allow selective use of Windows NT features */
extern BOOL is_win95;			/* To allow selective use of Windows 95 features */
extern BOOL is_win98;			/* To allow selective use of Windows 98 features */
extern BOOL is_win32s;			/* To allow selective use of Win32s misfeatures */
extern BOOL is_win4;			/* To allow selective use of Windows 4.0 features */
extern BOOL multithread;		/* TRUE if running multithreaded */
extern CRITICAL_SECTION crit_sec;	/* for thread synchronization */
extern HANDLE hmutex_ps;		/* for protecting psfile and pending */
extern HMENU hmenu;			/* main menu */
extern HACCEL haccel;			/* menu accelerators */
extern HCURSOR hcWait;
extern HCURSOR hcCrossHair;
extern HCURSOR hcHand;
extern HPEN hpen_btnshadow;		/* button shadow */
extern HPEN hpen_btnhighlight;		/* button highlight */
extern HBRUSH hbrush_window;		/* Window background */
extern HBRUSH hbrush_menu;		/* menu background */
extern int bitmap_scrollx;	/* offset from bitmap to origin of child window */
extern int bitmap_scrolly;
extern HFONT info_font;
extern HFONT hFontAnsi;			/* ANSI (Western European) font */
extern HFONT hFontGreek;		/* cp 1253 / Greek font */
extern HFONT hFontEastEurope;		/* ISO-Latin2 / cp1250 font */
extern HFONT hFontCyrillic;		/* ISO-Latin5 / cp1251 font */
extern POINT img_offset;		/* offset to gswin child window */
extern POINT info_file;		/* position of file information */
extern POINT info_page;		/* position of page information */
extern RECT  info_rect;		/* position and size of brief info area */
extern RECT  info_coord;		/* position and size of coordinate information */
extern RECT  button_rect;		/* position and size of button area */
extern int on_link;			/* TRUE if we were or are over link */
extern int on_link_page;		/* page number of link target */
extern long gsbytes_size;		/* number of bytes for this page */
extern long gsbytes_done;		/* number of byte written */
extern OPENFILENAME ofn;
extern WNDPROC lpfnButtonWndProc;
extern BOOL quitnow;	/* Used to cause exit from nested message loops */
extern int percent_done;		/* percentage of document processed */
extern int percent_pending;		/* TRUE if WM_GSPERCENT is pending */
extern BOOL fit_page_enabled;		/* next WM_SIZE is allowed to resize window */

extern PROG gsprog;
extern BMAP bitmap;
extern OPTIONS option;
extern PSFILE psfile;
extern PRINTER printer;
extern BOOL win32s_printer_pending;
extern DISPLAY display;
/* extern PSDOC *doc;	/* points to psfile->doc */
extern int page_skip;
extern BOOL changed_version;
extern BOOL zoom;

extern PSBBOX bbox;

extern TCHAR registration_name[MAXSTR];
extern unsigned int registration_receipt;

/* Display dialog boxes on the first display, instead of centred.
 * Display full screen on the last display.
 * So we need to find out where the display are located...
 */
typedef struct tagDISPLAY_INFO {
    int left;
    int top;
    int width;
    int height;
} DISPLAY_INFO;
extern int number_of_displays; /* number of active displays */
extern DISPLAY_INFO first_display;
extern DISPLAY_INFO last_display;

/* PRINT_GDI */
extern int print_gdi_width;
extern int print_gdi_height;
extern int print_gdi_xdpi;
extern int print_gdi_ydpi;
extern HANDLE print_gdi_read_handle;
extern HANDLE print_gdi_write_handle;

#define MoveTo(hdc,x,y) MoveToEx((hdc),(x),(y),(LPPOINT)NULL)
#define SetWindowOrg(hdc, x, y) SetWindowOrgEx(hdc, x, y, (LPPOINT)NULL)
#define	SetWindowExt(hdc, x, y) SetWindowExtEx(hdc, x, y, (LPSIZE)NULL)
#define SetClassCursor(hwnd, hcursor) SetClassLong((hwnd), GCL_HCURSOR, (LONG)(hcursor))
#define GetClassCursor(hwnd) ((HCURSOR)GetClassLong((hwnd), GCL_HCURSOR))
#define GetNotification(wParam,lParam) (HIWORD(wParam))
#define SendDlgNotification(hwnd, id, notice) \
    SendMessage((hwnd), WM_COMMAND, MAKELONG((id),(notice)), (LPARAM)GetDlgItem((hwnd),(id)))

int load_string_a(int id, LPSTR str, int len);
int message_box_a(LPCSTR str, int icon);
int convert_multibyte(LPTSTR str, LPCSTR mbstr, int len);
int convert_widechar(LPSTR mbstr, LPCTSTR str, int len);

#ifdef UNICODE
#define MessageBoxL MessageBoxW
#define DialogBoxParamL DialogBoxParamW
#define CreateDialogParamL CreateDialogParamW
#define SendDlgItemMessageL SendDlgItemMessageW
#define SendDlgItemMessageLGetString SendDlgItemMessageW
#define GetDlgItemTextL GetDlgItemTextW
#define SetDlgItemTextL SetDlgItemTextW
#else
/* Some redirection stuff to allow NT to display text that
 * doesn't match the system code page
 */
int MessageBoxL(HWND hWnd, LPCTSTR lpText, LPCTSTR lpCaption, UINT uType);
BOOL GetOpenSaveFileNameL(LPOPENFILENAME pofn, BOOL save);
BOOL DialogBoxParamL(HINSTANCE hInstance, LPCTSTR lpTemplateName,
    HWND hWndParent, DLGPROC lpDialogProc, LPARAM dwInitParam);
HWND CreateDialogParamL(HINSTANCE hInstance, LPCTSTR lpTemplateName,
    HWND hWndParent, DLGPROC lpDialogProc, LPARAM dwInitParam);
BOOL SetDlgItemTextL(HWND hDlg, int nlDDlgItem, LPCTSTR lpString);
BOOL GetDlgItemTextL(HWND hDlg, int nlDDlgItem, LPSTR lpString, 
    int nMaxCount);
BOOL LoadStringL(HINSTANCE hlanguage, UINT id, LPTSTR str, int len);
LONG SendDlgItemMessageL(HWND hDlg, int id, UINT msg, WPARAM wParam, 
    LPARAM lParam);
LONG SendDlgItemMessageLGetString(HWND hDlg, int id, UINT msg, WPARAM wParam, 
  LPARAM lParam);
#undef SetDlgItemText
#define SetDlgItemText(hwnd, id, str) SetDlgItemTextL((hwnd), (id), (str))
#undef CreateDialogParam
#define CreateDialogParam(hinst, tmpl, hwnd, dlgproc, param) \
  CreateDialogParamL((hinst), (tmpl), (hwnd), (dlgproc), (param))
#undef DialogBoxParam
#define DialogBoxParam(hinst, tmpl, hwnd, dlgproc, param) \
    DialogBoxParamL((hinst), (tmpl), (hwnd), (dlgproc), (param))
#undef LoadString
#define LoadString(hlanguage, id, str, len) \
    LoadStringL((hlanguage), (id), (str), (len))
/* early versions of Win32s don't support lstrcpyn */
#undef lstrcpyn
#define lstrcpyn(d,s,n) strncpy(d,s,n)
#endif

#ifndef min
#define min(a,b) ((a) < (b) ? (a) : (b))
#endif

#include "gvcfn.h"    /* common function prototypes */
#include "gvcbeta.h"  /* common function prototypes */
#include "gvwgsver.h" /* common function prototypes */

/* in gvwin.c */
int gsview_main(HINSTANCE hInstance, LPSTR lpszCmdLine);
LRESULT CALLBACK _export MenuButtonProc(HWND, UINT, WPARAM, LPARAM);
LRESULT CALLBACK _export WndImgProc(HWND, UINT, WPARAM, LPARAM);
LRESULT CALLBACK _export WndImgChildProc(HWND, UINT, WPARAM, LPARAM);
BOOL in_child_client_area(void);
void enable_menu_item(int menuid, int itemid, BOOL enabled);

/* in gvwinit.c */
void gsview_init0(LPSTR lpszCmdLine);
BOOL gsview_init1(int argc, char *argv[]);
void gsview_create(void);

/* in gvwdisp.c */
void do_message(void);
BOOL exec_pgm(char *name, char *arg, PROG* prog);
void stop_pgm(PROG* prog);
void cleanup_pgm(PROG *prog);

/* in gvwdlg.c */
BOOL CALLBACK _export PageDlgProc(HWND hDlg, UINT wmsg, WPARAM wParam, LPARAM lParam);
BOOL CALLBACK _export PageMultiDlgProc(HWND hDlg, UINT wmsg, WPARAM wParam, LPARAM lParam);

/* in gvwprn.c */
BOOL get_portname(char *portname, char *port);
int gp_printfile(char *filename, char *port);
extern char not_defined[];
void start_gvwgs(void);

/* gvwimg.cpp */
void image_color(unsigned int format, int index, 
    unsigned char *r, unsigned char *g, unsigned char *b);
HPALETTE image_create_palette(IMAGE *img);
HGLOBAL image_copy_dib(IMAGE *img);
void image_draw(IMAGE *img, HDC hdc, int dx, int dy, int wx, int wy,
    int sx, int sy);


#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -