rotate.c File Reference

#include "rotate.h"
#include "rotatetemplate.c"

Include dependency graph for rotate.c:

Go to the source code of this file.

Defines

#define FUNCTION(nCounterX, nCounterY)   (FUNCTIONX + FUNCTIONY * y)
#define FUNCTION(nCounterX, nCounterY)   (FUNCTIONX + FUNCTIONY * x)
#define FUNCTION(nCounterX, nCounterY)   (PIXELPOSITION)
#define FUNCTION(nCounterX, nCounterY)   (FUNCTIONX + FUNCTIONY * y)
#define FUNCTIONNAME   rotate270
#define FUNCTIONNAME   rotate180
#define FUNCTIONNAME   rotate0
#define FUNCTIONNAME   rotate90
#define FUNCTIONX   nCounterY
#define FUNCTIONX   ((x-1)-nCounterX)
#define FUNCTIONX   nCounterX
#define FUNCTIONX   ((y-1)-nCounterY)
#define FUNCTIONY   ((x-1)-nCounterX)
#define FUNCTIONY   ((y-1)-nCounterY)
#define FUNCTIONY   nCounterY
#define FUNCTIONY   nCounterX
#define SWAP
#define SWAP

Functions

unsigned short int notEqual (unsigned short int *fbbuf, unsigned short int *cmpbuf, unsigned long int size)


Define Documentation

#define FUNCTION ( nCounterX,
nCounterY   )     (FUNCTIONX + FUNCTIONY * y)

calculate the pixel position for the target buffer

Definition at line 71 of file rotate.c.

#define FUNCTION ( nCounterX,
nCounterY   )     (FUNCTIONX + FUNCTIONY * x)

calculate the pixel position for the target buffer

Definition at line 71 of file rotate.c.

#define FUNCTION ( nCounterX,
nCounterY   )     (PIXELPOSITION)

calculate the pixel position for the target buffer

Definition at line 71 of file rotate.c.

#define FUNCTION ( nCounterX,
nCounterY   )     (FUNCTIONX + FUNCTIONY * y)

calculate the pixel position for the target buffer

Definition at line 71 of file rotate.c.

Referenced by FUNCTIONNAME().

#define FUNCTIONNAME   rotate270

Definition at line 67 of file rotate.c.

#define FUNCTIONNAME   rotate180

Definition at line 67 of file rotate.c.

#define FUNCTIONNAME   rotate0

Definition at line 67 of file rotate.c.

#define FUNCTIONNAME   rotate90

Definition at line 67 of file rotate.c.

#define FUNCTIONX   nCounterY

function to calculate new [x]-position

Definition at line 69 of file rotate.c.

#define FUNCTIONX   ((x-1)-nCounterX)

function to calculate new [x]-position

Definition at line 69 of file rotate.c.

#define FUNCTIONX   nCounterX

function to calculate new [x]-position

Definition at line 69 of file rotate.c.

#define FUNCTIONX   ((y-1)-nCounterY)

function to calculate new [x]-position

Definition at line 69 of file rotate.c.

Referenced by FUNCTIONNAME().

#define FUNCTIONY   ((x-1)-nCounterX)

function to calculate new [y]-position

Definition at line 70 of file rotate.c.

#define FUNCTIONY   ((y-1)-nCounterY)

function to calculate new [y]-position

Definition at line 70 of file rotate.c.

#define FUNCTIONY   nCounterY

function to calculate new [y]-position

Definition at line 70 of file rotate.c.

#define FUNCTIONY   nCounterX

function to calculate new [y]-position

Definition at line 70 of file rotate.c.

Referenced by FUNCTIONNAME().

#define SWAP

the layout of our rfbScreen target buffer is different from the mmaped HW buffer (x<->y, y<->x)

Definition at line 68 of file rotate.c.

#define SWAP

the layout of our rfbScreen target buffer is different from the mmaped HW buffer (x<->y, y<->x)

Definition at line 68 of file rotate.c.

Referenced by FUNCTIONNAME().


Function Documentation

unsigned short int notEqual ( unsigned short int *  fbbuf,
unsigned short int *  cmpbuf,
unsigned long int  size 
)

... did the PDA screen change?

Parameters:
*fbbuf pointer to mmap'ed framebuffer
*cmpbuf pointer to a copy of the previous framebuffer contents
size size
Returns:
0: the screen did NOT change, 1: the screen changed

Definition at line 5 of file rotate.c.

Referenced by main().

00007                                                            {
00008   unsigned short int 
00009       nCounter,
00010       returnValue = 0;                                
00011   for (nCounter = 0; nCounter < size; nCounter++) {
00012     if (*cmpbuf++ != *fbbuf++) {
00013       returnValue = 1;
00014       break;
00015     }; // end of [if]
00016   }; // end of [for]
00017   return returnValue;
00018 }; // end of [notEqual]