Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
L
libvncserver
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
rasky
libvncserver
Commits
1e60fc20
Commit
1e60fc20
authored
Jul 25, 2003
by
dscho
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added simple examples
parent
1694a574
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
73 additions
and
8 deletions
+73
-8
ChangeLog
ChangeLog
+1
-0
.cvsignore
examples/.cvsignore
+3
-0
Makefile.am
examples/Makefile.am
+1
-1
Makefile.in
examples/Makefile.in
+33
-6
simple.c
examples/simple.c
+10
-0
simple15.c
examples/simple15.c
+24
-0
index.html
index.html
+1
-1
No files found.
ChangeLog
View file @
1e60fc20
added simple and simple15 example (really simple examples)
long standing http bug (.jar was sent twice) fixed by a friend of Karl named Mike
http options in cargs
when closing a client and no longer listening for new ones, don't crash
...
...
examples/.cvsignore
View file @
1e60fc20
...
...
@@ -10,3 +10,6 @@ vncev
Makefile.in
.deps
colourmaptest
simple
simple15
examples/Makefile.am
View file @
1e60fc20
...
...
@@ -12,7 +12,7 @@ endif
noinst_HEADERS
=
radon.h
noinst_PROGRAMS
=
example pnmshow regiontest pnmshow24 fontsel
\
vncev storepasswd colourmaptest
$(BACKGROUND_TEST)
$(MAC)
vncev storepasswd colourmaptest
simple simple15
$(BACKGROUND_TEST)
$(MAC)
LDADD
=
../libvncserver.a
examples/Makefile.in
View file @
1e60fc20
...
...
@@ -86,7 +86,7 @@ CFLAGS = -I..
noinst_HEADERS
=
radon.h
noinst_PROGRAMS
=
example pnmshow regiontest pnmshow24 fontsel
\
vncev storepasswd colourmaptest
$(BACKGROUND_TEST)
$(MAC)
vncev storepasswd colourmaptest
simple simple15
$(BACKGROUND_TEST)
$(MAC)
LDADD
=
../libvncserver.a
...
...
@@ -102,7 +102,8 @@ CONFIG_CLEAN_FILES =
@HAVE_LIBPTHREAD_FALSE@@OSX_TRUE@ vncev
$(EXEEXT)
\
@HAVE_LIBPTHREAD_FALSE@@OSX_TRUE@ storepasswd
$(EXEEXT)
\
@HAVE_LIBPTHREAD_FALSE@@OSX_TRUE@ colourmaptest
$(EXEEXT)
\
@HAVE_LIBPTHREAD_FALSE@@OSX_TRUE@ mac
$(EXEEXT)
@HAVE_LIBPTHREAD_FALSE@@OSX_TRUE@ simple
$(EXEEXT)
\
@HAVE_LIBPTHREAD_FALSE@@OSX_TRUE@ simple15
$(EXEEXT)
mac
$(EXEEXT)
@HAVE_LIBPTHREAD_FALSE@@OSX_FALSE@
noinst_PROGRAMS
=
example
$(EXEEXT)
\
@HAVE_LIBPTHREAD_FALSE@@OSX_FALSE@ pnmshow
$(EXEEXT)
\
@HAVE_LIBPTHREAD_FALSE@@OSX_FALSE@ regiontest
$(EXEEXT)
\
...
...
@@ -110,7 +111,9 @@ CONFIG_CLEAN_FILES =
@HAVE_LIBPTHREAD_FALSE@@OSX_FALSE@ fontsel
$(EXEEXT)
\
@HAVE_LIBPTHREAD_FALSE@@OSX_FALSE@ vncev
$(EXEEXT)
\
@HAVE_LIBPTHREAD_FALSE@@OSX_FALSE@ storepasswd
$(EXEEXT)
\
@HAVE_LIBPTHREAD_FALSE@@OSX_FALSE@ colourmaptest
$(EXEEXT)
@HAVE_LIBPTHREAD_FALSE@@OSX_FALSE@ colourmaptest
$(EXEEXT)
\
@HAVE_LIBPTHREAD_FALSE@@OSX_FALSE@ simple
$(EXEEXT)
\
@HAVE_LIBPTHREAD_FALSE@@OSX_FALSE@ simple15
$(EXEEXT)
@HAVE_LIBPTHREAD_TRUE@@OSX_TRUE@
noinst_PROGRAMS
=
example
$(EXEEXT)
\
@HAVE_LIBPTHREAD_TRUE@@OSX_TRUE@ pnmshow
$(EXEEXT)
\
@HAVE_LIBPTHREAD_TRUE@@OSX_TRUE@ regiontest
$(EXEEXT)
\
...
...
@@ -118,6 +121,8 @@ CONFIG_CLEAN_FILES =
@HAVE_LIBPTHREAD_TRUE@@OSX_TRUE@ fontsel
$(EXEEXT)
vncev
$(EXEEXT)
\
@HAVE_LIBPTHREAD_TRUE@@OSX_TRUE@ storepasswd
$(EXEEXT)
\
@HAVE_LIBPTHREAD_TRUE@@OSX_TRUE@ colourmaptest
$(EXEEXT)
\
@HAVE_LIBPTHREAD_TRUE@@OSX_TRUE@ simple
$(EXEEXT)
\
@HAVE_LIBPTHREAD_TRUE@@OSX_TRUE@ simple15
$(EXEEXT)
\
@HAVE_LIBPTHREAD_TRUE@@OSX_TRUE@ blooptest
$(EXEEXT)
mac
$(EXEEXT)
@HAVE_LIBPTHREAD_TRUE@@OSX_FALSE@
noinst_PROGRAMS
=
example
$(EXEEXT)
\
@HAVE_LIBPTHREAD_TRUE@@OSX_FALSE@ pnmshow
$(EXEEXT)
\
...
...
@@ -127,6 +132,8 @@ CONFIG_CLEAN_FILES =
@HAVE_LIBPTHREAD_TRUE@@OSX_FALSE@ vncev
$(EXEEXT)
\
@HAVE_LIBPTHREAD_TRUE@@OSX_FALSE@ storepasswd
$(EXEEXT)
\
@HAVE_LIBPTHREAD_TRUE@@OSX_FALSE@ colourmaptest
$(EXEEXT)
\
@HAVE_LIBPTHREAD_TRUE@@OSX_FALSE@ simple
$(EXEEXT)
\
@HAVE_LIBPTHREAD_TRUE@@OSX_FALSE@ simple15
$(EXEEXT)
\
@HAVE_LIBPTHREAD_TRUE@@OSX_FALSE@ blooptest
$(EXEEXT)
PROGRAMS
=
$(noinst_PROGRAMS)
...
...
@@ -169,6 +176,16 @@ regiontest_OBJECTS = regiontest.$(OBJEXT)
regiontest_LDADD
=
$(LDADD)
regiontest_DEPENDENCIES
=
../libvncserver.a
regiontest_LDFLAGS
=
simple_SOURCES
=
simple.c
simple_OBJECTS
=
simple.
$(OBJEXT)
simple_LDADD
=
$(LDADD)
simple_DEPENDENCIES
=
../libvncserver.a
simple_LDFLAGS
=
simple15_SOURCES
=
simple15.c
simple15_OBJECTS
=
simple15.
$(OBJEXT)
simple15_LDADD
=
$(LDADD)
simple15_DEPENDENCIES
=
../libvncserver.a
simple15_LDFLAGS
=
storepasswd_SOURCES
=
storepasswd.c
storepasswd_OBJECTS
=
storepasswd.
$(OBJEXT)
storepasswd_LDADD
=
$(LDADD)
...
...
@@ -190,17 +207,19 @@ depcomp = $(SHELL) $(top_srcdir)/depcomp
@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)
/storepasswd.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
$@
DIST_SOURCES
=
blooptest.c colourmaptest.c example.c fontsel.c mac.c
\
pnmshow.c pnmshow24.c regiontest.c storepasswd.c vncev.c
pnmshow.c pnmshow24.c regiontest.c simple.c simple15.c
\
storepasswd.c vncev.c
HEADERS
=
$(noinst_HEADERS)
DIST_COMMON
=
$(noinst_HEADERS)
Makefile.am Makefile.in
SOURCES
=
blooptest.c colourmaptest.c example.c fontsel.c mac.c pnmshow.c pnmshow24.c regiontest.c storepasswd.c vncev.c
SOURCES
=
blooptest.c colourmaptest.c example.c fontsel.c mac.c pnmshow.c pnmshow24.c regiontest.c s
imple.c simple15.c s
torepasswd.c vncev.c
all
:
all-am
...
...
@@ -240,6 +259,12 @@ pnmshow24$(EXEEXT): $(pnmshow24_OBJECTS) $(pnmshow24_DEPENDENCIES)
regiontest$(EXEEXT)
:
$(regiontest_OBJECTS) $(regiontest_DEPENDENCIES)
@
rm
-f
regiontest
$(EXEEXT)
$(LINK)
$(regiontest_LDFLAGS)
$(regiontest_OBJECTS)
$(regiontest_LDADD)
$(LIBS)
simple$(EXEEXT)
:
$(simple_OBJECTS) $(simple_DEPENDENCIES)
@
rm
-f
simple
$(EXEEXT)
$(LINK)
$(simple_LDFLAGS)
$(simple_OBJECTS)
$(simple_LDADD)
$(LIBS)
simple15$(EXEEXT)
:
$(simple15_OBJECTS) $(simple15_DEPENDENCIES)
@
rm
-f
simple15
$(EXEEXT)
$(LINK)
$(simple15_LDFLAGS)
$(simple15_OBJECTS)
$(simple15_LDADD)
$(LIBS)
storepasswd$(EXEEXT)
:
$(storepasswd_OBJECTS) $(storepasswd_DEPENDENCIES)
@
rm
-f
storepasswd
$(EXEEXT)
$(LINK)
$(storepasswd_LDFLAGS)
$(storepasswd_OBJECTS)
$(storepasswd_LDADD)
$(LIBS)
...
...
@@ -261,6 +286,8 @@ distclean-compile:
@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@
...
...
examples/simple.c
0 → 100644
View file @
1e60fc20
#include <rfb/rfb.h>
int
main
(
int
argc
,
char
**
argv
)
{
rfbScreenInfoPtr
server
=
rfbGetScreen
(
&
argc
,
argv
,
400
,
300
,
8
,
3
,
4
);
server
->
frameBuffer
=
malloc
(
400
*
300
*
4
);
rfbInitServer
(
server
);
rfbRunEventLoop
(
server
,
-
1
,
FALSE
);
return
(
0
);
}
examples/simple15.c
0 → 100644
View file @
1e60fc20
/* This example shows how to use 15-bit (which is handled as 16-bit
internally). */
#include <rfb/rfb.h>
int
main
(
int
argc
,
char
**
argv
)
{
int
i
,
j
;
uint16_t
*
f
;
rfbScreenInfoPtr
server
=
rfbGetScreen
(
&
argc
,
argv
,
400
,
300
,
5
,
3
,
2
);
server
->
frameBuffer
=
malloc
(
400
*
300
*
2
);
f
=
(
uint16_t
*
)
server
->
frameBuffer
;
for
(
j
=
0
;
j
<
300
;
j
++
)
for
(
i
=
0
;
i
<
400
;
i
++
)
f
[
j
*
400
+
i
]
=
/* red */
((
j
*
32
/
300
)
<<
10
)
|
/* green */
(((
j
+
400
-
i
)
*
32
/
700
)
<<
5
)
|
/* blue */
((
i
*
32
/
400
));
rfbInitServer
(
server
);
rfbRunEventLoop
(
server
,
-
1
,
FALSE
);
return
(
0
);
}
index.html
View file @
1e60fc20
...
...
@@ -66,7 +66,7 @@ libvncserver; try CVS until I release 0.6.
The simplest server looks like this:
<br><br>
<pre>
#include
<rfb
/
rfb
.
h
>
#include
<
rfb/rfb.h
>
int main(int argc,char** argv)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment