root/include/viewport.h

/* [<][>][^][v][top][bottom][index][help] */

INCLUDED FROM


   1 #ifndef VIEWPORT_H
   2 #define VIEWPORT_H
   3 
   4 // CHDK Viewport & screen buffer interface
   5 
   6 // Note: used in modules and platform independent code. 
   7 // Do not add platform dependent stuff in here (#ifdef/#endif compile options or camera dependent values)
   8 
   9 /******************************************************************/
  10 
  11 extern void *vid_get_bitmap_fb();
  12 
  13 extern void *vid_get_viewport_fb();
  14 extern void *vid_get_viewport_fb_d();
  15 extern void *vid_get_viewport_live_fb();
  16 
  17 extern void vid_bitmap_refresh();
  18 extern void vid_turn_off_updates();
  19 extern void vid_turn_on_updates();
  20 
  21 // These define the viewport dimensions both physically and in terms of the CHDK co-ordinate system
  22 // CHDK works in a 360x240 screen dimension / co-ordinate system
  23 extern long vid_get_viewport_height();          // Viewport height in CHDK screen pixels 
  24 extern int vid_get_viewport_width();            // Viewport width in CHDK screen pixels
  25 extern int vid_get_viewport_xoffset();          // X offset of viewport edge relative to the viewport buffer (in CHDK screen pixels)
  26 extern int vid_get_viewport_yoffset();          // Y offset of viewport top relative to the viewport buffer (in CHDK screen pixels)
  27 extern int vid_get_viewport_display_xoffset();  // X offset of viewport edge relative to LCD screen (in CHDK screen pixels)
  28 extern int vid_get_viewport_display_yoffset();  // Y offset of viewport top relative to LCD screen (in CHDK screen pixels)
  29 extern int vid_get_viewport_byte_width();       // Physical width of viewport row in bytes
  30 extern int vid_get_viewport_yscale();           // Y multiplier for cameras with 480 pixel high viewports (CHDK code assumes 240)
  31 extern int vid_get_viewport_image_offset();     // Byte offset from start of viewport memory to first displayed pixel
  32 extern int vid_get_viewport_row_offset();       // Difference between physical width of viewport and displayed width (in bytes)
  33 
  34 
  35 // PTP Live View functions
  36 // These functions return actual size/offset in pixels of the viewport and bitmap buffers
  37 extern int vid_get_viewport_display_xoffset_proper();   // X Offset (for variable image size)
  38 extern int vid_get_viewport_display_yoffset_proper();   // Y Offset (for variable image size)
  39 extern int vid_get_viewport_width_proper();             // Visible viewport width (for variable image size)
  40 extern int vid_get_viewport_height_proper();            // Visible viewport height (for variable image size)
  41 extern int vid_get_viewport_fullscreen_width();            // Width of screen in buffer pixels
  42 extern int vid_get_viewport_fullscreen_height();           // Height of screen in buffer pixels
  43 extern int vid_get_viewport_buffer_width_proper();      // Physical viewport buffer width in pixels
  44 extern int vid_get_palette_type();                      // Palette type (0 - 3)
  45 extern int vid_get_palette_size();                      // Palette size (in bytes)
  46 extern int vid_get_aspect_ratio();                      // LCD aspect ratio (0 = 4:3 or 1 = 16:9, 2 = 3:2)
  47 extern int vid_get_viewport_type();                     // Viewport format (uses live_view.h defines)
  48 
  49 extern void *vid_get_viewport_active_buffer();          // Return active live viewport memory address
  50 extern void *vid_get_bitmap_active_buffer();            // Return current active bitmap memory address
  51 extern void *vid_get_bitmap_active_palette();           // Return current palette memory address
  52 extern void *vid_get_opacity_active_buffer();           // Return current active bitmap opacity memory address
  53 
  54 /******************************************************************/
  55 
  56 #endif

/* [<][>][^][v][top][bottom][index][help] */