int32_t mm_width; /**< physical image width in mm */
int32_t mm_height; /**< physical image height in mm */
+
+ /** WL_OUTPUT_TRANSFORM enum to apply to match native orientation */
+ uint32_t transform;
+
char *make; /**< monitor manufacturer (PNP ID) */
char *model; /**< monitor model */
char *serial_number; /**< monitor serial */
struct weston_output *
weston_head_get_output(struct weston_head *head);
+uint32_t
+weston_head_get_transform(struct weston_head *head);
+
void
weston_head_detach(struct weston_head *head);
void
weston_head_set_subpixel(struct weston_head *head,
enum wl_output_subpixel sp);
+
+void
+weston_head_set_transform(struct weston_head *head, uint32_t transform);
+
/* weston_output */
void
weston_head_set_device_changed(head);
}
+/** Store display transformation
+ *
+ * \param head The head to modify.
+ * \param transform The transformation to apply for this head
+ *
+ * This may set the device_changed flag.
+ *
+ * \ingroup head
+ * \internal
+ */
+WL_EXPORT void
+weston_head_set_transform(struct weston_head *head, uint32_t transform)
+{
+ if (head->transform == transform)
+ return;
+
+ head->transform = transform;
+
+ weston_head_set_device_changed(head);
+}
+
+
/** Store physical image size
*
* \param head The head to modify.
return head->output;
}
+/** Get the head's native transformation
+ *
+ * \param head The head to query.
+ * \return The head's native transform, as a WL_OUTPUT_TRANSFORM_* value
+ *
+ * A weston_head may have a 'native' transform provided by the backend.
+ * Examples include panels which are physically rotated, where the rotation
+ * is recorded and described as part of the system configuration. This call
+ * will return any known native transform for the head.
+ *
+ * \ingroup head
+ */
+WL_EXPORT uint32_t
+weston_head_get_transform(struct weston_head *head)
+{
+ return head->transform;
+}
+
/** Add destroy callback for a head
*
* \param head The head to watch for.