00001 #ifndef PICTURE_H 00002 #define PICTURE_H 00003 00004 00005 // Container for picture controls like brightness. 00006 00007 #include "arraylist.h" 00008 #include "bcwindowbase.inc" 00009 #include "bchash.inc" 00010 #include "mwindow.inc" 00011 00012 class PictureItem 00013 { 00014 public: 00015 PictureItem(); 00016 ~PictureItem(); 00017 00018 void copy_from(PictureItem *src); 00019 char* get_default_string(char *string); 00020 char name[BCTEXTLEN]; 00021 int device_id; 00022 int min; 00023 int max; 00024 int default_; 00025 int step; 00026 int type; 00027 int value; 00028 }; 00029 00030 00031 class PictureConfig 00032 { 00033 public: 00034 PictureConfig(BC_Hash *defaults); 00035 ~PictureConfig(); 00036 void copy_settings(PictureConfig *picture); 00037 void copy_usage(PictureConfig *picture); 00038 void load_defaults(); 00039 void save_defaults(); 00040 void set_item(int device_id, int value); 00041 void dump(); 00042 00043 int brightness; 00044 int hue; 00045 int color; 00046 int contrast; 00047 int whiteness; 00048 00049 // Flags for picture settings the device uses 00050 int use_brightness; 00051 int use_contrast; 00052 int use_color; 00053 int use_hue; 00054 int use_whiteness; 00055 00056 // For the latest APIs the controls are defined by the driver 00057 // Search for existing driver with name. If none exists, create it. 00058 PictureItem* new_item(const char *name); 00059 PictureItem* get_item(const char *name, int id); 00060 ArrayList<PictureItem*> controls; 00061 // Pointer to MWindow::defaults get defaults 00062 BC_Hash *defaults; 00063 }; 00064 00065 00066 #endif
1.5.5