View Single Post
Old 06-03-2007, 06:55 PM   #1
igorsk
Wizard
igorsk ought to be getting tired of karma fortunes by now.igorsk ought to be getting tired of karma fortunes by now.igorsk ought to be getting tired of karma fortunes by now.igorsk ought to be getting tired of karma fortunes by now.igorsk ought to be getting tired of karma fortunes by now.igorsk ought to be getting tired of karma fortunes by now.igorsk ought to be getting tired of karma fortunes by now.igorsk ought to be getting tired of karma fortunes by now.igorsk ought to be getting tired of karma fortunes by now.igorsk ought to be getting tired of karma fortunes by now.igorsk ought to be getting tired of karma fortunes by now.
 
Posts: 3,442
Karma: 300001
Join Date: Sep 2006
Location: Belgium
Device: PRS-500/505/700, Kindle, Cybook Gen3, Words Gear
Post Unofficial Sony Reader SDK released

Well, I finally got this more or less working.
Included:
1) an import library for Fsk.dll (MSVC format)
2) a header file with definitions of enough Fsk functions to implement a simple text viewer
3) a sample of said viewer

How to install the sample:
1) Copy testviewer.dll next to "CONNECT Reader.exe"
2) Add the followings line to kconfig.xml (make sure to backup it!)
after <extension href="[applicationPath]FskDocumentViewer"/>:
Code:
<extension href="testviewer"/>
after <subtype name="plain" extension="txt"/>:
Code:
<subtype name="plain2" extension="txt2"/>
to see the debug messages, after </environment>:
Code:
<debug>
          <console visible="true"/>
</debug>
To test the sample, make a simple text file (if you use any non-ASCII symbols, make sure to save it as UTF-8) and give it a .txt2 extension. Then just open it in Connect.

I'm sorry that there's no documentation, I'm not really a doc writing type. I hope the code is more or less self-explaining. Feel free to ask about anything and I'll try to explain. Also check fsk.lst file for the list of all Fsk functions. Let me know if there's any one that looks interesting to you and I will try to find out how it works.

TODO (in no specific order):
  • Fix bookmarks so that the view doesn't shift after switching between font sizes
  • make and test port for Reader
  • implement save/load of layout info and bookmarks
  • implement bitmap display
  • document more Fsk functions.
  • implement links
  • implement spans

Current version: 0.1
http://projects.mobileread.com/reade...FskSDK-0.1.zip
igorsk is offline   Reply With Quote