Ecore DRM Output

Functions to manage DRM outputs. More...

## Functions

EAPI Eina_Bool | ecore_drm_outputs_create (Ecore_Drm_Device *dev)
| Creates outputs for a drm device.
EAPI void | ecore_drm_output_free (Ecore_Drm_Output *output)
| Frees an Ecore_Drm_Output.
EAPI void | ecore_drm_output_cursor_size_set (Ecore_Drm_Output *output, int handle, int w, int h)
| Sets the cursor size for Ecore_Drm_Output.
EAPI Eina_Bool | ecore_drm_output_enable (Ecore_Drm_Output *output)
| Enables a Ecore_Drm_Output.
EAPI void | ecore_drm_output_disable (Ecore_Drm_Output *output)
| Disables a Ecore_Drm_Output.
EAPI void | ecore_drm_output_size_get (Ecore_Drm_Device *dev, int output, int *w, int *h)
| Gets the output size of Ecore_Drm_Device.
EAPI unsigned int | ecore_drm_output_crtc_id_get (Ecore_Drm_Output *output)
| Gets the crtc id of an output.
EAPI unsigned int | ecore_drm_output_crtc_buffer_get (Ecore_Drm_Output *output)
| Gets the crtc buffer of an output.
EAPI unsigned int | ecore_drm_output_connector_id_get (Ecore_Drm_Output *output)
| Gets the connector id of an output.
EAPI void | ecore_drm_output_position_get (Ecore_Drm_Output *output, int *x, int *y)
| Gets the output position of Ecore_Drm_Output.
EAPI void | ecore_drm_output_current_resolution_get (Ecore_Drm_Output *output, int *w, int *h, unsigned int *refresh)
| Gets the current resolution of Ecore_Drm_Output.
EAPI void | ecore_drm_output_physical_size_get (Ecore_Drm_Output *output, int *w, int *h)
| Gets the physical size of Ecore_Drm_Output.
EAPI unsigned int | ecore_drm_output_subpixel_order_get (Ecore_Drm_Output *output)
| Gets the subpixel order of Ecore_Drm_Output.
EAPI Eina_Stringshare * | ecore_drm_output_model_get (Ecore_Drm_Output *output)
| Gets the model of Ecore_Drm_Output.
EAPI Eina_Stringshare * | ecore_drm_output_make_get (Ecore_Drm_Output *output)
| Gets the make of Ecore_Drm_Output.
EAPI char * | ecore_drm_output_name_get (Ecore_Drm_Output *output)
| Gets the name of Ecore_Drm_Output.
EAPI void | ecore_drm_output_dpms_set (Ecore_Drm_Output *output, int level)
| Sets the dpms level of an Ecore_Drm_Output.
EAPI void | ecore_drm_output_gamma_set (Ecore_Drm_Output *output, uint16_t size, uint16_t *r, uint16_t *g, uint16_t *b)
| Sets the gamma level of an Ecore_Drm_Output.
EAPI Eina_Bool | ecore_drm_output_connected_get (Ecore_Drm_Output *output)
| Gets if a given output is connected.
EAPI unsigned int | ecore_drm_output_connector_type_get (Ecore_Drm_Output *output)
| Gets the connector type of a given Ecore_Drm_Output.
EAPI Eina_Bool | ecore_drm_output_backlight_get (Ecore_Drm_Output *output)
| Gets if a given output has a backlight.
EAPI char * | ecore_drm_output_edid_get (Ecore_Drm_Output *output)
| Gets the edid of a given output.
EAPI Eina_List * | ecore_drm_output_modes_get (Ecore_Drm_Output *output)
| Gets a list of the modes supported on a given output.
EAPI Ecore_Drm_Output * | ecore_drm_output_primary_get (Ecore_Drm_Device *dev)
| Gets the output which is marked as primary.
EAPI void | ecore_drm_output_primary_set (Ecore_Drm_Output *output)
| Sets a given output as primary.
EAPI void | ecore_drm_output_crtc_size_get (Ecore_Drm_Output *output, int *width, int *height)
| Gets the size of the crtc for a given output.
EAPI Eina_Bool | ecore_drm_output_possible_crtc_get (Ecore_Drm_Output *output, unsigned int crtc)
| Gets if an Ecore_Drm_Output can be used on a given crtc.
EAPI Eina_Bool | ecore_drm_output_mode_set (Ecore_Drm_Output *output, Ecore_Drm_Output_Mode *mode, int x, int y)
| Sets a given mode to be used on an Ecore_Drm_Output.

## Detailed Description

Functions to manage DRM outputs.

## Function Documentation

## ecore_drm_outputs_create()

EAPI Eina_Bool ecore_drm_outputs_create | ( | Ecore_Drm_Device * | dev | ) |

Creates outputs for a drm device.

This function will create outputs for Ecore_Drm_Device.

Parameters

  dev | The Ecore_Drm_Device device for which outputs needs to be created

Returns
  EINA_TRUE on success, EINA_FALSE on failure.

References EINA_FALSE, EINA_SAFETY_ON_NULL_RETURN_VAL, EINA_SAFETY_ON_TRUE_RETURN_VAL, EINA_TRUE, and ERR.

## ecore_drm_output_free()

EAPI void ecore_drm_output_free | ( | Ecore_Drm_Output * | output | ) |

Frees an Ecore_Drm_Output.

This function will cleanup and free any previously allocated Ecore_Drm_Output.

Parameters

  output | The Ecore_Drm_Output to free

## ecore_drm_output_cursor_size_set()

EAPI void ecore_drm_output_cursor_size_set | ( | Ecore_Drm_Output * | output,
|  | int | handle,
|  | int | w,
|  | int | h )

Sets the cursor size for Ecore_Drm_Output.

This function will set the cursor size of Ecore_Drm_Output.

Parameters

  output | The Ecore_Drm_Output to set
  handle | The Drm handle
  w | The width of cursor
  h | The height of cursor

References EINA_SAFETY_ON_NULL_RETURN.

## ecore_drm_output_enable()

EAPI Eina_Bool ecore_drm_output_enable | ( | Ecore_Drm_Output * | output | ) |

Enables a Ecore_Drm_Output.

This function will enable an Ecore_Drm_Output

Parameters

  output | The Ecore_Drm_Output to enable

Since
  1.14

References ecore_drm_output_dpms_set(), EINA_FALSE, EINA_SAFETY_ON_NULL_RETURN_VAL, and EINA_TRUE.

## ecore_drm_output_disable()

EAPI void ecore_drm_output_disable | ( | Ecore_Drm_Output * | output | ) |

Disables a Ecore_Drm_Output.

This function will disable an Ecore_Drm_Output

Parameters

  output | The Ecore_Drm_Output to disable

Since
  1.14

References ecore_drm_output_dpms_set(), EINA_FALSE, and EINA_SAFETY_ON_NULL_RETURN.

## ecore_drm_output_size_get()

EAPI void ecore_drm_output_size_get | ( | Ecore_Drm_Device * | dev,
|  | int | output,
|  | int * | w,
|  | int * | h )

Gets the output size of Ecore_Drm_Device.

This function will give the output size of Ecore_Drm_Device.

Parameters

  dev | The Ecore_Drm_Device to get output size
  output | The output id whose information needs to be retrieved
  *w | The parameter in which output width is stored
  *h | The parameter in which output height is stored

References EINA_SAFETY_ON_NULL_RETURN.

## ecore_drm_output_crtc_id_get()

EAPI unsigned int ecore_drm_output_crtc_id_get | ( | Ecore_Drm_Output * | output | ) |

Gets the crtc id of an output.

This function will return the default crtc id for an output.

Parameters

  output | The Ecore_Drm_Output to get the default crtc of

Returns
  The id of the default crtc for this output

Since
  1.14

References EINA_SAFETY_ON_NULL_RETURN_VAL.

## ecore_drm_output_crtc_buffer_get()

EAPI unsigned int ecore_drm_output_crtc_buffer_get | ( | Ecore_Drm_Output * | output | ) |

Gets the crtc buffer of an output.

This function will return the default buffer id for an output.

Parameters

  output | The Ecore_Drm_Output to get the default buffer of

Returns
  The id of the default buffer for this output

Since
  1.14

References EINA_SAFETY_ON_NULL_RETURN_VAL.

## ecore_drm_output_connector_id_get()

EAPI unsigned int ecore_drm_output_connector_id_get | ( | Ecore_Drm_Output * | output | ) |

Gets the connector id of an output.

This function will return the default connector id for an output.

Parameters

  output | The Ecore_Drm_Output to get the default connector of

Returns
  The id of the default connector id for this output

Since
  1.14

References EINA_SAFETY_ON_NULL_RETURN_VAL.

## ecore_drm_output_position_get()

EAPI void ecore_drm_output_position_get | ( | Ecore_Drm_Output * | output,
|  | int * | x,
|  | int * | y )

Gets the output position of Ecore_Drm_Output.

This function will give the output position of Ecore_Drm_Output.

Parameters

  output | The Ecore_Drm_Output to get position for
  *x | The parameter in which output x co-ordinate is stored
  *y | The parameter in which output y co-ordinate is stored

Since
  1.14

References EINA_SAFETY_ON_NULL_RETURN.

## ecore_drm_output_current_resolution_get()

EAPI void ecore_drm_output_current_resolution_get | ( | Ecore_Drm_Output * | output,
|  | int * | w,
|  | int * | h,
|  | unsigned int * | refresh )

Gets the current resolution of Ecore_Drm_Output.

This function will give the current resolution of Ecore_Drm_Output.

Parameters

  output | The Ecore_Drm_Output to get resolution for
  *w | The parameter in which output width is stored
  *h | The parameter in which output height is stored
  *refresh | The parameter in which output refresh rate is stored

Since
  1.14

References EINA_SAFETY_ON_NULL_RETURN.

## ecore_drm_output_physical_size_get()

EAPI void ecore_drm_output_physical_size_get | ( | Ecore_Drm_Output * | output,
|  | int * | w,
|  | int * | h )

Gets the physical size of Ecore_Drm_Output.

This function will give the physical size (in mm) of Ecore_Drm_Output.

Parameters

  output | The Ecore_Drm_Output to get physical size for
  *w | The parameter in which output physical width is stored
  *h | The parameter in which output physical height is stored

Since
  1.14

References EINA_SAFETY_ON_NULL_RETURN.

## ecore_drm_output_subpixel_order_get()

EAPI unsigned int ecore_drm_output_subpixel_order_get | ( | Ecore_Drm_Output * | output | ) |

Gets the subpixel order of Ecore_Drm_Output.

This function will give the subpixel order of Ecore_Drm_Output.

Parameters

  output | The Ecore_Drm_Output to get subpixel order for

Returns
  The output subpixel order

Since
  1.14

References EINA_SAFETY_ON_NULL_RETURN_VAL.

## ecore_drm_output_model_get()

EAPI Eina_Stringshare * ecore_drm_output_model_get | ( | Ecore_Drm_Output * | output | ) |

Gets the model of Ecore_Drm_Output.

This function will give the model of Ecore_Drm_Output.

Parameters

  output | The Ecore_Drm_Output to get model for

Returns
  The model (do NOT eina_stringshare_del this return!)

Since
  1.14

References EINA_SAFETY_ON_NULL_RETURN_VAL.

## ecore_drm_output_make_get()

EAPI Eina_Stringshare * ecore_drm_output_make_get | ( | Ecore_Drm_Output * | output | ) |

Gets the make of Ecore_Drm_Output.

This function will give the make of Ecore_Drm_Output.

Parameters

  output | The Ecore_Drm_Output to get model for

Returns
  The make (do NOT eina_stringshare_del this return!)

Since
  1.14

References EINA_SAFETY_ON_NULL_RETURN_VAL.

## ecore_drm_output_name_get()

EAPI char * ecore_drm_output_name_get | ( | Ecore_Drm_Output * | output | ) |

Gets the name of Ecore_Drm_Output.

This function will give the name of Ecore_Drm_Output.

Parameters

  output | The Ecore_Drm_Output to get name for

Returns
  The name. Caller should free this return.

Since
  1.15

References EINA_SAFETY_ON_NULL_RETURN_VAL.

## ecore_drm_output_dpms_set()

EAPI void ecore_drm_output_dpms_set | ( | Ecore_Drm_Output * | output,
|  | int | level )

Sets the dpms level of an Ecore_Drm_Output.

This function will set the DPMS level of an Ecore_Drm_Output.

Parameters

  output | The Ecore_Drm_Output to set the dpms level on
  level | The level to set

Since
  1.14

References EINA_SAFETY_ON_NULL_RETURN.

Referenced by ecore_drm_output_disable(), and ecore_drm_output_enable().

## ecore_drm_output_gamma_set()

EAPI void ecore_drm_output_gamma_set | ( | Ecore_Drm_Output * | output,
|  | uint16_t | size,
|  | uint16_t * | r,
|  | uint16_t * | g,
|  | uint16_t * | b )

Sets the gamma level of an Ecore_Drm_Output.

This function will set the gamma of an Ecore_Drm_Output.

Parameters

  output | The Ecore_Drm_Output to set the gamma level on
  size | The gamma table size to set
  r | The amount to scale the red channel
  g | The amount to scale the green channel
  b | The amount to scale the blue channel

Since
  1.14

References EINA_SAFETY_ON_NULL_RETURN, and ERR.

## ecore_drm_output_connected_get()

EAPI Eina_Bool ecore_drm_output_connected_get | ( | Ecore_Drm_Output * | output | ) |

Gets if a given output is connected.

Parameters

  output | The Ecore_Drm_Output to get the connected status of

Returns
  EINA_TRUE if output is connected, EINA_FALSE otherwise

Since
  1.15

References EINA_FALSE, and EINA_SAFETY_ON_NULL_RETURN_VAL.

## ecore_drm_output_connector_type_get()

EAPI unsigned int ecore_drm_output_connector_type_get | ( | Ecore_Drm_Output * | output | ) |

Gets the connector type of a given Ecore_Drm_Output.

Parameters

  output | The Ecore_Drm_Output to get the connector type of

Returns
  An unsigned integer representing the type of connector for this output

Since
  1.15

References EINA_SAFETY_ON_NULL_RETURN_VAL.

## ecore_drm_output_backlight_get()

EAPI Eina_Bool ecore_drm_output_backlight_get | ( | Ecore_Drm_Output * | output | ) |

Gets if a given output has a backlight.

Parameters

  output | The Ecore_Drm_Output to get the backlight of

Returns
  EINA_TRUE if this output has a backlight, EINA_FALSE otherwise

Since
  1.15

References EINA_FALSE, and EINA_SAFETY_ON_NULL_RETURN_VAL.

## ecore_drm_output_edid_get()

EAPI char * ecore_drm_output_edid_get | ( | Ecore_Drm_Output * | output | ) |

Gets the edid of a given output.

Parameters

  output | The Ecore_Drm_Output to get the edid of

Returns
  A string representing the edid

Since
  1.15

References EINA_SAFETY_ON_NULL_RETURN_VAL.

## ecore_drm_output_modes_get()

EAPI Eina_List * ecore_drm_output_modes_get | ( | Ecore_Drm_Output * | output | ) |

Gets a list of the modes supported on a given output.

Parameters

  output | The Ecore_Drm_Output to get the modes for

Returns
  An Eina_List of the modes supported for this output

Note
  The returned list should not be freed

Since
  1.15

References EINA_SAFETY_ON_NULL_RETURN_VAL.

## ecore_drm_output_primary_get()

EAPI Ecore_Drm_Output * ecore_drm_output_primary_get | ( | Ecore_Drm_Device * | dev | ) |

Gets the output which is marked as primary.

Parameters

  dev | The Ecore_Drm_Device to get the primary output from

Returns
  The primary Ecore_Drm_Output or NULL if no primary output is set

Since
  1.15

References EINA_LIST_FOREACH, and EINA_SAFETY_ON_NULL_RETURN_VAL.

## ecore_drm_output_primary_set()

EAPI void ecore_drm_output_primary_set | ( | Ecore_Drm_Output * | output | ) |

Sets a given output as primary.

Parameters

  output | The Ecore_Drm_Output to set as primary

Since
  1.15

References EINA_FALSE, EINA_LIST_FOREACH, EINA_SAFETY_ON_NULL_RETURN, and EINA_TRUE.

## ecore_drm_output_crtc_size_get()

EAPI void ecore_drm_output_crtc_size_get | ( | Ecore_Drm_Output * | output,
|  | int * | width,
|  | int * | height )

Gets the size of the crtc for a given output.

Parameters

  output | The Ecore_Drm_Output to get the crtc size of
  *width | The parameter in which width is stored
  *height | The parameter in which height is stored

Since
  1.15

References EINA_SAFETY_ON_NULL_RETURN.

## ecore_drm_output_possible_crtc_get()

EAPI Eina_Bool ecore_drm_output_possible_crtc_get | ( | Ecore_Drm_Output * | output,
|  | unsigned int | crtc )

Gets if an Ecore_Drm_Output can be used on a given crtc.

This function will loop the possible crtcs of an encoder to determine if a given output can be assigned to a given crtc

Parameters

  output | The Ecore_Drm_Output to test if can be used on crtc
  crtc | The crtc to test an Ecore_Drm_Output against

Returns
  `EINA_TRUE` if the output can be assigned to given crtc, `EINA_FALSE` otherwise

Since
  1.15

References EINA_FALSE, EINA_SAFETY_ON_NULL_RETURN_VAL, EINA_SAFETY_ON_TRUE_RETURN_VAL, EINA_TRUE, ERR, and WRN.

## ecore_drm_output_mode_set()

EAPI Eina_Bool ecore_drm_output_mode_set | ( | Ecore_Drm_Output * | output,
|  | Ecore_Drm_Output_Mode * | mode,
|  | int | x,
|  | int | y )

Sets a given mode to be used on an Ecore_Drm_Output.

This function will set the given mode to be used on a given Ecore_Drm_Output

Parameters

  output | The Ecore_Drm_Output to set the mode on
  mode | A valid Ecore_Drm_Output_Mode to set or NULL to disable the output
  x | The X position to set this output to
  y | The Y position to set this output to

Returns
  `EINA_TRUE` on success, `EINA_FALSE` on failure

Since
  1.15

References EINA_FALSE, EINA_SAFETY_ON_NULL_RETURN_VAL, EINA_TRUE, and ERR.