2010-01-03 11:00 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
* 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.
This commit is contained in:
@@ -17,13 +17,70 @@
|
||||
past entries belonging to author(s): Viktor Szakats.
|
||||
*/
|
||||
|
||||
2010-01-03 11:00 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
|
||||
* 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.
|
||||
|
||||
2010-01-02 22:47 UTC-0800 Pritpal Bedi (pritpal@vouchcac.com)
|
||||
/*
|
||||
This commint is from Vailton Renato and applied as is
|
||||
/*
|
||||
This commint is from Vailton Renato and applied as is
|
||||
Please set me right if something is omitted.
|
||||
Changes are written below as published on DL.
|
||||
*/
|
||||
|
||||
|
||||
* contrib/hbide/hbide.ch
|
||||
* contrib/hbide/hbide.env
|
||||
* contrib/hbide/hbide.prg
|
||||
@@ -38,57 +95,57 @@
|
||||
+ contrib/hbide/resources/new2.png
|
||||
+ contrib/hbide/resources/project.png
|
||||
+ contrib/hbide/resources/vr-16x16.png
|
||||
|
||||
! isValidText() some more valid extensions added
|
||||
|
||||
! editSource() message appears if the file open is not supported.
|
||||
! isValidText() some more valid extensions added
|
||||
|
||||
! loadIni()
|
||||
Implemented support for RecentFiles & RECENTPROJECTS sections.
|
||||
Optimized support for section names regardless of case used.
|
||||
Enhanced with SWITCH instead of CASE.
|
||||
Optimized initialization oide:Aini regardless of the amount
|
||||
expected items in the INI file.
|
||||
Implemented a basic validation to ignore invalid
|
||||
! editSource() message appears if the file open is not supported.
|
||||
|
||||
! loadIni()
|
||||
Implemented support for RecentFiles & RECENTPROJECTS sections.
|
||||
Optimized support for section names regardless of case used.
|
||||
Enhanced with SWITCH instead of CASE.
|
||||
Optimized initialization oide:Aini regardless of the amount
|
||||
expected items in the INI file.
|
||||
Implemented a basic validation to ignore invalid
|
||||
sections in the INI file.
|
||||
|
||||
+ Added a few new icons for the menu of the application.
|
||||
+ Added a few new icons for the menu of the application.
|
||||
|
||||
! FILE > recent files -> implementation done.
|
||||
! FILE > recent projects -> implementation done.
|
||||
! FILE > SAVE AND EXIT -> implementation done.
|
||||
! FILE > OPEN -> supports opening multiple files
|
||||
! FILE > REVERT -> implementation done.
|
||||
! FILE > recent files -> implementation done.
|
||||
! FILE > recent projects -> implementation done.
|
||||
! FILE > SAVE AND EXIT -> implementation done.
|
||||
! FILE > OPEN -> supports opening multiple files
|
||||
! FILE > REVERT -> implementation done.
|
||||
|
||||
+ findEditByFileName() - new method to Find an item in a
|
||||
Edits[] based on the file name passed as argument.
|
||||
Edits[] based on the file name passed as argument.
|
||||
|
||||
+ findEditByID() - new method to Find an item in
|
||||
aEdits[] based on the ID passed as argument.
|
||||
+ findEditByID() - new method to Find an item in
|
||||
aEdits[] based on the ID passed as argument.
|
||||
|
||||
+ HbIde:closeAllSources() -> implementation done.
|
||||
! HbIde:closeSource() -> rewritten to support the closeAllSources() method
|
||||
+ HbIde:closeAllOther() -> implementation done.
|
||||
+ HbIde:saveSourceAs() -> implementation done.
|
||||
+ HbIde:updateTitleBar() -> New method to updates the title bar of the
|
||||
main window, indicating the project and the current filename.
|
||||
+ HbIde:closeAllSources() -> implementation done.
|
||||
! HbIde:closeSource() -> rewritten to support the closeAllSources() method
|
||||
+ HbIde:closeAllOther() -> implementation done.
|
||||
+ HbIde:saveSourceAs() -> implementation done.
|
||||
+ HbIde:updateTitleBar() -> New method to updates the title bar of the
|
||||
main window, indicating the project and the current filename.
|
||||
|
||||
+ HELP > About - implementation done.
|
||||
+ HELP > Harbour on line - implementation done.
|
||||
+ HELP > HB Users Mailing - implementation done.
|
||||
+ HELP > HB Developers Mailing - implementation done.
|
||||
+ HELP > About - implementation done.
|
||||
+ HELP > Harbour on line - implementation done.
|
||||
+ HELP > HB Users Mailing - implementation done.
|
||||
+ HELP > HB Developers Mailing - implementation done.
|
||||
|
||||
+ EDIT menu items were attached to the existing options
|
||||
in ::executeAction()
|
||||
+ EDIT menu items were attached to the existing options
|
||||
in ::executeAction()
|
||||
|
||||
! IdeFindReplace:show() -> Detect if current edit has any selected text.
|
||||
! IdeFindReplace:show() -> Detect if current edit has any selected text.
|
||||
|
||||
! hbide now displays the text "Untitled XX" on creating a new file.
|
||||
! hbide now displays the text "Untitled XX" on creating a new file.
|
||||
|
||||
NOTE: Something is not right because when I click the close
|
||||
button to close the main window and he asks me if I want
|
||||
to save the files and when I click CANCEL it has to abort
|
||||
the process and not close the system as it is occurring.
|
||||
NOTE: Something is not right because when I click the close
|
||||
button to close the main window and he asks me if I want
|
||||
to save the files and when I click CANCEL it has to abort
|
||||
the process and not close the system as it is occurring.
|
||||
|
||||
2010-01-02 19:31 UTC-0800 Pritpal Bedi (pritpal@vouchcac.com)
|
||||
* contrib/hbide/hbide.prg
|
||||
@@ -98,16 +155,16 @@
|
||||
* contrib/hbide/idethemes.prg
|
||||
+ contrib/hbide/resources/selectionlist.ui
|
||||
* contrib/hbide/resources/themes.ui
|
||||
! Changed the way .ppo is presented. Now a new modeless
|
||||
! Changed the way .ppo is presented. Now a new modeless
|
||||
window displays .ppo source and thus you have more control
|
||||
over comaprison with original source. You can keep as many
|
||||
such .ppo windows on the screen.
|
||||
|
||||
+ Implemented Editor Themes.
|
||||
HBIDE provides 5 default themes, along the lines of xMate, viz.,
|
||||
HBIDE provides 5 default themes, along the lines of xMate, viz.,
|
||||
1. Classic
|
||||
2. City Lights
|
||||
3. Evening Glamour
|
||||
3. Evening Glamour
|
||||
4. Sand Storm
|
||||
with a few changes, and
|
||||
5. Pritpal's Favourite.
|
||||
@@ -116,22 +173,22 @@
|
||||
as well as constructing a new one based on any exiting themes.
|
||||
Then user can save them in hbide.hbt file.
|
||||
|
||||
HBIDE always loads default 5 themes as above then,
|
||||
HBIDE always loads default 5 themes as above then,
|
||||
HBIDE looks for hbide.hbt in the same folder where it is.
|
||||
If it finds one, it attempts to load it. In the loading
|
||||
process it will merge the duplicate themes, including the
|
||||
If it finds one, it attempts to load it. In the loading
|
||||
process it will merge the duplicate themes, including the
|
||||
default ones. It means, if you modify an existing default
|
||||
theme and then save it in hbide.hbt, at next invocation
|
||||
default theme will be overwritten and your changes are
|
||||
reflected. But if the name of the theme is changed you have
|
||||
default theme will be overwritten and your changes are
|
||||
reflected. But if the name of the theme is changed you have
|
||||
yours plus default both themes available.
|
||||
|
||||
Default theme is "Pritpal's Favourite" which will be applied
|
||||
to any source file opened. You can override it by applying
|
||||
to any source file opened. You can override it by applying
|
||||
new theme to it. Right click on <Editors Tree><_any_source_file_>
|
||||
and select "Apply Theme" and finally select from a list of
|
||||
and select "Apply Theme" and finally select from a list of
|
||||
themes presented in a list box by double clicking onto one
|
||||
of choice. Next time you open HBIDE thus souce will be
|
||||
of choice. Next time you open HBIDE thus souce will be
|
||||
applied the last theme selected.
|
||||
|
||||
You can re-define various labels on the Themes Dialog including
|
||||
@@ -145,10 +202,10 @@
|
||||
3. Themes can be copied and re-defined for n numbers.
|
||||
|
||||
TODO: To apply themes per project.
|
||||
To implement some missing parts of source, such as,
|
||||
To implement some missing parts of source, such as,
|
||||
background color of selections, etc.
|
||||
|
||||
You are encouraged to test this implementation. I will be
|
||||
You are encouraged to test this implementation. I will be
|
||||
more than happy to implement descent thoughts you can imagine.
|
||||
|
||||
2010-01-02 19:31 UTC-0800 Pritpal Bedi (pritpal@vouchcac.com)
|
||||
|
||||
@@ -13,7 +13,7 @@ HB_HAS_QT :=
|
||||
_DET_DSP_NAME := qt
|
||||
_DET_VAR_INC_ := HB_INC_QT
|
||||
_DET_VAR_HAS_ := HB_HAS_QT
|
||||
_DET_FLT_PLAT := !dos !os2
|
||||
_DET_FLT_PLAT := !dos
|
||||
_DET_FLT_COMP := !mingw64 !watcom !bcc !pocc !pocc64 !poccarm !msvcia64
|
||||
_DET_INC_DEFP := /usr/include/qt4 /usr/lib/qt4/include /usr/include /Developer/qt/include
|
||||
_DET_INC_HEAD := /Qt/qglobal.h
|
||||
|
||||
@@ -1650,16 +1650,15 @@ STATIC FUNCTION Build_GarbageFile( cpp_, cPathOut )
|
||||
LOCAL txt_ := {}
|
||||
LOCAL s
|
||||
|
||||
aadd( txt_, "/*" )
|
||||
aadd( txt_, " * $Id$" )
|
||||
aadd( txt_, " * " )
|
||||
aadd( txt_, " * " )
|
||||
aadd( txt_, " * --------------------------------------------------------------------" )
|
||||
aadd( txt_, " * WARNING: Automatically generated source file. DO NOT EDIT! " )
|
||||
aadd( txt_, " * Instead, edit corresponding .qth file, " )
|
||||
aadd( txt_, " * or the generator tool itself, and run regenarate. " )
|
||||
aadd( txt_, " * --------------------------------------------------------------------" )
|
||||
aadd( txt_, " */" )
|
||||
aadd( txt_, "/*" )
|
||||
aadd( txt_, " * $Id$" )
|
||||
aadd( txt_, " */" )
|
||||
aadd( txt_, "" )
|
||||
aadd( txt_, "/* -------------------------------------------------------------------- */" )
|
||||
aadd( txt_, "/* WARNING: Automatically generated source file. DO NOT EDIT! */" )
|
||||
aadd( txt_, "/* Instead, edit corresponding .qth file, */" )
|
||||
aadd( txt_, "/* or the generator tool itself, and run regenarate. */" )
|
||||
aadd( txt_, "/* -------------------------------------------------------------------- */" )
|
||||
aadd( txt_, " " )
|
||||
|
||||
FOR EACH s IN cpp_
|
||||
|
||||
@@ -55,7 +55,6 @@
|
||||
#include "hbapiitm.h"
|
||||
#include "hbthread.h"
|
||||
#include "hbvm.h"
|
||||
#include "hbinit.h"
|
||||
|
||||
#include "hbqt.h"
|
||||
|
||||
@@ -63,10 +62,6 @@
|
||||
|
||||
#include "hbqt_hbqmainwindow.h"
|
||||
|
||||
#if defined( _HBQT_MAINWINDOW_MUTEX )
|
||||
static PHB_ITEM s_mutex = NULL;
|
||||
#endif
|
||||
|
||||
HBQMainWindow::HBQMainWindow( PHB_ITEM pBlock, int iThreadID )
|
||||
{
|
||||
Qt::WindowFlags flags = Qt::WindowCloseButtonHint | Qt::WindowMaximizeButtonHint |
|
||||
@@ -99,9 +94,6 @@ HBQMainWindow::~HBQMainWindow( void )
|
||||
|
||||
void HBQMainWindow::paintEvent( QPaintEvent * event )
|
||||
{
|
||||
#if defined( _HBQT_MAINWINDOW_MUTEX )
|
||||
hb_threadMutexLock( s_mutex );
|
||||
#endif
|
||||
if( hb_vmRequestReenter() )
|
||||
{
|
||||
PHB_ITEM p0 = hb_itemPutNI( NULL, QEvent::Paint );
|
||||
@@ -111,28 +103,15 @@ void HBQMainWindow::paintEvent( QPaintEvent * event )
|
||||
hb_itemRelease( p1 );
|
||||
hb_vmRequestRestore();
|
||||
}
|
||||
#if defined( _HBQT_MAINWINDOW_MUTEX )
|
||||
hb_threadMutexUnlock( s_mutex );
|
||||
#endif
|
||||
}
|
||||
|
||||
bool HBQMainWindow::event( QEvent * event )
|
||||
{
|
||||
#if defined( _HBQT_MAINWINDOW_MUTEX )
|
||||
hb_threadMutexLock( s_mutex );
|
||||
#endif
|
||||
bool bRet = QWidget::event( event );
|
||||
#if defined( _HBQT_MAINWINDOW_MUTEX )
|
||||
hb_threadMutexUnlock( s_mutex );
|
||||
#endif
|
||||
return bRet;
|
||||
return QWidget::event( event );
|
||||
}
|
||||
|
||||
void HBQMainWindow::focusInEvent( QFocusEvent *event )
|
||||
{
|
||||
#if defined( _HBQT_MAINWINDOW_MUTEX )
|
||||
hb_threadMutexLock( s_mutex );
|
||||
#endif
|
||||
if( hb_vmRequestReenter() )
|
||||
{
|
||||
PHB_ITEM p0 = hb_itemPutNI( NULL, QEvent::FocusIn );
|
||||
@@ -143,16 +122,10 @@ void HBQMainWindow::focusInEvent( QFocusEvent *event )
|
||||
hb_vmRequestRestore();
|
||||
}
|
||||
QWidget::focusInEvent( event );
|
||||
#if defined( _HBQT_MAINWINDOW_MUTEX )
|
||||
hb_threadMutexUnlock( s_mutex );
|
||||
#endif
|
||||
}
|
||||
|
||||
void HBQMainWindow::focusOutEvent( QFocusEvent *event )
|
||||
{
|
||||
#if defined( _HBQT_MAINWINDOW_MUTEX )
|
||||
hb_threadMutexLock( s_mutex );
|
||||
#endif
|
||||
if( hb_vmRequestReenter() )
|
||||
{
|
||||
PHB_ITEM p0 = hb_itemPutNI( NULL, QEvent::FocusOut );
|
||||
@@ -163,16 +136,10 @@ void HBQMainWindow::focusOutEvent( QFocusEvent *event )
|
||||
hb_vmRequestRestore();
|
||||
}
|
||||
QWidget::focusOutEvent( event );
|
||||
#if defined( _HBQT_MAINWINDOW_MUTEX )
|
||||
hb_threadMutexUnlock( s_mutex );
|
||||
#endif
|
||||
}
|
||||
|
||||
void HBQMainWindow::keyPressEvent( QKeyEvent * event )
|
||||
{
|
||||
#if defined( _HBQT_MAINWINDOW_MUTEX )
|
||||
hb_threadMutexLock( s_mutex );
|
||||
#endif
|
||||
if( hb_vmRequestReenter() )
|
||||
{
|
||||
PHB_ITEM p0 = hb_itemPutNI( NULL, QEvent::KeyPress );
|
||||
@@ -183,16 +150,10 @@ void HBQMainWindow::keyPressEvent( QKeyEvent * event )
|
||||
hb_vmRequestRestore();
|
||||
}
|
||||
QWidget::keyPressEvent( event );
|
||||
#if defined( _HBQT_MAINWINDOW_MUTEX )
|
||||
hb_threadMutexUnlock( s_mutex );
|
||||
#endif
|
||||
}
|
||||
|
||||
void HBQMainWindow::mouseDoubleClickEvent( QMouseEvent * event )
|
||||
{
|
||||
#if defined( _HBQT_MAINWINDOW_MUTEX )
|
||||
hb_threadMutexLock( s_mutex );
|
||||
#endif
|
||||
if( hb_vmRequestReenter() )
|
||||
{
|
||||
PHB_ITEM p0 = hb_itemPutNI( NULL, QEvent::MouseButtonDblClick );
|
||||
@@ -203,16 +164,10 @@ void HBQMainWindow::mouseDoubleClickEvent( QMouseEvent * event )
|
||||
hb_vmRequestRestore();
|
||||
}
|
||||
QWidget::mouseDoubleClickEvent( event );
|
||||
#if defined( _HBQT_MAINWINDOW_MUTEX )
|
||||
hb_threadMutexUnlock( s_mutex );
|
||||
#endif
|
||||
}
|
||||
|
||||
void HBQMainWindow::mouseMoveEvent( QMouseEvent * event )
|
||||
{
|
||||
#if defined( _HBQT_MAINWINDOW_MUTEX )
|
||||
hb_threadMutexLock( s_mutex );
|
||||
#endif
|
||||
if( hb_vmRequestReenter() )
|
||||
{
|
||||
PHB_ITEM p0 = hb_itemPutNI( NULL, QEvent::MouseMove );
|
||||
@@ -223,16 +178,10 @@ void HBQMainWindow::mouseMoveEvent( QMouseEvent * event )
|
||||
hb_vmRequestRestore();
|
||||
}
|
||||
QWidget::mouseMoveEvent( event );
|
||||
#if defined( _HBQT_MAINWINDOW_MUTEX )
|
||||
hb_threadMutexUnlock( s_mutex );
|
||||
#endif
|
||||
}
|
||||
|
||||
void HBQMainWindow::mousePressEvent( QMouseEvent * event )
|
||||
{
|
||||
#if defined( _HBQT_MAINWINDOW_MUTEX )
|
||||
hb_threadMutexLock( s_mutex );
|
||||
#endif
|
||||
if( hb_vmRequestReenter() )
|
||||
{
|
||||
PHB_ITEM p0 = hb_itemPutNI( NULL, QEvent::MouseButtonPress );
|
||||
@@ -243,16 +192,10 @@ void HBQMainWindow::mousePressEvent( QMouseEvent * event )
|
||||
hb_vmRequestRestore();
|
||||
}
|
||||
QWidget::mousePressEvent( event );
|
||||
#if defined( _HBQT_MAINWINDOW_MUTEX )
|
||||
hb_threadMutexUnlock( s_mutex );
|
||||
#endif
|
||||
}
|
||||
|
||||
void HBQMainWindow::mouseReleaseEvent( QMouseEvent * event )
|
||||
{
|
||||
#if defined( _HBQT_MAINWINDOW_MUTEX )
|
||||
hb_threadMutexLock( s_mutex );
|
||||
#endif
|
||||
if( hb_vmRequestReenter() )
|
||||
{
|
||||
PHB_ITEM p0 = hb_itemPutNI( NULL, QEvent::MouseButtonRelease );
|
||||
@@ -263,16 +206,10 @@ void HBQMainWindow::mouseReleaseEvent( QMouseEvent * event )
|
||||
hb_vmRequestRestore();
|
||||
}
|
||||
QWidget::mouseReleaseEvent( event );
|
||||
#if defined( _HBQT_MAINWINDOW_MUTEX )
|
||||
hb_threadMutexUnlock( s_mutex );
|
||||
#endif
|
||||
}
|
||||
|
||||
void HBQMainWindow::wheelEvent( QWheelEvent * event )
|
||||
{
|
||||
#if defined( _HBQT_MAINWINDOW_MUTEX )
|
||||
hb_threadMutexLock( s_mutex );
|
||||
#endif
|
||||
if( hb_vmRequestReenter() )
|
||||
{
|
||||
PHB_ITEM p0 = hb_itemPutNI( NULL, QEvent::Wheel );
|
||||
@@ -283,16 +220,10 @@ void HBQMainWindow::wheelEvent( QWheelEvent * event )
|
||||
hb_vmRequestRestore();
|
||||
}
|
||||
QWidget::wheelEvent( event );
|
||||
#if defined( _HBQT_MAINWINDOW_MUTEX )
|
||||
hb_threadMutexUnlock( s_mutex );
|
||||
#endif
|
||||
}
|
||||
|
||||
void HBQMainWindow::resizeEvent( QResizeEvent * event )
|
||||
{
|
||||
#if defined( _HBQT_MAINWINDOW_MUTEX )
|
||||
hb_threadMutexLock( s_mutex );
|
||||
#endif
|
||||
if( hb_vmRequestReenter() )
|
||||
{
|
||||
PHB_ITEM p0 = hb_itemPutNI( NULL, QEvent::Resize );
|
||||
@@ -303,18 +234,12 @@ void HBQMainWindow::resizeEvent( QResizeEvent * event )
|
||||
hb_vmRequestRestore();
|
||||
}
|
||||
QWidget::resizeEvent( event );
|
||||
#if defined( _HBQT_MAINWINDOW_MUTEX )
|
||||
hb_threadMutexUnlock( s_mutex );
|
||||
#endif
|
||||
}
|
||||
|
||||
void HBQMainWindow::closeEvent( QCloseEvent * event )
|
||||
{
|
||||
HB_TRACE( HB_TR_DEBUG, ( "HBQMainWindow::closeEvent: ThreadID: %i", threadID ) );
|
||||
|
||||
#if defined( _HBQT_MAINWINDOW_MUTEX )
|
||||
hb_threadMutexLock( s_mutex );
|
||||
#endif
|
||||
if( hb_vmRequestReenter() )
|
||||
{
|
||||
PHB_ITEM p0 = hb_itemPutNI( NULL, QEvent::Close );
|
||||
@@ -324,9 +249,6 @@ void HBQMainWindow::closeEvent( QCloseEvent * event )
|
||||
hb_itemRelease( p1 );
|
||||
hb_vmRequestRestore();
|
||||
}
|
||||
#if defined( _HBQT_MAINWINDOW_MUTEX )
|
||||
hb_threadMutexUnlock( s_mutex );
|
||||
#endif
|
||||
}
|
||||
|
||||
typedef struct
|
||||
@@ -336,7 +258,7 @@ typedef struct
|
||||
QPointer< HBQMainWindow > pq;
|
||||
} QGC_POINTER_HBQMainWindow;
|
||||
|
||||
QT_G_FUNC( release_HBQMainWindow )
|
||||
static QT_G_FUNC( release_HBQMainWindow )
|
||||
{
|
||||
QGC_POINTER_HBQMainWindow * p = ( QGC_POINTER_HBQMainWindow * ) Cargo;
|
||||
|
||||
@@ -374,7 +296,7 @@ QT_G_FUNC( release_HBQMainWindow )
|
||||
}
|
||||
}
|
||||
|
||||
void * hbqt_gcAllocate_HBQMainWindow( void * pObj )
|
||||
static void * hbqt_gcAllocate_HBQMainWindow( void * pObj )
|
||||
{
|
||||
QGC_POINTER_HBQMainWindow * p = ( QGC_POINTER_HBQMainWindow * ) hb_gcAllocate( sizeof( QGC_POINTER_HBQMainWindow ), hbqt_gcFuncs() );
|
||||
|
||||
@@ -387,11 +309,6 @@ void * hbqt_gcAllocate_HBQMainWindow( void * pObj )
|
||||
|
||||
HB_FUNC( QT_HBQMAINWINDOW )
|
||||
{
|
||||
#if defined( _HBQT_MAINWINDOW_MUTEX )
|
||||
if( s_mutex == NULL )
|
||||
s_mutex = hb_threadMutexCreate();
|
||||
#endif
|
||||
|
||||
void * pObj = NULL;
|
||||
|
||||
pObj = ( HBQMainWindow * ) new HBQMainWindow( hb_itemNew( hb_param( 1, HB_IT_BLOCK ) ), hb_parni( 2 ) );
|
||||
@@ -399,41 +316,4 @@ HB_FUNC( QT_HBQMAINWINDOW )
|
||||
hb_retptrGC( hbqt_gcAllocate_HBQMainWindow( pObj ) );
|
||||
}
|
||||
|
||||
HB_FUNC( HB_QT ) {;}
|
||||
|
||||
static void hbqt_hbqmainwindow_init( void * cargo )
|
||||
{
|
||||
HB_SYMBOL_UNUSED( cargo );
|
||||
|
||||
#if defined( _HBQT_MAINWINDOW_MUTEX )
|
||||
if( s_mutex == NULL )
|
||||
s_mutex = hb_threadMutexCreate();
|
||||
#endif
|
||||
}
|
||||
|
||||
static void hbqt_hbqmainwindow_exit( void * cargo )
|
||||
{
|
||||
HB_SYMBOL_UNUSED( cargo );
|
||||
|
||||
#if defined( _HBQT_MAINWINDOW_MUTEX )
|
||||
if( s_mutex != NULL )
|
||||
{
|
||||
hb_itemRelease( s_mutex );
|
||||
s_mutex = NULL;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
HB_CALL_ON_STARTUP_BEGIN( _hbqt_hbqmainwindow_initialize_ )
|
||||
hb_vmAtInit( hbqt_hbqmainwindow_init, NULL );
|
||||
hb_vmAtExit( hbqt_hbqmainwindow_exit, NULL );
|
||||
HB_CALL_ON_STARTUP_END( _hbqt_hbqmainwindow_initialize_ )
|
||||
|
||||
#if defined( HB_PRAGMA_STARTUP )
|
||||
#pragma startup _hbqt_hbqmainwindow_initialize_
|
||||
#elif defined( HB_DATASEG_STARTUP )
|
||||
#define HB_DATASEG_BODY HB_DATASEG_FUNC( _hbqt_hbqmainwindow_initialize_ )
|
||||
#include "hbiniseg.h"
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@@ -63,7 +63,7 @@
|
||||
#include <QHash>
|
||||
#include <QTextCharFormat>
|
||||
|
||||
HBQSyntaxHighlighter::HBQSyntaxHighlighter( QTextDocument *parent )
|
||||
HBQSyntaxHighlighter::HBQSyntaxHighlighter( QTextDocument * parent )
|
||||
: QSyntaxHighlighter( parent )
|
||||
{
|
||||
HighlightingRule rule;
|
||||
@@ -81,7 +81,7 @@ HBQSyntaxHighlighter::HBQSyntaxHighlighter( QTextDocument *parent )
|
||||
<< "\\btemplate\\b" << "\\btypedef\\b" << "\\btypename\\b"
|
||||
<< "\\bunion\\b" << "\\bunsigned\\b" << "\\bvirtual\\b"
|
||||
<< "\\bvoid\\b" << "\\bvolatile\\b";
|
||||
foreach ( const QString &pattern, keywordPatterns )
|
||||
foreach( const QString &pattern, keywordPatterns )
|
||||
{
|
||||
rule.pattern = QRegExp( pattern );
|
||||
rule.format = keywordFormat;
|
||||
@@ -96,8 +96,8 @@ HBQSyntaxHighlighter::HBQSyntaxHighlighter( QTextDocument *parent )
|
||||
|
||||
multiLineCommentFormat.setForeground( Qt::red );
|
||||
|
||||
commentStartExpression = QRegExp("/\\*");
|
||||
commentEndExpression = QRegExp("\\*/");
|
||||
commentStartExpression = QRegExp( "/\\*" );
|
||||
commentEndExpression = QRegExp( "\\*/" );
|
||||
}
|
||||
|
||||
void HBQSyntaxHighlighter::setHBRule( QString name, QString pattern, const QTextCharFormat & format )
|
||||
@@ -128,7 +128,7 @@ void HBQSyntaxHighlighter::setHBCompilerDirectives( const QStringList & directiv
|
||||
HighlightingRule rule;
|
||||
|
||||
directivesFormat = format;
|
||||
foreach ( const QString &pattern, directives )
|
||||
foreach( const QString &pattern, directives )
|
||||
{
|
||||
rule.pattern = QRegExp( pattern );
|
||||
rule.format = directivesFormat;
|
||||
@@ -143,15 +143,15 @@ void HBQSyntaxHighlighter::setHBMultiLineCommentFormat( const QTextCharFormat &
|
||||
|
||||
void HBQSyntaxHighlighter::highlightBlock( const QString &text )
|
||||
{
|
||||
int index( 0 );
|
||||
QRegExp expression;
|
||||
|
||||
#if 0
|
||||
foreach ( const HighlightingRule &rule, highlightingRules )
|
||||
int index( 0 );
|
||||
foreach( const HighlightingRule &rule, highlightingRules )
|
||||
{
|
||||
expression = QRegExp( rule.pattern );
|
||||
index = expression.indexIn( text );
|
||||
while ( index >= 0 )
|
||||
while( index >= 0 )
|
||||
{
|
||||
int length = expression.matchedLength();
|
||||
setFormat( index, length, rule.format );
|
||||
@@ -159,11 +159,11 @@ void HBQSyntaxHighlighter::highlightBlock( const QString &text )
|
||||
}
|
||||
}
|
||||
#else
|
||||
foreach ( const hHighlightingRule &rule, hhighlightingRules )
|
||||
foreach( const hHighlightingRule &rule, hhighlightingRules )
|
||||
{
|
||||
QRegExp expression( rule.pattern );
|
||||
int index = expression.indexIn( text );
|
||||
while ( index >= 0 )
|
||||
while( index >= 0 )
|
||||
{
|
||||
int length = expression.matchedLength();
|
||||
setFormat( index, length, rule.format );
|
||||
@@ -175,22 +175,21 @@ void HBQSyntaxHighlighter::highlightBlock( const QString &text )
|
||||
setCurrentBlockState( 0 );
|
||||
|
||||
int startIndex = 0;
|
||||
if ( previousBlockState() != 1 )
|
||||
if( previousBlockState() != 1 )
|
||||
startIndex = commentStartExpression.indexIn( text );
|
||||
|
||||
while ( startIndex >= 0 )
|
||||
while( startIndex >= 0 )
|
||||
{
|
||||
int endIndex = commentEndExpression.indexIn( text, startIndex );
|
||||
int commentLength;
|
||||
if ( endIndex == -1 )
|
||||
if( endIndex == -1 )
|
||||
{
|
||||
setCurrentBlockState( 1 );
|
||||
commentLength = text.length() - startIndex;
|
||||
}
|
||||
else
|
||||
{
|
||||
commentLength = endIndex - startIndex + commentEndExpression.matchedLength();
|
||||
}
|
||||
|
||||
setFormat( startIndex, commentLength, multiLineCommentFormat );
|
||||
startIndex = commentStartExpression.indexIn( text, startIndex + commentLength );
|
||||
}
|
||||
@@ -203,7 +202,7 @@ typedef struct
|
||||
QPointer< HBQSyntaxHighlighter > pq;
|
||||
} QGC_POINTER_HBQSyntaxHighlighter;
|
||||
|
||||
QT_G_FUNC( release_HBQSyntaxHighlighter )
|
||||
static QT_G_FUNC( release_HBQSyntaxHighlighter )
|
||||
{
|
||||
QGC_POINTER_HBQSyntaxHighlighter * p = ( QGC_POINTER_HBQSyntaxHighlighter * ) Cargo;
|
||||
|
||||
@@ -241,7 +240,7 @@ QT_G_FUNC( release_HBQSyntaxHighlighter )
|
||||
}
|
||||
}
|
||||
|
||||
void * hbqt_gcAllocate_HBQSyntaxHighlighter( void * pObj )
|
||||
static void * hbqt_gcAllocate_HBQSyntaxHighlighter( void * pObj )
|
||||
{
|
||||
QGC_POINTER_HBQSyntaxHighlighter * p = ( QGC_POINTER_HBQSyntaxHighlighter * ) hb_gcAllocate( sizeof( QGC_POINTER_HBQSyntaxHighlighter ), hbqt_gcFuncs() );
|
||||
|
||||
@@ -257,9 +256,7 @@ HB_FUNC( QT_HBQSYNTAXHIGHLIGHTER )
|
||||
void * pObj = NULL;
|
||||
|
||||
if( hb_pcount() == 1 && HB_ISPOINTER( 1 ) )
|
||||
{
|
||||
pObj = new HBQSyntaxHighlighter( hbqt_par_QTextDocument( 1 ) ) ;
|
||||
}
|
||||
|
||||
hb_retptrGC( hbqt_gcAllocate_HBQSyntaxHighlighter( pObj ) );
|
||||
}
|
||||
|
||||
@@ -135,7 +135,7 @@ typedef struct
|
||||
QPointer< HBQTableView > pq;
|
||||
} QGC_POINTER_HBQTableView;
|
||||
|
||||
QT_G_FUNC( release_HBQTableView )
|
||||
static QT_G_FUNC( release_HBQTableView )
|
||||
{
|
||||
QGC_POINTER_HBQTableView * p = ( QGC_POINTER_HBQTableView * ) Cargo;
|
||||
|
||||
@@ -173,7 +173,7 @@ QT_G_FUNC( release_HBQTableView )
|
||||
}
|
||||
}
|
||||
|
||||
void * hbqt_gcAllocate_HBQTableView( void * pObj )
|
||||
static void * hbqt_gcAllocate_HBQTableView( void * pObj )
|
||||
{
|
||||
QGC_POINTER_HBQTableView * p = ( QGC_POINTER_HBQTableView * ) hb_gcAllocate( sizeof( QGC_POINTER_HBQTableView ), hbqt_gcFuncs() );
|
||||
|
||||
|
||||
@@ -99,6 +99,8 @@ static bool s_hbqtinit = false;
|
||||
static int s_argc;
|
||||
static char ** s_argv;
|
||||
|
||||
HB_FUNC( HB_QT ) {;}
|
||||
|
||||
/*
|
||||
* QApplication ( int & argc, char ** argv )
|
||||
* QApplication ( int & argc, char ** argv, bool GUIenabled )
|
||||
|
||||
@@ -85,12 +85,12 @@ typedef struct
|
||||
QPointer< QSyntaxHighlighter > pq;
|
||||
} QGC_POINTER_QSyntaxHighlighter;
|
||||
|
||||
QT_G_FUNC( release_QSyntaxHighlighter )
|
||||
QT_G_FUNC( hbqt_gcRelease_QSyntaxHighlighter )
|
||||
{
|
||||
QGC_POINTER_QSyntaxHighlighter * p = ( QGC_POINTER_QSyntaxHighlighter * ) Cargo;
|
||||
|
||||
HB_TRACE( HB_TR_DEBUG, ( "release_QSyntaxHighlighter p=%p", p));
|
||||
HB_TRACE( HB_TR_DEBUG, ( "release_QSyntaxHighlighter ph=%p pq=%p", p->ph, (void *)(p->pq)));
|
||||
HB_TRACE( HB_TR_DEBUG, ( "hbqt_gcRelease_QSyntaxHighlighter p=%p", p));
|
||||
HB_TRACE( HB_TR_DEBUG, ( "hbqt_gcRelease_QSyntaxHighlighter ph=%p pq=%p", p->ph, (void *)(p->pq)));
|
||||
|
||||
if( p && p->ph && p->pq )
|
||||
{
|
||||
@@ -110,16 +110,16 @@ QT_G_FUNC( release_QSyntaxHighlighter )
|
||||
break;
|
||||
}
|
||||
p->ph = NULL;
|
||||
HB_TRACE( HB_TR_DEBUG, ( "release_QSyntaxHighlighter Object deleted! %i B %i KB", ( int ) hb_xquery( 1001 ), hbqt_getmemused() ) );
|
||||
HB_TRACE( HB_TR_DEBUG, ( "hbqt_gcRelease_QSyntaxHighlighter Object deleted! %i B %i KB", ( int ) hb_xquery( 1001 ), hbqt_getmemused() ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
HB_TRACE( HB_TR_DEBUG, ( "NO release_QSyntaxHighlighter Object Name Missing!" ) );
|
||||
HB_TRACE( HB_TR_DEBUG, ( "NO hbqt_gcRelease_QSyntaxHighlighter Object Name Missing!" ) );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
HB_TRACE( HB_TR_DEBUG, ( "DEL release_QSyntaxHighlighter Object Already deleted!" ) );
|
||||
HB_TRACE( HB_TR_DEBUG, ( "DEL hbqt_gcRelease_QSyntaxHighlighter Object Already deleted!" ) );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -128,7 +128,7 @@ void * hbqt_gcAllocate_QSyntaxHighlighter( void * pObj )
|
||||
QGC_POINTER_QSyntaxHighlighter * p = ( QGC_POINTER_QSyntaxHighlighter * ) hb_gcAllocate( sizeof( QGC_POINTER_QSyntaxHighlighter ), hbqt_gcFuncs() );
|
||||
|
||||
p->ph = pObj;
|
||||
p->func = release_QSyntaxHighlighter;
|
||||
p->func = hbqt_gcRelease_QSyntaxHighlighter;
|
||||
new( & p->pq ) QPointer< QSyntaxHighlighter >( ( QSyntaxHighlighter * ) pObj );
|
||||
HB_TRACE( HB_TR_DEBUG, ( " new_QSyntaxHighlighter %i B %i KB", ( int ) hb_xquery( 1001 ), hbqt_getmemused() ) );
|
||||
return( p );
|
||||
|
||||
@@ -88,22 +88,22 @@
|
||||
* ~QTextCursor ()
|
||||
*/
|
||||
|
||||
QT_G_FUNC( release_QTextCursor )
|
||||
QT_G_FUNC( hbqt_gcRelease_QTextCursor )
|
||||
{
|
||||
QGC_POINTER * p = ( QGC_POINTER * ) Cargo;
|
||||
|
||||
HB_TRACE( HB_TR_DEBUG, ( "release_QTextCursor p=%p", p ) );
|
||||
HB_TRACE( HB_TR_DEBUG, ( "release_QTextCursor ph=%p", p->ph ) );
|
||||
HB_TRACE( HB_TR_DEBUG, ( "hbqt_gcRelease_QTextCursor p=%p", p ) );
|
||||
HB_TRACE( HB_TR_DEBUG, ( "hbqt_gcRelease_QTextCursor ph=%p", p->ph ) );
|
||||
|
||||
if( p && p->ph )
|
||||
{
|
||||
delete ( ( QTextCursor * ) p->ph );
|
||||
p->ph = NULL;
|
||||
HB_TRACE( HB_TR_DEBUG, ( "YES release_QTextCursor Object deleted! %i B %i KB", ( int ) hb_xquery( 1001 ), hbqt_getmemused() ) );
|
||||
HB_TRACE( HB_TR_DEBUG, ( "YES hbqt_gcRelease_QTextCursor Object deleted! %i B %i KB", ( int ) hb_xquery( 1001 ), hbqt_getmemused() ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
HB_TRACE( HB_TR_DEBUG, ( "DEL release_QTextCursor Object Already deleted!" ) );
|
||||
HB_TRACE( HB_TR_DEBUG, ( "DEL hbqt_gcRelease_QTextCursor Object Already deleted!" ) );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -112,7 +112,7 @@ void * hbqt_gcAllocate_QTextCursor( void * pObj )
|
||||
QGC_POINTER * p = ( QGC_POINTER * ) hb_gcAllocate( sizeof( QGC_POINTER ), hbqt_gcFuncs() );
|
||||
|
||||
p->ph = pObj;
|
||||
p->func = release_QTextCursor;
|
||||
p->func = hbqt_gcRelease_QTextCursor;
|
||||
HB_TRACE( HB_TR_DEBUG, ( " new_QTextCursor %i B %i KB", ( int ) hb_xquery( 1001 ), hbqt_getmemused() ) );
|
||||
return( p );
|
||||
}
|
||||
|
||||
@@ -63,12 +63,9 @@
|
||||
#include "hbclass.ch"
|
||||
|
||||
|
||||
CREATE CLASS QSyntaxHighlighter INHERIT QObject
|
||||
|
||||
VAR pPtr
|
||||
CREATE CLASS QSyntaxHighlighter INHERIT HbQtObjectHandler, QObject
|
||||
|
||||
METHOD new()
|
||||
METHOD configure( xObject )
|
||||
|
||||
METHOD document()
|
||||
METHOD setDocument( pDoc )
|
||||
@@ -76,7 +73,6 @@ CREATE CLASS QSyntaxHighlighter INHERIT QObject
|
||||
|
||||
ENDCLASS
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
METHOD QSyntaxHighlighter:new( ... )
|
||||
LOCAL p
|
||||
@@ -88,15 +84,6 @@ METHOD QSyntaxHighlighter:new( ... )
|
||||
RETURN Self
|
||||
|
||||
|
||||
METHOD QSyntaxHighlighter:configure( xObject )
|
||||
IF hb_isObject( xObject )
|
||||
::pPtr := xObject:pPtr
|
||||
ELSEIF hb_isPointer( xObject )
|
||||
::pPtr := xObject
|
||||
ENDIF
|
||||
RETURN Self
|
||||
|
||||
|
||||
METHOD QSyntaxHighlighter:document()
|
||||
RETURN Qt_QSyntaxHighlighter_document( ::pPtr )
|
||||
|
||||
|
||||
@@ -63,12 +63,9 @@
|
||||
#include "hbclass.ch"
|
||||
|
||||
|
||||
CREATE CLASS QTextCursor
|
||||
|
||||
VAR pPtr
|
||||
CREATE CLASS QTextCursor INHERIT HbQtObjectHandler
|
||||
|
||||
METHOD new()
|
||||
METHOD configure( xObject )
|
||||
|
||||
METHOD anchor()
|
||||
METHOD atBlockEnd()
|
||||
@@ -134,7 +131,6 @@ CREATE CLASS QTextCursor
|
||||
|
||||
ENDCLASS
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
METHOD QTextCursor:new( ... )
|
||||
LOCAL p
|
||||
@@ -146,15 +142,6 @@ METHOD QTextCursor:new( ... )
|
||||
RETURN Self
|
||||
|
||||
|
||||
METHOD QTextCursor:configure( xObject )
|
||||
IF hb_isObject( xObject )
|
||||
::pPtr := xObject:pPtr
|
||||
ELSEIF hb_isPointer( xObject )
|
||||
::pPtr := xObject
|
||||
ENDIF
|
||||
RETURN Self
|
||||
|
||||
|
||||
METHOD QTextCursor:anchor()
|
||||
RETURN Qt_QTextCursor_anchor( ::pPtr )
|
||||
|
||||
|
||||
@@ -86,6 +86,8 @@ static bool s_hbqtinit = false;
|
||||
static int s_argc;
|
||||
static char ** s_argv;
|
||||
|
||||
HB_FUNC( HB_QT ) {;}
|
||||
|
||||
/*
|
||||
* QApplication ( int & argc, char ** argv )
|
||||
* QApplication ( int & argc, char ** argv, bool GUIenabled )
|
||||
@@ -276,4 +278,4 @@ void saveStateRequest ( QSessionManager & manager )
|
||||
|
||||
hbqt_par_QApplication( 1 )->commitData( *hbqt_par_QSessionManager( 2 ) );
|
||||
|
||||
*/
|
||||
*/
|
||||
|
||||
@@ -22,6 +22,7 @@ C_SOURCES := \
|
||||
wce_smsc.c \
|
||||
win_com.c \
|
||||
win_dll.c \
|
||||
win_err.c \
|
||||
win_misc.c \
|
||||
win_osc.c \
|
||||
win_prn1.c \
|
||||
|
||||
@@ -53,6 +53,8 @@
|
||||
#ifndef __HBWAPI_H
|
||||
#define __HBWAPI_H
|
||||
|
||||
#include "hbwin.h"
|
||||
|
||||
#define wapi_par_WNDPROC( n ) ( ( WNDPROC ) hb_parptr( n ) )
|
||||
#define wapi_par_WPARAM( n ) ( ( WPARAM ) hb_parptr( n ) )
|
||||
#define wapi_par_LPARAM( n ) ( ( LPARAM ) hb_parptr( n ) )
|
||||
|
||||
@@ -50,6 +50,9 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef __HBWIN_H
|
||||
#define __HBWIN_H
|
||||
|
||||
#define WIN_COM_FUN_CREATEFILE 1
|
||||
#define WIN_COM_FUN_GETCOMMSTATE 2
|
||||
#define WIN_COM_FUN_SETCOMMSTATE 3
|
||||
@@ -73,3 +76,12 @@
|
||||
#define WIN_COM_DBGTIMEOUTS 0x10
|
||||
#define WIN_COM_DBGQUEUE 0x20
|
||||
#define WIN_COM_DBGALL 0x3F
|
||||
|
||||
HB_EXTERN_BEGIN
|
||||
|
||||
HB_EXPORT void hbwin_SetLastError( void );
|
||||
HB_EXPORT DWORD hbwin_GetLastError( void );
|
||||
|
||||
HB_EXTERN_END
|
||||
|
||||
#endif /* __HBWIN_H */
|
||||
|
||||
@@ -50,6 +50,9 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef __HBWINOLE_H
|
||||
#define __HBWINOLE_H
|
||||
|
||||
#include "hbapi.h"
|
||||
#include "hbapiitm.h"
|
||||
#include "hbapicls.h"
|
||||
@@ -118,3 +121,5 @@ HB_EXPORT HB_BOOL hb_oleAxInit( void );
|
||||
HB_EXPORT PHB_ITEM hb_oleAxControlNew( PHB_ITEM pItem, HWND hWnd );
|
||||
|
||||
HB_EXTERN_END
|
||||
|
||||
#endif /* __HBWINOLE_H */
|
||||
|
||||
@@ -151,12 +151,13 @@ HB_FUNC( WAPI_SETPROCESSWORKINGSETSIZE )
|
||||
|
||||
HB_FUNC( WAPI_GETLASTERROR )
|
||||
{
|
||||
hb_retnl( ( long ) GetLastError() );
|
||||
hb_retnl( ( long ) hbwin_GetLastError() );
|
||||
}
|
||||
|
||||
HB_FUNC( WAPI_SETLASTERROR )
|
||||
{
|
||||
SetLastError( ( DWORD ) hb_parnl( 1 ) );
|
||||
hbwin_SetLastError();
|
||||
}
|
||||
|
||||
HB_FUNC( WAPI_SETERRORMODE )
|
||||
|
||||
@@ -53,6 +53,7 @@
|
||||
#define HB_OS_WIN_USED
|
||||
|
||||
#include "hbapi.h"
|
||||
#include "hbwapi.h"
|
||||
#include "hbwinuni.h"
|
||||
|
||||
static HB_GARBAGE_FUNC( wapi_mutex_release )
|
||||
@@ -98,6 +99,8 @@ HB_FUNC( WAPI_CREATEMUTEX )
|
||||
void * hName;
|
||||
HANDLE hMutex = CreateMutex( ( LPSECURITY_ATTRIBUTES ) hb_parptr( 1 ), hb_parl( 2 ), HB_PARSTR( 3, &hName, NULL ) );
|
||||
|
||||
hbwin_SetLastError();
|
||||
|
||||
wapi_mutex_ret( hMutex );
|
||||
hb_strfree( hName );
|
||||
}
|
||||
@@ -109,6 +112,8 @@ HB_FUNC( WAPI_OPENMUTEX )
|
||||
void * hName;
|
||||
HANDLE hMutex = OpenMutex( hb_parnl( 1 ), hb_parl( 2 ), HB_PARSTR( 3, &hName, NULL ) );
|
||||
|
||||
hbwin_SetLastError();
|
||||
|
||||
wapi_mutex_ret( hMutex );
|
||||
hb_strfree( hName );
|
||||
#else
|
||||
@@ -121,5 +126,12 @@ HB_FUNC( WAPI_RELEASEMUTEX )
|
||||
{
|
||||
HANDLE hMutex = wapi_mutex_par( 1 );
|
||||
|
||||
hb_retl( hMutex ? ReleaseMutex( hMutex ) : HB_FALSE );
|
||||
if( hMutex )
|
||||
{
|
||||
BOOL bResult = ReleaseMutex( hMutex );
|
||||
hbwin_SetLastError();
|
||||
hb_retl( bResult );
|
||||
}
|
||||
else
|
||||
hb_retl( HB_FALSE );
|
||||
}
|
||||
|
||||
77
harbour/contrib/hbwin/win_err.c
Normal file
77
harbour/contrib/hbwin/win_err.c
Normal file
@@ -0,0 +1,77 @@
|
||||
/*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
/*
|
||||
* Harbour Project source code:
|
||||
* Windows API last error handling
|
||||
*
|
||||
* Copyright 2010 Viktor Szakats (harbour.01 syenar.hu)
|
||||
* www - http://www.harbour-project.org
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this software; see the file COPYING. If not, write to
|
||||
* the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
|
||||
* Boston, MA 02111-1307 USA (or visit the web site http://www.gnu.org/).
|
||||
*
|
||||
* As a special exception, the Harbour Project gives permission for
|
||||
* additional uses of the text contained in its release of Harbour.
|
||||
*
|
||||
* The exception is that, if you link the Harbour libraries with other
|
||||
* files to produce an executable, this does not by itself cause the
|
||||
* resulting executable to be covered by the GNU General Public License.
|
||||
* Your use of that executable is in no way restricted on account of
|
||||
* linking the Harbour library code into it.
|
||||
*
|
||||
* This exception does not however invalidate any other reasons why
|
||||
* the executable file might be covered by the GNU General Public License.
|
||||
*
|
||||
* This exception applies only to the code released by the Harbour
|
||||
* Project under the name Harbour. If you copy code from other
|
||||
* Harbour Project or Free Software Foundation releases into a copy of
|
||||
* Harbour, as the General Public License permits, the exception does
|
||||
* not apply to the code that you add in this way. To avoid misleading
|
||||
* anyone as to the status of such modified files, you must delete
|
||||
* this exception notice from them.
|
||||
*
|
||||
* If you write modifications of your own for Harbour, it is your choice
|
||||
* whether to permit this exception to apply to your modifications.
|
||||
* If you do not wish that, delete this exception notice.
|
||||
*
|
||||
*/
|
||||
|
||||
#define HB_OS_WIN_USED
|
||||
|
||||
#include "hbapi.h"
|
||||
#include "hbstack.h"
|
||||
|
||||
typedef struct
|
||||
{
|
||||
DWORD dwLastError;
|
||||
} HB_WINERRDATA, * PHB_WINERRDATA;
|
||||
|
||||
static HB_TSD_NEW( s_winerrData, sizeof( HB_WINERRDATA ), NULL, NULL );
|
||||
|
||||
void hbwin_SetLastError( void )
|
||||
{
|
||||
PHB_WINERRDATA pWinErrData = ( PHB_WINERRDATA ) hb_stackGetTSD( &s_winerrData );
|
||||
|
||||
pWinErrData->dwLastError = GetLastError();
|
||||
}
|
||||
|
||||
DWORD hbwin_GetLastError( void )
|
||||
{
|
||||
PHB_WINERRDATA pWinErrData = ( PHB_WINERRDATA ) hb_stackGetTSD( &s_winerrData );
|
||||
|
||||
return pWinErrData->dwLastError;
|
||||
}
|
||||
@@ -51,7 +51,7 @@ PRG_HEADERS := \
|
||||
|
||||
# Try to be in sync with hbqt, but not too hard, since this
|
||||
# lib doesn't need QT external component directly.
|
||||
ifeq ($(filter $(HB_PLATFORM),dos os2),)
|
||||
ifeq ($(filter $(HB_PLATFORM),dos),)
|
||||
ifeq ($(filter $(HB_COMPILER),mingw64 watcom bcc pocc pocc64 poccarm),)
|
||||
ifneq ($(HB_WITH_QT),no)
|
||||
|
||||
@@ -59,7 +59,6 @@ ifeq ($(filter $(HB_PLATFORM),dos os2),)
|
||||
|
||||
include $(TOP)$(ROOT)config/header.mk
|
||||
include $(TOP)$(ROOT)config/lib.mk
|
||||
|
||||
else
|
||||
HB_SKIP_REASON := component explicitly disabled
|
||||
include $(TOP)$(ROOT)config/none.mk
|
||||
|
||||
Reference in New Issue
Block a user