2001-12-04 21:46:54 +01:00
|
|
|
/*
|
|
|
|
* an application for displaying Win32 console
|
|
|
|
* USER32 backend
|
|
|
|
*
|
|
|
|
* Copyright 2001 Eric Pouech
|
2002-03-10 00:29:33 +01:00
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2.1 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
* License along with this library; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
2001-12-04 21:46:54 +01:00
|
|
|
*/
|
|
|
|
|
2003-09-06 01:08:26 +02:00
|
|
|
#include <stdarg.h>
|
|
|
|
#include <windef.h>
|
2001-12-04 21:46:54 +01:00
|
|
|
#include <winbase.h>
|
|
|
|
#include <wingdi.h>
|
|
|
|
#include <winuser.h>
|
|
|
|
#include "winecon_private.h"
|
|
|
|
|
|
|
|
struct inner_data_user {
|
|
|
|
/* the following fields are only user by the USER backend (should be hidden in user) */
|
|
|
|
HWND hWnd; /* handle to windows for rendering */
|
|
|
|
HFONT hFont; /* font used for rendering, usually fixed */
|
2005-11-03 10:51:00 +01:00
|
|
|
LONG ext_leading; /* external leading for hFont */
|
2001-12-04 21:46:54 +01:00
|
|
|
HDC hMemDC; /* memory DC holding the bitmap below */
|
|
|
|
HBITMAP hBitmap; /* bitmap of display window content */
|
|
|
|
HMENU hPopMenu; /* popup menu triggered by right mouse click */
|
|
|
|
|
|
|
|
HBITMAP cursor_bitmap; /* bitmap used for the caret */
|
2002-02-04 19:41:32 +01:00
|
|
|
BOOL has_selection; /* an area is being selected (selectPt[12] are edges of the rect) */
|
2001-12-04 21:46:54 +01:00
|
|
|
COORD selectPt1; /* start (and end) point of a mouse selection */
|
|
|
|
COORD selectPt2;
|
|
|
|
};
|
|
|
|
|
|
|
|
#define PRIVATE(data) ((struct inner_data_user*)((data)->private))
|
|
|
|
|
|
|
|
/* from user.c */
|
|
|
|
extern COLORREF WCUSER_ColorMap[16];
|
|
|
|
extern BOOL WCUSER_GetProperties(struct inner_data*, BOOL);
|
|
|
|
extern BOOL WCUSER_ValidateFont(const struct inner_data* data, const LOGFONT* lf);
|
2002-06-01 01:06:46 +02:00
|
|
|
extern BOOL WCUSER_ValidateFontMetric(const struct inner_data* data,
|
2002-03-23 21:14:04 +01:00
|
|
|
const TEXTMETRIC* tm, DWORD fontType);
|
2002-06-01 01:06:46 +02:00
|
|
|
extern BOOL WCUSER_AreFontsEqual(const struct config_data* config,
|
2002-03-23 21:14:04 +01:00
|
|
|
const LOGFONT* lf);
|
2005-11-03 10:51:00 +01:00
|
|
|
extern HFONT WCUSER_CopyFont(struct config_data* config, HWND hWnd, const LOGFONT* lf,
|
|
|
|
LONG* el);
|
2002-06-01 01:06:46 +02:00
|
|
|
extern void WCUSER_FillLogFont(LOGFONT* lf, const WCHAR* name,
|
2002-03-23 21:14:04 +01:00
|
|
|
UINT height, UINT weight);
|
2001-12-04 21:46:54 +01:00
|
|
|
|
2002-05-14 23:45:13 +02:00
|
|
|
extern void WCUSER_DumpLogFont(const char* pfx, const LOGFONT* lf, DWORD ft);
|
|
|
|
extern void WCUSER_DumpTextMetric(const TEXTMETRIC* tm, DWORD ft);
|