diff options
author | Alan Coopersmith <alan.coopersmith@sun.com> | 2009-05-19 01:44:26 -0700 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@sun.com> | 2009-05-19 01:44:26 -0700 |
commit | 39be8ae0ac4d5281a006de67ae11f7877f443bc8 (patch) | |
tree | 66dad6ad78d52345da31e03e9a5fc040639b813b | |
parent | 84d71a733b6ab93318260a5641d7609dbc38a198 (diff) |
Move API doc from xorg-doc/doc/FSlib.doc
-rw-r--r-- | Makefile.am | 2 | ||||
-rw-r--r-- | doc/FSlib.txt | 222 |
2 files changed, 223 insertions, 1 deletions
diff --git a/Makefile.am b/Makefile.am index 5f7a12a..63f75c6 100644 --- a/Makefile.am +++ b/Makefile.am @@ -24,7 +24,7 @@ SUBDIRS = src pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = libfs.pc -EXTRA_DIST = libfs.pc.in +EXTRA_DIST = libfs.pc.in doc/FSlib.txt EXTRA_DIST += ChangeLog MAINTAINERCLEANFILES = ChangeLog diff --git a/doc/FSlib.txt b/doc/FSlib.txt new file mode 100644 index 0000000..8cf5de0 --- /dev/null +++ b/doc/FSlib.txt @@ -0,0 +1,222 @@ +$Xorg: FSlib.doc,v 1.3 2000/08/17 19:42:50 cpqbld Exp $ + +Protocol requests + +These functions make protocol requests corresponding to their names. + +Connection Setup + +FSServer * +FSOpenServer(server) + char *server; + +Creates a connection to the font server specified in the 'server' string. + +FSCloseServer(svr) + FSServer *svr; + +Closes the connection to the font server. + +Font Manipulation + +Font +FSOpenXBitmap(svr, hint, fmask, name, originalid) + FSServer *svr; + fsBitmapFormat hint; + fsBitmapFormatMask fmask; + char *name; + Font *originalid; + +Opens the font that matches the given name (which may have '*' and '?' +as wildcards). The hint contains format information that will probably +be used in subsequent QueryXBitmaps() requests. The fmask tells which +bits in the mask are valid. If originalid is non-zero, then the server +already has the font opened under that ID. + +FSCloseFont(svr, fid) + FSServer *svr; + Font fid; + +Closes the font. + +char ** +FSListFonts(svr, pattern, maxNames, actualCount) + FSServer *svr; + char *pattern; + int maxNames; + int *actualCount; + +Returns the full names of the fonts matching pattern. Up to maxNames +names will be returned. The actual value number be placed in +actualCount. The return value should be freed with FSFreeFontNames. + +FSFreeFontNames(list) + char **list + +Frees the list of font names returned by FSListFonts. + +char ** +FSListWithXInfo(svr, pattern, maxNames, actualCount, info, pprops, offsets, + prop_data) + FSServer *svr; + char *pattern; + int maxNames; + int *actualCount; + fsFontHeader ***info; + fsPropInfo ***pprops; + fsPropOffset ***offsets; + unsigned char ***prop_data; + +Returns the full names of the fonts matching pattern. Up to maxNames +names will be returned. The actual value number be placed in +actualCount, and each font's header and property information will also +be returned. + +int +FSQueryXInfo(svr, fid, info, props, offsets, prop_data) + FSServer *svr; + Font fid; + fsFontHeader *info; + fsPropInfo *props; + fsPropOffset **offsets; + unsigned char **prop_data; + +Returns the font's header information. + +int +FSQueryXExtents8(svr, fid, range_type, str, str_len, extents) + FSServer *svr; + Font fid; + Bool range_type; + unsigned char *str; + unsigned long str_len; + fsCharInfo **extents; + +int +FSQueryXExtents16(svr, fid, range_type, str, str_len, extents) + FSServer *svr; + Font fid; + Bool range_type; + fsChar2b *str; + unsigned long str_len; + fsCharInfo **extents; + +Returns the extents of the given characters. If 'range_type' is set, +the 'str' is considered a range, otherwise its considered a list of +characters. A NULL str when range_type is set means that all the +character extents will be returned. + +int +FSQueryXBitmaps8(svr, fid, format, range_type, str, str_len,, offsets, glyph_data) + FSServer *svr; + Font fid; + fsRange *range; + fsBitmapFormat format; + Bool range_type; + unsigned char *str; + unsined long str_len; + unsigned long **offsets; + unsigned char **glyph_data; + +int +FSQueryXBitmaps16(svr, fid, format, range_type, str, str_len,, offsets, glyph_data) + FSServer *svr; + Font fid; + fsRange *range; + fsBitmapFormat format; + Bool range_type; + fsChar2b *str; + unsined long str_len; + unsigned long **offsets; + unsigned char **glyph_data; + +Returns the font's bitmaps in the requested format. The other arguments +are used as in QueryExtents above. + +Extensions + +char ** +FSListExtensions(svr, next) + FSServer *svr; + int *next; + +Lists any extension built into the font server. + +Bool +FSQueryExtension(svr, name, major_opcode, first_event, first_error) + FSServer *svr; + char *name; + int *major_opcode; + int *first_event; + int *first_error; + +Returns information on the specified extension. + +FSFreeExtensionList(list) + char **list; + +Frees the list returned by FSListExtensions(). + + +Helper functions -- these don't map to protocol requests, but +can make writing a FS client simpler. + +Synchronization + +FSSync(svr, discard) + FSServer *svr; + Bool discard; + +Flushes the output queue and waits for a reply from the server, +which will flush the server's output queue. + +int +(* FSSynchronize(svr, onoff)) () + FSServer *svr; + int onoff; + +Controls whether the server does every request in synchronous form. + +int +(* FSSetAfterFunction(svr, func)) () + FSServer *svr; + int (*func) (); + +Sets the function that will be called after every request. This +is usually NULL or FSSync(). + +FSFlush(svr) + FSServer *svr; + +Flushes any queued requests to the font server. + +Error Handling + +int (* FSSetErrorHandler(handler)) () + int (*handler) (); + +Changes the error handler to 'handler'. A NULL value will reset +it to use the default. + +int (* FSSetIOErrorHandler(handler)) () + int (*handler) (); + +Changes the I/O error handler to 'handler'. A NULL value will reset +it to use the default. + +Miscellaneous + +long +FSMaxRequestSize(svr) + FSServer *svr; + +Returns the largest request size in 4 byte quantities) that the +server can handle. + +char * +FSServerName(server) + char *server; + +Returns the name that FSlib would use to connect to the server. +Translates a NULL in the value of $FONT_SERVER. + |