* harbour/contrib/hbwin/hbwapi.h
* harbour/contrib/hbwin/wapi_winbase.c
* harbour/contrib/hbwin/hbwin.hbx
+ added to new WIN API wrappers:
WAPI_QueryPerformanceCounter( @nCounter ) -> <lSuccess>
WAPI_QueryPerformanceFrequency( @nFrequency ) -> <lSuccess>
Warning: read in MSDN about above functions and possible
interactions with multi CPU machines.
* harbour/contrib/hbwin/win_misc.c
* harbour/contrib/hbwin/hbwin.hbx
+ added new function which converts QueryPerformance counters
to seconds:
WIN_QPCOUNTER2SEC( nCounter ) -> <nSeconds>
I suggest to use it to convert difference between two calls
to WAPI_QueryPerformanceCounter(), i.e.:
WAPI_QueryPerformanceCounter( @nCounterStart )
[...]
WAPI_QueryPerformanceCounter( @nCounterEnd )
? "total time:", ;
WIN_QPCOUNTER2SEC( nCounterEnd - nCounterStart ), "sec."
* contrib/hbwin/hbwapi.h
* contrib/hbwin/wapi_misc.c
* hbwapi_FileNameAtSystemDir() made static
+ hbwapi_LoadLibrarySystem() public function added
this is safe version of LoadLibrary() when loading Windows
system dlls. it will avoid dll hijacking vulnerability.
! deleted HB_EXPORT from hbwapi_t*() functions, they are
public to this lib due to UNICODE setting dependance
; TODO: make hbwapi_LoadLibrarySystem() effective also for WinCE,
for now it will not add any system path under this platform.
* contrib/hbwin/axcore.c
* contrib/hbwin/mapi.c
* contrib/hbwin/win_prn2.c
* contrib/hbwin/win_prn3.c
* contrib/hbwin/wapi_shellapi.c
! LoadLibrary() -> hbwapi_LoadLibrarySystem()
thus fixing dll hijack vulnerability
+ contrib/hbwin/wapi_misc.c
* contrib/hbwin/hbwin.hbp
* contrib/hbwin/hbwapi.h
* contrib/hbwin/win_prn3.c
* hb_tstrlen() -> hbwapi_tstrlen() and made public
* hb_tstrncat() -> hbwapi_tstrncat() and made public
+ hbwapi_tstrdup()
+ hbwapi_FileNameAtSystemDir() public function
please review it, I'm notoriously bad with 1 byte over/underruns
* contrib/hbwin/hbwapi.h
* contrib/hbwin/wapi_winbase.c
* contrib/hbwin/wapi_winuser.c
* contrib/hbwin/wapi_commctrl.c
* contrib/hbwin/win_shell.c
* contrib/hbwin/win_dlg.c
* contrib/gtwvg/wvgwin.c
* contrib/gtwvg/wvgwing.c
! wapi_*() macros renamed to hbwapi_*() and
for raw pointers to hbwapi_*_raw_*().
This fixes wrong macro prefix, syncs it with other
symbols and makes it easier to find where raw pointers
are exchanges with Windows. It also fixes ambiguous
names 'wapi_ret_HDC()' vs. 'hbwapi_ret_HDC()'.
* contrib/hbwin/wapi_winbase_mutex.c
* wapi_* -> hbwapi_* for static function.
* harbour/contrib/hbwin/wapi_winuser.c
* cleaned some code to use wapi_par_*() and wapi_ret_*() macros
+ added WAPI_*() functions to create and manipolate menus (HMENU)
+ added WAPI_CREATEACCELERATORTABLE( <aAccels> ) -> <hAccel>
and WAPI_DESTROYACCELERATORTABLE( <hAccel> )
* harbour/contrib/hbwin/hbwin.ch
+ added new constant values for WAPI manu functions
(WIN_MF_* and WIN_TPM_*)
* harbour/contrib/hbwin/hbwapi.h
+ added few new wapi_par_*() and wapi_ret_*() macros
! fixed wapi_ret_UINT() and wapi_ret_DWORD() macros to not make
conversion which can create negative values
* contrib/hbwin/Makefile
* contrib/hbwin/hbwin.h
* contrib/hbwin/win_bmp.c
+ contrib/hbwin/win_bmpd.c
* contrib/hbwin/win_tprn.prg
+ contrib/hbwin/win_tbmp.prg
+ Moved WIN_BMP() class to separate source file.
+ Moved WIN_BITMAPDIMENSIONS() and its low-level support functions
to separate source file, to avoid creating unwanted
dependency to libpng.
+ Applied Xavi's patches to WIN_BMP().
* Restored nError parameter for ::IsSupported()
* ::LoadFile() now fills dimensions automatically.
* ::Draw() 3rd dim array parameter replaced with nError.
* contrib/hbwin/hbwapi.h
+ Added 'extern' keyword.
* contrib/hbwin/hbwapi.h
* contrib/hbwin/wapi_alloc.c
* contrib/hbwin/wapi_wingdi.c
* contrib/hbwin/tests/testgdi.prg
+ Reworked the way DEVMODE structure is handled. As many winapi
interfacing methods, this is also a strange beast, it contains
some hidden information, so it must be created using some
winapi calls. I finally settled with these three functions
to handle DEVMODE structure from .prg level:
__WAPI_DEVMODE_NEW( <cPrinterName> ) => <pDEVMODE>
__WAPI_DEVMODE_SET( <pDEVMODE>, <hashToWriteFrom> )
__WAPI_DEVMODE_GET( <pDEVMODE>, <hashToReadInto> )
Then <pDEVMODE> can be passed to WAPI_CREATEDC() and WAPI_RESETDC().
Remember to recreate <pDEVMODE> after using __WAPI_DEVMODE_SET()
and before using __WAPI_DEVMODE_GET() to refresh the structure
content with actual device settings.
* contrib/hbwin/hbwapi.h
* contrib/hbwin/wapi_wingdi.c
! Fixed potential GPD in hbwapi_par/stor*() functions
when parameter was not passed at all.
+ Added hbwapi_par_DOCINFO() and hbwapi_strfree_DOCINFO()
pairs to retrieve structures with strings in them.
Hashes are supported now as well.
; TODO: Low-level string handling functions will GPF
yet if the related hashes are missing (f.e. in
posted test code). This requires proposed extra
guards in low-level string functions.
+ WAPI_STARTDOC() changed to use hbwapi_par_DOCINFO().
% Minor cleanup in WAPI_SELECTOBJECT().
+ contrib/hbwin/tests/testgdi.prg
+ Added test code for GDI function structure parameter exchange.
* contrib/hbide/idethemes.prg
* contrib/hbide/ideeditor.prg
+ Added 'sequence' and 'endsequence' to keywords.
; TOFIX: try/catch and a few more are not Harbour keywords.
* contrib/hbide/ideeditor.prg
% Optimized low-level keyword lookup functions:
- Use hashes instead of arrays and ascan.
- Use STATIC vars to avoid rebuilding tables on every call.
* contrib/hbwin/wapi_wingdi.c
* contrib/hbwin/wapi_winuser.c
* contrib/hbwin/hbwapi.h
+ Added hbwapi_stor_*() functions to store Windows structures
RECT, POINT and DEVMODE. Latter supports hash only (due
to large number of structure members), other two supports
both array and hash.
Please review my code.
+ WAPI_MOVETOEX() now uses hbwapi_stor_POINT().
! WAPI_DRAWTEXT() fixed to return RECT (using hbwapi_stor_RECT()).
* contrib/hbwin/legacy.prg
* contrib/xhb/xhw32prn.prg
* Moved Win32Bmp compatibility class from hbwin to xhb lib.
! Deleted Win32Prn compatibility clsss from hbwin, as it's
now implemented in xhb in a better way.
* harbour-win-spec
* harbour-wce-spec
* harbour.spec
* include/hbver.h
* config/global.mk
+ Changed to new major version number:
2.1.0dev (from 2.0.1dev)
This gives way for 2.0.x branch to take
the 2.0.1dev version number.
* contrib/hbwin/win_prn1.c
* contrib/hbwin/hbwapi.h
+ Added public functions to return and retrieve HDC and HPEN
handles. This makes it possible to use these in 3rd party
code and other parts of hbwin lib. F.e. to create pure
wrappers for GDI functions.
+ win_prn1.c now uses hbwapi_ret_*() functions to return
HDC and HPEN handles.
* Renamed static GC related functions.
! WIN_SETPEN() fixed to retrieve pointer from _2nd_ param.
(it was 1st previously, pls review me)
! WIN_SETPEN() fixed to not allocate new GC pointer if
an existing GC pointer was passed as 2nd parameter.
(please review me)
* contrib/hbwin/mapi.c
* contrib/hbwin/wapi_commctrl.c
! Fixed to compile with Cygwin.
[TOMERGE 2.0]
* contrib/hbwin/win_prn1.c
- Deleted unnecessary winspool.h header.
* contrib/hbwin/win_prn2.c
* contrib/hbwin/win_prn3.c
- Deleted winspool.h header for LCC compiler.
We don't support LCC compiler in Harbour.
! Cleaned windows.h inclusion.
* contrib/hbfimage/fi_winfu.c
* contrib/hbfimage/fi_wrp.c
* Formatting.
+ TOFIX added to use GC collected pointers.
* contrib/hbqt/generator/hbqtgen.prg
! Fixed formatting for one generated headder.
* contrib/hbqt/hbqt_hbqmainwindow.cpp
* contrib/hbqt/qth/QApplication.qth
+ Moved HB_QT declaration to QApplication.
* contrib/hbqt/qtgui/QApplication.cpp
* Regenerated.
* contrib/hbqt/qtgui/QTextCursor.cpp
* contrib/hbqt/qtgui/TQTextCursor.prg
* contrib/hbqt/qtgui/QSyntaxHighlighter.cpp
* contrib/hbqt/qtgui/TQSyntaxHighlighter.prg
* Changed after regeneration.
(Someone pbly changed these files without .qth,
or run older generator, or didn't run generator
after modifying .qth)
* contrib/hbqt/hbqt_hbqsyntaxhighlighter.cpp
! Fixed warning.
* Formatting.
* contrib/hbqt/hbqt_hbqtableview.cpp
* contrib/hbqt/hbqt_hbqmainwindow.cpp
% GC callbacks made 'static'.
* contrib/hbqt/detect.mk
* contrib/hbxbp/Makefile
+ Enabled for OS/2.
* contrib/hbqt/hbqt_hbqmainwindow.cpp
- Deleted mutex handling. (was commented for while with no
problems reported)
* contrib/hbwin/Makefile
* contrib/hbwin/hbwin.h
* contrib/hbwin/hbwapi.h
+ contrib/hbwin/win_err.c
* contrib/hbwin/wapi_winbase.c
+ Added hbwin_SetLastError(), hbwin_GetLastError()
low-level functions to save/get GetLastError() values.
This is required to preserve win lasterror value on .prg
level. The reason we need this is because TlsGetValue()
(called internally by Harbour core) is overwriting this
value. Thanks to Xavi for research.
* contrib/hbwin/wapi_winbase_mutex.c
! Fixed to use hbwin_SetLastError().
; TODO: Call hbwin_SetLastError() after _all_ winapi
calls which modify lasterror value.
Until then, WAPI_GETLASTERROR() is broken.
* contrib/hbwin/hbwinole.h
+ Added self-guard.
* contrib/hbwin/hbwapi.h
! Fixed some wapi_ret_*() macros. This caused that several WAPI_TREEVIEW*()
functions were not returning a value. Thanks to Petr Chornyj for
reporting it.
* source/pp/Makefile
- Removed HB_PPGEN_PATH setting. Now HB_BIN_COMPILE is used to
point to the directory where all native executables are to be
found. This means you can simply delete HB_PPGEN_PATH from
your local settings.
; NOTE: Please update make_gnu_xmingw*.sh script accordingly,
it should probably accept (detect) HB_BIN_COMPILE and
drop HB_COMP_PATH / HB_PPGEN_PATH settings.
Or, we should define some new ways to define cross
builds replacing the current mess (there is also
HB_XBUILD). I'd vote for these envvars:
- HB_HOST_ARCH (linux, win, dos, os2, etc...)
- HB_HOST_BIN (dir of native executables)
- HB_HOST_BIN_EXT (.exe or empty)
* INSTALL
* Updated cross-build sections and deleted make_gnu_xmingw*.sh
related exception to keep instructions clean.
* contrib/hbwin/wapi_commctrl.c
* contrib/hbwin/hbwapi.h
! Fixed to compile under various other win compilers.
! Added missing WinCE protections. (notice all tools are freely
available to check these and avoid breaking builds)
Added non-WinCE branch to return dummy values.
! Formatted: (_WIN32_IE >= 0x0300) -> ( _WIN32_IE >= 0x0300 )
! Fixed non-ANSI comments.
! Fixed warnings, and there is still some dubious comversions
in there like HANDLE - HTREEVIEW and RECT passings. I wonder
if it is possible at all to create clean Windows API code.
; NOTE: Please take care of above stuff, it's not a pleasure
to be the cleaner of such code, but it breaks builds
to it must be done all the time.
; NOTE: I'd like to recommend adding only Windows API functions
which are available on all Windows platforms (WinCE,
Win64) otherwise it will be more difficult to build
anything portable on top of them.
; QUESTION: Why many functions are disabled with #if 0?
* contrib/hbwin/hbwapi.h
* contrib/hbwin/wapi_commctrl.c
+ Added TreeView_* functions under namespace HB_FUNC( WAPI_TREEVIEW_* ).
NOTE: Please check for different compilers/platforms. I have tried to confine
functions in #ifdef but these may be limited.
* contrib/hbct/print.c
+ added PRINTSEND() support for Windows platform.
(Borrowed from xhb, work of Pavel Tsarenko, with few minor changes)
* contrib/gtwvg/wvgwin.c
* contrib/gtwvg/wvgsink.c
! Fixed two new warnings after my recent commits.
* contrib/hbwin/hbwapi.h
* Tweaked previous commit. COLORREF and HRESULT now using
hb_retnint() again to fix 32-bit numbers appearing as signed ones
at .prg level.
* source/rdd/usrrdd/rdds/arrayrdd.prg
; Added some patches recently committed to xhb:
! few fixes provided by Quique
+ Added AR_LOCK() function, but commented.
; NOTE: Francesco, would you mind reviewing these changes?
* utils/hbmk2/hbmk2.prg
* Minor formatting, comment added.
* contrib/hbwin/hbwapi.h
* contrib/hbwin/wapi_commctrl.c
! wapi_par_COLORREF() fixed to use hb_parnl(). COLORREF is a 32bit value.
! Rest of wapi_par_*() macros fixed to accept pointers only.
If someone needs to pass numbers, use WIN_N2P() to convert them
to pointers first.
! Corrected casts in wapi_par_WORD() and wapi_par_DWORD().
! Fixed wapi_ret_HRESULT() to use hb_retnl(). It's a 32bit status value.
! Fixed wapi_ret_COLORREF() to use hb_retnl().
! Fixed WAPI_TABCTRL_CREATE() for 64-bit mode, font type was wrong.
! Fixed WAPI_TABCTRL_CREATE() to return pointer instead of number.
* contrib/hbwin/Makefile
! Reverted accidental edit in prev commit.
* source/vm/Makefile
+ source/vm/maindllp
+ source/vm/maindllp/Makefile
+ Added generation of hbmaindllp lib, to create pcode .dlls
on Windows platform. -DHB_DYNLIB is always defined for
this lib. This is just the first step, we will need compiler,
hbmk2 and other changes. I'll contribute with hbmk2 changes.
* source/vm/maindllp.c
% Code made less verbose.
! Created HB_EXPORT declaration for DllEntryPoint().
* config/win/icc.cf
* Changed optimization to -O3 (from MSVC ones).
With max optim (-Ox) it was just a bit faster than MSVC 2008.
+ contrib/hbqt
+ contrib/hbqt/hbqt_qabstractbutton.cpp
+ contrib/hbqt/hbqt_qdialog.cpp
+ contrib/hbqt/hbqt.h
+ contrib/hbqt/Makefile
+ Added initial QT wrapper lib layout with content posted
by Pritpal to the list. (I did a few renames, please check
them)
* contrib/hbwin/hbwapi.h
* Fixes in header.
* harbour/contrib/gtwvg/Makefile
+ wvgtabpg.prg
* harbour/contrib/gtwvg/wvtwin.ch
* harbour/contrib/gtwvg/wvgparts.ch
+ Added constants to manage Tab Pages
* harbour/contrib/gtwvg/gtwvg.c
! Changed the behavior if a GT is child of another GT.
* harbour/contrib/gtwvg/wincallb.c
! Cleanups.
* harbour/contrib/gtwvg/wvgsink.c
! Cleanup.
% Fixed a potential nasty bug. Kept it in the code to refer if some
problem arises in the future.
* harbour/contrib/gtwvg/wvgwin.c
! Cleanup. Removed yet unfinished code.
* harbour/contrib/gtwvg/wvgcombo.prg
! Cleanups and documentation update.
* harbour/contrib/gtwvg/wvgcrt.prg
! Changed the style of modal GT console.
* harbour/contrib/gtwvg/wvgwnd.prg
% Rearrangement of methods.
! Updated to use either protocol - HB_ASCallBck() or SetProp()
controllable by a #define constant.
+ harbour/contrib/gtwvg/wvgtabpg.prg
+ Started WvgTabPage() compatible with - XbpTabPage() of Xbase++.
Unfinished but yet usable as demonstrated in demowvg.prg.
* harbour/contrib/hbwin/hbwapi.h
+ Added wapi_par_WORD|DWORD() macros.
* harbour/contrib/hbwin/wapi_commctrl.c
+ Added TabCtrl_* WINAPI macros as functions.
* harbour/contrib/gtwvg/tests/demowvg.prg
! Updated to execute pure Xbase++ code in all its fury.
+ Added WvgTabPage() implementation via CUI+GUI demo in
<Traditional><WVG Console with GCUI> menu option.
* utils/hbmk/hbmk2.prg
+ Added new TODOs.
+ Now using GTCGI as the GT.
+ Added -info option to enable informational output.
(currently this is the default for testing period)
+ Added -arch=<arch> command line option. Same as HB_ARCHITECTURE.
Added -comp=<comp> command line option. Same as HB_COMPILER.
envvars are kept for compatibility.
+ Added -hblnk option to give plave for hblnk script behaviour
emulation.
* Changed -cc, -cmp options to -hbcc, -hbcmp respecitvely.
+ Changed -hbcc, -hbcmp, -hblnk switches to turn off information
output and turn on quiet mode by default.
+ Added autodetection of architecture when unique to
architecture compiler is choosen manually. IOW, when
-comp=msvc|mingw|pocc|dmc|xcc is passed the architecture will
be set to win automatically. When -comp=djgpp is used,
dos will be selected.
! Fixed ordering of compiler autodetection because f.e. owatcom
bin dir holds a 'cl.exe', which made hbmk2 falsely detect msvc.
+ Added trick which I'm not sure I like, and may cause problems
and seemingly unpredictable behaviour, but could also help
in some environments where multiple compilers are setup in
parallel (this isn't a recommended scenario for various other
reasons, so maybe we shouldn't support it further). So from
now on the compiler autodetection will first look for the
compiler used to build hbmk2.exe, and check for the rest
afterwards. This feature is turned off for msvc builds of
hbmk2.exe because it breaks owatcom autodetection.
+ Added possibility to pass a plain dir by using -odir[\|/]
switch. The final name will be determined by first input
file name, if this one also has a dir, -o option will be
ignored. Added logic to handle separator differences, this
wasn't tested to a great deal.
+ Added -Wl,--start-group support for linux/gcc|gpp, win/mingw,
dos/djgpp.
! Fixed owatcom support to setup library paths.
! Fixed linux/owatcom to use link script.
* Some adjustments to win/owatcom C compiler settings. I guess
the ones in .cf should also need a cleanup.
* Few minor indentation problems fixed.
! C compiler and linker scripts now got an extension in
the generated temp filename to make some of them happy
(owatcom in this case). .cpl is used for compiler scripts,
.lnk for linker ones.
+ Compiler autodetection now also looks in hbmk2 executable
dir before looking into the PATH.
! Link script content was wrong due to typo.
! Fixed problem with library paths being wrong (doubly
decorated) in the link command. This may also fix some
problems with double extensions and final .c file cleanup.
! Fixed to add hbdebug lib when building in shared mode.
! Fixed typo in automatically adding './' on *nix systems.
; Please test, I definitely couldn't retest all scenaros
after all these changes.
* bin/postinst.bat
* Adapted change in mode modifier switches, also
added new -hblnk one.
* utils/hbmk/examples/winapi.hbp
+ Added mapi32.
+ utils/hbmk/examples/contrib.hbp
+ Added .hbp file for popular and portable only contribs.
* config/win/owatcom.cf
- Removed unnecessary system libs.
* contrib/hbvpdf/hbvpdft.prg
* hbwhat32 -> hbwhat in comment.
* contrib/hbwin/wapi_commctrl.c
* contrib/hbwin/wapi_winuser.c
! Fixed harbour-project page link in header.
* contrib/hbwin/hbwapi.h
* Formatting (indenting the whole file content inside
self-guard isn't necessary.)
* utils/hbmk/hbmk.prg
+ Added support to pass .hbp files on the command line.
* contrib/hbwin/wapi_commctrl.c
* contrib/hbwin/hbwapi.h
! Remaining comments changed to ANSI.
* harbour/contrib/gtwvg/common.mak
* harbour/contrib/gtwvg/Makefile
+ Added wvgdarea.prg
* harbour/contrib/gtwvg/wvgwin.c
+ Added more functions.
+ harbour/contrib/gtwvg/wvgdarea.prg
+ Added WvgDrawingArea(), a helper class to WvgDialog().
* harbour/contrib/gtwvg/wvgdlg.prg
* harbour/contrib/gtwvg/wvgparts.ch
* harbour/contrib/gtwvg/wvgphdlr.prg
* harbour/contrib/gtwvg/wvgstatc.prg
* harbour/contrib/gtwvg/wvgtoolb.prg
* harbour/contrib/gtwvg/wvgwnd.prg
* harbour/contrib/gtwvg/wvtwin.ch
! Numerous class structure enhancements. More Xbase++ compatibility
XbpDialog:drawingArea concept implemented in greater details.
WvgToolbarButtons() now take use of WAPI_ImageList_*() functions.
* harbour/contrib/hbwin/hbwapi.h
! Defines updated to respect pointers also.
+ harbour/contrib/hbwin/wapi_commctrl.c
+ Implemented WAPI ImageList_*() family of functions.
* harbour/contrib/hbwin/Makefile
* harbour/contrib/hbwin/common.mak
+ Added wapi_commctrl.c
* harbour/contrib/gtwvg/tests/demowvg.prg
* harbour/contrib/gtwvg/tests/demoxbp.prg
! Updated TO respect new changes in class structures.
Xbase++ related components are more compatible now.
; TODO: Tooltips on Toolbar Buttons. WHILE implemeting
XbpDialog:drawingArea concept I have lost track of this
feature as buttons are now created via image lists and
Toolbar window is created with CreateWindowEx() instead of
CreateToolbarWindow().
+ harbour/contrib/hbwin/wapi_commctrl.c
+ Added WAPI_Image*() functions.
* harbour/contrib/hbwin/hbwapi.h
+ Added more _par and _ret defines.
; The idea is to encapsulate Harbour API for WINAPI
parameters and return values. Now wapi_commctrl.c
looks very clean and easy to understand code.
Also I have contained all those functions which are
either not required on normal programming level
OR I could not convert, with #if 0 / #endif blocks.
But the header definitions are pulled from MSDN and
have been kept alongwith. This ensures that whenever
someone will try to implement them, all info will be
handy.
; Please approve the above implementation so that I
include these files in the build batches.