pywin32-checkins Mailing List for Python for Windows Extensions (Page 80)
OLD project page for the Python extensions for Windows
Brought to you by:
mhammond
You can subscribe to this list here.
2003 |
Jan
|
Feb
|
Mar
|
Apr
(2) |
May
(1) |
Jun
(6) |
Jul
(50) |
Aug
(11) |
Sep
(24) |
Oct
(184) |
Nov
(118) |
Dec
(22) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
(31) |
Feb
(25) |
Mar
(34) |
Apr
(105) |
May
(49) |
Jun
(38) |
Jul
(39) |
Aug
(7) |
Sep
(98) |
Oct
(79) |
Nov
(20) |
Dec
(17) |
2005 |
Jan
(66) |
Feb
(32) |
Mar
(43) |
Apr
(30) |
May
(58) |
Jun
(30) |
Jul
(16) |
Aug
(4) |
Sep
(21) |
Oct
(42) |
Nov
(11) |
Dec
(14) |
2006 |
Jan
(42) |
Feb
(30) |
Mar
(22) |
Apr
(1) |
May
(9) |
Jun
(15) |
Jul
(20) |
Aug
(9) |
Sep
(8) |
Oct
(1) |
Nov
(9) |
Dec
(43) |
2007 |
Jan
(52) |
Feb
(45) |
Mar
(20) |
Apr
(12) |
May
(59) |
Jun
(39) |
Jul
(35) |
Aug
(31) |
Sep
(17) |
Oct
(20) |
Nov
(4) |
Dec
(4) |
2008 |
Jan
(28) |
Feb
(111) |
Mar
(4) |
Apr
(27) |
May
(40) |
Jun
(27) |
Jul
(32) |
Aug
(94) |
Sep
(87) |
Oct
(153) |
Nov
(336) |
Dec
(331) |
2009 |
Jan
(298) |
Feb
(127) |
Mar
(20) |
Apr
(8) |
May
|
Jun
(10) |
Jul
(6) |
Aug
|
Sep
(2) |
Oct
(2) |
Nov
|
Dec
(1) |
2010 |
Jan
(7) |
Feb
(1) |
Mar
|
Apr
|
May
(15) |
Jun
(4) |
Jul
(3) |
Aug
(28) |
Sep
(1) |
Oct
(19) |
Nov
(16) |
Dec
(6) |
2011 |
Jan
(2) |
Feb
(18) |
Mar
(17) |
Apr
(12) |
May
(5) |
Jun
(11) |
Jul
(7) |
Aug
(2) |
Sep
(2) |
Oct
(4) |
Nov
(4) |
Dec
|
2012 |
Jan
(6) |
Feb
(2) |
Mar
|
Apr
(8) |
May
(4) |
Jun
(3) |
Jul
(13) |
Aug
(27) |
Sep
(8) |
Oct
(9) |
Nov
(3) |
Dec
(2) |
2013 |
Jan
|
Feb
(1) |
Mar
(5) |
Apr
(10) |
May
|
Jun
(2) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
(9) |
2014 |
Jan
(2) |
Feb
(4) |
Mar
(4) |
Apr
(1) |
May
(4) |
Jun
(2) |
Jul
|
Aug
|
Sep
|
Oct
(2) |
Nov
|
Dec
(1) |
2015 |
Jan
(1) |
Feb
|
Mar
|
Apr
(6) |
May
(2) |
Jun
|
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
2016 |
Jan
(3) |
Feb
(2) |
Mar
|
Apr
(3) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2017 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
|
From: Roger U. <ru...@us...> - 2008-02-12 04:41:02
|
Update of /cvsroot/pywin32/pywin32/Pythonwin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4204 Modified Files: win32ctrlTree.cpp Log Message: Treat HTREEITEM as a handle Index: win32ctrlTree.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/Pythonwin/win32ctrlTree.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** win32ctrlTree.cpp 3 Jun 2007 12:35:58 -0000 1.5 --- win32ctrlTree.cpp 12 Feb 2008 04:41:05 -0000 1.6 *************** *** 106,110 **** PyObject *fnname( PyObject *self, PyObject *args ) { \ HTREEITEM htree; \ ! if (!PyArg_ParseTuple( args, "i:" #mfcName, &htree)) \ return NULL; \ CTreeCtrl *pList = GetTreeCtrl(self); \ --- 106,113 ---- PyObject *fnname( PyObject *self, PyObject *args ) { \ HTREEITEM htree; \ ! PyObject *obtree; \ ! if (!PyArg_ParseTuple( args, "O:" #mfcName, &obtree)) \ ! return NULL; \ ! if (!PyWinObject_AsHANDLE(obtree, (HANDLE *)&htree)) \ return NULL; \ CTreeCtrl *pList = GetTreeCtrl(self); \ *************** *** 119,123 **** PyObject *fnname( PyObject *self, PyObject *args ) { \ HTREEITEM htree; \ ! if (!PyArg_ParseTuple( args, "i:" #mfcName, &htree)) \ return NULL; \ CTreeCtrl *pList = GetTreeCtrl(self); \ --- 122,129 ---- PyObject *fnname( PyObject *self, PyObject *args ) { \ HTREEITEM htree; \ ! PyObject *obtree; \ ! if (!PyArg_ParseTuple( args, "O:" #mfcName, &obtree)) \ ! return NULL; \ ! if (!PyWinObject_AsHANDLE(obtree, (HANDLE *)&htree)) \ return NULL; \ CTreeCtrl *pList = GetTreeCtrl(self); \ *************** *** 128,132 **** if (item==NULL) \ RETURN_ERR(#mfcName " failed"); \ ! return Py_BuildValue("i",item); \ } --- 134,138 ---- if (item==NULL) \ RETURN_ERR(#mfcName " failed"); \ ! return PyWinLong_FromHANDLE(item); \ } *************** *** 134,138 **** PyObject *fnname( PyObject *self, PyObject *args ) { \ HTREEITEM htree; int code;\ ! if (!PyArg_ParseTuple( args, "ii:" #mfcName, &htree, &code)) \ return NULL; \ CTreeCtrl *pList = GetTreeCtrl(self); \ --- 140,147 ---- PyObject *fnname( PyObject *self, PyObject *args ) { \ HTREEITEM htree; int code;\ ! PyObject *obtree; \ ! if (!PyArg_ParseTuple( args, "Oi:" #mfcName, &obtree, &code)) \ ! return NULL; \ ! if (!PyWinObject_AsHANDLE(obtree, (HANDLE *)&htree)) \ return NULL; \ CTreeCtrl *pList = GetTreeCtrl(self); \ *************** *** 143,147 **** if (item==NULL) \ RETURN_ERR(#mfcName " failed"); \ ! return Py_BuildValue("i",item); \ } --- 152,156 ---- if (item==NULL) \ RETURN_ERR(#mfcName " failed"); \ ! return PyWinLong_FromHANDLE(item); \ } *************** *** 157,172 **** if (item==NULL) \ RETURN_ERR(#mfcName " failed"); \ ! return Py_BuildValue("i",item); \ } #define MAKE_SET_ITEMS_INTS_METH(fnname, mfcName) \ PyObject *fnname( PyObject *self, PyObject *args ) { \ ! HTREEITEM item; int i1, i2;\ ! if (!PyArg_ParseTuple( args, "iii:" #mfcName, &item, &i1, &i2)) \ return NULL; \ CTreeCtrl *pList = GetTreeCtrl(self); \ if (!pList) return NULL; \ GUI_BGN_SAVE; \ ! BOOL ok = pList->mfcName(item, i1, i2); \ GUI_END_SAVE; \ if (!ok) \ --- 166,184 ---- if (item==NULL) \ RETURN_ERR(#mfcName " failed"); \ ! return PyWinLong_FromHANDLE(item); \ } #define MAKE_SET_ITEMS_INTS_METH(fnname, mfcName) \ PyObject *fnname( PyObject *self, PyObject *args ) { \ ! HTREEITEM hitem; int i1, i2;\ ! PyObject *obitem; \ ! if (!PyArg_ParseTuple( args, "Oii:" #mfcName, &obitem, &i1, &i2)) \ ! return NULL; \ ! if (!PyWinObject_AsHANDLE(obitem, (HANDLE *)&hitem)) \ return NULL; \ CTreeCtrl *pList = GetTreeCtrl(self); \ if (!pList) return NULL; \ GUI_BGN_SAVE; \ ! BOOL ok = pList->mfcName(hitem, i1, i2); \ GUI_END_SAVE; \ if (!ok) \ *************** *** 177,187 **** #define MAKE_BOOL_ITEM_ACTION(fnname, mfcName) \ PyObject *fnname( PyObject *self, PyObject *args ) { \ ! HTREEITEM item; \ ! if (!PyArg_ParseTuple( args, "i:" #mfcName, &item)) \ return NULL; \ CTreeCtrl *pList = GetTreeCtrl(self); \ if (!pList) return NULL; \ GUI_BGN_SAVE; \ ! BOOL ok = pList->mfcName(item); \ GUI_END_SAVE; \ if (!ok) \ --- 189,202 ---- #define MAKE_BOOL_ITEM_ACTION(fnname, mfcName) \ PyObject *fnname( PyObject *self, PyObject *args ) { \ ! HTREEITEM hitem; \ ! PyObject *obitem; \ ! if (!PyArg_ParseTuple( args, "O:" #mfcName, &obitem)) \ ! return NULL; \ ! if (!PyWinObject_AsHANDLE(obitem, (HANDLE *)&hitem)) \ return NULL; \ CTreeCtrl *pList = GetTreeCtrl(self); \ if (!pList) return NULL; \ GUI_BGN_SAVE; \ ! BOOL ok = pList->mfcName(hitem); \ GUI_END_SAVE; \ if (!ok) \ *************** *** 192,202 **** #define MAKE_BOOL_ITEM_INT_ACTION(fnname, mfcName) \ PyObject *fnname( PyObject *self, PyObject *args ) { \ ! HTREEITEM item; int code;\ ! if (!PyArg_ParseTuple( args, "ii:" #mfcName, &item, &code)) \ return NULL; \ CTreeCtrl *pList = GetTreeCtrl(self); \ if (!pList) return NULL; \ GUI_BGN_SAVE; \ ! BOOL ok = pList->mfcName(item, code); \ GUI_END_SAVE; \ if (!ok) \ --- 207,220 ---- #define MAKE_BOOL_ITEM_INT_ACTION(fnname, mfcName) \ PyObject *fnname( PyObject *self, PyObject *args ) { \ ! HTREEITEM hitem; int code;\ ! PyObject *obitem; \ ! if (!PyArg_ParseTuple( args, "Oi:" #mfcName, &obitem, &code)) \ ! return NULL; \ ! if (!PyWinObject_AsHANDLE(obitem, (HANDLE *)&hitem)) \ return NULL; \ CTreeCtrl *pList = GetTreeCtrl(self); \ if (!pList) return NULL; \ GUI_BGN_SAVE; \ ! BOOL ok = pList->mfcName(hitem, code); \ GUI_END_SAVE; \ if (!ok) \ *************** *** 397,400 **** --- 415,419 ---- int image, selImage, state, stateMask; LPARAM lParam; + PyObject *obParent=Py_None, *obInsertAfter=Py_None; HTREEITEM hParent, hInsertAfter; char *text; *************** *** 402,416 **** return NULL; ! if (PyArg_ParseTuple(args, "iziiiiOii:InsertItem", ! &mask, // @pyparmalt1 int|mask||Integer specifying which attributes to set ! &text, // @pyparmalt1 string|text||The text of the item. ! &image, // @pyparmalt1 int|image||The index of the image to use. ! &selImage, // @pyparmalt1 int|selectedImage||The index of the items selected image. ! &state, // @pyparmalt1 int|state||The initial state of the item. ! &stateMask, // @pyparmalt1 int|stateMask||Specifies which bits of the state are valid. ! &lParam, // @pyparmalt1 object|lParam||A user defined object for the item. ! &hParent, // @pyparmalt1 HTREEITEM|parent||The parent of the item. ! &hInsertAfter)) { // @pyparmalt1 HTREEITEM|parent||The parent of the item. ! GUI_BGN_SAVE; ret = pList->InsertItem(mask, text, image, selImage, state, stateMask, lParam, hParent, hInsertAfter); GUI_END_SAVE; --- 421,439 ---- return NULL; ! if (PyArg_ParseTuple(args, "iziiiiOOO:InsertItem", ! &mask, // @pyparmalt1 int|mask||Integer specifying which attributes to set ! &text, // @pyparmalt1 string|text||The text of the item. ! &image, // @pyparmalt1 int|image||The index of the image to use. ! &selImage, // @pyparmalt1 int|selectedImage||The index of the items selected image. ! &state, // @pyparmalt1 int|state||The initial state of the item. ! &stateMask, // @pyparmalt1 int|stateMask||Specifies which bits of the state are valid. ! &lParam, // @pyparmalt1 object|lParam||A user defined object for the item. ! &obParent, // @pyparmalt1 HTREEITEM|parent||The parent of the item. ! &obInsertAfter)) { // @pyparmalt1 HTREEITEM|parent||The parent of the item. ! if (!PyWinObject_AsHANDLE(obParent, (HANDLE *)&hParent)) ! return NULL; ! if (!PyWinObject_AsHANDLE(obInsertAfter, (HANDLE *)&hInsertAfter)) ! return NULL; ! GUI_BGN_SAVE; ret = pList->InsertItem(mask, text, image, selImage, state, stateMask, lParam, hParent, hInsertAfter); GUI_END_SAVE; *************** *** 419,429 **** hParent = TVI_ROOT; hInsertAfter = TVI_LAST; ! if (PyArg_ParseTuple(args, "sii|ii:InsertItem", &text, // @pyparmalt2 string|text||The text for the item. &image, // @pyparmalt2 int|image||The index of the image to use. &selImage, // @pyparmalt2 int|selectedImage||The index of the items selected image. ! &hParent, // @pyparmalt2 HTREEITEM|parent|commctrl.TVI_ROOT|The parent of the item. ! &hInsertAfter)) { // @pyparmalt2 HTREEITEM|insertAfter|commctrl.TVI_LAST|The item to insert the new item after, or TVI_FIRST, TVI_LAST or TVI_SORT ! GUI_BGN_SAVE; ret = pList->InsertItem(text, image, selImage, hParent, hInsertAfter); GUI_END_SAVE; --- 442,458 ---- hParent = TVI_ROOT; hInsertAfter = TVI_LAST; ! if (PyArg_ParseTuple(args, "sii|OO:InsertItem", &text, // @pyparmalt2 string|text||The text for the item. &image, // @pyparmalt2 int|image||The index of the image to use. &selImage, // @pyparmalt2 int|selectedImage||The index of the items selected image. ! &obParent, // @pyparmalt2 HTREEITEM|parent|commctrl.TVI_ROOT|The parent of the item. ! &obInsertAfter)) { // @pyparmalt2 HTREEITEM|insertAfter|commctrl.TVI_LAST|The item to insert the new item after, or TVI_FIRST, TVI_LAST or TVI_SORT ! if (obParent!=Py_None) ! if (!PyWinObject_AsHANDLE(obParent, (HANDLE *)&hParent)) ! return NULL; ! if (obInsertAfter!=Py_None) ! if (!PyWinObject_AsHANDLE(obInsertAfter, (HANDLE *)&hInsertAfter)) ! return NULL; ! GUI_BGN_SAVE; ret = pList->InsertItem(text, image, selImage, hParent, hInsertAfter); GUI_END_SAVE; *************** *** 432,439 **** hParent = TVI_ROOT; hInsertAfter = TVI_LAST; ! if (PyArg_ParseTuple(args, "s|ii:InsertItem", ! &text, // @pyparmalt3 string|text||The text for the item. ! &hParent, // @pyparmalt3 HTREEITEM|parent|commctrl.TVI_ROOT|The parent of the item. ! &hInsertAfter)) {// @pyparmalt3 HTREEITEM|parent|commctrl.TVI_LAST|The parent of the item. GUI_BGN_SAVE; ret = pList->InsertItem(text, hParent, hInsertAfter); --- 461,474 ---- hParent = TVI_ROOT; hInsertAfter = TVI_LAST; ! if (PyArg_ParseTuple(args, "s|OO:InsertItem", ! &text, // @pyparmalt3 string|text||The text for the item. ! &obParent, // @pyparmalt3 HTREEITEM|parent|commctrl.TVI_ROOT|The parent of the item. ! &obInsertAfter)) {// @pyparmalt3 HTREEITEM|parent|commctrl.TVI_LAST|The parent of the item. ! if (obParent!=Py_None) ! if (!PyWinObject_AsHANDLE(obParent, (HANDLE *)&hParent)) ! return NULL; ! if (obInsertAfter!=Py_None) ! if (!PyWinObject_AsHANDLE(obInsertAfter, (HANDLE *)&hInsertAfter)) ! return NULL; GUI_BGN_SAVE; ret = pList->InsertItem(text, hParent, hInsertAfter); *************** *** 443,454 **** TV_INSERTSTRUCT tvItem; PyErr_Clear(); ! if (PyArg_ParseTuple(args, "iiO:InsertItem", ! &tvItem.hParent, // @pyparm HTREEITEM|hParent||The parent item. If commctrl.TVI_ROOT or 0, it is added to the root. ! &tvItem.hInsertAfter, // @pyparm HTREEITEM|hInsertAfter||The item to insert after. Can be an item or TVI_FIRST, TVI_LAST or TVI_SORT &obTVItem)) { // @pyparm <om PyCTreeCtrl.TV_ITEM tuple>|item||A tuple describing the new item. if (!ParseTV_ITEMTuple(obTVItem, &tvItem.item)) return NULL; ! GUI_BGN_SAVE; ret = pList->InsertItem(&tvItem); GUI_END_SAVE; --- 478,493 ---- TV_INSERTSTRUCT tvItem; PyErr_Clear(); ! if (PyArg_ParseTuple(args, "OOO:InsertItem", ! &obParent, // @pyparm HTREEITEM|hParent||The parent item. If commctrl.TVI_ROOT or 0, it is added to the root. ! &obInsertAfter, // @pyparm HTREEITEM|hInsertAfter||The item to insert after. Can be an item or TVI_FIRST, TVI_LAST or TVI_SORT &obTVItem)) { // @pyparm <om PyCTreeCtrl.TV_ITEM tuple>|item||A tuple describing the new item. + if (!PyWinObject_AsHANDLE(obParent, (HANDLE *)&tvItem.hParent)) + return NULL; + if (!PyWinObject_AsHANDLE(obInsertAfter, (HANDLE *)&tvItem.hInsertAfter)) + return NULL; if (!ParseTV_ITEMTuple(obTVItem, &tvItem.item)) return NULL; ! GUI_BGN_SAVE; ret = pList->InsertItem(&tvItem); GUI_END_SAVE; *************** *** 462,466 **** if (ret==NULL) RETURN_ERR("InsertItem failed"); ! return Py_BuildValue("i",ret); } --- 501,505 ---- if (ret==NULL) RETURN_ERR("InsertItem failed"); ! return PyWinLong_FromHANDLE(ret); } *************** *** 731,735 **** pList->HitTest( &i ); GUI_END_SAVE; ! return Py_BuildValue("ii", i.flags, i.hItem); // @rdesc The result is a tuple of (flags, hItem). // flags may be a combination of the following values: --- 770,774 ---- pList->HitTest( &i ); GUI_END_SAVE; ! return Py_BuildValue("iN", i.flags, PyWinLong_FromHANDLE(i.hItem)); // @rdesc The result is a tuple of (flags, hItem). // flags may be a combination of the following values: |
From: Roger U. <ru...@us...> - 2008-02-12 03:09:05
|
Update of /cvsroot/pywin32/pywin32/win32/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2696 Modified Files: PyWinTypesmodule.cpp Log Message: Clear stale exception in PyWinLong_AsVoidPtr Index: PyWinTypesmodule.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/src/PyWinTypesmodule.cpp,v retrieving revision 1.37 retrieving revision 1.38 diff -C2 -d -r1.37 -r1.38 *** PyWinTypesmodule.cpp 6 Feb 2008 18:37:46 -0000 1.37 --- PyWinTypesmodule.cpp 12 Feb 2008 03:09:06 -0000 1.38 *************** *** 561,564 **** --- 561,565 ---- *pptr=(void *)SIGNED_CONVERTER(ob); if (*pptr==(void *)-1 && PyErr_Occurred()) { + PyErr_Clear(); *pptr=(void *)UNSIGNED_CONVERTER(ob); if (*pptr==(void *)-1 && PyErr_Occurred()) { |
From: Sidnei da S. <dre...@us...> - 2008-02-12 00:10:55
|
Update of /cvsroot/pywin32/pywin32/com/win32comext/bits/test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3887/com/win32comext/bits/test Added Files: show_all_jobs.py test_bits.py Log Message: - Merge sidnei-bits branch, adds support for BITS (Background Intelligent Transfer Service) --- NEW FILE: show_all_jobs.py --- # Dump lots of info about BITS jobs. from win32com.bits import bits import pythoncom states = dict([(val, (name[13:])) for name, val in vars(bits).items() if name.startswith('BG_JOB_STATE_')]) job_types = dict([(val, (name[12:])) for name, val in vars(bits).items() if name.startswith('BG_JOB_TYPE_')]) bcm = pythoncom.CoCreateInstance(bits.CLSID_BackgroundCopyManager, None, pythoncom.CLSCTX_LOCAL_SERVER, bits.IID_IBackgroundCopyManager) try: enum = bcm.EnumJobs(bits.BG_JOB_ENUM_ALL_USERS) except pythoncom.error: print "Failed to get jobs for all users - trying for current user" enum = bcm.EnumJobs(0) for job in enum: print "Job:", job.GetDisplayName() print "Description:", job.GetDescription() print "Id:", job.GetId() print "State:", states.get(job.GetState()) print "Type:", job_types.get(job.GetType()) print "Owner:", job.GetOwner() print "Errors:", job.GetErrorCount() print "Created/Modified/Finished times:", [str(t) for t in job.GetTimes()] bytes_tot, bytes_xf, files_tot, files_xf = job.GetProgress() print "Bytes: %d complete of %d total" % (bytes_xf, bytes_tot) print "Files: %d complete of %d total" % (files_xf, files_tot) for f in job.EnumFiles(): bytes, total, done = f.GetProgress() print " Remote:", f.GetRemoteName() print " Local:", f.GetLocalName() print " Progress: %d of %d bytes - completed=%s)" % (bytes, total, done) print print --- NEW FILE: test_bits.py --- from win32com.server.util import wrap import pythoncom, sys, os, time, win32api, win32event, tempfile from win32com.bits import bits TIMEOUT = 200 # ms StopEvent = win32event.CreateEvent(None, 0, 0, None) job_name = 'bits-pywin32-test' states = dict([(val, (name[13:])) for name, val in vars(bits).items() if name.startswith('BG_JOB_STATE_')]) bcm = pythoncom.CoCreateInstance(bits.CLSID_BackgroundCopyManager, None, pythoncom.CLSCTX_LOCAL_SERVER, bits.IID_IBackgroundCopyManager) class BackgroundJobCallback: _com_interfaces_ = [bits.IID_IBackgroundCopyCallback] _public_methods_ = ["JobTransferred", "JobError", "JobModification"] def JobTransferred(self, job): print 'Job Transferred', job job.Complete() win32event.SetEvent(StopEvent) # exit msg pump def JobError(self, job, error): print 'Job Error', job, error f = error.GetFile() print 'While downloading', f.GetRemoteName() print 'To', f.GetLocalName() print 'The following error happened:' self._print_error(error) if f.GetRemoteName().endswith('missing-favicon.ico'): print 'Changing to point to correct file' f2 = f.QueryInterface(bits.IID_IBackgroundCopyFile2) favicon = 'http://www.python.org/favicon.ico' print 'Changing RemoteName from', f2.GetRemoteName(), 'to', favicon f2.SetRemoteName(favicon) job.Resume() else: job.Cancel() def _print_error(self, err): ctx, hresult = err.GetError() try: hresult_msg = win32api.FormatMessage(hresult) except win32api.error: hresult_msg = "" print "Context=0x%x, hresult=0x%x (%s)" % (ctx, hresult, hresult_msg) print err.GetErrorDescription() def JobModification(self, job, reserved): state = job.GetState() print 'Job Modification', job.GetDisplayName(), states.get(state) # Need to catch TRANSIENT_ERROR here, as JobError doesn't get # called (apparently) when the error is transient. if state == bits.BG_JOB_STATE_TRANSIENT_ERROR: print "Error details:" err = job.GetError() self._print_error(err) job = bcm.CreateJob(job_name, bits.BG_JOB_TYPE_DOWNLOAD) job.SetNotifyInterface(wrap(BackgroundJobCallback())) job.SetNotifyFlags(bits.BG_NOTIFY_JOB_TRANSFERRED | bits.BG_NOTIFY_JOB_ERROR | bits.BG_NOTIFY_JOB_MODIFICATION) # The idea here is to intentionally make one of the files fail to be # downloaded. Then the JobError notification will be triggered, where # we do fix the failing file by calling SetRemoteName to a valid URL # and call Resume() on the job, making the job finish successfully. # # Note to self: A domain that cannot be resolved will cause # TRANSIENT_ERROR instead of ERROR, and the JobError notification will # not be triggered! This can bite you during testing depending on how # your DNS is configured. For example, if you use OpenDNS.org's DNS # servers, an invalid hostname will *always* be resolved (they # redirect you to a search page), so be careful when testing. job.AddFile('http://www.python.org/favicon.ico', os.path.join(tempfile.gettempdir(), 'bits-favicon.ico')) job.AddFile('http://www.python.org/missing-favicon.ico', os.path.join(tempfile.gettempdir(), 'bits-missing-favicon.ico')) for f in job.EnumFiles(): print 'Downloading', f.GetRemoteName() print 'To', f.GetLocalName() job.Resume() while True: rc = win32event.MsgWaitForMultipleObjects( (StopEvent,), 0, TIMEOUT, win32event.QS_ALLEVENTS) if rc == win32event.WAIT_OBJECT_0: break elif rc == win32event.WAIT_OBJECT_0+1: if pythoncom.PumpWaitingMessages(): break # wm_quit |
From: Sidnei da S. <dre...@us...> - 2008-02-12 00:10:53
|
Update of /cvsroot/pywin32/pywin32 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3887 Modified Files: CHANGES.txt setup.py Log Message: - Merge sidnei-bits branch, adds support for BITS (Background Intelligent Transfer Service) Index: setup.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/setup.py,v retrieving revision 1.67 retrieving revision 1.68 diff -C2 -d -r1.67 -r1.68 *** setup.py 10 Feb 2008 23:56:33 -0000 1.67 --- setup.py 12 Feb 2008 00:10:57 -0000 1.68 *************** *** 1427,1430 **** --- 1427,1431 ---- 'authorization' : 'com/win32comext/authorization/src', 'taskscheduler' : 'com/win32comext/taskscheduler/src', + 'bits' : 'com/win32comext/bits/src', } *************** *** 1574,1577 **** --- 1575,1593 ---- """ % dirs).split()), + WinExt_win32com('bits', libraries='Bits', pch_header="bits_pch.h", + sources=(""" + %(bits)s/bits.cpp + %(bits)s/PyIBackgroundCopyManager.cpp + %(bits)s/PyIBackgroundCopyCallback.cpp + %(bits)s/PyIBackgroundCopyError.cpp + %(bits)s/PyIBackgroundCopyJob.cpp + %(bits)s/PyIBackgroundCopyJob2.cpp + %(bits)s/PyIBackgroundCopyJob3.cpp + %(bits)s/PyIBackgroundCopyFile.cpp + %(bits)s/PyIBackgroundCopyFile2.cpp + %(bits)s/PyIEnumBackgroundCopyJobs.cpp + %(bits)s/PyIEnumBackgroundCopyFiles.cpp + + """ % dirs).split()), WinExt_win32com('ifilter', libraries='ntquery'), WinExt_win32com('directsound', pch_header='directsound_pch.h', *************** *** 1761,1765 **** 'win32comext.directsound', 'win32comext.authorization', ! 'pythonwin.pywin', 'pythonwin.pywin.debugger', --- 1777,1782 ---- 'win32comext.directsound', 'win32comext.authorization', ! 'win32comext.bits', ! 'pythonwin.pywin', 'pythonwin.pywin.debugger', *************** *** 1869,1872 **** --- 1886,1890 ---- 'com/win32comext/ifilter/demo/*.py', 'com/win32comext/authorization/demos/*.py', + 'com/win32comext/bits/test/*.py', 'isapi/*.txt', 'isapi/samples/*.py', Index: CHANGES.txt =================================================================== RCS file: /cvsroot/pywin32/pywin32/CHANGES.txt,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** CHANGES.txt 7 Feb 2008 06:19:51 -0000 1.17 --- CHANGES.txt 12 Feb 2008 00:10:57 -0000 1.18 *************** *** 21,24 **** --- 21,30 ---- * com related changes: + - win32com.bits: Sidnei da Silva from Enfold Systems added support for + BITS (Background Intelligent Transfer Service). Not fully complete + (missing Ranges-related APIs and a couple others) but the basic + functionality is in place. See the demos in + win32comext/bits/test/*.py + - makepy accepts a program id to process its typelib and generates long integer literals for constants > sys.maxint. The way typelibs are generated *************** *** 54,58 **** * PyIExtractImage by Steven James. * PyIEmptyVolumecache, IEmptyVolumeCache2, IEmptyVolumeCacheCallBack by ! Sidnei da Silva from Enfold. * IsUserAnAdmin * More coverage of the shell interfaces and demos, including many Vista --- 60,64 ---- * PyIExtractImage by Steven James. * PyIEmptyVolumecache, IEmptyVolumeCache2, IEmptyVolumeCacheCallBack by ! Sidnei da Silva from Enfold Systems. * IsUserAnAdmin * More coverage of the shell interfaces and demos, including many Vista |
Update of /cvsroot/pywin32/pywin32/com/win32comext/bits/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3887/com/win32comext/bits/src Added Files: PyIBackgroundCopyCallback.cpp PyIBackgroundCopyCallback.h PyIBackgroundCopyError.cpp PyIBackgroundCopyError.h PyIBackgroundCopyFile.cpp PyIBackgroundCopyFile.h PyIBackgroundCopyFile2.cpp PyIBackgroundCopyFile2.h PyIBackgroundCopyJob.cpp PyIBackgroundCopyJob.h PyIBackgroundCopyJob2.cpp PyIBackgroundCopyJob2.h PyIBackgroundCopyJob3.cpp PyIBackgroundCopyJob3.h PyIBackgroundCopyManager.cpp PyIBackgroundCopyManager.h PyIEnumBackgroundCopyFiles.cpp PyIEnumBackgroundCopyFiles.h PyIEnumBackgroundCopyJobs.cpp PyIEnumBackgroundCopyJobs.h bits.cpp bits_pch.h Log Message: - Merge sidnei-bits branch, adds support for BITS (Background Intelligent Transfer Service) --- NEW FILE: PyIEnumBackgroundCopyJobs.cpp --- // This file implements the IEnumBackgroundCopyJobs Interface for Python. // Generated by makegw.py #include "PyIEnumBackgroundCopyJobs.h" // @doc - This file contains autoduck documentation // --------------------------------------------------- // // Interface Implementation PyIEnumBackgroundCopyJobs::PyIEnumBackgroundCopyJobs(IUnknown *pdisp): PyIUnknown(pdisp) { ob_type = &type; } PyIEnumBackgroundCopyJobs::~PyIEnumBackgroundCopyJobs() { } /* static */ IEnumBackgroundCopyJobs *PyIEnumBackgroundCopyJobs::GetI(PyObject *self) { return (IEnumBackgroundCopyJobs *)PyIUnknown::GetI(self); } // @pymethod object|PyIEnumBackgroundCopyJobs|Next|Retrieves a specified number of items in the enumeration sequence. PyObject *PyIEnumBackgroundCopyJobs::Next(PyObject *self, PyObject *args) { long celt = 1; // @pyparm int|num|1|Number of items to retrieve. if ( !PyArg_ParseTuple(args, "|l:Next", &celt) ) return NULL; IEnumBackgroundCopyJobs *pIEnumBackgroundCopyJobs = GetI(self); if ( pIEnumBackgroundCopyJobs == NULL ) return NULL; IBackgroundCopyJob **rgVar = new IBackgroundCopyJob *[celt]; if ( rgVar == NULL ) { PyErr_SetString(PyExc_MemoryError, "allocating result BackgroundCopyJobss"); return NULL; } int i; /* for ( i = celt; i--; ) // *** possibly init each structure element??? */ ULONG celtFetched = 0; PY_INTERFACE_PRECALL; HRESULT hr = pIEnumBackgroundCopyJobs->Next(celt, rgVar, &celtFetched); PY_INTERFACE_POSTCALL; if ( HRESULT_CODE(hr) != ERROR_NO_MORE_ITEMS && FAILED(hr) ) { delete [] rgVar; return PyCom_BuildPyException(hr, pIEnumBackgroundCopyJobs, IID_IEnumBackgroundCopyJobs); } PyObject *result = PyTuple_New(celtFetched); if ( result != NULL ) { for ( i = celtFetched; i--; ) { PyObject *ob = PyCom_PyObjectFromIUnknown(rgVar[i], IID_IBackgroundCopyJob, FALSE); if ( ob == NULL ) { Py_DECREF(result); result = NULL; break; } PyTuple_SET_ITEM(result, i, ob); } } /* for ( i = celtFetched; i--; ) // *** possibly cleanup each structure element??? */ delete [] rgVar; return result; } // @pymethod |PyIEnumBackgroundCopyJobs|Skip|Skips over the next specified elementes. PyObject *PyIEnumBackgroundCopyJobs::Skip(PyObject *self, PyObject *args) { long celt; if ( !PyArg_ParseTuple(args, "l:Skip", &celt) ) return NULL; IEnumBackgroundCopyJobs *pIEnumBackgroundCopyJobs = GetI(self); if ( pIEnumBackgroundCopyJobs == NULL ) return NULL; PY_INTERFACE_PRECALL; HRESULT hr = pIEnumBackgroundCopyJobs->Skip(celt); PY_INTERFACE_POSTCALL; if ( FAILED(hr) ) return PyCom_BuildPyException(hr, pIEnumBackgroundCopyJobs, IID_IEnumBackgroundCopyJobs); Py_INCREF(Py_None); return Py_None; } // @pymethod |PyIEnumBackgroundCopyJobs|Reset|Resets the enumeration sequence to the beginning. PyObject *PyIEnumBackgroundCopyJobs::Reset(PyObject *self, PyObject *args) { if ( !PyArg_ParseTuple(args, ":Reset") ) return NULL; IEnumBackgroundCopyJobs *pIEnumBackgroundCopyJobs = GetI(self); if ( pIEnumBackgroundCopyJobs == NULL ) return NULL; PY_INTERFACE_PRECALL; HRESULT hr = pIEnumBackgroundCopyJobs->Reset(); PY_INTERFACE_POSTCALL; if ( FAILED(hr) ) return PyCom_BuildPyException(hr, pIEnumBackgroundCopyJobs, IID_IEnumBackgroundCopyJobs); Py_INCREF(Py_None); return Py_None; } // @pymethod <o PyIEnumBackgroundCopyJobs>|PyIEnumBackgroundCopyJobs|Clone|Creates another enumerator that contains the same enumeration state as the current one PyObject *PyIEnumBackgroundCopyJobs::Clone(PyObject *self, PyObject *args) { if ( !PyArg_ParseTuple(args, ":Clone") ) return NULL; IEnumBackgroundCopyJobs *pIEnumBackgroundCopyJobs = GetI(self); if ( pIEnumBackgroundCopyJobs == NULL ) return NULL; IEnumBackgroundCopyJobs *pClone; PY_INTERFACE_PRECALL; HRESULT hr = pIEnumBackgroundCopyJobs->Clone(&pClone); PY_INTERFACE_POSTCALL; if ( FAILED(hr) ) return PyCom_BuildPyException(hr, pIEnumBackgroundCopyJobs, IID_IEnumBackgroundCopyJobs); return PyCom_PyObjectFromIUnknown(pClone, IID_IEnumBackgroundCopyJobs, FALSE); } // @object PyIEnumBackgroundCopyJobs|A Python interface to IEnumBackgroundCopyJobs static struct PyMethodDef PyIEnumBackgroundCopyJobs_methods[] = { { "Next", PyIEnumBackgroundCopyJobs::Next, 1 }, // @pymeth Next|Retrieves a specified number of items in the enumeration sequence. { "Skip", PyIEnumBackgroundCopyJobs::Skip, 1 }, // @pymeth Skip|Skips over the next specified elementes. { "Reset", PyIEnumBackgroundCopyJobs::Reset, 1 }, // @pymeth Reset|Resets the enumeration sequence to the beginning. { "Clone", PyIEnumBackgroundCopyJobs::Clone, 1 }, // @pymeth Clone|Creates another enumerator that contains the same enumeration state as the current one. { NULL } }; PyComEnumTypeObject PyIEnumBackgroundCopyJobs::type("PyIEnumBackgroundCopyJobs", &PyIUnknown::type, sizeof(PyIEnumBackgroundCopyJobs), PyIEnumBackgroundCopyJobs_methods, GET_PYCOM_CTOR(PyIEnumBackgroundCopyJobs)); --- NEW FILE: PyIBackgroundCopyJob.cpp --- // This file implements the IBackgroundCopyJob Interface for Python. // Generated by makegw.py #include "bits_pch.h" #include "PyIBackgroundCopyJob.h" // @doc - This file contains autoduck documentation // --------------------------------------------------- // // Interface Implementation PyIBackgroundCopyJob::PyIBackgroundCopyJob(IUnknown *pdisp): PyIUnknown(pdisp) { ob_type = &type; } PyIBackgroundCopyJob::~PyIBackgroundCopyJob() { } /* static */ IBackgroundCopyJob *PyIBackgroundCopyJob::GetI(PyObject *self) { return (IBackgroundCopyJob *)PyIUnknown::GetI(self); } // @pymethod |PyIBackgroundCopyJob|AddFileSet|Description of AddFileSet. PyObject *PyIBackgroundCopyJob::AddFileSet(PyObject *self, PyObject *args) { IBackgroundCopyJob *pIBCJ = GetI(self); if ( pIBCJ == NULL ) return NULL; // @pyparm [<o PyBG_FILE_INFO, ...]|pFileSet||Description for pFileSet PyObject *obFileSet; if ( !PyArg_ParseTuple(args, "O:AddFileSet", &obFileSet) ) return NULL; ULONG cFileCount; BG_FILE_INFO *pFileSet; if (!PyObject_AsBG_FILE_INFO_LIST( obFileSet, &cFileCount, &pFileSet )) return NULL; HRESULT hr; PY_INTERFACE_PRECALL; hr = pIBCJ->AddFileSet( cFileCount, pFileSet ); PyObject_FreeBG_FILE_INFO_LIST(cFileCount, pFileSet); PY_INTERFACE_POSTCALL; if ( FAILED(hr) ) return PyCom_BuildPyException(hr, pIBCJ, IID_IBackgroundCopyJob ); Py_INCREF(Py_None); return Py_None; } // @pymethod |PyIBackgroundCopyJob|AddFile|Description of AddFile. PyObject *PyIBackgroundCopyJob::AddFile(PyObject *self, PyObject *args) { IBackgroundCopyJob *pIBCJ = GetI(self); if ( pIBCJ == NULL ) return NULL; // @pyparm <o unicode>|RemoteUrl||Description for RemoteUrl // @pyparm <o unicode>|LocalName||Description for LocalName PyObject *obRemoteUrl; PyObject *obLocalName; LPWSTR RemoteUrl; LPWSTR LocalName; if ( !PyArg_ParseTuple(args, "OO:AddFile", &obRemoteUrl, &obLocalName) ) return NULL; BOOL bPythonIsHappy = TRUE; if (bPythonIsHappy && !PyWinObject_AsBstr(obRemoteUrl, &RemoteUrl)) bPythonIsHappy = FALSE; if (bPythonIsHappy && !PyWinObject_AsBstr(obLocalName, &LocalName)) bPythonIsHappy = FALSE; if (!bPythonIsHappy) return NULL; HRESULT hr; PY_INTERFACE_PRECALL; hr = pIBCJ->AddFile( RemoteUrl, LocalName ); SysFreeString(RemoteUrl); SysFreeString(LocalName); PY_INTERFACE_POSTCALL; if ( FAILED(hr) ) return PyCom_BuildPyException(hr, pIBCJ, IID_IBackgroundCopyJob ); Py_INCREF(Py_None); return Py_None; } // @pymethod |PyIBackgroundCopyJob|EnumFiles|Description of EnumFiles. PyObject *PyIBackgroundCopyJob::EnumFiles(PyObject *self, PyObject *args) { IBackgroundCopyJob *pIBCJ = GetI(self); if ( pIBCJ == NULL ) return NULL; IEnumBackgroundCopyFiles *pEnum; if ( !PyArg_ParseTuple(args, ":EnumFiles") ) return NULL; HRESULT hr; PY_INTERFACE_PRECALL; hr = pIBCJ->EnumFiles( &pEnum ); PY_INTERFACE_POSTCALL; if ( FAILED(hr) ) return PyCom_BuildPyException(hr, pIBCJ, IID_IBackgroundCopyJob ); return PyCom_PyObjectFromIUnknown(pEnum, IID_IEnumBackgroundCopyFiles, FALSE); } // @pymethod |PyIBackgroundCopyJob|Suspend|Description of Suspend. PyObject *PyIBackgroundCopyJob::Suspend(PyObject *self, PyObject *args) { IBackgroundCopyJob *pIBCJ = GetI(self); if ( pIBCJ == NULL ) return NULL; if ( !PyArg_ParseTuple(args, ":Suspend") ) return NULL; HRESULT hr; PY_INTERFACE_PRECALL; hr = pIBCJ->Suspend( ); PY_INTERFACE_POSTCALL; if ( FAILED(hr) ) return PyCom_BuildPyException(hr, pIBCJ, IID_IBackgroundCopyJob ); return PyInt_FromLong(hr); } // @pymethod |PyIBackgroundCopyJob|Resume|Description of Resume. PyObject *PyIBackgroundCopyJob::Resume(PyObject *self, PyObject *args) { IBackgroundCopyJob *pIBCJ = GetI(self); if ( pIBCJ == NULL ) return NULL; if ( !PyArg_ParseTuple(args, ":Resume") ) return NULL; HRESULT hr; PY_INTERFACE_PRECALL; hr = pIBCJ->Resume( ); PY_INTERFACE_POSTCALL; if ( FAILED(hr) ) return PyCom_BuildPyException(hr, pIBCJ, IID_IBackgroundCopyJob ); return PyInt_FromLong(hr); } // @pymethod |PyIBackgroundCopyJob|Cancel|Description of Cancel. PyObject *PyIBackgroundCopyJob::Cancel(PyObject *self, PyObject *args) { IBackgroundCopyJob *pIBCJ = GetI(self); if ( pIBCJ == NULL ) return NULL; if ( !PyArg_ParseTuple(args, ":Cancel") ) return NULL; HRESULT hr; PY_INTERFACE_PRECALL; hr = pIBCJ->Cancel( ); PY_INTERFACE_POSTCALL; if ( FAILED(hr) ) return PyCom_BuildPyException(hr, pIBCJ, IID_IBackgroundCopyJob ); return PyInt_FromLong(hr); } // @pymethod |PyIBackgroundCopyJob|Complete|Description of Complete. PyObject *PyIBackgroundCopyJob::Complete(PyObject *self, PyObject *args) { IBackgroundCopyJob *pIBCJ = GetI(self); if ( pIBCJ == NULL ) return NULL; if ( !PyArg_ParseTuple(args, ":Complete") ) return NULL; HRESULT hr; PY_INTERFACE_PRECALL; hr = pIBCJ->Complete( ); PY_INTERFACE_POSTCALL; if ( FAILED(hr) ) return PyCom_BuildPyException(hr, pIBCJ, IID_IBackgroundCopyJob ); return PyInt_FromLong(hr); } // @pymethod |PyIBackgroundCopyJob|GetId|Description of GetId. PyObject *PyIBackgroundCopyJob::GetId(PyObject *self, PyObject *args) { IBackgroundCopyJob *pIBCJ = GetI(self); if ( pIBCJ == NULL ) return NULL; GUID val; HRESULT hr; PY_INTERFACE_PRECALL; hr = pIBCJ->GetId( &val ); PY_INTERFACE_POSTCALL; if ( FAILED(hr) ) return PyCom_BuildPyException(hr, pIBCJ, IID_IBackgroundCopyJob ); return PyWinObject_FromIID(val); } // @pymethod |PyIBackgroundCopyJob|GetType|Description of GetType. PyObject *PyIBackgroundCopyJob::GetType(PyObject *self, PyObject *args) { IBackgroundCopyJob *pIBCJ = GetI(self); if ( pIBCJ == NULL ) return NULL; if ( !PyArg_ParseTuple(args, ":GetType")) return NULL; HRESULT hr; BG_JOB_TYPE val; PY_INTERFACE_PRECALL; hr = pIBCJ->GetType(&val); PY_INTERFACE_POSTCALL; if ( FAILED(hr) ) return PyCom_BuildPyException(hr, pIBCJ, IID_IBackgroundCopyJob ); return PyInt_FromLong(val); } // @pymethod |PyIBackgroundCopyJob|GetProgress|Description of GetProgress. PyObject *PyIBackgroundCopyJob::GetProgress(PyObject *self, PyObject *args) { IBackgroundCopyJob *pIBCJ = GetI(self); if ( pIBCJ == NULL ) return NULL; if ( !PyArg_ParseTuple(args, ":GetProgress") ) return NULL; BG_JOB_PROGRESS val; HRESULT hr; PY_INTERFACE_PRECALL; hr = pIBCJ->GetProgress( &val ); PY_INTERFACE_POSTCALL; if ( FAILED(hr) ) return PyCom_BuildPyException(hr, pIBCJ, IID_IBackgroundCopyJob ); return PyObject_FromBG_JOB_PROGRESS(&val); } // @pymethod |PyIBackgroundCopyJob|GetTimes|Description of GetTimes. PyObject *PyIBackgroundCopyJob::GetTimes(PyObject *self, PyObject *args) { IBackgroundCopyJob *pIBCJ = GetI(self); if ( pIBCJ == NULL ) return NULL; if ( !PyArg_ParseTuple(args, ":GetTimes") ) return NULL; BG_JOB_TIMES val; HRESULT hr; PY_INTERFACE_PRECALL; hr = pIBCJ->GetTimes( &val ); PY_INTERFACE_POSTCALL; if ( FAILED(hr) ) return PyCom_BuildPyException(hr, pIBCJ, IID_IBackgroundCopyJob ); return PyObject_FromBG_JOB_TIMES(&val); } // @pymethod |PyIBackgroundCopyJob|GetState|Description of GetState. PyObject *PyIBackgroundCopyJob::GetState(PyObject *self, PyObject *args) { IBackgroundCopyJob *pIBCJ = GetI(self); if ( pIBCJ == NULL ) return NULL; if ( !PyArg_ParseTuple(args, ":GetState") ) return NULL; BG_JOB_STATE val; HRESULT hr; PY_INTERFACE_PRECALL; hr = pIBCJ->GetState(&val); PY_INTERFACE_POSTCALL; if ( FAILED(hr) ) return PyCom_BuildPyException(hr, pIBCJ, IID_IBackgroundCopyJob ); return PyLong_FromLong((long)val); } // @pymethod |PyIBackgroundCopyJob|GetError|Description of GetError. PyObject *PyIBackgroundCopyJob::GetError(PyObject *self, PyObject *args) { IBackgroundCopyJob *pIBCJ = GetI(self); if ( pIBCJ == NULL ) return NULL; IBackgroundCopyError * ppError; if ( !PyArg_ParseTuple(args, ":GetError") ) return NULL; HRESULT hr; PY_INTERFACE_PRECALL; hr = pIBCJ->GetError( &ppError ); PY_INTERFACE_POSTCALL; if ( FAILED(hr) ) return PyCom_BuildPyException(hr, pIBCJ, IID_IBackgroundCopyJob ); return PyCom_PyObjectFromIUnknown(ppError, IID_IBackgroundCopyError, FALSE); } // @pymethod |PyIBackgroundCopyJob|GetOwner|Description of GetOwner. PyObject *PyIBackgroundCopyJob::GetOwner(PyObject *self, PyObject *args) { IBackgroundCopyJob *pIBCJ = GetI(self); if ( pIBCJ == NULL ) return NULL; LPWSTR val; if ( !PyArg_ParseTuple(args, ":GetOwner") ) return NULL; HRESULT hr; PY_INTERFACE_PRECALL; hr = pIBCJ->GetOwner( &val ); PY_INTERFACE_POSTCALL; if ( FAILED(hr) ) return PyCom_BuildPyException(hr, pIBCJ, IID_IBackgroundCopyJob ); PyObject *ret = PyWinObject_FromWCHAR(val); CoTaskMemFree(val); return ret; } // @pymethod |PyIBackgroundCopyJob|SetDisplayName|Description of SetDisplayName. PyObject *PyIBackgroundCopyJob::SetDisplayName(PyObject *self, PyObject *args) { IBackgroundCopyJob *pIBCJ = GetI(self); if ( pIBCJ == NULL ) return NULL; // @pyparm <o unicode>|Val||Description for Val PyObject *obVal; LPWSTR Val; if ( !PyArg_ParseTuple(args, "O:SetDisplayName", &obVal) ) return NULL; BOOL bPythonIsHappy = TRUE; if (!PyWinObject_AsBstr(obVal, &Val)) return NULL; HRESULT hr; PY_INTERFACE_PRECALL; hr = pIBCJ->SetDisplayName( Val ); SysFreeString(Val); PY_INTERFACE_POSTCALL; if ( FAILED(hr) ) return PyCom_BuildPyException(hr, pIBCJ, IID_IBackgroundCopyJob ); Py_INCREF(Py_None); return Py_None; } // @pymethod |PyIBackgroundCopyJob|GetDisplayName|Description of GetDisplayName. PyObject *PyIBackgroundCopyJob::GetDisplayName(PyObject *self, PyObject *args) { IBackgroundCopyJob *pIBCJ = GetI(self); if ( pIBCJ == NULL ) return NULL; LPWSTR pVal; if ( !PyArg_ParseTuple(args, ":GetDisplayName") ) return NULL; HRESULT hr; PY_INTERFACE_PRECALL; hr = pIBCJ->GetDisplayName( &pVal ); PY_INTERFACE_POSTCALL; if ( FAILED(hr) ) return PyCom_BuildPyException(hr, pIBCJ, IID_IBackgroundCopyJob ); PyObject *ret = PyWinObject_FromWCHAR(pVal); CoTaskMemFree(pVal); return ret; } // @pymethod |PyIBackgroundCopyJob|SetDescription|Description of SetDescription. PyObject *PyIBackgroundCopyJob::SetDescription(PyObject *self, PyObject *args) { IBackgroundCopyJob *pIBCJ = GetI(self); if ( pIBCJ == NULL ) return NULL; // @pyparm <o unicode>|Val||Description for Val PyObject *obVal; LPWSTR Val; if ( !PyArg_ParseTuple(args, "O:SetDescription", &obVal) ) return NULL; BOOL bPythonIsHappy = TRUE; if (!PyWinObject_AsWCHAR( obVal, &Val )) return NULL; HRESULT hr; PY_INTERFACE_PRECALL; hr = pIBCJ->SetDescription( Val ); PY_INTERFACE_POSTCALL; if ( FAILED(hr) ) return PyCom_BuildPyException(hr, pIBCJ, IID_IBackgroundCopyJob ); Py_INCREF(Py_None); return Py_None; } // @pymethod |PyIBackgroundCopyJob|GetDescription|Description of GetDescription. PyObject *PyIBackgroundCopyJob::GetDescription(PyObject *self, PyObject *args) { IBackgroundCopyJob *pIBCJ = GetI(self); if ( pIBCJ == NULL ) return NULL; LPWSTR pVal; if ( !PyArg_ParseTuple(args, ":GetDescription") ) return NULL; HRESULT hr; PY_INTERFACE_PRECALL; hr = pIBCJ->GetDescription( &pVal ); PY_INTERFACE_POSTCALL; if ( FAILED(hr) ) return PyCom_BuildPyException(hr, pIBCJ, IID_IBackgroundCopyJob ); PyObject *ret = PyWinObject_FromWCHAR(pVal); CoTaskMemFree(pVal); return ret; } // @pymethod |PyIBackgroundCopyJob|SetPriority|Description of SetPriority. PyObject *PyIBackgroundCopyJob::SetPriority(PyObject *self, PyObject *args) { IBackgroundCopyJob *pIBCJ = GetI(self); if ( pIBCJ == NULL ) return NULL; BG_JOB_PRIORITY val; // @pyparm int|Val||Description for Val if ( !PyArg_ParseTuple(args, "l:SetPriority", &val) ) return NULL; HRESULT hr; PY_INTERFACE_PRECALL; hr = pIBCJ->SetPriority(val); PY_INTERFACE_POSTCALL; if ( FAILED(hr) ) return PyCom_BuildPyException(hr, pIBCJ, IID_IBackgroundCopyJob ); Py_INCREF(Py_None); return Py_None; } // @pymethod |PyIBackgroundCopyJob|GetPriority|Description of GetPriority. PyObject *PyIBackgroundCopyJob::GetPriority(PyObject *self, PyObject *args) { IBackgroundCopyJob *pIBCJ = GetI(self); if ( pIBCJ == NULL ) return NULL; if ( !PyArg_ParseTuple(args, ":GetPriority") ) return NULL; BG_JOB_PRIORITY val; HRESULT hr; PY_INTERFACE_PRECALL; hr = pIBCJ->GetPriority(&val ); PY_INTERFACE_POSTCALL; if ( FAILED(hr) ) return PyCom_BuildPyException(hr, pIBCJ, IID_IBackgroundCopyJob ); return PyInt_FromLong(val); } // @pymethod |PyIBackgroundCopyJob|SetNotifyFlags|Description of SetNotifyFlags. PyObject *PyIBackgroundCopyJob::SetNotifyFlags(PyObject *self, PyObject *args) { IBackgroundCopyJob *pIBCJ = GetI(self); if ( pIBCJ == NULL ) return NULL; // @pyparm int|Val||Description for Val ULONG Val; if ( !PyArg_ParseTuple(args, "l:SetNotifyFlags", &Val) ) return NULL; HRESULT hr; PY_INTERFACE_PRECALL; hr = pIBCJ->SetNotifyFlags( Val ); PY_INTERFACE_POSTCALL; if ( FAILED(hr) ) return PyCom_BuildPyException(hr, pIBCJ, IID_IBackgroundCopyJob ); Py_INCREF(Py_None); return Py_None; } // @pymethod |PyIBackgroundCopyJob|GetNotifyFlags|Description of GetNotifyFlags. PyObject *PyIBackgroundCopyJob::GetNotifyFlags(PyObject *self, PyObject *args) { IBackgroundCopyJob *pIBCJ = GetI(self); if ( pIBCJ == NULL ) return NULL; if ( !PyArg_ParseTuple(args, ":GetNotifyFlags") ) return NULL; ULONG val; HRESULT hr; PY_INTERFACE_PRECALL; hr = pIBCJ->GetNotifyFlags(&val); PY_INTERFACE_POSTCALL; if ( FAILED(hr) ) return PyCom_BuildPyException(hr, pIBCJ, IID_IBackgroundCopyJob ); return PyLong_FromUnsignedLong(val); } // @pymethod |PyIBackgroundCopyJob|SetNotifyInterface|Description of SetNotifyInterface. PyObject *PyIBackgroundCopyJob::SetNotifyInterface(PyObject *self, PyObject *args) { IBackgroundCopyJob *pIBCJ = GetI(self); if ( pIBCJ == NULL ) return NULL; // @pyparm <o PyIUnknown *>|Val||Description for Val PyObject *obVal; IUnknown *Val; if ( !PyArg_ParseTuple(args, "O:SetNotifyInterface", &obVal) ) return NULL; BOOL bPythonIsHappy = TRUE; if (!PyCom_InterfaceFromPyInstanceOrObject(obVal, IID_IUnknown, (void **)&Val, TRUE /* bNoneOK */)) return NULL; HRESULT hr; PY_INTERFACE_PRECALL; hr = pIBCJ->SetNotifyInterface( Val ); if (Val) Val->Release(); PY_INTERFACE_POSTCALL; if ( FAILED(hr) ) return PyCom_BuildPyException(hr, pIBCJ, IID_IBackgroundCopyJob ); Py_INCREF(Py_None); return Py_None; } // @pymethod |PyIBackgroundCopyJob|GetNotifyInterface|Description of GetNotifyInterface. PyObject *PyIBackgroundCopyJob::GetNotifyInterface(PyObject *self, PyObject *args) { IBackgroundCopyJob *pIBCJ = GetI(self); if ( pIBCJ == NULL ) return NULL; IUnknown * pVal; if ( !PyArg_ParseTuple(args, ":GetNotifyInterface") ) return NULL; HRESULT hr; PY_INTERFACE_PRECALL; hr = pIBCJ->GetNotifyInterface( &pVal ); PY_INTERFACE_POSTCALL; if ( FAILED(hr) ) return PyCom_BuildPyException(hr, pIBCJ, IID_IBackgroundCopyJob ); return PyCom_PyObjectFromIUnknown(pVal, IID_IUnknown, FALSE); } // @pymethod |PyIBackgroundCopyJob|SetMinimumRetryDelay|Description of SetMinimumRetryDelay. PyObject *PyIBackgroundCopyJob::SetMinimumRetryDelay(PyObject *self, PyObject *args) { IBackgroundCopyJob *pIBCJ = GetI(self); if ( pIBCJ == NULL ) return NULL; // @pyparm int|Seconds||Description for Seconds ULONG Seconds; if ( !PyArg_ParseTuple(args, "l:SetMinimumRetryDelay", &Seconds) ) return NULL; HRESULT hr; PY_INTERFACE_PRECALL; hr = pIBCJ->SetMinimumRetryDelay( Seconds ); PY_INTERFACE_POSTCALL; if ( FAILED(hr) ) return PyCom_BuildPyException(hr, pIBCJ, IID_IBackgroundCopyJob ); Py_INCREF(Py_None); return Py_None; } // @pymethod |PyIBackgroundCopyJob|GetMinimumRetryDelay|Description of GetMinimumRetryDelay. PyObject *PyIBackgroundCopyJob::GetMinimumRetryDelay(PyObject *self, PyObject *args) { IBackgroundCopyJob *pIBCJ = GetI(self); if ( pIBCJ == NULL ) return NULL; if ( !PyArg_ParseTuple(args, ":GetMinimumRetryDelay") ) return NULL; HRESULT hr; ULONG seconds; PY_INTERFACE_PRECALL; hr = pIBCJ->GetMinimumRetryDelay( &seconds ); PY_INTERFACE_POSTCALL; if ( FAILED(hr) ) return PyCom_BuildPyException(hr, pIBCJ, IID_IBackgroundCopyJob ); return PyLong_FromUnsignedLong(seconds); } // @pymethod |PyIBackgroundCopyJob|SetNoProgressTimeout|Description of SetNoProgressTimeout. PyObject *PyIBackgroundCopyJob::SetNoProgressTimeout(PyObject *self, PyObject *args) { IBackgroundCopyJob *pIBCJ = GetI(self); if ( pIBCJ == NULL ) return NULL; // @pyparm int|Seconds||Description for Seconds ULONG Seconds; if ( !PyArg_ParseTuple(args, "l:SetNoProgressTimeout", &Seconds) ) return NULL; HRESULT hr; PY_INTERFACE_PRECALL; hr = pIBCJ->SetNoProgressTimeout( Seconds ); PY_INTERFACE_POSTCALL; if ( FAILED(hr) ) return PyCom_BuildPyException(hr, pIBCJ, IID_IBackgroundCopyJob ); Py_INCREF(Py_None); return Py_None; } // @pymethod |PyIBackgroundCopyJob|GetNoProgressTimeout|Description of GetNoProgressTimeout. PyObject *PyIBackgroundCopyJob::GetNoProgressTimeout(PyObject *self, PyObject *args) { IBackgroundCopyJob *pIBCJ = GetI(self); if ( pIBCJ == NULL ) return NULL; if ( !PyArg_ParseTuple(args, ":GetNoProgressTimeout") ) return NULL; ULONG seconds; HRESULT hr; PY_INTERFACE_PRECALL; hr = pIBCJ->GetNoProgressTimeout( &seconds ); PY_INTERFACE_POSTCALL; if ( FAILED(hr) ) return PyCom_BuildPyException(hr, pIBCJ, IID_IBackgroundCopyJob ); return PyLong_FromUnsignedLong(seconds); } // @pymethod |PyIBackgroundCopyJob|GetErrorCount|Description of GetErrorCount. PyObject *PyIBackgroundCopyJob::GetErrorCount(PyObject *self, PyObject *args) { IBackgroundCopyJob *pIBCJ = GetI(self); if ( pIBCJ == NULL ) return NULL; if ( !PyArg_ParseTuple(args, ":GetErrorCount") ) return NULL; ULONG errors; HRESULT hr; PY_INTERFACE_PRECALL; hr = pIBCJ->GetErrorCount( &errors ); PY_INTERFACE_POSTCALL; if ( FAILED(hr) ) return PyCom_BuildPyException(hr, pIBCJ, IID_IBackgroundCopyJob ); return PyLong_FromUnsignedLong(errors); } // @pymethod |PyIBackgroundCopyJob|SetProxySettings|Description of SetProxySettings. PyObject *PyIBackgroundCopyJob::SetProxySettings(PyObject *self, PyObject *args) { IBackgroundCopyJob *pIBCJ = GetI(self); if ( pIBCJ == NULL ) return NULL; BG_JOB_PROXY_USAGE ProxyUsage; // @pyparm int|ProxyUsage||Description for ProxyUsage WCHAR * ProxyList; PyObject *obProxyList; // @pyparm unicode|ProxyList||Description for ProxyList WCHAR * ProxyBypassList; PyObject *obProxyBypassList; // @pyparm unicode|ProxyBypassList||Description for ProxyBypassList if ( !PyArg_ParseTuple(args, "lOO:SetProxySettings", &ProxyUsage, &obProxyList, &obProxyBypassList) ) return NULL; BOOL bPythonIsHappy = TRUE; if (bPythonIsHappy && !PyWinObject_AsWCHAR( obProxyList, &ProxyList, TRUE )) bPythonIsHappy = FALSE; if (bPythonIsHappy && !PyWinObject_AsWCHAR( obProxyBypassList, &ProxyBypassList, TRUE )) bPythonIsHappy = FALSE; if (!bPythonIsHappy) return NULL; HRESULT hr; PY_INTERFACE_PRECALL; hr = pIBCJ->SetProxySettings( ProxyUsage, ProxyList, ProxyBypassList ); PyWinObject_FreeWCHAR(ProxyList); PyWinObject_FreeWCHAR(ProxyBypassList); PY_INTERFACE_POSTCALL; if ( FAILED(hr) ) return PyCom_BuildPyException(hr, pIBCJ, IID_IBackgroundCopyJob ); Py_INCREF(Py_None); return Py_None; } // @pymethod |PyIBackgroundCopyJob|GetProxySettings|Description of GetProxySettings. PyObject *PyIBackgroundCopyJob::GetProxySettings(PyObject *self, PyObject *args) { IBackgroundCopyJob *pIBCJ = GetI(self); if ( pIBCJ == NULL ) return NULL; if ( !PyArg_ParseTuple(args, ":GetProxySettings") ) return NULL; BG_JOB_PROXY_USAGE ProxyUsage; WCHAR *proxyList, *bypassList; HRESULT hr; PY_INTERFACE_PRECALL; hr = pIBCJ->GetProxySettings( &ProxyUsage, &proxyList, &bypassList ); PY_INTERFACE_POSTCALL; if ( FAILED(hr) ) return PyCom_BuildPyException(hr, pIBCJ, IID_IBackgroundCopyJob ); PyObject *ret = Py_BuildValue("lNN", ProxyUsage, PyWinObject_FromWCHAR(proxyList), PyWinObject_FromWCHAR(bypassList)); CoTaskMemFree(proxyList); CoTaskMemFree(bypassList); return ret; } // @pymethod |PyIBackgroundCopyJob|TakeOwnership|Description of TakeOwnership. PyObject *PyIBackgroundCopyJob::TakeOwnership(PyObject *self, PyObject *args) { IBackgroundCopyJob *pIBCJ = GetI(self); if ( pIBCJ == NULL ) return NULL; if ( !PyArg_ParseTuple(args, ":TakeOwnership") ) return NULL; HRESULT hr; PY_INTERFACE_PRECALL; hr = pIBCJ->TakeOwnership( ); PY_INTERFACE_POSTCALL; if ( FAILED(hr) ) return PyCom_BuildPyException(hr, pIBCJ, IID_IBackgroundCopyJob ); return PyInt_FromLong(hr); } // @object PyIBackgroundCopyJob|Description of the interface static struct PyMethodDef PyIBackgroundCopyJob_methods[] = { { "AddFileSet", PyIBackgroundCopyJob::AddFileSet, 1 }, // @pymeth AddFileSet|Description of AddFileSet { "AddFile", PyIBackgroundCopyJob::AddFile, 1 }, // @pymeth AddFile|Description of AddFile { "EnumFiles", PyIBackgroundCopyJob::EnumFiles, 1 }, // @pymeth EnumFiles|Description of EnumFiles { "Suspend", PyIBackgroundCopyJob::Suspend, 1 }, // @pymeth Suspend|Description of Suspend { "Resume", PyIBackgroundCopyJob::Resume, 1 }, // @pymeth Resume|Description of Resume { "Cancel", PyIBackgroundCopyJob::Cancel, 1 }, // @pymeth Cancel|Description of Cancel { "Complete", PyIBackgroundCopyJob::Complete, 1 }, // @pymeth Complete|Description of Complete { "GetId", PyIBackgroundCopyJob::GetId, 1 }, // @pymeth GetId|Description of GetId { "GetType", PyIBackgroundCopyJob::GetType, 1 }, // @pymeth GetType|Description of GetType { "GetProgress", PyIBackgroundCopyJob::GetProgress, 1 }, // @pymeth GetProgress|Description of GetProgress { "GetTimes", PyIBackgroundCopyJob::GetTimes, 1 }, // @pymeth GetTimes|Description of GetTimes { "GetState", PyIBackgroundCopyJob::GetState, 1 }, // @pymeth GetState|Description of GetState { "GetError", PyIBackgroundCopyJob::GetError, 1 }, // @pymeth GetError|Description of GetError { "GetOwner", PyIBackgroundCopyJob::GetOwner, 1 }, // @pymeth GetOwner|Description of GetOwner { "SetDisplayName", PyIBackgroundCopyJob::SetDisplayName, 1 }, // @pymeth SetDisplayName|Description of SetDisplayName { "GetDisplayName", PyIBackgroundCopyJob::GetDisplayName, 1 }, // @pymeth GetDisplayName|Description of GetDisplayName { "SetDescription", PyIBackgroundCopyJob::SetDescription, 1 }, // @pymeth SetDescription|Description of SetDescription { "GetDescription", PyIBackgroundCopyJob::GetDescription, 1 }, // @pymeth GetDescription|Description of GetDescription { "SetPriority", PyIBackgroundCopyJob::SetPriority, 1 }, // @pymeth SetPriority|Description of SetPriority { "GetPriority", PyIBackgroundCopyJob::GetPriority, 1 }, // @pymeth GetPriority|Description of GetPriority { "SetNotifyFlags", PyIBackgroundCopyJob::SetNotifyFlags, 1 }, // @pymeth SetNotifyFlags|Description of SetNotifyFlags { "GetNotifyFlags", PyIBackgroundCopyJob::GetNotifyFlags, 1 }, // @pymeth GetNotifyFlags|Description of GetNotifyFlags { "SetNotifyInterface", PyIBackgroundCopyJob::SetNotifyInterface, 1 }, // @pymeth SetNotifyInterface|Description of SetNotifyInterface { "GetNotifyInterface", PyIBackgroundCopyJob::GetNotifyInterface, 1 }, // @pymeth GetNotifyInterface|Description of GetNotifyInterface { "SetMinimumRetryDelay", PyIBackgroundCopyJob::SetMinimumRetryDelay, 1 }, // @pymeth SetMinimumRetryDelay|Description of SetMinimumRetryDelay { "GetMinimumRetryDelay", PyIBackgroundCopyJob::GetMinimumRetryDelay, 1 }, // @pymeth GetMinimumRetryDelay|Description of GetMinimumRetryDelay { "SetNoProgressTimeout", PyIBackgroundCopyJob::SetNoProgressTimeout, 1 }, // @pymeth SetNoProgressTimeout|Description of SetNoProgressTimeout { "GetNoProgressTimeout", PyIBackgroundCopyJob::GetNoProgressTimeout, 1 }, // @pymeth GetNoProgressTimeout|Description of GetNoProgressTimeout { "GetErrorCount", PyIBackgroundCopyJob::GetErrorCount, 1 }, // @pymeth GetErrorCount|Description of GetErrorCount { "SetProxySettings", PyIBackgroundCopyJob::SetProxySettings, 1 }, // @pymeth SetProxySettings|Description of SetProxySettings { "GetProxySettings", PyIBackgroundCopyJob::GetProxySettings, 1 }, // @pymeth GetProxySettings|Description of GetProxySettings { "TakeOwnership", PyIBackgroundCopyJob::TakeOwnership, 1 }, // @pymeth TakeOwnership|Description of TakeOwnership { NULL } }; PyComTypeObject PyIBackgroundCopyJob::type("PyIBackgroundCopyJob", &PyIUnknown::type, sizeof(PyIBackgroundCopyJob), PyIBackgroundCopyJob_methods, GET_PYCOM_CTOR(PyIBackgroundCopyJob)); --- NEW FILE: bits.cpp --- # include "Bits.h" # include "PyIBackgroundCopyManager.h" # include "PyIBackgroundCopyCallback.h" # include "PyIBackgroundCopyJob.h" # include "PyIBackgroundCopyJob2.h" # include "PyIBackgroundCopyJob3.h" # include "PyIBackgroundCopyFile.h" # include "PyIBackgroundCopyFile2.h" # include "PyIBackgroundCopyError.h" # include "PyIEnumBackgroundCopyJobs.h" # include "PyIEnumBackgroundCopyFiles.h" # include "PythonCOMRegister.h" // @doc BOOL PyObject_AsBG_FILE_INFO_LIST(PyObject *ob, ULONG *pnum, BG_FILE_INFO **fi) { PyErr_SetString(PyExc_NotImplementedError, "fix me"); return FALSE; } void PyObject_FreeBG_FILE_INFO_LIST(ULONG pnum, BG_FILE_INFO *fi) { } BOOL PyObject_AsBG_FILE_RANGE_LIST(PyObject *ob, DWORD *pnum, BG_FILE_RANGE **fr) { PyErr_SetString(PyExc_NotImplementedError, "fix me"); return FALSE; } void PyObject_FreeBG_FILE_RANGE_LIST(DWORD num, BG_FILE_RANGE *fr) { } PyObject *PyObject_FromBG_FILE_PROGRESS(BG_FILE_PROGRESS *fp) { // @object PyObject_FromBG_FILE_PROGRESS|A tuple of 3 elements (bytesTotal, bytesTransfered, completed), (int, int, bool) return Py_BuildValue("NNO", PyLong_FromLongLong(fp->BytesTotal), PyLong_FromLongLong(fp->BytesTransferred), fp->Completed ? Py_True : Py_False); } PyObject *PyObject_FromBG_JOB_PROGRESS(BG_JOB_PROGRESS *jp) { // @object PyObject_FromBG_JOB_PROGRESS|A tuple of 4 elements (bytesTotal, bytesTransfered, filesTotal, filesTransfered), all ints. return Py_BuildValue("NNkk", PyLong_FromLongLong(jp->BytesTotal), PyLong_FromLongLong(jp->BytesTransferred), jp->FilesTotal, jp->FilesTransferred); } PyObject *PyObject_FromBG_JOB_REPLY_PROGRESS(BG_JOB_REPLY_PROGRESS *jrs) { // @object BG_JOB_REPLY_PROGRESS|A tuple of 2 elements (bytesTotal, bytesTransfered), both ints. return Py_BuildValue("NN", PyLong_FromLongLong(jrs->BytesTotal), PyLong_FromLongLong(jrs->BytesTransferred)); } PyObject *MakeTimeOrNone(const FILETIME &t) { if (t.dwLowDateTime==0 && t.dwHighDateTime==0) { Py_INCREF(Py_None); return Py_None; } return PyWinObject_FromFILETIME(t); } PyObject *PyObject_FromBG_JOB_TIMES(BG_JOB_TIMES *jt) { // @object BG_JOB_TIMES|A tuple of 3 elements, where each element may be // None or a <o PyTime> object. The elements are the CreationTime, // ModificationTime and TransferCompletionTime, respectively. return Py_BuildValue("NNN", MakeTimeOrNone(jt->CreationTime), MakeTimeOrNone(jt->ModificationTime), MakeTimeOrNone(jt->TransferCompletionTime)); } BOOL PyObject_AsBG_AUTH_CREDENTIALS(PyObject *ob, BG_AUTH_CREDENTIALS *pRet) { PyErr_SetString(PyExc_NotImplementedError, "fix me"); return FALSE; } static struct PyMethodDef bits_methods[]= { NULL }; static const PyCom_InterfaceSupportInfo register_data[] = { PYCOM_INTERFACE_CLSID_ONLY ( BackgroundCopyManager ), PYCOM_INTERFACE_CLIENT_ONLY( BackgroundCopyManager ), PYCOM_INTERFACE_SERVER_ONLY( BackgroundCopyCallback ), PYCOM_INTERFACE_CLIENT_ONLY( BackgroundCopyError ), PYCOM_INTERFACE_CLIENT_ONLY( BackgroundCopyJob ), PYCOM_INTERFACE_CLIENT_ONLY( BackgroundCopyJob2 ), PYCOM_INTERFACE_CLIENT_ONLY( BackgroundCopyJob3 ), PYCOM_INTERFACE_CLIENT_ONLY( BackgroundCopyFile ), PYCOM_INTERFACE_CLIENT_ONLY( BackgroundCopyFile2 ), PYCOM_INTERFACE_CLIENT_ONLY( EnumBackgroundCopyJobs ), PYCOM_INTERFACE_CLIENT_ONLY( EnumBackgroundCopyFiles ) }; extern "C" __declspec(dllexport) void initbits() { PyObject *module; module = Py_InitModule("bits", bits_methods); if (module==NULL) return; PyObject *dict = PyModule_GetDict(module); if (dict==NULL) return; // Register all of our interfaces, gateways and IIDs. PyCom_RegisterExtensionSupport(dict, register_data, sizeof(register_data)/sizeof(PyCom_InterfaceSupportInfo)); // auth scheme PyModule_AddIntConstant(module, "BG_AUTH_SCHEME_BASIC", BG_AUTH_SCHEME_BASIC); PyModule_AddIntConstant(module, "BG_AUTH_SCHEME_DIGEST", BG_AUTH_SCHEME_DIGEST); PyModule_AddIntConstant(module, "BG_AUTH_SCHEME_NTLM", BG_AUTH_SCHEME_NTLM); PyModule_AddIntConstant(module, "BG_AUTH_SCHEME_NEGOTIATE", BG_AUTH_SCHEME_NEGOTIATE); PyModule_AddIntConstant(module, "BG_AUTH_SCHEME_PASSPORT", BG_AUTH_SCHEME_PASSPORT); // auth target PyModule_AddIntConstant(module, "BG_AUTH_TARGET_SERVER", BG_AUTH_TARGET_SERVER); PyModule_AddIntConstant(module, "BG_AUTH_TARGET_PROXY", BG_AUTH_TARGET_PROXY); // Requires Vista // // cert store location // PyModule_AddIntConstant(module, "BG_CERT_STORE_LOCATION_CURRENT_USER", BG_CERT_STORE_LOCATION_CURRENT_USER); // PyModule_AddIntConstant(module, "BG_CERT_STORE_LOCATION_LOCAL_MACHINE", BG_CERT_STORE_LOCATION_LOCAL_MACHINE); // PyModule_AddIntConstant(module, "BG_CERT_STORE_LOCATION_CURRENT_SERVICE", BG_CERT_STORE_LOCATION_CURRENT_SERVICE); // PyModule_AddIntConstant(module, "BG_CERT_STORE_LOCATION_SERVICES", BG_CERT_STORE_LOCATION_SERVICES); // PyModule_AddIntConstant(module, "BG_CERT_STORE_LOCATION_USERS", BG_CERT_STORE_LOCATION_USERS); // PyModule_AddIntConstant(module, "BG_CERT_STORE_LOCATION_CURRENT_USER_GROUP_POLICY", BG_CERT_STORE_LOCATION_CURRENT_USER_GROUP_POLICY); // PyModule_AddIntConstant(module, "BG_CERT_STORE_LOCATION_LOCAL_MACHINE_GROUP_POLICY", BG_CERT_STORE_LOCATION_LOCAL_MACHINE_GROUP_POLICY); // PyModule_AddIntConstant(module, "BG_CERT_STORE_LOCATION_LOCAL_MACHINE_ENTERPRISE", BG_CERT_STORE_LOCATION_LOCAL_MACHINE_ENTERPRISE); // error context PyModule_AddIntConstant(module, "BG_ERROR_CONTEXT_NONE", BG_ERROR_CONTEXT_NONE); PyModule_AddIntConstant(module, "BG_ERROR_CONTEXT_UNKNOWN", BG_ERROR_CONTEXT_UNKNOWN); PyModule_AddIntConstant(module, "BG_ERROR_CONTEXT_GENERAL_QUEUE_MANAGER", BG_ERROR_CONTEXT_GENERAL_QUEUE_MANAGER); PyModule_AddIntConstant(module, "BG_ERROR_CONTEXT_QUEUE_MANAGER_NOTIFICATION", BG_ERROR_CONTEXT_QUEUE_MANAGER_NOTIFICATION); PyModule_AddIntConstant(module, "BG_ERROR_CONTEXT_LOCAL_FILE", BG_ERROR_CONTEXT_LOCAL_FILE); PyModule_AddIntConstant(module, "BG_ERROR_CONTEXT_REMOTE_FILE", BG_ERROR_CONTEXT_REMOTE_FILE); PyModule_AddIntConstant(module, "BG_ERROR_CONTEXT_GENERAL_TRANSPORT", BG_ERROR_CONTEXT_GENERAL_TRANSPORT); PyModule_AddIntConstant(module, "BG_ERROR_CONTEXT_REMOTE_APPLICATION", BG_ERROR_CONTEXT_REMOTE_APPLICATION); // job priority PyModule_AddIntConstant(module, "BG_JOB_PRIORITY_FOREGROUND", BG_JOB_PRIORITY_FOREGROUND); PyModule_AddIntConstant(module, "BG_JOB_PRIORITY_HIGH", BG_JOB_PRIORITY_HIGH); PyModule_AddIntConstant(module, "BG_JOB_PRIORITY_NORMAL", BG_JOB_PRIORITY_NORMAL); PyModule_AddIntConstant(module, "BG_JOB_PRIORITY_LOW", BG_JOB_PRIORITY_LOW); // job proxy usage PyModule_AddIntConstant(module, "BG_JOB_PROXY_USAGE_PRECONFIG", BG_JOB_PROXY_USAGE_PRECONFIG); PyModule_AddIntConstant(module, "BG_JOB_PROXY_USAGE_NO_PROXY", BG_JOB_PROXY_USAGE_NO_PROXY); PyModule_AddIntConstant(module, "BG_JOB_PROXY_USAGE_OVERRIDE", BG_JOB_PROXY_USAGE_OVERRIDE); PyModule_AddIntConstant(module, "BG_JOB_PROXY_USAGE_AUTODETECT", BG_JOB_PROXY_USAGE_AUTODETECT); // job state PyModule_AddIntConstant(module, "BG_JOB_STATE_QUEUED", BG_JOB_STATE_QUEUED); PyModule_AddIntConstant(module, "BG_JOB_STATE_CONNECTING", BG_JOB_STATE_CONNECTING); PyModule_AddIntConstant(module, "BG_JOB_STATE_TRANSFERRING", BG_JOB_STATE_TRANSFERRING); PyModule_AddIntConstant(module, "BG_JOB_STATE_SUSPENDED", BG_JOB_STATE_SUSPENDED); PyModule_AddIntConstant(module, "BG_JOB_STATE_ERROR", BG_JOB_STATE_ERROR); PyModule_AddIntConstant(module, "BG_JOB_STATE_TRANSIENT_ERROR", BG_JOB_STATE_TRANSIENT_ERROR); PyModule_AddIntConstant(module, "BG_JOB_STATE_TRANSFERRED", BG_JOB_STATE_TRANSFERRED); PyModule_AddIntConstant(module, "BG_JOB_STATE_ACKNOWLEDGED", BG_JOB_STATE_ACKNOWLEDGED); PyModule_AddIntConstant(module, "BG_JOB_STATE_CANCELLED", BG_JOB_STATE_CANCELLED); // job type PyModule_AddIntConstant(module, "BG_JOB_TYPE_DOWNLOAD", BG_JOB_TYPE_DOWNLOAD); PyModule_AddIntConstant(module, "BG_JOB_TYPE_UPLOAD", BG_JOB_TYPE_UPLOAD); PyModule_AddIntConstant(module, "BG_JOB_TYPE_UPLOAD_REPLY", BG_JOB_TYPE_UPLOAD_REPLY); // notify flags PyModule_AddIntConstant(module, "BG_NOTIFY_JOB_TRANSFERRED", BG_NOTIFY_JOB_TRANSFERRED); PyModule_AddIntConstant(module, "BG_NOTIFY_JOB_ERROR", BG_NOTIFY_JOB_ERROR); PyModule_AddIntConstant(module, "BG_NOTIFY_DISABLE", BG_NOTIFY_DISABLE); PyModule_AddIntConstant(module, "BG_NOTIFY_JOB_MODIFICATION", BG_NOTIFY_JOB_MODIFICATION); // PyModule_AddIntConstant(module, "BG_NOTIFY_FILE_TRANSFERRED", BG_NOTIFY_FILE_TRANSFERRED); PyModule_AddIntConstant(module, "BG_JOB_ENUM_ALL_USERS", BG_JOB_ENUM_ALL_USERS); } --- NEW FILE: PyIBackgroundCopyJob.h --- // This file declares the IBackgroundCopyJob Interface for Python. // Generated by makegw.py // --------------------------------------------------- // // Interface Declaration #pragma once #include "Bits.h" #include "PythonCOM.h" class PyIBackgroundCopyJob : public PyIUnknown { public: MAKE_PYCOM_CTOR(PyIBackgroundCopyJob); static IBackgroundCopyJob *GetI(PyObject *self); static PyComTypeObject type; // The Python methods static PyObject *AddFileSet(PyObject *self, PyObject *args); static PyObject *AddFile(PyObject *self, PyObject *args); static PyObject *EnumFiles(PyObject *self, PyObject *args); static PyObject *Suspend(PyObject *self, PyObject *args); static PyObject *Resume(PyObject *self, PyObject *args); static PyObject *Cancel(PyObject *self, PyObject *args); static PyObject *Complete(PyObject *self, PyObject *args); static PyObject *GetId(PyObject *self, PyObject *args); static PyObject *GetType(PyObject *self, PyObject *args); static PyObject *GetProgress(PyObject *self, PyObject *args); static PyObject *GetTimes(PyObject *self, PyObject *args); static PyObject *GetState(PyObject *self, PyObject *args); static PyObject *GetError(PyObject *self, PyObject *args); static PyObject *GetOwner(PyObject *self, PyObject *args); static PyObject *SetDisplayName(PyObject *self, PyObject *args); static PyObject *GetDisplayName(PyObject *self, PyObject *args); static PyObject *SetDescription(PyObject *self, PyObject *args); static PyObject *GetDescription(PyObject *self, PyObject *args); static PyObject *SetPriority(PyObject *self, PyObject *args); static PyObject *GetPriority(PyObject *self, PyObject *args); static PyObject *SetNotifyFlags(PyObject *self, PyObject *args); static PyObject *GetNotifyFlags(PyObject *self, PyObject *args); static PyObject *SetNotifyInterface(PyObject *self, PyObject *args); static PyObject *GetNotifyInterface(PyObject *self, PyObject *args); static PyObject *SetMinimumRetryDelay(PyObject *self, PyObject *args); static PyObject *GetMinimumRetryDelay(PyObject *self, PyObject *args); static PyObject *SetNoProgressTimeout(PyObject *self, PyObject *args); static PyObject *GetNoProgressTimeout(PyObject *self, PyObject *args); static PyObject *GetErrorCount(PyObject *self, PyObject *args); static PyObject *SetProxySettings(PyObject *self, PyObject *args); static PyObject *GetProxySettings(PyObject *self, PyObject *args); static PyObject *TakeOwnership(PyObject *self, PyObject *args); protected: PyIBackgroundCopyJob(IUnknown *pdisp); ~PyIBackgroundCopyJob(); }; --- NEW FILE: PyIEnumBackgroundCopyFiles.h --- // This file declares the IEnumBackgroundCopyFiles Interface for Python. // Generated by makegw.py // --------------------------------------------------- // // Interface Declaration #include "Bits.h" #include "PythonCOM.h" class PyIEnumBackgroundCopyFiles : public PyIUnknown { public: MAKE_PYCOM_CTOR(PyIEnumBackgroundCopyFiles); static IEnumBackgroundCopyFiles *GetI(PyObject *self); static PyComEnumTypeObject type; // The Python methods static PyObject *Next(PyObject *self, PyObject *args); static PyObject *Skip(PyObject *self, PyObject *args); static PyObject *Reset(PyObject *self, PyObject *args); static PyObject *Clone(PyObject *self, PyObject *args); static PyObject *GetCount(PyObject *self, PyObject *args); protected: PyIEnumBackgroundCopyFiles(IUnknown *pdisp); ~PyIEnumBackgroundCopyFiles(); }; --- NEW FILE: PyIBackgroundCopyFile.cpp --- // This file implements the IBackgroundCopyFile Interface for Python. // Generated by makegw.py #include "bits_pch.h" #include "PyIBackgroundCopyFile.h" // @doc - This file contains autoduck documentation // --------------------------------------------------- // // Interface Implementation PyIBackgroundCopyFile::PyIBackgroundCopyFile(IUnknown *pdisp): PyIUnknown(pdisp) { ob_type = &type; } PyIBackgroundCopyFile::~PyIBackgroundCopyFile() { } /* static */ IBackgroundCopyFile *PyIBackgroundCopyFile::GetI(PyObject *self) { return (IBackgroundCopyFile *)PyIUnknown::GetI(self); } // @pymethod |PyIBackgroundCopyFile|GetRemoteName|Description of GetRemoteName. PyObject *PyIBackgroundCopyFile::GetRemoteName(PyObject *self, PyObject *args) { IBackgroundCopyFile *pIBCF = GetI(self); if ( pIBCF == NULL ) return NULL; if ( !PyArg_ParseTuple(args, ":GetRemoteName") ) return NULL; WCHAR *pVal; HRESULT hr; PY_INTERFACE_PRECALL; hr = pIBCF->GetRemoteName( &pVal ); PY_INTERFACE_POSTCALL; if ( FAILED(hr) ) return PyCom_BuildPyException(hr, pIBCF, IID_IBackgroundCopyFile ); PyObject *ret = PyWinObject_FromWCHAR(pVal); CoTaskMemFree(pVal); return ret; } // @pymethod |PyIBackgroundCopyFile|GetLocalName|Description of GetLocalName. PyObject *PyIBackgroundCopyFile::GetLocalName(PyObject *self, PyObject *args) { IBackgroundCopyFile *pIBCF = GetI(self); if ( pIBCF == NULL ) return NULL; if ( !PyArg_ParseTuple(args, ":GetLocalName") ) return NULL; WCHAR *pVal; HRESULT hr; PY_INTERFACE_PRECALL; hr = pIBCF->GetLocalName( &pVal ); PY_INTERFACE_POSTCALL; if ( FAILED(hr) ) return PyCom_BuildPyException(hr, pIBCF, IID_IBackgroundCopyFile ); PyObject *ret = PyWinObject_FromWCHAR(pVal); CoTaskMemFree(pVal); return ret; } // @pymethod |PyIBackgroundCopyFile|GetProgress|Description of GetProgress. PyObject *PyIBackgroundCopyFile::GetProgress(PyObject *self, PyObject *args) { IBackgroundCopyFile *pIBCF = GetI(self); if ( pIBCF == NULL ) return NULL; if ( !PyArg_ParseTuple(args, ":GetProgress") ) return NULL; HRESULT hr; BG_FILE_PROGRESS val; PY_INTERFACE_PRECALL; hr = pIBCF->GetProgress(&val); PY_INTERFACE_POSTCALL; if ( FAILED(hr) ) return PyCom_BuildPyException(hr, pIBCF, IID_IBackgroundCopyFile ); return PyObject_FromBG_FILE_PROGRESS(&val); } // @object PyIBackgroundCopyFile|Description of the interface static struct PyMethodDef PyIBackgroundCopyFile_methods[] = { { "GetRemoteName", PyIBackgroundCopyFile::GetRemoteName, 1 }, // @pymeth GetRemoteName|Description of GetRemoteName { "GetLocalName", PyIBackgroundCopyFile::GetLocalName, 1 }, // @pymeth GetLocalName|Description of GetLocalName { "GetProgress", PyIBackgroundCopyFile::GetProgress, 1 }, // @pymeth GetProgress|Description of GetProgress { NULL } }; PyComTypeObject PyIBackgroundCopyFile::type("PyIBackgroundCopyFile", &PyIUnknown::type, sizeof(PyIBackgroundCopyFile), PyIBackgroundCopyFile_methods, GET_PYCOM_CTOR(PyIBackgroundCopyFile)); --- NEW FILE: PyIBackgroundCopyManager.h --- // This file declares the IBackgroundCopyManager Interface for Python. // Generated by makegw.py // --------------------------------------------------- // // Interface Declaration #include "Bits.h" #include "PythonCOM.h" class PyIBackgroundCopyManager : public PyIUnknown { public: MAKE_PYCOM_CTOR(PyIBackgroundCopyManager); static IBackgroundCopyManager *GetI(PyObject *self); static PyComTypeObject type; // The Python methods static PyObject *CreateJob(PyObject *self, PyObject *args); static PyObject *GetJob(PyObject *self, PyObject *args); static PyObject *EnumJobs(PyObject *self, PyObject *args); static PyObject *GetErrorDescription(PyObject *self, PyObject *args); protected: PyIBackgroundCopyManager(IUnknown *pdisp); ~PyIBackgroundCopyManager(); }; --- NEW FILE: PyIBackgroundCopyJob2.h --- // This file declares the IBackgroundCopyJob2 Interface for Python. // Generated by makegw.py // --------------------------------------------------- // // Interface Declaration #include "Bits.h" #include "PyIBackgroundCopyJob.h" class PyIBackgroundCopyJob2 : public PyIBackgroundCopyJob { public: MAKE_PYCOM_CTOR(PyIBackgroundCopyJob2); static IBackgroundCopyJob2 *GetI(PyObject *self); static PyComTypeObject type; // The Python methods static PyObject *SetNotifyCmdLine(PyObject *self, PyObject *args); static PyObject *GetNotifyCmdLine(PyObject *self, PyObject *args); static PyObject *GetReplyProgress(PyObject *self, PyObject *args); static PyObject *GetReplyData(PyObject *self, PyObject *args); static PyObject *SetReplyFileName(PyObject *self, PyObject *args); static PyObject *GetReplyFileName(PyObject *self, PyObject *args); static PyObject *SetCredentials(PyObject *self, PyObject *args); protected: PyIBackgroundCopyJob2(IUnknown *pdisp); ~PyIBackgroundCopyJob2(); }; --- NEW FILE: PyIBackgroundCopyJob3.h --- // This file declares the IBackgroundCopyJob3 Interface for Python. // Generated by makegw.py // --------------------------------------------------- // // Interface Declaration class PyIBackgroundCopyJob3 : public PyIBackgroundCopyJob2 { public: MAKE_PYCOM_CTOR(PyIBackgroundCopyJob3); static IBackgroundCopyJob3 *GetI(PyObject *self); static PyComTypeObject type; // The Python methods static PyObject *ReplaceRemotePrefix(PyObject *self, PyObject *args); static PyObject *AddFileWithRanges(PyObject *self, PyObject *args); static PyObject *SetFileACLFlags(PyObject *self, PyObject *args); static PyObject *GetFileACLFlags(PyObject *self, PyObject *args); protected: PyIBackgroundCopyJob3(IUnknown *pdisp); ~PyIBackgroundCopyJob3(); }; --- NEW FILE: PyIBackgroundCopyJob3.cpp --- // This file implements the IBackgroundCopyJob3 Interface for Python. // Generated by makegw.py #include "bits_pch.h" #include "PyIBackgroundCopyJob2.h" #include "PyIBackgroundCopyJob3.h" // @doc - This file contains autoduck documentation // --------------------------------------------------- // // Interface Implementation PyIBackgroundCopyJob3::PyIBackgroundCopyJob3(IUnknown *pdisp): PyIBackgroundCopyJob2(pdisp) { ob_type = &type; } PyIBackgroundCopyJob3::~PyIBackgroundCopyJob3() { } /* static */ IBackgroundCopyJob3 *PyIBackgroundCopyJob3::GetI(PyObject *self) { return (IBackgroundCopyJob3 *)PyIBackgroundCopyJob2::GetI(self); } // @pymethod |PyIBackgroundCopyJob3|ReplaceRemotePrefix|Description of ReplaceRemotePrefix. PyObject *PyIBackgroundCopyJob3::ReplaceRemotePrefix(PyObject *self, PyObject *args) { IBackgroundCopyJob3 *pIBCJ3 = GetI(self); if ( pIBCJ3 == NULL ) return NULL; // @pyparm <o unicode>|OldPrefix||Description for OldPrefix // @pyparm <o unicode>|NewPrefix||Description for NewPrefix PyObject *obOldPrefix; PyObject *obNewPrefix; LPWSTR OldPrefix; LPWSTR NewPrefix; if ( !PyArg_ParseTuple(args, "OO:ReplaceRemotePrefix", &obOldPrefix, &obNewPrefix) ) return NULL; BOOL bPythonIsHappy = TRUE; if (bPythonIsHappy && !PyWinObject_AsBstr(obOldPrefix, &OldPrefix)) bPythonIsHappy = FALSE; if (bPythonIsHappy && !PyWinObject_AsBstr(obNewPrefix, &NewPrefix)) bPythonIsHappy = FALSE; if (!bPythonIsHappy) return NULL; HRESULT hr; PY_INTERFACE_PRECALL; hr = pIBCJ3->ReplaceRemotePrefix( OldPrefix, NewPrefix ); SysFreeString(OldPrefix); SysFreeString(NewPrefix); PY_INTERFACE_POSTCALL; if ( FAILED(hr) ) return PyCom_BuildPyException(hr, pIBCJ3, IID_IBackgroundCopyJob3 ); return PyInt_FromLong(hr); } // @pymethod |PyIBackgroundCopyJob3|AddFileWithRanges|Description of AddFileWithRanges. PyObject *PyIBackgroundCopyJob3::AddFileWithRanges(PyObject *self, PyObject *args) { IBackgroundCopyJob3 *pIBCJ3 = GetI(self); if ( pIBCJ3 == NULL ) return NULL; // @pyparm <o unicode>|RemoteUrl||Description for RemoteUrl // @pyparm <o unicode>|LocalName||Description for LocalName BG_FILE_RANGE *Ranges; PyObject *obRanges; // @pyparm <o PyBG_FILE_RANGE>|Ranges||Description for Ranges PyObject *obRemoteUrl; PyObject *obLocalName; LPWSTR RemoteUrl; LPWSTR LocalName; if ( !PyArg_ParseTuple(args, "OOO:AddFileWithRanges", &obRemoteUrl, &obLocalName, &obRanges) ) return NULL; DWORD RangeCount; BOOL bPythonIsHappy = TRUE; if (bPythonIsHappy && !PyWinObject_AsBstr(obRemoteUrl, &RemoteUrl)) bPythonIsHappy = FALSE; if (bPythonIsHappy && !PyWinObject_AsBstr(obLocalName, &LocalName)) bPythonIsHappy = FALSE; if (bPythonIsHappy && !PyObject_AsBG_FILE_RANGE_LIST( obRanges, &RangeCount, &Ranges )) bPythonIsHappy = FALSE; if (!bPythonIsHappy) return NULL; HRESULT hr; PY_INTERFACE_PRECALL; hr = pIBCJ3->AddFileWithRanges( RemoteUrl, LocalName, RangeCount, Ranges ); SysFreeString(RemoteUrl); SysFreeString(LocalName); PyObject_FreeBG_FILE_RANGE_LIST(RangeCount, Ranges); PY_INTERFACE_POSTCALL; if ( FAILED(hr) ) return PyCom_BuildPyException(hr, pIBCJ3, IID_IBackgroundCopyJob3 ); return PyInt_FromLong(hr); } // @pymethod |PyIBackgroundCopyJob3|SetFileACLFlags|Description of SetFileACLFlags. PyObject *PyIBackgroundCopyJob3::SetFileACLFlags(PyObject *self, PyObject *args) { IBackgroundCopyJob3 *pIBCJ3 = GetI(self); if ( pIBCJ3 == NULL ) return NULL; // @pyparm int|Flags||Description for Flags DWORD Flags; if ( !PyArg_ParseTuple(args, "l:SetFileACLFlags", &Flags) ) return NULL; HRESULT hr; PY_INTERFACE_PRECALL; hr = pIBCJ3->SetFileACLFlags( Flags ); PY_INTERFACE_POSTCALL; if ( FAILED(hr) ) return PyCom_BuildPyException(hr, pIBCJ3, IID_IBackgroundCopyJob3 ); return PyInt_FromLong(hr); } // @pymethod |PyIBackgroundCopyJob3|GetFileACLFlags|Description of GetFileACLFlags. PyObject *PyIBackgroundCopyJob3::GetFileACLFlags(PyObject *self, PyObject *args) { IBackgroundCopyJob3 *pIBCJ3 = GetI(self); if ( pIBCJ3 == NULL ) return NULL; if ( !PyArg_ParseTuple(args, ":GetFileACLFlags") ) return NULL; HRESULT hr; DWORD Flags; PY_INTERFACE_PRECALL; hr = pIBCJ3->GetFileACLFlags( &Flags ); PY_INTERFACE_POSTCALL; if ( FAILED(hr) ) return PyCom_BuildPyException(hr, pIBCJ3, IID_IBackgroundCopyJob3 ); return PyLong_FromUnsignedLongLong(Flags); } // @object PyIBackgroundCopyJob3|Description of the interface static struct PyMethodDef PyIBackgroundCopyJob3_methods[] = { { "ReplaceRemotePrefix", PyIBackgroundCopyJob3::ReplaceRemotePrefix, 1 }, // @pymeth ReplaceRemotePrefix|Description of ReplaceRemotePrefix { "AddFileWithRanges", PyIBackgroundCopyJob3::AddFileWithRanges, 1 }, // @pymeth AddFileWithRanges|Description of AddFileWithRanges { "SetFileACLFlags", PyIBackgroundCopyJob3::SetFileACLFlags, 1 }, // @pymeth SetFileACLFlags|Description of SetFileACLFlags { "GetFileACLFlags", PyIBackgroundCopyJob3::GetFileACLFlags, 1 }, // @pymeth GetFileACLFlags|Description of GetFileACLFlags { NULL } }; PyComTypeObject PyIBackgroundCopyJob3::type("PyIBackgroundCopyJob3", &PyIBackgroundCopyJob2::type, sizeof(PyIBackgroundCopyJob3), PyIBackgroundCopyJob3_methods, GET_PYCOM_CTOR(PyIBackgroundCopyJob3)); --- NEW FILE: PyIBackgroundCopyJob2.cpp --- // This file implements the IBackgroundCopyJob2 Interface for Python. // Generated by makegw.py #include "bits_pch.h" #include "PyIBackgroundCopyJob.h" #include "PyIBackgroundCopyJob2.h" // @doc - This file contains autoduck documentation // --------------------------------------------------- // // Interface Implementation PyIBackgroundCopyJob2::PyIBackgroundCopyJob2(IUnknown *pdisp): PyIBackgroundCopyJob(pdisp) { ob_type = &type; } PyIBackgroundCopyJob2::~PyIBackgroundCopyJob2() { } /* static */ IBackgroundCopyJob2 *PyIBackgroundCopyJob2::GetI(PyObject *self) { return (IBackgroundCopyJob2 *)PyIBackgroundCopyJob::GetI(self); } // @pymethod |PyIBackgroundCopyJob2|SetNotifyCmdLine|Description of SetNotifyCmdLine. PyObject *PyIBackgroundCopyJob2::SetNotifyCmdLine(PyObject *self, PyObject *args) { IBackgroundCopyJob2 *pIBCJ2 = GetI(self); if ( pIBCJ2 == NULL ) return NULL; // @pyparm <o unicode>|Program||Description for Program // @pyparm <o unicode>|Parameters||Description for Parameters PyObject *obProgram; PyObject *obParameters; LPWSTR Program; LPWSTR Parameters; if ( !PyArg_ParseTuple(args, "OO:SetNotifyCmdLine", &obProgram, &obParameters) ) return NULL; BOOL bPythonIsHappy = TRUE; if (bPythonIsHappy && !PyWinObject_AsBstr(obProgram, &Program)) bPythonIsHappy = FALSE; if (bPythonIsHappy && !PyWinObject_AsBstr(obParameters, &Parameters)) bPythonIsHappy = FALSE; if (!bPythonIsHappy) return NULL; HRESULT hr; PY_INTERFACE_PRECALL; hr = pIBCJ2->SetNotifyCmdLine( Program, Parameters ); SysFreeString(Program); SysFreeString(Parameters); PY_INTERFACE_POSTCALL; if ( FAILED(hr) ) return PyCom_BuildPyException(hr, pIBCJ2, IID_IBackgroundCopyJob2 ); Py_INCREF(Py_None); return Py_None; } // @pymethod |PyIBackgroundCopyJob2|GetNotifyCmdLine|Description of GetNotifyCmdLine. PyObject *PyIBackgroundCopyJob2::GetNotifyCmdLine(PyObject *self, PyObject *args) { IBackgroundCopyJob2 *pIBCJ2 = GetI(self); if ( pIBCJ2 == NULL ) return NULL; if ( !PyArg_ParseTuple(args, ":GetNotifyCmdLine") ) return NULL; LPWSTR pProgram; LPWSTR pParameters; HRESULT hr; PY_INTERFACE_PRECALL; hr = pIBCJ2->GetNotifyCmdLine( &pProgram, &pParameters ); PY_INTERFACE_POSTCALL; if ( FAILED(hr) ) return PyCom_BuildPyException(hr, pIBCJ2, IID_IBackgroundCopyJob2 ); PyObject *ret = Py_BuildValue("NN", PyWinObject_FromWCHAR(pProgram), PyWinObject_FromWCHAR(pParameters)); CoTaskMemFree(pProgram); CoTaskMemFree(pParameters); return ret; } // @pymethod |PyIBackgroundCopyJob2|GetReplyProgress|Description of GetReplyProgress. PyObject *PyIBackgroundCopyJob2::GetReplyProgress(PyObject *self, PyObject *args) { IBackgroundCopyJob2 *pIBCJ2 = GetI(self); if ( pIBCJ2 == NULL ) return NULL; if ( !PyArg_ParseTuple(args, ":GetReplyProgress") ) return NULL; HRESULT hr; BG_JOB_REPLY_PROGRESS progress; PY_INTERFACE_PRECALL; hr = pIBCJ2->GetReplyProgress( &progress ); PY_INTERFACE_POSTCALL; if ( FAILED(hr) ) return PyCom_BuildPyException(hr, pIBCJ2, IID_IBackgroundCopyJob2 ); return PyObject_FromBG_JOB_REPLY_PROGRESS(&progress); } // @pymethod |PyIBackgroundCopyJob2|GetReplyData|Description of GetReplyData. PyObject *PyIBackgroundCopyJob2::GetReplyData(PyObject *self, PyObject *args) { IBackgroundCopyJob2 *pIBCJ2 = GetI(self); if ( pIBCJ2 == NULL ) return NULL; byte *pBuffer; UINT64 length; if ( !PyArg_ParseTuple(args, ":GetReplyData") ) return NULL; HRESULT hr; PY_INTERFACE_PRECALL; hr = pIBCJ2->GetReplyData( &pBuffer, &length ); PY_INTERFACE_POSTCALL; if ( FAILED(hr) ) return PyCom_BuildPyException(hr, pIBCJ2, IID_IBackgroundCopyJob2 ); PyObject *ret; if (pBuffer == NULL) { ret = Py_None; Py_INCREF(ret); } else { // MS docs the max size is 1MB - so why use an int64? ret = PyString_FromStringAndSize((char *)pBuffer, (Py_ssize_t)length); CoTaskMemFree(pBuffer); } return ret; } // @pymethod |PyIBackgroundCopyJob2|SetReplyFileName|Description of SetReplyFileName. PyObject *PyIBackgroundCopyJob2::SetReplyFileName(PyObject *self, PyObject *args) { IBackgroundCopyJob2 *pIBCJ2 = GetI(self); if ( pIBCJ2 == NULL ) return NULL; // @pyparm <o unicode>|ReplyFileName||Description for ReplyFileName PyObject *obReplyFileName; LPWSTR ReplyFileName; if ( !PyArg_ParseTuple(args, "O:SetReplyFileName", &obReplyFileName) ) return NULL; if (!PyWinObject_AsBstr(obReplyFileName, &ReplyFileName)) return NULL; HRESULT hr; PY_INTERFACE_PRECALL; hr = pIBCJ2->SetReplyFileName( ReplyFileName ); SysFreeString(ReplyFileName); PY_INTERFACE_POSTCALL; if ( FAILED(hr) ) return PyCom_BuildPyException(hr, pIBCJ2, IID_IBackgroundCopyJob2 ); Py_INCREF(Py_None); return Py_None; } // @pymethod |PyIBackgroundCopyJob2|GetReplyFileName|Description of GetReplyFileName. PyObject *PyIBackgroundCopyJob2::GetReplyFileName(PyObject *self, PyObject *args) { IBackgroundCopyJob2 *pIBCJ2 = GetI(self); if ( pIBCJ2 == NULL ) return NULL; if ( !PyArg_ParseTuple(args, ":GetReplyFileName") ) return NULL; HRESULT hr; WCHAR *rfn; PY_INTERFACE_PRECALL; hr = pIBCJ2->GetReplyFileName(&rfn); PY_INTERFACE_POSTCALL; if ( FAILED(hr) ) return PyCom_BuildPyException(hr, pIBCJ2, IID_IBackgroundCopyJob2 ); PyObject *ret = PyWinObject_FromWCHAR(rfn); CoTaskMemFree(rfn); return ret; } // @pymethod |PyIBackgroundCopyJob2|SetCredentials|Description of SetCredentials. PyObject *PyIBackgroundCopyJob2::SetCredentials(PyObject *self, PyObject *args) { IBackgroundCopyJob2 *pIBCJ2 = GetI(self); if ( pIBCJ2 == NULL ) return NULL; // @pyparm <o BG_AUTH_CREDENTIALS>|creds||Description for creds PyObject *obCreds; if ( !PyArg_ParseTuple(args, "O:SetCredentials", &obCreds) ) return NULL; BG_AUTH_CREDENTIALS creds; if (!PyObject_AsBG_AUTH_CREDENTIALS(obCreds, &creds)) return NULL; HRESULT hr; PY_INTERFACE_PRECALL; hr = pIBCJ2->SetCredentials(&creds); PY_INTERFACE_POSTCALL; if ( FAILED(hr) ) return PyCom_BuildPyException(hr, pIBCJ2, IID_IBackgroundCopyJob2 ); Py_INCREF(Py_None); return Py_None; } // @object PyIBackgroundCopyJob2|Description of the interface static struct PyMethodDef PyIBackgroundCopyJob2_methods[] = { { "SetNotifyCmdLine", PyIBackgroundCopyJob2::SetNotifyCmdLine, 1 }, // @pymeth SetNotifyCmdLine|Description of SetNotifyCmdLine { "GetNotifyCmdLine", PyIBackgroundCopyJob2::GetNotifyCmdLine, 1 }, // @pymeth GetNotifyCmdLine|Description of GetNotifyCmdLine { "GetReplyProgress", PyIBackgroundCopyJob2::GetReplyProgress, 1 }, // @pymeth GetReplyProgress|Description of GetReplyProgress { "GetReplyData", PyIBackgroundCopyJob2::GetReplyData, 1 }, // @pymeth GetReplyData|Description of GetReplyData { "SetReplyFileName", PyIBackgroundCopyJob2::SetReplyFileName, 1 }, // @pymeth SetReplyFileName|Description of SetReplyFileName { "GetReplyFileName", PyIBackgroundCopyJob2::GetReplyFileName, 1 }, // @pymeth GetReplyFileName|Description of GetReplyFileName { "SetCredentials", PyIBackgroundCopyJob2::SetCredentials, 1 }, // @pymeth SetCredentials|Description of SetCredentials { NULL } }; PyComTypeObject PyIBackgroundCopyJob2::type("PyIBackgroundCop... [truncated message content] |
From: Sidnei da S. <dre...@us...> - 2008-02-12 00:10:53
|
Update of /cvsroot/pywin32/pywin32/com/win32comext/bits In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3887/com/win32comext/bits Added Files: __init__.py Log Message: - Merge sidnei-bits branch, adds support for BITS (Background Intelligent Transfer Service) --- NEW FILE: __init__.py --- # This is a python package # __PackageSupportBuildPath__ not needed for distutil based builds, # but not everyone is there yet. import win32com win32com.__PackageSupportBuildPath__(__path__) |
From: Sidnei da S. <dre...@us...> - 2008-02-11 23:30:20
|
Update of /cvsroot/pywin32/pywin32 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21744 Modified Files: Tag: sidnei-bits CHANGES.txt setup.py Log Message: - Include demos. Document the addition of win32com.bits Index: setup.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/setup.py,v retrieving revision 1.64.2.3 retrieving revision 1.64.2.4 diff -C2 -d -r1.64.2.3 -r1.64.2.4 *** setup.py 6 Feb 2008 09:10:25 -0000 1.64.2.3 --- setup.py 11 Feb 2008 23:30:23 -0000 1.64.2.4 *************** *** 1772,1775 **** --- 1772,1776 ---- 'com/win32comext/ifilter/demo/*.py', 'com/win32comext/authorization/demos/*.py', + 'com/win32comext/bits/test/*.py', 'isapi/*.txt', 'isapi/samples/*.py', Index: CHANGES.txt =================================================================== RCS file: /cvsroot/pywin32/pywin32/CHANGES.txt,v retrieving revision 1.14 retrieving revision 1.14.2.1 diff -C2 -d -r1.14 -r1.14.2.1 *** CHANGES.txt 15 Jan 2008 00:19:10 -0000 1.14 --- CHANGES.txt 11 Feb 2008 23:30:23 -0000 1.14.2.1 *************** *** 21,24 **** --- 21,30 ---- * com related changes: + - win32com.bits: Sidnei da Silva from Enfold Systems added support for + BITS (Background Intelligent Transfer Service). Not fully complete + (missing Ranges-related APIs and a couple others) but the basic + functionality is in place. See the demos in + win32comext/bits/test/*.py + - makepy accepts a program id to process its typelib and generates long integer literals for constants > sys.maxint. The way typelibs are generated *************** *** 54,58 **** * PyIExtractImage by Steven James. * PyIEmptyVolumecache, IEmptyVolumeCache2, IEmptyVolumeCacheCallBack by ! Sidnei da Silva from Enfold. * IsUserAnAdmin * More coverage of the shell interfaces and demos. --- 60,64 ---- * PyIExtractImage by Steven James. * PyIEmptyVolumecache, IEmptyVolumeCache2, IEmptyVolumeCacheCallBack by ! Sidnei da Silva from Enfold Systems. * IsUserAnAdmin * More coverage of the shell interfaces and demos. |
From: Mark H. <mha...@us...> - 2008-02-11 00:35:54
|
Update of /cvsroot/pywin32/pywin32/AutoDuck In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14871 Modified Files: README pywin32.mak Log Message: * Revert change that removed pywin docs as Roger pointed out he doesn't see the crash, and I also don't on another box. * Don't bother building the .hlp file to save build complications on boxes with only recent dev tools where hcw isn't available. Index: README =================================================================== RCS file: /cvsroot/pywin32/pywin32/AutoDuck/README,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** README 9 Feb 2008 05:31:04 -0000 1.3 --- README 11 Feb 2008 00:35:55 -0000 1.4 *************** *** 2,24 **** Main focus these days is on the .chm file - a single .chm ! provides the best documentation solution. ! ! ! Note: Jan-2008: We seem to have hit a hhc wall. Trial and error shows ! that once at the point shown below, adding a single new '@pymeth' anywhere ! will cause death (a single @pymeth seems to create 4 new 'local links') ! ! The max successful build I got was: ! ! 9,609 Topics ! 30,629 Local links ! 836 Internet links ! ! I've removed the win32ui module from the autoduck build and we ! are now at the figures below - so the problem still appears to ! loom... ! ! Compile time: 1 minute, 21 seconds ! 7,860 Topics ! 23,712 Local links ! 830 Internet links --- 2,5 ---- Main focus these days is on the .chm file - a single .chm ! provides the best documentation solution. We don't even ! build a .hlp file anymore. Index: pywin32.mak =================================================================== RCS file: /cvsroot/pywin32/pywin32/AutoDuck/pywin32.mak,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** pywin32.mak 9 Feb 2008 05:31:04 -0000 1.17 --- pywin32.mak 11 Feb 2008 00:35:55 -0000 1.18 *************** *** 89,97 **** $(GENDIR)\PyIDsObjectPicker.d \ - # ack - have hit some kind of htmlhelp wall, so we drop win32ui docs - see README for more. - #PYTHONWIN_SOURCE = \ - # $(PYTHONWIN_DIR)\contents.d $(PYTHONWIN_DIR)\*.cpp $(PYTHONWIN_DIR)\*.h PYTHONWIN_SOURCE = \ ! $(PYTHONWIN_DIR)\contents.d ISAPI_SOURCE = \ --- 89,94 ---- $(GENDIR)\PyIDsObjectPicker.d \ PYTHONWIN_SOURCE = \ ! $(PYTHONWIN_DIR)\contents.d $(PYTHONWIN_DIR)\*.cpp $(PYTHONWIN_DIR)\*.h ISAPI_SOURCE = \ *************** *** 105,109 **** # Help and Doc targets ! all: help htmlhlp help : $(GENDIR) "..\$(TARGET).hlp" --- 102,106 ---- # Help and Doc targets ! all: htmlhlp help : $(GENDIR) "..\$(TARGET).hlp" |
From: Mark H. <mha...@us...> - 2008-02-11 00:28:30
|
Update of /cvsroot/pywin32/pywin32/com/win32comext/shell/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12653 Modified Files: shell.cpp Log Message: autoduck Index: shell.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32comext/shell/src/shell.cpp,v retrieving revision 1.62 retrieving revision 1.63 diff -C2 -d -r1.62 -r1.63 *** shell.cpp 8 Feb 2008 22:32:29 -0000 1.62 --- shell.cpp 11 Feb 2008 00:28:33 -0000 1.63 *************** *** 2483,2487 **** } ! // @pymethod (o PyIShellView|shell|SHCreateShellFolderView| static PyObject *PySHCreateShellFolderView(PyObject *self, PyObject *args) { --- 2483,2487 ---- } ! // @pymethod <o PyIShellView>|shell|SHCreateShellFolderView|Creates a new instance of the default Shell folder view object. static PyObject *PySHCreateShellFolderView(PyObject *self, PyObject *args) { *************** *** 2686,2690 **** } ! // @pymethod <o PyIShellItemArray>|shell|SHCreateShellItemArray| static PyObject *PySHCreateShellItemArray(PyObject *self, PyObject *args) { --- 2686,2690 ---- } ! // @pymethod <o PyIShellItemArray>|shell|SHCreateShellItemArray|Creates a Shell item array object. static PyObject *PySHCreateShellItemArray(PyObject *self, PyObject *args) { *************** *** 2876,2881 **** { "SHCreateDefaultContextMenu", PySHCreateDefaultContextMenu, 1}, // @pymeth SHCreateDefaultContextMenu| { "SHCreateDefaultExtractIcon", PySHCreateDefaultExtractIcon, 1}, // @pymeth SHCreateDefaultExtractIcon|Creates a standard icon extractor, whose defaults can be further configured via the IDefaultExtractIconInit interface. ! { "SHCreateShellFolderView", PySHCreateShellFolderView, 1}, // @pymeth SHCreateShellFolderView| ! { "SHCreateShellItemArray", PySHCreateShellItemArray, 1}, // @pymeth SHCreateShellItemArray| { "SHCreateShellItemArrayFromDataObject", PySHCreateShellItemArrayFromDataObject, 1}, // @pymeth SHCreateShellItemArrayFromDataObject| { "SHCreateShellItemArrayFromIDLists", PySHCreateShellItemArrayFromIDLists, 1}, // @pymeth SHCreateShellItemArrayFromIDLists| --- 2876,2881 ---- { "SHCreateDefaultContextMenu", PySHCreateDefaultContextMenu, 1}, // @pymeth SHCreateDefaultContextMenu| { "SHCreateDefaultExtractIcon", PySHCreateDefaultExtractIcon, 1}, // @pymeth SHCreateDefaultExtractIcon|Creates a standard icon extractor, whose defaults can be further configured via the IDefaultExtractIconInit interface. ! { "SHCreateShellFolderView", PySHCreateShellFolderView, 1}, // @pymeth SHCreateShellFolderView|Creates a new instance of the default Shell folder view object. ! { "SHCreateShellItemArray", PySHCreateShellItemArray, 1}, // @pymeth SHCreateShellItemArray|Creates a Shell item array object. { "SHCreateShellItemArrayFromDataObject", PySHCreateShellItemArrayFromDataObject, 1}, // @pymeth SHCreateShellItemArrayFromDataObject| { "SHCreateShellItemArrayFromIDLists", PySHCreateShellItemArrayFromIDLists, 1}, // @pymeth SHCreateShellItemArrayFromIDLists| |
From: Mark H. <mha...@us...> - 2008-02-10 23:56:31
|
Update of /cvsroot/pywin32/pywin32 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1136 Modified Files: setup.py Log Message: New comment and pass DIR_PYTHON macro to scintilla build process. Index: setup.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/setup.py,v retrieving revision 1.66 retrieving revision 1.67 diff -C2 -d -r1.66 -r1.67 *** setup.py 10 Feb 2008 10:02:09 -0000 1.66 --- setup.py 10 Feb 2008 23:56:33 -0000 1.67 *************** *** 692,695 **** --- 692,697 ---- break else: + # XXX - the below can probably go now - the problem was the + # sdkddkver.h issue already solved above. if is_64bit: # *sob* *************** *** 759,762 **** --- 761,765 ---- makeargs.append("SUB_DIR_O=%s" % build_temp) makeargs.append("SUB_DIR_BIN=%s" % build_temp) + makeargs.append("DIR_PYTHON=%s" % sys.prefix) if is_64bit and get_build_version() < 8.0: makeargs.append("LINK=bufferoverflowU.lib") |
From: Mark H. <mha...@us...> - 2008-02-10 23:51:24
|
Update of /cvsroot/pywin32/pywin32/com/win32comext/ifilter/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31538/com/win32comext/ifilter/src Modified Files: stdafx.h Log Message: Give up in disgust trying to get IFilter to suck the 3 prototypes we need from the various SDKs etc, so just declare them ourselves. Index: stdafx.h =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32comext/ifilter/src/stdafx.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** stdafx.h 22 Jun 2004 00:53:56 -0000 1.1 --- stdafx.h 10 Feb 2008 23:51:28 -0000 1.2 *************** *** 12,16 **** --- 12,36 ---- #include <Filter.h> #include <Filterr.h> + + #define MISSING_PROPSTG + #ifdef MISSING_PROPSTG + // Ack - NTQuery.h is failing with the Vista SDK - pull in what we need + // Problem is missing propstg.h, and all the work-arounds are uglier than + // just these 3 prototypes. + // See http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=508254&SiteID=1 + + STDAPI LoadIFilter( PCWSTR pwcsPath, + __in IUnknown * pUnkOuter, + __deref_out void ** ppIUnk ); + STDAPI BindIFilterFromStorage(__in IStorage * pStg, + __in IUnknown * pUnkOuter, + __deref_out void ** ppIUnk ); + + STDAPI BindIFilterFromStream(__in IStream * pStm, + __in IUnknown * pUnkOuter, + __deref_out void ** ppIUnk ); + #else #include <ntquery.h> + #endif #include <windows.h> |
From: Mark H. <mha...@us...> - 2008-02-10 13:46:55
|
Update of /cvsroot/pywin32/pywin32/win32/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7953 Modified Files: PyLARGE_INTEGER.cpp PyUnicode.cpp Log Message: Remove support for PYWIN_USE_PYUNICODE, MS_WINCE, NO_PYWINTYPES_BSTR and PYWIN_NO_PYTHON_LONG_LONG Index: PyUnicode.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/src/PyUnicode.cpp,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -d -r1.26 -r1.27 *** PyUnicode.cpp 6 Feb 2008 18:37:46 -0000 1.26 --- PyUnicode.cpp 10 Feb 2008 13:46:57 -0000 1.27 *************** *** 8,15 **** #include "malloc.h" #include "tchar.h" - - #ifndef MS_WINCE #include "locale.h" - #endif // @object PyUnicode|A Python object, representing a Unicode string. --- 8,12 ---- *************** *** 21,26 **** // a string must be passed a string. - #ifndef MS_WINCE - BOOL PyWinObject_AsPfnAllocatedWCHAR(PyObject *stringObject, void *(*pfnAllocator)(ULONG), WCHAR **ppResult, BOOL bNoneOK /*= FALSE*/,DWORD *pResultLen /*= NULL*/) { --- 18,21 ---- *************** *** 43,53 **** } else if (PyUnicode_Check(stringObject)) { // copy the value, including embedded NULLs - #if defined(PYWIN_USE_PYUNICODE) WCHAR *v = (WCHAR *)PyUnicode_AS_UNICODE(stringObject); UINT cch = PyUnicode_GET_SIZE(stringObject); - #else - WCHAR *v = ((PyUnicode *)stringObject)->m_bstrValue; - UINT cch = SysStringLen(v); - #endif *ppResult = (WCHAR *)pfnAllocator((cch+1) * sizeof(WCHAR)); if (*ppResult) --- 38,43 ---- *************** *** 90,97 **** } - #endif /* MS_WINCE */ - - #if defined(PYWIN_USE_PYUNICODE) - /* Implement our Windows Unicode API using the Python widestring object */ PyObject *PyUnicodeObject_FromString(const char *string) --- 80,83 ---- *************** *** 263,267 **** } - #ifndef NO_PYWINTYPES_BSTR PyObject *PyWinObject_FromBstr(const BSTR bstr, BOOL takeOwnership /*=FALSE*/) { --- 249,252 ---- *************** *** 274,880 **** return ret; } - #endif // NO_PYWINTYPES_BSTR - - #else /* not PYWIN_USE_PYUNICODE */ - - PyObject *PyString_FromUnicode( const OLECHAR *str ) - { - char *buf; - if (str==NULL) { - Py_INCREF(Py_None); - return Py_None; - } - if (!PyWin_WCHAR_AsString((OLECHAR *)str, -1, &buf)) - return NULL; - PyObject *ret = PyString_FromString(buf); - PyWinObject_FreeString(buf); - return ret; - } - - PyObject *PyUnicodeObject_FromString(const char *string) - { - return new PyUnicode(string); - } - - int PyUnicode_Size(PyObject *op) - { - if (!PyUnicode_Check(op)) { - PyErr_BadInternalCall(); - return -1; - } - return PyUnicode::lengthFunc((PyUnicode *)op); - } - - // Moved to a #define as it clashes with the new standard Python function - /** - WCHAR *PyUnicode_AsUnicode(PyObject *op) - { - return ((PyUnicode *)op)->m_bstrValue; - } - **/ - - - // Convert a WCHAR string to "char *" - // If len is known, pass it, else -1 - // NOTE - string must be freed with PyWinObject_FreeString - BOOL PyWin_WCHAR_AsString(WCHAR *input, DWORD inLen, char **pResult) - { - if (inLen==-1) - inLen = wcslen(input); - // convert from string len to include terminator. - inLen++; - char *buf = (char *)PyMem_Malloc(inLen); - - DWORD len = WideCharToMultiByte(CP_ACP, 0, input, inLen, buf, inLen, NULL, NULL); - if (len==0) { - PyMem_Free(buf); - PyWin_SetAPIError("WideCharToMultiByte"); - return FALSE; - } - *pResult = buf; - return TRUE; - } - - BOOL PyWin_Bstr_AsString(BSTR input, char **pResult) - { - DWORD wideSize = SysStringLen(input); - return PyWin_WCHAR_AsString(input, wideSize, pResult); - } - - // Convert a Python object to a "char *" - allow embedded NULLs, None, etc. - BOOL PyWinObject_AsString(PyObject *stringObject, char **pResult, BOOL bNoneOK /*= FALSE*/, DWORD *pResultLen /* = NULL */) - { - int strLen; - BOOL rc = TRUE; - if (PyString_Check(stringObject)) { - strLen = PyString_Size(stringObject); - *pResult = (char *)PyMem_Malloc((strLen + 1) * sizeof(char)); - if (*pResult==NULL) { - PyErr_SetString(PyExc_MemoryError, "copying string"); - return FALSE; - } - memcpy(*pResult, PyString_AsString(stringObject), strLen); - (*pResult)[strLen] = '\0'; - } else if (PyUnicode_Check(stringObject)) { - strLen = SysStringLen(((PyUnicode *)stringObject)->m_bstrValue); - rc = PyWin_Bstr_AsString(((PyUnicode *)stringObject)->m_bstrValue, pResult); - } else if (stringObject == Py_None) { - strLen = 0; - if (bNoneOK) { - *pResult = NULL; - } else { - PyErr_SetString(PyExc_TypeError, "None is not a valid string in this context"); - rc = FALSE; - } - } else { - const char *tp_name = stringObject && stringObject->ob_type ? stringObject->ob_type->tp_name : "<NULL!!>"; - PyErr_Format(PyExc_TypeError, "Objects of type '%s' can not be converted to Unicode.", tp_name); - rc = FALSE; - } - if (rc && !pResult) { - PyErr_SetString(PyExc_MemoryError, "Allocating string"); - return FALSE; - } - if (rc && pResultLen) *pResultLen = strLen; - return rc; - } - - void PyWinObject_FreeString(char *str) - { - PyMem_Free(str); - } - - - - // PyWinObject_FromBstr - convert a BSTR into a Python string. - // - // ONLY USE THIS FOR TRUE BSTR's - Use the fn below for OLECHAR *'s. - // NOTE - does not use standard macros, so NULLs get through! - PyObject *PyWinObject_FromBstr(const BSTR bstr, BOOL takeOwnership/*=FALSE*/) - { - if (bstr==NULL) { - Py_INCREF(Py_None); - return Py_None; - } - return new PyUnicode(bstr, takeOwnership); - } - - // Size info is available (eg, a fn returns a string and also fills in a size variable) - PyObject *PyWinObject_FromOLECHAR(const OLECHAR * str, int numChars) - { - if (str==NULL) { - Py_INCREF(Py_None); - return Py_None; - } - return new PyUnicode(str, numChars); - } - - // No size info avail. - PyObject *PyWinObject_FromOLECHAR(const OLECHAR * str) - { - if (str==NULL) { - Py_INCREF(Py_None); - return Py_None; - } - return new PyUnicode(str); - } - - static PySequenceMethods PyUnicode_SequenceMethods = { - (inquiry)PyUnicode::lengthFunc, /*sq_length*/ - (binaryfunc)PyUnicode::concatFunc, /*sq_concat*/ - (intargfunc)PyUnicode::repeatFunc, /*sq_repeat*/ - (intargfunc)PyUnicode::itemFunc, /*sq_item*/ - (intintargfunc)PyUnicode::sliceFunc, /*sq_slice*/ - 0, /*sq_ass_item*/ - 0, /*sq_ass_slice*/ - }; - - PYWINTYPES_EXPORT PyTypeObject PyUnicodeType = - { - PyObject_HEAD_INIT(&PyType_Type) - 0, - "PyUnicode", - sizeof(PyUnicode), - 0, - PyUnicode::deallocFunc, /* tp_dealloc */ - PyUnicode::printFunc, /* tp_print */ - PyUnicode::getattrFunc, /* tp_getattr */ - 0, /* tp_setattr */ - PyUnicode::compareFunc, /* tp_compare */ - PyUnicode::reprFunc, /* tp_repr */ - 0, /* tp_as_number */ - &PyUnicode_SequenceMethods, /* tp_as_sequence */ - 0, /* tp_as_mapping */ - PyUnicode::hashFunc, /* tp_hash */ - 0, /* tp_call */ - PyUnicode::strFunc, /* tp_str */ - }; - - PyUnicode::PyUnicode(void) - { - ob_type = &PyUnicodeType; - _Py_NewReference(this); - - m_bstrValue = NULL; - } - - PyUnicode::PyUnicode(const char *value) - { - ob_type = &PyUnicodeType; - _Py_NewReference(this); - m_bstrValue = PyWin_String_AsBstr(value); - } - - PyUnicode::PyUnicode(const char *value, unsigned int numBytes) - { - ob_type = &PyUnicodeType; - _Py_NewReference(this); - - m_bstrValue = SysAllocStringByteLen(value, numBytes); - } - - PyUnicode::PyUnicode(const OLECHAR *value) - { - ob_type = &PyUnicodeType; - _Py_NewReference(this); - - m_bstrValue = SysAllocString(value); - } - - PyUnicode::PyUnicode(const OLECHAR *value, int numChars) - { - ob_type = &PyUnicodeType; - _Py_NewReference(this); - - m_bstrValue = SysAllocStringLen(value, numChars); - } - - PyUnicode::PyUnicode(const BSTR value, BOOL takeOwnership /* = FALSE */) - { - ob_type = &PyUnicodeType; - _Py_NewReference(this); - - if ( takeOwnership ) - m_bstrValue = value; - else - // copy the value, including embedded NULLs - m_bstrValue = SysAllocStringLen(value, SysStringLen(value)); - } - - PyUnicode::PyUnicode(PyObject *value) - { - ob_type = &PyUnicodeType; - _Py_NewReference(this); - - m_bstrValue = NULL; - (void)PyWinObject_AsBstr(value, &m_bstrValue); - } - - PyUnicode::~PyUnicode(void) - { - SysFreeString(m_bstrValue); - } - - int PyUnicode::compare(PyObject *ob) - { - int l1 = SysStringByteLen(m_bstrValue); - OLECHAR *s = ((PyUnicode *)ob)->m_bstrValue; - int l2 = SysStringByteLen(s); - if ( l1 == 0 ) - if ( l2 > 0 ) - return -1; - else - return 0; - if ( l2 == 0 && l1 > 0 ) - return 1; - int len = l1; - if ( l2 < l1 ) - len = l2; - int cmp = memcmp(m_bstrValue, s, len); - if ( cmp == 0 ) - { - if ( l1 < l2 ) - return -1; - return l1 > l2; - } - return cmp; - } - - PyObject * PyUnicode::concat(PyObject *ob) - { - if ( !PyUnicode_Check(ob) ) { - PyErr_SetString(PyExc_TypeError, "illegal argument type for PyUnicode concatenation"); - return NULL; - } - - BSTR s2 = ((PyUnicode *)ob)->m_bstrValue; - int l1 = SysStringLen(m_bstrValue); - int l2 = SysStringLen(s2); - BSTR bres = SysAllocStringLen(NULL, l1 + l2); - if ( m_bstrValue ) - memcpy(bres, m_bstrValue, l1 * sizeof(*bres)); - if ( s2 ) - memcpy(&bres[l1], s2, l2 * sizeof(*bres)); - bres[l1+l2] = L'\0'; - return new PyUnicode(bres, /* takeOwnership= */ TRUE); - } - - PyObject * PyUnicode::repeat(int count) - { - int l = SysStringLen(m_bstrValue); - if ( l == 0 ) - return new PyUnicode(); - - BSTR bres = SysAllocStringLen(NULL, l * count); - OLECHAR *p = bres; - for ( int i = count; i--; p += l ) - memcpy(p, m_bstrValue, l * sizeof(*p)); - bres[l*count] = L'\0'; - return new PyUnicode(bres, /* takeOwnership= */ TRUE); - } - - PyObject * PyUnicode::item(int index) - { - int l = SysStringLen(m_bstrValue); - if ( index < 0 || index >= l ) - { - PyErr_SetString(PyExc_IndexError, "unicode index out of range"); - return NULL; - } - // ### tricky to get the correct constructor - return new PyUnicode((const OLECHAR *)&m_bstrValue[index], (int)1); - } - - PyObject * PyUnicode::slice(int start, int end) - { - int l = SysStringLen(m_bstrValue); - if ( start < 0 ) - start = 0; - if ( end < 0 ) - end = 0; - if ( end > l ) - end = l; - if ( start == 0 && end == l ) - { - Py_INCREF(this); - return this; - } - if ( end <= start ) - return new PyUnicode(); - - BSTR bres = SysAllocStringLen(&m_bstrValue[start], end - start); - return new PyUnicode(bres, /* takeOwnership= */ TRUE); - } - - long PyUnicode::hash(void) - { - /* snarfed almost exactly from stringobject.c */ - - int orig_len = SysStringByteLen(m_bstrValue); - register int len = orig_len; - register unsigned char *p; - register long x; - - p = (unsigned char *)m_bstrValue; - x = *p << 7; - while (--len >= 0) - x = (1000003*x) ^ *p++; - x ^= orig_len; - if (x == -1) - x = -2; - return x; - } - - PyObject * PyUnicode::asStr(void) - { - if ( m_bstrValue == NULL ) - return PyString_FromString(""); - - /* - ** NOTE: we always provide lengths to avoid computing null-term and - ** and to carry through any NULL values. - */ - - /* how many chars (including nulls) are in the BSTR? */ - int cchWideChar = SysStringLen(m_bstrValue); - - /* get the output length */ - int cchMultiByte = WideCharToMultiByte(CP_ACP, 0, m_bstrValue, cchWideChar, - NULL, 0, NULL, NULL); - - /* Create the Python string, and use it as the conversion buffer. */ - PyObject *result = PyString_FromStringAndSize(NULL, cchMultiByte); - if (result==NULL) return NULL; - - /* do the conversion */ - WideCharToMultiByte(CP_ACP, 0, m_bstrValue, cchWideChar, PyString_AS_STRING((PyStringObject *)result), - cchMultiByte, NULL, NULL); - - /* return the Python object */ - return result; - } - - int PyUnicode::print(FILE *fp, int flags) - { - LPSTR s; - if ( m_bstrValue ) - { - /* NOTE: BSTR values are *always* null-termed */ - int numBytes = WideCharToMultiByte(CP_ACP, 0, m_bstrValue, -1, NULL, 0, NULL, NULL); - s = (LPSTR)alloca(numBytes+1); - WideCharToMultiByte(CP_ACP, 0, m_bstrValue, -1, s, numBytes, NULL, NULL); - } - else - s = NULL; - - // USES_CONVERSION; - // char *s = W2A(m_bstrValue); - TCHAR resBuf[80]; - - if ( s == NULL ) - _tcscpy(resBuf, _T("<PyUnicode: NULL>")); - else if ( strlen(s) > 40 ) - { - s[40] = '\0'; - wsprintf(resBuf, _T("<PyUnicode: '%s'...>"), s); - } - else - wsprintf(resBuf, _T("<PyUnicode: '%s'>"), s); - - // - // ### ACK! Python uses a non-debug runtime. We can't use stream - // ### functions when in DEBUG mode!! (we link against a different - // ### runtime library) Hack it by getting Python to do the print! - // - // ### - Double Ack - Always use the hack! - // #ifdef _DEBUG - PyObject *ob = PyString_FromTCHAR(resBuf); - PyObject_Print(ob, fp, flags|Py_PRINT_RAW); - Py_DECREF(ob); - /***#else - fputs(resBuf, fp); - #endif - ***/ - return 0; - } - - PyObject *PyUnicode::repr() - { - // Do NOT write an "L" - Python opted for "u" anyway, - // and pre 2.0 builds work nicer if we just pretend we are a string in repr. - PyObject *obStr = asStr(); - if (obStr==NULL) - return NULL; - PyObject *obRepr = PyObject_Repr(obStr); - Py_DECREF(obStr); - return obRepr; - /*** - // This is not quite correct, but good enough for now. - // To save me lots of work, I convert the Unicode to a temporary - // string object, then perform a repr on the string object, then - // simply prefix with an 'L' to indicate the string is Unicode. - PyObject *obStr = asStr(); - if (obStr==NULL) - return NULL; - PyObject *obRepr = PyObject_Repr(obStr); - Py_DECREF(obStr); - if (obRepr==NULL) - return NULL; - - char *szVal = PyString_AsString(obRepr); - int strSize = PyString_Size(obRepr); - char *buffer = (char *)alloca(strSize+2); // trailing NULL and L - buffer[0] = 'L'; - memcpy(buffer+1, szVal, strSize); - buffer[strSize+1] = '\0'; - Py_DECREF(obRepr); - return PyString_FromStringAndSize(buffer, strSize+1); - ***/ - } - - PyObject * PyUnicode::upper(void) - { - /* copy the value; don't worry about NULLs since _wcsupr doesn't */ - BSTR v = SysAllocString(m_bstrValue); - - /* upper-case the thing */ - if ( v ) - { - #ifndef MS_WINCE - setlocale(LC_CTYPE, ""); - #endif - _wcsupr(v); - } - - /* wrap it into a new object and return it */ - return new PyUnicode(v, /* takeOwnership= */ TRUE); - } - - PyObject * PyUnicode::lower(void) - { - /* copy the value; don't worry about NULLs since _wcsupr doesn't */ - BSTR v = SysAllocString(m_bstrValue); - - /* upper-case the thing */ - if ( v ) - { - #ifndef MS_WINCE - setlocale(LC_CTYPE, ""); - #endif - _wcslwr(v); - } - - /* wrap it into a new object and return it */ - return new PyUnicode(v, /* takeOwnership= */ TRUE); - } - - static struct PyMethodDef PyUnicode_methods[] = { - { "upper", PyUnicode::upperFunc, METH_VARARGS }, - { "lower", PyUnicode::lowerFunc, METH_VARARGS }, - { NULL, NULL } /* sentinel */ - }; - - PyObject * PyUnicode::getattr(char *name) - { - if ( !strcmp(name, "raw") ) - { - if ( m_bstrValue == NULL ) - return PyString_FromString(""); - - int len = SysStringByteLen(m_bstrValue); - return PyString_FromStringAndSize((char *)(void *)m_bstrValue, len); - } - - return Py_FindMethod(PyUnicode_methods, this, name); - } - - /*static*/ void PyUnicode::deallocFunc(PyObject *ob) - { - delete (PyUnicode *)ob; - } - - // @pymethod int|PyUnicode|__cmp__|Used when objects are compared. - int PyUnicode::compareFunc(PyObject *ob1, PyObject *ob2) - { - return ((PyUnicode *)ob1)->compare(ob2); - } - - // @pymethod int|PyUnicode|__hash__|Used when the hash value of a Unicode object is required - long PyUnicode::hashFunc(PyObject *ob) - { - return ((PyUnicode *)ob)->hash(); - } - - // @pymethod |PyUnicode|__str__|Used when a (8-bit) string representation of the Unicode object is required. - PyObject * PyUnicode::strFunc(PyObject *ob) - { - return ((PyUnicode *)ob)->asStr(); - } - - // @pymethod |PyUnicode|__print__|Used when the Unicode object is printed. - int PyUnicode::printFunc(PyObject *ob, FILE *fp, int flags) - { - return ((PyUnicode *)ob)->print(fp, flags); - } - - // @pymethod |PyUnicode|__repr__|Used when repr(object) is used. - PyObject *PyUnicode::reprFunc(PyObject *ob) - { - // @comm Note the format is L'string' and that the string portion - // is currently not escaped, as Python does for normal strings. - return ((PyUnicode *)ob)->repr(); - } - - // @pymethod |PyUnicode|__getattr__|Used to access attributes of the Unicode object. - PyObject * PyUnicode::getattrFunc(PyObject *ob, char *name) - { - return ((PyUnicode *)ob)->getattr(name); - } - - int PyUnicode::lengthFunc(PyObject *ob) - { - return SysStringLen(((PyUnicode *)ob)->m_bstrValue); - } - - PyObject * PyUnicode::concatFunc(PyObject *ob1, PyObject *ob2) - { - return ((PyUnicode *)ob1)->concat(ob2); - } - - PyObject * PyUnicode::repeatFunc(PyObject *ob, int count) - { - return ((PyUnicode *)ob)->repeat(count); - } - - PyObject * PyUnicode::itemFunc(PyObject *ob, int index) - { - return ((PyUnicode *)ob)->item(index); - } - - PyObject * PyUnicode::sliceFunc(PyObject *ob, int start, int end) - { - return ((PyUnicode *)ob)->slice(start, end); - } - - PyObject * PyUnicode::upperFunc(PyObject *ob, PyObject *args) - { - if ( !PyArg_ParseTuple(args, ":upper")) - return NULL; - return ((PyUnicode *)ob)->upper(); - } - - PyObject * PyUnicode::lowerFunc(PyObject *ob, PyObject *args) - { - if ( !PyArg_ParseTuple(args, ":lower")) - return NULL; - return ((PyUnicode *)ob)->lower(); - } - - #endif /* PYWIN_USE_PYUNICODE */ /////////////////////////////////////////////////////////// // // Some utilities etc - #ifndef NO_PYWINTYPES_BSTR PyWin_AutoFreeBstr::PyWin_AutoFreeBstr( BSTR bstr /*= NULL*/ ) --- 259,266 ---- *************** *** 932,936 **** { // copy the value, including embedded NULLs - #if defined(PYWIN_USE_PYUNICODE) int nchars = PyUnicode_GET_SIZE(stringObject); *pResult = SysAllocStringLen(NULL, nchars); --- 318,321 ---- *************** *** 944,951 **** (*pResult)[nchars] = 0; } - #else - BSTR v = ((PyUnicode *)stringObject)->m_bstrValue; - *pResult = SysAllocStringLen(v, SysStringLen(v)); - #endif } else if (stringObject == Py_None) { --- 329,332 ---- *************** *** 974,979 **** } - #endif // NO_PYWINTYPES_BSTR - // String conversions // Convert a Python object to a WCHAR - allow embedded NULLs, None, etc. --- 355,358 ---- Index: PyLARGE_INTEGER.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/src/PyLARGE_INTEGER.cpp,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** PyLARGE_INTEGER.cpp 24 May 2007 06:01:05 -0000 1.11 --- PyLARGE_INTEGER.cpp 10 Feb 2008 13:46:57 -0000 1.12 *************** *** 29,77 **** #endif - #ifdef PYWIN_NO_PYTHON_LONG_LONG - /* If we either dont have, or dont want to use, Python's native - 64bit integer support. - */ - PyLongObject *PyLong_Normalize(register PyLongObject *v); - PyLongObject *alloclongobject(int size); - static __int64 PyWLong_AsLongLong(PyObject *vv); - #define PyLong_AsLongLong PyWLong_AsLongLong - - static unsigned __int64 PyWLong_AsUnsignedLongLong(PyObject *vv); - #define PyLong_AsUnsignedLongLong PyWLong_AsUnsignedLongLong - - - PyObject *PyLong_FromI64(__int64 ival) - { - int i; - - /* A 64-bit value should fit in 5 'digits' */ - int n = 5; - PyLongObject *v = alloclongobject(n); - if (v == NULL) - return NULL; - - if (ival < 0) - { - ival = -ival; - v->ob_size = -(v->ob_size); - } - - unsigned __int64 uval = (unsigned __int64)ival; - for (i = 0; i < n; i++) - { - v->ob_digit[i] = (unsigned short)(uval & MASK); - uval = (uval >> SHIFT); - } - v = PyLong_Normalize(v); - - return (PyObject*)v; - } - - // ### the hack already does unsigned(!) - #define PyLong_FromUI64(x) PyLong_FromI64(x) - - #else // PYWIN_NO_PYTHON_LONG_LONG - // We have native support - use it. PyObject *PyLong_FromI64(__int64 ival) { --- 29,32 ---- *************** *** 83,88 **** } - #endif // PYWIN_NO_PYTHON_LONG_LONG - BOOL PyLong_AsI64(PyObject *val, __int64 *lval) { --- 38,41 ---- *************** *** 191,259 **** return PyLong_FromUI64(val.QuadPart); } - - #ifdef PYWIN_NO_PYTHON_LONG_LONG - // Our own hacks for 64bit support. - #include <longintrepr.h> - - #define ABS(x) ((x) < 0 ? -(x) : (x)) - - PyLongObject *PyLong_Normalize(register PyLongObject *v) - { - Py_ssize_t j = ABS(v->ob_size); - register Py_ssize_t i = j; - - while (i > 0 && v->ob_digit[i-1] == 0) - --i; - if (i != j) - v->ob_size = (v->ob_size < 0) ? -(i) : i; - return v; - } - - PyLongObject *alloclongobject(int size) - { - return PyObject_NEW_VAR(PyLongObject, &PyLong_Type, size); - } - - - __int64 - PyWLong_AsLongLong(PyObject *vv) - { - register PyLongObject *v; - __int64 x, prev; - Py_ssize_t i, sign; - - if (vv == NULL || !PyLong_Check(vv)) { - PyErr_BadInternalCall(); - return -1; - } - - v = (PyLongObject *)vv; - i = v->ob_size; - sign = 1; - x = 0; - - if (i < 0) { - sign = -1; - i = -(i); - } - - while (--i >= 0) { - prev = x; - x = (x << SHIFT) + v->ob_digit[i]; - if ((x >> SHIFT) != prev) { - PyErr_SetString(PyExc_OverflowError, - "long int too long to convert"); - return -1; - } - } - - return x * sign; - } - - // ### hack this dumb thing for now - unsigned __int64 - PyWLong_AsUnsignedLongLong(PyObject *vv) - { - return (unsigned __int64)PyLong_AsLongLong(vv); - } - #endif --- 144,145 ---- |
From: Mark H. <mha...@us...> - 2008-02-10 13:44:16
|
Update of /cvsroot/pywin32/pywin32/win32/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6855 Modified Files: PyWinTypes.h Log Message: * fix wchar/whcar_t confusion with later compilers. * disable warnings about #pragma's not understood by old MSVCs * provide PyLong_AsUnsignedLongMask for py2.2 * remove support for PYWIN_USE_PYUNICODE, MS_WINCE, NO_PYWINTYPES_BSTR, PYWIN_NO_PYTHON_LONG_LONG Index: PyWinTypes.h =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/src/PyWinTypes.h,v retrieving revision 1.50 retrieving revision 1.51 diff -C2 -d -r1.50 -r1.51 *** PyWinTypes.h 6 Feb 2008 18:37:46 -0000 1.50 --- PyWinTypes.h 10 Feb 2008 13:44:20 -0000 1.51 *************** *** 9,12 **** --- 9,18 ---- #endif + // early msvc versions complain about pragma #s it doesn't understand + // C:\mssdk\VC\INCLUDE\string.h(142) : warning C4616: #pragma warning : warning number '6059' out of range, must be between '4001' and '4999' + // and: + // C:\mssdk\include\wingdi.h(4340) : warning C4068: unknown pragma + // I doubt we ever care about that warning, so unconditionally nuke em! + #pragma warning( disable:4616 4068 ) // Python.h and Windows.h both protect themselves from multiple // includes - so it is safe to do here (and provides a handy *************** *** 25,28 **** --- 31,38 ---- #endif + #if PY_VERSION_HEX < 0x02030000 + #define PyLong_AsUnsignedLongMask PyLong_AsUnsignedLong + #endif + // This only enables runtime checks in debug builds - so we use // our own so we can enable it always should we desire... *************** *** 32,45 **** #include "mmsystem.h" ! // Do we want to use the builtin Unicode object? ! // If defined, we use the standard builtin type. ! // If not define, we have our own Unicode type ! // (but that doesnt work seamlessly with PyString objects) ! ! // For 1.6+ builds, this will be ON. ! // For 1.5 builds, this will be OFF ! #if (PY_VERSION_HEX >= 0x01060000) #define PYWIN_USE_PYUNICODE - #endif // *** NOTE *** FREEZE_PYWINTYPES is deprecated. It used to be used --- 42,47 ---- #include "mmsystem.h" ! // This can be removed once we are confident noone else uses it... #define PYWIN_USE_PYUNICODE // *** NOTE *** FREEZE_PYWINTYPES is deprecated. It used to be used *************** *** 67,91 **** #include <tchar.h> - #ifdef MS_WINCE - // These macros caused grief on CE once (do they still?) - # ifndef IN - # define IN - # endif - # ifdef OUT - # undef OUT - # endif - # ifndef OUT - # define OUT - # endif - // Having trouble making these work for Palm PCs?? - // NOTE: These are old - for Windows CE 1 devices, and well - // before the PPC platform. It is unlikely recent CE toolkits - // still need all this magic. - # ifndef PYWIN_HPC /* Palm PC */ - # define NO_PYWINTYPES_TIME - # define NO_PYWINTYPES_IID - # define NO_PYWINTYPES_BSTR - # endif - #endif // MS_WINCE /* ** Error/Exception handling --- 69,72 ---- *************** *** 142,146 **** extern PYWINTYPES_EXPORT int PyUnicode_Size(PyObject *op); - #ifndef NO_PYWINTYPES_BSTR // Given a PyObject (string, Unicode, etc) create a "BSTR" with the value PYWINTYPES_EXPORT BOOL PyWinObject_AsBstr(PyObject *stringObject, BSTR *pResult, BOOL bNoneOK = FALSE, DWORD *pResultLen = NULL); --- 123,126 ---- *************** *** 153,159 **** PYWINTYPES_EXPORT BSTR PyWin_String_AsBstr(const char *str); - #endif // NO_PYWINTYPES_BSTR - - // Given a string or Unicode object, get WCHAR characters. PYWINTYPES_EXPORT BOOL PyWinObject_AsWCHAR(PyObject *stringObject, WCHAR **pResult, BOOL bNoneOK = FALSE, DWORD *pResultLen = NULL); --- 133,136 ---- *************** *** 161,165 **** PYWINTYPES_EXPORT void PyWinObject_FreeWCHAR(WCHAR *pResult); ! // As of Python 2.6, Python switched to 'wchar_t' for unicode. Some old // win32 structures that still use 'unsigned short' now fail from C++ with // VS8 so we provide a couple of helpers. --- 138,142 ---- PYWINTYPES_EXPORT void PyWinObject_FreeWCHAR(WCHAR *pResult); ! // As of Python 2.6, Python switched to 'wchar_t' for unicode, so old // win32 structures that still use 'unsigned short' now fail from C++ with // VS8 so we provide a couple of helpers. *************** *** 168,172 **** // Its not clear how to resolve this, but while VS2003 is the default // compiler, that is what must work. ! #if 0 // and _MSC_VER >= 1400 inline BOOL PyWinObject_AsWCHAR(PyObject *stringObject, unsigned short **pResult, BOOL bNoneOK = FALSE, DWORD *pResultLen = NULL) { --- 145,150 ---- // Its not clear how to resolve this, but while VS2003 is the default // compiler, that is what must work. ! // py2.5 on x64 also needs it, and that is min x64 we support ! #if (PY_VERSION_HEX >= 0x02060000) || defined(_WIN64) inline BOOL PyWinObject_AsWCHAR(PyObject *stringObject, unsigned short **pResult, BOOL bNoneOK = FALSE, DWORD *pResultLen = NULL) { *************** *** 263,267 **** PYWINTYPES_EXPORT PyObject *PyWinObject_FromOLECHAR(const OLECHAR * str, int numChars); - #ifndef MS_WINCE // String support for buffers allocated via a function of your choice. PYWINTYPES_EXPORT BOOL PyWinObject_AsPfnAllocatedWCHAR(PyObject *stringObject, --- 241,244 ---- *************** *** 274,278 **** PYWINTYPES_EXPORT BOOL PyWinObject_AsTaskAllocatedWCHAR(PyObject *stringObject, WCHAR **ppResult, BOOL bNoneOK /*= FALSE*/,DWORD *pResultLen /*= NULL*/); PYWINTYPES_EXPORT void PyWinObject_FreeTaskAllocatedWCHAR(WCHAR * str); - #endif // MS_WINCE // String conversion - These must also be freed with PyWinObject_FreeString PYWINTYPES_EXPORT BOOL PyWin_WCHAR_AsString(WCHAR *input, DWORD inLen, char **pResult); --- 251,254 ---- *************** *** 291,306 **** ** LARGE_INTEGER objects */ - #ifdef LONG_LONG - // Python got its own support for 64 bit ints as of Python 1.5.2. - // However, for 1.5.2 we stick without it - we use it for 1.6 and on. - # if (PY_VERSION_HEX < 0x01060000) - # define PYWIN_NO_PYTHON_LONG_LONG - # endif - #else - // If LONG_LONG is undefined, we are still building pre 1.5.2, so - // we have no choice but to define it. - # define PYWIN_NO_PYTHON_LONG_LONG - #endif - // These need to be renamed. For now, the old names still appear in the DLL. PYWINTYPES_EXPORT BOOL PyLong_AsTwoInts(PyObject *ob, int *hiint, unsigned *loint); --- 267,270 ---- *************** *** 501,506 **** ** SECURITY_DESCRIPTOR support */ - #ifndef MS_WINCE /* These are not available on Windows CE */ - extern PYWINTYPES_EXPORT PyTypeObject PySECURITY_DESCRIPTORType; #define PySECURITY_DESCRIPTOR_Check(ob) ((ob)->ob_type == &PySECURITY_DESCRIPTORType) --- 465,468 ---- *************** *** 532,537 **** PYWINTYPES_EXPORT BOOL PyWinObject_AsACL(PyObject *ob, PACL *ppACL, BOOL bNoneOK = FALSE); - #endif /* MS_WINCE */ - /* ** Win32 HANDLE wrapper - any handle closable by "CloseHandle()" --- 494,497 ---- *************** *** 584,588 **** ** Other Utilities */ - #ifndef NO_PYWINTYPES_BSTR // ---------------------------------------------------------------------- // WARNING - NEVER EVER USE new() ON THIS CLASS --- 544,547 ---- *************** *** 619,623 **** return TRUE; } - #endif // NO_PYWINTYPES_BSTR // ---------------------------------------------------------------------- --- 578,581 ---- |
From: Mark H. <mha...@us...> - 2008-02-10 13:35:30
|
Update of /cvsroot/pywin32/pywin32/win32/src/win32print In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3973/win32print Modified Files: win32print.cpp Log Message: Let pywintypes.h pull in all the necessary headers. Index: win32print.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/src/win32print/win32print.cpp,v retrieving revision 1.29 retrieving revision 1.30 diff -C2 -d -r1.29 -r1.30 *** win32print.cpp 6 Feb 2008 18:44:10 -0000 1.29 --- win32print.cpp 10 Feb 2008 13:35:33 -0000 1.30 *************** *** 13,21 **** ******************************************************************/ - // #define UNICODE - // #define _UNICODE // _tcs functions require this - #include "windows.h" - - #include "Python.h" #include "PyWinTypes.h" #include "PyWinObjects.h" --- 13,16 ---- |
From: Mark H. <mha...@us...> - 2008-02-10 13:34:48
|
Update of /cvsroot/pywin32/pywin32/win32/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3589 Modified Files: PythonService.cpp Log Message: Fix handling of the new event codes. Index: PythonService.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/src/PythonService.cpp,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** PythonService.cpp 7 Feb 2008 03:33:15 -0000 1.23 --- PythonService.cpp 10 Feb 2008 13:34:49 -0000 1.24 *************** *** 931,935 **** if (pse->bUseEx) { PyObject *sub; ! switch (dwEventType) { case SERVICE_CONTROL_DEVICEEVENT: sub = PyWinObject_FromPARAM((LPARAM)eventData); --- 931,935 ---- if (pse->bUseEx) { PyObject *sub; ! switch (dwCtrlCode) { case SERVICE_CONTROL_DEVICEEVENT: sub = PyWinObject_FromPARAM((LPARAM)eventData); |
From: Mark H. <mha...@us...> - 2008-02-10 13:33:29
|
Update of /cvsroot/pywin32/pywin32/Pythonwin/pywin/framework In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3216 Modified Files: app.py Log Message: Give Roger and Sidnei a little credit. Index: app.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/Pythonwin/pywin/framework/app.py,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** app.py 7 Jul 2005 14:46:17 -0000 1.11 --- app.py 10 Feb 2008 13:33:31 -0000 1.12 *************** *** 321,327 **** return default ! scintilla = "Scintilla is Copyright 1998-2004 Neil Hodgson (http://www.scintilla.org)" idle = "This program uses IDLE extensions by Guido van Rossum, Tim Peters and others." ! contributors = "Thanks to the following people for making significant contributions: Sam Rushing, Curt Hagenlocher, Dave Brennan, Roger Burnham, Gordon McMillan, Neil Hodgson, Laramie Leavitt. (let me know if I have forgotten you!)" # The About Box class AboutBox(dialog.Dialog): --- 321,327 ---- return default ! scintilla = "Scintilla is Copyright 1998-2008 Neil Hodgson (http://www.scintilla.org)" idle = "This program uses IDLE extensions by Guido van Rossum, Tim Peters and others." ! contributors = "Thanks to the following people for making significant contributions: Roger Upole, Sidnei da Silva, Sam Rushing, Curt Hagenlocher, Dave Brennan, Roger Burnham, Gordon McMillan, Neil Hodgson, Laramie Leavitt. (let me know if I have forgotten you!)" # The About Box class AboutBox(dialog.Dialog): |
From: Mark H. <mha...@us...> - 2008-02-10 13:32:46
|
Update of /cvsroot/pywin32/pywin32/Pythonwin/pywin/scintilla In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2855 Modified Files: scintillacon.py Log Message: new generated constants. Index: scintillacon.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/Pythonwin/pywin/scintilla/scintillacon.py,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** scintillacon.py 25 Nov 2003 10:46:07 -0000 1.16 --- scintillacon.py 10 Feb 2008 13:32:47 -0000 1.17 *************** *** 88,91 **** --- 88,93 ---- SC_MARK_ARROWS = 24 SC_MARK_PIXMAP = 25 + SC_MARK_FULLRECT = 26 + SC_MARK_LEFTRECT = 27 SC_MARK_CHARACTER = 10000 SC_MARKNUM_FOLDEREND = 25 *************** *** 107,112 **** --- 109,118 ---- [...1015 lines suppressed...] + SCE_MAGIK_BRACKET_BLOCK = 9 + SCE_MAGIK_BRACE_BLOCK = 10 + SCE_MAGIK_SQBRACKET_BLOCK = 11 + SCE_MAGIK_UNKNOWN_KEYWORD = 12 + SCE_MAGIK_KEYWORD = 13 + SCE_MAGIK_PRAGMA = 14 + SCE_MAGIK_SYMBOL = 15 + SCE_POWERSHELL_DEFAULT = 0 + SCE_POWERSHELL_COMMENT = 1 + SCE_POWERSHELL_STRING = 2 + SCE_POWERSHELL_CHARACTER = 3 + SCE_POWERSHELL_NUMBER = 4 + SCE_POWERSHELL_VARIABLE = 5 + SCE_POWERSHELL_OPERATOR = 6 + SCE_POWERSHELL_IDENTIFIER = 7 + SCE_POWERSHELL_KEYWORD = 8 + SCE_POWERSHELL_CMDLET = 9 + SCE_POWERSHELL_ALIAS = 10 + SCLEX_ASP = 29 + SCLEX_PHP = 30 |
From: Mark H. <mha...@us...> - 2008-02-10 13:28:27
|
Update of /cvsroot/pywin32/pywin32/com/win32com/makegw In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1023 Modified Files: makegwenum.py Log Message: 1/2 way to IEnum* interfaces correctly using PyComEnumTypeObject Index: makegwenum.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32com/makegw/makegwenum.py,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** makegwenum.py 5 Jan 2000 03:46:08 -0000 1.3 --- makegwenum.py 10 Feb 2008 13:28:31 -0000 1.4 *************** *** 178,182 **** }; ! PyComTypeObject PyIEnum%(enumtype)s::type("PyIEnum%(enumtype)s", &PyIUnknown::type, sizeof(PyIEnum%(enumtype)s), --- 178,182 ---- }; ! PyComEnumTypeObject PyIEnum%(enumtype)s::type("PyIEnum%(enumtype)s", &PyIUnknown::type, sizeof(PyIEnum%(enumtype)s), |
From: Mark H. <mha...@us...> - 2008-02-10 13:27:09
|
Update of /cvsroot/pywin32/pywin32/com/win32com/server In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv647 Modified Files: register.py Log Message: If we fail to register a COM object due to AccessDenied, retry in an elevated process. Index: register.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32com/server/register.py,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** register.py 8 Mar 2007 23:39:59 -0000 1.20 --- register.py 10 Feb 2008 13:27:13 -0000 1.21 *************** *** 478,488 **** flags['quiet'] = flags.get('quiet',0) or '--quiet' in sys.argv flags['debug'] = flags.get('debug',0) or '--debug' in sys.argv if unregisterInfo: return UnregisterInfoClasses(*classes, **flags) ! if unregister: ! UnregisterClasses(*classes, **flags) ! else: ! RegisterClasses(*classes, **flags) def RegisterPyComCategory(): --- 478,533 ---- flags['quiet'] = flags.get('quiet',0) or '--quiet' in sys.argv flags['debug'] = flags.get('debug',0) or '--debug' in sys.argv + flags['unattended'] = flags.get('unattended',0) or '--unattended' in sys.argv if unregisterInfo: return UnregisterInfoClasses(*classes, **flags) ! try: ! if unregister: ! UnregisterClasses(*classes, **flags) ! else: ! RegisterClasses(*classes, **flags) ! except win32api.error, exc: ! # If we are on xp+ and have "access denied", retry using ! # ShellExecuteEx with 'runas' verb to force elevation (vista) and/or ! # admin login dialog (vista/xp) ! if flags['unattended'] or exc[0] != winerror.ERROR_ACCESS_DENIED \ ! or sys.getwindowsversion()[0] < 5: ! raise ! from win32com.shell.shell import ShellExecuteEx ! from win32com.shell import shellcon ! import win32process, win32event ! import winxpgui # we've already checked we are running XP above + if not flags['quiet']: + print "Requesting elevation and retrying..." + new_params = " ".join(['"' + a + '"' for a in sys.argv]) + # specifying the parent means the dialog is centered over our window, + # which is a good usability clue. + # hwnd is unlikely on the command-line, but flags may come from elsewhere + hwnd = flags.get('hwnd', None) + if hwnd is None: + try: + hwnd = winxpgui.GetConsoleWindow() + except winxpgui.error: + hwnd = 0 + rc = ShellExecuteEx(hwnd=hwnd, + fMask=shellcon.SEE_MASK_NOCLOSEPROCESS, + lpVerb="runas", + lpFile=win32api.GetShortPathName(sys.executable), + lpParameters=new_params, + lpDirectory=os.getcwd(), + nShow=win32con.SW_SHOW) + # Output is lost to the new console which opens, so the + # best we can do is get the exit code of the process. + hproc = rc['hProcess'] + win32event.WaitForSingleObject(hproc, win32event.INFINITE) + exit_code = win32process.GetExitCodeProcess(hproc) + if exit_code: + # Even if quiet you get to see this error. + print "Error: registration failed (exit code %s)." % exit_code + print "Please re-execute this command from an elevated command-prompt" + print "to see details about the error." + else: + if not flags['quiet']: + print "Elevated process succeeded." def RegisterPyComCategory(): |
From: Mark H. <mha...@sk...> - 2008-02-10 11:20:36
|
FYI, I've just rejected a large checkin message due to an upgrade to scintilla 1.75. Mark |
From: Mark H. <mha...@us...> - 2008-02-10 11:02:13
|
Update of /cvsroot/pywin32/pywin32/Pythonwin/Scintilla In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18959 Modified Files: README_pythonwin Log Message: upgrade to scintilla 1.75 Index: README_pythonwin =================================================================== RCS file: /cvsroot/pywin32/pywin32/Pythonwin/Scintilla/README_pythonwin,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** README_pythonwin 11 Mar 2000 00:39:38 -0000 1.1 --- README_pythonwin 10 Feb 2008 11:01:46 -0000 1.2 *************** *** 1,5 **** ! This is a snapshot of Scintilla used for Pythonwin. All efforts ! are made to keep this snapshot up to date with the latest ! scintilla versions. Scintilla's home is www.scintilla.org --- 1,3 ---- ! This is a copy of Scintilla 1.75 used for Pythonwin. Scintilla's home is www.scintilla.org |
Update of /cvsroot/pywin32/pywin32/Pythonwin/Scintilla/include In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18959/include Modified Files: Accessor.h KeyWords.h Platform.h PropSet.h SString.h SciLexer.h Scintilla.h WindowAccessor.h Log Message: upgrade to scintilla 1.75 Index: WindowAccessor.h =================================================================== RCS file: /cvsroot/pywin32/pywin32/Pythonwin/Scintilla/include/WindowAccessor.h,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** WindowAccessor.h 2 Aug 2002 12:53:11 -0000 1.6 --- WindowAccessor.h 10 Feb 2008 11:01:46 -0000 1.7 *************** *** 7,10 **** --- 7,14 ---- // The License.txt file describes the conditions under which this software may be distributed. + #ifdef SCI_NAMESPACE + namespace Scintilla { + #endif + /** */ *************** *** 55,57 **** --- 59,66 ---- void SetLevel(int line, int level); int IndentAmount(int line, int *flags, PFNIsCommentLeader pfnIsCommentLeader = 0); + void IndicatorFill(int start, int end, int indicator, int value); }; + + #ifdef SCI_NAMESPACE + } + #endif Index: Platform.h =================================================================== RCS file: /cvsroot/pywin32/pywin32/Pythonwin/Scintilla/include/Platform.h,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** Platform.h 25 Nov 2003 10:45:20 -0000 1.11 --- Platform.h 10 Feb 2008 11:01:46 -0000 1.12 *************** *** 17,20 **** --- 17,21 ---- #define PLAT_GTK 0 #define PLAT_GTK_WIN32 0 + #define PLAT_MACOSX 0 #define PLAT_WIN 0 #define PLAT_WX 0 *************** *** 33,41 **** #define PLAT_GTK 1 ! #ifdef _MSC_VER #undef PLAT_GTK_WIN32 #define PLAT_GTK_WIN32 1 #endif #else #undef PLAT_WIN --- 34,46 ---- #define PLAT_GTK 1 ! #if defined(__WIN32__) || defined(_MSC_VER) #undef PLAT_GTK_WIN32 #define PLAT_GTK_WIN32 1 #endif + #elif defined(MACOSX) + #undef PLAT_MACOSX + #define PLAT_MACOSX 1 + #else #undef PLAT_WIN *************** *** 44,47 **** --- 49,55 ---- #endif + #ifdef SCI_NAMESPACE + namespace Scintilla { + #endif // Underlying the implementation of the platform classes are platform specific types. *************** *** 65,69 **** int y; ! Point(int x_=0, int y_=0) : x(x_), y(y_) { } --- 73,77 ---- int y; ! explicit Point(int x_=0, int y_=0) : x(x_), y(y_) { } *************** *** 115,118 **** --- 123,129 ---- int Width() { return right - left; } int Height() { return bottom - top; } + bool Empty() { + return (Height() <= 0) || (Width() <= 0); + } }; *************** *** 237,246 **** class Palette { int used; ! enum {numEntries = 100}; ! ColourPair entries[numEntries]; #if PLAT_GTK void *allocatedPalette; // GdkColor * int allocatedLen; #endif public: #if PLAT_WIN --- 248,260 ---- class Palette { int used; ! int size; ! ColourPair *entries; #if PLAT_GTK void *allocatedPalette; // GdkColor * int allocatedLen; #endif + // Private so Palette objects can not be copied + Palette(const Palette &) {} + Palette &operator=(const Palette &) { return *this; } public: #if PLAT_WIN *************** *** 280,284 **** virtual ~Font(); ! virtual void Create(const char *faceName, int characterSet, int size, bool bold, bool italic); virtual void Release(); --- 294,299 ---- virtual ~Font(); ! virtual void Create(const char *faceName, int characterSet, int size, ! bool bold, bool italic, bool extraFontFlag=false); virtual void Release(); *************** *** 287,290 **** --- 302,306 ---- void SetID(FontID id_) { id = id_; } friend class Surface; + friend class SurfaceImpl; }; *************** *** 318,321 **** --- 334,339 ---- virtual void FillRectangle(PRectangle rc, Surface &surfacePattern)=0; virtual void RoundedRectangle(PRectangle rc, ColourAllocated fore, ColourAllocated back)=0; + virtual void AlphaRectangle(PRectangle rc, int cornerSize, ColourAllocated fill, int alphaFill, + ColourAllocated outline, int alphaOutline, int flags)=0; virtual void Ellipse(PRectangle rc, ColourAllocated fore, ColourAllocated back)=0; virtual void Copy(PRectangle rc, Point from, Surface &surfaceSource)=0; *************** *** 354,360 **** protected: WindowID id; public: ! Window() : id(0), cursorLast(cursorInvalid) {} ! Window(const Window &source) : id(source.id), cursorLast(cursorInvalid) {} virtual ~Window(); Window &operator=(WindowID id_) { --- 372,392 ---- protected: WindowID id; + #if PLAT_MACOSX + void *windowRef; + void *control; + #endif public: ! Window() : id(0), cursorLast(cursorInvalid) { ! #if PLAT_MACOSX ! windowRef = 0; ! control = 0; ! #endif ! } ! Window(const Window &source) : id(source.id), cursorLast(cursorInvalid) { ! #if PLAT_MACOSX ! windowRef = 0; ! control = 0; ! #endif ! } virtual ~Window(); Window &operator=(WindowID id_) { *************** *** 377,380 **** --- 409,417 ---- void SetCursor(Cursor curs); void SetTitle(const char *s); + PRectangle GetMonitorRect(Point pt); + #if PLAT_MACOSX + void SetWindow(void *ref) { windowRef = ref; }; + void SetControl(void *_control) { control = _control; }; + #endif private: Cursor cursorLast; *************** *** 392,398 **** virtual void SetFont(Font &font)=0; ! virtual void Create(Window &parent, int ctrlID, int lineHeight_, bool unicodeMode_)=0; virtual void SetAverageCharWidth(int width)=0; virtual void SetVisibleRows(int rows)=0; virtual PRectangle GetDesiredRect()=0; virtual int CaretFromEdge()=0; --- 429,436 ---- virtual void SetFont(Font &font)=0; ! virtual void Create(Window &parent, int ctrlID, Point location, int lineHeight_, bool unicodeMode_)=0; virtual void SetAverageCharWidth(int width)=0; virtual void SetVisibleRows(int rows)=0; + virtual int GetVisibleRows() const=0; virtual PRectangle GetDesiredRect()=0; virtual int CaretFromEdge()=0; *************** *** 407,410 **** --- 445,449 ---- virtual void ClearRegisteredImages()=0; virtual void SetDoubleClickAction(CallBackAction, void *)=0; + virtual void SetList(const char* list, char separator, char typesep)=0; }; *************** *** 498,503 **** --- 537,550 ---- #define PLATFORM_ASSERT(c) ((void)0) #else + #ifdef SCI_NAMESPACE + #define PLATFORM_ASSERT(c) ((c) ? (void)(0) : Scintilla::Platform::Assert(#c, __FILE__, __LINE__)) + #else #define PLATFORM_ASSERT(c) ((c) ? (void)(0) : Platform::Assert(#c, __FILE__, __LINE__)) #endif + #endif + + #ifdef SCI_NAMESPACE + } + #endif // Shut up annoying Visual C++ warnings: Index: SString.h =================================================================== RCS file: /cvsroot/pywin32/pywin32/Pythonwin/Scintilla/include/SString.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** SString.h 25 Nov 2003 10:45:20 -0000 1.4 --- SString.h 10 Feb 2008 11:01:46 -0000 1.5 *************** *** 3,7 **** ** A simple string class. **/ ! // Copyright 1998-2001 by Neil Hodgson <ne...@sc...> // The License.txt file describes the conditions under which this software may be distributed. --- 3,7 ---- ** A simple string class. **/ ! // Copyright 1998-2004 by Neil Hodgson <ne...@sc...> // The License.txt file describes the conditions under which this software may be distributed. *************** *** 9,12 **** --- 9,13 ---- #define SSTRING_H + // These functions are implemented because each platform calls them something different. int CompareCaseInsensitive(const char *a, const char *b); *************** *** 14,17 **** --- 15,22 ---- bool EqualCaseInsensitive(const char *a, const char *b); + #ifdef SCI_NAMESPACE + namespace Scintilla { + #endif + // Define another string class. // While it would be 'better' to use std::string, that doubles the executable size. *************** *** 19,30 **** /** ! * @brief A simple string class. ! * ! * Hold the length of the string for quick operations, ! * can have a buffer bigger than the string to avoid too many memory allocations and copies. ! * May have embedded zeroes as a result of @a substitute, but relies too heavily on C string ! * functions to allow reliable manipulations of these strings, other than simple appends, etc. ! **/ ! class SString { public: /** Type of string lengths (sizes) and positions (indexes). */ --- 24,31 ---- /** ! * Base class from which the two other classes (SBuffer & SString) ! * are derived. ! */ ! class SContainer { public: /** Type of string lengths (sizes) and positions (indexes). */ *************** *** 33,90 **** enum { measure_length=0xffffffffU}; ! private: char *s; ///< The C string lenpos_t sSize; ///< The size of the buffer, less 1: ie. the maximum size of the string ! lenpos_t sLen; ///< The size of the string in s ! lenpos_t sizeGrowth; ///< Minimum growth size when appending strings ! enum { sizeGrowthDefault = 64 }; ! bool grow(lenpos_t lenNew) { ! while (sizeGrowth * 6 < lenNew) { ! sizeGrowth *= 2; ! } ! char *sNew = new char[lenNew + sizeGrowth + 1]; ! if (sNew) { ! if (s) { ! memcpy(sNew, s, sLen); ! delete []s; ! } ! s = sNew; ! s[sLen] = '\0'; ! sSize = lenNew + sizeGrowth; } - return sNew != 0; } ! SString &assign(const char *sOther, lenpos_t sSize_=measure_length) { ! if (!sOther) { ! sSize_ = 0; ! } else if (sSize_ == measure_length) { ! sSize_ = strlen(sOther); ! } ! if (sSize > 0 && sSize_ <= sSize) { // Does not allocate new buffer if the current is big enough ! if (s && sSize_) { ! memcpy(s, sOther, sSize_); ! } ! s[sSize_] = '\0'; ! sLen = sSize_; } else { delete []s; ! s = StringAllocate(sOther, sSize_); ! if (s) { ! sSize = sSize_; // Allow buffer bigger than real string, thus providing space to grow ! sLen = strlen(s); ! } else { ! sSize = sLen = 0; ! } } return *this; } - public: ! SString() : s(0), sSize(0), sLen(0), sizeGrowth(sizeGrowthDefault) { } ! SString(const SString &source) : sizeGrowth(sizeGrowthDefault) { ! s = StringAllocate(source.s); ! sSize = sLen = (s) ? strlen(s) : 0; } SString(const char *s_) : sizeGrowth(sizeGrowthDefault) { --- 34,150 ---- enum { measure_length=0xffffffffU}; ! protected: char *s; ///< The C string lenpos_t sSize; ///< The size of the buffer, less 1: ie. the maximum size of the string ! ! SContainer() : s(0), sSize(0) {} ! ~SContainer() { ! delete []s; // Suppose it was allocated using StringAllocate ! s = 0; ! sSize = 0; ! } ! /** Size of buffer. */ ! lenpos_t size() const { ! if (s) { ! return sSize; ! } else { ! return 0; } } + public: + /** + * Allocate uninitialized memory big enough to fit a string of the given length. + * @return the pointer to the new string + */ + static char *StringAllocate(lenpos_t len); + /** + * Duplicate a buffer/C string. + * Allocate memory of the given size, or big enough to fit the string if length isn't given; + * then copy the given string in the allocated memory. + * @return the pointer to the new string + */ + static char *StringAllocate( + const char *s, ///< The string to duplicate + lenpos_t len=measure_length); ///< The length of memory to allocate. Optional. + }; ! ! /** ! * @brief A string buffer class. ! * ! * Main use is to ask an API the length of a string it can provide, ! * then to allocate a buffer of the given size, and to provide this buffer ! * to the API to put the string. ! * This class is intended to be shortlived, to be transformed as SString ! * as soon as it holds the string, so it has little members. ! * Note: we assume the buffer is filled by the API. If the length can be shorter, ! * we should set sLen to strlen(sb.ptr()) in related SString constructor and assignment. ! */ ! class SBuffer : protected SContainer { ! public: ! SBuffer(lenpos_t len) { ! s = StringAllocate(len); ! if (s) { ! *s = '\0'; ! sSize = len; } else { + sSize = 0; + } + } + private: + /// Copy constructor + // Here only to be on the safe size, user should avoid returning SBuffer values. + SBuffer(const SBuffer &source) : SContainer() { + s = StringAllocate(source.s, source.sSize); + sSize = (s) ? source.sSize : 0; + } + /// Default assignment operator + // Same here, shouldn't be used + SBuffer &operator=(const SBuffer &source) { + if (this != &source) { delete []s; ! s = StringAllocate(source.s, source.sSize); ! sSize = (s) ? source.sSize : 0; } return *this; } public: ! /** Provide direct read/write access to buffer. */ ! char *ptr() { ! return s; } ! /** Ownership of the buffer have been taken, so release it. */ ! void reset() { ! s = 0; ! sSize = 0; ! } ! /** Size of buffer. */ ! lenpos_t size() const { ! return SContainer::size(); ! } ! }; ! ! ! /** ! * @brief A simple string class. ! * ! * Hold the length of the string for quick operations, ! * can have a buffer bigger than the string to avoid too many memory allocations and copies. ! * May have embedded zeroes as a result of @a substitute, but relies too heavily on C string ! * functions to allow reliable manipulations of these strings, other than simple appends, etc. ! */ ! class SString : protected SContainer { ! lenpos_t sLen; ///< The size of the string in s ! lenpos_t sizeGrowth; ///< Minimum growth size when appending strings ! enum { sizeGrowthDefault = 64 }; ! ! bool grow(lenpos_t lenNew); ! SString &assign(const char *sOther, lenpos_t sSize_=measure_length); ! ! public: ! SString() : sLen(0), sizeGrowth(sizeGrowthDefault) {} ! SString(const SString &source) : SContainer(), sizeGrowth(sizeGrowthDefault) { ! s = StringAllocate(source.s, source.sLen); ! sSize = sLen = (s) ? source.sLen : 0; } SString(const char *s_) : sizeGrowth(sizeGrowthDefault) { *************** *** 92,116 **** sSize = sLen = (s) ? strlen(s) : 0; } SString(const char *s_, lenpos_t first, lenpos_t last) : sizeGrowth(sizeGrowthDefault) { // note: expects the "last" argument to point one beyond the range end (a la STL iterators) s = StringAllocate(s_ + first, last - first); ! sSize = sLen = (s) ? strlen(s) : 0; ! } ! SString(int i) : sizeGrowth(sizeGrowthDefault) { ! char number[32]; ! sprintf(number, "%0d", i); ! s = StringAllocate(number); ! sSize = sLen = (s) ? strlen(s) : 0; ! } ! SString(double d, int precision) : sizeGrowth(sizeGrowthDefault) { ! char number[32]; ! sprintf(number, "%.*f", precision, d); ! s = StringAllocate(number); ! sSize = sLen = (s) ? strlen(s) : 0; } ~SString() { - delete []s; - s = 0; - sSize = 0; sLen = 0; } --- 152,169 ---- sSize = sLen = (s) ? strlen(s) : 0; } + SString(SBuffer &buf) : sizeGrowth(sizeGrowthDefault) { + s = buf.ptr(); + sSize = sLen = buf.size(); + // Consumes the given buffer! + buf.reset(); + } SString(const char *s_, lenpos_t first, lenpos_t last) : sizeGrowth(sizeGrowthDefault) { // note: expects the "last" argument to point one beyond the range end (a la STL iterators) s = StringAllocate(s_ + first, last - first); ! sSize = sLen = (s) ? last - first : 0; } + SString(int i); + SString(double d, int precision); ~SString() { sLen = 0; } *************** *** 123,130 **** /** Size of buffer. */ lenpos_t size() const { ! if (s) ! return sSize; ! else ! return 0; } /** Size of string in buffer. */ --- 176,180 ---- /** Size of buffer. */ lenpos_t size() const { ! return SContainer::size(); } /** Size of string in buffer. */ *************** *** 132,135 **** --- 182,189 ---- return sLen; } + /** Read access to a character of the string. */ + char operator[](lenpos_t i) const { + return (s && i < sSize) ? s[i] : '\0'; + } SString &operator=(const char *source) { return assign(source); *************** *** 137,169 **** SString &operator=(const SString &source) { if (this != &source) { ! assign(source.c_str()); } return *this; } ! bool operator==(const SString &sOther) const { ! if ((s == 0) && (sOther.s == 0)) ! return true; ! if ((s == 0) || (sOther.s == 0)) ! return false; ! return strcmp(s, sOther.s) == 0; ! } bool operator!=(const SString &sOther) const { return !operator==(sOther); } ! bool operator==(const char *sOther) const { ! if ((s == 0) && (sOther == 0)) ! return true; ! if ((s == 0) || (sOther == 0)) ! return false; ! return strcmp(s, sOther) == 0; ! } bool operator!=(const char *sOther) const { return !operator==(sOther); } ! bool contains(char ch) { ! if (s && *s) ! return strchr(s, ch) != 0; ! else ! return false; } void setsizegrowth(lenpos_t sizeGrowth_) { --- 191,208 ---- SString &operator=(const SString &source) { if (this != &source) { ! assign(source.s, source.sLen); } return *this; } ! bool operator==(const SString &sOther) const; bool operator!=(const SString &sOther) const { return !operator==(sOther); } ! bool operator==(const char *sOther) const; bool operator!=(const char *sOther) const { return !operator==(sOther); } ! bool contains(char ch) const { ! return (s && *s) ? strchr(s, ch) != 0 : false; } void setsizegrowth(lenpos_t sizeGrowth_) { *************** *** 171,178 **** } const char *c_str() const { ! if (s) ! return s; ! else ! return ""; } /** Give ownership of buffer to caller which must use delete[] to free buffer. */ --- 210,214 ---- } const char *c_str() const { ! return s ? s : ""; } /** Give ownership of buffer to caller which must use delete[] to free buffer. */ *************** *** 184,238 **** return sRet; } ! char operator[](lenpos_t i) const { ! if (s && i < sSize) // Or < sLen? Depends on the use, both are OK ! return s[i]; ! else ! return '\0'; ! } ! SString substr(lenpos_t subPos, lenpos_t subLen=measure_length) const { ! if (subPos >= sLen) { ! return SString(); // return a null string if start index is out of bounds ! } ! if ((subLen == measure_length) || (subPos + subLen > sLen)) { ! subLen = sLen - subPos; // can't substr past end of source string ! } ! return SString(s, subPos, subPos + subLen); ! } ! SString &lowercase(lenpos_t subPos = 0, lenpos_t subLen=measure_length) { ! if ((subLen == measure_length) || (subPos + subLen > sLen)) { ! subLen = sLen - subPos; // don't apply past end of string ! } ! for (lenpos_t i = subPos; i < subPos + subLen; i++) { ! if (s[i] < 'A' || s[i] > 'Z') ! continue; ! else ! s[i] = static_cast<char>(s[i] - 'A' + 'a'); ! } ! return *this; ! } ! SString &append(const char *sOther, lenpos_t sLenOther=measure_length, char sep = '\0') { ! if (!sOther) { ! return *this; ! } ! if (sLenOther == measure_length) { ! sLenOther = strlen(sOther); ! } ! int lenSep = 0; ! if (sLen && sep) { // Only add a separator if not empty ! lenSep = 1; ! } ! lenpos_t lenNew = sLen + sLenOther + lenSep; ! // Conservative about growing the buffer: don't do it, unless really needed ! if ((lenNew + 1 < sSize) || (grow(lenNew))) { ! if (lenSep) { ! s[sLen] = sep; ! sLen++; ! } ! memcpy(&s[sLen], sOther, sLenOther); ! sLen += sLenOther; ! s[sLen] = '\0'; ! } ! return *this; ! } SString &operator+=(const char *sOther) { return append(sOther, static_cast<lenpos_t>(measure_length)); --- 220,227 ---- return sRet; } ! SString substr(lenpos_t subPos, lenpos_t subLen=measure_length) const; ! SString &lowercase(lenpos_t subPos = 0, lenpos_t subLen=measure_length); ! SString &uppercase(lenpos_t subPos = 0, lenpos_t subLen=measure_length); ! SString &append(const char *sOther, lenpos_t sLenOther=measure_length, char sep = '\0'); SString &operator+=(const char *sOther) { return append(sOther, static_cast<lenpos_t>(measure_length)); *************** *** 247,365 **** return append(sOther, strlen(sOther), sep); } ! SString &insert(lenpos_t pos, const char *sOther, lenpos_t sLenOther=measure_length) { ! if (!sOther) { ! return *this; ! } ! if (sLenOther == measure_length) { ! sLenOther = strlen(sOther); ! } ! lenpos_t lenNew = sLen + sLenOther; ! // Conservative about growing the buffer: don't do it, unless really needed ! if ((lenNew + 1 < sSize) || grow(lenNew)) { ! lenpos_t moveChars = sLen - pos + 1; ! for (lenpos_t i = moveChars; i > 0; i--) { ! s[pos + sLenOther + i - 1] = s[pos + i - 1]; ! } ! memcpy(s + pos, sOther, sLenOther); ! sLen = lenNew; ! } ! return *this; ! } ! /** Remove @a len characters from the @a pos position, included. * Characters at pos + len and beyond replace characters at pos. * If @a len is 0, or greater than the length of the string * starting at @a pos, the string is just truncated at @a pos. */ ! void remove(lenpos_t pos, lenpos_t len) { ! if (len < 1 || pos + len >= sLen) { ! s[pos] = '\0'; ! sLen = pos; ! } else { ! for (lenpos_t i = pos; i < sLen - len + 1; i++) { ! s[i] = s[i+len]; ! } ! sLen -= len; ! } ! } SString &change(lenpos_t pos, char ch) { ! if (pos >= sLen) { // character changed must be in string bounds ! return *this; } - *(s + pos) = ch; return *this; } /** Read an integral numeric value from the string. */ int value() const { ! if (s) ! return atoi(s); ! else ! return 0; ! } ! int search(const char *sFind, lenpos_t start=0) const { ! if (start < sLen) { ! const char *sFound = strstr(s + start, sFind); ! if (sFound) { ! return sFound - s; ! } ! } ! return -1; } ! bool contains(const char *sFind) { return search(sFind) >= 0; } ! int substitute(char chFind, char chReplace) { ! int c = 0; ! char *t = s; ! while (t) { ! t = strchr(t, chFind); ! if (t) { ! *t = chReplace; ! t++; ! c++; ! } ! } ! return c; ! } ! int substitute(const char *sFind, const char *sReplace) { ! int c = 0; ! lenpos_t lenFind = strlen(sFind); ! lenpos_t lenReplace = strlen(sReplace); ! int posFound = search(sFind); ! while (posFound >= 0) { ! remove(posFound, lenFind); ! insert(posFound, sReplace, lenReplace); ! posFound = search(sFind, posFound + lenReplace); ! c++; ! } ! return c; ! } int remove(const char *sFind) { return substitute(sFind, ""); } - /** - * Duplicate a C string. - * Allocate memory of the given size, or big enough to fit the string if length isn't given; - * then copy the given string in the allocated memory. - * @return the pointer to the new string - */ - static char *StringAllocate( - const char *s, ///< The string to duplicate - lenpos_t len=measure_length) ///< The length of memory to allocate. Optional. - { - if (s == 0) { - return 0; - } - if (len == measure_length) { - len = strlen(s); - } - char *sNew = new char[len + 1]; - if (sNew) { - memcpy(sNew, s, len); - sNew[len] = '\0'; - } - return sNew; - } }; /** * Duplicate a C string. --- 236,273 ---- return append(sOther, strlen(sOther), sep); } ! SString &insert(lenpos_t pos, const char *sOther, lenpos_t sLenOther=measure_length); ! ! /** ! * Remove @a len characters from the @a pos position, included. * Characters at pos + len and beyond replace characters at pos. * If @a len is 0, or greater than the length of the string * starting at @a pos, the string is just truncated at @a pos. */ ! void remove(lenpos_t pos, lenpos_t len); ! SString &change(lenpos_t pos, char ch) { ! if (pos < sLen) { // character changed must be in string bounds ! *(s + pos) = ch; } return *this; } /** Read an integral numeric value from the string. */ int value() const { ! return s ? atoi(s) : 0; } ! bool startswith(const char *prefix); ! bool endswith(const char *suffix); ! int search(const char *sFind, lenpos_t start=0) const; ! bool contains(const char *sFind) const { return search(sFind) >= 0; } ! int substitute(char chFind, char chReplace); ! int substitute(const char *sFind, const char *sReplace); int remove(const char *sFind) { return substitute(sFind, ""); } }; + /** * Duplicate a C string. *************** *** 370,377 **** inline char *StringDup( const char *s, ///< The string to duplicate ! SString::lenpos_t len=SString::measure_length) ///< The length of memory to allocate. Optional. { ! return SString::StringAllocate(s, len); } #endif --- 278,289 ---- inline char *StringDup( const char *s, ///< The string to duplicate ! SContainer::lenpos_t len=SContainer::measure_length) ///< The length of memory to allocate. Optional. { ! return SContainer::StringAllocate(s, len); ! } ! ! #ifdef SCI_NAMESPACE } + #endif #endif Index: Accessor.h =================================================================== RCS file: /cvsroot/pywin32/pywin32/Pythonwin/Scintilla/include/Accessor.h,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** Accessor.h 2 Aug 2002 12:53:10 -0000 1.7 --- Accessor.h 10 Feb 2008 11:01:46 -0000 1.8 *************** *** 76,78 **** --- 76,79 ---- virtual void SetLevel(int line, int level)=0; virtual int IndentAmount(int line, int *flags, PFNIsCommentLeader pfnIsCommentLeader = 0)=0; + virtual void IndicatorFill(int start, int end, int indicator, int value)=0; }; Index: Scintilla.h =================================================================== RCS file: /cvsroot/pywin32/pywin32/Pythonwin/Scintilla/include/Scintilla.h,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** Scintilla.h 25 Nov 2003 10:45:20 -0000 1.14 --- Scintilla.h 10 Feb 2008 11:01:46 -0000 1.15 *************** *** 12,15 **** --- 12,19 ---- #define SCINTILLA_H + #if LCCWIN + typedef BOOL bool; + #endif + #if PLAT_WIN // Return false on failure: *************** *** 114,117 **** --- 118,123 ---- #define SC_MARK_ARROWS 24 #define SC_MARK_PIXMAP 25 + #define SC_MARK_FULLRECT 26 + #define SC_MARK_LEFTRECT 27 #define SC_MARK_CHARACTER 10000 #define SC_MARKNUM_FOLDEREND 25 *************** *** 133,138 **** --- 139,148 ---- #define SCI_MARKERPREVIOUS 2048 #define SCI_MARKERDEFINEPIXMAP 2049 + #define SCI_MARKERADDSET 2466 + #define SCI_MARKERSETALPHA 2476 #define SC_MARGIN_SYMBOL 0 #define SC_MARGIN_NUMBER 1 + #define SC_MARGIN_BACK 2 + #define SC_MARGIN_FORE 3 #define SCI_SETMARGINTYPEN 2240 #define SCI_GETMARGINTYPEN 2241 *************** *** 149,154 **** #define STYLE_CONTROLCHAR 36 #define STYLE_INDENTGUIDE 37 #define STYLE_LASTPREDEFINED 39 ! #define STYLE_MAX 127 #define SC_CHARSET_ANSI 0 #define SC_CHARSET_DEFAULT 1 --- 159,165 ---- #define STYLE_CONTROLCHAR 36 #define STYLE_INDENTGUIDE 37 + #define STYLE_CALLTIP 38 #define STYLE_LASTPREDEFINED 39 ! #define STYLE_MAX 255 #define SC_CHARSET_ANSI 0 #define SC_CHARSET_DEFAULT 1 *************** *** 162,165 **** --- 173,177 ---- #define SC_CHARSET_OEM 255 #define SC_CHARSET_RUSSIAN 204 + #define SC_CHARSET_CYRILLIC 1251 #define SC_CHARSET_SHIFTJIS 128 #define SC_CHARSET_SYMBOL 2 *************** *** 170,173 **** --- 182,186 ---- #define SC_CHARSET_VIETNAMESE 163 #define SC_CHARSET_THAI 222 + #define SC_CHARSET_8859_15 1000 #define SCI_STYLECLEARALL 2050 #define SCI_STYLESETFORE 2051 *************** *** 183,186 **** --- 196,212 ---- #define SC_CASE_UPPER 1 #define SC_CASE_LOWER 2 + #define SCI_STYLEGETFORE 2481 + #define SCI_STYLEGETBACK 2482 + #define SCI_STYLEGETBOLD 2483 + #define SCI_STYLEGETITALIC 2484 + #define SCI_STYLEGETSIZE 2485 + #define SCI_STYLEGETFONT 2486 + #define SCI_STYLEGETEOLFILLED 2487 + #define SCI_STYLEGETUNDERLINE 2488 + #define SCI_STYLEGETCASE 2489 + #define SCI_STYLEGETCHARACTERSET 2490 + #define SCI_STYLEGETVISIBLE 2491 + #define SCI_STYLEGETCHANGEABLE 2492 + #define SCI_STYLEGETHOTSPOT 2493 #define SCI_STYLESETCASE 2060 #define SCI_STYLESETCHARACTERSET 2066 *************** *** 188,191 **** --- 214,221 ---- #define SCI_SETSELFORE 2067 #define SCI_SETSELBACK 2068 + #define SCI_GETSELALPHA 2477 + #define SCI_SETSELALPHA 2478 + #define SCI_GETSELEOLFILLED 2479 + #define SCI_SETSELEOLFILLED 2480 #define SCI_SETCARETFORE 2069 #define SCI_ASSIGNCMDKEY 2070 *************** *** 199,203 **** #define SCI_BEGINUNDOACTION 2078 #define SCI_ENDUNDOACTION 2079 - #define INDIC_MAX 7 #define INDIC_PLAIN 0 #define INDIC_SQUIGGLE 1 --- 229,232 ---- *************** *** 207,210 **** --- 236,242 ---- #define INDIC_HIDDEN 5 #define INDIC_BOX 6 + #define INDIC_ROUNDBOX 7 + #define INDIC_MAX 31 + #define INDIC_CONTAINER 8 #define INDIC0_MASK 0x20 #define INDIC1_MASK 0x40 *************** *** 215,218 **** --- 247,252 ---- #define SCI_INDICSETFORE 2082 #define SCI_INDICGETFORE 2083 + #define SCI_INDICSETUNDER 2510 + #define SCI_INDICGETUNDER 2511 #define SCI_SETWHITESPACEFORE 2084 #define SCI_SETWHITESPACEBACK 2085 *************** *** 252,255 **** --- 286,293 ---- #define SCI_AUTOCGETTYPESEPARATOR 2285 #define SCI_AUTOCSETTYPESEPARATOR 2286 + #define SCI_AUTOCSETMAXWIDTH 2208 + #define SCI_AUTOCGETMAXWIDTH 2209 + #define SCI_AUTOCSETMAXHEIGHT 2210 + #define SCI_AUTOCGETMAXHEIGHT 2211 #define SCI_SETINDENT 2122 #define SCI_GETINDENT 2123 *************** *** 262,265 **** --- 300,307 ---- #define SCI_SETHSCROLLBAR 2130 #define SCI_GETHSCROLLBAR 2131 + #define SC_IV_NONE 0 + #define SC_IV_REAL 1 + #define SC_IV_LOOKFORWARD 2 + #define SC_IV_LOOKBOTH 3 #define SCI_SETINDENTATIONGUIDES 2132 #define SCI_GETINDENTATIONGUIDES 2133 *************** *** 347,352 **** --- 389,396 ---- #define SCI_CALLTIPSETFORE 2206 #define SCI_CALLTIPSETFOREHLT 2207 + #define SCI_CALLTIPUSESTYLE 2212 #define SCI_VISIBLEFROMDOCLINE 2220 #define SCI_DOCLINEFROMVISIBLE 2221 + #define SCI_WRAPCOUNT 2235 #define SC_FOLDLEVELBASE 0x400 #define SC_FOLDLEVELWHITEFLAG 0x1000 *************** *** 387,392 **** --- 431,449 ---- #define SC_WRAP_NONE 0 #define SC_WRAP_WORD 1 + #define SC_WRAP_CHAR 2 #define SCI_SETWRAPMODE 2268 #define SCI_GETWRAPMODE 2269 + #define SC_WRAPVISUALFLAG_NONE 0x0000 + #define SC_WRAPVISUALFLAG_END 0x0001 + #define SC_WRAPVISUALFLAG_START 0x0002 + #define SCI_SETWRAPVISUALFLAGS 2460 + #define SCI_GETWRAPVISUALFLAGS 2461 + #define SC_WRAPVISUALFLAGLOC_DEFAULT 0x0000 + #define SC_WRAPVISUALFLAGLOC_END_BY_TEXT 0x0001 + #define SC_WRAPVISUALFLAGLOC_START_BY_TEXT 0x0002 + #define SCI_SETWRAPVISUALFLAGSLOCATION 2462 + #define SCI_GETWRAPVISUALFLAGSLOCATION 2463 + #define SCI_SETWRAPSTARTINDENT 2464 + #define SCI_GETWRAPSTARTINDENT 2465 #define SC_CACHE_NONE 0 #define SC_CACHE_CARET 1 *************** *** 397,400 **** --- 454,459 ---- #define SCI_SETSCROLLWIDTH 2274 #define SCI_GETSCROLLWIDTH 2275 + #define SCI_SETSCROLLWIDTHTRACKING 2516 + #define SCI_GETSCROLLWIDTHTRACKING 2517 #define SCI_TEXTWIDTH 2276 #define SCI_SETENDATLASTLINE 2277 *************** *** 448,451 **** --- 507,511 ---- #define SCI_DELWORDLEFT 2335 #define SCI_DELWORDRIGHT 2336 + #define SCI_DELWORDRIGHTEND 2518 #define SCI_LINECUT 2337 #define SCI_LINEDELETE 2338 *************** *** 533,539 **** --- 593,603 ---- #define SCI_GETPRINTWRAPMODE 2407 #define SCI_SETHOTSPOTACTIVEFORE 2410 + #define SCI_GETHOTSPOTACTIVEFORE 2494 #define SCI_SETHOTSPOTACTIVEBACK 2411 + #define SCI_GETHOTSPOTACTIVEBACK 2495 #define SCI_SETHOTSPOTACTIVEUNDERLINE 2412 + #define SCI_GETHOTSPOTACTIVEUNDERLINE 2496 #define SCI_SETHOTSPOTSINGLELINE 2421 + #define SCI_GETHOTSPOTSINGLELINE 2497 #define SCI_PARADOWN 2413 #define SCI_PARADOWNEXTEND 2414 *************** *** 570,573 **** --- 634,672 ---- #define SCI_SETWHITESPACECHARS 2443 #define SCI_SETCHARSDEFAULT 2444 + #define SCI_AUTOCGETCURRENT 2445 + #define SCI_ALLOCATE 2446 + #define SCI_TARGETASUTF8 2447 + #define SCI_SETLENGTHFORENCODE 2448 + #define SCI_ENCODEDFROMUTF8 2449 + #define SCI_FINDCOLUMN 2456 + #define SCI_GETCARETSTICKY 2457 + #define SCI_SETCARETSTICKY 2458 + #define SCI_TOGGLECARETSTICKY 2459 + #define SCI_SETPASTECONVERTENDINGS 2467 + #define SCI_GETPASTECONVERTENDINGS 2468 + #define SCI_SELECTIONDUPLICATE 2469 + #define SC_ALPHA_TRANSPARENT 0 + #define SC_ALPHA_OPAQUE 255 + #define SC_ALPHA_NOALPHA 256 + #define SCI_SETCARETLINEBACKALPHA 2470 + #define SCI_GETCARETLINEBACKALPHA 2471 + #define CARETSTYLE_INVISIBLE 0 + #define CARETSTYLE_LINE 1 + #define CARETSTYLE_BLOCK 2 + #define SCI_SETCARETSTYLE 2512 + #define SCI_GETCARETSTYLE 2513 + #define SCI_SETINDICATORCURRENT 2500 + #define SCI_GETINDICATORCURRENT 2501 + #define SCI_SETINDICATORVALUE 2502 + #define SCI_GETINDICATORVALUE 2503 + #define SCI_INDICATORFILLRANGE 2504 + #define SCI_INDICATORCLEARRANGE 2505 + #define SCI_INDICATORALLONFOR 2506 + #define SCI_INDICATORVALUEAT 2507 + #define SCI_INDICATORSTART 2508 + #define SCI_INDICATOREND 2509 + #define SCI_SETPOSITIONCACHE 2514 + #define SCI_GETPOSITIONCACHE 2515 + #define SCI_COPYALLOWLINE 2519 #define SCI_STARTRECORD 3001 #define SCI_STOPRECORD 3002 *************** *** 580,583 **** --- 679,686 ---- #define SCI_SETLEXERLANGUAGE 4006 #define SCI_LOADLEXERLIBRARY 4007 + #define SCI_GETPROPERTY 4008 + #define SCI_GETPROPERTYEXPANDED 4009 + #define SCI_GETPROPERTYINT 4010 + #define SCI_GETSTYLEBITSNEEDED 4011 #define SC_MOD_INSERTTEXT 0x1 #define SC_MOD_DELETETEXT 0x2 *************** *** 587,595 **** #define SC_PERFORMED_UNDO 0x20 #define SC_PERFORMED_REDO 0x40 #define SC_LASTSTEPINUNDOREDO 0x100 #define SC_MOD_CHANGEMARKER 0x200 #define SC_MOD_BEFOREINSERT 0x400 #define SC_MOD_BEFOREDELETE 0x800 ! #define SC_MODEVENTMASKALL 0xF77 #define SCEN_CHANGE 768 #define SCEN_SETFOCUS 512 --- 690,703 ---- #define SC_PERFORMED_UNDO 0x20 #define SC_PERFORMED_REDO 0x40 + #define SC_MULTISTEPUNDOREDO 0x80 #define SC_LASTSTEPINUNDOREDO 0x100 #define SC_MOD_CHANGEMARKER 0x200 #define SC_MOD_BEFOREINSERT 0x400 #define SC_MOD_BEFOREDELETE 0x800 ! #define SC_MULTILINEUNDOREDO 0x1000 ! #define SC_STARTACTION 0x2000 ! #define SC_MOD_CHANGEINDICATOR 0x4000 ! #define SC_MOD_CHANGELINESTATE 0x8000 ! #define SC_MODEVENTMASKALL 0xFFFF #define SCEN_CHANGE 768 #define SCEN_SETFOCUS 512 *************** *** 612,615 **** --- 720,727 ---- #define SCK_SUBTRACT 311 #define SCK_DIVIDE 312 + #define SCK_WIN 313 + #define SCK_RWIN 314 + #define SCK_MENU 315 + #define SCMOD_NORM 0 #define SCMOD_SHIFT 1 #define SCMOD_CTRL 2 *************** *** 636,639 **** --- 748,754 ---- #define SCN_HOTSPOTDOUBLECLICK 2020 #define SCN_CALLTIPCLICK 2021 + #define SCN_AUTOCSELECTION 2022 + #define SCN_INDICATORCLICK 2023 + #define SCN_INDICATORRELEASE 2024 //--Autogenerated -- end of section automatically generated from Scintilla.iface *************** *** 642,645 **** --- 757,764 ---- // So older code that treats Scintilla as a RichEdit will work. + #ifdef SCI_NAMESPACE + namespace Scintilla { + #endif + struct CharacterRange { long cpMin; *************** *** 674,682 **** struct NotifyHeader { ! // hwndFrom is really an environment specifc window handle or pointer // but most clients of Scintilla.h do not have this type visible. - //WindowID hwndFrom; void *hwndFrom; ! unsigned int idFrom; unsigned int code; }; --- 793,801 ---- struct NotifyHeader { ! // Compatible with Windows NMHDR. ! // hwndFrom is really an environment specific window handle or pointer // but most clients of Scintilla.h do not have this type visible. void *hwndFrom; ! uptr_t idFrom; unsigned int code; }; *************** *** 688,692 **** int modifiers; // SCN_KEY int modificationType; // SCN_MODIFIED ! const char *text; // SCN_MODIFIED int length; // SCN_MODIFIED int linesAdded; // SCN_MODIFIED --- 807,811 ---- int modifiers; // SCN_KEY int modificationType; // SCN_MODIFIED ! const char *text; // SCN_MODIFIED, SCN_USERLISTSELECTION, SCN_AUTOCSELECTION int length; // SCN_MODIFIED int linesAdded; // SCN_MODIFIED *************** *** 703,706 **** --- 822,829 ---- }; + #ifdef SCI_NAMESPACE + } + #endif + // Deprecation section listing all API features that are deprecated and will // will be removed completely in a future version. Index: KeyWords.h =================================================================== RCS file: /cvsroot/pywin32/pywin32/Pythonwin/Scintilla/include/KeyWords.h,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** KeyWords.h 15 Apr 2002 15:11:51 -0000 1.5 --- KeyWords.h 10 Feb 2008 11:01:46 -0000 1.6 *************** *** 6,9 **** --- 6,13 ---- // The License.txt file describes the conditions under which this software may be distributed. + #ifdef SCI_NAMESPACE + namespace Scintilla { + #endif + typedef void (*LexerFunction)(unsigned int startPos, int lengthDoc, int initStyle, WordList *keywordlists[], Accessor &styler); *************** *** 21,24 **** --- 25,29 ---- LexerFunction fnFolder; const char * const * wordListDescriptions; + int styleBits; static const LexerModule *base; *************** *** 27,33 **** public: const char *languageName; ! LexerModule(int language_, LexerFunction fnLexer_, ! const char *languageName_=0, LexerFunction fnFolder_=0, ! const char * const wordListDescriptions_[] = NULL); int GetLanguage() const { return language; } --- 32,43 ---- public: const char *languageName; ! LexerModule(int language_, ! LexerFunction fnLexer_, ! const char *languageName_=0, ! LexerFunction fnFolder_=0, ! const char * const wordListDescriptions_[] = NULL, ! int styleBits_=5); ! virtual ~LexerModule() { ! } int GetLanguage() const { return language; } *************** *** 36,39 **** --- 46,51 ---- const char *GetWordListDescription(int index) const; + int GetStyleBitsNeeded() const; + virtual void Lex(unsigned int startPos, int lengthDoc, int initStyle, WordList *keywordlists[], Accessor &styler) const; *************** *** 44,47 **** --- 56,63 ---- }; + #ifdef SCI_NAMESPACE + } + #endif + /** * Check if a character is a space. Index: PropSet.h =================================================================== RCS file: /cvsroot/pywin32/pywin32/Pythonwin/Scintilla/include/PropSet.h,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** PropSet.h 25 Nov 2003 10:45:20 -0000 1.10 --- PropSet.h 10 Feb 2008 11:01:46 -0000 1.11 *************** *** 14,17 **** --- 14,21 ---- bool isprefix(const char *target, const char *prefix); + #ifdef SCI_NAMESPACE + namespace Scintilla { + #endif + struct Property { unsigned int hash; *************** *** 39,43 **** return ret; } ! static bool IncludesVar(const char *value, const char *key); public: PropSet *superPS; --- 43,47 ---- return ret; } ! public: PropSet *superPS; *************** *** 46,60 **** void Set(const char *key, const char *val, int lenKey=-1, int lenVal=-1); void Set(const char *keyVal); void SetMultiple(const char *s); ! SString Get(const char *key); ! SString GetExpanded(const char *key); ! SString Expand(const char *withVars, int maxExpands=100); ! int GetInt(const char *key, int defaultValue=0); ! SString GetWild(const char *keybase, const char *filename); ! SString GetNewExpand(const char *keybase, const char *filename=""); void Clear(); ! char *ToString(); // Caller must delete[] the return value ! bool GetFirst(char **key, char **val); ! bool GetNext(char **key, char **val); }; --- 50,66 ---- void Set(const char *key, const char *val, int lenKey=-1, int lenVal=-1); void Set(const char *keyVal); + void Unset(const char *key, int lenKey=-1); void SetMultiple(const char *s); ! SString Get(const char *key) const; ! SString GetExpanded(const char *key) const; ! SString Expand(const char *withVars, int maxExpands=100) const; ! int GetInt(const char *key, int defaultValue=0) const; void Clear(); ! char *ToString() const; // Caller must delete[] the return value ! ! private: ! // copy-value semantics not implemented ! PropSet(const PropSet ©); ! void operator=(const PropSet &assign); }; *************** *** 65,69 **** // Each word contains at least one character - a empty word acts as sentinel at the end. char **words; - char **wordsNoCase; char *list; int len; --- 71,74 ---- *************** *** 72,88 **** int starts[256]; WordList(bool onlyLineEnds_ = false) : ! words(0), wordsNoCase(0), list(0), len(0), onlyLineEnds(onlyLineEnds_), sorted(false) {} ~WordList() { Clear(); } operator bool() { return len ? true : false; } - char *operator[](int ind) { return words[ind]; } void Clear(); void Set(const char *s); - char *Allocate(int size); - void SetFromAllocated(); bool InList(const char *s); ! const char *GetNearestWord(const char *wordStart, int searchLen = -1, ! bool ignoreCase = false, SString wordCharacters="", int wordIndex = -1); ! char *GetNearestWords(const char *wordStart, int searchLen=-1, ! bool ignoreCase=false, char otherSeparator='\0'); }; --- 77,89 ---- int starts[256]; WordList(bool onlyLineEnds_ = false) : ! words(0), list(0), len(0), onlyLineEnds(onlyLineEnds_), ! sorted(false) ! {} ~WordList() { Clear(); } operator bool() { return len ? true : false; } void Clear(); void Set(const char *s); bool InList(const char *s); ! bool InListAbbreviated(const char *s, const char marker); }; *************** *** 91,93 **** --- 92,104 ---- } + #ifdef SCI_NAMESPACE + } + #endif + + #ifdef _MSC_VER + // Visual C++ doesn't like the private copy idiom for disabling + // the default copy constructor and operator=, but it's fine. + #pragma warning(disable: 4511 4512) + #endif + #endif Index: SciLexer.h =================================================================== RCS file: /cvsroot/pywin32/pywin32/Pythonwin/Scintilla/include/SciLexer.h,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** SciLexer.h 25 Nov 2003 10:45:20 -0000 1.11 --- SciLexer.h 10 Feb 2008 11:01:46 -0000 1.12 *************** *** 44,49 **** #define SCLEX_BULLANT 27 #define SCLEX_VBSCRIPT 28 - #define SCLEX_ASP 29 - #define SCLEX_PHP 30 #define SCLEX_BAAN 31 #define SCLEX_MATLAB 32 --- 44,47 ---- *************** *** 69,72 **** --- 67,105 ---- #define SCLEX_FORTH 52 #define SCLEX_ERLANG 53 + #define SCLEX_OCTAVE 54 + #define SCLEX_MSSQL 55 + #define SCLEX_VERILOG 56 + #define SCLEX_KIX 57 + #define SCLEX_GUI4CLI 58 + #define SCLEX_SPECMAN 59 + #define SCLEX_AU3 60 + #define SCLEX_APDL 61 + #define SCLEX_BASH 62 + #define SCLEX_ASN1 63 + #define SCLEX_VHDL 64 + #define SCLEX_CAML 65 + #define SCLEX_BLITZBASIC 66 + #define SCLEX_PUREBASIC 67 + #define SCLEX_HASKELL 68 + #define SCLEX_PHPSCRIPT 69 + #define SCLEX_TADS3 70 + #define SCLEX_REBOL 71 + #define SCLEX_SMALLTALK 72 + #define SCLEX_FLAGSHIP 73 + #define SCLEX_CSOUND 74 + #define SCLEX_FREEBASIC 75 + #define SCLEX_INNOSETUP 76 + #define SCLEX_OPAL 77 + #define SCLEX_SPICE 78 + #define SCLEX_D 79 + #define SCLEX_CMAKE 80 + #define SCLEX_GAP 81 + #define SCLEX_PLM 82 + #define SCLEX_PROGRESS 83 + #define SCLEX_ABAQUS 84 + #define SCLEX_ASYMPTOTE 85 + #define SCLEX_R 86 + #define SCLEX_MAGIK 87 + #define SCLEX_POWERSHELL 88 #define SCLEX_AUTOMATIC 1000 #define SCE_P_DEFAULT 0 *************** *** 84,87 **** --- 117,122 ---- #define SCE_P_COMMENTBLOCK 12 #define SCE_P_STRINGEOL 13 + #define SCE_P_WORD2 14 + #define SCE_P_DECORATOR 15 #define SCE_C_DEFAULT 0 #define SCE_C_COMMENT 1 *************** *** 104,107 **** --- 139,182 ---- #define SCE_C_COMMENTDOCKEYWORDERROR 18 #define SCE_C_GLOBALCLASS 19 + #define SCE_D_DEFAULT 0 + #define SCE_D_COMMENT 1 + #define SCE_D_COMMENTLINE 2 + #define SCE_D_COMMENTDOC 3 + #define SCE_D_COMMENTNESTED 4 + #define SCE_D_NUMBER 5 + #define SCE_D_WORD 6 + #define SCE_D_WORD2 7 + #define SCE_D_WORD3 8 + #define SCE_D_TYPEDEF 9 + #define SCE_D_STRING 10 + #define SCE_D_STRINGEOL 11 + #define SCE_D_CHARACTER 12 + #define SCE_D_OPERATOR 13 + #define SCE_D_IDENTIFIER 14 + #define SCE_D_COMMENTLINEDOC 15 + #define SCE_D_COMMENTDOCKEYWORD 16 + #define SCE_D_COMMENTDOCKEYWORDERROR 17 + #define SCE_TCL_DEFAULT 0 + #define SCE_TCL_COMMENT 1 + #define SCE_TCL_COMMENTLINE 2 + #define SCE_TCL_NUMBER 3 + #define SCE_TCL_WORD_IN_QUOTE 4 + #define SCE_TCL_IN_QUOTE 5 + #define SCE_TCL_OPERATOR 6 + #define SCE_TCL_IDENTIFIER 7 + #define SCE_TCL_SUBSTITUTION 8 + #define SCE_TCL_SUB_BRACE 9 + #define SCE_TCL_MODIFIER 10 + #define SCE_TCL_EXPAND 11 + #define SCE_TCL_WORD 12 + #define SCE_TCL_WORD2 13 + #define SCE_TCL_WORD3 14 + #define SCE_TCL_WORD4 15 + #define SCE_TCL_WORD5 16 + #define SCE_TCL_WORD6 17 + #define SCE_TCL_WORD7 18 + #define SCE_TCL_WORD8 19 + #define SCE_TCL_COMMENT_BOX 20 + #define SCE_TCL_BLOCK_COMMENT 21 #define SCE_H_DEFAULT 0 #define SCE_H_TAG 1 *************** *** 191,194 **** --- 266,270 ---- #define SCE_HP_OPERATOR 101 #define SCE_HP_IDENTIFIER 102 + #define SCE_HPHP_COMPLEX_VARIABLE 104 #define SCE_HPA_START 105 #define SCE_HPA_DEFAULT 106 *************** *** 230,233 **** --- 306,310 ---- #define SCE_PL_HASH 14 #define SCE_PL_SYMBOLTABLE 15 + #define SCE_PL_VARIABLE_INDEXER 16 #define SCE_PL_REGEX 17 #define SCE_PL_REGSUBST 18 *************** *** 244,247 **** --- 321,362 ---- #define SCE_PL_STRING_QR 29 #define SCE_PL_STRING_QW 30 + #define SCE_PL_POD_VERB 31 + #define SCE_PL_SUB_PROTOTYPE 40 + #define SCE_PL_FORMAT_IDENT 41 + #define SCE_PL_FORMAT 42 + #define SCE_RB_DEFAULT 0 + #define SCE_RB_ERROR 1 + #define SCE_RB_COMMENTLINE 2 + #define SCE_RB_POD 3 + #define SCE_RB_NUMBER 4 + #define SCE_RB_WORD 5 + #define SCE_RB_STRING 6 + #define SCE_RB_CHARACTER 7 + #define SCE_RB_CLASSNAME 8 + #define SCE_RB_DEFNAME 9 + #define SCE_RB_OPERATOR 10 + #define SCE_RB_IDENTIFIER 11 + #define SCE_RB_REGEX 12 + #define SCE_RB_GLOBAL 13 + #define SCE_RB_SYMBOL 14 + #define SCE_RB_MODULE_NAME 15 + #define SCE_RB_INSTANCE_VAR 16 + #define SCE_RB_CLASS_VAR 17 + #define SCE_RB_BACKTICKS 18 + #define SCE_RB_DATASECTION 19 + #define SCE_RB_HERE_DELIM 20 + #define SCE_RB_HERE_Q 21 + #define SCE_RB_HERE_QQ 22 + #define SCE_RB_HERE_QX 23 + #define SCE_RB_STRING_Q 24 + #define SCE_RB_STRING_QQ 25 + #define SCE_RB_STRING_QX 26 + #define SCE_RB_STRING_QR 27 + #define SCE_RB_STRING_QW 28 + #define SCE_RB_WORD_DEMOTED 29 + #define SCE_RB_STDIN 30 + #define SCE_RB_STDOUT 31 + #define SCE_RB_STDERR 40 + #define SCE_RB_UPPER_BOUND 41 #define SCE_B_DEFAULT 0 #define SCE_B_COMMENT 1 *************** *** 253,256 **** --- 368,381 ---- #define SCE_B_IDENTIFIER 7 #define SCE_B_DATE 8 + #define SCE_B_STRINGEOL 9 + #define SCE_B_KEYWORD2 10 + #define SCE_B_KEYWORD3 11 + #define SCE_B_KEYWORD4 12 + #define SCE_B_CONSTANT 13 + #define SCE_B_ASM 14 + #define SCE_B_LABEL 15 + #define SCE_B_ERROR 16 + #define SCE_B_HEXNUMBER 17 + #define SCE_B_BINNUMBER 18 #define SCE_PROPS_DEFAULT 0 #define SCE_PROPS_COMMENT 1 *************** *** 258,261 **** --- 383,387 ---- #define SCE_PROPS_ASSIGNMENT 3 #define SCE_PROPS_DEFVAL 4 + #define SCE_PROPS_KEY 5 #define SCE_L_DEFAULT 0 #define SCE_L_COMMAND 1 *************** *** 300,303 **** --- 426,434 ---- #define SCE_ERR_ELF 15 #define SCE_ERR_IFC 16 + #define SCE_ERR_IFORT 17 + #define SCE_ERR_ABSF 18 + #define SCE_ERR_TIDY 19 + #define SCE_ERR_JAVA_STACK 20 + #define SCE_ERR_VALUE 21 #define SCE_BAT_DEFAULT 0 #define SCE_BAT_COMMENT 1 *************** *** 374,381 **** --- 505,516 ---- #define SCE_LISP_NUMBER 2 #define SCE_LISP_KEYWORD 3 + #define SCE_LISP_KEYWORD_KW 4 + #define SCE_LISP_SYMBOL 5 #define SCE_LISP_STRING 6 #define SCE_LISP_STRINGEOL 8 #define SCE_LISP_IDENTIFIER 9 #define SCE_LISP_OPERATOR 10 + #define SCE_LISP_SPECIAL 11 + #define SCE_LISP_MULTI_COMMENT 12 #define SCE_EIFFEL_DEFAULT 0 #define SCE_EIFFEL_COMMENTLINE 1 *************** *** 418,421 **** --- 553,557 ---- #define SCE_MATLAB_OPERATOR 6 #define SCE_MATLAB_IDENTIFIER 7 + #define SCE_MATLAB_DOUBLEQUOTESTRING 8 #define SCE_SCRIPTOL_DEFAULT 0 #define SCE_SCRIPTOL_WHITE 1 *************** *** 479,482 **** --- 615,620 ---- #define SCE_CSS_DOUBLESTRING 13 #define SCE_CSS_SINGLESTRING 14 + #define SCE_CSS_IDENTIFIER2 15 + #define SCE_CSS_ATTRIBUTE 16 #define SCE_POV_DEFAULT 0 #define SCE_POV_COMMENT 1 *************** *** 549,552 **** --- 687,695 ---- #define SCE_NSIS_MACRODEF 12 #define SCE_NSIS_STRINGVAR 13 + #define SCE_NSIS_NUMBER 14 + #define SCE_NSIS_SECTIONGROUP 15 + #define SCE_NSIS_PAGEEX 16 + #define SCE_NSIS_FUNCTIONDEF 17 + #define SCE_NSIS_COMMENTBOX 18 #define SCE_MMIXAL_LEADWS 0 #define SCE_MMIXAL_COMMENT 1 *************** *** 577,585 **** #define SCE_CLW_KEYWORD 8 #define SCE_CLW_COMPILER_DIRECTIVE 9 ! #define SCE_CLW_BUILTIN_PROCEDURES_FUNCTION 10 ! #define SCE_CLW_STRUCTURE_DATA_TYPE 11 ! #define SCE_CLW_ATTRIBUTE 12 ! #define SCE_CLW_STANDARD_EQUATE 13 ! #define SCE_CLW_ERROR 14 #define SCE_LOT_DEFAULT 0 #define SCE_LOT_HEADER 1 --- 720,730 ---- #define SCE_CLW_KEYWORD 8 #define SCE_CLW_COMPILER_DIRECTIVE 9 ! #define SCE_CLW_RUNTIME_EXPRESSIONS 10 ! #define SCE_CLW_BUILTIN_PROCEDURES_FUNCTION 11 ! #define SCE_CLW_STRUCTURE_DATA_TYPE 12 ! #define SCE_CLW_ATTRIBUTE 13 ! #define SCE_CLW_STANDARD_EQUATE 14 ! #define SCE_CLW_ERROR 15 ! #define SCE_CLW_DEPRECATED 16 #define SCE_LOT_DEFAULT 0 #define SCE_LOT_HEADER 1 *************** *** 598,601 **** --- 743,747 ---- #define SCE_YAML_TEXT 7 #define SCE_YAML_ERROR 8 + #define SCE_YAML_OPERATOR 9 #define SCE_TEX_DEFAULT 0 #define SCE_TEX_SPECIAL 1 *************** *** 626,629 **** --- 772,1239 ---- #define SCE_ERLANG_NODE_NAME 13 #define SCE_ERLANG_UNKNOWN 31 + #define SCE_MSSQL_DEFAULT 0 + #define SCE_MSSQL_COMMENT 1 + #define SCE_MSSQL_LINE_COMMENT 2 + #define SCE_MSSQL_NUMBER 3 + #define SCE_MSSQL_STRING 4 + #define SCE_MSSQL_OPERATOR 5 + #define SCE_MSSQL_IDENTIFIER 6 + #define SCE_MSSQL_VARIABLE 7 + #define SCE_MSSQL_COLUMN_NAME 8 + #define SCE_MSSQL_STATEMENT 9 + #define SCE_MSSQL_DATATYPE 10 + #define SCE_MSSQL_SYSTABLE 11 + #define SCE_MSSQL_GLOBAL_VARIABLE 12 + #define SCE_MSSQL_FUNCTION 13 + #define SCE_MSSQL_STORED_PROCEDURE 14 + #define SCE_MSSQL_DEFAULT_PREF_DATATYPE 15 + #define SCE_MSSQL_COLUMN_NAME_2 16 + #define SCE_V_DEFAULT 0 + #define SCE_V_COMMENT 1 + #define SCE_V_COMMENTLINE 2 + #define SCE_V_COMMENTLINEBANG 3 + #define SCE_V_NUMBER 4 + #define SCE_V_WORD 5 + #define SCE_V_STRING 6 + #define SCE_V_WORD2 7 + #define SCE_V_WORD3 8 + #define SCE_V_PREPROCESSOR 9 + #define SCE_V_OPERATOR 10 + #define SCE_V_IDENTIFIER 11 + #define SCE_V_STRINGEOL 12 + #define SCE_V_USER 19 + #define SCE_KIX_DEFAULT 0 + #define SCE_KIX_COMMENT 1 + #define SCE_KIX_STRING1 2 + #define SCE_KIX_STRING2 3 + #define SCE_KIX_NUMBER 4 + #define SCE_KIX_VAR 5 + #define SCE_KIX_MACRO 6 + #define SCE_KIX_KEYWORD 7 + #define SCE_KIX_FUNCTIONS 8 + #define SCE_KIX_OPERATOR 9 + #define SCE_KIX_IDENTIFIER 31 + #define SCE_GC_DEFAULT 0 + #define SCE_GC_COMMENTLINE 1 + #define SCE_GC_COMMENTBLOCK 2 + #define SCE_GC_GLOBAL 3 + #define SCE_GC_EVENT 4 + #define SCE_GC_ATTRIBUTE 5 + #define SCE_GC_CONTROL 6 + #define SCE_GC_COMMAND 7 + #define SCE_GC_STRING 8 + #define SCE_GC_OPERATOR 9 + #define SCE_SN_DEFAULT 0 + #define SCE_SN_CODE 1 + #define SCE_SN_COMMENTLINE 2 + #define SCE_SN_COMMENTLINEBANG 3 + #define SCE_SN_NUMBER 4 + #define SCE_SN_WORD 5 + #define SCE_SN_STRING 6 + #define SCE_SN_WORD2 7 + #define SCE_SN_WORD3 8 + #define SCE_SN_PREPROCESSOR 9 + #define SCE_SN_OPERATOR 10 + #define SCE_SN_IDENTIFIER 11 + #define SCE_SN_STRINGEOL 12 + #define SCE_SN_REGEXTAG 13 + #define SCE_SN_SIGNAL 14 + #define SCE_SN_USER 19 + #define SCE_AU3_DEFAULT 0 + #define SCE_AU3_COMMENT 1 + #define SCE_AU3_COMMENTBLOCK 2 + #define SCE_AU3_NUMBER 3 + #define SCE_AU3_FUNCTION 4 + #define SCE_AU3_KEYWORD 5 + #define SCE_AU3_MACRO 6 + #define SCE_AU3_STRING 7 + #define SCE_AU3_OPERATOR 8 + #define SCE_AU3_VARIABLE 9 + #define SCE_AU3_SENT 10 + #define SCE_AU3_PREPROCESSOR 11 + #define SCE_AU3_SPECIAL 12 + #define SCE_AU3_EXPAND 13 + #define SCE_AU3_COMOBJ 14 + #define SCE_AU3_UDF 15 + #define SCE_APDL_DEFAULT 0 + #define SCE_APDL_COMMENT 1 + #define SCE_APDL_COMMENTBLOCK 2 + #define SCE_APDL_NUMBER 3 + #define SCE_APDL_STRING 4 + #define SCE_APDL_OPERATOR 5 + #define SCE_APDL_WORD 6 + #define SCE_APDL_PROCESSOR 7 + #define SCE_APDL_COMMAND 8 + #define SCE_APDL_SLASHCOMMAND 9 + #define SCE_APDL_STARCOMMAND 10 + #define SCE_APDL_ARGUMENT 11 + #define SCE_APDL_FUNCTION 12 + #define SCE_SH_DEFAULT 0 + #define SCE_SH_ERROR 1 + #define SCE_SH_COMMENTLINE 2 + #define SCE_SH_NUMBER 3 + #define SCE_SH_WORD 4 + #define SCE_SH_STRING 5 + #define SCE_SH_CHARACTER 6 + #define SCE_SH_OPERATOR 7 + #define SCE_SH_IDENTIFIER 8 + #define SCE_SH_SCALAR 9 + #define SCE_SH_PARAM 10 + #define SCE_SH_BACKTICKS 11 + #define SCE_SH_HERE_DELIM 12 + #define SCE_SH_HERE_Q 13 + #define SCE_ASN1_DEFAULT 0 + #define SCE_ASN1_COMMENT 1 + #define SCE_ASN1_IDENTIFIER 2 + #define SCE_ASN1_STRING 3 + #define SCE_ASN1_OID 4 + #define SCE_ASN1_SCALAR 5 + #define SCE_ASN1_KEYWORD 6 + #define SCE_ASN1_ATTRIBUTE 7 + #define SCE_ASN1_DESCRIPTOR 8 + #define SCE_ASN1_TYPE 9 + #define SCE_ASN1_OPERATOR 10 + #define SCE_VHDL_DEFAULT 0 + #define SCE_VHDL_COMMENT 1 + #define SCE_VHDL_COMMENTLINEBANG 2 + #define SCE_VHDL_NUMBER 3 + #define SCE_VHDL_STRING 4 + #define SCE_VHDL_OPERATOR 5 + #define SCE_VHDL_IDENTIFIER 6 + #define SCE_VHDL_STRINGEOL 7 + #define SCE_VHDL_KEYWORD 8 + #define SCE_VHDL_STDOPERATOR 9 + #define SCE_VHDL_ATTRIBUTE 10 + #define SCE_VHDL_STDFUNCTION 11 + #define SCE_VHDL_STDPACKAGE 12 + #define SCE_VHDL_STDTYPE 13 + #define SCE_VHDL_USERWORD 14 + #define SCE_CAML_DEFAULT 0 + #define SCE_CAML_IDENTIFIER 1 + #define SCE_CAML_TAGNAME 2 + #define SCE_CAML_KEYWORD 3 + #define SCE_CAML_KEYWORD2 4 + #define SCE_CAML_KEYWORD3 5 + #define SCE_CAML_LINENUM 6 + #define SCE_CAML_OPERATOR 7 + #define SCE_CAML_NUMBER 8 + #define SCE_CAML_CHAR 9 + #define SCE_CAML_STRING 11 + #define SCE_CAML_COMMENT 12 + #define SCE_CAML_COMMENT1 13 + #define SCE_CAML_COMMENT2 14 + #define SCE_CAML_COMMENT3 15 + #define SCE_HA_DEFAULT 0 + #define SCE_HA_IDENTIFIER 1 + #define SCE_HA_KEYWORD 2 + #define SCE_HA_NUMBER 3 + #define SCE_HA_STRING 4 + #define SCE_HA_CHARACTER 5 + #define SCE_HA_CLASS 6 + #define SCE_HA_MODULE 7 + #define SCE_HA_CAPITAL 8 + #define SCE_HA_DATA 9 + #define SCE_HA_IMPORT 10 + #define SCE_HA_OPERATOR 11 + #define SCE_HA_INSTANCE 12 + #define SCE_HA_COMMENTLINE 13 + #define SCE_HA_COMMENTBLOCK 14 + #define SCE_HA_COMMENTBLOCK2 15 + #define SCE_HA_COMMENTBLOCK3 16 + #define SCE_T3_DEFAULT 0 + #define SCE_T3_X_DEFAULT 1 + #define SCE_T3_PREPROCESSOR 2 + #define SCE_T3_BLOCK_COMMENT 3 + #define SCE_T3_LINE_COMMENT 4 + #define SCE_T3_OPERATOR 5 + #define SCE_T3_KEYWORD 6 + #define SCE_T3_NUMBER 7 + #define SCE_T3_IDENTIFIER 8 + #define SCE_T3_S_STRING 9 + #define SCE_T3_D_STRING 10 + #define SCE_T3_X_STRING 11 + #define SCE_T3_LIB_DIRECTIVE 12 + #define SCE_T3_MSG_PARAM 13 + #define SCE_T3_HTML_TAG 14 + #define SCE_T3_HTML_DEFAULT 15 + #define SCE_T3_HTML_STRING 16 + #define SCE_T3_USER1 17 + #define SCE_T3_USER2 18 + #define SCE_T3_USER3 19 + #define SCE_T3_BRACE 20 + #define SCE_REBOL_DEFAULT 0 + #define SCE_REBOL_COMMENTLINE 1 + #define SCE_REBOL_COMMENTBLOCK 2 + #define SCE_REBOL_PREFACE 3 + #define SCE_REBOL_OPERATOR 4 + #define SCE_REBOL_CHARACTER 5 + #define SCE_REBOL_QUOTEDSTRING 6 + #define SCE_REBOL_BRACEDSTRING 7 + #define SCE_REBOL_NUMBER 8 + #define SCE_REBOL_PAIR 9 + #define SCE_REBOL_TUPLE 10 + #define SCE_REBOL_BINARY 11 + #define SCE_REBOL_MONEY 12 + #define SCE_REBOL_ISSUE 13 + #define SCE_REBOL_TAG 14 + #define SCE_REBOL_FILE 15 + #define SCE_REBOL_EMAIL 16 + #define SCE_REBOL_URL 17 + #define SCE_REBOL_DATE 18 + #define SCE_REBOL_TIME 19 + #define SCE_REBOL_IDENTIFIER 20 + #define SCE_REBOL_WORD 21 + #define SCE_REBOL_WORD2 22 + #define SCE_REBOL_WORD3 23 + #define SCE_REBOL_WORD4 24 + #define SCE_REBOL_WORD5 25 + #define SCE_REBOL_WORD6 26 + #define SCE_REBOL_WORD7 27 + #define SCE_REBOL_WORD8 28 + #define SCE_SQL_DEFAULT 0 + #define SCE_SQL_COMMENT 1 + #define SCE_SQL_COMMENTLINE 2 + #define SCE_SQL_COMMENTDOC 3 + #define SCE_SQL_NUMBER 4 + #define SCE_SQL_WORD 5 + #define SCE_SQL_STRING 6 + #define SCE_SQL_CHARACTER 7 + #define SCE_SQL_SQLPLUS 8 + #define SCE_SQL_SQLPLUS_PROMPT 9 + #define SCE_SQL_OPERATOR 10 + #define SCE_SQL_IDENTIFIER 11 + #define SCE_SQL_SQLPLUS_COMMENT 13 + #define SCE_SQL_COMMENTLINEDOC 15 + #define SCE_SQL_WORD2 16 + #define SCE_SQL_COMMENTDOCKEYWORD 17 + #define SCE_SQL_COMMENTDOCKEYWORDERROR 18 + #define SCE_SQL_USER1 19 + #define SCE_SQL_USER2 20 + #define SCE_SQL_USER3 21 + #define SCE_SQL_USER4 22 + #define SCE_SQL_QUOTEDIDENTIFIER 23 + #define SCE_ST_DEFAULT 0 + #define SCE_ST_STRING 1 + #define SCE_ST_NUMBER 2 + #define SCE_ST_COMMENT 3 + #define SCE_ST_SYMBOL 4 + #define SCE_ST_BINARY 5 + #define SCE_ST_BOOL 6 + #define SCE_ST_SELF 7 + #define SCE_ST_SUPER 8 + #define SCE_ST_NIL 9 + #define SCE_ST_GLOBAL 10 + #define SCE_ST_RETURN 11 + #define SCE_ST_SPECIAL 12 + #define SCE_ST_KWSEND 13 + #define SCE_ST_ASSIGN 14 + #define SCE_ST_CHARACTER 15 + #define SCE_ST_SPEC_SEL 16 + #define SCE_FS_DEFAULT 0 + #define SCE_FS_COMMENT 1 + #define SCE_FS_COMMENTLINE 2 + #define SCE_FS_COMMENTDOC 3 + #define SCE_FS_COMMENTLINEDOC 4 + #define SCE_FS_COMMENTDOCKEYWORD 5 + #define SCE_FS_COMMENTDOCKEYWORDERROR 6 + #define SCE_FS_KEYWORD 7 + #define SCE_FS_KEYWORD2 8 + #define SCE_FS_KEYWORD3 9 + #define SCE_FS_KEYWORD4 10 + #define SCE_FS_NUMBER 11 + #define SCE_FS_STRING 12 + #define SCE_FS_PREPROCESSOR 13 + #define SCE_FS_OPERATOR 14 + #define SCE_FS_IDENTIFIER 15 + #define SCE_FS_DATE 16 + #define SCE_FS_STRINGEOL 17 + #define SCE_FS_CONSTANT 18 + #define SCE_FS_ASM 19 + #define SCE_FS_LABEL 20 + #define SCE_FS_ERROR 21 + #define SCE_FS_HEXNUMBER 22 + #define SCE_FS_BINNUMBER 23 + #define SCE_CSOUND_DEFAULT 0 + #define SCE_CSOUND_COMMENT 1 + #define SCE_CSOUND_NUMBER 2 + #define SCE_CSOUND_OPERATOR 3 + #define SCE_CSOUND_INSTR 4 + #define SCE_CSOUND_IDENTIFIER 5 + #define SCE_CSOUND_OPCODE 6 + #define SCE_CSOUND_HEADERSTMT 7 + #define SCE_CSOUND_USERKEYWORD 8 + #define SCE_CSOUND_COMMENTBLOCK 9 + #define SCE_CSOUND_PARAM 10 + #define SCE_CSOUND_ARATE_VAR 11 + #define SCE_CSOUND_KRATE_VAR 12 + #define SCE_CSOUND_IRATE_VAR 13 + #define SCE_CSOUND_GLOBAL_VAR 14 + #define SCE_CSOUND_STRINGEOL 15 + #define SCE_INNO_DEFAULT 0 + #define SCE_INNO_COMMENT 1 + #define SCE_INNO_KEYWORD 2 + #define SCE_INNO_PARAMETER 3 + #define SCE_INNO_SECTION 4 + #define SCE_INNO_PREPROC 5 + #define SCE_INNO_PREPROC_INLINE 6 + #define SCE_INNO_COMMENT_PASCAL 7 + #define SCE_INNO_KEYWORD_PASCAL 8 + #define SCE_INNO_KEYWORD_USER 9 + #define SCE_INNO_STRING_DOUBLE 10 + #define SCE_INNO_STRING_SINGLE 11 + #define SCE_INNO_IDENTIFIER 12 + #define SCE_OPAL_SPACE 0 + #define SCE_OPAL_COMMENT_BLOCK 1 + #define SCE_OPAL_COMMENT_LINE 2 + #define SCE_OPAL_INTEGER 3 + #define SCE_OPAL_KEYWORD 4 + #define SCE_OPAL_SORT 5 + #define SCE_OPAL_STRING 6 + #define SCE_OPAL_PAR 7 + #define SCE_OPAL_BOOL_CONST 8 + #define SCE_OPAL_DEFAULT 32 + #define SCE_SPICE_DEFAULT 0 + #define SCE_SPICE_IDENTIFIER 1 + #define SCE_SPICE_KEYWORD 2 + #define SCE_SPICE_KEYWORD2 3 + #define SCE_SPICE_KEYWORD3 4 + #define SCE_SPICE_NUMBER 5 + #define SCE_SPICE_DELIMITER 6 + #define SCE_SPICE_VALUE 7 + #define SCE_SPICE_COMMENTLINE 8 + #define SCE_CMAKE_DEFAULT 0 + #define SCE_CMAKE_COMMENT 1 + #define SCE_CMAKE_STRINGDQ 2 + #define SCE_CMAKE_STRINGLQ 3 + #define SCE_CMAKE_STRINGRQ 4 + #define SCE_CMAKE_COMMANDS 5 + #define SCE_CMAKE_PARAMETERS 6 + #define SCE_CMAKE_VARIABLE 7 + #define SCE_CMAKE_USERDEFINED 8 + #define SCE_CMAKE_WHILEDEF 9 + #define SCE_CMAKE_FOREACHDEF 10 + #define SCE_CMAKE_IFDEFINEDEF 11 + #define SCE_CMAKE_MACRODEF 12 + #define SCE_CMAKE_STRINGVAR 13 + #define SCE_CMAKE_NUMBER 14 + #define SCE_GAP_DEFAULT 0 + #define SCE_GAP_IDENTIFIER 1 + #define SCE_GAP_KEYWORD 2 + #define SCE_GAP_KEYWORD2 3 + #define SCE_GAP_KEYWORD3 4 + #define SCE_GAP_KEYWORD4 5 + #define SCE_GAP_STRING 6 + #define SCE_GAP_CHAR 7 + #define SCE_GAP_OPERATOR 8 + #define SCE_GAP_COMMENT ... [truncated message content] |
From: Mark H. <mha...@us...> - 2008-02-10 11:01:48
|
Update of /cvsroot/pywin32/pywin32/Pythonwin/Scintilla/win32 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18959/win32 Modified Files: PlatWin.cxx ScintRes.rc ScintillaWin.cxx scintilla.mak scintilla_vc6.mak Log Message: upgrade to scintilla 1.75 Index: scintilla_vc6.mak =================================================================== RCS file: /cvsroot/pywin32/pywin32/Pythonwin/Scintilla/win32/scintilla_vc6.mak,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** scintilla_vc6.mak 24 May 2007 12:50:50 -0000 1.3 --- scintilla_vc6.mak 10 Feb 2008 11:01:48 -0000 1.4 *************** *** 37,41 **** #-Zc:forScope -Zc:wchar_t ! CXXFLAGS=-Zi -TP -W4 -D_CRT_SECURE_NO_DEPRECATE # For something scary:-Wp64 CXXDEBUG=-Od -MTd -DDEBUG --- 37,41 ---- #-Zc:forScope -Zc:wchar_t ! CXXFLAGS=-Zi -TP -W4 # For something scary:-Wp64 CXXDEBUG=-Od -MTd -DDEBUG *************** *** 93,97 **** --- 93,99 ---- $(DIR_O)\CallTip.obj \ $(DIR_O)\CellBuffer.obj \ + $(DIR_O)\CharClassify.obj \ $(DIR_O)\ContractionState.obj \ + $(DIR_O)\Decoration.obj \ $(DIR_O)\Document.obj \ $(DIR_O)\Editor.obj \ *************** *** 100,105 **** --- 102,109 ---- $(DIR_O)\LineMarker.obj \ $(DIR_O)\PlatWin.obj \ + $(DIR_O)\PositionCache.obj \ $(DIR_O)\PropSet.obj \ $(DIR_O)\RESearch.obj \ + $(DIR_O)\RunStyles.obj \ $(DIR_O)\ScintillaBase.obj \ $(DIR_O)\ScintillaWin.obj \ *************** *** 112,151 **** --- 116,187 ---- #**LEXOBJS=\\\n\(\t$(DIR_O)\\\*.obj \\\n\) LEXOBJS=\ + $(DIR_O)\LexAbaqus.obj \ $(DIR_O)\LexAda.obj \ + $(DIR_O)\LexAPDL.obj \ $(DIR_O)\LexAsm.obj \ + $(DIR_O)\LexAsn1.obj \ + $(DIR_O)\LexASY.obj \ + $(DIR_O)\LexAU3.obj \ $(DIR_O)\LexAVE.obj \ $(DIR_O)\LexBaan.obj \ + $(DIR_O)\LexBash.obj \ + $(DIR_O)\LexBasic.obj \ $(DIR_O)\LexBullant.obj \ + $(DIR_O)\LexCaml.obj \ $(DIR_O)\LexCLW.obj \ + $(DIR_O)\LexCmake.obj \ $(DIR_O)\LexConf.obj \ $(DIR_O)\LexCPP.obj \ $(DIR_O)\LexCrontab.obj \ + $(DIR_O)\LexCsound.obj \ $(DIR_O)\LexCSS.obj \ + $(DIR_O)\LexD.obj \ $(DIR_O)\LexEiffel.obj \ $(DIR_O)\LexErlang.obj \ $(DIR_O)\LexEScript.obj \ + $(DIR_O)\LexFlagship.obj \ $(DIR_O)\LexForth.obj \ $(DIR_O)\LexFortran.obj \ + $(DIR_O)\LexGAP.obj \ + $(DIR_O)\LexGui4Cli.obj \ + $(DIR_O)\LexHaskell.obj \ $(DIR_O)\LexHTML.obj \ + $(DIR_O)\LexInno.obj \ + $(DIR_O)\LexKix.obj \ $(DIR_O)\LexLisp.obj \ $(DIR_O)\LexLout.obj \ $(DIR_O)\LexLua.obj \ + $(DIR_O)\LexMagik.obj \ $(DIR_O)\LexMatlab.obj \ $(DIR_O)\LexMetapost.obj \ $(DIR_O)\LexMMIXAL.obj \ $(DIR_O)\LexMPT.obj \ + $(DIR_O)\LexMSSQL.obj \ $(DIR_O)\LexNsis.obj \ + $(DIR_O)\LexOpal.obj \ $(DIR_O)\LexOthers.obj \ $(DIR_O)\LexPascal.obj \ $(DIR_O)\LexPB.obj \ $(DIR_O)\LexPerl.obj \ + $(DIR_O)\LexPLM.obj \ $(DIR_O)\LexPOV.obj \ + $(DIR_O)\LexPowerShell.obj \ + $(DIR_O)\LexProgress.obj \ $(DIR_O)\LexPS.obj \ $(DIR_O)\LexPython.obj \ + $(DIR_O)\LexR.obj \ + $(DIR_O)\LexRebol.obj \ $(DIR_O)\LexRuby.obj \ $(DIR_O)\LexScriptol.obj \ + $(DIR_O)\LexSmalltalk.obj \ + $(DIR_O)\LexSpecman.obj \ + $(DIR_O)\LexSpice.obj \ $(DIR_O)\LexSQL.obj \ + $(DIR_O)\LexTADS3.obj \ + $(DIR_O)\LexTCL.obj \ $(DIR_O)\LexTeX.obj \ $(DIR_O)\LexVB.obj \ + $(DIR_O)\LexVerilog.obj \ + $(DIR_O)\LexVHDL.obj \ $(DIR_O)\LexYAML.obj \ *************** *** 156,160 **** --- 192,198 ---- $(DIR_O)\CallTip.obj \ $(DIR_O)\CellBuffer.obj \ + $(DIR_O)\CharClassify.obj \ $(DIR_O)\ContractionState.obj \ + $(DIR_O)\Decoration.obj \ $(DIR_O)\Document.obj \ $(DIR_O)\DocumentAccessor.obj \ *************** *** 166,169 **** --- 204,209 ---- $(DIR_O)\LineMarker.obj \ $(DIR_O)\PlatWin.obj \ + $(DIR_O)\PositionCache.obj \ + $(DIR_O)\RunStyles.obj \ $(DIR_O)\RESearch.obj \ $(DIR_O)\PropSet.obj \ *************** *** 224,273 **** $(DIR_O)\AutoComplete.obj: ../src/AutoComplete.cxx ../include/Platform.h \ ! ../include/PropSet.h ../include/SString.h ../src/AutoComplete.h $(DIR_O)\CallTip.obj: ../src/CallTip.cxx ../include/Platform.h \ ! ../include/Scintilla.h ../src/CallTip.h $(DIR_O)\CellBuffer.obj: ../src/CellBuffer.cxx ../include/Platform.h \ ! ../include/Scintilla.h ../src/SVector.h ../src/CellBuffer.h $(DIR_O)\ContractionState.obj: ../src/ContractionState.cxx ../include/Platform.h \ ! ../src/ContractionState.h $(DIR_O)\Document.obj: ../src/Document.cxx ../include/Platform.h \ ! ../include/Scintilla.h ../src/SVector.h ../src/CellBuffer.h \ ! ../src/Document.h ../src/RESearch.h $(DIR_O)\DocumentAccessor.obj: ../src/DocumentAccessor.cxx ../include/Platform.h \ ! ../include/PropSet.h ../include/SString.h ../src/SVector.h \ ! ../include/Accessor.h ../src/DocumentAccessor.h ../src/CellBuffer.h \ ! ../include/Scintilla.h ../src/Document.h ! $(DIR_O)\Editor.obj: ../src/Editor.cxx ../include/Platform.h \ ! ../include/Scintilla.h ../src/ContractionState.h ../src/SVector.h \ ! ../src/CellBuffer.h ../src/KeyMap.h ../src/Indicator.h \ ! ../src/LineMarker.h ../src/Style.h ../src/ViewStyle.h \ ! ../src/Document.h ../src/Editor.h ../src/XPM.h $(DIR_O)\ExternalLexer.obj: ../src/ExternalLexer.cxx ../include/Platform.h \ ! ../include/SciLexer.h ../include/PropSet.h ../include/SString.h \ ! ../include/Accessor.h ../src/DocumentAccessor.h ../include/KeyWords.h \ ! ../src/ExternalLexer.h $(DIR_O)\Indicator.obj: ../src/Indicator.cxx ../include/Platform.h \ ! ../include/Scintilla.h ../src/Indicator.h ! $(DIR_O)\KeyMap.obj: ../src/KeyMap.cxx ../include/Platform.h \ ! ../include/Scintilla.h ../src/KeyMap.h $(DIR_O)\KeyWords.obj: ../src/KeyWords.cxx ../include/Platform.h \ ! ../include/PropSet.h ../include/SString.h ../include/Accessor.h \ ! ../include/KeyWords.h ../include/Scintilla.h ../include/SciLexer.h #++Autogenerated -- run src/LexGen.py to regenerate #**\n\($(DIR_O)\\\*.obj: ..\\src\\\*.cxx $(LEX_HEADERS)\n\n\) $(DIR_O)\LexAda.obj: ..\src\LexAda.cxx $(LEX_HEADERS) $(DIR_O)\LexAsm.obj: ..\src\LexAsm.cxx $(LEX_HEADERS) $(DIR_O)\LexAVE.obj: ..\src\LexAVE.cxx $(LEX_HEADERS) $(DIR_O)\LexBaan.obj: ..\src\LexBaan.cxx $(LEX_HEADERS) $(DIR_O)\LexBullant.obj: ..\src\LexBullant.cxx $(LEX_HEADERS) $(DIR_O)\LexCLW.obj: ..\src\LexCLW.cxx $(LEX_HEADERS) $(DIR_O)\LexConf.obj: ..\src\LexConf.cxx $(LEX_HEADERS) --- 264,341 ---- $(DIR_O)\AutoComplete.obj: ../src/AutoComplete.cxx ../include/Platform.h \ ! ../include/PropSet.h ../include/SString.h ../src/AutoComplete.h $(DIR_O)\CallTip.obj: ../src/CallTip.cxx ../include/Platform.h \ ! ../include/Scintilla.h ../src/CallTip.h $(DIR_O)\CellBuffer.obj: ../src/CellBuffer.cxx ../include/Platform.h \ ! ../include/Scintilla.h ../src/SVector.h ../src/SplitVector.h \ ! ../src/Partitioning.h ../src/CellBuffer.h ! $(DIR_O)\CharClassify.obj: ../src/CharClassify.cxx ../src/CharClassify.h $(DIR_O)\ContractionState.obj: ../src/ContractionState.cxx ../include/Platform.h \ ! ../src/ContractionState.h ! $(DIR_O)\Decoration.obj: ../src/Decoration.cxx ../include/Platform.h \ ! ../include/Scintilla.h ../src/SplitVector.h ../src/Partitioning.h \ ! ../src/RunStyles.h ../src/Decoration.h $(DIR_O)\Document.obj: ../src/Document.cxx ../include/Platform.h \ ! ../include/Scintilla.h ../src/SVector.h ../src/SplitVector.h \ ! ../src/Partitioning.h ../src/RunStyles.h ../src/CellBuffer.h \ ! ../src/CharClassify.h ../src/Decoration.h ../src/Document.h \ ! ../src/RESearch.h $(DIR_O)\DocumentAccessor.obj: ../src/DocumentAccessor.cxx ../include/Platform.h \ ! ../include/PropSet.h ../include/SString.h ../src/SVector.h \ ! ../include/Accessor.h ../src/DocumentAccessor.h ../src/SplitVector.h \ ! ../src/Partitioning.h ../src/RunStyles.h ../src/CellBuffer.h \ ! ../include/Scintilla.h ../src/CharClassify.h ../src/Decoration.h \ ! ../src/Document.h ! $(DIR_O)\Editor.obj: ../src/Editor.cxx ../include/Platform.h ../include/Scintilla.h \ ! ../src/ContractionState.h ../src/SVector.h ../src/SplitVector.h \ ! ../src/Partitioning.h ../src/CellBuffer.h ../src/KeyMap.h \ ! ../src/RunStyles.h ../src/Indicator.h ../src/XPM.h ../src/LineMarker.h \ ! ../src/Style.h ../src/ViewStyle.h ../src/CharClassify.h \ ! ../src/Decoration.h ../src/Document.h ../src/Editor.h $(DIR_O)\ExternalLexer.obj: ../src/ExternalLexer.cxx ../include/Platform.h \ ! ../include/Scintilla.h ../include/SciLexer.h ../include/PropSet.h \ ! ../include/SString.h ../include/Accessor.h ../src/DocumentAccessor.h \ ! ../include/KeyWords.h ../src/ExternalLexer.h $(DIR_O)\Indicator.obj: ../src/Indicator.cxx ../include/Platform.h \ ! ../include/Scintilla.h ../src/Indicator.h ! $(DIR_O)\KeyMap.obj: ../src/KeyMap.cxx ../include/Platform.h ../include/Scintilla.h \ ! ../src/KeyMap.h $(DIR_O)\KeyWords.obj: ../src/KeyWords.cxx ../include/Platform.h \ ! ../include/PropSet.h ../include/SString.h ../include/Accessor.h \ ! ../include/KeyWords.h ../include/Scintilla.h ../include/SciLexer.h #++Autogenerated -- run src/LexGen.py to regenerate #**\n\($(DIR_O)\\\*.obj: ..\\src\\\*.cxx $(LEX_HEADERS)\n\n\) + $(DIR_O)\LexAbaqus.obj: ..\src\LexAbaqus.cxx $(LEX_HEADERS) + $(DIR_O)\LexAda.obj: ..\src\LexAda.cxx $(LEX_HEADERS) + $(DIR_O)\LexAPDL.obj: ..\src\LexAPDL.cxx $(LEX_HEADERS) + $(DIR_O)\LexAsm.obj: ..\src\LexAsm.cxx $(LEX_HEADERS) + $(DIR_O)\LexAsn1.obj: ..\src\LexAsn1.cxx $(LEX_HEADERS) + + $(DIR_O)\LexASY.obj: ..\src\LexASY.cxx $(LEX_HEADERS) + + $(DIR_O)\LexAU3.obj: ..\src\LexAU3.cxx $(LEX_HEADERS) + $(DIR_O)\LexAVE.obj: ..\src\LexAVE.cxx $(LEX_HEADERS) $(DIR_O)\LexBaan.obj: ..\src\LexBaan.cxx $(LEX_HEADERS) + $(DIR_O)\LexBash.obj: ..\src\LexBash.cxx $(LEX_HEADERS) + + $(DIR_O)\LexBasic.obj: ..\src\LexBasic.cxx $(LEX_HEADERS) + $(DIR_O)\LexBullant.obj: ..\src\LexBullant.cxx $(LEX_HEADERS) + $(DIR_O)\LexCaml.obj: ..\src\LexCaml.cxx $(LEX_HEADERS) + $(DIR_O)\LexCLW.obj: ..\src\LexCLW.cxx $(LEX_HEADERS) + $(DIR_O)\LexCmake.obj: ..\src\LexCmake.cxx $(LEX_HEADERS) + $(DIR_O)\LexConf.obj: ..\src\LexConf.cxx $(LEX_HEADERS) *************** *** 276,281 **** --- 344,353 ---- $(DIR_O)\LexCrontab.obj: ..\src\LexCrontab.cxx $(LEX_HEADERS) + $(DIR_O)\LexCsound.obj: ..\src\LexCsound.cxx $(LEX_HEADERS) + $(DIR_O)\LexCSS.obj: ..\src\LexCSS.cxx $(LEX_HEADERS) + $(DIR_O)\LexD.obj: ..\src\LexD.cxx $(LEX_HEADERS) + $(DIR_O)\LexEiffel.obj: ..\src\LexEiffel.cxx $(LEX_HEADERS) *************** *** 284,293 **** --- 356,377 ---- $(DIR_O)\LexEScript.obj: ..\src\LexEScript.cxx $(LEX_HEADERS) + $(DIR_O)\LexFlagship.obj: ..\src\LexFlagship.cxx $(LEX_HEADERS) + $(DIR_O)\LexForth.obj: ..\src\LexForth.cxx $(LEX_HEADERS) $(DIR_O)\LexFortran.obj: ..\src\LexFortran.cxx $(LEX_HEADERS) + $(DIR_O)\LexGAP.obj: ..\src\LexGAP.cxx $(LEX_HEADERS) + + $(DIR_O)\LexGui4Cli.obj: ..\src\LexGui4Cli.cxx $(LEX_HEADERS) + + $(DIR_O)\LexHaskell.obj: ..\src\LexHaskell.cxx $(LEX_HEADERS) + $(DIR_O)\LexHTML.obj: ..\src\LexHTML.cxx $(LEX_HEADERS) + $(DIR_O)\LexInno.obj: ..\src\LexInno.cxx $(LEX_HEADERS) + + $(DIR_O)\LexKix.obj: ..\src\LexKix.cxx $(LEX_HEADERS) + $(DIR_O)\LexLisp.obj: ..\src\LexLisp.cxx $(LEX_HEADERS) *************** *** 296,299 **** --- 380,385 ---- $(DIR_O)\LexLua.obj: ..\src\LexLua.cxx $(LEX_HEADERS) + $(DIR_O)\LexMagik.obj: ..\src\LexMagik.cxx $(LEX_HEADERS) + $(DIR_O)\LexMatlab.obj: ..\src\LexMatlab.cxx $(LEX_HEADERS) *************** *** 304,309 **** --- 390,399 ---- $(DIR_O)\LexMPT.obj: ..\src\LexMPT.cxx $(LEX_HEADERS) + $(DIR_O)\LexMSSQL.obj: ..\src\LexMSSQL.cxx $(LEX_HEADERS) + $(DIR_O)\LexNsis.obj: ..\src\LexNsis.cxx $(LEX_HEADERS) + $(DIR_O)\LexOpal.obj: ..\src\LexOpal.cxx $(LEX_HEADERS) + $(DIR_O)\LexOthers.obj: ..\src\LexOthers.cxx $(LEX_HEADERS) *************** *** 314,333 **** --- 404,447 ---- $(DIR_O)\LexPerl.obj: ..\src\LexPerl.cxx $(LEX_HEADERS) + $(DIR_O)\LexPLM.obj: ..\src\LexPLM.cxx $(LEX_HEADERS) + $(DIR_O)\LexPOV.obj: ..\src\LexPOV.cxx $(LEX_HEADERS) + $(DIR_O)\LexPowerShell.obj: ..\src\LexPowerShell.cxx $(LEX_HEADERS) + + $(DIR_O)\LexProgress.obj: ..\src\LexProgress.cxx $(LEX_HEADERS) + $(DIR_O)\LexPS.obj: ..\src\LexPS.cxx $(LEX_HEADERS) $(DIR_O)\LexPython.obj: ..\src\LexPython.cxx $(LEX_HEADERS) + $(DIR_O)\LexR.obj: ..\src\LexR.cxx $(LEX_HEADERS) + + $(DIR_O)\LexRebol.obj: ..\src\LexRebol.cxx $(LEX_HEADERS) + $(DIR_O)\LexRuby.obj: ..\src\LexRuby.cxx $(LEX_HEADERS) $(DIR_O)\LexScriptol.obj: ..\src\LexScriptol.cxx $(LEX_HEADERS) + $(DIR_O)\LexSmalltalk.obj: ..\src\LexSmalltalk.cxx $(LEX_HEADERS) + + $(DIR_O)\LexSpecman.obj: ..\src\LexSpecman.cxx $(LEX_HEADERS) + + $(DIR_O)\LexSpice.obj: ..\src\LexSpice.cxx $(LEX_HEADERS) + $(DIR_O)\LexSQL.obj: ..\src\LexSQL.cxx $(LEX_HEADERS) + $(DIR_O)\LexTADS3.obj: ..\src\LexTADS3.cxx $(LEX_HEADERS) + + $(DIR_O)\LexTCL.obj: ..\src\LexTCL.cxx $(LEX_HEADERS) + $(DIR_O)\LexTeX.obj: ..\src\LexTeX.cxx $(LEX_HEADERS) $(DIR_O)\LexVB.obj: ..\src\LexVB.cxx $(LEX_HEADERS) + $(DIR_O)\LexVerilog.obj: ..\src\LexVerilog.cxx $(LEX_HEADERS) + + $(DIR_O)\LexVHDL.obj: ..\src\LexVHDL.cxx $(LEX_HEADERS) + $(DIR_O)\LexYAML.obj: ..\src\LexYAML.cxx $(LEX_HEADERS) *************** *** 336,383 **** $(DIR_O)\LineMarker.obj: ../src/LineMarker.cxx ../include/Platform.h \ ! ../include/Scintilla.h ../src/LineMarker.h ../src/XPM.h $(DIR_O)\PlatWin.obj: PlatWin.cxx ../include/Platform.h PlatformRes.h \ ! ../src/UniConversion.h ../src/XPM.h ! $(DIR_O)\PropSet.obj: ../src/PropSet.cxx ../include/Platform.h \ ! ../include/PropSet.h ../include/SString.h ! $(DIR_O)\RESearch.obj: ../src/RESearch.cxx ../src/RESearch.h $(DIR_O)\ScintillaBase.obj: ../src/ScintillaBase.cxx ../include/Platform.h \ ! ../include/Scintilla.h ../include/PropSet.h ../include/SString.h \ ! ../src/ContractionState.h ../src/SVector.h ../src/CellBuffer.h \ ! ../src/CallTip.h ../src/KeyMap.h ../src/Indicator.h \ ! ../src/LineMarker.h ../src/Style.h ../src/ViewStyle.h \ ! ../src/AutoComplete.h ../src/Document.h ../src/Editor.h \ ! ../src/ScintillaBase.h ../src/XPM.h ! $(DIR_O)\ScintillaBaseL.obj: ..\src\ScintillaBase.cxx ..\include\Platform.h ..\include\Scintilla.h ..\include\SciLexer.h \ ! ..\src\ContractionState.h ..\src\CellBuffer.h ..\src\CallTip.h ..\src\KeyMap.h ..\src\Indicator.h \ ! ..\src\LineMarker.h ..\src\Style.h ..\src\AutoComplete.h ..\src\ViewStyle.h ..\src\Document.h ..\src\Editor.h \ ! ..\src\ScintillaBase.h ..\include\PropSet.h ..\include\SString.h ..\include\Accessor.h \ ! ..\src\DocumentAccessor.h ..\include\KeyWords.h ../src/XPM.h $(DIR_O)\ScintillaWin.obj: ScintillaWin.cxx ../include/Platform.h \ ! ../include/Scintilla.h ../include/SString.h ../src/ContractionState.h \ ! ../src/SVector.h ../src/CellBuffer.h ../src/CallTip.h ../src/KeyMap.h \ ! ../src/Indicator.h ../src/LineMarker.h ../src/Style.h \ ! ../src/AutoComplete.h ../src/ViewStyle.h ../src/Document.h \ ! ../src/Editor.h ../src/ScintillaBase.h ../src/UniConversion.h ../src/XPM.h ! $(DIR_O)\ScintillaWinL.obj: ScintillaWin.cxx ..\include\Platform.h ..\include\Scintilla.h ..\include\SciLexer.h \ ! ..\src\ContractionState.h ..\src\CellBuffer.h ..\src\CallTip.h ..\src\KeyMap.h ..\src\Indicator.h \ ! ..\src\LineMarker.h ..\src\Style.h ..\src\AutoComplete.h ..\src\ViewStyle.h ..\src\Document.h ..\src\Editor.h \ ! ..\src\ScintillaBase.h ..\include\PropSet.h \ ! ..\include\SString.h ..\include\Accessor.h ..\include\KeyWords.h ..\src\UniConversion.h ../src/XPM.h ! $(DIR_O)\ScintillaWinS.obj: ScintillaWin.cxx ..\include\Platform.h ..\include\Scintilla.h \ ! ..\src\ContractionState.h ..\src\CellBuffer.h ..\src\CallTip.h ..\src\KeyMap.h ..\src\Indicator.h \ ! ..\src\LineMarker.h ..\src\Style.h ..\src\AutoComplete.h ..\src\ViewStyle.h ..\src\Document.h ..\src\Editor.h \ ! ..\src\ScintillaBase.h ..\src\UniConversion.h $(DIR_O)\Style.obj: ../src/Style.cxx ../include/Platform.h ../include/Scintilla.h \ ! ../src/Style.h $(DIR_O)\StyleContext.obj: ../src/StyleContext.cxx ../include/Platform.h \ ! ../include/PropSet.h ../include/SString.h ../include/Accessor.h \ ! ../src/StyleContext.h $(DIR_O)\UniConversion.obj: ../src/UniConversion.cxx ../src/UniConversion.h $(DIR_O)\ViewStyle.obj: ../src/ViewStyle.cxx ../include/Platform.h \ ! ../include/Scintilla.h ../src/Indicator.h ../src/LineMarker.h \ ! ../src/Style.h ../src/ViewStyle.h ../src/XPM.h $(DIR_O)\WindowAccessor.obj: ../src/WindowAccessor.cxx ../include/Platform.h \ ! ../include/PropSet.h ../include/SString.h ../include/Accessor.h \ ! ../include/WindowAccessor.h ../include/Scintilla.h $(DIR_O)\XPM.obj: ../src/XPM.cxx ../include/Platform.h ../src/XPM.h --- 450,514 ---- $(DIR_O)\LineMarker.obj: ../src/LineMarker.cxx ../include/Platform.h \ ! ../include/Scintilla.h ../src/XPM.h ../src/LineMarker.h $(DIR_O)\PlatWin.obj: PlatWin.cxx ../include/Platform.h PlatformRes.h \ ! ../src/UniConversion.h ../src/XPM.h ! $(DIR_O)\PropSet.obj: ../src/PropSet.cxx ../include/Platform.h ../include/PropSet.h \ ! ../include/SString.h ! $(DIR_O)\RESearch.obj: ../src/RESearch.cxx ../src/CharClassify.h ../src/RESearch.h ! $(DIR_O)\RunStyles.obj: ../src/RunStyles.cxx ../include/Platform.h \ ! ../include/Scintilla.h ../src/SplitVector.h ../src/Partitioning.h \ ! ../src/RunStyles.h $(DIR_O)\ScintillaBase.obj: ../src/ScintillaBase.cxx ../include/Platform.h \ ! ../include/Scintilla.h ../include/PropSet.h ../include/SString.h \ ! ../src/ContractionState.h ../src/SVector.h ../src/SplitVector.h \ ! ../src/Partitioning.h ../src/RunStyles.h ../src/CellBuffer.h \ ! ../src/CallTip.h ../src/KeyMap.h ../src/Indicator.h ../src/XPM.h \ ! ../src/LineMarker.h ../src/Style.h ../src/ViewStyle.h \ ! ../src/AutoComplete.h ../src/CharClassify.h ../src/Decoration.h \ ! ../src/Document.h ../src/Editor.h ../src/ScintillaBase.h ! $(DIR_O)\ScintillaBaseL.obj: ../src/ScintillaBase.cxx ../include/Platform.h \ ! ../include/Scintilla.h ../include/PropSet.h ../include/SString.h \ ! ../src/ContractionState.h ../src/SVector.h ../src/SplitVector.h \ ! ../src/Partitioning.h ../src/RunStyles.h ../src/CellBuffer.h \ ! ../src/CallTip.h ../src/KeyMap.h ../src/Indicator.h ../src/XPM.h \ ! ../src/LineMarker.h ../src/Style.h ../src/ViewStyle.h \ ! ../src/AutoComplete.h ../src/CharClassify.h ../src/Decoration.h \ ! ../src/Document.h ../src/Editor.h ../src/ScintillaBase.h $(DIR_O)\ScintillaWin.obj: ScintillaWin.cxx ../include/Platform.h \ ! ../include/Scintilla.h ../include/SString.h ../src/ContractionState.h \ ! ../src/SVector.h ../src/SplitVector.h ../src/Partitioning.h \ ! ../src/RunStyles.h ../src/CellBuffer.h ../src/CallTip.h ../src/KeyMap.h \ ! ../src/Indicator.h ../src/XPM.h ../src/LineMarker.h ../src/Style.h \ ! ../src/AutoComplete.h ../src/ViewStyle.h ../src/CharClassify.h \ ! ../src/Decoration.h ../src/Document.h ../src/Editor.h \ ! ../src/ScintillaBase.h ../src/UniConversion.h ! $(DIR_O)\ScintillaWinS.obj: ScintillaWin.cxx ../include/Platform.h \ ! ../include/Scintilla.h ../include/SString.h ../src/ContractionState.h \ ! ../src/SVector.h ../src/SplitVector.h ../src/Partitioning.h \ ! ../src/RunStyles.h ../src/CellBuffer.h ../src/CallTip.h ../src/KeyMap.h \ ! ../src/Indicator.h ../src/XPM.h ../src/LineMarker.h ../src/Style.h \ ! ../src/AutoComplete.h ../src/ViewStyle.h ../src/CharClassify.h \ ! ../src/Decoration.h ../src/Document.h ../src/Editor.h \ ! ../src/ScintillaBase.h ../src/UniConversion.h ! $(DIR_O)\ScintillaWinL.obj: ScintillaWin.cxx ../include/Platform.h \ ! ../include/Scintilla.h ../include/SString.h ../src/ContractionState.h \ ! ../src/SVector.h ../src/SplitVector.h ../src/Partitioning.h \ ! ../src/RunStyles.h ../src/CellBuffer.h ../src/CallTip.h ../src/KeyMap.h \ ! ../src/Indicator.h ../src/XPM.h ../src/LineMarker.h ../src/Style.h \ ! ../src/AutoComplete.h ../src/ViewStyle.h ../src/CharClassify.h \ ! ../src/Decoration.h ../src/Document.h ../src/Editor.h \ ! ../src/ScintillaBase.h ../src/UniConversion.h $(DIR_O)\Style.obj: ../src/Style.cxx ../include/Platform.h ../include/Scintilla.h \ ! ../src/Style.h $(DIR_O)\StyleContext.obj: ../src/StyleContext.cxx ../include/Platform.h \ ! ../include/PropSet.h ../include/SString.h ../include/Accessor.h \ ! ../src/StyleContext.h $(DIR_O)\UniConversion.obj: ../src/UniConversion.cxx ../src/UniConversion.h $(DIR_O)\ViewStyle.obj: ../src/ViewStyle.cxx ../include/Platform.h \ ! ../include/Scintilla.h ../src/SplitVector.h ../src/Partitioning.h \ ! ../src/RunStyles.h ../src/Indicator.h ../src/XPM.h ../src/LineMarker.h \ ! ../src/Style.h ../src/ViewStyle.h $(DIR_O)\WindowAccessor.obj: ../src/WindowAccessor.cxx ../include/Platform.h \ ! ../include/PropSet.h ../include/SString.h ../include/Accessor.h \ ! ../include/WindowAccessor.h ../include/Scintilla.h $(DIR_O)\XPM.obj: ../src/XPM.cxx ../include/Platform.h ../src/XPM.h Index: ScintillaWin.cxx =================================================================== RCS file: /cvsroot/pywin32/pywin32/Pythonwin/Scintilla/win32/ScintillaWin.cxx,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** ScintillaWin.cxx 25 Nov 2003 10:45:21 -0000 1.14 --- ScintillaWin.cxx 10 Feb 2008 11:01:48 -0000 1.15 *************** *** 13,17 **** #include <limits.h> ! #define _WIN32_WINNT 0x0400 #include <windows.h> #include <commctrl.h> --- 13,17 ---- #include <limits.h> ! #define _WIN32_WINNT 0x0500 #include <windows.h> [...1704 lines suppressed...] *** 2061,2064 **** --- 2418,2422 ---- sptr_t ScintillaWin::DirectFunction( ScintillaWin *sci, UINT iMessage, uptr_t wParam, sptr_t lParam) { + PLATFORM_ASSERT(::GetCurrentThreadId() == ::GetWindowThreadProcessId(sci->MainHWND(), NULL)); return sci->WndProc(iMessage, wParam, lParam); } *************** *** 2086,2090 **** } } else { ! if (iMessage == WM_DESTROY) { sci->Finalise(); delete sci; --- 2444,2448 ---- } } else { ! if (iMessage == WM_NCDESTROY) { sci->Finalise(); delete sci; Index: ScintRes.rc =================================================================== RCS file: /cvsroot/pywin32/pywin32/Pythonwin/Scintilla/win32/ScintRes.rc,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** ScintRes.rc 25 Nov 2003 10:45:21 -0000 1.11 --- ScintRes.rc 10 Feb 2008 11:01:48 -0000 1.12 *************** *** 1,4 **** // Resource file for Scintilla ! // Copyright 1998-2003 by Neil Hodgson <ne...@sc...> // The License.txt file describes the conditions under which this software may be distributed. --- 1,4 ---- // Resource file for Scintilla ! // Copyright 1998-2007 by Neil Hodgson <ne...@sc...> // The License.txt file describes the conditions under which this software may be distributed. *************** *** 10,15 **** VS_VERSION_INFO VERSIONINFO ! FILEVERSION 1, 5, 6, 0 ! PRODUCTVERSION 1, 5, 6, 0 FILEFLAGSMASK 0x3fL FILEFLAGS 0 --- 10,15 ---- VS_VERSION_INFO VERSIONINFO ! FILEVERSION 1, 7, 5, 0 ! PRODUCTVERSION 1, 7, 5, 0 FILEFLAGSMASK 0x3fL FILEFLAGS 0 *************** *** 28,37 **** VALUE "CompanyName", "Neil Hodgson ne...@sc...\0" VALUE "FileDescription", "Scintilla.DLL - a Source Editing Component\0" ! VALUE "FileVersion", "1.56\0" VALUE "InternalName", "Scintilla\0" ! VALUE "LegalCopyright", "Copyright 1998-2003 by Neil Hodgson\0" VALUE "OriginalFilename", "Scintilla.DLL\0" VALUE "ProductName", "Scintilla\0" ! VALUE "ProductVersion", "1.56\0" END END --- 28,37 ---- VALUE "CompanyName", "Neil Hodgson ne...@sc...\0" VALUE "FileDescription", "Scintilla.DLL - a Source Editing Component\0" ! VALUE "FileVersion", "1.75\0" VALUE "InternalName", "Scintilla\0" ! VALUE "LegalCopyright", "Copyright 1998-2007 by Neil Hodgson\0" VALUE "OriginalFilename", "Scintilla.DLL\0" VALUE "ProductName", "Scintilla\0" ! VALUE "ProductVersion", "1.75\0" END END Index: scintilla.mak =================================================================== RCS file: /cvsroot/pywin32/pywin32/Pythonwin/Scintilla/win32/scintilla.mak,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** scintilla.mak 25 Nov 2003 10:45:21 -0000 1.6 --- scintilla.mak 10 Feb 2008 11:01:48 -0000 1.7 *************** *** 36,40 **** LD=link ! CXXFLAGS=-Zi -TP -W4 -Zc:forScope -Zc:wchar_t # For something scary:-Wp64 CXXDEBUG=-Od -MTd -DDEBUG --- 36,40 ---- LD=link ! CXXFLAGS=-Zi -TP -W4 -Zc:forScope -Zc:wchar_t -D_CRT_SECURE_NO_DEPRECATE=1 # For something scary:-Wp64 CXXDEBUG=-Od -MTd -DDEBUG *************** *** 53,57 **** LD=ilink32 ! CXXFLAGS=-P -tWM -w -w-prc -w-inl -RT- -x- # Above turns off warnings for clarfying parentheses and inlines with for not expanded CXXDEBUG=-Od -v -DDEBUG --- 53,57 ---- LD=ilink32 ! CXXFLAGS=-P -tWM -w -w-prc -w-inl -w-pin -RT- -x- # Above turns off warnings for clarfying parentheses and inlines with for not expanded CXXDEBUG=-Od -v -DDEBUG *************** *** 91,95 **** --- 91,97 ---- $(DIR_O)\CallTip.obj \ $(DIR_O)\CellBuffer.obj \ + $(DIR_O)\CharClassify.obj \ $(DIR_O)\ContractionState.obj \ + $(DIR_O)\Decoration.obj \ $(DIR_O)\Document.obj \ $(DIR_O)\Editor.obj \ *************** *** 98,103 **** --- 100,107 ---- $(DIR_O)\LineMarker.obj \ $(DIR_O)\PlatWin.obj \ + $(DIR_O)\PositionCache.obj \ $(DIR_O)\PropSet.obj \ $(DIR_O)\RESearch.obj \ + $(DIR_O)\RunStyles.obj \ $(DIR_O)\ScintillaBase.obj \ $(DIR_O)\ScintillaWin.obj \ *************** *** 110,149 **** --- 114,185 ---- #**LEXOBJS=\\\n\(\t$(DIR_O)\\\*.obj \\\n\) LEXOBJS=\ + $(DIR_O)\LexAbaqus.obj \ $(DIR_O)\LexAda.obj \ + $(DIR_O)\LexAPDL.obj \ $(DIR_O)\LexAsm.obj \ + $(DIR_O)\LexAsn1.obj \ + $(DIR_O)\LexASY.obj \ + $(DIR_O)\LexAU3.obj \ $(DIR_O)\LexAVE.obj \ $(DIR_O)\LexBaan.obj \ + $(DIR_O)\LexBash.obj \ + $(DIR_O)\LexBasic.obj \ $(DIR_O)\LexBullant.obj \ + $(DIR_O)\LexCaml.obj \ $(DIR_O)\LexCLW.obj \ + $(DIR_O)\LexCmake.obj \ $(DIR_O)\LexConf.obj \ $(DIR_O)\LexCPP.obj \ $(DIR_O)\LexCrontab.obj \ + $(DIR_O)\LexCsound.obj \ $(DIR_O)\LexCSS.obj \ + $(DIR_O)\LexD.obj \ $(DIR_O)\LexEiffel.obj \ $(DIR_O)\LexErlang.obj \ $(DIR_O)\LexEScript.obj \ + $(DIR_O)\LexFlagship.obj \ $(DIR_O)\LexForth.obj \ $(DIR_O)\LexFortran.obj \ + $(DIR_O)\LexGAP.obj \ + $(DIR_O)\LexGui4Cli.obj \ + $(DIR_O)\LexHaskell.obj \ $(DIR_O)\LexHTML.obj \ + $(DIR_O)\LexInno.obj \ + $(DIR_O)\LexKix.obj \ $(DIR_O)\LexLisp.obj \ $(DIR_O)\LexLout.obj \ $(DIR_O)\LexLua.obj \ + $(DIR_O)\LexMagik.obj \ $(DIR_O)\LexMatlab.obj \ $(DIR_O)\LexMetapost.obj \ $(DIR_O)\LexMMIXAL.obj \ $(DIR_O)\LexMPT.obj \ + $(DIR_O)\LexMSSQL.obj \ $(DIR_O)\LexNsis.obj \ + $(DIR_O)\LexOpal.obj \ $(DIR_O)\LexOthers.obj \ $(DIR_O)\LexPascal.obj \ $(DIR_O)\LexPB.obj \ $(DIR_O)\LexPerl.obj \ + $(DIR_O)\LexPLM.obj \ $(DIR_O)\LexPOV.obj \ + $(DIR_O)\LexPowerShell.obj \ + $(DIR_O)\LexProgress.obj \ $(DIR_O)\LexPS.obj \ $(DIR_O)\LexPython.obj \ + $(DIR_O)\LexR.obj \ + $(DIR_O)\LexRebol.obj \ $(DIR_O)\LexRuby.obj \ $(DIR_O)\LexScriptol.obj \ + $(DIR_O)\LexSmalltalk.obj \ + $(DIR_O)\LexSpecman.obj \ + $(DIR_O)\LexSpice.obj \ $(DIR_O)\LexSQL.obj \ + $(DIR_O)\LexTADS3.obj \ + $(DIR_O)\LexTCL.obj \ $(DIR_O)\LexTeX.obj \ $(DIR_O)\LexVB.obj \ + $(DIR_O)\LexVerilog.obj \ + $(DIR_O)\LexVHDL.obj \ $(DIR_O)\LexYAML.obj \ *************** *** 154,158 **** --- 190,196 ---- $(DIR_O)\CallTip.obj \ $(DIR_O)\CellBuffer.obj \ + $(DIR_O)\CharClassify.obj \ $(DIR_O)\ContractionState.obj \ + $(DIR_O)\Decoration.obj \ $(DIR_O)\Document.obj \ $(DIR_O)\DocumentAccessor.obj \ *************** *** 164,169 **** $(DIR_O)\LineMarker.obj \ $(DIR_O)\PlatWin.obj \ ! $(DIR_O)\RESearch.obj \ $(DIR_O)\PropSet.obj \ $(DIR_O)\ScintillaBaseL.obj \ $(DIR_O)\ScintillaWinL.obj \ --- 202,209 ---- $(DIR_O)\LineMarker.obj \ $(DIR_O)\PlatWin.obj \ ! $(DIR_O)\PositionCache.obj \ $(DIR_O)\PropSet.obj \ + $(DIR_O)\RESearch.obj \ + $(DIR_O)\RunStyles.obj \ $(DIR_O)\ScintillaBaseL.obj \ $(DIR_O)\ScintillaWinL.obj \ *************** *** 222,271 **** $(DIR_O)\AutoComplete.obj: ../src/AutoComplete.cxx ../include/Platform.h \ ! ../include/PropSet.h ../include/SString.h ../src/AutoComplete.h $(DIR_O)\CallTip.obj: ../src/CallTip.cxx ../include/Platform.h \ ! ../include/Scintilla.h ../src/CallTip.h $(DIR_O)\CellBuffer.obj: ../src/CellBuffer.cxx ../include/Platform.h \ ! ../include/Scintilla.h ../src/SVector.h ../src/CellBuffer.h $(DIR_O)\ContractionState.obj: ../src/ContractionState.cxx ../include/Platform.h \ ! ../src/ContractionState.h $(DIR_O)\Document.obj: ../src/Document.cxx ../include/Platform.h \ ! ../include/Scintilla.h ../src/SVector.h ../src/CellBuffer.h \ ! ../src/Document.h ../src/RESearch.h $(DIR_O)\DocumentAccessor.obj: ../src/DocumentAccessor.cxx ../include/Platform.h \ ! ../include/PropSet.h ../include/SString.h ../src/SVector.h \ ! ../include/Accessor.h ../src/DocumentAccessor.h ../src/CellBuffer.h \ ! ../include/Scintilla.h ../src/Document.h ! $(DIR_O)\Editor.obj: ../src/Editor.cxx ../include/Platform.h \ ! ../include/Scintilla.h ../src/ContractionState.h ../src/SVector.h \ ! ../src/CellBuffer.h ../src/KeyMap.h ../src/Indicator.h \ ! ../src/LineMarker.h ../src/Style.h ../src/ViewStyle.h \ ! ../src/Document.h ../src/Editor.h ../src/XPM.h $(DIR_O)\ExternalLexer.obj: ../src/ExternalLexer.cxx ../include/Platform.h \ ! ../include/SciLexer.h ../include/PropSet.h ../include/SString.h \ ! ../include/Accessor.h ../src/DocumentAccessor.h ../include/KeyWords.h \ ! ../src/ExternalLexer.h $(DIR_O)\Indicator.obj: ../src/Indicator.cxx ../include/Platform.h \ ! ../include/Scintilla.h ../src/Indicator.h ! $(DIR_O)\KeyMap.obj: ../src/KeyMap.cxx ../include/Platform.h \ ! ../include/Scintilla.h ../src/KeyMap.h $(DIR_O)\KeyWords.obj: ../src/KeyWords.cxx ../include/Platform.h \ ! ../include/PropSet.h ../include/SString.h ../include/Accessor.h \ ! ../include/KeyWords.h ../include/Scintilla.h ../include/SciLexer.h #++Autogenerated -- run src/LexGen.py to regenerate #**\n\($(DIR_O)\\\*.obj: ..\\src\\\*.cxx $(LEX_HEADERS)\n\n\) $(DIR_O)\LexAda.obj: ..\src\LexAda.cxx $(LEX_HEADERS) $(DIR_O)\LexAsm.obj: ..\src\LexAsm.cxx $(LEX_HEADERS) $(DIR_O)\LexAVE.obj: ..\src\LexAVE.cxx $(LEX_HEADERS) $(DIR_O)\LexBaan.obj: ..\src\LexBaan.cxx $(LEX_HEADERS) $(DIR_O)\LexBullant.obj: ..\src\LexBullant.cxx $(LEX_HEADERS) $(DIR_O)\LexCLW.obj: ..\src\LexCLW.cxx $(LEX_HEADERS) $(DIR_O)\LexConf.obj: ..\src\LexConf.cxx $(LEX_HEADERS) --- 262,339 ---- $(DIR_O)\AutoComplete.obj: ../src/AutoComplete.cxx ../include/Platform.h \ ! ../include/PropSet.h ../include/SString.h ../src/AutoComplete.h $(DIR_O)\CallTip.obj: ../src/CallTip.cxx ../include/Platform.h \ ! ../include/Scintilla.h ../src/CallTip.h $(DIR_O)\CellBuffer.obj: ../src/CellBuffer.cxx ../include/Platform.h \ ! ../include/Scintilla.h ../src/SVector.h ../src/SplitVector.h \ ! ../src/Partitioning.h ../src/CellBuffer.h ! $(DIR_O)\CharClassify.obj: ../src/CharClassify.cxx ../src/CharClassify.h $(DIR_O)\ContractionState.obj: ../src/ContractionState.cxx ../include/Platform.h \ ! ../src/ContractionState.h ! $(DIR_O)\Decoration.obj: ../src/Decoration.cxx ../include/Platform.h \ ! ../include/Scintilla.h ../src/SplitVector.h ../src/Partitioning.h \ ! ../src/RunStyles.h ../src/Decoration.h $(DIR_O)\Document.obj: ../src/Document.cxx ../include/Platform.h \ ! ../include/Scintilla.h ../src/SVector.h ../src/SplitVector.h \ ! ../src/Partitioning.h ../src/RunStyles.h ../src/CellBuffer.h \ ! ../src/CharClassify.h ../src/Decoration.h ../src/Document.h \ ! ../src/RESearch.h $(DIR_O)\DocumentAccessor.obj: ../src/DocumentAccessor.cxx ../include/Platform.h \ ! ../include/PropSet.h ../include/SString.h ../src/SVector.h \ ! ../include/Accessor.h ../src/DocumentAccessor.h ../src/SplitVector.h \ ! ../src/Partitioning.h ../src/RunStyles.h ../src/CellBuffer.h \ ! ../include/Scintilla.h ../src/CharClassify.h ../src/Decoration.h \ ! ../src/Document.h ! $(DIR_O)\Editor.obj: ../src/Editor.cxx ../include/Platform.h ../include/Scintilla.h \ ! ../src/ContractionState.h ../src/SVector.h ../src/SplitVector.h \ ! ../src/Partitioning.h ../src/CellBuffer.h ../src/KeyMap.h \ ! ../src/RunStyles.h ../src/Indicator.h ../src/XPM.h ../src/LineMarker.h \ ! ../src/Style.h ../src/ViewStyle.h ../src/CharClassify.h \ ! ../src/Decoration.h ../src/Document.h ../src/Editor.h ../src/PositionCache.h $(DIR_O)\ExternalLexer.obj: ../src/ExternalLexer.cxx ../include/Platform.h \ ! ../include/Scintilla.h ../include/SciLexer.h ../include/PropSet.h \ ! ../include/SString.h ../include/Accessor.h ../src/DocumentAccessor.h \ ! ../include/KeyWords.h ../src/ExternalLexer.h $(DIR_O)\Indicator.obj: ../src/Indicator.cxx ../include/Platform.h \ ! ../include/Scintilla.h ../src/Indicator.h ! $(DIR_O)\KeyMap.obj: ../src/KeyMap.cxx ../include/Platform.h ../include/Scintilla.h \ ! ../src/KeyMap.h $(DIR_O)\KeyWords.obj: ../src/KeyWords.cxx ../include/Platform.h \ ! ../include/PropSet.h ../include/SString.h ../include/Accessor.h \ ! ../include/KeyWords.h ../include/Scintilla.h ../include/SciLexer.h #++Autogenerated -- run src/LexGen.py to regenerate #**\n\($(DIR_O)\\\*.obj: ..\\src\\\*.cxx $(LEX_HEADERS)\n\n\) + $(DIR_O)\LexAbaqus.obj: ..\src\LexAbaqus.cxx $(LEX_HEADERS) + $(DIR_O)\LexAda.obj: ..\src\LexAda.cxx $(LEX_HEADERS) + $(DIR_O)\LexAPDL.obj: ..\src\LexAPDL.cxx $(LEX_HEADERS) + $(DIR_O)\LexAsm.obj: ..\src\LexAsm.cxx $(LEX_HEADERS) + $(DIR_O)\LexAsn1.obj: ..\src\LexAsn1.cxx $(LEX_HEADERS) + + $(DIR_O)\LexASY.obj: ..\src\LexASY.cxx $(LEX_HEADERS) + + $(DIR_O)\LexAU3.obj: ..\src\LexAU3.cxx $(LEX_HEADERS) + $(DIR_O)\LexAVE.obj: ..\src\LexAVE.cxx $(LEX_HEADERS) $(DIR_O)\LexBaan.obj: ..\src\LexBaan.cxx $(LEX_HEADERS) + $(DIR_O)\LexBash.obj: ..\src\LexBash.cxx $(LEX_HEADERS) + + $(DIR_O)\LexBasic.obj: ..\src\LexBasic.cxx $(LEX_HEADERS) + $(DIR_O)\LexBullant.obj: ..\src\LexBullant.cxx $(LEX_HEADERS) + $(DIR_O)\LexCaml.obj: ..\src\LexCaml.cxx $(LEX_HEADERS) + $(DIR_O)\LexCLW.obj: ..\src\LexCLW.cxx $(LEX_HEADERS) + $(DIR_O)\LexCmake.obj: ..\src\LexCmake.cxx $(LEX_HEADERS) + $(DIR_O)\LexConf.obj: ..\src\LexConf.cxx $(LEX_HEADERS) *************** *** 274,279 **** --- 342,351 ---- $(DIR_O)\LexCrontab.obj: ..\src\LexCrontab.cxx $(LEX_HEADERS) + $(DIR_O)\LexCsound.obj: ..\src\LexCsound.cxx $(LEX_HEADERS) + $(DIR_O)\LexCSS.obj: ..\src\LexCSS.cxx $(LEX_HEADERS) + $(DIR_O)\LexD.obj: ..\src\LexD.cxx $(LEX_HEADERS) + $(DIR_O)\LexEiffel.obj: ..\src\LexEiffel.cxx $(LEX_HEADERS) *************** *** 282,291 **** --- 354,375 ---- $(DIR_O)\LexEScript.obj: ..\src\LexEScript.cxx $(LEX_HEADERS) + $(DIR_O)\LexFlagship.obj: ..\src\LexFlagship.cxx $(LEX_HEADERS) + $(DIR_O)\LexForth.obj: ..\src\LexForth.cxx $(LEX_HEADERS) $(DIR_O)\LexFortran.obj: ..\src\LexFortran.cxx $(LEX_HEADERS) + $(DIR_O)\LexGAP.obj: ..\src\LexGAP.cxx $(LEX_HEADERS) + + $(DIR_O)\LexGui4Cli.obj: ..\src\LexGui4Cli.cxx $(LEX_HEADERS) + + $(DIR_O)\LexHaskell.obj: ..\src\LexHaskell.cxx $(LEX_HEADERS) + $(DIR_O)\LexHTML.obj: ..\src\LexHTML.cxx $(LEX_HEADERS) + $(DIR_O)\LexInno.obj: ..\src\LexInno.cxx $(LEX_HEADERS) + + $(DIR_O)\LexKix.obj: ..\src\LexKix.cxx $(LEX_HEADERS) + $(DIR_O)\LexLisp.obj: ..\src\LexLisp.cxx $(LEX_HEADERS) *************** *** 294,297 **** --- 378,383 ---- $(DIR_O)\LexLua.obj: ..\src\LexLua.cxx $(LEX_HEADERS) + $(DIR_O)\LexMagik.obj: ..\src\LexMagik.cxx $(LEX_HEADERS) + $(DIR_O)\LexMatlab.obj: ..\src\LexMatlab.cxx $(LEX_HEADERS) *************** *** 302,307 **** --- 388,397 ---- $(DIR_O)\LexMPT.obj: ..\src\LexMPT.cxx $(LEX_HEADERS) + $(DIR_O)\LexMSSQL.obj: ..\src\LexMSSQL.cxx $(LEX_HEADERS) + $(DIR_O)\LexNsis.obj: ..\src\LexNsis.cxx $(LEX_HEADERS) + $(DIR_O)\LexOpal.obj: ..\src\LexOpal.cxx $(LEX_HEADERS) + $(DIR_O)\LexOthers.obj: ..\src\LexOthers.cxx $(LEX_HEADERS) *************** *** 312,331 **** --- 402,445 ---- $(DIR_O)\LexPerl.obj: ..\src\LexPerl.cxx $(LEX_HEADERS) + $(DIR_O)\LexPLM.obj: ..\src\LexPLM.cxx $(LEX_HEADERS) + $(DIR_O)\LexPOV.obj: ..\src\LexPOV.cxx $(LEX_HEADERS) + $(DIR_O)\LexPowerShell.obj: ..\src\LexPowerShell.cxx $(LEX_HEADERS) + + $(DIR_O)\LexProgress.obj: ..\src\LexProgress.cxx $(LEX_HEADERS) + $(DIR_O)\LexPS.obj: ..\src\LexPS.cxx $(LEX_HEADERS) $(DIR_O)\LexPython.obj: ..\src\LexPython.cxx $(LEX_HEADERS) + $(DIR_O)\LexR.obj: ..\src\LexR.cxx $(LEX_HEADERS) + + $(DIR_O)\LexRebol.obj: ..\src\LexRebol.cxx $(LEX_HEADERS) + $(DIR_O)\LexRuby.obj: ..\src\LexRuby.cxx $(LEX_HEADERS) $(DIR_O)\LexScriptol.obj: ..\src\LexScriptol.cxx $(LEX_HEADERS) + $(DIR_O)\LexSmalltalk.obj: ..\src\LexSmalltalk.cxx $(LEX_HEADERS) + + $(DIR_O)\LexSpecman.obj: ..\src\LexSpecman.cxx $(LEX_HEADERS) + + $(DIR_O)\LexSpice.obj: ..\src\LexSpice.cxx $(LEX_HEADERS) + $(DIR_O)\LexSQL.obj: ..\src\LexSQL.cxx $(LEX_HEADERS) + $(DIR_O)\LexTADS3.obj: ..\src\LexTADS3.cxx $(LEX_HEADERS) + + $(DIR_O)\LexTCL.obj: ..\src\LexTCL.cxx $(LEX_HEADERS) + $(DIR_O)\LexTeX.obj: ..\src\LexTeX.cxx $(LEX_HEADERS) $(DIR_O)\LexVB.obj: ..\src\LexVB.cxx $(LEX_HEADERS) + $(DIR_O)\LexVerilog.obj: ..\src\LexVerilog.cxx $(LEX_HEADERS) + + $(DIR_O)\LexVHDL.obj: ..\src\LexVHDL.cxx $(LEX_HEADERS) + $(DIR_O)\LexYAML.obj: ..\src\LexYAML.cxx $(LEX_HEADERS) *************** *** 334,381 **** $(DIR_O)\LineMarker.obj: ../src/LineMarker.cxx ../include/Platform.h \ ! ../include/Scintilla.h ../src/LineMarker.h ../src/XPM.h $(DIR_O)\PlatWin.obj: PlatWin.cxx ../include/Platform.h PlatformRes.h \ ! ../src/UniConversion.h ../src/XPM.h ! $(DIR_O)\PropSet.obj: ../src/PropSet.cxx ../include/Platform.h \ ! ../include/PropSet.h ../include/SString.h ! $(DIR_O)\RESearch.obj: ../src/RESearch.cxx ../src/RESearch.h $(DIR_O)\ScintillaBase.obj: ../src/ScintillaBase.cxx ../include/Platform.h \ ! ../include/Scintilla.h ../include/PropSet.h ../include/SString.h \ ! ../src/ContractionState.h ../src/SVector.h ../src/CellBuffer.h \ ! ../src/CallTip.h ../src/KeyMap.h ../src/Indicator.h \ ! ../src/LineMarker.h ../src/Style.h ../src/ViewStyle.h \ ! ../src/AutoComplete.h ../src/Document.h ../src/Editor.h \ ! ../src/ScintillaBase.h ../src/XPM.h ! $(DIR_O)\ScintillaBaseL.obj: ..\src\ScintillaBase.cxx ..\include\Platform.h ..\include\Scintilla.h ..\include\SciLexer.h \ ! ..\src\ContractionState.h ..\src\CellBuffer.h ..\src\CallTip.h ..\src\KeyMap.h ..\src\Indicator.h \ ! ..\src\LineMarker.h ..\src\Style.h ..\src\AutoComplete.h ..\src\ViewStyle.h ..\src\Document.h ..\src\Editor.h \ ! ..\src\ScintillaBase.h ..\include\PropSet.h ..\include\SString.h ..\include\Accessor.h \ ! ..\src\DocumentAccessor.h ..\include\KeyWords.h ../src/XPM.h $(DIR_O)\ScintillaWin.obj: ScintillaWin.cxx ../include/Platform.h \ ! ../include/Scintilla.h ../include/SString.h ../src/ContractionState.h \ ! ../src/SVector.h ../src/CellBuffer.h ../src/CallTip.h ../src/KeyMap.h \ ! ../src/Indicator.h ../src/LineMarker.h ../src/Style.h \ ! ../src/AutoComplete.h ../src/ViewStyle.h ../src/Document.h \ ! ../src/Editor.h ../src/ScintillaBase.h ../src/UniConversion.h ../src/XPM.h ! $(DIR_O)\ScintillaWinL.obj: ScintillaWin.cxx ..\include\Platform.h ..\include\Scintilla.h ..\include\SciLexer.h \ ! ..\src\ContractionState.h ..\src\CellBuffer.h ..\src\CallTip.h ..\src\KeyMap.h ..\src\Indicator.h \ ! ..\src\LineMarker.h ..\src\Style.h ..\src\AutoComplete.h ..\src\ViewStyle.h ..\src\Document.h ..\src\Editor.h \ ! ..\src\ScintillaBase.h ..\include\PropSet.h \ ! ..\include\SString.h ..\include\Accessor.h ..\include\KeyWords.h ..\src\UniConversion.h ../src/XPM.h ! $(DIR_O)\ScintillaWinS.obj: ScintillaWin.cxx ..\include\Platform.h ..\include\Scintilla.h \ ! ..\src\ContractionState.h ..\src\CellBuffer.h ..\src\CallTip.h ..\src\KeyMap.h ..\src\Indicator.h \ ! ..\src\LineMarker.h ..\src\Style.h ..\src\AutoComplete.h ..\src\ViewStyle.h ..\src\Document.h ..\src\Editor.h \ ! ..\src\ScintillaBase.h ..\src\UniConversion.h $(DIR_O)\Style.obj: ../src/Style.cxx ../include/Platform.h ../include/Scintilla.h \ ! ../src/Style.h $(DIR_O)\StyleContext.obj: ../src/StyleContext.cxx ../include/Platform.h \ ! ../include/PropSet.h ../include/SString.h ../include/Accessor.h \ ! ../src/StyleContext.h $(DIR_O)\UniConversion.obj: ../src/UniConversion.cxx ../src/UniConversion.h $(DIR_O)\ViewStyle.obj: ../src/ViewStyle.cxx ../include/Platform.h \ ! ../include/Scintilla.h ../src/Indicator.h ../src/LineMarker.h \ ! ../src/Style.h ../src/ViewStyle.h ../src/XPM.h $(DIR_O)\WindowAccessor.obj: ../src/WindowAccessor.cxx ../include/Platform.h \ ! ../include/PropSet.h ../include/SString.h ../include/Accessor.h \ ! ../include/WindowAccessor.h ../include/Scintilla.h $(DIR_O)\XPM.obj: ../src/XPM.cxx ../include/Platform.h ../src/XPM.h --- 448,518 ---- $(DIR_O)\LineMarker.obj: ../src/LineMarker.cxx ../include/Platform.h \ ! ../include/Scintilla.h ../src/XPM.h ../src/LineMarker.h $(DIR_O)\PlatWin.obj: PlatWin.cxx ../include/Platform.h PlatformRes.h \ ! ../src/UniConversion.h ../src/XPM.h ! $(DIR_O)\PositionCache.obj: ../src/Editor.cxx ../include/Platform.h ../include/Scintilla.h \ ! ../src/ContractionState.h ../src/SVector.h ../src/SplitVector.h \ ! ../src/Partitioning.h ../src/CellBuffer.h ../src/KeyMap.h \ ! ../src/RunStyles.h ../src/Indicator.h ../src/XPM.h ../src/LineMarker.h \ ! ../src/Style.h ../src/ViewStyle.h ../src/CharClassify.h \ ! ../src/Decoration.h ../src/Document.h ../src/Editor.h ../src/PositionCache.h ! $(DIR_O)\PropSet.obj: ../src/PropSet.cxx ../include/Platform.h ../include/PropSet.h \ ! ../include/SString.h ! $(DIR_O)\RESearch.obj: ../src/RESearch.cxx ../src/CharClassify.h ../src/RESearch.h ! $(DIR_O)\RunStyles.obj: ../src/RunStyles.cxx ../include/Platform.h \ ! ../include/Scintilla.h ../src/SplitVector.h ../src/Partitioning.h \ ! ../src/RunStyles.h $(DIR_O)\ScintillaBase.obj: ../src/ScintillaBase.cxx ../include/Platform.h \ ! ../include/Scintilla.h ../include/PropSet.h ../include/SString.h \ ! ../src/ContractionState.h ../src/SVector.h ../src/SplitVector.h \ ! ../src/Partitioning.h ../src/RunStyles.h ../src/CellBuffer.h \ ! ../src/CallTip.h ../src/KeyMap.h ../src/Indicator.h ../src/XPM.h \ ! ../src/LineMarker.h ../src/Style.h ../src/ViewStyle.h \ ! ../src/AutoComplete.h ../src/CharClassify.h ../src/Decoration.h \ ! ../src/Document.h ../src/Editor.h ../src/ScintillaBase.h ! $(DIR_O)\ScintillaBaseL.obj: ../src/ScintillaBase.cxx ../include/Platform.h \ ! ../include/Scintilla.h ../include/PropSet.h ../include/SString.h \ ! ../src/ContractionState.h ../src/SVector.h ../src/SplitVector.h \ ! ../src/Partitioning.h ../src/RunStyles.h ../src/CellBuffer.h \ ! ../src/CallTip.h ../src/KeyMap.h ../src/Indicator.h ../src/XPM.h \ ! ../src/LineMarker.h ../src/Style.h ../src/ViewStyle.h \ ! ../src/AutoComplete.h ../src/CharClassify.h ../src/Decoration.h \ ! ../src/Document.h ../src/Editor.h ../src/ScintillaBase.h $(DIR_O)\ScintillaWin.obj: ScintillaWin.cxx ../include/Platform.h \ ! ../include/Scintilla.h ../include/SString.h ../src/ContractionState.h \ ! ../src/SVector.h ../src/SplitVector.h ../src/Partitioning.h \ ! ../src/RunStyles.h ../src/CellBuffer.h ../src/CallTip.h ../src/KeyMap.h \ ! ../src/Indicator.h ../src/XPM.h ../src/LineMarker.h ../src/Style.h \ ! ../src/AutoComplete.h ../src/ViewStyle.h ../src/CharClassify.h \ ! ../src/Decoration.h ../src/Document.h ../src/Editor.h \ ! ../src/ScintillaBase.h ../src/UniConversion.h ! $(DIR_O)\ScintillaWinS.obj: ScintillaWin.cxx ../include/Platform.h \ ! ../include/Scintilla.h ../include/SString.h ../src/ContractionState.h \ ! ../src/SVector.h ../src/SplitVector.h ../src/Partitioning.h \ ! ../src/RunStyles.h ../src/CellBuffer.h ../src/CallTip.h ../src/KeyMap.h \ ! ../src/Indicator.h ../src/XPM.h ../src/LineMarker.h ../src/Style.h \ ! ../src/AutoComplete.h ../src/ViewStyle.h ../src/CharClassify.h \ ! ../src/Decoration.h ../src/Document.h ../src/Editor.h \ ! ../src/ScintillaBase.h ../src/UniConversion.h ! $(DIR_O)\ScintillaWinL.obj: ScintillaWin.cxx ../include/Platform.h \ ! ../include/Scintilla.h ../include/SString.h ../src/ContractionState.h \ ! ../src/SVector.h ../src/SplitVector.h ../src/Partitioning.h \ ! ../src/RunStyles.h ../src/CellBuffer.h ../src/CallTip.h ../src/KeyMap.h \ ! ../src/Indicator.h ../src/XPM.h ../src/LineMarker.h ../src/Style.h \ ! ../src/AutoComplete.h ../src/ViewStyle.h ../src/CharClassify.h \ ! ../src/Decoration.h ../src/Document.h ../src/Editor.h \ ! ../src/ScintillaBase.h ../src/UniConversion.h $(DIR_O)\Style.obj: ../src/Style.cxx ../include/Platform.h ../include/Scintilla.h \ ! ../src/Style.h $(DIR_O)\StyleContext.obj: ../src/StyleContext.cxx ../include/Platform.h \ ! ../include/PropSet.h ../include/SString.h ../include/Accessor.h \ ! ../src/StyleContext.h $(DIR_O)\UniConversion.obj: ../src/UniConversion.cxx ../src/UniConversion.h $(DIR_O)\ViewStyle.obj: ../src/ViewStyle.cxx ../include/Platform.h \ ! ../include/Scintilla.h ../src/SplitVector.h ../src/Partitioning.h \ ! ../src/RunStyles.h ../src/Indicator.h ../src/XPM.h ../src/LineMarker.h \ ! ../src/Style.h ../src/ViewStyle.h $(DIR_O)\WindowAccessor.obj: ../src/WindowAccessor.cxx ../include/Platform.h \ ! ../include/PropSet.h ../include/SString.h ../include/Accessor.h \ ! ../include/WindowAccessor.h ../include/Scintilla.h $(DIR_O)\XPM.obj: ../src/XPM.cxx ../include/Platform.h ../src/XPM.h Index: PlatWin.cxx =================================================================== RCS file: /cvsroot/pywin32/pywin32/Pythonwin/Scintilla/win32/PlatWin.cxx,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** PlatWin.cxx 24 May 2007 12:50:50 -0000 1.13 --- PlatWin.cxx 10 Feb 2008 11:01:48 -0000 1.14 *************** *** 43,51 **** --- 43,76 ---- ::SetWindowLong(hWnd, 0, reinterpret_cast<LONG>(ptr)); } + + #ifndef GWLP_USERDATA + #define GWLP_USERDATA GWL_USERDATA + #endif + + #ifndef GWLP_WNDPROC + #define GWLP_WNDPROC GWL_WNDPROC [...1853 lines suppressed...] ListBoxX_Register(); } --- 2190,2206 ---- void Platform_Initialise(void *hInstance) { ! OSVERSIONINFO osv = {sizeof(OSVERSIONINFO),0,0,0,0,TEXT("")}; ::GetVersionEx(&osv); onNT = osv.dwPlatformId == VER_PLATFORM_WIN32_NT; ::InitializeCriticalSection(&crPlatformLock); hinstPlatformRes = reinterpret_cast<HINSTANCE>(hInstance); + // This may be called from DllMain, in which case the call to LoadLibrary + // is bad because it can upset the DLL load order. + if (!hDLLImage) { + hDLLImage = ::LoadLibrary(TEXT("Msimg32")); + } + if (hDLLImage) { + AlphaBlendFn = (AlphaBlendSig)::GetProcAddress(hDLLImage, "AlphaBlend"); + } ListBoxX_Register(); } |
From: Mark H. <mha...@us...> - 2008-02-10 10:02:08
|
Update of /cvsroot/pywin32/pywin32 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29622 Modified Files: setup.py Log Message: Much saner handling of the SDK include/lib paths - gets things building from 2.2->2.6 again Index: setup.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/setup.py,v retrieving revision 1.65 retrieving revision 1.66 diff -C2 -d -r1.65 -r1.66 *** setup.py 7 Feb 2008 05:43:13 -0000 1.65 --- setup.py 10 Feb 2008 10:02:09 -0000 1.66 *************** *** 218,222 **** # dead ends so we only consider the job done if we find the "windows.h" # landmark. ! DEBUG = False landmark = "include\\windows.h" # 1. The use might have their current environment setup for the --- 218,222 ---- # dead ends so we only consider the job done if we find the "windows.h" # landmark. ! DEBUG = False # can't use log.debug - not setup yet landmark = "include\\windows.h" # 1. The use might have their current environment setup for the *************** *** 410,413 **** --- 410,467 ---- return result + def finalize_options(self, build_ext): + # distutils doesn't define this function for an Extension - it is + # our own invention, and called just before the extension is built. + if not build_ext.mingw32: + if self.pch_header: + self.extra_compile_args = self.extra_compile_args or [] + # /YX doesn't work in vs2008 + if is_32bit and get_build_version() < 9.0: + self.extra_compile_args.append("/YX"+self.pch_header) + pch_name = os.path.join(build_ext.build_temp, self.name) + ".pch" + self.extra_compile_args.append("/Fp"+pch_name) + + # Put our DLL base address in. + base = self.base_address + if not base: + base = dll_base_addresses[self.name] + self.extra_link_args.append("/BASE:0x%x" % (base,)) + + # like Python, always use debug info, even in release builds + # (note the compiler doesn't include debug info, so you only get + # basic info - but its better than nothing!) + # For now use the temp dir - later we may package them, so should + # maybe move them next to the output file. + # ack - but fails with obscure errors in py23 :( + if sys.version_info > (2,4): + pch_dir = os.path.join(build_ext.build_temp) + if not build_ext.debug: + self.extra_compile_args.append("/Zi") + self.extra_compile_args.append("/Fd%s\%s_vc.pdb" % + (pch_dir, self.name)) + self.extra_link_args.append("/DEBUG") + self.extra_link_args.append("/PDB:%s\%s.pdb" % + (pch_dir, self.name)) + # enable unwind semantics - some stuff needs it and I can't see + # it hurting + self.extra_compile_args.append("/EHsc") + + # Try and find the MFC source code, so we can reach inside for + # some of the ActiveX support we need. We need to do this late, so + # the environment is setup correctly. + # Only used by the win32uiole extensions, but I can't be + # bothered making a subclass just for this - so they all get it! + found_mfc = False + for incl in os.environ.get("INCLUDE", "").split(os.pathsep): + # first is a "standard" MSVC install, second is the Vista SDK. + for candidate in ("..\src\occimpl.h", "..\..\src\mfc\occimpl.h"): + check = os.path.join(incl, candidate) + if os.path.isfile(check): + self.extra_compile_args.append('/DMFC_OCC_IMPL_H=\\"%s\\"' % candidate) + found_mfc = True + break + if found_mfc: + break + class WinExt_pythonwin(WinExt): def __init__ (self, name, **kw): *************** *** 515,523 **** if self.mingw32: self.libraries.append("stdc++") ! # Try and locate the platform SDK - this prevents the user from needing ! # to manually add these directories via the MSVC UI. # (Note that just having them in INCLUDE/LIB does *not* work - ! # distutils thinks it knows better, and resets those vars. ! # Note: sdk_dir is a global. if 'DISTUTILS_USE_SDK' in os.environ: # theoretically, this means the environment is already setup --- 569,615 ---- if self.mingw32: self.libraries.append("stdc++") ! ! self.excluded_extensions = [] # list of (ext, why) ! self.swig_cpp = True # hrm - deprecated - should use swig_opts=-c++?? ! ! def _fixup_sdk_dirs(self): ! # Adjust paths etc for the platform SDK - this prevents the user from ! # needing to manually add these directories via the MSVC UI. Note ! # that we currently ensure the SDK dirs are before the compiler ! # dirs, so its no problem if they have added these dirs to the UI) ! # (Note that just having them in INCLUDE/LIB does *not* work - ! # distutils thinks it knows better, and resets those vars (see notes ! # below about how the paths are put together) ! ! # Called after the compiler is initialized, but before the extensions ! # are built. NOTE: this means setting self.include_dirs etc will ! # have no effect, so we poke our path changes directly into the ! # compiler (we can't call this *before* the compiler is setup, as ! # then our environment changes would have no effect - see below) ! ! # distutils puts the path together like so: ! # * compiler command line includes /I entries for each dir in ! # ext.include_dir + build_ext.include_dir (ie, extension's come first) ! # * The compiler initialization sets the INCLUDE/LIB etc env vars to the ! # values read from the registry (ignoring anything that was there) ! ! # We are also at the mercy of how MSVC processes command-line ! # includes vs env vars (presumably environment comes last) - so, ! # moral of the story: ! # * To get a path at the start, it must be at the start of ! # ext.includes ! # * To get a path at the end, it must be at the end of ! # os.environ("INCLUDE") ! # Note however that the environment tweaking can only be done after ! # the compiler has set these vars, which is quite late - ! # build_ext.run() - so global environment hacks are done in our ! # build_extensions() override) ! # ! # Also note that none of our extensions have individual include files ! # that must be first - so for practical purposes, any entry in ! # build_ext.include_dirs should 'win' over the compiler's dirs. ! assert self.compiler.initialized # if not, our env changes will be lost! ! if 'DISTUTILS_USE_SDK' in os.environ: # theoretically, this means the environment is already setup *************** *** 525,551 **** pass elif sdk_dir: - # hrm - this should probably go down in build_ext with the - # other manipulation of the include/lib dirs... extra = os.path.join(sdk_dir, 'include') ! if extra not in self.include_dirs and os.path.isdir(extra): ! self.include_dirs.append(extra) extra = os.path.join(sdk_dir, 'lib') - assert os.path.isdir(extra) if is_64bit: extra = os.path.join(extra, 'x64') assert os.path.isdir(extra), extra ! if extra not in self.library_dirs and os.path.isdir(extra): ! self.library_dirs.insert(0, extra) else: print "Warning - can't find an installed platform SDK" ! # Python 2.2 distutils doesn't handle the 'PC'/PCBuild directory for ! # us (it only exists if building from the source tree) ! extra = os.path.join(sys.exec_prefix, 'PC') ! if extra not in self.include_dirs and os.path.isdir(extra): ! self.include_dirs.append(extra) ! extra = os.path.join(sys.exec_prefix, 'PCBuild') ! if extra not in self.library_dirs and os.path.isdir(extra): ! self.library_dirs.append(os.path.join(extra)) ! self.excluded_extensions = [] # list of (ext, why) def _why_cant_build_extension(self, ext): --- 617,664 ---- pass elif sdk_dir: extra = os.path.join(sdk_dir, 'include') ! # should not be possible for the SDK dirs to already be in our ! # include_dirs - they may be in the registry etc from MSVC, but ! # those aren't reflected here... ! assert extra not in self.include_dirs ! # and we will not work as expected if the dirs don't exist ! assert os.path.isdir(extra), "%s doesn't exist!" % (extra,) ! self.compiler.add_include_dir(extra) ! # and again for lib dirs. extra = os.path.join(sdk_dir, 'lib') if is_64bit: extra = os.path.join(extra, 'x64') assert os.path.isdir(extra), extra ! assert extra not in self.library_dirs # see above ! assert os.path.isdir(extra), "%s doesn't exist!" % (extra,) ! self.compiler.add_library_dir(extra) ! log.debug("After SDK processing, includes are %s", self.compiler.include_dirs) ! log.debug("After SDK processing, libs are %s", self.compiler.library_dirs) ! ! # Vista SDKs have a 'VC' directory with headers and libs for older ! # compilers. We need to hack the support in here so that the ! # directories are after the compiler's own. As noted above, the ! # only way to ensure they are after the compiler's is to put them ! # in the environment, which has the nice side-effect of working ! # for the rc executable. ! # We know its not needed on vs9... ! if get_build_version() < 9.0: ! if os.path.isdir(os.path.join(sdk_dir, 'VC', 'INCLUDE')): ! os.environ["INCLUDE"] += ";" + os.path.join(sdk_dir, 'VC', 'INCLUDE') ! log.debug("Vista SDK found: %%INCLUDE%% now %s", os.environ["INCLUDE"]) ! if os.path.isdir(os.path.join(sdk_dir, 'VC', 'LIB')): ! os.environ["LIB"] += ";" + os.path.join(sdk_dir, 'VC', 'LIB') ! log.debug("Vista SDK found: %%LIB%% now %s", os.environ["LIB"]) else: print "Warning - can't find an installed platform SDK" ! if sys.hexversion < 0x02030000: ! # Python 2.2 distutils doesn't handle the 'PC'/PCBuild directory for ! # us (it only exists if building from the source tree) ! extra = os.path.join(sys.exec_prefix, 'PC') ! if extra not in self.include_dirs and os.path.isdir(extra): ! self.compiler.add_include_dir(extra) ! extra = os.path.join(sys.exec_prefix, 'PCBuild') ! if extra not in self.library_dirs and os.path.isdir(extra): ! self.compiler.add_library_dir(os.path.join(extra)) def _why_cant_build_extension(self, ext): *************** *** 554,560 **** include_dirs = self.compiler.include_dirs + \ os.environ.get("INCLUDE", "").split(os.pathsep) ! # new platform SDKs stick the version in sdkddkver.h ! for header in ('WINDOWS.H', 'SDKDDKVER.H'): ! for d in include_dirs: look = os.path.join(d, header) if os.path.isfile(look): --- 667,673 ---- include_dirs = self.compiler.include_dirs + \ os.environ.get("INCLUDE", "").split(os.pathsep) ! for d in include_dirs: ! # new platform SDKs stick the version in sdkddkver.h ! for header in ('WINDOWS.H', 'SDKDDKVER.H'): look = os.path.join(d, header) if os.path.isfile(look): *************** *** 596,599 **** --- 709,713 ---- break else: + log.debug("Looked for %s in %s", h, look_dirs) return "The header '%s' can not be located" % (h,) *************** *** 608,611 **** --- 722,726 ---- found = self.compiler.find_library_file(look_dirs, lib, self.debug) if not found: + log.debug("Looked for %s in %s", lib, look_dirs) return "No library '%s'" % lib self.found_libraries[lib.lower()] = found *************** *** 665,676 **** def build_extensions(self): - # Is there a better way than this? - # Just one GUIDS.CPP and it gives trouble on mainwin too - # Maybe I should just rename the file, but a case-only rename is likely to be - # worse! - if ".CPP" not in self.compiler.src_extensions: - self.compiler._cpp_extensions.append(".CPP") - self.compiler.src_extensions.append(".CPP") - # First, sanity-check the 'extensions' list self.check_extensions_list(self.extensions) --- 780,783 ---- *************** *** 678,681 **** --- 785,797 ---- self.found_libraries = {} + if not hasattr(self.compiler, 'initialized'): + # 2.3 and earlier initialized at construction + self.compiler.initialized = True + else: + assert not self.compiler.initialized + self.compiler.initialize() + + self._fixup_sdk_dirs() + # Here we hack a "pywin32" directory (one of 'win32', 'win32com', # 'pythonwin' etc), as distutils doesn't seem to like the concept *************** *** 841,863 **** self.current_extension = ext ! if not self.mingw32: ! if ext.pch_header: ! ext.extra_compile_args = ext.extra_compile_args or [] ! # /YX doesn't work in vs2008 ! if is_32bit and get_build_version() < 9.0: ! ext.extra_compile_args.append("/YX"+ext.pch_header) ! pch_name = os.path.join(self.build_temp, ext.name) + ".pch" ! ext.extra_compile_args.append("/Fp"+pch_name) ! ! # It gets uglier and uglier: {mssdk}/vc/include and /lib must ! # be stuck on the path. /include must get used for both cl.exe ! # and rc.exe, so its impossible to so here - so we do it in ! # _setup_compile() below. /lib can't be set there, so we do it ! # here. Will someone please put this out of its misery? ! # actually, we don't need this for 2.4+ (but I won't actually ! # kill 2.4- stuff yet.) ! if 0 and sdk_dir and get_build_version() < 9.0: ! if os.path.isdir(os.path.join(sdk_dir, 'VC', 'LIB')): ! ext.library_dirs.append(os.path.join(sdk_dir, 'VC', 'LIB')) # some source files are compiled for different extensions --- 957,961 ---- self.current_extension = ext ! ext.finalize_options(self) # some source files are compiled for different extensions *************** *** 869,915 **** self.build_temp = os.path.join(self.build_temp, ext.name) - if not self.mingw32: - # Put our DLL base address in. - base = ext.base_address - if not base: - base = dll_base_addresses[ext.name] - ext.extra_link_args.append("/BASE:0x%x" % (base,)) - - # like Python, always use debug info, even in release builds - # (note the compiler doesn't include debug info, so you only get - # basic info - but its better than nothing!) - # For now use the temp dir - later we may package them, so should - # maybe move them next to the output file. - # ack - but fails with obscure errors in py23 :( - if sys.version_info > (2,4): - pch_dir = os.path.join(self.build_temp) - if not self.debug: - ext.extra_compile_args.append("/Zi") - ext.extra_compile_args.append("/Fd%s\%s_vc.pdb" % - (pch_dir, ext.name)) - ext.extra_link_args.append("/DEBUG") - ext.extra_link_args.append("/PDB:%s\%s.pdb" % - (pch_dir, ext.name)) - # enable unwind semantics - some stuff needs it and I can't see - # it hurting - ext.extra_compile_args.append("/EHsc") - - # Try and find the MFC source code, so we can reach inside for - # some of the ActiveX support we need. We need to do this late, so - # the environment is setup correctly. - # Only used by the win32uiole extensions, but we pass it to all - # extensions just to make our life easier - found_mfc = False - for incl in os.environ.get("INCLUDE", "").split(os.pathsep): - # first is a "standard" MSVC install, second is the Vista SDK. - for candidate in ("..\src\occimpl.h", "..\..\src\mfc\occimpl.h"): - check = os.path.join(incl, candidate) - if os.path.isfile(check): - ext.extra_compile_args.append('/DMFC_OCC_IMPL_H=\\"%s\\"' % candidate) - break - if found_mfc: - break - - self.swig_cpp = True try: build_ext.build_extension(self, ext) --- 967,970 ---- *************** *** 1103,1107 **** ccompiler.new_compiler = my_new_compiler ! class my_compiler(msvccompiler.MSVCCompiler): def link(self, target_desc, --- 1158,1171 ---- ccompiler.new_compiler = my_new_compiler ! base_compiler = msvccompiler.MSVCCompiler ! ! class my_compiler(base_compiler): ! # Just one GUIDS.CPP and it gives trouble on mainwin too. Maybe I ! # should just rename the file, but a case-only rename is likely to be ! # worse! This can probably go away once we kill the VS project files ! # though, as we can just specify the lowercase name in the module def. ! _cpp_extensions = base_compiler._cpp_extensions + [".CPP"] ! src_extensions = base_compiler.src_extensions + [".CPP"] ! def link(self, target_desc, *************** *** 1199,1215 **** build = OnlyItems(items) - # Vista SDKs have a 'VC' directory with headers and libs for older - # compilers. We need to hack the support in here so that the - # directories are after the compiler's own (where simply seeing - # ext.include_dirs means they end up before) and so they apply - # to the 'rc' executable (where tricks like ext.extra_compile_args - # don't work) - # We know its not needed on vs9... - if sdk_dir and get_build_version() < 9.0: - x = os.path.join(sdk_dir, 'VC', 'INCLUDE') - pp_opts.append("-I" + x.encode("mbcs")) - # *sob* - can't do the .lib dir here - see build_extension() - # above. - return macros, objects, extra, pp_opts, build --- 1263,1266 ---- *************** *** 1356,1359 **** --- 1407,1413 ---- if sdk_dir and os.path.exists(os.path.join(sdk_dir, "Lib", "bufferoverflowu.lib")): win32help_libs += " bufferoverflowu" + # but of-course the Vista SDK does it differently... + elif sdk_dir and os.path.exists(os.path.join(sdk_dir, "VC", "Lib", "RunTmChk.lib")): + win32help_libs += " RunTmChk" win32_extensions += [ WinExt_win32('win32help', *************** *** 1704,1708 **** 'win32comext.directsound', 'win32comext.authorization', ! 'pythonwin.pywin', 'pythonwin.pywin.debugger', --- 1758,1762 ---- 'win32comext.directsound', 'win32comext.authorization', ! 'pythonwin.pywin', 'pythonwin.pywin.debugger', |
From: Roger U. <ru...@us...> - 2008-02-10 06:20:48
|
Update of /cvsroot/pywin32/pywin32/Pythonwin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15653 Modified Files: win32win.cpp Log Message: Add a couple of skipLookup's (see bug 1483482) Index: win32win.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/Pythonwin/win32win.cpp,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** win32win.cpp 13 Jul 2007 03:04:50 -0000 1.18 --- win32win.cpp 10 Feb 2008 06:20:51 -0000 1.19 *************** *** 264,268 **** CHECK_NO_ARGS(args); CWnd *pWnd = new CPythonWndFramework< CWnd >(); ! PyCWnd *pRet = (PyCWnd *)ui_assoc_object::make( PyCWnd::type, pWnd ); // We explicitly created this CWnd, so we must explicitly nuke it! if (pRet) { --- 264,268 ---- CHECK_NO_ARGS(args); CWnd *pWnd = new CPythonWndFramework< CWnd >(); ! PyCWnd *pRet = (PyCWnd *)ui_assoc_object::make( PyCWnd::type, pWnd, TRUE ); // We explicitly created this CWnd, so we must explicitly nuke it! if (pRet) { *************** *** 3301,3305 **** CPythonFrameWnd* pFrame = new CPythonFrameWnd; GUI_END_SAVE; ! return ui_assoc_object::make(PyCFrameWnd::type, pFrame)->GetGoodRet(); // @rdesc The window object (not the OS window) created. An exception is raised if an error occurs. } --- 3301,3305 ---- CPythonFrameWnd* pFrame = new CPythonFrameWnd; GUI_END_SAVE; ! return ui_assoc_object::make(PyCFrameWnd::type, pFrame, TRUE)->GetGoodRet(); // @rdesc The window object (not the OS window) created. An exception is raised if an error occurs. } |