Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
FreeType
FreeType Demo Programs
Commits
be476a0f
Commit
be476a0f
authored
Jan 10, 2021
by
Alexei Podtelezhnikov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[graph/win32] Failed experiments.
parent
7e94e0dd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
13 deletions
+35
-13
graph/win32/grwin32.c
graph/win32/grwin32.c
+35
-13
No files found.
graph/win32/grwin32.c
View file @
be476a0f
...
...
@@ -23,30 +23,25 @@
#include <stdlib.h>
#include <string.h>
/* define to activate OLPC swizzle */
#define xxSWIZZLE
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include "grobjs.h"
#include "grdevice.h"
/* define to activate OLPC swizzle */
#define xxSWIZZLE
#ifdef SWIZZLE
#include "grswizzle.h"
#endif
/* logging facility */
#
include <stdarg.h>
#
define xxDEBUG
#define DEBUGxxx
#ifdef DEBUG
#define LOG(x) LogMessage##x
#else
#define LOG(x)
/* rien */
#endif
#ifndef DEBUG
#include <stdarg.h>
#ifdef DEBUG
static
void
LogMessage
(
const
char
*
fmt
,
...
)
{
va_list
ap
;
...
...
@@ -55,8 +50,11 @@
vfprintf
(
stderr
,
fmt
,
ap
);
va_end
(
ap
);
}
#define LOG(x) LogMessage##x
#else
#define LOG(x)
/* rien */
#endif
/*-------------------*/
/* Custom messages. */
#define WM_RESIZE WM_USER+517
...
...
@@ -634,6 +632,30 @@ LRESULT CALLBACK Message_Process( HWND handle, UINT mess,
PostMessage
(
handle
,
WM_RESIZE
,
wParam
,
lParam
);
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
:
{
RECT
WndRect
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment