comparison src/image-overlay.c @ 822:df541dc41707

Allow to set image overlay info position through options: - image_overlay.common.x - image_overlay.common.y For now, there are only editable through rc file.
author zas_
date Thu, 12 Jun 2008 20:33:51 +0000
parents fb249b8e63e4
children efed9a1520d6
comparison
equal deleted inserted replaced
821:fb249b8e63e4 822:df541dc41707
40 Histogram *histogram; 40 Histogram *histogram;
41 41
42 OsdShowFlags show; 42 OsdShowFlags show;
43 43
44 gint ovl_info; 44 gint ovl_info;
45
46 gint x;
47 gint y;
45 48
46 gint icon_time[IMAGE_OSD_COUNT]; 49 gint icon_time[IMAGE_OSD_COUNT];
47 gint icon_id[IMAGE_OSD_COUNT]; 50 gint icon_id[IMAGE_OSD_COUNT];
48 51
49 gint idle_id; 52 gint idle_id;
70 { FALSE, -70, -10, NULL }, /* osd enabled */ 73 { FALSE, -70, -10, NULL }, /* osd enabled */
71 { FALSE, 0, 0, NULL } 74 { FALSE, 0, 0, NULL }
72 }; 75 };
73 76
74 #define OSD_DATA "overlay-data" 77 #define OSD_DATA "overlay-data"
75
76 #define OSD_INFO_X 10
77 #define OSD_INFO_Y -10
78 78
79 #define IMAGE_OSD_DEFAULT_DURATION 30 79 #define IMAGE_OSD_DEFAULT_DURATION 30
80 80
81 #define HISTOGRAM_HEIGHT 140 81 #define HISTOGRAM_HEIGHT 140
82 #define HISTOGRAM_WIDTH 256 82 #define HISTOGRAM_WIDTH 256
759 if (pixbuf) 759 if (pixbuf)
760 { 760 {
761 if (osd->ovl_info == 0) 761 if (osd->ovl_info == 0)
762 { 762 {
763 osd->ovl_info = image_overlay_add(osd->imd, pixbuf, 763 osd->ovl_info = image_overlay_add(osd->imd, pixbuf,
764 OSD_INFO_X, OSD_INFO_Y, TRUE, FALSE); 764 osd->x, osd->y, TRUE, FALSE);
765 } 765 }
766 else 766 else
767 { 767 {
768 image_overlay_set(osd->imd, osd->ovl_info, pixbuf, OSD_INFO_X, OSD_INFO_Y); 768 image_overlay_set(osd->imd, osd->ovl_info, pixbuf, osd->x, osd->y);
769 } 769 }
770 g_object_unref(pixbuf); 770 g_object_unref(pixbuf);
771 } 771 }
772 else if (osd->ovl_info) 772 else if (osd->ovl_info)
773 { 773 {
968 osd->imd = imd; 968 osd->imd = imd;
969 osd->idle_id = -1; 969 osd->idle_id = -1;
970 osd->timer_id = -1; 970 osd->timer_id = -1;
971 osd->show = OSD_SHOW_NOTHING; 971 osd->show = OSD_SHOW_NOTHING;
972 osd->histogram = NULL; 972 osd->histogram = NULL;
973 973 osd->x = options->image_overlay.common.x;
974 osd->y = options->image_overlay.common.y;
975
974 osd->destroy_id = g_signal_connect(G_OBJECT(imd->pr), "destroy", 976 osd->destroy_id = g_signal_connect(G_OBJECT(imd->pr), "destroy",
975 G_CALLBACK(image_osd_destroy_cb), osd); 977 G_CALLBACK(image_osd_destroy_cb), osd);
976 image_set_osd_data(imd, osd); 978 image_set_osd_data(imd, osd);
977 979
978 image_set_state_func(osd->imd, image_osd_state_cb, osd); 980 image_set_state_func(osd->imd, image_osd_state_cb, osd);