OSYSTEM: Introduce a method allowing to draw a background activity icon

This commit is contained in:
Bastien Bouclet 2016-09-13 20:25:13 +02:00
parent cd803d7ca7
commit 521ba2cb8a
4 changed files with 25 additions and 0 deletions

View File

@ -87,6 +87,7 @@ public:
virtual void copyRectToOSD(const void *buf, int pitch, int x, int y, int w, int h) {}
virtual void clearOSD() {}
virtual Graphics::PixelFormat getOSDFormat() { return Graphics::PixelFormat(); }
virtual void displayActivityIconOnOSD(const Graphics::Surface *icon) {}
// Graphics::PaletteManager interface

View File

@ -253,6 +253,10 @@ Graphics::PixelFormat ModularBackend::getOSDFormat() {
return _graphicsManager->getOSDFormat();
}
void ModularBackend::displayActivityIconOnOSD(const Graphics::Surface *icon) {
_graphicsManager->displayActivityIconOnOSD(icon);
}
void ModularBackend::quit() {
exit(0);
}

View File

@ -130,6 +130,7 @@ public:
virtual void copyRectToOSD(const void *buf, int pitch, int x, int y, int w, int h);
virtual void clearOSD();
virtual Graphics::PixelFormat getOSDFormat();
virtual void displayActivityIconOnOSD(const Graphics::Surface *icon);
//@}

View File

@ -1101,6 +1101,25 @@ public:
*/
virtual void displayMessageOnOSD(const char *msg) = 0;
/**
* Display an icon indicating background activity
*
* The icon is displayed in an 'on screen display'. It is visible above
* the regular screen content or near it.
*
* The caller keeps ownership of the icon. It is acceptable to free
* the surface just after the call.
*
* There is no preferred pixel format for the icon. The backend should
* convert its copy of the icon to an appropriate format.
*
* The caller must call this method again with a null pointer
* as a parameter to indicate the icon should no longer be displayed.
*
* @param icon the icon to display on screen
*/
virtual void displayActivityIconOnOSD(const Graphics::Surface *icon) = 0;
/**
* Blit a bitmap to the 'on screen display'.
*