LibVT

Anything QL Software or Programming Related.
User avatar
tofro
Font of All Knowledge
Posts: 2702
Joined: Sun Feb 13, 2011 10:53 pm
Location: SW Germany

Re: LibVT

Post by tofro »

SM7I wrote:
I tried what you suggested, but the QL won´t recognize SETENV.
Then you need to install Environment Variable support (comes with C68).

Tobias


ʎɐqǝ ɯoɹɟ ǝq oʇ ƃuᴉoƃ ʇou sᴉ pɹɐoqʎǝʞ ʇxǝu ʎɯ 'ɹɐǝp ɥO
SM7I
ROM Dongle
Posts: 41
Joined: Mon Dec 10, 2012 6:52 pm

Re: LibVT

Post by SM7I »

tofro wrote:
SM7I wrote:
I tried what you suggested, but the QL won´t recognize SETENV.
Then you need to install Environment Variable support (comes with C68).

Tobias
OK, I get that. It works perfect with Environment Variable support, but...as I can create a window with a simple struct of condetails and then fopen or io_open CON_ , why can’t curses be used then ?

Please explain as I’m very confused about the QL way of working :)


Derek_Stewart
Font of All Knowledge
Posts: 3971
Joined: Mon Dec 20, 2010 11:40 am
Location: Sunny Runcorn, Cheshire, UK

Re: LibVT

Post by Derek_Stewart »

Hi,

Sorry not to of replied earlier, I seem have no time for anything these days...

But with regards to defining the QL window in C68, a WINDWDEF structure has to be defined for example:
struct WINDDEF _condetails =
{
*/ Border Colour, Border Size, Ink, Paper, Xsize, Ysize, Xpos, Ypos */
2,1,7,1,512,256,0,0
};
The qdos.h file has be included.

So the start of testcur1_c is:

Code: Select all

#include <curse.h>
#include <qdos.h>

struct WINDDEF _condetails =
{
  */ Border Colour, Border Size, Ink, Paper, Xsize, Ysize, Xpos, Ypos */
  2,1,7,1,512,256,0,0
}; 

main () {

/* ...code continues... */
Then just compile the C programme:

ex CC;"-o testcur1_exe testcur1_c -lcurses"

The console window will be defined as in the WINDOWDEF structure.

Incidentently, a console channel already open can be passed to the C coopiled programme in the command line:

EX testcur1_exe;,#1

all default consoles operations go to the screen channel #1.

This information is defined the C68 documentation, also see other existing C68 source coce, for example the ansview_c programme in the LBBVT archive.


Regards,

Derek
SM7I
ROM Dongle
Posts: 41
Joined: Mon Dec 10, 2012 6:52 pm

Re: LibVT

Post by SM7I »

Thanks Derek. Now it all fits together. Thanks very much for your explanation. This was just what I needed !!


Post Reply