~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~ [ freetext search ] ~ [ file search ] ~

Linux Cross Reference
Tina4/src/PCwin/size.cpp

Version: ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /**@(#)
  2 **/
  3 
  4 #include <dibapi.h>
  5 
  6 #ifdef __cplusplus
  7 extern "C" {
  8 #endif
  9 #include <tina/sys.h>
 10 #include <tina/math.h>
 11 #include <tina/tv.h>
 12 #include <tina/tv_screen.h>
 13 #include <tina/sysfuncs.h>
 14 #ifdef __cplusplus
 15 }
 16 #endif
 17 
 18 extern void (*screen_text) (char *);
 19 #define Print(x)  if(screen_text!=NULL) screen_text(x)
 20 
 21 
 22 
 23 /* Get the height of a tv_screen (X window) */
 24 extern "C" int tv_screen_check_height(Tv_screen * tv_screen)
 25 {
 26     int height = 0;
 27     Print("tv_screen_check_height?");
 28 
 29     return (height);
 30 }
 31 
 32 
 33 /* Get the width of a tv_screen (X window) */
 34 extern "C" int tv_screen_check_width(Tv_screen * tv_screen)
 35 {
 36     int width = 0;
 37 
 38     Print("tv_screen_check_width?");
 39     if (tv_screen)
 40     {
 41     }
 42 
 43     return width;
 44 }
 45 
 46 
 47 /** size Tv_screen thinks it is **/
 48 
 49 extern "C" int tv_screen_get_width(Tv_screen * tv_screen)
 50 {
 51     return (tv_screen->width);
 52 }
 53 
 54 extern "C" void tv_screen_set_width(Tv_screen * tv_screen, int width)
 55 {
 56     tv_screen->width = width;
 57 }
 58 
 59 extern "C" int tv_screen_get_height(Tv_screen * tv_screen)
 60 {
 61     return (tv_screen->height);
 62 }
 63 
 64 extern "C" void tv_screen_set_height(Tv_screen * tv_screen, int height)
 65 {
 66     tv_screen->height = height;
 67 }
 68 
 69 extern "C" int tv_screen_get_depth(Tv_screen * tv_screen)
 70 {
 71     return (tv_screen->depth);
 72 }
 73 
 74 extern "C" int tv_screen_check_depth(Tv_screen * tv_screen)
 75 {
 76     int depth = 0;
 77     Print("tv_screen_check_depth?");
 78     return ((int) depth);
 79 }
 80 
 81 /**  make sizes agree **/
 82 
 83 extern "C" void tv_screen_save_size(Tv_screen * tv_screen)
 84 {
 85     if (tv_screen == NULL)
 86         return;
 87 
 88     tv_screen->width = tv_screen_check_width(tv_screen);
 89     tv_screen->height = tv_screen_check_height(tv_screen);
 90     tv_screen->depth = tv_screen_check_depth(tv_screen);
 91 }
 92 
 93 /** debugging aid **/
 94 
 95 extern "C" void size_format(Tv_screen * tv_screen)
 96 {
 97     int     width, height, depth;
 98 
 99     width = tv_screen->width;
100     height = tv_screen->height;
101     depth = tv_screen->depth;
102     format("tv_screen get size   :  %d x %d x %d\n", width, height, depth);
103 
104     width = tv_screen_check_width(tv_screen);
105     height = tv_screen_check_height(tv_screen);
106     depth = tv_screen_check_depth(tv_screen);
107     format("tv_screen check size :  %d x %d x %d\n", width, height, depth);
108 }
109 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~ [ freetext search ] ~ [ file search ] ~

This page was automatically generated by the LXR engine.
Visit the LXR main site for more information.