summaryrefslogtreecommitdiff
path: root/DviP.h
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2022-09-11 12:35:40 -0700
committerAlan Coopersmith <alan.coopersmith@oracle.com>2022-09-17 08:33:11 -0700
commit0d1e202f83774543aeb6e66a9dc46160e2bfff5d (patch)
tree8df4b483c51b01f3395d0b323282d1442edae924 /DviP.h
parentca9c5d01c44fe3a67389f3e6e0bcc34bac09c1c0 (diff)
Inline *Move & *Goto functions
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Diffstat (limited to 'DviP.h')
-rw-r--r--DviP.h29
1 files changed, 25 insertions, 4 deletions
diff --git a/DviP.h b/DviP.h
index f1aae33..f85abbe 100644
--- a/DviP.h
+++ b/DviP.h
@@ -243,11 +243,32 @@ typedef struct _DviRec {
DviPart dvi;
} DviRec;
+/* previously in draw.c */
+static inline void
+HorizontalMove(DviWidget dw, int delta)
+{
+ dw->dvi.state->x += delta;
+}
+
+static inline void
+HorizontalGoto(DviWidget dw, int NewPosition)
+{
+ dw->dvi.state->x = NewPosition;
+}
+
+static inline void
+VerticalMove(DviWidget dw, int delta)
+{
+ dw->dvi.state->y += delta;
+}
+
+static inline void
+VerticalGoto(DviWidget dw, int NewPosition)
+{
+ dw->dvi.state->y = NewPosition;
+}
+
/* draw.c */
-extern void HorizontalMove(DviWidget, int);
-extern void HorizontalGoto(DviWidget, int);
-extern void VerticalMove(DviWidget, int);
-extern void VerticalGoto(DviWidget, int);
extern void FlushCharCache(DviWidget);
extern void SetGCForDraw(DviWidget);
extern void DrawLine(DviWidget, int, int);