Console Service
[HelenOS Services]


Files

file  console.c
file  console.h
file  gcons.c
file  gcons.h
file  screenbuffer.c
file  screenbuffer.h

Data Structures

struct  connection_t
struct  style_t
struct  keyfield_t
struct  screenbuffer_t

Defines

#define MAX_KEYREQUESTS_BUFFERED   32
#define NAME   "CONSOLE"
#define KERNEL_CONSOLE   11
#define CONSOLE_COUNT   12
#define CONSOLE_GETCHAR   1026
#define CONSOLE_PUTCHAR   1027
#define CONSOLE_CLEAR   1028
#define CONSOLE_GOTO   1029
#define CONSOLE_GETSIZE   1030
#define CONSOLE_FLUSH   1031
#define CONSOLE_SET_STYLE   1032
#define CONSOLE_CURSOR_VISIBILITY   1033
#define CONSOLE_TOP   66
#define CONSOLE_MARGIN   6
#define STATUS_START   110
#define STATUS_TOP   8
#define STATUS_SPACE   4
#define STATUS_WIDTH   48
#define STATUS_HEIGHT   48
#define MAIN_COLOR   0xffffff
#define DEFAULT_FOREGROUND   0x0
#define DEFAULT_BACKGROUND   0xf0f0f0

Enumerations

enum  butstate {
  CONS_DISCONNECTED = 0, CONS_SELECTED, CONS_IDLE, CONS_HAS_DATA,
  CONS_KERNEL, CONS_DISCONNECTED_SEL, CONS_LAST
}

Functions

static int find_free_connection (void)
static void clrscr (void)
static void curs_visibility (int v)
static void curs_goto (int row, int col)
static void set_style (style_t *style)
static void set_style_col (int fgcolor, int bgcolor)
static void prtchr (char c, int row, int col)
static void write_char (int console, char key)
static int switch_screens (int oldpixmap)
static void change_console (int newcons)
static void keyboard_events (ipc_callid_t iid, ipc_call_t *icall)
static void client_connection (ipc_callid_t iid, ipc_call_t *icall)
int main (int argc, char *argv[])
static void vp_switch (int vp)
static int vp_create (unsigned int x, unsigned int y, unsigned int width, unsigned int height)
static void clear (void)
static void set_style (int fgcolor, int bgcolor)
static void tran_putch (char c, int row, int col)
static void redraw_state (int consnum)
void gcons_change_console (int consnum)
void gcons_notify_char (int consnum)
void gcons_notify_disconnect (int consnum)
void gcons_notify_connect (int consnum)
void gcons_in_kernel (void)
static int limit (int a, int left, int right)
void gcons_mouse_move (int dx, int dy)
static int gcons_find_conbut (int x, int y)
int gcons_mouse_btn (int state)
static void draw_pixmap (char *logo, size_t size, int x, int y)
static void gcons_redraw_console (void)
static int make_pixmap (char *data, int size)
static void make_anim (void)
void gcons_init (int phone)
void screenbuffer_putchar (screenbuffer_t *scr, char c)
screenbuffer_tscreenbuffer_init (screenbuffer_t *scr, int size_x, int size_y)
void screenbuffer_clear (screenbuffer_t *scr)
void screenbuffer_clear_line (screenbuffer_t *scr, unsigned int line)
void screenbuffer_copy_buffer (screenbuffer_t *scr, keyfield_t *dest)
void screenbuffer_goto (screenbuffer_t *scr, unsigned int x, unsigned int y)
void screenbuffer_set_style (screenbuffer_t *scr, unsigned int fg_color, unsigned int bg_color)
static keyfield_tget_field_at (screenbuffer_t *scr, unsigned int x, unsigned int y)
static int style_same (style_t s1, style_t s2)

Variables

int active_console = 0
struct {
   int   phone
   ipcarg_t   rows
   ipcarg_t   cols
   volatile sysarg_t   seconds1
   volatile sysarg_t   useconds
   volatile sysarg_t   seconds2
fb_info
static connection_t connections [CONSOLE_COUNT]
static keyfield_tinterbuffer = NULL
static int kernel_pixmap = -1
static int use_gcons = 0
static ipcarg_t xres
static ipcarg_t yres
static int console_vp
static int cstatus_vp [CONSOLE_COUNT]
static enum butstate console_state [CONSOLE_COUNT]
static int fbphone
static int ic_pixmaps [CONS_LAST] = {-1,-1,-1,-1,-1,-1}
static int animation = -1
static int active_console = 0
int mouse_x
int mouse_y
int btn_pressed
int btn_x
int btn_y
char _binary_helenos_ppm_start [0]
int _binary_helenos_ppm_size
char _binary_nameic_ppm_start [0]
int _binary_nameic_ppm_size
char _binary_anim_1_ppm_start [0]
int _binary_anim_1_ppm_size
char _binary_anim_2_ppm_start [0]
int _binary_anim_2_ppm_size
char _binary_anim_3_ppm_start [0]
int _binary_anim_3_ppm_size
char _binary_anim_4_ppm_start [0]
int _binary_anim_4_ppm_size
char _binary_cons_selected_ppm_start [0]
int _binary_cons_selected_ppm_size
char _binary_cons_idle_ppm_start [0]
int _binary_cons_idle_ppm_size
char _binary_cons_has_data_ppm_start [0]
int _binary_cons_has_data_ppm_size
char _binary_cons_kernel_ppm_start [0]
int _binary_cons_kernel_ppm_size

Define Documentation

#define MAX_KEYREQUESTS_BUFFERED   32
 

Definition at line 54 of file console.c.

Referenced by client_connection(), and main().

#define NAME   "CONSOLE"
 

Definition at line 56 of file console.c.

#define KERNEL_CONSOLE   11
 

Definition at line 38 of file console.h.

Referenced by change_console(), gcons_change_console(), gcons_in_kernel(), gcons_notify_char(), gcons_notify_connect(), gcons_notify_disconnect(), keyboard_events(), and make_anim().

#define CONSOLE_COUNT   12
 

Definition at line 40 of file console.h.

Referenced by find_free_connection(), gcons_change_console(), gcons_find_conbut(), gcons_init(), gcons_redraw_console(), keyboard_events(), and main().

#define CONSOLE_GETCHAR   1026
 

Definition at line 42 of file console.h.

Referenced by client_connection(), and read_stdin().

#define CONSOLE_PUTCHAR   1027
 

Definition at line 43 of file console.h.

Referenced by client_connection(), and write_stdout().

#define CONSOLE_CLEAR   1028
 

Definition at line 44 of file console.h.

Referenced by client_connection().

#define CONSOLE_GOTO   1029
 

Definition at line 45 of file console.h.

Referenced by client_connection().

#define CONSOLE_GETSIZE   1030
 

Definition at line 46 of file console.h.

Referenced by client_connection().

#define CONSOLE_FLUSH   1031
 

Definition at line 47 of file console.h.

Referenced by client_connection().

#define CONSOLE_SET_STYLE   1032
 

Definition at line 48 of file console.h.

Referenced by client_connection().

#define CONSOLE_CURSOR_VISIBILITY   1033
 

Definition at line 49 of file console.h.

Referenced by client_connection().

#define CONSOLE_TOP   66
 

Definition at line 46 of file gcons.c.

Referenced by gcons_init().

#define CONSOLE_MARGIN   6
 

Definition at line 47 of file gcons.c.

Referenced by gcons_init().

#define STATUS_START   110
 

Definition at line 49 of file gcons.c.

Referenced by gcons_find_conbut(), and gcons_init().

#define STATUS_TOP   8
 

Definition at line 50 of file gcons.c.

Referenced by gcons_find_conbut(), and gcons_init().

#define STATUS_SPACE   4
 

Definition at line 51 of file gcons.c.

Referenced by gcons_find_conbut(), and gcons_init().

#define STATUS_WIDTH   48
 

Definition at line 52 of file gcons.c.

Referenced by gcons_find_conbut(), and gcons_init().

#define STATUS_HEIGHT   48
 

Definition at line 53 of file gcons.c.

Referenced by gcons_find_conbut(), and gcons_init().

#define MAIN_COLOR   0xffffff
 

Definition at line 55 of file gcons.c.

Referenced by gcons_redraw_console().

#define DEFAULT_FOREGROUND   0x0
 

default console foreground color

Definition at line 39 of file screenbuffer.h.

Referenced by change_console(), main(), and screenbuffer_init().

#define DEFAULT_BACKGROUND   0xf0f0f0
 

default console background color

Definition at line 40 of file screenbuffer.h.

Referenced by change_console(), main(), and screenbuffer_init().


Enumeration Type Documentation

enum butstate
 

Enumerator:
CONS_DISCONNECTED 
CONS_SELECTED 
CONS_IDLE 
CONS_HAS_DATA 
CONS_KERNEL 
CONS_DISCONNECTED_SEL 
CONS_LAST 

Definition at line 60 of file gcons.c.


Function Documentation

static int find_free_connection void   )  [static]
 

Find unused virtual console.

Definition at line 89 of file console.c.

References connections, and CONSOLE_COUNT.

Referenced by client_connection().

static void clrscr void   )  [static]
 

Definition at line 100 of file console.c.

References async_msg, and fb_info.

Referenced by change_console(), main(), sysio_client_connection(), and sysio_init().

static void curs_visibility int  v  )  [static]
 

Definition at line 105 of file console.c.

References async_msg, and fb_info.

Referenced by change_console(), and client_connection().

static void curs_goto int  row,
int  col
[static]
 

Definition at line 110 of file console.c.

References async_msg_2(), and fb_info.

Referenced by client_connection(), scroll(), sysio_client_connection(), sysio_init(), and write_char().

Here is the call graph for this function:

static void set_style style_t style  )  [static]
 

Definition at line 116 of file console.c.

References async_msg_2(), style_t::bg_color, fb_info, and style_t::fg_color.

Referenced by change_console(), gcons_init(), gcons_redraw_console(), and sysio_client_connection().

Here is the call graph for this function:

static void set_style_col int  fgcolor,
int  bgcolor
[static]
 

Definition at line 121 of file console.c.

References async_msg_2(), and fb_info.

Referenced by change_console(), client_connection(), and main().

Here is the call graph for this function:

static void prtchr char  c,
int  row,
int  col
[static]
 

Definition at line 126 of file console.c.

References async_msg_3(), and fb_info.

Referenced by change_console(), and write_char().

Here is the call graph for this function:

static void write_char int  console,
char  key
[static]
 

Check key and process special keys.

Definition at line 135 of file console.c.

References active_console, async_msg, connections, curs_goto(), fb_info, screenbuffer_t::position_x, screenbuffer_t::position_y, prtchr(), connection_t::screenbuffer, screenbuffer_clear_line(), screenbuffer_putchar(), screenbuffer_t::size_x, screenbuffer_t::size_y, and screenbuffer_t::top_line.

Referenced by client_connection().

Here is the call graph for this function:

static int switch_screens int  oldpixmap  )  [static]
 

Save current screen to pixmap, draw old pixmap

Parameters:
oldpixmap Old pixmap
Returns:
ID of pixmap of current screen

Definition at line 192 of file console.c.

References async_msg, async_msg_2(), async_req, fb_info, and NULL.

Referenced by change_console(), and main().

Here is the call graph for this function:

static void change_console int  newcons  )  [static]
 

Switch to new console

Definition at line 212 of file console.c.

References __SYSCALL0, active_console, async_req_2(), async_serialize_end(), async_serialize_start(), keyfield_t::character, clrscr(), connections, curs_visibility(), DEFAULT_BACKGROUND, DEFAULT_FOREGROUND, fb_info, gcons_change_console(), gcons_in_kernel(), get_field_at(), interbuffer, KERNEL_CONSOLE, kernel_pixmap, NULL, prtchr(), connection_t::screenbuffer, set_style(), set_style_col(), screenbuffer_t::size_x, screenbuffer_t::size_y, keyfield_t::style, screenbuffer_t::style, style_same(), and switch_screens().

Referenced by keyboard_events().

Here is the call graph for this function:

static void keyboard_events ipc_callid_t  iid,
ipc_call_t icall
[static]
 

Handler for keyboard

Definition at line 290 of file console.c.

References active_console, async_get_call(), change_console(), connections, CONSOLE_COUNT, fifo_pop, gcons_mouse_btn(), gcons_mouse_move(), ipc_answer_fast(), KBD_MS_LEFT, KBD_MS_MOVE, KBD_PUSHCHAR, KERNEL_CONSOLE, connection_t::keybuffer, keybuffer_push(), and connection_t::keyrequest_counter.

Referenced by main().

Here is the call graph for this function:

static void client_connection ipc_callid_t  iid,
ipc_call_t icall
[static]
 

Default thread for new connections

Definition at line 352 of file console.c.

References active_console, async_get_call(), async_msg, async_req_2(), async_serialize_end(), async_serialize_start(), connection_t::client_phone, connections, CONSOLE_CLEAR, CONSOLE_CURSOR_VISIBILITY, CONSOLE_FLUSH, CONSOLE_GETCHAR, CONSOLE_GETSIZE, CONSOLE_GOTO, CONSOLE_PUTCHAR, CONSOLE_SET_STYLE, curs_goto(), curs_visibility(), fb_info, fifo_pop, fifo_push, find_free_connection(), gcons_notify_char(), gcons_notify_connect(), gcons_notify_disconnect(), ipc_answer_fast(), screenbuffer_t::is_cursor_visible, connection_t::keybuffer, keybuffer_empty(), keybuffer_pop(), connection_t::keyrequest_counter, MAX_KEYREQUESTS_BUFFERED, NULL, connection_t::screenbuffer, screenbuffer_clear(), screenbuffer_goto(), screenbuffer_set_style(), set_style_col(), connection_t::used, and write_char().

Here is the call graph for this function:

int main int  argc,
char *  argv[]
 

Definition at line 457 of file console.c.

References async_msg_2(), async_new_connection(), async_req, async_req_2(), async_set_client_connection(), client_connection, clrscr(), connections, CONSOLE_COUNT, DEFAULT_BACKGROUND, DEFAULT_FOREGROUND, fb_info, gcons_init(), ipc_connect_me_to(), ipc_connect_to_me(), kernel_pixmap, keyboard_events(), keybuffer, keybuffer_init(), connection_t::keyrequest_counter, MAX_KEYREQUESTS_BUFFERED, NULL, screenbuffer_init(), SERVICE_CONSOLE, SERVICE_KEYBOARD, SERVICE_VIDEO, set_style_col(), switch_screens(), and usleep().

Here is the call graph for this function:

static void vp_switch int  vp  )  [static]
 

Definition at line 82 of file gcons.c.

References async_msg, and fbphone.

Referenced by gcons_change_console(), gcons_in_kernel(), gcons_init(), gcons_notify_char(), gcons_notify_connect(), gcons_notify_disconnect(), gcons_redraw_console(), and redraw_state().

static int vp_create unsigned int  x,
unsigned int  y,
unsigned int  width,
unsigned int  height
[static]
 

Create view port

Definition at line 88 of file gcons.c.

References async_req_2(), fbphone, and NULL.

Referenced by gcons_init().

Here is the call graph for this function:

static void clear void   )  [static]
 

Definition at line 96 of file gcons.c.

References async_msg, and fbphone.

Referenced by gcons_redraw_console().

static void set_style int  fgcolor,
int  bgcolor
[static]
 

Definition at line 102 of file gcons.c.

References async_msg_2(), and fbphone.

Here is the call graph for this function:

static void tran_putch char  c,
int  row,
int  col
[static]
 

Transparent putchar

Definition at line 108 of file gcons.c.

References async_msg_3(), and fbphone.

Referenced by redraw_state().

Here is the call graph for this function:

static void redraw_state int  consnum  )  [static]
 

Redraw the button showing state of a given console

Definition at line 114 of file gcons.c.

References async_msg_2(), CONS_DISCONNECTED, CONS_DISCONNECTED_SEL, CONS_KERNEL, console_state, cstatus_vp, fbphone, ic_pixmaps, snprintf(), tran_putch(), and vp_switch().

Referenced by gcons_change_console(), gcons_in_kernel(), gcons_notify_char(), gcons_notify_connect(), gcons_notify_disconnect(), and gcons_redraw_console().

Here is the call graph for this function:

void gcons_change_console int  consnum  ) 
 

Notification run on changing console (except kernel console)

Definition at line 132 of file gcons.c.

References active_console, animation, async_msg, CONS_DISCONNECTED, CONS_DISCONNECTED_SEL, CONS_IDLE, CONS_SELECTED, CONSOLE_COUNT, console_state, console_vp, fbphone, KERNEL_CONSOLE, redraw_state(), use_gcons, and vp_switch().

Referenced by change_console().

Here is the call graph for this function:

void gcons_notify_char int  consnum  ) 
 

Notification function that gets called on new output to virtual console

Definition at line 164 of file gcons.c.

References active_console, CONS_HAS_DATA, console_state, console_vp, KERNEL_CONSOLE, redraw_state(), use_gcons, and vp_switch().

Referenced by client_connection().

Here is the call graph for this function:

void gcons_notify_disconnect int  consnum  ) 
 

Notification function called on service disconnect from console

Definition at line 183 of file gcons.c.

References active_console, CONS_DISCONNECTED, CONS_DISCONNECTED_SEL, console_state, console_vp, KERNEL_CONSOLE, redraw_state(), use_gcons, and vp_switch().

Referenced by client_connection().

Here is the call graph for this function:

void gcons_notify_connect int  consnum  ) 
 

Notification function called on console connect

Definition at line 200 of file gcons.c.

References active_console, CONS_IDLE, CONS_SELECTED, console_state, console_vp, KERNEL_CONSOLE, redraw_state(), use_gcons, and vp_switch().

Referenced by client_connection().

Here is the call graph for this function:

void gcons_in_kernel void   ) 
 

Change to kernel console

Definition at line 217 of file gcons.c.

References active_console, animation, async_msg, CONS_DISCONNECTED, CONS_DISCONNECTED_SEL, CONS_IDLE, console_state, fbphone, KERNEL_CONSOLE, redraw_state(), and vp_switch().

Referenced by change_console().

Here is the call graph for this function:

static int limit int  a,
int  left,
int  right
[static]
 

Definition at line 233 of file gcons.c.

Referenced by gcons_mouse_move().

void gcons_mouse_move int  dx,
int  dy
 

Handle mouse move

Parameters:
dx Delta X of mouse move
dy Delta Y of mouse move

Definition at line 250 of file gcons.c.

References async_msg_2(), fbphone, limit(), mouse_x, mouse_y, xres, and yres.

Referenced by keyboard_events().

Here is the call graph for this function:

static int gcons_find_conbut int  x,
int  y
[static]
 

Definition at line 258 of file gcons.c.

References CONSOLE_COUNT, STATUS_HEIGHT, STATUS_SPACE, STATUS_START, STATUS_TOP, STATUS_WIDTH, and xres.

Referenced by gcons_mouse_btn().

int gcons_mouse_btn int  state  ) 
 

Handle mouse click

Parameters:
state New state (1-pressed, 0-depressed)

Definition at line 280 of file gcons.c.

References btn_pressed, btn_x, btn_y, gcons_find_conbut(), mouse_x, and mouse_y.

Referenced by keyboard_events().

Here is the call graph for this function:

static void draw_pixmap char *  logo,
size_t  size,
int  x,
int  y
[static]
 

Draw a PPM pixmap to framebuffer

Parameters:
logo Pointer to PPM data
size Size of PPM data
x Coordinate of upper left corner
y Coordinate of upper left corner

Definition at line 311 of file gcons.c.

References async_msg, async_msg_2(), async_req_2(), async_req_3(), exit, fbphone, MAP_ANONYMOUS, MAP_FAILED, MAP_SHARED, memcpy(), mmap(), munmap(), NULL, PROTO_READ, and PROTO_WRITE.

Referenced by gcons_redraw_console().

Here is the call graph for this function:

static void gcons_redraw_console void   )  [static]
 

Redraws console graphics

Definition at line 344 of file gcons.c.

References _binary_helenos_ppm_size, _binary_helenos_ppm_start, _binary_nameic_ppm_size, _binary_nameic_ppm_start, clear(), CONSOLE_COUNT, console_vp, draw_pixmap(), MAIN_COLOR, redraw_state(), set_style(), use_gcons, vp_switch(), and xres.

Here is the call graph for this function:

static int make_pixmap char *  data,
int  size
[static]
 

Creates a pixmap on framebuffer

Parameters:
data PPM data
size PPM data size
Returns:
Pixmap identification

Definition at line 368 of file gcons.c.

References async_msg, async_req, async_req_2(), async_req_3(), exit, fbphone, MAP_ANONYMOUS, MAP_FAILED, MAP_SHARED, memcpy(), mmap(), munmap(), NULL, PROTO_READ, and PROTO_WRITE.

Referenced by make_anim().

Here is the call graph for this function:

static void make_anim void   )  [static]
 

Definition at line 411 of file gcons.c.

References _binary_anim_1_ppm_size, _binary_anim_1_ppm_start, _binary_anim_2_ppm_size, _binary_anim_2_ppm_start, _binary_anim_3_ppm_size, _binary_anim_3_ppm_start, _binary_anim_4_ppm_size, _binary_anim_4_ppm_start, animation, async_msg, async_msg_2(), async_req, cstatus_vp, fbphone, KERNEL_CONSOLE, make_pixmap(), and NULL.

Here is the call graph for this function:

void gcons_init int  phone  ) 
 

Initialize nice graphical console environment

Definition at line 446 of file gcons.c.

References ALIGN_DOWN, async_req_2(), CONSOLE_COUNT, CONSOLE_MARGIN, CONSOLE_TOP, console_vp, cstatus_vp, fbphone, set_style(), STATUS_HEIGHT, STATUS_SPACE, STATUS_START, STATUS_TOP, STATUS_WIDTH, vp_create(), vp_switch(), xres, and yres.

Referenced by main().

Here is the call graph for this function:

void screenbuffer_putchar screenbuffer_t scr,
char  c
 

Store one character to screenbuffer. Its position is determined by scr->position_x and scr->position_y.

Parameters:
scr screenbuffer
c stored character

Definition at line 43 of file screenbuffer.c.

References keyfield_t::character, get_field_at(), screenbuffer_t::position_x, screenbuffer_t::position_y, screenbuffer_t::style, and keyfield_t::style.

Referenced by write_char().

Here is the call graph for this function:

screenbuffer_t * screenbuffer_init screenbuffer_t scr,
int  size_x,
int  size_y
 

Initilize screenbuffer. Allocate space for screen content in accordance to given size.

Parameters:
scr initialized screenbuffer
size_x width in characters
size_y height in characters
Returns:
pointer to screenbuffer (same as scr parameter) or NULL

Definition at line 59 of file screenbuffer.c.

References style_t::bg_color, screenbuffer_t::buffer, DEFAULT_BACKGROUND, DEFAULT_FOREGROUND, style_t::fg_color, screenbuffer_t::is_cursor_visible, NULL, screenbuffer_clear(), screenbuffer_t::size_x, screenbuffer_t::size_y, and screenbuffer_t::style.

Referenced by main().

Here is the call graph for this function:

void screenbuffer_clear screenbuffer_t scr  ) 
 

Clear screenbuffer.

Parameters:
scr screenbuffer

Definition at line 79 of file screenbuffer.c.

References screenbuffer_t::buffer, keyfield_t::character, screenbuffer_t::size_x, screenbuffer_t::size_y, screenbuffer_t::style, and keyfield_t::style.

Referenced by client_connection(), and screenbuffer_init().

void screenbuffer_clear_line screenbuffer_t scr,
unsigned int  line
 

Clear one buffer line.

Parameters:
scr 
line One buffer line (not a screen line!)

Definition at line 97 of file screenbuffer.c.

References screenbuffer_t::buffer, screenbuffer_t::size_x, and screenbuffer_t::style.

Referenced by write_char().

void screenbuffer_copy_buffer screenbuffer_t scr,
keyfield_t dest
 

Copy content buffer from screenbuffer to given memory.

Parameters:
scr source screenbuffer
dest destination

Definition at line 111 of file screenbuffer.c.

References screenbuffer_t::buffer, screenbuffer_t::size_x, and screenbuffer_t::size_y.

void screenbuffer_goto screenbuffer_t scr,
unsigned int  x,
unsigned int  y
 

Set new cursor position in screenbuffer.

Parameters:
scr 
x 
y 

Definition at line 125 of file screenbuffer.c.

References screenbuffer_t::position_x, screenbuffer_t::position_y, screenbuffer_t::size_x, and screenbuffer_t::size_y.

Referenced by client_connection().

void screenbuffer_set_style screenbuffer_t scr,
unsigned int  fg_color,
unsigned int  bg_color
 

Set new style.

Parameters:
scr 
fg_color 
bg_color 

Definition at line 136 of file screenbuffer.c.

References style_t::bg_color, style_t::fg_color, and screenbuffer_t::style.

Referenced by client_connection().

static keyfield_t* get_field_at screenbuffer_t scr,
unsigned int  x,
unsigned int  y
[static]
 

Returns keyfield for position on screen. Screenbuffer->buffer is cyclic buffer so we must couted in index of the topmost line.

Parameters:
scr screenbuffer
x position on screen
y position on screen
Returns:
keyfield structure with character and its attributes on x,y

Definition at line 70 of file screenbuffer.h.

References screenbuffer_t::buffer, screenbuffer_t::size_x, screenbuffer_t::size_y, and screenbuffer_t::top_line.

Referenced by change_console(), and screenbuffer_putchar().

static int style_same style_t  s1,
style_t  s2
[static]
 

Compares two styles.

Parameters:
s1 first style
s2 second style
Returns:
nonzero on equality

Definition at line 80 of file screenbuffer.h.

References style_t::bg_color, and style_t::fg_color.

Referenced by change_console().


Variable Documentation

int active_console = 0
 

Index of currently used virtual console.

Definition at line 60 of file console.c.

Referenced by change_console(), client_connection(), gcons_change_console(), gcons_in_kernel(), gcons_notify_char(), gcons_notify_connect(), gcons_notify_disconnect(), keyboard_events(), and write_char().

struct { ... } fb_info
 

Information about framebuffer

Referenced by change_console(), client_connection(), clrscr(), curs_goto(), curs_visibility(), main(), prtchr(), set_style(), set_style_col(), switch_screens(), and write_char().

int phone [inherited]
 

Framebuffer phone

Definition at line 65 of file console.c.

ipcarg_t rows [inherited]
 

Framebuffer rows

Definition at line 66 of file console.c.

ipcarg_t cols [inherited]
 

Framebuffer columns

Definition at line 67 of file console.c.

connection_t connections[CONSOLE_COUNT] [static]
 

Array of data for virtual consoles

Definition at line 80 of file console.c.

Referenced by change_console(), client_connection(), find_free_connection(), keyboard_events(), main(), and write_char().

keyfield_t* interbuffer = NULL [static]
 

Pointer to memory shared with framebufer used for faster virt. console switching

Definition at line 81 of file console.c.

Referenced by change_console().

int kernel_pixmap = -1 [static]
 

Number of fb pixmap, where kernel console is stored

Definition at line 83 of file console.c.

Referenced by change_console(), and main().

int use_gcons = 0 [static]
 

Definition at line 57 of file gcons.c.

Referenced by gcons_change_console(), gcons_notify_char(), gcons_notify_connect(), gcons_notify_disconnect(), and gcons_redraw_console().

ipcarg_t xres [static]
 

Definition at line 58 of file gcons.c.

Referenced by gcons_find_conbut(), gcons_init(), gcons_mouse_move(), and gcons_redraw_console().

ipcarg_t yres [static]
 

Definition at line 58 of file gcons.c.

Referenced by gcons_init(), and gcons_mouse_move().

int console_vp [static]
 

Definition at line 70 of file gcons.c.

Referenced by gcons_change_console(), gcons_init(), gcons_notify_char(), gcons_notify_connect(), gcons_notify_disconnect(), and gcons_redraw_console().

int cstatus_vp[CONSOLE_COUNT] [static]
 

Definition at line 71 of file gcons.c.

Referenced by gcons_init(), make_anim(), and redraw_state().

enum butstate console_state[CONSOLE_COUNT] [static]
 

Definition at line 72 of file gcons.c.

Referenced by gcons_change_console(), gcons_in_kernel(), gcons_notify_char(), gcons_notify_connect(), gcons_notify_disconnect(), and redraw_state().

int fbphone [static]
 

Definition at line 74 of file gcons.c.

Referenced by clear(), draw_pixmap(), gcons_change_console(), gcons_in_kernel(), gcons_init(), gcons_mouse_move(), make_anim(), make_pixmap(), redraw_state(), set_style(), tran_putch(), vp_create(), and vp_switch().

int ic_pixmaps[CONS_LAST] = {-1,-1,-1,-1,-1,-1} [static]
 

List of pixmaps identifying these icons

Definition at line 77 of file gcons.c.

Referenced by redraw_state().

int animation = -1 [static]
 

Definition at line 78 of file gcons.c.

Referenced by gcons_change_console(), gcons_in_kernel(), and make_anim().

int active_console = 0 [static]
 

Definition at line 80 of file gcons.c.

int mouse_x
 

Definition at line 242 of file gcons.c.

Referenced by gcons_mouse_btn(), and gcons_mouse_move().

int mouse_y
 

Definition at line 242 of file gcons.c.

Referenced by gcons_mouse_btn(), and gcons_mouse_move().

int btn_pressed
 

Definition at line 243 of file gcons.c.

Referenced by gcons_mouse_btn().

int btn_x
 

Definition at line 243 of file gcons.c.

Referenced by gcons_mouse_btn().

int btn_y
 

Definition at line 243 of file gcons.c.

Referenced by gcons_mouse_btn().

char _binary_helenos_ppm_start[0]
 

Referenced by gcons_redraw_console().

int _binary_helenos_ppm_size
 

Referenced by gcons_redraw_console().

char _binary_nameic_ppm_start[0]
 

Referenced by gcons_redraw_console().

int _binary_nameic_ppm_size
 

Referenced by gcons_redraw_console().

char _binary_anim_1_ppm_start[0]
 

Referenced by make_anim().

int _binary_anim_1_ppm_size
 

Referenced by make_anim().

char _binary_anim_2_ppm_start[0]
 

Referenced by make_anim().

int _binary_anim_2_ppm_size
 

Referenced by make_anim().

char _binary_anim_3_ppm_start[0]
 

Referenced by make_anim().

int _binary_anim_3_ppm_size
 

Referenced by make_anim().

char _binary_anim_4_ppm_start[0]
 

Referenced by make_anim().

int _binary_anim_4_ppm_size
 

Referenced by make_anim().

char _binary_cons_selected_ppm_start[0]
 

int _binary_cons_selected_ppm_size
 

char _binary_cons_idle_ppm_start[0]
 

int _binary_cons_idle_ppm_size
 

char _binary_cons_has_data_ppm_start[0]
 

int _binary_cons_has_data_ppm_size
 

char _binary_cons_kernel_ppm_start[0]
 

int _binary_cons_kernel_ppm_size
 


Generated on Sun Jun 18 18:02:41 2006 for HelenOS Userspace (ia64) by  doxygen 1.4.6