//****************************************************************************** // Copyright (c) 2009 Alexey Smirnov. All rights reserved. //****************************************************************************** #define NEED_DBE_PROTOCOL #include #include #include #include #include int main () { //Vars Display *FPDisplay; int FMajorOpcode; int F1stEvent; int F1stError; xDbeGetVersionReq FPReq; xDbeGetVersionReply FReply; //Opening the Display FPDisplay = XOpenDisplay (0); if (FPDisplay) { if (XQueryExtension(FPDisplay,"DOUBLE-BUFFER",&FMajorOpcode,&F1stEvent,&F1stError)) { //Printing XQueryExtension results printf ("DOUBLE-BUFFER OpCode is: %lu, 1stEvent is: %lu, 1stError is: %lu",FMajorOpcode,F1stEvent,F1stError); FPReq.reqType = FMajorOpcode; FPReq.dbeReqType = X_DbeGetVersion; FPReq.length = sz_xDbeGetVersionReq >> 2; FPReq.majorVersion= 0; FPReq.minorVersion= 0; //Trying to do _XSend()/_XReply() _XSend (FPDisplay,&FPReq,sz_xDbeGetVersionReq); if (_XReply (FPDisplay,&FReply,0,1)) { //Printing DOUBLE-BUFFER version printf ("DOUBLE-BUFFER version is: %lu.%lu",FReply.majorVersion,FReply.minorVersion); } } //Closing the Display XCloseDisplay(FPDisplay); } return 0; }