summaryrefslogtreecommitdiff
path: root/src/drivers/GDI/Fl_GDI_Graphics_Driver.cxx
diff options
context:
space:
mode:
authorManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2022-03-15 06:42:06 +0100
committerManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2022-08-29 12:15:32 +0200
commitc720aae51515907ae82ee02df80bd084f291d4b1 (patch)
tree7fbf3569f35966891df68490b047b30c9ec20bcd /src/drivers/GDI/Fl_GDI_Graphics_Driver.cxx
parent28981f6fd3971aaf7ff6527ee1cdeb9d886c4a4a (diff)
Make hybrid Wayland/X11 platform.
Diffstat (limited to 'src/drivers/GDI/Fl_GDI_Graphics_Driver.cxx')
-rw-r--r--src/drivers/GDI/Fl_GDI_Graphics_Driver.cxx14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/drivers/GDI/Fl_GDI_Graphics_Driver.cxx b/src/drivers/GDI/Fl_GDI_Graphics_Driver.cxx
index 87adc44f0..188bd1d2d 100644
--- a/src/drivers/GDI/Fl_GDI_Graphics_Driver.cxx
+++ b/src/drivers/GDI/Fl_GDI_Graphics_Driver.cxx
@@ -75,6 +75,10 @@ static FL_BLENDFUNCTION blendfunc = { 0, 0, 255, 1};
*/
HDC fl_gc = 0;
+
+HDC fl_win32_gc() { return fl_gc; }
+
+
Fl_GDI_Graphics_Driver::Fl_GDI_Graphics_Driver() {
mask_bitmap_ = NULL;
gc_ = NULL;
@@ -157,7 +161,7 @@ void Fl_GDI_Graphics_Driver::copy_offscreen(int x, int y, int w, int h, Fl_Offsc
if (w <= 0 || h <= 0) return;
HDC new_gc = CreateCompatibleDC(gc_);
int save = SaveDC(new_gc);
- SelectObject(new_gc, bitmap);
+ SelectObject(new_gc, (HBITMAP)bitmap);
BitBlt(gc_, x, y, w, h, new_gc, srcx, srcy, SRCCOPY);
RestoreDC(new_gc, save);
DeleteDC(new_gc);
@@ -211,8 +215,8 @@ void Fl_GDI_Graphics_Driver::untranslate_all() {
#endif
void Fl_GDI_Graphics_Driver::add_rectangle_to_region(Fl_Region r, int X, int Y, int W, int H) {
- Fl_Region R = XRectangleRegion(X, Y, W, H);
- CombineRgn(r, r, R, RGN_OR);
+ HRGN R = (HRGN)XRectangleRegion(X, Y, W, H);
+ CombineRgn((HRGN)r, (HRGN)r, R, RGN_OR);
XDestroyRegion(R);
}
@@ -241,7 +245,7 @@ Fl_Region Fl_GDI_Graphics_Driver::XRectangleRegion(int x, int y, int w, int h) {
}
void Fl_GDI_Graphics_Driver::XDestroyRegion(Fl_Region r) {
- DeleteObject(r);
+ DeleteObject((HRGN)r);
}
@@ -287,7 +291,7 @@ HRGN Fl_GDI_Graphics_Driver::scale_region(HRGN r, float f, Fl_GDI_Graphics_Drive
Fl_Region Fl_GDI_Graphics_Driver::scale_clip(float f) {
- HRGN r = rstack[rstackptr];
+ HRGN r = (HRGN)rstack[rstackptr];
HRGN r2 = scale_region(r, f, this);
return (r == r2 ? NULL : (rstack[rstackptr] = r2, r));
}