diff options
author | Timothy Pearson <[email protected]> | 2015-01-10 16:02:54 -0600 |
---|---|---|
committer | Timothy Pearson <[email protected]> | 2015-01-10 16:02:54 -0600 |
commit | f6187cc4eb8a8726f5b64f0c640ac8d2355b85eb (patch) | |
tree | d5c3b93286335d890339446d15e35c9cc97703d1 /krfb/libvncserver/fontsel.c | |
parent | dedd07e78dee71fd8cde6a39e2ccc89fdbb8a782 (diff) | |
download | tdenetwork-f6187cc4eb8a8726f5b64f0c640ac8d2355b85eb.tar.gz tdenetwork-f6187cc4eb8a8726f5b64f0c640ac8d2355b85eb.zip |
Port to standard shared libvncserver and delete old buggy libvncserver library sources
Note that this DOES NOT WORK as some TDE-specific changes to libvncserver will be required
The commit is a "clean slate" for the TDE-specific changes to follow
Diffstat (limited to 'krfb/libvncserver/fontsel.c')
-rw-r--r-- | krfb/libvncserver/fontsel.c | 71 |
1 files changed, 0 insertions, 71 deletions
diff --git a/krfb/libvncserver/fontsel.c b/krfb/libvncserver/fontsel.c deleted file mode 100644 index 100db817..00000000 --- a/krfb/libvncserver/fontsel.c +++ /dev/null @@ -1,71 +0,0 @@ -#include "rfb.h" - -#define FONTDIR "/usr/lib/kbd/consolefonts/" -#define DEFAULTFONT FONTDIR "default8x16" - -char *fontlist[50]={ -"8x16alt", "b.fnt", "c.fnt", "default8x16", "m.fnt", "ml.fnt", "mod_d.fnt", -"mod_s.fnt", "mr.fnt", "mu.fnt", "r.fnt", "rl.fnt", "ro.fnt", "s.fnt", -"sc.fnt", "scrawl_s.fnt", "scrawl_w.fnt", "sd.fnt", "t.fnt", - 0 -}; - -rfbScreenInfoPtr rfbScreen = 0; -rfbFontDataPtr curFont = 0; -void showFont(int index) -{ - char buffer[1024]; - - if(!rfbScreen) return; - - if(curFont) - rfbFreeFont(curFont); - - strcpy(buffer,FONTDIR); - strcat(buffer,fontlist[index]); - curFont = rfbLoadConsoleFont(buffer); - - rfbFillRect(rfbScreen,210,30-20,210+10*16,30-20+256*20/16,0xb77797); - if(curFont) { - int i,j; - for(j=0;j<256;j+=16) - for(i=0;i<16;i++) - rfbDrawCharWithClip(rfbScreen,curFont,210+10*i,30+j*20/16,j+i, - 0,0,640,480,0xffffff,0x000000); - } -} - -int main(int argc,char** argv) -{ - rfbFontDataPtr font; - rfbScreenInfoPtr s=rfbGetScreen(&argc,argv,640,480,8,3,3); - int i,j; - - s->frameBuffer=(char*)malloc(640*480*3); - rfbInitServer(s); - - for(j=0;j<480;j++) - for(i=0;i<640;i++) { - s->frameBuffer[(j*640+i)*3+0]=j*256/480; - s->frameBuffer[(j*640+i)*3+1]=i*256/640; - s->frameBuffer[(j*640+i)*3+2]=(i+j)*256/(480+640); - } - - rfbScreen = s; - font=rfbLoadConsoleFont(DEFAULTFONT); - if(!font) { - fprintf(stderr,"Couldn't find %s\n",DEFAULTFONT); - exit(1); - } - - for(j=0;j<0;j++) - rfbProcessEvents(s,900000); - - i = rfbSelectBox(s,font,fontlist,10,20,200,300,0xffdfdf,0x602040,2,showFont); - fprintf(stderr,"Selection: %d: %s\n",i,(i>=0)?fontlist[i]:"cancelled"); - - rfbFreeFont(font); - - return(0); -} - |