Main Page   Modules   Compound List   File List   Compound Members   File Members  

st.h

Go to the documentation of this file.
00001 /*
00002  * Copyright 2002 Sun Microsystems, Inc.
00003  * All rights reserved.
00004  *
00005  * Redistribution and use in source and binary forms, with or without
00006  * modification, are permitted provided that the following conditions
00007  * are met:
00008  *
00009  * 1. Redistributions of source code must retain the above copyright
00010  *    notice, this list of conditions and the following disclaimer.
00011  *
00012  * 2. Redistributions in binary form must reproduce the above copyright
00013  *    notice, this list of conditions and the following disclaimer in the
00014  *    documentation and/or other materials provided with the distribution.
00015  *
00016  * 3. Neither the name of Sun Microsystems, Inc. nor the names of 
00017  *    contributors may be used to endorse or promote products derived from
00018  *    this software without specific prior written permission.
00019  *
00020  * This software is provided "AS IS," without a warranty of any kind.
00021  *
00022  * ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
00023  * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
00024  * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED.
00025  * SUN AND ITS LICENSORS SHALL NOT BE LIABLE FOR ANY DAMAGES OR
00026  * LIABILITIES SUFFERED BY LICENSEE AS A RESULT OF OR RELATING TO USE,
00027  * MODIFICATION OR DISTRIBUTION OF THE SOFTWARE OR ITS DERIVATIVES.
00028  * IN NO EVENT WILL SUN OR ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE,
00029  * PROFIT OR DATA, OR FOR DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL,
00030  * INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE
00031  * THEORY OF LIABILITY, ARISING OUT OF THE USE OF OR INABILITY TO USE
00032  * SOFTWARE, EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
00033  *
00034  * You acknowledge that this software is not designed, licensed or intended
00035  * for use in the design, construction, operation or maintenance of any
00036  * nuclear facility.
00037  *
00038  */
00039 
00040 /* $Id$ */
00041 /* @(#)st.h 1.77 02/12/20 SMI */
00042 
00050 #ifndef __ST_H
00051 #define __ST_H
00052 
00053 #include "sttypes.h"
00054 
00055 #define STSF_VERSION_MAJOR  0
00056 #define STSF_VERSION_MINOR  4
00057 #define STSF_VERSION_UPDATE 0
00058 
00059 
00060 
00061 
00062 /*
00063  * XXX TODO:
00064  * DONE   Tracking
00065  * DONE   STText objects containing glyphs rather than characters
00066  *          (perhaps by using special styles)
00067  *        Documentation: add general programming principles - the
00068  *           caller is responsible for freeing everything
00069  *        Documentation: create a glossary of terms (platform, etc.)
00070  * DONE   Add an API for setting/getting the default font ???
00071  *    Add a "last resource" fonts
00072  *        Add an API: find scalers for features
00073  *        Consider adding an API: STDevice constructor with the Init() callback
00074  */
00075 
00076 /*
00077  * Coordinate system units conventions
00078  * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
00079  *
00080  *  There are three different coordinate systems ST uses:
00081  *
00082  *  1. User space
00083  *  2. Device space
00084  *  3. Font design space
00085  *
00086  * To translate from user space to device space you multiply your
00087  * affine transformation matrix by your user space point:
00088  *
00089  * |xx xy tx|   |x|
00090  * |yx yy ty| * |y|
00091  * |0  0  1 |   |1|
00092  *
00093  * That gives you a set of equations:
00094  *
00095  * x' = xx * x + xy * y + tx
00096  * y' = yx * x + yy * y + ty
00097  *
00098  *
00099  * Units of the user space coordinate system are typographic points.
00100  * 1 point = 1/72 inch.
00101  *
00102  * Units of the device coordinate system are device-specific and are
00103  * not defined by ST. That means that in general each device
00104  * might have its initial transformation matrix different from the unity
00105  * matrix.
00106  *
00107  * Font design space units are abstract units used for measuring
00108  * unscaled glyphs. In order to convert them to something useful
00109  * in either user space or device space you need to scale them,
00110  * using the following formula:
00111  *
00112  * scaled user-space units in points = (pointSize / 1000) * design units
00113  * scaled user-space units in inches = (pointSize / 72 points per inch) * (design units/1000)
00114  *
00115  * In order to translate them to device space you will need to apply your transformation matrix.
00116  *
00117  * All units are represented as floating-point numbers
00118  *
00119  * Here is a very simple rule to figure out what coordinate system does a function use:
00120  *
00121  * All STFont*() functions use font design space
00122  * All ST functions that contain STDevice in their list of arguments use device space
00123  * All other ST functions use user space
00124  */
00125 
00126 
00127 /*
00128  *        Type Environment members
00129  *        ~~~~~~~~~~~~~~~~~~~~~~~~
00130  */
00131 
00145 STStatus STTypeEnvNew(STTypeEnv *oEnv);
00146 
00156 STStatus STTypeEnvNewCopy(STTypeEnv *oEnv,
00157                           STTypeEnv iOldEnv);
00158 
00166 STStatus STTypeEnvDispose(STTypeEnv iEnv);
00167 
00176 STStatus STTypeEnvSetFontFallbackPolicy(STTypeEnv iEnv,
00177                                         STFontFallbackPolicy iPolicy);
00178 
00187 STStatus STTypeEnvGetFontFallbackPolicy(STTypeEnv iEnv,
00188                                         STFontFallbackPolicy *oPolicy);
00189 
00190 
00202 STStatus STTypeEnvSetFontFallbacks(STTypeEnv iEnv,
00203                                    STCount iFontCount,
00204                                    STFont *iFontArray);
00205 
00216 STStatus STTypeEnvGetFontFallbacks(STTypeEnv iEnv,
00217                                    STCount *oFontCount,
00218                                    STFont **oFontArray);
00219 
00220 
00238 STStatus STTypeEnvFindFont(STTypeEnv iEnv,
00239                            const utf16 *iName,
00240                            int iNameLength,
00241                            uint16 iNameID,
00242                            STFont *oFont);
00243 
00266 STStatus STTypeEnvFindAllFonts(STTypeEnv iEnv,
00267                                const utf16 *iName,
00268                                int iNameLength,
00269                                uint16 iNameID,
00270                                STCount *oFontCount,
00271                                STFont **oFont);
00272 
00273 
00296 STStatus STTypeEnvFindFontByPlatformName(STTypeEnv iEnv,
00297                                          const byte *iName,
00298                                          int iNameLength,
00299                                          uint16 iPlatformID,
00300                                          uint16 iEncodingID,
00301                                          uint16 iLanguageID,
00302                                          uint16 iNameID,
00303                                          STFont *oFont);
00304 
00330 STStatus STTypeEnvFindAllFontsByPlatformName(STTypeEnv iEnv,
00331                                              const byte *iName,
00332                                              int iNameLength,
00333                                              uint16 iPlatformID,
00334                                              uint16 iEncodingID,
00335                                              uint16 iLanguageID,
00336                                              uint16 iNameID,
00337                                              STCount *oFontCount,
00338                                              STFont **oFont);
00339 
00340 STStatus STTypeEnvFindFontsByURL(STTypeEnv iEnv,
00341                                  const char *iURL,
00342                                  STCount *oFontCount,
00343                                  STFont **oFont);
00344     
00357 STStatus STTypeEnvCreateFont(STTypeEnv iEnv,
00358                              STCount iDataCount,
00359                              byte **iData,
00360                              size_t *iDataLength,
00361                              STCount *oFontCount,
00362                              STFont **oFont);
00376 STStatus STTypeEnvDestroyFont(STTypeEnv iEnv,
00377                               STFont iFont);
00378 
00379 STStatus STTypeEnvCreateFontFromURL(STTypeEnv iEnv,
00380                                     STCount iURLCount,
00381                                     char **iURL,
00382                                     STCount *oFontCount,
00383                                     STFont **oFont);
00384                                     
00385 
00395 STStatus STTypeEnvFindAllScalers(STTypeEnv iEnv,
00396                                  STCount *oScalerCount,
00397                                  STScaler **oScalerArray);
00398 
00399 
00412 STStatus STTypeEnvFindScaler(STTypeEnv iEnv,
00413                              STTag iTag,
00414                              STScaler *oScaler);
00415 
00428 STStatus STTypeEnvFindAllLayoutEngines(STTypeEnv iEnv,
00429                                        STCount *oLECount,
00430                                        STLayoutEngine **oLEArray);
00431 
00432 
00442 STStatus STTypeEnvFindLayoutEngine(STTypeEnv iEnv,
00443                                    STTag iTag,
00444                                    STLayoutEngine *oLayoutEngine);
00445 
00446 
00447 
00448 
00457 STStatus STTypeEnvSetLocations(STTypeEnv iEnv,
00458                                STFontLocationsMask iMask);
00459 
00468 STStatus STTypeEnvGetLocations(STTypeEnv iEnv,
00469                                STFontLocationsMask *oMask);
00470 
00471 
00485 STStatus STTypeEnvSetFontFolders(STTypeEnv iEnv,
00486                                  STCount iFolderCount,
00487                                  char **iFolders);
00488 
00501 STStatus STTypeEnvGetFontFolders(STTypeEnv iEnv,
00502                                  STCount *oFolderCount,
00503                                  char ***oFolders);
00504 
00528 STStatus STScalerGetInfo(STTypeEnv iEnv,
00529                          STScaler iScaler,
00530                          STTag *oTag,
00531                          uint32 *oVersion,
00532                          const char **oShortName,
00533                          const char **oLongName,
00534                          const char **oNotice,
00535                          STScalerFlags *oSFlags,
00536                          STFontServerFontMask *oFFlags);
00537 
00552 STStatus STLayoutEngineGetInfo(STTypeEnv iEnv,
00553                                STLayoutEngine iLayoutEngine,
00554                                STTag *oTag,
00555                                uint32 *oVersion,
00556                                const char **oShortName,
00557                                const char **oLongName,
00558                                const char **oNotice,
00559                                STLayoutEngineFlags *oLEFlags);
00560 
00566 /*
00567  * Font methods.
00568  * They require a type environment object as their first argument.
00569  */
00570 
00587 STStatus STFontGetNameTags(STTypeEnv iEnv,
00588                            STFont iFont,
00589                            STCount *oNameCount,
00590                            STNameTagPtr *oNameTags);
00591 
00604 STStatus STFontGetNameString(STTypeEnv iEnv,
00605                              STFont iFont,
00606                              STNameTagPtr iNameTag,
00607                              int *oStringLength,
00608                              byte **oStringData);
00609 
00626 STStatus STFontGetUnicodeName(STTypeEnv iEnv,
00627                               STFont iFont,
00628                               uint16 iNameID,
00629                               STLanguage *ioLanguage,
00630                               STCharCount *oCharCount,
00631                               utf16 **oStringData);
00632 
00642 STStatus STFontGetType(STTypeEnv iEnv,
00643                        STFont iFont,
00644                        STFontType *oFontType);
00645 
00655  STStatus STFontGetURL(STTypeEnv iEnv,
00656                       STFont iFont,
00657                       char **oFontURL);
00658 
00659 /* XXX add an API for retrieving table names and sizes...
00660  *     possibly add an offset...
00661  */
00662 STStatus STFontGetData(STTypeEnv iEnv,
00663                        STFont iFont,
00664                        STTag iTable,
00665                        STCount *oByteCount,
00666                        byte **oRawData);
00667                              
00668 
00689 STStatus STFontGetExtInfo(STTypeEnv iEnv,
00690                           STFont iFont,
00691                           const char **oFontName,
00692                           const char **oPSName,
00693                           STFontServerFontType *oType,
00694                           STFontInfoFlags *oFlags,
00695                           int *oSbitCount,
00696                           int **oSbitArray,
00697                           STFontMetrics *oFontMetrics
00698                          );
00699 
00711 STStatus STFontGetBaselines(STTypeEnv iEnv,
00712                             STFont iFont,
00713                             STBaselines *oBaselines);
00714 
00732 STStatus STFontGetFeatures(STTypeEnv iEnv,
00733                            STFont iFont,
00734                            STCount *oFeatureCount,
00735                            STFontFeatureTag **oFeatureArray);
00736 
00758 STStatus STTypeEnvFindFontFamily(STTypeEnv iEnv,
00759                                  const utf16 *iName,
00760                                  STCharCount iNameLength,
00761                                  STLanguage *ioLanguage,
00762                                  STFontFamily *oFontFamily);
00763 
00782 STStatus STTypeEnvFindAllFontFamilies(STTypeEnv iEnv,
00783                                       STCount *oFontFamilyCount,
00784                                       STFontFamily **oFontFamily);
00785 
00786 /*
00787  * Enumerate all fonts that a member of a font family and
00788  * return their IDs.
00789  *
00790  * @param iEnv                a type environment object
00791  * @param iFontFamily         a font family ID
00792  * @param oFontCount          returns the number of fonts in the font family
00793  * @param oFontArray          returns an array of  font IDs of the member fonts
00794  *
00795  * @return STStatus
00796  *
00797  */
00798 STStatus STFontFamilyGetFonts(STTypeEnv iEnv,
00799                               STFontFamily iFontFamily,
00800                               STCount *oFontCount,
00801                               STFont **oFontArray);
00802 
00803 /*
00804  * Return a Unicode font family name for a specified language.
00805  *
00806  * @param iEnv                a type environment object
00807  * @param iFontFamily         a font family ID
00808  * @param ioLanguage          requested language. If STSF does not find the requested
00809  *                            language and substitutes it with a different language,
00810  *                            the new language is stored here
00811  * @param oCharCount          number of characters in the name
00812  * @param oStringData         UTF-16 name of the font family
00813  *
00814  * @return STError
00815  */
00816 STStatus STFontFamilyGetName(STTypeEnv iEnv,
00817                              STFontFamily iFontFamily,
00818                              STLanguage *ioLanguage,
00819                              STCharCount *oCharCount,
00820                              utf16 **oStringData);
00821 /*
00822  * Returns a font family that the font belongs to.
00823  * Each font belongs to only one font family.
00824  * To query font family name of the font call
00825  * STFontFamilyGetName() after retrieving the font family
00826  * of the font with this function.
00827  *
00828  * @param iEnv                a type environment object
00829  * @param iFont               a font ID
00830  * @param oFontFamily         the font family iFont belongs to is stored here
00831  *
00832  * @return STError
00833  */
00834 STStatus STFontGetFontFamily(STTypeEnv iEnv,
00835                              STFont iFont,
00836                              STFontFamily *oFontFamily);
00837 
00838 /*
00839  * Returns a typeface name and classification of the font.
00840  * The typeface name  is always relative to the font family
00841  * the font belongs to.
00842  *
00843  * For example, in a "Times New Roman" font family
00844  * there are four typefaces "Regular", "Italic",
00845  * "Bold", and "Bold Italic". That's what this function returns.
00846  *
00847  * STFontGetNameString() will return "Times New Roman" for the
00848  * font that this function returns "Regular"
00849  *
00850  * Some of all output parameters (oStringData, oWidth, oWeight, oStyle)
00851  * can be NULL pointers.
00852  *
00853  * @param iEnv                a type environment object
00854  * @param iFont               a font ID
00855  * @param ioLanguage          requested language. If STSF does not find the requested
00856  *                            language and substitutes it with a different language,
00857  *                            the new language is stored here
00858  * @param oCharCount          number of characters in the name
00859  * @param oStringData         UTF-16 name of the typeface
00860  * @param oWeight             font weight
00861  * @param oWidth              font width 
00862  * @param oStyle              font style
00863  *
00864  * @return STError
00865  */
00866  
00867 STStatus STFontGetTypefaceName(STTypeEnv iEnv,
00868                                STFont iFont,
00869                                STLanguage *ioLanguage,
00870                                STCharCount *oCharCount,
00871                                utf16 **oStringData,
00872                                STFontWeightClass *oWeight,
00873                                STFontWidthClass *oWidth,
00874                                STFontStyle *oStyle
00875                               );
00876 
00881 /*
00882  * STGraphics & STDevice methods
00883  */
00884 
00896 STStatus STGraphicsNewEmpty(STGraphics *oGraphics);
00897 
00921 STStatus STGraphicsNew(STGraphics *oGraphics,
00922                STGraphicsMask iMask,
00923                        STDevice iDevice,
00924                        STOutputMode iOutputMode,
00925                        STRGBAColor iTextFG,                 
00926                        STRGBAColor iHighlightFG,
00927                        STRGBAColor iHighlightBG,
00928                        STRGBAColor iStrikeThrough,
00929                        STRGBAColor iHLStrikeThrough,
00930                        STRGBAColor iUnderline1,
00931                        STRGBAColor iHLUnderline1,
00932                        STRGBAColor iUnderline2,
00933                        STRGBAColor iHLUnderline2);
00934 
00943 STStatus STGraphicsNewCopy(STGraphics *oGraphics,
00944                            STGraphics iOldGraphics);
00945 
00953 STStatus STGraphicsDispose(STGraphics iGraphics);
00954 
00964 STStatus STGraphicsSetDevice(STGraphics iGraphics,
00965                               STDevice iDevice,
00966                               STOutputMode iOutputMode);
00976 STStatus STGraphicsGetDevice(STGraphics iGraphics,
00977                              STDevice *oDevice,
00978                              STOutputMode *oOutputMode);
00979 
00999 STStatus STGraphicsSetColors(STGraphics iGraphics,
01000                              STGraphicsMask iMask,
01001                              STRGBAColor iTextFG,
01002                              STRGBAColor iHighLightFG,
01003                              STRGBAColor iHighLightBG,
01004                              STRGBAColor iStrikeThrough,
01005                              STRGBAColor iHLStrikeThrough,
01006                              STRGBAColor iUnderline1,
01007                              STRGBAColor iHLUnderline1,
01008                              STRGBAColor iUnderline2,
01009                              STRGBAColor iHLUnderline2);
01010 
01011 
01032 STStatus STGraphicsGetColors(STGraphics iGraphics,
01033                              STGraphicsMask *oMask,
01034                              STRGBAColor *oTextFG,
01035                              STRGBAColor *oHighLightFG,
01036                              STRGBAColor *oHighLightBG,
01037                              STRGBAColor *oStrikeThrough,
01038                              STRGBAColor *oHLStrikeThrough,
01039                              STRGBAColor *oUnderline1,
01040                              STRGBAColor *oHLUnderline1,
01041                              STRGBAColor *oUnderline2,
01042                              STRGBAColor *oHLUnderline2);
01043 
01052 STStatus STDeviceGetMatrix(STDevice iDevice,
01053                            STMatrix *oMatrix);
01062 STStatus STDeviceSetMatrix(STDevice iDevice,
01063                            STMatrix iMatrix);
01064 
01073 STStatus STDeviceConcatMatrix(STDevice iDevice,
01074                               STMatrix iMatrix);
01075 
01085 STStatus STDeviceTranslate(STDevice iDevice,
01086                            double tx,
01087                            double ty);
01097 STStatus STDeviceScale(STDevice iDevice,
01098                        double sx,
01099                        double sy);
01100 
01109 STStatus STDeviceRotate(STDevice iDevice,
01110                         double theta);
01111 
01121 STStatus STDeviceShear(STDevice iDevice,
01122                        double shx,
01123                        double shy);
01124 
01127 /*
01128  *  Style
01129  */
01130 
01145 STStatus STStyleNewEmpty(STStyle *oStyle,
01146                          STTypeEnv iEnv);
01147                          
01156 STStatus STStyleNewDefault(STStyle *oStyle,
01157                            STTypeEnv iEnv);
01158                          
01159 
01168 STStatus STStyleNewCopy(STStyle *oNewStyle,
01169                         STStyle iOldStyle);
01170                         
01171 
01179 STStatus STStyleDispose(STStyle iStyle);
01180 
01191 STStatus STStyleCompare(STStyle iLhs,
01192                         STStyleMask iMask,
01193                         STStyle iRhs,
01194                         STStyleComparison *oResult);
01195 
01204 STStatus STStyleIsEmpty(STStyle iStyle,
01205                         STBoolean *oResult);
01206 
01216 STStatus STStyleClear(STStyle iStyle,
01217               STStyleMask iMask);
01218 
01227 STStatus STStyleSerialize(STStyle iStyle,
01228                           int iFileDes);
01229 
01239 STStatus STStyleDeserialize(STStyle *oStyle,
01240                             int iFileDes);
01241                             
01242 
01243 
01263 STStatus STStyleSetFont(STStyle iStyle,
01264                         STStyleMask iMask,
01265                         STFont iFont,
01266                         double iSize,
01267                         STLanguage iLanguage,
01268                         STBaselineFlag iBaseline);
01269 
01288 STStatus STStyleGetFont(STStyle iStyle,
01289                         STStyleMask *oMask,
01290                         STFont *oFont,
01291             double *oSize,
01292                         STLanguage *oLanguage,
01293                         STBaselineFlag *oBaseline);
01294 
01306 STStatus STStyleSetScaler(STStyle iStyle,
01307                           STStyleMask iMask,
01308                           STScaler iScaler,
01309                           STHintingMode iHints,
01310                           STSbitsMode iSbits);
01311 
01312 
01328 STStatus STStyleGetScaler(STStyle iStyle,
01329                           STStyleMask *oMask,
01330                           STScaler *oScaler,
01331                           STHintingMode *oHints,
01332                           STSbitsMode *oSbits);
01333 
01345 STStatus STStyleSetLayoutEngine(STStyle iStyle,
01346                                 STStyleMask iMask,
01347                                 STLayoutEngine iLayoutEngine);
01348 
01358 STStatus STStyleGetLayoutEngine(STStyle iStyle,
01359                                 STStyleMask *oMask,
01360                                 STLayoutEngine *oLayoutEngine);
01361 
01362 
01376 STStatus STStyleScalerControl(STStyle iStyle,
01377                               void *iToScaler,
01378                               STSize iToByteCount,
01379                               void **oFromScaler,
01380                               STSize *oFromByteCount);
01381 
01382                             
01400 STStatus STStyleSetEffects(STStyle iStyle,
01401                            STStyleMask iMask,
01402                            STStyleEffects iStyleEffects,
01403                            STStrikeThrough iStrikeThrough,
01404                            STUnderline iUnderline);
01405 
01425 STStatus STStyleSetOptions(STStyle iStyle,
01426                            STStyleMask iMask,
01427                            int iImposeWidth,
01428                            int iBeforeWithStreamShift,
01429                            int iAfterWithStreamShift,
01430                            int iCrossStreamShift,
01431                            int iHangingInhibitFactor,
01432                            int iKerningInhibitFactor,
01433                            int iDecompositionInhibitFactor);
01434 
01455 STStatus STStyleGetOptions(STStyle iStyle,
01456                            STStyleMask *oMask,
01457                            int *oImposeWidth,
01458                            int *oBeforeWithStreamShift,
01459                            int *oAfterWithStreamShift,
01460                            int *oCrossStreamShift,
01461                            int *oTracking,
01462                            int *oHangingInhibitFactor,
01463                            int *oKerningInhibitFactor,
01464                            int *oDecompositionInhibitFactor);
01465 
01484 STStatus STStyleGetEffects(STStyle iStyle,
01485                            STStyleMask *oMask,
01486                            STStyleEffects *oStyleEffects,
01487                            STStrikeThrough *oStrikeThrough,
01488                            STUnderline *oUnderline);
01489 
01490 
01491 
01501 STStatus STStyleResetAttributes(STStyle iStyle,
01502                                 STStyleMask iMask);
01503 
01516 STStatus STStyleCopyAttributes(STStyle iToStyle,
01517                                STStyleMask iMask,
01518                                STStyle iFromStyle);
01519 
01531 STStatus STStyleOverwriteAttributes(STStyle iToStyle,
01532                                     STStyleMask iMask,
01533                                     STStyle iFromStyle);
01534 
01546 STStatus STStyleUnderwriteAttributes(STStyle iToStyle,
01547                                      STStyleMask iMask,
01548                                      STStyle iFromStyle);
01549 
01550 
01563 STStatus STStyleGetBaselines(STStyle iStyle,
01564                              STBaselineFlag iBaseline,
01565                              STBaselines *oBaselines);
01566 
01575 STStatus STStyleGetDesignMetrics(STStyle iStyle,
01576                                  STLineMetrics *oMetrics);
01577 
01585 STStatus STStyleSetPrivateData(STStyle iStyle,
01586                                STPointer iData);
01587 
01595 STStatus STStyleGetPrivateData(STStyle iStyle,
01596                                STPointer *oData);
01600 /*
01601  *        Text object
01602  */
01603 
01639 STStatus STTextNewEmpty(STText *oText,
01640                         STTypeEnv iEnv);
01641 
01650 STStatus STTextNew(STText *oText,
01651                    STTypeEnv iEnv,
01652                    utf16 *iChars,
01653                    STCharCount iCharCount);
01654 
01662 STStatus STTextNewCopy(STText *oText,
01663                        STText iOldText);
01664 
01671 STStatus STTextDispose(STText iText);
01672 
01682 STStatus STTextSerialize(STText iText,
01683                          int iFileDes);
01684 
01694 STStatus STTextDeserialize(STText *oText,
01695                            int iFileDes);
01696 
01707 STStatus STTextClear(STText iText);
01708 
01709 
01724 STStatus STTextSetMetrics(STText iText,
01725                           STExtLineMetrics *iLineMetrics,
01726                           STBaselines *iBaselines);
01727 
01740 STStatus STTextGetMetrics(STText iText,
01741                           STExtLineMetrics **oLineMetrics,
01742                           STBaselines **oBaselines);
01743 
01761 STStatus STTextSetControls(STText iText,
01762                            STTextMask iMask,
01763                            STDirection iDirection,
01764                            STJustification iJustification,
01765                            STFlushFactor iFlushFactor,
01766                            STLanguage iLanguage,
01767                            STFontFallbackPolicy iPolicy,
01768                            STLayoutOptions iLayoutOptions
01769                           );
01770 
01788 STStatus STTextGetControls(STText iText,
01789                            STTextMask *oMask,
01790                            STDirection *oDirection,
01791                            STJustification *oJustification,
01792                            STFlushFactor *oFlushFactor,
01793                            STLanguage *oLanguage,
01794                            STFontFallbackPolicy *oPolicy,
01795                            STLayoutOptions *oLayoutOptions);
01796 
01810 STStatus STTextSetFontFallbacks(STText iText,
01811                                 STCount iFontCount,
01812                                 STFont *iFontArray);
01813 
01825 STStatus STTextGetFontFallbacks(STText iText,
01826                                 STCount *oFontCount,
01827                                 STFont **oFontArray);
01828 
01829 
01840 STStatus STTextCopyAttributes(STText iTo,
01841                               STTextMask iMask,
01842                               STText iFrom);
01843 
01852 STStatus STTextResetAttributes(STText iText,
01853                                STTextMask iMask);
01854 
01867 STStatus STTextSetText(STText iText,
01868                        utf16 *iChars,
01869                        STCharCount iCharCount);
01870 
01880 STStatus STTextGetText(STText iText,
01881                        utf16 **oChars,
01882                        STCharCount *oCharCount);
01883 
01884 
01899 STStatus STTextGetStyledGlyphs(STText iText,
01900                                STPosition iStartFrom,
01901                                STCharCount iCharCount,
01902                                STStyledGlyph **oGlyphs,
01903                                STCount *oGlyphCount);
01904                                
01918 STStatus STLineGetStyledGlyphs(STLine iLine,
01919                                STPosition iPosition,
01920                                STCharCount iCharCount,
01921                                STStyledGlyph **oGlyphs,
01922                                STCount *oGlyphCount);
01923                                
01924 
01936 STStatus STTextUpdate(STText iText,
01937                       STTextChanged iChange,
01938                       STPosition iTextOffset,
01939                       STCharCount iTextLength);
01940 
01941 
01955 STStatus STTextSetStyle(STText iText,
01956                         STStyle iStyle,
01957                         STPosition iFirstChar,
01958                         STCharCount iCharCount);
01959 
01974 STStatus STTextGetStyle(STText iText,
01975                         STPosition iPosition,
01976                         STStyle *oStyle,
01977                         STPosition *oFirstChar,
01978                         STCharCount *oCharCount);
01979 
01990 STStatus STTextGetCommonStyle(STText iText,
01991                               STPosition iPosition,
01992                               STCharCount iCharCount,
01993                               STStyle *oStyle);
01994 
01995 
02007 STStatus STTextAugmentStyle(STText iText,
02008                             STPosition iPosition,
02009                             STCharCount iCharCount,
02010                             STStyle iStyle);
02011 
02024 STStatus STTextOverwriteStyle(STText iText,
02025                               STPosition iPosition,
02026                               STCharCount iCharCount,
02027                               STStyle iStyle);
02040 STStatus STTextUnderwriteStyle(STText iText,
02041                                STPosition iPosition,
02042                                STCharCount iCharCount,
02043                                STStyle iStyle);
02044 
02064 STStatus STTextFindMissingChars(STText iText,
02065                                 STCount *oSegCount,
02066                                 STPosition **oSegOffset,
02067                                 STCharCount **oSegLength,
02068                                 STFont **oFontArray);
02069 
02093 STStatus STLineNew(STLine *oLine,
02094                    STText iText,
02095                    STPosition iPosition,
02096                    STCharCount iCharCount,
02097                    STCharCount *oCharCount);
02098 
02115 STStatus STLineNewForWidth(STLine *oLine,
02116                            STText iText,
02117                            STPosition iPosition,
02118                            double iWidth,
02119                            STCharCount *oCharCount);
02120 
02128 STStatus STLineDispose(STLine iLine);
02129 
02139 STStatus STLineSerialize(STLine iLine,
02140                          int iFileDes);
02141 
02151 STStatus STLineDeserialize(STLine *Line,
02152                            int iFileDes);
02153 
02165 STStatus STLineGrow(STLine iLine,
02166                     STBoolean iAppend,
02167                     STCharCount iCharCount);
02168 
02179 STStatus STLineShrink(STLine iLine,
02180                       STBoolean iFromEnd,
02181                       STCharCount iCharCount);
02182 
02193 STStatus STLineGetPosition(STLine iLine,
02194                            STPosition *oPosition,
02195                            STCharCount *oCharCount);
02196 
02205 STStatus STLineGetDesignMetrics(STLine iLine,
02206                                 STExtLineMetrics *oMetrics);
02207 
02208 
02223 STStatus STLineSetMetrics(STLine iLine,
02224                           STExtLineMetrics *iLineMetrics,
02225                           STBaselines *iBaselines);
02226 
02237 STStatus STLineGetMetrics(STLine iLine,
02238                           STExtLineMetrics **oLineMetrics,
02239                           STBaselines **oBaselines);
02240 
02250 STStatus STLineMeasureText(STLine iLine,
02251                            STRectanglePtr oBBox);
02252 
02265 STStatus STLineMeasureTextImage(STLine iLine,
02266                 STGraphics iGraphics,
02267                                 STRectanglePtr oBBox);
02268 
02289 STStatus STLineGetGlyphBounds(STLine iLine,
02290                               STGraphics iGraphics,
02291                               int iMaxBoundsCount,
02292                               STBounds iBounds,
02293                               int *oBoundsCount,
02294                               STTrapezoidPtr *oBounds);
02295                                   
02296 
02311 STStatus STLineHitTest(STLine iLine,
02312                        double iX,
02313                        double iY,
02314                        STPosition *oPrimaryOffset,
02315                        STBoolean *oIsLeading,
02316                        STPosition *oSecondaryOffset);
02317 
02335 STStatus STLinePositionToCaret(STLine iLine,
02336                                STPosition iPosition,
02337                                STBoolean iIsLeading,
02338                                STCaret *oStrongCaret,
02339                                STCaret *oWeakCaret,
02340                                STBoolean *oSplitCaret);
02341 
02363 STStatus STLineMoveCaret(STLine iLine,
02364                          STPosition iOffset,
02365                          STCaretDirection iDirection,
02366                          STCaretMovement iMovementType,
02367                          STPosition *oOffset);
02368                             
02369 
02370 
02380 STStatus STLineRender(STLine iLine,
02381                       STGraphics iDevice);
02382 
02383 
02395 STStatus STLineAddHighlight(STLine iLine,
02396                             STPosition iCharOffset,
02397                             STCharCount iCharCount);
02398 
02409 STStatus STLineRemoveHighlight(STLine iLine,
02410                                STPosition iCharOffset,
02411                                STCharCount iCharCount);
02412 
02424 STStatus STLineGetHighlights(STLine iLine,
02425                              STCount *oRegionCount,
02426                              STPosition **oCharOffset,
02427                              STCharCount **oCharCount);
02428 
02449 STStatus STGlyphVectorNew(STGlyphVector *oGlyphVector,
02450                           STTypeEnv iEnv,
02451                           STStyledGlyph *iSource,
02452                           STCount iGlyphCount);
02453 
02462 STStatus STGlyphVectorNewCopy(STGlyphVector *oGlyphVector,
02463                               STGlyphVector iOldGlyphVector);
02464 
02472 STStatus STGlyphVectorDispose(STGlyphVector iGlyphVector);
02473 
02482 STStatus STGlyphVectorSerialize(STGlyphVector iGlyphVector,
02483                                 int iFileDes);
02484 
02493 STStatus STGlyphVectorDeserialize(STGlyphVector *oGlyphVector,
02494                                   int iFileDes);
02495 
02506 STStatus STGlyphVectorSetGlyphs(STGlyphVector iGlyphVector,
02507                                  STStyledGlyph *iGlyphs,
02508                                  STCount iGlyphCount);
02509  
02521 STStatus STGlyphVectorGetGlyphs(STGlyphVector iGlyphVector,
02522                                 STPosition iStartFrom,
02523                                 STCount *ioGlyphCount,
02524                                 STStyledGlyph **oGlyphs);
02525 
02542 STStatus STGlyphVectorReplaceGlyphs(STGlyphVector iGlyphVector,
02543                                     STPosition iStartFrom,
02544                                     STCount iGlyphCount,
02545                                     STStyledGlyph *iGlyphArray,
02546                                     STCount iGlyphArraySize);
02547 
02559 STStatus STGlyphVectorAdjustPositions(STGlyphVector iGlyphVector,
02560                                       STPosition iStartFrom,
02561                                       STCount iGlyphCount,
02562                                       STPoint iDelta);
02563 
02575 STStatus STGlyphVectorMeasure(STGlyphVector iGlyphVector,
02576                               STPosition iStartFrom,
02577                               STCount iGlyphCount,
02578                               STRectangle *oBBox);
02579                               
02580 
02601 STStatus STGlyphVectorGetBounds(STGlyphVector iGlyphVector,
02602                                 STPosition iStartFrom,
02603                                 STCount iGlyphCount,
02604                                 STGraphics iGraphics,
02605                                 int iMaxBoundsCount,
02606                                 STBounds iBounds,
02607                                 int *oBoundsCount,
02608                                 STTrapezoidPtr *oBounds);
02609 
02620 STStatus STGlyphVectorRender(STGlyphVector iGlyphVector,
02621                              STPosition iStartFrom,
02622                              STCount iGlyphCount,
02623                              STGraphics iGraphics);
02624 
02625 
02626                              
02627 
02628 
02632 #endif /* __ST_H */

Generated on Thu Mar 20 23:35:50 2003 for Standard Type Services by doxygen1.2.13.1 written by Dimitri van Heesch, © 1997-2001