initial import
[ICEs.git] / 136309 / ice.ii.2
1 typedef unsigned char uchar;
2 typedef unsigned short ushort;
3 typedef unsigned uint;
4 typedef unsigned long ulong;
5 const bool FALSE = 0;
6 const bool TRUE = !0;
7 typedef signed char Q_INT8;
8 typedef unsigned char Q_UINT8;
9 typedef short Q_INT16;
10 typedef unsigned short Q_UINT16;
11 typedef int Q_INT32;
12 typedef unsigned int Q_UINT32;
13 typedef long Q_LONG;
14 typedef unsigned long Q_ULONG;
15 typedef long long Q_INT64;
16 typedef unsigned long long Q_UINT64;
17 typedef Q_INT64 Q_LLONG;
18 typedef Q_UINT64 Q_ULLONG;
19 class QDataStream;
20 __attribute__((visibility("default"))) bool qSysInfo( int *wordSize, bool *bigEndian );
21 struct QUObject;
22 class QObject;
23 class QMetaObject;
24 class QConnectionList;
25 class QSignalVec;
26 class QObjectList;
27 struct __attribute__((visibility("default"))) QShared { QShared() : count( 1 ) { } void ref() { count++; } bool deref() { return !--count; } uint count; };
28 class __attribute__((visibility("default"))) QGArray { friend class QBuffer; public: struct array_data : public QShared { array_data():data(0),len(0) {} char *data; uint len; }; QGArray(); enum Optimization { MemOptim, SpeedOptim }; protected: QGArray( int, int ); QGArray( int size ); QGArray( const QGArray &a ); virtual ~QGArray(); QGArray &operator=( const QGArray &a ) { return assign( a ); } virtual void detach() { duplicate(*this); } char *data() const { return shd->data; } uint nrefs() const { return shd->count; } uint size() const { return shd->len; } bool isEqual( const QGArray &a ) const; bool resize( uint newsize, Optimization optim ); bool resize( uint newsize ); bool fill( const char *d, int len, uint sz ); QGArray &assign( const QGArray &a ); QGArray &assign( const char *d, uint len ); QGArray &duplicate( const QGArray &a ); QGArray &duplicate( const char *d, uint len ); void store( const char *d, uint len ); array_data *sharedBlock() const { return shd; } void setSharedBlock( array_data *p ) { shd=(array_data*)p; } QGArray &setRawData( const char *d, uint len ); void resetRawData( const char *d, uint len ); int find( const char *d, uint index, uint sz ) const; int contains( const char *d, uint sz ) const; void sort( uint sz ); int bsearch( const char *d, uint sz ) const; char *at( uint index ) const; bool setExpand( uint index, const char *d, uint sz ); protected: virtual array_data *newData(); virtual void deleteData( array_data *p ); private: static void msg_index( uint ); array_data *shd; };
29 template<class type> class QMemArray : public QGArray { public: typedef type* Iterator; typedef const type* ConstIterator; typedef type ValueType; protected: QMemArray( int, int ) : QGArray( 0, 0 ) {} public: QMemArray() {} QMemArray( int size ) : QGArray(size*sizeof(type)) {} QMemArray( const QMemArray<type> &a ) : QGArray(a) {} ~QMemArray() {} QMemArray<type> &operator=(const QMemArray<type> &a) { return (QMemArray<type>&)QGArray::assign(a); } type *data() const { return (type *)QGArray::data(); } uint nrefs() const { return QGArray::nrefs(); } uint size() const { return QGArray::size()/sizeof(type); } uint count() const { return size(); } bool isEmpty() const { return QGArray::size() == 0; } bool isNull() const { return QGArray::data() == 0; } bool resize( uint size ) { return QGArray::resize(size*sizeof(type)); } bool resize( uint size, Optimization optim ) { return QGArray::resize(size*sizeof(type), optim); } bool truncate( uint pos ) { return QGArray::resize(pos*sizeof(type)); } bool fill( const type &d, int size = -1 ) { return QGArray::fill((char*)&d,size,sizeof(type) ); } void detach() { QGArray::detach(); } QMemArray<type> copy() const { QMemArray<type> tmp; return tmp.duplicate(*this); } QMemArray<type>& assign( const QMemArray<type>& a ) { return (QMemArray<type>&)QGArray::assign(a); } QMemArray<type>& assign( const type *a, uint n ) { return (QMemArray<type>&)QGArray::assign((char*)a,n*sizeof(type)); } QMemArray<type>& duplicate( const QMemArray<type>& a ) { return (QMemArray<type>&)QGArray::duplicate(a); } QMemArray<type>& duplicate( const type *a, uint n ) { return (QMemArray<type>&)QGArray::duplicate((char*)a,n*sizeof(type)); } QMemArray<type>& setRawData( const type *a, uint n ) { return (QMemArray<type>&)QGArray::setRawData((char*)a, n*sizeof(type)); } void resetRawData( const type *a, uint n ) { QGArray::resetRawData((char*)a,n*sizeof(type)); } int find( const type &d, uint i=0 ) const { return QGArray::find((char*)&d,i,sizeof(type)); } int contains( const type &d ) const { return QGArray::contains((char*)&d,sizeof(type)); } void sort() { QGArray::sort(sizeof(type)); } int bsearch( const type &d ) const { return QGArray::bsearch((const char*)&d,sizeof(type)); } type& operator[]( int i ) const { return (type &)(*(type *)QGArray::at(i*sizeof(type))); } type& at( uint i ) const { return (type &)(*(type *)QGArray::at(i*sizeof(type))); } operator const type*() const { return (const type *)QGArray::data(); } bool operator==( const QMemArray<type> &a ) const { return isEqual(a); } bool operator!=( const QMemArray<type> &a ) const { return !isEqual(a); } Iterator begin() { return data(); } Iterator end() { return data() + size(); } ConstIterator begin() const { return data(); } ConstIterator end() const { return data() + size(); } };
30 extern "C" { typedef unsigned int size_t; extern void *memcpy (void *__restrict __dest, __const void *__restrict __src, size_t __n) throw () __attribute__ ((__nonnull__ (1, 2))); extern void *memmove (void *__dest, __const void *__src, size_t __n) throw () __attribute__ ((__nonnull__ (1, 2))); extern void *memccpy (void *__restrict __dest, __const void *__restrict __src, int __c, size_t __n) throw () __attribute__ ((__nonnull__ (1, 2))); extern void *memset (void *__s, int __c, size_t __n) throw () __attribute__ ((__nonnull__ (1))); extern int memcmp (__const void *__s1, __const void *__s2, size_t __n) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); extern void *memchr (__const void *__s, int __c, size_t __n) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); extern void *rawmemchr (__const void *__s, int __c) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); extern void *memrchr (__const void *__s, int __c, size_t __n) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); extern char *strcpy (char *__restrict __dest, __const char *__restrict __src) throw () __attribute__ ((__nonnull__ (1, 2))); extern char *strncpy (char *__restrict __dest, __const char *__restrict __src, size_t __n) throw () __attribute__ ((__nonnull__ (1, 2))); extern char *strcat (char *__restrict __dest, __const char *__restrict __src) throw () __attribute__ ((__nonnull__ (1, 2))); extern char *strncat (char *__restrict __dest, __const char *__restrict __src, size_t __n) throw () __attribute__ ((__nonnull__ (1, 2))); extern int strcmp (__const char *__s1, __const char *__s2) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); extern int strncmp (__const char *__s1, __const char *__s2, size_t __n) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); extern int strcoll (__const char *__s1, __const char *__s2) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); extern size_t strxfrm (char *__restrict __dest, __const char *__restrict __src, size_t __n) throw () __attribute__ ((__nonnull__ (2))); typedef struct __locale_struct { struct locale_data *__locales[13]; const unsigned short int *__ctype_b; const int *__ctype_tolower; const int *__ctype_toupper; const char *__names[13]; } *__locale_t; extern int strcoll_l (__const char *__s1, __const char *__s2, __locale_t __l) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2, 3))); extern size_t strxfrm_l (char *__dest, __const char *__src, size_t __n, __locale_t __l) throw () __attribute__ ((__nonnull__ (2, 4))); extern char *strdup (__const char *__s) throw () __attribute__ ((__malloc__)) __attribute__ ((__nonnull__ (1))); extern char *strndup (__const char *__string, size_t __n) throw () __attribute__ ((__malloc__)) __attribute__ ((__nonnull__ (1))); extern char *strchr (__const char *__s, int __c) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); extern char *strrchr (__const char *__s, int __c) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); extern char *strchrnul (__const char *__s, int __c) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); extern size_t strcspn (__const char *__s, __const char *__reject) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); extern size_t strspn (__const char *__s, __const char *__accept) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); extern char *strpbrk (__const char *__s, __const char *__accept) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); extern char *strstr (__const char *__haystack, __const char *__needle) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); extern char *strtok (char *__restrict __s, __const char *__restrict __delim) throw () __attribute__ ((__nonnull__ (2))); extern char *__strtok_r (char *__restrict __s, __const char *__restrict __delim, char **__restrict __save_ptr) throw () __attribute__ ((__nonnull__ (2, 3))); extern char *strtok_r (char *__restrict __s, __const char *__restrict __delim, char **__restrict __save_ptr) throw () __attribute__ ((__nonnull__ (2, 3))); extern char *strcasestr (__const char *__haystack, __const char *__needle) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); extern void *memmem (__const void *__haystack, size_t __haystacklen, __const void *__needle, size_t __needlelen) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 3))); extern void *__mempcpy (void *__restrict __dest, __const void *__restrict __src, size_t __n) throw () __attribute__ ((__nonnull__ (1, 2))); extern void *mempcpy (void *__restrict __dest, __const void *__restrict __src, size_t __n) throw () __attribute__ ((__nonnull__ (1, 2))); extern size_t strlen (__const char *__s) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); extern size_t strnlen (__const char *__string, size_t __maxlen) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); extern char *strerror (int __errnum) throw (); extern char *strerror_r (int __errnum, char *__buf, size_t __buflen) throw () __attribute__ ((__nonnull__ (2))); extern void __bzero (void *__s, size_t __n) throw () __attribute__ ((__nonnull__ (1))); extern void bcopy (__const void *__src, void *__dest, size_t __n) throw () __attribute__ ((__nonnull__ (1, 2))); extern void bzero (void *__s, size_t __n) throw () __attribute__ ((__nonnull__ (1))); extern int bcmp (__const void *__s1, __const void *__s2, size_t __n) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); extern char *index (__const char *__s, int __c) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); extern char *rindex (__const char *__s, int __c) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); extern int ffs (int __i) throw () __attribute__ ((__const__)); extern int ffsl (long int __l) throw () __attribute__ ((__const__)); __extension__ extern int ffsll (long long int __ll) throw () __attribute__ ((__const__)); extern int strcasecmp (__const char *__s1, __const char *__s2) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); extern int strncasecmp (__const char *__s1, __const char *__s2, size_t __n) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); extern int strcasecmp_l (__const char *__s1, __const char *__s2, __locale_t __loc) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2, 3))); extern int strncasecmp_l (__const char *__s1, __const char *__s2, size_t __n, __locale_t __loc) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2, 4))); extern char *strsep (char **__restrict __stringp, __const char *__restrict __delim) throw () __attribute__ ((__nonnull__ (1, 2))); extern int strverscmp (__const char *__s1, __const char *__s2) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); extern char *strsignal (int __sig) throw (); extern char *__stpcpy (char *__restrict __dest, __const char *__restrict __src) throw () __attribute__ ((__nonnull__ (1, 2))); extern char *stpcpy (char *__restrict __dest, __const char *__restrict __src) throw () __attribute__ ((__nonnull__ (1, 2))); extern char *__stpncpy (char *__restrict __dest, __const char *__restrict __src, size_t __n) throw () __attribute__ ((__nonnull__ (1, 2))); extern char *stpncpy (char *__restrict __dest, __const char *__restrict __src, size_t __n) throw () __attribute__ ((__nonnull__ (1, 2))); extern char *strfry (char *__string) throw () __attribute__ ((__nonnull__ (1))); extern void *memfrob (void *__s, size_t __n) throw () __attribute__ ((__nonnull__ (1))); extern char *basename (__const char *__filename) throw () __attribute__ ((__nonnull__ (1))); }
31 __attribute__((visibility("default"))) char *qstrdup( const char * );
32 __attribute__((visibility("default"))) inline int qstrcmp( const char *str1, const char *str2 ) { return ( str1 && str2 ) ? strcmp( str1, str2 ) : ( str1 ? 1 : ( str2 ? -1 : 0 ) ); }
33 typedef QMemArray<char> QByteArray;
34 class QRegExp;
35 class __attribute__((visibility("default"))) QCString : public QByteArray { public: QCString() {} QCString( int size ); QCString( const QCString &s ) : QByteArray( s ) {} QCString( const char *str ); QCString( const char *str, uint maxlen ); ~QCString(); QCString &operator=( const QCString &s ); QCString &operator=( const char *str ); bool isNull() const; bool isEmpty() const; uint length() const; bool resize( uint newlen ); bool truncate( uint pos ); bool fill( char c, int len = -1 ); QCString copy() const; QCString &sprintf( const char *format, ... ); int find( char c, int index=0, bool cs=TRUE ) const; int find( const char *str, int index=0, bool cs=TRUE ) const; int find( const QRegExp &, int index=0 ) const; int findRev( char c, int index=-1, bool cs=TRUE) const; int findRev( const char *str, int index=-1, bool cs=TRUE) const; int findRev( const QRegExp &, int index=-1 ) const; int contains( char c, bool cs=TRUE ) const; int contains( const char *str, bool cs=TRUE ) const; int contains( const QRegExp & ) const; QCString left( uint len ) const; QCString right( uint len ) const; QCString mid( uint index, uint len=0xffffffff) const; QCString leftJustify( uint width, char fill=' ', bool trunc=FALSE)const; QCString rightJustify( uint width, char fill=' ',bool trunc=FALSE)const; QCString lower() const; QCString upper() const; QCString stripWhiteSpace() const; QCString simplifyWhiteSpace() const; QCString &insert( uint index, const char * ); QCString &insert( uint index, char ); QCString &append( const char * ); QCString &prepend( const char * ); QCString &remove( uint index, uint len ); QCString &replace( uint index, uint len, const char * ); QCString &replace( const QRegExp &, const char * ); QCString &replace( char c, const char *after ); QCString &replace( const char *, const char * ); QCString &replace( char, char ); short toShort( bool *ok=0 ) const; ushort toUShort( bool *ok=0 ) const; int toInt( bool *ok=0 ) const; uint toUInt( bool *ok=0 ) const; long toLong( bool *ok=0 ) const; ulong toULong( bool *ok=0 ) const; float toFloat( bool *ok=0 ) const; double toDouble( bool *ok=0 ) const; QCString &setStr( const char *s ); QCString &setNum( short ); QCString &setNum( ushort ); QCString &setNum( int ); QCString &setNum( uint ); QCString &setNum( long ); QCString &setNum( ulong ); QCString &setNum( float, char f='g', int prec=6 ); QCString &setNum( double, char f='g', int prec=6 ); bool setExpand( uint index, char c ); operator const char *() const; QCString &operator+=( const char *str ); QCString &operator+=( char c ); private: int find( const char *str, int index, bool cs, uint l ) const; };
36 class QString;
37 class QCharRef;
38 template <class T> class QDeepCopy;
39 class __attribute__((visibility("default"))) QChar { public: QChar(); QChar( char c ); QChar( uchar c ); QChar( uchar c, uchar r ); QChar( const QChar& c ); QChar( ushort rc ); QChar( short rc ); QChar( uint rc ); QChar( int rc ); static const QChar null; static const QChar replacement; static const QChar byteOrderMark; static const QChar byteOrderSwapped; static const QChar nbsp; enum Category { NoCategory, Mark_NonSpacing, Mark_SpacingCombining, Mark_Enclosing, Number_DecimalDigit, Number_Letter, Number_Other, Separator_Space, Separator_Line, Separator_Paragraph, Other_Control, Other_Format, Other_Surrogate, Other_PrivateUse, Other_NotAssigned, Letter_Uppercase, Letter_Lowercase, Letter_Titlecase, Letter_Modifier, Letter_Other, Punctuation_Connector, Punctuation_Dash, Punctuation_Dask = Punctuation_Dash, Punctuation_Open, Punctuation_Close, Punctuation_InitialQuote, Punctuation_FinalQuote, Punctuation_Other, Symbol_Math, Symbol_Currency, Symbol_Modifier, Symbol_Other }; enum Direction { DirL, DirR, DirEN, DirES, DirET, DirAN, DirCS, DirB, DirS, DirWS, DirON, DirLRE, DirLRO, DirAL, DirRLE, DirRLO, DirPDF, DirNSM, DirBN }; enum Decomposition { Single, Canonical, Font, NoBreak, Initial, Medial, Final, Isolated, Circle, Super, Sub, Vertical, Wide, Narrow, Small, Square, Compat, Fraction }; enum Joining { OtherJoining, Dual, Right, Center }; enum CombiningClass { Combining_BelowLeftAttached = 200, Combining_BelowAttached = 202, Combining_BelowRightAttached = 204, Combining_LeftAttached = 208, Combining_RightAttached = 210, Combining_AboveLeftAttached = 212, Combining_AboveAttached = 214, Combining_AboveRightAttached = 216, Combining_BelowLeft = 218, Combining_Below = 220, Combining_BelowRight = 222, Combining_Left = 224, Combining_Right = 226, Combining_AboveLeft = 228, Combining_Above = 230, Combining_AboveRight = 232, Combining_DoubleBelow = 233, Combining_DoubleAbove = 234, Combining_IotaSubscript = 240 }; int digitValue() const; QChar lower() const; QChar upper() const; Category category() const; Direction direction() const; Joining joining() const; bool mirrored() const; QChar mirroredChar() const; const QString &decomposition() const; Decomposition decompositionTag() const; unsigned char combiningClass() const; char latin1() const { return ucs > 0xff ? 0 : (char) ucs; } ushort unicode() const { return ucs; } ushort &unicode() { return ucs; } operator char() const { return latin1(); } bool isNull() const { return unicode()==0; } bool isPrint() const; bool isPunct() const; bool isSpace() const; bool isMark() const; bool isLetter() const; bool isNumber() const; bool isLetterOrNumber() const; bool isDigit() const; bool isSymbol() const; uchar cell() const { return ((uchar) ucs & 0xff); } uchar row() const { return ((uchar) (ucs>>8)&0xff); } void setCell( uchar cell ) { ucs = (ucs & 0xff00) + cell; } void setRow( uchar row ) { ucs = (((ushort) row)<<8) + (ucs&0xff); } static bool networkOrdered() { int wordSize; bool bigEndian = FALSE; qSysInfo( &wordSize, &bigEndian ); return bigEndian; } friend inline bool operator==( char ch, QChar c ); friend inline bool operator==( QChar c, char ch ); friend inline bool operator==( QChar c1, QChar c2 ); friend inline bool operator!=( QChar c1, QChar c2 ); friend inline bool operator!=( char ch, QChar c ); friend inline bool operator!=( QChar c, char ch ); friend inline bool operator<=( QChar c, char ch ); friend inline bool operator<=( char ch, QChar c ); friend inline bool operator<=( QChar c1, QChar c2 ); private: ushort ucs; }
40 ;
41 struct __attribute__((visibility("default"))) QStringData : public QShared { QStringData() : QShared(), unicode(0), ascii(0), len(0), issimpletext(TRUE), maxl(0), islatin1(FALSE) { ref(); } QStringData(QChar *u, uint l, uint m) : QShared(), unicode(u), ascii(0), len(l), issimpletext(FALSE), maxl(m), islatin1(FALSE) { } ~QStringData() { if ( unicode ) delete[] ((char*)unicode); if ( ascii ) delete[] ascii; } void deleteSelf(); QChar *unicode; char *ascii; void setDirty() { if ( ascii ) { delete [] ascii; ascii = 0; } issimpletext = FALSE; } uint len : 30; uint issimpletext : 1; uint maxl : 30; uint islatin1 : 1; private: QStringData( const QStringData& ); QStringData& operator=( const QStringData& ); };
42 class __attribute__((visibility("default"))) QString { public: QString(); QString( QChar ); QString( const QString & ); QString( const QByteArray& ); QString( const QChar* unicode, uint length ); QString( const char *str ); ~QString(); QString &operator=( const QString & ); QString &operator=( const char * ); QString &operator=( const QCString& ); QString &operator=( QChar c ); QString &operator=( char c ); static const QString null; bool isNull() const; bool isEmpty() const; uint length() const; void truncate( uint pos ); QString & fill( QChar c, int len = -1 ); QString copy() const; QString arg( long a, int fieldWidth = 0, int base = 10 ) const; QString arg( ulong a, int fieldWidth = 0, int base = 10 ) const; QString arg( Q_LLONG a, int fieldwidth=0, int base=10 ) const; QString arg( Q_ULLONG a, int fieldwidth=0, int base=10 ) const; QString arg( int a, int fieldWidth = 0, int base = 10 ) const; QString arg( uint a, int fieldWidth = 0, int base = 10 ) const; QString arg( short a, int fieldWidth = 0, int base = 10 ) const; QString arg( ushort a, int fieldWidth = 0, int base = 10 ) const; QString arg( double a, int fieldWidth = 0, char fmt = 'g', int prec = -1 ) const; QString arg( char a, int fieldWidth = 0 ) const; QString arg( QChar a, int fieldWidth = 0 ) const; QString arg( const QString& a, int fieldWidth = 0 ) const; QString arg( const QString& a1, const QString& a2 ) const; QString arg( const QString& a1, const QString& a2, const QString& a3 ) const; QString arg( const QString& a1, const QString& a2, const QString& a3, const QString& a4 ) const; QString &sprintf( const char* format, ... ) __attribute__ ((format (printf, 2, 3))) ; int find( QChar c, int index=0, bool cs=TRUE ) const; int find( char c, int index=0, bool cs=TRUE ) const; int find( const QString &str, int index=0, bool cs=TRUE ) const; int find( const QRegExp &, int index=0 ) const; int find( const char* str, int index=0 ) const; int findRev( QChar c, int index=-1, bool cs=TRUE) const; int findRev( char c, int index=-1, bool cs=TRUE) const; int findRev( const QString &str, int index=-1, bool cs=TRUE) const; int findRev( const QRegExp &, int index=-1 ) const; int findRev( const char* str, int index=-1 ) const; int contains( QChar c, bool cs=TRUE ) const; int contains( char c, bool cs=TRUE ) const { return contains(QChar(c), cs); } int contains( const char* str, bool cs=TRUE ) const; int contains( const QString &str, bool cs=TRUE ) const; int contains( const QRegExp & ) const; enum SectionFlags { SectionDefault = 0x00, SectionSkipEmpty = 0x01, SectionIncludeLeadingSep = 0x02, SectionIncludeTrailingSep = 0x04, SectionCaseInsensitiveSeps = 0x08 }; QString section( QChar sep, int start, int end = 0xffffffff, int flags = SectionDefault ) const; QString section( char sep, int start, int end = 0xffffffff, int flags = SectionDefault ) const; QString section( const char *in_sep, int start, int end = 0xffffffff, int flags = SectionDefault ) const; QString section( const QString &in_sep, int start, int end = 0xffffffff, int flags = SectionDefault ) const; QString section( const QRegExp &reg, int start, int end = 0xffffffff, int flags = SectionDefault ) const; QString left( uint len ) const; QString right( uint len ) const; QString mid( uint index, uint len=0xffffffff) const; QString leftJustify( uint width, QChar fill=' ', bool trunc=FALSE)const; QString rightJustify( uint width, QChar fill=' ',bool trunc=FALSE)const; QString lower() const; QString upper() const; QString stripWhiteSpace() const; QString simplifyWhiteSpace() const; QString &insert( uint index, const QString & ); QString &insert( uint index, const QByteArray & ); QString &insert( uint index, const char * ); QString &insert( uint index, const QChar*, uint len ); QString &insert( uint index, QChar ); QString &insert( uint index, char c ) { return insert(index,QChar(c)); } QString &append( char ); QString &append( QChar ); QString &append( const QString & ); QString &append( const QByteArray & ); QString &append( const char * ); QString &prepend( char ); QString &prepend( QChar ); QString &prepend( const QString & ); QString &prepend( const QByteArray & ); QString &prepend( const char * ); QString &remove( uint index, uint len ); QString &remove( const QString & ); QString &remove( const QString &, bool cs ); QString &remove( QChar c ); QString &remove( char c ) { return remove( QChar(c) ); } QString &remove( const char * ); QString &remove( const QRegExp & ); QString &replace( uint index, uint len, const QString & ); QString &replace( uint index, uint len, const QChar*, uint clen ); QString &replace( uint index, uint len, QChar ); QString &replace( uint index, uint len, char c ) { return replace( index, len, QChar(c) ); } QString &replace( QChar c, const QString & ); QString &replace( QChar c, const QString &, bool ); QString &replace( char c, const QString & after ) { return replace( QChar(c), after, TRUE ); } QString &replace( char c, const QString & after, bool cs ) { return replace( QChar(c), after, cs ); } QString &replace( const QString &, const QString & ); QString &replace( const QString &, const QString &, bool ); QString &replace( const QRegExp &, const QString & ); QString &replace( QChar, QChar ); short toShort( bool *ok=0, int base=10 ) const; ushort toUShort( bool *ok=0, int base=10 ) const; int toInt( bool *ok=0, int base=10 ) const; uint toUInt( bool *ok=0, int base=10 ) const; long toLong( bool *ok=0, int base=10 ) const; ulong toULong( bool *ok=0, int base=10 ) const; Q_LLONG toLongLong( bool *ok=0, int base=10 ) const; Q_ULLONG toULongLong( bool *ok=0, int base=10 ) const; float toFloat( bool *ok=0 ) const; double toDouble( bool *ok=0 ) const; QString &setNum( short, int base=10 ); QString &setNum( ushort, int base=10 ); QString &setNum( int, int base=10 ); QString &setNum( uint, int base=10 ); QString &setNum( long, int base=10 ); QString &setNum( ulong, int base=10 ); QString &setNum( Q_LLONG, int base=10 ); QString &setNum( Q_ULLONG, int base=10 ); QString &setNum( float, char f='g', int prec=6 ); QString &setNum( double, char f='g', int prec=6 ); static QString number( long, int base=10 ); static QString number( ulong, int base=10); static QString number( Q_LLONG, int base=10 ); static QString number( Q_ULLONG, int base=10); static QString number( int, int base=10 ); static QString number( uint, int base=10); static QString number( double, char f='g', int prec=6 ); void setExpand( uint index, QChar c ); QString &operator+=( const QString &str ); QString &operator+=( const QByteArray &str ); QString &operator+=( const char *str ); QString &operator+=( QChar c ); QString &operator+=( char c ); QChar at( uint i ) const { return i < d->len ? d->unicode[i] : QChar::null; } QChar operator[]( int i ) const { return at((uint)i); } QCharRef at( uint i ); QCharRef operator[]( int i ); QChar constref(uint i) const { return at(i); } QChar& ref(uint i) { if ( d->count != 1 || i >= d->len ) subat( i ); d->setDirty(); return d->unicode[i]; } const QChar* unicode() const { return d->unicode; } const char* ascii() const; static QString fromAscii(const char*, int len=-1); const char* latin1() const; static QString fromLatin1(const char*, int len=-1); QCString utf8() const; static QString fromUtf8(const char*, int len=-1); QCString local8Bit() const; static QString fromLocal8Bit(const char*, int len=-1); bool operator!() const; static QString fromUcs2( const unsigned short *ucs2 ); const unsigned short *ucs2() const; QString &setUnicode( const QChar* unicode, uint len ); QString &setUnicodeCodes( const ushort* unicode_as_ushorts, uint len ); QString &setAscii( const char*, int len=-1 ); QString &setLatin1( const char*, int len=-1 ); int compare( const QString& s ) const; static int compare( const QString& s1, const QString& s2 ) { return s1.compare( s2 ); } int localeAwareCompare( const QString& s ) const; static int localeAwareCompare( const QString& s1, const QString& s2 ) { return s1.localeAwareCompare( s2 ); } friend __attribute__((visibility("default"))) QDataStream &operator>>( QDataStream &, QString & ); void compose(); bool startsWith( const QString& str ) const; bool startsWith( const QString& str, bool cs ) const; bool endsWith( const QString& str ) const; bool endsWith( const QString& str, bool cs ) const; void setLength( uint newLength ); uint capacity() const; void reserve( uint minCapacity ); void squeeze(); bool simpleText() const { if ( !d->issimpletext ) checkSimpleText(); return (bool)d->issimpletext; } bool isRightToLeft() const; private: QString( int size, bool ); void deref(); void real_detach(); void subat( uint ); QString multiArg( int numArgs, const QString& a1, const QString& a2, const QString& a3 = QString::null, const QString& a4 = QString::null ) const; void checkSimpleText() const; void grow( uint newLength ); QString &insertHelper( uint index, const char *s, uint len=(2147483647 * 2U + 1U) ); QString &operatorPlusEqHelper( const char *s, uint len2=(2147483647 * 2U + 1U) ); static QChar* latin1ToUnicode( const char*, uint * len, uint maxlen=(uint)-1 ); static QChar* latin1ToUnicode( const QByteArray&, uint * len ); static char* unicodeToLatin1( const QChar*, uint len ); QStringData *d; static QStringData* shared_null; static QStringData* makeSharedNull(); friend class QConstString; friend class QTextStream; QString( QStringData* dd, bool ) : d(dd) { } void detach(); friend class QDeepCopy<QString>; };
43 class QColor;
44 class QCursor;
45 class __attribute__((visibility("default"))) Qt { public: static const QColor & color0; static const QColor & color1; static const QColor & black; static const QColor & white; static const QColor & darkGray; static const QColor & gray; static const QColor & lightGray; static const QColor & red; static const QColor & green; static const QColor & blue; static const QColor & cyan; static const QColor & magenta; static const QColor & yellow; static const QColor & darkRed; static const QColor & darkGreen; static const QColor & darkBlue; static const QColor & darkCyan; static const QColor & darkMagenta; static const QColor & darkYellow; enum ButtonState { NoButton = 0x0000, LeftButton = 0x0001, RightButton = 0x0002, MidButton = 0x0004, MouseButtonMask = 0x0007, ShiftButton = 0x0100, ControlButton = 0x0200, AltButton = 0x0400, MetaButton = 0x0800, KeyButtonMask = 0x0f00, Keypad = 0x4000 }; enum Orientation { Horizontal = 0, Vertical }; enum SortOrder { Ascending, Descending }; enum AlignmentFlags { AlignAuto = 0x0000, AlignLeft = 0x0001, AlignRight = 0x0002, AlignHCenter = 0x0004, AlignJustify = 0x0008, AlignHorizontal_Mask = AlignLeft | AlignRight | AlignHCenter | AlignJustify, AlignTop = 0x0010, AlignBottom = 0x0020, AlignVCenter = 0x0040, AlignVertical_Mask = AlignTop | AlignBottom | AlignVCenter, AlignCenter = AlignVCenter | AlignHCenter }; enum TextFlags { SingleLine = 0x0080, DontClip = 0x0100, ExpandTabs = 0x0200, ShowPrefix = 0x0400, WordBreak = 0x0800, BreakAnywhere = 0x1000, DontPrint = 0x2000, Underline = 0x01000000, Overline = 0x02000000, StrikeOut = 0x04000000, IncludeTrailingSpaces = 0x08000000, NoAccel = 0x4000 }; typedef uint WState; enum WidgetState { WState_Created = 0x00000001, WState_Disabled = 0x00000002, WState_Visible = 0x00000004, WState_ForceHide = 0x00000008, WState_OwnCursor = 0x00000010, WState_MouseTracking = 0x00000020, WState_CompressKeys = 0x00000040, WState_BlockUpdates = 0x00000080, WState_InPaintEvent = 0x00000100, WState_Reparented = 0x00000200, WState_ConfigPending = 0x00000400, WState_Resized = 0x00000800, WState_AutoMask = 0x00001000, WState_Polished = 0x00002000, WState_DND = 0x00004000, WState_Reserved0 = 0x00008000, WState_FullScreen = 0x00010000, WState_OwnSizePolicy = 0x00020000, WState_CreatedHidden = 0x00040000, WState_Maximized = 0x00080000, WState_Minimized = 0x00100000, WState_ForceDisabled = 0x00200000, WState_Exposed = 0x00400000, WState_HasMouse = 0x00800000 }; typedef uint WFlags; enum WidgetFlags { WType_TopLevel = 0x00000001, WType_Dialog = 0x00000002, WType_Popup = 0x00000004, WType_Desktop = 0x00000008, WType_Mask = 0x0000000f, WStyle_Customize = 0x00000010, WStyle_NormalBorder = 0x00000020, WStyle_DialogBorder = 0x00000040, WStyle_NoBorder = 0x00002000, WStyle_Title = 0x00000080, WStyle_SysMenu = 0x00000100, WStyle_Minimize = 0x00000200, WStyle_Maximize = 0x00000400, WStyle_MinMax = WStyle_Minimize | WStyle_Maximize, WStyle_Tool = 0x00000800, WStyle_StaysOnTop = 0x00001000, WStyle_ContextHelp = 0x00004000, WStyle_Reserved = 0x00008000, WStyle_Mask = 0x0000fff0, WDestructiveClose = 0x00010000, WPaintDesktop = 0x00020000, WPaintUnclipped = 0x00040000, WPaintClever = 0x00080000, WResizeNoErase = 0x00100000, WMouseNoMask = 0x00200000, WStaticContents = 0x00400000, WRepaintNoErase = 0x00800000, WX11BypassWM = 0x01000000, WWinOwnDC = 0x00000000, WMacNoSheet = 0x00000000, WMacDrawer = 0x00000000, WGroupLeader = 0x02000000, WShowModal = 0x04000000, WNoMousePropagation = 0x08000000, WSubWindow = 0x10000000, WStyle_Splash = 0x20000000, WNoAutoErase = WRepaintNoErase | WResizeNoErase }; enum WindowState { WindowNoState = 0x00000000, WindowMinimized = 0x00000001, WindowMaximized = 0x00000002, WindowFullScreen = 0x00000004, WindowActive = 0x00000008 }; enum ImageConversionFlags { ColorMode_Mask = 0x00000003, AutoColor = 0x00000000, ColorOnly = 0x00000003, MonoOnly = 0x00000002, AlphaDither_Mask = 0x0000000c, ThresholdAlphaDither = 0x00000000, OrderedAlphaDither = 0x00000004, DiffuseAlphaDither = 0x00000008, NoAlpha = 0x0000000c, Dither_Mask = 0x00000030, DiffuseDither = 0x00000000, OrderedDither = 0x00000010, ThresholdDither = 0x00000020, DitherMode_Mask = 0x000000c0, AutoDither = 0x00000000, PreferDither = 0x00000040, AvoidDither = 0x00000080 }; enum BGMode { TransparentMode, OpaqueMode }; enum GUIStyle { WindowsStyle = 1, MotifStyle = 4 }; enum SequenceMatch { NoMatch, PartialMatch, Identical }; enum Modifier { META = 0x00100000, SHIFT = 0x00200000, CTRL = 0x00400000, ALT = 0x00800000, MODIFIER_MASK = 0x00f00000, UNICODE_ACCEL = 0x10000000, ASCII_ACCEL = UNICODE_ACCEL }; enum Key { Key_Escape = 0x1000, Key_Tab = 0x1001, Key_Backtab = 0x1002, Key_BackTab = Key_Backtab, Key_Backspace = 0x1003, Key_BackSpace = Key_Backspace, Key_Return = 0x1004, Key_Enter = 0x1005, Key_Insert = 0x1006, Key_Delete = 0x1007, Key_Pause = 0x1008, Key_Print = 0x1009, Key_SysReq = 0x100a, Key_Clear = 0x100b, Key_Home = 0x1010, Key_End = 0x1011, Key_Left = 0x1012, Key_Up = 0x1013, Key_Right = 0x1014, Key_Down = 0x1015, Key_Prior = 0x1016, Key_PageUp = Key_Prior, Key_Next = 0x1017, Key_PageDown = Key_Next, Key_Shift = 0x1020, Key_Control = 0x1021, Key_Meta = 0x1022, Key_Alt = 0x1023, Key_CapsLock = 0x1024, Key_NumLock = 0x1025, Key_ScrollLock = 0x1026, Key_F1 = 0x1030, Key_F2 = 0x1031, Key_F3 = 0x1032, Key_F4 = 0x1033, Key_F5 = 0x1034, Key_F6 = 0x1035, Key_F7 = 0x1036, Key_F8 = 0x1037, Key_F9 = 0x1038, Key_F10 = 0x1039, Key_F11 = 0x103a, Key_F12 = 0x103b, Key_F13 = 0x103c, Key_F14 = 0x103d, Key_F15 = 0x103e, Key_F16 = 0x103f, Key_F17 = 0x1040, Key_F18 = 0x1041, Key_F19 = 0x1042, Key_F20 = 0x1043, Key_F21 = 0x1044, Key_F22 = 0x1045, Key_F23 = 0x1046, Key_F24 = 0x1047, Key_F25 = 0x1048, Key_F26 = 0x1049, Key_F27 = 0x104a, Key_F28 = 0x104b, Key_F29 = 0x104c, Key_F30 = 0x104d, Key_F31 = 0x104e, Key_F32 = 0x104f, Key_F33 = 0x1050, Key_F34 = 0x1051, Key_F35 = 0x1052, Key_Super_L = 0x1053, Key_Super_R = 0x1054, Key_Menu = 0x1055, Key_Hyper_L = 0x1056, Key_Hyper_R = 0x1057, Key_Help = 0x1058, Key_Direction_L = 0x1059, Key_Direction_R = 0x1060, Key_Space = 0x20, Key_Any = Key_Space, Key_Exclam = 0x21, Key_QuoteDbl = 0x22, Key_NumberSign = 0x23, Key_Dollar = 0x24, Key_Percent = 0x25, Key_Ampersand = 0x26, Key_Apostrophe = 0x27, Key_ParenLeft = 0x28, Key_ParenRight = 0x29, Key_Asterisk = 0x2a, Key_Plus = 0x2b, Key_Comma = 0x2c, Key_Minus = 0x2d, Key_Period = 0x2e, Key_Slash = 0x2f, Key_0 = 0x30, Key_1 = 0x31, Key_2 = 0x32, Key_3 = 0x33, Key_4 = 0x34, Key_5 = 0x35, Key_6 = 0x36, Key_7 = 0x37, Key_8 = 0x38, Key_9 = 0x39, Key_Colon = 0x3a, Key_Semicolon = 0x3b, Key_Less = 0x3c, Key_Equal = 0x3d, Key_Greater = 0x3e, Key_Question = 0x3f, Key_At = 0x40, Key_A = 0x41, Key_B = 0x42, Key_C = 0x43, Key_D = 0x44, Key_E = 0x45, Key_F = 0x46, Key_G = 0x47, Key_H = 0x48, Key_I = 0x49, Key_J = 0x4a, Key_K = 0x4b, Key_L = 0x4c, Key_M = 0x4d, Key_N = 0x4e, Key_O = 0x4f, Key_P = 0x50, Key_Q = 0x51, Key_R = 0x52, Key_S = 0x53, Key_T = 0x54, Key_U = 0x55, Key_V = 0x56, Key_W = 0x57, Key_X = 0x58, Key_Y = 0x59, Key_Z = 0x5a, Key_BracketLeft = 0x5b, Key_Backslash = 0x5c, Key_BracketRight = 0x5d, Key_AsciiCircum = 0x5e, Key_Underscore = 0x5f, Key_QuoteLeft = 0x60, Key_BraceLeft = 0x7b, Key_Bar = 0x7c, Key_BraceRight = 0x7d, Key_AsciiTilde = 0x7e, Key_nobreakspace = 0x0a0, Key_exclamdown = 0x0a1, Key_cent = 0x0a2, Key_sterling = 0x0a3, Key_currency = 0x0a4, Key_yen = 0x0a5, Key_brokenbar = 0x0a6, Key_section = 0x0a7, Key_diaeresis = 0x0a8, Key_copyright = 0x0a9, Key_ordfeminine = 0x0aa, Key_guillemotleft = 0x0ab, Key_notsign = 0x0ac, Key_hyphen = 0x0ad, Key_registered = 0x0ae, Key_macron = 0x0af, Key_degree = 0x0b0, Key_plusminus = 0x0b1, Key_twosuperior = 0x0b2, Key_threesuperior = 0x0b3, Key_acute = 0x0b4, Key_mu = 0x0b5, Key_paragraph = 0x0b6, Key_periodcentered = 0x0b7, Key_cedilla = 0x0b8, Key_onesuperior = 0x0b9, Key_masculine = 0x0ba, Key_guillemotright = 0x0bb, Key_onequarter = 0x0bc, Key_onehalf = 0x0bd, Key_threequarters = 0x0be, Key_questiondown = 0x0bf, Key_Agrave = 0x0c0, Key_Aacute = 0x0c1, Key_Acircumflex = 0x0c2, Key_Atilde = 0x0c3, Key_Adiaeresis = 0x0c4, Key_Aring = 0x0c5, Key_AE = 0x0c6, Key_Ccedilla = 0x0c7, Key_Egrave = 0x0c8, Key_Eacute = 0x0c9, Key_Ecircumflex = 0x0ca, Key_Ediaeresis = 0x0cb, Key_Igrave = 0x0cc, Key_Iacute = 0x0cd, Key_Icircumflex = 0x0ce, Key_Idiaeresis = 0x0cf, Key_ETH = 0x0d0, Key_Ntilde = 0x0d1, Key_Ograve = 0x0d2, Key_Oacute = 0x0d3, Key_Ocircumflex = 0x0d4, Key_Otilde = 0x0d5, Key_Odiaeresis = 0x0d6, Key_multiply = 0x0d7, Key_Ooblique = 0x0d8, Key_Ugrave = 0x0d9, Key_Uacute = 0x0da, Key_Ucircumflex = 0x0db, Key_Udiaeresis = 0x0dc, Key_Yacute = 0x0dd, Key_THORN = 0x0de, Key_ssharp = 0x0df, Key_agrave = 0x0e0, Key_aacute = 0x0e1, Key_acircumflex = 0x0e2, Key_atilde = 0x0e3, Key_adiaeresis = 0x0e4, Key_aring = 0x0e5, Key_ae = 0x0e6, Key_ccedilla = 0x0e7, Key_egrave = 0x0e8, Key_eacute = 0x0e9, Key_ecircumflex = 0x0ea, Key_ediaeresis = 0x0eb, Key_igrave = 0x0ec, Key_iacute = 0x0ed, Key_icircumflex = 0x0ee, Key_idiaeresis = 0x0ef, Key_eth = 0x0f0, Key_ntilde = 0x0f1, Key_ograve = 0x0f2, Key_oacute = 0x0f3, Key_ocircumflex = 0x0f4, Key_otilde = 0x0f5, Key_odiaeresis = 0x0f6, Key_division = 0x0f7, Key_oslash = 0x0f8, Key_ugrave = 0x0f9, Key_uacute = 0x0fa, Key_ucircumflex = 0x0fb, Key_udiaeresis = 0x0fc, Key_yacute = 0x0fd, Key_thorn = 0x0fe, Key_ydiaeresis = 0x0ff, Key_Back = 0x1061, Key_Forward = 0x1062, Key_Stop = 0x1063, Key_Refresh = 0x1064, Key_VolumeDown = 0x1070, Key_VolumeMute = 0x1071, Key_VolumeUp = 0x1072, Key_BassBoost = 0x1073, Key_BassUp = 0x1074, Key_BassDown = 0x1075, Key_TrebleUp = 0x1076, Key_TrebleDown = 0x1077, Key_MediaPlay = 0x1080, Key_MediaStop = 0x1081, Key_MediaPrev = 0x1082, Key_MediaNext = 0x1083, Key_MediaRecord = 0x1084, Key_HomePage = 0x1090, Key_Favorites = 0x1091, Key_Search = 0x1092, Key_Standby = 0x1093, Key_OpenUrl = 0x1094, Key_LaunchMail = 0x10a0, Key_LaunchMedia = 0x10a1, Key_Launch0 = 0x10a2, Key_Launch1 = 0x10a3, Key_Launch2 = 0x10a4, Key_Launch3 = 0x10a5, Key_Launch4 = 0x10a6, Key_Launch5 = 0x10a7, Key_Launch6 = 0x10a8, Key_Launch7 = 0x10a9, Key_Launch8 = 0x10aa, Key_Launch9 = 0x10ab, Key_LaunchA = 0x10ac, Key_LaunchB = 0x10ad, Key_LaunchC = 0x10ae, Key_LaunchD = 0x10af, Key_LaunchE = 0x10b0, Key_LaunchF = 0x10b1, Key_MediaLast = 0x1fff, Key_unknown = 0xffff }; enum ArrowType { UpArrow, DownArrow, LeftArrow, RightArrow }; enum RasterOp { CopyROP, OrROP, XorROP, NotAndROP, EraseROP=NotAndROP, NotCopyROP, NotOrROP, NotXorROP, AndROP, NotEraseROP=AndROP, NotROP, ClearROP, SetROP, NopROP, AndNotROP, OrNotROP, NandROP, NorROP, LastROP=NorROP }; enum PenStyle { NoPen, SolidLine, DashLine, DotLine, DashDotLine, DashDotDotLine, MPenStyle = 0x0f }; enum PenCapStyle { FlatCap = 0x00, SquareCap = 0x10, RoundCap = 0x20, MPenCapStyle = 0x30 }; enum PenJoinStyle { MiterJoin = 0x00, BevelJoin = 0x40, RoundJoin = 0x80, MPenJoinStyle = 0xc0 }; enum BrushStyle { NoBrush, SolidPattern, Dense1Pattern, Dense2Pattern, Dense3Pattern, Dense4Pattern, Dense5Pattern, Dense6Pattern, Dense7Pattern, HorPattern, VerPattern, CrossPattern, BDiagPattern, FDiagPattern, DiagCrossPattern, CustomPattern=24 }; enum MacintoshVersion { MV_Unknown = 0x0000, MV_9 = 0x0001, MV_10_DOT_0 = 0x0002, MV_10_DOT_1 = 0x0003, MV_10_DOT_2 = 0x0004, MV_10_DOT_3 = 0x0005, MV_10_DOT_4 = 0x0006, MV_CHEETAH = MV_10_DOT_0, MV_PUMA = MV_10_DOT_1, MV_JAGUAR = MV_10_DOT_2, MV_PANTHER = MV_10_DOT_3, MV_TIGER = MV_10_DOT_4 }; enum WindowsVersion { WV_32s = 0x0001, WV_95 = 0x0002, WV_98 = 0x0003, WV_Me = 0x0004, WV_DOS_based = 0x000f, WV_NT = 0x0010, WV_2000 = 0x0020, WV_XP = 0x0030, WV_2003 = 0x0040, WV_VISTA = 0x0080, WV_NT_based = 0x00f0, WV_CE = 0x0100, WV_CENET = 0x0200, WV_CE_based = 0x0f00 }; enum UIEffect { UI_General, UI_AnimateMenu, UI_FadeMenu, UI_AnimateCombo, UI_AnimateTooltip, UI_FadeTooltip, UI_AnimateToolBox }; enum CursorShape { ArrowCursor, UpArrowCursor, CrossCursor, WaitCursor, IbeamCursor, SizeVerCursor, SizeHorCursor, SizeBDiagCursor, SizeFDiagCursor, SizeAllCursor, BlankCursor, SplitVCursor, SplitHCursor, PointingHandCursor, ForbiddenCursor, WhatsThisCursor, BusyCursor, LastCursor = BusyCursor, BitmapCursor = 24 }; static const QCursor & arrowCursor; static const QCursor & upArrowCursor; static const QCursor & crossCursor; static const QCursor & waitCursor; static const QCursor & ibeamCursor; static const QCursor & sizeVerCursor; static const QCursor & sizeHorCursor; static const QCursor & sizeBDiagCursor; static const QCursor & sizeFDiagCursor; static const QCursor & sizeAllCursor; static const QCursor & blankCursor; static const QCursor & splitVCursor; static const QCursor & splitHCursor; static const QCursor & pointingHandCursor; static const QCursor & forbiddenCursor; static const QCursor & whatsThisCursor; static const QCursor & busyCursor; enum TextFormat { PlainText, RichText, AutoText, LogText }; enum AnchorAttribute { AnchorName, AnchorHref }; enum Dock { DockUnmanaged, DockTornOff, DockTop, DockBottom, DockRight, DockLeft, DockMinimized }; typedef Dock ToolBarDock; enum DateFormat { TextDate, ISODate, LocalDate }; enum TimeSpec { LocalTime, UTC }; enum BackgroundMode { FixedColor, FixedPixmap, NoBackground, PaletteForeground, PaletteButton, PaletteLight, PaletteMidlight, PaletteDark, PaletteMid, PaletteText, PaletteBrightText, PaletteBase, PaletteBackground, PaletteShadow, PaletteHighlight, PaletteHighlightedText, PaletteButtonText, PaletteLink, PaletteLinkVisited, X11ParentRelative }; typedef uint ComparisonFlags; enum StringComparisonMode { CaseSensitive = 0x00001, BeginsWith = 0x00002, EndsWith = 0x00004, Contains = 0x00008, ExactMatch = 0x00010 }; enum Corner { TopLeft = 0x00000, TopRight = 0x00001, BottomLeft = 0x00002, BottomRight = 0x00003 }; typedef unsigned long HANDLE; };
46 class QWidget;
47 class QWidgetMapper;
48 class QPointArray;
49 class QPainter;
50 class QFont;
51 class QFontMetrics;
52 class QFontInfo;
53 class QPen;
54 class QBrush;
55 class QWMatrix;
56 class QPixmap;
57 class QBitmap;
58 class QImage;
59 class QWidgetList;
60 typedef struct _XDisplay Display;
61 typedef union _XEvent XEvent;
62 typedef struct _XRegion *Region;
63 typedef unsigned long WId;
64 typedef Q_INT32 QCOORD;
65 typedef unsigned int QRgb;
66 class __attribute__((visibility("default"))) QPoint { public: QPoint(); QPoint( int xpos, int ypos ); bool isNull() const; int x() const; int y() const; void setX( int x ); void setY( int y ); int manhattanLength() const; QCOORD &rx(); QCOORD &ry(); QPoint &operator+=( const QPoint &p ); QPoint &operator-=( const QPoint &p ); QPoint &operator*=( int c ); QPoint &operator*=( double c ); QPoint &operator/=( int c ); QPoint &operator/=( double c ); friend inline bool operator==( const QPoint &, const QPoint & ); friend inline bool operator!=( const QPoint &, const QPoint & ); friend inline const QPoint operator+( const QPoint &, const QPoint & ); friend inline const QPoint operator-( const QPoint &, const QPoint & ); friend inline const QPoint operator*( const QPoint &, int ); friend inline const QPoint operator*( int, const QPoint & ); friend inline const QPoint operator*( const QPoint &, double ); friend inline const QPoint operator*( double, const QPoint & ); friend inline const QPoint operator-( const QPoint & ); friend inline const QPoint operator/( const QPoint &, int ); friend inline const QPoint operator/( const QPoint &, double ); private: static void warningDivByZero(); QCOORD xp; QCOORD yp; };
67 class __attribute__((visibility("default"))) QSize { public: enum ScaleMode { ScaleFree, ScaleMin, ScaleMax }; QSize(); QSize( int w, int h ); bool isNull() const; bool isEmpty() const; bool isValid() const; int width() const; int height() const; void setWidth( int w ); void setHeight( int h ); void transpose(); void scale( int w, int h, ScaleMode mode ); void scale( const QSize &s, ScaleMode mode ); QSize expandedTo( const QSize & ) const; QSize boundedTo( const QSize & ) const; QCOORD &rwidth(); QCOORD &rheight(); QSize &operator+=( const QSize & ); QSize &operator-=( const QSize & ); QSize &operator*=( int c ); QSize &operator*=( double c ); QSize &operator/=( int c ); QSize &operator/=( double c ); friend inline bool operator==( const QSize &, const QSize & ); friend inline bool operator!=( const QSize &, const QSize & ); friend inline const QSize operator+( const QSize &, const QSize & ); friend inline const QSize operator-( const QSize &, const QSize & ); friend inline const QSize operator*( const QSize &, int ); friend inline const QSize operator*( int, const QSize & ); friend inline const QSize operator*( const QSize &, double ); friend inline const QSize operator*( double, const QSize & ); friend inline const QSize operator/( const QSize &, int ); friend inline const QSize operator/( const QSize &, double ); private: static void warningDivByZero(); QCOORD wd; QCOORD ht; };
68 class __attribute__((visibility("default"))) QRect { public: QRect() { x1 = y1 = 0; x2 = y2 = -1; } QRect( const QPoint &topleft, const QPoint &bottomright ); QRect( const QPoint &topleft, const QSize &size ); QRect( int left, int top, int width, int height ); bool isNull() const; bool isEmpty() const; bool isValid() const; QRect normalize() const; int left() const; int top() const; int right() const; int bottom() const; QCOORD &rLeft(); QCOORD &rTop(); QCOORD &rRight(); QCOORD &rBottom(); int x() const; int y() const; void setLeft( int pos ); void setTop( int pos ); void setRight( int pos ); void setBottom( int pos ); void setX( int x ); void setY( int y ); void setTopLeft( const QPoint &p ); void setBottomRight( const QPoint &p ); void setTopRight( const QPoint &p ); void setBottomLeft( const QPoint &p ); QPoint topLeft() const; QPoint bottomRight() const; QPoint topRight() const; QPoint bottomLeft() const; QPoint center() const; void rect( int *x, int *y, int *w, int *h ) const; void coords( int *x1, int *y1, int *x2, int *y2 ) const; void moveLeft( int pos ); void moveTop( int pos ); void moveRight( int pos ); void moveBottom( int pos ); void moveTopLeft( const QPoint &p ); void moveBottomRight( const QPoint &p ); void moveTopRight( const QPoint &p ); void moveBottomLeft( const QPoint &p ); void moveCenter( const QPoint &p ); void moveBy( int dx, int dy ); void setRect( int x, int y, int w, int h ); void setCoords( int x1, int y1, int x2, int y2 ); void addCoords( int x1, int y1, int x2, int y2 ); QSize size() const; int width() const; int height() const; void setWidth( int w ); void setHeight( int h ); void setSize( const QSize &s ); QRect operator|(const QRect &r) const; QRect operator&(const QRect &r) const; QRect& operator|=(const QRect &r); QRect& operator&=(const QRect &r); bool contains( const QPoint &p, bool proper=FALSE ) const; bool contains( int x, int y ) const; bool contains( int x, int y, bool proper ) const; bool contains( const QRect &r, bool proper=FALSE ) const; QRect unite( const QRect &r ) const; QRect intersect( const QRect &r ) const; bool intersects( const QRect &r ) const; friend __attribute__((visibility("default"))) bool operator==( const QRect &, const QRect & ); friend __attribute__((visibility("default"))) bool operator!=( const QRect &, const QRect & ); private: friend void qt_setCoords( QRect *r, int xp1, int yp1, int xp2, int yp2 ); QCOORD x1; QCOORD y1; QCOORD x2; QCOORD y2; };
69 struct QRegionPrivate;
70 class __attribute__((visibility("default"))) QRegion { public: enum RegionType { Rectangle, Ellipse }; QRegion(); QRegion( int x, int y, int w, int h, RegionType = Rectangle ); QRegion( const QRect &, RegionType = Rectangle ); QRegion( const QPointArray &, bool winding=FALSE ); QRegion( const QRegion & ); QRegion( const QBitmap & ); ~QRegion(); QRegion &operator=( const QRegion & ); bool isNull() const; bool isEmpty() const; bool contains( const QPoint &p ) const; bool contains( const QRect &r ) const; void translate( int dx, int dy ); QRegion unite( const QRegion & ) const; QRegion intersect( const QRegion &) const; QRegion subtract( const QRegion & ) const; QRegion eor( const QRegion & ) const; QRect boundingRect() const; QMemArray<QRect> rects() const; void setRects( const QRect *, int ); const QRegion operator|( const QRegion & ) const; const QRegion operator+( const QRegion & ) const; const QRegion operator&( const QRegion & ) const; const QRegion operator-( const QRegion & ) const; const QRegion operator^( const QRegion & ) const; QRegion& operator|=( const QRegion & ); QRegion& operator+=( const QRegion & ); QRegion& operator&=( const QRegion & ); QRegion& operator-=( const QRegion & ); QRegion& operator^=( const QRegion & ); bool operator==( const QRegion & ) const; bool operator!=( const QRegion &r ) const { return !(operator==(r)); } Region handle() const { if(!data->rgn) updateX11Region(); return data->rgn; } friend __attribute__((visibility("default"))) QDataStream &operator<<( QDataStream &, const QRegion & ); friend __attribute__((visibility("default"))) QDataStream &operator>>( QDataStream &, QRegion & ); private: QRegion( bool ); QRegion copy() const; void detach(); void updateX11Region() const; void *clipRectangles( int &num ) const; friend void *qt_getClipRects( const QRegion &, int & ); void exec( const QByteArray &, int ver = 0 ); struct QRegionData : public QShared { Region rgn; void *xrectangles; QRegionPrivate *region; bool is_null; } *data; };
71 class __attribute__((visibility("default"))) QIODevice { public: typedef Q_ULONG Offset; QIODevice(); virtual ~QIODevice(); int flags() const { return ioMode; } int mode() const { return ioMode & 0x00ff; } int state() const { return ioMode & 0xf000; } bool isDirectAccess() const { return ((ioMode & 0x0100) == 0x0100); } bool isSequentialAccess() const { return ((ioMode & 0x0200) == 0x0200); } bool isCombinedAccess() const { return ((ioMode & 0x0300) == 0x0300); } bool isBuffered() const { return ((ioMode & 0x0040) != 0x0040); } bool isRaw() const { return ((ioMode & 0x0040) == 0x0040); } bool isSynchronous() const { return ((ioMode & 0x0080) != 0x0080); } bool isAsynchronous() const { return ((ioMode & 0x0080) == 0x0080); } bool isTranslated() const { return ((ioMode & 0x0010) == 0x0010); } bool isReadable() const { return ((ioMode & 0x0001) == 0x0001); } bool isWritable() const { return ((ioMode & 0x0002) == 0x0002); } bool isReadWrite() const { return ((ioMode & 0x0003) == 0x0003); } bool isInactive() const { return state() == 0; } bool isOpen() const { return state() == 0x1000; } int status() const { return ioSt; } void resetStatus() { ioSt = 0; } virtual bool open( int mode ) = 0; virtual void close() = 0; virtual void flush() = 0; virtual Offset size() const = 0; virtual Offset at() const; virtual bool at( Offset ); virtual bool atEnd() const; bool reset() { return at(0); } virtual Q_LONG readBlock( char *data, Q_ULONG maxlen ) = 0; virtual Q_LONG writeBlock( const char *data, Q_ULONG len ) = 0; virtual Q_LONG readLine( char *data, Q_ULONG maxlen ); Q_LONG writeBlock( const QByteArray& data ); virtual QByteArray readAll(); virtual int getch() = 0; virtual int putch( int ) = 0; virtual int ungetch( int ) = 0; protected: void setFlags( int f ) { ioMode = f; } void setType( int ); void setMode( int ); void setState( int ); void setStatus( int ); Offset ioIndex; private: int ioMode; int ioSt; private: QIODevice( const QIODevice & ); QIODevice &operator=( const QIODevice & ); };
72 class __attribute__((visibility("default"))) QDataStream { public: QDataStream(); QDataStream( QIODevice * ); QDataStream( QByteArray, int mode ); virtual ~QDataStream(); QIODevice *device() const; void setDevice( QIODevice * ); void unsetDevice(); bool atEnd() const; bool eof() const; enum ByteOrder { BigEndian, LittleEndian }; int byteOrder() const; void setByteOrder( int ); bool isPrintableData() const; void setPrintableData( bool ); int version() const; void setVersion( int ); QDataStream &operator>>( Q_INT8 &i ); QDataStream &operator>>( Q_UINT8 &i ); QDataStream &operator>>( Q_INT16 &i ); QDataStream &operator>>( Q_UINT16 &i ); QDataStream &operator>>( Q_INT32 &i ); QDataStream &operator>>( Q_UINT32 &i ); QDataStream &operator>>( Q_INT64 &i ); QDataStream &operator>>( Q_UINT64 &i ); QDataStream &operator>>( Q_LONG &i ); QDataStream &operator>>( Q_ULONG &i ); QDataStream &operator>>( float &f ); QDataStream &operator>>( double &f ); QDataStream &operator>>( char *&str ); QDataStream &operator<<( Q_INT8 i ); QDataStream &operator<<( Q_UINT8 i ); QDataStream &operator<<( Q_INT16 i ); QDataStream &operator<<( Q_UINT16 i ); QDataStream &operator<<( Q_INT32 i ); QDataStream &operator<<( Q_UINT32 i ); QDataStream &operator<<( Q_INT64 i ); QDataStream &operator<<( Q_UINT64 i ); QDataStream &operator<<( Q_LONG i ); QDataStream &operator<<( Q_ULONG i ); QDataStream &operator<<( float f ); QDataStream &operator<<( double f ); QDataStream &operator<<( const char *str ); QDataStream &readBytes( char *&, uint &len ); QDataStream &readRawBytes( char *, uint len ); QDataStream &writeBytes( const char *, uint len ); QDataStream &writeRawBytes( const char *, uint len ); private: QIODevice *dev; bool owndev; int byteorder; bool printable; bool noswap; int ver; private: QDataStream( const QDataStream & ); QDataStream &operator=( const QDataStream & ); };
73 template <class T1, class T2> struct QPair { typedef T1 first_type; typedef T2 second_type; QPair() : first( T1() ), second( T2() ) {} QPair( const T1& t1, const T2& t2 ) : first( t1 ), second( t2 ) {} QPair<T1, T2>& operator=(const QPair<T1, T2>& other) { if (this != &other) { first = other.first; second = other.second; } return *this; } T1 first; T2 second; };
74 extern "C" { typedef unsigned char __u_char; typedef unsigned short int __u_short; typedef unsigned int __u_int; typedef unsigned long int __u_long; typedef signed char __int8_t; typedef unsigned char __uint8_t; typedef signed short int __int16_t; typedef unsigned short int __uint16_t; typedef signed int __int32_t; typedef unsigned int __uint32_t; __extension__ typedef signed long long int __int64_t; __extension__ typedef unsigned long long int __uint64_t; __extension__ typedef long long int __quad_t; __extension__ typedef unsigned long long int __u_quad_t; __extension__ typedef __u_quad_t __dev_t; __extension__ typedef unsigned int __uid_t; __extension__ typedef unsigned int __gid_t; __extension__ typedef unsigned long int __ino_t; __extension__ typedef __u_quad_t __ino64_t; __extension__ typedef unsigned int __mode_t; __extension__ typedef unsigned int __nlink_t; __extension__ typedef long int __off_t; __extension__ typedef __quad_t __off64_t; __extension__ typedef int __pid_t; __extension__ typedef struct { int __val[2]; } __fsid_t; __extension__ typedef long int __clock_t; __extension__ typedef unsigned long int __rlim_t; __extension__ typedef __u_quad_t __rlim64_t; __extension__ typedef unsigned int __id_t; __extension__ typedef long int __time_t; __extension__ typedef unsigned int __useconds_t; __extension__ typedef long int __suseconds_t; __extension__ typedef int __daddr_t; __extension__ typedef long int __swblk_t; __extension__ typedef int __key_t; __extension__ typedef int __clockid_t; __extension__ typedef void * __timer_t; __extension__ typedef long int __blksize_t; __extension__ typedef long int __blkcnt_t; __extension__ typedef __quad_t __blkcnt64_t; __extension__ typedef unsigned long int __fsblkcnt_t; __extension__ typedef __u_quad_t __fsblkcnt64_t; __extension__ typedef unsigned long int __fsfilcnt_t; __extension__ typedef __u_quad_t __fsfilcnt64_t; __extension__ typedef int __ssize_t; typedef __off64_t __loff_t; typedef __quad_t *__qaddr_t; typedef char *__caddr_t; __extension__ typedef int __intptr_t; __extension__ typedef unsigned int __socklen_t; typedef struct _IO_FILE FILE; typedef struct _IO_FILE __FILE; typedef unsigned int wint_t; typedef struct { int __count; union { wint_t __wch; char __wchb[4]; } __value; } __mbstate_t; typedef struct { __off_t __pos; __mbstate_t __state; } _G_fpos_t; typedef struct { __off64_t __pos; __mbstate_t __state; } _G_fpos64_t; enum { __GCONV_OK = 0, __GCONV_NOCONV, __GCONV_NODB, __GCONV_NOMEM, __GCONV_EMPTY_INPUT, __GCONV_FULL_OUTPUT, __GCONV_ILLEGAL_INPUT, __GCONV_INCOMPLETE_INPUT, __GCONV_ILLEGAL_DESCRIPTOR, __GCONV_INTERNAL_ERROR }; enum { __GCONV_IS_LAST = 0x0001, __GCONV_IGNORE_ERRORS = 0x0002 }; struct __gconv_step; struct __gconv_step_data; struct __gconv_loaded_object; struct __gconv_trans_data; typedef int (*__gconv_fct) (struct __gconv_step *, struct __gconv_step_data *, __const unsigned char **, __const unsigned char *, unsigned char **, size_t *, int, int); typedef wint_t (*__gconv_btowc_fct) (struct __gconv_step *, unsigned char); typedef int (*__gconv_init_fct) (struct __gconv_step *); typedef void (*__gconv_end_fct) (struct __gconv_step *); typedef int (*__gconv_trans_fct) (struct __gconv_step *, struct __gconv_step_data *, void *, __const unsigned char *, __const unsigned char **, __const unsigned char *, unsigned char **, size_t *); typedef int (*__gconv_trans_context_fct) (void *, __const unsigned char *, __const unsigned char *, unsigned char *, unsigned char *); typedef int (*__gconv_trans_query_fct) (__const char *, __const char ***, size_t *); typedef int (*__gconv_trans_init_fct) (void **, const char *); typedef void (*__gconv_trans_end_fct) (void *); struct __gconv_trans_data { __gconv_trans_fct __trans_fct; __gconv_trans_context_fct __trans_context_fct; __gconv_trans_end_fct __trans_end_fct; void *__data; struct __gconv_trans_data *__next; }; struct __gconv_step { struct __gconv_loaded_object *__shlib_handle; __const char *__modname; int __counter; char *__from_name; char *__to_name; __gconv_fct __fct; __gconv_btowc_fct __btowc_fct; __gconv_init_fct __init_fct; __gconv_end_fct __end_fct; int __min_needed_from; int __max_needed_from; int __min_needed_to; int __max_needed_to; int __stateful; void *__data; }; struct __gconv_step_data { unsigned char *__outbuf; unsigned char *__outbufend; int __flags; int __invocation_counter; int __internal_use; __mbstate_t *__statep; __mbstate_t __state; struct __gconv_trans_data *__trans; }; typedef struct __gconv_info { size_t __nsteps; struct __gconv_step *__steps; __extension__ struct __gconv_step_data __data []; } *__gconv_t; typedef union { struct __gconv_info __cd; struct { struct __gconv_info __cd; struct __gconv_step_data __data; } __combined; } _G_iconv_t; typedef int _G_int16_t __attribute__ ((__mode__ (__HI__))); typedef int _G_int32_t __attribute__ ((__mode__ (__SI__))); typedef unsigned int _G_uint16_t __attribute__ ((__mode__ (__HI__))); typedef unsigned int _G_uint32_t __attribute__ ((__mode__ (__SI__))); typedef __builtin_va_list __gnuc_va_list; struct _IO_jump_t; struct _IO_FILE; typedef void _IO_lock_t; struct _IO_marker { struct _IO_marker *_next; struct _IO_FILE *_sbuf; int _pos; }; enum __codecvt_result { __codecvt_ok, __codecvt_partial, __codecvt_error, __codecvt_noconv }; struct _IO_FILE { int _flags; char* _IO_read_ptr; char* _IO_read_end; char* _IO_read_base; char* _IO_write_base; char* _IO_write_ptr; char* _IO_write_end; char* _IO_buf_base; char* _IO_buf_end; char *_IO_save_base; char *_IO_backup_base; char *_IO_save_end; struct _IO_marker *_markers; struct _IO_FILE *_chain; int _fileno; int _flags2; __off_t _old_offset; unsigned short _cur_column; signed char _vtable_offset; char _shortbuf[1]; _IO_lock_t *_lock; __off64_t _offset; void *__pad1; void *__pad2; void *__pad3; void *__pad4; size_t __pad5; int _mode; char _unused2[15 * sizeof (int) - 4 * sizeof (void *) - sizeof (size_t)]; }; struct _IO_FILE_plus; extern struct _IO_FILE_plus _IO_2_1_stdin_; extern struct _IO_FILE_plus _IO_2_1_stdout_; extern struct _IO_FILE_plus _IO_2_1_stderr_; typedef __ssize_t __io_read_fn (void *__cookie, char *__buf, size_t __nbytes); typedef __ssize_t __io_write_fn (void *__cookie, __const char *__buf, size_t __n); typedef int __io_seek_fn (void *__cookie, __off64_t *__pos, int __w); typedef int __io_close_fn (void *__cookie); typedef __io_read_fn cookie_read_function_t; typedef __io_write_fn cookie_write_function_t; typedef __io_seek_fn cookie_seek_function_t; typedef __io_close_fn cookie_close_function_t; typedef struct { __io_read_fn *read; __io_write_fn *write; __io_seek_fn *seek; __io_close_fn *close; } _IO_cookie_io_functions_t; typedef _IO_cookie_io_functions_t cookie_io_functions_t; struct _IO_cookie_file; extern void _IO_cookie_init (struct _IO_cookie_file *__cfile, int __read_write, void *__cookie, _IO_cookie_io_functions_t __fns); extern "C" { extern int __underflow (_IO_FILE *) throw (); extern int __uflow (_IO_FILE *) throw (); extern int __overflow (_IO_FILE *, int) throw (); extern wint_t __wunderflow (_IO_FILE *) throw (); extern wint_t __wuflow (_IO_FILE *) throw (); extern wint_t __woverflow (_IO_FILE *, wint_t) throw (); extern int _IO_getc (_IO_FILE *__fp) throw (); extern int _IO_putc (int __c, _IO_FILE *__fp) throw (); extern int _IO_feof (_IO_FILE *__fp) throw (); extern int _IO_ferror (_IO_FILE *__fp) throw (); extern int _IO_peekc_locked (_IO_FILE *__fp) throw (); extern void _IO_flockfile (_IO_FILE *) throw (); extern void _IO_funlockfile (_IO_FILE *) throw (); extern int _IO_ftrylockfile (_IO_FILE *) throw (); extern int _IO_vfscanf (_IO_FILE * __restrict, const char * __restrict, __gnuc_va_list, int *__restrict); extern int _IO_vfprintf (_IO_FILE *__restrict, const char *__restrict, __gnuc_va_list); extern __ssize_t _IO_padn (_IO_FILE *, int, __ssize_t) throw (); extern size_t _IO_sgetn (_IO_FILE *, void *, size_t) throw (); extern __off64_t _IO_seekoff (_IO_FILE *, __off64_t, int, int) throw (); extern __off64_t _IO_seekpos (_IO_FILE *, __off64_t, int) throw (); extern void _IO_free_backup_area (_IO_FILE *) throw (); } typedef __gnuc_va_list va_list; typedef _G_fpos_t fpos_t; typedef _G_fpos64_t fpos64_t; extern struct _IO_FILE *stdin; extern struct _IO_FILE *stdout; extern struct _IO_FILE *stderr; extern int remove (__const char *__filename) throw (); extern int rename (__const char *__old, __const char *__new) throw (); extern int renameat (int __oldfd, __const char *__old, int __newfd, __const char *__new) throw (); extern FILE *tmpfile (void); extern FILE *tmpfile64 (void); extern char *tmpnam (char *__s) throw (); extern char *tmpnam_r (char *__s) throw (); extern char *tempnam (__const char *__dir, __const char *__pfx) throw () __attribute__ ((__malloc__)); extern int fclose (FILE *__stream); extern int fflush (FILE *__stream); extern int fflush_unlocked (FILE *__stream); extern int fcloseall (void); extern FILE *fopen (__const char *__restrict __filename, __const char *__restrict __modes); extern FILE *freopen (__const char *__restrict __filename, __const char *__restrict __modes, FILE *__restrict __stream); extern FILE *fopen64 (__const char *__restrict __filename, __const char *__restrict __modes); extern FILE *freopen64 (__const char *__restrict __filename, __const char *__restrict __modes, FILE *__restrict __stream); extern FILE *fdopen (int __fd, __const char *__modes) throw (); extern FILE *fopencookie (void *__restrict __magic_cookie, __const char *__restrict __modes, _IO_cookie_io_functions_t __io_funcs) throw (); extern FILE *fmemopen (void *__s, size_t __len, __const char *__modes) throw (); extern FILE *open_memstream (char **__restrict __bufloc, size_t *__restrict __sizeloc) throw (); extern FILE *open_wmemstream (wchar_t **__restrict __bufloc, size_t *__restrict __sizeloc) throw (); extern void setbuf (FILE *__restrict __stream, char *__restrict __buf) throw (); extern int setvbuf (FILE *__restrict __stream, char *__restrict __buf, int __modes, size_t __n) throw (); extern void setbuffer (FILE *__restrict __stream, char *__restrict __buf, size_t __size) throw (); extern void setlinebuf (FILE *__stream) throw (); extern int fprintf (FILE *__restrict __stream, __const char *__restrict __format, ...); extern int printf (__const char *__restrict __format, ...); extern int sprintf (char *__restrict __s, __const char *__restrict __format, ...) throw (); extern int vfprintf (FILE *__restrict __s, __const char *__restrict __format, __gnuc_va_list __arg); extern int vprintf (__const char *__restrict __format, __gnuc_va_list __arg); extern int vsprintf (char *__restrict __s, __const char *__restrict __format, __gnuc_va_list __arg) throw (); extern int snprintf (char *__restrict __s, size_t __maxlen, __const char *__restrict __format, ...) throw () __attribute__ ((__format__ (__printf__, 3, 4))); extern int vsnprintf (char *__restrict __s, size_t __maxlen, __const char *__restrict __format, __gnuc_va_list __arg) throw () __attribute__ ((__format__ (__printf__, 3, 0))); extern int vasprintf (char **__restrict __ptr, __const char *__restrict __f, __gnuc_va_list __arg) throw () __attribute__ ((__format__ (__printf__, 2, 0))); extern int __asprintf (char **__restrict __ptr, __const char *__restrict __fmt, ...) throw () __attribute__ ((__format__ (__printf__, 2, 3))); extern int asprintf (char **__restrict __ptr, __const char *__restrict __fmt, ...) throw () __attribute__ ((__format__ (__printf__, 2, 3))); extern int vdprintf (int __fd, __const char *__restrict __fmt, __gnuc_va_list __arg) __attribute__ ((__format__ (__printf__, 2, 0))); extern int dprintf (int __fd, __const char *__restrict __fmt, ...) __attribute__ ((__format__ (__printf__, 2, 3))); extern int fscanf (FILE *__restrict __stream, __const char *__restrict __format, ...) ; extern int scanf (__const char *__restrict __format, ...) ; extern int sscanf (__const char *__restrict __s, __const char *__restrict __format, ...) throw (); extern int vfscanf (FILE *__restrict __s, __const char *__restrict __format, __gnuc_va_list __arg) __attribute__ ((__format__ (__scanf__, 2, 0))) ; extern int vscanf (__const char *__restrict __format, __gnuc_va_list __arg) __attribute__ ((__format__ (__scanf__, 1, 0))) ; extern int vsscanf (__const char *__restrict __s, __const char *__restrict __format, __gnuc_va_list __arg) throw () __attribute__ ((__format__ (__scanf__, 2, 0))); extern int fgetc (FILE *__stream); extern int getc (FILE *__stream); extern int getchar (void); extern int getc_unlocked (FILE *__stream); extern int getchar_unlocked (void); extern int fgetc_unlocked (FILE *__stream); extern int fputc (int __c, FILE *__stream); extern int putc (int __c, FILE *__stream); extern int putchar (int __c); extern int fputc_unlocked (int __c, FILE *__stream); extern int putc_unlocked (int __c, FILE *__stream); extern int putchar_unlocked (int __c); extern int getw (FILE *__stream); extern int putw (int __w, FILE *__stream); extern char *fgets (char *__restrict __s, int __n, FILE *__restrict __stream) ; extern char *gets (char *__s) ; extern char *fgets_unlocked (char *__restrict __s, int __n, FILE *__restrict __stream) ; extern __ssize_t __getdelim (char **__restrict __lineptr, size_t *__restrict __n, int __delimiter, FILE *__restrict __stream) ; extern __ssize_t getdelim (char **__restrict __lineptr, size_t *__restrict __n, int __delimiter, FILE *__restrict __stream) ; extern __ssize_t getline (char **__restrict __lineptr, size_t *__restrict __n, FILE *__restrict __stream) ; extern int fputs (__const char *__restrict __s, FILE *__restrict __stream); extern int puts (__const char *__s); extern int ungetc (int __c, FILE *__stream); extern size_t fread (void *__restrict __ptr, size_t __size, size_t __n, FILE *__restrict __stream) ; extern size_t fwrite (__const void *__restrict __ptr, size_t __size, size_t __n, FILE *__restrict __s) ; extern int fputs_unlocked (__const char *__restrict __s, FILE *__restrict __stream); extern size_t fread_unlocked (void *__restrict __ptr, size_t __size, size_t __n, FILE *__restrict __stream) ; extern size_t fwrite_unlocked (__const void *__restrict __ptr, size_t __size, size_t __n, FILE *__restrict __stream) ; extern int fseek (FILE *__stream, long int __off, int __whence); extern long int ftell (FILE *__stream) ; extern void rewind (FILE *__stream); extern int fseeko (FILE *__stream, __off_t __off, int __whence); extern __off_t ftello (FILE *__stream) ; extern int fgetpos (FILE *__restrict __stream, fpos_t *__restrict __pos); extern int fsetpos (FILE *__stream, __const fpos_t *__pos); extern int fseeko64 (FILE *__stream, __off64_t __off, int __whence); extern __off64_t ftello64 (FILE *__stream) ; extern int fgetpos64 (FILE *__restrict __stream, fpos64_t *__restrict __pos); extern int fsetpos64 (FILE *__stream, __const fpos64_t *__pos); extern void clearerr (FILE *__stream) throw (); extern int feof (FILE *__stream) throw () ; extern int ferror (FILE *__stream) throw () ; extern void clearerr_unlocked (FILE *__stream) throw (); extern int feof_unlocked (FILE *__stream) throw () ; extern int ferror_unlocked (FILE *__stream) throw () ; extern void perror (__const char *__s); extern int sys_nerr; extern __const char *__const sys_errlist[]; extern int _sys_nerr; extern __const char *__const _sys_errlist[]; extern int fileno (FILE *__stream) throw () ; extern int fileno_unlocked (FILE *__stream) throw () ; extern FILE *popen (__const char *__command, __const char *__modes) ; extern int pclose (FILE *__stream); extern char *ctermid (char *__s) throw (); extern char *cuserid (char *__s); struct obstack; extern int obstack_printf (struct obstack *__restrict __obstack, __const char *__restrict __format, ...) throw () __attribute__ ((__format__ (__printf__, 2, 3))); extern int obstack_vprintf (struct obstack *__restrict __obstack, __const char *__restrict __format, __gnuc_va_list __args) throw () __attribute__ ((__format__ (__printf__, 2, 0))); extern void flockfile (FILE *__stream) throw (); extern int ftrylockfile (FILE *__stream) throw () ; extern void funlockfile (FILE *__stream) throw (); inline int vprintf (__const char *__restrict __fmt, __gnuc_va_list __arg) { return vfprintf (stdout, __fmt, __arg); } inline int getchar (void) { return _IO_getc (stdin); } inline int getc_unlocked (FILE *__fp) { return (__builtin_expect (((__fp)->_IO_read_ptr >= (__fp)->_IO_read_end), 0) ? __uflow (__fp) : *(unsigned char *) (__fp)->_IO_read_ptr++); } inline int getchar_unlocked (void) { return (__builtin_expect (((stdin)->_IO_read_ptr >= (stdin)->_IO_read_end), 0) ? __uflow (stdin) : *(unsigned char *) (stdin)->_IO_read_ptr++); } inline int putchar (int __c) { return _IO_putc (__c, stdout); } inline int fputc_unlocked (int __c, FILE *__stream) { return (__builtin_expect (((__stream)->_IO_write_ptr >= (__stream)->_IO_write_end), 0) ? __overflow (__stream, (unsigned char) (__c)) : (unsigned char) (*(__stream)->_IO_write_ptr++ = (__c))); } inline int putc_unlocked (int __c, FILE *__stream) { return (__builtin_expect (((__stream)->_IO_write_ptr >= (__stream)->_IO_write_end), 0) ? __overflow (__stream, (unsigned char) (__c)) : (unsigned char) (*(__stream)->_IO_write_ptr++ = (__c))); } inline int putchar_unlocked (int __c) { return (__builtin_expect (((stdout)->_IO_write_ptr >= (stdout)->_IO_write_end), 0) ? __overflow (stdout, (unsigned char) (__c)) : (unsigned char) (*(stdout)->_IO_write_ptr++ = (__c))); } inline __ssize_t getline (char **__lineptr, size_t *__n, FILE *__stream) { return __getdelim (__lineptr, __n, '\n', __stream); } inline int feof_unlocked (FILE *__stream) throw () { return (((__stream)->_flags & 0x10) != 0); } inline int ferror_unlocked (FILE *__stream) throw () { return (((__stream)->_flags & 0x20) != 0); } }
75 template <class T> class QValueListNode { public: QValueListNode( const T& t ) : data( t ) { } QValueListNode() { } QValueListNode<T>* next; QValueListNode<T>* prev; T data; };
76 template<class T> class QValueListIterator { public: typedef QValueListNode<T>* NodePtr; typedef T value_type; typedef size_t size_type; typedef int difference_type; typedef T* pointer; typedef T& reference; NodePtr node; QValueListIterator() : node( 0 ) {} QValueListIterator( NodePtr p ) : node( p ) {} QValueListIterator( const QValueListIterator<T>& it ) : node( it.node ) {} bool operator==( const QValueListIterator<T>& it ) const { return node == it.node; } bool operator!=( const QValueListIterator<T>& it ) const { return node != it.node; } const T& operator*() const { return node->data; } T& operator*() { return node->data; } QValueListIterator<T>& operator++() { node = node->next; return *this; } QValueListIterator<T> operator++(int) { QValueListIterator<T> tmp = *this; node = node->next; return tmp; } QValueListIterator<T>& operator--() { node = node->prev; return *this; } QValueListIterator<T> operator--(int) { QValueListIterator<T> tmp = *this; node = node->prev; return tmp; } QValueListIterator<T>& operator+=( int j ) { while ( j-- ) node = node->next; return *this; } QValueListIterator<T>& operator-=( int j ) { while ( j-- ) node = node->prev; return *this; } };
77 template<class T> class QValueListConstIterator { public: typedef QValueListNode<T>* NodePtr; typedef T value_type; typedef size_t size_type; typedef int difference_type; typedef const T* pointer; typedef const T& reference; NodePtr node; QValueListConstIterator() : node( 0 ) {} QValueListConstIterator( NodePtr p ) : node( p ) {} QValueListConstIterator( const QValueListConstIterator<T>& it ) : node( it.node ) {} QValueListConstIterator( const QValueListIterator<T>& it ) : node( it.node ) {} bool operator==( const QValueListConstIterator<T>& it ) const { return node == it.node; } bool operator!=( const QValueListConstIterator<T>& it ) const { return node != it.node; } const T& operator*() const { return node->data; } QValueListConstIterator<T>& operator++() { node = node->next; return *this; } QValueListConstIterator<T> operator++(int) { QValueListConstIterator<T> tmp = *this; node = node->next; return tmp; } QValueListConstIterator<T>& operator--() { node = node->prev; return *this; } QValueListConstIterator<T> operator--(int) { QValueListConstIterator<T> tmp = *this; node = node->prev; return tmp; } };
78 template <class T> class QValueListPrivate : public QShared { public: typedef QValueListIterator<T> Iterator; typedef QValueListConstIterator<T> ConstIterator; typedef QValueListNode<T> Node; typedef QValueListNode<T>* NodePtr; typedef size_t size_type; QValueListPrivate(); QValueListPrivate( const QValueListPrivate<T>& _p ); void derefAndDelete() { if ( deref() ) delete this; } ~QValueListPrivate(); Iterator insert( Iterator it, const T& x ); Iterator remove( Iterator it ); NodePtr find( NodePtr start, const T& x ) const; int findIndex( NodePtr start, const T& x ) const; uint contains( const T& x ) const; uint remove( const T& x ); NodePtr at( size_type i ) const; void clear(); NodePtr node; size_type nodes; };
79 template <class T> class QValueList { public: typedef QValueListIterator<T> iterator; typedef QValueListConstIterator<T> const_iterator; typedef T value_type; typedef value_type* pointer; typedef const value_type* const_pointer; typedef value_type& reference; typedef const value_type& const_reference; typedef size_t size_type; typedef int difference_type; QValueList() { sh = new QValueListPrivate<T>; } QValueList( const QValueList<T>& l ) { sh = l.sh; sh->ref(); } ~QValueList() { sh->derefAndDelete(); } QValueList<T>& operator= ( const QValueList<T>& l ) { l.sh->ref(); sh->derefAndDelete(); sh = l.sh; return *this; } bool operator== ( const QValueList<T>& l ) const; bool operator!= ( const QValueList<T>& l ) const { return !( *this == l ); } iterator begin() { detach(); return iterator( sh->node->next ); } const_iterator begin() const { return const_iterator( sh->node->next ); } const_iterator constBegin() const { return const_iterator( sh->node->next ); } iterator end() { detach(); return iterator( sh->node ); } const_iterator end() const { return const_iterator( sh->node ); } const_iterator constEnd() const { return const_iterator( sh->node ); } iterator insert( iterator it, const T& x ) { detach(); return sh->insert( it, x ); } uint remove( const T& x ) { detach(); return sh->remove( x ); } void clear(); QValueList<T>& operator<< ( const T& x ) { append( x ); return *this; } size_type size() const { return sh->nodes; } bool empty() const { return sh->nodes == 0; } void push_front( const T& x ) { detach(); sh->insert( begin(), x ); } void push_back( const T& x ) { detach(); sh->insert( end(), x ); } iterator erase( iterator pos ) { detach(); return sh->remove( pos ); } iterator erase( iterator first, iterator last ); reference front() { ; return *begin(); } const_reference front() const { ; return *begin(); } reference back() { ; return *(--end()); } const_reference back() const { ; return *(--end()); } void pop_front() { ; erase( begin() ); } void pop_back() { ; iterator tmp = end(); erase( --tmp ); } void insert( iterator pos, size_type n, const T& x ); QValueList<T> operator+ ( const QValueList<T>& l ) const; QValueList<T>& operator+= ( const QValueList<T>& l ); iterator fromLast() { detach(); return iterator( sh->node->prev ); } const_iterator fromLast() const { return const_iterator( sh->node->prev ); } bool isEmpty() const { return ( sh->nodes == 0 ); } iterator append( const T& x ) { detach(); return sh->insert( end(), x ); } iterator prepend( const T& x ) { detach(); return sh->insert( begin(), x ); } iterator remove( iterator it ) { detach(); return sh->remove( it ); } T& first() { ; detach(); return sh->node->next->data; } const T& first() const { ; return sh->node->next->data; } T& last() { ; detach(); return sh->node->prev->data; } const T& last() const { ; return sh->node->prev->data; } T& operator[] ( size_type i ) { ; detach(); return sh->at(i)->data; } const T& operator[] ( size_type i ) const { ; return sh->at(i)->data; } iterator at( size_type i ) { ; detach(); return iterator( sh->at(i) ); } const_iterator at( size_type i ) const { ; return const_iterator( sh->at(i) ); } iterator find ( const T& x ) { detach(); return iterator( sh->find( sh->node->next, x) ); } const_iterator find ( const T& x ) const { return const_iterator( sh->find( sh->node->next, x) ); } iterator find ( iterator it, const T& x ) { detach(); return iterator( sh->find( it.node, x ) ); } const_iterator find ( const_iterator it, const T& x ) const { return const_iterator( sh->find( it.node, x ) ); } int findIndex( const T& x ) const { return sh->findIndex( sh->node->next, x) ; } size_type contains( const T& x ) const { return sh->contains( x ); } size_type count() const { return sh->nodes; } QValueList<T>& operator+= ( const T& x ) { append( x ); return *this; } typedef QValueListIterator<T> Iterator; typedef QValueListConstIterator<T> ConstIterator; typedef T ValueType; protected: void detach() { if ( sh->count > 1 ) detachInternal(); } QValueListPrivate<T>* sh; private: void detachInternal(); friend class QDeepCopy< QValueList<T> >; };
80 class __attribute__((visibility("default"))) QMimeSource { friend class QClipboardData; public: QMimeSource(); virtual ~QMimeSource(); virtual const char* format( int n = 0 ) const = 0; virtual bool provides( const char* ) const; virtual QByteArray encodedData( const char* ) const = 0; int serialNumber() const; private: int ser_no; enum { NoCache, Text, Graphics } cacheType; union { struct { QString *str; QCString *subtype; } txt; struct { QImage *img; QPixmap *pix; } gfx; } cache; void clearCache(); friend class QImageDrag; friend class QTextDrag; };
81 class __attribute__((visibility("default"))) QEvent: public Qt { public: enum Type { None = 0, Timer = 1, MouseButtonPress = 2, MouseButtonRelease = 3, MouseButtonDblClick = 4, MouseMove = 5, KeyPress = 6, KeyRelease = 7, FocusIn = 8, FocusOut = 9, Enter = 10, Leave = 11, Paint = 12, Move = 13, Resize = 14, Create = 15, Destroy = 16, Show = 17, Hide = 18, Close = 19, Quit = 20, Reparent = 21, ShowMinimized = 22, ShowNormal = 23, WindowActivate = 24, WindowDeactivate = 25, ShowToParent = 26, HideToParent = 27, ShowMaximized = 28, ShowFullScreen = 29, Accel = 30, Wheel = 31, AccelAvailable = 32, CaptionChange = 33, IconChange = 34, ParentFontChange = 35, ApplicationFontChange = 36, ParentPaletteChange = 37, ApplicationPaletteChange = 38, PaletteChange = 39, Clipboard = 40, Speech = 42, SockAct = 50, AccelOverride = 51, DeferredDelete = 52, DragEnter = 60, DragMove = 61, DragLeave = 62, Drop = 63, DragResponse = 64, ChildInserted = 70, ChildRemoved = 71, LayoutHint = 72, ShowWindowRequest = 73, WindowBlocked = 74, WindowUnblocked = 75, ActivateControl = 80, DeactivateControl = 81, ContextMenu = 82, IMStart = 83, IMCompose = 84, IMEnd = 85, Accessibility = 86, TabletMove = 87, LocaleChange = 88, LanguageChange = 89, LayoutDirectionChange = 90, Style = 91, TabletPress = 92, TabletRelease = 93, OkRequest = 94, HelpRequest = 95, WindowStateChange = 96, IconDrag = 97, User = 1000, MaxUser = 65535 }; QEvent( Type type ) : t(type), posted(FALSE), spont(FALSE) {} virtual ~QEvent(); Type type() const { return t; } bool spontaneous() const { return spont; } protected: Type t; private: uint posted : 1; uint spont : 1; friend class QApplication; friend class QAccelManager; friend class QBaseApplication; friend class QETWidget; };
82 class __attribute__((visibility("default"))) QTimerEvent : public QEvent { public: QTimerEvent( int timerId ) : QEvent(Timer), id(timerId) {} int timerId() const { return id; } protected: int id; };
83 class __attribute__((visibility("default"))) QMouseEvent : public QEvent { public: QMouseEvent( Type type, const QPoint &pos, int button, int state ); QMouseEvent( Type type, const QPoint &pos, const QPoint&globalPos, int button, int state ) : QEvent(type), p(pos), g(globalPos), b((ushort)button),s((ushort)state),accpt(TRUE) {}; const QPoint &pos() const { return p; } const QPoint &globalPos() const { return g; } int x() const { return p.x(); } int y() const { return p.y(); } int globalX() const { return g.x(); } int globalY() const { return g.y(); } ButtonState button() const { return (ButtonState) b; } ButtonState state() const { return (ButtonState) s; } ButtonState stateAfter() const; bool isAccepted() const { return accpt; } void accept() { accpt = TRUE; } void ignore() { accpt = FALSE; } protected: QPoint p; QPoint g; ushort b; ushort s; uint accpt:1; };
84 class __attribute__((visibility("default"))) QWheelEvent : public QEvent { public: QWheelEvent( const QPoint &pos, int delta, int state, Orientation orient = Vertical ); QWheelEvent( const QPoint &pos, const QPoint& globalPos, int delta, int state, Orientation orient = Vertical ) : QEvent(Wheel), p(pos), g(globalPos), d(delta), s((ushort)state), accpt(TRUE), o(orient) {} int delta() const { return d; } const QPoint &pos() const { return p; } const QPoint &globalPos() const { return g; } int x() const { return p.x(); } int y() const { return p.y(); } int globalX() const { return g.x(); } int globalY() const { return g.y(); } ButtonState state() const { return ButtonState(s); } Orientation orientation() const { return o; } bool isAccepted() const { return accpt; } void accept() { accpt = TRUE; } void ignore() { accpt = FALSE; } protected: QPoint p; QPoint g; int d; ushort s; bool accpt; Orientation o; };
85 class __attribute__((visibility("default"))) QTabletEvent : public QEvent { public: enum TabletDevice { NoDevice = -1, Puck, Stylus, Eraser }; QTabletEvent( Type t, const QPoint &pos, const QPoint &globalPos, int device, int pressure, int xTilt, int yTilt, const QPair<int,int> &uId ); QTabletEvent( const QPoint &pos, const QPoint &globalPos, int device, int pressure, int xTilt, int yTilt, const QPair<int,int> &uId ) : QEvent( TabletMove ), mPos( pos ), mGPos( globalPos ), mDev( device ), mPress( pressure ), mXT( xTilt ), mYT( yTilt ), mType( uId.first ), mPhy( uId.second ), mbAcc(TRUE) {} int pressure() const { return mPress; } int xTilt() const { return mXT; } int yTilt() const { return mYT; } const QPoint &pos() const { return mPos; } const QPoint &globalPos() const { return mGPos; } int x() const { return mPos.x(); } int y() const { return mPos.y(); } int globalX() const { return mGPos.x(); } int globalY() const { return mGPos.y(); } TabletDevice device() const { return TabletDevice(mDev); } int isAccepted() const { return mbAcc; } void accept() { mbAcc = TRUE; } void ignore() { mbAcc = FALSE; } QPair<int,int> uniqueId() { return QPair<int,int>( mType, mPhy); } protected: QPoint mPos; QPoint mGPos; int mDev, mPress, mXT, mYT, mType, mPhy; bool mbAcc; };
86 class __attribute__((visibility("default"))) QKeyEvent : public QEvent { public: QKeyEvent( Type type, int key, int ascii, int state, const QString& text=QString::null, bool autorep=FALSE, ushort count=1 ) : QEvent(type), txt(text), k((ushort)key), s((ushort)state), a((uchar)ascii), accpt(TRUE), autor(autorep), c(count) { if ( key >= Key_Back && key <= Key_MediaLast ) accpt = FALSE; } int key() const { return k; } int ascii() const { return a; } ButtonState state() const { return ButtonState(s); } ButtonState stateAfter() const; bool isAccepted() const { return accpt; } QString text() const { return txt; } bool isAutoRepeat() const { return autor; } int count() const { return int(c); } void accept() { accpt = TRUE; } void ignore() { accpt = FALSE; } protected: QString txt; ushort k, s; uchar a; uint accpt:1; uint autor:1; ushort c; };
87 class __attribute__((visibility("default"))) QFocusEvent : public QEvent { public: QFocusEvent( Type type ) : QEvent(type) {} bool gotFocus() const { return type() == FocusIn; } bool lostFocus() const { return type() == FocusOut; } enum Reason { Mouse, Tab, Backtab, ActiveWindow, Popup, Shortcut, Other }; static Reason reason(); static void setReason( Reason reason ); static void resetReason(); private: static Reason m_reason; static Reason prev_reason; };
88 class __attribute__((visibility("default"))) QPaintEvent : public QEvent { public: QPaintEvent( const QRegion& paintRegion, bool erased = TRUE) : QEvent(Paint), rec(paintRegion.boundingRect()), reg(paintRegion), erase(erased){} QPaintEvent( const QRect &paintRect, bool erased = TRUE ) : QEvent(Paint), rec(paintRect), reg(paintRect), erase(erased){} QPaintEvent( const QRegion &paintRegion, const QRect &paintRect, bool erased = TRUE ) : QEvent(Paint), rec(paintRect), reg(paintRegion), erase(erased){} const QRect &rect() const { return rec; } const QRegion &region() const { return reg; } bool erased() const { return erase; } protected: friend class QApplication; friend class QBaseApplication; QRect rec; QRegion reg; bool erase; };
89 class __attribute__((visibility("default"))) QMoveEvent : public QEvent { public: QMoveEvent( const QPoint &pos, const QPoint &oldPos ) : QEvent(Move), p(pos), oldp(oldPos) {} const QPoint &pos() const { return p; } const QPoint &oldPos()const { return oldp;} protected: QPoint p, oldp; friend class QApplication; friend class QBaseApplication; };
90 class __attribute__((visibility("default"))) QResizeEvent : public QEvent { public: QResizeEvent( const QSize &size, const QSize &oldSize ) : QEvent(Resize), s(size), olds(oldSize) {} const QSize &size() const { return s; } const QSize &oldSize()const { return olds;} protected: QSize s, olds; friend class QApplication; friend class QBaseApplication; };
91 class __attribute__((visibility("default"))) QCloseEvent : public QEvent { public: QCloseEvent() : QEvent(Close), accpt(FALSE) {} bool isAccepted() const { return accpt; } void accept() { accpt = TRUE; } void ignore() { accpt = FALSE; } protected: bool accpt; };
92 class __attribute__((visibility("default"))) QShowEvent : public QEvent { public: QShowEvent() : QEvent(Show) {} };
93 class __attribute__((visibility("default"))) QHideEvent : public QEvent { public: QHideEvent() : QEvent(Hide) {} };
94 class __attribute__((visibility("default"))) QContextMenuEvent : public QEvent { public: enum Reason { Mouse, Keyboard, Other }; QContextMenuEvent( Reason reason, const QPoint &pos, const QPoint &globalPos, int state ) : QEvent( ContextMenu ), p( pos ), gp( globalPos ), accpt( TRUE ), consum( TRUE ), reas( reason ), s((ushort)state) {} QContextMenuEvent( Reason reason, const QPoint &pos, int state ); int x() const { return p.x(); } int y() const { return p.y(); } int globalX() const { return gp.x(); } int globalY() const { return gp.y(); } const QPoint& pos() const { return p; } const QPoint& globalPos() const { return gp; } ButtonState state() const { return (ButtonState) s; } bool isAccepted() const { return accpt; } bool isConsumed() const { return consum; } void consume() { accpt = FALSE; consum = TRUE; } void accept() { accpt = TRUE; consum = TRUE; } void ignore() { accpt = FALSE; consum = FALSE; } Reason reason() const { return Reason( reas ); } protected: QPoint p; QPoint gp; bool accpt; bool consum; uint reas:8; ushort s; };
95 class __attribute__((visibility("default"))) QIMEvent : public QEvent { public: QIMEvent( Type type, const QString &text, int cursorPosition ) : QEvent(type), txt(text), cpos(cursorPosition), a(TRUE) {} const QString &text() const { return txt; } int cursorPos() const { return cpos; } bool isAccepted() const { return a; } void accept() { a = TRUE; } void ignore() { a = FALSE; } int selectionLength() const; private: QString txt; int cpos; bool a; };
96 class __attribute__((visibility("default"))) QDropEvent : public QEvent, public QMimeSource { public: QDropEvent( const QPoint& pos, Type typ=Drop ) : QEvent(typ), p(pos), act(0), accpt(0), accptact(0), resv(0), d(0) {} const QPoint &pos() const { return p; } bool isAccepted() const { return accpt || accptact; } void accept(bool y=TRUE) { accpt = y; } void ignore() { accpt = FALSE; } bool isActionAccepted() const { return accptact; } void acceptAction(bool y=TRUE) { accptact = y; } enum Action { Copy, Link, Move, Private, UserAction=100 }; void setAction( Action a ) { act = (uint)a; } Action action() const { return Action(act); } QWidget* source() const; const char* format( int n = 0 ) const; QByteArray encodedData( const char* ) const; bool provides( const char* ) const; QByteArray data(const char* f) const { return encodedData(f); } void setPoint( const QPoint& np ) { p = np; } protected: QPoint p; uint act:8; uint accpt:1; uint accptact:1; uint resv:5; void * d; };
97 class __attribute__((visibility("default"))) QDragMoveEvent : public QDropEvent { public: QDragMoveEvent( const QPoint& pos, Type typ=DragMove ) : QDropEvent(pos,typ), rect( pos, QSize( 1, 1 ) ) {} QRect answerRect() const { return rect; } void accept( bool y=TRUE ) { QDropEvent::accept(y); } void accept( const QRect & r) { accpt = TRUE; rect = r; } void ignore( const QRect & r) { accpt =FALSE; rect = r; } void ignore() { QDropEvent::ignore(); } protected: QRect rect; };
98 class __attribute__((visibility("default"))) QDragEnterEvent : public QDragMoveEvent { public: QDragEnterEvent( const QPoint& pos ) : QDragMoveEvent(pos, DragEnter) { } };
99 class __attribute__((visibility("default"))) QDragLeaveEvent : public QEvent { public: QDragLeaveEvent() : QEvent(DragLeave) {} };
100 class __attribute__((visibility("default"))) QChildEvent : public QEvent { public: QChildEvent( Type type, QObject *child ) : QEvent(type), c(child) {} QObject *child() const { return c; } bool inserted() const { return t == ChildInserted; } bool removed() const { return t == ChildRemoved; } protected: QObject *c; };
101 class __attribute__((visibility("default"))) QCustomEvent : public QEvent { public: QCustomEvent( int type ); QCustomEvent( Type type, void *data ) : QEvent(type), d(data) {}; void *data() const { return d; } void setData( void* data ) { d = data; } private: void *d; };
102 class QVariant;
103 class QPostEventList;
104 class QSenderObjectList;
105 class QObjectPrivate;
106 class QObjectUserData;
107 class __attribute__((visibility("default"))) QObject: public Qt { public: virtual QMetaObject *metaObject() const { return staticMetaObject(); } virtual const char *className() const; virtual void* qt_cast( const char* ); virtual bool qt_invoke( int, QUObject* ); virtual bool qt_emit( int, QUObject* ); virtual bool qt_property( int id, int f, QVariant* v); static bool qt_static_property( QObject* , int, int, QVariant* ); static QMetaObject* staticMetaObject(); QObject* qObject() { return (QObject*)this; } private: static QMetaObject *metaObj; public: QObject( QObject *parent=0, const char *name=0 ); virtual ~QObject(); virtual bool event( QEvent * ); virtual bool eventFilter( QObject *, QEvent * ); bool isA( const char * ) const; bool inherits( const char * ) const; const char *name() const; const char *name( const char * defaultName ) const; virtual void setName( const char *name ); bool isWidgetType() const { return isWidget; } bool highPriority() const { return FALSE; } bool signalsBlocked() const { return blockSig; } void blockSignals( bool b ); int startTimer( int interval ); void killTimer( int id ); void killTimers(); QObject *child( const char *objName, const char *inheritsClass = 0, bool recursiveSearch = TRUE ); const QObjectList *children() const { return childObjects; } static const QObjectList *objectTrees(); QObjectList *queryList( const char *inheritsClass = 0, const char *objName = 0, bool regexpMatch = TRUE, bool recursiveSearch = TRUE ) const; virtual void insertChild( QObject * ); virtual void removeChild( QObject * ); void installEventFilter( const QObject * ); void removeEventFilter( const QObject * ); static bool connect( const QObject *sender, const char *signal, const QObject *receiver, const char *member ); bool connect( const QObject *sender, const char *signal, const char *member ) const; static bool disconnect( const QObject *sender, const char *signal, const QObject *receiver, const char *member ); bool disconnect( const char *signal=0, const QObject *receiver=0, const char *member=0 ); bool disconnect( const QObject *receiver, const char *member=0 ); static void connectInternal( const QObject *sender, int signal_index, const QObject *receiver, int membcode, int member_index ); static bool disconnectInternal( const QObject *sender, int signal_index, const QObject *receiver, int membcode, int member_index ); void dumpObjectTree(); void dumpObjectInfo(); virtual bool setProperty( const char *name, const QVariant& value ); virtual QVariant property( const char *name ) const; static QString tr( const char *sourceText, const char * = 0); static QString trUtf8( const char *sourceText, const char * = 0); static uint registerUserData(); void setUserData( uint id, QObjectUserData* data); QObjectUserData* userData( uint id ) const; protected: void destroyed(); void destroyed( QObject* obj ); public: QObject *parent() const { return parentObj; } public : void deleteLater(); private : void cleanupEventFilter( QObject* ); protected: bool activate_filters( QEvent * ); QConnectionList *receivers( const char* signal ) const; QConnectionList *receivers( int signal ) const; void activate_signal( int signal ); void activate_signal( int signal, int ); void activate_signal( int signal, double ); void activate_signal( int signal, QString ); void activate_signal_bool( int signal, bool ); void activate_signal( QConnectionList *clist, QUObject *o ); const QObject *sender(); virtual void timerEvent( QTimerEvent * ); virtual void childEvent( QChildEvent * ); virtual void customEvent( QCustomEvent * ); virtual void connectNotify( const char *signal ); virtual void disconnectNotify( const char *signal ); virtual bool checkConnectArgs( const char *signal, const QObject *receiver, const char *member ); static QCString normalizeSignalSlot( const char *signalSlot ); private: uint isSignal : 1; uint isWidget : 1; uint pendTimer : 1; uint blockSig : 1; uint wasDeleted : 1; uint isTree : 1; const char *objname; QObject *parentObj; QObjectList *childObjects; QSignalVec *connections; QSenderObjectList *senderObjects; QObjectList *eventFilters; QPostEventList *postedEvents; QObjectPrivate* d; static QMetaObject* staticQtMetaObject(); friend class QApplication; friend class QBaseApplication; friend class QWidget; friend class QSignal; private: QObject( const QObject & ); QObject &operator=( const QObject & ); };
108 class QTextItem;
109 struct QPaintDeviceX11Data;
110 union QPDevCmdParam { int ival; int *ivec; QString *str; const QPoint *point; const QRect *rect; const QPointArray *ptarr; const QPixmap *pixmap; const QImage *image; const QColor *color; const QFont *font; const QPen *pen; const QBrush *brush; const QRegion *rgn; const QWMatrix *matrix; const QTextItem *textItem; QIODevice *device; };
111 class __attribute__((visibility("default"))) QPaintDevice { public: virtual ~QPaintDevice(); int devType() const; bool isExtDev() const; bool paintingActive() const; virtual void setResolution( int ); virtual int resolution() const; virtual Qt::HANDLE handle() const; virtual Qt::HANDLE x11RenderHandle() const; Display *x11Display() const; int x11Screen() const; int x11Depth() const; int x11Cells() const; Qt::HANDLE x11Colormap() const; bool x11DefaultColormap() const; void *x11Visual() const; bool x11DefaultVisual() const; static Display *x11AppDisplay(); static int x11AppScreen(); static int x11AppDpiX(); static int x11AppDpiY(); static void x11SetAppDpiX(int); static void x11SetAppDpiY(int); static int x11AppDepth(); static int x11AppCells(); static Qt::HANDLE x11AppRootWindow(); static Qt::HANDLE x11AppColormap(); static bool x11AppDefaultColormap(); static void *x11AppVisual(); static bool x11AppDefaultVisual(); static int x11AppDepth( int screen ); static int x11AppCells( int screen ); static Qt::HANDLE x11AppRootWindow( int screen ); static Qt::HANDLE x11AppColormap( int screen ); static void *x11AppVisual( int screen ); static bool x11AppDefaultColormap( int screen ); static bool x11AppDefaultVisual( int screen ); static int x11AppDpiX( int ); static int x11AppDpiY( int ); static void x11SetAppDpiX( int, int ); static void x11SetAppDpiY( int, int ); enum PDevCmd { PdcNOP = 0, PdcDrawPoint = 1, PdcDrawFirst = PdcDrawPoint, PdcMoveTo = 2, PdcLineTo = 3, PdcDrawLine = 4, PdcDrawRect = 5, PdcDrawRoundRect = 6, PdcDrawEllipse = 7, PdcDrawArc = 8, PdcDrawPie = 9, PdcDrawChord = 10, PdcDrawLineSegments = 11, PdcDrawPolyline = 12, PdcDrawPolygon = 13, PdcDrawCubicBezier = 14, PdcDrawText = 15, PdcDrawTextFormatted = 16, PdcDrawPixmap = 17, PdcDrawImage = 18, PdcDrawText2 = 19, PdcDrawText2Formatted = 20, PdcDrawTextItem = 21, PdcDrawLast = PdcDrawTextItem, PdcBegin = 30, PdcEnd = 31, PdcSave = 32, PdcRestore = 33, PdcSetdev = 34, PdcSetBkColor = 40, PdcSetBkMode = 41, PdcSetROP = 42, PdcSetBrushOrigin = 43, PdcSetFont = 45, PdcSetPen = 46, PdcSetBrush = 47, PdcSetTabStops = 48, PdcSetTabArray = 49, PdcSetUnit = 50, PdcSetVXform = 51, PdcSetWindow = 52, PdcSetViewport = 53, PdcSetWXform = 54, PdcSetWMatrix = 55, PdcSaveWMatrix = 56, PdcRestoreWMatrix = 57, PdcSetClip = 60, PdcSetClipRegion = 61, PdcReservedStart = 0, PdcReservedStop = 199 }; protected: QPaintDevice( uint devflags ); Qt::HANDLE hd; Qt::HANDLE rendhd; void copyX11Data( const QPaintDevice * ); void cloneX11Data( const QPaintDevice * ); virtual void setX11Data( const QPaintDeviceX11Data* ); QPaintDeviceX11Data* getX11Data( bool def=FALSE ) const; virtual bool cmd( int, QPainter *, QPDevCmdParam * ); virtual int metric( int ) const; virtual int fontMet( QFont *, int, const char * = 0, int = 0 ) const; virtual int fontInf( QFont *, int ) const; ushort devFlags; ushort painters; friend class QPainter; friend class QPaintDeviceMetrics; friend __attribute__((visibility("default"))) void bitBlt( QPaintDevice *, int, int, const QPaintDevice *, int, int, int, int, Qt::RasterOp, bool ); friend void qt_init_internal( int *, char **, Display *, Qt::HANDLE, Qt::HANDLE ); friend void qt_cleanup(); private: static Display *x_appdisplay; static int x_appscreen; static int x_appdepth; static int x_appcells; static Qt::HANDLE x_approotwindow; static Qt::HANDLE x_appcolormap; static bool x_appdefcolormap; static void *x_appvisual; static bool x_appdefvisual; static int *x_appdepth_arr; static int *x_appcells_arr; static Qt::HANDLE *x_approotwindow_arr; static Qt::HANDLE *x_appcolormap_arr; static bool *x_appdefcolormap_arr; static void **x_appvisual_arr; static bool *x_appdefvisual_arr; QPaintDeviceX11Data* x11Data; private: QPaintDevice( const QPaintDevice & ); QPaintDevice &operator=( const QPaintDevice & ); };
112 class QGVector;
113 class __attribute__((visibility("default"))) QPtrCollection { public: bool autoDelete() const { return del_item; } void setAutoDelete( bool enable ) { del_item = enable; } virtual uint count() const = 0; virtual void clear() = 0; typedef void *Item; protected: QPtrCollection() { del_item = FALSE; } QPtrCollection(const QPtrCollection &) { del_item = FALSE; } virtual ~QPtrCollection() {} bool del_item; virtual Item newItem( Item ); virtual void deleteItem( Item ) = 0; };
114 class __attribute__((visibility("default"))) QLNode { friend class QGList; friend class QGListIterator; friend class QGListStdIterator; public: QPtrCollection::Item getData() { return data; } private: QPtrCollection::Item data; QLNode *prev; QLNode *next; QLNode( QPtrCollection::Item d ) { data = d; } };
115 class QGListIteratorList;
116 class __attribute__((visibility("default"))) QGList : public QPtrCollection { friend class QGListIterator; friend class QGListIteratorList; friend class QGVector; public: uint count() const; QDataStream &read( QDataStream & ); QDataStream &write( QDataStream & ) const; protected: QGList(); QGList( const QGList & ); virtual ~QGList(); QGList &operator=( const QGList & ); bool operator==( const QGList& ) const; void inSort( QPtrCollection::Item ); void append( QPtrCollection::Item ); bool insertAt( uint index, QPtrCollection::Item ); void relinkNode( QLNode * ); bool removeNode( QLNode * ); bool remove( QPtrCollection::Item = 0 ); bool removeRef( QPtrCollection::Item = 0 ); bool removeFirst(); bool removeLast(); bool removeAt( uint ); bool replaceAt( uint, QPtrCollection::Item ); QPtrCollection::Item takeNode( QLNode * ); QPtrCollection::Item take(); QPtrCollection::Item takeAt( uint index ); QPtrCollection::Item takeFirst(); QPtrCollection::Item takeLast(); void sort(); void clear(); int findRef( QPtrCollection::Item, bool = TRUE ); int find( QPtrCollection::Item, bool = TRUE ); uint containsRef( QPtrCollection::Item ) const; uint contains( QPtrCollection::Item ) const; QPtrCollection::Item at( uint index ); int at() const; QLNode *currentNode() const; QPtrCollection::Item get() const; QPtrCollection::Item cfirst() const; QPtrCollection::Item clast() const; QPtrCollection::Item first(); QPtrCollection::Item last(); QPtrCollection::Item next(); QPtrCollection::Item prev(); void toVector( QGVector * ) const; virtual int compareItems( QPtrCollection::Item, QPtrCollection::Item ); virtual QDataStream &read( QDataStream &, QPtrCollection::Item & ); virtual QDataStream &write( QDataStream &, QPtrCollection::Item ) const; QLNode* begin() const { return firstNode; } QLNode* end() const { return 0; } QLNode* erase( QLNode* it ); private: void prepend( QPtrCollection::Item ); void heapSortPushDown( QPtrCollection::Item* heap, int first, int last ); QLNode *firstNode; QLNode *lastNode; QLNode *curNode; int curIndex; uint numNodes; QGListIteratorList *iterators; QLNode *locate( uint ); QLNode *unlink(); };
117 class __attribute__((visibility("default"))) QGListStdIterator { public: inline QGListStdIterator( QLNode* n ) : node( n ){} inline operator QLNode* () { return node; } protected: inline QLNode *next() { return node->next; } QLNode *node; };
118 template<class type> class QPtrListStdIterator : public QGListStdIterator { public: inline QPtrListStdIterator( QLNode* n ): QGListStdIterator(n) {} type *operator*() { return node ? (type *)node->getData() : 0; } inline QPtrListStdIterator<type> operator++() { node = next(); return *this; } inline QPtrListStdIterator<type> operator++(int) { QLNode* n = node; node = next(); return QPtrListStdIterator<type>( n ); } inline bool operator==( const QPtrListStdIterator<type>& it ) const { return node == it.node; } inline bool operator!=( const QPtrListStdIterator<type>& it ) const { return node != it.node; } };
119 template<class type> class QPtrList : public QGList { public: QPtrList() {} QPtrList( const QPtrList<type> &l ) : QGList(l) {} ~QPtrList() { clear(); } QPtrList<type> &operator=(const QPtrList<type> &l) { return (QPtrList<type>&)QGList::operator=(l); } bool operator==( const QPtrList<type> &list ) const { return QGList::operator==( list ); } bool operator!=( const QPtrList<type> &list ) const { return !QGList::operator==( list ); } uint count() const { return QGList::count(); } bool isEmpty() const { return QGList::count() == 0; } bool insert( uint i, const type *d){ return QGList::insertAt(i,(QPtrCollection::Item)d); } void inSort( const type *d ) { QGList::inSort((QPtrCollection::Item)d); } void prepend( const type *d ) { QGList::insertAt(0,(QPtrCollection::Item)d); } void append( const type *d ) { QGList::append((QPtrCollection::Item)d); } bool remove( uint i ) { return QGList::removeAt(i); } bool remove() { return QGList::remove((QPtrCollection::Item)0); } bool remove( const type *d ) { return QGList::remove((QPtrCollection::Item)d); } bool removeRef( const type *d ) { return QGList::removeRef((QPtrCollection::Item)d); } void removeNode( QLNode *n ) { QGList::removeNode(n); } bool removeFirst() { return QGList::removeFirst(); } bool removeLast() { return QGList::removeLast(); } type *take( uint i ) { return (type *)QGList::takeAt(i); } type *take() { return (type *)QGList::take(); } type *takeNode( QLNode *n ) { return (type *)QGList::takeNode(n); } void clear() { QGList::clear(); } void sort() { QGList::sort(); } int find( const type *d ) { return QGList::find((QPtrCollection::Item)d); } int findNext( const type *d ) { return QGList::find((QPtrCollection::Item)d,FALSE); } int findRef( const type *d ) { return QGList::findRef((QPtrCollection::Item)d); } int findNextRef( const type *d ){ return QGList::findRef((QPtrCollection::Item)d,FALSE);} uint contains( const type *d ) const { return QGList::contains((QPtrCollection::Item)d); } uint containsRef( const type *d ) const { return QGList::containsRef((QPtrCollection::Item)d); } bool replace( uint i, const type *d ) { return QGList::replaceAt( i, (QPtrCollection::Item)d ); } type *at( uint i ) { return (type *)QGList::at(i); } int at() const { return QGList::at(); } type *current() const { return (type *)QGList::get(); } QLNode *currentNode() const { return QGList::currentNode(); } type *getFirst() const { return (type *)QGList::cfirst(); } type *getLast() const { return (type *)QGList::clast(); } type *first() { return (type *)QGList::first(); } type *last() { return (type *)QGList::last(); } type *next() { return (type *)QGList::next(); } type *prev() { return (type *)QGList::prev(); } void toVector( QGVector *vec )const{ QGList::toVector(vec); } typedef QPtrListStdIterator<type> Iterator; typedef QPtrListStdIterator<type> ConstIterator; inline Iterator begin() { return QGList::begin(); } inline ConstIterator begin() const { return QGList::begin(); } inline ConstIterator constBegin() const { return QGList::begin(); } inline Iterator end() { return QGList::end(); } inline ConstIterator end() const { return QGList::end(); } inline ConstIterator constEnd() const { return QGList::end(); } inline Iterator erase( Iterator it ) { return QGList::erase( it ); } typedef Iterator iterator; typedef ConstIterator const_iterator; private: void deleteItem( Item d ); };
120 class __attribute__((visibility("default"))) QStrList : public QPtrList<char> { public: QStrList( bool deepCopies=TRUE ) { dc = deepCopies; del_item = deepCopies; } QStrList( const QStrList & ); ~QStrList() { clear(); } QStrList& operator=( const QStrList & ); private: QPtrCollection::Item newItem( QPtrCollection::Item d ) { return dc ? qstrdup( (const char*)d ) : d; } void deleteItem( QPtrCollection::Item d ) { if ( del_item ) delete[] (char*)d; } int compareItems( QPtrCollection::Item s1, QPtrCollection::Item s2 ) { return qstrcmp((const char*)s1, (const char*)s2); } QDataStream &read( QDataStream &s, QPtrCollection::Item &d ) { s >> (char *&)d; return s; } QDataStream &write( QDataStream &s, QPtrCollection::Item d ) const { return s << (const char *)d; } bool dc; };
121 class __attribute__((visibility("default"))) QStringList : public QValueList<QString> { public: QStringList() { } QStringList( const QStringList& l ) : QValueList<QString>(l) { } QStringList( const QValueList<QString>& l ) : QValueList<QString>(l) { } QStringList( const QString& i ) { append(i); } QStringList( const char* i ) { append(i); } static QStringList fromStrList(const QStrList&); void sort(); static QStringList split( const QString &sep, const QString &str, bool allowEmptyEntries = FALSE ); static QStringList split( const QChar &sep, const QString &str, bool allowEmptyEntries = FALSE ); static QStringList split( const QRegExp &sep, const QString &str, bool allowEmptyEntries = FALSE ); QString join( const QString &sep ) const; QStringList grep( const QString &str, bool cs = TRUE ) const; QStringList grep( const QRegExp &expr ) const; QStringList& gres( const QString &before, const QString &after, bool cs = TRUE ); QStringList& gres( const QRegExp &expr, const QString &after ); protected: void detach() { QValueList<QString>::detach(); } friend class QDeepCopy< QStringList >; };
122 class __attribute__((visibility("default"))) QColor { public: enum Spec { Rgb, Hsv }; QColor(); QColor( int r, int g, int b ); QColor( int x, int y, int z, Spec ); QColor( QRgb rgb, uint pixel=0xffffffff); QColor( const QString& name ); QColor( const char *name ); QColor( const QColor & ); QColor &operator=( const QColor & ); bool isValid() const; bool isDirty() const; QString name() const; void setNamedColor( const QString& name ); QRgb rgb() const; void setRgb( int r, int g, int b ); void setRgb( QRgb rgb ); void getRgb( int *r, int *g, int *b ) const { rgb( r, g, b ); } void rgb( int *r, int *g, int *b ) const; int red() const; int green() const; int blue() const; void setHsv( int h, int s, int v ); void getHsv( int *h, int *s, int *v ) const { hsv( h, s, v ); } void hsv( int *h, int *s, int *v ) const; void getHsv( int &h, int &s, int &v ) const { hsv( &h, &s, &v ); } QColor light( int f = 150 ) const; QColor dark( int f = 200 ) const; bool operator==( const QColor &c ) const; bool operator!=( const QColor &c ) const; uint alloc(); uint pixel() const; uint alloc( int screen ); uint pixel( int screen ) const; static int maxColors(); static int numBitPlanes(); static int enterAllocContext(); static void leaveAllocContext(); static int currentAllocContext(); static void destroyAllocContext( int ); static void initialize(); static void cleanup(); static QStringList colorNames(); enum { Dirt = 0x44495254, Invalid = 0x49000000 }; private: void setSystemNamedColor( const QString& name ); void setPixel( uint pixel ); static void initGlobalColors(); static uint argbToPix32(QRgb); static QColor* globalColors(); static bool color_init; static bool globals_init; static enum ColorModel { d8, d32 } colormodel; union { QRgb argb; struct D8 { QRgb argb; uchar pix; uchar invalid; uchar dirty; uchar direct; } d8; struct D32 { QRgb argb; uint pix; bool invalid() const { return argb == QColor::Invalid && pix == QColor::Dirt; } bool probablyDirty() const { return pix == QColor::Dirt; } } d32; } d; };
123 class __attribute__((visibility("default"))) QBrush: public Qt { friend class QPainter; public: QBrush(); QBrush( BrushStyle ); QBrush( const QColor &, BrushStyle=SolidPattern ); QBrush( const QColor &, const QPixmap & ); QBrush( const QBrush & ); ~QBrush(); QBrush &operator=( const QBrush & ); BrushStyle style() const { return data->style; } void setStyle( BrushStyle ); const QColor &color()const { return data->color; } void setColor( const QColor & ); QPixmap *pixmap() const { return data->pixmap; } void setPixmap( const QPixmap & ); bool operator==( const QBrush &p ) const; bool operator!=( const QBrush &b ) const { return !(operator==(b)); } private: QBrush copy() const; void detach(); void init( const QColor &, BrushStyle ); struct QBrushData : public QShared { BrushStyle style; QColor color; QPixmap *pixmap; } *data; };
124 class QColorGroupPrivate;
125 class __attribute__((visibility("default"))) QColorGroup { public: QColorGroup(); QColorGroup( const QColor &foreground, const QColor &button, const QColor &light, const QColor &dark, const QColor &mid, const QColor &text, const QColor &base ); QColorGroup( const QBrush &foreground, const QBrush &button, const QBrush &light, const QBrush &dark, const QBrush &mid, const QBrush &text, const QBrush &bright_text, const QBrush &base, const QBrush &background); QColorGroup( const QColorGroup & ); ~QColorGroup(); QColorGroup& operator =(const QColorGroup&); enum ColorRole { Foreground, Button, Light, Midlight, Dark, Mid, Text, BrightText, ButtonText, Base, Background, Shadow, Highlight, HighlightedText, Link, LinkVisited, NColorRoles }; const QColor &color( ColorRole ) const; const QBrush &brush( ColorRole ) const; void setColor( ColorRole, const QColor & ); void setBrush( ColorRole, const QBrush & ); const QColor &foreground() const { return br[Foreground].color(); } const QColor &button() const { return br[Button].color(); } const QColor &light() const { return br[Light].color(); } const QColor &dark() const { return br[Dark].color(); } const QColor &mid() const { return br[Mid].color(); } const QColor &text() const { return br[Text].color(); } const QColor &base() const { return br[Base].color(); } const QColor &background() const { return br[Background].color(); } const QColor &midlight() const { return br[Midlight].color(); } const QColor &brightText() const { return br[BrightText].color(); } const QColor &buttonText() const { return br[ButtonText].color(); } const QColor &shadow() const { return br[Shadow].color(); } const QColor &highlight() const { return br[Highlight].color(); } const QColor &highlightedText() const{return br[HighlightedText].color(); } const QColor &link() const { return br[Link].color(); } const QColor &linkVisited() const { return br[LinkVisited].color(); } bool operator==( const QColorGroup &g ) const; bool operator!=( const QColorGroup &g ) const { return !(operator==(g)); } private: QBrush *br; QColorGroupPrivate * d; friend class QPalette; };
126 class __attribute__((visibility("default"))) QPalette { public: QPalette(); QPalette( const QColor &button ); QPalette( const QColor &button, const QColor &background ); QPalette( const QColorGroup &active, const QColorGroup &disabled, const QColorGroup &inactive ); QPalette( const QPalette & ); ~QPalette(); QPalette &operator=( const QPalette & ); enum ColorGroup { Disabled, Active, Inactive, NColorGroups, Normal=Active }; const QColor &color( ColorGroup, QColorGroup::ColorRole ) const; const QBrush &brush( ColorGroup, QColorGroup::ColorRole ) const; void setColor( ColorGroup, QColorGroup::ColorRole, const QColor & ); void setBrush( ColorGroup, QColorGroup::ColorRole, const QBrush & ); void setColor( QColorGroup::ColorRole, const QColor & ); void setBrush( QColorGroup::ColorRole, const QBrush & ); QPalette copy() const; const QColorGroup &active() const { return data->active; } const QColorGroup &disabled() const { return data->disabled; } const QColorGroup &inactive() const { return data->inactive; } void setActive( const QColorGroup & ); void setDisabled( const QColorGroup & ); void setInactive( const QColorGroup & ); bool operator==( const QPalette &p ) const; bool operator!=( const QPalette &p ) const { return !(operator==(p)); } bool isCopyOf( const QPalette & ); int serialNumber() const { return data->ser_no; } static QColorGroup::ColorRole foregroundRoleFromMode( Qt::BackgroundMode mode ); static QColorGroup::ColorRole backgroundRoleFromMode( Qt::BackgroundMode mode); private: void detach(); const QBrush &directBrush( ColorGroup, QColorGroup::ColorRole ) const; void directSetBrush( ColorGroup, QColorGroup::ColorRole, const QBrush& ); struct QPalData : public QShared { QColorGroup disabled; QColorGroup active; int ser_no; QColorGroup inactive; } *data; };
127 class QFontPrivate;
128 class __attribute__((visibility("default"))) QFont { public: enum StyleHint { Helvetica, SansSerif = Helvetica, Times, Serif = Times, Courier, TypeWriter = Courier, OldEnglish, Decorative = OldEnglish, System, AnyStyle }; enum StyleStrategy { PreferDefault = 0x0001, PreferBitmap = 0x0002, PreferDevice = 0x0004, PreferOutline = 0x0008, ForceOutline = 0x0010, PreferMatch = 0x0020, PreferQuality = 0x0040, PreferAntialias = 0x0080, NoAntialias = 0x0100, OpenGLCompatible = 0x0200 }; enum Weight { Light = 25, Normal = 50, DemiBold = 63, Bold = 75, Black = 87 }; enum Stretch { UltraCondensed = 50, ExtraCondensed = 62, Condensed = 75, SemiCondensed = 87, Unstretched = 100, SemiExpanded = 112, Expanded = 125, ExtraExpanded = 150, UltraExpanded = 200 }; QFont(); QFont( const QString &family, int pointSize = -1, int weight = -1, bool italic = FALSE ); QFont( const QFont & ); ~QFont(); QString family() const; void setFamily( const QString &); int pointSize() const; float pointSizeFloat() const; void setPointSize( int ); void setPointSizeFloat( float ); int pixelSize() const; void setPixelSize( int ); void setPixelSizeFloat( float ); int weight() const; void setWeight( int ); bool bold() const; void setBold( bool ); bool italic() const; void setItalic( bool ); bool underline() const; void setUnderline( bool ); bool overline() const; void setOverline( bool ); bool strikeOut() const; void setStrikeOut( bool ); bool fixedPitch() const; void setFixedPitch( bool ); StyleHint styleHint() const; StyleStrategy styleStrategy() const; void setStyleHint( StyleHint, StyleStrategy = PreferDefault ); void setStyleStrategy( StyleStrategy s ); int stretch() const; void setStretch( int ); bool rawMode() const; void setRawMode( bool ); bool exactMatch() const; QFont &operator=( const QFont & ); bool operator==( const QFont & ) const; bool operator!=( const QFont & ) const; bool isCopyOf( const QFont & ) const; Qt::HANDLE handle() const; void setRawName( const QString & ); QString rawName() const; QString key() const; QString toString() const; bool fromString(const QString &); static QString substitute(const QString &); static QStringList substitutes(const QString &); static QStringList substitutions(); static void insertSubstitution(const QString&, const QString &); static void insertSubstitutions(const QString&, const QStringList &); static void removeSubstitution(const QString &); static void initialize(); static void cleanup(); static void cacheStatistics(); enum Script { Latin, Greek, Cyrillic, Armenian, Georgian, Runic, Ogham, SpacingModifiers, CombiningMarks, Hebrew, Arabic, Syriac, Thaana, Devanagari, Bengali, Gurmukhi, Gujarati, Oriya, Tamil, Telugu, Kannada, Malayalam, Sinhala, Thai, Lao, Tibetan, Myanmar, Khmer, Han, Hiragana, Katakana, Hangul, Bopomofo, Yi, Ethiopic, Cherokee, CanadianAboriginal, Mongolian, CurrencySymbols, LetterlikeSymbols, NumberForms, MathematicalOperators, TechnicalSymbols, GeometricSymbols, MiscellaneousSymbols, EnclosedAndSquare, Braille, Unicode, Tagalog, Hanunoo, Buhid, Tagbanwa, KatakanaHalfWidth, Limbu, TaiLe, NScripts, UnknownScript = NScripts, NoScript, Han_Japanese, Han_SimplifiedChinese, Han_TraditionalChinese, Han_Korean, LastPrivateScript }; QString defaultFamily() const; QString lastResortFamily() const; QString lastResortFont() const; QFont resolve( const QFont & ) const; protected: bool dirty() const; int deciPointSize() const; private: QFont( QFontPrivate *, QPaintDevice *pd ); void detach(); void x11SetScreen( int screen = -1 ); int x11Screen() const; friend class QFontMetrics; friend class QFontInfo; friend class QPainter; friend class QPSPrinterFont; friend class QApplication; friend class QWidget; friend class QTextFormatCollection; friend class QTextLayout; friend class QTextItem; friend class QGLContext; friend Qt::HANDLE qt_xft_handle(const QFont &font); friend __attribute__((visibility("default"))) QDataStream &operator<<( QDataStream &, const QFont & ); friend __attribute__((visibility("default"))) QDataStream &operator>>( QDataStream &, QFont & ); QFontPrivate *d; };
129 class __attribute__((visibility("default"))) QSizePolicy { private: enum SizePolicy_Internal { HSize = 6, HMask = 0x3f, VMask = HMask << HSize, MayGrow = 1, ExpMask = 2, MayShrink = 4 }; public: enum SizeType { Fixed = 0, Minimum = MayGrow, Maximum = MayShrink, Preferred = MayGrow | MayShrink, MinimumExpanding = MayGrow | ExpMask, Expanding = MayGrow | MayShrink | ExpMask, Ignored = ExpMask }; enum ExpandData { NoDirection = 0, Horizontally = 1, Vertically = 2, BothDirections = Horizontally | Vertically }; QSizePolicy() : data( 0 ) { } QSizePolicy( SizeType hor, SizeType ver, bool hfw = FALSE ) : data( hor | (ver<<HSize) | (hfw ? (Q_UINT32)(1<<2*HSize) : 0) ) { } QSizePolicy( SizeType hor, SizeType ver, uchar hors, uchar vers, bool hfw = FALSE ); SizeType horData() const { return (SizeType)( data & HMask ); } SizeType verData() const { return (SizeType)( (data & VMask) >> HSize ); } bool mayShrinkHorizontally() const { return horData() & MayShrink || horData() == Ignored; } bool mayShrinkVertically() const { return verData() & MayShrink || verData() == Ignored; } bool mayGrowHorizontally() const { return horData() & MayGrow || horData() == Ignored; } bool mayGrowVertically() const { return verData() & MayGrow || verData() == Ignored; } ExpandData expanding() const { return (ExpandData)( (int)(verData() & ExpMask ? Vertically : 0) | (int)(horData() & ExpMask ? Horizontally : 0) ); } void setHorData( SizeType d ) { data = (Q_UINT32)(data & ~HMask) | d; } void setVerData( SizeType d ) { data = (Q_UINT32)(data & ~(HMask << HSize)) | (d << HSize); } void setHeightForWidth( bool b ) { data = b ? (Q_UINT32)( data | ( 1 << 2*HSize ) ) : (Q_UINT32)( data & ~( 1 << 2*HSize ) ); } bool hasHeightForWidth() const { return data & ( 1 << 2*HSize ); } bool operator==( const QSizePolicy& s ) const { return data == s.data; } bool operator!=( const QSizePolicy& s ) const { return data != s.data; } uint horStretch() const { return data >> 24; } uint verStretch() const { return (data >> 16) & 0xff; } void setHorStretch( uchar sf ) { data = (data&0x00ffffff) | (uint(sf)<<24); } void setVerStretch( uchar sf ) { data = (data&0xff00ffff) | (uint(sf)<<16); } inline void transpose(); private: QSizePolicy( int i ) : data( (Q_UINT32)i ) { } Q_UINT32 data; };
130 class QLayout;
131 struct QWExtra;
132 struct QTLWExtra;
133 class QFocusData;
134 class QStyle;
135 class __attribute__((visibility("default"))) QWidget : public QObject, public QPaintDevice { public: virtual QMetaObject *metaObject() const { return staticMetaObject(); } virtual const char *className() const; virtual void* qt_cast( const char* ); virtual bool qt_invoke( int, QUObject* ); virtual bool qt_emit( int, QUObject* ); virtual bool qt_property( int id, int f, QVariant* v); static bool qt_static_property( QObject* , int, int, QVariant* ); static QMetaObject* staticMetaObject(); QObject* qObject() { return (QObject*)this; } private: static QMetaObject *metaObj; public: explicit QWidget( QWidget* parent=0, const char* name=0, WFlags f=0 ); ~QWidget(); WId winId() const; void setName( const char *name ); QStyle &style() const; void setStyle( QStyle * ); QStyle* setStyle( const QString& ); bool isTopLevel() const; bool isDialog() const; bool isPopup() const; bool isDesktop() const; bool isModal() const; bool isEnabled() const; bool isEnabledTo(QWidget*) const; bool isEnabledToTLW() const; public : virtual void setEnabled( bool ); void setDisabled( bool ); public: QRect frameGeometry() const; const QRect &geometry() const; int x() const; int y() const; QPoint pos() const; QSize frameSize() const; QSize size() const; int width() const; int height() const; QRect rect() const; QRect childrenRect() const; QRegion childrenRegion() const; QSize minimumSize() const; QSize maximumSize() const; int minimumWidth() const; int minimumHeight() const; int maximumWidth() const; int maximumHeight() const; void setMinimumSize( const QSize & ); virtual void setMinimumSize( int minw, int minh ); void setMaximumSize( const QSize & ); virtual void setMaximumSize( int maxw, int maxh ); void setMinimumWidth( int minw ); void setMinimumHeight( int minh ); void setMaximumWidth( int maxw ); void setMaximumHeight( int maxh ); QSize sizeIncrement() const; void setSizeIncrement( const QSize & ); virtual void setSizeIncrement( int w, int h ); QSize baseSize() const; void setBaseSize( const QSize & ); void setBaseSize( int basew, int baseh ); void setFixedSize( const QSize & ); void setFixedSize( int w, int h ); void setFixedWidth( int w ); void setFixedHeight( int h ); QPoint mapToGlobal( const QPoint & ) const; QPoint mapFromGlobal( const QPoint & ) const; QPoint mapToParent( const QPoint & ) const; QPoint mapFromParent( const QPoint & ) const; QPoint mapTo( QWidget *, const QPoint & ) const; QPoint mapFrom( QWidget *, const QPoint & ) const; QWidget *topLevelWidget() const; BackgroundMode backgroundMode() const; virtual void setBackgroundMode( BackgroundMode ); void setBackgroundMode( BackgroundMode, BackgroundMode ); const QColor & foregroundColor() const; const QColor & eraseColor() const; virtual void setEraseColor( const QColor & ); const QPixmap * erasePixmap() const; virtual void setErasePixmap( const QPixmap & ); const QColorGroup & colorGroup() const; const QPalette & palette() const; bool ownPalette() const; virtual void setPalette( const QPalette & ); void unsetPalette(); const QColor & paletteForegroundColor() const; void setPaletteForegroundColor( const QColor & ); const QColor & paletteBackgroundColor() const; virtual void setPaletteBackgroundColor( const QColor & ); const QPixmap * paletteBackgroundPixmap() const; virtual void setPaletteBackgroundPixmap( const QPixmap & ); const QBrush& backgroundBrush() const; QFont font() const; bool ownFont() const; virtual void setFont( const QFont & ); void unsetFont(); QFontMetrics fontMetrics() const; QFontInfo fontInfo() const; const QCursor &cursor() const; bool ownCursor() const; virtual void setCursor( const QCursor & ); virtual void unsetCursor(); QString caption() const; const QPixmap *icon() const; QString iconText() const; bool hasMouseTracking() const; bool hasMouse() const; virtual void setMask( const QBitmap & ); virtual void setMask( const QRegion & ); void clearMask(); const QColor & backgroundColor() const; virtual void setBackgroundColor( const QColor & ); const QPixmap * backgroundPixmap() const; virtual void setBackgroundPixmap( const QPixmap & ); public : virtual void setCaption( const QString &); virtual void setIcon( const QPixmap & ); virtual void setIconText( const QString &); virtual void setMouseTracking( bool enable ); virtual void setFocus(); void clearFocus(); public: enum FocusPolicy { NoFocus = 0, TabFocus = 0x1, ClickFocus = 0x2, StrongFocus = TabFocus | ClickFocus | 0x8, WheelFocus = StrongFocus | 0x4 }; bool isActiveWindow() const; virtual void setActiveWindow(); bool isFocusEnabled() const; FocusPolicy focusPolicy() const; virtual void setFocusPolicy( FocusPolicy ); bool hasFocus() const; static void setTabOrder( QWidget *, QWidget * ); virtual void setFocusProxy( QWidget * ); QWidget * focusProxy() const; void setInputMethodEnabled( bool b ); bool isInputMethodEnabled() const; void grabMouse(); void grabMouse( const QCursor & ); void releaseMouse(); void grabKeyboard(); void releaseKeyboard(); static QWidget * mouseGrabber(); static QWidget * keyboardGrabber(); bool isUpdatesEnabled() const; public : virtual void setUpdatesEnabled( bool enable ); void update(); void update( int x, int y, int w, int h ); void update( const QRect& ); void repaint(); void repaint( bool erase ); void repaint( int x, int y, int w, int h, bool erase=TRUE ); void repaint( const QRect &, bool erase = TRUE ); void repaint( const QRegion &, bool erase = TRUE ); virtual void show(); virtual void hide(); void setShown( bool show ); void setHidden( bool hide ); virtual void showMinimized(); virtual void showMaximized(); void showFullScreen(); virtual void showNormal(); virtual void polish(); void constPolish() const; bool close(); void raise(); void lower(); void stackUnder( QWidget* ); virtual void move( int x, int y ); void move( const QPoint & ); virtual void resize( int w, int h ); void resize( const QSize & ); virtual void setGeometry( int x, int y, int w, int h ); virtual void setGeometry( const QRect & ); public: virtual bool close( bool alsoDelete ); bool isVisible() const; bool isVisibleTo(QWidget*) const; bool isVisibleToTLW() const; QRect visibleRect() const; bool isHidden() const; bool isShown() const; bool isMinimized() const; bool isMaximized() const; bool isFullScreen() const; uint windowState() const; void setWindowState(uint windowState); virtual QSize sizeHint() const; virtual QSize minimumSizeHint() const; virtual QSizePolicy sizePolicy() const; virtual void setSizePolicy( QSizePolicy ); void setSizePolicy( QSizePolicy::SizeType hor, QSizePolicy::SizeType ver, bool hfw = FALSE ); virtual int heightForWidth(int) const; QRegion clipRegion() const; public : virtual void adjustSize(); public: QLayout * layout() const { return lay_out; } void updateGeometry(); virtual void reparent( QWidget *parent, WFlags, const QPoint &, bool showIt=FALSE ); void reparent( QWidget *parent, const QPoint &, bool showIt=FALSE ); void erase(); void erase( int x, int y, int w, int h ); void erase( const QRect & ); void erase( const QRegion & ); void scroll( int dx, int dy ); void scroll( int dx, int dy, const QRect& ); void drawText( int x, int y, const QString &); void drawText( const QPoint &, const QString &); QWidget * focusWidget() const; QRect microFocusHint() const; bool acceptDrops() const; virtual void setAcceptDrops( bool on ); virtual void setAutoMask(bool); bool autoMask() const; enum BackgroundOrigin { WidgetOrigin, ParentOrigin, WindowOrigin, AncestorOrigin }; virtual void setBackgroundOrigin( BackgroundOrigin ); BackgroundOrigin backgroundOrigin() const; QPoint backgroundOffset() const; virtual bool customWhatsThis() const; QWidget * parentWidget( bool sameWindow = FALSE ) const; WState testWState( WState s ) const; WFlags testWFlags( WFlags f ) const; static QWidget * find( WId ); static QWidgetMapper *wmapper(); QWidget *childAt( int x, int y, bool includeThis = FALSE ) const; QWidget *childAt( const QPoint &, bool includeThis = FALSE ) const; void setWindowOpacity(double level); double windowOpacity() const; protected: bool event( QEvent * ); virtual void mousePressEvent( QMouseEvent * ); virtual void mouseReleaseEvent( QMouseEvent * ); virtual void mouseDoubleClickEvent( QMouseEvent * ); virtual void mouseMoveEvent( QMouseEvent * ); virtual void wheelEvent( QWheelEvent * ); virtual void keyPressEvent( QKeyEvent * ); virtual void keyReleaseEvent( QKeyEvent * ); virtual void focusInEvent( QFocusEvent * ); virtual void focusOutEvent( QFocusEvent * ); virtual void enterEvent( QEvent * ); virtual void leaveEvent( QEvent * ); virtual void paintEvent( QPaintEvent * ); virtual void moveEvent( QMoveEvent * ); virtual void resizeEvent( QResizeEvent * ); virtual void closeEvent( QCloseEvent * ); virtual void contextMenuEvent( QContextMenuEvent * ); virtual void imStartEvent( QIMEvent * ); virtual void imComposeEvent( QIMEvent * ); virtual void imEndEvent( QIMEvent * ); virtual void tabletEvent( QTabletEvent * ); virtual void dragEnterEvent( QDragEnterEvent * ); virtual void dragMoveEvent( QDragMoveEvent * ); virtual void dragLeaveEvent( QDragLeaveEvent * ); virtual void dropEvent( QDropEvent * ); virtual void showEvent( QShowEvent * ); virtual void hideEvent( QHideEvent * ); virtual bool x11Event( XEvent * ); virtual void updateMask(); virtual void styleChange( QStyle& ); virtual void enabledChange( bool oldEnabled ); virtual void paletteChange( const QPalette & ); virtual void fontChange( const QFont & ); virtual void windowActivationChange( bool oldActive ); int metric( int ) const; void resetInputContext(); virtual void create( WId = 0, bool initializeWindow = TRUE, bool destroyOldWindow = TRUE ); virtual void destroy( bool destroyWindow = TRUE, bool destroySubWindows = TRUE ); uint getWState() const; virtual void setWState( uint ); void clearWState( uint n ); WFlags getWFlags() const; virtual void setWFlags( WFlags ); void clearWFlags( WFlags n ); virtual bool focusNextPrevChild( bool next ); QWExtra *extraData(); QTLWExtra *topData(); QFocusData *focusData(); virtual void setKeyCompression(bool); virtual void setMicroFocusHint(int x, int y, int w, int h, bool text=TRUE, QFont *f = 0); private : void focusProxyDestroyed(); private: void setFontSys( QFont *f = 0 ); void createInputContext(); void destroyInputContext(); void focusInputContext(); void checkChildrenDnd(); void setLayout( QLayout *l ); void setWinId( WId ); void showWindow(); void hideWindow(); void showChildren( bool spontaneous ); void hideChildren( bool spontaneous ); void reparentSys( QWidget *parent, WFlags, const QPoint &, bool showIt); void createTLExtra(); void createExtra(); void deleteExtra(); void createSysExtra(); void deleteSysExtra(); void createTLSysExtra(); void deleteTLSysExtra(); void deactivateWidgetCleanup(); void internalSetGeometry( int, int, int, int, bool ); void reparentFocusWidgets( QWidget * ); QFocusData *focusData( bool create ); void setBackgroundFromMode(); void setBackgroundColorDirect( const QColor & ); void setBackgroundPixmapDirect( const QPixmap & ); void setBackgroundModeDirect( BackgroundMode ); void setBackgroundEmpty(); void updateFrameStrut() const; void setBackgroundX11Relative(); WId winid; uint widget_state; uint widget_flags; uint focus_policy : 4; uint own_font :1; uint own_palette :1; uint sizehint_forced :1; uint is_closing :1; uint in_show : 1; uint in_show_maximized : 1; uint fstrut_dirty : 1; uint im_enabled : 1; QRect crect; QColor bg_col; QPalette pal; QFont fnt; QLayout *lay_out; QWExtra *extra; static int instanceCounter; static int maxInstances; static void createMapper(); static void destroyMapper(); static QWidgetList *wList(); static QWidgetList *tlwList(); static QWidgetMapper *mapper; friend class QApplication; friend class QBaseApplication; friend class QPainter; friend class QFontMetrics; friend class QFontInfo; friend class QETWidget; friend class QLayout; private: QWidget( const QWidget & ); QWidget &operator=( const QWidget & ); public: void setPalette( const QPalette &p, bool ) { setPalette( p ); } void setFont( const QFont &f, bool ) { setFont( f ); } };
136 class __attribute__((visibility("default"))) QTimer : public QObject { public: virtual QMetaObject *metaObject() const { return staticMetaObject(); } virtual const char *className() const; virtual void* qt_cast( const char* ); virtual bool qt_invoke( int, QUObject* ); virtual bool qt_emit( int, QUObject* ); virtual bool qt_property( int id, int f, QVariant* v); static bool qt_static_property( QObject* , int, int, QVariant* ); static QMetaObject* staticMetaObject(); QObject* qObject() { return (QObject*)this; } private: static QMetaObject *metaObj; public: QTimer( QObject *parent=0, const char *name=0 ); ~QTimer(); bool isActive() const; int start( int msec, bool sshot = FALSE ); void changeInterval( int msec ); void stop(); static void singleShot( int msec, QObject *receiver, const char *member ); int timerId() const { return id; } protected: void timeout(); protected: bool event( QEvent * ); private: int id; uint single : 1; uint nulltimer : 1; private: QTimer( const QTimer & ); QTimer &operator=( const QTimer & ); };
137 class QThreadInstance;
138 class __attribute__((visibility("default"))) QThread : public Qt { public: static Qt::HANDLE currentThread(); static void initialize(); static void cleanup(); static void exit(); QThread( unsigned int stackSize ); QThread(); virtual ~QThread(); bool wait( unsigned long time = (2147483647L * 2UL + 1UL) ); enum Priority { IdlePriority, LowestPriority, LowPriority, NormalPriority, HighPriority, HighestPriority, TimeCriticalPriority, InheritPriority }; void start( Priority ); void start(); void terminate(); bool finished() const; bool running() const; protected: virtual void run() = 0; static void sleep( unsigned long ); static void msleep( unsigned long ); static void usleep( unsigned long ); private: QThreadInstance * d; friend class QThreadInstance; QThread( const QThread & ); QThread &operator=( const QThread & ); };
139 class __attribute__((visibility("default"))) QTime { public: QTime() { ds=0; } QTime( int h, int m, int s=0, int ms=0 ); bool isNull() const { return ds == 0; } bool isValid() const; int hour() const; int minute() const; int second() const; int msec() const; QString toString( Qt::DateFormat f = Qt::TextDate ) const; QString toString( const QString& format ) const; bool setHMS( int h, int m, int s, int ms=0 ); QTime addSecs( int secs ) const; int secsTo( const QTime & ) const; QTime addMSecs( int ms ) const; int msecsTo( const QTime & ) const; bool operator==( const QTime &d ) const { return ds == d.ds; } bool operator!=( const QTime &d ) const { return ds != d.ds; } bool operator<( const QTime &d ) const { return ds < d.ds; } bool operator<=( const QTime &d ) const { return ds <= d.ds; } bool operator>( const QTime &d ) const { return ds > d.ds; } bool operator>=( const QTime &d ) const { return ds >= d.ds; } static QTime currentTime(); static QTime currentTime( Qt::TimeSpec ); static QTime fromString( const QString& s, Qt::DateFormat f = Qt::TextDate ); static bool isValid( int h, int m, int s, int ms=0 ); void start(); int restart(); int elapsed() const; private: static bool currentTime( QTime * ); static bool currentTime( QTime *, Qt::TimeSpec ); uint ds; friend class QDateTime; friend __attribute__((visibility("default"))) QDataStream &operator<<( QDataStream &, const QTime & ); friend __attribute__((visibility("default"))) QDataStream &operator>>( QDataStream &, QTime & ); };
140 extern "C" { extern "C" { unsigned long strlcat(char*, const char*, unsigned long); } extern "C" { unsigned long strlcpy(char*, const char*, unsigned long); } extern "C" { union wait { int w_status; struct { unsigned int __w_termsig:7; unsigned int __w_coredump:1; unsigned int __w_retcode:8; unsigned int:16; } __wait_terminated; struct { unsigned int __w_stopval:8; unsigned int __w_stopsig:8; unsigned int:16; } __wait_stopped; }; typedef struct { int quot; int rem; } div_t; typedef struct { long int quot; long int rem; } ldiv_t; __extension__ typedef struct { long long int quot; long long int rem; } lldiv_t; extern size_t __ctype_get_mb_cur_max (void) throw () ; extern double atof (__const char *__nptr) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ; extern int atoi (__const char *__nptr) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ; extern long int atol (__const char *__nptr) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ; __extension__ extern long long int atoll (__const char *__nptr) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ; extern double strtod (__const char *__restrict __nptr, char **__restrict __endptr) throw () __attribute__ ((__nonnull__ (1))) ; extern float strtof (__const char *__restrict __nptr, char **__restrict __endptr) throw () __attribute__ ((__nonnull__ (1))) ; extern long double strtold (__const char *__restrict __nptr, char **__restrict __endptr) throw () __attribute__ ((__nonnull__ (1))) ; extern long int strtol (__const char *__restrict __nptr, char **__restrict __endptr, int __base) throw () __attribute__ ((__nonnull__ (1))) ; extern unsigned long int strtoul (__const char *__restrict __nptr, char **__restrict __endptr, int __base) throw () __attribute__ ((__nonnull__ (1))) ; __extension__ extern long long int strtoq (__const char *__restrict __nptr, char **__restrict __endptr, int __base) throw () __attribute__ ((__nonnull__ (1))) ; __extension__ extern unsigned long long int strtouq (__const char *__restrict __nptr, char **__restrict __endptr, int __base) throw () __attribute__ ((__nonnull__ (1))) ; __extension__ extern long long int strtoll (__const char *__restrict __nptr, char **__restrict __endptr, int __base) throw () __attribute__ ((__nonnull__ (1))) ; __extension__ extern unsigned long long int strtoull (__const char *__restrict __nptr, char **__restrict __endptr, int __base) throw () __attribute__ ((__nonnull__ (1))) ; extern long int strtol_l (__const char *__restrict __nptr, char **__restrict __endptr, int __base, __locale_t __loc) throw () __attribute__ ((__nonnull__ (1, 4))) ; extern unsigned long int strtoul_l (__const char *__restrict __nptr, char **__restrict __endptr, int __base, __locale_t __loc) throw () __attribute__ ((__nonnull__ (1, 4))) ; __extension__ extern long long int strtoll_l (__const char *__restrict __nptr, char **__restrict __endptr, int __base, __locale_t __loc) throw () __attribute__ ((__nonnull__ (1, 4))) ; __extension__ extern unsigned long long int strtoull_l (__const char *__restrict __nptr, char **__restrict __endptr, int __base, __locale_t __loc) throw () __attribute__ ((__nonnull__ (1, 4))) ; extern double strtod_l (__const char *__restrict __nptr, char **__restrict __endptr, __locale_t __loc) throw () __attribute__ ((__nonnull__ (1, 3))) ; extern float strtof_l (__const char *__restrict __nptr, char **__restrict __endptr, __locale_t __loc) throw () __attribute__ ((__nonnull__ (1, 3))) ; extern long double strtold_l (__const char *__restrict __nptr, char **__restrict __endptr, __locale_t __loc) throw () __attribute__ ((__nonnull__ (1, 3))) ; extern double __strtod_internal (__const char *__restrict __nptr, char **__restrict __endptr, int __group) throw () __attribute__ ((__nonnull__ (1))) ; extern float __strtof_internal (__const char *__restrict __nptr, char **__restrict __endptr, int __group) throw () __attribute__ ((__nonnull__ (1))) ; extern long double __strtold_internal (__const char *__restrict __nptr, char **__restrict __endptr, int __group) throw () __attribute__ ((__nonnull__ (1))) ; extern long int __strtol_internal (__const char *__restrict __nptr, char **__restrict __endptr, int __base, int __group) throw () __attribute__ ((__nonnull__ (1))) ; extern unsigned long int __strtoul_internal (__const char *__restrict __nptr, char **__restrict __endptr, int __base, int __group) throw () __attribute__ ((__nonnull__ (1))) ; __extension__ extern long long int __strtoll_internal (__const char *__restrict __nptr, char **__restrict __endptr, int __base, int __group) throw () __attribute__ ((__nonnull__ (1))) ; __extension__ extern unsigned long long int __strtoull_internal (__const char * __restrict __nptr, char **__restrict __endptr, int __base, int __group) throw () __attribute__ ((__nonnull__ (1))) ; extern __inline double strtod (__const char *__restrict __nptr, char **__restrict __endptr) throw () { return __strtod_internal (__nptr, __endptr, 0); } extern __inline long int strtol (__const char *__restrict __nptr, char **__restrict __endptr, int __base) throw () { return __strtol_internal (__nptr, __endptr, __base, 0); } extern __inline unsigned long int strtoul (__const char *__restrict __nptr, char **__restrict __endptr, int __base) throw () { return __strtoul_internal (__nptr, __endptr, __base, 0); } extern __inline float strtof (__const char *__restrict __nptr, char **__restrict __endptr) throw () { return __strtof_internal (__nptr, __endptr, 0); } extern __inline long double strtold (__const char *__restrict __nptr, char **__restrict __endptr) throw () { return __strtold_internal (__nptr, __endptr, 0); } __extension__ extern __inline long long int strtoq (__const char *__restrict __nptr, char **__restrict __endptr, int __base) throw () { return __strtoll_internal (__nptr, __endptr, __base, 0); } __extension__ extern __inline unsigned long long int strtouq (__const char *__restrict __nptr, char **__restrict __endptr, int __base) throw () { return __strtoull_internal (__nptr, __endptr, __base, 0); } __extension__ extern __inline long long int strtoll (__const char *__restrict __nptr, char **__restrict __endptr, int __base) throw () { return __strtoll_internal (__nptr, __endptr, __base, 0); } __extension__ extern __inline unsigned long long int strtoull (__const char * __restrict __nptr, char **__restrict __endptr, int __base) throw () { return __strtoull_internal (__nptr, __endptr, __base, 0); } extern __inline double atof (__const char *__nptr) throw () { return strtod (__nptr, (char **) __null); } extern __inline int atoi (__const char *__nptr) throw () { return (int) strtol (__nptr, (char **) __null, 10); } extern __inline long int atol (__const char *__nptr) throw () { return strtol (__nptr, (char **) __null, 10); } __extension__ extern __inline long long int atoll (__const char *__nptr) throw () { return strtoll (__nptr, (char **) __null, 10); } extern char *l64a (long int __n) throw () ; extern long int a64l (__const char *__s) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ; extern "C" { typedef __u_char u_char; typedef __u_short u_short; typedef __u_int u_int; typedef __u_long u_long; typedef __quad_t quad_t; typedef __u_quad_t u_quad_t; typedef __fsid_t fsid_t; typedef __loff_t loff_t; typedef __ino_t ino_t; typedef __ino64_t ino64_t; typedef __dev_t dev_t; typedef __gid_t gid_t; typedef __mode_t mode_t; typedef __nlink_t nlink_t; typedef __uid_t uid_t; typedef __off_t off_t; typedef __off64_t off64_t; typedef __pid_t pid_t; typedef __id_t id_t; typedef __ssize_t ssize_t; typedef __daddr_t daddr_t; typedef __caddr_t caddr_t; typedef __key_t key_t; typedef __clock_t clock_t; typedef __time_t time_t; typedef __clockid_t clockid_t; typedef __timer_t timer_t; typedef __useconds_t useconds_t; typedef __suseconds_t suseconds_t; typedef unsigned long int ulong; typedef unsigned short int ushort; typedef unsigned int uint; typedef int int8_t __attribute__ ((__mode__ (__QI__))); typedef int int16_t __attribute__ ((__mode__ (__HI__))); typedef int int32_t __attribute__ ((__mode__ (__SI__))); typedef int int64_t __attribute__ ((__mode__ (__DI__))); typedef unsigned int u_int8_t __attribute__ ((__mode__ (__QI__))); typedef unsigned int u_int16_t __attribute__ ((__mode__ (__HI__))); typedef unsigned int u_int32_t __attribute__ ((__mode__ (__SI__))); typedef unsigned int u_int64_t __attribute__ ((__mode__ (__DI__))); typedef int register_t __attribute__ ((__mode__ (__word__))); typedef int __sig_atomic_t; typedef struct { unsigned long int __val[(1024 / (8 * sizeof (unsigned long int)))]; } __sigset_t; typedef __sigset_t sigset_t; struct timespec { __time_t tv_sec; long int tv_nsec; }; struct timeval { __time_t tv_sec; __suseconds_t tv_usec; }; typedef long int __fd_mask; typedef struct { __fd_mask fds_bits[1024 / (8 * sizeof (__fd_mask))]; } fd_set; typedef __fd_mask fd_mask; extern "C" { extern int select (int __nfds, fd_set *__restrict __readfds, fd_set *__restrict __writefds, fd_set *__restrict __exceptfds, struct timeval *__restrict __timeout); extern int pselect (int __nfds, fd_set *__restrict __readfds, fd_set *__restrict __writefds, fd_set *__restrict __exceptfds, const struct timespec *__restrict __timeout, const __sigset_t *__restrict __sigmask); } __extension__ extern __inline unsigned int gnu_dev_major (unsigned long long int __dev) throw (); __extension__ extern __inline unsigned int gnu_dev_minor (unsigned long long int __dev) throw (); __extension__ extern __inline unsigned long long int gnu_dev_makedev (unsigned int __major, unsigned int __minor) throw (); __extension__ extern __inline unsigned int gnu_dev_major (unsigned long long int __dev) throw () { return ((__dev >> 8) & 0xfff) | ((unsigned int) (__dev >> 32) & ~0xfff); } __extension__ extern __inline unsigned int gnu_dev_minor (unsigned long long int __dev) throw () { return (__dev & 0xff) | ((unsigned int) (__dev >> 12) & ~0xff); } __extension__ extern __inline unsigned long long int gnu_dev_makedev (unsigned int __major, unsigned int __minor) throw () { return ((__minor & 0xff) | ((__major & 0xfff) << 8) | (((unsigned long long int) (__minor & ~0xff)) << 12) | (((unsigned long long int) (__major & ~0xfff)) << 32)); } typedef __blksize_t blksize_t; typedef __blkcnt_t blkcnt_t; typedef __fsblkcnt_t fsblkcnt_t; typedef __fsfilcnt_t fsfilcnt_t; typedef __blkcnt64_t blkcnt64_t; typedef __fsblkcnt64_t fsblkcnt64_t; typedef __fsfilcnt64_t fsfilcnt64_t; typedef unsigned long int pthread_t; typedef union { char __size[36]; long int __align; } pthread_attr_t; typedef struct __pthread_internal_slist { struct __pthread_internal_slist *__next; } __pthread_slist_t; typedef union { struct __pthread_mutex_s { int __lock; unsigned int __count; int __owner; int __kind; unsigned int __nusers; __extension__ union { int __spins; __pthread_slist_t __list; }; } __data; char __size[24]; long int __align; } pthread_mutex_t; typedef union { char __size[4]; long int __align; } pthread_mutexattr_t; typedef union { struct { int __lock; unsigned int __futex; __extension__ unsigned long long int __total_seq; __extension__ unsigned long long int __wakeup_seq; __extension__ unsigned long long int __woken_seq; void *__mutex; unsigned int __nwaiters; unsigned int __broadcast_seq; } __data; char __size[48]; __extension__ long long int __align; } pthread_cond_t; typedef union { char __size[4]; long int __align; } pthread_condattr_t; typedef unsigned int pthread_key_t; typedef int pthread_once_t; typedef union { struct { int __lock; unsigned int __nr_readers; unsigned int __readers_wakeup; unsigned int __writer_wakeup; unsigned int __nr_readers_queued; unsigned int __nr_writers_queued; unsigned int __flags; int __writer; } __data; char __size[32]; long int __align; } pthread_rwlock_t; typedef union { char __size[8]; long int __align; } pthread_rwlockattr_t; typedef volatile int pthread_spinlock_t; typedef union { char __size[20]; long int __align; } pthread_barrier_t; typedef union { char __size[4]; int __align; } pthread_barrierattr_t; } extern long int random (void) throw (); extern void srandom (unsigned int __seed) throw (); extern char *initstate (unsigned int __seed, char *__statebuf, size_t __statelen) throw () __attribute__ ((__nonnull__ (2))); extern char *setstate (char *__statebuf) throw () __attribute__ ((__nonnull__ (1))); struct random_data { int32_t *fptr; int32_t *rptr; int32_t *state; int rand_type; int rand_deg; int rand_sep; int32_t *end_ptr; }; extern int random_r (struct random_data *__restrict __buf, int32_t *__restrict __result) throw () __attribute__ ((__nonnull__ (1, 2))); extern int srandom_r (unsigned int __seed, struct random_data *__buf) throw () __attribute__ ((__nonnull__ (2))); extern int initstate_r (unsigned int __seed, char *__restrict __statebuf, size_t __statelen, struct random_data *__restrict __buf) throw () __attribute__ ((__nonnull__ (2, 4))); extern int setstate_r (char *__restrict __statebuf, struct random_data *__restrict __buf) throw () __attribute__ ((__nonnull__ (1, 2))); extern int rand (void) throw (); extern void srand (unsigned int __seed) throw (); extern int rand_r (unsigned int *__seed) throw (); extern double drand48 (void) throw (); extern double erand48 (unsigned short int __xsubi[3]) throw () __attribute__ ((__nonnull__ (1))); extern long int lrand48 (void) throw (); extern long int nrand48 (unsigned short int __xsubi[3]) throw () __attribute__ ((__nonnull__ (1))); extern long int mrand48 (void) throw (); extern long int jrand48 (unsigned short int __xsubi[3]) throw () __attribute__ ((__nonnull__ (1))); extern void srand48 (long int __seedval) throw (); extern unsigned short int *seed48 (unsigned short int __seed16v[3]) throw () __attribute__ ((__nonnull__ (1))); extern void lcong48 (unsigned short int __param[7]) throw () __attribute__ ((__nonnull__ (1))); struct drand48_data { unsigned short int __x[3]; unsigned short int __old_x[3]; unsigned short int __c; unsigned short int __init; unsigned long long int __a; }; extern int drand48_r (struct drand48_data *__restrict __buffer, double *__restrict __result) throw () __attribute__ ((__nonnull__ (1, 2))); extern int erand48_r (unsigned short int __xsubi[3], struct drand48_data *__restrict __buffer, double *__restrict __result) throw () __attribute__ ((__nonnull__ (1, 2))); extern int lrand48_r (struct drand48_data *__restrict __buffer, long int *__restrict __result) throw () __attribute__ ((__nonnull__ (1, 2))); extern int nrand48_r (unsigned short int __xsubi[3], struct drand48_data *__restrict __buffer, long int *__restrict __result) throw () __attribute__ ((__nonnull__ (1, 2))); extern int mrand48_r (struct drand48_data *__restrict __buffer, long int *__restrict __result) throw () __attribute__ ((__nonnull__ (1, 2))); extern int jrand48_r (unsigned short int __xsubi[3], struct drand48_data *__restrict __buffer, long int *__restrict __result) throw () __attribute__ ((__nonnull__ (1, 2))); extern int srand48_r (long int __seedval, struct drand48_data *__buffer) throw () __attribute__ ((__nonnull__ (2))); extern int seed48_r (unsigned short int __seed16v[3], struct drand48_data *__buffer) throw () __attribute__ ((__nonnull__ (1, 2))); extern int lcong48_r (unsigned short int __param[7], struct drand48_data *__buffer) throw () __attribute__ ((__nonnull__ (1, 2))); extern void *malloc (size_t __size) throw () __attribute__ ((__malloc__)) ; extern void *calloc (size_t __nmemb, size_t __size) throw () __attribute__ ((__malloc__)) ; extern void *realloc (void *__ptr, size_t __size) throw () __attribute__ ((__malloc__)) __attribute__ ((__warn_unused_result__)); extern void free (void *__ptr) throw (); extern void cfree (void *__ptr) throw (); extern "C" { extern void *alloca (size_t __size) throw (); } extern void *valloc (size_t __size) throw () __attribute__ ((__malloc__)) ; extern int posix_memalign (void **__memptr, size_t __alignment, size_t __size) throw () __attribute__ ((__nonnull__ (1))) ; extern void abort (void) throw () __attribute__ ((__noreturn__)); extern int atexit (void (*__func) (void)) throw () __attribute__ ((__nonnull__ (1))); extern int on_exit (void (*__func) (int __status, void *__arg), void *__arg) throw () __attribute__ ((__nonnull__ (1))); extern void exit (int __status) throw () __attribute__ ((__noreturn__)); extern void _Exit (int __status) throw () __attribute__ ((__noreturn__)); extern char *getenv (__const char *__name) throw () __attribute__ ((__nonnull__ (1))) ; extern char *__secure_getenv (__const char *__name) throw () __attribute__ ((__nonnull__ (1))) ; extern int putenv (char *__string) throw () __attribute__ ((__nonnull__ (1))); extern int setenv (__const char *__name, __const char *__value, int __replace) throw () __attribute__ ((__nonnull__ (2))); extern int unsetenv (__const char *__name) throw (); extern int clearenv (void) throw (); extern char *mktemp (char *__template) throw () __attribute__ ((__nonnull__ (1))) ; extern int mkstemp (char *__template) __attribute__ ((__nonnull__ (1))) ; extern int mkstemp64 (char *__template) __attribute__ ((__nonnull__ (1))) ; extern char *mkdtemp (char *__template) throw () __attribute__ ((__nonnull__ (1))) ; extern int system (__const char *__command) ; extern char *canonicalize_file_name (__const char *__name) throw () __attribute__ ((__nonnull__ (1))) ; extern char *realpath (__const char *__restrict __name, char *__restrict __resolved) throw () ; typedef int (*__compar_fn_t) (__const void *, __const void *); typedef __compar_fn_t comparison_fn_t; extern void *bsearch (__const void *__key, __const void *__base, size_t __nmemb, size_t __size, __compar_fn_t __compar) __attribute__ ((__nonnull__ (1, 2, 5))) ; extern void qsort (void *__base, size_t __nmemb, size_t __size, __compar_fn_t __compar) __attribute__ ((__nonnull__ (1, 4))); extern int abs (int __x) throw () __attribute__ ((__const__)) ; extern long int labs (long int __x) throw () __attribute__ ((__const__)) ; __extension__ extern long long int llabs (long long int __x) throw () __attribute__ ((__const__)) ; extern div_t div (int __numer, int __denom) throw () __attribute__ ((__const__)) ; extern ldiv_t ldiv (long int __numer, long int __denom) throw () __attribute__ ((__const__)) ; __extension__ extern lldiv_t lldiv (long long int __numer, long long int __denom) throw () __attribute__ ((__const__)) ; extern char *ecvt (double __value, int __ndigit, int *__restrict __decpt, int *__restrict __sign) throw () __attribute__ ((__nonnull__ (3, 4))) ; extern char *fcvt (double __value, int __ndigit, int *__restrict __decpt, int *__restrict __sign) throw () __attribute__ ((__nonnull__ (3, 4))) ; extern char *gcvt (double __value, int __ndigit, char *__buf) throw () __attribute__ ((__nonnull__ (3))) ; extern char *qecvt (long double __value, int __ndigit, int *__restrict __decpt, int *__restrict __sign) throw () __attribute__ ((__nonnull__ (3, 4))) ; extern char *qfcvt (long double __value, int __ndigit, int *__restrict __decpt, int *__restrict __sign) throw () __attribute__ ((__nonnull__ (3, 4))) ; extern char *qgcvt (long double __value, int __ndigit, char *__buf) throw () __attribute__ ((__nonnull__ (3))) ; extern int ecvt_r (double __value, int __ndigit, int *__restrict __decpt, int *__restrict __sign, char *__restrict __buf, size_t __len) throw () __attribute__ ((__nonnull__ (3, 4, 5))); extern int fcvt_r (double __value, int __ndigit, int *__restrict __decpt, int *__restrict __sign, char *__restrict __buf, size_t __len) throw () __attribute__ ((__nonnull__ (3, 4, 5))); extern int qecvt_r (long double __value, int __ndigit, int *__restrict __decpt, int *__restrict __sign, char *__restrict __buf, size_t __len) throw () __attribute__ ((__nonnull__ (3, 4, 5))); extern int qfcvt_r (long double __value, int __ndigit, int *__restrict __decpt, int *__restrict __sign, char *__restrict __buf, size_t __len) throw () __attribute__ ((__nonnull__ (3, 4, 5))); extern int mblen (__const char *__s, size_t __n) throw () ; extern int mbtowc (wchar_t *__restrict __pwc, __const char *__restrict __s, size_t __n) throw () ; extern int wctomb (char *__s, wchar_t __wchar) throw () ; extern size_t mbstowcs (wchar_t *__restrict __pwcs, __const char *__restrict __s, size_t __n) throw (); extern size_t wcstombs (char *__restrict __s, __const wchar_t *__restrict __pwcs, size_t __n) throw (); extern int rpmatch (__const char *__response) throw () __attribute__ ((__nonnull__ (1))) ; extern int getsubopt (char **__restrict __optionp, char *__const *__restrict __tokens, char **__restrict __valuep) throw () __attribute__ ((__nonnull__ (1, 2, 3))) ; extern void setkey (__const char *__key) throw () __attribute__ ((__nonnull__ (1))); extern int posix_openpt (int __oflag) ; extern int grantpt (int __fd) throw (); extern int unlockpt (int __fd) throw (); extern char *ptsname (int __fd) throw () ; extern int ptsname_r (int __fd, char *__buf, size_t __buflen) throw () __attribute__ ((__nonnull__ (2))); extern int getpt (void); extern int getloadavg (double __loadavg[], int __nelem) throw () __attribute__ ((__nonnull__ (1))); } struct sched_param { int __sched_priority; }; extern "C" { extern int clone (int (*__fn) (void *__arg), void *__child_stack, int __flags, void *__arg, ...) throw (); extern int unshare (int __flags) throw (); } struct __sched_param { int __sched_priority; }; typedef unsigned long int __cpu_mask; typedef struct { __cpu_mask __bits[1024 / (8 * sizeof (__cpu_mask))]; } cpu_set_t; extern "C" { extern int sched_setparam (__pid_t __pid, __const struct sched_param *__param) throw (); extern int sched_getparam (__pid_t __pid, struct sched_param *__param) throw (); extern int sched_setscheduler (__pid_t __pid, int __policy, __const struct sched_param *__param) throw (); extern int sched_getscheduler (__pid_t __pid) throw (); extern int sched_yield (void) throw (); extern int sched_get_priority_max (int __algorithm) throw (); extern int sched_get_priority_min (int __algorithm) throw (); extern int sched_rr_get_interval (__pid_t __pid, struct timespec *__t) throw (); extern int sched_setaffinity (__pid_t __pid, size_t __cpusetsize, __const cpu_set_t *__cpuset) throw (); extern int sched_getaffinity (__pid_t __pid, size_t __cpusetsize, cpu_set_t *__cpuset) throw (); } extern "C" { struct tm { int tm_sec; int tm_min; int tm_hour; int tm_mday; int tm_mon; int tm_year; int tm_wday; int tm_yday; int tm_isdst; long int tm_gmtoff; __const char *tm_zone; }; struct itimerspec { struct timespec it_interval; struct timespec it_value; }; struct sigevent; extern clock_t clock (void) throw (); extern time_t time (time_t *__timer) throw (); extern double difftime (time_t __time1, time_t __time0) throw () __attribute__ ((__const__)); extern time_t mktime (struct tm *__tp) throw (); extern size_t strftime (char *__restrict __s, size_t __maxsize, __const char *__restrict __format, __const struct tm *__restrict __tp) throw (); extern char *strptime (__const char *__restrict __s, __const char *__restrict __fmt, struct tm *__tp) throw (); extern size_t strftime_l (char *__restrict __s, size_t __maxsize, __const char *__restrict __format, __const struct tm *__restrict __tp, __locale_t __loc) throw (); extern char *strptime_l (__const char *__restrict __s, __const char *__restrict __fmt, struct tm *__tp, __locale_t __loc) throw (); extern struct tm *gmtime (__const time_t *__timer) throw (); extern struct tm *localtime (__const time_t *__timer) throw (); extern struct tm *gmtime_r (__const time_t *__restrict __timer, struct tm *__restrict __tp) throw (); extern struct tm *localtime_r (__const time_t *__restrict __timer, struct tm *__restrict __tp) throw (); extern char *asctime (__const struct tm *__tp) throw (); extern char *ctime (__const time_t *__timer) throw (); extern char *asctime_r (__const struct tm *__restrict __tp, char *__restrict __buf) throw (); extern char *ctime_r (__const time_t *__restrict __timer, char *__restrict __buf) throw (); extern char *__tzname[2]; extern int __daylight; extern long int __timezone; extern char *tzname[2]; extern void tzset (void) throw (); extern int daylight; extern long int timezone; extern int stime (__const time_t *__when) throw (); extern time_t timegm (struct tm *__tp) throw (); extern time_t timelocal (struct tm *__tp) throw (); extern int dysize (int __year) throw () __attribute__ ((__const__)); extern int nanosleep (__const struct timespec *__requested_time, struct timespec *__remaining); extern int clock_getres (clockid_t __clock_id, struct timespec *__res) throw (); extern int clock_gettime (clockid_t __clock_id, struct timespec *__tp) throw (); extern int clock_settime (clockid_t __clock_id, __const struct timespec *__tp) throw (); extern int clock_nanosleep (clockid_t __clock_id, int __flags, __const struct timespec *__req, struct timespec *__rem); extern int clock_getcpuclockid (pid_t __pid, clockid_t *__clock_id) throw (); extern int timer_create (clockid_t __clock_id, struct sigevent *__restrict __evp, timer_t *__restrict __timerid) throw (); extern int timer_delete (timer_t __timerid) throw (); extern int timer_settime (timer_t __timerid, int __flags, __const struct itimerspec *__restrict __value, struct itimerspec *__restrict __ovalue) throw (); extern int timer_gettime (timer_t __timerid, struct itimerspec *__value) throw (); extern int timer_getoverrun (timer_t __timerid) throw (); extern int getdate_err; extern struct tm *getdate (__const char *__string); extern int getdate_r (__const char *__restrict __string, struct tm *__restrict __resbufp); } extern "C" { } typedef int __jmp_buf[6]; enum { PTHREAD_CREATE_JOINABLE, PTHREAD_CREATE_DETACHED }; enum { PTHREAD_MUTEX_TIMED_NP, PTHREAD_MUTEX_RECURSIVE_NP, PTHREAD_MUTEX_ERRORCHECK_NP, PTHREAD_MUTEX_ADAPTIVE_NP , PTHREAD_MUTEX_NORMAL = PTHREAD_MUTEX_TIMED_NP, PTHREAD_MUTEX_RECURSIVE = PTHREAD_MUTEX_RECURSIVE_NP, PTHREAD_MUTEX_ERRORCHECK = PTHREAD_MUTEX_ERRORCHECK_NP, PTHREAD_MUTEX_DEFAULT = PTHREAD_MUTEX_NORMAL , PTHREAD_MUTEX_FAST_NP = PTHREAD_MUTEX_TIMED_NP }; enum { PTHREAD_MUTEX_STALLED_NP, PTHREAD_MUTEX_ROBUST_NP }; enum { PTHREAD_PRIO_NONE, PTHREAD_PRIO_INHERIT, PTHREAD_PRIO_PROTECT }; enum { PTHREAD_RWLOCK_PREFER_READER_NP, PTHREAD_RWLOCK_PREFER_WRITER_NP, PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP, PTHREAD_RWLOCK_DEFAULT_NP = PTHREAD_RWLOCK_PREFER_READER_NP }; enum { PTHREAD_INHERIT_SCHED, PTHREAD_EXPLICIT_SCHED }; enum { PTHREAD_SCOPE_SYSTEM, PTHREAD_SCOPE_PROCESS }; enum { PTHREAD_PROCESS_PRIVATE, PTHREAD_PROCESS_SHARED }; struct _pthread_cleanup_buffer { void (*__routine) (void *); void *__arg; int __canceltype; struct _pthread_cleanup_buffer *__prev; }; enum { PTHREAD_CANCEL_ENABLE, PTHREAD_CANCEL_DISABLE }; enum { PTHREAD_CANCEL_DEFERRED, PTHREAD_CANCEL_ASYNCHRONOUS }; extern "C" { extern int pthread_create (pthread_t *__restrict __newthread, __const pthread_attr_t *__restrict __attr, void *(*__start_routine) (void *), void *__restrict __arg) throw (); extern void pthread_exit (void *__retval) __attribute__ ((__noreturn__)); extern int pthread_join (pthread_t __th, void **__thread_return); extern int pthread_tryjoin_np (pthread_t __th, void **__thread_return) throw (); extern int pthread_timedjoin_np (pthread_t __th, void **__thread_return, __const struct timespec *__abstime); extern int pthread_detach (pthread_t __th) throw (); extern pthread_t pthread_self (void) throw () __attribute__ ((__const__)); extern int pthread_equal (pthread_t __thread1, pthread_t __thread2) throw (); extern int pthread_attr_init (pthread_attr_t *__attr) throw (); extern int pthread_attr_destroy (pthread_attr_t *__attr) throw (); extern int pthread_attr_getdetachstate (__const pthread_attr_t *__attr, int *__detachstate) throw (); extern int pthread_attr_setdetachstate (pthread_attr_t *__attr, int __detachstate) throw (); extern int pthread_attr_getguardsize (__const pthread_attr_t *__attr, size_t *__guardsize) throw (); extern int pthread_attr_setguardsize (pthread_attr_t *__attr, size_t __guardsize) throw (); extern int pthread_attr_getschedparam (__const pthread_attr_t *__restrict __attr, struct sched_param *__restrict __param) throw (); extern int pthread_attr_setschedparam (pthread_attr_t *__restrict __attr, __const struct sched_param *__restrict __param) throw (); extern int pthread_attr_getschedpolicy (__const pthread_attr_t *__restrict __attr, int *__restrict __policy) throw (); extern int pthread_attr_setschedpolicy (pthread_attr_t *__attr, int __policy) throw (); extern int pthread_attr_getinheritsched (__const pthread_attr_t *__restrict __attr, int *__restrict __inherit) throw (); extern int pthread_attr_setinheritsched (pthread_attr_t *__attr, int __inherit) throw (); extern int pthread_attr_getscope (__const pthread_attr_t *__restrict __attr, int *__restrict __scope) throw (); extern int pthread_attr_setscope (pthread_attr_t *__attr, int __scope) throw (); extern int pthread_attr_getstackaddr (__const pthread_attr_t *__restrict __attr, void **__restrict __stackaddr) throw () __attribute__ ((__deprecated__)); extern int pthread_attr_setstackaddr (pthread_attr_t *__attr, void *__stackaddr) throw () __attribute__ ((__deprecated__)); extern int pthread_attr_getstacksize (__const pthread_attr_t *__restrict __attr, size_t *__restrict __stacksize) throw (); extern int pthread_attr_setstacksize (pthread_attr_t *__attr, size_t __stacksize) throw (); extern int pthread_attr_getstack (__const pthread_attr_t *__restrict __attr, void **__restrict __stackaddr, size_t *__restrict __stacksize) throw (); extern int pthread_attr_setstack (pthread_attr_t *__attr, void *__stackaddr, size_t __stacksize) throw (); extern int pthread_attr_setaffinity_np (pthread_attr_t *__attr, size_t __cpusetsize, __const cpu_set_t *__cpuset) throw (); extern int pthread_attr_getaffinity_np (__const pthread_attr_t *__attr, size_t __cpusetsize, cpu_set_t *__cpuset) throw (); extern int pthread_getattr_np (pthread_t __th, pthread_attr_t *__attr) throw (); extern int pthread_setschedparam (pthread_t __target_thread, int __policy, __const struct sched_param *__param) throw (); extern int pthread_getschedparam (pthread_t __target_thread, int *__restrict __policy, struct sched_param *__restrict __param) throw (); extern int pthread_setschedprio (pthread_t __target_thread, int __prio) throw (); extern int pthread_getconcurrency (void) throw (); extern int pthread_setconcurrency (int __level) throw (); extern int pthread_yield (void) throw (); extern int pthread_setaffinity_np (pthread_t __th, size_t __cpusetsize, __const cpu_set_t *__cpuset) throw (); extern int pthread_getaffinity_np (pthread_t __th, size_t __cpusetsize, cpu_set_t *__cpuset) throw (); extern int pthread_once (pthread_once_t *__once_control, void (*__init_routine) (void)); extern int pthread_setcancelstate (int __state, int *__oldstate); extern int pthread_setcanceltype (int __type, int *__oldtype); extern int pthread_cancel (pthread_t __th); extern void pthread_testcancel (void); typedef struct { struct { __jmp_buf __cancel_jmp_buf; int __mask_was_saved; } __cancel_jmp_buf[1]; void *__pad[4]; } __pthread_unwind_buf_t __attribute__ ((__aligned__)); struct __pthread_cleanup_frame { void (*__cancel_routine) (void *); void *__cancel_arg; int __do_it; int __cancel_type; }; extern void __pthread_register_cancel (__pthread_unwind_buf_t *__buf) __attribute__ ((__regparm__ (1))); extern void __pthread_unregister_cancel (__pthread_unwind_buf_t *__buf) __attribute__ ((__regparm__ (1))); extern void __pthread_register_cancel_defer (__pthread_unwind_buf_t *__buf) __attribute__ ((__regparm__ (1))); extern void __pthread_unregister_cancel_restore (__pthread_unwind_buf_t *__buf) __attribute__ ((__regparm__ (1))); extern void __pthread_unwind_next (__pthread_unwind_buf_t *__buf) __attribute__ ((__regparm__ (1))) __attribute__ ((__noreturn__)) __attribute__ ((__weak__)) ; struct __jmp_buf_tag; extern int __sigsetjmp (struct __jmp_buf_tag *__env, int __savemask) throw (); extern int pthread_mutex_init (pthread_mutex_t *__mutex, __const pthread_mutexattr_t *__mutexattr) throw (); extern int pthread_mutex_destroy (pthread_mutex_t *__mutex) throw (); extern int pthread_mutex_trylock (pthread_mutex_t *_mutex) throw (); extern int pthread_mutex_lock (pthread_mutex_t *__mutex) throw (); extern int pthread_mutex_timedlock (pthread_mutex_t *__restrict __mutex, __const struct timespec *__restrict __abstime) throw (); extern int pthread_mutex_unlock (pthread_mutex_t *__mutex) throw (); extern int pthread_mutex_getprioceiling (__const pthread_mutex_t * __restrict __mutex, int *__restrict __prioceiling) throw (); extern int pthread_mutex_setprioceiling (pthread_mutex_t *__restrict __mutex, int __prioceiling, int *__restrict __old_ceiling) throw (); extern int pthread_mutex_consistent_np (pthread_mutex_t *__mutex) throw (); extern int pthread_mutexattr_init (pthread_mutexattr_t *__attr) throw (); extern int pthread_mutexattr_destroy (pthread_mutexattr_t *__attr) throw (); extern int pthread_mutexattr_getpshared (__const pthread_mutexattr_t * __restrict __attr, int *__restrict __pshared) throw (); extern int pthread_mutexattr_setpshared (pthread_mutexattr_t *__attr, int __pshared) throw (); extern int pthread_mutexattr_gettype (__const pthread_mutexattr_t *__restrict __attr, int *__restrict __kind) throw (); extern int pthread_mutexattr_settype (pthread_mutexattr_t *__attr, int __kind) throw (); extern int pthread_mutexattr_getprotocol (__const pthread_mutexattr_t * __restrict __attr, int *__restrict __protocol) throw (); extern int pthread_mutexattr_setprotocol (pthread_mutexattr_t *__attr, int __protocol) throw (); extern int pthread_mutexattr_getprioceiling (__const pthread_mutexattr_t * __restrict __attr, int *__restrict __prioceiling) throw (); extern int pthread_mutexattr_setprioceiling (pthread_mutexattr_t *__attr, int __prioceiling) throw (); extern int pthread_mutexattr_getrobust_np (__const pthread_mutexattr_t *__attr, int *__robustness) throw (); extern int pthread_mutexattr_setrobust_np (pthread_mutexattr_t *__attr, int __robustness) throw (); extern int pthread_rwlock_init (pthread_rwlock_t *__restrict __rwlock, __const pthread_rwlockattr_t *__restrict __attr) throw (); extern int pthread_rwlock_destroy (pthread_rwlock_t *__rwlock) throw (); extern int pthread_rwlock_rdlock (pthread_rwlock_t *__rwlock) throw (); extern int pthread_rwlock_tryrdlock (pthread_rwlock_t *__rwlock) throw (); extern int pthread_rwlock_timedrdlock (pthread_rwlock_t *__restrict __rwlock, __const struct timespec *__restrict __abstime) throw (); extern int pthread_rwlock_wrlock (pthread_rwlock_t *__rwlock) throw (); extern int pthread_rwlock_trywrlock (pthread_rwlock_t *__rwlock) throw (); extern int pthread_rwlock_timedwrlock (pthread_rwlock_t *__restrict __rwlock, __const struct timespec *__restrict __abstime) throw (); extern int pthread_rwlock_unlock (pthread_rwlock_t *__rwlock) throw (); extern int pthread_rwlockattr_init (pthread_rwlockattr_t *__attr) throw (); extern int pthread_rwlockattr_destroy (pthread_rwlockattr_t *__attr) throw (); extern int pthread_rwlockattr_getpshared (__const pthread_rwlockattr_t * __restrict __attr, int *__restrict __pshared) throw (); extern int pthread_rwlockattr_setpshared (pthread_rwlockattr_t *__attr, int __pshared) throw (); extern int pthread_rwlockattr_getkind_np (__const pthread_rwlockattr_t * __restrict __attr, int *__restrict __pref) throw (); extern int pthread_rwlockattr_setkind_np (pthread_rwlockattr_t *__attr, int __pref) throw (); extern int pthread_cond_init (pthread_cond_t *__restrict __cond, __const pthread_condattr_t *__restrict __cond_attr) throw (); extern int pthread_cond_destroy (pthread_cond_t *__cond) throw (); extern int pthread_cond_signal (pthread_cond_t *__cond) throw (); extern int pthread_cond_broadcast (pthread_cond_t *__cond) throw (); extern int pthread_cond_wait (pthread_cond_t *__restrict __cond, pthread_mutex_t *__restrict __mutex); extern int pthread_cond_timedwait (pthread_cond_t *__restrict __cond, pthread_mutex_t *__restrict __mutex, __const struct timespec *__restrict __abstime); extern int pthread_condattr_init (pthread_condattr_t *__attr) throw (); extern int pthread_condattr_destroy (pthread_condattr_t *__attr) throw (); extern int pthread_condattr_getpshared (__const pthread_condattr_t * __restrict __attr, int *__restrict __pshared) throw (); extern int pthread_condattr_setpshared (pthread_condattr_t *__attr, int __pshared) throw (); extern int pthread_condattr_getclock (__const pthread_condattr_t * __restrict __attr, __clockid_t *__restrict __clock_id) throw (); extern int pthread_condattr_setclock (pthread_condattr_t *__attr, __clockid_t __clock_id) throw (); extern int pthread_spin_init (pthread_spinlock_t *__lock, int __pshared) throw (); extern int pthread_spin_destroy (pthread_spinlock_t *__lock) throw (); extern int pthread_spin_lock (pthread_spinlock_t *__lock) throw (); extern int pthread_spin_trylock (pthread_spinlock_t *__lock) throw (); extern int pthread_spin_unlock (pthread_spinlock_t *__lock) throw (); extern int pthread_barrier_init (pthread_barrier_t *__restrict __barrier, __const pthread_barrierattr_t *__restrict __attr, unsigned int __count) throw (); extern int pthread_barrier_destroy (pthread_barrier_t *__barrier) throw (); extern int pthread_barrier_wait (pthread_barrier_t *__barrier) throw (); extern int pthread_barrierattr_init (pthread_barrierattr_t *__attr) throw (); extern int pthread_barrierattr_destroy (pthread_barrierattr_t *__attr) throw (); extern int pthread_barrierattr_getpshared (__const pthread_barrierattr_t * __restrict __attr, int *__restrict __pshared) throw (); extern int pthread_barrierattr_setpshared (pthread_barrierattr_t *__attr, int __pshared) throw (); extern int pthread_key_create (pthread_key_t *__key, void (*__destr_function) (void *)) throw (); extern int pthread_key_delete (pthread_key_t __key) throw (); extern void *pthread_getspecific (pthread_key_t __key) throw (); extern int pthread_setspecific (pthread_key_t __key, __const void *__pointer) throw (); extern int pthread_getcpuclockid (pthread_t __thread_id, __clockid_t *__clock_id) throw (); extern int pthread_atfork (void (*__prepare) (void), void (*__parent) (void), void (*__child) (void)) throw (); } extern "C" { struct timezone { int tz_minuteswest; int tz_dsttime; }; typedef struct timezone *__restrict __timezone_ptr_t; extern int gettimeofday (struct timeval *__restrict __tv, __timezone_ptr_t __tz) throw () __attribute__ ((__nonnull__ (1))); extern int settimeofday (__const struct timeval *__tv, __const struct timezone *__tz) throw () __attribute__ ((__nonnull__ (1))); extern int adjtime (__const struct timeval *__delta, struct timeval *__olddelta) throw (); enum __itimer_which { ITIMER_REAL = 0, ITIMER_VIRTUAL = 1, ITIMER_PROF = 2 }; struct itimerval { struct timeval it_interval; struct timeval it_value; }; typedef int __itimer_which_t; extern int getitimer (__itimer_which_t __which, struct itimerval *__value) throw (); extern int setitimer (__itimer_which_t __which, __const struct itimerval *__restrict __new, struct itimerval *__restrict __old) throw (); extern int utimes (__const char *__file, __const struct timeval __tvp[2]) throw () __attribute__ ((__nonnull__ (1))); extern int lutimes (__const char *__file, __const struct timeval __tvp[2]) throw () __attribute__ ((__nonnull__ (1))); extern int futimes (int __fd, __const struct timeval __tvp[2]) throw (); extern int futimesat (int __fd, __const char *__file, __const struct timeval __tvp[2]) throw (); } typedef unsigned char uint8_t; typedef unsigned short int uint16_t; typedef unsigned int uint32_t; __extension__ typedef unsigned long long int uint64_t; typedef signed char int_least8_t; typedef short int int_least16_t; typedef int int_least32_t; __extension__ typedef long long int int_least64_t; typedef unsigned char uint_least8_t; typedef unsigned short int uint_least16_t; typedef unsigned int uint_least32_t; __extension__ typedef unsigned long long int uint_least64_t; typedef signed char int_fast8_t; typedef int int_fast16_t; typedef int int_fast32_t; __extension__ typedef long long int int_fast64_t; typedef unsigned char uint_fast8_t; typedef unsigned int uint_fast16_t; typedef unsigned int uint_fast32_t; __extension__ typedef unsigned long long int uint_fast64_t; typedef int intptr_t; typedef unsigned int uintptr_t; __extension__ typedef long long int intmax_t; __extension__ typedef unsigned long long int uintmax_t; extern "C" { typedef struct { long long int quot; long long int rem; } imaxdiv_t; extern intmax_t imaxabs (intmax_t __n) throw () __attribute__ ((__const__)); extern imaxdiv_t imaxdiv (intmax_t __numer, intmax_t __denom) throw () __attribute__ ((__const__)); extern intmax_t strtoimax (__const char *__restrict __nptr, char **__restrict __endptr, int __base) throw (); extern uintmax_t strtoumax (__const char *__restrict __nptr, char ** __restrict __endptr, int __base) throw (); extern intmax_t wcstoimax (__const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr, int __base) throw (); extern uintmax_t wcstoumax (__const wchar_t *__restrict __nptr, wchar_t ** __restrict __endptr, int __base) throw (); extern __inline intmax_t strtoimax (__const char *__restrict nptr, char **__restrict endptr, int base) throw () { return __strtoll_internal (nptr, endptr, base, 0); } extern __inline uintmax_t strtoumax (__const char *__restrict nptr, char **__restrict endptr, int base) throw () { return __strtoull_internal (nptr, endptr, base, 0); } __extension__ extern long long int __wcstoll_internal (__const wchar_t * __restrict __nptr, wchar_t **__restrict __endptr, int __base, int __group) throw (); extern __inline intmax_t wcstoimax (__const wchar_t *__restrict nptr, wchar_t **__restrict endptr, int base) throw () { return __wcstoll_internal (nptr, endptr, base, 0); } __extension__ extern unsigned long long int __wcstoull_internal (__const wchar_t * __restrict __nptr, wchar_t ** __restrict __endptr, int __base, int __group) throw (); extern __inline uintmax_t wcstoumax (__const wchar_t *__restrict nptr, wchar_t **__restrict endptr, int base) throw () { return __wcstoull_internal (nptr, endptr, base, 0); } } extern "C" { } typedef struct xml_property_s { char *name; char *value; struct xml_property_s *next; } xml_property_t; typedef struct xml_node_s { char *name; char *data; struct xml_property_s *props; struct xml_node_s *child; struct xml_node_s *next; } xml_node_t; void xml_parser_init(const char * buf, int size, int mode); int xml_parser_build_tree(xml_node_t **root_node); void xml_parser_free_tree(xml_node_t *root_node); char *xml_parser_get_property (const xml_node_t *node, const char *name); int xml_parser_get_property_int (const xml_node_t *node, const char *name, int def_value); int xml_parser_get_property_bool (const xml_node_t *node, const char *name, int def_value); typedef enum { XML_ESCAPE_NO_QUOTE, XML_ESCAPE_SINGLE_QUOTE, XML_ESCAPE_DOUBLE_QUOTE } xml_escape_quote_t; char *xml_escape_string (const char *s, xml_escape_quote_t quote_type); void xml_parser_dump_tree (const xml_node_t *node) ; void *xine_buffer_init(int chunk_size); void *_xine_buffer_free(void *buf); void *xine_buffer_dup(void *buf); void *_xine_buffer_copyin(void *buf, int index, const void *data, int len); void xine_buffer_copyout(const void *buf, int index, void *data, int len); void *_xine_buffer_set(void *buf, int index, uint8_t b, int len); void *_xine_buffer_strcat(void *buf, const char *data); void *_xine_buffer_strcpy(void *buf, int index, const char *data); char *xine_buffer_strchr(const void *buf, int ch); int xine_buffer_get_size(const void *buf); void *_xine_buffer_ensure_size(void *buf, int size); extern "C" { extern "C" { typedef struct xine_s xine_t; typedef struct xine_stream_s xine_stream_t; typedef struct xine_audio_port_s xine_audio_port_t; typedef struct xine_video_port_s xine_video_port_t; typedef xine_audio_port_t xine_ao_driver_t; typedef xine_video_port_t xine_vo_driver_t; const char *xine_get_version_string (void); void xine_get_version (int *major, int *minor, int *sub); int xine_check_version (int major, int minor, int sub) ; xine_t *xine_new (void); void xine_init (xine_t *self); xine_audio_port_t *xine_open_audio_driver (xine_t *self, const char *id, void *data); xine_video_port_t *xine_open_video_driver (xine_t *self, const char *id, int visual, void *data); void xine_close_audio_driver (xine_t *self, xine_audio_port_t *driver); void xine_close_video_driver (xine_t *self, xine_video_port_t *driver); void xine_exit (xine_t *self); xine_stream_t *xine_stream_new (xine_t *self, xine_audio_port_t *ao, xine_video_port_t *vo); int xine_stream_master_slave(xine_stream_t *master, xine_stream_t *slave, int affection); int xine_open (xine_stream_t *stream, const char *mrl); int xine_play (xine_stream_t *stream, int start_pos, int start_time); int xine_trick_mode (xine_stream_t *stream, int mode, int value); void xine_stop (xine_stream_t *stream); void xine_close (xine_stream_t *stream); int xine_eject (xine_stream_t *stream); void xine_dispose (xine_stream_t *stream); void xine_engine_set_param(xine_t *self, int param, int value); int xine_engine_get_param(xine_t *self, int param); void xine_set_param (xine_stream_t *stream, int param, int value); int xine_get_param (xine_stream_t *stream, int param); int xine_get_current_frame (xine_stream_t *stream, int *width, int *height, int *ratio_code, int *format, uint8_t *img); int64_t xine_get_current_vpts(xine_stream_t *stream); typedef struct xine_post_s xine_post_t; struct xine_post_s { xine_audio_port_t **audio_input; xine_video_port_t **video_input; int type; }; xine_post_t *xine_post_init(xine_t *xine, const char *name, int inputs, xine_audio_port_t **audio_target, xine_video_port_t **video_target); const char *const *xine_list_post_plugins(xine_t *xine); const char *const *xine_list_post_plugins_typed(xine_t *xine, int type); typedef struct xine_post_in_s xine_post_in_t; typedef struct xine_post_out_s xine_post_out_t; struct xine_post_in_s { const char *name; int type; void *data; }; struct xine_post_out_s { const char *name; int type; void *data; int (*rewire) (xine_post_out_t *self, void *data); }; const char *const *xine_post_list_inputs(xine_post_t *self); const char *const *xine_post_list_outputs(xine_post_t *self); xine_post_in_t *xine_post_input(xine_post_t *self, const char *name); xine_post_out_t *xine_post_output(xine_post_t *self, const char *name); int xine_post_wire(xine_post_out_t *source, xine_post_in_t *target); int xine_post_wire_video_port(xine_post_out_t *source, xine_video_port_t *vo); int xine_post_wire_audio_port(xine_post_out_t *source, xine_audio_port_t *ao); xine_post_out_t * xine_get_video_source(xine_stream_t *stream); xine_post_out_t * xine_get_audio_source(xine_stream_t *stream); void xine_post_dispose(xine_t *xine, xine_post_t *self); typedef struct { int type; char *name; int size; int offset; char **enum_values; double range_min; double range_max; int readonly; char *description; } xine_post_api_parameter_t; typedef struct { int struct_size; xine_post_api_parameter_t *parameter; } xine_post_api_descr_t; typedef struct { int (*set_parameters) (xine_post_t *self, void *params); int (*get_parameters) (xine_post_t *self, void *params); xine_post_api_descr_t * (*get_param_descr) (void); char * (*get_help) (void); } xine_post_api_t; int xine_get_log_section_count(xine_t *self); const char *const *xine_get_log_names(xine_t *self); void xine_log (xine_t *self, int buf, const char *format, ...) __attribute__ ((__format__(printf, 3, 4))); const char *const *xine_get_log (xine_t *self, int buf); typedef void (*xine_log_cb_t) (void *user_data, int section); void xine_register_log_cb (xine_t *self, xine_log_cb_t cb, void *user_data); int xine_get_error (xine_stream_t *stream); int xine_get_status (xine_stream_t *stream); int xine_get_audio_lang (xine_stream_t *stream, int channel, char *lang); int xine_get_spu_lang (xine_stream_t *stream, int channel, char *lang); int xine_get_pos_length (xine_stream_t *stream, int *pos_stream, int *pos_time, int *length_time); uint32_t xine_get_stream_info (xine_stream_t *stream, int info); const char *xine_get_meta_info (xine_stream_t *stream, int info); typedef struct { char *origin; char *mrl; char *link; uint32_t type; off_t size; } xine_mrl_t; const char *const *xine_get_browsable_input_plugin_ids (xine_t *self) ; xine_mrl_t **xine_get_browse_mrls (xine_t *self, const char *plugin_id, const char *start_mrl, int *num_mrls); const char *const *xine_get_autoplay_input_plugin_ids (xine_t *self); char **xine_get_autoplay_mrls (xine_t *self, const char *plugin_id, int *num_mrls); char *xine_get_file_extensions (xine_t *self); char *xine_get_mime_types (xine_t *self); char *xine_get_demux_for_mime_type (xine_t *self, const char *mime_type); const char *xine_get_input_plugin_description (xine_t *self, const char *plugin_id); const char *xine_get_demux_plugin_description (xine_t *self, const char *plugin_id); const char *xine_get_spu_plugin_description (xine_t *self, const char *plugin_id); const char *xine_get_audio_plugin_description (xine_t *self, const char *plugin_id); const char *xine_get_video_plugin_description (xine_t *self, const char *plugin_id); const char *xine_get_audio_driver_plugin_description (xine_t *self, const char *plugin_id); const char *xine_get_video_driver_plugin_description (xine_t *self, const char *plugin_id); const char *xine_get_post_plugin_description (xine_t *self, const char *plugin_id); const char *const *xine_list_audio_output_plugins (xine_t *self) ; const char *const *xine_list_video_output_plugins (xine_t *self) ; const char *const *xine_list_demuxer_plugins(xine_t *self); const char *const *xine_list_input_plugins(xine_t *self); const char *const *xine_list_spu_plugins(xine_t *self); const char *const *xine_list_audio_decoder_plugins(xine_t *self); const char *const *xine_list_video_decoder_plugins(xine_t *self); void xine_plugins_garbage_collector(xine_t *self); int xine_gui_send_vo_data (xine_stream_t *self, int type, void *data); int xine_port_send_gui_data (xine_video_port_t *vo, int type, void *data); typedef struct { int x,y,w,h; } x11_rectangle_t; typedef struct { void *display; int screen; unsigned long d; void *user_data; void (*dest_size_cb) (void *user_data, int video_width, int video_height, double video_pixel_aspect, int *dest_width, int *dest_height, double *dest_pixel_aspect); void (*frame_output_cb) (void *user_data, int video_width, int video_height, double video_pixel_aspect, int *dest_x, int *dest_y, int *dest_width, int *dest_height, double *dest_pixel_aspect, int *win_x, int *win_y); } x11_visual_t; typedef struct { void (*frame_output_cb) (void *user_data, int video_width, int video_height, double video_pixel_aspect, int *dest_x, int *dest_y, int *dest_width, int *dest_height, double *dest_pixel_aspect, int *win_x, int *win_y); void *user_data; } fb_visual_t; struct xine_health_check_s { int status; const char* cdrom_dev; const char* dvd_dev; char* msg; char* title; char* explanation; }; typedef struct xine_health_check_s xine_health_check_t; xine_health_check_t* xine_health_check(xine_health_check_t*, int check_num); typedef struct xine_cfg_entry_s xine_cfg_entry_t; typedef void (*xine_config_cb_t) (void *user_data, xine_cfg_entry_t *entry); struct xine_cfg_entry_s { const char *key; int type; char *unknown_value; char *str_value; char *str_default; char *str_sticky; int num_value; int num_default; int range_min; int range_max; char **enum_values; const char *description; const char *help; int exp_level; xine_config_cb_t callback; void *callback_data; }; const char *xine_config_register_string (xine_t *self, const char *key, const char *def_value, const char *description, const char *help, int exp_level, xine_config_cb_t changed_cb, void *cb_data); int xine_config_register_range (xine_t *self, const char *key, int def_value, int min, int max, const char *description, const char *help, int exp_level, xine_config_cb_t changed_cb, void *cb_data); int xine_config_register_enum (xine_t *self, const char *key, int def_value, char **values, const char *description, const char *help, int exp_level, xine_config_cb_t changed_cb, void *cb_data); int xine_config_register_num (xine_t *self, const char *key, int def_value, const char *description, const char *help, int exp_level, xine_config_cb_t changed_cb, void *cb_data); int xine_config_register_bool (xine_t *self, const char *key, int def_value, const char *description, const char *help, int exp_level, xine_config_cb_t changed_cb, void *cb_data); int xine_config_get_first_entry (xine_t *self, xine_cfg_entry_t *entry); int xine_config_get_next_entry (xine_t *self, xine_cfg_entry_t *entry); int xine_config_lookup_entry (xine_t *self, const char *key, xine_cfg_entry_t *entry); void xine_config_update_entry (xine_t *self, const xine_cfg_entry_t *entry); void xine_config_load (xine_t *self, const char *cfg_filename); void xine_config_save (xine_t *self, const char *cfg_filename); void xine_config_reset (xine_t *self); typedef struct { int type; xine_stream_t *stream; void *data; int data_length; struct timeval tv; } xine_event_t; typedef struct { xine_event_t event; uint8_t button; uint16_t x,y; } xine_input_data_t; typedef struct { int num_buttons; int str_len; char str[256]; } xine_ui_data_t; typedef struct { xine_ui_data_t compatibility; int type; int explanation; int num_parameters; int parameters; char messages[1]; } xine_ui_message_data_t; typedef struct { int width; int height; int aspect; int pan_scan; } xine_format_change_data_t; typedef struct { int left; int right; int mute; } xine_audio_level_data_t; typedef struct { const char *description; int percent; } xine_progress_data_t; typedef struct { int alternative; char mrl[1]; } xine_mrl_reference_data_t; typedef struct { int alternative; uint32_t start_time, duration; uint32_t spare[20]; const char mrl[1]; } xine_mrl_reference_data_ext_t; typedef struct { int input; int channel; int radio; uint32_t frequency; uint32_t transmission; uint32_t framerate_numerator; uint32_t framerate_denominator; uint32_t framelines; uint64_t standard_id; uint32_t colorstandard; uint32_t colorsubcarrier; int frame_width; int frame_height; uint32_t spare[20]; int32_t session_id; } xine_set_v4l2_data_t; typedef struct { int bitrate_vbr; int bitrate_mean; int bitrate_peak; int gop_size; int gop_closure; int b_frames; int aspect_ratio; uint32_t spare[20]; } xine_set_mpeg_data_t; typedef struct { int direction; int32_t button; } xine_spu_button_t; typedef struct { int skipped_frames; int skipped_threshold; int discarded_frames; int discarded_threshold; } xine_dropped_frames_t; typedef struct xine_event_queue_s xine_event_queue_t; xine_event_queue_t *xine_event_new_queue (xine_stream_t *stream); void xine_event_dispose_queue (xine_event_queue_t *queue); xine_event_t *xine_event_get (xine_event_queue_t *queue); xine_event_t *xine_event_wait (xine_event_queue_t *queue); void xine_event_free (xine_event_t *event); typedef void (*xine_event_listener_cb_t) (void *user_data, const xine_event_t *event); void xine_event_create_listener_thread (xine_event_queue_t *queue, xine_event_listener_cb_t callback, void *user_data); void xine_event_send (xine_stream_t *stream, const xine_event_t *event); typedef struct xine_osd_s xine_osd_t; xine_osd_t *xine_osd_new (xine_stream_t *self, int x, int y, int width, int height); uint32_t xine_osd_get_capabilities (xine_osd_t *self); void xine_osd_draw_point (xine_osd_t *self, int x, int y, int color); void xine_osd_draw_line (xine_osd_t *self, int x1, int y1, int x2, int y2, int color); void xine_osd_draw_rect (xine_osd_t *self, int x1, int y1, int x2, int y2, int color, int filled ); void xine_osd_draw_text (xine_osd_t *self, int x1, int y1, const char *text, int color_base); void xine_osd_draw_bitmap (xine_osd_t *self, uint8_t *bitmap, int x1, int y1, int width, int height, uint8_t *palette_map); void xine_osd_get_text_size (xine_osd_t *self, const char *text, int *width, int *height); int xine_osd_set_font (xine_osd_t *self, const char *fontname, int size); void xine_osd_set_encoding(xine_osd_t *self, const char *encoding); void xine_osd_set_position (xine_osd_t *self, int x, int y); void xine_osd_show (xine_osd_t *self, int64_t vpts); void xine_osd_show_unscaled (xine_osd_t *self, int64_t vpts); void xine_osd_hide (xine_osd_t *self, int64_t vpts); void xine_osd_clear (xine_osd_t *self); void xine_osd_set_text_palette (xine_osd_t *self, int palette_number, int color_base ); void xine_osd_get_palette (xine_osd_t *self, uint32_t *color, uint8_t *trans); void xine_osd_set_palette (xine_osd_t *self, const uint32_t *const color, const uint8_t *const trans ); void xine_osd_free (xine_osd_t *self); typedef enum { XINE_TVSYSTEM_PAL = 0, XINE_TVSYSTEM_NTSC } xine_tvsystem; int xine_tvmode_init (xine_t *self); int xine_tvmode_use(xine_t *self, int use_tvmode); void xine_tvmode_set_tvsystem(xine_t *self, xine_tvsystem system); int xine_tvmode_switch (xine_t *self, int type, int width, int height, double fps); void xine_tvmode_size (xine_t *self, int *width, int *height, double *pixelratio, double *fps); void xine_tvmode_exit (xine_t *self); } typedef struct cfg_entry_s cfg_entry_t; typedef struct config_values_s config_values_t; struct cfg_entry_s { cfg_entry_t *next; config_values_t *config; char *key; int type; char *unknown_value; char *str_value; char *str_default; int num_value; int num_default; int range_min; int range_max; char **enum_values; char *description; char *help; int exp_level; xine_config_cb_t callback; void *callback_data; }; struct config_values_s { char* (*register_string) (config_values_t *self, const char *key, const char *def_value, const char *description, const char *help, int exp_level, xine_config_cb_t changed_cb, void *cb_data); int (*register_range) (config_values_t *self, const char *key, int def_value, int min, int max, const char *description, const char *help, int exp_level, xine_config_cb_t changed_cb, void *cb_data); int (*register_enum) (config_values_t *self, const char *key, int def_value, char **values, const char *description, const char *help, int exp_level, xine_config_cb_t changed_cb, void *cb_data); int (*register_num) (config_values_t *self, const char *key, int def_value, const char *description, const char *help, int exp_level, xine_config_cb_t changed_cb, void *cb_data); int (*register_bool) (config_values_t *self, const char *key, int def_value, const char *description, const char *help, int exp_level, xine_config_cb_t changed_cb, void *cb_data); void (*update_num) (config_values_t *self, const char *key, int value); void (*update_string) (config_values_t *self, const char *key, const char *value); int (*parse_enum) (const char *str, char **values); cfg_entry_t* (*lookup_entry) (config_values_t *self, const char *key); void (*unregister_callback) (config_values_t *self, const char *key); void (*dispose) (config_values_t *self); cfg_entry_t *first, *last, *cur; pthread_mutex_t config_lock; int current_version; }; config_values_t *_x_config_init (void); int _x_config_change_opt(config_values_t *config, const char *opt) ; } typedef struct xine_list_s xine_list_t; typedef void* xine_list_iterator_t; xine_list_t *xine_list_new(); void xine_list_delete(xine_list_t *list); unsigned int xine_list_size(xine_list_t *list); unsigned int xine_list_empty(xine_list_t *list); void xine_list_push_front(xine_list_t *list, void *value); void xine_list_push_back(xine_list_t *list, void *value); void xine_list_clear(xine_list_t *list); xine_list_iterator_t xine_list_insert(xine_list_t *list, xine_list_iterator_t position, void *value); void xine_list_remove(xine_list_t *list, xine_list_iterator_t position); xine_list_iterator_t xine_list_front(xine_list_t *list); xine_list_iterator_t xine_list_back(xine_list_t *list); xine_list_iterator_t xine_list_find(xine_list_t *list, void *value); xine_list_iterator_t xine_list_next(xine_list_t *list, xine_list_iterator_t ite); xine_list_iterator_t xine_list_prev(xine_list_t *list, xine_list_iterator_t ite); void *xine_list_get_value(xine_list_t *list, xine_list_iterator_t ite); typedef struct xine_array_s xine_array_t; xine_array_t *xine_array_new(size_t initial_size); void xine_array_delete(xine_array_t *array); size_t xine_array_size(xine_array_t *array); void xine_array_clear(xine_array_t *array); void xine_array_add(xine_array_t *array, void *value); void xine_array_insert(xine_array_t *array, unsigned int position, void *value); void xine_array_remove(xine_array_t *array, unsigned int position); void *xine_array_get(xine_array_t *array, unsigned int position); void xine_array_set(xine_array_t *array, unsigned int position, void *value); typedef struct xine_sarray_s xine_sarray_t; typedef int (*xine_sarray_comparator_t)(void*, void*); xine_sarray_t *xine_sarray_new(size_t initial_size, xine_sarray_comparator_t comparator); void xine_sarray_delete(xine_sarray_t *sarray); size_t xine_sarray_size(xine_sarray_t *sarray); void xine_sarray_clear(xine_sarray_t *sarray); int xine_sarray_add(xine_sarray_t *sarray, void *value); void xine_sarray_remove(xine_sarray_t *sarray, unsigned int position); void *xine_sarray_get(xine_sarray_t *sarray, unsigned int position); int xine_sarray_binary_search(xine_sarray_t *sarray, void *key); typedef struct { pthread_mutex_t mutex; char id[80]; char *locked_by; } xine_mutex_t; int xine_mutex_init (xine_mutex_t *mutex, const pthread_mutexattr_t *mutexattr, char *id); int xine_mutex_lock (xine_mutex_t *mutex, char *who); int xine_mutex_unlock (xine_mutex_t *mutex, char *who); int xine_mutex_destroy (xine_mutex_t *mutex); uint32_t xine_mm_accel (void); extern void *(* xine_fast_memcpy)(void *to, const void *from, size_t len); void xine_profiler_init (void); int xine_profiler_allocate_slot (char *label); void xine_profiler_start_count (int id); void xine_profiler_stop_count (int id); void xine_profiler_print_results (void); void *xine_xmalloc(size_t size) __attribute__ ((__malloc__)); void *xine_xmalloc_aligned(size_t alignment, size_t size, void **base); const char *xine_get_homedir(void); char *xine_chomp (char *str); void xine_usec_sleep(unsigned usec); void xine_strdupa(char *dest, char *src); typedef struct yuv_planes_s { unsigned char *y; unsigned char *u; unsigned char *v; unsigned int row_width; unsigned int row_count; } yuv_planes_t; void init_yuv_conversion(void); void init_yuv_planes(yuv_planes_t *yuv_planes, int width, int height); void free_yuv_planes(yuv_planes_t *yuv_planes); extern void (*yuv444_to_yuy2) (const yuv_planes_t *yuv_planes, unsigned char *yuy2_map, int pitch); extern void (*yuv9_to_yv12) (const unsigned char *y_src, int y_src_pitch, unsigned char *y_dest, int y_dest_pitch, const unsigned char *u_src, int u_src_pitch, unsigned char *u_dest, int u_dest_pitch, const unsigned char *v_src, int v_src_pitch, unsigned char *v_dest, int v_dest_pitch, int width, int height); extern void (*yuv411_to_yv12) (const unsigned char *y_src, int y_src_pitch, unsigned char *y_dest, int y_dest_pitch, const unsigned char *u_src, int u_src_pitch, unsigned char *u_dest, int u_dest_pitch, const unsigned char *v_src, int v_src_pitch, unsigned char *v_dest, int v_dest_pitch, int width, int height); extern void (*yv12_to_yuy2) (const unsigned char *y_src, int y_src_pitch, const unsigned char *u_src, int u_src_pitch, const unsigned char *v_src, int v_src_pitch, unsigned char *yuy2_map, int yuy2_pitch, int width, int height, int progressive); extern void (*yuy2_to_yv12) (const unsigned char *yuy2_map, int yuy2_pitch, unsigned char *y_dst, int y_dst_pitch, unsigned char *u_dst, int u_dst_pitch, unsigned char *v_dst, int v_dst_pitch, int width, int height); extern int y_r_table[256]; extern int y_g_table[256]; extern int y_b_table[256]; extern int u_r_table[256]; extern int u_g_table[256]; extern int u_b_table[256]; extern int v_r_table[256]; extern int v_g_table[256]; extern int v_b_table[256]; extern void yv12_to_yv12 (const unsigned char *y_src, int y_src_pitch, unsigned char *y_dst, int y_dst_pitch, const unsigned char *u_src, int u_src_pitch, unsigned char *u_dst, int u_dst_pitch, const unsigned char *v_src, int v_src_pitch, unsigned char *v_dst, int v_dst_pitch, int width, int height); extern void yuy2_to_yuy2 (const unsigned char *src, int src_pitch, unsigned char *dst, int dst_pitch, int width, int height); void xine_hexdump (const char *buf, int length); char *xine_get_system_encoding(void); const char *xine_guess_spu_encoding(void); int xine_monotonic_clock(struct timeval *tv, struct timezone *tz); }
141 typedef unsigned long XID;
142 typedef XID Window;
143 class QGroupBox;
144 class PostFilterParameter : public QObject { public: virtual QMetaObject *metaObject() const { return staticMetaObject(); } virtual const char *className() const; virtual void* qt_cast( const char* ); virtual bool qt_invoke( int, QUObject* ); virtual bool qt_emit( int, QUObject* ); virtual bool qt_property( int id, int f, QVariant* v); static bool qt_static_property( QObject* , int, int, QVariant* ); static QMetaObject* staticMetaObject(); QObject* qObject() { return (QObject*)this; } private: static QMetaObject *metaObj; public: PostFilterParameter(const QString& name, int offset, QWidget* parent) : QObject(parent, name.ascii()), m_offset(offset) {} ~PostFilterParameter() {}; virtual void setValue( const QString& ) = 0; virtual QString getValue() = 0; virtual QWidget *getWidget() = 0; protected: int m_offset; };
145 class PostFilter : public QObject { public: virtual QMetaObject *metaObject() const { return staticMetaObject(); } virtual const char *className() const; virtual void* qt_cast( const char* ); virtual bool qt_invoke( int, QUObject* ); virtual bool qt_emit( int, QUObject* ); virtual bool qt_property( int id, int f, QVariant* v); static bool qt_static_property( QObject* , int, int, QVariant* ); static QMetaObject* staticMetaObject(); QObject* qObject() { return (QObject*)this; } private: static QMetaObject *metaObj; public: PostFilter(const QString& name, xine_t* engine, xine_audio_port_t* audioDriver, xine_video_port_t* videoDriver, QWidget *parent); ~PostFilter(); xine_post_in_t* getInput() const; xine_post_out_t* getOutput() const; void setConfig(const QString &); QString getConfig(); protected: void signalDeleteMe( PostFilter* me ); private : void slotDeletePressed() { signalDeleteMe(this); } void slotApplyIntValue(int offset, int val); void slotApplyDoubleValue(int offset, double val); void slotApplyCharValue(int offset, const QString& val); void slotHelpPressed(); private: xine_t* m_xineEngine; xine_post_t* m_xinePost; xine_post_api_t* m_xinePostAPI; xine_post_api_descr_t* m_xinePostDescr; xine_post_api_parameter_t* m_xinePostParameter; char* m_data; QGroupBox* m_groupBox; QString m_filterName; QPtrList<PostFilterParameter> m_parameterList; };
146 class KXineWidget : public QWidget, private QThread { public: virtual QMetaObject *metaObject() const { return staticMetaObject(); } virtual const char *className() const; virtual void* qt_cast( const char* ); virtual bool qt_invoke( int, QUObject* ); virtual bool qt_emit( int, QUObject* ); virtual bool qt_property( int id, int f, QVariant* v); static bool qt_static_property( QObject* , int, int, QVariant* ); static QMetaObject* staticMetaObject(); QObject* qObject() { return (QObject*)this; } private: static QMetaObject *metaObj; public: KXineWidget(QWidget *parent=0, const char *name=0, const QString& pathToConfigFile = QString::null, const QString& pathToLogoFile = QString::null, const QString& audioDriver = QString::null, const QString& videoDriver = QString::null, bool startManual = false, bool verbose = false); ~KXineWidget(); enum Speed { Normal = 0, Pause, Fast1, Fast2, Slow1, Slow2, Undefined }; bool initXine(); bool isXineReady() const { return m_xineReady; } bool isPlaying() const; Speed getSpeed() const { return m_currentSpeed; } QString getXineLog() const; void setQueue(const QStringList& urls) { m_queue = urls; } void appendToQueue(const QString& url) { m_queue.append(url); } void clearQueue() { m_queue.clear(); } bool isQueueEmpty() const { return m_queue.empty(); } void showOSDMessage(const QString& message, uint duration = 5000 , int priority = 2); const QString& getURL() const { return m_trackURL; } const QString& getTitle() const { return m_trackTitle; } const QString& getArtist() const { return m_trackArtist; } const QString& getAlbum() const { return m_trackAlbum; } const QString& getTrackNumber() const { return m_trackNumber; } const QString& getGenre() const { return m_trackGenre; } const QString& getYear() const { return m_trackYear; } const QString& getComment() const { return m_trackComment; } const QTime& getLength() const { return m_trackLength; } const QString& getVideoCodec() const { return m_trackVideoCodec; } QSize getVideoSize() const { return QSize(m_videoFrameWidth, m_videoFrameHeight); } int getVideoWidth(); int getVideoHeight(); uint getVideoBitrate() const { return m_trackVideoBitrate; } const QString& getAudioCodec() const { return m_trackAudioCodec; } uint getAudioBitrate() const { return m_trackAudioBitrate; } const QString& getSubtitleURL() const { return m_trackSubtitleURL; } const QString& getSaveURL() const { return m_trackSaveURL; } bool hasVideo() const { return m_trackHasVideo; } bool hasAudio() const { return m_trackHasAudio; } bool hasChapters() const { return m_trackHasChapters; } bool hasSubtitleURL() const { return !m_trackSubtitleURL.isNull(); } bool hasSaveURL() const { return !m_trackSaveURL.isNull(); } bool isSeekable() const { return m_trackIsSeekable; } uint getVolume() const; bool SoftwareMixing() const; QTime getPlaytime() const; uint getPosition() const; void savePosition(const int pos) { (pos > 0) ? m_savedPos = pos : m_savedPos = 0; } QStringList getAudioDrivers() const { return m_audioDriverList; } QStringList getVideoDrivers() const { return m_videoDriverList; } void getAutoplayPlugins(QStringList& pluginNames) const; bool getAutoplayPluginURLS(const QString& name, QStringList& urls); QStringList getVisualPlugins() const; void createDeinterlacePlugin(const QString& configString, QWidget* parent); const QString getDeinterlaceConfig() const; QStringList getVideoFilterNames() const; QStringList getAudioFilterNames() const; QStringList getAudioFilterConfig(); QStringList getVideoFilterConfig(); QString getSupportedExtensions() const; void playNextChapter() const; void playPreviousChapter() const; void setStreamSaveDir(const QString& dir); const QString getStreamSaveDir(); void setBroadcasterPort(const uint port); void getVideoSettings(int& hue, int& sat, int& contrast, int& bright, int& avOffset, int& spuOffset) const; QString audiocdDevice() const; QString vcdDevice() const; QString dvdDevice() const; uint currentDVDTitleNumber() const; uint getDVDTitleCount() const; uint currentDVDChapterNumber() const; uint getDVDChapterCount() const; uint currentDVDAngleNumber() const; uint getDVDAngleCount() const; QImage getScreenshot() const; void getScreenshot(uchar*& rgb32BitData, int& videoWidth, int& videoHeight, double& scaleFactor) const; const xine_t* const getXineEngine() const; void saveXineConfig(); void startMouseHideTimer(); void stopMouseHideTimer(); void globalPosChanged(); protected: void signalXineFatal(const QString& message); void signalXineError(const QString& message); void signalXineMessage(const QString& message); void signalXineStatus(const QString& status); void signalXineReady(); void signalXinePlaying(); void signalHasChapters(bool); void signalPlaybackFinished(); void signalNewChannels(const QStringList& audio, const QStringList& sub, int currentAudio, int currentSub); void signalNewPosition(int, const QTime&); void signalTitleChanged(); void signalVideoSizeChanged(); void signalLengthChanged(); void signalRightClick(const QPoint&); void signalLeftClick(const QPoint&); void signalMiddleClick(); void signalDoubleClick(); void signalSyncVolume(); void signalDvbOSDHidden(); public : virtual void polish(); void slotPlay(); void slotStop(); void slotSetVolume(int); void slotToggleMute(); void slotSpeedPause(); void slotSpeedNormal(); void slotSpeedFaster(); void slotSpeedSlower(); void slotSetVisualPlugin(const QString& name); void slotSetAudioChannel(int); void slotSetSubtitleChannel(int); void slotSetFileSubtitles(QString); void slotStartSeeking(); void slotSeekToPosition(int pos); void slotSeekToTime(const QTime&); void slotStopSeeking(); void slotEnableVideoFilters(bool enable); void slotEnableAudioFilters(bool enable); void slotEject(); void slotEnableAutoresize(bool enable); void slotAspectRatioAuto(); void slotAspectRatio4_3(); void slotAspectRatioAnamorphic(); void slotAspectRatioSquare(); void slotAspectRatioDVB(); void slotZoomIn(); void slotZoomOut(); void slotZoomOff(); void slotZoomOutX(); void slotZoomInX(); void slotZoomOutY(); void slotZoomInY(); void slotToggleDeinterlace(); void slotSetDeinterlaceConfig(const QString&); void slotGetInfoDelayed(); void slotSetAudiocdDevice(const QString&); void slotSetVcdDevice(const QString&); void slotSetDvdDevice(const QString&); void slotSetHue(int hue); void slotSetSaturation(int sat); void slotSetContrast(int contrast); void slotSetBrightness(int bright); void slotSetAVOffset(int av); void slotSetSpuOffset(int spu); void slotSetEq30(int val); void slotSetEq60(int val); void slotSetEq125(int val); void slotSetEq250(int val); void slotSetEq500(int val); void slotSetEq1k(int val); void slotSetEq2k(int val); void slotSetEq4k(int val); void slotSetEq8k(int val); void slotSetEq16k(int val); void slotSetVolumeGain(bool gain); void slotMenuToggle(); void slotMenuTitle(); void slotMenuRoot(); void slotMenuSubpicture(); void slotMenuAudio(); void slotMenuAngle(); void slotMenuPart(); void slotDVDMenuLeft(); void slotDVDMenuRight(); void slotDVDMenuUp(); void slotDVDMenuDown(); void slotDVDMenuSelect(); void slotCreateVideoFilter(const QString& name, QWidget* parent); void slotCreateAudioFilter(const QString& name, QWidget* parent); void slotDeleteVideoFilter(PostFilter* filter); void slotDeleteAudioFilter(PostFilter* filter); void slotRemoveAllVideoFilters(); void slotRemoveAllAudioFilters(); protected : void slotSendPosition(); void slotEmitLengthInfo(); void slotHideMouse(); void slotOSDHide(); void slotNoRecentMessage(); protected: void mouseMoveEvent(QMouseEvent*); void mousePressEvent(QMouseEvent*); void timerEvent(QTimerEvent*); void mouseDoubleClickEvent(QMouseEvent*); void wheelEvent(QWheelEvent*); void initOSD(); private: virtual void run(); static void destSizeCallback(void* p, int video_width, int video_height, double video_aspect, int* dest_width, int* dest_height, double* dest_aspect); static void frameOutputCallback(void* p, int video_width, int video_height, double video_aspect, int* dest_x, int* dest_y, int* dest_width, int* dest_height, double* dest_aspect, int* win_x, int* win_y); static void videoDriverChangedCallback(void* p, xine_cfg_entry_t* entry); static void audioDriverChangedCallback(void* p, xine_cfg_entry_t* entry); static void audioMixerMethodChangedCallback(void* p, xine_cfg_entry_t* entry); static void showOSDMessagesChangedCallback(void* p, xine_cfg_entry_t* entry); static void sizeForOSDMessagesChangedCallback(void* p, xine_cfg_entry_t* entry); static void fontForOSDMessagesChangedCallback(void* p, xine_cfg_entry_t* entry); static void xineEventListener(void* p, const xine_event_t*); protected: void sendXineError(); QTime getLengthInfo(); void wireVideoFilters(); void unwireVideoFilters(); void wireAudioFilters(); void unwireAudioFilters(); public: static void debugOut(QString); static void errorOut(QString); static void warningOut(QString); static QTime msToTime(int msec); static void yuy2Toyv12(uint8_t *y, uint8_t *u, uint8_t *v, uint8_t *input, int width, int height); static uchar *yv12ToRgb(uint8_t *src_y, uint8_t *src_u, uint8_t *src_v, int width, int height); protected: QStringList m_queue; bool m_startXineManual; bool m_xineReady; QString m_logoFile; QString m_preferedAudio; QString m_preferedVideo; bool m_xineVerbose; QString m_configFilePath; QStringList m_audioDriverList; QStringList m_videoDriverList; Window m_xineWindow; Display* m_xineDisplay; int m_xineScreen; x11_visual_t m_x11Visual; xine_t* m_xineEngine; xine_audio_port_t* m_audioDriver; xine_video_port_t* m_videoDriver; xine_stream_t* m_xineStream; xine_event_queue_t* m_eventQueue; xine_osd_t* m_osd; bool m_osdUnscaled; bool m_osdShow; int m_osdSize; char* m_osdFont; char** m_audioChoices; char* m_audioInfo; char** m_videoChoices; char* m_videoInfo; char* m_mixerInfo; char* m_osdShowInfo; char** m_osdSizeOptions; char* m_osdSizeInfo; char* m_osdFontInfo; QPtrList<PostFilter> m_videoFilterList; bool m_videoFiltersEnabled; QPtrList<PostFilter> m_audioFilterList; bool m_audioFiltersEnabled; PostFilter* m_deinterlaceFilter; bool m_deinterlaceEnabled; PostFilter* m_visualPlugin; QString m_audioDriverName; QString m_videoDriverName; QString m_visualPluginName; int m_videoFrameWidth; int m_videoFrameHeight; double m_videoAspect; int m_globalX; int m_globalY; Speed m_currentSpeed; QString m_xineMessage; QString m_xineError; QString m_statusString; bool m_softwareMixer; bool m_volumeGain; double m_displayRatio; QString m_cachedCDPath, m_cachedVCDPath, m_cachedDVDPath; QSize m_newParentSize; int m_currentZoom; int m_currentZoomX, m_currentZoomY; QStringList m_audioCh; QStringList m_subCh; int m_currentAudio, m_currentSub; int m_savedPos; bool m_autoresizeEnabled; bool m_DVDButtonEntered; QString m_newMRLReference; QTimer m_posTimer; QTimer m_lengthInfoTimer; uint m_lengthInfoTries; QTimer m_mouseHideTimer; QTimer m_osdTimer; QTimer m_recentMessagesTimer; QString m_trackURL; QString m_trackTitle; QString m_trackArtist; QString m_trackAlbum; QString m_trackNumber; QString m_trackGenre; QString m_trackYear; QString m_trackComment; QTime m_trackLength; QString m_trackVideoCodec; uint m_trackVideoBitrate; QString m_trackAudioCodec; uint m_trackAudioBitrate; QString m_trackSubtitleURL; QString m_trackSaveURL; bool m_trackHasVideo; bool m_trackHasAudio; bool m_trackHasChapters; bool m_trackIsSeekable; protected: void stopDvb(); public: QString TimeShiftFilename; public : void setDvb( const QString &pipeName, const QString &chanName, int haveVideo ); void setDvbCurrentNext( const QString &channelName, const QStringList &list ); bool openDvb(); bool playDvb(); void slotPlayTimeShift(); void dvbShowOSD(); void dvbHideOSD(); private: QString m_dvbChannelName; bool m_dvbSaveTitle; int dvbHaveVideo; QTimer dvbOSDHideTimer; xine_osd_t *dvbOSD; QStringList dvbCurrentNext; unsigned int dvbColor[256]; unsigned char dvbTrans[256]; unsigned int rgb2yuv( unsigned int R, unsigned int G, unsigned int B ); void initDvbPalette(); };
147 QTime KXineWidget::getLengthInfo() { int pos, time, length; int t = 0, ret = 0; while(((ret = xine_get_pos_length(m_xineStream, &pos, &time, &length)) == 0) && (++t < 5)) xine_usec_sleep(100000); if ( (ret != 0) && (length > 0) ) { return msToTime(length); } return QTime(); }
148 QTime KXineWidget::msToTime(int msec) { QTime t; t = t.addMSecs(msec); return t; }