Gecko:LineBreakerAPI: Difference between revisions

Jump to navigation Jump to search
no edit summary
No edit summary
No edit summary
Line 17: Line 17:
     PRUint32      mLength;
     PRUint32      mLength;
     enum { CHAR, UNICHAR } mCharacterType;
     enum { CHAR, UNICHAR } mCharacterType;
     PRPackedBool* mBreakOutput; /* mLength + 1 bytes, set to PR_TRUE if we can
     PRPackedBool mNeedBreakData;
                                    break *before* the corresponding character of
 
                                    mText. Can be null, meaning we don't need to
    /* aBreakBefore points to mLength + 1 bytes, set to PR_TRUE if we can
                                    know the breakability of this text chunk. */
        break *before* the corresponding character of mText. This gets called
        only if mNeedBreakData is true. */
    virtual void SetBreaks(TextChunk* aChunk, PRPackedBool* aBreakBefore) = 0;
   };
   };
   
   
Line 26: Line 28:
     * Asks the linebreaker to compute line break opportunities for a block
     * Asks the linebreaker to compute line break opportunities for a block
     * of text. The text is a sequence of text chunks. The chunks with
     * of text. The text is a sequence of text chunks. The chunks with
     * non-null mBreakOutput get break opportunities computed for them and
     * mNeedBreakData set to true get break data computed for them and then
     * stored in the array pointed to by mBreakOutput.
     * set by calling SetBreaks on the chunk.
     */
     */
   void ComputeLineBreaks(const TextChunk* aTextChunks, PRUint32 aNumChunks);
   void ComputeLineBreaks(const TextChunk* aTextChunks, PRUint32 aNumChunks);
  };
  };
1,295

edits

Navigation menu