diff options
author | Andreas Baumann <mail@andreasbaumann.cc> | 2017-07-22 16:14:14 +0200 |
---|---|---|
committer | Andreas Baumann <mail@andreasbaumann.cc> | 2017-07-22 16:14:14 +0200 |
commit | 752ff17265f23d4fa9084368d2a90f66521a98e2 (patch) | |
tree | 2acad7fc117add49064f261cfbadcd341c7406b6 /src/drivers/video/video.c | |
parent | 95292027625e905080f37f585402f49ec49bc97f (diff) | |
download | abaos-752ff17265f23d4fa9084368d2a90f66521a98e2.tar.gz abaos-752ff17265f23d4fa9084368d2a90f66521a98e2.tar.bz2 |
separated video driver in a virtual video driver and a specific
VGA video driver
Diffstat (limited to 'src/drivers/video/video.c')
-rw-r--r-- | src/drivers/video/video.c | 44 |
1 files changed, 40 insertions, 4 deletions
diff --git a/src/drivers/video/video.c b/src/drivers/video/video.c index ca57269..064a1f6 100644 --- a/src/drivers/video/video.c +++ b/src/drivers/video/video.c @@ -27,12 +27,12 @@ void video_init( video_t *video, interrupt_t *interrupt, void *context ) void video_activate( void *obj ) { - kernel_panic( "Activating generic video driver should not be called directly." ); + kernel_panic( "Calling abstract method in file %s at line %d.", __FILE__, __LINE__ ); } void video_deactivate( void *obj ) { - kernel_panic( "Deactivating generic video driver should not be called directly." ); + kernel_panic( "Calling abstract method in file %s at line %d.", __FILE__, __LINE__ ); } void video_deinit( void *obj ) @@ -42,7 +42,7 @@ void video_deinit( void *obj ) void video_print_info( void *obj ) { - kernel_panic( "Printing info of generic video driver should not be called directly." ); + kernel_panic( "Calling abstract method in file %s at line %d.", __FILE__, __LINE__ ); } video_mode_t video_make_mode( const video_mode_type_t mode_type, const int x, const int y, const int color_depth ) @@ -114,7 +114,7 @@ bool video_set_mode( void *obj, const video_mode_t mode ) bool video_switch_mode( void *obj, const video_mode_t *mode ) { - kernel_panic( "Switching mode function of abstract video driver should not be called directly." ); + kernel_panic( "Calling abstract method in file %s at line %d.", __FILE__, __LINE__ ); return false; } @@ -149,3 +149,39 @@ const video_rgb_color_t VIDEO_RGB_COLOR_WHITE = { 0xFF, 0xFF, 0xFF }; 0xD 0X3D 63,21,63 255,85,255 #ff55ff bright magenta 0xE 0x3E 63,63,21 255,255,85 #ffff55 yellow */ + +void video_set_pixel( void *obj, const int x, const int y, const video_rgb_color_t color ) +{ + kernel_panic( "Calling abstract method in file %s at line %d.", __FILE__, __LINE__ ); +} + +void video_draw_rectangle( void *obj, const int x, const int y, const int w, const int h, const video_rgb_color_t color ) +{ + kernel_panic( "Calling abstract method in file %s at line %d.", __FILE__, __LINE__ ); +} + +void video_clear_screen( void *obj, const video_rgb_color_t color ) +{ + kernel_panic( "Calling abstract method in file %s at line %d.", __FILE__, __LINE__ ); +} + +void video_draw_char( void *obj, const unsigned char c, const int x, const int y, const video_rgb_color_t background, const video_rgb_color_t foreground ) +{ + kernel_panic( "Calling abstract method in file %s at line %d.", __FILE__, __LINE__ ); +} + +void video_wait_for_retrace( void *obj ) +{ + kernel_panic( "Calling abstract method in file %s at line %d.", __FILE__, __LINE__ ); +} + +void video_use_z_buffer( void *obj, bool use ) +{ + kernel_panic( "Calling abstract method in file %s at line %d.", __FILE__, __LINE__ ); +} + +void video_refresh( void *obj ) +{ + kernel_panic( "Calling abstract method in file %s at line %d.", __FILE__, __LINE__ ); +} + |