^2, and the end-of-data code is defined as +1.
The first available compression code value is +2.
The main difference however concerns the minimum code size specification in
compressed data. This number controls the generation of the LZW codes in the
compressed data. While GIF images use anything between 3 to 12 bits, compress
only works between 8 and 16 (maximum codeSize for compress, the minimum-maximum
is 12). This means that the conversion process must make a distinction between
the code size: anything below 8 and 8 or above.
The latter case is quite easy: the gif LZW codes are simply copied to compress
output with possible adjustment of the aforementioned codes. The first case
involves a lot more work as the 2 to 7 bits LZW codes need to be transformed
to 8 bit codes. This conversion process actually comes pretty close to
violating the LZW patent, but since only the LZW codes are read, adjusted and
packed again the gzf gif decoder is patent-safe.
6. Decoding GIF LZW raster data using the LZWStream package
-----------------------------------------------------------
The gzf source code comes with a package that uncompresses the LZW compressed
raster data in gif images by using the "compress" utility. Proper use of this
package requires you to understand the GIF format (the Gif87a and Gif89a
specification can be found in the docs directory).
The LZWStream package only decodes gif raster data and does not provide a
way to read an entire gif image.
An LZWStream is created by using the LZWStreamCreate function:
LZWStream *LZWStreamCreate(ib, zCmd)
ImageBuffer *ib;
char *zCmd;
ImageBuffer is a memory object which is used to mimic file access but in
memory, which can provide a substantial speedup. An ImageBuffer is created
by using the ImageFileToBuffer(char *file) function, where "file" represents
the file that is to be loaded.
zCmd is the name of the "uncompress" program that is to be used. If NULL is
specified, the LZWStream package will default to "uncompress". This argument
can be used to specify an alternative LZW decoder, such as gzip.
When LZWStreamCreate returns successfully, you need to set two read functions:
readOK and getData.
The proto's for these functions are:
size_t (*readOK)(ImageBuffer*, unsigned char*, int);
size_t (*getData)(ImageBuffer*, unsigned char*);
The code in buffer.c offers two default functions:
size_t ReadOK(ib, buf, len)
ImageBuffer *ib;
unsigned char *buf;
int len;
This function copies len characters from ib to buf and returns the number of
characters copied. It returns 0 when the end of the current ImageBuffer is
reached.
size_t GifGetDataBlock(ib, buf)
ImageBuffer *ib;
unsigned char *buf;
This function retrieves an the contents of an entire block of data found in
a gif image. Gif data blocks consist of a single byte with a character count,
followed by the specified number of bytes. The above function reads the
character count and copies the requested number of bytes in the given
destination buffer. An ImageBuffer is destroyed by using the
FreeImageBuffer() macro.
Feel free to replace these default functions with your own readers.
When you have reached the point were you want to obtain the decompressed
raster data, you *must* call the following function:
int LZWStreamInit(lzw)
LZWStream *lzw;
lzw is the LZWStream returned by LZWStreamCreate. This function returns
1 when the stream was successfully initialized or something else when an
error occurs.
The next step is to convert the gif LZW compressed raster data to the
LZW format used by "compress". This is done by the following function:
void LZWStreamConvert(lzw)
LZWStream *lzw;
When this function returns, the data has been converted but not yet
uncompressed. The LZWStream package offers two functions to do this:
unsigned char *LZWStreamUncompress(lzw, len)
LZWStream *lzw;
int *len;
int LZWStreamFillBuffer(lzw, data, size)
LZWStream *lzw;
unsigned char *data;
int size;
The first function decompress the converted data and returns it in an
allocated buffer. "len" is the size of the uncompressed data.
The second function also decompresses the converted data but allows you to
read it in seperate chunks. "size" is the number of bytes that should be read
and "data" is the destination buffer. You should make sure that the specified
destination buffer is large enough to hold "size" bytes. This function returns
the number of bytes copied into "data".
The final step is to destroy the LZWStream:
void LZWStreamDestroy(lzw)
LZWStream *lzw;
This function removes any temporary files that were created and cleans up
the memory used by the given stream. It does not destroy the ImageBuffer
contained in it. When this function returns, "lzw" is no longer valid.
As a final note: the LZWStream structure contains a field called err_msg.
This field contains an error message whenever an error occured. You can
choose to display this message or ignore it. You may *not* free this
message, it points to a static data space.
7. Programming Example
----------------------
The following example demonstrates a possible use of the ImageBuffer and
LZWStream objects.
#include "ImBuffer.h" /* ImageBuffer structure & functions */
#include "LZWStream.h" /* LZWStream functions */
unsigned char*
readGifImage(char *file)
{
ImageBuffer *ib;
LZWStream *lzw;
unsigned char c, buf[280];
ib = ImageFileToBuffer(file);
/* read and check gif magic */
ReadOK(ib, &buf, 6);
{
[ verify gif magic ]
}
/* read logical screen descriptor */
ReadOK(ib, buf, 7);
[ pull out necessary image attributes ]
[ read the global colormap using the current ImageBuffer ]
while(1)
{
/* read block identifier */
ReadOK(ib, &c, 1);
/* gif terminator */
if(c == ';')
break;
/* a gif extension block */
if(c == '!')
{
/* get extension type */
ReadOK(ib, &c, 1);
[ deal with it ]
continue;
}
if(c != ',')
continue; /* not a valid start character */
/* read image descriptor */
ReadOK(ib, buf, 9);
[ pull out necessary information ]
[ read a possible local colormap, again using the ImageBuffer ]
/* create a new stream object */
lzw = LZWStreamCreate(ib, NULL);
/* initialize uncompression */
LZWStreamInit(lzw);
/* set read functions */
lzw->readOK = readOK;
lzw->getData = GifGetDataBlock;
/* convert data */
LZWStreamConvert(lzw);
/* get uncompressed data */
data = LZWStreamUncompress(lzw, &len);
/* destroy stream */
LZWStreamDestroy(lzw);
/* we have our image */
break;
}
/* free the ImageBuffer */
FreeImageBuffer(ib);
/* and return the image data */
return(data);
}
The above is a very simple example which doesn't care about errors and
interlaced images. Obvious enhancements would be to add error checking on
every ReadOK call, dealing with multiple images and comparing the size of
the uncompressed raster data with the dimensions of this image. See
gif2gzf.c for a much more extensive example.
8. Using the LZWStream package in your own applications
-------------------------------------------------------
To use the LZWStream package in your own application, you need the following
files:
- LZWStream.h: required typedefs and function prototypes
- LZWStream.c: the LZW decompressor
- ImBuffer.h : ImageBuffer typedefs and function prototypes
- ImBuffer.c : ImageBuffer routines.
Compile LZWStream.c with -DNO_XMHTML defined.
Just add these files to your Makefile and you're done.
9. Using gif2gzf to convert gif images to gzf images
----------------------------------------------------
The gif2gzf utility converts a gif image to a gzf image. This tool is capable
of converting GIF87a, GIF89a, multi-image GIF87a, multi-image GIF89a and
multi-image GIF89a with the NETSCAPE2.0 loop extension.
The syntax to gif2gzf is as follows:
gif2gzf [-v -p]
Where:
giffile: name of giffile to convert
gzffile: name of destination file
-v: verify deflate compression by inflating the deflate compressed data
-p: show progress count. Can be usefull when converting animated gifs.
gif2gzf is not capable of doing batch conversion, but you can write a simple
script that does just this.
If you are using a shell which knows the ``foreach'' command, you can do batch
conversion on the command line using the following sequence of commands:
hobbes [87][13:10] [/home/newt/src/libs/gzf/pics] >foreach file ( gif/*gif )
foreach? ../gif2gzf $file $file:r.gzf
foreach? end
gif/emailed.gif -> gif/emailed.gzf
Converted frame: 53
Size reduction: 29.72%
gif/techsup.gif -> gif/techsup.gzf
Converted frame: 0
Size reduction: 4.21%
....
hobbes [88][13:10] [/home/newt/src/libs/gzf/pics] >
That's about it.
10. Reading GZF Images
----------------------
Reading a GZF image is very similar to reading a GIF image. As was mentioned
in the introduction, the only difference between these formats is the way
in which the raster data is stored.
The following piece of code is based on giftoppm and shows how to decompress
and convert the GZF raster data to the actual image data.
static unsigned char *
ReadGZFImage(ImageBuffer *ib, int len, int height, int interlace)
{
int xpos = 0, ypos = 0, nread, foo;
static unsigned char *image, *data;
register unsigned char *dp, *dPtr;
/* uncompress GZF image data */
data = UncompressGZFData(ib, len*height, &nread);
/* sanity check */
if(data == NULL || nread == 0)
return(NULL);
dPtr = data;
/*
* interlaced image. Need to alternate uncompressed data to create the
* actual image.
*/
if(interlace)
{
int pass = 0, step = 8;
int pass = 0, step = 8;
register int i;
/* allocate image storage */
image = (unsigned char *)calloc(len * height, sizeof(char));
for(i = 0; i < height; i++)
{
if(ypos < height)
{
dp = &image[len * ypos];
for(xpos = 0; xpos < len; xpos++)
*dp++ = *dPtr++;
}
if((ypos += step) >= height)
{
if (pass++ > 0)
step /= 2;
ypos = step / 2;
}
}
/* no longer needed */
free(data);
return(image);
}
/* uncompressed data is same as image data */
return(data);
}
The following routine does the actual decompression:
/*
* dsize is the size of the decompressed image data and nread will be
* updated to reflect the actual no of bytes uncompressed.
*/
static unsigned char*
UncompressData(ImageBuffer *ib, int dsize, int *nread)
{
static unsigned char *output_buf;
unsigned char buf[256], c;
z_stream stream;
int err;
*nread = 0;
/* Skip code size, it's never used */
(void)ReadOK(ib, &c, 1);
/* allocate output buffer */
output_buf = (unsigned char*)calloc(dsize+1, sizeof(char));
/* initialize inflate stuff */
stream.zalloc = Z_NULL;
stream.zfree = Z_NULL;
if((err = inflateInit(&stream)) != Z_OK)
{
fprintf(stderr, "inflateInit failed: %s\n", stream.msg);
free(output_buf);
return(NULL);
}
/* keep uncompressing until we reach the end of the compressed stream */
while(True)
{
/* next compressed block of data */
stream.avail_in = GifGetDataBlock(ib, buf);
stream.next_in = buf;
/* update output buffer */
stream.next_out = output_buf + stream.total_out;
stream.avail_out = dsize - stream.total_out;
/* uncompress it */
err = inflate(&stream, Z_PARTIAL_FLUSH);
/* check return value */
if(err != Z_OK && err != Z_STREAM_END)
{
fprintf(stderr, "inflate failed: %s\n", stream.msg);
free(output_buf);
return(NULL);
}
/* and break if inflate has finished uncompressing our data. */
if(err == Z_STREAM_END)
break;
}
/*
* Skip remaining data. The deflate format signals the end of compressed
* data itself, so we never reach the zero-data block in the above loop.
*/
while((GifGetDataBlock(ib, buf)) > 0);
*nread = stream.total_out;
/* successfull uncompress, return uncompressed image data */
return(output_buf);
}
11. License
-----------
Permission to use, copy, modify, and distribute this software and its
documentation for any purpose and without fee is hereby granted, provided
that the above copyright notice appear in all copies and that both that
copyright notice and this permission notice appear in supporting
documentation. This software is provided "as is" without express or
implied warranty.
Copyright (C) 1994-1997 by Ripley Software Development
All Rights Reserved
12. Author, contact information and where to get it.
----------------------------------------------------
The LZWStream package is written and maintained by Koen D'Hondt and is
originally part of the XmHTML Widget, a LGPL'd Motif widget capable of
displaying HTML 3.2 documents. This widget has built-in support for various
types of images including gif and animated gif images.
If you have any comments, encounter problems, suggestions or just want to tell
us how great this package is ;-) feel free to contact me. ripley@xs4all.nl
Koen D'Hondt
Ripley Software Development.
email: ripley@xs4all.nl
URL : http://www.xs4all.nl/~ripley
XmHTML-1.1.10/docs/PaxHeaders.1031/progressive.txt 0000644 0001750 0000144 00000000132 12613377377 017653 x ustar 00 0000000 0000000 30 mtime=1445854975.085545877
30 atime=1445854975.085545877
30 ctime=1445854975.085545877
XmHTML-1.1.10/docs/progressive.txt 0000644 0001750 0000144 00000061133 12613377377 017257 0 ustar 00chris users 0000000 0000000 This file: progressive.txt
This document describes the general guidelines for implementing progressive
object loading in XmHTML.
In particular it focuses on progressive image loading but contains a number
of general ideas as well.
The implementation itself is of a very asynchronous nature, so all routines
*must* be fully re-entrant.
Table Of Contents
-----------------
0. Terminology
1. Progressive Image Loading
2. User Function Description
2.1 The get_data() function
2.2 The end_data() function
3. Progressive Loader Context
4. XmHTML's Image API and Progressive Image Loading
5. Implementing Progressive Image Loading in XmHTML
6. Changes to XmHTML in general
7. Changes to the Decoders
8. Changes to the image composition routines
0. Terminology
--------------
alpha channel: a series of pixel values in an image used to compute partial
pixel transparency. Used to provide fade in/out effects. An alpha channel
can be seen as viewing the actual image thru ``foggy'' glasses.
clipmask: a ``window'' thru which the image is seen. A clipmask is used by
XmHTML to make images appear transparent.
colorspace: a term used to describe how colors in an image are composed.
In the X window system, a color is composed of three components: red, green
and blue (RGB). These components can be viewed as a cube where each of the
principal axis's represent a component of a color (hence the term colorcube).
A color is thus identified by its spatial position in this colorspace and
is uniquely defined by its three components. This colorcube is the RGB
colorspace. The indexed colorspace is a 1D representation of the RGB
colorspace, in which each RGB triplet is assigned a unique number. As such
it is actually nothing more than a lookup table. The grayscale colorspace
is a colorcube in which all principal axis's coincide and thus forming a 1D
colorspace. This 1D colorspace is not equal to the indexed colorspace since
the components of a color in this one-dimensional colorspace all have the
same value and hence the size of this colorspace is three times smaller than
the indexed colorspace.
histogram: a table representing the color usage in an image. Used to perform
color reduction.
interlaced: a way to store image data. An interlaced image is made up of a
number of planes (which can be seen as venetian blinds), where each plane
contains a portion of the final image. The final image is created by
laying all planes on top of each other (closing the blinds). Interlacing
is used to offer a preview of an image while it is being created (fancy
image viewers can convert each interlaced plane to a full image by expanding
pixels, giving the look of a blocky image which is refined with each pass.
Other cool use of interlacing allows the storage of a background image which
becomes visible on the last pass).
scanline: a single line of image data.
quantization: reduction of the number of colors in an image. Also known as
dithering.
1. Progressive Image Loading
----------------------------
Progressive Image reading is supported for the following image types and
colorspaces:
- GIF and GZF (all types), all colorspaces;
- JPEG, indexed & grayscale, RGB when using a fixed palette on direct-indexed
displays (TrueColor/DirectColor);
- PNG, indexed & grayscale, RGB when using a fixed palette on direct-indexed
displays (TrueColor/DirectColor).
It is not supported for the body image in a HTML document.
Progressive image loading can only start when the colormap used by the image
has been read *and* if it does not use more colors than allowed.
In all other cases (except PNG images with a histogram chunk), progressive
reading is impossible as in advance we do not know how many colors the image
will be using and thus any attempt to perform color quantization is useless.
The general outline is as follows:
1. Set up a function which is able to transfer a given amount of data from
the image stream to the progressive loader. This function must return
DATA_ABORT when it wants to abort progressive reading. It must return
DATA_SUSPEND when at the time of call newly received data isn't sufficient
to comply with the requested amount of data while it must return a positive
number when the requested amount of data can be and is provided;
(this function will be referred to as get_data())
2. obtain required image information (width, height, no of colors, colormap,
type of colorspace);
3. Check colorspace and size of colormap. When we have an RGB colorspace,
set up a default colormap (with evenly spaced RGB components). If the image
contains more than the allowed no of colors, switch to default processing
here. For PNG images with a histogram present, switch libpng into dithering
mode.
Obtain the number of passes required if the image is interlaced.
The number of scanlines equals the height of the image.
4. allocate destination memory and allocate all colors used by the image.
Allocate an XImage which will receive the data while the image is being
read. Allocate a destination drawable which is to receive the processed
data. This destination drawable (useally a Pixmap for the X Window System)
is initially initialized to reflect the current background setting.
When the image is transparent, allocate a fully opaque clipmask.
When the image contains an alpha channel, obtain the background color or
the colormap used by the background image.
Note on color allocation: for transparent images, all colors can be
allocated before step 5 begins. For alpha channel images, colors can only
be allocated when requested as proper alpha channel processing involves
color manipulation at the component level.
5. Start progressive reading. In general this will be done by code along
the following lines:
Boolean done = False;
while(pass < passes_required && !done)
while(scanline < image_scanlines && !done)
{
switch(read_scanline(&data))
{
case DATA_ABORT:
done = True;
break;
case DATA_END:
case DATA_SUSPEND:
[set a status flag according to the return value of the
read_scanline() function so XmHTML will known what to do
when the scanline is to be read]
break;
default:
transfer_scanline(data);
[update status flag];
break;
}
}
done;
done;
The read_scanline() function is an image-specific function which needs
to be able to read both regular and interlaced images. For interlaced
images, it must translate each scanline read to a scanline covering the
entire width of the image (which possibly includes combining a previous
scanline with the current scanline). When the image being processed is an
RGB image and a fixed palette is present, it must also perform a mapping
from RGB colorspace to indexed colorspace.
When this function requires more data, it will call the get_data()
function mentioned in step 1.
The transfer_scanline() function transfers each scanline to the frame
buffer. For all images, it must save each scanline for reuse when the image
has been read. For transparent images, it must update the clipmask to
reflect the transparent pixels in the scanline being processed. When the
image contains an alpha channel, it must combine the background RGB values
with the RGB values corresponding to each pixel in the scanline.
When this has been performed, the corresponding pixel value is stored in
the XImage. When the scanline has been processed, this routine transfers
the updated portion of the XImage to the destination drawable.
When the read_scanline() function returns DATA_ABORT, progressive reading
is terminated and the image is possibly replaced with the "delayed image"
icon (a boomerang).
The actual implementation will be slightly more complicated as each
loop will be performed by different functions which allow a breakdown of
progressive image loading into different chunks at a time. This will become
clear in the Progressive Loader Context description below.
6. Terminate progressive reading. The accumulated, decoded, image data stored
by the transfer_scanline() function is promoted to the final image data.
This final image data will then be available for reuse when the image needs
to be recreated. Any allocated intermediate storage and structures are
to be destroyed.
During this step a user-installed function can also be called to signal
the caller that the image has been processed (this function will be
referred to as end_data()). It is advisable for the user to install
such a function as this is the only way by which a user will be informed
about the removal of this PLC, regardless of the current state of this PLC.
2. User Function Description
----------------------------
2.1 The get_data() function
This is a user-installed function used by a progressive loader to obtain
an amount of data from a data stream.
Proposed prototype:
typedef int (*XmHTMLGetDataProc)(XmHTMLPLCStream, XtPointer);
Where:
XmHTMLPLCStream *stream:
a structure containing data about the data stream from which data
is requested.
This structure should include at least the following information:
- a user_data field so the user can identify this stream;
- a count of the number of bytes received so far. This number should
be used to compute the proper offset in the real data stream. It
can be used for backtracking purposes as well
- a minimum request size;
- a maximum request size;
XtPointer buffer:
a pre-allocated destination buffer. Data requested by this function
is to be placed in this buffer. The number of bytes copied into
this buffer *must* lie between the minimum and maximum request size;
Possible return values:
STREAM_ABORT
indicates progressive reading is to be aborted. Data copied into
buffer is ignored. Depending on the amount of data received so far,
the portion of the received image is either displayed or replaced
by a "delayed image" icon.
STREAM_SUSPEND
indicates progressive reading should be suspended for the given
context. Data copied into the buffer is ignored. When this value
is returned, the progressive loader will call this function again
at a later time.
STREAM_END
indicates no more data is available. This is *not* the same
as returning STREAM_ABORT as in this case the progressive loader
will consider the object loaded and act accordingly.
the amount of bytes actually copied into buffer. This indicates
that the requested amount of data was available and has been
copied into the buffer. For obvious reasons, this value may
*never* be larger than the maximum request size. Also it may
not be smaller than the minimum request size.
Please note that returning 0 is equivalent to returning STREAM_END.
Proposed Resource:
XmNprogressiveReadProc
Note1:
For performance reasons, the amount of bytes copied by this function should
not differ too much from the requested amount of data. XmHTML will
calculate an optimal length as to reduce the number of function calls
(and data backtracking as well). This length is very likely to be the
size of one or more scanlines at a time (how do we do this when the image
data is compressed???).
Note2:
Although the term image is used frequently, this function will also be
used by XmHTML for progressive loading of other data streams (such as
a HTML document itself, which is the next logical step...).
Therefore it's implementation should be independent on the type of object
that is to being loaded.
2.2 The end_data() function
This is a user-installed function, called when the entire object has been
processed or when the get_data() function returns DATA_ABORT.
Proposed prototype:
typedef void (*XmHTMLEndDataProc)(XmHTMLPLCStream, XtPointer, int, Boolean)
Where:
XmHTMLPLCStream *stream:
same structure as above;
XtPointer object_data:
information about the loaded object. This argument can be NULL.
int object_type:
a number identifying the type of object_data. Currently this can only
be XmIMAGE, although other values are very well possible in the
future.
When this argument has the value XmIMAGE, the object_data argument
represents a pointer to a structure of type XmImageInfo. This is a
read-only structure and can be used by the caller for caching purposes.
Boolean success:
This argument indicates whether or not progressive loading has
successfully completed. When it is False, progressive loading has
been aborted by an internal error or it was aborted explicitly.
If there are any outstanding PLCStreams when a new document is set
into the widget, this function will be called for each of the
remaining PLCStreams with success == False. It is the callers
responsibility to remove all resources that were allocated to this
PLCStream.
Proposed Resource:
XmNprogressiveEndProc
Note:
This function may not return a value.
A convenience function for aborting progressive image loading should also
be provided:
XmHTMLImageAbortProgressiveLoading(Widget html);
This function should terminate and remove any outstanding PLCStreams.
Similar functions should be added for each PLC type supported, e.i., for
progressive loading of documents, the following convenience function should
be added:
XmHTMLTextAbortProgressiveLoading(Widget html);
3. Progressive Loader Context
-----------------------------
In order for progressive loading to work properly, the progressive loader
must maintain information about the object that is being loaded. This
information is grouped in a special structure, referred to as the Progressive
Loader Context (or PLC for short).
XmHTML needs to maintain a list of PLC's internally and activate each one
in turn. The frequency with which XmHTML will check this list should be a
user-adjustable time in milliseconds.
A PLC is divided in two sections: object-specific data and PLC status
information.
For progressively loaded images, the object-specific data should be a pointer
to a structure containing at least the following information:
- an object identifier. This should be the first member for all object-specific
structures stored in a PLC.
- an identifier for the image being loaded (name or location);
- the type of the image being loaded;
- the type of colorspace for this image (COLOR_SPACE_INDEXED,
COLOR_SPACE_GRAYSCALE, COLOR_SPACE_RGB);
- transparency/alpha channel identified: TRANSPARENCY_NONE,
TRANSPARENCY_BACKGROUND, TRANSPARENCY_ALPHA.
- colormap used by this image and the number of colors in this image;
- information on the current background setting;
- width and height of this image;
- depth of this image;
- a buffer to contain all decoded image data (useally of size width*height);
- a buffer to contain all image information mentioned in step 2;
- for interlaced images, total number of passes required;
- number of scanlines required on each pass;
- an XImage;
- a destination drawable;
- if applicable, clipmask storage and drawable;
- a field for containing gamma information;
- for interlaced images, number of passes processed so far;
- number of scanlines processed so far;
- a to be defined number of fields specific for the image that is being loaded
(used by the image-specific decoders).
The second section should include at least the following information:
- two pre-allocated buffers for use with the get_data() function:
one is to be used for backtracking/row combining purposes while the other
will be the destination buffer to the get_data() function;
- number of bytes received so far;
- number of bytes required;
- information about the current status of this PLC: ACTIVE, SUSPENDED, ABORTED,
COMPLETED;
- a pointer to the user-installed get_data() function (provided by the new
XmNprogressiveReadFunc resource);
- last returned value of the get_data() function;
- a pointer to the user-installed end_data() function (provided by the new
XmNprogressiveEndFunc resource);
- a field for storing user_data;
The second section should also contain three pointers to image-specific
functions. They are:
- a pointer to a function for obtaining the image information mentioned in
step 2 above;
- a pointer for reading scanlines from an image;
- a pointer to terminate/abort progressive image loading.
It should also contain a pointer to the function that does the actual XImage
composition.
Finally it should also contain an identifier for the lastly activated function
so XmHTML will known which function to call the next time a PLC is activated.
Meaning of the status information flags:
ACTIVE:
indicates the PLC is active and that it should make a request for
new data from the image stream the next time this PLC is activated;
When the get_data() function is other than 0 or a positive number
(reflecting the number of bytes copied into the buffer), the status of
the PLC is changed to reflect the return value from this function (e.i.,
SUSPENDED when DATA_SUSPEND is received and ABORTED when DATA_ABORT
is received).
SUSPENDED:
indicates the PLC has been suspended and that it should make the *same*
request for new data from the image stream next time this PLC is activated;
When the get_data() function returns DATA_OK, the status of the PLC is
promoted to ACTIVE.
ABORTED:
indicates the PLC has been aborted and that it should either save the
amount of data received so far or replace it with a "delayed image" icon.
Calls the end_data() function.
COMPLETED:
indicates the PLC has received the entire image and that it should be
terminated the next time this PLC is activated. When this happens, the
image data stored in the PLC is transferred to corresponding internal
XmHTML structures and the end_data() function is called. The last action
performed by a PLC is to remove itself.
4. XmHTML's Image API and Progressive Image Loading
---------------------------------------------------
To keep XmHTML's image API simple, progressive image loading can be achieved
by adding one additional flag to the XmIMAGE option flags: XmIMAGE_PROGRESSIVE.
A user_data field should also be added to the XmImageInfo structure.
This allows a user to easily extend the function installed for the XmNimageProc
resource to deal with both images already present locally and images that are
being transferred from a remote site.
An example implementation could be along the following lines:
XmImageInfo *loadImage(Widget w, String image)
{
if(image in cache)
return(cached image);
if(image locally)
return(XmHTMLImageDefaultProc(html, image, NULL, 0));
if(image remotely)
{
XmImageInfo *p_image;
[set up a connection with the remote site and save its handle]
p_image = (XmImageInfo*)calloc(1,sizeof(XmImageInfo));
p_image->url = strdup(image);
p_image->options = XmIMAGE_PROGRESSIVE;
p_image->user_data = (XtPointer)connection_handle;
return(p_image);
}
[if we get here, the image is neither locally nor remotely, return
either NULL or switch to delayed image loading if the connection is
extremely slow].
}
A corresponding get_data() function could be the following:
int get_data(XmHTMLPLCStream *stream, XtPointer buffer)
{
int min_out, max_out, buf_pos;
int length, bytes_avail;
[obtain connection_handle from the context (user_data field). Probably
involves getting a handle to the buffer used by the connection to store
incoming data]
if(connection broken)
{
[close connection and do other cleanup]
return(XmPLC_STREAM_ABORT);
}
bytes_avail = [number of bytes received from connection so far]
if(all data received from connection)
{
[close connection and do other cleanup]
return(XmPLC_STREAM_END);
}
min_out = stream->min_out; /* minimum request size */
max_out = stream->max_out; /* maximum request size */
buf_pos = stream->total_in; /* bytes copied so far */
/* compute no of bytes to copy */
length = bytes_avail - buf_pos;
/* more than min_size bytes available */
if(length > min_out)
{
/* check that we do not copy more than max_size bytes */
if(length > max_out)
length = max_out;
/* copy data from connection buffer to outgoing buffer */
memcpy(buffer, [connection buffer] + buf_pos, length);
[possibly update the connection buffer to reflect the number of
bytes copied as well]
return(length);
}
else /* not enough data available yet */
return(XmPLC_STREAM_SUSPEND);
}
To prevent problems later on, none of the XmHTMLPLC context members may
be used by the current PLC when this function returns. The only purpose of
the XmHTMLPLCStream object is to keep the interface simple and to allow
easy extension of the get_data() function without having the need to modify
the get_data prototype.
And a corresponding end_data() function could be:
void end_data(XmHTMLPLCStream *stream, XtPointer object, int object_type,
Boolean success)
{
[obtain connection_handle from the context, close this connection and
do other cleanup]
if(success == False)
{
[Progressive loading was aborted for whatever reason. Depending on
the value of the stream->total_in value you can decide whether
or not you want to keep the object data.]
}
if(object_type == XmIMAGE)
{
[either store object (which will be of type XmImageInfo) in a local
cache or ignore it.]
}
[unknown/unsupported object_type, ignore]
}
As can be seen from the above example implementations it is very easy for
a user to implement progressive image loading (apart from the connection
routines involved).
5. Implementing Progressive Image Loading in XmHTML
---------------------------------------------------
The implementation of progressive image loading in XmHTML requires a number
of changes to the GIF, PNG and JPEG decoders and the image composition
routines. Changes to the painter will not be required as a drawable will be
present from the moment an image is to be loaded progressively.
6. Changes to XmHTML in general
-------------------------------
Define the exact contents for a PLC and it's object data. Add routines to
create, walk and destroy them. Walk the list of PLC's using a timer (with a
user-adjustable interval?).
All PLC's will be placed in a ringbuffer where the PLC walking routine calls
the various functions in a PLC as they are necessary.
7. Changes to the Decoders
--------------------------
These will be rather minimal: the GIF, GZF, PNG and JPEG decoders can already
deal with interlaced images and already read their data a scanline at a time.
they also contain seperate sections for obtaining the image information
described in step 2 in the general outline.
According to the PLC, the changes required are:
- place the sections that are responsible for obtaining the image information
in a seperate routine (if not already done). Determine if it is feasible to
use these routines for both normal and progressive image loading.
- place the scanline reading sections in seperate routines as well. Also
determine the feasibility of using these routines for both normal and
progressive image loading.
- add routines that perform cleanup when progressive image loading is aborted
or has ended.
How this will work with the GIF workaround is a mystery at this moment. One
way is to decode the GIF data using my workaround when a clearCode is received,
but this will lead to a *considerable* delay when doing progressive image
loading on fast connections. On slow connections it will not make that much
difference.
8. Changes to the image composition routines
--------------------------------------------
These will be rather large: actual image composition has to be split into
seperate routines for several display depths (this is preferable for
performance reasons?).
- color allocation, XImage and drawable (and possibly clipmask as well)
creation must be moved to the top instead of being one of the final stages;
- set up routines to convert the image data to the format understood by an
XImage.
- vertical image scaling poses a problem. Horizontal is no problem as we
are dealing with scanlines. Maybe vertical scaling should be used to compute
an interval when performing the outerloop in step 5 of the general outline?
- set up routines that copy the updated portion of the XImage to the
destination drawable. It might be very wise to use the MIT-SHM extension if
it's present. Also add code to update the screen directly (maybe use
XPutImage directly on the display instead of XCopyArea from drawable to
display?)
- add a routine to perform cleanup when progressive image loading has been
aborted.
- add a routine to transform the data contained in a PLC to an XmHTMLImage
structure and to update the information in the XmImageInfo structure
representing the progressively loaded image.
--- End of Document ---
Author : Koen
Date : Tue Jun 10 04:51:23 GMT+0100 1997
Revision : 1.1
Revision Date: Sat Jun 14 18:47:19 GMT+0100 1997
XmHTML-1.1.10/docs/PaxHeaders.1031/MACHINES 0000644 0001750 0000144 00000000132 12613377377 015654 x ustar 00 0000000 0000000 30 mtime=1445854975.083545878
30 atime=1445854975.083545878
30 ctime=1445854975.083545878
XmHTML-1.1.10/docs/MACHINES 0000644 0001750 0000144 00000020266 12613377377 015262 0 ustar 00chris users 0000000 0000000 XmHTML has compiled and run successfully on the following systems:
-----------------------------------------------------------
Linux hobbes 2.0.26 #3 Wed Nov 27 18:16:53 GMT+0100 1996 i586
XmHTML : 1.0.4, 1.0.5, 1.0.6
X version : X11R5
Motif ver. : 2.0.1
Compiler : gcc 2.7.2
CCopts : -g -funroll-loops -Wall -pipe -ansi
defines : -D_BSD_SOURCE
extra libs : -lXm -lXpm -lXmu -lXt -lXext -lX11 -lSM -lICE
from : Koen D'Hondt (ripley@xs4all.nl)
-----------------------------------------------------------
Unixware 2.1.1
XmHTML : 1.0.4
X version : X11R5
Motif ver. : 1.2.3
Compiler : gcc 2.7.2.1
CCopts : -g -funroll-loops -Wall -pipe -ansi
defines : -DNEED_STRCASECMP -DSVR4 -DHAVE_MEMCPY
extra libs : -lXm -lXpm -lXmu -lXt -lXext -lX11 -lsocket -lnsl
from : Thanh Ma (tma@encore.com)
-----------------------------------------------------------
HP-UX A.09.01
XmHTML : 1.0.4, 1.0.5
X version : X11R5
Motif ver. : 1.2.0
Compiler : c89, cc
CCopts : -g -Aa
defines : -D_HPUX_SOURCE -D_POSIX_SOURCE
extra libs : -lXm -lXpm -lXmu -lXt -lXext -lX11
from : Koen D'Hondt (ripley@xs4all.nl)
-----------------------------------------------------------
Linux hagbard 2.0.18 #3 Sat Nov 9 22:53:20 GMT 1996 i586
XmHTML : 1.0.4, 1.0.5, 1.0.6
X version : X11R6
Motif ver. : 2.0
Compiler : gcc 2.7.2
CCopts : -g -funroll-loops -Wall -pipe -ansi
defines : -DDEBUG -D_BSD_SOURCE
extra libs : -lXm -lXpm -lXmu -lXt -lXext -lX11 -lSM -lICE
from : Dick Porter (dick@cymru.net)
-----------------------------------------------------------
UnixWare 1.1.2 SVR4.2
XmHTML : 1.0.4
X version : X11R5
Motif ver. : 1.2.2
Compiler : cc
CCopts :
defines :
extra libs :
from : Valery Kravchuk (valera@itech.kiev.ua)
-----------------------------------------------------------
UnixWare 1.1.2 SVR4.2
XmHTML : 1.0.6
X version : X11R5
Motif ver. : 1.2.2
Compiler : gcc 2.7.0
CCopts : -g -funroll-loops -Wall -pipe -ansi
defines : -DDEBUG -DNEED_STRCASECMP -DSVR4 -DHAVE_MEMCPY
extra libs : -lXm -lXmu -lXt -lXext -lX11 -lsocket -lgen -lnsl -z nodefs
from : Valery Kravchuk (valera@itech.kiev.ua)
-----------------------------------------------------------
IRIX morgaine 6.4-ALPHA-1263473920 12182304 IP22
XmHTML : 1.0.6
X version : X11R6
Motif ver. : 1.2.4
Compiler : cc 7.10 (Mongoose)
CCopts : -woff 1048
Turn off warning about converting between pointer-to-object
and pointer-to-function (format.c:501).
defines :
extra libs : -lXm -lXt -lXext -lX11
from : Richard Offer (offer@sgi.com)
-----------------------------------------------------------
IRIX 5.3 IP22
XmHTML : 1.0.6
X version : X11R5
Motif ver. : 1.2
Compiler : gcc 2.7.0
CCopts : -g -funroll-loops -Wall -pipe -ansi
defines : -DDEBUG -D_BSD_SOURCE
extra libs : -lXm -lXpm -lXmu -lXt -lXext -lX11 -lSM -lIC
from : Jacob Dreyer (jacob@smedtech.com)
-----------------------------------------------------------
HP-UX B.10.20 9000/735
XmHTML : 1.0.6
X version : X11R5
Motif ver. : 1.2.2
Compiler : gcc 2.7.2
CCopts : -g -funroll-loops -Wall -pipe -ansi
defines :
extra libs : -lXm -lXpm -lXmu -lXt -lXext -lX11
from : Jean-Michel NOURRIT (jm.nourrit@univ-reims.fr)
-----------------------------------------------------------
Linux nova.campus.luth.se 2.1.26 #2 Sun Feb 9 01:30:56 CET 1997 alpha
XmHTML : 1.0.8
X version : X11R6
Motif ver. : Lesstif v0.55
Compiler : gcc 2.7.2
CCopts : -g -funroll-loops -Wall -pipe -ansi
defines : -DDEBUG -D_BSD_SOURCE -DHAVE_JPEG -D_POSIX_SOURCE
extra libs : -lXm -lXpm -lXmu -lXt -lXext -lX11 -lSM -lICE
from : Dick Porter (dick@cymru.net)
-----------------------------------------------------------
UnixWare 1.1.2 SVR4.2
XmHTML : 1.0.10
X version : X11R5
Motif ver. : 1.2.2
Compiler : cc
CCopts : -O -Xt
defines : -DDEBUG -DNEED_STRCASECMP -DSVR4 -DSYSV386 -DI18N -DHAVE_MEMCPY
extra libs : -lXm -lXpm -lXmu -lXt -lXext -lX11 -lsocket -lgen -lnsl -z nodefs
from : Valery Kravchuk (valera@itech.kiev.ua)
-----------------------------------------------------------
HP-UX A.09.07
XmHTML : 1.0.6
X version : X11R5
Motif ver. : Motif1.24
Compiler : cc
CCopts : -Aa
defines : -D_HPUX_SOURCE
extra libs : -lXm -lXpm -lXmu -lXt -lXext -lX11
from : Shin Yang(yang@hpw3.ymp.gov)
----------------------------------------------------------
FreeBSD roesel 2.1.0-RELEASE
XmHTML : 1.0.10
X version : X11R6
Motif ver. : LessTif 0.77 !!
Compiler : gcc 2.6.3
CCopts : -ansi (no change from Koen's version really)
defines : -DHAVE_JPEG
extra libs : -lXm -lXpm -lXmu -lXt -lXext -lX11 -lSM -lICE -ljpeg
from : Danny Backx
----------------------------------------------------------
LynxOS 2.3.0 080695 i386
XmHTML : 1.0.11
X version : X11R5
Motif ver. : Metro Link 2.3.3
Compiler : Cygnus GNU gcc 2.6
CCOpts : -g -pipe -Wall -mthreads
defines : -DNEED_STRCASECMP
extra libs : -lnetinet
from : Milburn Taylor (mwt@starbase.neosoft.com)
----------------------------------------------------------
SCO_SV 3.2 i386
XmHTML : 1.0.21
X version : X11R5
Motif ver. : 1.2.4
Compiler : cc
CCopts :
defines : -DNDEBUG -DANSI -DANSICPP -DNeedFunctionPrototypes
extra libs : -lXm -lXmu -lXt -lXpm -lX11 -lPW -lintl -lsocket -lm -lc
from : Robin Schoenwald (flux@berlin.snafu.de)
----------------------------------------------------------
SunOS 5.5 i86pc
XmHTML : 1.0.21
X version : X11R5
Motif ver. : 1.2.4
Compiler : cc
CCopts :
defines : -DNDEBUG -DSUN -DX11R5 -DANSI -DNeedFunctionPrototypes
extra libs : -lXm -lXmu -lXpm -lXt -lX11 -lintl -lsocket -lnsl -lm -lc
from : Robin Schoenwald (flux@berlin.snafu.de)
----------------------------------------------------------
Linux hobbes 2.0.26 #3 Wed Nov 27 18:16:53 GMT+0100 1996 i586
XmHTML : 1.0.21
X version : X11R6.1
Motif ver. : 2.0.1
Compiler : gcc
CCopts :
defines : -D_GNU_SOURCE -D_BSD_SOURCE -D_POSIX_SOURCE
extra libs : -lXm -lXpm -lXmu -lXt -lXext -lX11 -lSM -lICE
from : Koen D'Hondt (ripley@xs4all.nl)
----------------------------------------------------------
Linux hobbes 2.0.26 #3 Wed Nov 27 18:16:53 GMT+0100 1996 i586
XmHTML : 1.0.21
X version : X11R6.1
Motif ver. : LessTif 0.80 alpha
Compiler : gcc
CCopts :
defines : -D_GNU_SOURCE -D_BSD_SOURCE -D_POSIX_SOURCE
extra libs : -lXm -lXpm -lXmu -lXt -lXext -lX11 -lSM -lICE
from : Koen D'Hondt (ripley@xs4all.nl)
----------------------------------------------------------
SunOS GSTE2Z 5.5.1 Generic_103640-08 sun4u sparc SUNW,Ultra-1
XmHTML : 1.1.0
X version : 11005
Motif ver. : 1002
Compiler : Sun SC4.0 18 Oct 1995 C 4.0
CCopts : -DSYSV -DSVR4 -xF -Wa,-cg92
defines : -DSVR4 -DSYSV -DVERSION=1100 -DMotifDefines -DNO_DEBUG
extra libs :
from : janni@stavanger.Geco-Prakla.slb.com
----------------------------------------------------------
Linux pallas 2.0.32 #2 Thu Nov 20 13:30:27 MET 1997 i686 unknown
XmHTML : 1102 XmHTML-1.1.2b (28.2.1998)
X11 : 11006, X11R6.3
Server XFree86 3.3.1 SuSE X Server ATI Xpert@work AGP
Motif : 2000 OSF/Motif Version 2.0.1
From : Dusan Peterc, arahne@arahne.si
----------------------------------------------------------
[uname -rms]
XmHTML :
X version :
Motif ver. :
Compiler :
CCopts :
defines :
extra libs :
from :
----------------------------------------------------------
XmHTML-1.1.10/docs/PaxHeaders.1031/QUOTES 0000644 0001750 0000144 00000000132 12613377377 015505 x ustar 00 0000000 0000000 30 mtime=1445854975.084545878
30 atime=1445854975.083545878
30 ctime=1445854975.084545878
XmHTML-1.1.10/docs/QUOTES 0000644 0001750 0000144 00000003215 12613377377 015106 0 ustar 00chris users 0000000 0000000 Some of the answers I received about a XmHTML survey I made in April 1997,
during full alpha development.
The question I asked was: What do you like about XmHTML?
LOVE that parser :-)
Susan Liebeskind
It is rapidly developing by a high skilled professional. It's alive, unlike
many commercial software! And there are some utilites and approaches inside
it that are interesting for me as a programmer. I like GPL licensing also.
Valery Kravchuk
Being written by someone else :-) (seriously, I wouldnt be nearly so far
advanced in such a short time if I was writing this)
Dick Porter
Its license. Like LessTif, it can be used by most anybody.
Also it is the basis for lots of interesting stuff.
Danny Backx
It's license. Also like the fact that it is being updated frequently.
Eric Marttila
Rather simple to build in
Roland Heinen
It's flexability, and price. :)
Ricky Ralston
- License
- HTML 3.2 compliant
Nourrit Jean Michel
License. Our application is commercial and every other HTML widget or
hypertext help system either a) was free and prohibited use in a
commercial application or b) was not free and was not ported to our
operating system and source was not available.
Milburn Taylor
Thanks a lot for a brilliant implementation of a free HTML 3.2 widget !!!
Jan Arvid Veggeberg
Thanks for your hard work on the XmHTML widget and for making it available
under the LPGL.
Dave Brown
XmHTML-1.1.10/docs/PaxHeaders.1031/iso-639.map 0000644 0001750 0000144 00000000132 12613377377 016352 x ustar 00 0000000 0000000 30 mtime=1445854975.085545877
30 atime=1445854975.084545878
30 ctime=1445854975.085545877
XmHTML-1.1.10/docs/iso-639.map 0000644 0001750 0000144 00000106657 12613377377 015771 0 ustar 00chris users 0000000 0000000
XmHTML-1.1.10/docs/PaxHeaders.1031/Framework.PS 0000644 0001750 0000144 00000000132 12613377377 016743 x ustar 00 0000000 0000000 30 mtime=1445854975.083545878
30 atime=1445854975.083545878
30 ctime=1445854975.083545878
XmHTML-1.1.10/docs/Framework.PS 0000644 0001750 0000144 00000215067 12613377377 016356 0 ustar 00chris users 0000000 0000000 %!PS-Adobe-3.0
%%Creator: groff version 1.11
%%CreationDate: Mon Dec 15 09:40:46 1997
%%DocumentNeededResources: font Times-Roman
%%+ font Times-Bold
%%+ font Times-Italic
%%DocumentSuppliedResources: procset grops 1.11 0
%%Pages: 14
%%PageOrder: Ascend
%%Orientation: Portrait
%%EndComments
%%BeginProlog
%%BeginResource: procset grops 1.11 0
/setpacking where{
pop
currentpacking
true setpacking
}if
/grops 120 dict dup begin
/SC 32 def
/A/show load def
/B{0 SC 3 -1 roll widthshow}bind def
/C{0 exch ashow}bind def
/D{0 exch 0 SC 5 2 roll awidthshow}bind def
/E{0 rmoveto show}bind def
/F{0 rmoveto 0 SC 3 -1 roll widthshow}bind def
/G{0 rmoveto 0 exch ashow}bind def
/H{0 rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def
/I{0 exch rmoveto show}bind def
/J{0 exch rmoveto 0 SC 3 -1 roll widthshow}bind def
/K{0 exch rmoveto 0 exch ashow}bind def
/L{0 exch rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def
/M{rmoveto show}bind def
/N{rmoveto 0 SC 3 -1 roll widthshow}bind def
/O{rmoveto 0 exch ashow}bind def
/P{rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def
/Q{moveto show}bind def
/R{moveto 0 SC 3 -1 roll widthshow}bind def
/S{moveto 0 exch ashow}bind def
/T{moveto 0 exch 0 SC 5 2 roll awidthshow}bind def
/SF{
findfont exch
[exch dup 0 exch 0 exch neg 0 0]makefont
dup setfont
[exch/setfont cvx]cvx bind def
}bind def
/MF{
findfont
[5 2 roll
0 3 1 roll
neg 0 0]makefont
dup setfont
[exch/setfont cvx]cvx bind def
}bind def
/level0 0 def
/RES 0 def
/PL 0 def
/LS 0 def
/MANUAL{
statusdict begin/manualfeed true store end
}bind def
/PLG{
gsave newpath clippath pathbbox grestore
exch pop add exch pop
}bind def
/BP{
/level0 save def
1 setlinecap
1 setlinejoin
72 RES div dup scale
LS{
90 rotate
}{
0 PL translate
}ifelse
1 -1 scale
}bind def
/EP{
level0 restore
showpage
}bind def
/DA{
newpath arcn stroke
}bind def
/SN{
transform
.25 sub exch .25 sub exch
round .25 add exch round .25 add exch
itransform
}bind def
/DL{
SN
moveto
SN
lineto stroke
}bind def
/DC{
newpath 0 360 arc closepath
}bind def
/TM matrix def
/DE{
TM currentmatrix pop
translate scale newpath 0 0 .5 0 360 arc closepath
TM setmatrix
}bind def
/RC/rcurveto load def
/RL/rlineto load def
/ST/stroke load def
/MT/moveto load def
/CL/closepath load def
/FL{
currentgray exch setgray fill setgray
}bind def
/BL/fill load def
/LW/setlinewidth load def
/RE{
findfont
dup maxlength 1 index/FontName known not{1 add}if dict begin
{
1 index/FID ne{def}{pop pop}ifelse
}forall
/Encoding exch def
dup/FontName exch def
currentdict end definefont pop
}bind def
/DEFS 0 def
/EBEGIN{
moveto
DEFS begin
}bind def
/EEND/end load def
/CNT 0 def
/level1 0 def
/PBEGIN{
/level1 save def
translate
div 3 1 roll div exch scale
neg exch neg exch translate
0 setgray
0 setlinecap
1 setlinewidth
0 setlinejoin
10 setmiterlimit
[]0 setdash
/setstrokeadjust where{
pop
false setstrokeadjust
}if
/setoverprint where{
pop
false setoverprint
}if
newpath
/CNT countdictstack def
userdict begin
/showpage{}def
}bind def
/PEND{
clear
countdictstack CNT sub{end}repeat
level1 restore
}bind def
end def
/setpacking where{
pop
setpacking
}if
%%EndResource
%%IncludeResource: font Times-Roman
%%IncludeResource: font Times-Bold
%%IncludeResource: font Times-Italic
grops begin/DEFS 1 dict def DEFS begin/u{.001 mul}bind def end/RES 72
def/PL 792 def/LS false def/ENC0[/asciicircum/asciitilde/Scaron/Zcaron
/scaron/zcaron/Ydieresis/trademark/quotesingle/.notdef/.notdef/.notdef
/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef
/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef
/.notdef/.notdef/space/exclam/quotedbl/numbersign/dollar/percent
/ampersand/quoteright/parenleft/parenright/asterisk/plus/comma/hyphen
/period/slash/zero/one/two/three/four/five/six/seven/eight/nine/colon
/semicolon/less/equal/greater/question/at/A/B/C/D/E/F/G/H/I/J/K/L/M/N/O
/P/Q/R/S/T/U/V/W/X/Y/Z/bracketleft/backslash/bracketright/circumflex
/underscore/quoteleft/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y
/z/braceleft/bar/braceright/tilde/.notdef/quotesinglbase/guillemotleft
/guillemotright/bullet/florin/fraction/perthousand/dagger/daggerdbl
/endash/emdash/ff/fi/fl/ffi/ffl/dotlessi/dotlessj/grave/hungarumlaut
/dotaccent/breve/caron/ring/ogonek/quotedblleft/quotedblright/oe/lslash
/quotedblbase/OE/Lslash/.notdef/exclamdown/cent/sterling/currency/yen
/brokenbar/section/dieresis/copyright/ordfeminine/guilsinglleft
/logicalnot/minus/registered/macron/degree/plusminus/twosuperior
/threesuperior/acute/mu/paragraph/periodcentered/cedilla/onesuperior
/ordmasculine/guilsinglright/onequarter/onehalf/threequarters
/questiondown/Agrave/Aacute/Acircumflex/Atilde/Adieresis/Aring/AE
/Ccedilla/Egrave/Eacute/Ecircumflex/Edieresis/Igrave/Iacute/Icircumflex
/Idieresis/Eth/Ntilde/Ograve/Oacute/Ocircumflex/Otilde/Odieresis
/multiply/Oslash/Ugrave/Uacute/Ucircumflex/Udieresis/Yacute/Thorn
/germandbls/agrave/aacute/acircumflex/atilde/adieresis/aring/ae/ccedilla
/egrave/eacute/ecircumflex/edieresis/igrave/iacute/icircumflex/idieresis
/eth/ntilde/ograve/oacute/ocircumflex/otilde/odieresis/divide/oslash
/ugrave/uacute/ucircumflex/udieresis/yacute/thorn/ydieresis]def
/Times-Italic@0 ENC0/Times-Italic RE/Times-Bold@0 ENC0/Times-Bold RE
/Times-Roman@0 ENC0/Times-Roman RE
%%EndProlog
%%Page: 1 1
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF 531.38(-- --)0 4 R/F1 15/Times-Bold@0 SF
(X11R6 Sample Implementation Frame W)143.992 132 Q(ork)-1.125 E/F2 10
/Times-Italic@0 SF(Katsuhisa Y)256.925 180 Q(ano)-.92 E F0 -.18(TO)
241.185 198 S(SHIB).18 E 2.5(AC)-.35 G(orporation)-2.5 E F2 -.92(Yo)
255.615 222 S(shio Horiuc).92 E(hi)-.15 E F0(IBM Japan)265.92 240 Q EP
%%Page: 2 2
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF 531.38(-- --)0 4 R/F1 9/Times-Roman@0 SF(Cop)72
279.6 Q(yright \251 1994 by T)-.09 E(OSHIB)-.162 E 2.25(AC)-.315 G
(orporation)-2.25 E(Cop)72 291.6 Q(yright \251 1994 by IBM Corporation)
-.09 E(Permission to use, cop)72 307.2 Q 1.17 -.585(y, m)-.09 H(odify)
.585 E 2.25(,a)-.585 G(nd distrib)-2.25 E(ute this documentation for an)
-.18 E 2.25(yp)-.135 G(urpose and without fee is hereby granted,)-2.25 E
(pro)72 319.2 Q(vided that the abo)-.135 E .27 -.135(ve c)-.135 H(op)
.135 E(yright notice and this permission notice appear in all copies.)
-.09 E -.162(TO)4.5 G(SHIB).162 E 2.25(AC)-.315 G(orporation and)-2.25 E
(IBM Corporation mak)72 331.2 Q 2.25(en)-.09 G 2.25(or)-2.25 G
(epresentations about the suitability for an)-2.25 E 2.25(yp)-.135 G
(urpose of the information in this document.)-2.25 E
(This documentation is pro)72 343.2 Q(vided as is without e)-.135 E
(xpress or implied w)-.135 E(arranty)-.09 E(.)-.585 E(Cop)72 415.2 Q
(yright \251 1994 X Consortium)-.09 E
(Permission is hereby granted, free of char)72 430.8 Q(ge, to an)-.162 E
2.25(yp)-.135 G(erson obtaining a cop)-2.25 E 2.25(yo)-.09 G 2.25(ft)
-2.25 G(his softw)-2.25 E(are and associated documenta-)-.09 E
(tion \214les \(the `)72 442.8 Q(`Softw)-.666 E(are')-.09 E
('\), to deal in the Softw)-.666 E(are without restriction, including w\
ithout limitation the rights to use,)-.09 E(cop)72 454.8 Q 1.17 -.585
(y, m)-.09 H(odify).585 E 2.25(,m)-.585 G(er)-2.25 E
(ge, publish, distrib)-.162 E
(ute, sublicense, and/or sell copies of the Softw)-.18 E
(are, and to permit persons to whom)-.09 E(the Softw)72 466.8 Q
(are is furnished to do so, subject to the follo)-.09 E
(wing conditions:)-.225 E(The abo)72 482.4 Q .27 -.135(ve c)-.135 H(op)
.135 E(yright notice and this permission notice shall be included in al\
l copies or substantial portions of the Soft-)-.09 E -.09(wa)72 494.4 S
(re.).09 E(THE SOFTW)72 510 Q(ARE IS PR)-1.08 E -.45(OV)-.36 G(IDED `)
.45 E -.72(`A)-.666 G 2.25(SI).72 G(S')-2.25 E(', WITHOUT W)-.666 E
(ARRANTY OF ANY KIND, EXPRESS OR IMPLIED,)-1.08 E(INCLUDING B)72 522 Q
(UT NO)-.09 E 2.25(TL)-.36 G(IMITED T)-2.25 E 2.25(OT)-.162 G(HE W)-2.25
E(ARRANTIES OF MERCHANT)-1.08 E(ABILITY)-.837 E 2.25(,F)-1.161 G
(ITNESS FOR A P)-2.25 E(AR)-.828 E(TIC-)-.54 E
(ULAR PURPOSE AND NONINFRINGEMENT)72 534 Q 4.5(.I)-.666 G 2.25(NN)-4.5 G
2.25(OE)-2.25 G(VENT SHALL THE X CONSOR)-2.25 E(TIUM BE LIABLE FOR)-.54
E(ANY CLAIM, D)72 546 Q(AMA)-.36 E(GES OR O)-.36 E(THER LIABILITY)-.36 E
2.25(,W)-1.161 G(HETHER IN AN A)-2.25 E(CTION OF CONTRA)-.36 E(CT)-.36 E
2.25(,T)-.666 G(OR)-2.412 E 2.25(TO)-.54 G 2.25(RO)-2.25 G(TH-)-2.61 E
(ER)72 558 Q(WISE, ARISING FR)-.495 E
(OM, OUT OF OR IN CONNECTION WITH THE SOFTW)-.36 E(ARE OR THE USE OR O)
-1.08 E(THER)-.36 E(DEALINGS IN THE SOFTW)72 570 Q(ARE.)-1.08 E(Except \
as contained in this notice, the name of the X Consortium shall not be \
used in adv)72 585.6 Q(ertising or otherwise to pro-)-.135 E
(mote the sale, use or other dealings in this Softw)72 597.6 Q
(are without prior written authorization from the X Consortium.)-.09 E
/F2 9/Times-Italic@0 SF 2.25(XW)72 645.6 S(indow System)-2.745 E F1
(is a trademark of X Consortium, Inc.)2.25 E EP
%%Page: 1 3
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF 531.38(-- --)0 4 R/F1 11/Times-Bold@0 SF 2.75
(1. Pr)72 84 R(eface)-.198 E/F2 11/Times-Roman@0 SF(This document propo\
ses to de\214ne the structures, methods and their signatures that are e)
72 99.6 Q(xpected to)-.165 E(be common to all locale dependent function\
s within the Xlib sample implementation.)72 111.6 Q(The fol-)5.5 E(lo)72
123.6 Q(wing illustration \(Fig.1\) is proposed to outline the separati\
ng of the components within the sam-)-.275 E(ple implementation.)72
135.6 Q(... 0.237 5.796 5.24 10.14)101.262 151.2 Q
(... 0.000i 4.344i 5.003i 0.000i)3.666 E .44 LW 226.562 306.88 226.562
317.88 DL 226.562 295.88 226.562 306.88 DL 226.562 284.88 226.562 295.88
DL 226.562 273.88 226.562 284.88 DL 226.562 262.88 226.562 273.88 DL
226.562 251.88 226.562 262.88 DL 226.562 245.88 226.562 256.88 DL
232.062 244.56 226.562 244.56 DL 235.562 244.56 230.062 244.56 DL
241.062 244.56 235.562 244.56 DL 246.562 244.56 241.062 244.56 DL
252.062 244.56 246.562 244.56 DL 257.562 244.56 252.062 244.56 DL
263.062 244.56 257.562 244.56 DL 268.562 244.56 263.062 244.56 DL
274.062 244.56 268.562 244.56 DL 279.562 244.56 274.062 244.56 DL
285.062 244.56 279.562 244.56 DL 290.562 244.56 285.062 244.56 DL
296.062 244.56 290.562 244.56 DL 301.562 244.56 296.062 244.56 DL
307.062 244.56 301.562 244.56 DL 312.562 244.56 307.062 244.56 DL
318.062 244.56 312.562 244.56 DL 323.562 244.56 318.062 244.56 DL
329.062 244.56 323.562 244.56 DL 334.562 244.56 329.062 244.56 DL
334.562 245.88 334.562 256.88 DL 334.562 251.88 334.562 262.88 DL
334.562 262.88 334.562 273.88 DL 334.562 273.88 334.562 284.88 DL
334.562 284.88 334.562 295.88 DL 334.562 295.88 334.562 306.88 DL
334.562 306.88 334.562 317.88 DL 232.062 316.56 226.562 316.56 DL
235.562 316.56 230.062 316.56 DL 241.062 316.56 235.562 316.56 DL
246.562 316.56 241.062 316.56 DL 252.062 316.56 246.562 316.56 DL
257.562 316.56 252.062 316.56 DL 263.062 316.56 257.562 316.56 DL
268.562 316.56 263.062 316.56 DL 274.062 316.56 268.562 316.56 DL
279.562 316.56 274.062 316.56 DL 285.062 316.56 279.562 316.56 DL
290.562 316.56 285.062 316.56 DL 296.062 316.56 290.562 316.56 DL
301.562 316.56 296.062 316.56 DL 307.062 316.56 301.562 316.56 DL
312.562 316.56 307.062 316.56 DL 318.062 316.56 312.562 316.56 DL
323.562 316.56 318.062 316.56 DL 329.062 316.56 323.562 316.56 DL
334.562 316.56 329.062 316.56 DL 231.918 280.416 226.418 280.416 DL
235.346 280.416 229.846 280.416 DL 240.846 280.416 235.346 280.416 DL
246.346 280.416 240.846 280.416 DL 251.846 280.416 246.346 280.416 DL
257.346 280.416 251.846 280.416 DL 262.846 280.416 257.346 280.416 DL
268.346 280.416 262.846 280.416 DL 273.846 280.416 268.346 280.416 DL
279.346 280.416 273.846 280.416 DL 284.846 280.416 279.346 280.416 DL
290.346 280.416 284.846 280.416 DL 295.846 280.416 290.346 280.416 DL
301.346 280.416 295.846 280.416 DL 306.846 280.416 301.346 280.416 DL
312.346 280.416 306.846 280.416 DL 317.846 280.416 312.346 280.416 DL
323.346 280.416 317.846 280.416 DL 328.846 280.416 323.346 280.416 DL
334.346 280.416 328.846 280.416 DL 280.346 245.736 280.346 256.736 DL
280.346 248.736 280.346 259.736 DL 280.346 259.736 280.346 270.736 DL
280.346 270.736 280.346 281.736 DL/F3 12/Times-Roman@0 SF(Input)235.346
262.168 Q(Method)235.346 275.904 Q(Output)289.346 262.368 Q(Method)
289.346 275.904 Q()-3 E 3
(XL)244.346 311.904 S(ocale Object)-3 E .48 LW 352.562 270 352.562 282
DL 352.562 258 352.562 270 DL 352.562 246 352.562 258 DL 352.562 246
352.562 258 DL 358.562 244.56 352.562 244.56 DL 364.562 244.56 358.562
244.56 DL 370.562 244.56 364.562 244.56 DL 376.562 244.56 370.562 244.56
DL 382.562 244.56 376.562 244.56 DL 388.562 244.56 382.562 244.56 DL
394.562 244.56 388.562 244.56 DL 400.562 244.56 394.562 244.56 DL
406.562 244.56 400.562 244.56 DL 412.562 244.56 406.562 244.56 DL
418.562 244.56 412.562 244.56 DL 424.562 244.56 418.562 244.56 DL
430.562 244.56 424.562 244.56 DL 436.562 244.56 430.562 244.56 DL
442.562 244.56 436.562 244.56 DL 448.562 244.56 442.562 244.56 DL
454.562 244.56 448.562 244.56 DL 460.562 244.56 454.562 244.56 DL
460.562 246 460.562 258 DL 460.562 246 460.562 258 DL 460.562 258
460.562 270 DL 460.562 270 460.562 282 DL 358.562 280.56 352.562 280.56
DL 364.562 280.56 358.562 280.56 DL 370.562 280.56 364.562 280.56 DL
376.562 280.56 370.562 280.56 DL 382.562 280.56 376.562 280.56 DL
388.562 280.56 382.562 280.56 DL 394.562 280.56 388.562 280.56 DL
400.562 280.56 394.562 280.56 DL 406.562 280.56 400.562 280.56 DL
412.562 280.56 406.562 280.56 DL 418.562 280.56 412.562 280.56 DL
424.562 280.56 418.562 280.56 DL 430.562 280.56 424.562 280.56 DL
436.562 280.56 430.562 280.56 DL 442.562 280.56 436.562 280.56 DL
448.562 280.56 442.562 280.56 DL 454.562 280.56 448.562 280.56 DL
460.562 280.56 454.562 280.56 DL 3(CL)361.346 262.368 S(ibrary)-3 E
(ANSI impl.)406.346 275.904 Q 100.562 270 100.562 282 DL 100.562 258
100.562 270 DL 100.562 246 100.562 258 DL 100.562 246 100.562 258 DL
106.562 244.56 100.562 244.56 DL 112.562 244.56 106.562 244.56 DL
118.562 244.56 112.562 244.56 DL 124.562 244.56 118.562 244.56 DL
130.562 244.56 124.562 244.56 DL 136.562 244.56 130.562 244.56 DL
142.562 244.56 136.562 244.56 DL 148.562 244.56 142.562 244.56 DL
154.562 244.56 148.562 244.56 DL 160.562 244.56 154.562 244.56 DL
166.562 244.56 160.562 244.56 DL 172.562 244.56 166.562 244.56 DL
178.562 244.56 172.562 244.56 DL 184.562 244.56 178.562 244.56 DL
190.562 244.56 184.562 244.56 DL 196.562 244.56 190.562 244.56 DL
202.562 244.56 196.562 244.56 DL 208.562 244.56 202.562 244.56 DL
208.562 246 208.562 258 DL 208.562 246 208.562 258 DL 208.562 258
208.562 270 DL 208.562 270 208.562 282 DL 106.562 280.56 100.562 280.56
DL 112.562 280.56 106.562 280.56 DL 118.562 280.56 112.562 280.56 DL
124.562 280.56 118.562 280.56 DL 130.562 280.56 124.562 280.56 DL
136.562 280.56 130.562 280.56 DL 142.562 280.56 136.562 280.56 DL
148.562 280.56 142.562 280.56 DL 154.562 280.56 148.562 280.56 DL
160.562 280.56 154.562 280.56 DL 166.562 280.56 160.562 280.56 DL
172.562 280.56 166.562 280.56 DL 178.562 280.56 172.562 280.56 DL
184.562 280.56 178.562 280.56 DL 190.562 280.56 184.562 280.56 DL
196.562 280.56 190.562 280.56 DL 202.562 280.56 196.562 280.56 DL
208.562 280.56 202.562 280.56 DL(Locale Library)109.346 262.368 Q
(non-AnSI impl.)131.882 274.104 Q 3(<< ANSI/MSE)352.346 221.904 R
(API >>)3 E(\(X Contrib\))378.182 235.368 Q(XLC_XLOCALE)109.346 388.368
Q 3(-M)109.346 401.904 S(B_CUR_MAX)-3 E 3(-c)109.346 413.568 S
(odeset info)-3 E 3(oc)109.346 425.304 S(har/charset)-3 E 3(oc)109.346
436.968 S(on)-3 E(v/charset)-.48 E 100.562 432 100.562 444 DL 100.562
420 100.562 432 DL 100.562 408 100.562 420 DL 100.562 396 100.562 408 DL
100.562 384 100.562 396 DL 100.562 372 100.562 384 DL 100.562 372
100.562 384 DL 106.562 370.56 100.562 370.56 DL 112.562 370.56 106.562
370.56 DL 118.562 370.56 112.562 370.56 DL 124.562 370.56 118.562 370.56
DL 130.562 370.56 124.562 370.56 DL 136.562 370.56 130.562 370.56 DL
142.562 370.56 136.562 370.56 DL 148.562 370.56 142.562 370.56 DL
154.562 370.56 148.562 370.56 DL 160.562 370.56 154.562 370.56 DL
166.562 370.56 160.562 370.56 DL 172.562 370.56 166.562 370.56 DL
178.562 370.56 172.562 370.56 DL 184.562 370.56 178.562 370.56 DL
190.562 370.56 184.562 370.56 DL 196.562 370.56 190.562 370.56 DL
202.562 370.56 196.562 370.56 DL 208.562 370.56 202.562 370.56 DL
208.562 372 208.562 384 DL 208.562 372 208.562 384 DL 208.562 384
208.562 396 DL 208.562 396 208.562 408 DL 208.562 408 208.562 420 DL
208.562 420 208.562 432 DL 208.562 432 208.562 444 DL 106.562 442.56
100.562 442.56 DL 112.562 442.56 106.562 442.56 DL 118.562 442.56
112.562 442.56 DL 124.562 442.56 118.562 442.56 DL 130.562 442.56
124.562 442.56 DL 136.562 442.56 130.562 442.56 DL 142.562 442.56
136.562 442.56 DL 148.562 442.56 142.562 442.56 DL 154.562 442.56
148.562 442.56 DL 160.562 442.56 154.562 442.56 DL 166.562 442.56
160.562 442.56 DL 172.562 442.56 166.562 442.56 DL 178.562 442.56
172.562 442.56 DL 184.562 442.56 178.562 442.56 DL 190.562 442.56
184.562 442.56 DL 196.562 442.56 190.562 442.56 DL 202.562 442.56
196.562 442.56 DL 208.562 442.56 202.562 442.56 DL(XLC_FONTSET)235.346
388.368 Q 3(-f)235.346 401.904 S(onset info)-3 E 3(-c)235.346 413.568 S
(harset info)-3 E 3(-f)235.346 425.304 S(ont/charset)-3 E 3(-X)235.346
436.968 S(LFD, GL/GR)-3 E 226.562 432 226.562 444 DL 226.562 420 226.562
432 DL 226.562 408 226.562 420 DL 226.562 396 226.562 408 DL 226.562 384
226.562 396 DL 226.562 372 226.562 384 DL 226.562 372 226.562 384 DL
232.562 370.56 226.562 370.56 DL 238.562 370.56 232.562 370.56 DL
244.562 370.56 238.562 370.56 DL 250.562 370.56 244.562 370.56 DL
256.562 370.56 250.562 370.56 DL 262.562 370.56 256.562 370.56 DL
268.562 370.56 262.562 370.56 DL 274.562 370.56 268.562 370.56 DL
280.562 370.56 274.562 370.56 DL 286.562 370.56 280.562 370.56 DL
292.562 370.56 286.562 370.56 DL 298.562 370.56 292.562 370.56 DL
304.562 370.56 298.562 370.56 DL 310.562 370.56 304.562 370.56 DL
316.562 370.56 310.562 370.56 DL 322.562 370.56 316.562 370.56 DL
328.562 370.56 322.562 370.56 DL 334.562 370.56 328.562 370.56 DL
334.562 372 334.562 384 DL 334.562 372 334.562 384 DL 334.562 384
334.562 396 DL 334.562 396 334.562 408 DL 334.562 408 334.562 420 DL
334.562 420 334.562 432 DL 334.562 432 334.562 444 DL 232.562 442.56
226.562 442.56 DL 238.562 442.56 232.562 442.56 DL 244.562 442.56
238.562 442.56 DL 250.562 442.56 244.562 442.56 DL 256.562 442.56
250.562 442.56 DL 262.562 442.56 256.562 442.56 DL 268.562 442.56
262.562 442.56 DL 274.562 442.56 268.562 442.56 DL 280.562 442.56
274.562 442.56 DL 286.562 442.56 280.562 442.56 DL 292.562 442.56
286.562 442.56 DL 298.562 442.56 292.562 442.56 DL 304.562 442.56
298.562 442.56 DL 310.562 442.56 304.562 442.56 DL 316.562 442.56
310.562 442.56 DL 322.562 442.56 316.562 442.56 DL 328.562 442.56
322.562 442.56 DL 334.562 442.56 328.562 442.56 DL 3(-c)361.346 413.568
S(odeset info)-3 E 3(oc)361.346 425.304 S(har/charset)-3 E 3(oc)361.346
436.968 S(on)-3 E(v/charset)-.48 E 3(-M)361.346 401.904 S(B_CUR_MAX)-3 E
(localedef DB)361.346 388.368 Q 352.562 432 352.562 444 DL 352.562 420
352.562 432 DL 352.562 408 352.562 420 DL 352.562 396 352.562 408 DL
352.562 384 352.562 396 DL 352.562 372 352.562 384 DL 352.562 372
352.562 384 DL 358.562 370.56 352.562 370.56 DL 364.562 370.56 358.562
370.56 DL 370.562 370.56 364.562 370.56 DL 376.562 370.56 370.562 370.56
DL 382.562 370.56 376.562 370.56 DL 388.562 370.56 382.562 370.56 DL
394.562 370.56 388.562 370.56 DL 400.562 370.56 394.562 370.56 DL
406.562 370.56 400.562 370.56 DL 412.562 370.56 406.562 370.56 DL
418.562 370.56 412.562 370.56 DL 424.562 370.56 418.562 370.56 DL
430.562 370.56 424.562 370.56 DL 436.562 370.56 430.562 370.56 DL
442.562 370.56 436.562 370.56 DL 448.562 370.56 442.562 370.56 DL
454.562 370.56 448.562 370.56 DL 460.562 370.56 454.562 370.56 DL
460.562 372 460.562 384 DL 460.562 372 460.562 384 DL 460.562 384
460.562 396 DL 460.562 396 460.562 408 DL 460.562 408 460.562 420 DL
460.562 420 460.562 432 DL 460.562 432 460.562 444 DL 358.562 442.56
352.562 442.56 DL 364.562 442.56 358.562 442.56 DL 370.562 442.56
364.562 442.56 DL 376.562 442.56 370.562 442.56 DL 382.562 442.56
376.562 442.56 DL 388.562 442.56 382.562 442.56 DL 394.562 442.56
388.562 442.56 DL 400.562 442.56 394.562 442.56 DL 406.562 442.56
400.562 442.56 DL 412.562 442.56 406.562 442.56 DL 418.562 442.56
412.562 442.56 DL 424.562 442.56 418.562 442.56 DL 430.562 442.56
424.562 442.56 DL 436.562 442.56 430.562 442.56 DL 442.562 442.56
436.562 442.56 DL 448.562 442.56 442.562 442.56 DL 454.562 442.56
448.562 442.56 DL 460.562 442.56 454.562 442.56 DL 154.562 163.2 154.562
181.2 DL 160.562 163.2 154.562 163.2 DL 166.562 163.2 160.562 163.2 DL
172.562 163.2 166.562 163.2 DL 178.562 163.2 172.562 163.2 DL 184.562
163.2 178.562 163.2 DL 190.562 163.2 184.562 163.2 DL 196.562 163.2
190.562 163.2 DL 202.562 163.2 196.562 163.2 DL 208.562 163.2 202.562
163.2 DL 214.562 163.2 208.562 163.2 DL 220.562 163.2 214.562 163.2 DL
226.562 163.2 220.562 163.2 DL 232.562 163.2 226.562 163.2 DL 238.562
163.2 232.562 163.2 DL 244.562 163.2 238.562 163.2 DL 250.562 163.2
244.562 163.2 DL 256.562 163.2 250.562 163.2 DL 262.562 163.2 256.562
163.2 DL 268.562 163.2 262.562 163.2 DL 274.562 163.2 268.562 163.2 DL
280.562 163.2 274.562 163.2 DL 286.562 163.2 280.562 163.2 DL 292.562
163.2 286.562 163.2 DL 298.562 163.2 292.562 163.2 DL 304.562 163.2
298.562 163.2 DL 310.562 163.2 304.562 163.2 DL 316.562 163.2 310.562
163.2 DL 322.562 163.2 316.562 163.2 DL 328.562 163.2 322.562 163.2 DL
334.562 163.2 328.562 163.2 DL 340.562 163.2 334.562 163.2 DL 346.562
163.2 340.562 163.2 DL 352.562 163.2 346.562 163.2 DL 358.562 163.2
352.562 163.2 DL 364.562 163.2 358.562 163.2 DL 370.562 163.2 364.562
163.2 DL 376.562 163.2 370.562 163.2 DL 382.562 163.2 376.562 163.2 DL
388.562 163.2 382.562 163.2 DL 394.562 163.2 388.562 163.2 DL 400.562
163.2 394.562 163.2 DL 406.562 163.2 400.562 163.2 DL 406.562 181.2
406.562 163.2 DL 160.562 181.2 154.562 181.2 DL 166.562 181.2 160.562
181.2 DL 172.562 181.2 166.562 181.2 DL 178.562 181.2 172.562 181.2 DL
184.562 181.2 178.562 181.2 DL 190.562 181.2 184.562 181.2 DL 196.562
181.2 190.562 181.2 DL 202.562 181.2 196.562 181.2 DL 208.562 181.2
202.562 181.2 DL 214.562 181.2 208.562 181.2 DL 220.562 181.2 214.562
181.2 DL 226.562 181.2 220.562 181.2 DL 232.562 181.2 226.562 181.2 DL
238.562 181.2 232.562 181.2 DL 244.562 181.2 238.562 181.2 DL 250.562
181.2 244.562 181.2 DL 256.562 181.2 250.562 181.2 DL 262.562 181.2
256.562 181.2 DL 268.562 181.2 262.562 181.2 DL 274.562 181.2 268.562
181.2 DL 280.562 181.2 274.562 181.2 DL 286.562 181.2 280.562 181.2 DL
292.562 181.2 286.562 181.2 DL 298.562 181.2 292.562 181.2 DL 304.562
181.2 298.562 181.2 DL 310.562 181.2 304.562 181.2 DL 316.562 181.2
310.562 181.2 DL 322.562 181.2 316.562 181.2 DL 328.562 181.2 322.562
181.2 DL 334.562 181.2 328.562 181.2 DL 340.562 181.2 334.562 181.2 DL
346.562 181.2 340.562 181.2 DL 352.562 181.2 346.562 181.2 DL 358.562
181.2 352.562 181.2 DL 364.562 181.2 358.562 181.2 DL 370.562 181.2
364.562 181.2 DL 376.562 181.2 370.562 181.2 DL 382.562 181.2 376.562
181.2 DL 388.562 181.2 382.562 181.2 DL 394.562 181.2 388.562 181.2 DL
400.562 181.2 394.562 181.2 DL 406.562 181.2 400.562 181.2 DL
(Application)252.014 176.904 Q 3(<< ANSI/MSE)100.346 221.904 R(API >>)3
E(\(X Contrib\))126.254 235.368 Q 280.346 317.856 280.346 329.856 DL
280.346 323.784 280.346 335.784 DL 280.346 335.784 280.346 347.784 DL
280.346 347.784 280.346 359.784 DL 280.346 359.784 280.346 371.784 DL
280.346 370.344 278.546 363.144 DL 280.346 370.344 282.146 363.144 DL
262.346 343.344 280.346 329.88 DL 187.418 343.344 181.418 343.344 DL
190.346 343.344 184.346 343.344 DL 196.346 343.344 190.346 343.344 DL
202.346 343.344 196.346 343.344 DL 208.346 343.344 202.346 343.344 DL
214.346 343.344 208.346 343.344 DL 220.346 343.344 214.346 343.344 DL
226.346 343.344 220.346 343.344 DL 232.346 343.344 226.346 343.344 DL
238.346 343.344 232.346 343.344 DL 244.346 343.344 238.346 343.344 DL
250.346 343.344 244.346 343.344 DL 256.346 343.344 250.346 343.344 DL
262.346 343.344 256.346 343.344 DL 181.418 344.784 181.418 356.784 DL
181.418 347.784 181.418 359.784 DL 181.418 359.784 181.418 371.784 DL
181.418 370.344 179.618 363.144 DL 181.418 370.344 183.218 363.144 DL
298.346 343.344 280.346 329.88 DL 304.346 343.344 298.346 343.344 DL
307.346 343.344 301.346 343.344 DL 313.346 343.344 307.346 343.344 DL
319.346 343.344 313.346 343.344 DL 325.346 343.344 319.346 343.344 DL
331.346 343.344 325.346 343.344 DL 337.346 343.344 331.346 343.344 DL
343.346 343.344 337.346 343.344 DL 349.346 343.344 343.346 343.344 DL
355.346 343.344 349.346 343.344 DL 361.346 343.344 355.346 343.344 DL
367.346 343.344 361.346 343.344 DL 373.346 343.344 367.346 343.344 DL
379.346 343.344 373.346 343.344 DL 379.346 344.784 379.346 356.784 DL
379.346 347.784 379.346 359.784 DL 379.346 359.784 379.346 371.784 DL
379.346 370.344 377.546 363.144 DL 379.346 370.344 381.146 363.144 DL
127.418 281.856 127.418 293.856 DL 127.418 287.784 127.418 299.784 DL
127.418 299.784 127.418 311.784 DL 127.418 311.784 127.418 323.784 DL
127.418 323.784 127.418 335.784 DL 127.418 335.784 127.418 347.784 DL
127.418 347.784 127.418 359.784 DL 127.418 359.784 127.418 371.784 DL
127.418 370.344 125.618 363.144 DL 127.418 370.344 129.218 363.144 DL
433.346 281.856 433.346 293.856 DL 433.346 287.784 433.346 299.784 DL
433.346 299.784 433.346 311.784 DL 433.346 311.784 433.346 323.784 DL
433.346 323.784 433.346 335.784 DL 433.346 335.784 433.346 347.784 DL
433.346 347.784 433.346 359.784 DL 433.346 359.784 433.346 371.784 DL
433.346 370.344 431.546 363.144 DL 433.346 370.344 435.146 363.144 DL
253.346 182.856 253.346 194.856 DL 253.346 185.856 253.346 197.856 DL
253.346 197.856 253.346 209.856 DL 253.346 208.416 251.546 201.216 DL
253.346 208.416 255.146 201.216 DL 307.346 182.856 307.346 194.856 DL
307.346 185.856 307.346 197.856 DL 307.346 197.856 307.346 209.856 DL
307.346 208.416 305.546 201.216 DL 307.346 208.416 309.146 201.216 DL
181.418 182.856 181.418 194.856 DL 181.418 185.856 181.418 197.856 DL
181.418 197.856 181.418 209.856 DL 181.418 208.416 179.618 201.216 DL
181.418 208.416 183.218 201.216 DL 379.346 182.856 379.346 194.856 DL
379.346 185.856 379.346 197.856 DL 379.346 197.856 379.346 209.856 DL
379.346 208.416 377.546 201.216 DL 379.346 208.416 381.146 201.216 DL
109.346 460.344 100.346 451.344 DL 115.346 460.344 109.346 460.344 DL
121.346 460.344 115.346 460.344 DL 127.346 460.344 121.346 460.344 DL
133.346 460.344 127.346 460.344 DL 139.346 460.344 133.346 460.344 DL
145.346 460.344 139.346 460.344 DL 151.346 460.344 145.346 460.344 DL
157.346 460.344 151.346 460.344 DL 163.346 460.344 157.346 460.344 DL
169.346 460.344 163.346 460.344 DL 175.346 460.344 169.346 460.344 DL
181.346 460.344 175.346 460.344 DL 187.346 460.344 181.346 460.344 DL
193.346 460.344 187.346 460.344 DL 199.346 460.344 193.346 460.344 DL
205.346 460.344 199.346 460.344 DL 211.346 460.344 205.346 460.344 DL
217.346 460.344 211.346 460.344 DL 223.346 460.344 217.346 460.344 DL
229.346 460.344 223.346 460.344 DL 235.346 460.344 229.346 460.344 DL
241.346 460.344 235.346 460.344 DL 247.346 460.344 241.346 460.344 DL
253.346 460.344 247.346 460.344 DL 259.346 460.344 253.346 460.344 DL
265.346 460.344 259.346 460.344 DL 271.346 460.344 265.346 460.344 DL
277.346 460.344 271.346 460.344 DL 283.346 460.344 277.346 460.344 DL
289.346 460.344 283.346 460.344 DL 295.346 460.344 289.346 460.344 DL
301.346 460.344 295.346 460.344 DL 307.346 460.344 301.346 460.344 DL
313.346 460.344 307.346 460.344 DL 319.346 460.344 313.346 460.344 DL
325.346 460.344 319.346 460.344 DL 334.346 451.344 325.346 460.344 DL
361.346 460.344 352.346 451.344 DL 367.346 460.344 361.346 460.344 DL
373.346 460.344 367.346 460.344 DL 379.346 460.344 373.346 460.344 DL
385.346 460.344 379.346 460.344 DL 391.346 460.344 385.346 460.344 DL
397.346 460.344 391.346 460.344 DL 403.346 460.344 397.346 460.344 DL
409.346 460.344 403.346 460.344 DL 415.346 460.344 409.346 460.344 DL
421.346 460.344 415.346 460.344 DL 427.346 460.344 421.346 460.344 DL
433.346 460.344 427.346 460.344 DL 439.346 460.344 433.346 460.344 DL
445.346 460.344 439.346 460.344 DL 451.346 460.344 445.346 460.344 DL
460.346 451.344 451.346 460.344 DL(XLocale Source \(X Core\))155.606
478.368 Q(System LOcale Source)351.356 478.368 Q(XLib API)256.514
221.904 Q(\(X Core\))258.854 235.368 Q(<<)226.418 221.904 Q(>>)320.882
221.904 Q F2(Fig.1 : Frame W)173.721 497.568 Q
(ork of Locale Service API Proposal)-.88 E(Generally speaking, the inte\
rnationalized portion of Xlib \(Locale Dependent X, LDX\) consists of)72
513.168 Q(three objects; locale \(LC\) , input method \(IM\) and output\
method \(OM\).)72 525.168 Q(The LC pro)5.5 E(vides a set)-.165 E
(of information that depends on user')72 537.168 Q 2.75(sl)-.605 G
(anguage en)-2.75 E 2.75(vironment. The)-.44 F(IM manages te)2.75 E
(xt inputing, and)-.165 E(the OM manages te)72 549.168 Q(xt dra)-.165 E
2.75(wing. Both)-.165 F(IM and OM highly depend on LC data.)2.75 E
(In X11R5, there are tw)72 564.768 Q 2.75(os)-.11 G
(ample implementations, Ximp and Xsi, for Xlib internationalization.)
-2.75 E(But in both implementations, IM and OM actually refer the pri)72
576.768 Q -.275(va)-.275 G(te e).275 E(xtension of LC.)-.165 E
(It breaks)5.5 E(coe)72 588.768 Q(xistence of these tw)-.165 E 2.75(os)
-.11 G(ample implementations.)-2.75 E -.165(Fo)5.5 G 2.75(re).165 G
(xample, if a user creates a ne)-2.915 E 2.75(wO)-.275 G 2.75(Mf)-2.75 G
(or)-2.75 E(special purpose as a part of Ximp, it will not w)72 600.768
Q(ork with Xsi.)-.11 E(As a solution of this problem, we propose to de\
\214ne the standard APIs between these three objects,)72 616.368 Q
(and de\214ne the structure that are common to these objects.)72 628.368
Q F1 2.75(2. Objecti)72 655.968 R -.11(ve)-.11 G F2 21.15<8345>72
675.168 S(xplain the current X11R6 sample implementation)-21.15 E 21.15
<8344>72 690.768 S(ocument the common set of locale dependent interf)
-21.15 E(aces)-.11 E 21.15<8350>72 706.368 S(ro)-21.15 E
(vide more \215e)-.165 E(xible plugg)-.165 E(able layer)-.055 E F1(1)
285.25 768 Q EP
%%Page: 2 4
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF 531.38(-- --)0 4 R/F1 11/Times-Bold@0 SF
(Sample Implementation Frame W)72 52 Q 176.8(ork X11,)-.825 F
(Release 6.4)2.75 E 2.75(3. Locale)72 84 R(Object Binding Functions)2.75
E/F2 11/Times-Roman@0 SF(This chapter describes functions related local\
e object binding for implementing the plugg)72 99.6 Q(able)-.055 E
(layer)72 111.6 Q(.)-.605 E 2.75(Al)72 127.2 S(ocale loader is an entry\
point for locale object, which instantiates XLCd object and binds)-2.75
E(locale methods with speci\214ed locale name. The beha)72 139.2 Q
(vior of loader is implementation dependent.)-.22 E
(And, what kind of loaders are a)72 151.2 Q -.275(va)-.22 G
(ilable is also implementation dependent.).275 E
(The loader is called in)72 166.8 Q F1(_XOpenLC,)3.666 E F2 -.22(bu)
3.666 G 2.75(tc).22 G(aller of)-2.75 E F1(_XOpenLC)3.666 E F2
(does not need to care about its)3.666 E 2.75(inside. F)72 178.8 R(or e)
-.165 E(xample, if the loader is implemented with dynamic load function\
s, and the dynamic)-.165 E(module is e)72 190.8 Q(xpected to be unloade\
d when the corresponding XLCd is freed, close methods of)-.165 E
(XLCdMethods should handle unloading.)72 202.8 Q F1
(Initializing a locale loader list)72 230.4 Q F2 -.22(vo)72 249.6 S
(id _XlcInitLoader\(\)).22 E(The)72 265.2 Q F1(_XlcInitLoader)3.666 E F2
(function initializes the locale loader list with v)3.666 E
(endor speci\214c manner)-.165 E 5.5(.E)-.605 G(ach)-5.5 E(loader is re)
72 277.2 Q(gistered with calling)-.165 E F1(_XlcAddLoader)3.666 E(.)-1.1
E F2(The number of loaders and their order in the)3.666 E
(loader list is implementation dependent.)72 289.2 Q F1(Add a loader)72
316.8 Q F2(typedef XLCd \(*XLCdLoadProc\)\()72 338.4 Q/F3 11
/Times-Italic@0 SF(name)A F2(\);)A(char)88.5 350.4 Q F3(*name)2.75 E F2
(;)A(typedef int XlcPosition;)72 374.4 Q(#de\214ne)72 398.4 Q(XlcHead)
124.5 398.4 Q(0)287.75 398.4 Q(#de\214ne)72 410.4 Q(XlcT)124.5 410.4 Q
(ail)-.88 E(-1)285 410.4 Q(Bool _XlcAddLoader\()72 435.6 Q F3(pr)A
(oc, position)-.495 E F2(\))A(XLCdLoadProc)88.5 447.6 Q F3(pr)2.75 E(oc)
-.495 E F2(;)A(XlcPosition)88.5 459.6 Q F3(position)2.75 E F2(;)A(The)72
478.8 Q F1(_XlcAddLoader)3.666 E F2(function re)3.666 E
(gisters the speci\214ed locale loader `)-.165 E(`)-.814 E F3(pr)A(oc)
-.495 E F2 1.628 -.814('' t)D 2.75(ot).814 G(he internal loader)-2.75 E
2.75(list. The)72 490.8 R(position speci\214es that the loader `)2.75 E
(`)-.814 E F3(pr)A(oc)-.495 E F2 1.628 -.814('' s)D
(hould be placed in the top of the loader).814 E
(list\(XlcHead\) or last\(XlcT)72 502.8 Q(ail\).)-.88 E
(The object loader is called from the top of the loader list in order)72
518.4 Q 2.75(,w)-.44 G(hen calling time.)-2.75 E F1(Remo)72 546 Q .22
-.11(ve a l)-.11 H(oader).11 E F2 -.22(vo)72 565.2 S(id _XlcRemo).22 E
-.165(ve)-.165 G(Loader\().165 E F3(pr)A(oc)-.495 E F2(\))A
(XLCdLoadProc)88.5 577.2 Q F3(pr)2.75 E(oc)-.495 E F2(;)A(The)72 596.4 Q
F1(_XlcRemo)3.666 E -.11(ve)-.11 G(Loader).11 E F2(function remo)3.666 E
-.165(ve)-.165 G 2.75(st).165 G(he locale loader speci\214ed by `)-2.75
E(`)-.814 E F3(pr)A(oc)-.495 E F2 1.628 -.814('' f)D(rom the loader).814
E(list.)72 608.4 Q(Current implementation pro)72 624 Q(vides follo)-.165
E(wing locale loaders;)-.275 E F1(_XlcDefaultLoader)108.916 642 Q
(_XlcGenericLoader)108.916 654 Q(_XlcEucLoader)108.916 666 Q
(_XlcSjisLoader)108.916 678 Q(_XlcUtfLoader)108.916 690 Q
(_XaixOsDynamicLoad)108.916 702 Q(2)285.25 768 Q EP
%%Page: 3 5
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF 531.38(-- --)0 4 R/F1 11/Times-Bold@0 SF
(Sample Implementation Frame W)72 52 Q 176.8(ork X11,)-.825 F
(Release 6.4)2.75 E 2.75(4. Locale)72 84 R(Method Interface)2.75 E/F2 11
/Times-Roman@0 SF(This chapter describes the locale method API, which i\
s a set of accessible functions from both IM)72 99.6 Q(and OM parts.)72
111.6 Q(The locale method API pro)5.5 E(vides the functionalities;)-.165
E(obtaining locale dependent)5.5 E(information, handling charset, con)72
123.6 Q -.165(ve)-.44 G(rting te).165 E(xt, etc.)-.165 E
(As a result of using these APIs instead of accessing v)72 139.2 Q
(ender pri)-.165 E -.275(va)-.275 G(te e).275 E
(xtension of the locale object,)-.165 E(we can k)72 151.2 Q
(eep locale, IM and OM independently each other)-.11 E(.)-.605 E F1 2.75
(5. Locale)72 178.8 R(Method Functions)2.75 E(Open a Locale Method)72
194.4 Q F2(XLCd _XOpenLC\()72 213.6 Q/F3 11/Times-Italic@0 SF(name)A F2
(\))A(char)88.5 225.6 Q F3(*name)2.75 E F2(;)A(The)72 244.8 Q F1
(_XOpenLC)3.666 E F2(function opens a locale method which corresponds t\
o the speci\214ed locale name.)3.666 E F1(_XOpenLC)72.916 256.8 Q F2
(calls a locale object loader)3.666 E 2.75(,w)-.44 G(hich is re)-2.75 E
(gistered via)-.165 E F1(_XlcAddLoader)3.666 E F2(into is v).916 E
(alid and)-.275 E(successfully opens a locale,)72 268.8 Q F1(_XOpenLC)
3.666 E F2(returns the XLCd.)3.666 E(If the loader is in)5.5 E -.275(va)
-.44 G(lid or f).275 E(ailed to)-.11 E(open a locale,)72 280.8 Q F1
(_XOpenLC)3.666 E F2(calls the ne)3.666 E(xt loader)-.165 E 5.5(.I)-.605
G 2.75(fa)-5.5 G(ll re)-2.75 E(gistered loaders cannot open a locale,)
-.165 E F1(_XOpenLC)72.916 292.8 Q F2(returns NULL.)3.666 E
(XLCd _XlcCurrentLC\(\))72 312 Q(The)72 331.2 Q F1(_XlcCurr)3.666 E
(entLC)-.198 E F2
(function returns an XLCd that are bound to current locale.)3.666 E F1
(Close a Locale Method)72 358.8 Q F2 -.22(vo)72 378 S(id _XCloseLC\().22
E F3(lcd)A F2(\))A(XLCd)88.5 390 Q F3(lcd)2.75 E F2(;)A(The)72 409.2 Q
F1(_XCloseLC)3.666 E F2
(function close a locale method the speci\214ed lcd.)3.666 E F1
(Obtain Locale Method v)72 436.8 Q(alues)-.11 E F2(char * _XGetLCV)72
456 Q(alues\()-1.221 E F3(lcd)A F2 2.75(,.)C(..\))-2.75 E(XLCd)88.5 468
Q F3(lcd)2.75 E F2(;)A(The)72 487.2 Q F1(_XGetLCV)3.666 E(alues)-1.012 E
F2(function returns NULL if no error occurred; otherwise, it returns th\
e name)3.666 E(of the \214rst ar)72 499.2 Q
(gument that could not be obtained.)-.198 E(The follo)5.5 E(wing v)-.275
E(alues are de\214ned as standard)-.275 E(ar)72 511.2 Q
(guments. Other v)-.198 E(alues are implementation dependent.)-.275 E
.44 LW 72 525.55 72 525.55 DL F1 121.902(Name T)72 540.8 R 15.158
(ype Description)-.814 F 72 551.55 72 551.55 DL F2 90.123
(XlcNCodeset char*)72 566.8 R(codeset part of locale name)16.5 E
(XlcNDef)72 578.8 Q 65.791(aultString char*)-.11 F(XDef)16.5 E
(aultString\(\))-.11 E 57.134(XlcNEncodingName char*)72 590.8 R
(encoding name)16.5 E 82.192(XlcNLanguage char*)72 602.8 R
(language part of locale name)16.5 E 73.623(XlcNMbCurMax int)72 614.8 R
(ANSI C MB_CUR_MAX)29.315 E 13.75(XlcNStateDependentEncoding Bool)72
626.8 R(is state-dependent encoding or not)19.536 E(XlcNT)72 638.8 Q
86.625(erritory char*)-.77 F(territory part of locale name)16.5 E 72
649.55 72 649.55 DL F1 2.75(6. Charset)72 680.4 R(functions)2.75 E F2(T\
he XlcCharSet is an identi\214er which represents a subset of character\
s \(character set\) in the)72 696 Q(locale object.)72 708 Q F1(3)285.25
768 Q EP
%%Page: 4 6
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF 531.38(-- --)0 4 R/F1 11/Times-Bold@0 SF
(Sample Implementation Frame W)72 52 Q 176.8(ork X11,)-.825 F
(Release 6.4)2.75 E/F2 11/Times-Roman@0 SF(typedef enum {)72 84 Q
(XlcUnkno)88.5 96 Q(wn, XlcC0, XlcGL, XlcC1, XlcGR, XlcGLGR, XlcOther)
-.275 E 2.75(}X)72 108 S(lcSide;)-2.75 E
(typedef struct _XlcCharSetRec *XlcCharSet;)72 132 Q(typedef struct {)72
156 Q(char *name;)88.5 168 Q(XPointer v)88.5 180 Q(alue;)-.275 E 2.75
(}X)72 192 S(lcAr)-2.75 E(g, *XlcAr)-.198 E(gList;)-.198 E
(typedef char* \(*XlcGetCSV)72 216 Q(aluesProc\)\()-1.221 E/F3 11
/Times-Italic@0 SF -.165(ch)C(ar).165 E(set)-.11 E F2(,)A F3(ar)2.75 E
(gs)-.407 E F2(,)A F3(num_ar)2.75 E(gs)-.407 E F2(\);)A(XlcCharSet)88.5
228 Q F3 -.165(ch)2.75 G(ar).165 E(set)-.11 E F2(;)A(XlcAr)88.5 240 Q
(gList)-.198 E F3(ar)2.75 E(gs)-.407 E F2(;)A(int)88.5 252 Q F3(num_ar)
2.75 E(gs)-.407 E F2(;)A(typedef struct _XlcCharSetRec {)72 276 Q
(char *name;)88.5 288 Q(XrmQuark xrm_name;)88.5 300 Q
(char *encoding_name;)88.5 312 Q(XrmQuark xrm_encoding_name;)88.5 324 Q
(XlcSide side;)88.5 336 Q(int char_size;)88.5 348 Q(int set_size;)88.5
360 Q(char *ct_sequence;)88.5 372 Q(XlcGetCSV)88.5 384 Q
(aluesProc get_v)-1.221 E(alues;)-.275 E 2.75(}X)72 396 S(lcCharSetRec;)
-2.75 E F1(Get an XlcCharSet)72 429.6 Q F2(XlcCharSet _XlcGetCharSet\()
72 448.8 Q F3(name)A F2(\))A(char)88.5 460.8 Q F3(*name)2.75 E F2(;)A
(The)72 480 Q F1(_XlcGetCharSet)3.666 E F2(function gets an XlcCharSet \
which corresponds to the charset name speci-)3.666 E(\214ed by `)72 492
Q(`)-.814 E F3(name)A F2 -.814('')C(.).814 E F1(_XlcGetCharSet)6.416 E
F2(returns NULL, if no XlcCharSet bound to speci\214ed `)3.666 E(`)-.814
E F3(name)A F2 -.814('')C(.).814 E(The follo)72 507.6 Q
(wing character sets are pre-re)-.275 E(gistered.)-.165 E .44 LW 256.822
521.95 72 521.95 DL F1 82.511(Name Description)72 537.2 R 256.822 547.95
72 547.95 DL F2 43.395(ISO8859-1:GL 7-bit)72 563.2 R
(ASCII graphics \(ANSI X3.4-1968\),)2.75 E(Left half of ISO 8859 sets)
184.75 575.2 Q 14.366(JISX0201.1976-0:GL Left)72 587.2 R
(half of JIS X0201-1976 \(reaf)2.75 E(\214rmed 1984\),)-.275 E
(8-Bit Alphanumeric-Katakana Code)184.75 599.2 Q 42.779
(ISO8859-1:GR Right)72 623.2 R(half of ISO 8859-1, Latin alphabet No. 1)
2.75 E 42.779(ISO8859-2:GR Right)72 635.2 R
(half of ISO 8859-2, Latin alphabet No. 2)2.75 E 42.779
(ISO8859-3:GR Right)72 647.2 R(half of ISO 8859-3, Latin alphabet No. 3)
2.75 E 42.779(ISO8859-4:GR Right)72 659.2 R
(half of ISO 8859-4, Latin alphabet No. 4)2.75 E 42.779
(ISO8859-7:GR Right)72 671.2 R(half of ISO 8859-7, Latin/Greek alphabet)
2.75 E 42.779(ISO8859-6:GR Right)72 683.2 R
(half of ISO 8859-6, Latin/Arabic alphabet)2.75 E 42.779
(ISO8859-8:GR Right)72 695.2 R(half of ISO 8859-8, Latin/Hebre)2.75 E
2.75(wa)-.275 G(lphabet)-2.75 E 42.779(ISO8859-5:GR Right)72 707.2 R
(half of ISO 8859-5, Latin/Cyrillic alphabet)2.75 E 42.779
(ISO8859-9:GR Right)72 719.2 R(half of ISO 8859-9, Latin alphabet No. 5)
2.75 E F1(4)285.25 768 Q EP
%%Page: 5 7
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF 531.38(-- --)0 4 R/F1 11/Times-Bold@0 SF
(Sample Implementation Frame W)72 52 Q 176.8(ork X11,)-.825 F
(Release 6.4)2.75 E .44 LW 256.822 76.75 72 76.75 DL 82.511
(Name Description)72 92 R 256.822 102.75 72 102.75 DL/F2 11
/Times-Roman@0 SF 13.75(JISX0201.1976-0:GR Right)72 118 R
(half of JIS X0201-1976 \(reaf)2.75 E(\214rmed 1984\),)-.275 E
(8-Bit Alphanumeric-Katakana Code)184.75 130 Q 21.087
(GB2312.1980-0:GL GB2312-1980,)72 154 R
(China \(PRC\) Hanzi de\214ned as GL)2.75 E 20.471
(GB2312.1980-0:GR GB2312-1980,)72 166 R
(China \(PRC\) Hanzi de\214ned as GR)2.75 E 14.366
(JISX0208.1983-0:GL JIS)72 178 R
(X0208-1983, Japanese Graphic Character Set)2.75 E(de\214ned as GL)
184.75 190 Q 13.75(JISX0208.1983-0:GR JIS)72 202 R
(X0208-1983, Japanese Graphic Character Set)2.75 E(de\214ned as GR)
184.75 214 Q 14.971(KSC5601.1987-0:GL KS)72 226 R(C5601-1987, K)2.75 E
(orean Graphic Character Set)-.385 E(de\214ned as GL)184.75 238 Q 14.355
(KSC5601.1987-0:GR KS)72 250 R(C5601-1987, K)2.75 E
(orean Graphic Character Set)-.385 E(de\214ned as GR)184.75 262 Q 14.366
(JISX0212.1990-0:GL JIS)72 274 R
(X0212-1990, Japanese Graphic Character Set)2.75 E(de\214ned as GL)
184.75 286 Q 13.75(JISX0212.1990-0:GR JIS)72 298 R
(X0212-1990, Japanese Graphic Character Set)2.75 E(de\214ned as GR)
184.75 310 Q 256.822 320.75 72 320.75 DL F1(Add an XlcCharSet)72 351.6 Q
F2(Bool _XlcAddCharSet\()72 370.8 Q/F3 11/Times-Italic@0 SF -.165(ch)C
(ar).165 E(set)-.11 E F2(\))A(XlcCharSet)88.5 382.8 Q F3 -.165(ch)2.75 G
(ar).165 E(set)-.11 E F2(;)A(The)72 402 Q F1(_XlcAddCharSet)3.666 E F2
(function re)3.666 E(gisters XlcCharSet speci\214ed by `)-.165 E(`)-.814
E F3 -.165(ch)C(ar).165 E(set)-.11 E F2 -.814('')C(.).814 E F1
(Obtain Character Set v)72 429.6 Q(alues)-.11 E F2(char * _XlcGetCSV)72
448.8 Q(alues\()-1.221 E F3 -.165(ch)C(ar).165 E(set)-.11 E F2 2.75(,.)C
(..\))-2.75 E(XlcCharSet)88.5 460.8 Q F3 -.165(ch)2.75 G(ar).165 E(set)
-.11 E F2(;)A(The)72 480 Q F1(_XlcGetCSV)3.666 E(alues)-1.012 E F2
(function returns NULL if no error occurred; otherwise, it returns the)
3.666 E(name of the \214rst ar)72 492 Q
(gument that could not be obtained.)-.198 E(The follo)5.5 E(wing v)-.275
E(alues are de\214ned as stan-)-.275 E(dard ar)72 504 Q 2.75
(guments. Other)-.198 F -.275(va)2.75 G
(lues are implementation dependent.).275 E 72 518.35 72 518.35 DL F1
85.855(Name T)72 533.6 R 26.169(ype Description)-.814 F 72 544.35 72
544.35 DL F2 63.25(XlcNName char*)72 559.6 R(charset name)27.511 E
21.087(XlcNEncodingName char*)72 571.6 R(XLFD CharSet Re)27.511 E
(gistry and Encoding)-.165 E 69.96(XlcNSide XlcSide)72 583.6 R
(charset side \(GL, GR, ...\))16.5 E 49.192(XlcNCharSize int)72 595.6 R
(number of octets per character)40.326 E 56.518(XlcNSetSize int)72 607.6
R(number of character sets)40.326 E 13.75(XlcNControlSequence char*)72
619.6 R(control sequence of Compound T)27.511 E -.165(ex)-.77 G(t).165 E
72 630.35 72 630.35 DL F1 2.75(7. Con)72 661.2 R -.11(ve)-.44 G
(rter Functions).11 E F2 1.76 -.88(We p)72 676.8 T(ro).88 E
(vide a set of the common con)-.165 E -.165(ve)-.44 G
(rter APIs, that are independent from both of source and).165 E
(destination te)72 688.8 Q(xt type.)-.165 E(typedef struct _XlcCon)72
710.4 Q(vRec *XlcCon)-.44 E(v;)-.44 E F1(5)285.25 768 Q EP
%%Page: 6 8
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF 531.38(-- --)0 4 R/F1 11/Times-Bold@0 SF
(Sample Implementation Frame W)72 52 Q 176.8(ork X11,)-.825 F
(Release 6.4)2.75 E/F2 11/Times-Roman@0 SF(typedef v)72 84 Q
(oid \(*XlcCloseCon)-.22 E -.165(ve)-.44 G(rterProc\)\().165 E/F3 11
/Times-Italic@0 SF(con)A(v)-.44 E F2(\);)A(XlcCon)88.5 96 Q(v)-.44 E F3
(con)2.75 E(v)-.44 E F2(;)A(typedef int \(*XlcCon)72 120 Q -.165(ve)-.44
G(rtProc\)\().165 E F3(con)A(v)-.44 E F2(,)A F3(fr)2.75 E(om)-.495 E F2
(,)A F3(fr)2.75 E(om_left)-.495 E F2(,)A F3(to)2.75 E F2(,)A F3(to_left)
2.75 E F2(,)A F3(ar)2.75 E(gs)-.407 E F2(,)A F3(num_ar)2.75 E(gs)-.407 E
F2(\);)A(XlcCon)88.5 132 Q(v)-.44 E F3(con)2.75 E(v)-.44 E F2(;)A
(XPointer)88.5 144 Q F3(*fr)2.75 E(om)-.495 E F2(;)A(int)88.5 156 Q F3
(*fr)2.75 E(om_left)-.495 E F2(;)A(XPointer)88.5 168 Q F3(*to)2.75 E F2
(;)A(int)88.5 180 Q F3(*to_left)2.75 E F2(;)A(XPointer)88.5 192 Q F3
(*ar)2.75 E(gs)-.407 E F2(;)A(int)88.5 204 Q F3(num_ar)2.75 E(gs)-.407 E
F2(;)A(typedef v)72 228 Q(oid \(*XlcResetCon)-.22 E -.165(ve)-.44 G
(rterProc\)\().165 E F3(con)A(v)-.44 E F2(\);)A(XlcCon)88.5 240 Q(v)-.44
E F3(con)2.75 E(v)-.44 E F2(;)A(typedef struct _XlcCon)72 264 Q
(vMethodsRec {)-.44 E(XlcCloseCon)88.5 276 Q -.165(ve)-.44 G
(rterProc close;).165 E(XlcCon)88.5 288 Q -.165(ve)-.44 G(rtProc con)
.165 E -.165(ve)-.44 G(rt;).165 E(XlcResetCon)88.5 300 Q -.165(ve)-.44 G
(rterProc reset;).165 E 2.75(}X)72 312 S(lcCon)-2.75 E
(vMethodsRec, *XlcCon)-.44 E(vMethods;)-.44 E(typedef struct _XlcCon)72
336 Q(vRec {)-.44 E(XlcCon)83 348 Q(vMethods methods;)-.44 E
(XPointer state;)83 360 Q 2.75(}X)72 372 S(lcCon)-2.75 E(vRec;)-.44 E F1
(Open a con)72 405.6 Q -.11(ve)-.44 G(rter).11 E F2(XlcCon)72 424.8 Q
2.75(v_)-.44 G(XlcOpenCon)-2.75 E -.165(ve)-.44 G(rter\().165 E F3(fr)A
(om_lcd)-.495 E F2(,)A F3(fr)2.75 E(om_type)-.495 E F2(,)A F3(to_lcd)
2.75 E F2(,)A F3(to_type)2.75 E F2(\))A(XLCd)88.5 436.8 Q F3(fr)2.75 E
(om_lcd)-.495 E F2(;)A(char)88.5 448.8 Q F3(*fr)2.75 E(om_type)-.495 E
F2(;)A(XLCd)88.5 460.8 Q F3(to_lcd)2.75 E F2(;)A(char)88.5 472.8 Q F3
(*to_type)2.75 E F2(;)A F1(_XlcOpenCon)72.916 492 Q -.11(ve)-.44 G(rter)
.11 E F2(function opens the con)3.666 E -.165(ve)-.44 G(rter which con)
.165 E -.165(ve)-.44 G(rts a te).165 E(xt from speci\214ed)-.165 E -.814
(``)72 504 S F3(fr).814 E(om_type)-.495 E F2 1.628 -.814('' t)D 2.75(os)
.814 G(peci\214ed `)-2.75 E(`)-.814 E F3(to_type)A F2 1.628 -.814('' e)D
2.75(ncoding. If).814 F(the function cannot \214nd proper con)2.75 E
-.165(ve)-.44 G(rter or).165 E(cannot open a corresponding con)72 516 Q
-.165(ve)-.44 G(rter).165 E 2.75(,i)-.44 G 2.75(tr)-2.75 G(eturns NULL.)
-2.75 E(Otherwise, it returns the con)5.5 E -.165(ve)-.44 G(rsion).165 E
(descriptor)72 528 Q(.)-.605 E(The follo)72 543.6 Q(wing types are pre-\
de\214ned. Other types are implementation dependent.)-.275 E .44 LW 72
557.95 72 557.95 DL F1 78.21(Name T)72 573.2 R 34.408(ype Description)
-.814 F(Ar)58.663 E(guments)-.11 E 72 583.95 72 583.95 DL F2 36.641
(XlcNMultiByte char)72 599.2 R 33(*m)2.75 G 68.123(ultibyte -)-33 F
(XlcNW)72 611.2 Q 37.103(ideChar wchar_t)-.44 F 16.5(*w)2.75 G
(ide character)-16.5 E(-)48.609 E(XlcNCompoundT)72 623.2 Q -.165(ex)-.77
G 16.5(tc).165 G(har *)-16.5 E 13.75(COMPOUND_TEXT -)33 F 54.978
(XlcNString char)72 635.2 R 33(*S)2.75 G 70.576(TRING -)-33 F 46.431
(XlcNCharSet char)72 647.2 R 33(*p)2.75 G(er charset)-33 E(XlcCharSet)
65.098 E 60.489(XlcNChar char)72 659.2 R 33(*p)2.75 G(er character)-33 E
(XlcCharSet)55.946 E 72 669.95 72 669.95 DL F1(Close a con)72 700.8 Q
-.11(ve)-.44 G(rter).11 E(6)285.25 768 Q EP
%%Page: 7 9
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF 531.38(-- --)0 4 R/F1 11/Times-Bold@0 SF
(Sample Implementation Frame W)72 52 Q 176.8(ork X11,)-.825 F
(Release 6.4)2.75 E/F2 11/Times-Roman@0 SF -.22(vo)72 84 S
(id _XlcCloseCon).22 E -.165(ve)-.44 G(rter\().165 E/F3 11
/Times-Italic@0 SF(con)A(v)-.44 E F2(\))A(XlcCon)88.5 96 Q(v)-.44 E F3
(con)2.75 E(v)-.44 E F2(;)A(The)72 115.2 Q F1(_XlcCloseCon)3.666 E -.11
(ve)-.44 G(rter).11 E F2(function closes the speci\214ed con)3.666 E
-.165(ve)-.44 G(rter `).165 E(`)-.814 E F3(con)A(v)-.44 E F2 -.814('')C
(.).814 E F1(Code con)72 142.8 Q -.11(ve)-.44 G(rsion).11 E F2
(int _XlcCon)72 162 Q -.165(ve)-.44 G(rt\().165 E F3(con)A(v)-.44 E F2
(,)A F3(fr)2.75 E(om)-.495 E F2(,)A F3(fr)2.75 E(om_left)-.495 E F2(,)A
F3(to)2.75 E F2(,)A F3(to_left)2.75 E F2(,)A F3(ar)2.75 E(gs)-.407 E F2
(,)A F3(num_ar)2.75 E(gs)-.407 E F2(\))A(XlcCon)88.5 174 Q(v)-.44 E F3
(con)2.75 E(v)-.44 E F2(;)A(XPointer)88.5 186 Q F3(*fr)2.75 E(om)-.495 E
F2(;)A(int)88.5 198 Q F3(*fr)2.75 E(om_left)-.495 E F2(;)A(XPointer)88.5
210 Q F3(*to)2.75 E F2(;)A(int)88.5 222 Q F3(*to_left)2.75 E F2(;)A
(XPointer)88.5 234 Q F3(*ar)2.75 E(gs)-.407 E F2(;)A(int)88.5 246 Q F3
(num_ar)2.75 E(gs)-.407 E F2(;)A(The)72 265.2 Q F1(_XlcCon)3.666 E -.11
(ve)-.44 G(rt).11 E F2(function con)3.666 E -.165(ve)-.44 G
(rts a sequence of characters from one type, in the array speci\214ed)
.165 E(by `)72 277.2 Q(`)-.814 E F3(fr)A(om)-.495 E F2 -.814('')C 2.75
(,i).814 G(nto a sequence of corresponding characters in another type, \
in the array speci\214ed by)-2.75 E -.814(``)72 289.2 S F3(to).814 E F2
-.814('')C 5.5(.T).814 G(he types are those speci\214ed in the)-5.5 E F1
(_XlcOpenCon)3.666 E -.11(ve)-.44 G(rter\(\)).11 E F2
(call that returned the con)3.666 E -.165(ve)-.44 G -.22(r-).165 G
(sion descriptor)72 301.2 Q 2.75(,`)-.44 G(`)-3.564 E F3(con)A(v)-.44 E
F2 -.814('')C 5.5(.T).814 G(he ar)-5.5 E(guments `)-.198 E(`)-.814 E F3
(fr)A(om)-.495 E F2 -.814('')C 2.75(,`).814 G(`)-3.564 E F3(fr)A
(om_left)-.495 E F2 -.814('')C 2.75(,`).814 G(`)-3.564 E F3(to)A F2
1.628 -.814('' a)D(nd `).814 E(`)-.814 E F3(to_left)A F2 1.628 -.814
('' h)D -2.475 -.22(av e).814 H(the same)2.97 E
(speci\214cation of XPG4 icon)72 313.2 Q 2.75(vf)-.44 G(unction.)-2.75 E
-.165(Fo)72 328.8 S 2.75(rs).165 G(tate-dependent encodings, the con)
-2.75 E -.165(ve)-.44 G(rsion descriptor `).165 E(`)-.814 E F3(con)A(v)
-.44 E F2 1.628 -.814('' i)D 2.75(sp).814 G
(laced into its initial shift)-2.75 E(state by a call for which `)72
340.8 Q(`)-.814 E F3(fr)A(om)-.495 E F2 1.628 -.814('' i)D 2.75(saN).814
G(ULL pointer)-2.75 E 2.75(,o)-.44 G 2.75(rf)-2.75 G(or which `)-2.75 E
(`)-.814 E F3(fr)A(om)-.495 E F2 1.628 -.814('' p)D
(oints to a null pointer).814 E(.)-.605 E(The follo)72 356.4 Q
(wing 2 con)-.275 E -.165(ve)-.44 G(rters prepared by locale returns ap\
propriate charset \(XlcCharSet\) in an area).165 E(pointed by ar)72
368.4 Q(gs[0].)-.198 E .44 LW 345.427 382.75 72 382.75 DL F1(Fr)72 398 Q
56.738(om T)-.198 F 63.943(oD)-1.012 G(escription)-63.943 E 345.427
408.75 72 408.75 DL F2 13.75(XlcNMultiByte XlcNCharSet Se)72 424 R
(gmentation \(Decomposing\))-.165 E(XlcNW)72 436 Q 14.212
(ideChar XlcNCharSet)-.44 F(Se)16.5 E(gmentation \(Decomposing\))-.165 E
345.427 446.75 72 446.75 DL(The con)72 465.6 Q -.165(ve)-.44 G
(rsion, from XlcNMultiByte/XlcNW).165 E(ideChar to XlcNCharSet, e)-.44 E
(xtracts a se)-.165 E(gment which)-.165 E
(has same charset encoding characters.)72 477.6 Q(More than one se)5.5 E
(gment cannot be con)-.165 E -.165(ve)-.44 G(rted in a call.).165 E F1
(Reset a con)72 505.2 Q -.11(ve)-.44 G(rter).11 E F2 -.22(vo)72 524.4 S
(id _XlcResetCon).22 E -.165(ve)-.44 G(rter\().165 E F3(con)A(v)-.44 E
F2(\))A(XlcCon)88.5 536.4 Q(v)-.44 E F3(con)2.75 E(v)-.44 E F2(;)A(The)
72 555.6 Q F1(_XlcResetCon)3.666 E -.11(ve)-.44 G(rter).11 E F2
(function reset the speci\214ed con)3.666 E -.165(ve)-.44 G(rter `).165
E(`)-.814 E F3(con)A(v)-.44 E F2 -.814('')C(.).814 E F1(Register a con)
72 583.2 Q -.11(ve)-.44 G(rter).11 E F2(typedef XlcCon)72 604.8 Q 2.75
(v\()-.44 G(*XlcOpenCon)-2.75 E -.165(ve)-.44 G(rterProc\)\().165 E F3
(fr)A(om_lcd)-.495 E F2(,)A F3(fr)2.75 E(om_type)-.495 E F2(,)A F3
(to_lcd)2.75 E F2(,)A F3(to_type)2.75 E F2(\);)A(XLCd)88.5 616.8 Q F3
(fr)2.75 E(om_lcd)-.495 E F2(;)A(char)88.5 628.8 Q F3(*fr)2.75 E
(om_type)-.495 E F2(;)A(XLCd)88.5 640.8 Q F3(to_lcd)2.75 E F2(;)A(char)
88.5 652.8 Q F3(*to_type)2.75 E F2(;)A F1(7)285.25 768 Q EP
%%Page: 8 10
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF 531.38(-- --)0 4 R/F1 11/Times-Bold@0 SF
(Sample Implementation Frame W)72 52 Q 176.8(ork X11,)-.825 F
(Release 6.4)2.75 E/F2 11/Times-Roman@0 SF(Bool _XlcSetCon)72 84 Q -.165
(ve)-.44 G(rter\().165 E/F3 11/Times-Italic@0 SF(fr)A(om_lcd)-.495 E F2
(,)A F3(fr)2.75 E(om)-.495 E F2(,)A F3(to_lcd)2.75 E F2(,)A F3(to)2.75 E
F2(,)A F3(con)2.75 E(verter)-.44 E F2(\))A(XLCd)88.5 96 Q F3(fr)2.75 E
(om_lcd)-.495 E F2(;)A(char)88.5 108 Q F3(*fr)2.75 E(om)-.495 E F2(;)A
(XLCd)88.5 120 Q F3(to_lcd)2.75 E F2(;)A(char)88.5 132 Q F3(*to)2.75 E
F2(;)A(XlcOpenCon)88.5 144 Q -.165(ve)-.44 G(rterProc).165 E F3(con)2.75
E(verter)-.44 E F2(;)A(The)72 163.2 Q F1(XlcSetCon)2.75 E -.11(ve)-.44 G
(rter).11 E F2(function re)2.75 E(gisters a con)-.165 E -.165(ve)-.44 G
(rter which con).165 E -.165(ve)-.44 G(rt from `).165 E(`)-.814 E F3(fr)
A(om_type)-.495 E F2 1.628 -.814('' t)D(o).814 E -.814(``)72 175.2 S F3
(to_type).814 E F2 1.628 -.814('' i)D(nto the con).814 E -.165(ve)-.44 G
(rter list \(in the speci\214ed XLCd\).).165 E F1 2.75(8. X)72 202.8 R
(Locale Database functions)2.75 E F2 2.75(XL)72 218.4 S
(ocale Database contains the subset of user')-2.75 E 2.75(se)-.605 G
-.44(nv)-2.75 G(ironment that depends on language.).44 E(The fol-)5.5 E
(lo)72 230.4 Q(wing APIs are pro)-.275 E
(vided for accessing X Locale Database and other locale relati)-.165 E
.33 -.165(ve \214)-.275 H(les.).165 E -.165(Fo)72 246 S 2.75(rm).165 G
(ore detail about)-2.75 E 2.75(XL)5.5 G
(ocale Database, please refer X Locale Database De\214nition document.)
-2.75 E F1(Get a r)72 273.6 Q(esour)-.198 E(ce fr)-.198 E(om database)
-.198 E F2 -.22(vo)72 292.8 S(id _XlcGetResource\().22 E F3(lcd)A F2(,)A
F3(cate)2.75 E(gory)-.44 E F2(,)A F3(class)2.75 E F2(,)A F3(value)2.75 E
F2(,)A F3(count)2.75 E F2(\))A(XLCd)88.5 304.8 Q F3(lcd)2.75 E F2(;)A
(char)88.5 316.8 Q F3(*cate)2.75 E(gory)-.44 E F2(;)A(char)88.5 328.8 Q
F3(*class)2.75 E F2(;)A(char)88.5 340.8 Q F3(***value)2.75 E F2(;)A(int)
88.5 352.8 Q F3(*count)2.75 E F2(;)A(The)72 372 Q F1(_XlcGetResour)3.666
E(ce)-.198 E F2
(function obtains a locale dependent data which is associated with the)
3.666 E(locale of speci\214ed `)72 384 Q(`)-.814 E F3(lcd)A F2 -.814('')
C 5.5(.T).814 G(he locale data is pro)-5.5 E
(vided by system locale or by X Locale Database)-.165 E
(\214le, and what kind of data is a)72 396 Q -.275(va)-.22 G
(ilable is implementation dependent.).275 E(The speci\214ed `)72 411.6 Q
(`)-.814 E F3(cate)A(gory)-.44 E F2 1.628 -.814('' a)D(nd `).814 E(`)
-.814 E F3(class)A F2 1.628 -.814('' a)D
(re used for \214nding out the objecti).814 E .33 -.165(ve l)-.275 H
(ocale data.).165 E(The returned)72 427.2 Q -.275(va)5.5 G
(lue is returned in v).275 E(alue ar)-.275 E
(gument in string list form, and the returned count sho)-.198 E(ws)-.275
E(the number of strings in the v)72 439.2 Q(alue.)-.275 E
(The returned v)72 454.8 Q(alue is o)-.275 E
(wned by locale method, and should not be modi\214ed or freed by caller)
-.275 E(.)-.605 E F1(Get a locale r)72 482.4 Q(elati)-.198 E .22 -.11
(ve \214)-.11 H(le name).11 E F2(char * _XlcFileName\()72 501.6 Q F3
(lcd)A F2(,)A F3(cate)2.75 E(gory)-.44 E F2(\))A(XLCd)88.5 513.6 Q F3
(lcd)2.75 E F2(;)A(char)88.5 525.6 Q F3(*cate)2.75 E(gory)-.44 E F2(;)A
(The)72 544.8 Q F1(_XlcFileName)3.666 E F2
(functions returns a \214le name which is bound to the speci\214ed `)
3.666 E(`)-.814 E F3(lcd)A F2 1.628 -.814('' a)D(nd `).814 E(`)-.814 E
F3(cat-)A -.44(eg)72 556.8 S(ory).44 E F2 -.814('')C 2.75(,a).814 G 2.75
(san)-2.75 G(ull-terminated string.)-2.75 E
(If no \214le name can be found, or there is no readable \214le for)5.5
E(the found \214le name,)72 568.8 Q F1(_XlcFileName)3.666 E F2
(returns NULL.)3.666 E(The returned \214le name should be freed by)5.5 E
(caller)72 580.8 Q(.)-.605 E
(The rule for searching a \214le name is implementation dependent.)72
596.4 Q(In current implementation,)5.5 E F1(_XlcFileName)72.916 608.4 Q
F2(uses `)3.666 E(`{cate)-.814 E(gory}.dir')-.165 E 2.75<278c>-.814 G
(le as mapping table, which has pairs of strings, a full)-2.75 E
(locale name and a corresponding \214le name.)72 620.4 Q F1 2.75
(9. Utility)72 648 R(Functions)2.75 E(Compar)72 663.6 Q 2.75(eL)-.198 G
(atin-1 strings)-2.75 E F2(int _XlcCompareISOLatin1\()72 682.8 Q F3
(str1)A F2(,)A F3(str2)2.75 E F2(\))A(char)88.5 694.8 Q F3(*str1)2.75 E
F2(,)A F3(*str2)2.75 E F2(;)A F1(8)285.25 768 Q EP
%%Page: 9 11
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF 531.38(-- --)0 4 R/F1 11/Times-Bold@0 SF
(Sample Implementation Frame W)72 52 Q 176.8(ork X11,)-.825 F
(Release 6.4)2.75 E/F2 11/Times-Roman@0 SF(int _XlcNCompareISOLatin1\()
72 84 Q/F3 11/Times-Italic@0 SF(str1)A F2(,)A F3(str2)2.75 E F2(,)A F3
(len)2.75 E F2(\))A(char)88.5 96 Q F3(*str1)2.75 E F2(,)A F3(*str2)2.75
E F2(;)A(int)88.5 108 Q F3(len)2.75 E F2(;)A(The)72 127.2 Q F1
(_XlcCompar)3.666 E(eIsoLatin1)-.198 E F2(function to compares tw)3.666
E 2.75(oI)-.11 G(SO-8859-1 strings.)-2.75 E(Bytes representing)5.5 E(lo)
72 139.2 Q(wer case letters are con)-.275 E -.165(ve)-.44 G
(rted to upper case before making the comparison.).165 E(The v)5.5 E
(alue returned)-.275 E(is an inte)72 151.2 Q
(ger less than, equal to, or greater than zero, depending on whether `)
-.165 E(`)-.814 E F3(str1)A F2 1.628 -.814('' i)D 2.75(sl).814 G -.165
(ex)-2.75 G(icograph-).165 E
(icly less than, equal to, or greater than `)72 163.2 Q(`)-.814 E F3
(str2)A F2 -.814('')C(.).814 E(The)72 178.8 Q F1(_XlcNCompar)3.666 E
(eIsoLatin1)-.198 E F2(function is identical to)3.666 E F1(_XlcCompar)
3.666 E(eISOLatin1,)-.198 E F2 -.165(ex)3.666 G(cept that at).165 E
(most `)72 190.8 Q(`)-.814 E F3(len)A F2 1.628 -.814('' b)D
(ytes are compared.).814 E F1(Resour)72 218.4 Q(ce Utility)-.198 E F2
(int XlcNumber\()72 237.6 Q F3(arr)A(ay)-.165 E F2(\))A(ArrayT)88.5
249.6 Q(ype)-.88 E F3(arr)2.75 E(ay)-.165 E F2(;)A(Similar to XtNumber)
72 268.8 Q(.)-.605 E -.22(vo)72 288 S(id _XlcCop).22 E(yFromAr)-.11 E
(g\()-.198 E F3(sr)A(c)-.407 E F2(,)A F3(dst)2.75 E F2(,)A F3(size)2.75
E F2(\))A(char)88.5 300 Q F3(*sr)2.75 E(c)-.407 E F2(;)A(char)88.5 312 Q
F3(*dst)2.75 E F2(;)A(int)88.5 324 Q F3(size)2.75 E F2(;)A -.22(vo)72
343.2 S(id _XlcCop).22 E(yT)-.11 E(oAr)-.88 E(g\()-.198 E F3(sr)A(c)
-.407 E F2(,)A F3(dst)2.75 E F2(,)A F3(size)2.75 E F2(\))A(char)88.5
355.2 Q F3(*sr)2.75 E(c)-.407 E F2(;)A(char)88.5 367.2 Q F3(**dst)2.75 E
F2(;)A(int)88.5 379.2 Q F3(size)2.75 E F2(;)A(Similar to)72 398.4 Q F1
(_XtCopyFr)3.666 E(omAr)-.198 E(g)-.11 E F2(and)3.666 E F1(_XtCopyT)
3.666 E(oAr)-1.012 E -.165(g.)-.11 G F2 -.22(vo)72 417.6 S
(id _XlcCountV).22 E(aList\()-1.221 E F3(var)A F2(,)A F3(count_r)2.75 E
(et)-.407 E F2(\))A -.275(va)88.5 429.6 S(_list).275 E F3(var)2.75 E F2
(;)A(int)88.5 441.6 Q F3(*count_r)2.75 E(et)-.407 E F2(;)A(Similar to)72
460.8 Q F1(_XtCountV)3.666 E(aList.)-1.012 E F2 -.22(vo)72 480 S
(id _XlcV).22 E(aT)-1.221 E(oAr)-.88 E(gList\()-.198 E F3(var)A F2(,)A
F3(count)2.75 E F2(,)A F3(ar)2.75 E(gs_r)-.407 E(et)-.407 E F2(\))A
-.275(va)88.5 492 S(_list).275 E F3(var)2.75 E F2(;)A(int)88.5 504 Q F3
(count)2.75 E F2(;)A(XlcAr)88.5 516 Q(gList)-.198 E F3(*ar)2.75 E(gs_r)
-.407 E(et)-.407 E F2(;)A(Similar to)72 535.2 Q F1(_XtV)3.666 E(aT)
-1.012 E(oAr)-1.012 E(gList.)-.11 E F2(typedef struct _XlcResource {)72
556.8 Q(char *name;)88.5 568.8 Q(XrmQuark xrm_name;)88.5 580.8 Q
(int size;)88.5 592.8 Q(int of)88.5 604.8 Q(fset;)-.275 E
(unsigned long mask;)88.5 616.8 Q 2.75(}X)72 628.8 S
(lcResource, *XlcResourceList;)-2.75 E(#de\214ne)72 656.4 Q
(XlcCreateMask)124.5 656.4 Q(\(1L<<0\))285 656.4 Q(#de\214ne)72 668.4 Q
(XlcDef)124.5 668.4 Q(aultMask)-.11 E(\(1L<<1\))285 668.4 Q(#de\214ne)72
680.4 Q(XlcGetMask)124.5 680.4 Q(\(1L<<2\))285 680.4 Q(#de\214ne)72
692.4 Q(XlcSetMask)124.5 692.4 Q(\(1L<<3\))285 692.4 Q(#de\214ne)72
704.4 Q(XlcIgnoreMask)124.5 704.4 Q(\(1L<<4\))285 704.4 Q F1(9)285.25
768 Q EP
%%Page: 10 12
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF 531.38(-- --)0 4 R/F1 11/Times-Bold@0 SF
(Sample Implementation Frame W)72 52 Q 176.8(ork X11,)-.825 F
(Release 6.4)2.75 E/F2 11/Times-Roman@0 SF -.22(vo)72 84 S
(id _XlcCompileResourceList\().22 E/F3 11/Times-Italic@0 SF -.407(re)C
(sour).407 E(ces)-.407 E F2(,)A F3(num_r)2.75 E(esour)-.407 E(ces)-.407
E F2(\))A(XlcResourceList)88.5 96 Q F3 -.407(re)2.75 G(sour).407 E(ces)
-.407 E F2(;)A(int)88.5 108 Q F3(num_r)2.75 E(esour)-.407 E(ces)-.407 E
F2(;)A(Similar to)72 127.2 Q F1(_XtCompileResour)3.666 E(ceList.)-.198 E
F2(char * _XlcGetV)72 146.4 Q(alues\()-1.221 E F3(base)A F2(,)A F3 -.407
(re)2.75 G(sour).407 E(ces)-.407 E F2(,)A F3(num_r)2.75 E(esour)-.407 E
(ces)-.407 E F2(,)A F3(ar)2.75 E(gs)-.407 E F2(,)A F3(num_ar)2.75 E(gs)
-.407 E F2(,)A F3(mask)2.75 E F2(\))A(XPointer)88.5 158.4 Q F3(base)2.75
E F2(;)A(XlcResourceList)88.5 170.4 Q F3 -.407(re)2.75 G(sour).407 E
(ces)-.407 E F2(;)A(int)88.5 182.4 Q F3(num_r)2.75 E(esour)-.407 E(ces)
-.407 E F2(;)A(XlcAr)88.5 194.4 Q(gList)-.198 E F3(ar)2.75 E(gs)-.407 E
F2(;)A(int)88.5 206.4 Q F3(num_ar)2.75 E(gs)-.407 E F2(;)A
(unsigned long)88.5 218.4 Q F3(mask)2.75 E F2(;)A(Similar to XtGetSub)72
237.6 Q -.275(va)-.165 G(lues.).275 E(char * _XlcSetV)72 256.8 Q
(alues\()-1.221 E F3(base)A F2(,)A F3 -.407(re)2.75 G(sour).407 E(ces)
-.407 E F2(,)A F3(num_r)2.75 E(esour)-.407 E(ces)-.407 E F2(,)A F3(ar)
2.75 E(gs)-.407 E F2(,)A F3(num_ar)2.75 E(gs)-.407 E F2(,)A F3(mask)2.75
E F2(\))A(XPointer)88.5 268.8 Q F3(base)2.75 E F2(;)A(XlcResourceList)
88.5 280.8 Q F3 -.407(re)2.75 G(sour).407 E(ces)-.407 E F2(;)A(int)88.5
292.8 Q F3(num_r)2.75 E(esour)-.407 E(ces)-.407 E F2(;)A(XlcAr)88.5
304.8 Q(gList)-.198 E F3(ar)2.75 E(gs)-.407 E F2(;)A(int)88.5 316.8 Q F3
(num_ar)2.75 E(gs)-.407 E F2(;)A(unsigned long)88.5 328.8 Q F3(mask)2.75
E F2(;)A(Similar to XtSetSub)72 348 Q -.275(va)-.165 G(lues.).275 E F1
(ANSI C Compatible Functions)72 375.6 Q F2(The follo)72 391.2 Q
(wing are ANSI C/MSE Compatible Functions for non-ANSI C en)-.275 E
(vironment.)-.44 E(int _Xmblen\()72 410.4 Q F3(str)A F2(,)A F3(len)2.75
E F2(\))A(char)88.5 422.4 Q F3(*str)2.75 E F2(;)A(int)88.5 434.4 Q F3
(len)2.75 E F2(;)A(The)72 453.6 Q F1(_Xmblen)3.666 E F2
(function returns the number of characters pointed to by `)3.666 E(`)
-.814 E F3(str)A F2 -.814('')C 5.5(.O).814 G(nly `)-5.5 E(`)-.814 E F3
(len)A F2 1.628 -.814('' b)D(ytes).814 E(in `)72 465.6 Q(`)-.814 E F3
(str)A F2 1.628 -.814('' a)D
(re used in determining the character count returned.).814 E -.814(``)
5.5 G F3(Str).814 E F2 1.628 -.814('' m)D(ay point at characters from)
.814 E(an)72 477.6 Q 2.75(yv)-.165 G
(alid codeset in the current locale.)-3.025 E(The call)72 493.2 Q F1
(_Xmblen)3.666 E F2(is equi)3.666 E -.275(va)-.275 G(lent to).275 E
(_Xmbto)97 505.2 Q(wc\(_Xmbto)-.275 E(wc\(\()-.275 E F3(wc)A(har_t*)
-.165 E F2(\)NULL,)A F3(str)2.75 E F2(,)A F3(len)2.75 E F2(\)\))A
(int _Xmbto)72 524.4 Q(wc\()-.275 E F3(wstr)A F2(,)A F3(str)2.75 E F2(,)
A F3(len)2.75 E F2(\))A(wchar_t)88.5 536.4 Q F3(*wstr)2.75 E F2(;)A
(char)88.5 548.4 Q F3(*str)2.75 E F2(;)A(int)88.5 560.4 Q F3(len)2.75 E
F2(;)A(The)72 579.6 Q F1(_Xmbto)3.666 E(wc)-.11 E F2(function con)3.666
E -.165(ve)-.44 G(rts the character\(s\) pointed to by `).165 E(`)-.814
E F3(str)A F2 1.628 -.814('' t)D 2.75(ot).814 G(heir wide character)
-2.75 E(representation\(s\) pointed to by `)72 591.6 Q(`)-.814 E F3
(wstr)A F2 -.814('')C 5.5(.`).814 G(`)-6.314 E F3(Len)A F2 1.628 -.814
('' i)D 2.75(st).814 G(he number of bytes in `)-2.75 E(`)-.814 E F3(str)
A F2 1.628 -.814('' t)D 2.75(ob).814 G 2.75(ec)-2.75 G(on)-2.75 E -.165
(ve)-.44 G(rted.).165 E(The return v)72 603.6 Q
(alue is the number of characters con)-.275 E -.165(ve)-.44 G(rted.).165
E(The call)72 619.2 Q F1(_Xmbto)3.666 E(wc)-.11 E F2(is equi)3.666 E
-.275(va)-.275 G(lent to).275 E(_Xlcmbto)97 631.2 Q(wc\(\(XLCd\)NULL,)
-.275 E F3(wstr)2.75 E F2(,)A F3(str)2.75 E F2(,)A F3(len)2.75 E F2(\))A
(int _Xlcmbto)72 650.4 Q(wc\()-.275 E F3(lcd)A F2(,)A F3(wstr)2.75 E F2
(,)A F3(str)2.75 E F2(,)A F3(len)2.75 E F2(\))A(XLCd)88.5 662.4 Q F3
(lcd)2.75 E F2(;)A(wchar_t)88.5 674.4 Q F3(*wstr)2.75 E F2(;)A(char)88.5
686.4 Q F3(*str)2.75 E F2(;)A(int)88.5 698.4 Q F3(len)2.75 E F2(;)A(The)
72 717.6 Q F1(_Xlcmbto)3.666 E(wc)-.11 E F2(function is identical to)
3.666 E F1(_Xmbto)3.666 E(wc,)-.11 E F2 -.165(ex)3.666 G
(cept that it requires the `).165 E(`)-.814 E F3(lcd)A F2 1.628 -.814
('' a)D -.198(rg).814 G(ument.).198 E(If `)72 729.6 Q(`)-.814 E F3(lcd)A
F2 1.628 -.814('' i)D 2.75(s\().814 G(XLCd\) NULL,)-2.75 E F1(_Xlcmbto)
3.666 E(wc,)-.11 E F2(calls)3.666 E F1(_XlcCurr)3.666 E(entLC)-.198 E F2
(to determine the current locale.)3.666 E F1(10)282.5 768 Q EP
%%Page: 11 13
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF 531.38(-- --)0 4 R/F1 11/Times-Bold@0 SF
(Sample Implementation Frame W)72 52 Q 176.8(ork X11,)-.825 F
(Release 6.4)2.75 E/F2 11/Times-Roman@0 SF(int _Xwctomb\()72 84 Q/F3 11
/Times-Italic@0 SF(str)A F2(,)A F3(wc)2.75 E F2(\))A(char)88.5 96 Q F3
(*str)2.75 E F2(;)A(wchar_t)88.5 108 Q F3(wc)2.75 E F2(;)A(The)72 127.2
Q F1(_Xwctomb)3.666 E F2(function con)3.666 E -.165(ve)-.44 G
(rts a single wide character pointed to by `).165 E(`)-.814 E F3(wc)A F2
1.628 -.814('' t)D 2.75(oi).814 G(ts multibyte)-2.75 E
(representation pointed to by `)72 139.2 Q(`)-.814 E F3(str)A F2 -.814
('')C 5.5(.O).814 G 2.75(ns)-5.5 G(uccess, the return v)-2.75 E
(alue is 1.)-.275 E(The call)72 154.8 Q F1(_Xwctomb)3.666 E F2(is equi)
3.666 E -.275(va)-.275 G(lent to).275 E(_Xlcwctomb\(\(XLCd\)NULL,)97
166.8 Q F3(str)2.75 E F2(,)A F3(wstr)2.75 E F2(\))A(int _Xlcwctomb\()72
186 Q F3(lcd)A F2(,)A F3(str)2.75 E F2(,)A F3(wc)2.75 E F2(\))A(XLCd)
88.5 198 Q F3(lcd)2.75 E F2(;)A(char)88.5 210 Q F3(*str)2.75 E F2(;)A
(wchar_t)88.5 222 Q F3(wc)2.75 E F2(;)A(The)72 241.2 Q F1(_Xlcwctomb)
3.666 E F2(function is identical to _Xwctomb, e)3.666 E
(xcept that it requires the `)-.165 E(`)-.814 E F3(lcd)A F2 1.628 -.814
('' a)D -.198(rg).814 G(ument.).198 E(If `)72 253.2 Q(`)-.814 E F3(lcd)A
F2 1.628 -.814('' i)D 2.75(s\().814 G(XLCd\) NULL,)-2.75 E F1
(_Xlcwctomb,)3.666 E F2(calls)3.666 E F1(_XlcCurr)3.666 E(entLC)-.198 E
F2(to determine the current locale.)3.666 E(int _Xmbsto)72 272.4 Q
(wcs\()-.275 E F3(wstr)A F2(,)A F3(str)2.75 E F2(,)A F3(len)2.75 E F2
(\))A(wchar_t)88.5 284.4 Q F3(*wstr)2.75 E F2(;)A(char)88.5 296.4 Q F3
(*str)2.75 E F2(;)A(int)88.5 308.4 Q F3(len)2.75 E F2(;)A(The)72 327.6 Q
F1(_Xmbsto)3.666 E(wcs)-.11 E F2(function con)3.666 E -.165(ve)-.44 G
(rts the NULL-terminated string pointed to by `).165 E(`)-.814 E F3(str)
A F2 1.628 -.814('' t)D 2.75(oi).814 G(ts wide)-2.75 E
(character string representation pointed to by `)72 339.6 Q(`)-.814 E F3
(wstr)A F2 -.814('')C 5.5(.`).814 G(`)-6.314 E F3(Len)A F2 1.628 -.814
('' i)D 2.75(st).814 G(he number of characters in `)-2.75 E(`)-.814 E F3
(str)A F2 -.814('')C(to be con)72 351.6 Q -.165(ve)-.44 G(rted.).165 E
(The call)72 367.2 Q F1(_Xmbsto)3.666 E(wcs)-.11 E F2(is equi)3.666 E
-.275(va)-.275 G(lent to).275 E(_Xlcmbsto)97 379.2 Q(wcs\(\(XLCd\)NULL,)
-.275 E F3(wstr)2.75 E F2(,)A F3(str)2.75 E F2(,)A F3(len)2.75 E F2(\))A
(int _Xlcmbsto)72 398.4 Q(wcs\()-.275 E F3(lcd)A F2(,)A F3(wstr)2.75 E
F2(,)A F3(str)2.75 E F2(,)A F3(len)2.75 E F2(\))A(XLCd)88.5 410.4 Q F3
(lcd)2.75 E F2(;)A(wchar_t)88.5 422.4 Q F3(*wstr)2.75 E F2(;)A(char)88.5
434.4 Q F3(*str)2.75 E F2(;)A(int)88.5 446.4 Q F3(len)2.75 E F2(;)A(The)
72 465.6 Q F1(_Xlcmbsto)3.666 E(wcs)-.11 E F2
(function is identical to _Xmbsto)3.666 E(wcs, e)-.275 E
(xcept that it requires the `)-.165 E(`)-.814 E F3(lcd)A F2 1.628 -.814
('' a)D -.198(rg).814 G(u-).198 E 2.75(ment. If)72 477.6 R -.814(``)2.75
G F3(lcd).814 E F2 1.628 -.814('' i)D 2.75(s\().814 G(XLCd\) NULL,)-2.75
E F1(_Xlcmbsto)3.666 E(wcs,)-.11 E F2(calls)3.666 E F1(_XlcCurr)3.666 E
(entLC)-.198 E F2(to determine the cur)3.666 E(-)-.22 E(rent locale.)72
489.6 Q(int _Xwcstombs\()72 508.8 Q F3(str)A F2(,)A F3(wstr)2.75 E F2(,)
A F3(len)2.75 E F2(\))A(char)88.5 520.8 Q F3(*str)2.75 E F2(;)A(wchar_t)
88.5 532.8 Q F3(*wstr)2.75 E F2(;)A(int)88.5 544.8 Q F3(len)2.75 E F2(;)
A(The)72 564 Q F1(_Xwcstombs)3.666 E F2(function con)3.666 E -.165(ve)
-.44 G(rts the \(wchar_t\) NULL terminated wide character string).165 E
(pointed to by `)72 576 Q(`)-.814 E F3(wstr)A F2 1.628 -.814('' t)D 2.75
(ot).814 G(he NULL terminated multibyte string pointed to by `)-2.75 E
(`)-.814 E F3(str)A F2 -.814('')C(.).814 E(The call)72 591.6 Q F1
(_Xwcstombs)3.666 E F2(is equi)3.666 E -.275(va)-.275 G(lent to).275 E
(_Xlcwcstombs\(\(XLCd\)NULL,)97 603.6 Q F3(str)2.75 E F2(,)A F3(wstr)
2.75 E F2(,)A F3(len)2.75 E F2(\))A(int _Xlcwcstombs\()72 622.8 Q F3
(lcd)A F2(,)A F3(str)2.75 E F2(,)A F3(wstr)2.75 E F2(,)A F3(len)2.75 E
F2(\))A(XLCd)88.5 634.8 Q F3(lcd)2.75 E F2(;)A(char)88.5 646.8 Q F3
(*str)2.75 E F2(;)A(wchar_t)88.5 658.8 Q F3(*wstr)2.75 E F2(;)A(int)88.5
670.8 Q F3(len)2.75 E F2(;)A(The)72 690 Q F1(_Xlcwcstombs)3.666 E F2
(function is identical to _Xwcstombs, e)3.666 E
(xcept that it requires the `)-.165 E(`)-.814 E F3(lcd)A F2 1.628 -.814
('' a)D -.198(rg).814 G(u-).198 E 2.75(ment. If)72 702 R -.814(``)2.75 G
F3(lcd).814 E F2 1.628 -.814('' i)D 2.75(s\().814 G(XLCd\) NULL,)-2.75 E
F1(_Xlcwcstombs,)3.666 E F2(calls)3.666 E F1(_XlcCurr)3.666 E(entLC)
-.198 E F2(to determine the cur)3.666 E(-)-.22 E(rent locale.)72 714 Q
F1(11)282.5 768 Q EP
%%Page: 12 14
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF 531.38(-- --)0 4 R/F1 11/Times-Bold@0 SF
(Sample Implementation Frame W)72 52 Q 176.8(ork X11,)-.825 F
(Release 6.4)2.75 E/F2 11/Times-Roman@0 SF(int _Xwcslen\()72 84 Q/F3 11
/Times-Italic@0 SF(wstr)A F2(\))A(wchar_t)88.5 96 Q F3(*wstr)2.75 E F2
(;)A(The)72 115.2 Q F1(_Xwcslen)3.666 E F2(function returns the count o\
f wide characters in the \(wchar_t\) NULL terminated)3.666 E
(wide character string pointed to by `)72 127.2 Q(`)-.814 E F3(wstr)A F2
-.814('')C(.).814 E(wchar_t * _Xwcscp)72 146.4 Q(y\()-.11 E F3(wstr1)A
F2(,)A F3(wstr2)2.75 E F2(\))A(wchar_t)88.5 158.4 Q F3(*wstr1)2.75 E F2
(,)A F3(*wstr2)2.75 E F2(;)A(wchar_t * _Xwcsncp)72 177.6 Q(y\()-.11 E F3
(wstr1)A F2(,)A F3(wstr2)2.75 E F2(,)A F3(len)2.75 E F2(\))A(wchar_t)
88.5 189.6 Q F3(*wstr1)2.75 E F2(,)A F3(*wstr2)2.75 E F2(;)A(int)88.5
201.6 Q F3(len)2.75 E F2(;)A(The)72 220.8 Q F1(_Xwcscpy)3.666 E F2(func\
tion copies the \(wchar_t\) NULL terminated wide character string point\
ed to)3.666 E(by `)72 232.8 Q(`)-.814 E F3(wstr2)A F2 1.628 -.814('' t)D
2.75(ot).814 G(he object pointed at by `)-2.75 E(`)-.814 E F3(wstr1)A F2
-.814('')C 5.5(.`).814 G(`)-6.314 E F3(Wstr1)A F2 1.628 -.814('' i)D
2.75(s\().814 G(wchar_t\) NULL terminated.)-2.75 E(The)5.5 E(return v)72
244.8 Q(alue is a pointer to `)-.275 E(`)-.814 E F3(wstr1)A F2 -.814('')
C(.).814 E(The)72 260.4 Q F1(_Xwcsncpy)3.666 E F2
(function is identical to)3.666 E F1(_Xwcscpy)3.666 E(,)-.605 E F2 -.165
(ex)3.666 G(cept that it copies `).165 E(`)-.814 E F3(len)A F2 1.628
-.814('' w)D(ide characters).814 E(from the object pointed to by `)72
272.4 Q(`)-.814 E F3(wstr2)A F2 1.628 -.814('' t)D 2.75(ot).814 G
(he object pointed to `)-2.75 E(`)-.814 E F3(wstr1)A F2 -.814('')C(.)
.814 E(int _Xwcscmp\()72 291.6 Q F3(wstr1)A F2(,)A F3(wstr2)2.75 E F2
(\))A(wchar_t)88.5 303.6 Q F3(*wstr1)2.75 E F2(,)A F3(*wstr2)2.75 E F2
(;)A(int _Xwcsncmp\()72 322.8 Q F3(wstr1)A F2(,)A F3(wstr2)2.75 E F2(,)A
F3(len)2.75 E F2(\))A(wchar_t)88.5 334.8 Q F3(*wstr1)2.75 E F2(,)A F3
(*wstr2)2.75 E F2(;)A(int)88.5 346.8 Q F3(len)2.75 E F2(;)A(The)72 366 Q
F1(_Xwcscmp)3.666 E F2 2.75(function compares)3.666 F(tw)2.75 E 2.75
(o\()-.11 G(wchar_t\) NULL terminated wide character strings.)-2.75 E
(The)5.5 E -.275(va)72 378 S(lue returned is an inte).275 E
(ger less than, equal to, or greater than zero, depending on whether)
-.165 E -.814(``)72 390 S F3(wstr1).814 E F2 1.628 -.814('' i)D 2.75(sl)
.814 G -.165(ex)-2.75 G
(icographicly less then, equal to, or greater than `).165 E(`)-.814 E F3
(str2)A F2 -.814('')C(.).814 E(The)72 405.6 Q F1(_Xwcsncmp)3.666 E F2
(function is identical to)3.666 E F1(_XlcCompar)3.666 E(eISOLatin1,)
-.198 E F2 -.165(ex)3.666 G(cept that at most `).165 E(`)-.814 E F3(len)
A F2 -.814('')C(wide characters are compared.)72 417.6 Q F1(12)282.5 768
Q F0 531.38(-- --)0 795 R EP
%%Trailer
end
%%EOF
XmHTML-1.1.10/docs/PaxHeaders.1031/Trans.PS 0000644 0001750 0000144 00000000132 12613377377 016075 x ustar 00 0000000 0000000 30 mtime=1445854975.084545878
30 atime=1445854975.084545878
30 ctime=1445854975.084545878
XmHTML-1.1.10/docs/Trans.PS 0000644 0001750 0000144 00000152107 12613377377 015503 0 ustar 00chris users 0000000 0000000 %!PS-Adobe-3.0
%%Creator: groff version 1.11
%%CreationDate: Mon Dec 15 09:41:05 1997
%%DocumentNeededResources: font Times-Roman
%%+ font Times-Bold
%%+ font Times-Italic
%%DocumentSuppliedResources: procset grops 1.11 0
%%Pages: 13
%%PageOrder: Ascend
%%Orientation: Portrait
%%EndComments
%%BeginProlog
%%BeginResource: procset grops 1.11 0
/setpacking where{
pop
currentpacking
true setpacking
}if
/grops 120 dict dup begin
/SC 32 def
/A/show load def
/B{0 SC 3 -1 roll widthshow}bind def
/C{0 exch ashow}bind def
/D{0 exch 0 SC 5 2 roll awidthshow}bind def
/E{0 rmoveto show}bind def
/F{0 rmoveto 0 SC 3 -1 roll widthshow}bind def
/G{0 rmoveto 0 exch ashow}bind def
/H{0 rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def
/I{0 exch rmoveto show}bind def
/J{0 exch rmoveto 0 SC 3 -1 roll widthshow}bind def
/K{0 exch rmoveto 0 exch ashow}bind def
/L{0 exch rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def
/M{rmoveto show}bind def
/N{rmoveto 0 SC 3 -1 roll widthshow}bind def
/O{rmoveto 0 exch ashow}bind def
/P{rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def
/Q{moveto show}bind def
/R{moveto 0 SC 3 -1 roll widthshow}bind def
/S{moveto 0 exch ashow}bind def
/T{moveto 0 exch 0 SC 5 2 roll awidthshow}bind def
/SF{
findfont exch
[exch dup 0 exch 0 exch neg 0 0]makefont
dup setfont
[exch/setfont cvx]cvx bind def
}bind def
/MF{
findfont
[5 2 roll
0 3 1 roll
neg 0 0]makefont
dup setfont
[exch/setfont cvx]cvx bind def
}bind def
/level0 0 def
/RES 0 def
/PL 0 def
/LS 0 def
/MANUAL{
statusdict begin/manualfeed true store end
}bind def
/PLG{
gsave newpath clippath pathbbox grestore
exch pop add exch pop
}bind def
/BP{
/level0 save def
1 setlinecap
1 setlinejoin
72 RES div dup scale
LS{
90 rotate
}{
0 PL translate
}ifelse
1 -1 scale
}bind def
/EP{
level0 restore
showpage
}bind def
/DA{
newpath arcn stroke
}bind def
/SN{
transform
.25 sub exch .25 sub exch
round .25 add exch round .25 add exch
itransform
}bind def
/DL{
SN
moveto
SN
lineto stroke
}bind def
/DC{
newpath 0 360 arc closepath
}bind def
/TM matrix def
/DE{
TM currentmatrix pop
translate scale newpath 0 0 .5 0 360 arc closepath
TM setmatrix
}bind def
/RC/rcurveto load def
/RL/rlineto load def
/ST/stroke load def
/MT/moveto load def
/CL/closepath load def
/FL{
currentgray exch setgray fill setgray
}bind def
/BL/fill load def
/LW/setlinewidth load def
/RE{
findfont
dup maxlength 1 index/FontName known not{1 add}if dict begin
{
1 index/FID ne{def}{pop pop}ifelse
}forall
/Encoding exch def
dup/FontName exch def
currentdict end definefont pop
}bind def
/DEFS 0 def
/EBEGIN{
moveto
DEFS begin
}bind def
/EEND/end load def
/CNT 0 def
/level1 0 def
/PBEGIN{
/level1 save def
translate
div 3 1 roll div exch scale
neg exch neg exch translate
0 setgray
0 setlinecap
1 setlinewidth
0 setlinejoin
10 setmiterlimit
[]0 setdash
/setstrokeadjust where{
pop
false setstrokeadjust
}if
/setoverprint where{
pop
false setoverprint
}if
newpath
/CNT countdictstack def
userdict begin
/showpage{}def
}bind def
/PEND{
clear
countdictstack CNT sub{end}repeat
level1 restore
}bind def
end def
/setpacking where{
pop
setpacking
}if
%%EndResource
%%IncludeResource: font Times-Roman
%%IncludeResource: font Times-Bold
%%IncludeResource: font Times-Italic
grops begin/DEFS 1 dict def DEFS begin/u{.001 mul}bind def end/RES 72
def/PL 792 def/LS false def/ENC0[/asciicircum/asciitilde/Scaron/Zcaron
/scaron/zcaron/Ydieresis/trademark/quotesingle/.notdef/.notdef/.notdef
/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef
/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef
/.notdef/.notdef/space/exclam/quotedbl/numbersign/dollar/percent
/ampersand/quoteright/parenleft/parenright/asterisk/plus/comma/hyphen
/period/slash/zero/one/two/three/four/five/six/seven/eight/nine/colon
/semicolon/less/equal/greater/question/at/A/B/C/D/E/F/G/H/I/J/K/L/M/N/O
/P/Q/R/S/T/U/V/W/X/Y/Z/bracketleft/backslash/bracketright/circumflex
/underscore/quoteleft/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y
/z/braceleft/bar/braceright/tilde/.notdef/quotesinglbase/guillemotleft
/guillemotright/bullet/florin/fraction/perthousand/dagger/daggerdbl
/endash/emdash/ff/fi/fl/ffi/ffl/dotlessi/dotlessj/grave/hungarumlaut
/dotaccent/breve/caron/ring/ogonek/quotedblleft/quotedblright/oe/lslash
/quotedblbase/OE/Lslash/.notdef/exclamdown/cent/sterling/currency/yen
/brokenbar/section/dieresis/copyright/ordfeminine/guilsinglleft
/logicalnot/minus/registered/macron/degree/plusminus/twosuperior
/threesuperior/acute/mu/paragraph/periodcentered/cedilla/onesuperior
/ordmasculine/guilsinglright/onequarter/onehalf/threequarters
/questiondown/Agrave/Aacute/Acircumflex/Atilde/Adieresis/Aring/AE
/Ccedilla/Egrave/Eacute/Ecircumflex/Edieresis/Igrave/Iacute/Icircumflex
/Idieresis/Eth/Ntilde/Ograve/Oacute/Ocircumflex/Otilde/Odieresis
/multiply/Oslash/Ugrave/Uacute/Ucircumflex/Udieresis/Yacute/Thorn
/germandbls/agrave/aacute/acircumflex/atilde/adieresis/aring/ae/ccedilla
/egrave/eacute/ecircumflex/edieresis/igrave/iacute/icircumflex/idieresis
/eth/ntilde/ograve/oacute/ocircumflex/otilde/odieresis/divide/oslash
/ugrave/uacute/ucircumflex/udieresis/yacute/thorn/ydieresis]def
/Times-Italic@0 ENC0/Times-Italic RE/Times-Bold@0 ENC0/Times-Bold RE
/Times-Roman@0 ENC0/Times-Roman RE
%%EndProlog
%%Page: 1 1
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF 531.38(-- --)0 4 R/F1 15/Times-Bold@0 SF
(The XIM T)181.26 231 Q(ransport Speci\214cation)-1.11 E/F2 12
/Times-Bold@0 SF(Re)257.088 276 Q(vision 0.1)-.18 E 3(XV)223.944 306 S
(ersion 11, Release 6.4)-4.2 E/F3 10/Times-Italic@0 SF -.92(Ta)252.835
345 S(kashi Fujiwar).92 E(a)-.15 E F0(FUJITSU LIMITED)246.755 363 Q F3
(ABSTRA)264.535 411 Q(CT)-.3 E/F4 11/Times-Roman@0 SF
(This speci\214cation describes the transport layer interf)108 438.6 Q
(aces between Xlib and IM)-.11 E(Serv)108 450.6 Q(er)-.165 E 2.75(,w)
-.44 G(hich mak)-2.75 E(es v)-.11 E
(arious channels usable such as X protocol or)-.275 E 2.75(,T)-.44 G
(CP/IP)-2.75 E(,)-1.221 E(DECnet and etc.)108 462.6 Q EP
%%Page: 2 2
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF 531.38(-- --)0 4 R/F1 9/Times-Roman@0 SF(Cop)72
195.6 Q(yright \251 1994 by FUJITSU LIMITED)-.09 E
(Permission to use, cop)72 211.2 Q 1.17 -.585(y, m)-.09 H(odify).585 E
2.25(,a)-.585 G(nd distrib)-2.25 E(ute this documentation for an)-.18 E
2.25(yp)-.135 G(urpose and without fee is hereby granted,)-2.25 E(pro)72
223.2 Q(vided that the abo)-.135 E .27 -.135(ve c)-.135 H(op).135 E
(yright notice and this permission notice appear in all copies.)-.09 E
(Fujitsu mak)4.5 E(es no representa-)-.09 E
(tions about the suitability for an)72 235.2 Q 2.25(yp)-.135 G
(urpose of the information in this document.)-2.25 E
(This documentation is pro)4.5 E(vided as is)-.135 E(without e)72 247.2
Q(xpress or implied w)-.135 E(arranty)-.09 E(.)-.585 E(Cop)72 319.2 Q
(yright \251 1994 X Consortium)-.09 E
(Permission is hereby granted, free of char)72 334.8 Q(ge, to an)-.162 E
2.25(yp)-.135 G(erson obtaining a cop)-2.25 E 2.25(yo)-.09 G 2.25(ft)
-2.25 G(his softw)-2.25 E(are and associated documenta-)-.09 E
(tion \214les \(the `)72 346.8 Q(`Softw)-.666 E(are')-.09 E
('\), to deal in the Softw)-.666 E(are without restriction, including w\
ithout limitation the rights to use,)-.09 E(cop)72 358.8 Q 1.17 -.585
(y, m)-.09 H(odify).585 E 2.25(,m)-.585 G(er)-2.25 E
(ge, publish, distrib)-.162 E
(ute, sublicense, and/or sell copies of the Softw)-.18 E
(are, and to permit persons to whom)-.09 E(the Softw)72 370.8 Q
(are is furnished to do so, subject to the follo)-.09 E
(wing conditions:)-.225 E(The abo)72 386.4 Q .27 -.135(ve c)-.135 H(op)
.135 E(yright notice and this permission notice shall be included in al\
l copies or substantial portions of the Soft-)-.09 E -.09(wa)72 398.4 S
(re.).09 E(THE SOFTW)72 414 Q(ARE IS PR)-1.08 E -.45(OV)-.36 G(IDED `)
.45 E -.72(`A)-.666 G 2.25(SI).72 G(S')-2.25 E(', WITHOUT W)-.666 E
(ARRANTY OF ANY KIND, EXPRESS OR IMPLIED,)-1.08 E(INCLUDING B)72 426 Q
(UT NO)-.09 E 2.25(TL)-.36 G(IMITED T)-2.25 E 2.25(OT)-.162 G(HE W)-2.25
E(ARRANTIES OF MERCHANT)-1.08 E(ABILITY)-.837 E 2.25(,F)-1.161 G
(ITNESS FOR A P)-2.25 E(AR)-.828 E(TIC-)-.54 E
(ULAR PURPOSE AND NONINFRINGEMENT)72 438 Q 4.5(.I)-.666 G 2.25(NN)-4.5 G
2.25(OE)-2.25 G(VENT SHALL THE X CONSOR)-2.25 E(TIUM BE LIABLE FOR)-.54
E(ANY CLAIM, D)72 450 Q(AMA)-.36 E(GES OR O)-.36 E(THER LIABILITY)-.36 E
2.25(,W)-1.161 G(HETHER IN AN A)-2.25 E(CTION OF CONTRA)-.36 E(CT)-.36 E
2.25(,T)-.666 G(OR)-2.412 E 2.25(TO)-.54 G 2.25(RO)-2.25 G(TH-)-2.61 E
(ER)72 462 Q(WISE, ARISING FR)-.495 E
(OM, OUT OF OR IN CONNECTION WITH THE SOFTW)-.36 E(ARE OR THE USE OR O)
-1.08 E(THER)-.36 E(DEALINGS IN THE SOFTW)72 474 Q(ARE.)-1.08 E(Except \
as contained in this notice, the name of the X Consortium shall not be \
used in adv)72 489.6 Q(ertising or otherwise to pro-)-.135 E
(mote the sale, use or other dealings in this Softw)72 501.6 Q
(are without prior written authorization from the X Consortium.)-.09 E
/F2 9/Times-Italic@0 SF 2.25(XW)72 549.6 S(indow System)-2.745 E F1
(is a trademark of X Consortium, Inc.)2.25 E EP
%%Page: 1 3
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF 531.38(-- --)0 4 R/F1 11/Times-Bold@0 SF 2.75
(1. Intr)72 84 R(oduction)-.198 E/F2 11/Times-Roman@0 SF(The Xlib XIM i\
mplementation is layered into three functions, a protocol layer)72 99.6
Q 2.75(,a)-.44 G 2.75(ni)-2.75 G(nterf)-2.75 E(ace layer)-.11 E
(and a transport layer)72 111.6 Q 2.75(.T)-.605 G
(he purpose of this layering is to mak)-2.75 E 2.75(et)-.11 G
(he protocol independent of trans-)-2.75 E(port implementation.)72 123.6
Q(Each function of these layers are:)5.5 E/F3 11/Times-Italic@0 SF
(The pr)97 139.2 Q(otocol layer)-.495 E F2(implements o)122 151.2 Q
-.165(ve)-.165 G(rall function of XIM and calls the interf).165 E
(ace layer functions when it)-.11 E(needs to communicate to IM Serv)122
163.2 Q(er)-.165 E(.)-.605 E F3(The interface layer)97 178.8 Q F2(separ\
ates the implementation of the transport layer from the protocol layer)
122 190.8 Q 2.75(,i)-.44 G 2.75(no)-2.75 G(ther)-2.75 E -.11(wo)122
202.8 S(rds, it pro).11 E(vides implementation independent hook for the\
transport layer functions.)-.165 E F3(The tr)97 218.4 Q(ansport layer)
-.165 E F2(handles actual data communication with IM Serv)122 230.4 Q
(er)-.165 E 2.75(.I)-.605 G 2.75(ti)-2.75 G 2.75(sd)-2.75 G
(one by a set of se)-2.75 E -.165(ve)-.275 G(ral func-).165 E
(tions named transporters.)122 242.4 Q
(This speci\214cation describes the interf)72 258 Q
(ace layer and the transport layer)-.11 E 2.75(,w)-.44 G(hich mak)-2.75
E(es v)-.11 E(arious com-)-.275 E
(munication channels usable such as X protocol or)72 270 Q 2.75(,T)-.44
G(CP/IP)-2.75 E 2.75(,D)-1.221 G(ECnet, STREAM, etc., and pro)-2.75 E
(vides)-.165 E(the information needed for adding another ne)72 282 Q
2.75(wt)-.275 G(ransport layer)-2.75 E 5.5(.I)-.605 G 2.75(na)-5.5 G
(ddition, sample implementa-)-2.75 E(tions for the transporter using th\
e X connection is described in section 4.)72 294 Q F1 2.75
(2. Initialization)72 318 R 2.75(2.1. Registering)72 342 R(structur)2.75
E 2.75(et)-.198 G 2.75(oi)-2.75 G(nitialize)-2.75 E F2
(The structure typed as T)72 357.6 Q(ransportSW contains the list of th\
e transport layer the speci\214c implemen-)-.385 E(tations supports.)72
369.6 Q(typedef struct {)72 391.2 Q(char *transport_name;)88.5 403.2 Q
(Bool \(*con\214g\);)88.5 415.2 Q 2.75(}T)72 427.2 S(ransportSW)-3.135 E
(;)-.407 E F3(tr)72 452.4 Q(ansport_name)-.165 E F2
(name of transport\(*1\))12.386 E F3(con\214g)72 468 Q F2
(initial con\214guration function)55.616 E 2.75(As)72 483.6 S
(ample entry for the Xlib supporting transporters is sho)-2.75 E
(wn belo)-.275 E(w:)-.275 E -.385(Tr)72 505.2 S(ansportSW _XimT).385 E
(ransportRec[] = {)-.385 E 24.692(/* char)72 520.2 R F3(*:)2.75 E 27.75
(*t)74.75 532.2 S -.165(ra)-27.75 G(nsport_name).165 E F2 71.136(,B)C
(ool)-71.136 E F3(\(*con\214g\)\(\))2.75 E F2(*/)74.75 544.2 Q -.814(``)
108 556.2 S(X').814 E 117.534(', _XimXConf,)-.814 F -.814(``)108 568.2 S
(tcp').814 E 112.034(', _XimT)-.814 F(ransConf,)-.385 E -.814(``)108
580.2 S(local').814 E 104.092(', _XimT)-.814 F(ransConf,)-.385 E -.814
(``)108 592.2 S(decnet').814 E 96.766(', _XimT)-.814 F(ransConf,)-.385 E
-.814(``)108 604.2 S(streams').814 E 91.871(', _XimT)-.814 F(ransConf,)
-.385 E(\(char *\)NULL,)108 616.2 Q(\(Bool \(*\)\(\)\)NULL,)77.417 E(};)
72 628.2 Q .36 LW 76.5 697 72 697 DL 81 697 76.5 697 DL 85.5 697 81 697
DL 90 697 85.5 697 DL 94.5 697 90 697 DL 99 697 94.5 697 DL 103.5 697 99
697 DL 108 697 103.5 697 DL 112.5 697 108 697 DL 117 697 112.5 697 DL
121.5 697 117 697 DL 126 697 121.5 697 DL 130.5 697 126 697 DL 135 697
130.5 697 DL 139.5 697 135 697 DL 144 697 139.5 697 DL/F4 9
/Times-Roman@0 SF
(\(*1\) Refer to "The Input Method Protocol: Appendix B")72 708 Q F1(1)
285.25 768 Q EP
%%Page: 2 4
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF 531.38(-- --)0 4 R/F1 11/Times-Bold@0 SF(XIM T)
72 52 Q(ransport Speci\214cation)-.814 E(X11, Release 6.4)220.162 E 2.75
(2.2. Initialization)72 84 R(function)2.75 E/F2 11/Times-Roman@0 SF
(The follo)72 99.6 Q(wing function will be called once when Xlib con\
\214gures the transporter functions.)-.275 E(Bool \(*con\214g\)\()72
121.2 Q/F3 11/Times-Italic@0 SF(im)A F2(,)A F3(tr)2.75 E(ansport_data)
-.165 E F2(\))A(XIM)88.5 133.2 Q F3(im)2.75 E F2(;)A(char)88.5 145.2 Q
F3(*tr)2.75 E(ansport_data)-.165 E F2(;)A F3(im)72 164.4 Q F2
(Speci\214es XIM structure address.)61 E F3(tr)72 180 Q(ansport_data)
-.165 E F2(Speci\214es the data speci\214c to the transporter)6.154 E
2.75(,i)-.44 G 2.75(nI)-2.75 G 2.75(MS)-2.75 G(erv)-2.75 E
(er address. \(*1\))-.165 E
(This function must setup the transporter function pointers.)72 201.6 Q
(The actual)72 217.2 Q F3(con\214g)2.75 E F2
(function will be chosen by IM Serv)2.75 E
(er at the pre-connection time, matching by)-.165 E(the)72 229.2 Q F3
(tr)2.75 E(ansport_name)-.165 E F2(speci\214ed in the)2.75 E F1(_XimT)
2.75 E(ransportRec)-.814 E F2(array; The speci\214c members of Xim-)2.75
E(Proto structure listed belo)72 241.2 Q 2.75(wm)-.275 G
(ust be initialized so that point the)-2.75 E 2.75(ya)-.165 G
(ppropriate transporter func-)-2.75 E(tions.)72 253.2 Q
(If the speci\214ed transporter has been con\214gured successfully)72
268.8 Q 2.75(,t)-.715 G(his function returns T)-2.75 E(rue. There is)
-.385 E(no Alternati)72 280.8 Q .33 -.165(ve E)-.275 H
(ntry for con\214g function itself.).165 E
(The structure XimProto contains the follo)72 296.4 Q
(wing function pointers:)-.275 E(Bool \(*connect\)\(\);)108 314.4 Q
(/* Open connection */)98.435 E(Bool \(*shutdo)108 326.4 Q 87.391
(wn\)\(\); /*)-.275 F(Close connection */)2.75 E(Bool \(*write\)\(\);)
108 338.4 Q(/* Write data */)110.04 E(Bool \(*read\)\(\);)108 350.4 Q
(/* Read data */)113.714 E(Bool \(*\215ush\)\(\);)108 362.4 Q
(/* Flush data b)111.25 E(uf)-.22 E(fer */)-.275 E(Bool \(*re)108 374.4
Q 46.361(gister_dispatcher\)\(\); /*)-.165 F(Re)2.75 E
(gister asynchronous data handler */)-.165 E
(Bool \(*call_dispatcher\)\(\);)108 386.4 Q(/* Call dispatcher */)66.051
E(These functions are called when Xlib needs to communicate the IM Serv)
72 404.4 Q(er)-.165 E 2.75(.T)-.605 G(hese functions must)-2.75 E
(process the appropriate procedure described belo)72 416.4 Q -.715(w.)
-.275 G F1 2.75(3. The)72 444 R(interface/transport lay)2.75 E
(er functions)-.11 E F2 -.165(Fo)72 459.6 S(llo).165 E
(wing functions are used for the transport interf)-.275 E(ace.)-.11 E
-.88(Ta)194.538 475.2 S(ble 3-1; The T).88 E(ransport Layer Functions.)
-.385 E .36 LW 434.01 485.45 141.99 485.45 DL/F4 9/Times-Bold@0 SF
(Alter)169.221 495.2 Q(nati)-.135 E .18 -.09(ve E)-.09 H 54.642
(ntry XimPr).09 F(oto member)-.162 E(\(Interface Lay)170.116 507.2 Q
56.577(er\) \(T)-.09 F(ransport Lay)-.666 E(er\))-.09 E(Section)399.761
501.2 Q 434.01 511.45 141.99 511.45 DL 434.01 513.45 141.99 513.45 DL
(_XimConnect)146.49 523.2 Q/F5 9/Times-Roman@0 SF 105.645(connect 3.1)
73.893 F 434.01 527.45 141.99 527.45 DL F4(_XimShutdo)146.49 537.2 Q(wn)
-.09 E F5(shutdo)66.963 E 98.859(wn 3.2)-.225 F 434.01 541.45 141.99
541.45 DL F4(_XimWrite)146.49 551.2 Q F5 115.14(write 3.3)83.397 F
434.01 555.45 141.99 555.45 DL F4(_XimRead)146.49 565.2 Q F5 118.146
(read 3.4)85.89 F 434.01 569.45 141.99 569.45 DL F4(_XimFlush)146.49
579.2 Q F5 116.13(\215ush 3.5)84.378 F 434.01 583.45 141.99 583.45 DL F4
(_XimRegisterDispatcher)146.49 593.2 Q F5(re)31.908 E 65.289
(gister_dispatcher 3.6)-.135 F 434.01 597.45 141.99 597.45 DL F4
(_XimCallDispatcher)146.49 607.2 Q F5 79.149(call_dispatcher 3.7)47.892
F 434.01 611.45 141.99 611.45 DL 393.51 485.45 393.51 611.45 DL 266.625
485.45 266.625 611.45 DL 434.01 485.45 434.01 611.45 DL 141.99 485.45
141.99 611.45 DL F2(The Protocol layer calls the abo)72 628.8 Q .33
-.165(ve f)-.165 H(unctions using the Alternati).165 E .33 -.165(ve E)
-.275 H(ntry in the left column. The).165 E(transport implementation de\
\214nes XimProto member function in the right column. The Alternati)72
640.8 Q -.165(ve)-.275 G(Entry is pro)72 652.8 Q(vided so as to mak)
-.165 E 2.75(ee)-.11 G(asier to implement the Protocol Layer)-2.75 E(.)
-.605 E 76.5 697 72 697 DL 81 697 76.5 697 DL 85.5 697 81 697 DL 90 697
85.5 697 DL 94.5 697 90 697 DL 99 697 94.5 697 DL 103.5 697 99 697 DL
108 697 103.5 697 DL 112.5 697 108 697 DL 117 697 112.5 697 DL 121.5 697
117 697 DL 126 697 121.5 697 DL 130.5 697 126 697 DL 135 697 130.5 697
DL 139.5 697 135 697 DL 144 697 139.5 697 DL F5
(\(*1\) Refer to "The Input Method Protocol: Appendix B")72 708 Q F1(2)
285.25 768 Q EP
%%Page: 3 5
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF 531.38(-- --)0 4 R/F1 11/Times-Bold@0 SF(XIM T)
72 52 Q(ransport Speci\214cation)-.814 E(X11, Release 6.4)220.162 E 2.75
(3.1. Opening)72 84 R(connection)2.75 E/F2 11/Times-Roman@0 SF(When)72
99.6 Q F1(XOpenIM)2.75 E F2(is called, the follo)2.75 E
(wing function is called to connect with the IM Serv)-.275 E(er)-.165 E
(.)-.605 E(Bool \(*connect\)\()72 121.2 Q/F3 11/Times-Italic@0 SF(im)A
F2(\))A(XIM)88.5 133.2 Q F3(im)2.75 E F2(;)A F3(im)72 152.4 Q F2
(Speci\214es XIM structure address.)61 E
(This function must establishes the connection to the IM Serv)72 174 Q
(er)-.165 E 2.75(.I)-.605 G 2.75(ft)-2.75 G
(he connection is established)-2.75 E(successfully)72 186 Q 2.75(,t)
-.715 G(his function returns T)-2.75 E 2.75(rue. The)-.385 F(Alternati)
2.75 E .33 -.165(ve E)-.275 H(ntry for this function is:).165 E
(Bool _XimConnect\()72 207.6 Q F3(im)A F2(\))A(XIM)88.5 219.6 Q F3(im)
2.75 E F2(;)A F3(im)72 238.8 Q F2(Speci\214es XIM structure address.)61
E F1 2.75(3.2. Closing)72 266.4 R(connection)2.75 E F2(When)72 282 Q F1
(XCloseIM)2.75 E F2(is called, the follo)2.75 E
(wing function is called to disconnect the connection with the)-.275 E
(IM Serv)72 294 Q(er)-.165 E 2.75(.T)-.605 G(he Alternati)-2.75 E .33
-.165(ve E)-.275 H(ntry for this function is:).165 E(Bool \(*shutdo)72
315.6 Q(wn\)\()-.275 E F3(im)A F2(\))A(XIM)88.5 327.6 Q F3(im)2.75 E F2
(;)A F3(im)72 346.8 Q F2(Speci\214es XIM structure address.)61 E
(This function must close connection with the IM Serv)72 368.4 Q(er)
-.165 E 2.75(.I)-.605 G 2.75(ft)-2.75 G
(he connection is closed successfully)-2.75 E(,)-.715 E
(this function returns T)72 380.4 Q(rue. The Alternati)-.385 E .33 -.165
(ve E)-.275 H(ntry for this function is:).165 E(Bool _XimShutdo)72 402 Q
(wn\()-.275 E F3(im)A F2(\))A(XIM)88.5 414 Q F3(im)2.75 E F2(;)A F3(im)
72 433.2 Q F2(Speci\214es XIM structure address.)14 E F1 2.75
(3.3. Writing)72 460.8 R(data)2.75 E F2(The follo)72 476.4 Q
(wing function is called, when Xlib needs to write data to the IM Serv)
-.275 E(er)-.165 E(.)-.605 E(Bool \(*write\)\()72 498 Q F3(im)A F2(,)A
F3(len)2.75 E F2(,)A F3(data)2.75 E F2(\))A(XIM)88.5 510 Q F3(im)2.75 E
F2(;)A(INT16)88.5 522 Q F3(len)2.75 E F2(;)A(XPointer)88.5 534 Q F3
(data)2.75 E F2(;)A F3(im)72 553.2 Q F2
(Speci\214es XIM structure address.)61 E F3(len)72 568.8 Q F2
(Speci\214es the length of writing data.)58.558 E F3(data)72 584.4 Q F2
(Speci\214es the writing data.)52.442 E(This function writes the)72 606
Q F3(data)2.75 E F2(to the IM Serv)2.75 E(er)-.165 E 2.75(,r)-.44 G
-2.475 -.165(eg a)-2.75 H(rdless of the contents.).165 E
(The number of bytes is)5.5 E(passed to)72 618 Q F3(len)2.75 E F2 2.75
(.T)C(he writing data is passed to)-2.75 E F3(data)2.75 E F2 2.75(.I)C
2.75(fd)-2.75 G(ata is sent successfully)-2.75 E 2.75(,t)-.715 G
(he function returns)-2.75 E -.385(Tr)72 630 S(ue. Refer to "The Input \
Method Protocol" for the contents of the writing data. The Alternati)
.385 E -.165(ve)-.275 G(Entry for this function is:)72 642 Q
(Bool _XimWrite\()72 663.6 Q F3(im)A F2(,)A F3(len)2.75 E F2(,)A F3
(data)2.75 E F2(\))A(XIM)88.5 675.6 Q F3(im)2.75 E F2(;)A(INT16)88.5
687.6 Q F3(len)2.75 E F2(;)A(XPointer)88.5 699.6 Q F3(data)2.75 E F2(;)A
F3(im)72 718.8 Q F2(Speci\214es XIM structure address.)61 E F1(3)285.25
768 Q EP
%%Page: 4 6
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF 531.38(-- --)0 4 R/F1 11/Times-Bold@0 SF(XIM T)
72 52 Q(ransport Speci\214cation)-.814 E(X11, Release 6.4)220.162 E/F2
11/Times-Italic@0 SF(len)72 84 Q/F3 11/Times-Roman@0 SF
(Speci\214es the length of writing data.)58.558 E F2(data)72 99.6 Q F3
(Speci\214es the writing data.)52.442 E F1 2.75(3.4. Reading)72 127.2 R
(data)2.75 E F3(The follo)72 142.8 Q
(wing function is called when Xlib w)-.275 E
(aits for response from IM serv)-.11 E(er synchronously)-.165 E(.)-.715
E(Bool \(*read\)\()72 164.4 Q F2(im)A F3(,)A F2 -.407(re)2.75 G(ad_b)
.407 E(uf)-.22 E F3(,)A F2 -.22(bu)2.75 G(f_len).22 E F3(,)A F2 -.407
(re)2.75 G(t_len).407 E F3(\))A(XIM)88.5 176.4 Q F2(im)2.75 E F3(;)A
(XPointer)88.5 188.4 Q F2 -.407(re)2.75 G(ad_b).407 E(uf)-.22 E F3(;)A
(int)88.5 200.4 Q F2 -.22(bu)2.75 G(f_len).22 E F3(;)A(int)88.5 212.4 Q
F2(*r)2.75 E(et_len)-.407 E F3(;)A F2(im)72 231.6 Q F3
(Speci\214es XIM structure address.)61 E F2 -.407(re)72 247.2 S(ad_b)
.407 E(uf)-.22 E F3(Speci\214es the b)32.906 E(uf)-.22 E
(fer to store data.)-.275 E F2 -.22(bu)72 262.8 S(f_len).22 E F3
(Speci\214es the size of the)39.22 E F2 -.22(bu)2.75 G -.198(ff).22 G
(er).198 E -.407(re)72 278.4 S(t_len).407 E F3
(Speci\214es the length of stored data.)41.244 E
(This function stores the read data in)72 300 Q F2 -.407(re)2.75 G(ad_b)
.407 E(uf)-.22 E F3 2.75(,w)C(hich size is speci\214ed as)-2.75 E F2
-.22(bu)2.75 G(f_len).22 E F3 2.75(.T)C(he size of data)-2.75 E
(is set to)72 312 Q F2 -.407(re)2.75 G(t_len).407 E F3 5.5(.T)C
(his function return T)-5.5 E
(rue, if the data is read normally or reading data is com-)-.385 E
(pleted.)72 324 Q(The Alternati)72 339.6 Q .33 -.165(ve E)-.275 H
(ntry for this function is:).165 E(Bool _XimRead\()72 361.2 Q F2(im)A F3
(,)A F2 -.407(re)2.75 G(t_len).407 E F3(,)A F2 -.22(bu)2.75 G(f).22 E F3
(,)A F2 -.22(bu)2.75 G(f_len).22 E F3(,)A F2(pr)2.75 E(edicate)-.407 E
F3(,)A F2(pr)2.75 E(edicate_ar)-.407 E(g)-.407 E F3(\))A(XIM)88.5 373.2
Q F2(im)2.75 E F3(;)A(INT16)88.5 385.2 Q F2(*r)2.75 E(et_len)-.407 E F3
(;)A(XPointer)88.5 397.2 Q F2 -.22(bu)2.75 G(f).22 E F3(;)A(int)88.5
409.2 Q F2 -.22(bu)2.75 G(f_len).22 E F3(;)A(Bool)88.5 421.2 Q F2(\(*pr)
2.75 E(edicate\)\(\))-.407 E F3(;)A(XPointer)88.5 433.2 Q F2(pr)2.75 E
(edicate_ar)-.407 E(g)-.407 E F3(;)A F2(im)72 452.4 Q F3
(Speci\214es XIM structure address.)61 E F2 -.407(re)72 468 S(t_len).407
E F3(Speci\214es the size of the)41.244 E F2(data)2.75 E F3 -.22(bu)2.75
G -.275(ff).22 G(er).275 E(.)-.605 E F2 -.22(bu)72 483.6 S(f).22 E F3
(Speci\214es the b)58.162 E(uf)-.22 E(fer to store data.)-.275 E F2 -.22
(bu)72 499.2 S(f_len).22 E F3(Speci\214es the length of)39.22 E F2 -.22
(bu)2.75 G -.198(ff).22 G(er).198 E F3(.)A F2(pr)72 514.8 Q(edicate)
-.407 E F3(Speci\214es the predicate for the XIM data.)30.86 E F2(pr)72
530.4 Q(edicate_ar)-.407 E(g)-.407 E F3
(Speci\214es the predicate speci\214c data.)10.488 E
(The predicate procedure indicates whether the)72 552 Q F2(data)2.75 E
F3(is for the XIM or not.)2.75 E F2(len)2.75 E F3(This function stores)
2.75 E(the read data in)72 564 Q F2 -.22(bu)2.75 G(f).22 E F3 2.75(,w)C
(hich size is speci\214ed as)-2.75 E F2 -.22(bu)2.75 G(f_len).22 E F3
2.75(.T)C(he size of data is set to)-2.75 E F2 -.407(re)2.75 G(t_len)
.407 E F3 5.5(.I)C(f)-5.5 E F2(pr)2.75 E(eedi-)-.407 E(cate\(\))72 576 Q
F3(returns T)2.75 E(rue, this function returns T)-.385 E 2.75(rue. If)
-.385 F(not, it calls the re)2.75 E(gistered callback function.)-.165 E
(The procedure and its ar)72 591.6 Q(guments are:)-.198 E
(Bool \(*predicate\)\()72 616.8 Q F2(im)A F3(,)A F2(len)2.75 E F3(,)A F2
(data)2.75 E F3(,)A F2(pr)2.75 E(edicate_ar)-.407 E(g)-.407 E F3(\))A
(XIM)88.5 628.8 Q F2(im)2.75 E F3(;)A(INT16)88.5 640.8 Q F2(len)2.75 E
F3(;)A(XPointer)88.5 652.8 Q F2(data)2.75 E F3(;)A(XPointer)88.5 664.8 Q
F2(pr)2.75 E(edicate_ar)-.407 E(g)-.407 E F3(;)A F2(im)72 684 Q F3
(Speci\214es XIM structure address.)61 E F2(len)72 699.6 Q F3
(Speci\214es the size of the)58.558 E F2(data)2.75 E F3 -.22(bu)2.75 G
-.275(ff).22 G(er).275 E(.)-.605 E F2(data)72 715.2 Q F3
(Speci\214es the b)52.442 E(uf)-.22 E(fer to store data.)-.275 E F1(4)
285.25 768 Q EP
%%Page: 5 7
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF 531.38(-- --)0 4 R/F1 11/Times-Bold@0 SF(XIM T)
72 52 Q(ransport Speci\214cation)-.814 E(X11, Release 6.4)220.162 E/F2
11/Times-Italic@0 SF(pr)72 84 Q(edicate_ar)-.407 E(g)-.407 E/F3 11
/Times-Roman@0 SF(Speci\214es the predicate speci\214c data.)10.488 E F1
2.75(3.5. Flushing)72 111.6 R -.22(bu)2.75 G(ffer).22 E F3(The follo)72
127.2 Q(wing function is called when Xlib needs to \215ush the data.)
-.275 E -.22(vo)72 148.8 S(id \(*\215ush\)\().22 E F2(im)A F3(\))A(XIM)
88.5 160.8 Q F2(im)2.75 E F3(;)A F2(im)72 180 Q F3
(Speci\214es XIM structure address.)61 E
(This function must \215ush the data stored in internal b)72 201.6 Q(uf)
-.22 E(fer on the transport layer)-.275 E 2.75(.I)-.605 G 2.75(fd)-2.75
G(ata transfer is)-2.75 E(completed, the function returns T)72 213.6 Q
2.75(rue. The)-.385 F(Alternati)2.75 E .33 -.165(ve E)-.275 H
(ntry for this function is:).165 E -.22(vo)72 235.2 S(id _XimFlush\().22
E F2(im)A F3(\))A(XIM)88.5 247.2 Q F2(im)2.75 E F3(;)A F2(im)72 266.4 Q
F3(Speci\214es XIM structure address.)61 E F1 2.75(3.6. Registering)72
294 R(asynchr)2.75 E(onous data handler)-.198 E F3
(Xlib needs to handle asynchronous response from IM Serv)72 309.6 Q(er)
-.165 E 2.75(.T)-.605 G(his is because some of the XIM)-2.75 E
(data occur asynchronously to X e)72 321.6 Q -.165(ve)-.275 G(nts.).165
E(Those data will be handled in the)72 337.2 Q F2 -.495(Fi)2.75 G(lter)
.495 E F3 2.75(,a)C(nd the)-2.75 E F2 -.495(Fi)2.75 G(lter).495 E F3
(will call asynchronous data handler in the)2.75 E(protocol layer)72
349.2 Q 2.75(.T)-.605 G(hen it calls dispatchers in the transport layer)
-2.75 E 2.75(.T)-.605 G(he dispatchers are implemented by)-2.75 E
(the protocol layer)72 361.2 Q 2.75(.T)-.605 G(his function must store \
the information and prepare for later call of the dis-)-2.75 E
(patchers using)72 373.2 Q F1(_XimCallDispatcher)2.75 E F3(.)A
(When multiple dispatchers are re)72 388.8 Q(gistered, the)-.165 E 2.75
(yw)-.165 G(ill be called sequentially in order of re)-2.75 E
(gistration,)-.165 E(on arri)72 400.8 Q -.275(va)-.275 G 2.75(lo).275 G
2.75(fa)-2.75 G(synchronous data. The re)-2.75 E
(gister_dispatcher is declared as follo)-.165 E(wing:)-.275 E
(Bool \(*re)72 422.4 Q(gister_dispatcher\)\()-.165 E F2(im)A F3(,)A F2
(dispatc)2.75 E(her)-.165 E F3(,)A F2(call_data)2.75 E F3(\))A(XIM)88.5
434.4 Q F2(im)2.75 E F3(;)A(Bool)88.5 446.4 Q F2(\(*dispatc)2.75 E
(her\)\(\))-.165 E F3(;)A(XPointer)88.5 458.4 Q F2(call_data)2.75 E F3
(;)A F2(im)72 477.6 Q F3(Speci\214es XIM structure address.)61 E F2
(dispatc)72 493.2 Q(her)-.165 E F3
(Speci\214es the dispatcher function to re)25.723 E(gister)-.165 E(.)
-.605 E F2(call_data)72 508.8 Q F3(Speci\214es a parameter for the)
30.442 E F2(dispatc)2.75 E(her)-.165 E F3(.)A
(The dispatcher is a function of the follo)72 524.4 Q(wing type:)-.275 E
(Bool \(*dispatcher\)\()72 546 Q F2(im)A F3(,)A F2(len)2.75 E F3(,)A F2
(data)2.75 E F3(,)A F2(call_data)2.75 E F3(\))A(XIM)88.5 558 Q F2(im)
2.75 E F3(;)A(INT16)88.5 570 Q F2(len)2.75 E F3(;)A(XPointer)88.5 582 Q
F2(data)2.75 E F3(;)A(XPointer)88.5 594 Q F2(call_data)2.75 E F3(;)A F2
(im)72 613.2 Q F3(Speci\214es XIM structure address.)61 E F2(len)72
628.8 Q F3(Speci\214es the size of the)58.558 E F2(data)2.75 E F3 -.22
(bu)2.75 G -.275(ff).22 G(er).275 E(.)-.605 E F2(data)72 644.4 Q F3
(Speci\214es the b)52.442 E(uf)-.22 E(fer to store data.)-.275 E F2
(call_data)72 660 Q F3(Speci\214es a parameter passed to the re)30.442 E
(gister_dispatcher)-.165 E(.)-.605 E(The dispatcher is pro)72 681.6 Q
(vided by the protocol layer)-.165 E 2.75(.T)-.605 G(he)-2.75 E 2.75(ya)
-.165 G(re called once for e)-2.75 E -.165(ve)-.275 G(ry asynchronous)
.165 E(data, in order of re)72 693.6 Q
(gistration. If the data is used, it must return T)-.165 E
(rue. otherwise, it must return)-.385 E -.165(Fa)72 705.6 S(lse.).165 E
F1(5)285.25 768 Q EP
%%Page: 6 8
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF 531.38(-- --)0 4 R/F1 11/Times-Bold@0 SF(XIM T)
72 52 Q(ransport Speci\214cation)-.814 E(X11, Release 6.4)220.162 E/F2
11/Times-Roman@0 SF(If the dispatcher function returns T)72 84 Q
(rue, the T)-.385 E(ransport Layer assume that the data has been pro-)
-.385 E(cessed by the upper layer)72 96 Q 5.5(.T)-.605 G(he Alternati)
-5.5 E .33 -.165(ve E)-.275 H(ntry for this function is:).165 E
(Bool _XimRe)72 117.6 Q(gisterDispatcher\()-.165 E/F3 11/Times-Italic@0
SF(im)A F2(,)A F3(dispatc)2.75 E(her)-.165 E F2(,)A F3(call_data)2.75 E
F2(\))A(XIM)88.5 129.6 Q F3(im)2.75 E F2(;)A(Bool)88.5 141.6 Q F3
(\(*dispatc)2.75 E(her\)\(\))-.165 E F2(;)A(XPointer)88.5 153.6 Q F3
(call_data)2.75 E F2(;)A F3(im)72 172.8 Q F2
(Speci\214es XIM structure address.)61 E F3(dispatc)72 188.4 Q(her)-.165
E F2(Speci\214es the dispatcher function to re)25.723 E(gister)-.165 E
(.)-.605 E F3(call_data)72 204 Q F2(Speci\214es a parameter for the)
30.442 E F3(dispatc)2.75 E(her)-.165 E F2(.)A F1 2.75(3.7. Calling)72
231.6 R(dispatcher)2.75 E F2(The follo)72 247.2 Q
(wing function is used to call the re)-.275 E
(gistered dispatcher function, when the asynchronous)-.165 E
(response from IM Serv)72 259.2 Q(er has arri)-.165 E -.165(ve)-.275 G
(d.).165 E(Bool \(*call_dispatcher\)\()72 280.8 Q F3(im)A F2(,)A F3(len)
2.75 E F2(,)A F3(data)2.75 E F2(\))A(XIM)88.5 292.8 Q F3(im)2.75 E F2(;)
A(INT16)88.5 304.8 Q F3(len)2.75 E F2(;)A(XPointer)88.5 316.8 Q F3(data)
2.75 E F2(;)A F3(im)72 336 Q F2(Speci\214es XIM structure address.)61 E
F3(len)72 351.6 Q F2(Speci\214es the size of)58.558 E F3(data)2.75 E F2
-.22(bu)2.75 G -.275(ff).22 G(er).275 E(.)-.605 E F3(data)72 367.2 Q F2
(Speci\214es the b)52.442 E(uf)-.22 E(fer to store data.)-.275 E(The ca\
ll_dispatcher must call the dispatcher function, in order of their re)72
382.8 Q(gistration.)-.165 E F3(len)2.75 E F2(and)2.75 E F3(data)2.75 E
F2(are the data passed to re)72 394.8 Q(gister_dispatcher)-.165 E(.)
-.605 E(The return v)72 410.4 Q(alues are check)-.275 E(ed at each in)
-.11 E -.22(vo)-.44 G(cation, and if it \214nds T).22 E
(rue, it immediately return with)-.385 E(true for its return v)72 422.4
Q(alue.)-.275 E(It is depend on the upper layer whether the read data i\
s XIM Protocol pack)72 438 Q(et unit or not.)-.11 E(The)5.5 E(Alternati)
72 450 Q .33 -.165(ve E)-.275 H(ntry for this function is:).165 E
(Bool _XimCallDispatcher\()72 471.6 Q F3(im)A F2(,)A F3(len)2.75 E F2(,)
A F3(data)2.75 E F2(\))A(XIM)88.5 483.6 Q F3(im)2.75 E F2(;)A(INT16)88.5
495.6 Q F3(len)2.75 E F2(;)A(XPointer)88.5 507.6 Q F3(call_data)2.75 E
F2(;)A F1(6)285.25 768 Q EP
%%Page: 7 9
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF 531.38(-- --)0 4 R/F1 11/Times-Bold@0 SF(XIM T)
72 52 Q(ransport Speci\214cation)-.814 E(X11, Release 6.4)220.162 E 2.75
(4. Sample)72 84 R(implementations f)2.75 E(or the T)-.275 E
(ransport Lay)-.814 E(er)-.11 E/F2 11/Times-Roman@0 SF(Sample implement\
ations for the transporter using the X connection is described here.)72
99.6 Q F1 2.75(4.1. X)72 127.2 R -.814(Tr)2.75 G(ansport).814 E F2
(At the be)72 142.8 Q(ginning of the X T)-.165 E
(ransport connection for the XIM transport mechanism, tw)-.385 E 2.75
(od)-.11 G(if)-2.75 E(ferent)-.275 E(windo)72 154.8 Q
(ws must be created either in an Xlib XIM or in an IM Serv)-.275 E(er)
-.165 E 2.75(,w)-.44 G(ith which the Xlib and the)-2.75 E(IM Serv)72
166.8 Q(er e)-.165 E
(xchange the XIM transports by using the ClientMessage e)-.165 E -.165
(ve)-.275 G(nts and W).165 E(indo)-.44 E 2.75(wP)-.275 G(roper)-2.75 E
(-)-.22 E 2.75(ties. In)72 178.8 R(the follo)2.75 E(wing, the windo)
-.275 E 2.75(wc)-.275 G
(reated by the Xlib is referred as the "client communication)-2.75 E
(windo)72 190.8 Q(w", and on the other hand, the windo)-.275 E 2.75(wc)
-.275 G(reated by the IM Serv)-2.75 E(er is referred as the "IMS)-.165 E
(communication windo)72 202.8 Q(w".)-.275 E F1 2.75(4.1.1. Connection)72
230.4 R F2(In order to establish a connection, a communication windo)72
246 Q 2.75(wi)-.275 G 2.75(sc)-2.75 G 2.75(reated. A)-2.75 F
(ClientMessage in the)2.75 E(follo)72 258 Q(wing e)-.275 E -.165(ve)
-.275 G(nt').165 E 2.75(sf)-.605 G(ormat is sent to the o)-2.75 E
(wner windo)-.275 E 2.75(wo)-.275 G 2.75(fX)-2.75 G(IM_SER)-2.75 E
(VER selection, which the IM)-.88 E(Serv)72 270 Q(er has created.)-.165
E(Refer to "The Input Method Protocol" for the XIM_SER)72 285.6 Q
(VER atom.)-.88 E -.88(Ta)166.571 301.2 S
(ble 4-1; The ClientMessage sent to the IMS windo).88 E -.715(w.)-.275 G
.44 LW 364.02 311.95 72 311.95 DL F1(Structur)76.5 327.2 Q 2.75(eM)-.198
G 41.052(ember Contents)-2.75 F 364.02 337.95 72 337.95 DL F2 39.303
(int type)76.5 353.2 R(ClientMessage)59.268 E 20.361(u_long serial)76.5
365.2 R(Set by the X W)54.384 E(indo)-.44 E 2.75(wS)-.275 G(ystem)-2.75
E 29.524(Bool send_e)76.5 377.2 R -.165(ve)-.275 G 26.411(nt Set).165 F
(by the X W)2.75 E(indo)-.44 E 2.75(wS)-.275 G(ystem)-2.75 E 16.698
(Display *display)76.5 389.2 R(The display to which connects)40.931 E
-.44(Wi)76.5 401.2 S(ndo).44 E 16.5(ww)-.275 G(indo)-16.5 E 43.043(wI)
-.275 G(MS W)-43.043 E(indo)-.44 E 2.75(wI)-.275 G(D)-2.75 E 25.861
(Atom message_type)76.5 413.2 R(XInternAtom\(display)16.5 E 2.75(,`)
-.715 G(`_XIM_XCONNECT')-3.564 E(', F)-.814 E(alse\))-.165 E 39.303
(int format)76.5 425.2 R(32)48.884 E 31.361(long data.l[0])76.5 437.2 R
(client communication windo)41.25 E 2.75(wI)-.275 G(D)-2.75 E 31.361
(long data.l[1])76.5 449.2 R(client-major)41.25 E(-transport-v)-.22 E
(ersion \(*1\))-.165 E 31.361(long data.l[2])76.5 461.2 R(client-major)
41.25 E(-transport-v)-.22 E(ersion \(*1\))-.165 E 364.02 471.95 72
471.95 DL 200.129 4.75 200.129 471.95 DL
(In order to establish the connection \(to notify the IM Serv)72 490.8 Q
(er communication windo)-.165 E(w\), the IM)-.275 E(Serv)72 502.8 Q
(er sends a ClientMessage in the follo)-.165 E(wing e)-.275 E -.165(ve)
-.275 G(nt').165 E 2.75(sf)-.605 G
(ormat to the client communication win-)-2.75 E(do)72 514.8 Q -.715(w.)
-.275 G -.88(Ta)179.76 530.4 S
(ble 4-2; The ClientMessage sent by IM Serv).88 E(er)-.165 E(.)-.605 E
364.02 541.15 72 541.15 DL F1(Structur)76.5 556.4 Q 2.75(eM)-.198 G
41.052(ember Contents)-2.75 F 364.02 567.15 72 567.15 DL F2 39.303
(int type)76.5 582.4 R(ClientMessage)59.268 E 20.361(u_long serial)76.5
594.4 R(Set by the X W)54.384 E(indo)-.44 E 2.75(wS)-.275 G(ystem)-2.75
E 29.524(Bool send_e)76.5 606.4 R -.165(ve)-.275 G 26.411(nt Set).165 F
(by the X W)2.75 E(indo)-.44 E 2.75(wS)-.275 G(ystem)-2.75 E 16.698
(Display *display)76.5 618.4 R(The display to which connects)40.931 E
-.44(Wi)76.5 630.4 S(ndo).44 E 16.5(ww)-.275 G(indo)-16.5 E 43.043(wc)
-.275 G(lient communication windo)-43.043 E 2.75(wI)-.275 G(D)-2.75 E
25.861(Atom message_type)76.5 642.4 R(XInternAtom\(display)16.5 E 2.75
(,`)-.715 G(`_XIM_XCONNECT')-3.564 E(', F)-.814 E(alse\))-.165 E 39.303
(int format)76.5 654.4 R(32)48.884 E 31.361(long data.l[0])76.5 666.4 R
(IMS communication windo)41.25 E 2.75(wI)-.275 G(D)-2.75 E 31.361
(long data.l[1])76.5 678.4 R(serv)41.25 E(er)-.165 E(-major)-.22 E
(-transport-v)-.22 E(ersion \(*1\))-.165 E 31.361(long data.l[2])76.5
690.4 R(serv)41.25 E(er)-.165 E(-minor)-.22 E(-transport-v)-.22 E
(ersion \(*1\))-.165 E 31.361(long data.l[3])76.5 702.4 R(di)41.25 E
(viding size between ClientMessage and Property \(*2\))-.275 E 364.02
713.15 72 713.15 DL 200.129 4.75 200.129 713.15 DL F1(7)285.25 768 Q EP
%%Page: 8 10
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF 531.38(-- --)0 4 R/F1 11/Times-Bold@0 SF(XIM T)
72 52 Q(ransport Speci\214cation)-.814 E(X11, Release 6.4)220.162 E/F2
11/Times-Roman@0 SF 3.924(\(*1\) major/minor)72 84 R(-transport-v)-.22 E
(ersion)-.165 E
(The read/write method is decided by the combination of major/minor)122
96 Q(-transport-v)-.22 E(er)-.165 E(-)-.22 E(sion, as follo)122 108 Q
(ws:)-.275 E -.88(Ta)141.203 123.6 S
(ble 4-3; The read/write method and the major/minor).88 E(-transport-v)
-.22 E(ersion)-.165 E .44 LW 450.556 134.35 150.444 134.35 DL F1 -.814
(Tr)152.457 149.6 S(ansport-v).814 E 10.262(ersion r)-.11 F(ead/write)
-.198 E 450.556 160.35 150.444 160.35 DL 15.916(major minor)156.876
175.6 R 450.556 186.35 150.444 186.35 DL F2 41.882(00)168.481 201.6 S
(only-CM & Property-with-CM)-12.537 E 29.345(1o)215.863 213.6 S
(nly-CM & multi-CM)-29.345 E 29.345(2o)215.863 225.6 S
(nly-CM & multi-CM & Property-with-CM)-29.345 E 450.556 236.35 150.444
236.35 DL 41.882(10)168.481 251.6 S(PropertyNotify)-12.537 E 450.556
262.35 150.444 262.35 DL 41.882(20)168.481 277.6 S
(only-CM & PropertyNotify)-12.537 E 29.345(1o)215.863 289.6 S
(nly-CM & multi-CM & PropertyNotify)-29.345 E 450.556 300.35 150.444
300.35 DL 450.556 134.35 450.556 300.35 DL 242.458 134.35 242.458 300.35
DL 194.768 160.35 194.768 300.35 DL 150.444 134.35 150.444 300.35 DL
55.297(only-CM :)168.444 325.2 R(data is sent via a ClientMessage)16.5 E
51.623(multi-CM :)168.444 337.2 R
(data is sent via multiple ClientMessages)16.5 E 13.75
(Property-with-CM :)168.444 349.2 R(data is written in Property)286.386
349.2 Q 2.75(,a)-.715 G(nd its Atom)-2.75 E(is send via ClientMessage)
286.386 361.2 Q 29.029(PropertyNotify :)168.444 373.2 R
(data is written in Property)286.386 373.2 Q 2.75(,a)-.715 G
(nd its Atom)-2.75 E(is send via PropertyNotify)286.386 385.2 Q
(The method to decide major/minor)97 406.8 Q(-transport-v)-.22 E
(ersion is as follo)-.165 E(ws:)-.275 E 9.424(\(1\) The)97 426 R
(client sends 0 as major/minor)2.75 E(-transport-v)-.22 E
(ersion to the IM Serv)-.165 E(er)-.165 E 5.5(.T)-.605 G(he client must)
-5.5 E(support all methods in T)122 438 Q(able 4-3.)-.88 E
(The client may send another number as)5.5 E(major/minor)122 450 Q
(-transport-v)-.22 E(ersion to use other method than the abo)-.165 E .33
-.165(ve i)-.165 H 2.75(nt).165 G(he future.)-2.75 E 9.424(\(2\) The)97
465.6 R(IM Serv)2.75 E(er sends its major/minor)-.165 E(-transport-v)
-.22 E(ersion number to the client. The client)-.165 E
(sends data using the method speci\214ed by the IM Serv)122 477.6 Q(er)
-.165 E(.)-.605 E 9.424(\(3\) If)97 493.2 R(major/minor)2.75 E
(-transport-v)-.22 E(ersion number is not a)-.165 E -.275(va)-.22 G
(ilable, it is re).275 E -.055(ga)-.165 G(rded as 0.).055 E 3.924
(\(*2\) di)72 512.4 R(viding size between ClientMessage and Property)
-.275 E(If data is sent via both of multi-CM and Property)122 524.4 Q
2.75(,s)-.715 G(pecify the di)-2.75 E(viding size between)-.275 E
(ClientMessage and Property)122 536.4 Q 2.75(.T)-.715 G
(he data, which is smaller than this size, is sent via)-2.75 E(multi-CM\
\(or only-CM\), and the data, which is lager than this size, is sent v\
ia Prop-)122 548.4 Q(erty)122 560.4 Q(.)-.715 E F1 2.75(4.1.2. r)72 588
R(ead/write)-.198 E F2
(The data is transferred via either ClientMessage or W)72 603.6 Q(indo)
-.44 E 2.75(wP)-.275 G(roperty in the X W)-2.75 E(indo)-.44 E 2.75(wS)
-.275 G(ystem.)-2.75 E F1 2.75(4.1.2.1. F)72 631.2 R(ormat f)-.275 E
(or the data fr)-.275 E(om the Client to the IM Ser)-.198 E -.11(ve)-.11
G(r).11 E(ClientMessage)72 646.8 Q F2
(If data is sent via ClientMessage e)97 662.4 Q -.165(ve)-.275 G
(nt, the format is as follo).165 E(ws:)-.275 E -.88(Ta)165.205 678 S
(ble 4-4; The ClientMessage e).88 E -.165(ve)-.275 G(nt').165 E 2.75(sf)
-.605 G(ormat \(\214rst or middle\))-2.75 E 397.112 688.75 97 688.75 DL
F1(Structur)102.5 704 Q 2.75(eM)-.198 G 41.052(ember Contents)-2.75 F
397.112 714.75 97 714.75 DL 226.129 4.75 226.129 720.75 DL(8)285.25 768
Q EP
%%Page: 9 11
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF 531.38(-- --)0 4 R/F1 11/Times-Bold@0 SF(XIM T)
72 52 Q(ransport Speci\214cation)-.814 E(X11, Release 6.4)220.162 E .44
LW 397.112 76.75 97 76.75 DL(Structur)102.5 92 Q 2.75(eM)-.198 G 41.052
(ember Contents)-2.75 F 397.112 102.75 97 102.75 DL/F2 11/Times-Roman@0
SF 39.303(int type)102.5 118 R(ClientMessage)59.268 E 20.361
(u_long serial)102.5 130 R(Set by the X W)54.384 E(indo)-.44 E 2.75(wS)
-.275 G(ystem)-2.75 E 29.524(Bool send_e)102.5 142 R -.165(ve)-.275 G
26.411(nt Set).165 F(by the X W)2.75 E(indo)-.44 E 2.75(wS)-.275 G
(ystem)-2.75 E 16.698(Display *display)102.5 154 R
(The display to which connects)40.931 E -.44(Wi)102.5 166 S(ndo).44 E
16.5(ww)-.275 G(indo)-16.5 E 43.043(wI)-.275 G(MS communication windo)
-43.043 E 2.75(wI)-.275 G(D)-2.75 E 25.861(Atom message_type)102.5 178 R
(XInternAtom\(display)16.5 E 2.75(,`)-.715 G(`_XIM_MORED)-3.564 E -1.331
-1.221(AT A')-.44 H(', F).407 E(alse\))-.165 E 39.303(int format)102.5
190 R(8)48.884 E 31.988(char data.b[20])102.5 202 R(\(read/write D)
33.308 E -1.331 -1.221(AT A)-.44 H 2.75(:2)3.971 G 2.75(0b)-2.75 G
(yte\))-2.75 E 397.112 212.75 97 212.75 DL 226.129 108.75 226.129 212.75
DL -.88(Ta)171.624 231.6 S(ble 4-5; The ClientMessage e).88 E -.165(ve)
-.275 G(nt').165 E 2.75(sf)-.605 G(ormat \(only or last\))-2.75 E
397.112 242.35 97 242.35 DL F1(Structur)102.5 257.6 Q 2.75(eM)-.198 G
41.052(ember Contents)-2.75 F 397.112 268.35 97 268.35 DL F2 39.303
(int type)102.5 283.6 R(ClientMessage)59.268 E 20.361(u_long serial)
102.5 295.6 R(Set by the X W)54.384 E(indo)-.44 E 2.75(wS)-.275 G(ystem)
-2.75 E 29.524(Bool send_e)102.5 307.6 R -.165(ve)-.275 G 26.411(nt Set)
.165 F(by the X W)2.75 E(indo)-.44 E 2.75(wS)-.275 G(ystem)-2.75 E
16.698(Display *display)102.5 319.6 R(The display to which connects)
40.931 E -.44(Wi)102.5 331.6 S(ndo).44 E 16.5(ww)-.275 G(indo)-16.5 E
43.043(wI)-.275 G(MS communication windo)-43.043 E 2.75(wI)-.275 G(D)
-2.75 E 25.861(Atom message_type)102.5 343.6 R(XInternAtom\(display)16.5
E 2.75(,`)-.715 G(`_XIM_PR)-3.564 E -2.068 -.44(OT O)-.44 H(COL).44 E
-.814('')-1.012 G 2.75(,F).814 G(alse\))-2.915 E 39.303(int format)102.5
355.6 R(8)48.884 E 31.988(char data.b[20])102.5 367.6 R(\(read/write D)
33.308 E -1.331 -1.221(AT A)-.44 H 2.75(:M)3.971 G(AX 20 byte\))-2.75 E
(\(*1\))5.5 E 397.112 378.35 97 378.35 DL 226.129 4.75 226.129 378.35 DL
3.924(\(*1\) If)97 397.2 R
(the data is smaller than 20 byte, all data other than a)2.75 E -.275
(va)-.22 G(ilable data must be 0.).275 E F1(Pr)72 412.8 Q(operty)-.198 E
F2(In the case of lar)97 428.4 Q(ge data, data will be sent via the W)
-.198 E(indo)-.44 E 2.75(wP)-.275 G(roperty for the ef)-2.75 E
(\214cienc)-.275 E 4.18 -.715(y. T)-.165 H(here).715 E(are the follo)97
440.4 Q(wing tw)-.275 E 2.75(om)-.11 G(ethods to notify Property)-2.75 E
2.75(,a)-.715 G(nd transport-v)-2.75 E(ersion is decided which)-.165 E
(method is used.)97 452.4 Q 9.424(\(1\) The)97 471.6 R(XChangeProperty \
function is used to store data in the client communication win-)2.75 E
(do)122 483.6 Q 1.43 -.715(w, a)-.275 H
(nd Atom of the stored data is noti\214ed to the IM Serv).715 E
(er via ClientMessage e)-.165 E -.165(ve)-.275 G(nt.).165 E 9.424
(\(2\) The)97 499.2 R(XChangeProperty function is used to store data in\
the client communication win-)2.75 E(do)122 511.2 Q 1.43 -.715(w, a)
-.275 H(nd Atom of the stored data is noti\214ed to the IM Serv).715 E
(er via PropertyNotify e)-.165 E -.165(ve)-.275 G(nt.).165 E(The ar)97
526.8 Q(guments of the XChangeProperty are as follo)-.198 E(ws:)-.275 E
-.88(Ta)194.388 542.4 S(ble 4-6; The XChangeProperty e).88 E -.165(ve)
-.275 G(nt').165 E 2.75(sf)-.605 G(ormat)-2.75 E 397.112 553.15 97
553.15 DL F1(Ar)102.5 568.4 Q 63.866(gument Contents)-.11 F 397.112
579.15 97 579.15 DL F2 16.698(Display *display)102.5 594.4 R
(The display to which connects)23.826 E -.44(Wi)102.5 606.4 S(ndo).44 E
16.5(ww)-.275 G(indo)-16.5 E 25.938(wI)-.275 G(MS communication windo)
-25.938 E 2.75(wI)-.275 G(D)-2.75 E 25.861(Atom property)102.5 618.4 R
(read/write property Atom \(*1\))23.837 E 25.861(Atom type)102.5 630.4 R
(XA_STRING)42.163 E 39.303(int format)102.5 642.4 R(8)31.779 E 39.303
(int mode)102.5 654.4 R(PropModeAppend)36.663 E 20.988(u_char *data)
102.5 666.4 R(read/write D)37.279 E -1.331 -1.221(AT A)-.44 H 39.303
(int nelements)102.5 678.4 R(length of D)16.5 E -1.331 -1.221(AT A)-.44
H 397.112 689.15 97 689.15 DL 209.024 4.75 209.024 689.15 DL 3.924
(\(*1\) The)97 711.6 R(read/write property A)2.75 E -.198(TO)-1.221 G
2.75(Ma).198 G(llocates the follo)-2.75 E(wing strings by)-.275 E F1
(XInter)2.75 E(nAtom)-.165 E F2(.)A -.814(``)147 723.6 S(_clientXXX')
.814 E(')-.814 E F1(9)285.25 768 Q EP
%%Page: 10 12
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF 531.38(-- --)0 4 R/F1 11/Times-Bold@0 SF(XIM T)
72 52 Q(ransport Speci\214cation)-.814 E(X11, Release 6.4)220.162 E/F2
11/Times-Roman@0 SF(The client changes the property with the mode of Pr\
opModeAppend and the IM Serv)97 84 Q(er will)-.165 E
(read it with the delete mode i.e. \(delete = T)97 96 Q(rue\).)-.385 E
(If Atom is noti\214ed via ClientMessage e)97 111.6 Q -.165(ve)-.275 G
(nt, the format of the ClientMessage is as follo).165 E(ws:)-.275 E -.88
(Ta)144.432 127.2 S(ble 4-7; The ClientMessage e).88 E -.165(ve)-.275 G
(nt').165 E 2.75(sf)-.605 G(ormat to send Atom of property)-2.75 E .44
LW 397.112 137.95 97 137.95 DL F1(Structur)102.5 153.2 Q 2.75(eM)-.198 G
41.052(ember Contents)-2.75 F 397.112 163.95 97 163.95 DL F2 39.303
(int type)102.5 179.2 R(ClientMessage)59.268 E 20.361(u_long serial)
102.5 191.2 R(Set by the X W)54.384 E(indo)-.44 E 2.75(wS)-.275 G(ystem)
-2.75 E 29.524(Bool send_e)102.5 203.2 R -.165(ve)-.275 G 26.411(nt Set)
.165 F(by the X W)2.75 E(indo)-.44 E 2.75(wS)-.275 G(ystem)-2.75 E
16.698(Display *display)102.5 215.2 R(The display to which connects)
40.931 E -.44(Wi)102.5 227.2 S(ndo).44 E 16.5(ww)-.275 G(indo)-16.5 E
43.043(wI)-.275 G(MS communication windo)-43.043 E 2.75(wI)-.275 G(D)
-2.75 E 25.861(Atom message_type)102.5 239.2 R(XInternAtom\(display)16.5
E 2.75(,`)-.715 G(`_XIM_PR)-3.564 E -2.068 -.44(OT O)-.44 H(COL).44 E
-.814('')-1.012 G 2.75(,F).814 G(alse\))-2.915 E 39.303(int format)102.5
251.2 R(32)48.884 E 31.361(long data.l[0])102.5 263.2 R
(length of read/write property Atom)41.25 E 31.361(long data.l[1])102.5
275.2 R(read/write property Atom)41.25 E 397.112 285.95 97 285.95 DL
226.129 4.75 226.129 285.95 DL F1 2.75(4.1.2.2. F)72 316.8 R(ormat f)
-.275 E(or the data fr)-.275 E(om the IM Ser)-.198 E -.11(ve)-.11 G 2.75
(rt).11 G 2.75(ot)-2.75 G(he Client)-2.75 E(ClientMessage)72 332.4 Q F2
(The format of the ClientMessage is as follo)97 348 Q(ws:)-.275 E -.88
(Ta)165.205 363.6 S(ble 4-8; The ClientMessage e).88 E -.165(ve)-.275 G
(nt').165 E 2.75(sf)-.605 G(ormat \(\214rst or middle\))-2.75 E 397.112
374.35 97 374.35 DL F1(Structur)102.5 389.6 Q 2.75(eM)-.198 G 41.052
(ember Contents)-2.75 F 397.112 400.35 97 400.35 DL F2 39.303(int type)
102.5 415.6 R(ClientMessage)59.268 E 20.361(u_long serial)102.5 427.6 R
(Set by the X W)54.384 E(indo)-.44 E 2.75(wS)-.275 G(ystem)-2.75 E
29.524(Bool send_e)102.5 439.6 R -.165(ve)-.275 G 26.411(nt Set).165 F
(by the X W)2.75 E(indo)-.44 E 2.75(wS)-.275 G(ystem)-2.75 E 16.698
(Display *display)102.5 451.6 R(The display to which connects)40.931 E
-.44(Wi)102.5 463.6 S(ndo).44 E 16.5(ww)-.275 G(indo)-16.5 E 43.043(wc)
-.275 G(lient communication windo)-43.043 E 2.75(wI)-.275 G(D)-2.75 E
25.861(Atom message_type)102.5 475.6 R(XInternAtom\(display)16.5 E 2.75
(,`)-.715 G(`_XIM_MORED)-3.564 E -1.331 -1.221(AT A')-.44 H(', F).407 E
(alse\))-.165 E 39.303(int format)102.5 487.6 R(8)48.884 E 31.988
(char data.b[20])102.5 499.6 R(\(read/write D)33.308 E -1.331 -1.221
(AT A)-.44 H 2.75(:2)3.971 G 2.75(0b)-2.75 G(yte\))-2.75 E 397.112
510.35 97 510.35 DL 226.129 4.75 226.129 510.35 DL -.88(Ta)171.624 529.2
S(ble 4-9; The ClientMessage e).88 E -.165(ve)-.275 G(nt').165 E 2.75
(sf)-.605 G(ormat \(only or last\))-2.75 E 397.112 539.95 97 539.95 DL
F1(Structur)102.5 555.2 Q 2.75(eM)-.198 G 41.052(ember Contents)-2.75 F
397.112 565.95 97 565.95 DL F2 39.303(int type)102.5 581.2 R
(ClientMessage)59.268 E 20.361(u_long serial)102.5 593.2 R
(Set by the X W)54.384 E(indo)-.44 E 2.75(wS)-.275 G(ystem)-2.75 E
29.524(Bool send_e)102.5 605.2 R -.165(ve)-.275 G 26.411(nt Set).165 F
(by the X W)2.75 E(indo)-.44 E 2.75(wS)-.275 G(ystem)-2.75 E 16.698
(Display *display)102.5 617.2 R(The display to which connects)40.931 E
-.44(Wi)102.5 629.2 S(ndo).44 E 16.5(ww)-.275 G(indo)-16.5 E 43.043(wc)
-.275 G(lient communication windo)-43.043 E 2.75(wI)-.275 G(D)-2.75 E
25.861(Atom message_type)102.5 641.2 R(XInternAtom\(display)16.5 E 2.75
(,`)-.715 G(`_XIM_PR)-3.564 E -2.068 -.44(OT O)-.44 H(COL).44 E -.814
('')-1.012 G 2.75(,F).814 G(alse\))-2.915 E 39.303(int format)102.5
653.2 R(8)48.884 E 31.988(char data.b[20])102.5 665.2 R(\(read/write D)
33.308 E -1.331 -1.221(AT A)-.44 H 2.75(:M)3.971 G(AX 20 byte\) \(*1\))
-2.75 E 397.112 675.95 97 675.95 DL 226.129 4.75 226.129 675.95 DL 3.924
(\(*1\) If)97 698.4 R
(the data size is smaller than 20 bytes, all data other than a)2.75 E
-.275(va)-.22 G(ilable data must be 0.).275 E F1(Pr)72 714 Q(operty)
-.198 E(10)282.5 768 Q EP
%%Page: 11 13
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF 531.38(-- --)0 4 R/F1 11/Times-Bold@0 SF(XIM T)
72 52 Q(ransport Speci\214cation)-.814 E(X11, Release 6.4)220.162 E/F2
11/Times-Roman@0 SF(In the case of lar)97 84 Q
(ge data, data will be sent via the W)-.198 E(indo)-.44 E 2.75(wP)-.275
G(roperty for the ef)-2.75 E(\214cienc)-.275 E 1.43 -.715(y. T)-.165 H
(here).715 E(are the follo)97 96 Q(wing tw)-.275 E 2.75(om)-.11 G
(ethods to notify Property)-2.75 E 2.75(,a)-.715 G(nd transport-v)-2.75
E(ersion is decided which)-.165 E(method is used.)97 108 Q 9.424
(\(1\) The)97 127.2 R(XChangeProperty function is used to store data in\
the IMS communication win-)2.75 E(do)122 139.2 Q 1.43 -.715(w, a)-.275
H(nd Atom of the property is sent via the ClientMessage e).715 E -.165
(ve)-.275 G(nt.).165 E 9.424(\(2\) The)97 154.8 R(XChangeProperty funct\
ion is used to store data in the IMS communication win-)2.75 E(do)122
166.8 Q 1.43 -.715(w, a)-.275 H
(nd Atom of the property is sent via PropertyNotify e).715 E -.165(ve)
-.275 G(nt.).165 E(The ar)97 182.4 Q
(guments of the XChangeProperty are as follo)-.198 E(ws:)-.275 E -.88
(Ta)191.638 198 S(ble 4-10; The XChangeProperty e).88 E -.165(ve)-.275 G
(nt').165 E 2.75(sf)-.605 G(ormat)-2.75 E .44 LW 397.112 208.75 97
208.75 DL F1(Ar)102.5 224 Q 63.866(gument Contents)-.11 F 397.112 234.75
97 234.75 DL F2 16.698(Display *display)102.5 250 R
(The display which to connects)23.826 E -.44(Wi)102.5 262 S(ndo).44 E
16.5(ww)-.275 G(indo)-16.5 E 25.938(wc)-.275 G
(lient communication windo)-25.938 E 2.75(wI)-.275 G(D)-2.75 E 25.861
(Atom property)102.5 274 R(read/write property Atom \(*1\))23.837 E
25.861(Atom type)102.5 286 R(XA_STRING)42.163 E 39.303(int format)102.5
298 R(8)31.779 E 39.303(int mode)102.5 310 R(PropModeAppend)36.663 E
20.988(u_char *data)102.5 322 R(read/write D)37.279 E -1.331 -1.221
(AT A)-.44 H 39.303(int nelements)102.5 334 R(length of D)16.5 E -1.331
-1.221(AT A)-.44 H 397.112 344.75 97 344.75 DL 209.024 4.75 209.024
344.75 DL 3.924(\(*1\) The)97 367.2 R(read/write property A)2.75 E -.198
(TO)-1.221 G 2.75(Ma).198 G
(llocates some strings, which are not allocated by the)-2.75 E
(client, by)122 379.2 Q F1(XInter)2.75 E(nAtom)-.165 E F2(.)A
(The IM Serv)97 394.8 Q
(er changes the property with the mode of PropModeAppend and the client)
-.165 E(reads it with the delete mode, i.e. \(delete = T)97 406.8 Q
(rue\).)-.385 E(If Atom is noti\214ed via ClientMessage e)97 422.4 Q
-.165(ve)-.275 G(nt, the format of the ClientMessage is as follo).165 E
(ws:)-.275 E -.88(Ta)141.682 438 S(ble 4-11; The ClientMessage e).88 E
-.165(ve)-.275 G(nt').165 E 2.75(sf)-.605 G
(ormat to send Atom of property)-2.75 E 397.112 448.75 97 448.75 DL F1
(Structur)102.5 464 Q 2.75(eM)-.198 G 41.052(ember Contents)-2.75 F
397.112 474.75 97 474.75 DL F2 39.303(int type)102.5 490 R
(ClientMessage)59.268 E 20.361(u_long serial)102.5 502 R(Set by the X W)
54.384 E(indo)-.44 E 2.75(wS)-.275 G(ystem)-2.75 E 29.524(Bool send_e)
102.5 514 R -.165(ve)-.275 G 26.411(nt Set).165 F(by the X W)2.75 E
(indo)-.44 E 2.75(wS)-.275 G(ystem)-2.75 E 16.698(Display *display)102.5
526 R(The display to which connects)40.931 E -.44(Wi)102.5 538 S(ndo).44
E 16.5(ww)-.275 G(indo)-16.5 E 43.043(wc)-.275 G
(lient communication windo)-43.043 E 2.75(wI)-.275 G(D)-2.75 E 25.861
(Atom message_type)102.5 550 R(XInternAtom\(display)16.5 E 2.75(,`)-.715
G(`_XIM_PR)-3.564 E -2.068 -.44(OT O)-.44 H(COL).44 E -.814('')-1.012 G
2.75(,F).814 G(alse\))-2.915 E 39.303(int format)102.5 562 R(32)48.884 E
31.361(long data.l[0])102.5 574 R(length of read/write property A)41.25
E -.198(TO)-1.221 G(M).198 E 31.361(long data.l[1])102.5 586 R
(read/write property A)41.25 E -.198(TO)-1.221 G(M).198 E 397.112 596.75
97 596.75 DL 226.129 4.75 226.129 596.75 DL F1 2.75(4.1.3. Closing)72
627.6 R(Connection)2.75 E F2(If the client disconnect with the IM Serv)
72 643.2 Q(er)-.165 E 2.75(,s)-.44 G(hutdo)-2.75 E
(wn function should free the communication)-.275 E(windo)72 655.2 Q 2.75
(wp)-.275 G(roperties and etc..)-2.75 E F1 2.75(5. Refer)72 682.8 R
(ences)-.198 E F2([1] Masahik)72 698.4 Q 2.75(oN)-.11 G
(arita and Hideki Hiura,)-2.75 E/F3 11/Times-Italic@0 SF -1.221(``)2.75
G(The Input Method Pr)1.221 E(otocol')-.495 E(')-1.221 E F1(11)282.5 768
Q F0 531.38(-- --)0 795 R EP
%%Trailer
end
%%EOF
XmHTML-1.1.10/docs/PaxHeaders.1031/lang.map 0000644 0001750 0000144 00000000132 12613377377 016162 x ustar 00 0000000 0000000 30 mtime=1445854975.085545877
30 atime=1445854975.085545877
30 ctime=1445854975.085545877
XmHTML-1.1.10/docs/lang.map 0000644 0001750 0000144 00000014426 12613377377 015571 0 ustar 00chris users 0000000 0000000
XmHTML-1.1.10/docs/PaxHeaders.1031/REASONS 0000644 0001750 0000144 00000000132 12613377377 015577 x ustar 00 0000000 0000000 30 mtime=1445854975.084545878
30 atime=1445854975.084545878
30 ctime=1445854975.084545878
XmHTML-1.1.10/docs/REASONS 0000644 0001750 0000144 00000007774 12613377377 015216 0 ustar 00chris users 0000000 0000000 [The following describes my reasons for giving out XmHTML for free]
Thanh Ma (tma@encore.com) wrote:
>
> Thanks for the reply. Here is another (dumb ?) question.
> I know there are quite a few commercial html widgets/help-apps out there,
> why yours is not ? Or because the motivation for writing these packages is to
> 'give out' ?-)
>
That's a good question. I can think of a bunch of reasons, starting
from idealism to ``let's make a better world'' ;-).
The idea for creating the HTML widget originated when I started
to read NCSA's distribution policy quite carefully, and I decided
it is a completely ridiculous policy (you might have read that on
the XntHelp pages somewhere). And NCSA's HTML widget is a rather
resource hungry one (not that all of NCSA's is bad, they have done and are
doing some pretty nifty pioneering). So I decided (IMHO ;-) that I
could do it better. I'm hoping that I can make that true. But
that doesn't really answer your question.
Let me sum up some of my reasons:
- First of all, the habit of giving out programs for ``free'' is
historical in the Unix world. It is one of the reasons what has
made Unix what it is today. And I would like to see it grow more
in the future.
- Second, I have seen a number of commercial programs which are
just too expensive for what they offer, and often I wonder how
these companies are able to get away with this. One of the answers
is that there is no competition (or not fierce enough), or that
these companies are soo damn big that they _can_ get away with
it. By giving out my own applications for free (but copyrighted),
I can offer users/programmers a cheap, but high quality, alternative.
And maybe some day this will be noticed by companies, persuading them
to pay more attention to the quality and price of their own
applications. (I now sounds a whee bit naive ;-)
- Third, (and this is a big reason), I am a huge Unix fan, and I
hate m$ for what they have done with Win95. They make it seem like
they have invented the wheel, while the truth is that what they want
win95 to be has since long existed under the name Unix. This
is something I have to live with. Now, one of the ways to persuade
people to switch over to Unix is to offer an OS that is easy to
use (easy adminstration tools), has a number of usefull applications
(including a desktop environment, word processor, spreadsheet and
a consistent help) and is cheap. (you might want to check the eXode
homepage: http://www.linux-kheops.com/line/html/exodeenglish.html).
Currently, the cheap OS is named Linux (or FreeBSD), and there are a number
of people busy with all of the above. And XntHelp is an application that
fits right in.
- Fourth, there is a small part in me that wants people to notice me and
my company. Writing and distributing quality programs for free might
persuade people and/or companies to do business with us.
- Fifth, the reason that I have choosen the LGPL/GPL is that
[the LGPL/GPL] is a license which cleary states what you can and can't
do with the library/application. The copyright is mine, other people
can modify it as much as they want (but must make that clear), and
it can be used in commercial programs (although no fee may be asked
for my library/application). Also, the LGPL/GPL are an almost standard
as it comes the Linux (and the FSF for that matter).
I think the above fairly well describes my reasons for giving out
my programs for ``free''.
Friendly Greetings,
Koen D'Hondt.
--
----------------------------------------------------------------------
_/_/_/_/ _/_/_/_/ _/_/_/_/
_/ _/ _/ _/ _/ Ripley Software Development
_/ _/ _/ _/ _/ Roland Holstlaan 229
_/_/_/_/ _/_/_/_/ _/ _/ 2624 HG Delft, The Netherlands
_/ _/ _/ _/ _/ mailto:ripley@xs4all.nl
_/ _/ _/ _/ _/ http://www.xs4all.nl/~ripley
_/ _/_/_/_/_/ _/_/_/_/ tel: (++31) (0) 15 2567785
----------------------------------------------------------------------
XmHTML-1.1.10/PaxHeaders.1031/book 0000644 0001750 0000144 00000000132 12613377377 014467 x ustar 00 0000000 0000000 30 mtime=1445854975.080545878
30 atime=1445854991.787545578
30 ctime=1445854975.080545878
XmHTML-1.1.10/book/ 0000755 0001750 0000144 00000000000 12613377377 014144 5 ustar 00chris users 0000000 0000000 XmHTML-1.1.10/book/PaxHeaders.1031/forced_html.c 0000644 0001750 0000144 00000000132 12613377377 017176 x ustar 00 0000000 0000000 30 mtime=1445854975.080545878
30 atime=1445854975.080545878
30 ctime=1445854975.080545878
XmHTML-1.1.10/book/forced_html.c 0000644 0001750 0000144 00000001255 12613377377 016601 0 ustar 00chris users 0000000 0000000 /* forced_html.c -- Force the display of the vertical scrollbar */
#include
int
main(int argc, char **argv)
{
Widget toplevel;
XtAppContext app;
toplevel = XtVaAppInitialize(&app, "Demos", NULL, 0,
&argc, argv, NULL, NULL);
/* create a XmHTML widget but this time we specify a size */
XtVaCreateManagedWidget("html", xmHTMLWidgetClass, toplevel,
XmNvalue, "A minimally configured "
"XmHTML widget.",
XmNwidth, 200,
XmNheight, 75,
XmNscrollBarDisplayPolicy, XmSTATIC,
XmNscrollBarPlacement, XmTOP_LEFT,
XmNmarginWidth, 5,
XmNmarginHeight, 5,
NULL);
XtRealizeWidget(toplevel);
XtAppMainLoop(app);
return(0);
}
XmHTML-1.1.10/book/PaxHeaders.1031/simple_html.c 0000644 0001750 0000144 00000000132 12613377377 017225 x ustar 00 0000000 0000000 30 mtime=1445854975.080545878
30 atime=1445854975.080545878
30 ctime=1445854975.080545878
XmHTML-1.1.10/book/simple_html.c 0000644 0001750 0000144 00000000726 12613377377 016632 0 ustar 00chris users 0000000 0000000 /* simple_html.c -- Create a minimally configured XmHTML widget */
#include
int
main(int argc, char **argv)
{
Widget toplevel;
XtAppContext app;
toplevel = XtVaAppInitialize(&app, "Demos", NULL, 0,
&argc, argv, NULL, NULL);
XtVaCreateManagedWidget("html", xmHTMLWidgetClass, toplevel,
XmNvalue, "A minimally configured XmHTML widget."
"",
NULL);
XtRealizeWidget(toplevel);
XtAppMainLoop(app);
return(0);
}
XmHTML-1.1.10/book/PaxHeaders.1031/html.c 0000644 0001750 0000144 00000000132 12613377377 015654 x ustar 00 0000000 0000000 30 mtime=1445854975.080545878
30 atime=1445854975.080545878
30 ctime=1445854975.080545878
XmHTML-1.1.10/book/html.c 0000644 0001750 0000144 00000001062 12613377377 015253 0 ustar 00chris users 0000000 0000000 /* simple_html.c -- Create a minimally configured XmHTML widget */
#include
int
main(int argc, char **argv)
{
Widget toplevel, html;
XtAppContext app;
toplevel = XtVaAppInitialize(&app, "Demos", NULL, 0,
&argc, argv, NULL, NULL);
html = XmCreateHTML(toplevel, "html", NULL, 0);
/* All widgets returned by any XmCreateXXX function is unmanaged */
XtManageChild(html);
XmHTMLTextSetString(html, "A minimally configured XmHTML "
"widget.");
XtRealizeWidget(toplevel);
XtAppMainLoop(app);
return(0);
}
XmHTML-1.1.10/book/PaxHeaders.1031/autosize_html.c 0000644 0001750 0000144 00000000132 12613377377 017577 x ustar 00 0000000 0000000 30 mtime=1445854975.080545878
30 atime=1445854975.080545878
30 ctime=1445854975.080545878
XmHTML-1.1.10/book/autosize_html.c 0000644 0001750 0000144 00000002574 12613377377 017207 0 ustar 00chris users 0000000 0000000 /* autosize_html.c -- Demonstrate the autosizing feature of a XmHTML widget */
#include
int
main(int argc, char **argv)
{
Widget toplevel;
XtAppContext app;
toplevel = XtVaAppInitialize(&app, "Demos", NULL, 0,
&argc, argv, NULL, NULL);
/* make sure we may resize ourselves */
XtVaSetValues(toplevel, XmNallowShellResize, True, NULL);
/* create a XmHTML widget but this time enable autosizing */
XtVaCreateManagedWidget("html", xmHTMLWidgetClass, toplevel,
XmNvalue,
/* "An AutoSizing XmHTML widget.", */
""
"Sat Sep 21 22:00:02 UTC 1996 * Yeltsin had heart attack during Russian elections. * Doctor says surgery may be too dangerous. * Ghost of Papandreou hovers over Greek elections. * Israeli planes hit suspected guerrilla targets in Lebanon. * Tensions heating up in southern Lebanon. * India's former prime minister resigns as party chief. * Coalition parties mull successor. * Army manuals appear to condone human rights abuse. * VMI accepts women, ends 157-year school policy. * Clinton bans same-sex marriages. * Olympic bomb probe focuses on 12-volt battery. * Justice Department to probe CIA drug-peddling charges."
" ",
XmNresizeWidth, True,
XmNresizeHeight, True,
XmNmarginWidth, 1,
XmNmarginHeight, 1,
NULL);
XtRealizeWidget(toplevel);
XtAppMainLoop(app);
return(0);
}
XmHTML-1.1.10/book/PaxHeaders.1031/work_window.c 0000644 0001750 0000144 00000000132 12613377377 017261 x ustar 00 0000000 0000000 30 mtime=1445854975.081545878
30 atime=1445854975.080545878
30 ctime=1445854975.081545878
XmHTML-1.1.10/book/work_window.c 0000644 0001750 0000144 00000004307 12613377377 016665 0 ustar 00chris users 0000000 0000000 /*
* work_window.c: attaching an event handler to the work_window of a XmHTML
* widget.
*/
#include
void
attachInfoHandler(Widget html, Widget popup)
{
Widget work_window;
XtVaGetValues(html, XmNworkWindow, &work_window, NULL);
/*
* Add an event handler which responds to mouse clicks. "popup" is the
* popup menu which is to be displayed, it is stored as client_data
* for the event handler.
*/
XtAddEventHandler(work_window, ButtonPressMark, 0,
(XtEventHandler)infoHandler, popup);
}
void
infoHandler(Widget work_window, Widget popup, XButtonPressedEvent *event)
{
XmHTMLInfoPtr info;
Widget html_w;
WidgetList children;
/* we only take events generated by button 3 */
if(event->button != 3)
return;
/*
* The work_window is a child of a XmHTML widget, so we can get a handle
* to the XmHTML widget itself by using Xt's XtParent routine.
*/
html_w = XtParent(work_window);
/* get the info for the selected position. */
info = XmHTMLXYToInfo(html_w, event->x, event->y);
/*
* Check the returned info structure. There will be nothing to display
* if the pointer wasn't over an image or anchor when the mouse was
* clicked.
*/
if(info == NULL || (info->image == NULL && info->anchor == NULL))
return;
/*
* For this example we assume that the popup menu has two buttons:
* a hyperlink button and an image button. We retrieve these children
* of the popup menu using the XmNchildren resource of Motif's
* rowColumn widget.
*/
XtVaGetValues(popup, XmNchildren, &children, NULL);
/* check if the info structure has an anchor */
if(info->anchor)
{
XmString label;
label = XmStringCreateLocalized(info->anchor->href);
XtVaSetValues(children[0], XmNlabelString, label, NULL);
XmStringFree(label);
XtManageChild(children[0]);
}
else
XtUnmanageChild(children[0]);
/* check if the info structure has an image */
if(info->image)
{
XmString label;
label = XmStringCreateLocalized(info->image->url);
XtVaSetValues(children[1], XmNlabelString, label, NULL);
XmStringFree(label);
XtManageChild(children[1]);
}
else
XtUnmanageChild(children[1]);
/* the "popup" menu has now been configured, pop it up */
XmMenuPosition(popup, event);
XtManageChild(popup);
}
XmHTML-1.1.10/book/PaxHeaders.1031/Imakefile 0000644 0001750 0000144 00000000132 12613377377 016355 x ustar 00 0000000 0000000 30 mtime=1445854975.080545878
30 atime=1445854975.080545878
30 ctime=1445854975.080545878
XmHTML-1.1.10/book/Imakefile 0000644 0001750 0000144 00000003522 12613377377 015757 0 ustar 00chris users 0000000 0000000 #error The Imakefile is broken, please use the plain Makefiles
#if 0
XCOMM
XCOMM Imakefile for XmHTML book examples
XCOMM
XCOMM (C)Copyright 1995-1997 Ripley Software Development
XCOMM All Rights Reserved
XCOMM
XCOMM This file is part of the XmHTML Widget Library.
XCOMM
XCOMM See the file LICENSE for the full copyright statement.
XCOMM
XCOMM Include the XmHTML configuration file
#include "../XmHTML.cf"
XCOMM On some systems, imake automatically includes Motif.tmpl, on others
XCOMM it doesn't.
XCOMM
#ifndef MotifDefines
#include
#endif
XCOMM
XCOMM Use DebugLibXmHTML if it exists, else use static lib.
XCOMM
#if DebugLibXmHTML
XMHTMLLIB = $(BUILDINCTOP)/src/libXmHTML_d.a
#else
#if SharedLibXmHTML
XMHTMLLIB = -L$(BUILDINCTOP)/src -lXmHTML
#else
XMHTMLLIB = $(BUILDINCTOP)/src/libXmHTML.a
#endif
#endif
XCOMM INCLUDES = -I$(BUILDINCTOP)/src $(DMALLOCINC)
DEPLIBS = $(DEPXMLIB) $(DEPXTOOLLIB) $(DEPXLIB)
XCOMM required libraries
LOCAL_LIBRARIES = $(XMHTMLLIB) $(XMLIB) $(XTOOLLIB) $(XLIB) $(DMALLOCLIB)
SRCS = simple_html.c simple_html2.c autosize_html.c forced_html.c html.c
OBJS1 = simple_html.o
OBJS2 = simple_html2.o
OBJS3 = autosize_html.o
OBJS4 = forced_html.o
OBJS5 = html.o
AllTarget(simple_html simple_html2 autosize_html forced_html html)
NormalProgramTarget(simple_html,$(OBJS1),$(DEPLIB),$(LOCAL_LIBRARIES),)
NormalProgramTarget(simple_html2,$(OBJS2),$(DEPLIB),$(LOCAL_LIBRARIES),)
NormalProgramTarget(autosize_html,$(OBJS3),$(DEPLIB),$(LOCAL_LIBRARIES),)
NormalProgramTarget(forced_html,$(OBJS4),$(DEPLIB),$(LOCAL_LIBRARIES),)
NormalProgramTarget(html,$(OBJS5),$(DEPLIB),$(LOCAL_LIBRARIES),)
DependTarget()
XCOMM
XCOMM Special rules for creating a distribution with the barebone makefiles
XCOMM
distclean:: clean
$(RM) core *.out make.world *.bak *.last *.auto stamp-includes
$(CP) Makefile.org Makefile
#endif
XmHTML-1.1.10/book/PaxHeaders.1031/simple_html2.c 0000644 0001750 0000144 00000000132 12613377377 017307 x ustar 00 0000000 0000000 30 mtime=1445854975.080545878
30 atime=1445854975.080545878
30 ctime=1445854975.080545878
XmHTML-1.1.10/book/simple_html2.c 0000644 0001750 0000144 00000001103 12613377377 016702 0 ustar 00chris users 0000000 0000000 /* simple_html2.c -- Create another minimally configured XmHTML widget */
#include
int
main(int argc, char **argv)
{
Widget toplevel;
XtAppContext app;
toplevel = XtVaAppInitialize(&app, "Demos", NULL, 0,
&argc, argv, NULL, NULL);
/* create a XmHTML widget but this time we specify a size */
XtVaCreateManagedWidget("html", xmHTMLWidgetClass, toplevel,
XmNvalue, "Another minimally configured XmHTML "
"widget.",
XmNwidth, 200,
XmNheight, 75,
NULL);
XtRealizeWidget(toplevel);
XtAppMainLoop(app);
return(0);
}
XmHTML-1.1.10/book/PaxHeaders.1031/html_browser.c 0000644 0001750 0000144 00000000132 12613377377 017417 x ustar 00 0000000 0000000 30 mtime=1445854975.080545878
30 atime=1445854975.080545878
30 ctime=1445854975.080545878
XmHTML-1.1.10/book/html_browser.c 0000644 0001750 0000144 00000021370 12613377377 017022 0 ustar 00chris users 0000000 0000000
/*
* html_browser.c -- use a XmHTMLText widget to view the contents
* of arbitrary HTML files choosen by the user from a fileSelection
* dialog or by following hyperlinks in a document.
*/
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
/* you might have to include for strcasecmp() proto */
static void readFile(Widget html, String file);
static void fileCB(Widget item, int item_no);
static void fileOkCB(Widget w, Widget html,
XmFileSelectionBoxCallbackStruct *cbs);
static void anchorCB(Widget html, XtPointer data, XmHTMLAnchorPtr cbs);
static String mimeType(String filename, FILE *file);
int
main(int argc, char **argv)
{
Widget top, mainw, menubar, menu, html;
XtAppContext context;
XmString file, new, quit;
/* initialize toolkit and create toplevel shell */
top = XtVaAppInitialize(&context, "HTMLDemos", NULL, 0,
&argc, argv, NULL, NULL);
/* mainwindow for the application */
mainw = XtVaCreateManagedWidget("mainw",
xmMainWindowWidgetClass, top,
NULL);
/* Create a simple MenuBar that contains one menu */
file = XmStringCreateSimple("File");
menubar = XmVaCreateSimpleMenuBar(mainw, "menubar",
XmVaCASCADEBUTTON, file, 'F',
NULL);
XmStringFree(file);
/* menu is "File", callback is fileCB() */
new = XmStringCreateSimple("Open...");
quit = XmStringCreateSimple("Quit");
menu = XmVaCreateSimplePulldownMenu(menubar, "fileMenu", 0,
(XtCallbackProc)fileCB,
XmVaPUSHBUTTON, new, 'O', NULL, NULL,
XmVaSEPARATOR,
XmVaPUSHBUTTON, quit, 'Q', NULL, NULL,
NULL);
XmStringFree(new);
XmStringFree(quit);
/* Menubar is done, manage it */
XtManageChild(menubar);
/* Create a simple XmHTML widget */
html = XtVaCreateManagedWidget("html",
xmHTMLWidgetClass, mainw,
XmNwidth, 400,
XmNheight, 600,
NULL);
/* add a callback to respond to anchor activation */
XtAddCallback(html, XmNactivateCallback,
(XtCallbackProc)anchorCB, NULL);
/* store html as userdata in "File" menu for fileCB() callback */
XtVaSetValues(menu, XmNuserData, html, NULL);
XtManageChild(html);
XmMainWindowSetAreas(mainw, menubar, NULL, NULL, NULL, html);
XtRealizeWidget(top);
XtAppMainLoop(context);
/* never reached but keeps compiler happy */
return(EXIT_SUCCESS);
}
/* The "File" menu was selected, popup a file selection */
static void
fileCB(Widget item, int item_no)
{
static Widget dialog;
Widget html;
if(item_no == 1)
exit(0); /* user choose Quit */
if(!dialog)
{
Widget menu = XtParent(item);
dialog = XmCreateFileSelectionDialog(menu, "fileSB", NULL, 0);
/* get the html widget handle stored as userdata in file menu */
XtVaGetValues(menu, XmNuserData, &html, NULL);
XtAddCallback(dialog, XmNokCallback,
(XtCallbackProc)fileOkCB, html);
XtAddCallback(dialog, XmNcancelCallback,
(XtCallbackProc)XtUnmanageChild, NULL);
}
XtManageChild(dialog);
XtPopup(XtParent(dialog), XtGrabNone);
/* call XMapRaised to make sure it's visible */
XMapRaised(XtDisplay(dialog), XtWindow(XtParent(dialog)));
}
/*
* Callback routine when the user selects Ok in the fileSelectionDialog.
* The name of the file to load is passed to the routine that will do
* the actual loading.
*/
static void
fileOkCB(Widget w, Widget html, XmFileSelectionBoxCallbackStruct *cbs)
{
char *filename;
XmStringGetLtoR(cbs->value, XmSTRING_DEFAULT_CHARSET, &filename);
if(!filename || *filename == '\0')
{
/* nothing typed? */
if(filename)
XtFree(filename);
return;
}
/* pass to readFile */
readFile(html, filename);
/* all done */
XtFree(filename);
}
/*
* Read the given file, determine the mime (= content) type and set
* the contents of the file in the HTML widget.
*/
static void
readFile(Widget html, String filename)
{
struct stat statbuf;
String text;
FILE *file;
String mime;
int retval;
/* make sure the file is a regular file and open it */
if((retval = stat(filename, &statbuf)) == -1 ||
(statbuf.st_mode & S_IFMT) != S_IFREG)
{
if(retval == -1)
perror(filename); /* couldn't open */
else
fprintf(stderr, "%s: not a regular file\n", filename);
return;
}
/* open the file and determine it's content type */
if(!(file = fopen(filename, "r")) || !(mime = mimeType(filename, file)))
{
perror(filename); /* couldn't read */
fclose(file);
}
if(!strcmp(mime, "image/"))
{
/* An image was selected */
/* we do not need the file but the name of the file */
fclose(file);
/*
* Set the name of the image to load as the value. XmHTML will
* perform the loading of the image if necessary.
*/
XtVaSetValues(html,
XmNmimeType, mime,
XmNvalue, filename,
NULL);
return;
}
/* A true HTML or a plain text file. Read and set */
if(!(text = XtMalloc((unsigned int)(statbuf.st_size+1))))
{
fclose(file);
fprintf(stderr, "Could not load %s: malloc failed for %li bytes\n",
filename, (unsigned long)statbuf.st_size+1);
return;
}
/* file was opened, read it */
if(!fread(text, sizeof(char), statbuf.st_size + 1, file))
fprintf(stderr, "Warning: %s: may not have read entire file!\n",
filename);
fclose(file);
/* NULL terminate */
text[statbuf.st_size] = '\0';
/* insert contents in the HTML widget */
XtVaSetValues(html,
XmNmimeType, mime,
XmNvalue, text,
NULL);
XtFree(text);
}
/*
* Determine if the given file is a HTML file or an image that XmHTML
* recognizes.
*/
static String
mimeType(String filename, FILE *file)
{
String chPtr;
char buf[128];
unsigned char img_type;
/* check if there is a . in the filename somewhere */
if((chPtr = strstr(filename, ".")) != NULL)
{
String start;
/*
* check if this was a html file or not. We start at the end of
* the given filename and walk to the front. We don't use the
* return value from strstr() since the dot may have occured in a
* pathname.
*/
for(start = &filename[strlen(filename)-1];
*start != '.' && *start != '/' ; start--)
{
/* any of these extensions are considered HTML files by default */
if(!strcasecmp(start, ".html") || !strcasecmp(start, ".htm"))
return("text/html");
}
}
/*
* No or a non-matching extension. Read the first line and see if it's
* an image or if this file contains HTML.
*/
if(!(chPtr = fgets(buf, 128, file)))
return(NULL);
if((img_type = XmHTMLImageGetType(filename, buf, 128)) == IMAGE_ERROR)
return(NULL);
else if(img_type == IMAGE_UNKNOWN)
{
/*
* Image type not known by XmHTML or not an image.
* Check if it contains HTML.
*/
/* walk to the first < */
for(chPtr = buf; *chPtr != '\0' && *chPtr != '<'; chPtr++);
/* No < found, assume plain text */
if(*chPtr == '\0')
return("text/plain");
if(!strncasecmp(chPtr, "reason != XmCR_ACTIVATE)
return;
switch(cbs->url_type)
{
case ANCHOR_JUMP:
/*
* A named anchor was selected, See if it is a valid one */
if(XmHTMLAnchorGetId(html, cbs->href) != -1)
{
/*
* Tell the widget it must scroll the selected hyperlink
* into view and have it render all references to it as
* visited.
*/
cbs->doit = True;
cbs->visited = True;
return;
}
cbs->doit = False;
return;
case ANCHOR_FILE_LOCAL:
case ANCHOR_FILE_REMOTE:
{
String chPtr;
/* Reference to a remote file */
if((chPtr = strstr(cbs->href, "file:")) != NULL)
{
/*
* For the following cases, the file is local:
* file:/some/path -- no host
* file:///some/path -- null host
* file://localhost/some/path -- localhost
*/
/* skip the "file:" marker */
chPtr += 5;
if(!strcmp(chPtr, "///"))
chPtr += 3;
else if(!strcmp(chPtr, "//localhost"))
chPtr += 11;
else if(*chPtr != '/')
{
fprintf(stderr, "%s: unsupported hyperlink type\n",
cbs->href);
return;
}
}
else
chPtr = cbs->href;
/* read and load the file */
readFile(html, chPtr);
}
break;
default:
fprintf(stderr, "%s: unsupported hyperlink type\n", cbs->href);
}
}
XmHTML-1.1.10/book/PaxHeaders.1031/Makefile 0000644 0001750 0000144 00000000132 12613377377 016204 x ustar 00 0000000 0000000 30 mtime=1445854975.080545878
30 atime=1445854975.080545878
30 ctime=1445854975.080545878
XmHTML-1.1.10/book/Makefile 0000644 0001750 0000144 00000003405 12613377377 015606 0 ustar 00chris users 0000000 0000000
# List of sources
SRCS = simple_html.c simple_html2.c autosize_html.c forced_html.c html.c \
html_browser.c
# List of object files
OBJS = simple_html.o simple_html2.o autosize_html.o forced_html.o html.o \
html_browser.o
# Targets to make
EXAMPLES=simple_html simple_html2 autosize_html forced_html html html_browser
# The library
XMHTMLINC= -I../lib
XMHTMLLIB= -L../lib -lXmHTML
LINKLIBS = $(XMHTMLLIB) $(LOADLIBES) $(DMALLOCLIB)
# rule to create .o files from .c files
.c.o:
$(RM) $@
$(CC) $(CFLAGS) $(CPPFLAGS) $(XMHTMLINC) $(INCLUDES) -c $<
all: $(EXAMPLES)
# targets to build
simple_html:: ../src/libXmHTML.a simple_html.o
$(RM) $@ \
$(CC) -o $@ $(LDFLAGS) simple_html.o $(LINKLIBS)
simple_html2:: ../src/libXmHTML.a simple_html2.o
$(RM) $@ \
$(CC) -o $@ $(LDFLAGS) simple_html2.o $(LINKLIBS)
autosize_html:: ../src/libXmHTML.a autosize_html.o
$(RM) $@ \
$(CC) -o $@ $(LDFLAGS) autosize_html.o $(LINKLIBS)
forced_html:: ../src/libXmHTML.a forced_html.o
$(RM) $@ \
$(CC) -o $@ $(LDFLAGS) forced_html.o $(LINKLIBS)
html:: ../src/libXmHTML.a html.o
$(RM) $@ \
$(CC) -o $@ $(LDFLAGS) html.o $(LINKLIBS)
html_browser:: ../src/libXmHTML.a html_browser.o
$(RM) $@ \
$(CC) -o $@ $(LDFLAGS) html_browser.o $(LINKLIBS)
.PHONY: ../src/libXmHTML.a
depend:: $(SRCS)
$(MAKEDEPEND) $(XMHTMLINC) $(INCLUDES) $(CPPFLAGS) $(SRCS)
.PHONY: stamp-includes
includes:: stamp-includes
clean::
$(RM) $(OBJS)
$(RM) $(EXAMPLES)
distclean:: clean
$(RM) core *.out *.log make.world *.bak *.last *.auto *.rej *.orig
#$(CP) Makefile.org Makefile
#--------------------------------------------------------------------------
# don't delete anything below this line, makedepend depends on it
#--------------------------------------------------------------------------
XmHTML-1.1.10/PaxHeaders.1031/TODO 0000644 0001750 0000144 00000000132 12613377377 014302 x ustar 00 0000000 0000000 30 mtime=1445854975.079545878
30 atime=1445854975.079545878
30 ctime=1445854975.079545878
XmHTML-1.1.10/TODO 0000644 0001750 0000144 00000005361 12613377377 013707 0 ustar 00chris users 0000000 0000000 List of things to do some time in the future.
Gtk Port
--------
- lots of stuff. Compile hasn't been tested, widget interface might be
out of date, convenience functions should be updated, a whole lot of
things need to be done here!
Layout Engine
-------------
- improve table layout. Basics are good, trouble arises with the
cellpadding & cellspacing attributes. Offsets are computed and set
incorrectly.
- add support for and HTML elements [table];
- prevent border around the element [table];
- vertical alignment of cell content [table];
- compute correct height of nested tables;
- full text flow around images;
- colspan attributes is not always treated correctly: spanned cells
are sometimes too wide.
Paint Engine
------------
-