Commit be476a0f authored by Alexei Podtelezhnikov's avatar Alexei Podtelezhnikov
Browse files

[graph/win32] Failed experiments.

parent 7e94e0dd
...@@ -23,30 +23,25 @@ ...@@ -23,30 +23,25 @@
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
/* define to activate OLPC swizzle */
#define xxSWIZZLE
#define WIN32_LEAN_AND_MEAN #define WIN32_LEAN_AND_MEAN
#include <windows.h> #include <windows.h>
#include "grobjs.h" #include "grobjs.h"
#include "grdevice.h" #include "grdevice.h"
/* define to activate OLPC swizzle */
#define xxSWIZZLE
#ifdef SWIZZLE #ifdef SWIZZLE
#include "grswizzle.h" #include "grswizzle.h"
#endif #endif
/* logging facility */ /* logging facility */
#include <stdarg.h> #define xxDEBUG
#define DEBUGxxx #ifndef DEBUG
#include <stdarg.h>
#ifdef DEBUG
#define LOG(x) LogMessage##x
#else
#define LOG(x) /* rien */
#endif
#ifdef DEBUG
static void LogMessage( const char* fmt, ... ) static void LogMessage( const char* fmt, ... )
{ {
va_list ap; va_list ap;
...@@ -55,8 +50,11 @@ ...@@ -55,8 +50,11 @@
vfprintf( stderr, fmt, ap ); vfprintf( stderr, fmt, ap );
va_end( ap ); va_end( ap );
} }
#define LOG(x) LogMessage##x
#else
#define LOG(x) /* rien */
#endif #endif
/*-------------------*/
/* Custom messages. */ /* Custom messages. */
#define WM_RESIZE WM_USER+517 #define WM_RESIZE WM_USER+517
...@@ -634,6 +632,30 @@ LRESULT CALLBACK Message_Process( HWND handle, UINT mess, ...@@ -634,6 +632,30 @@ LRESULT CALLBACK Message_Process( HWND handle, UINT mess,
PostMessage( handle, WM_RESIZE, wParam, lParam ); PostMessage( handle, WM_RESIZE, wParam, lParam );
break; break;
#ifdef DEBUG
case WM_SIZING:
{
PRECT r = (PRECT)lParam;
RECT WndRect;
int x, y;
GetClientRect( handle, &WndRect );
y = wParam >= 6 ? wParam -= 6, 'B' :
wParam >= 3 ? wParam -= 3, 'T' : ' ';
x = wParam == 2 ? 'R' :
wParam == 1 ? 'L' : ' ';
LOG(( "WM_SIZING %c%c : ( %d %d %d %d ) "
"ClientArea : ( %d %d )\n",
y, x, r->left, r->top, r->right, r->bottom,
WndRect.right, WndRect.bottom ));
/* XXX: We cannot simply interrupt here and resize the image. */
}
break;
#endif
case WM_EXITSIZEMOVE: case WM_EXITSIZEMOVE:
{ {
RECT WndRect; RECT WndRect;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment