2001-08-24 16:03 GMT+2 Maurilio Longo <maurilio.longo@libero.it>

+ contrib/os2pm
   + contrib/os2pm/os2pm.c
   + contrib/os2pm/tform.prg
   + contrib/os2pm/os2pm.ch
   + contrib/os2pm/Makefile
     + added files of an early implementation of a generic GUI
       framework for harbour. At present time they work only under OS/2 PM
This commit is contained in:
Maurilio Longo
2001-08-24 14:09:47 +00:00
parent 13698198a7
commit 2e3d4909a5
5 changed files with 6276 additions and 2 deletions

View File

@@ -1,9 +1,18 @@
2001-08-24 16:03 GMT+2 Maurilio Longo <maurilio.longo@libero.it>
+ contrib/os2pm
+ contrib/os2pm/os2pm.c
+ contrib/os2pm/tform.prg
+ contrib/os2pm/os2pm.ch
+ contrib/os2pm/Makefile
+ added files of an early implementation of a generic GUI
framework for harbour. At present time they work only under OS/2 PM
2001-08-23 23:18 GMT Dave Pearson <davep@davep.org>
* source/rtl/profiler.prg
* Minor tidy-up of a couple of comments.
* tests/testprof.org
* Updated to test the various reporting classes.
2001-08-23 22:51 GMT Dave Pearson <davep@davep.org>
* doc/readme.txt
* Cut down to a bare minimum. Most of the information in there was
@@ -11,7 +20,7 @@
points the reader at the web site and the FAQ and reminds them that
they'll find copious documentation in the same place that they
found the README file.
2001-08-23 23:13 GMT+2 Maurilio Longo <maurilio.longo@libero.it>
* source/vm/Makefile
+ if HB_GT_LIB == os2pm then compiles mainpm.c instead of main.c

View File

@@ -0,0 +1,17 @@
#
# $Id$
#
ROOT = ../../
C_SOURCES=\
os2pm.c \
PRG_SOURCES=\
tform.prg \
LIBNAME=os2pm
include $(TOP)$(ROOT)config/lib.cf

View File

@@ -0,0 +1,64 @@
#define INCL_BASE
#define INCL_PM
#include <os2.h>
#include "hbapi.h"
HAB hb_pm_GetHab( void );
HB_FUNC( WINREGISTERCLASS )
{
hb_retl( WinRegisterClass( hb_pm_GetHab(), /* anchor block handle */
hb_parc( 1 ), /* Class Name */
( PFNWP ) WinDefWindowProc, /* default Class procedure */
hb_parnl( 2 ), /* style */
hb_parnl( 3 ) ) ); /* extra bytes */
}
HB_FUNC( WINCREATESTDWINDOW )
{
ULONG lFrame = hb_parnl( 3 );
HWND hWndClient, hWndFrame;
hb_retnl( ( LONG ) hWndFrame =
WinCreateStdWindow( ( HWND ) hb_parnl( 1 ), /* hWndParent */
hb_parnl( 2 ), /* style */
&lFrame, /* lFrame */
hb_parc( 4 ), /* cClassName */
hb_parc( 5 ), /* cCaption */
hb_parnl( 6 ), /* lStyleClient */
hb_parnl( 7 ), /* hModule */
hb_parnl( 8 ), /* nId */
( PHWND ) &hWndClient ) ); /* Window client handle */
hb_stornl( ( LONG ) hWndClient, 9 );
}
HB_FUNC( HB_PM_SHOWMODAL )
{
QMSG qmsg;
HAB hab = hb_pm_GetHab();
while( WinGetMsg( hab, &qmsg, 0, 0, 0 ) )
{
WinDispatchMsg( hab, &qmsg );
}
}
/* nOr() is a very used function */
HB_FUNC( NOR )
{
LONG lRet = 0;
USHORT i = 0;
while( i < hb_pcount() )
lRet = lRet | hb_parnl( ++i );
hb_retnl( lRet );
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,54 @@
#include "common.ch"
#include "hbclass.ch"
#include "os2pm.ch" // Needed to store some OS/2 PM constant values
CLASS TForm
DATA hWnd
CLASSDATA lRegistered
METHOD New()
METHOD ShowModal()
ENDCLASS
METHOD New() CLASS TForm
local hWndClient
DEFAULT ::lRegistered TO .f.
if ! ::lRegistered
// Notice that this code may be moved to a method Register()
// so we hide again the OS API details
WinRegisterClass( "HB_TFORM",;
nOr( CS_SIZEREDRAW, 0x2000001 ), 0 )
::lRegistered = .t.
endif
// Again this code may be moved to a method Create() to hide the
// OS API details
::hWnd = WinCreateStdWindow( HWND_DESKTOP,;
WS_VISIBLE,;
nOr( FCF_TITLEBAR, FCF_SYSMENU,;
FCF_SIZEBORDER, FCF_TASKLIST,;
FCF_MINMAX, FCF_SHELLPOSITION ),;
"HB_TFORM", "Harbour TForm",;
nOr( WS_SYNCPAINT, WS_VISIBLE ),,,;
@hWndClient ) // Not used yet
return Self
METHOD ShowModal() CLASS TForm
HB_PM_ShowModal()
return nil