[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: what parts depend on X ?
From: |
Patrick |
Subject: |
Re: what parts depend on X ? |
Date: |
Sat, 06 Sep 2014 17:33:30 -0400 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Icedove/24.7.0 |
Not that I know. The last time I ran a program like that, it would
draw the line chars just well. Perhaps something is brohkenz with your
termcap or console-tools installation. How do you draw the window
borders? can you post a link to your test pgm?
I believe the mouse input can be got with gpm in the text terminal. Or
perhaps that was just for copy&paste.. Not sure tho if that still
exists/works..
oh, there:
<http://en.wikipedia.org/wiki/GPM_%28software%29>
Thanks Johann
I am actually mixing C and er... cobol(don't throw things at me..!)
I split off the cobol and tried to cut things down for a simple example.
I am boxing subwindows.
Thanks for the gpm link I didn't know this.
Thanks again-Patrick
#include <ncurses.h>
WINDOW *sentence_build;
int main() {
initscr();
create_sentence_subwins() ;
getch() ;
endwin() ;
return 0 ;
}
int create_sentence_subwins(void)
{
start_color();
init_pair(1,COLOR_YELLOW,COLOR_BLACK);
init_pair(2,COLOR_YELLOW,COLOR_BLACK);
sentence_build = subwin(stdscr,3,81,0,0);
if(sentence_build== NULL)
{ endwin(); puts("Unable to create sentence build
window\n"); return(1); }
wbkgd( sentence_build,COLOR_PAIR(2) );
box(sentence_build,0,0);
refresh();
return 0;
}