summaryrefslogtreecommitdiffstats
path: root/xorg/server/module/rdpImageText16.c
diff options
context:
space:
mode:
authorJay Sorg <jay.sorg@gmail.com>2014-01-21 01:45:30 -0800
committerJay Sorg <jay.sorg@gmail.com>2014-01-21 01:45:30 -0800
commit055c577f5497b55fd7bb597c7303aa1236b39d61 (patch)
tree666835d385b29c33f17c97dcc74f2f215f1d3afa /xorg/server/module/rdpImageText16.c
parent147ace738233435408df18415c7d802631f7fecc (diff)
downloadxrdp-proprietary-055c577f5497b55fd7bb597c7303aa1236b39d61.tar.gz
xrdp-proprietary-055c577f5497b55fd7bb597c7303aa1236b39d61.zip
xorg: work on xorg driver
Diffstat (limited to 'xorg/server/module/rdpImageText16.c')
-rw-r--r--xorg/server/module/rdpImageText16.c71
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(&reg, box, 0);
+ if (cd == 2)
+ {
+ rdpRegionIntersect(&reg, clip_reg, &reg);
+ }
+ rdpClientConAddDirtyScreenReg(dev, clientCon, &reg);
+ RegionUninit(&reg);
+}
+
+/******************************************************************************/
+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);
}