gdi32: Move DIB driver definitions to dibdrv.h.

oldstable
Alexandre Julliard 2011-09-07 23:48:24 +02:00
parent d12d98511c
commit 2a5cabc22d
2 changed files with 82 additions and 84 deletions

View File

@ -18,6 +18,88 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
enum dib_info_flags
{
private_color_table = 1
};
typedef struct
{
int bit_count, width, height;
int stride; /* stride in bytes. Will be -ve for bottom-up dibs (see bits). */
struct gdi_image_bits bits; /* bits.ptr points to the top-left corner of the dib. */
DWORD red_mask, green_mask, blue_mask;
int red_shift, green_shift, blue_shift;
int red_len, green_len, blue_len;
RGBQUAD *color_table;
DWORD color_table_size;
enum dib_info_flags flags;
const struct primitive_funcs *funcs;
} dib_info;
typedef struct
{
DWORD count;
DWORD dashes[16]; /* 16 is the maximum number for a PS_USERSTYLE pen */
DWORD total_len; /* total length of the dashes, should be multiplied by 2 if there are an odd number of dash lengths */
} dash_pattern;
typedef struct
{
int left_in_dash;
int cur_dash;
BOOL mark;
} dash_pos;
typedef struct
{
DWORD and;
DWORD xor;
} rop_mask;
typedef struct
{
void *and;
void *xor;
} rop_mask_bits;
typedef struct dibdrv_physdev
{
struct gdi_physdev dev;
dib_info dib;
HRGN clip;
DWORD defer;
/* pen */
COLORREF pen_colorref;
DWORD pen_color, pen_and, pen_xor;
dash_pattern pen_pattern;
dash_pos dash_pos;
BOOL (* pen_lines)(struct dibdrv_physdev *pdev, int num, POINT *pts);
/* brush */
UINT brush_style;
UINT brush_hatch;
INT brush_rop; /* PatBlt, for example, can override the DC's rop2 */
COLORREF brush_colorref;
DWORD brush_color, brush_and, brush_xor;
dib_info brush_dib;
void *brush_and_bits, *brush_xor_bits;
BOOL (* brush_rects)(struct dibdrv_physdev *pdev, dib_info *dib, int num, const RECT *rects, HRGN clip);
/* background */
DWORD bkgnd_color, bkgnd_and, bkgnd_xor;
} dibdrv_physdev;
#define DEFER_FORMAT 1
#define DEFER_PEN 2
#define DEFER_BRUSH 4
extern DWORD dibdrv_GetImage( PHYSDEV dev, HBITMAP hbitmap, BITMAPINFO *info,
struct gdi_image_bits *bits, struct bitblt_coords *src ) DECLSPEC_HIDDEN;
extern BOOL dibdrv_LineTo( PHYSDEV dev, INT x, INT y ) DECLSPEC_HIDDEN;

View File

@ -72,90 +72,6 @@ typedef struct tagGDIOBJHDR
struct hdc_list *hdcs;
} GDIOBJHDR;
/* Device functions for the Wine driver interface */
enum dib_info_flags
{
private_color_table = 1
};
typedef struct
{
int bit_count, width, height;
int stride; /* stride in bytes. Will be -ve for bottom-up dibs (see bits). */
struct gdi_image_bits bits; /* bits.ptr points to the top-left corner of the dib. */
DWORD red_mask, green_mask, blue_mask;
int red_shift, green_shift, blue_shift;
int red_len, green_len, blue_len;
RGBQUAD *color_table;
DWORD color_table_size;
enum dib_info_flags flags;
const struct primitive_funcs *funcs;
} dib_info;
typedef struct
{
DWORD count;
DWORD dashes[16]; /* 16 is the maximum number for a PS_USERSTYLE pen */
DWORD total_len; /* total length of the dashes, should be multiplied by 2 if there are an odd number of dash lengths */
} dash_pattern;
typedef struct
{
int left_in_dash;
int cur_dash;
BOOL mark;
} dash_pos;
typedef struct
{
DWORD and;
DWORD xor;
} rop_mask;
typedef struct
{
void *and;
void *xor;
} rop_mask_bits;
typedef struct dibdrv_physdev
{
struct gdi_physdev dev;
dib_info dib;
HRGN clip;
DWORD defer;
/* pen */
COLORREF pen_colorref;
DWORD pen_color, pen_and, pen_xor;
dash_pattern pen_pattern;
dash_pos dash_pos;
BOOL (* pen_lines)(struct dibdrv_physdev *pdev, int num, POINT *pts);
/* brush */
UINT brush_style;
UINT brush_hatch;
INT brush_rop; /* PatBlt, for example, can override the DC's rop2 */
COLORREF brush_colorref;
DWORD brush_color, brush_and, brush_xor;
dib_info brush_dib;
void *brush_and_bits, *brush_xor_bits;
BOOL (* brush_rects)(struct dibdrv_physdev *pdev, dib_info *dib, int num, const RECT *rects, HRGN clip);
/* background */
DWORD bkgnd_color, bkgnd_and, bkgnd_xor;
} dibdrv_physdev;
#define DEFER_FORMAT 1
#define DEFER_PEN 2
#define DEFER_BRUSH 4
typedef struct gdi_dc_funcs DC_FUNCTIONS;
/* It should not be necessary to access the contents of the GdiPath