Mercurial > audlegacy-plugins
comparison src/aosd/aosd_osd.c @ 592:546e779aba64 trunk
[svn] - aosd: immediately hide osd window by single clicking (with mouse button 1) on it
author | giacomo |
---|---|
date | Wed, 31 Jan 2007 12:12:23 -0800 |
parents | 8be45c22b20a |
children | 443de962d0a0 |
comparison
equal
deleted
inserted
replaced
591:8be45c22b20a | 592:546e779aba64 |
---|---|
80 cairo_destroy( rendered_cr ); | 80 cairo_destroy( rendered_cr ); |
81 } | 81 } |
82 | 82 |
83 cairo_set_source_surface( cr , fade_data->surface , 0 , 0 ); | 83 cairo_set_source_surface( cr , fade_data->surface , 0 , 0 ); |
84 cairo_paint_with_alpha( cr , fade_data->alpha ); | 84 cairo_paint_with_alpha( cr , fade_data->alpha ); |
85 } | |
86 | |
87 | |
88 static void | |
89 aosd_button_func ( Ghosd * osd , GhosdEventButton * ev , void * user_data ) | |
90 { | |
91 if ( ev->button == 1 ) | |
92 { | |
93 pthread_mutex_lock( &aosd_status_mutex ); | |
94 aosd_status = AOSD_STATUS_INTERRUPT; | |
95 pthread_mutex_unlock( &aosd_status_mutex ); | |
96 } | |
97 return; | |
85 } | 98 } |
86 | 99 |
87 | 100 |
88 static void * | 101 static void * |
89 aosd_thread_func ( void * arg ) | 102 aosd_thread_func ( void * arg ) |
202 | 215 |
203 ghosd_set_position( osd , pos_x , pos_y , | 216 ghosd_set_position( osd , pos_x , pos_y , |
204 layout_width + pad_left + pad_right , | 217 layout_width + pad_left + pad_right , |
205 layout_height + pad_top + pad_bottom ); | 218 layout_height + pad_top + pad_bottom ); |
206 | 219 |
220 ghosd_set_event_button_cb( osd , aosd_button_func , &stop_now ); | |
221 | |
207 /* the aosd_status must be checked during the fade and display process | 222 /* the aosd_status must be checked during the fade and display process |
208 (if another message arrives, the current transition must be abandoned ) */ | 223 (if another message arrives, the current transition must be abandoned ) */ |
209 | 224 |
210 style_data.layout = osd_layout; | 225 style_data.layout = osd_layout; |
211 style_data.text = &(cfg_osd->text); | 226 style_data.text = &(cfg_osd->text); |