summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authordscho <dscho>2004-06-07 08:31:57 +0000
committerdscho <dscho>2004-06-07 08:31:57 +0000
commit2b8c2a5c3a71364e402b4df334a6f5aff5ed77a9 (patch)
tree66e59b58f919f5848780d5c7d6c954160e289cff /examples
parent98e4f89569587c143a56e4dcf8162a035efc361e (diff)
downloadlibtdevnc-2b8c2a5c3a71364e402b4df334a6f5aff5ed77a9.tar.gz
libtdevnc-2b8c2a5c3a71364e402b4df334a6f5aff5ed77a9.zip
add client_examples/, add SDLvncviewer, libvncclient API changes, suppress automake CFLAGS nagging
Diffstat (limited to 'examples')
-rw-r--r--examples/Makefile.am11
-rw-r--r--examples/blooptest.c2
-rw-r--r--examples/copyrecttest.c50
3 files changed, 2 insertions, 61 deletions
diff --git a/examples/Makefile.am b/examples/Makefile.am
index 18f3726..ff816ac 100644
--- a/examples/Makefile.am
+++ b/examples/Makefile.am
@@ -1,21 +1,14 @@
-CFLAGS=-I.. -g -Wall
+DEFINES=-I.. -g -Wall
LDADD = ../libvncserver/libvncserver.a
-if HAVE_LIBPTHREAD
-BACKGROUND_TEST=blooptest
-endif
-
if OSX
MAC=mac
mac_LDFLAGS=-framework ApplicationServices -framework Carbon -framework IOKit
endif
-copyrecttest_LDADD=$(LDADD) -lm
-
noinst_HEADERS=radon.h
noinst_PROGRAMS=example pnmshow regiontest pnmshow24 fontsel \
- vncev storepasswd colourmaptest simple simple15 copyrecttest \
- $(BACKGROUND_TEST) $(MAC)
+ vncev storepasswd colourmaptest simple simple15 $(MAC)
diff --git a/examples/blooptest.c b/examples/blooptest.c
deleted file mode 100644
index f0e411c..0000000
--- a/examples/blooptest.c
+++ /dev/null
@@ -1,2 +0,0 @@
-#define BACKGROUND_LOOP_TEST
-#include "example.c"
diff --git a/examples/copyrecttest.c b/examples/copyrecttest.c
deleted file mode 100644
index ff278b4..0000000
--- a/examples/copyrecttest.c
+++ /dev/null
@@ -1,50 +0,0 @@
-#include <rfb/rfb.h>
-#include <math.h>
-
-void initBackground(rfbScreenInfoPtr server)
-{
- unsigned int i,j;
-
- for(i=0;i<server->width;i++)
- for(j=0;j<server->height;j++) {
- server->frameBuffer[(j*server->width+i)*4+0]=i&0xff;
- server->frameBuffer[(j*server->width+i)*4+1]=j&0xff;
- server->frameBuffer[(j*server->width+i)*4+2]=(i*j)&0xff;
- }
-}
-
-int main(int argc,char** argv)
-{
- int width=400,height=300,w=20,x,y;
- double r,phi;
-
- rfbScreenInfoPtr server=rfbGetScreen(&argc,argv,width,height,8,3,4);
- server->frameBuffer=(char*)malloc(width*height*4);
- initBackground(server);
- server->rfbDeferUpdateTime=0;
- rfbInitServer(server);
-
- r=0;
- while(1) {
- if(r<=0) {
- initBackground(server);
- rfbMarkRectAsModified(server,0,0,width,height);
- r=0.43;
- phi=0;
- } else {
- r-=0.0001;
- phi+=0.02;
- if(phi>2*M_PI)
- phi-=2*M_PI;
- }
- x=width*(0.5+cos(phi)*r);
- y=height*(0.5+sin(phi)*r);
- if(x>=0 && y>=0 && x+w<=width && y+w<=height) {
- unsigned int dx=width*0.5*(1-cos(phi)*r)-x,
- dy=height*0.5*(1-sin(phi)*r)-y;
- rfbDoCopyRect(server,x,y,x+w,y+w,-dx,-dy);
- }
- rfbProcessEvents(server,50000);
- }
- return(0);
-}