summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@sun.com>2009-05-19 01:58:38 -0700
committerAlan Coopersmith <alan.coopersmith@sun.com>2009-05-19 01:58:38 -0700
commiteab796dabe05b4db2e193ab225deae613ac46a7b (patch)
treebdef70c5f7a8a9947117a027a304a16e6f14195f /doc
parent39be8ae0ac4d5281a006de67ae11f7877f443bc8 (diff)
Make FSlib.txt prototypes match those in headers.
Both conversion to ANSI C89 format and fixing some long standing mistakes. Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
Diffstat (limited to 'doc')
-rw-r--r--doc/FSlib.txt218
1 files changed, 114 insertions, 104 deletions
diff --git a/doc/FSlib.txt b/doc/FSlib.txt
index 8cf5de0..02957d5 100644
--- a/doc/FSlib.txt
+++ b/doc/FSlib.txt
@@ -7,25 +7,26 @@ These functions make protocol requests corresponding to their names.
Connection Setup
FSServer *
-FSOpenServer(server)
- char *server;
+FSOpenServer(
+ char *server);
Creates a connection to the font server specified in the 'server' string.
-FSCloseServer(svr)
- FSServer *svr;
+int
+FSCloseServer(
+ 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;
+FSOpenBitmapFont(
+ 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
@@ -33,39 +34,40 @@ 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;
+int
+FSCloseFont(
+ FSServer *svr,
+ Font fid);
Closes the font.
char **
-FSListFonts(svr, pattern, maxNames, actualCount)
- FSServer *svr;
- char *pattern;
- int maxNames;
- int *actualCount;
+FSListFonts(
+ 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
+int
+FSFreeFontNames(
+ 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;
+FSListFontsWithXInfo(
+ 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
@@ -73,33 +75,33 @@ 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;
+FSQueryXInfo(
+ 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;
+FSQueryXExtents8(
+ 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;
+FSQueryXExtents16(
+ 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
@@ -107,28 +109,26 @@ 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;
+FSQueryXBitmaps8(
+ FSServer *svr,
+ Font fid,
+ 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;
+FSQueryXBitmaps16(
+ FSServer *svr,
+ Font fid,
+ 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.
@@ -136,24 +136,25 @@ are used as in QueryExtents above.
Extensions
char **
-FSListExtensions(svr, next)
- FSServer *svr;
- int *next;
+FSListExtensions(
+ 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;
+FSQueryExtension(
+ FSServer *svr,
+ char *name,
+ int *major_opcode,
+ int *first_event,
+ int *first_error);
Returns information on the specified extension.
-FSFreeExtensionList(list)
- char **list;
+int
+FSFreeExtensionList(
+ char **list);
Frees the list returned by FSListExtensions().
@@ -163,43 +164,52 @@ can make writing a FS client simpler.
Synchronization
-FSSync(svr, discard)
- FSServer *svr;
- Bool discard;
+FSSync(
+ 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;
+typedef int (*FSSyncHandler)(FSServer *);
+
+FSSyncHandler
+FSSynchronize(
+ FSServer *svr,
+ int onoff)
Controls whether the server does every request in synchronous form.
-int
-(* FSSetAfterFunction(svr, func)) ()
- FSServer *svr;
- int (*func) ();
+FSSyncHandler
+FSSetAfterFunction(
+ FSServer *svr,
+ FSSyncHandler func);
Sets the function that will be called after every request. This
is usually NULL or FSSync().
-FSFlush(svr)
- FSServer *svr;
+int
+FSFlush(
+ FSServer *svr);
Flushes any queued requests to the font server.
Error Handling
-int (* FSSetErrorHandler(handler)) ()
- int (*handler) ();
+typedef int (* FSErrorHandler)(FSServer *, FSErrorEvent *);
+
+FSErrorHandler
+FSSetErrorHandler(
+ FSErrorHandler handler);
Changes the error handler to 'handler'. A NULL value will reset
it to use the default.
-int (* FSSetIOErrorHandler(handler)) ()
- int (*handler) ();
+typedef int (* FSIOErrorHandler)(FSServer *);
+
+FSIOErrorHandler
+FSSetIOErrorHandler(
+ FSIOErrorHandler handler);
Changes the I/O error handler to 'handler'. A NULL value will reset
it to use the default.
@@ -207,15 +217,15 @@ it to use the default.
Miscellaneous
long
-FSMaxRequestSize(svr)
- FSServer *svr;
+FSMaxRequestSize(
+ FSServer *svr);
-Returns the largest request size in 4 byte quantities) that the
+Returns the largest request size (in 4 byte quantities) that the
server can handle.
char *
-FSServerName(server)
- char *server;
+FSServerName(
+ char *server);
Returns the name that FSlib would use to connect to the server.
Translates a NULL in the value of $FONT_SERVER.