summaryrefslogtreecommitdiff
path: root/nuttx/graphics/nxtk/nxtk_internal.h
diff options
context:
space:
mode:
Diffstat (limited to 'nuttx/graphics/nxtk/nxtk_internal.h')
-rw-r--r--nuttx/graphics/nxtk/nxtk_internal.h52
1 files changed, 52 insertions, 0 deletions
diff --git a/nuttx/graphics/nxtk/nxtk_internal.h b/nuttx/graphics/nxtk/nxtk_internal.h
index b5df23a80..2f9878a99 100644
--- a/nuttx/graphics/nxtk/nxtk_internal.h
+++ b/nuttx/graphics/nxtk/nxtk_internal.h
@@ -121,6 +121,58 @@ extern FAR const struct nx_callback_s g_nxtkcb;
EXTERN void nxtk_setsubwindows(FAR struct nxtk_framedwindow_s *fwnd);
+/****************************************************************************
+ * Name: nxtk_subwindowclip
+ *
+ * Description:
+ * Clip the src rectangle so that it lies within the sub-window bounds
+ * then move the rectangle to that it is relative to the containing
+ * window.
+ *
+ * Input parameters:
+ * fwnd - The framed window to be used
+ * dest - The locaton to put the result
+ * src - The src rectangle in relative sub-window coordinates
+ * bounds - The subwindow bounds in absolute screen coordinates.
+ *
+ * Returned value:
+ * None
+ *
+ ****************************************************************************/
+
+EXTERN void nxtk_subwindowclip(FAR struct nxtk_framedwindow_s *fwnd,
+ FAR struct nxgl_rect_s *dest,
+ FAR const struct nxgl_rect_s *src,
+ FAR const struct nxgl_rect_s *bounds);
+
+/****************************************************************************
+ * Name: nxtk_subwindowmove
+ *
+ * Description:
+ * Perform common clipping operations in preparatons for calling nx_move()
+ *
+ * Input Parameters:
+ * fwnd - The framed window within which the move is to be done.
+ * This must have been previously created by nxtk_openwindow().
+ * destrect - The loccation to receive the clipped rectangle relative
+ * to containing window
+ * destoffset - The location to received the clipped offset.
+ * srcrect - Describes the rectangular region relative to the client
+ * sub-window to move relative to the sub-window
+ * srcoffset - The offset to move the region
+ * bounds - The subwindow bounds in absolute screen coordinates.
+ *
+ * Return:
+ * OK on success; ERROR on failure with errno set appropriately
+ *
+ ****************************************************************************/
+
+EXTERN void nxtk_subwindowmove(FAR struct nxtk_framedwindow_s *fwnd,
+ FAR struct nxgl_rect_s *destrect,
+ FAR struct nxgl_point_s *destoffset,
+ FAR const struct nxgl_rect_s *srcrect,
+ FAR const struct nxgl_point_s *srcoffset,
+ FAR const struct nxgl_rect_s *bounds);
#undef EXTERN
#if defined(__cplusplus)
}