diff options
author | Derek Foreman <derekf@osg.samsung.com> | 2017-08-03 18:26:18 -0500 |
---|---|---|
committer | Derek Foreman <derekf@osg.samsung.com> | 2017-08-09 14:56:59 -0500 |
commit | 1b853dcfadfdea9e10bf4bca0ea7a24d990af68f (patch) | |
tree | b5f075b9d47705638382dcade95422bfbab50f21 /src/lib | |
parent | 70c1ce3be376ed29a25247b2d8c13e4d73edae64 (diff) |
ecore_drm2: Add ecore_drm2_output_info_get
We've got too many ways to query output information, so let's add more.
(this will soon replace all of them)
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/ecore_drm2/Ecore_Drm2.h | 15 | ||||
-rw-r--r-- | src/lib/ecore_drm2/ecore_drm2_outputs.c | 19 |
2 files changed, 34 insertions, 0 deletions
diff --git a/src/lib/ecore_drm2/Ecore_Drm2.h b/src/lib/ecore_drm2/Ecore_Drm2.h index 0468cbca5e..ef35304c35 100644 --- a/src/lib/ecore_drm2/Ecore_Drm2.h +++ b/src/lib/ecore_drm2/Ecore_Drm2.h | |||
@@ -718,6 +718,21 @@ EAPI unsigned int ecore_drm2_output_connector_type_get(Ecore_Drm2_Output *output | |||
718 | EAPI void ecore_drm2_output_resolution_get(Ecore_Drm2_Output *output, int *w, int *h, unsigned int *refresh); | 718 | EAPI void ecore_drm2_output_resolution_get(Ecore_Drm2_Output *output, int *w, int *h, unsigned int *refresh); |
719 | 719 | ||
720 | /** | 720 | /** |
721 | * Get the geometry and refresh rate for a given output | ||
722 | * | ||
723 | * @param output | ||
724 | * @param *x | ||
725 | * @param *y | ||
726 | * @param *w | ||
727 | * @param *h | ||
728 | * @param *refresh | ||
729 | * | ||
730 | * @ingroup Ecore_Drm2_Output_Group | ||
731 | * @since 1.21 | ||
732 | */ | ||
733 | EAPI void ecore_drm2_output_info_get(Ecore_Drm2_Output *output, int *x, int *y, int *w, int *h, unsigned int *refresh); | ||
734 | |||
735 | /** | ||
721 | * Get if an output can be used on a given crtc | 736 | * Get if an output can be used on a given crtc |
722 | * | 737 | * |
723 | * This function will loop the possible crtcs of an encoder to determine if | 738 | * This function will loop the possible crtcs of an encoder to determine if |
diff --git a/src/lib/ecore_drm2/ecore_drm2_outputs.c b/src/lib/ecore_drm2/ecore_drm2_outputs.c index 7c460c0c7f..f3f13081b0 100644 --- a/src/lib/ecore_drm2/ecore_drm2_outputs.c +++ b/src/lib/ecore_drm2/ecore_drm2_outputs.c | |||
@@ -1664,3 +1664,22 @@ ecore_drm2_output_blanktime_get(Ecore_Drm2_Output *output, int sequence, long *s | |||
1664 | *usec = v.reply.tval_usec; | 1664 | *usec = v.reply.tval_usec; |
1665 | return EINA_TRUE; | 1665 | return EINA_TRUE; |
1666 | } | 1666 | } |
1667 | |||
1668 | EAPI void | ||
1669 | ecore_drm2_output_info_get(Ecore_Drm2_Output *output, int *x, int *y, int *w, int *h, unsigned int *refresh) | ||
1670 | { | ||
1671 | if (x) *x = 0; | ||
1672 | if (y) *y = 0; | ||
1673 | if (w) *w = 0; | ||
1674 | if (h) *h = 0; | ||
1675 | if (refresh) *refresh = 0; | ||
1676 | |||
1677 | EINA_SAFETY_ON_NULL_RETURN(output); | ||
1678 | EINA_SAFETY_ON_TRUE_RETURN(!output->current_mode); | ||
1679 | |||
1680 | if (w) *w = output->current_mode->width; | ||
1681 | if (h) *h = output->current_mode->height; | ||
1682 | if (refresh) *refresh = output->current_mode->refresh; | ||
1683 | if (x) *x = output->x; | ||
1684 | if (y) *y = output->y; | ||
1685 | } | ||