- * Request that a resource be saved to the native filesystem.
- * This is an asynchronous request.
- */
- virtual void SaveResource(const ResourceRequest& request) = 0;
- /**
- * Cancel an ongoing LoadResource() request.
- * Multi-threading note: this method will be called from the main thread only i.e. not
- * from within the Core::Render() method.
- * @param[in] id The ID of the resource to cancel.
- * @param[in] typeId The ID type of the resource to cancel.
- */
- virtual void CancelLoad(ResourceId id, ResourceTypeId typeId) = 0;
-
- /**
- * Query whether any asynchronous LoadResource() requests are ongoing.
- * Multi-threading note: this method may be called from either the main or rendering thread.
- * @return True if resources are being loaded.
- */
- virtual bool IsLoading() = 0;
-
- /**
- * Retrieve newly loaded resources.
- * If no resources have finished loading, then this method returns immediately.
- * Multi-threading note: this method will be called from the update thread, from within
- * the UpdateManager::Update() method.
- * @param[in] cache The resource cache to fill.
- */
- virtual void GetResources(ResourceCache& cache) = 0;
-
- /**
- * Waits for the asynchronous loader threads (if any) to finish.
- * This will be only be called before Core destruction; no resource loading requests will be
- * made following this method.
- */
- virtual void JoinLoaderThreads() = 0;
-
- // Font Queries
-
- /**
- * Called by Dali to retrieve the default font family for the platform.
- * Multi-threading note: this method will be called from the main thread only i.e. not
- * from within the Core::Render() method.
- * @return The default font family.
- */
- virtual std::string GetDefaultFontFamily() const = 0;
-
- /**
- * Called by Dali to retrieve the default font size for the platform in points.
- * Multi-threading note: this method will be called from the main thread only i.e. not
- * from within the Core::Render() method.
- * @return The default font size.
- */
- virtual const float GetDefaultFontSize() const = 0;
-
- /**
- * Gets a font line height to match a given caps-height
- * @param[in] fontFamily The name of the font's family
- * @param[in] fontStyle The style of the font
- * @param[in] capsHeight The caps-height in pixels
- */
- virtual const PixelSize GetFontLineHeightFromCapsHeight(const std::string fontFamily, const std::string& fontStyle, const CapsHeight& capsHeight) const = 0;
-
- /**
- * Called by Font objects to synchronously query glyph data.
- * @note Font's style goes inside the textRequest parameter
- * @param[in] textRequest Resource request. Includes font's style.
- * @param[in] fontFamily The name of the font's family
- * @param[in] getBitmap Whether to load bitmaps for the symbols as well
- * @return A GlyphSet pointer with a list of the requested glyph metrics.
- */
- virtual Integration::GlyphSet* GetGlyphData ( const Integration::TextResourceType& textRequest,
- const std::string& fontFamily,
- bool getBitmap) const = 0;
-
- /**
- * Called by GlyphResourceManager to synchronously load glyph data.
- * @param[in] textRequest resource request
- * @param[in] fontFamily name of the font's family
- * @return A GlyphSet pointer containing the requested glyph bitmaps.
- */
- virtual Integration::GlyphSet* GetCachedGlyphData( const TextResourceType& textRequest,
- const std::string& fontFamily ) const = 0;
-
- /**
- * Called by Font objects to synchronously query global font metrics.
- * @param[in] fontFamily The name of the font's family
- * @param[in] fontStyle The style of the font
- * @param[out] globalMetrics font requested global metrics.
- */
- virtual void GetGlobalMetrics( const std::string& fontFamily,
- const std::string& fontStyle,
- Integration::GlobalMetrics& globalMetrics ) const = 0;
-
- /**
- * Sets horizontal and vertical pixels per inch value that is used by the display
- * @param[in] dpiHorizontal horizontal dpi value
- * @param[in] dpiVertical vertical dpi value
- */
- virtual void SetDpi (unsigned int dpiHorizontal, unsigned int dpiVertical) = 0;
-
- /**
- * Returns the name of the font's family for displayed text.
- * If possible, the returned font name should be able to display all characters in text.
- * Otherwise returns closest match.
- * @param[in] charsRequested displayed text
- */
- virtual std::string GetFontFamilyForChars(const TextArray& charsRequested) const = 0;
-
- /**
- * Checks whether all characters of text could be displayed with specified font family.
- * @param[in] fontFamily The name of the font's family
- * @param[in] fontStyle The style of the font
- * @param[in] text displayed text
- */
- virtual bool AllGlyphsSupported(const std::string& fontFamily, const std::string& fontStyle, const TextArray& text) const = 0;
-
- /**
- * Checks whether fontName is a valid font family name.
- * closestMatch is always set to the best matching font or the system default font if no near match is detected.
- * @param[in] fontFamily The name of the font's family
- * @param[in] fontStyle The style of the font
- * @param[out] isDefaultSystemFont Whether this font has been created with a default system font.
- * @param[out] closestFontFamilyMatch Name of the font's family found based on the user input family's name
- * @param[out] closestFontStyleMatch Name of the font's style found based on the user input font's style
- * @return true if fontName is valid, false otherwise
- */
- virtual bool ValidateFontFamilyName(const std::string& fontFamily, const std::string& fontStyle, bool& isDefaultSystemFont, std::string& closestFontFamilyMatch, std::string& closestFontStyleMatch) const = 0;
-
- /**
- * The mode for GetFontList()
- */
- enum FontListMode
- {
- LIST_SYSTEM_FONTS,
- LIST_APPLICATION_FONTS,
- LIST_ALL_FONTS
- };
-
- /**
- * Gets a list of fonts installed on the system.
- * @param fontListMode which fonts to include in the list
- * @return a list of font family names