Alexandre Julliard | 401710d | 1993-09-04 10:09:32 +0000 | [diff] [blame] | 1 | /* |
| 2 | * GDI definitions |
| 3 | * |
| 4 | * Copyright 1993 Alexandre Julliard |
Alexandre Julliard | 0799c1a | 2002-03-09 23:29:33 +0000 | [diff] [blame] | 5 | * |
| 6 | * This library is free software; you can redistribute it and/or |
| 7 | * modify it under the terms of the GNU Lesser General Public |
| 8 | * License as published by the Free Software Foundation; either |
| 9 | * version 2.1 of the License, or (at your option) any later version. |
| 10 | * |
| 11 | * This library is distributed in the hope that it will be useful, |
| 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 14 | * Lesser General Public License for more details. |
| 15 | * |
| 16 | * You should have received a copy of the GNU Lesser General Public |
| 17 | * License along with this library; if not, write to the Free Software |
Jonathan Ernst | 360a3f9 | 2006-05-18 14:49:52 +0200 | [diff] [blame] | 18 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA |
Alexandre Julliard | 401710d | 1993-09-04 10:09:32 +0000 | [diff] [blame] | 19 | */ |
| 20 | |
Alexandre Julliard | c6c0944 | 1997-01-12 18:32:19 +0000 | [diff] [blame] | 21 | #ifndef __WINE_GDI_H |
| 22 | #define __WINE_GDI_H |
Alexandre Julliard | 401710d | 1993-09-04 10:09:32 +0000 | [diff] [blame] | 23 | |
Alexandre Julliard | e37c6e1 | 2003-09-05 23:08:26 +0000 | [diff] [blame] | 24 | #include <stdarg.h> |
Dimitrie O. Paun | 53f9c21 | 2003-08-28 21:43:34 +0000 | [diff] [blame] | 25 | #include <windef.h> |
Alexandre Julliard | e37c6e1 | 2003-09-05 23:08:26 +0000 | [diff] [blame] | 26 | #include <winbase.h> |
Dimitrie O. Paun | 53f9c21 | 2003-08-28 21:43:34 +0000 | [diff] [blame] | 27 | #include <wingdi.h> |
| 28 | #include <wine/wingdi16.h> |
Alexandre Julliard | dadf78f | 1998-05-17 17:13:43 +0000 | [diff] [blame] | 29 | #include <math.h> |
Alexandre Julliard | 401710d | 1993-09-04 10:09:32 +0000 | [diff] [blame] | 30 | |
| 31 | /* GDI objects magic numbers */ |
Andreas Mohr | 007fb24 | 2000-09-16 20:53:51 +0000 | [diff] [blame] | 32 | #define FIRST_MAGIC 0x4f47 |
Alexandre Julliard | 401710d | 1993-09-04 10:09:32 +0000 | [diff] [blame] | 33 | #define PEN_MAGIC 0x4f47 |
| 34 | #define BRUSH_MAGIC 0x4f48 |
| 35 | #define FONT_MAGIC 0x4f49 |
| 36 | #define PALETTE_MAGIC 0x4f4a |
| 37 | #define BITMAP_MAGIC 0x4f4b |
| 38 | #define REGION_MAGIC 0x4f4c |
| 39 | #define DC_MAGIC 0x4f4d |
| 40 | #define DISABLED_DC_MAGIC 0x4f4e |
| 41 | #define META_DC_MAGIC 0x4f4f |
| 42 | #define METAFILE_MAGIC 0x4f50 |
| 43 | #define METAFILE_DC_MAGIC 0x4f51 |
Huw D M Davies | 7603dea | 1999-04-25 09:24:23 +0000 | [diff] [blame] | 44 | #define ENHMETAFILE_MAGIC 0x4f52 |
| 45 | #define ENHMETAFILE_DC_MAGIC 0x4f53 |
Alexandre Julliard | e1147ba | 2003-05-13 23:56:12 +0000 | [diff] [blame] | 46 | #define MEMORY_DC_MAGIC 0x4f54 |
Dmitry Timoshkov | eb893bd | 2006-01-30 18:17:07 +0100 | [diff] [blame] | 47 | #define EXT_PEN_MAGIC 0x4f55 |
| 48 | #define LAST_MAGIC 0x4f55 |
Huw D M Davies | 7603dea | 1999-04-25 09:24:23 +0000 | [diff] [blame] | 49 | |
Alexandre Julliard | 0c126c7 | 1996-02-18 18:44:41 +0000 | [diff] [blame] | 50 | #define MAGIC_DONTCARE 0xffff |
Alexandre Julliard | 401710d | 1993-09-04 10:09:32 +0000 | [diff] [blame] | 51 | |
Andreas Mohr | 007fb24 | 2000-09-16 20:53:51 +0000 | [diff] [blame] | 52 | /* GDI constants for making objects private/system (naming undoc. !) */ |
| 53 | #define OBJECT_PRIVATE 0x2000 |
| 54 | #define OBJECT_NOSYSTEM 0x8000 |
| 55 | |
| 56 | #define GDIMAGIC(magic) ((magic) & ~(OBJECT_PRIVATE|OBJECT_NOSYSTEM)) |
| 57 | |
Alexandre Julliard | 6ec42c0 | 2004-01-15 00:35:38 +0000 | [diff] [blame] | 58 | struct gdi_obj_funcs; |
| 59 | struct hdc_list; |
Huw Davies | 9e8ce63 | 2003-11-25 05:03:09 +0000 | [diff] [blame] | 60 | |
Alexandre Julliard | 401710d | 1993-09-04 10:09:32 +0000 | [diff] [blame] | 61 | typedef struct tagGDIOBJHDR |
| 62 | { |
Alexandre Julliard | 401710d | 1993-09-04 10:09:32 +0000 | [diff] [blame] | 63 | WORD wMagic; |
| 64 | DWORD dwCount; |
Alexandre Julliard | d8a9244 | 2002-05-31 18:43:22 +0000 | [diff] [blame] | 65 | const struct gdi_obj_funcs *funcs; |
Huw Davies | 9e8ce63 | 2003-11-25 05:03:09 +0000 | [diff] [blame] | 66 | struct hdc_list *hdcs; |
Alexandre Julliard | 401710d | 1993-09-04 10:09:32 +0000 | [diff] [blame] | 67 | } GDIOBJHDR; |
| 68 | |
Alexandre Julliard | 05df86a | 2004-03-04 20:41:12 +0000 | [diff] [blame] | 69 | /* palette object */ |
| 70 | |
| 71 | #define NB_RESERVED_COLORS 20 /* number of fixed colors in system palette */ |
| 72 | |
| 73 | #define PC_SYS_USED 0x80 /* palentry is used (both system and logical) */ |
| 74 | #define PC_SYS_RESERVED 0x40 /* system palentry is not to be mapped to */ |
Alexandre Julliard | 05df86a | 2004-03-04 20:41:12 +0000 | [diff] [blame] | 75 | |
| 76 | typedef struct tagPALETTEOBJ |
| 77 | { |
| 78 | GDIOBJHDR header; |
| 79 | int *mapping; |
| 80 | LOGPALETTE logpalette; /* _MUST_ be the last field */ |
| 81 | } PALETTEOBJ; |
Alexandre Julliard | dadf78f | 1998-05-17 17:13:43 +0000 | [diff] [blame] | 82 | |
Alexandre Julliard | 401710d | 1993-09-04 10:09:32 +0000 | [diff] [blame] | 83 | /* GDI local heap */ |
| 84 | |
Alexandre Julliard | 2a2321b | 2000-08-19 21:38:55 +0000 | [diff] [blame] | 85 | extern void *GDI_GetObjPtr( HGDIOBJ, WORD ); |
| 86 | extern void GDI_ReleaseObj( HGDIOBJ ); |
Alexandre Julliard | 9169729 | 2002-12-03 19:18:41 +0000 | [diff] [blame] | 87 | |
Huw Davies | 90020c9 | 2005-10-06 12:28:11 +0000 | [diff] [blame] | 88 | /* GetGlyphOutline */ |
Alexandre Julliard | 18d7573 | 2002-01-29 03:02:50 +0000 | [diff] [blame] | 89 | #define WINE_GGO_GRAY16_BITMAP 0x7f |
| 90 | |
Huw Davies | 90020c9 | 2005-10-06 12:28:11 +0000 | [diff] [blame] | 91 | /* GetRasterizerCaps */ |
| 92 | #define WINE_TT_HINTER_ENABLED 0x8000 |
| 93 | |
Alexandre Julliard | c6c0944 | 1997-01-12 18:32:19 +0000 | [diff] [blame] | 94 | #endif /* __WINE_GDI_H */ |