r885: Don't delete a borrowed frame.
[cinelerra_cv/ct.git] / cinelerra / picture.h
blob0f714eb7880dd72de04f88a8ec2af8af0193078f
1 #ifndef PICTURE_H
2 #define PICTURE_H
5 // Container for picture controls like brightness.
7 #include "arraylist.h"
8 #include "bcwindowbase.inc"
9 #include "bchash.inc"
10 #include "mwindow.inc"
12 class PictureItem
14 public:
15 PictureItem();
16 ~PictureItem();
18 void copy_from(PictureItem *src);
19 char* get_default_string(char *string);
20 char name[BCTEXTLEN];
21 int device_id;
22 int min;
23 int max;
24 int default_;
25 int step;
26 int type;
27 int value;
31 class PictureConfig
33 public:
34 PictureConfig(BC_Hash *defaults);
35 ~PictureConfig();
36 void copy_settings(PictureConfig *picture);
37 void copy_usage(PictureConfig *picture);
38 void load_defaults();
39 void save_defaults();
40 void set_item(int device_id, int value);
41 void dump();
43 int brightness;
44 int hue;
45 int color;
46 int contrast;
47 int whiteness;
49 // Flags for picture settings the device uses
50 int use_brightness;
51 int use_contrast;
52 int use_color;
53 int use_hue;
54 int use_whiteness;
56 // For the latest APIs the controls are defined by the driver
57 // Search for existing driver with name. If none exists, create it.
58 PictureItem* new_item(const char *name);
59 PictureItem* get_item(const char *name, int id);
60 ArrayList<PictureItem*> controls;
61 // Pointer to MWindow::defaults get defaults
62 BC_Hash *defaults;
66 #endif