X-Git-Url: http://git.nikiroo.be/?a=blobdiff_plain;f=src%2Fjexer%2Fbackend%2FScreen.java;h=2a71073176a6608b3a35d0740855e187c746d0e0;hb=12b90437b5f22c2ae6e9b9b14c3b62b60f6143e5;hp=0fbbea4cfc5c37f15b8e818dfb15028e2ae6ff3e;hpb=3e0743556d1f31723a11a6019b5c2b018b4b2104;p=nikiroo-utils.git diff --git a/src/jexer/backend/Screen.java b/src/jexer/backend/Screen.java index 0fbbea4..2a71073 100644 --- a/src/jexer/backend/Screen.java +++ b/src/jexer/backend/Screen.java @@ -3,7 +3,7 @@ * * The MIT License (MIT) * - * Copyright (C) 2017 Kevin Lamonte + * Copyright (C) 2019 Kevin Lamonte * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -159,7 +159,7 @@ public interface Screen { * @param ch character to draw * @param attr attributes to use (bold, foreColor, backColor) */ - public void putAll(final char ch, final CellAttributes attr); + public void putAll(final int ch, final CellAttributes attr); /** * Render one character with attributes. @@ -178,7 +178,7 @@ public interface Screen { * @param ch character to draw * @param attr attributes to use (bold, foreColor, backColor) */ - public void putCharXY(final int x, final int y, final char ch, + public void putCharXY(final int x, final int y, final int ch, final CellAttributes attr); /** @@ -188,7 +188,7 @@ public interface Screen { * @param y row coordinate. 0 is the top-most row. * @param ch character to draw */ - public void putCharXY(final int x, final int y, final char ch); + public void putCharXY(final int x, final int y, final int ch); /** * Render a string. Does not wrap if the string exceeds the line. @@ -221,7 +221,7 @@ public interface Screen { * @param attr attributes to use (bold, foreColor, backColor) */ public void vLineXY(final int x, final int y, final int n, - final char ch, final CellAttributes attr); + final int ch, final CellAttributes attr); /** * Draw a horizontal line from (x, y) to (x + n, y). @@ -233,7 +233,7 @@ public interface Screen { * @param attr attributes to use (bold, foreColor, backColor) */ public void hLineXY(final int x, final int y, final int n, - final char ch, final CellAttributes attr); + final int ch, final CellAttributes attr); /** * Change the width. Everything on-screen will be destroyed and must be @@ -334,6 +334,19 @@ public interface Screen { public void drawBoxShadow(final int left, final int top, final int right, final int bottom); + /** + * Clear the physical screen. + */ + public void clearPhysical(); + + /** + * Unset every image cell on one row of the physical screen, forcing + * images on that row to be redrawn. + * + * @param y row coordinate. 0 is the top-most row. + */ + public void unsetImageRow(final int y); + /** * Classes must provide an implementation to push the logical screen to * the physical device. @@ -382,4 +395,18 @@ public interface Screen { */ public void setTitle(final String title); + /** + * Get the width of a character cell in pixels. + * + * @return the width in pixels of a character cell + */ + public int getTextWidth(); + + /** + * Get the height of a character cell in pixels. + * + * @return the height in pixels of a character cell + */ + public int getTextHeight(); + }