Commit cc39dc8f authored by Felix Paul Kühne's avatar Felix Paul Kühne

windowed Mac plugin: implement control functions for the toolbar

parent e8cc5398
......@@ -44,9 +44,9 @@ public:
bool resize_windows();
bool destroy_windows();
void set_toolbar_visible(bool) { /* STUB */ }
bool get_toolbar_visible() { return false; }
void update_controls() {/* STUB */}
void set_toolbar_visible(bool);
bool get_toolbar_visible();
void update_controls();
void popup_menu() {/* STUB */}
......
......@@ -95,6 +95,21 @@ int VlcPluginMac::get_fullscreen()
return r;
}
void VlcPluginMac::set_toolbar_visible(bool b_value)
{
controllerLayer.opaque = (float)b_value;
}
bool VlcPluginMac::get_toolbar_visible()
{
return (bool)controllerLayer.opaque;
}
void VlcPluginMac::update_controls()
{
[controllerLayer setNeedsDisplay];
}
bool VlcPluginMac::create_windows()
{
return true;
......@@ -346,8 +361,8 @@ static CGImageRef createImageNamed(NSString *name)
CGRect sliderRect = [self _sliderRect];
CGFloat fraction = 0.0;
/* if (_movie)
fraction = [self _currentTime] / [self _duration];*/
/* if (_movie)
fraction = [self _currentTime] / [self _duration];*/
CGFloat x = fraction * (CGRectGetWidth(sliderRect) - CGImageGetWidth(_knob));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment