Commit f56c6fb9 authored by Alexandre Julliard's avatar Alexandre Julliard

Moved some window painting functions to uitools.c.

parent b0394dea
......@@ -45,7 +45,6 @@ C_SRCS = \
$(TOPOBJDIR)/windows/winpos.c \
$(TOPOBJDIR)/windows/winproc.c \
button.c \
cache.c \
caret.c \
combo.c \
dde/client.c \
......
/*
* Wine internally cached objects to speedup some things and prevent
* infinite duplication of trivial code and data.
*
* Copyright 1997 Bertho A. Stultiens
*
* 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
*/
#include <stdarg.h>
#include "windef.h"
#include "winbase.h"
#include "wingdi.h"
#include "user.h"
static const WORD wPattern55AA[] =
{
0x5555, 0xaaaa, 0x5555, 0xaaaa,
0x5555, 0xaaaa, 0x5555, 0xaaaa
};
static HBRUSH hPattern55AABrush = 0;
static HBITMAP hPattern55AABitmap = 0;
/*********************************************************************
* CACHE_GetPattern55AABrush
*/
HBRUSH CACHE_GetPattern55AABrush(void)
{
if (!hPattern55AABrush)
{
hPattern55AABitmap = CreateBitmap( 8, 8, 1, 1, wPattern55AA );
hPattern55AABrush = CreatePatternBrush( hPattern55AABitmap );
}
return hPattern55AABrush;
}
......@@ -70,6 +70,9 @@ extern void SCROLL_TrackScrollBar( HWND hwnd, INT scrollbar, POINT pt );
extern INT SCROLL_SetNCSbState( HWND hwnd, int vMin, int vMax, int vPos,
int hMin, int hMax, int hPos );
/* UI tools */
extern HBRUSH UITOOLS_GetPattern55AABrush(void);
/* combo box */
#define ID_CB_LISTBOX 1000
......
......@@ -40,6 +40,7 @@
#include "winnls.h"
#include "wownt32.h"
#include "user.h"
#include "controls.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(text);
......@@ -1148,7 +1149,7 @@ static BOOL TEXT_GrayString(HDC hdc, HBRUSH hb, GRAYSTRINGPROC fn, LPARAM lp, IN
if(retval || len != -1)
#endif
{
hbsave = (HBRUSH)SelectObject(memdc, CACHE_GetPattern55AABrush());
hbsave = (HBRUSH)SelectObject(memdc, UITOOLS_GetPattern55AABrush());
PatBlt(memdc, 0, 0, cx, cy, 0x000A0329);
SelectObject(memdc, hbsave);
}
......
......@@ -136,9 +136,6 @@ extern void USER_CheckNotLock(void);
extern BOOL USER_IsExitingThread( DWORD tid );
/* gray brush cache */
extern HBRUSH CACHE_GetPattern55AABrush(void);
/* hook.c */
extern LRESULT HOOK_CallHooks( INT id, INT code, WPARAM wparam, LPARAM lparam, BOOL unicode );
extern BOOL HOOK_IsHooked( INT id );
......
......@@ -23,16 +23,19 @@
#include "wine/port.h"
#include <string.h>
#include <stdarg.h>
#include "windef.h"
#include "winbase.h"
#include "wingdi.h"
#include "winnls.h"
#include "imm.h"
#include "win.h"
#include "user.h"
#include "controls.h"
#include "nonclient.h"
#include "winpos.h"
#include "dce.h"
#include "windef.h"
#include "wingdi.h"
#include "winnls.h"
#include "imm.h"
#include "message.h"
#include "wine/unicode.h"
#include "wine/winuser16.h"
......@@ -164,7 +167,7 @@ HBRUSH DEFWND_ControlColor( HDC hDC, UINT ctlType )
* look different from the window background.
*/
if (bk == GetSysColor(COLOR_WINDOW))
return CACHE_GetPattern55AABrush();
return UITOOLS_GetPattern55AABrush();
UnrealizeObject( hb );
return hb;
......
......@@ -261,7 +261,7 @@ BOOL WINAPI DrawCaptionTempW (HWND hwnd, HDC hdc, const RECT *rect, HFONT hFont,
FillRect (hdc, &rc, GetSysColorBrush (COLOR_3DFACE));
if (uFlags & DC_ACTIVE) {
HBRUSH hbr = SelectObject (hdc, CACHE_GetPattern55AABrush ());
HBRUSH hbr = SelectObject (hdc, UITOOLS_GetPattern55AABrush ());
PatBlt (hdc, rc.left, rc.top,
rc.right-rc.left, rc.bottom-rc.top, 0xFA0089);
SelectObject (hdc, hbr);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment