2003/09/19 05:26:47
[org.ibex.core.git] / src / org / xwt / plat / Win32.cc
index 208c2c3..06c5195 100644 (file)
@@ -24,7 +24,7 @@
 #include <java/util/Hashtable.h>
 #include <org/xwt/Box.h>
 #include <org/xwt/Surface.h>
-#include <org/xwt/DoubleBuffer.h>
+#include <org/xwt/PixelBuffer.h>
 #include <org/xwt/Picture.h>
 #include <org/xwt/ByteStream.h>
 #include <org/xwt/Platform.h>
@@ -32,7 +32,7 @@
 #include <org/xwt/plat/Win32.h>
 #include <org/xwt/plat/Win32$Win32Font.h>
 #include <org/xwt/plat/Win32$Win32Surface.h>
-#include <org/xwt/plat/Win32$Win32DoubleBuffer.h>
+#include <org/xwt/plat/Win32$Win32PixelBuffer.h>
 #include <org/xwt/plat/Win32$Win32Picture.h>
 #include <org/xwt/util/Log.h>
 #include <org/xwt/util/Semaphore.h>
@@ -416,7 +416,7 @@ jboolean org::xwt::plat::Win32::_newBrowserWindow_(jstring url) {
 }
 
 
-// Win32DoubleBuffer /////////////////////////////////////////////////////////////////////////
+// Win32PixelBuffer /////////////////////////////////////////////////////////////////////////
 
 // This is a scratch area; when blitting a translucent image, we copy the underlying data here first.
 // Since all drawing operations are single-threaded, it's safe to use a global here.
@@ -432,7 +432,7 @@ static jint scratch_h = 0;
     else                                                                                             \
         StretchBlt(dest, dx1, dy1, dx2 - dx1, dy2 - dy1, src, sx1, sy1, sx2 - sx1, sy2 - sy1, op);
         
-void org::xwt::plat::Win32$Win32DoubleBuffer::drawPicture(org::xwt::Picture* source0,
+void org::xwt::plat::Win32$Win32PixelBuffer::drawPicture(org::xwt::Picture* source0,
                                                           jint dx1, jint dy1, jint dx2, jint dy2,
                                                           jint sx1, jint sy1, jint sx2, jint sy2) {
     org::xwt::plat::Win32$Win32Picture* source = (org::xwt::plat::Win32$Win32Picture*)source0;
@@ -494,7 +494,7 @@ void org::xwt::plat::Win32$Win32DoubleBuffer::drawPicture(org::xwt::Picture* sou
 
 }
 
-void org::xwt::plat::Win32$Win32DoubleBuffer::drawString(jstring font, jstring text, jint x, jint y, jint color) {
+void org::xwt::plat::Win32$Win32PixelBuffer::drawString(jstring font, jstring text, jint x, jint y, jint color) {
 
     org::xwt::plat::Win32$Win32Font* wf = org::xwt::plat::Win32::getFont(font);
     SelectObject((HDC)hdc, (HFONT)(wf->hfont));
@@ -511,7 +511,7 @@ void org::xwt::plat::Win32$Win32DoubleBuffer::drawString(jstring font, jstring t
     TextOut((HDC)hdc, x, y, buf, len);
 }
 
-void org::xwt::plat::Win32$Win32DoubleBuffer::fillRect(jint x, jint y, jint x2, jint y2, jint color) {
+void org::xwt::plat::Win32$Win32PixelBuffer::fillRect(jint x, jint y, jint x2, jint y2, jint color) {
     jint w = x2 - x;
     jint h = y2 - y;
 
@@ -523,27 +523,27 @@ void org::xwt::plat::Win32$Win32DoubleBuffer::fillRect(jint x, jint y, jint x2,
     DeleteObject(brush);
 }
 
-void org::xwt::plat::Win32$Win32Surface::blit(org::xwt::DoubleBuffer* s, jint sx, jint sy, jint dx, jint dy, jint dx2, jint dy2) {
+void org::xwt::plat::Win32$Win32Surface::blit(org::xwt::PixelBuffer* s, jint sx, jint sy, jint dx, jint dy, jint dx2, jint dy2) {
     // we create the DC lazily to get around some strange race condition in WinXP
     if (hdc == 0) hdc = (jint)GetDC((HWND)hwnd);
-    BitBlt((HDC)hdc, dx, dy, dx2 - dx, dy2 - dy, (HDC)(((org::xwt::plat::Win32$Win32DoubleBuffer*)s)->hdc), sx, sy, SRCCOPY);
+    BitBlt((HDC)hdc, dx, dy, dx2 - dx, dy2 - dy, (HDC)(((org::xwt::plat::Win32$Win32PixelBuffer*)s)->hdc), sx, sy, SRCCOPY);
 }
 
-void org::xwt::plat::Win32$Win32DoubleBuffer::natInit() {
+void org::xwt::plat::Win32$Win32PixelBuffer::natInit() {
     hbitmap = (jint)CreateCompatibleBitmap((HDC)org::xwt::plat::Win32::desktop_dc, w, h);
     hdc = (jint)CreateCompatibleDC((HDC)org::xwt::plat::Win32::desktop_dc);
     SetBkMode((HDC)hdc, TRANSPARENT);
     SelectObject((HDC)hdc, (HBITMAP)hbitmap);
 }
 
-void org::xwt::plat::Win32$Win32DoubleBuffer::setClip(jint x, jint y, jint x2, jint y2) {
+void org::xwt::plat::Win32$Win32PixelBuffer::setClip(jint x, jint y, jint x2, jint y2) {
     clipx1 = x; clipx2 = x2; clipy1 = y; clipy2 = y2;
     HRGN hrgn = CreateRectRgn(x, y, x2, y2);
     SelectClipRgn((HDC)hdc, hrgn);
     DeleteObject(hrgn);
 }
 
-void org::xwt::plat::Win32$Win32DoubleBuffer::finalize() {
+void org::xwt::plat::Win32$Win32PixelBuffer::finalize() {
     DeleteObject((void*)hdc);
     DeleteObject((void*)hbitmap);
 }