Exemple #1
0
        // Callback from "libICE" to process a message.
        private void ProcessMessage
            (IntPtr iceConn, IntPtr clientData, Xlib.Xint opcode,
            Xlib.Xulong length, XBool swap,
            ref IceReplyWaitInfo replyWait, ref XBool replyReadyRet)
        {
            bool haveReply;

            if (messageTransaction)
            {
                throw new XInvalidOperationException("Attempt to process message in the middle of sending another one");                         // I always wondered, what will happen if we throw exception from callback? :)
            }

            this.messageTransaction = true;
            this.messageLength      = (int)length;

            // Process the message.
            try
            {
                replyWait     = replyWait;
                haveReply     = true;
                replyReadyRet = ProcessMessage((int)opcode, replyWait.reply) ? XBool.True:XBool.False;                         // We omit `swap' here, can one need it? Even theoretrically?..
            }
            catch (NullReferenceException)
            {
                haveReply     = false;
                replyReadyRet = ProcessMessage((int)opcode) ? XBool.True:XBool.False;
            }

            this.messageTransaction = false;
        }
Exemple #2
0
 extern public static Xlib.Xint IceRegisterForProtocolReply
     (String protocolName, String vendor, String release,
     Xlib.Xint versionCount, ref IcePaVersionRec versionRecs,
     Xlib.Xint authCount, ref String[] authNames,
     ref IcePaAuthProc authProcs,
     IceHostBasedAuthProc hostBasedAuthProc,
     IceProtocolSetupProc protocolSetupProc,
     IceProtocolActivateProc protocolActivateProc,
     IceIOErrorProc ioErrorProc);
Exemple #3
0
 extern public static String IceComposeNetworkIdList
     (Xlib.Xint count, IntPtr listenObjs);
Exemple #4
0
 extern public static XStatus IceListenForWellKnownConnections
     (String port, ref Xlib.Xint countRet, ref IntPtr listenObjsRet,
     Xlib.Xint errorLength, byte[] errorStringRet);
Exemple #5
0
 extern public static IceConn *IceOpenConnection
     (String networkIdsList, IntPtr context,
     XBool mustAuthenticate, Xlib.Xint majorOpcodeCheck,
     Xlib.Xint errorLength, byte[] errorStringRet);
Exemple #6
0
 extern public static Xlib.Xint IceRegisterForProtocolSetup
     (String protocolName, String vendor, String release,
     Xlib.Xint versionCount, ref IcePoVersionRec versionRecs,
     Xlib.Xint authCount, String[] authNames,
     ref IcePoAuthProcIncapsulator authProcs, IceIOErrorProc ioErrorProc);
Exemple #7
0
 extern public static void _IceErrorBadLength
     (IceConn *iceConn, Xlib.Xint majorOpcode,
     Xlib.Xint offendingMinor, Xlib.Xint severity);
Exemple #8
0
 extern public static void _IceErrorBadValue
     (IceConn *iceConn, Xlib.Xint majorOpcode,
     Xlib.Xint offendingMinor, Xlib.Xint offset,
     Xlib.Xint length, IntPtr value);
Exemple #9
0
 extern public static Xlib.Xint _IcePaMagicCookie1Proc
     (IntPtr iceConn, IntPtr authStatePtr,
     XBool swap, Xlib.Xint authDataLen, IntPtr authData,
     ref Xlib.Xint replyDataLenRet, ref IntPtr replyDataRet,
     ref IntPtr errorStringRet);
Exemple #10
0
 extern public static XStatus IceProtocolShutdown
     (IceConn *iceConn, Xlib.Xint majorOpcode);
Exemple #11
0
 extern public static Xlib.Xint IceProtocolSetup
     (IceConn *iceConn, Xlib.Xint myOpcode, IntPtr clientData,
     XBool mustAuthenticate, out Xlib.Xint majorVersionRet,
     out Xlib.Xint minorVersionRet, out IntPtr vendorRet,
     out IntPtr releaseRet, Xlib.Xint errorLength,
     byte[] errorStringRet);
Exemple #12
0
 extern public static IceConn *IceAcceptConnection
     (IntPtr listenObj, ref Xlib.Xint statusRet);
Exemple #13
0
 extern public static void IceFreeListenObjs
     (Xlib.Xint count, IntPtr listenObjs);