GadgetSeed  0.9.6
grconsole.c ファイル

グラフィックコンソールドライバ [詳解]

#include "device.h"
#include "graphics.h"
#include "font.h"
#include "tkprintf.h"
#include "dkprintf.h"
grconsole.c の依存先関係図:

[ソースコード]

マクロ定義

#define SCREEN_WIDTH   GRAPH_WIDTH
 
#define SCREEN_HEIGHT   GRAPH_HEIGHT
 
#define CONSOLE_WIDTH   (SCREEN_WIDTH/fnt_width)
 
#define CONSOLE_HEIGHT   (SCREEN_HEIGHT/fnt_height)
 

関数

static int grconsole_register (struct st_device *dev, char *param)
 
static void draw_cursor (unsigned char on)
 
static void next_line (void)
 
static void draw_ch (unsigned short x, unsigned short y, unsigned short ch)
 
static void put_char (unsigned char ch)
 
static int grconsole_open (struct st_device *dev)
 
static int grconsole_ioctl (struct st_device *dev, unsigned int com, unsigned int arg, void *param)
 
static int grconsole_putc (struct st_device *dev, unsigned char data)
 
static int grconsole_seek (struct st_device *dev, int offset, int whence)
 

変数

static short screen_width
 
static short screen_height
 
static short console_width
 
static short console_height
 
static short fnt_width
 
static short fnt_height
 
static long grc_addr
 
static short cur_x
 
static short cur_y
 
static unsigned char esc
 
static struct st_fontsetfset
 
static struct st_rect screct
 
static struct st_rect blrect
 
static const char def_font [] = "8x16"
 
const struct st_device grconsole_device
 

詳解

グラフィックコンソールドライバ

グラフィックコンソールドライバはグラフィックライブラリを使用したコ ンソールドライバです。

register()実行時にコンソールに使用するフォント名を指定することが出 来ます。省略時はフォント名"8x16"を使用ます。

register()時に指定されたフォントにより行幅、行高さが決定されます。

グラフィックコンソールドライバは実験的なドライバであり未完成でです。

日付
2008.01.04
著者
Takashi SHUDO
todo:
漢字表示を可能にする。

grconsole.c に定義があります。

変数詳解

◆ grconsole_device

const struct st_device grconsole_device
初期値:
= {
.name = "grcon",
.explan = "Graphic console",
.register_dev = grconsole_register,
.open = grconsole_open,
.ioctl = grconsole_ioctl,
.putc = grconsole_putc,
.seek = grconsole_seek,
}

grconsole.c264 行目に定義があります。