Takes print spooler functions out of win16drv.
[wine] / graphics / cache.c
1 /*
2  * Wine internally cached objects to speedup some things and prevent 
3  * infinite duplication of trivial code and data. 
4  * 
5  * Copyright 1997 Bertho A. Stultiens
6  *
7  */
8
9 #include "windows.h"
10 #include "cache.h"
11
12 static const WORD wPattern55AA[] =
13
14     0x5555, 0xaaaa, 0x5555, 0xaaaa,
15     0x5555, 0xaaaa, 0x5555, 0xaaaa
16 };
17
18 static HBRUSH32  hPattern55AABrush = 0;
19 static HBITMAP32 hPattern55AABitmap = 0;
20
21
22 /*********************************************************************
23  *      CACHE_GetPattern55AABrush
24  */
25 HBRUSH32 CACHE_GetPattern55AABrush(void)
26 {
27     if (!hPattern55AABrush)
28         hPattern55AABrush = CreatePatternBrush32(CACHE_GetPattern55AABitmap());
29     return hPattern55AABrush;
30 }
31
32
33 /*********************************************************************
34  *      CACHE_GetPattern55AABitmap
35  */
36 HBITMAP32 CACHE_GetPattern55AABitmap(void)
37 {
38     if (!hPattern55AABitmap)
39         hPattern55AABitmap = CreateBitmap32( 8, 8, 1, 1, wPattern55AA );
40     return hPattern55AABitmap;
41 }