コード例 #1
0
ファイル: QMetaObject.cs プロジェクト: micro-chen/qyoto
        public static bool Connect(QObject sender, int signal_index, QObject receiver, int method_index, int type, ref int types)
        {
            StackItem[] stack = new StackItem[7];
#if DEBUG
            stack[1].s_class = (IntPtr)DebugGCHandle.Alloc(sender);
#else
            stack[1].s_class = (IntPtr)GCHandle.Alloc(sender);
#endif
            stack[2].s_int = signal_index;
#if DEBUG
            stack[3].s_class = (IntPtr)DebugGCHandle.Alloc(receiver);
#else
            stack[3].s_class = (IntPtr)GCHandle.Alloc(receiver);
#endif
            stack[4].s_int = method_index;
            stack[5].s_int = type;
            stack[6].s_int = types;
            staticInterceptor.Invoke("connect#$#$$$", "connect(const QObject*, int, const QObject*, int, int, int*)", stack);
#if DEBUG
            DebugGCHandle.Free((GCHandle)stack[1].s_class);
#else
            ((GCHandle)stack[1].s_class).SynchronizedFree();
#endif
#if DEBUG
            DebugGCHandle.Free((GCHandle)stack[3].s_class);
#else
            ((GCHandle)stack[3].s_class).SynchronizedFree();
#endif
            types = stack[6].s_int;
            return(stack[0].s_bool);
        }
コード例 #2
0
        public bool SetContent(QByteArray text, bool namespaceProcessing, StringBuilder errorMsg, ref int errorLine)
        {
            StackItem[] stack = new StackItem[5];
#if DEBUG
            stack[1].s_class = (IntPtr)DebugGCHandle.Alloc(text);
#else
            stack[1].s_class = (IntPtr)GCHandle.Alloc(text);
#endif
            stack[2].s_bool = namespaceProcessing;
#if DEBUG
            stack[3].s_class = (IntPtr)DebugGCHandle.Alloc(errorMsg);
#else
            stack[3].s_class = (IntPtr)GCHandle.Alloc(errorMsg);
#endif
            stack[4].s_int = errorLine;
            interceptor.Invoke("setContent#$$$", "setContent(const QByteArray&, bool, QString*, int*)", stack);
#if DEBUG
            DebugGCHandle.Free((GCHandle)stack[1].s_class);
#else
            ((GCHandle)stack[1].s_class).SynchronizedFree();
#endif
#if DEBUG
            DebugGCHandle.Free((GCHandle)stack[3].s_class);
#else
            ((GCHandle)stack[3].s_class).SynchronizedFree();
#endif
            errorLine = stack[4].s_int;
            return(stack[0].s_bool);
        }
コード例 #3
0
ファイル: QFontDialog.cs プロジェクト: micro-chen/qyoto
        public static QFont GetFont(ref bool ok, QFont initial, QWidget parent)
        {
            StackItem[] stack = new StackItem[4];
            stack[1].s_bool = ok;
#if DEBUG
            stack[2].s_class = (IntPtr)DebugGCHandle.Alloc(initial);
#else
            stack[2].s_class = (IntPtr)GCHandle.Alloc(initial);
#endif
#if DEBUG
            stack[3].s_class = (IntPtr)DebugGCHandle.Alloc(parent);
#else
            stack[3].s_class = (IntPtr)GCHandle.Alloc(parent);
#endif
            staticInterceptor.Invoke("getFont$##", "getFont(bool*, const QFont&, QWidget*)", stack);
            ok = stack[1].s_bool;
#if DEBUG
            DebugGCHandle.Free((GCHandle)stack[2].s_class);
#else
            ((GCHandle)stack[2].s_class).SynchronizedFree();
#endif
#if DEBUG
            DebugGCHandle.Free((GCHandle)stack[3].s_class);
#else
            ((GCHandle)stack[3].s_class).SynchronizedFree();
#endif
            object returnValue = ((GCHandle)stack[0].s_class).Target;
#if DEBUG
            DebugGCHandle.Free((GCHandle)stack[0].s_class);
#else
            ((GCHandle)stack[0].s_class).SynchronizedFree();
#endif
            return((QFont)returnValue);
        }
コード例 #4
0
ファイル: QFontMetricsF.cs プロジェクト: micro-chen/qyoto
        public QSizeF Size(int flags, string str, int tabstops, ref int tabarray)
        {
            StackItem[] stack = new StackItem[5];
            stack[1].s_int = flags;
#if DEBUG
            stack[2].s_class = (IntPtr)DebugGCHandle.Alloc(str);
#else
            stack[2].s_class = (IntPtr)GCHandle.Alloc(str);
#endif
            stack[3].s_int = tabstops;
            stack[4].s_int = tabarray;
            interceptor.Invoke("size$$$$", "size(int, const QString&, int, int*) const", stack);
#if DEBUG
            DebugGCHandle.Free((GCHandle)stack[2].s_class);
#else
            ((GCHandle)stack[2].s_class).SynchronizedFree();
#endif
            tabarray = stack[4].s_int;
            object returnValue = ((GCHandle)stack[0].s_class).Target;
#if DEBUG
            DebugGCHandle.Free((GCHandle)stack[0].s_class);
#else
            ((GCHandle)stack[0].s_class).SynchronizedFree();
#endif
            return((QSizeF)returnValue);
        }
コード例 #5
0
ファイル: QScriptClass.cs プロジェクト: micro-chen/qyoto
        public virtual uint QueryProperty(QScriptValue arg1, QScriptString name, uint flags, ref int id)
        {
            StackItem[] stack = new StackItem[5];
#if DEBUG
            stack[1].s_class = (IntPtr)DebugGCHandle.Alloc(arg1);
#else
            stack[1].s_class = (IntPtr)GCHandle.Alloc(arg1);
#endif
#if DEBUG
            stack[2].s_class = (IntPtr)DebugGCHandle.Alloc(name);
#else
            stack[2].s_class = (IntPtr)GCHandle.Alloc(name);
#endif
            stack[3].s_uint = flags;
            stack[4].s_int  = id;
            interceptor.Invoke("queryProperty##$$", "queryProperty(const QScriptValue&, const QScriptString&, QScriptClass::QueryFlags, uint*)", stack);
#if DEBUG
            DebugGCHandle.Free((GCHandle)stack[1].s_class);
#else
            ((GCHandle)stack[1].s_class).SynchronizedFree();
#endif
#if DEBUG
            DebugGCHandle.Free((GCHandle)stack[2].s_class);
#else
            ((GCHandle)stack[2].s_class).SynchronizedFree();
#endif
            id = stack[4].s_int;
            return(stack[0].s_uint);
        }
コード例 #6
0
ファイル: SmokeInvocation.cs プロジェクト: micro-chen/qyoto
        public static IntPtr OverridenMethod(IntPtr instance, string method)
        {
            Type klass = ((GCHandle)instance).Target.GetType();

            if (method == "metaObject() const")
            {
#if DEBUG
                return((IntPtr)DebugGCHandle.Alloc(metaObjectMethod));
#else
                return((IntPtr)GCHandle.Alloc(metaObjectMethod));
#endif
            }

            Dictionary <string, MemberInfo> methods;
            if (!overridenMethods.TryGetValue(klass, out methods))
            {
                return((IntPtr)0);
            }

            MemberInfo methodInfo;
            if (!methods.TryGetValue(method, out methodInfo))
            {
                return((IntPtr)0);
            }

#if DEBUG
            return((IntPtr)DebugGCHandle.Alloc(methodInfo));
#else
            return((IntPtr)GCHandle.Alloc(methodInfo));
#endif
        }
コード例 #7
0
        public bool SetContent(QIODevice dev, StringBuilder errorMsg, ref int errorLine)
        {
            StackItem[] stack = new StackItem[4];
#if DEBUG
            stack[1].s_class = (IntPtr)DebugGCHandle.Alloc(dev);
#else
            stack[1].s_class = (IntPtr)GCHandle.Alloc(dev);
#endif
#if DEBUG
            stack[2].s_class = (IntPtr)DebugGCHandle.Alloc(errorMsg);
#else
            stack[2].s_class = (IntPtr)GCHandle.Alloc(errorMsg);
#endif
            stack[3].s_int = errorLine;
            interceptor.Invoke("setContent#$$", "setContent(QIODevice*, QString*, int*)", stack);
#if DEBUG
            DebugGCHandle.Free((GCHandle)stack[1].s_class);
#else
            ((GCHandle)stack[1].s_class).SynchronizedFree();
#endif
#if DEBUG
            DebugGCHandle.Free((GCHandle)stack[2].s_class);
#else
            ((GCHandle)stack[2].s_class).SynchronizedFree();
#endif
            errorLine = stack[3].s_int;
            return(stack[0].s_bool);
        }
コード例 #8
0
        public bool SetContent(string text, StringBuilder errorMsg, ref int errorLine, ref int errorColumn)
        {
            StackItem[] stack = new StackItem[5];
#if DEBUG
            stack[1].s_class = (IntPtr)DebugGCHandle.Alloc(text);
#else
            stack[1].s_class = (IntPtr)GCHandle.Alloc(text);
#endif
#if DEBUG
            stack[2].s_class = (IntPtr)DebugGCHandle.Alloc(errorMsg);
#else
            stack[2].s_class = (IntPtr)GCHandle.Alloc(errorMsg);
#endif
            stack[3].s_int = errorLine;
            stack[4].s_int = errorColumn;
            interceptor.Invoke("setContent$$$$", "setContent(const QString&, QString*, int*, int*)", stack);
#if DEBUG
            DebugGCHandle.Free((GCHandle)stack[1].s_class);
#else
            ((GCHandle)stack[1].s_class).SynchronizedFree();
#endif
#if DEBUG
            DebugGCHandle.Free((GCHandle)stack[2].s_class);
#else
            ((GCHandle)stack[2].s_class).SynchronizedFree();
#endif
            errorLine   = stack[3].s_int;
            errorColumn = stack[4].s_int;
            return(stack[0].s_bool);
        }
コード例 #9
0
        public QRect BoundingRect(int x, int y, int w, int h, int flags, string text, int tabstops, ref int tabarray)
        {
            StackItem[] stack = new StackItem[9];
            stack[1].s_int = x;
            stack[2].s_int = y;
            stack[3].s_int = w;
            stack[4].s_int = h;
            stack[5].s_int = flags;
#if DEBUG
            stack[6].s_class = (IntPtr)DebugGCHandle.Alloc(text);
#else
            stack[6].s_class = (IntPtr)GCHandle.Alloc(text);
#endif
            stack[7].s_int = tabstops;
            stack[8].s_int = tabarray;
            interceptor.Invoke("boundingRect$$$$$$$$", "boundingRect(int, int, int, int, int, const QString&, int, int*) const", stack);
#if DEBUG
            DebugGCHandle.Free((GCHandle)stack[6].s_class);
#else
            ((GCHandle)stack[6].s_class).SynchronizedFree();
#endif
            tabarray = stack[8].s_int;
            object returnValue = ((GCHandle)stack[0].s_class).Target;
#if DEBUG
            DebugGCHandle.Free((GCHandle)stack[0].s_class);
#else
            ((GCHandle)stack[0].s_class).SynchronizedFree();
#endif
            return((QRect)returnValue);
        }
コード例 #10
0
ファイル: QUdpSocket.cs プロジェクト: micro-chen/qyoto
        public long ReadDatagram(Pointer <sbyte> data, long maxlen, QHostAddress host, ref short port)
        {
            StackItem[] stack = new StackItem[5];
#if DEBUG
            stack[1].s_class = (IntPtr)DebugGCHandle.Alloc(data);
#else
            stack[1].s_class = (IntPtr)GCHandle.Alloc(data);
#endif
            stack[2].s_long = maxlen;
#if DEBUG
            stack[3].s_class = (IntPtr)DebugGCHandle.Alloc(host);
#else
            stack[3].s_class = (IntPtr)GCHandle.Alloc(host);
#endif
            stack[4].s_short = port;
            interceptor.Invoke("readDatagram$$#$", "readDatagram(char*, qint64, QHostAddress*, unsigned short*)", stack);
#if DEBUG
            DebugGCHandle.Free((GCHandle)stack[1].s_class);
#else
            ((GCHandle)stack[1].s_class).SynchronizedFree();
#endif
#if DEBUG
            DebugGCHandle.Free((GCHandle)stack[3].s_class);
#else
            ((GCHandle)stack[3].s_class).SynchronizedFree();
#endif
            port = stack[4].s_short;
            return(stack[0].s_long);
        }
コード例 #11
0
ファイル: SmokeInvocation.cs プロジェクト: micro-chen/qyoto
        public override int GetHashCode()
        {
#if DEBUG
            return(QyotoHash((IntPtr)DebugGCHandle.Alloc(instance)));
#else
            return(QyotoHash((IntPtr)GCHandle.Alloc(instance)));
#endif
        }
コード例 #12
0
        public static string GetItem(QWidget parent, string title, string label, List <string> items, int current, bool editable, ref bool ok, uint flags)
        {
            StackItem[] stack = new StackItem[9];
#if DEBUG
            stack[1].s_class = (IntPtr)DebugGCHandle.Alloc(parent);
#else
            stack[1].s_class = (IntPtr)GCHandle.Alloc(parent);
#endif
#if DEBUG
            stack[2].s_class = (IntPtr)DebugGCHandle.Alloc(title);
#else
            stack[2].s_class = (IntPtr)GCHandle.Alloc(title);
#endif
#if DEBUG
            stack[3].s_class = (IntPtr)DebugGCHandle.Alloc(label);
#else
            stack[3].s_class = (IntPtr)GCHandle.Alloc(label);
#endif
#if DEBUG
            stack[4].s_class = (IntPtr)DebugGCHandle.Alloc(items);
#else
            stack[4].s_class = (IntPtr)GCHandle.Alloc(items);
#endif
            stack[5].s_int  = current;
            stack[6].s_bool = editable;
            stack[7].s_bool = ok;
            stack[8].s_uint = flags;
            staticInterceptor.Invoke("getItem#$$?$$$$", "getItem(QWidget*, const QString&, const QString&, const QStringList&, int, bool, bool*, Qt::WindowFlags)", stack);
#if DEBUG
            DebugGCHandle.Free((GCHandle)stack[1].s_class);
#else
            ((GCHandle)stack[1].s_class).SynchronizedFree();
#endif
#if DEBUG
            DebugGCHandle.Free((GCHandle)stack[2].s_class);
#else
            ((GCHandle)stack[2].s_class).SynchronizedFree();
#endif
#if DEBUG
            DebugGCHandle.Free((GCHandle)stack[3].s_class);
#else
            ((GCHandle)stack[3].s_class).SynchronizedFree();
#endif
#if DEBUG
            DebugGCHandle.Free((GCHandle)stack[4].s_class);
#else
            ((GCHandle)stack[4].s_class).SynchronizedFree();
#endif
            ok = stack[7].s_bool;
            object returnValue = ((GCHandle)stack[0].s_class).Target;
#if DEBUG
            DebugGCHandle.Free((GCHandle)stack[0].s_class);
#else
            ((GCHandle)stack[0].s_class).SynchronizedFree();
#endif
            return((string)returnValue);
        }
コード例 #13
0
        public static string GetText(QWidget parent, string title, string label, QLineEdit.EchoMode echo, string text, ref bool ok, uint flags)
        {
            StackItem[] stack = new StackItem[8];
#if DEBUG
            stack[1].s_class = (IntPtr)DebugGCHandle.Alloc(parent);
#else
            stack[1].s_class = (IntPtr)GCHandle.Alloc(parent);
#endif
#if DEBUG
            stack[2].s_class = (IntPtr)DebugGCHandle.Alloc(title);
#else
            stack[2].s_class = (IntPtr)GCHandle.Alloc(title);
#endif
#if DEBUG
            stack[3].s_class = (IntPtr)DebugGCHandle.Alloc(label);
#else
            stack[3].s_class = (IntPtr)GCHandle.Alloc(label);
#endif
            stack[4].s_int = (int)echo;
#if DEBUG
            stack[5].s_class = (IntPtr)DebugGCHandle.Alloc(text);
#else
            stack[5].s_class = (IntPtr)GCHandle.Alloc(text);
#endif
            stack[6].s_bool = ok;
            stack[7].s_uint = flags;
            staticInterceptor.Invoke("getText#$$$$$$", "getText(QWidget*, const QString&, const QString&, QLineEdit::EchoMode, const QString&, bool*, Qt::WindowFlags)", stack);
#if DEBUG
            DebugGCHandle.Free((GCHandle)stack[1].s_class);
#else
            ((GCHandle)stack[1].s_class).SynchronizedFree();
#endif
#if DEBUG
            DebugGCHandle.Free((GCHandle)stack[2].s_class);
#else
            ((GCHandle)stack[2].s_class).SynchronizedFree();
#endif
#if DEBUG
            DebugGCHandle.Free((GCHandle)stack[3].s_class);
#else
            ((GCHandle)stack[3].s_class).SynchronizedFree();
#endif
#if DEBUG
            DebugGCHandle.Free((GCHandle)stack[5].s_class);
#else
            ((GCHandle)stack[5].s_class).SynchronizedFree();
#endif
            ok = stack[6].s_bool;
            object returnValue = ((GCHandle)stack[0].s_class).Target;
#if DEBUG
            DebugGCHandle.Free((GCHandle)stack[0].s_class);
#else
            ((GCHandle)stack[0].s_class).SynchronizedFree();
#endif
            return((string)returnValue);
        }
コード例 #14
0
ファイル: SmokeInvocation.cs プロジェクト: micro-chen/qyoto
        // A variant of Invoke() for use in method calls with 'ref' argument types.
        // The caller is responsible for setting up the stack, and copying items
        // back from the stack to the arguments after Invoke() has been called.
        public void Invoke(string mungedName, string signature, StackItem[] stack)
        {
#if DEBUG
            if ((QDebug.DebugChannel() & QtDebugChannel.QTDB_TRANSPARENT_PROXY) != 0)
            {
                Console.WriteLine("ENTER SmokeInvocation.Invoke1() MethodName: {0}.{1}",
                                  className,
                                  signature);
            }
#endif

            ModuleIndex methodId;
            methodId.smoke = IntPtr.Zero;
            methodId.index = -1;
            if (!methodIdCache.TryGetValue(signature, out methodId))
            {
                methodId = FindMethodId(className, mungedName, signature);

                if (methodId.index == -1)
                {
                    Console.Error.WriteLine("LEAVE Invoke() ** Missing method ** {0}.{1}",
                                            className,
                                            signature);
                    return;
                }

                methodIdCache[signature] = methodId;
            }

            unsafe
            {
                fixed(StackItem *stackPtr = stack)
                {
                    if (instance == null)
                    {
                        CallSmokeMethod(methodId.smoke, (int)methodId.index, (IntPtr)0, (IntPtr)stackPtr, stack.Length);
                    }
                    else
                    {
#if DEBUG
                        GCHandle instanceHandle = DebugGCHandle.Alloc(instance);
#else
                        GCHandle instanceHandle = GCHandle.Alloc(instance);
#endif
                        CallSmokeMethod(methodId.smoke, methodId.index, (IntPtr)instanceHandle, (IntPtr)stackPtr, stack.Length);
#if DEBUG
                        DebugGCHandle.Free(instanceHandle);
#else
                        instanceHandle.SynchronizedFree();
#endif
                    }
                }
            }

            return;
        }
コード例 #15
0
ファイル: QTextStream.cs プロジェクト: micro-chen/qyoto
        public QTextStream Read(ref ulong i)
        {
            StackItem[] stack = new StackItem[2];
            stack[1].s_ulong = i;
            interceptor.Invoke("operator>>$", "operator>>(unsigned long&)", stack);
            i = stack[1].s_ulong;
            object returnValue = ((GCHandle)stack[0].s_class).Target;

#if DEBUG
            DebugGCHandle.Free((GCHandle)stack[0].s_class);
#else
            ((GCHandle)stack[0].s_class).SynchronizedFree();
#endif
            return((QTextStream)returnValue);
        }
コード例 #16
0
ファイル: QFontDialog.cs プロジェクト: micro-chen/qyoto
        public static QFont GetFont(ref bool ok)
        {
            StackItem[] stack = new StackItem[2];
            stack[1].s_bool = ok;
            staticInterceptor.Invoke("getFont$", "getFont(bool*)", stack);
            ok = stack[1].s_bool;
            object returnValue = ((GCHandle)stack[0].s_class).Target;

#if DEBUG
            DebugGCHandle.Free((GCHandle)stack[0].s_class);
#else
            ((GCHandle)stack[0].s_class).SynchronizedFree();
#endif
            return((QFont)returnValue);
        }
コード例 #17
0
ファイル: QTextStream.cs プロジェクト: micro-chen/qyoto
        public QTextStream Read(ref double f)
        {
            StackItem[] stack = new StackItem[2];
            stack[1].s_double = f;
            interceptor.Invoke("operator>>$", "operator>>(double&)", stack);
            f = stack[1].s_double;
            object returnValue = ((GCHandle)stack[0].s_class).Target;

#if DEBUG
            DebugGCHandle.Free((GCHandle)stack[0].s_class);
#else
            ((GCHandle)stack[0].s_class).SynchronizedFree();
#endif
            return((QTextStream)returnValue);
        }
コード例 #18
0
        public QDBusArgument Read(ref double arg)
        {
            StackItem[] stack = new StackItem[2];
            stack[1].s_double = arg;
            interceptor.Invoke("operator>>$", "operator>>(double&) const", stack);
            arg = stack[1].s_double;
            object returnValue = ((GCHandle)stack[0].s_class).Target;

#if DEBUG
            DebugGCHandle.Free((GCHandle)stack[0].s_class);
#else
            ((GCHandle)stack[0].s_class).SynchronizedFree();
#endif
            return((QDBusArgument)returnValue);
        }
コード例 #19
0
ファイル: QMatrix.cs プロジェクト: micro-chen/qyoto
        public QMatrix Inverted(ref bool invertible)
        {
            StackItem[] stack = new StackItem[2];
            stack[1].s_bool = invertible;
            interceptor.Invoke("inverted$", "inverted(bool*) const", stack);
            invertible = stack[1].s_bool;
            object returnValue = ((GCHandle)stack[0].s_class).Target;

#if DEBUG
            DebugGCHandle.Free((GCHandle)stack[0].s_class);
#else
            ((GCHandle)stack[0].s_class).SynchronizedFree();
#endif
            return((QMatrix)returnValue);
        }
コード例 #20
0
ファイル: QDataStream.cs プロジェクト: micro-chen/qyoto
        public QDataStream Read(ref int i)
        {
            StackItem[] stack = new StackItem[2];
            stack[1].s_int = i;
            interceptor.Invoke("operator>>$", "operator>>(int&)", stack);
            i = stack[1].s_int;
            object returnValue = ((GCHandle)stack[0].s_class).Target;

#if DEBUG
            DebugGCHandle.Free((GCHandle)stack[0].s_class);
#else
            ((GCHandle)stack[0].s_class).SynchronizedFree();
#endif
            return((QDataStream)returnValue);
        }
コード例 #21
0
ファイル: QDoubleValidator.cs プロジェクト: micro-chen/qyoto
        public override QValidator.State Validate(StringBuilder arg1, ref int arg2)
        {
            StackItem[] stack = new StackItem[3];
#if DEBUG
            stack[1].s_class = (IntPtr)DebugGCHandle.Alloc(arg1);
#else
            stack[1].s_class = (IntPtr)GCHandle.Alloc(arg1);
#endif
            stack[2].s_int = arg2;
            interceptor.Invoke("validate$$", "validate(QString&, int&) const", stack);
#if DEBUG
            DebugGCHandle.Free((GCHandle)stack[1].s_class);
#else
            ((GCHandle)stack[1].s_class).SynchronizedFree();
#endif
            arg2 = stack[2].s_int;
            return((QValidator.State)Enum.ToObject(typeof(QValidator.State), stack[0].s_int));
        }
コード例 #22
0
ファイル: QDateTimeEdit.cs プロジェクト: micro-chen/qyoto
        protected new virtual QValidator.State Validate(StringBuilder input, ref int pos)
        {
            StackItem[] stack = new StackItem[3];
#if DEBUG
            stack[1].s_class = (IntPtr)DebugGCHandle.Alloc(input);
#else
            stack[1].s_class = (IntPtr)GCHandle.Alloc(input);
#endif
            stack[2].s_int = pos;
            interceptor.Invoke("validate$$", "validate(QString&, int&) const", stack);
#if DEBUG
            DebugGCHandle.Free((GCHandle)stack[1].s_class);
#else
            ((GCHandle)stack[1].s_class).SynchronizedFree();
#endif
            pos = stack[2].s_int;
            return((QValidator.State)Enum.ToObject(typeof(QValidator.State), stack[0].s_int));
        }
コード例 #23
0
ファイル: QXmlSimpleReader.cs プロジェクト: micro-chen/qyoto
        public override bool Feature(string name, ref bool ok)
        {
            StackItem[] stack = new StackItem[3];
#if DEBUG
            stack[1].s_class = (IntPtr)DebugGCHandle.Alloc(name);
#else
            stack[1].s_class = (IntPtr)GCHandle.Alloc(name);
#endif
            stack[2].s_bool = ok;
            interceptor.Invoke("feature$$", "feature(const QString&, bool*) const", stack);
#if DEBUG
            DebugGCHandle.Free((GCHandle)stack[1].s_class);
#else
            ((GCHandle)stack[1].s_class).SynchronizedFree();
#endif
            ok = stack[2].s_bool;
            return(stack[0].s_bool);
        }
コード例 #24
0
        public double ToDouble(string s, ref bool ok)
        {
            StackItem[] stack = new StackItem[3];
#if DEBUG
            stack[1].s_class = (IntPtr)DebugGCHandle.Alloc(s);
#else
            stack[1].s_class = (IntPtr)GCHandle.Alloc(s);
#endif
            stack[2].s_bool = ok;
            interceptor.Invoke("toDouble$$", "toDouble(const QString&, bool*) const", stack);
#if DEBUG
            DebugGCHandle.Free((GCHandle)stack[1].s_class);
#else
            ((GCHandle)stack[1].s_class).SynchronizedFree();
#endif
            ok = stack[2].s_bool;
            return(stack[0].s_double);
        }
コード例 #25
0
ファイル: QColorDialog.cs プロジェクト: micro-chen/qyoto
        public static uint GetRgba(uint rgba, ref bool ok, QWidget parent)
        {
            StackItem[] stack = new StackItem[4];
            stack[1].s_uint = rgba;
            stack[2].s_bool = ok;
#if DEBUG
            stack[3].s_class = (IntPtr)DebugGCHandle.Alloc(parent);
#else
            stack[3].s_class = (IntPtr)GCHandle.Alloc(parent);
#endif
            staticInterceptor.Invoke("getRgba$$#", "getRgba(unsigned int, bool*, QWidget*)", stack);
            ok = stack[2].s_bool;
#if DEBUG
            DebugGCHandle.Free((GCHandle)stack[3].s_class);
#else
            ((GCHandle)stack[3].s_class).SynchronizedFree();
#endif
            return(stack[0].s_uint);
        }
コード例 #26
0
        public static int GetInteger(QWidget parent, string title, string label, int value, int minValue, int maxValue, int step, ref bool ok, uint flags)
        {
            StackItem[] stack = new StackItem[10];
#if DEBUG
            stack[1].s_class = (IntPtr)DebugGCHandle.Alloc(parent);
#else
            stack[1].s_class = (IntPtr)GCHandle.Alloc(parent);
#endif
#if DEBUG
            stack[2].s_class = (IntPtr)DebugGCHandle.Alloc(title);
#else
            stack[2].s_class = (IntPtr)GCHandle.Alloc(title);
#endif
#if DEBUG
            stack[3].s_class = (IntPtr)DebugGCHandle.Alloc(label);
#else
            stack[3].s_class = (IntPtr)GCHandle.Alloc(label);
#endif
            stack[4].s_int  = value;
            stack[5].s_int  = minValue;
            stack[6].s_int  = maxValue;
            stack[7].s_int  = step;
            stack[8].s_bool = ok;
            stack[9].s_uint = flags;
            staticInterceptor.Invoke("getInteger#$$$$$$$$", "getInteger(QWidget*, const QString&, const QString&, int, int, int, int, bool*, Qt::WindowFlags)", stack);
#if DEBUG
            DebugGCHandle.Free((GCHandle)stack[1].s_class);
#else
            ((GCHandle)stack[1].s_class).SynchronizedFree();
#endif
#if DEBUG
            DebugGCHandle.Free((GCHandle)stack[2].s_class);
#else
            ((GCHandle)stack[2].s_class).SynchronizedFree();
#endif
#if DEBUG
            DebugGCHandle.Free((GCHandle)stack[3].s_class);
#else
            ((GCHandle)stack[3].s_class).SynchronizedFree();
#endif
            ok = stack[8].s_bool;
            return(stack[0].s_int);
        }
コード例 #27
0
ファイル: QFormLayout.cs プロジェクト: xlizzard/synapse
        public void GetLayoutPosition(QLayout layout, ref int rowPtr, QFormLayout.ItemRole rolePtr)
        {
            StackItem[] stack = new StackItem[4];
#if DEBUG
            stack[1].s_class = (IntPtr)DebugGCHandle.Alloc(layout);
#else
            stack[1].s_class = (IntPtr)GCHandle.Alloc(layout);
#endif
            stack[2].s_int = rowPtr;
            stack[3].s_int = (int)rolePtr;
            interceptor.Invoke("getLayoutPosition#$$", "getLayoutPosition(QLayout*, int*, QFormLayout::ItemRole*) const", stack);
#if DEBUG
            DebugGCHandle.Free((GCHandle)stack[1].s_class);
#else
            ((GCHandle)stack[1].s_class).Free();
#endif
            rowPtr = stack[2].s_int;
            return;
        }
コード例 #28
0
        public long ToULongLong(string s, ref bool ok, int arg3)
        {
            StackItem[] stack = new StackItem[4];
#if DEBUG
            stack[1].s_class = (IntPtr)DebugGCHandle.Alloc(s);
#else
            stack[1].s_class = (IntPtr)GCHandle.Alloc(s);
#endif
            stack[2].s_bool = ok;
            stack[3].s_int  = arg3;
            interceptor.Invoke("toULongLong$$$", "toULongLong(const QString&, bool*, int) const", stack);
#if DEBUG
            DebugGCHandle.Free((GCHandle)stack[1].s_class);
#else
            ((GCHandle)stack[1].s_class).SynchronizedFree();
#endif
            ok = stack[2].s_bool;
            return(stack[0].s_long);
        }
コード例 #29
0
        public static double GetDouble(QWidget parent, string title, string label, double value, double minValue, double maxValue, int decimals, ref bool ok)
        {
            StackItem[] stack = new StackItem[9];
#if DEBUG
            stack[1].s_class = (IntPtr)DebugGCHandle.Alloc(parent);
#else
            stack[1].s_class = (IntPtr)GCHandle.Alloc(parent);
#endif
#if DEBUG
            stack[2].s_class = (IntPtr)DebugGCHandle.Alloc(title);
#else
            stack[2].s_class = (IntPtr)GCHandle.Alloc(title);
#endif
#if DEBUG
            stack[3].s_class = (IntPtr)DebugGCHandle.Alloc(label);
#else
            stack[3].s_class = (IntPtr)GCHandle.Alloc(label);
#endif
            stack[4].s_double = value;
            stack[5].s_double = minValue;
            stack[6].s_double = maxValue;
            stack[7].s_int    = decimals;
            stack[8].s_bool   = ok;
            staticInterceptor.Invoke("getDouble#$$$$$$$", "getDouble(QWidget*, const QString&, const QString&, double, double, double, int, bool*)", stack);
#if DEBUG
            DebugGCHandle.Free((GCHandle)stack[1].s_class);
#else
            ((GCHandle)stack[1].s_class).SynchronizedFree();
#endif
#if DEBUG
            DebugGCHandle.Free((GCHandle)stack[2].s_class);
#else
            ((GCHandle)stack[2].s_class).SynchronizedFree();
#endif
#if DEBUG
            DebugGCHandle.Free((GCHandle)stack[3].s_class);
#else
            ((GCHandle)stack[3].s_class).SynchronizedFree();
#endif
            ok = stack[8].s_bool;
            return(stack[0].s_double);
        }
コード例 #30
0
        public bool SetContent(QXmlInputSource source, QXmlReader reader, StringBuilder errorMsg, ref int errorLine, ref int errorColumn)
        {
            StackItem[] stack = new StackItem[6];
#if DEBUG
            stack[1].s_class = (IntPtr)DebugGCHandle.Alloc(source);
#else
            stack[1].s_class = (IntPtr)GCHandle.Alloc(source);
#endif
#if DEBUG
            stack[2].s_class = (IntPtr)DebugGCHandle.Alloc(reader);
#else
            stack[2].s_class = (IntPtr)GCHandle.Alloc(reader);
#endif
#if DEBUG
            stack[3].s_class = (IntPtr)DebugGCHandle.Alloc(errorMsg);
#else
            stack[3].s_class = (IntPtr)GCHandle.Alloc(errorMsg);
#endif
            stack[4].s_int = errorLine;
            stack[5].s_int = errorColumn;
            interceptor.Invoke("setContent##$$$", "setContent(QXmlInputSource*, QXmlReader*, QString*, int*, int*)", stack);
#if DEBUG
            DebugGCHandle.Free((GCHandle)stack[1].s_class);
#else
            ((GCHandle)stack[1].s_class).SynchronizedFree();
#endif
#if DEBUG
            DebugGCHandle.Free((GCHandle)stack[2].s_class);
#else
            ((GCHandle)stack[2].s_class).SynchronizedFree();
#endif
#if DEBUG
            DebugGCHandle.Free((GCHandle)stack[3].s_class);
#else
            ((GCHandle)stack[3].s_class).SynchronizedFree();
#endif
            errorLine   = stack[4].s_int;
            errorColumn = stack[5].s_int;
            return(stack[0].s_bool);
        }