- _b_visible = fVisible;
- if( isInPlaceActive() )
- ShowWindow(_inplacewnd, fVisible ? SW_SHOWNORMAL : SW_HIDE);
- firePropChangedEvent(DISPID_Visible);
+ if( fVisible != _b_visible )
+ {
+ _b_visible = fVisible;
+ if( isInPlaceActive() )
+ {
+ ShowWindow(_inplacewnd, fVisible ? SW_SHOW : SW_HIDE);
+ if( fVisible )
+ InvalidateRect(_inplacewnd, NULL, TRUE);
+ }
+ setDirty(TRUE);
+ firePropChangedEvent(DISPID_Visible);
+ }
+};
+
+void VLCPlugin::setVolume(int volume)
+{
+ if( volume < 0 )
+ volume = 0;
+ else if( volume > 200 )
+ volume = 200;
+
+ if( volume != _i_volume )
+ {
+ _i_volume = volume;
+ if( isRunning() )
+ {
+ libvlc_audio_set_volume(_p_libvlc, _i_volume, NULL);
+ }
+ setDirty(TRUE);
+ }
+};
+
+void VLCPlugin::setTime(int seconds)
+{
+ if( seconds < 0 )
+ seconds = 0;
+
+ if( seconds != _i_time )
+ {
+ setStartTime(_i_time);
+ if( isRunning() )
+ {
+ libvlc_input_t *p_input = libvlc_playlist_get_input(_p_libvlc, NULL);
+ if( NULL != p_input )
+ {
+ libvlc_input_set_time(p_input, _i_time, NULL);
+ libvlc_input_free(p_input);
+ }
+ }
+ }