work on xorg driver

ulab-next
Jay Sorg 11 years ago
parent 33e6c7a834
commit 36f31ec317

@ -46,6 +46,21 @@ Client connection to xrdp
#define LTOUI32(_in) ((unsigned int)(_in))
#define COLOR8(r, g, b) \
((((r) >> 5) << 0) | (((g) >> 5) << 3) | (((b) >> 6) << 6))
#define COLOR15(r, g, b) \
((((r) >> 3) << 10) | (((g) >> 3) << 5) | (((b) >> 3) << 0))
#define COLOR16(r, g, b) \
((((r) >> 3) << 11) | (((g) >> 2) << 5) | (((b) >> 3) << 0))
#define COLOR24(r, g, b) \
((((r) >> 0) << 0) | (((g) >> 0) << 8) | (((b) >> 0) << 16))
#define SPLITCOLOR32(r, g, b, c) \
do { \
r = ((c) >> 16) & 0xff; \
g = ((c) >> 8) & 0xff; \
b = (c) & 0xff; \
} while (0)
#define USE_MAX_OS_BYTES 1
#define MAX_OS_BYTES (16 * 1024 * 1024)
@ -545,7 +560,11 @@ rdpClientConProcessMsgClientInput(rdpPtr dev, rdpClientCon *clientCon)
static int
rdpClientConProcessMsgClientInfo(rdpPtr dev, rdpClientCon *clientCon)
{
struct stream *s;
LLOGLN(0, ("rdpClientConProcessMsgClientInfo:"));
s = clientCon->in_s;
g_hexdump(s->p, s->end - s->p);
return 0;
}
@ -553,7 +572,11 @@ rdpClientConProcessMsgClientInfo(rdpPtr dev, rdpClientCon *clientCon)
static int
rdpClientConProcessMsgClientRegion(rdpPtr dev, rdpClientCon *clientCon)
{
struct stream *s;
LLOGLN(0, ("rdpClientConProcessMsgClientRegion:"));
s = clientCon->in_s;
g_hexdump(s->p, s->end - s->p);
return 0;
}
@ -925,21 +948,6 @@ rdpClientConResetClip(rdpPtr dev, rdpClientCon *clientCon)
return 0;
}
#define COLOR8(r, g, b) \
((((r) >> 5) << 0) | (((g) >> 5) << 3) | (((b) >> 6) << 6))
#define COLOR15(r, g, b) \
((((r) >> 3) << 10) | (((g) >> 3) << 5) | (((b) >> 3) << 0))
#define COLOR16(r, g, b) \
((((r) >> 3) << 11) | (((g) >> 2) << 5) | (((b) >> 3) << 0))
#define COLOR24(r, g, b) \
((((r) >> 0) << 0) | (((g) >> 0) << 8) | (((b) >> 0) << 16))
#define SPLITCOLOR32(r, g, b, c) \
{ \
r = ((c) >> 16) & 0xff; \
g = ((c) >> 8) & 0xff; \
b = (c) & 0xff; \
}
/******************************************************************************/
int
rdpClientConConvertPixel(rdpPtr dev, rdpClientCon *clientCon, int in_pixel)

@ -1,5 +1,5 @@
/*
Copyright 2005-2013 Jay Sorg
Copyright 2005-2014 Jay Sorg
Permission to use, copy, modify, distribute, and sell this software and its
documentation for any purpose is hereby granted without fee, provided that

@ -1,5 +1,5 @@
/*
Copyright 2005-2013 Jay Sorg
Copyright 2005-2014 Jay Sorg
Permission to use, copy, modify, distribute, and sell this software and its
documentation for any purpose is hereby granted without fee, provided that

@ -1,5 +1,5 @@
/*
Copyright 2005-2013 Jay Sorg
Copyright 2005-2014 Jay Sorg
Permission to use, copy, modify, distribute, and sell this software and its
documentation for any purpose is hereby granted without fee, provided that

@ -1,5 +1,5 @@
/*
Copyright 2005-2013 Jay Sorg
Copyright 2005-2014 Jay Sorg
Permission to use, copy, modify, distribute, and sell this software and its
documentation for any purpose is hereby granted without fee, provided that

@ -1,5 +1,5 @@
/*
Copyright 2005-2013 Jay Sorg
Copyright 2005-2014 Jay Sorg
Permission to use, copy, modify, distribute, and sell this software and its
documentation for any purpose is hereby granted without fee, provided that

@ -1,5 +1,5 @@
/*
Copyright 2005-2013 Jay Sorg
Copyright 2005-2014 Jay Sorg
Permission to use, copy, modify, distribute, and sell this software and its
documentation for any purpose is hereby granted without fee, provided that

@ -1,5 +1,5 @@
/*
Copyright 2005-2013 Jay Sorg
Copyright 2005-2014 Jay Sorg
Permission to use, copy, modify, distribute, and sell this software and its
documentation for any purpose is hereby granted without fee, provided that

@ -1,5 +1,5 @@
/*
Copyright 2005-2013 Jay Sorg
Copyright 2005-2014 Jay Sorg
Permission to use, copy, modify, distribute, and sell this software and its
documentation for any purpose is hereby granted without fee, provided that

@ -1,5 +1,5 @@
/*
Copyright 2005-2013 Jay Sorg
Copyright 2005-2014 Jay Sorg
Permission to use, copy, modify, distribute, and sell this software and its
documentation for any purpose is hereby granted without fee, provided that

@ -1,5 +1,5 @@
/*
Copyright 2005-2013 Jay Sorg
Copyright 2005-2014 Jay Sorg
Permission to use, copy, modify, distribute, and sell this software and its
documentation for any purpose is hereby granted without fee, provided that

@ -1,5 +1,5 @@
/*
Copyright 2005-2013 Jay Sorg
Copyright 2005-2014 Jay Sorg
Permission to use, copy, modify, distribute, and sell this software and its
documentation for any purpose is hereby granted without fee, provided that

@ -1,5 +1,5 @@
/*
Copyright 2005-2013 Jay Sorg
Copyright 2005-2014 Jay Sorg
Permission to use, copy, modify, distribute, and sell this software and its
documentation for any purpose is hereby granted without fee, provided that

@ -1,5 +1,5 @@
/*
Copyright 2005-2013 Jay Sorg
Copyright 2005-2014 Jay Sorg
Permission to use, copy, modify, distribute, and sell this software and its
documentation for any purpose is hereby granted without fee, provided that

@ -1,5 +1,5 @@
/*
Copyright 2005-2013 Jay Sorg
Copyright 2005-2014 Jay Sorg
Permission to use, copy, modify, distribute, and sell this software and its
documentation for any purpose is hereby granted without fee, provided that

@ -1,5 +1,5 @@
/*
Copyright 2005-2013 Jay Sorg
Copyright 2005-2014 Jay Sorg
Permission to use, copy, modify, distribute, and sell this software and its
documentation for any purpose is hereby granted without fee, provided that

@ -1,5 +1,5 @@
/*
Copyright 2012-2013 Jay Sorg
Copyright 2012-2014 Jay Sorg
Permission to use, copy, modify, distribute, and sell this software and its
documentation for any purpose is hereby granted without fee, provided that

@ -1,5 +1,5 @@
/*
Copyright 2005-2013 Jay Sorg
Copyright 2005-2014 Jay Sorg
Permission to use, copy, modify, distribute, and sell this software and its
documentation for any purpose is hereby granted without fee, provided that

@ -1,5 +1,5 @@
/*
Copyright 2005-2013 Jay Sorg
Copyright 2005-2014 Jay Sorg
Permission to use, copy, modify, distribute, and sell this software and its
documentation for any purpose is hereby granted without fee, provided that

@ -1,5 +1,5 @@
/*
Copyright 2005-2013 Jay Sorg
Copyright 2005-2014 Jay Sorg
Permission to use, copy, modify, distribute, and sell this software and its
documentation for any purpose is hereby granted without fee, provided that

@ -1,5 +1,5 @@
/*
Copyright 2005-2013 Jay Sorg
Copyright 2005-2014 Jay Sorg
Permission to use, copy, modify, distribute, and sell this software and its
documentation for any purpose is hereby granted without fee, provided that

@ -1,5 +1,5 @@
/*
Copyright 2005-2013 Jay Sorg
Copyright 2005-2014 Jay Sorg
Permission to use, copy, modify, distribute, and sell this software and its
documentation for any purpose is hereby granted without fee, provided that

@ -1,5 +1,5 @@
/*
Copyright 2005-2013 Jay Sorg
Copyright 2005-2014 Jay Sorg
Permission to use, copy, modify, distribute, and sell this software and its
documentation for any purpose is hereby granted without fee, provided that

@ -1,5 +1,5 @@
/*
Copyright 2013 Jay Sorg
Copyright 2013-2014 Jay Sorg
Permission to use, copy, modify, distribute, and sell this software and its
documentation for any purpose is hereby granted without fee, provided that

@ -1,5 +1,5 @@
/*
Copyright 2013 Jay Sorg
Copyright 2013-2014 Jay Sorg
Permission to use, copy, modify, distribute, and sell this software and its
documentation for any purpose is hereby granted without fee, provided that

@ -1,5 +1,5 @@
/*
Copyright 2013 Jay Sorg
Copyright 2013-2014 Jay Sorg
Permission to use, copy, modify, distribute, and sell this software and its
documentation for any purpose is hereby granted without fee, provided that

@ -1,5 +1,5 @@
/*
Copyright 2013 Jay Sorg
Copyright 2013-2014 Jay Sorg
Permission to use, copy, modify, distribute, and sell this software and its
documentation for any purpose is hereby granted without fee, provided that

@ -373,7 +373,7 @@ g_chmod_hex(const char *filename, int flags)
/*****************************************************************************/
/* produce a hex dump */
void
g_hexdump(unsigned char *p, unsigned int len)
g_hexdump(void *p, long len)
{
unsigned char *line;
int i;
@ -381,9 +381,9 @@ g_hexdump(unsigned char *p, unsigned int len)
int offset;
offset = 0;
line = p;
line = (unsigned char *) p;
while (offset < len)
while (offset < (int) len)
{
ErrorF("%04x ", offset);
thisline = len - offset;

@ -1,5 +1,5 @@
/*
Copyright 2005-2013 Jay Sorg
Copyright 2005-2014 Jay Sorg
Permission to use, copy, modify, distribute, and sell this software and its
documentation for any purpose is hereby granted without fee, provided that
@ -75,7 +75,7 @@ g_directory_exist(const char *dirname);
int
g_chmod_hex(const char *filename, int flags);
void
g_hexdump(unsigned char *p, unsigned int len);
g_hexdump(void *p, long len);
#if defined(X_BYTE_ORDER)
# if X_BYTE_ORDER == X_LITTLE_ENDIAN

@ -1,5 +1,5 @@
/*
Copyright 2005-2013 Jay Sorg
Copyright 2005-2014 Jay Sorg
Permission to use, copy, modify, distribute, and sell this software and its
documentation for any purpose is hereby granted without fee, provided that
@ -27,6 +27,7 @@ pixmap calls
/* this should be before all X11 .h files */
#include <xorg-server.h>
#include <xorgVersion.h>
/* all driver need this */
#include <xf86.h>
@ -34,12 +35,19 @@ pixmap calls
#include "rdp.h"
#include "rdpDraw.h"
#include "rdpPixmap.h"
#ifndef XRDP_PIX
#warning XRDP_PIX not defined
#endif
/******************************************************************************/
#define LOG_LEVEL 1
#define LLOGLN(_level, _args) \
do { if (_level < LOG_LEVEL) { ErrorF _args ; ErrorF("\n"); } } while (0)
#if XRDP_PIX == 2
/*****************************************************************************/
PixmapPtr
rdpCreatePixmap(ScreenPtr pScreen, int width, int height, int depth,
@ -57,6 +65,26 @@ rdpCreatePixmap(ScreenPtr pScreen, int width, int height, int depth,
return rv;
}
#else
/*****************************************************************************/
PixmapPtr
rdpCreatePixmap(ScreenPtr pScreen, int width, int height, int depth)
{
rdpPtr dev;
PixmapPtr rv;
LLOGLN(10, ("rdpCreatePixmap: width %d height %d depth %d",
width, height, depth));
dev = rdpGetDevFromScreen(pScreen);
pScreen->CreatePixmap = dev->CreatePixmap;
rv = pScreen->CreatePixmap(pScreen, width, height, depth);
pScreen->CreatePixmap = rdpCreatePixmap;
return rv;
}
#endif
/******************************************************************************/
Bool
rdpDestroyPixmap(PixmapPtr pPixmap)

@ -1,5 +1,5 @@
/*
Copyright 2005-2013 Jay Sorg
Copyright 2005-2014 Jay Sorg
Permission to use, copy, modify, distribute, and sell this software and its
documentation for any purpose is hereby granted without fee, provided that
@ -24,9 +24,30 @@ pixmap calls
#ifndef __RDPPIXMAP_H
#define __RDPPIXAMP_H
#ifndef XORG_VERSION_NUMERIC
#warning XORG_VERSION_NUMERIC not defined, need #include <xorgVersion.h>
#endif
#ifndef XORG_VERSION_CURRENT
#warning XORG_VERSION_CURRENT not defined
#endif
#if XORG_VERSION_CURRENT < XORG_VERSION_NUMERIC(1, 5, 0, 0, 0)
/* 1.1, 1.2, 1.3, 1.4 */
#define XRDP_PIX 1
#else
/* 1.5, 1.6, 1.7, 1.8, 1.9, 1.10, 1.11, 1.12 */
#define XRDP_PIX 2
#endif
#if XRDP_PIX == 2
PixmapPtr
rdpCreatePixmap(ScreenPtr pScreen, int width, int height, int depth,
unsigned usage_hint);
#else
PixmapPtr
rdpCreatePixmap(ScreenPtr pScreen, int width, int height, int depth);
#endif
Bool
rdpDestroyPixmap(PixmapPtr pPixmap);
Bool

@ -1,5 +1,5 @@
/*
Copyright 2005-2013 Jay Sorg
Copyright 2005-2014 Jay Sorg
Permission to use, copy, modify, distribute, and sell this software and its
documentation for any purpose is hereby granted without fee, provided that

@ -1,5 +1,5 @@
/*
Copyright 2005-2013 Jay Sorg
Copyright 2005-2014 Jay Sorg
Permission to use, copy, modify, distribute, and sell this software and its
documentation for any purpose is hereby granted without fee, provided that

@ -1,5 +1,5 @@
/*
Copyright 2005-2013 Jay Sorg
Copyright 2005-2014 Jay Sorg
Permission to use, copy, modify, distribute, and sell this software and its
documentation for any purpose is hereby granted without fee, provided that

@ -1,5 +1,5 @@
/*
Copyright 2005-2013 Jay Sorg
Copyright 2005-2014 Jay Sorg
Permission to use, copy, modify, distribute, and sell this software and its
documentation for any purpose is hereby granted without fee, provided that

@ -1,5 +1,5 @@
/*
Copyright 2005-2013 Jay Sorg
Copyright 2005-2014 Jay Sorg
Permission to use, copy, modify, distribute, and sell this software and its
documentation for any purpose is hereby granted without fee, provided that

@ -1,5 +1,5 @@
/*
Copyright 2005-2013 Jay Sorg
Copyright 2005-2014 Jay Sorg
Permission to use, copy, modify, distribute, and sell this software and its
documentation for any purpose is hereby granted without fee, provided that

@ -1,5 +1,5 @@
/*
Copyright 2005-2013 Jay Sorg
Copyright 2005-2014 Jay Sorg
Permission to use, copy, modify, distribute, and sell this software and its
documentation for any purpose is hereby granted without fee, provided that

@ -1,5 +1,5 @@
/*
Copyright 2005-2013 Jay Sorg
Copyright 2005-2014 Jay Sorg
Permission to use, copy, modify, distribute, and sell this software and its
documentation for any purpose is hereby granted without fee, provided that

@ -1,5 +1,5 @@
/*
Copyright 2005-2013 Jay Sorg
Copyright 2005-2014 Jay Sorg
Permission to use, copy, modify, distribute, and sell this software and its
documentation for any purpose is hereby granted without fee, provided that

@ -1,5 +1,5 @@
/*
Copyright 2005-2013 Jay Sorg
Copyright 2005-2014 Jay Sorg
Permission to use, copy, modify, distribute, and sell this software and its
documentation for any purpose is hereby granted without fee, provided that

@ -1,5 +1,5 @@
/*
Copyright 2005-2013 Jay Sorg
Copyright 2005-2014 Jay Sorg
Permission to use, copy, modify, distribute, and sell this software and its
documentation for any purpose is hereby granted without fee, provided that

@ -1,5 +1,5 @@
/*
Copyright 2005-2013 Jay Sorg
Copyright 2005-2014 Jay Sorg
Permission to use, copy, modify, distribute, and sell this software and its
documentation for any purpose is hereby granted without fee, provided that

@ -1,5 +1,5 @@
/*
Copyright 2005-2013 Jay Sorg
Copyright 2005-2014 Jay Sorg
Permission to use, copy, modify, distribute, and sell this software and its
documentation for any purpose is hereby granted without fee, provided that

@ -1,5 +1,5 @@
/*
Copyright 2005-2013 Jay Sorg
Copyright 2005-2014 Jay Sorg
Permission to use, copy, modify, distribute, and sell this software and its
documentation for any purpose is hereby granted without fee, provided that

@ -1,5 +1,5 @@
/*
Copyright 2005-2013 Jay Sorg
Copyright 2005-2014 Jay Sorg
Permission to use, copy, modify, distribute, and sell this software and its
documentation for any purpose is hereby granted without fee, provided that

@ -1,5 +1,5 @@
/*
Copyright 2005-2013 Jay Sorg
Copyright 2005-2014 Jay Sorg
Permission to use, copy, modify, distribute, and sell this software and its
documentation for any purpose is hereby granted without fee, provided that

@ -1,5 +1,5 @@
/*
Copyright 2013 Jay Sorg
Copyright 2013-2014 Jay Sorg
Permission to use, copy, modify, distribute, and sell this software and its
documentation for any purpose is hereby granted without fee, provided that
@ -27,6 +27,7 @@ to deal with privates changing in xorg versions
/* this should be before all X11 .h files */
#include <xorg-server.h>
#include <xorgVersion.h>
/* all driver need this */
#include <xf86.h>
@ -40,10 +41,10 @@ to deal with privates changing in xorg versions
#include "rdpPri.h"
#include "rdpMisc.h"
#if XORG_VERSION_CURRENT < (((1) * 10000000) + ((5) * 100000) + ((0) * 1000) + 0)
#if XORG_VERSION_CURRENT < XORG_VERSION_NUMERIC(1, 5, 0, 0, 0)
/* 1.1, 1.2, 1.3, 1.4 */
#define XRDP_PRI 1
#elif XORG_VERSION_CURRENT < (((1) * 10000000) + ((9) * 100000) + ((0) * 1000) + 0)
#elif XORG_VERSION_CURRENT < XORG_VERSION_NUMERIC(1, 9, 0, 0, 0)
/* 1.5, 1.6, 1.7, 1.8 */
#define XRDP_PRI 2
#else

@ -1,5 +1,5 @@
/*
Copyright 2005-2013 Jay Sorg
Copyright 2005-2014 Jay Sorg
Permission to use, copy, modify, distribute, and sell this software and its
documentation for any purpose is hereby granted without fee, provided that

@ -1,5 +1,5 @@
/*
Copyright 2005-2013 Jay Sorg
Copyright 2005-2014 Jay Sorg
Permission to use, copy, modify, distribute, and sell this software and its
documentation for any purpose is hereby granted without fee, provided that

@ -1,5 +1,5 @@
/*
Copyright 2005-2013 Jay Sorg
Copyright 2005-2014 Jay Sorg
Permission to use, copy, modify, distribute, and sell this software and its
documentation for any purpose is hereby granted without fee, provided that

@ -1,5 +1,5 @@
/*
Copyright 2005-2013 Jay Sorg
Copyright 2005-2014 Jay Sorg
Permission to use, copy, modify, distribute, and sell this software and its
documentation for any purpose is hereby granted without fee, provided that

@ -1,5 +1,5 @@
/*
Copyright 2011-2013 Jay Sorg
Copyright 2011-2014 Jay Sorg
Permission to use, copy, modify, distribute, and sell this software and its
documentation for any purpose is hereby granted without fee, provided that

@ -1,5 +1,5 @@
/*
Copyright 2011-2013 Jay Sorg
Copyright 2011-2014 Jay Sorg
Permission to use, copy, modify, distribute, and sell this software and its
documentation for any purpose is hereby granted without fee, provided that

@ -1,5 +1,5 @@
/*
Copyright 2013 Jay Sorg
Copyright 2013-2014 Jay Sorg
Permission to use, copy, modify, distribute, and sell this software and its
documentation for any purpose is hereby granted without fee, provided that
@ -27,6 +27,7 @@ to deal with regions changing in xorg versions
/* this should be before all X11 .h files */
#include <xorg-server.h>
#include <xorgVersion.h>
/* all driver need this */
#include <xf86.h>
@ -49,7 +50,7 @@ miRegionReset -> RegionReset
miRegionBreak -> RegionBreak
*/
#if XORG_VERSION_CURRENT < (((1) * 10000000) + ((9) * 100000) + ((0) * 1000) + 0)
#if XORG_VERSION_CURRENT < XORG_VERSION_NUMERIC(1, 9, 0, 0, 0)
/* 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7, 1.8 */
#define XRDP_REG 1
#else

@ -1,5 +1,5 @@
/*
Copyright 2013 Jay Sorg
Copyright 2013-2014 Jay Sorg
Permission to use, copy, modify, distribute, and sell this software and its
documentation for any purpose is hereby granted without fee, provided that

@ -1,5 +1,5 @@
/*
Copyright 2005-2013 Jay Sorg
Copyright 2005-2014 Jay Sorg
Permission to use, copy, modify, distribute, and sell this software and its
documentation for any purpose is hereby granted without fee, provided that

@ -1,5 +1,5 @@
/*
Copyright 2005-2013 Jay Sorg
Copyright 2005-2014 Jay Sorg
Permission to use, copy, modify, distribute, and sell this software and its
documentation for any purpose is hereby granted without fee, provided that

@ -27,6 +27,7 @@ This is the main driver file
/* this should be before all X11 .h files */
#include <xorg-server.h>
#include <xorgVersion.h>
/* all driver need this */
#include <xf86.h>

Loading…
Cancel
Save