| 
    Tizen Native API
    10.0
    
   
   | 
  
  
  
 
Provides functions to capture screen shot.
Required Header
#include <efl_util.h>
Overview
The EFL UTIL SCREENSHOT API provides functions to capture screenshot. Client can get screenshot image by efl_util_screenshot_take_tbm_surface API with tbm_surface handler.
To take a screenshot, use the following steps:
 1. Create the efl_util_screenshot_h handle
 2. Initialize the handle information using the efl_util_screenshot_initialize() function
 3. Call the efl_util_screenshot_take_tbm_surface() function with the argument efl_util_screenshot_h
 Then the captured screen data will be returned to tbm_surface_h handle
 4. If no longer needed, call the efl_util_screenshot_deinitialize() function to free the efl_util_screenshot_h
 
Functions | |
| efl_util_screenshot_h | efl_util_screenshot_initialize (int width, int height) | 
| Initializes the screenshot.   | |
| tbm_surface_h | efl_util_screenshot_take_tbm_surface (efl_util_screenshot_h screenshot) | 
| Takes a screenshot and get a tbm_surface handle.   | |
| int | efl_util_screenshot_deinitialize (efl_util_screenshot_h screenshot) | 
| Deinitializes the screenshot.   | |
Typedefs | |
| typedef struct  _efl_util_screenshot_h *  | efl_util_screenshot_h | 
| Definition for the screenshot handle.   | |
Typedef Documentation
| typedef struct _efl_util_screenshot_h* efl_util_screenshot_h | 
Definition for the screenshot handle.
- Warning:
 - This is not for use by third-party applications.
 
- Since :
 - 2.4
 
Function Documentation
| int efl_util_screenshot_deinitialize | ( | efl_util_screenshot_h | screenshot | ) | 
Deinitializes the screenshot.
- Warning:
 - This is not for use by third-party applications.
 
- Since :
 - 2.4
 
- Privilege Level:
 - platform
 
- Privilege:
 - http://tizen.org/privilege/screenshot
 
- Parameters:
 - 
  
[in] screenshot efl_util_screenshot_h handle  
- Returns:
 0on success, otherwise a negative error value
- Return values:
 - 
  
EFL_UTIL_ERROR_NONE Successful EFL_UTIL_ERROR_PERMISSION_DENIED No permission for screenshot EFL_UTIL_ERROR_INVALID_PARAMETER Invalid parameter  
- See also:
 - efl_util_screenshot_initialize()
 
| efl_util_screenshot_h efl_util_screenshot_initialize | ( | int | width, | 
| int | height | ||
| ) | 
Initializes the screenshot.
- Warning:
 - This is not for use by third-party applications.
 
- Since :
 - 2.4
 
- Privilege Level:
 - platform
 
- Privilege:
 - http://tizen.org/privilege/screenshot
 
- Remarks:
 - The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section.
 
- Parameters:
 - 
  
[in] width width of the screenshot surface [in] height height of the screenshot surface  
- Returns:
 - efl_util_screenshot_h on success, otherwise 
NULL 
- Return values:
 - 
  
efl_util_screenshot_h The screenshot handle  
- Exceptions:
 - 
  
EFL_UTIL_ERROR_NONE Successful EFL_UTIL_ERROR_PERMISSION_DENIED No permission for screenshot EFL_UTIL_ERROR_INVALID_PARAMETER Invalid parameter EFL_UTIL_ERROR_OUT_OF_MEMORY Memory allocation failure EFL_UTIL_ERROR_SCREENSHOT_INIT_FAIL Initialization failure  
- See also:
 - efl_util_screenshot_deinitialize()
 
Takes a screenshot and get a tbm_surface handle.
- Warning:
 - This is not for use by third-party applications.
 
- Since :
 - 2.4
 
- Privilege Level:
 - platform
 
- Privilege:
 - http://tizen.org/privilege/screenshot
 
- Remarks:
 - The specific error code can be obtained using the get_last_result() The tbm_surface_h must be free by caller
 
- Parameters:
 - 
  
[in] screenshot efl_util_screenshot_h handle  
- Returns:
 - tbm_surface_h on success, otherwise 
NULL 
- Return values:
 - 
  
tbm_surface_h The TBM surface handle  
- Exceptions:
 - 
  
EFL_UTIL_ERROR_NONE Successful EFL_UTIL_ERROR_PERMISSION_DENIED No permission for screenshot EFL_UTIL_ERROR_INVALID_PARAMETER Invalid parameter EFL_UTIL_ERROR_SCREENSHOT_EXECUTION_FAIL Execution failure