4 * Copyright 1993 Alexandre Julliard
9 #ifndef X_DISPLAY_MISSING
18 #include "debugtools.h"
20 DEFAULT_DEBUG_CHANNEL(gdi
)
23 extern HBITMAP
X11DRV_BITMAP_SelectObject( DC
* dc
, HBITMAP hbitmap
,
25 extern HBRUSH
X11DRV_BRUSH_SelectObject( DC
* dc
, HBRUSH hbrush
,
27 extern HFONT
X11DRV_FONT_SelectObject( DC
* dc
, HFONT hfont
,
29 extern HPEN
X11DRV_PEN_SelectObject( DC
* dc
, HPEN hpen
, PENOBJ
* pen
);
31 extern BOOL
X11DRV_BITMAP_DeleteObject( HBITMAP hbitmap
, BITMAPOBJ
*bmp
);
33 /***********************************************************************
36 HGDIOBJ
X11DRV_SelectObject( DC
*dc
, HGDIOBJ handle
)
38 GDIOBJHDR
*ptr
= GDI_GetObjPtr( handle
, MAGIC_DONTCARE
);
42 TRACE("hdc=%04x %04x\n", dc
->hSelf
, handle
);
47 ret
= X11DRV_PEN_SelectObject( dc
, handle
, (PENOBJ
*)ptr
);
50 ret
= X11DRV_BRUSH_SelectObject( dc
, handle
, (BRUSHOBJ
*)ptr
);
53 ret
= X11DRV_BITMAP_SelectObject( dc
, handle
, (BITMAPOBJ
*)ptr
);
56 ret
= X11DRV_FONT_SelectObject( dc
, handle
, (FONTOBJ
*)ptr
);
59 ret
= (HGDIOBJ16
)SelectClipRgn16( dc
->hSelf
, handle
);
62 GDI_HEAP_UNLOCK( handle
);
67 /***********************************************************************
70 BOOL
X11DRV_DeleteObject( HGDIOBJ handle
)
72 GDIOBJHDR
*ptr
= GDI_GetObjPtr( handle
, MAGIC_DONTCARE
);
75 if (!ptr
) return FALSE
;
79 ret
= X11DRV_BITMAP_DeleteObject( handle
, (BITMAPOBJ
*)ptr
);
83 ERR("Shouldn't be here!\n");
87 GDI_HEAP_UNLOCK( handle
);
91 #endif /* !defined(X_DISPLAY_MISSING) */