163f261d6cf154f8f7f6cdb6bd105f7f718f6110
[lqt.git] / generator / qt_internal.lua
blob163f261d6cf154f8f7f6cdb6bd105f7f718f6110
2 local classes, enums = ...
3 local ret1, ret2 = {}, {}
5 -- don't bind this Qt internals/unsupported classes
6 -- if there are linker errors, or errors when laoding the .so 
7 -- add the class here 
9 for c in pairs(classes) do
10         local n = c.xarg.name
11         if n~=string.lower(n) and not (string.match(n, '_')
12                         -- these are useless to bind, but compile
13                         or c.xarg.fullname=='QVariant::Private' -- well, it IS public
14                         or c.xarg.fullname=='QVariant::Private::Data' -- well, it IS public
15                         or c.xarg.fullname=='QVariant::PrivateShared' -- well, it IS public
16                         or c.xarg.fullname=='QObjectData'-- compiles
17                         or c.xarg.fullname=='QtConcurrent::internal::ExceptionStore' -- it compiles
18                         or c.xarg.fullname=='QtConcurrent::internal::ExceptionHolder' -- it compiles
19                         or c.xarg.fullname=='QtConcurrent::ResultIteratorBase' -- it compiles
20                         or c.xarg.fullname=='QtSharedPointer' -- compiles
21                         or c.xarg.fullname=='QtSharedPointer::InternalRefCountData' -- compiles
22                         or c.xarg.fullname=='QtSharedPointer::ExternalRefCountData' -- compiles
23                         or c.xarg.fullname=='QUpdateLaterEvent' -- compiles
24                         or c.xarg.fullname=='QTextStreamManipulator' -- compiles
25                         or c.xarg.fullname=='QtConcurrent::ThreadEngineSemaphore' -- compiles
26                         or c.xarg.fullname=='QTextObject' -- private/protected destcrutor
27                         or c.xarg.fullname=='QTextCodec' -- private/protected destcrutor
28                         or c.xarg.fullname=='QTextBlockGroup' -- private/protected destcrutor
29                         or c.xarg.fullname=='QSessionManager' -- private/protected destcrutor
30                         or c.xarg.fullname=='QAccessibleWidget' -- private/protected destcrutor
31                         or c.xarg.fullname=='QAccessibleObjectEx' -- private/protected destcrutor
32                         or c.xarg.fullname=='QClipboard' -- private/protected destcrutor
33                         or c.xarg.fullname=='QAccessibleWidgetEx' -- private/protected destcrutor
34                         or c.xarg.fullname=='QWebFrame' -- private/protected destcrutor
35                         or c.xarg.fullname=='QWebHistory' -- private/private/protected destcrutor
36                         or c.xarg.fullname=='QWebSettings' -- private/protected destcrutor
37                         or c.xarg.fullname=='QAccessibleObject' -- private/protected destcrutor
38                         or c.xarg.fullname=='QAccessibleObject' -- private/protected destcrutor
39                         or c.xarg.fullname=='QAccessibleObject' -- private/protected destcrutor
40                         or c.xarg.fullname=='QtConcurrent::ThreadEngineBarrier' -- linker error
41                         
42                         -- platform specific, TODO
43                         or c.xarg.fullname=='QWindowsCEStyle'
44                         or c.xarg.fullname=='QWindowsMobileStyle'
45                         or c.xarg.fullname=='QWindowsXPStyle'
46                         or c.xarg.fullname=='QWindowsVistaStyle'
47                         or c.xarg.fullname=='QMacStyle'
48                         or c.xarg.fullname=='QS60Style'
49                         or c.xarg.fullname=='QS60MainApplication'
50                         or c.xarg.fullname=='QS60MainAppUI'
51                         or c.xarg.fullname=='QS60MainDocument'
52                         or c.xarg.fullname=='QWSCalibratedMouseHandler'
53                         or c.xarg.fullname=='QWSClient'
54                         or c.xarg.fullname=='QWSEmbedWidget'
55                         or c.xarg.fullname=='QWSEvent'
56                         or c.xarg.fullname=='QWSGLWindowSurface'
57                         or c.xarg.fullname=='QWSInputMethod'
58                         or c.xarg.fullname=='QWSKeyboardHandler'
59                         or c.xarg.fullname=='QWSMouseHandler'
60                         or c.xarg.fullname=='QWSPointerCalibrationData'
61                         or c.xarg.fullname=='QWSScreenSaver'
62                         or c.xarg.fullname=='QWSServer'
63                         or c.xarg.fullname=='QWSWindow'
64                         or c.xarg.fullname=='QXmlNodeModelIndex' -- a method "name" is public but is not part of the documented API
65                         or c.xarg.fullname=='QXmlName' -- a method "localName" is public but is not part of the documented API
67                         -- binding bugs
68                         or c.xarg.fullname=='QThreadStorageData' -- binding error (function pointer)
69                         or c.xarg.fullname=='QForeachContainerBase' -- "was not declared in this scope"
70                         or c.xarg.fullname=='QtConcurrent::Exception'                 -- GCC throw() in destructor base declaration
71                         or c.xarg.fullname=='QtConcurrent::UnhandledException'        -- GCC throw() in destructor base declaration
72                         or c.xarg.fullname=='QEasingCurve'        -- wrapper for function: function pointer parsing problem
73                         or c.xarg.fullname=='QHashData'        -- not in the docs at all. free_helper is not present during compilation
74                         --or string.match(c.xarg.fullname, '^QtConcurrent') -- does not make sense anyway, because we should duplicate the lua_State
76                         ) then
77                 ret1[c] = true
78         end
79 end
81 for e in pairs(enums) do
82         local n = e.xarg.name
83         if n~=string.lower(n) and not string.match(n, '_') then
84                 ret2[e] = true
85         end
86 end
88 return ret1, ret2