You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
129 lines
4.3 KiB
129 lines
4.3 KiB
//Auto-generated by kalyptus. DO NOT EDIT.
|
|
package org.kde.koala;
|
|
|
|
import org.kde.qt.Qt;
|
|
import org.kde.qt.QtSupport;
|
|
import java.util.ArrayList;
|
|
import org.kde.qt.TQTextCodec;
|
|
|
|
/**
|
|
|
|
Charset font and encoder/decoder handling.
|
|
This is needed, because Qt's font matching algorithm gives the font
|
|
family a higher priority than the charset. For many applications
|
|
this is not acceptable, since it can totally obscure the output,
|
|
in languages which use non iso-8859-1 charsets.
|
|
@author Lars Knoll <knoll@kde.org>
|
|
|
|
@short Charset font and encoder/decoder handling.
|
|
|
|
*/
|
|
public class KCharsets implements QtSupport {
|
|
private long _qt;
|
|
private boolean _allocatedInJavaWorld = true;
|
|
protected KCharsets(Class dummy){}
|
|
|
|
/**
|
|
Provided for compatibility.
|
|
@param name the name of the codec
|
|
@return the TQTextCodec. If the desired codec could not be found,
|
|
it returns a default (Latin-1) codec
|
|
|
|
@short Provided for compatibility.
|
|
*/
|
|
public native TQTextCodec codecForName(String name);
|
|
/**
|
|
Tries to find a TQTextCodec to convert the given encoding from and to
|
|
Unicode. If no codec could be found the latin1 codec will be returned an
|
|
<code>ok</code> will be set to false.
|
|
@return the TQTextCodec. If the desired codec could not be found,
|
|
it returns a default (Latin-1) codec
|
|
|
|
@short Tries to find a TQTextCodec to convert the given encoding from and to Unicode.
|
|
*/
|
|
public native TQTextCodec codecForName(String n, boolean ok);
|
|
/**
|
|
Lists all available encodings as names.
|
|
@return the list of all encodings
|
|
|
|
@short Lists all available encodings as names.
|
|
*/
|
|
public native ArrayList availableEncodingNames();
|
|
/**
|
|
Lists the available encoding names together with a more descriptive language.
|
|
@return the list of descriptive encoding names
|
|
|
|
@short Lists the available encoding names together with a more descriptive language.
|
|
*/
|
|
public native ArrayList descriptiveEncodingNames();
|
|
/**
|
|
Returns the language the encoding is used for.
|
|
@param encoding the encoding for the language
|
|
@return the language of the encoding
|
|
|
|
@short Returns the language the encoding is used for.
|
|
*/
|
|
public native String languageForEncoding(String encoding);
|
|
/**
|
|
Returns the encoding for a string obtained with descriptiveEncodingNames().
|
|
@param descriptiveName the descriptive name for the encoding
|
|
@return the name of the encoding
|
|
|
|
@short Returns the encoding for a string obtained with descriptiveEncodingNames().
|
|
*/
|
|
public native String encodingForName(String descriptiveName);
|
|
/**
|
|
Converts an entity to a character. The string must contain only the
|
|
entity without the trailing ';'.
|
|
@param str the entity
|
|
@return char.null if the entity could not be decoded.
|
|
|
|
@short Converts an entity to a character.
|
|
*/
|
|
public static native char fromEntity(String str);
|
|
/**
|
|
Overloaded member function. Tries to find an entity in the
|
|
String str.
|
|
@param str the string containing entified
|
|
@param len is a return value, that gives the length of the decoded
|
|
entity.
|
|
@return a decoded entity if one could be found, char.null
|
|
otherwise
|
|
|
|
@short Overloaded member function.
|
|
*/
|
|
public static native char fromEntity(String str, int[] len);
|
|
/**
|
|
Converts a char to an entity. The returned string does already
|
|
contain the leading '&' and the trailing ';'.
|
|
@param ch the char to convert
|
|
@return the entity
|
|
|
|
@short Converts a char to an entity.
|
|
*/
|
|
public static native String toEntity(char ch);
|
|
/**
|
|
Scans the given string for entities (like &amp;) and resolves them
|
|
using fromEntity.
|
|
@param text the string containing the entities
|
|
@return the clean string
|
|
|
|
@short Scans the given string for entities (like &amp;) and resolves them using fromEntity.
|
|
*/
|
|
public static native String resolveEntities(String text);
|
|
/** Protected constructor. If you need the kcharsets object, use
|
|
KGlobal.charsets() instead.
|
|
@short Protected constructor.
|
|
*/
|
|
public KCharsets() {
|
|
newKCharsets();
|
|
}
|
|
private native void newKCharsets();
|
|
/** Deletes the wrapped C++ instance */
|
|
protected native void finalize() throws InternalError;
|
|
/** Delete the wrapped C++ instance ahead of finalize() */
|
|
public native void dispose();
|
|
/** Has the wrapped C++ instance been deleted? */
|
|
public native boolean isDisposed();
|
|
}
|