Hi.
I think it's not much interest in GRX nowadays. Anyway here is a pre-release for 2.4.5, mostly win32 related:
Download it from:
http://grx.gnu.de/download/grx245p1.zip
MD5SUM for the package:
c7d5f1027f171b713dbbda38fb8f5242 *grx245p1.zip
Only the zip archive is provided, but note, the zip archive expand to grx245, not to the contrib directory.
Changes:
02/02/11 The makefile install target installs the grxprint.h file if printer support is activate 02/02/11 Inprovements to the win32 driver: Now the GRX window is properly closed, so the previous app gets the focus. 02/02/02 Inprovements to the win32 driver: The w32 imput queue implemented as a circular queue. All the input related code moved to w32inp.c from vd_win32.c The main window is created in WinMain, so the grx program can use other videodrivers like the memory one. Now memtest works. Now the printer stuff compiles and run, checked with the DeskJet driver, printing to a file and them "copy file lpt1", but the printout is not totally correct (?).
Mariano Alvarez Fernandez schrieb:
Hi.
I think it's not much interest in GRX nowadays. Anyway here is a
pre-release for 2.4.5, mostly win32 related:
Download it from:
http://grx.gnu.de/download/grx245p1.zip
MD5SUM for the package:
c7d5f1027f171b713dbbda38fb8f5242 *grx245p1.zip
Only the zip archive is provided, but note, the zip archive expand to grx245, not to the contrib directory.
Changes:
02/02/11 The makefile install target installs the grxprint.h file if printer support is activate 02/02/11 Inprovements to the win32 driver: Now the GRX window is properly closed, so the previous app gets the focus. 02/02/02 Inprovements to the win32 driver: The w32 imput queue implemented as a circular queue. All the input related code moved to w32inp.c from vd_win32.c The main window is created in WinMain, so the grx program can use other videodrivers like the memory one. Now memtest works. Now the printer stuff compiles and run, checked with the DeskJet driver, printing to a file and them "copy file lpt1", but the printout is not totally correct (?).
Thank you for your efforts.
The following program exhibits problems with the window's 'focus' in windows console applications.
/*grxhello.c*/ #include <string.h> #include <grx20.h> #include <grxkeys.h> #include <stdio.h> #include <conio.h> #include <stdlib.h>
int GRXMain() { char *message = "Hello, GRX world"; int x, y; GrTextOption grt;
printf("%s\n",message); getch();
GrSetMode( GR_default_graphics );
grt.txo_font = &GrDefaultFont; grt.txo_fgcolor.v = GrWhite(); grt.txo_bgcolor.v = GrBlack(); grt.txo_direct = GR_TEXT_RIGHT; grt.txo_xalign = GR_ALIGN_CENTER; grt.txo_yalign = GR_ALIGN_CENTER; grt.txo_chrtype = GR_BYTE_TEXT;
GrBox( 0,0,GrMaxX(),GrMaxY(),GrWhite() ); GrBox( 4,4,GrMaxX()-4,GrMaxY()-4,GrWhite() );
x = GrMaxX()/2; y = GrMaxY()/2; GrDrawString( message,strlen( message ),x,y,&grt );
GrKeyRead();
GrSetMode( GR_default_text ); printf("%s\n",message); getch();
return 0; }
Win98>gcc -v Reading specs from C:/MINGW/BIN/../lib/gcc-lib/mingw32/2.95.3-7/specs gcc version 2.95.3-7 (mingw experimental)
Win98>gcc -c grxhello.c -g -O2 -W -Wall Win98>gcc grxhello.o -o grxhello.exe -lm -lgrx20 -mwindows -mconsole
Waldemar Schultz escribió:
The following program exhibits problems with the window's 'focus' in windows console applications.
Well, it works as expected, when the program exits the last app gets the focus.
Win programs using both console an windows io have problems not related to GRX really.
Mariano Alvarez Fernandez schrieb:
Waldemar Schultz escribió:
The following program exhibits problems with the window's 'focus' in windows console applications.
Well, it works as expected,
I disagree here. It is just to inform you, I observe the following: After launching grxhello.exe from a W98 DOS box the DOS Box looses focus (title bar becomes gray), the mouse arrow jumps to the top left corner of the screen, (looks like focus went to an invisible window) the first message appears in the DOS box and getch() waits for a key.
When I now hit a key _without_ moving the mouse before, the GRX window is opened with the focus on it and GrKeyRead() waits for a key (as expected).
Hitting a key _without_ moving the mouse, the second message is displayedin the DOS box and again the mouse arrow jumps to the left upper corner of the screen and the second getch() waits for a key.
Hitting a key(DOS box title is still gray) the program terminates as expected, giving focus back to the DOS box.
Whenever I move the mouse when getch() is waiting or try to put focus on the DOSbox(==console) the program hangs.
when the program exits the last app gets the focus.
I agree here.
Win programs using both console an windows io have problems not related to GRX really.
So do you think I should blame it on M$W98 or the MINGW32 implementation. Maybe anyone could try this under LINUX to see if it behaves different. I would really appreciate to have the console simultaneously wit the graphics window switching focus by the application as required.
Thank you for attention.
Waldemar Schultz escribió:
Mariano Alvarez Fernandez schrieb:
Waldemar Schultz escribió:
The following program exhibits problems with the window's 'focus' in windows console applications.
Well, it works as expected,
I disagree here. It is just to inform you, I observe the following: After launching grxhello.exe from a W98 DOS box the DOS Box looses focus (title bar becomes gray), the mouse arrow jumps to the top left corner of the screen, (looks like focus went to an invisible window)
Yes, to the GRX one!
Maybe anyone could try this under LINUX to see if it behaves different.
I suspect if not work like you want in X too, but I must to check.
I would really appreciate to have the console simultaneously wit the graphics window switching focus by the application as required.
Well, the problem is for achieve this functionally yo must to hack a lot:
a) investigate if the program is bound to a console or not.
b) find the windows id of the console and try to change the focus when you go to text mode
c) write a input driver for the console mode (and switch from the windows one).
It can be done, but really it needs work.
Mariano Alvarez Fernandez schrieb:
Hi.
I think it's not much interest in GRX nowadays. Anyway here is a
pre-release for 2.4.5, mostly win32 related:
small(?) problem:
GrKeyPressed() seems not to work any longer under MINGW, always returns zero. Under DJGPP it seems to be O.K.
Waldemar Schultz escribió:
Mariano Alvarez Fernandez schrieb:
Hi.
I think it's not much interest in GRX nowadays. Anyway here is a
pre-release for 2.4.5, mostly win32 related:
small(?) problem:
GrKeyPressed() seems not to work any longer under MINGW, always returns zero. Under DJGPP it seems to be O.K.
Wops! I found the bug (thanks), but it only happen if GrKeyPressed() is the first input function used (is that the case?)
This patch solves the problem:
--- w32keys.old Mon Feb 4 22:34:54 2002 +++ w32keys.c Thu Feb 14 18:19:06 2002 @@ -24,6 +24,10 @@
int GrKeyPressed(void) { + if (MOUINFO->msstatus < 2) { + GrMouseInit(); + GrMouseEventEnable(1, 0); + } return _GrKeyPressed(); }
@@ -61,7 +65,7 @@
int kbhit(void) { - return _GrKeyPressed(); + return GrKeyPressed(); }
int getkey(void)