
// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*-

#ifndef __java_text_Bidi__
#define __java_text_Bidi__

#pragma interface

#include <java/lang/Object.h>
#include <gcj/array.h>

extern "Java"
{
  namespace java
  {
    namespace text
    {
        class AttributedCharacterIterator;
        class Bidi;
    }
  }
}

class java::text::Bidi : public ::java::lang::Object
{

public:
  Bidi(::java::text::AttributedCharacterIterator *);
  Bidi(JArray< jchar > *, jint, JArray< jbyte > *, jint, jint, jint);
  Bidi(::java::lang::String *, jint);
private:
  void computeTypes();
  jint computeParagraphEmbeddingLevel();
  void computeExplicitLevels();
  void computeRuns();
  void resolveWeakTypes();
  void resolveNeutralTypes();
  void resolveImplicitLevels();
  void reinsertFormattingCodes();
  void runBidi();
public:
  jboolean baseIsLeftToRight();
  ::java::text::Bidi * createLineBidi(jint, jint);
  jint getBaseLevel();
  jint getLength();
  jint getLevelAt(jint);
  jint getRunCount();
  jint getRunLevel(jint);
  jint getRunLimit(jint);
  jint getRunStart(jint);
  jboolean isLeftToRight();
  jboolean isMixed();
  jboolean isRightToLeft();
  ::java::lang::String * toString();
  static void reorderVisually(JArray< jbyte > *, jint, JArray< ::java::lang::Object * > *, jint, jint);
  static jboolean requiresBidi(JArray< jchar > *, jint, jint);
  static const jint DIRECTION_DEFAULT_LEFT_TO_RIGHT = -2;
  static const jint DIRECTION_DEFAULT_RIGHT_TO_LEFT = -1;
  static const jint DIRECTION_LEFT_TO_RIGHT = 0;
  static const jint DIRECTION_RIGHT_TO_LEFT = 1;
private:
  static const jint LTOR = 1;
  static const jint RTOL = 2;
  JArray< jchar > * __attribute__((aligned(__alignof__( ::java::lang::Object)))) text;
  jint textOffset;
  JArray< jbyte > * embeddings;
  jint embeddingOffset;
  jint length;
  jint flags;
  jint baseEmbedding;
  JArray< jbyte > * types;
  JArray< jbyte > * levels;
  ::java::util::ArrayList * formatterIndices;
  JArray< jint > * runs;
  jint resultFlags;
public:
  static ::java::lang::Class class$;
};

#endif // __java_text_Bidi__
