~ubuntu-branches/ubuntu/precise/kompozer/precise

« back to all changes in this revision

Viewing changes to mozilla/extensions/xmlterm/linetest/temncurses.c

  • Committer: Bazaar Package Importer
  • Author(s): Anthony Yarusso
  • Date: 2007-08-27 01:11:03 UTC
  • Revision ID: james.westby@ubuntu.com-20070827011103-2jgf4s6532gqu2ka
Tags: upstream-0.7.10
ImportĀ upstreamĀ versionĀ 0.7.10

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
 
 
2
  /* Move cursor and display string */
 
3
  x = 2;
 
4
  y = 4;
 
5
 
 
6
  /* if (scanf("%d %d", &y, &x) == EOF) break; */
 
7
 
 
8
  /* Display string at specified location and advance cursor */
 
9
  mvaddnstr(y, x, "test 1", 6);
 
10
 
 
11
  attron(A_BOLD);
 
12
  mvaddnstr(y, x+6, "test2 ", 6);
 
13
  attroff(A_BOLD);
 
14
 
 
15
  refresh();
 
16
 
 
17
  for (;;) {
 
18
    c = getch();
 
19
    if (c == KEY_MOUSE) {
 
20
      if (getmouse(&mev) == OK) {
 
21
        move(mev.y, mev.x);
 
22
        addnstr("MEV ", 4);
 
23
        refresh();
 
24
 
 
25
        /* Delete top line, and move up (if +1, insert top line, move down) */
 
26
        move(0,0);
 
27
        insdelln(-1);
 
28
 
 
29
      }
 
30
    }
 
31
  }
 
32