Main Page   File List   Globals  

tests/fbstat.c

00001 /***************************************************************************
00002                        fbstat.c  -  status of various settings
00003                              -------------------
00004     begin                : Thu Apr 18 2002
00005     copyright            : (C) 2002 Nathan P. Cole
00006     email                : qmagick@yahoo.com
00007  ***************************************************************************/
00008 
00009 /***************************************************************************
00010  *                                                                         *
00011  *   This program is free software; you can redistribute it and/or modify  *
00012  *   it under the terms of the GNU General Public License as published by  *
00013  *   the Free Software Foundation; version 2 of the License.               *
00014  *                                                                         *
00015  ***************************************************************************/
00016 #include "FBlib.h"
00017 #include "FBpriv.h"
00018 #include <stdio.h>
00019 #include <stdlib.h>
00020 #include <time.h>
00021 
00022 int main()
00023 {
00024         FB_initlib("/dev/fb0");
00025         
00026         printf ("\nsize of red, green and blue: %i %i %i\n",
00027                 work_var_info.red.length,
00028                 work_var_info.green.length,
00029                 work_var_info.blue.length
00030         );
00031 
00032         printf ("offsets of red, green and blue: %i %i %i\n",
00033                 work_var_info.red.offset,
00034                 work_var_info.green.offset,
00035                 work_var_info.blue.offset
00036         );
00037         
00038         printf ("bytes per pixel: %i\n", work_var_info.bits_per_pixel/8);
00039         printf ("bytes per line:  %i\n", fb_fix_info.line_length);
00040         printf ("total number of bytes, screen: %ld %ld\n", visiblesize, screensize);
00041         printf ("max screen width and height: %i %i\n", work_var_info.xres, work_var_info.yres);
00042 
00043         FB_exit();
00044         return 0;
00045 }

Generated on Sat Jul 5 09:04:51 2003 for LibFB by doxygen1.2.18