Class Efl.Ui.Image
Efl UI image class When loading images from a file, the Efl.IFile.Key property can be used to access different streams. For example, when accessing Evas image caches.
Inheritance
Syntax
public class Image : Widget, IPointer, IColor, IEntity, IHint, IMapping, IStack, IInterface, IPart, IPropertyBind, IView, IObject, IFile, IPlayer, IImage, IImageLoadController, IImageOrientable, IClickable, ICalc, IGroup, ISignal, IWrapper, IDisposable
Constructors
Image(EoWrapper.ConstructingHandle)
Subclasses should override this constructor if they are expected to be instantiated from native code. Do not call this constructor directly.
Declaration
protected Image(EoWrapper.ConstructingHandle ch)
Parameters
Type | Name | Description |
---|---|---|
Efl.Eo.EoWrapper.ConstructingHandle | ch | Tag struct storing the native handle of the object being constructed. |
Image(Object, String)
Initializes a new instance of the Efl.Ui.Image class.
Declaration
public Image(Object parent, string style = null)
Parameters
Type | Name | Description |
---|---|---|
Efl.Object | parent | Parent instance. |
System.String | style | The widget style to use. See Efl.Ui.Widget.SetStyle(System.String) |
Image(IntPtr, Object)
Initializes a new instance of the Efl.Ui.Image class. Internal usage: Constructor to forward the wrapper initialization to the root class that interfaces with native code. Should not be used directly.
Declaration
protected Image(IntPtr baseKlass, Object parent)
Parameters
Type | Name | Description |
---|---|---|
System.IntPtr | baseKlass | The pointer to the base native Eo class. |
Efl.Object | parent | The Efl.Object parent of this instance. |
Properties
BorderInsets
Dimensions of this image's border, a region that does not scale with the center area. When EFL renders an image, its source may be scaled to fit the size of the object. This function sets an area from the borders of the image inwards which is not to be scaled. This function is useful for making frames and for widget theming, where, for example, buttons may be of varying sizes, but their border size must remain constant.
The units used for l
, r
, t
and b
are canvas units (pixels).
Note: The border region itself may be scaled by the Efl.Gfx.IImage.SetBorderInsetsScale(System.Double) function.
Note: By default, image objects have no borders set, i.e. l
, r
, t
and b
start as 0.
Note: Similar to the concepts of 9-patch images or cap insets.
Declaration
public (int, int, int, int)BorderInsets { get; set; }
Property Value
Type | Description |
---|---|
System.ValueTuple<System.Int32, System.Int32, System.Int32, System.Int32> | The border's left width. |
BorderInsetsScale
Scaling factor applied to the image borders. This value multiplies the size of the Efl.Gfx.IImage.GetBorderInsets(out System.Int32, out System.Int32, out System.Int32, out System.Int32) when scaling an object.
Declaration
public double BorderInsetsScale { get; set; }
Property Value
Type | Description |
---|---|
System.Double | The scale factor. |
CalcAutoUpdateHints
Whether this object updates its size hints automatically.
By default edje doesn't set size hints on itself. If this property is set to true
, size hints will be updated after recalculation. Be careful, as recalculation may happen often, enabling this property may have a considerable performance impact as other widgets will be notified of the size hints changes.
A layout recalculation can be triggered by Efl.Layout.ICalc.CalcSizeMin(Eina.Size2D), Efl.Layout.ICalc.CalcSizeMin(Eina.Size2D), Efl.Layout.ICalc.CalcPartsExtends() or even any other internal event. (Since EFL 1.22)
Declaration
public bool CalcAutoUpdateHints { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | Whether or not update the size hints. |
CanDownscale
If true
, the image may be scaled to a smaller size. If false
, the image will never be resized smaller than its native size.
Declaration
public bool CanDownscale { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | Whether to allow image downscaling. |
CanUpscale
If true
, the image may be scaled to a larger size. If false
, the image will never be resized larger than its native size.
Declaration
public bool CanUpscale { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | Whether to allow image upscaling. |
CenterFillMode
Specifies how the center part of the object (not the borders) should be drawn when EFL is rendering it. This function sets how the center part of the image object's source image is to be drawn, which must be one of the values in Efl.Gfx.CenterFillMode. By center we mean the complementary part of that defined by Efl.Gfx.IImage.GetBorderInsets(out System.Int32, out System.Int32, out System.Int32, out System.Int32). This is very useful for making frames and decorations. You would most probably also be using a filled image (as in Efl.Gfx.IFill.FillAuto (object still in beta stage)) to use as a frame.
Declaration
public CenterFillMode CenterFillMode { get; set; }
Property Value
Type | Description |
---|---|
Efl.Gfx.CenterFillMode | Fill mode of the center region. The default behavior is to render and scale the center area, respecting its transparency. |
ContentHint
Content hint setting for the image. These hints might be used by EFL to enable optimizations. For example, if you're on the GL engine and your driver implementation supports it, setting this hint to Efl.Gfx.ImageContentHint.Dynamic will make it need zero copies at texture upload time, which is an "expensive" operation.
Declaration
public ImageContentHint ContentHint { get; set; }
Property Value
Type | Description |
---|---|
Efl.Gfx.ImageContentHint | Dynamic or static content hint. |
ContentRegion
Return the relative area enclosed inside the image where content is expected. We do expect content to be inside the limit defined by the border or inside the stretch region. If a stretch region is provided, the content region will encompass the non-stretchable area that are surrounded by stretchable area. If no border and no stretch region is set, they are assumed to be zero and the full object geometry is where content can be layout on top. The area size change with the object size.
The geometry of the area is expressed relative to the geometry of the object.
Declaration
public Rect ContentRegion { get; }
Property Value
Type | Description |
---|---|
Eina.Rect | A rectangle inside the object boundary where content is expected. The default value is the image object's geometry with the Efl.Gfx.IImage.GetBorderInsets(out System.Int32, out System.Int32, out System.Int32, out System.Int32) values subtracted. |
File
The file path from where an object will fetch the data. If file is set during object construction, the object will automatically call Efl.IFile.Load() during the finalize phase of construction.
You must not modify the strings on the returned pointers. (Since EFL 1.22)
Declaration
public string File { get; set; }
Property Value
Type | Description |
---|---|
System.String | The file path. |
GroupSizeMax
The maximum size specified -- as an EDC property -- for a given Edje object This property retrieves the object's maximum size values, as declared in its EDC group definition. For instance, for an Edje object of maximum size 100x100 pixels: collections { group { name: "a_group"; max: 100 100; } }
Note: If the max
EDC property was not declared for the object, this call will return the maximum size a given Edje object may have, for each axis.
Note: On failure, this function will return 0x0.
See also Efl.Layout.IGroup.GetGroupSizeMin(). (Since EFL 1.22)
Declaration
public Size2D GroupSizeMax { get; }
Property Value
Type | Description |
---|---|
Eina.Size2D | The maximum size as set in EDC. |
GroupSizeMin
The minimum size specified -- as an EDC property -- for a given Edje object This property retrieves the obj object's minimum size values, as declared in its EDC group definition. For instance, for an Edje object of minimum size 100x100 pixels: collections { group { name: "a_group"; min: 100 100; } }
Note: If the min
EDC property was not declared for this object, this call will return 0x0.
Note: On failure, this function also return 0x0.
See also Efl.Layout.IGroup.GetGroupSizeMax(). (Since EFL 1.22)
Declaration
public Size2D GroupSizeMin { get; }
Property Value
Type | Description |
---|---|
Eina.Size2D | The minimum size as set in EDC. |
Icon
The image name, using icon standards names. For example, freedesktop.org defines standard icon names such as "home" and "network". There can be different icon sets to match those icon keys. The "name" given as parameter is one of these "keys" and will be used to look in the freedesktop.org paths and elementary theme.
If the name is not found in any of the expected locations and is the absolute path of an image file, this image will be used. Lookup order used by Efl.Ui.Image.SetIcon(System.String) can be set using "icon_theme" in config.
If the image was set using Efl.IFile.File instead of Efl.Ui.Image.SetIcon(System.String), then reading this property will return null.
Note: The image set by this function is changed when Efl.IFile.Load() is called.
Note: This function does not accept relative icon paths.
See also Efl.Ui.Image.GetIcon().
Declaration
public string Icon { get; set; }
Property Value
Type | Description |
---|---|
System.String | The icon name |
ImageLoadError
The (last) file loading error for a given object. This value is set to a nonzero value if an error has occurred.
Declaration
public Error ImageLoadError { get; }
Property Value
Type | Description |
---|---|
Eina.Error | The load error code. A value of $0 indicates no error. |
ImageOrientation
Control the orientation (rotation and flipping) of a visual object. This can be used to set the rotation on an image or a window, for instance.
Declaration
public ImageOrientation ImageOrientation { get; set; }
Property Value
Type | Description |
---|---|
Efl.Gfx.ImageOrientation | The final orientation of the object. |
ImageSize
This represents the size of the original image in pixels. This may be different from the actual geometry on screen or even the size of the loaded pixel buffer. This is the size of the image as stored in the original file.
This is a read-only property and may return 0x0.
Declaration
public Size2D ImageSize { get; }
Property Value
Type | Description |
---|---|
Eina.Size2D | The size in pixels. The default value is the size of the image's internal buffer. |
Interaction
This returns true if the given object is currently in event emission
Declaration
public bool Interaction { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Key
The key which corresponds to the target data within a file. Some file types can contain multiple data streams which are indexed by a key. Use this property for such cases (See for example Efl.Ui.Image or Efl.Ui.Layout).
You must not modify the strings on the returned pointers. (Since EFL 1.22)
Declaration
public string Key { get; set; }
Property Value
Type | Description |
---|---|
System.String | The group that the data belongs to. See the class documentation for particular implementations of this interface to see how this property is used. |
LoadDpi
The DPI resolution of an image object's source image. Most useful for the SVG image loader.
Declaration
public double LoadDpi { get; set; }
Property Value
Type | Description |
---|---|
System.Double | The DPI resolution. |
Loaded
The load state of the object. (Since EFL 1.22)
Declaration
public bool Loaded { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
LoadOrientation
Defines whether the orientation information in the image file should be honored.
The orientation can for instance be set in the EXIF tags of a JPEG image. If this flag is false
, then the orientation will be ignored at load time, otherwise the image will be loaded with the proper orientation.
Declaration
public bool LoadOrientation { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
LoadRegion
Inform a given image object to load a selective region of its source image. This property is useful when one is not showing all of an image's area on its image object.
Note: The image loader for the image format in question has to support selective region loading in order for this function to work (see Efl.Gfx.IImageLoadController.GetLoadRegionSupport()).
Declaration
public Rect LoadRegion { get; set; }
Property Value
Type | Description |
---|---|
Eina.Rect | A region of the image. |
LoadRegionSupport
Indicates whether the Efl.Gfx.IImageLoadController.LoadRegion property is supported for the current file.
Declaration
public bool LoadRegionSupport { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
LoadScaleDown
The scale down factor is a divider on the original image size. Setting the scale down factor can reduce load time and memory usage at the cost of having a scaled down image in memory.
This function sets the scale down factor of a given canvas image. Most useful for the SVG image loader but also applies to JPEG, PNG and BMP.
Powers of two (2, 4, 8, ...) are best supported (especially with JPEG).
Declaration
public int LoadScaleDown { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 | The scale down dividing factor. |
LoadSize
The load size of an image. The image will be loaded into memory as if it was the specified size instead of its original size. This can save a lot of memory and is important for scalable types like SVG.
By default, the load size is not specified, so it is 0x0
.
Declaration
public Size2D LoadSize { get; set; }
Property Value
Type | Description |
---|---|
Eina.Size2D | The image load size. |
LoadSkipHeader
Initial load should skip header check and leave it all to data load.
If this is true
, then future loads of images will defer header loading to a preload stage and/or data load later on rather than at the start when the load begins (e.g. when file is set).
Declaration
public bool LoadSkipHeader { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
Mmap
The mmaped file from where an object will fetch the real data (it must be an Eina.File). If mmap is set during object construction, the object will automatically call Efl.IFile.Load() during the finalize phase of construction. (Since EFL 1.22)
Declaration
public File Mmap { get; set; }
Property Value
Type | Description |
---|---|
Eina.File | The handle to the Eina.File that will be used |
Paused
Pause state of the media file. This property sets the pause state of the media. Re-setting the current pause state has no effect.
If Efl.IPlayer.Playing is set to true
, this property can be used to pause and resume playback of the media without changing its Efl.IPlayer.GetPlaybackProgress() property. This property cannot be changed if Efl.IPlayer.Playing is false
.
Declaration
public bool Paused { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
PlaybackProgress
How much of the file has been played. This function gets the progress in playing the file, the return value is in the [0, 1] range.
Declaration
public double PlaybackProgress { get; }
Property Value
Type | Description |
---|---|
System.Double | The progress within the [0, 1] range. |
PlaybackSpeed
Control the playback speed of the media file. This function control the speed with which the media file will be played. 1.0 represents the normal speed, 2 double speed, 0.5 half speed and so on.
Declaration
public double PlaybackSpeed { get; set; }
Property Value
Type | Description |
---|---|
System.Double | The play speed in the [0, infinity) range. |
Playing
Playback state of the media file. This property sets the playback state of the object. Re-setting the current playback state has no effect.
If set to false
, the object's Efl.IPlayer.GetPlaybackProgress() property is, by default, reset to 0.0
. A class may alter this behavior, and it will be stated in the documentation for a class if such behavior changes should be expected.
Applying the false
playing state also has the same effect as the player object reaching the end of its playback, which may invoke additional behavior based on a class's implementation.
Declaration
public bool Playing { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
Ratio
The native width/height ratio of the image. The ratio will be 1.0 if it cannot be calculated (e.g. height = 0).
Declaration
public double Ratio { get; }
Property Value
Type | Description |
---|---|
System.Double | The image's ratio. |
ScaleHint
The scale hint of a given image of the canvas. The scale hint affects how EFL is to cache scaled versions of its original source image.
Declaration
public ImageScaleHint ScaleHint { get; set; }
Property Value
Type | Description |
---|---|
Efl.Gfx.ImageScaleHint | Scalable or static size hint. |
ScaleMethod
Determine how the image is scaled at render time. This allows more granular controls for how an image object should display its internal buffer. The underlying image data will not be modified.
Declaration
public ImageScaleMethod ScaleMethod { get; set; }
Property Value
Type | Description |
---|---|
Efl.Gfx.ImageScaleMethod | Image scale type to use. |
SmoothScale
Whether to use high-quality image scaling algorithm for this image. When enabled, a higher quality image scaling algorithm is used when scaling images to sizes other than the source image's original one. This gives better results but is more computationally expensive.
Declaration
public bool SmoothScale { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | Whether to use smooth scale or not. |
StretchRegion
This property defines the stretchable pixels region of an image.
When the regions are set by the user, the method will walk the iterators once and then destroy them. When the regions are retrieved by the user, it is his responsibility to destroy the iterators.. It will remember the information for the lifetime of the object. It will ignore all value of Efl.Gfx.IImage.GetBorderInsets(out System.Int32, out System.Int32, out System.Int32, out System.Int32), Efl.Gfx.IImage.BorderInsetsScale and Efl.Gfx.IImage.CenterFillMode . To reset the object you can just pass null
to both horizontal and vertical at the same time.
Declaration
public (Iterator<ImageStretchRegion>, Iterator<ImageStretchRegion>)StretchRegion { get; set; }
Property Value
Type | Description |
---|---|
System.ValueTuple<Eina.Iterator<Efl.Gfx.ImageStretchRegion>, Eina.Iterator<Efl.Gfx.ImageStretchRegion>> | Representation of areas that are stretchable in the image horizontal space. |
Methods
AddSignalCallback(String, String, EflLayoutSignalCb)
Adds a callback for an arriving Edje signal, emitted by a given Edje object. Edje signals are one of the communication interfaces between code and a given Edje object's theme. With signals, one can communicate two string values at a time, which are: - "emission" value: the name of the signal, in general - "source" value: a name for the signal's context, in general
Signals can go both ways, from code to theme, or theme to code.
Though there are those common uses for the two strings, one is free to use them however they like.
Signal callback registration is powerful, in the way that blobs may be used to match multiple signals at once. All the "*?[" set of fnmatch
() operators can be used, both for emission and source.
Edje has internal signals it will emit, automatically, on various actions taking place on group parts. For example, the mouse cursor being moved, pressed, released, etc., over a given part's area, all generate individual signals.
With something like emission = "mouse,down,", source = "button." where "button.*" is the pattern for the names of parts implementing buttons on an interface, you'd be registering for notifications on events of mouse buttons being pressed down on either of those parts (those events all have the "mouse,down," common prefix on their names, with a suffix giving the button number). The actual emission and source strings of an event will be passed in as the emission and source parameters of the callback function (e.g. "mouse,down,2" and "button.close"), for each of those events.
See also the Edje Data Collection Reference for EDC files.
See Efl.Layout.ISignal.EmitSignal(System.String, System.String) on how to emit signals from code to a an object See Efl.Layout.ISignal.DelSignalCallback(System.String, System.String, EflLayoutSignalCb). (Since EFL 1.22)
Declaration
public virtual bool AddSignalCallback(string emission, string source, EflLayoutSignalCb func)
Parameters
Type | Name | Description |
---|---|---|
System.String | emission | The signal's "emission" string |
System.String | source | The signal's "source" string |
EflLayoutSignalCb | func | The callback function to be executed when the signal is emitted. |
Returns
Type | Description |
---|---|
System.Boolean |
|
CalcForce()
Forces a Size/Geometry calculation. Forces the object to recalculate its layout regardless of freeze/thaw. This API should be used carefully.
See also Efl.Layout.ICalc.FreezeCalc() and Efl.Layout.ICalc.ThawCalc(). (Since EFL 1.22)
Declaration
protected virtual void CalcForce()
CalcPartsExtends()
Calculates the geometry of the region, relative to a given layout object's area, occupied by all parts in the object. This function gets the geometry of the rectangle equal to the area required to group all parts in obj's group/collection. The x and y coordinates are relative to the top left corner of the whole obj object's area. Parts placed out of the group's boundaries will also be taken in account, so that x and y may be negative.
Note: On failure, this function will make all non-null
geometry pointers' pointed variables be set to zero.
(Since EFL 1.22)
Declaration
public virtual Rect CalcPartsExtends()
Returns
Type | Description |
---|---|
Eina.Rect | The calculated region. |
CalcSizeMin(Size2D)
Calculates the minimum required size for a given layout object.
This call will trigger an internal recalculation of all parts of the object, in order to return its minimum required dimensions for width and height. The user might choose to impose those minimum sizes, making the resulting calculation to get to values greater or equal than restricted
in both directions.
Note: At the end of this call, the object won't be automatically resized to the new dimensions, but just return the calculated sizes. The caller is the one up to change its geometry or not.
Warning: Be advised that invisible parts in the object will be taken into account in this calculation. (Since EFL 1.22)
Declaration
public virtual Size2D CalcSizeMin(Size2D restricted)
Parameters
Type | Name | Description |
---|---|---|
Eina.Size2D | restricted | The minimum size constraint as input, the returned size can not be lower than this (in both directions). |
Returns
Type | Description |
---|---|
Eina.Size2D | The minimum required size. |
CancelLoadAsync()
Cancel preloading an image object's image data in the background. The object should be left in a state where it has no image data. If cancel is called too late, the image will be kept in memory.
Declaration
public virtual void CancelLoadAsync()
DelSignalCallback(String, String, EflLayoutSignalCb)
Removes a signal-triggered callback from an object. This function removes a callback, previously attached to the emission of a signal, from the object obj. The parameters emission, source and func must match exactly those passed to a previous call to Efl.Layout.ISignal.AddSignalCallback(System.String, System.String, EflLayoutSignalCb).
See Efl.Layout.ISignal.AddSignalCallback(System.String, System.String, EflLayoutSignalCb). (Since EFL 1.22)
Declaration
public virtual bool DelSignalCallback(string emission, string source, EflLayoutSignalCb func)
Parameters
Type | Name | Description |
---|---|---|
System.String | emission | The signal's "emission" string |
System.String | source | The signal's "source" string |
EflLayoutSignalCb | func | The callback function to be executed when the signal is emitted. |
Returns
Type | Description |
---|---|
System.Boolean |
|
EmitSignal(String, String)
Sends/emits an Edje signal to this layout. This function sends a signal to the object. An Edje program, at the EDC specification level, can respond to a signal by having declared matching "signal" and "source" fields on its block.
See also the Edje Data Collection Reference for EDC files.
See Efl.Layout.ISignal.AddSignalCallback(System.String, System.String, EflLayoutSignalCb) for more on Edje signals. (Since EFL 1.22)
Declaration
public virtual void EmitSignal(string emission, string source)
Parameters
Type | Name | Description |
---|---|---|
System.String | emission | The signal's "emission" string |
System.String | source | The signal's "source" string |
FreezeCalc()
Freezes the layout object. This function puts all changes on hold. Successive freezes will nest, requiring an equal number of thaws.
See also Efl.Layout.ICalc.ThawCalc(). (Since EFL 1.22)
Declaration
public virtual int FreezeCalc()
Returns
Type | Description |
---|---|
System.Int32 | The frozen state or 0 on error |
GetBorderInsets(out Int32, out Int32, out Int32, out Int32)
Dimensions of this image's border, a region that does not scale with the center area. When EFL renders an image, its source may be scaled to fit the size of the object. This function sets an area from the borders of the image inwards which is not to be scaled. This function is useful for making frames and for widget theming, where, for example, buttons may be of varying sizes, but their border size must remain constant.
The units used for l
, r
, t
and b
are canvas units (pixels).
Note: The border region itself may be scaled by the Efl.Gfx.IImage.SetBorderInsetsScale(System.Double) function.
Note: By default, image objects have no borders set, i.e. l
, r
, t
and b
start as 0.
Note: Similar to the concepts of 9-patch images or cap insets.
Declaration
public virtual void GetBorderInsets(out int l, out int r, out int t, out int b)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | l | The border's left width. |
System.Int32 | r | The border's right width. |
System.Int32 | t | The border's top height. |
System.Int32 | b | The border's bottom height. |
GetBorderInsetsScale()
Scaling factor applied to the image borders. This value multiplies the size of the Efl.Gfx.IImage.GetBorderInsets(out System.Int32, out System.Int32, out System.Int32, out System.Int32) when scaling an object.
Declaration
public virtual double GetBorderInsetsScale()
Returns
Type | Description |
---|---|
System.Double | The scale factor. |
GetCalcAutoUpdateHints()
Whether this object updates its size hints automatically. (Since EFL 1.22)
Declaration
public virtual bool GetCalcAutoUpdateHints()
Returns
Type | Description |
---|---|
System.Boolean | Whether or not update the size hints. |
GetCanDownscale()
If true
, the image may be scaled to a smaller size. If false
, the image will never be resized smaller than its native size.
Declaration
public virtual bool GetCanDownscale()
Returns
Type | Description |
---|---|
System.Boolean | Whether to allow image downscaling. |
GetCanUpscale()
If true
, the image may be scaled to a larger size. If false
, the image will never be resized larger than its native size.
Declaration
public virtual bool GetCanUpscale()
Returns
Type | Description |
---|---|
System.Boolean | Whether to allow image upscaling. |
GetCenterFillMode()
Specifies how the center part of the object (not the borders) should be drawn when EFL is rendering it. This function sets how the center part of the image object's source image is to be drawn, which must be one of the values in Efl.Gfx.CenterFillMode. By center we mean the complementary part of that defined by Efl.Gfx.IImage.GetBorderInsets(out System.Int32, out System.Int32, out System.Int32, out System.Int32). This is very useful for making frames and decorations. You would most probably also be using a filled image (as in Efl.Gfx.IFill.FillAuto (object still in beta stage)) to use as a frame.
Declaration
public virtual CenterFillMode GetCenterFillMode()
Returns
Type | Description |
---|---|
Efl.Gfx.CenterFillMode | Fill mode of the center region. The default behavior is to render and scale the center area, respecting its transparency. |
GetContentHint()
Content hint setting for the image. These hints might be used by EFL to enable optimizations. For example, if you're on the GL engine and your driver implementation supports it, setting this hint to Efl.Gfx.ImageContentHint.Dynamic will make it need zero copies at texture upload time, which is an "expensive" operation.
Declaration
public virtual ImageContentHint GetContentHint()
Returns
Type | Description |
---|---|
Efl.Gfx.ImageContentHint | Dynamic or static content hint. |
GetContentRegion()
Return the relative area enclosed inside the image where content is expected. We do expect content to be inside the limit defined by the border or inside the stretch region. If a stretch region is provided, the content region will encompass the non-stretchable area that are surrounded by stretchable area. If no border and no stretch region is set, they are assumed to be zero and the full object geometry is where content can be layout on top. The area size change with the object size.
The geometry of the area is expressed relative to the geometry of the object.
Declaration
public virtual Rect GetContentRegion()
Returns
Type | Description |
---|---|
Eina.Rect | A rectangle inside the object boundary where content is expected. The default value is the image object's geometry with the Efl.Gfx.IImage.GetBorderInsets(out System.Int32, out System.Int32, out System.Int32, out System.Int32) values subtracted. |
GetFile()
The file path from where an object will fetch the data. If file is set during object construction, the object will automatically call Efl.IFile.Load() during the finalize phase of construction.
You must not modify the strings on the returned pointers. (Since EFL 1.22)
Declaration
public virtual string GetFile()
Returns
Type | Description |
---|---|
System.String | The file path. |
GetGroupData(String)
The EDC data field's value from a given Edje object's group. This property represents an EDC data field's value, which is declared on the objects building EDC file, under its group. EDC data blocks are most commonly used to pass arbitrary parameters from an application's theme to its code.
EDC data fields always hold strings as values, hence the return type of this function. Check the complete "syntax reference" for EDC files.
This is how a data item is defined in EDC: collections { group { name: "a_group"; data { item: "key1" "value1"; item: "key2" "value2"; } } }
Warning: Do not confuse this call with edje_file_data_get(), which queries for a global EDC data field on an EDC declaration file. (Since EFL 1.22)
Declaration
public virtual string GetGroupData(string key)
Parameters
Type | Name | Description |
---|---|---|
System.String | key | The data field's key string |
Returns
Type | Description |
---|---|
System.String | The data's value string. |
GetGroupSizeMax()
The maximum size specified -- as an EDC property -- for a given Edje object This property retrieves the object's maximum size values, as declared in its EDC group definition. For instance, for an Edje object of maximum size 100x100 pixels: collections { group { name: "a_group"; max: 100 100; } }
Note: If the max
EDC property was not declared for the object, this call will return the maximum size a given Edje object may have, for each axis.
Note: On failure, this function will return 0x0.
See also Efl.Layout.IGroup.GetGroupSizeMin(). (Since EFL 1.22)
Declaration
public virtual Size2D GetGroupSizeMax()
Returns
Type | Description |
---|---|
Eina.Size2D | The maximum size as set in EDC. |
GetGroupSizeMin()
The minimum size specified -- as an EDC property -- for a given Edje object This property retrieves the obj object's minimum size values, as declared in its EDC group definition. For instance, for an Edje object of minimum size 100x100 pixels: collections { group { name: "a_group"; min: 100 100; } }
Note: If the min
EDC property was not declared for this object, this call will return 0x0.
Note: On failure, this function also return 0x0.
See also Efl.Layout.IGroup.GetGroupSizeMax(). (Since EFL 1.22)
Declaration
public virtual Size2D GetGroupSizeMin()
Returns
Type | Description |
---|---|
Eina.Size2D | The minimum size as set in EDC. |
GetIcon()
The image name, using icon standards names. For example, freedesktop.org defines standard icon names such as "home" and "network". There can be different icon sets to match those icon keys. The "name" given as parameter is one of these "keys" and will be used to look in the freedesktop.org paths and elementary theme.
If the name is not found in any of the expected locations and is the absolute path of an image file, this image will be used. Lookup order used by Efl.Ui.Image.SetIcon(System.String) can be set using "icon_theme" in config.
If the image was set using Efl.IFile.File instead of Efl.Ui.Image.SetIcon(System.String), then reading this property will return null.
Note: The image set by this function is changed when Efl.IFile.Load() is called.
Note: This function does not accept relative icon paths.
See also Efl.Ui.Image.GetIcon().
Declaration
public virtual string GetIcon()
Returns
Type | Description |
---|---|
System.String | The icon name |
GetImageLoadError()
The (last) file loading error for a given object. This value is set to a nonzero value if an error has occurred.
Declaration
public virtual Error GetImageLoadError()
Returns
Type | Description |
---|---|
Eina.Error | The load error code. A value of $0 indicates no error. |
GetImageOrientation()
Control the orientation (rotation and flipping) of a visual object. This can be used to set the rotation on an image or a window, for instance.
Declaration
public virtual ImageOrientation GetImageOrientation()
Returns
Type | Description |
---|---|
Efl.Gfx.ImageOrientation | The final orientation of the object. |
GetImageSize()
This represents the size of the original image in pixels. This may be different from the actual geometry on screen or even the size of the loaded pixel buffer. This is the size of the image as stored in the original file.
This is a read-only property and may return 0x0.
Declaration
public virtual Size2D GetImageSize()
Returns
Type | Description |
---|---|
Eina.Size2D | The size in pixels. The default value is the size of the image's internal buffer. |
GetInteraction()
This returns true if the given object is currently in event emission
Declaration
public virtual bool GetInteraction()
Returns
Type | Description |
---|---|
System.Boolean |
GetKey()
The key which corresponds to the target data within a file. Some file types can contain multiple data streams which are indexed by a key. Use this property for such cases (See for example Efl.Ui.Image or Efl.Ui.Layout).
You must not modify the strings on the returned pointers. (Since EFL 1.22)
Declaration
public virtual string GetKey()
Returns
Type | Description |
---|---|
System.String | The group that the data belongs to. See the class documentation for particular implementations of this interface to see how this property is used. |
GetLoadDpi()
The DPI resolution of an image object's source image. Most useful for the SVG image loader.
Declaration
public virtual double GetLoadDpi()
Returns
Type | Description |
---|---|
System.Double | The DPI resolution. |
GetLoaded()
The load state of the object. (Since EFL 1.22)
Declaration
public virtual bool GetLoaded()
Returns
Type | Description |
---|---|
System.Boolean |
|
GetLoadOrientation()
Defines whether the orientation information in the image file should be honored.
The orientation can for instance be set in the EXIF tags of a JPEG image. If this flag is false
, then the orientation will be ignored at load time, otherwise the image will be loaded with the proper orientation.
Declaration
public virtual bool GetLoadOrientation()
Returns
Type | Description |
---|---|
System.Boolean |
|
GetLoadRegion()
Inform a given image object to load a selective region of its source image. This property is useful when one is not showing all of an image's area on its image object.
Note: The image loader for the image format in question has to support selective region loading in order for this function to work (see Efl.Gfx.IImageLoadController.GetLoadRegionSupport()).
Declaration
public virtual Rect GetLoadRegion()
Returns
Type | Description |
---|---|
Eina.Rect | A region of the image. |
GetLoadRegionSupport()
Indicates whether the Efl.Gfx.IImageLoadController.LoadRegion property is supported for the current file.
Declaration
public virtual bool GetLoadRegionSupport()
Returns
Type | Description |
---|---|
System.Boolean |
|
GetLoadScaleDown()
The scale down factor is a divider on the original image size. Setting the scale down factor can reduce load time and memory usage at the cost of having a scaled down image in memory.
This function sets the scale down factor of a given canvas image. Most useful for the SVG image loader but also applies to JPEG, PNG and BMP.
Powers of two (2, 4, 8, ...) are best supported (especially with JPEG).
Declaration
public virtual int GetLoadScaleDown()
Returns
Type | Description |
---|---|
System.Int32 | The scale down dividing factor. |
GetLoadSize()
Returns the requested load size.
Declaration
public virtual Size2D GetLoadSize()
Returns
Type | Description |
---|---|
Eina.Size2D | The image load size. |
GetLoadSkipHeader()
Initial load should skip header check and leave it all to data load.
If this is true
, then future loads of images will defer header loading to a preload stage and/or data load later on rather than at the start when the load begins (e.g. when file is set).
Declaration
public virtual bool GetLoadSkipHeader()
Returns
Type | Description |
---|---|
System.Boolean |
|
GetMmap()
The mmaped file from where an object will fetch the real data (it must be an Eina.File). If mmap is set during object construction, the object will automatically call Efl.IFile.Load() during the finalize phase of construction. (Since EFL 1.22)
Declaration
public virtual File GetMmap()
Returns
Type | Description |
---|---|
Eina.File | The handle to the Eina.File that will be used |
GetPartExist(String)
Returns true
if the part exists in the EDC group.
(Since EFL 1.22)
Declaration
public virtual bool GetPartExist(string part)
Parameters
Type | Name | Description |
---|---|---|
System.String | part | The part name to check. |
Returns
Type | Description |
---|---|
System.Boolean |
|
GetPaused()
Pause state of the media file. This property sets the pause state of the media. Re-setting the current pause state has no effect.
If Efl.IPlayer.Playing is set to true
, this property can be used to pause and resume playback of the media without changing its Efl.IPlayer.GetPlaybackProgress() property. This property cannot be changed if Efl.IPlayer.Playing is false
.
Declaration
public virtual bool GetPaused()
Returns
Type | Description |
---|---|
System.Boolean |
|
GetPlaybackProgress()
How much of the file has been played. This function gets the progress in playing the file, the return value is in the [0, 1] range.
Declaration
public virtual double GetPlaybackProgress()
Returns
Type | Description |
---|---|
System.Double | The progress within the [0, 1] range. |
GetPlaybackSpeed()
Control the playback speed of the media file. This function control the speed with which the media file will be played. 1.0 represents the normal speed, 2 double speed, 0.5 half speed and so on.
Declaration
public virtual double GetPlaybackSpeed()
Returns
Type | Description |
---|---|
System.Double | The play speed in the [0, infinity) range. |
GetPlaying()
Playback state of the media file. This property sets the playback state of the object. Re-setting the current playback state has no effect.
If set to false
, the object's Efl.IPlayer.GetPlaybackProgress() property is, by default, reset to 0.0
. A class may alter this behavior, and it will be stated in the documentation for a class if such behavior changes should be expected.
Applying the false
playing state also has the same effect as the player object reaching the end of its playback, which may invoke additional behavior based on a class's implementation.
Declaration
public virtual bool GetPlaying()
Returns
Type | Description |
---|---|
System.Boolean |
|
GetRatio()
The native width/height ratio of the image. The ratio will be 1.0 if it cannot be calculated (e.g. height = 0).
Declaration
public virtual double GetRatio()
Returns
Type | Description |
---|---|
System.Double | The image's ratio. |
GetScaleHint()
The scale hint of a given image of the canvas. The scale hint affects how EFL is to cache scaled versions of its original source image.
Declaration
public virtual ImageScaleHint GetScaleHint()
Returns
Type | Description |
---|---|
Efl.Gfx.ImageScaleHint | Scalable or static size hint. |
GetScaleMethod()
Determine how the image is scaled at render time. This allows more granular controls for how an image object should display its internal buffer. The underlying image data will not be modified.
Declaration
public virtual ImageScaleMethod GetScaleMethod()
Returns
Type | Description |
---|---|
Efl.Gfx.ImageScaleMethod | Image scale type to use. |
GetSmoothScale()
Whether to use high-quality image scaling algorithm for this image. When enabled, a higher quality image scaling algorithm is used when scaling images to sizes other than the source image's original one. This gives better results but is more computationally expensive.
Declaration
public virtual bool GetSmoothScale()
Returns
Type | Description |
---|---|
System.Boolean | Whether to use smooth scale or not. |
GetStretchRegion(out Iterator<ImageStretchRegion>, out Iterator<ImageStretchRegion>)
This property defines the stretchable pixels region of an image.
When the regions are set by the user, the method will walk the iterators once and then destroy them. When the regions are retrieved by the user, it is his responsibility to destroy the iterators.. It will remember the information for the lifetime of the object. It will ignore all value of Efl.Gfx.IImage.GetBorderInsets(out System.Int32, out System.Int32, out System.Int32, out System.Int32), Efl.Gfx.IImage.BorderInsetsScale and Efl.Gfx.IImage.CenterFillMode . To reset the object you can just pass null
to both horizontal and vertical at the same time.
Declaration
public virtual void GetStretchRegion(out Iterator<ImageStretchRegion> horizontal, out Iterator<ImageStretchRegion> vertical)
Parameters
Type | Name | Description |
---|---|---|
Eina.Iterator<Efl.Gfx.ImageStretchRegion> | horizontal | Representation of areas that are stretchable in the image horizontal space. |
Eina.Iterator<Efl.Gfx.ImageStretchRegion> | vertical | Representation of areas that are stretchable in the image vertical space. |
Load()
Perform all necessary operations to open and load file data into the object using the Efl.IFile.File (or Efl.IFile.Mmap) and Efl.IFile.Key properties. In the case where Efl.IFile.SetFile(System.String) has been called on an object, this will internally open the file and call Efl.IFile.SetMmap(Eina.File) on the object using the opened file handle.
Calling Efl.IFile.Load() on an object which has already performed file operations based on the currently set properties will have no effect. (Since EFL 1.22)
Declaration
public virtual Error Load()
Returns
Type | Description |
---|---|
Eina.Error | 0 on success, error code otherwise |
LoadAsyncStart()
Begin preloading an image object's image data in the background. Once the background task is complete the event @[.load,done] will be emitted if loading succeeded, @[.load,error] otherwise.
Declaration
public virtual void LoadAsyncStart()
LongpressAbort(UInt32)
This aborts ongoing longpress event. That is, this will stop the timer for longpress.
Declaration
protected virtual void LongpressAbort(uint button)
Parameters
Type | Name | Description |
---|---|---|
System.UInt32 | button |
OnCircularDependencyEvent(CalcCircularDependencyEventArgs)
Method to raise event CircularDependencyEvent.
Declaration
public void OnCircularDependencyEvent(CalcCircularDependencyEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
Efl.Layout.CalcCircularDependencyEventArgs | e | Event to raise. |
OnClickedAnyEvent(ClickableClickedAnyEventArgs)
Method to raise event ClickedAnyEvent.
Declaration
public void OnClickedAnyEvent(ClickableClickedAnyEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
Efl.Input.ClickableClickedAnyEventArgs | e | Event to raise. |
OnClickedEvent(ClickableClickedEventArgs)
Method to raise event ClickedEvent.
Declaration
public void OnClickedEvent(ClickableClickedEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
Efl.Input.ClickableClickedEventArgs | e | Event to raise. |
OnImagePreloadStateChangedEvent(ImageImagePreloadStateChangedEventArgs)
Method to raise event ImagePreloadStateChangedEvent.
Declaration
public void OnImagePreloadStateChangedEvent(ImageImagePreloadStateChangedEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
Efl.Gfx.ImageImagePreloadStateChangedEventArgs | e | Event to raise. |
OnImageResizedEvent(ImageImageResizedEventArgs)
Method to raise event ImageResizedEvent.
Declaration
public void OnImageResizedEvent(ImageImageResizedEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
Efl.Gfx.ImageImageResizedEventArgs | e | Event to raise. |
OnLongpressedEvent(ClickableLongpressedEventArgs)
Method to raise event LongpressedEvent.
Declaration
public void OnLongpressedEvent(ClickableLongpressedEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
Efl.Input.ClickableLongpressedEventArgs | e | Event to raise. |
OnPressedEvent(ClickablePressedEventArgs)
Method to raise event PressedEvent.
Declaration
public void OnPressedEvent(ClickablePressedEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
Efl.Input.ClickablePressedEventArgs | e | Event to raise. |
OnRecalcEvent(EventArgs)
Method to raise event RecalcEvent.
Declaration
public void OnRecalcEvent(EventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.EventArgs | e | Event to raise. |
OnUnpressedEvent(ClickableUnpressedEventArgs)
Method to raise event UnpressedEvent.
Declaration
public void OnUnpressedEvent(ClickableUnpressedEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
Efl.Input.ClickableUnpressedEventArgs | e | Event to raise. |
Press(UInt32)
Change internal states that a button got pressed. When the button is already pressed, this is silently ignored.
Declaration
protected virtual void Press(uint button)
Parameters
Type | Name | Description |
---|---|---|
System.UInt32 | button | The number of the button. FIXME ensure to have the right interval of possible input |
ProcessSignal(Boolean)
Processes an object's messages and signals queue. This function goes through the object message queue processing the pending messages for this specific Edje object. Normally they'd be processed only at idle time.
If recurse
is true
, this function will be called recursively on all subobjects.
(Since EFL 1.22)
Declaration
public virtual void ProcessSignal(bool recurse)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | recurse | Whether to process messages on children objects. |
ResetButtonState(UInt32)
This aborts the internal state after a press call. This will stop the timer for longpress and set the state of the clickable mixin back into the unpressed state.
Declaration
protected virtual void ResetButtonState(uint button)
Parameters
Type | Name | Description |
---|---|---|
System.UInt32 | button |
SendMessage(Int32, Value)
Sends an (Edje) message to a given Edje object This function sends an Edje message to obj and to all of its child objects, if it has any (swallowed objects are one kind of child object). Only a few types are supported: - int, - float/double, - string/stringshare, - arrays of int, float, double or strings.
Messages can go both ways, from code to theme, or theme to code.
The id argument as a form of code and theme defining a common interface on message communication. One should define the same IDs on both code and EDC declaration, to individualize messages (binding them to a given context). (Since EFL 1.22)
Declaration
public virtual void SendMessage(int id, Value msg)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | id | A identification number for the message to be sent |
Eina.Value | msg | The message's payload |
SetBorderInsets(Int32, Int32, Int32, Int32)
Dimensions of this image's border, a region that does not scale with the center area. When EFL renders an image, its source may be scaled to fit the size of the object. This function sets an area from the borders of the image inwards which is not to be scaled. This function is useful for making frames and for widget theming, where, for example, buttons may be of varying sizes, but their border size must remain constant.
The units used for l
, r
, t
and b
are canvas units (pixels).
Note: The border region itself may be scaled by the Efl.Gfx.IImage.SetBorderInsetsScale(System.Double) function.
Note: By default, image objects have no borders set, i.e. l
, r
, t
and b
start as 0.
Note: Similar to the concepts of 9-patch images or cap insets.
Declaration
public virtual void SetBorderInsets(int l, int r, int t, int b)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | l | The border's left width. |
System.Int32 | r | The border's right width. |
System.Int32 | t | The border's top height. |
System.Int32 | b | The border's bottom height. |
SetBorderInsetsScale(Double)
Scaling factor applied to the image borders. This value multiplies the size of the Efl.Gfx.IImage.GetBorderInsets(out System.Int32, out System.Int32, out System.Int32, out System.Int32) when scaling an object.
Declaration
public virtual void SetBorderInsetsScale(double scale)
Parameters
Type | Name | Description |
---|---|---|
System.Double | scale | The scale factor. |
SetCalcAutoUpdateHints(Boolean)
Enable or disable auto-update of size hints. (Since EFL 1.22)
Declaration
public virtual void SetCalcAutoUpdateHints(bool update)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | update | Whether or not update the size hints. |
SetCanDownscale(Boolean)
If true
, the image may be scaled to a smaller size. If false
, the image will never be resized smaller than its native size.
Declaration
public virtual void SetCanDownscale(bool downscale)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | downscale | Whether to allow image downscaling. |
SetCanUpscale(Boolean)
If true
, the image may be scaled to a larger size. If false
, the image will never be resized larger than its native size.
Declaration
public virtual void SetCanUpscale(bool upscale)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | upscale | Whether to allow image upscaling. |
SetCenterFillMode(CenterFillMode)
Specifies how the center part of the object (not the borders) should be drawn when EFL is rendering it. This function sets how the center part of the image object's source image is to be drawn, which must be one of the values in Efl.Gfx.CenterFillMode. By center we mean the complementary part of that defined by Efl.Gfx.IImage.GetBorderInsets(out System.Int32, out System.Int32, out System.Int32, out System.Int32). This is very useful for making frames and decorations. You would most probably also be using a filled image (as in Efl.Gfx.IFill.FillAuto (object still in beta stage)) to use as a frame.
Declaration
public virtual void SetCenterFillMode(CenterFillMode fill)
Parameters
Type | Name | Description |
---|---|---|
Efl.Gfx.CenterFillMode | fill | Fill mode of the center region. The default behavior is to render and scale the center area, respecting its transparency. |
SetContentHint(ImageContentHint)
Content hint setting for the image. These hints might be used by EFL to enable optimizations. For example, if you're on the GL engine and your driver implementation supports it, setting this hint to Efl.Gfx.ImageContentHint.Dynamic will make it need zero copies at texture upload time, which is an "expensive" operation.
Declaration
public virtual void SetContentHint(ImageContentHint hint)
Parameters
Type | Name | Description |
---|---|---|
Efl.Gfx.ImageContentHint | hint | Dynamic or static content hint. |
SetFile(String)
The file path from where an object will fetch the data. If file is set during object construction, the object will automatically call Efl.IFile.Load() during the finalize phase of construction.
You must not modify the strings on the returned pointers. (Since EFL 1.22)
Declaration
public virtual Error SetFile(string file)
Parameters
Type | Name | Description |
---|---|---|
System.String | file | The file path. |
Returns
Type | Description |
---|---|
Eina.Error | 0 on success, error code otherwise |
SetIcon(String)
The image name, using icon standards names. For example, freedesktop.org defines standard icon names such as "home" and "network". There can be different icon sets to match those icon keys. The "name" given as parameter is one of these "keys" and will be used to look in the freedesktop.org paths and elementary theme.
If the name is not found in any of the expected locations and is the absolute path of an image file, this image will be used. Lookup order used by Efl.Ui.Image.SetIcon(System.String) can be set using "icon_theme" in config.
If the image was set using Efl.IFile.File instead of Efl.Ui.Image.SetIcon(System.String), then reading this property will return null.
Note: The image set by this function is changed when Efl.IFile.Load() is called.
Note: This function does not accept relative icon paths.
See also Efl.Ui.Image.GetIcon().
Declaration
public virtual bool SetIcon(string name)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | The icon name |
Returns
Type | Description |
---|---|
System.Boolean |
|
SetImageOrientation(ImageOrientation)
Control the orientation (rotation and flipping) of a visual object. This can be used to set the rotation on an image or a window, for instance.
Declaration
public virtual void SetImageOrientation(ImageOrientation dir)
Parameters
Type | Name | Description |
---|---|---|
Efl.Gfx.ImageOrientation | dir | The final orientation of the object. |
SetKey(String)
The key which corresponds to the target data within a file. Some file types can contain multiple data streams which are indexed by a key. Use this property for such cases (See for example Efl.Ui.Image or Efl.Ui.Layout).
You must not modify the strings on the returned pointers. (Since EFL 1.22)
Declaration
public virtual void SetKey(string key)
Parameters
Type | Name | Description |
---|---|---|
System.String | key | The group that the data belongs to. See the class documentation for particular implementations of this interface to see how this property is used. |
SetLoadDpi(Double)
The DPI resolution of an image object's source image. Most useful for the SVG image loader.
Declaration
public virtual void SetLoadDpi(double dpi)
Parameters
Type | Name | Description |
---|---|---|
System.Double | dpi | The DPI resolution. |
SetLoadOrientation(Boolean)
Defines whether the orientation information in the image file should be honored.
The orientation can for instance be set in the EXIF tags of a JPEG image. If this flag is false
, then the orientation will be ignored at load time, otherwise the image will be loaded with the proper orientation.
Declaration
public virtual void SetLoadOrientation(bool enable)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | enable |
|
SetLoadRegion(Rect)
Inform a given image object to load a selective region of its source image. This property is useful when one is not showing all of an image's area on its image object.
Note: The image loader for the image format in question has to support selective region loading in order for this function to work (see Efl.Gfx.IImageLoadController.GetLoadRegionSupport()).
Declaration
public virtual void SetLoadRegion(Rect region)
Parameters
Type | Name | Description |
---|---|---|
Eina.Rect | region | A region of the image. |
SetLoadScaleDown(Int32)
Requests the image loader to scale down by div
times. Call this before starting the actual image load.
Declaration
public virtual void SetLoadScaleDown(int div)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | div | The scale down dividing factor. |
SetLoadSize(Size2D)
Requests the canvas to load the image at the given size. EFL will try to load an image of the requested size but does not guarantee an exact match between the request and the loaded image dimensions.
Declaration
public virtual void SetLoadSize(Size2D size)
Parameters
Type | Name | Description |
---|---|---|
Eina.Size2D | size | The image load size. |
SetLoadSkipHeader(Boolean)
Initial load should skip header check and leave it all to data load.
If this is true
, then future loads of images will defer header loading to a preload stage and/or data load later on rather than at the start when the load begins (e.g. when file is set).
Declaration
public virtual void SetLoadSkipHeader(bool skip)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | skip |
|
SetMmap(File)
The mmaped file from where an object will fetch the real data (it must be an Eina.File). If mmap is set during object construction, the object will automatically call Efl.IFile.Load() during the finalize phase of construction. (Since EFL 1.22)
Declaration
public virtual Error SetMmap(File f)
Parameters
Type | Name | Description |
---|---|---|
Eina.File | f | The handle to the Eina.File that will be used |
Returns
Type | Description |
---|---|
Eina.Error | 0 on success, error code otherwise |
SetPaused(Boolean)
Pause state of the media file. This property sets the pause state of the media. Re-setting the current pause state has no effect.
If Efl.IPlayer.Playing is set to true
, this property can be used to pause and resume playback of the media without changing its Efl.IPlayer.GetPlaybackProgress() property. This property cannot be changed if Efl.IPlayer.Playing is false
.
Declaration
public virtual bool SetPaused(bool paused)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | paused |
|
Returns
Type | Description |
---|---|
System.Boolean | If |
SetPlaybackPosition(Double)
Position in the media file.
This property sets the current position of the media file to sec
seconds since the beginning of the media file. This only works on seekable streams. Setting the position doesn't change the Efl.IPlayer.Playing or Efl.IPlayer.Paused states of the media file.
Declaration
public virtual void SetPlaybackPosition(double sec)
Parameters
Type | Name | Description |
---|---|---|
System.Double | sec | The position (in seconds). |
SetPlaybackSpeed(Double)
Control the playback speed of the media file. This function control the speed with which the media file will be played. 1.0 represents the normal speed, 2 double speed, 0.5 half speed and so on.
Declaration
public virtual void SetPlaybackSpeed(double speed)
Parameters
Type | Name | Description |
---|---|---|
System.Double | speed | The play speed in the [0, infinity) range. |
SetPlaying(Boolean)
Playback state of the media file. This property sets the playback state of the object. Re-setting the current playback state has no effect.
If set to false
, the object's Efl.IPlayer.GetPlaybackProgress() property is, by default, reset to 0.0
. A class may alter this behavior, and it will be stated in the documentation for a class if such behavior changes should be expected.
Applying the false
playing state also has the same effect as the player object reaching the end of its playback, which may invoke additional behavior based on a class's implementation.
Declaration
public virtual bool SetPlaying(bool playing)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | playing |
|
Returns
Type | Description |
---|---|
System.Boolean | If |
SetScaleHint(ImageScaleHint)
The scale hint of a given image of the canvas. The scale hint affects how EFL is to cache scaled versions of its original source image.
Declaration
public virtual void SetScaleHint(ImageScaleHint hint)
Parameters
Type | Name | Description |
---|---|---|
Efl.Gfx.ImageScaleHint | hint | Scalable or static size hint. |
SetScaleMethod(ImageScaleMethod)
Determine how the image is scaled at render time. This allows more granular controls for how an image object should display its internal buffer. The underlying image data will not be modified.
Declaration
public virtual void SetScaleMethod(ImageScaleMethod scale_method)
Parameters
Type | Name | Description |
---|---|---|
Efl.Gfx.ImageScaleMethod | scale_method | Image scale type to use. |
SetSmoothScale(Boolean)
Whether to use high-quality image scaling algorithm for this image. When enabled, a higher quality image scaling algorithm is used when scaling images to sizes other than the source image's original one. This gives better results but is more computationally expensive.
Declaration
public virtual void SetSmoothScale(bool smooth_scale)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | smooth_scale | Whether to use smooth scale or not. |
SetStretchRegion(Iterator<ImageStretchRegion>, Iterator<ImageStretchRegion>)
This property defines the stretchable pixels region of an image.
When the regions are set by the user, the method will walk the iterators once and then destroy them. When the regions are retrieved by the user, it is his responsibility to destroy the iterators.. It will remember the information for the lifetime of the object. It will ignore all value of Efl.Gfx.IImage.GetBorderInsets(out System.Int32, out System.Int32, out System.Int32, out System.Int32), Efl.Gfx.IImage.BorderInsetsScale and Efl.Gfx.IImage.CenterFillMode . To reset the object you can just pass null
to both horizontal and vertical at the same time.
Declaration
public virtual Error SetStretchRegion(Iterator<ImageStretchRegion> horizontal, Iterator<ImageStretchRegion> vertical)
Parameters
Type | Name | Description |
---|---|---|
Eina.Iterator<Efl.Gfx.ImageStretchRegion> | horizontal | Representation of areas that are stretchable in the image horizontal space. |
Eina.Iterator<Efl.Gfx.ImageStretchRegion> | vertical | Representation of areas that are stretchable in the image vertical space. |
Returns
Type | Description |
---|---|
Eina.Error | Return an error code if the provided values are incorrect. |
ThawCalc()
Thaws the layout object. This function thaws (in other words "unfreezes") the given layout object.
Note: If successive freezes were done, an equal number of thaws will be required.
See also Efl.Layout.ICalc.FreezeCalc(). (Since EFL 1.22)
Declaration
public virtual int ThawCalc()
Returns
Type | Description |
---|---|
System.Int32 | The frozen state or 0 if the object is not frozen or on error. |
Unload()
Perform all necessary operations to unload file data from the object. In the case where Efl.IFile.SetMmap(Eina.File) has been externally called on an object, the file handle stored in the object will be preserved.
Calling Efl.IFile.Unload() on an object which is not currently loaded will have no effect. (Since EFL 1.22)
Declaration
public virtual void Unload()
Unpress(UInt32)
Change internal states that a button got unpressed. When the button is not pressed, this is silently ignored.
Declaration
protected virtual void Unpress(uint button)
Parameters
Type | Name | Description |
---|---|---|
System.UInt32 | button | The number of the button. FIXME ensure to have the right interval of possible input |
Events
CircularDependencyEvent
A circular dependency between parts of the object was found. (Since EFL 1.22)
Declaration
public event EventHandler<CalcCircularDependencyEventArgs> CircularDependencyEvent
Event Type
Type | Description |
---|---|
System.EventHandler<Efl.Layout.CalcCircularDependencyEventArgs> |
ClickedAnyEvent
Called when object is in sequence pressed and unpressed by any button. The button that triggered the event can be found in the event information.
Declaration
public event EventHandler<ClickableClickedAnyEventArgs> ClickedAnyEvent
Event Type
Type | Description |
---|---|
System.EventHandler<Efl.Input.ClickableClickedAnyEventArgs> |
ClickedEvent
Called when object is in sequence pressed and unpressed by the primary button
Declaration
public event EventHandler<ClickableClickedEventArgs> ClickedEvent
Event Type
Type | Description |
---|---|
System.EventHandler<Efl.Input.ClickableClickedEventArgs> |
ImagePreloadStateChangedEvent
If true
, image data has been preloaded and can be displayed. If false
, the image data has been unloaded and can no longer be displayed.
Declaration
public event EventHandler<ImageImagePreloadStateChangedEventArgs> ImagePreloadStateChangedEvent
Event Type
Type | Description |
---|---|
System.EventHandler<Efl.Gfx.ImageImagePreloadStateChangedEventArgs> |
ImageResizedEvent
Image was resized (its pixel data). The event data is the image's new size.
Declaration
public event EventHandler<ImageImageResizedEventArgs> ImageResizedEvent
Event Type
Type | Description |
---|---|
System.EventHandler<Efl.Gfx.ImageImageResizedEventArgs> |
LongpressedEvent
Called when the object receives a long press, event_info is the button that got pressed
Declaration
public event EventHandler<ClickableLongpressedEventArgs> LongpressedEvent
Event Type
Type | Description |
---|---|
System.EventHandler<Efl.Input.ClickableLongpressedEventArgs> |
PressedEvent
Called when the object is pressed, event_info is the button that got pressed
Declaration
public event EventHandler<ClickablePressedEventArgs> PressedEvent
Event Type
Type | Description |
---|---|
System.EventHandler<Efl.Input.ClickablePressedEventArgs> |
RecalcEvent
The layout was recalculated. (Since EFL 1.22)
Declaration
public event EventHandler RecalcEvent
Event Type
Type | Description |
---|---|
System.EventHandler |
UnpressedEvent
Called when the object is no longer pressed, event_info is the button that got pressed
Declaration
public event EventHandler<ClickableUnpressedEventArgs> UnpressedEvent
Event Type
Type | Description |
---|---|
System.EventHandler<Efl.Input.ClickableUnpressedEventArgs> |