diff options
Diffstat (limited to 'xorg/server/module/rdpImageText16.c')
-rw-r--r-- | xorg/server/module/rdpImageText16.c | 71 |
1 files changed, 71 insertions, 0 deletions
diff --git a/xorg/server/module/rdpImageText16.c b/xorg/server/module/rdpImageText16.c index 984b7759..a4604433 100644 --- a/xorg/server/module/rdpImageText16.c +++ b/xorg/server/module/rdpImageText16.c @@ -32,6 +32,8 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include "rdp.h" #include "rdpDraw.h" +#include "rdpClientCon.h" +#include "rdpReg.h" #define LOG_LEVEL 1 #define LLOGLN(_level, _args) \ @@ -39,6 +41,16 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. /******************************************************************************/ void +rdpImageText16Pre(rdpPtr dev, rdpClientCon *clientCon, + int cd, RegionPtr clip_reg, + DrawablePtr pDrawable, GCPtr pGC, + int x, int y, int count, unsigned short *chars, + BoxPtr box) +{ +} + +/******************************************************************************/ +void rdpImageText16Org(DrawablePtr pDrawable, GCPtr pGC, int x, int y, int count, unsigned short *chars) { @@ -51,10 +63,69 @@ rdpImageText16Org(DrawablePtr pDrawable, GCPtr pGC, /******************************************************************************/ void +rdpImageText16Post(rdpPtr dev, rdpClientCon *clientCon, + int cd, RegionPtr clip_reg, + DrawablePtr pDrawable, GCPtr pGC, + int x, int y, int count, unsigned short *chars, + BoxPtr box) +{ + WindowPtr pDstWnd; + RegionRec reg; + + if (cd == 0) + { + return; + } + if (pDrawable->type != DRAWABLE_WINDOW) + { + return; + } + pDstWnd = (WindowPtr) pDrawable; + if (pDstWnd->viewable == FALSE) + { + return; + } + rdpRegionInit(®, box, 0); + if (cd == 2) + { + rdpRegionIntersect(®, clip_reg, ®); + } + rdpClientConAddDirtyScreenReg(dev, clientCon, ®); + RegionUninit(®); +} + +/******************************************************************************/ +void rdpImageText16(DrawablePtr pDrawable, GCPtr pGC, int x, int y, int count, unsigned short *chars) { + rdpPtr dev; + rdpClientCon *clientCon; + RegionRec clip_reg; + int cd; + BoxRec box; + LLOGLN(10, ("rdpImageText16:")); + dev = rdpGetDevFromScreen(pGC->pScreen); + GetTextBoundingBox(pDrawable, pGC->font, x, y, count, &box); + rdpRegionInit(&clip_reg, NullBox, 0); + cd = rdpDrawGetClip(dev, &clip_reg, pDrawable, pGC); + LLOGLN(10, ("rdpImageText16: cd %d", cd)); + clientCon = dev->clientConHead; + while (clientCon != NULL) + { + rdpImageText16Pre(dev, clientCon, cd, &clip_reg, pDrawable, pGC, + x, y, count, chars, &box); + clientCon = clientCon->next; + } /* do original call */ rdpImageText16Org(pDrawable, pGC, x, y, count, chars); + clientCon = dev->clientConHead; + while (clientCon != NULL) + { + rdpImageText16Post(dev, clientCon, cd, &clip_reg, pDrawable, pGC, + x, y, count, chars, &box); + clientCon = clientCon->next; + } + RegionUninit(&clip_reg); } |