![]() |
Ultralight C++ API 1.4.0
|
#include <Ultralight/ImageSource.h>
Maps image sources to string identifiers.
This is used to lookup ImageSource instances when they are requested by a web-page.
Static Public Member Functions | |
| static ImageSourceProvider & | instance () |
| Get the ImageSourceProvider singleton. | |
Public Member Functions | |
| virtual RefPtr< ImageSource > | GetImageSource (const String &id)=0 |
| Get an ImageSource by its identifier. | |
| virtual void | AddImageSource (const String &id, RefPtr< ImageSource > image_source)=0 |
| Add an ImageSource to the provider. | |
| virtual void | RemoveImageSource (const String &id)=0 |
| Remove an ImageSource from the provider. | |
| virtual void | AddListener (ImageSourceProviderListener *listener)=0 |
| Add a listener to the provider. | |
| virtual void | RemoveListener (ImageSourceProviderListener *listener)=0 |
| Remove a listener from the provider. | |
Protected Member Functions | |
| virtual | ~ImageSourceProvider ()=default |
|
protectedvirtualdefault |
|
pure virtual |
Add an ImageSource to the provider.
| id | The identifier of the image source. |
| image_source | The ImageSource instance. |
|
pure virtual |
Add a listener to the provider.
| listener | The listener to add. |
|
pure virtual |
Get an ImageSource by its identifier.
| id | The identifier of the image source. |
|
static |
Get the ImageSourceProvider singleton.
|
pure virtual |
Remove an ImageSource from the provider.
| id | The identifier of the image source. |
|
pure virtual |
Remove a listener from the provider.
| listener | The listener to remove. |