src/declarative/qml/qdeclarativeprivate.h
changeset 33 3e2da88830cd
parent 30 5dc02b23752f
child 37 758a864f9613
equal deleted inserted replaced
30:5dc02b23752f 33:3e2da88830cd
    40 ****************************************************************************/
    40 ****************************************************************************/
    41 
    41 
    42 #ifndef QDECLARATIVEPRIVATE_H
    42 #ifndef QDECLARATIVEPRIVATE_H
    43 #define QDECLARATIVEPRIVATE_H
    43 #define QDECLARATIVEPRIVATE_H
    44 
    44 
       
    45 //
       
    46 //  W A R N I N G
       
    47 //  -------------
       
    48 //
       
    49 // This file is not part of the Qt API.  It exists purely as an
       
    50 // implementation detail.  This header file may change from version to
       
    51 // version without notice, or even be removed.
       
    52 //
       
    53 // We mean it.
       
    54 //
       
    55 
    45 #include <QtCore/qglobal.h>
    56 #include <QtCore/qglobal.h>
    46 #include <QtCore/qvariant.h>
    57 #include <QtCore/qvariant.h>
    47 #ifndef Q_OS_WIN
    58 #ifndef Q_OS_WIN
    48 #include <stdint.h>
    59 #include <stdint.h>
    49 #endif
    60 #endif
   175     inline const QMetaObject *attachedPropertiesMetaObject()
   186     inline const QMetaObject *attachedPropertiesMetaObject()
   176     {
   187     {
   177         return AttachedPropertySelector<T, has_attachedPropertiesMethod<T, has_attachedPropertiesMember<T>::value>::value>::metaObject();
   188         return AttachedPropertySelector<T, has_attachedPropertiesMethod<T, has_attachedPropertiesMember<T>::value>::value>::metaObject();
   178     }
   189     }
   179 
   190 
       
   191     enum AutoParentResult { Parented, IncompatibleObject, IncompatibleParent };
       
   192     typedef AutoParentResult (*AutoParentFunction)(QObject *object, QObject *parent);
       
   193 
   180     struct RegisterType {
   194     struct RegisterType {
   181         int version;
   195         int version;
   182 
   196 
   183         int typeId;
   197         int typeId;
   184         int listId;
   198         int listId;
   212         int listId;
   226         int listId;
   213 
   227 
   214         const char *iid;
   228         const char *iid;
   215     };
   229     };
   216 
   230 
   217     int Q_DECLARATIVE_EXPORT registerType(const RegisterType &);
   231     struct RegisterAutoParent {
   218     int Q_DECLARATIVE_EXPORT registerType(const RegisterInterface &);
   232         int version;
   219 
   233 
       
   234         AutoParentFunction function;
       
   235     };
       
   236 
       
   237     enum RegistrationType {
       
   238         TypeRegistration       = 0, 
       
   239         InterfaceRegistration  = 1,
       
   240         AutoParentRegistration = 2
       
   241     };
       
   242 
       
   243     int Q_DECLARATIVE_EXPORT qmlregister(RegistrationType, void *);
   220 }
   244 }
   221 
   245 
   222 QT_END_NAMESPACE
   246 QT_END_NAMESPACE
   223 
   247 
   224 QT_END_HEADER
   248 QT_END_HEADER