Changeset 7284260 in mainline
- Timestamp:
- 2006-06-06T23:28:07Z (19 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- bba6b09
- Parents:
- 0f09bd45
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
console/console.c
r0f09bd45 r7284260 244 244 245 245 set_style(&conn->screenbuffer.style); 246 curs_goto(conn->screenbuffer.position_y, conn->screenbuffer.position_x);247 246 curs_visibility(0); 248 247 if (interbuffer) { … … 272 271 } 273 272 273 curs_goto(conn->screenbuffer.position_y, conn->screenbuffer.position_x); 274 274 curs_visibility(conn->screenbuffer.is_cursor_visible); 275 275 } -
console/screenbuffer.h
r0f09bd45 r7284260 31 31 32 32 33 #define DEFAULT_FOREGROUND 0x ffff00 /**< default console foreground color */34 #define DEFAULT_BACKGROUND 0x 000080 /**< default console background color */33 #define DEFAULT_FOREGROUND 0x0 /**< default console foreground color */ 34 #define DEFAULT_BACKGROUND 0xf0f0f0 /**< default console background color */ 35 35 36 36 typedef struct { -
fb/fb.c
r0f09bd45 r7284260 48 48 #include "ppm.h" 49 49 50 #define DEFAULT_BGCOLOR 0x 00008051 #define DEFAULT_FGCOLOR 0x ffff0050 #define DEFAULT_BGCOLOR 0xf0f0f0 51 #define DEFAULT_FGCOLOR 0x0 52 52 53 53 /***************************************************************/ -
fb/sysio.c
r0f09bd45 r7284260 37 37 38 38 #include "sysio.h" 39 40 #define WIDTH 80 41 #define HEIGHT 25 39 42 40 43 /* Allow only 1 connection */ … … 80 83 } 81 84 85 static void scroll(int i) 86 { 87 if (i > 0) { 88 curs_goto(HEIGHT-1, 0); 89 while (i--) 90 sysputs("\033D"); 91 } else if (i < 0) { 92 curs_goto(0,0); 93 while (i++) 94 sysputs("\033M"); 95 } 96 } 97 82 98 /** ANSI terminal emulation main thread */ 83 99 static void sysio_client_connection(ipc_callid_t iid, ipc_call_t *icall) … … 91 107 int newcol,newrow; 92 108 int fgcolor,bgcolor; 109 int i; 93 110 94 111 if (client_connected) { … … 120 137 newcol = IPC_GET_ARG2(call); 121 138 curs_goto(newrow, newcol); 139 lastrow = newrow; 140 lastcol = newcol; 122 141 break; 123 142 case FB_GET_CSIZE: 124 ipc_answer_fast(callid, 0, 25, 80);143 ipc_answer_fast(callid, 0, HEIGHT, WIDTH); 125 144 continue; 126 145 case FB_CLEAR: … … 131 150 fgcolor = IPC_GET_ARG1(call); 132 151 bgcolor = IPC_GET_ARG2(call); 133 if (fgcolor > bgcolor) 152 if (bgcolor == 0xf0f0f0) 153 set_style(0); 154 else if (fgcolor > bgcolor) 134 155 set_style(0); 135 156 else … … 137 158 retval = 0; 138 159 break; 160 case FB_SCROLL: 161 i = IPC_GET_ARG1(call); 162 if (i > HEIGHT || i < -HEIGHT) { 163 retval = EINVAL; 164 break; 165 } 166 scroll(i); 167 curs_goto(lastrow, lastcol); 168 retval = 0; 169 break; 170 139 171 default: 140 172 retval = ENOENT; … … 150 182 clrscr(); 151 183 curs_goto(0,0); 184 /* Set scrolling region to 0-25 lines */ 185 sysputs("\033[0;25r"); 152 186 }
Note:
See TracChangeset
for help on using the changeset viewer.