Moved more GDI definitions to gdi_private.h.
Get rid of bitmap.h and palette.h.

diff --git a/include/gdi.h b/include/gdi.h
index d1ff92f..6bc0c4b 100644
--- a/include/gdi.h
+++ b/include/gdi.h
@@ -66,106 +66,37 @@
     struct hdc_list *hdcs;
 } GDIOBJHDR;
 
-
-/* It should not be necessary to access the contents of the GdiPath
- * structure directly; if you find that the exported functions don't
- * allow you to do what you want, then please place a new exported
- * function that does this job in path.c.
- */
-typedef enum tagGdiPathState
-{
-   PATH_Null,
-   PATH_Open,
-   PATH_Closed
-} GdiPathState;
-
-typedef struct tagGdiPath
-{
-   GdiPathState state;
-   POINT      *pPoints;
-   BYTE         *pFlags;
-   int          numEntriesUsed, numEntriesAllocated;
-   BOOL       newStroke;
-} GdiPath;
-
-typedef struct tagGdiFont *GdiFont;
-
-typedef struct { int opaque; } *PHYSDEV;  /* PHYSDEV is an opaque pointer */
-
-typedef struct tagDC
-{
-    GDIOBJHDR    header;
-    HDC          hSelf;            /* Handle to this DC */
-    const struct tagDC_FUNCS *funcs; /* DC function table */
-    PHYSDEV      physDev;         /* Physical device (driver-specific) */
-    INT          saveLevel;
-    DWORD        dwHookData;
-    FARPROC16    hookProc;         /* the original SEGPTR ... */
-    DCHOOKPROC   hookThunk;        /* ... and the thunk to call it */
-
-    INT          wndOrgX;          /* Window origin */
-    INT          wndOrgY;
-    INT          wndExtX;          /* Window extent */
-    INT          wndExtY;
-    INT          vportOrgX;        /* Viewport origin */
-    INT          vportOrgY;
-    INT          vportExtX;        /* Viewport extent */
-    INT          vportExtY;
-
-    int           flags;
-    HRGN          hClipRgn;     /* Clip region (may be 0) */
-    HRGN          hVisRgn;      /* Visible region (must never be 0) */
-    HPEN          hPen;
-    HBRUSH        hBrush;
-    HFONT         hFont;
-    HBITMAP       hBitmap;
-    HANDLE        hDevice;
-    HPALETTE      hPalette;
-
-    GdiFont       gdiFont;
-    GdiPath       path;
-
-    WORD          ROPmode;
-    WORD          polyFillMode;
-    WORD          stretchBltMode;
-    WORD          relAbsMode;
-    WORD          backgroundMode;
-    COLORREF      backgroundColor;
-    COLORREF      textColor;
-    COLORREF      dcBrushColor;
-    COLORREF      dcPenColor;
-    short         brushOrgX;
-    short         brushOrgY;
-
-    WORD          textAlign;         /* Text alignment from SetTextAlign() */
-    INT           charExtra;         /* Spacing from SetTextCharacterExtra() */
-    INT           breakExtra;        /* breakTotalExtra / breakCount */
-    INT           breakRem;          /* breakTotalExtra % breakCount */
-    INT           MapMode;
-    INT           GraphicsMode;      /* Graphics mode */
-    ABORTPROC     pAbortProc;        /* AbortProc for Printing */
-    ABORTPROC16   pAbortProc16;
-    INT           CursPosX;          /* Current position */
-    INT           CursPosY;
-    INT           ArcDirection;
-    XFORM         xformWorld2Wnd;    /* World-to-window transformation */
-    XFORM         xformWorld2Vport;  /* World-to-viewport transformation */
-    XFORM         xformVport2World;  /* Inverse of the above transformation */
-    BOOL          vport2WorldValid;  /* Is xformVport2World valid? */
-    RECT          BoundsRect;        /* Current bounding rect */
-} DC;
-
 /* extra stock object: default 1x1 bitmap for memory DCs */
 #define DEFAULT_BITMAP (STOCK_LAST+1)
 
-/* Rounds a floating point number to integer. The world-to-viewport
- * transformation process is done in floating point internally. This function
- * is then used to round these coordinates to integer values.
- */
-static inline INT WINE_UNUSED GDI_ROUND(FLOAT val)
+/* bitmap object */
+
+typedef struct tagBITMAPOBJ
 {
-   return (int)floor(val + 0.5);
-}
+    GDIOBJHDR   header;
+    BITMAP      bitmap;
+    SIZE        size;   /* For SetBitmapDimension() */
+    const struct tagDC_FUNCS *funcs; /* DC function table */
+    void	*physBitmap; /* ptr to device specific data */
+    /* For device-independent bitmaps: */
+    DIBSECTION *dib;
+    SEGPTR      segptr_bits;  /* segptr to DIB bits */
+} BITMAPOBJ;
+
+/* palette object */
+
+#define NB_RESERVED_COLORS     20   /* number of fixed colors in system palette */
+
+#define PC_SYS_USED            0x80 /* palentry is used (both system and logical) */
+#define PC_SYS_RESERVED        0x40 /* system palentry is not to be mapped to */
+#define PC_SYS_MAPPED          0x10 /* logical palentry is a direct alias for system palentry */
+
+typedef struct tagPALETTEOBJ
+{
+    GDIOBJHDR                    header;
+    int                          *mapping;
+    LOGPALETTE                   logpalette; /* _MUST_ be the last field */
+} PALETTEOBJ;
 
   /* GDI local heap */