From: John L. <jr...@us...> - 2005-11-17 05:51:29
|
Update of /cvsroot/wxlua/wxLua/bindings In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7199/wxLua/bindings Modified Files: genwxbind.lua wxluawrap.lua Log Message: update for wx26/27 Add bindings for builtin (global) functions Handle %if statements for enums Index: wxluawrap.lua =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxluawrap.lua,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** wxluawrap.lua 18 Jun 2005 20:45:58 -0000 1.2 --- wxluawrap.lua 17 Nov 2005 05:51:20 -0000 1.3 *************** *** 111,114 **** --- 111,117 ---- if wxVer24 == nil then wxVer24 = 0 end if wxVer25 == nil then wxVer25 = 0 end + if wxVer26 == nil then wxVer26 = 0 end + if wxVer27 == nil then wxVer27 = 0 end + if wxVer28 == nil then wxVer28 = 0 end -- wx Compat versions *************** *** 116,119 **** --- 119,123 ---- if wxCompat22 == nil then wxCompat22 = 0 end if wxCompat24 == nil then wxCompat24 = 0 end + if wxCompat26 == nil then wxCompat26 = 0 end if wxUnicode == nil then wxUnicode = 0 end *************** *** 190,196 **** print("Warning: Cannot Find wxWindows Base Path Environment Variable. Please Set "..wxWinEnv) ! if (wxVer22 == 0) and (wxVer23 == 0) and (wxVer24 == 0) and (wxVer25 == 0) then print("Error: no version of wxWindows set. Assuming you have 2.6") ! wxVer25 = 1 wxCompat24 = 1 end --- 194,200 ---- print("Warning: Cannot Find wxWindows Base Path Environment Variable. Please Set "..wxWinEnv) ! if (wxVer22 == 0) and (wxVer23 == 0) and (wxVer24 == 0) and (wxVer25 == 0) and (wxVer26 == 0) and (wxVer27 == 0) and (wxVer28 == 0) then print("Error: no version of wxWindows set. Assuming you have 2.6") ! wxVer26 = 1 wxCompat24 = 1 end *************** *** 1104,1146 **** function InitKeywords() -- we always have target in case we haven't added it to list ! skipToken[1] = {token = "%"..target, value = 1 } ! skipToken[2] = {token = "%wxchkver22", value = wxVer22 } ! skipToken[3] = {token = "%wxchkver23", value = wxVer23 } ! skipToken[4] = {token = "%wxchkver24", value = wxVer24 } ! skipToken[5] = {token = "%wxchkver25", value = wxVer25 } ! skipToken[6] = {token = "<wxchkver23", value = wxVer22 } ! if (wxVer23 == 1 or wxVer22 == 1) then ! skipToken[7] = {token = "<wxchkver24", value = 1 } else ! skipToken[7] = {token = "<wxchkver24", value = 0 } end ! if (wxVer24 == 1 or wxVer23 == 1 or wxVer22 == 1) then ! skipToken[8] = {token = "<wxchkver25", value = 1 } else ! skipToken[8] = {token = "<wxchkver25", value = 0 } end ! skipToken[9] = {token = "%wxcompat20", value = wxCompat20 } ! skipToken[10] = {token = "%wxcompat22", value = wxCompat22 } ! skipToken[11] = {token = "%wxcompat24", value = wxCompat22 } ! skipToken[12] = {token = "%embedded", value = isEmbedded } ! skipToken[13] = {token = "%standalone", value = isStandalone } ! skipToken[14] = {token = "%unicode", value = wxUnicode } ! skipToken[15] = {token = "%win", value = isTarget("%msw") } ! skipToken[16] = {token = "%msw", value = isTarget("%msw") } ! skipToken[17] = {token = "%gtk", value = isTarget("%gtk") } ! skipToken[18] = {token = "%mac", value = isTarget("%mac") } ! skipToken[19] = {token = "%mgl", value = isTarget("%mgl") } ! skipToken[20] = {token = "%motif", value = isTarget("%motif") } ! skipToken[21] = {token = "%os2", value = isTarget("%os2") } ! skipToken[22] = {token = "%univ", value = isTarget("%univ") } ! skipToken[23] = {token = "%x11", value = isTarget("%x11") } ! skipToken[24] = {token = "%cocoa", value = isTarget("%cocoa") } -- Add New Target Here When They Are Available on wxWindows ! conjTokenMax = 24 -- create conjugated tokens --- 1108,1172 ---- function InitKeywords() -- we always have target in case we haven't added it to list ! table.insert(skipToken, {token = "%"..target, value = 1 }) ! table.insert(skipToken, {token = "%wxchkver22", value = wxVer22 }) ! table.insert(skipToken, {token = "%wxchkver23", value = wxVer23 }) ! table.insert(skipToken, {token = "%wxchkver24", value = wxVer24 }) ! table.insert(skipToken, {token = "%wxchkver25", value = wxVer25 }) ! table.insert(skipToken, {token = "%wxchkver26", value = wxVer26 }) ! table.insert(skipToken, {token = "%wxchkver27", value = wxVer27 }) ! table.insert(skipToken, {token = "%wxchkver28", value = wxVer28 }) ! table.insert(skipToken, {token = "<wxchkver23", value = wxVer22 }) ! if ((wxVer23 == 1) or (wxVer22 == 1)) then ! table.insert(skipToken, {token = "<wxchkver24", value = 1 }) else ! table.insert(skipToken, {token = "<wxchkver24", value = 0 }) end ! if ((wxVer24 == 1) or (wxVer23 == 1) or (wxVer22 == 1)) then ! table.insert(skipToken, {token = "<wxchkver25", value = 1 }) else ! table.insert(skipToken, {token = "<wxchkver25", value = 0 }) end ! if ((wxVer25 == 1) or (wxVer24 == 1) or (wxVer23 == 1) or (wxVer22 == 1)) then ! table.insert(skipToken, {token = "<wxchkver26", value = 1 }) ! else ! table.insert(skipToken, {token = "<wxchkver26", value = 0 }) ! end ! ! if ((wxVer26 == 1) or (wxVer25 == 1) or (wxVer24 == 1) or (wxVer23 == 1) or (wxVer22 == 1)) then ! table.insert(skipToken, {token = "<wxchkver27", value = 1 }) ! else ! table.insert(skipToken, {token = "<wxchkver27", value = 0 }) ! end ! ! if ((wxVer27 == 1) or (wxVer26 == 1) or (wxVer25 == 1) or (wxVer24 == 1) or (wxVer23 == 1) or (wxVer22 == 1)) then ! table.insert(skipToken, {token = "<wxchkver28", value = 1 }) ! else ! table.insert(skipToken, {token = "<wxchkver28", value = 0 }) ! end ! ! table.insert(skipToken, {token = "%wxcompat20", value = wxCompat20 }) ! table.insert(skipToken, {token = "%wxcompat22", value = wxCompat22 }) ! table.insert(skipToken, {token = "%wxcompat24", value = wxCompat24 }) ! table.insert(skipToken, {token = "%wxcompat26", value = wxCompat26 }) ! table.insert(skipToken, {token = "%embedded", value = isEmbedded }) ! table.insert(skipToken, {token = "%standalone", value = isStandalone }) ! table.insert(skipToken, {token = "%unicode", value = wxUnicode }) ! table.insert(skipToken, {token = "%win", value = isTarget("%msw") }) ! table.insert(skipToken, {token = "%msw", value = isTarget("%msw") }) ! table.insert(skipToken, {token = "%gtk", value = isTarget("%gtk") }) ! table.insert(skipToken, {token = "%mac", value = isTarget("%mac") }) ! table.insert(skipToken, {token = "%mgl", value = isTarget("%mgl") }) ! table.insert(skipToken, {token = "%motif", value = isTarget("%motif") }) ! table.insert(skipToken, {token = "%os2", value = isTarget("%os2") }) ! table.insert(skipToken, {token = "%univ", value = isTarget("%univ") }) ! table.insert(skipToken, {token = "%x11", value = isTarget("%x11") }) ! table.insert(skipToken, {token = "%cocoa", value = isTarget("%cocoa") }) -- Add New Target Here When They Are Available on wxWindows ! conjTokenMax = table.getn(skipToken) -- create conjugated tokens *************** *** 1740,1743 **** --- 1766,1794 ---- end end + + if major == "2" and minor == "6" then + wxVer26 = 1 + outputDir = "wx26/" + if fVerbose >= 1 then + print("Version: wxWindows 2.6") + end + end + + if major == "2" and minor == "7" then + wxVer27 = 1 + outputDir = "wx27/" + if fVerbose >= 1 then + print("Version: wxWindows 2.7") + end + end + + if major == "2" and minor == "8" then + wxVer28 = 1 + outputDir = "wx28/" + if fVerbose >= 1 then + print("Version: wxWindows 2.8") + end + end + end *************** *** 1770,1773 **** --- 1821,1831 ---- end + if item[1] == "#define" and item[2] == "WXWIN_COMPATIBILITY_2_6" and item[3] == "1" then + wxCompat26 = 1 + if fVerbose >= 1 then + print("Setup: Compatibility For wxWindows Version 2.6") + end + end + if item[1] == "#define" and item[2] == "wxUSE_UNICODE" and item[3] == "1" then wxUnicode = 1 *************** *** 2029,2033 **** print(theClass.." Skipping: "..a) else ! print("Skipping "..a) end end --- 2087,2091 ---- print(theClass.." Skipping: "..a) else ! print("Skipping : "..inFileName.." "..a) end end *************** *** 2664,2668 **** if determancy < 1 then if fVerbose >= 1 then ! print("Skipping "..classDataType.."::"..func..": Cannot Find DataType "..msg) end skipClassInPrototype = 1 --- 2722,2726 ---- if determancy < 1 then if fVerbose >= 1 then ! print("Skipping, "..inFileName.." "..classDataType.."::"..func..": Cannot Find DataType "..msg) end skipClassInPrototype = 1 *************** *** 3030,3033 **** --- 3088,3101 ---- end + if (wxCompat26 == 1) then + outfile:write("#if !WXWIN_COMPATIBILITY_2_6\n") + outfile:write(" #error Lua Interface was generated with WXWIN_COMPATIBILITY_2_6 = 1\n") + outfile:write("#endif\n\n") + else + outfile:write("#if WXWIN_COMPATIBILITY_2_6\n") + outfile:write(" #error Lua Interface was generated with WXWIN_COMPATIBILITY_2_6 = 0\n") + outfile:write("#endif\n\n") + end + if (wxUnicode == 1) then outfile:write("#if !wxUSE_UNICODE\n") Index: genwxbind.lua =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/genwxbind.lua,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** genwxbind.lua 20 Jun 2005 06:55:23 -0000 1.2 --- genwxbind.lua 17 Nov 2005 05:51:20 -0000 1.3 *************** *** 23,65 **** ------------------------------------------------------------------------------- ! keywords = {} -- Keyword table ! conditions = {} -- Preprocessor conditions ! conditionOperators = {} -- Preprocessor operators ! ignore = {} -- Keyword ignore table delimiters = { "[]", "==", "&&", "||", "//", "/*", "*/", "\t", "\r", "\n", " ", "*", "&", "|", "(", ")", "[", "]", ",", ";", "=", "{", "}", "!" } keep = { "[]", "==", "&&", "||", "//", "/*", "*/", "*", "&", "|", "(", ")", "[", "]", ",", "=", "{", "!" } -- keep delimiters, except for white space [...1735 lines suppressed...] *************** *** 4032,4035 **** --- 4148,4153 ---- local object = interface.objectData[o] + print("Output ", object.DefType, object.Name) + if object.DefType == "class" or object.DefType == "struct" then local ObjectName = object.Name *************** *** 4060,4064 **** --- 4178,4185 ---- local bindCount = table.getn(BindTableList) for i=1,bindCount do + + if BindTableList[i].Method then + local lineCount = table.getn(BindTableList[i].Method) for line=1, lineCount do |