diff options
author | dscho <dscho> | 2003-07-30 09:42:36 +0000 |
---|---|---|
committer | dscho <dscho> | 2003-07-30 09:42:36 +0000 |
commit | eeb2061dfb03ea11ba028b33037fa0805d22e6a4 (patch) | |
tree | dce009b7b0b68b8660aa01ae543883a0e36bf287 /examples | |
parent | 964aa1628f2cc4fac17c22dc89fc2439bd87b00e (diff) | |
download | libtdevnc-eeb2061dfb03ea11ba028b33037fa0805d22e6a4.tar.gz libtdevnc-eeb2061dfb03ea11ba028b33037fa0805d22e6a4.zip |
API change: Bool, KeySym, Pixel get prefix "rfb"; constants in rfbconfig.h get prefix "LIBVNCSERVER_"
Diffstat (limited to 'examples')
-rw-r--r-- | examples/Makefile.in | 104 | ||||
-rw-r--r-- | examples/example.c | 6 | ||||
-rw-r--r-- | examples/mac.c | 26 | ||||
-rw-r--r-- | examples/pnmshow.c | 2 | ||||
-rw-r--r-- | examples/pnmshow24.c | 4 | ||||
-rw-r--r-- | examples/vncev.c | 4 |
6 files changed, 66 insertions, 80 deletions
diff --git a/examples/Makefile.in b/examples/Makefile.in index 71354df..56f3dc4 100644 --- a/examples/Makefile.in +++ b/examples/Makefile.in @@ -1,7 +1,6 @@ -# Makefile.in generated by automake 1.6.3 from Makefile.am. -# @configure_input@ +# Makefile.in generated automatically by automake 1.5 from Makefile.am. -# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002 +# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 # Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -13,6 +12,7 @@ # PARTICULAR PURPOSE. @SET_MAKE@ + SHELL = @SHELL@ srcdir = @srcdir@ @@ -43,13 +43,9 @@ AUTOCONF = @AUTOCONF@ AUTOMAKE = @AUTOMAKE@ AUTOHEADER = @AUTOHEADER@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_DATA = @INSTALL_DATA@ -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_HEADER = $(INSTALL_DATA) transform = @program_transform_name@ @@ -59,21 +55,18 @@ POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : - -EXEEXT = @EXEEXT@ -OBJEXT = @OBJEXT@ -PATH_SEPARATOR = @PATH_SEPARATOR@ AMTAR = @AMTAR@ AWK = @AWK@ CC = @CC@ CCLD = @CCLD@ CXX = @CXX@ DEPDIR = @DEPDIR@ +EXEEXT = @EXEEXT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ RANLIB = @RANLIB@ RPMSOURCEDIR = @RPMSOURCEDIR@ -STRIP = @STRIP@ VERSION = @VERSION@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ @@ -82,6 +75,7 @@ X_PRE_LIBS = @X_PRE_LIBS@ am__include = @am__include@ am__quote = @am__quote@ install_sh = @install_sh@ + CFLAGS = -I.. -g -Wall @HAVE_LIBPTHREAD_TRUE@BACKGROUND_TEST = blooptest @@ -98,7 +92,7 @@ noinst_PROGRAMS = example pnmshow regiontest pnmshow24 fontsel \ LDADD = ../libvncserver.a subdir = examples mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs -CONFIG_HEADER = $(top_builddir)/rfb/rfbconfig.h +CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = @HAVE_LIBPTHREAD_FALSE@@OSX_TRUE@noinst_PROGRAMS = example$(EXEEXT) \ @HAVE_LIBPTHREAD_FALSE@@OSX_TRUE@ pnmshow$(EXEEXT) \ @@ -204,19 +198,18 @@ vncev_DEPENDENCIES = ../libvncserver.a vncev_LDFLAGS = DEFS = @DEFS@ -DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/rfb +DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) CPPFLAGS = @CPPFLAGS@ LDFLAGS = @LDFLAGS@ LIBS = @LIBS@ depcomp = $(SHELL) $(top_srcdir)/depcomp -am__depfiles_maybe = depfiles -@AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/blooptest.Po \ -@AMDEP_TRUE@ ./$(DEPDIR)/colourmaptest.Po ./$(DEPDIR)/example.Po \ -@AMDEP_TRUE@ ./$(DEPDIR)/fontsel.Po ./$(DEPDIR)/mac.Po \ -@AMDEP_TRUE@ ./$(DEPDIR)/pnmshow.Po ./$(DEPDIR)/pnmshow24.Po \ -@AMDEP_TRUE@ ./$(DEPDIR)/regiontest.Po ./$(DEPDIR)/simple.Po \ -@AMDEP_TRUE@ ./$(DEPDIR)/simple15.Po ./$(DEPDIR)/storepasswd.Po \ -@AMDEP_TRUE@ ./$(DEPDIR)/vncev.Po +@AMDEP_TRUE@DEP_FILES = $(DEPDIR)/blooptest.Po \ +@AMDEP_TRUE@ $(DEPDIR)/colourmaptest.Po $(DEPDIR)/example.Po \ +@AMDEP_TRUE@ $(DEPDIR)/fontsel.Po $(DEPDIR)/mac.Po \ +@AMDEP_TRUE@ $(DEPDIR)/pnmshow.Po $(DEPDIR)/pnmshow24.Po \ +@AMDEP_TRUE@ $(DEPDIR)/regiontest.Po $(DEPDIR)/simple.Po \ +@AMDEP_TRUE@ $(DEPDIR)/simple15.Po $(DEPDIR)/storepasswd.Po \ +@AMDEP_TRUE@ $(DEPDIR)/vncev.Po COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ @@ -236,7 +229,9 @@ $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.ac $(ACLOCAL_M4) cd $(top_srcdir) && \ $(AUTOMAKE) --gnu examples/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe) + cd $(top_builddir) && \ + CONFIG_HEADERS= CONFIG_LINKS= \ + CONFIG_FILES=$(subdir)/$@ $(SHELL) ./config.status clean-noinstPROGRAMS: -test -z "$(noinst_PROGRAMS)" || rm -f $(noinst_PROGRAMS) @@ -283,27 +278,27 @@ mostlyclean-compile: distclean-compile: -rm -f *.tab.c -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/blooptest.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/colourmaptest.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/example.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fontsel.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mac.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pnmshow.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pnmshow24.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/regiontest.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/simple.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/simple15.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/storepasswd.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vncev.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/blooptest.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/colourmaptest.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/example.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/fontsel.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/mac.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/pnmshow.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/pnmshow24.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/regiontest.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/simple.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/simple15.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/storepasswd.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/vncev.Po@am__quote@ distclean-depend: - -rm -rf ./$(DEPDIR) + -rm -rf $(DEPDIR) .c.o: @AMDEP_TRUE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ @AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ - $(COMPILE) -c `test -f '$<' || echo '$(srcdir)/'`$< + $(COMPILE) -c `test -f $< || echo '$(srcdir)/'`$< .c.obj: @AMDEP_TRUE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @@ -313,61 +308,53 @@ distclean-depend: CCDEPMODE = @CCDEPMODE@ uninstall-info-am: -ETAGS = etags -ETAGSFLAGS = - tags: TAGS ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + list='$(SOURCES) $(HEADERS) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ - mkid -fID $$unique + mkid -fID $$unique $(LISP) TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + list='$(SOURCES) $(HEADERS) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ - test -z "$(ETAGS_ARGS)$$tags$$unique" \ - || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique + test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \ + || etags $(ETAGS_ARGS) $$tags $$unique $(LISP) GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ + here=`CDPATH=: && cd $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH + DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) top_distdir = .. distdir = $(top_distdir)/$(PACKAGE)-$(VERSION) distdir: $(DISTFILES) - @list='$(DISTFILES)'; for file in $$list; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + @for file in $(DISTFILES); do \ + if test -f $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ - dir="/$$dir"; \ - $(mkinstalldirs) "$(distdir)$$dir"; \ - else \ - dir=''; \ + $(mkinstalldirs) "$(distdir)/$$dir"; \ fi; \ if test -d $$d/$$file; then \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + cp -pR $$d/$$file $(distdir) \ + || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ @@ -391,7 +378,6 @@ install-am: all-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: @@ -399,7 +385,7 @@ mostlyclean-generic: clean-generic: distclean-generic: - -rm -f Makefile $(CONFIG_CLEAN_FILES) + -rm -f Makefile $(CONFIG_CLEAN_FILES) stamp-h stamp-h[0-9]* maintainer-clean-generic: @echo "This command is intended for maintainers to use" diff --git a/examples/example.c b/examples/example.c index d53da46..23522ab 100644 --- a/examples/example.c +++ b/examples/example.c @@ -59,7 +59,7 @@ void initBuffer(unsigned char* buffer) /* Here we create a structure so that every client has it's own pointer */ typedef struct ClientData { - Bool oldButton; + rfbBool oldButton; int oldx,oldy; } ClientData; @@ -166,7 +166,7 @@ void doptr(int buttonMask,int x,int y,rfbClientPtr cl) /* Here the key events are handled */ -void dokey(Bool down,KeySym key,rfbClientPtr cl) +void dokey(rfbBool down,rfbKeySym key,rfbClientPtr cl) { if(down) { if(key==XK_Escape) @@ -312,7 +312,7 @@ int main(int argc,char** argv) rfbRunEventLoop(rfbScreen,40000,FALSE); #endif /* OWN LOOP */ #else -#if !defined(HAVE_LIBPTHREAD) +#if !defined(LIBVNCSERVER_HAVE_LIBPTHREAD) #error "I need pthreads for that." #endif diff --git a/examples/mac.c b/examples/mac.c index 009ae08..1730c3d 100644 --- a/examples/mac.c +++ b/examples/mac.c @@ -12,8 +12,8 @@ * It includes the keyboard functions: * void KbdAddEvent(down, keySym, cl) - Bool down; - KeySym keySym; + rfbBool down; + rfbKeySym keySym; rfbClientPtr cl; void KbdReleaseAllKeys() * @@ -37,7 +37,7 @@ /* zlib doesn't like Byte already defined */ #undef Byte #undef TRUE -#undef Bool +#undef rfbBool #include <rfb/rfb.h> #include <rfb/keysym.h> @@ -47,17 +47,17 @@ #include <signal.h> #include <pthread.h> -Bool rfbNoDimming = FALSE; -Bool rfbNoSleep = TRUE; +rfbBool rfbNoDimming = FALSE; +rfbBool rfbNoSleep = TRUE; static pthread_mutex_t dimming_mutex; static unsigned long dim_time; static unsigned long sleep_time; static mach_port_t master_dev_port; static io_connect_t power_mgt; -static Bool initialized = FALSE; -static Bool dim_time_saved = FALSE; -static Bool sleep_time_saved = FALSE; +static rfbBool initialized = FALSE; +static rfbBool dim_time_saved = FALSE; +static rfbBool sleep_time_saved = FALSE; static int saveDimSettings(void) @@ -213,7 +213,7 @@ void rfbShutdown(rfbClientPtr cl); /* some variables to enable special behaviour */ int startTime = -1, maxSecsToConnect = 0; -Bool disconnectAfterFirstClient = TRUE; +rfbBool disconnectAfterFirstClient = TRUE; /* Where do I get the "official" list of Mac key codes? Ripped these out of a Mac II emulator called Basilisk II @@ -391,7 +391,7 @@ static int keyTable[] = { }; void -KbdAddEvent(Bool down, KeySym keySym, struct _rfbClientRec* cl) +KbdAddEvent(rfbBool down, rfbKeySym keySym, struct _rfbClientRec* cl) { int i; CGKeyCode keyCode = -1; @@ -446,7 +446,7 @@ PtrAddEvent(buttonMask, x, y, cl) (buttonMask & (1 << 7)) ? TRUE : FALSE); } -Bool viewOnly = FALSE, sharedMode = FALSE; +rfbBool viewOnly = FALSE, sharedMode = FALSE; void ScreenInit(int argc, char**argv) @@ -502,7 +502,7 @@ refreshCallback(CGRectCount count, const CGRect *rectArray, void *ignore) break; } } -#ifdef BACKCHANNEL +#ifdef LIBVNCSERVER_BACKCHANNEL else if(message[0]=='b') rfbSendBackChannel(rfbScreen,message+1,strlen(message+1)); #endif @@ -560,7 +560,7 @@ int main(int argc,char *argv[]) send_message(&single_instance,"l"); exit(0); } else -#ifdef BACKCHANNEL +#ifdef LIBVNCSERVER_BACKCHANNEL if(i<argc-1 && !strcmp(argv[i],"-backchannel")) { if(strlen(argv[i+1])>1022) argv[i+1][1022]=0; diff --git a/examples/pnmshow.c b/examples/pnmshow.c index b8481f8..80de8d8 100644 --- a/examples/pnmshow.c +++ b/examples/pnmshow.c @@ -2,7 +2,7 @@ #include <rfb/rfb.h> #include <rfb/keysym.h> -void HandleKey(Bool down,KeySym key,rfbClientPtr cl) +void HandleKey(rfbBool down,rfbKeySym key,rfbClientPtr cl) { if(down && (key==XK_Escape || key=='q' || key=='Q')) rfbCloseClient(cl); diff --git a/examples/pnmshow24.c b/examples/pnmshow24.c index 9780419..f44e08b 100644 --- a/examples/pnmshow24.c +++ b/examples/pnmshow24.c @@ -2,11 +2,11 @@ #include <rfb/rfb.h> #include <rfb/keysym.h> -#ifndef ALLOW24BPP +#ifndef LIBVNCSERVER_ALLOW24BPP #error "I need the ALLOW24BPP flag to work" #endif -void HandleKey(Bool down,KeySym key,rfbClientPtr cl) +void HandleKey(rfbBool down,rfbKeySym key,rfbClientPtr cl) { if(down && (key==XK_Escape || key=='q' || key=='Q')) rfbCloseClient(cl); diff --git a/examples/vncev.c b/examples/vncev.c index b465d47..e1f6dcc 100644 --- a/examples/vncev.c +++ b/examples/vncev.c @@ -4,7 +4,7 @@ #include <sys/types.h> #include <sys/socket.h> #include <rfb/rfb.h> -#include "default8x16.h" +#include <rfb/default8x16.h> char f[640*480]; char* keys[0x400]; @@ -66,7 +66,7 @@ void output(rfbScreenInfoPtr s,char* line) rfbLog("%s\n",line); } -void dokey(Bool down,KeySym k,rfbClientPtr cl) +void dokey(rfbBool down,rfbKeySym k,rfbClientPtr cl) { char buffer[1024+32]; |