58
58
#include <vssym32.h> // --//--
59
59
#include <math.h>
60
60
61
- #include <stdio.h> // used for debuging traces
61
+ // #include <stdio.h> // used for debuging traces
62
62
63
63
#undef IS_ERROR // Windows is using this macro name too, we don't need their version
64
64
@@ -282,7 +282,7 @@ static REBCNT Get_Widget_Text(HWND widget, REBVAL *text);
282
282
ZeroMemory (& wcex , sizeof (wcex ));
283
283
284
284
if (!GetClassInfoEx (hInstance , old_class , & wcex )) {
285
- puts ("Failed to get old class info!" );
285
+ RL_Print ("Failed to get old class info!\n " );
286
286
}
287
287
wcex .cbSize = sizeof (WNDCLASSEX );
288
288
wcex .lpszClassName = new_class ;
@@ -302,7 +302,6 @@ static REBCNT Get_Widget_Text(HWND widget, REBVAL *text);
302
302
**
303
303
***********************************************************************/
304
304
{
305
- puts ("Register_Window" );
306
305
WNDCLASSEX wc ;
307
306
308
307
wc .cbSize = sizeof (wc );
@@ -327,10 +326,6 @@ static REBCNT Get_Widget_Text(HWND widget, REBVAL *text);
327
326
LR_DEFAULTCOLOR
328
327
);
329
328
330
- // If not already registered:
331
- //if (!GetClassInfo(App_Instance, Class_Name_Window, &wclass))
332
- // RegisterClass(&wclass);
333
-
334
329
if (!RegisterClassEx (& wc )) Host_Crash ("Cannot register window" );
335
330
336
331
Make_Subclass (Class_Name_Button , TEXT ("BUTTON" ), NULL , TRUE);
@@ -456,7 +451,6 @@ static REBCNT Get_Widget_Text(HWND widget, REBVAL *text);
456
451
NULL , App_Instance , NULL
457
452
);
458
453
if (!window ) {
459
- printf ("error: %d %d %d %d %d\n" ,x ,y ,w ,h , GetLastError ());
460
454
Host_Crash ("CreateWindow failed" );
461
455
}
462
456
@@ -481,7 +475,6 @@ static REBCNT Get_Widget_Text(HWND widget, REBVAL *text);
481
475
}
482
476
if ( res >= 0 ) {
483
477
Default_Font = CreateFontIndirect (& font );
484
- printf ("font: '%ls' %08Xh\n" , font .lfFaceName , Default_Font );
485
478
}
486
479
487
480
if (hTheme ) CloseThemeData (hTheme );
@@ -512,27 +505,6 @@ static REBCNT Get_Widget_Text(HWND widget, REBVAL *text);
512
505
return window ;
513
506
}
514
507
515
- /* Removed from above code -- is any of this really needed? -CS
516
-
517
- // Set rectangle coordinates:
518
- rect.left = GOB_X(gob);
519
- rect.right = rect.left + GOB_W(gob);
520
- rect.top = GOB_Y(gob);
521
- rect.bottom = rect.top + GOB_H(gob);
522
- AdjustWindowRect(&rect, options, FALSE);
523
-
524
- // Create window (use parent if specified):
525
- GOB_WIN(gob) = CreateWindow(Class_Name_Window, title, options,
526
- rect.left, rect.top, rect.right-rect.left, rect.bottom-rect.top,
527
- (wparent ? GOB_WIN(wparent) : NULL), NULL, App_Instance, NULL);
528
-
529
- // Drain startup messages:
530
- while (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE)) {
531
- TranslateMessage(&msg);
532
- DispatchMessage(&msg);
533
- }
534
- */
535
-
536
508
537
509
/***********************************************************************
538
510
**
@@ -655,13 +627,15 @@ static REBCNT Get_Widget_Text(HWND widget, REBVAL *text);
655
627
wingob = GOB_PARENT (wingob );
656
628
657
629
//check if it is really open
658
- if (!IS_WINDOW (wingob ) || !GET_GOB_STATE (wingob , GOBS_OPEN )) return ;
630
+ if (!IS_WINDOW (wingob ) || !GET_GOB_STATE (wingob , GOBS_OPEN )) {
631
+ return ;
632
+ }
659
633
}
660
-
661
- //Reb_Print("draw: %d %8x", nnn++, gob);
634
+
662
635
//render and blit the GOB
663
636
compositor = GOB_COMPOSITOR (wingob );
664
637
OS_Compose_Gob (compositor , wingob , gob , FALSE);
638
+ OS_Blit_Window (compositor );
665
639
}
666
640
667
641
@@ -762,7 +736,6 @@ static REBCNT Get_Widget_Text(HWND widget, REBVAL *text);
762
736
**
763
737
***********************************************************************/
764
738
{
765
- puts ("OS_Init_Gob_Widget" );
766
739
HWND hWnd ;
767
740
REBCHR * class ;
768
741
REBCHR * text = NULL ;
@@ -847,7 +820,7 @@ static REBCNT Get_Widget_Text(HWND widget, REBVAL *text);
847
820
style |= BS_GROUPBOX ;
848
821
break ;
849
822
default :
850
- puts ("unknown widget name" );
823
+ //RL_Print ("unknown widget name");
851
824
return NULL ;
852
825
}
853
826
@@ -866,7 +839,7 @@ static REBCNT Get_Widget_Text(HWND widget, REBVAL *text);
866
839
SendMessage (hWnd , WM_SETFONT , (WPARAM )Default_Font , 0 );
867
840
SetWindowLongPtr (hWnd , GWLP_USERDATA , (LONG_PTR )gob );
868
841
869
- printf ("======== NEW widget: %08Xh for gob: %08Xh\n" , hWnd , gob );
842
+ // printf("======== NEW widget: %08Xh for gob: %08Xh\n", hWnd, gob);
870
843
871
844
switch (VAL_INT64 (type )) {
872
845
case W_WINDOW_BUTTON :
@@ -1377,7 +1350,7 @@ static REBCNT Get_Widget_Text(HWND widget, REBVAL *text);
1377
1350
| ICC_BAR_CLASSES
1378
1351
| ICC_DATE_CLASSES ;
1379
1352
if (!InitCommonControlsEx (& InitCtrlEx )) {
1380
- printf ("Could not initialize common controls! (%u)\n" , GetLastError ());
1353
+ RL_Print ("Could not initialize common controls! (%u)\n" , GetLastError ());
1381
1354
}
1382
1355
}
1383
1356
0 commit comments