*
* @since 2.0
*
* @final This class is not intended for extension.
*
* The %AppResource class provides convenient methods to load application resources at run time: @n
*
* @since 2.0
*
* @final This class is not intended for extension.
*
* The %AppResource class provides convenient methods to load application resources at run time: @n
-* - Use AppResource::GetString() to get handle and display localized strings.
-* - Use AppResource::GetBitmapN() to obtain a bitmap image that matches the screen density.
-* - If the matching image does not exist, the image of the baseline density folder, ScreenDensity-High is used.
+* - Use the AppResource::GetString() method to get a handle and display localized strings.
+* - Use the AppResource::GetBitmapN() method to obtain a bitmap image that matches the screen density.
+* - If a matching image does not exist, the image of the baseline density folder, ScreenDensity-High is used.
+*
+* The instance of this class can be obtained through the App::GetAppResource() method.
* @return An error code
* @param[in] resourceId The resource ID of type Tizen::Base::String that describes the resource
* @param[out] loadedString The string obtained from the loaded application resource
* @return An error code
* @param[in] resourceId The resource ID of type Tizen::Base::String that describes the resource
* @param[out] loadedString The string obtained from the loaded application resource
- * @exception E_SUCCESS The method is successful.
- * @exception E_FAILURE The argument passed is not found.
- * @exception E_INVALID_ARG The argument passed to a method contains an invalid resource ID.
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_FAILURE The argument passed has not been found.
+ * @exception E_INVALID_ARG The argument passed to the method contains an invalid resource ID.
*/
result GetString(const Tizen::Base::String& resourceId, Tizen::Base::String& loadedString) const;
/**
* Gets the bitmap at the specified path. @n
* The %GetBitmapN() method interprets the given resource path and reads the best matching image file for the current device resolution. @n
*/
result GetString(const Tizen::Base::String& resourceId, Tizen::Base::String& loadedString) const;
/**
* Gets the bitmap at the specified path. @n
* The %GetBitmapN() method interprets the given resource path and reads the best matching image file for the current device resolution. @n
- * To load the bitmap image from a file, give the name of the file as the input parameter and not the file path (For example: "img.png").
- * Then, the system will first look for the image file in the folder specific to the current device resolution, such as
+ * To load the bitmap image from a file, give the name of the file as the input parameter and not the file path (For example, "img.png").
+ * The system will first look for the image file in the folder specific to the current device resolution, such as
* '720x1280' and if the file does not exist, it will then search the folder that corresponds to the current screen density,
* such as 'screen-density-xhigh'. After searching the density folder, all the other density folders are searched in the order high to low.
* If the requested image file is found in a density-specific folder that is different from the current screen density, the bitmap returned from this method is pre-scaled.
* '720x1280' and if the file does not exist, it will then search the folder that corresponds to the current screen density,
* such as 'screen-density-xhigh'. After searching the density folder, all the other density folders are searched in the order high to low.
* If the requested image file is found in a density-specific folder that is different from the current screen density, the bitmap returned from this method is pre-scaled.
- * But in case of requested image file is saved as ".#.png" (For example : "img.#.png"), then a bitmap instance which is value of returned pointer is not pre-scaled.
- * So, it is recommended to use ".#.png" as extension (For example : "ninePatchImg.#.png") for nine-patch image file.
+ * But in case the requested image file is saved as ".#.png" (For example, "img.#.png"), then the bitmap instance of the returned pointer is not pre-scaled.
+ * So, it is recommended to use ".#.png" as the extension (For example, "ninePatchImg.#.png") for a nine-patch image file.
* Currently supported image formats are: JPEG, GIF, PNG, BMP, TIFF, and WBMP.
* For more information on the features, see <a href="../org.tizen.native.appprogramming/html/multiple_screen/autoscale_resource_fallback.htm">Resource Fallback and Prescaling.</a>
*
* @since 2.0
*
* Currently supported image formats are: JPEG, GIF, PNG, BMP, TIFF, and WBMP.
* For more information on the features, see <a href="../org.tizen.native.appprogramming/html/multiple_screen/autoscale_resource_fallback.htm">Resource Fallback and Prescaling.</a>
*
* @since 2.0
*
* @param[in] pixelFormat The pixel format of the resulting bitmap
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG A specified input parameter is invalid.
* @param[in] pixelFormat The pixel format of the resulting bitmap
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG A specified input parameter is invalid.
* @exception E_FILE_NOT_FOUND The specified file cannot be found.
* @exception E_SYSTEM A system error has occurred.
* @exception E_FILE_NOT_FOUND The specified file cannot be found.
* @exception E_SYSTEM A system error has occurred.
- * @remarks The specific error code can be accessed using the GetLastResult() method.
- * @remarks There is a high probability for an occurrence of an out-of-memory exception. If possible, check whether the exception is E_OUT_OF_MEMORY or not. For more information on how to handle the out-of-memory exception, refer <a href="../org.tizen.native.appprogramming/html/basics_tizen_programming/exception_check.htm">here</a>.
+ * @remarks
+ * - The specific error code can be accessed using the GetLastResult() method.
+ * - There is a high probability for an occurrence of an out-of-memory exception. If possible, check whether the exception is @c E_OUT_OF_MEMORY or not.
+ * For more information on how to handle the out-of-memory exception, refer
+ * <a href="../org.tizen.native.appprogramming/html/basics_tizen_programming/exception_check.htm">here</a>.
*/
Tizen::Graphics::Bitmap* GetBitmapN(const Tizen::Base::String& imagePath, Tizen::Graphics::BitmapPixelFormat pixelFormat) const;
/**
* Gets the bitmap at the specified path. @n
* The %GetBitmapN() method interprets the given resource path and reads the best matching image file for the current device resolution. @n
*/
Tizen::Graphics::Bitmap* GetBitmapN(const Tizen::Base::String& imagePath, Tizen::Graphics::BitmapPixelFormat pixelFormat) const;
/**
* Gets the bitmap at the specified path. @n
* The %GetBitmapN() method interprets the given resource path and reads the best matching image file for the current device resolution. @n
- * To load the bitmap image from a file, give the name of the file as the input parameter and not the file path (For example: "img.png").
- * Then, the system will first look for the image file in the folder specific to the current device resolution, such as
+ * To load the bitmap image from a file, give the name of the file as the input parameter and not the file path (For example, "img.png").
+ * The system will first look for the image file in the folder specific to the current device resolution, such as
* '720x1280' and if the file does not exist, it will then search the folder that corresponds to the current screen density,
* such as 'screen-density-xhigh'. After searching the density folder, all the other density folders are searched in the order high to low.
* If the requested image file is found in a density-specific folder that is different from the current screen density, the bitmap returned from this method is pre-scaled.
* '720x1280' and if the file does not exist, it will then search the folder that corresponds to the current screen density,
* such as 'screen-density-xhigh'. After searching the density folder, all the other density folders are searched in the order high to low.
* If the requested image file is found in a density-specific folder that is different from the current screen density, the bitmap returned from this method is pre-scaled.
- * But in case of requested image file is saved as ".#.png" (For example : "img.#.png"), then a bitmap instance which is value of returned pointer is not pre-scaled.
- * So, it is recommended to use ".#.png" as extension (For example : "ninePatchImg.#.png") for nine-patch image file.
+ * But in case the requested image file is saved as ".#.png" (For example, "img.#.png"), then the bitmap instance of the returned pointer is not pre-scaled.
+ * So, it is recommended to use ".#.png" as the extension (For example, "ninePatchImg.#.png") for a nine-patch image file.
* Currently supported image formats are: JPEG, GIF, PNG, BMP, TIFF, and WBMP.
* For more information on the features, see <a href="../org.tizen.native.appprogramming/html/multiple_screen/autoscale_resource_fallback.htm">Resource Fallback and Prescaling.</a>
*
* @since 2.0
*
* Currently supported image formats are: JPEG, GIF, PNG, BMP, TIFF, and WBMP.
* For more information on the features, see <a href="../org.tizen.native.appprogramming/html/multiple_screen/autoscale_resource_fallback.htm">Resource Fallback and Prescaling.</a>
*
* @since 2.0
*
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG The specified input parameter is invalid.
* @exception E_UNSUPPORTED_FORMAT The image file format is not supported.
* @exception E_FILE_NOT_FOUND The specified file cannot be found.
* @exception E_SYSTEM A system error has occurred.
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG The specified input parameter is invalid.
* @exception E_UNSUPPORTED_FORMAT The image file format is not supported.
* @exception E_FILE_NOT_FOUND The specified file cannot be found.
* @exception E_SYSTEM A system error has occurred.
- * @remarks The specific error code can be accessed using the GetLastResult() method.
- * @remarks There is a high probability for an occurrence of an out-of-memory exception. If possible, check whether the exception is E_OUT_OF_MEMORY or not. For more information on how to handle the out-of-memory exception, refer <a href="../org.tizen.native.appprogramming/html/basics_tizen_programming/exception_check.htm">here</a>.
+ * @remarks
+ * - The specific error code can be accessed using the GetLastResult() method.
+ * - There is a high probability for an occurrence of an out-of-memory exception. If possible, check whether the exception is @c E_OUT_OF_MEMORY or not.
+ * For more information on how to handle the out-of-memory exception, refer
+ * <a href="../org.tizen.native.appprogramming/html/basics_tizen_programming/exception_check.htm">here</a>.
- * @return A pointer to the %AppResource instance, @n
- * else @c null if it fails
+ * @return A pointer to the %AppResource instance, @n
+ * else @c null if it fails
* @return A pointer to the %AppResource instance, @n
* else @c null if it fails
* @param[in] resourcePath The relative path starting from the resource directory path of the current application
* @exception E_SUCCESS The method is successful.
* @return A pointer to the %AppResource instance, @n
* else @c null if it fails
* @param[in] resourcePath The relative path starting from the resource directory path of the current application
* @exception E_SUCCESS The method is successful.
- * @exception E_FILE_NOT_FOUND The specified resource path does not exist.
- * @exception E_INVALID_ARG The length of the specified path is @c 0 or exceeds system limitations.
- * @exception E_SYSTEM Initializing string and bitmap resource is failed due to system error.
+ * @exception E_FILE_NOT_FOUND The specified @c resourcePath does not exist.
+ * @exception E_INVALID_ARG Either of the following conditions has occured:
+ * - The length of the specified path is @c 0.
+ * - The length of the specified path exceeds system limitations.
+ * @exception E_SYSTEM Initializing the string and the bitmap resource has failed due to a system error.
* @remarks The specific error code can be accessed using the GetLastResult() method.
*/
static AppResource* LoadAppResource(const Tizen::Base::String& resourcePath);
/**
* @remarks The specific error code can be accessed using the GetLastResult() method.
*/
static AppResource* LoadAppResource(const Tizen::Base::String& resourcePath);
/**
*
* @return A pointer to the %AppResource instance, @n
* else @c null if it fails
*
* @return A pointer to the %AppResource instance, @n
* else @c null if it fails
- * @exception E_APP_NOT_INSTALLED The specified @c appId is not found in the list of installed applications.
- * @exception E_SYSTEM Initializing string and bitmap resource has failed due to a system error.
- * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
+ * @exception E_APP_NOT_INSTALLED The specified @c appId has not been found in the list of installed applications.
+ * @exception E_SYSTEM Initializing the string and the bitmap resource has failed due to a system error.
+ * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
* @remarks The specific error code can be accessed using the GetLastResult() method.
*/
static AppResource* GetInstanceByAppId(const AppId& appId);
/**
* @remarks The specific error code can be accessed using the GetLastResult() method.
*/
static AppResource* GetInstanceByAppId(const AppId& appId);
/**
- * @exception E_OBJ_NOT_FOUND The application resource instance of the specified @c appId is not found.
- * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
- * @remarks Individual instances are managed by the platform. @n
- * It is recommended to release instances to reduce memory usage.
+ * @exception E_OBJ_NOT_FOUND The application resource instance of the specified @c appId has not been found.
+ * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
+ * @remarks
+ * - Individual instances are managed by the platform.
+ * - It is recommended to release instances to reduce memory usage.