You can subscribe to this list here.
| 2003 |
Jan
(30) |
Feb
(20) |
Mar
(151) |
Apr
(86) |
May
(23) |
Jun
(25) |
Jul
(107) |
Aug
(141) |
Sep
(55) |
Oct
(85) |
Nov
(65) |
Dec
(2) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2004 |
Jan
(22) |
Feb
(18) |
Mar
(3) |
Apr
(16) |
May
(69) |
Jun
(3) |
Jul
(1) |
Aug
(3) |
Sep
(1) |
Oct
|
Nov
(6) |
Dec
(1) |
| 2005 |
Jan
(2) |
Feb
(16) |
Mar
|
Apr
|
May
|
Jun
(47) |
Jul
(1) |
Aug
|
Sep
(6) |
Oct
(4) |
Nov
|
Dec
(34) |
| 2006 |
Jan
(39) |
Feb
|
Mar
(2) |
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
(5) |
Oct
|
Nov
(4) |
Dec
|
| 2007 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(1) |
| 2008 |
Jan
|
Feb
|
Mar
(26) |
Apr
(1) |
May
(1) |
Jun
|
Jul
(5) |
Aug
(2) |
Sep
(8) |
Oct
(8) |
Nov
(22) |
Dec
(30) |
| 2009 |
Jan
(10) |
Feb
(13) |
Mar
(14) |
Apr
(14) |
May
(32) |
Jun
(25) |
Jul
(36) |
Aug
(10) |
Sep
(2) |
Oct
|
Nov
|
Dec
(10) |
| 2010 |
Jan
(9) |
Feb
(4) |
Mar
(2) |
Apr
(1) |
May
(2) |
Jun
(2) |
Jul
(1) |
Aug
(4) |
Sep
|
Oct
(1) |
Nov
|
Dec
|
|
From: <kr_...@us...> - 2003-09-05 11:38:00
|
Update of /cvsroot/htoolkit/HSQL/src/PostgreSQL In directory sc8-pr-cvs1:/tmp/cvs-serv12029/src/PostgreSQL Modified Files: HSQL.hsc Log Message: Basic build system for HSQL Index: HSQL.hsc =================================================================== RCS file: /cvsroot/htoolkit/HSQL/src/PostgreSQL/HSQL.hsc,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** HSQL.hsc 24 Jan 2003 00:18:52 -0000 1.1 --- HSQL.hsc 5 Sep 2003 11:37:56 -0000 1.2 *************** *** 21,27 **** , forEachRow' -- :: (Statement -> IO ()) -> Statement -> IO () , collectRows -- :: (Statement -> IO s) -> Statement -> IO [s] - #ifdef ENABLED_GUI - , fillitems -- :: HasItems w => Connection -> String -> Config (w Int) - #endif , module Graphics.Data.Geometry ) where --- 21,24 ---- *************** *** 455,470 **** return (x:xs) else closeStatement stmt >> return [] - - ----------------------------------------------------------------------------------------- - -- fillitems - ----------------------------------------------------------------------------------------- - - #ifdef ENABLED_GUI - fillitems :: HasItems w => Connection -> String -> Config (w Int) - fillitems conn sqlExpr widget = query conn sqlExpr >>= forEachRow' addItemToWidget - where - addItemToWidget stmt = do - (id :: Int) <- getFieldValue stmt "id" - (title :: Title) <- getFieldValue stmt "Name" - addItem id title widget - #endif \ No newline at end of file --- 452,453 ---- |
|
From: <kr_...@us...> - 2003-09-05 11:38:00
|
Update of /cvsroot/htoolkit/HSQL/src/ODBC In directory sc8-pr-cvs1:/tmp/cvs-serv12029/src/ODBC Modified Files: HSQL.hsc Log Message: Basic build system for HSQL Index: HSQL.hsc =================================================================== RCS file: /cvsroot/htoolkit/HSQL/src/ODBC/HSQL.hsc,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** HSQL.hsc 24 Jan 2003 00:08:58 -0000 1.1 --- HSQL.hsc 5 Sep 2003 11:37:56 -0000 1.2 *************** *** 21,27 **** , forEachRow' -- :: (Statement -> IO ()) -> Statement -> IO () , collectRows -- :: (Statement -> IO s) -> Statement -> IO [s] - #ifdef ENABLED_GUI - , fillitems -- :: HasItems w => Connection -> String -> Config (w Int) - #endif ) where --- 21,24 ---- *************** *** 36,43 **** import System.IO.Unsafe import System.Time - #ifdef ENABLED_GUI - import Graphics.UI.HGUI.BasicTypes - import Graphics.UI.HGUI.BasicClasses - #endif #include <time.h> --- 33,36 ---- *************** *** 59,63 **** foreign import stdcall "sqlext.h SQLAllocEnv" sqlAllocEnv :: Ptr HENV -> IO SQLRETURN ! foreign import stdcall "sqlext.h SQLFreeEnv" sqlFreeEnv :: HENV -> IO SQLRETURN foreign import stdcall "sqlext.h SQLAllocConnect" sqlAllocConnect :: HENV -> Ptr HDBC -> IO SQLRETURN foreign import stdcall "sqlext.h SQLFreeConnect" sqlFreeConnect:: HDBC -> IO SQLRETURN --- 52,56 ---- foreign import stdcall "sqlext.h SQLAllocEnv" sqlAllocEnv :: Ptr HENV -> IO SQLRETURN ! foreign import stdcall "sqlext.h &SQLFreeEnv" sqlFreeEnv :: FunPtr (HENV -> IO ()) foreign import stdcall "sqlext.h SQLAllocConnect" sqlAllocConnect :: HENV -> Ptr HDBC -> IO SQLRETURN foreign import stdcall "sqlext.h SQLFreeConnect" sqlFreeConnect:: HDBC -> IO SQLRETURN *************** *** 183,190 **** free phEnv handleSqlResult 0 nullPtr res ! newForeignPtr hEnv (closeEnvironment hEnv) ! where ! closeEnvironment :: HENV -> IO () ! closeEnvironment hEnv = sqlFreeEnv hEnv >>= handleSqlResult (#const SQL_HANDLE_ENV) hEnv ----------------------------------------------------------------------------------------- --- 176,180 ---- free phEnv handleSqlResult 0 nullPtr res ! newForeignPtr hEnv sqlFreeEnv ----------------------------------------------------------------------------------------- *************** *** 474,489 **** return (x:xs) else closeStatement stmt >> return [] - - ----------------------------------------------------------------------------------------- - -- fillitems - ----------------------------------------------------------------------------------------- - - #ifdef ENABLED_GUI - fillitems :: HasItems w => Connection -> String -> Config (w Int) - fillitems conn sqlExpr widget = query conn sqlExpr >>= forEachRow' addItemToWidget - where - addItemToWidget stmt = do - (id :: Int) <- getFieldValue stmt "id" - (title :: Title) <- getFieldValue stmt "Name" - addItem id title widget - #endif \ No newline at end of file --- 464,465 ---- |
|
From: <kr_...@us...> - 2003-09-04 09:19:51
|
Update of /cvsroot/htoolkit/port In directory sc8-pr-cvs1:/tmp/cvs-serv22261 Added Files: INSTALL README Removed Files: install.txt readme.txt Log Message: Rename install.txt to INSTALL and readme.txt to README --- NEW FILE: INSTALL --- ------------------------------------------------------------------------- Port: the portable haskell GUI abstraction. Krasimir Angelov ------------------------------------------------------------------------- Build the package and documentation: > ./configure > make Install > make install Notes: *) You should build the package on windows from the bash shell. *) Use ghc version 6.0 or higher. --- NEW FILE: README --- ------------------------------------------------------------------------- Port: the portable haskell GUI abstraction. Krasimir Angelov & Daan Leijen ------------------------------------------------------------------------- The "Graphics.UI.Port" library is a portable graphical user interface library for Haskell. It currently supports Windows and GTK. The Port library is designed to be a *low-level* library that only makes the portable C-library available to Haskell. Other Haskell libraries can use Port to implement a higher level GUI interface in Haskell. Port is not yet a complete GUI library but it implements a fair amount of widgets and is probably "complete enough" for most applications. Documentation is written together with the code and it is adviced to use haddock for generating the documentation automatically. See "install.txt" for instructions on building and installing the Port package. --- install.txt DELETED --- --- readme.txt DELETED --- |
|
From: <kr_...@us...> - 2003-09-03 17:05:31
|
Update of /cvsroot/htoolkit/port/src/cbits/GTK
In directory sc8-pr-cvs1:/tmp/cvs-serv18644
Added Files:
GroupBox.c
Log Message:
Add GroupBox support for GTK
--- NEW FILE: GroupBox.c ---
#include "GroupBox.h"
#include "Internals.h"
#include "Handlers_stub.h"
static void groupbox_size_allocate_handler(GtkWidget *widget, GtkAllocation *allocation, gpointer user_data)
{
handleContainerReLayout(widget);
};
WindowHandle osCreateGroupBox(WindowHandle form)
{
GtkWidget *page, *groupbox;
groupbox = gtk_frame_new("");
gtk_fixed_put(GTK_FIXED(GTK_BIN(GTK_BIN(form)->child)->child), groupbox, 0, 0);
page = gtk_viewport_new(NULL,NULL);
gtk_container_add(GTK_CONTAINER(groupbox), page);
gtk_container_add(GTK_CONTAINER(page), gtk_fixed_new());
gtk_signal_connect (GTK_OBJECT(groupbox), "size-allocate",
GTK_SIGNAL_FUNC(groupbox_size_allocate_handler),
NULL);
gtk_widget_show_all(groupbox);
return groupbox;
};
void osGetGroupBoxBordersSize(WindowHandle groupbox, int *res)
{
res [0] = 0;
res [1] = 0;
res [2] = 10;
res [3] = 20;
}
char *osGetGroupBoxText(WindowHandle groupbox)
{
return strdup(gtk_frame_get_label(GTK_FRAME(groupbox)));
};
void osSetGroupBoxText(WindowHandle groupbox, char *txt)
{
gtk_frame_set_label(GTK_FRAME(groupbox), txt);
};
|
|
From: <kr_...@us...> - 2003-09-03 17:03:31
|
Update of /cvsroot/htoolkit/port In directory sc8-pr-cvs1:/tmp/cvs-serv18298 Modified Files: makefile Log Message: Add GroupBox.c to list of sources Index: makefile =================================================================== RCS file: /cvsroot/htoolkit/port/makefile,v retrieving revision 1.39 retrieving revision 1.40 diff -C2 -d -r1.39 -r1.40 *** makefile 31 Aug 2003 11:30:18 -0000 1.39 --- makefile 3 Sep 2003 17:03:24 -0000 1.40 *************** *** 49,53 **** FileDialog.c ColorDialog.c FontDialog.c AboutDialog.c PopUp.c Canvas.c Menu.c ListBox.c \ Label.c Font.c RadioBox.c Timer.c Frame.c Message.c Slider.c ProgressBar.c ConfigKey.c \ ! ToolBar.c Notebook.c ifeq "$(GUILIB)" "WIN32" --- 49,53 ---- FileDialog.c ColorDialog.c FontDialog.c AboutDialog.c PopUp.c Canvas.c Menu.c ListBox.c \ Label.c Font.c RadioBox.c Timer.c Frame.c Message.c Slider.c ProgressBar.c ConfigKey.c \ ! ToolBar.c Notebook.c GroupBox.c ifeq "$(GUILIB)" "WIN32" |
|
From: <kr_...@us...> - 2003-09-01 20:27:55
|
Update of /cvsroot/htoolkit/gio/src/examples/simple
In directory sc8-pr-cvs1:/tmp/cvs-serv26139/gio/src/examples/simple
Modified Files:
SimpleControls.hs
Log Message:
Added GroupBox control. /* Still only for Windows */
Index: SimpleControls.hs
===================================================================
RCS file: /cvsroot/htoolkit/gio/src/examples/simple/SimpleControls.hs,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** SimpleControls.hs 24 Aug 2003 21:05:17 -0000 1.1
--- SimpleControls.hs 1 Sep 2003 20:27:50 -0000 1.2
***************
*** 11,19 ****
-- Buttons page
pg1 <- notebookPage [title =: "Buttons"] nb
! b1pg1 <- button [title =: "Button1", on command =: messageAlert "Button1 clicked"] pg1
! b2pg1 <- button [title =: "Button2", on command =: messageAlert "Button2 clicked"] pg1
! set pg1 [layout =: b1pg1 <<<< b2pg1]
! -- page 2
pg2 <- notebookPage [title =: "Edit"] nb
lbl <- label [title =: "Comments"] pg2
--- 11,21 ----
-- Buttons page
pg1 <- notebookPage [title =: "Buttons"] nb
! group <- groupBox [title =: "Buttons"] pg1
! b1pg1 <- button [title =: "Button1", on command =: messageAlert "Button1 clicked"] group
! b2pg1 <- button [title =: "Button2", on command =: messageAlert "Button2 clicked"] group
! set group [layout =: b1pg1 <<<< b2pg1]
! set pg1 [layout =: group]
! -- Edit page
pg2 <- notebookPage [title =: "Edit"] nb
lbl <- label [title =: "Comments"] pg2
***************
*** 23,33 ****
-- radio buttons
! rtop <- radioBox [title =: "top", on command =: set nb [labelsPosition =: PosTop ]] w
! rleft <- radioBox [title =: "left", on command =: set nb [labelsPosition =: PosLeft ]] w
! rbottom <- radioBox [title =: "bottom", on command =: set nb [labelsPosition =: PosBottom]] w
! rright <- radioBox [title =: "right", on command =: set nb [labelsPosition =: PosRight ]] w
setRadioBoxGroup [rtop,rleft,rbottom,rright]
e <- entry [readOnly =: True, title =: "Hello, world!"] w
! set w [layout =: (vertical [rtop,rleft,rbottom,rright] <<< vfill (hfill nb)) ^^^ hfill e]
--- 25,37 ----
-- radio buttons
! group <- groupBox [title =: "Tabs"] w
! rtop <- radioBox [title =: "top", on command =: set nb [labelsPosition =: PosTop ]] group
! rleft <- radioBox [title =: "left", on command =: set nb [labelsPosition =: PosLeft ]] group
! rbottom <- radioBox [title =: "bottom", on command =: set nb [labelsPosition =: PosBottom]] group
! rright <- radioBox [title =: "right", on command =: set nb [labelsPosition =: PosRight ]] group
setRadioBoxGroup [rtop,rleft,rbottom,rright]
+ set group [layout =: vertical [rtop,rleft,rbottom,rright]]
e <- entry [readOnly =: True, title =: "Hello, world!"] w
! set w [layout =: (group <<< vfill (hfill nb)) ^^^ hfill e]
|
|
From: <kr_...@us...> - 2003-09-01 20:27:55
|
Update of /cvsroot/htoolkit/port/src/include In directory sc8-pr-cvs1:/tmp/cvs-serv26139/port/src/include Modified Files: HsPort.h Added Files: GroupBox.h Log Message: Added GroupBox control. /* Still only for Windows */ --- NEW FILE: GroupBox.h --- #ifndef GROUPBOX_H #define GROUPBOX_H #include "Types.h" WindowHandle osCreateGroupBox(WindowHandle form); void osGetGroupBoxBordersSize(WindowHandle box, int *res); char *osGetGroupBoxText(WindowHandle box); void osSetGroupBoxText(WindowHandle box, char *txt); #endif Index: HsPort.h =================================================================== RCS file: /cvsroot/htoolkit/port/src/include/HsPort.h,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** HsPort.h 24 Aug 2003 13:57:34 -0000 1.7 --- HsPort.h 1 Sep 2003 20:27:49 -0000 1.8 *************** *** 22,23 **** --- 22,24 ---- #include "port/ConfigKey.h" #include "port/Notebook.h" + #include "port/GroupBox.h" |
|
From: <kr_...@us...> - 2003-09-01 20:27:55
|
Update of /cvsroot/htoolkit/port/src/cbits/Win32
In directory sc8-pr-cvs1:/tmp/cvs-serv26139/port/src/cbits/Win32
Modified Files:
Util.c Window.c
Added Files:
GroupBox.c
Log Message:
Added GroupBox control. /* Still only for Windows */
--- NEW FILE: GroupBox.c ---
#include "GroupBox.h"
#include "Internals.h"
WNDPROC DefGroupBoxProc = NULL;
extern LRESULT CALLBACK HWindowSharedFunction(WNDPROC pDefWindowProc, HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
LRESULT CALLBACK HGroupBoxFunction(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
switch (uMsg)
{
case WM_PAINT:
return CallWindowProc(DefGroupBoxProc, hWnd, uMsg, wParam, lParam);
};
return HWindowSharedFunction(DefGroupBoxProc, hWnd, uMsg, wParam, lParam);
}
WindowHandle osCreateGroupBox(WindowHandle form)
{
HWND hWnd;
hWnd = CreateWindow(
"HGROUPBOX",
NULL,
WS_CHILD | WS_VISIBLE | BS_GROUPBOX,
0,0,0,0,
form,
NULL,
ghModule,
NULL
);
return checkWindow(hWnd, "HGROUPBOX");
};
void osGetGroupBoxBordersSize(WindowHandle box, int *res)
{
SIZE sz;
HDC hDC = GetDC(box);
HFONT hFont = (HFONT) SendMessage(box,WM_GETFONT,0,0);
int nLen = GetWindowTextLength(box);
char *buffer = (char *) rmalloc(nLen+1);
nLen = GetWindowText(box, buffer, nLen+1);
if (hFont)
SelectObject(hDC, hFont);
GetTextExtentPoint32(hDC, buffer, nLen, &sz);
rfree(buffer);
ReleaseDC(box, hDC);
res[0] = 10;
res[1] = sz.cy+2;
res[2] = 10;
res[3] = 10;
}
char *osGetGroupBoxText(WindowHandle box)
{
int nLen = GetWindowTextLength(box);
char *buffer = (char *) rmalloc(nLen+1);
GetWindowText(box, buffer, nLen+1);
return buffer;
};
void osSetGroupBoxText(WindowHandle box, char *txt)
{
SetWindowText(box, txt);
};
Index: Util.c
===================================================================
RCS file: /cvsroot/htoolkit/port/src/cbits/Win32/Util.c,v
retrieving revision 1.23
retrieving revision 1.24
diff -C2 -d -r1.23 -r1.24
*** Util.c 27 Aug 2003 08:16:53 -0000 1.23
--- Util.c 1 Sep 2003 20:27:49 -0000 1.24
***************
*** 37,43 ****
--- 37,45 ----
extern LRESULT CALLBACK HNotebookFunction(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
extern LRESULT CALLBACK HNotebookPageFunction(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
+ extern LRESULT CALLBACK HGroupBoxFunction(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
extern WNDPROC DefToolBarProc;
extern WNDPROC DefTabCtrlProc;
+ extern WNDPROC DefGroupBoxProc;
void osInit(char *appName, char *appVersion, int DocumentInterface)
***************
*** 126,129 ****
--- 128,139 ----
wc.lpszMenuName = NULL;
wc.lpszClassName = "HCOMPOUND";
+ RegisterClass(&wc);
+
+ // GroupBox class
+ GetClassInfo(ghModule, "BUTTON", &wc);
+ DefGroupBoxProc = wc.lpfnWndProc;
+ wc.style = CS_DBLCLKS;
+ wc.lpfnWndProc = HGroupBoxFunction;
+ wc.lpszClassName = "HGROUPBOX";
RegisterClass(&wc);
Index: Window.c
===================================================================
RCS file: /cvsroot/htoolkit/port/src/cbits/Win32/Window.c,v
retrieving revision 1.46
retrieving revision 1.47
diff -C2 -d -r1.46 -r1.47
*** Window.c 27 Aug 2003 08:22:13 -0000 1.46
--- Window.c 1 Sep 2003 20:27:49 -0000 1.47
***************
*** 59,73 ****
while (hCtrl)
{
! GetWindowRect(hCtrl,&rect);
! upLeft.x = rect.left;
! upLeft.y = rect.top;
! ScreenToClient(hWnd,&upLeft);
! downRight.x = rect.right;
! downRight.y = rect.bottom;
! ScreenToClient(hWnd,&downRight);
! hTmpRgn = CreateRectRgn(upLeft.x, upLeft.y, downRight.x, downRight.y);
! CombineRgn(hRgn, hRgn, hTmpRgn, RGN_DIFF);
! DeleteObject(hTmpRgn);
hCtrl = GetNextWindow(hCtrl,GW_HWNDNEXT);
--- 59,81 ----
while (hCtrl)
{
! char buffer[20];
!
! GetClassName(hCtrl,buffer,sizeof(buffer));
!
! // fill background for all windows except GroupBox
! if (_stricmp(buffer, "HGROUPBOX") != 0)
! {
! GetWindowRect(hCtrl,&rect);
! upLeft.x = rect.left;
! upLeft.y = rect.top;
! ScreenToClient(hWnd,&upLeft);
! downRight.x = rect.right;
! downRight.y = rect.bottom;
! ScreenToClient(hWnd,&downRight);
! hTmpRgn = CreateRectRgn(upLeft.x, upLeft.y, downRight.x, downRight.y);
! CombineRgn(hRgn, hRgn, hTmpRgn, RGN_DIFF);
! DeleteObject(hTmpRgn);
! }
hCtrl = GetNextWindow(hCtrl,GW_HWNDNEXT);
***************
*** 591,595 ****
}
! return pDefWindowProc(hWnd, uMsg, wParam, lParam);
};
--- 599,603 ----
}
! return CallWindowProc(pDefWindowProc, hWnd, uMsg, wParam, lParam);
};
***************
*** 703,707 ****
LRESULT CALLBACK HCompoundControlFunction(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
! return HWindowSharedFunction(DefMDIChildProc, hWnd, uMsg, wParam, lParam);
}
--- 711,715 ----
LRESULT CALLBACK HCompoundControlFunction(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
! return HWindowSharedFunction(DefWindowProc, hWnd, uMsg, wParam, lParam);
}
***************
*** 1344,1348 ****
if (_stricmp(buffer, "HNOTEBOOK") != 0 &&
! _stricmp(buffer, "HNOTEBOOKPAGE") != 0)
{
handleContainerReLayout(hWnd);
--- 1352,1357 ----
if (_stricmp(buffer, "HNOTEBOOK") != 0 &&
! _stricmp(buffer, "HNOTEBOOKPAGE") != 0 &&
! _stricmp(buffer, "HGROUPBOX") != 0)
{
handleContainerReLayout(hWnd);
|
|
From: <kr_...@us...> - 2003-09-01 20:27:55
|
Update of /cvsroot/htoolkit/gio/src/Graphics/UI/GIO
In directory sc8-pr-cvs1:/tmp/cvs-serv26139/gio/src/Graphics/UI/GIO
Modified Files:
Controls.hs
Log Message:
Added GroupBox control. /* Still only for Windows */
Index: Controls.hs
===================================================================
RCS file: /cvsroot/htoolkit/gio/src/Graphics/UI/GIO/Controls.hs,v
retrieving revision 1.31
retrieving revision 1.32
diff -C2 -d -r1.31 -r1.32
*** Controls.hs 31 Aug 2003 13:22:32 -0000 1.31
--- Controls.hs 1 Sep 2003 20:27:50 -0000 1.32
***************
*** 83,86 ****
--- 83,93 ----
, RadioBox, radioBox, setRadioBoxGroup
+ -- ** GroupBox
+ -- | A group box is a rectangle that surrounds a set of controls, such as
+ -- check boxes or radio buttons, with application-defined label in its upper
+ -- left corner. The sole purpose of a group box is to organize controls related
+ -- by a common purpose (usually indicated by the label).
+ , GroupBox, groupBox
+
-- ** CompoundControl
, CompoundControl, compoundControl
***************
*** 592,596 ****
}
! -- | Create a window
compoundControl :: Container w => [Prop CompoundControl] -> w -> IO CompoundControl
compoundControl props w
--- 599,603 ----
}
! -- | Create a compound control
compoundControl :: Container w => [Prop CompoundControl] -> w -> IO CompoundControl
compoundControl props w
***************
*** 688,691 ****
--- 695,746 ----
instance Control CompoundControl where
pack w = stdPack (ccparent w) (Port.getCompoundControlRequestSize (cchandle w)) (Port.moveResizeControl (cchandle w))
+
+
+ --------------------------------------------------------------------
+ -- GroupBox
+ --------------------------------------------------------------------
+ -- | A group box.
+ data GroupBox = GroupBox
+ { gbhandle :: !WindowHandle
+ , gbparent :: !WindowHandle
+ , gblayout :: Var Layout
+ }
+
+ -- | Create a group box
+ groupBox :: Container w => [Prop GroupBox] -> w -> IO GroupBox
+ groupBox props w
+ = do c <- do gbhandle <- Port.createGroupBox (hwindow w)
+ gblayout <- newVar empty
+ return (GroupBox gbhandle (hwindow w) gblayout)
+ set c [on relayout =:: relayoutGroupBox]
+ set c props
+ return c
+
+ relayoutGroupBox :: GroupBox -> IO ()
+ relayoutGroupBox c
+ = do (Rect fl ft fr fb) <- Port.getControlFrame (gbhandle c)
+ lay <- getVar (gblayout c)
+ (l,t,r,b) <- Port.getGroupBoxBordersSize (gbhandle c)
+ layoutInRect (Rect l t (fr-r) (fb-b)) lay
+ return ()
+
+ instance Container GroupBox where
+ layout = writeAttr "layout" (\w c -> setVar (gblayout w) (pack c))
+ autosize = readAttr "autosize" (\c -> return True)
+ layoutSize = readAttr "layoutSize" (\c -> getVar (gblayout c) >>= getLayoutSize)
+ relayout = newStdEvent gbhandle Port.getContainerReLayoutHandler Port.setContainerReLayoutHandler Port.setContainerReLayoutDefHandler
+ hwindow c = gbhandle c
+
+ instance Titled GroupBox where
+ title = newStdAttr gbhandle Port.getGroupBoxText Port.setGroupBoxText
+
+ instance Control GroupBox where
+ pack c = stdPack (gbparent c) getGroupBoxRequestSize (Port.moveResizeControl (gbhandle c))
+ where
+ getGroupBoxRequestSize = do
+ (l,t,r,b) <- Port.getGroupBoxBordersSize (gbhandle c)
+ Size w h <- getVar (gblayout c) >>= getLayoutSize
+ return (Size (l+w+r) (t+h+b))
+
|
|
From: <kr_...@us...> - 2003-09-01 20:27:55
|
Update of /cvsroot/htoolkit/port/src/Port
In directory sc8-pr-cvs1:/tmp/cvs-serv26139/port/src/Port
Modified Files:
Controls.hs
Log Message:
Added GroupBox control. /* Still only for Windows */
Index: Controls.hs
===================================================================
RCS file: /cvsroot/htoolkit/port/src/Port/Controls.hs,v
retrieving revision 1.21
retrieving revision 1.22
diff -C2 -d -r1.21 -r1.22
*** Controls.hs 31 Aug 2003 12:56:25 -0000 1.21
--- Controls.hs 1 Sep 2003 20:27:49 -0000 1.22
***************
*** 1,3 ****
! {-# OPTIONS -fglasgow-exts -#include Button.h -#include CheckBox.h -#include EditBox.h -#include Label.h -#include ListBox.h -#include PopUp.h -#include RadioBox.h -#include Window.h -#include ProgressBar.h -#include Slider.h -#include Notebook.h #-}
-----------------------------------------------------------------------------------------
{-| Module : Controls
--- 1,3 ----
! {-# OPTIONS -fglasgow-exts -#include Button.h -#include CheckBox.h -#include EditBox.h -#include Label.h -#include ListBox.h -#include PopUp.h -#include RadioBox.h -#include Window.h -#include ProgressBar.h -#include Slider.h -#include Notebook.h -#include GroupBox.h #-}
-----------------------------------------------------------------------------------------
{-| Module : Controls
***************
*** 31,34 ****
--- 31,36 ----
* CompoundControl
+ * GroupBox
+
* Notebook
***************
*** 89,92 ****
--- 91,97 ----
-- * CompoundControl
, createCompoundControl, getCompoundControlRequestSize
+ -- * GroupBox
+ , createGroupBox, getGroupBoxBordersSize
+ , getGroupBoxText, setGroupBoxText
-- * Notebook
, createNotebook, getNotebookRequestSize
***************
*** 452,455 ****
--- 457,482 ----
getCompoundControlRequestSize hwnd = withCSizeResult (osGetCompoundControlReqSize hwnd)
foreign import ccall osGetCompoundControlReqSize :: WindowHandle -> Ptr CInt -> IO ()
+
+ -----------------------------------------------------------------------------------------
+ -- GroupBox
+ -----------------------------------------------------------------------------------------
+
+ -- | Create a new group box
+ foreign import ccall "osCreateGroupBox" createGroupBox :: WindowHandle -> IO WindowHandle
+
+ getGroupBoxBordersSize :: WindowHandle -> IO (Int,Int,Int,Int)
+ getGroupBoxBordersSize hwnd = allocaArray 4 $ \cborders -> do
+ osGetGroupBoxBordersSize hwnd cborders
+ [l,t,r,b] <- peekArray 4 cborders
+ return (fromCInt l,fromCInt t,fromCInt r,fromCInt b)
+ foreign import ccall osGetGroupBoxBordersSize :: WindowHandle -> Ptr CInt -> IO ()
+
+ getGroupBoxText :: WindowHandle -> IO String
+ getGroupBoxText hwnd = resultCString (osGetGroupBoxText hwnd)
+ foreign import ccall osGetGroupBoxText :: WindowHandle -> IO CString
+
+ setGroupBoxText :: WindowHandle -> String -> IO ()
+ setGroupBoxText hwnd txt = withCString txt (osSetGroupBoxText hwnd)
+ foreign import ccall osSetGroupBoxText :: WindowHandle -> CString -> IO ()
-----------------------------------------------------------------------------------------
|
|
From: <kr_...@us...> - 2003-09-01 19:55:06
|
Update of /cvsroot/htoolkit/port/src/include In directory sc8-pr-cvs1:/tmp/cvs-serv19575/src/include Modified Files: Window.h Log Message: fix variable name Index: Window.h =================================================================== RCS file: /cvsroot/htoolkit/port/src/include/Window.h,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** Window.h 20 Aug 2003 21:37:27 -0000 1.9 --- Window.h 1 Sep 2003 19:55:01 -0000 1.10 *************** *** 67,71 **** WindowHandle osCreateDialog(WindowHandle parent); WindowHandle osCreateCompoundControl(WindowHandle form); ! void osGetCompoundControlReqSize(WindowHandle listbox, int *res); void osSetWindowColor(WindowHandle window, int foreColor, int backColor, int hatchStyle, BitmapHandle patBmp); char *osGetWindowTitle(WindowHandle window); --- 67,71 ---- WindowHandle osCreateDialog(WindowHandle parent); WindowHandle osCreateCompoundControl(WindowHandle form); ! void osGetCompoundControlReqSize(WindowHandle compound, int *res); void osSetWindowColor(WindowHandle window, int foreColor, int backColor, int hatchStyle, BitmapHandle patBmp); char *osGetWindowTitle(WindowHandle window); |
|
From: <kr_...@us...> - 2003-08-31 13:46:23
|
Update of /cvsroot/htoolkit/port/src/GST
In directory sc8-pr-cvs1:/tmp/cvs-serv9911
Added Files:
Handlers_stub.c
Log Message:
Add stub file for GNU SmallTalk
--- NEW FILE: Handlers_stub.c ---
#include "Types.h"
void handleToolDestroy(ToolHandle tool)
{
}
void handleToolCommand(ToolHandle tool)
{
}
void handleProcessDestroy()
{
}
void handleProcessDismiss()
{
}
void handleTimerDestroy(TimerHandle timer)
{
}
void handleTimer(TimerHandle timer)
{
}
void handleMenuDestroy(MenuHandle item)
{
}
void handleMenuUpdate(MenuHandle item)
{
}
void handleMenuCommand(MenuHandle item)
{
}
void handleControlCommand(WindowHandle window)
{
}
void handleWindowContextMenu(WindowHandle window, int a2, int a3, unsigned int a4)
{
}
void handleContainerReLayout(WindowHandle window)
{
}
void handleWindowActivate(WindowHandle window)
{
}
void handleWindowDeactivate(WindowHandle window)
{
}
void handleWindowKeyboard(WindowHandle window, int a2, int a3, unsigned int a4)
{
}
void handleWindowMouse(WindowHandle window, int a2, int a3, int a4, unsigned int a5)
{
}
void handleWindowScroll(WindowHandle window, int a2, int a3)
{
}
void handleWindowResize(WindowHandle window, int a2, int a3)
{
}
void handleWindowPaint(WindowHandle window, CanvasHandle canvas, int a3, int a4, int a5, int a6)
{
}
void handleWindowDestroy(WindowHandle window)
{
}
void handleWindowDismiss(WindowHandle window)
{
}
void getProgArgv(int *margc, char ***margv)
{
static char *args[] = {"GST"};
*margc = 1;
*margv = &args;
}
|
|
From: <kr_...@us...> - 2003-08-31 13:45:11
|
Update of /cvsroot/htoolkit/port/src/GST In directory sc8-pr-cvs1:/tmp/cvs-serv9763/GST Log Message: Directory /cvsroot/htoolkit/port/src/GST added to the repository |
|
From: <kr_...@us...> - 2003-08-31 13:24:01
|
Update of /cvsroot/htoolkit/port/src/cbits/Win32
In directory sc8-pr-cvs1:/tmp/cvs-serv6817/port/src/cbits/Win32
Modified Files:
Notebook.c
Log Message:
Remove trace messages
Index: Notebook.c
===================================================================
RCS file: /cvsroot/htoolkit/port/src/cbits/Win32/Notebook.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** Notebook.c 31 Aug 2003 13:22:32 -0000 1.5
--- Notebook.c 31 Aug 2003 13:23:58 -0000 1.6
***************
*** 322,335 ****
{
HIMAGELIST hImageList = (HIMAGELIST) SendMessage(hNotebook, TCM_GETIMAGELIST, 0, 0);
- printf("1 %p\n", hImageList);
item.iImage = ImageList_Add(hImageList, bitmap->hBitmap, bitmap->hBitmap);
}
else
{
- printf("2\n");
item.iImage = -1;
}
- printf("iImage=%d %d\n", item.iImage, GetLastError());
SendMessage(hNotebook, TCM_SETITEM, nPos, (LPARAM) &item);
}
--- 322,332 ----
|
|
From: <kr_...@us...> - 2003-08-31 13:22:36
|
Update of /cvsroot/htoolkit/port/src/cbits/Win32 In directory sc8-pr-cvs1:/tmp/cvs-serv6633/port/src/cbits/Win32 Modified Files: Notebook.c Log Message: Make NotebookPage a member of Activity class Index: Notebook.c =================================================================== RCS file: /cvsroot/htoolkit/port/src/cbits/Win32/Notebook.c,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Notebook.c 31 Aug 2003 12:56:26 -0000 1.4 --- Notebook.c 31 Aug 2003 13:22:32 -0000 1.5 *************** *** 55,61 **** --- 55,63 ---- case TCN_SELCHANGE: ShowWindow(hNotebookPage, SW_SHOW); + handleWindowActivate(hNotebookPage); break; case TCN_SELCHANGING: ShowWindow(hNotebookPage, SW_HIDE); + handleWindowDeactivate(hNotebookPage); break; } |
|
From: <kr_...@us...> - 2003-08-31 13:22:36
|
Update of /cvsroot/htoolkit/gio/src/Graphics/UI/GIO
In directory sc8-pr-cvs1:/tmp/cvs-serv6633/gio/src/Graphics/UI/GIO
Modified Files:
Controls.hs
Log Message:
Make NotebookPage a member of Activity class
Index: Controls.hs
===================================================================
RCS file: /cvsroot/htoolkit/gio/src/Graphics/UI/GIO/Controls.hs,v
retrieving revision 1.30
retrieving revision 1.31
diff -C2 -d -r1.30 -r1.31
*** Controls.hs 31 Aug 2003 12:56:25 -0000 1.30
--- Controls.hs 31 Aug 2003 13:22:32 -0000 1.31
***************
*** 783,795 ****
pos = readAttr "pos" (Port.getNotebookPagePos . pghandle)
! instance Checked NotebookPage where
! checked = newAttr getChecked setChecked
where
! getChecked p = do
index <- Port.getNotebookPagePos (pghandle p)
sel <- Port.getNotebookSelection (pgparent p)
return (index == sel)
! setChecked p _ = do
index <- Port.getNotebookPagePos (pghandle p)
Port.setNotebookSelection (pgparent p)index
--- 783,797 ----
pos = readAttr "pos" (Port.getNotebookPagePos . pghandle)
! instance Activity NotebookPage where
! activate = newStdEvent pghandle Port.getWindowActivateHandler Port.setWindowActivateHandler Port.setWindowActivateDefHandler
! deactivate= newStdEvent pghandle Port.getWindowDeactivateHandler Port.setWindowDeactivateHandler Port.setWindowDeactivateDefHandler
! isactive = newAttr getIsActive setIsActive
where
! getIsActive p = do
index <- Port.getNotebookPagePos (pghandle p)
sel <- Port.getNotebookSelection (pgparent p)
return (index == sel)
! setIsActive p _ = do
index <- Port.getNotebookPagePos (pghandle p)
Port.setNotebookSelection (pgparent p)index
|
|
From: <kr_...@us...> - 2003-08-31 13:22:36
|
Update of /cvsroot/htoolkit/port/src/cbits/GTK
In directory sc8-pr-cvs1:/tmp/cvs-serv6633/port/src/cbits/GTK
Modified Files:
Notebook.c
Log Message:
Make NotebookPage a member of Activity class
Index: Notebook.c
===================================================================
RCS file: /cvsroot/htoolkit/port/src/cbits/GTK/Notebook.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** Notebook.c 31 Aug 2003 12:56:26 -0000 1.3
--- Notebook.c 31 Aug 2003 13:22:32 -0000 1.4
***************
*** 3,6 ****
--- 3,16 ----
#include "Handlers_stub.h"
+ static void notebook_switch_page_handler(GtkNotebook *notebook,GtkNotebookPage *page,gint page_num,gpointer user_data)
+ {
+ // send deactivate message for old
+ gint old_page_num = g_list_index(notebook->children, notebook->cur_page);
+ handleWindowDeactivate(gtk_notebook_get_nth_page(notebook, old_page_num));
+
+ // send activate message for new
+ handleWindowActivate(gtk_notebook_get_nth_page(notebook, page_num));
+ }
+
WindowHandle osCreateNotebook(WindowHandle window)
{
***************
*** 8,11 ****
--- 18,24 ----
notebook = gtk_notebook_new();
+ gtk_signal_connect (GTK_OBJECT(window), "switch-page",
+ GTK_SIGNAL_FUNC(notebook_switch_page_handler),
+ NULL);
gtk_notebook_set_scrollable(GTK_NOTEBOOK(notebook), gtk_true());
gtk_notebook_popup_enable(GTK_NOTEBOOK(notebook));
|
|
From: <kr_...@us...> - 2003-08-31 12:56:30
|
Update of /cvsroot/htoolkit/port/src/cbits/Win32
In directory sc8-pr-cvs1:/tmp/cvs-serv3025/port/src/cbits/Win32
Modified Files:
Notebook.c ToolBar.c
Log Message:
Implementation for Countable type class
Index: Notebook.c
===================================================================
RCS file: /cvsroot/htoolkit/port/src/cbits/Win32/Notebook.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** Notebook.c 30 Aug 2003 22:57:46 -0000 1.3
--- Notebook.c 31 Aug 2003 12:56:26 -0000 1.4
***************
*** 332,333 ****
--- 332,338 ----
SendMessage(hNotebook, TCM_SETITEM, nPos, (LPARAM) &item);
}
+
+ int osGetNotebookPageCount(WindowHandle notebook)
+ {
+ return SendMessage(notebook, TCM_GETITEMCOUNT, 0, 0);
+ }
Index: ToolBar.c
===================================================================
RCS file: /cvsroot/htoolkit/port/src/cbits/Win32/ToolBar.c,v
retrieving revision 1.17
retrieving revision 1.18
diff -C2 -d -r1.17 -r1.18
*** ToolBar.c 24 Aug 2003 19:28:57 -0000 1.17
--- ToolBar.c 31 Aug 2003 12:56:26 -0000 1.18
***************
*** 814,817 ****
--- 814,822 ----
}
+ int osGetToolBarButtonCount(WindowHandle toolbar)
+ {
+ return SendMessage(toolbar, TB_BUTTONCOUNT, 0, 0);
+ }
+
ToolHandle osInsertToolButton(WindowHandle toolBar, int pos)
{
|
|
From: <kr_...@us...> - 2003-08-31 12:56:30
|
Update of /cvsroot/htoolkit/port/src/include In directory sc8-pr-cvs1:/tmp/cvs-serv3025/port/src/include Modified Files: Notebook.h ToolBar.h Log Message: Implementation for Countable type class Index: Notebook.h =================================================================== RCS file: /cvsroot/htoolkit/port/src/include/Notebook.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Notebook.h 30 Aug 2003 22:57:47 -0000 1.2 --- Notebook.h 31 Aug 2003 12:56:26 -0000 1.3 *************** *** 10,13 **** --- 10,14 ---- int osGetNotebookSelection(WindowHandle notebook); void osSetNotebookSelection(WindowHandle notebook, int index); + int osGetNotebookPageCount(WindowHandle notebook); WindowHandle osInsertNotebookPage(WindowHandle notebook, int pos); char *osGetNotebookPageTitle(WindowHandle window); Index: ToolBar.h =================================================================== RCS file: /cvsroot/htoolkit/port/src/include/ToolBar.h,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** ToolBar.h 23 Aug 2003 11:05:59 -0000 1.7 --- ToolBar.h 31 Aug 2003 12:56:26 -0000 1.8 *************** *** 6,9 **** --- 6,10 ---- WindowHandle osCreateToolBar(char *name, PositionType place, int band_num, int band_position, int offset); void osDestroyToolBar(WindowHandle toolbar); + int osGetToolBarButtonCount(WindowHandle toolbar); ToolHandle osInsertToolButton(WindowHandle toolbar, int pos); |
|
From: <kr_...@us...> - 2003-08-31 12:56:30
|
Update of /cvsroot/htoolkit/port/src/cbits/GTK
In directory sc8-pr-cvs1:/tmp/cvs-serv3025/port/src/cbits/GTK
Modified Files:
Notebook.c ToolBar.c
Log Message:
Implementation for Countable type class
Index: Notebook.c
===================================================================
RCS file: /cvsroot/htoolkit/port/src/cbits/GTK/Notebook.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** Notebook.c 31 Aug 2003 08:09:00 -0000 1.2
--- Notebook.c 31 Aug 2003 12:56:26 -0000 1.3
***************
*** 183,184 ****
--- 183,189 ----
}
}
+
+ int osGetNotebookPageCount(WindowHandle notebook)
+ {
+ return gtk_notebook_get_n_pages(GTK_NOTEBOOK(notebook));
+ }
Index: ToolBar.c
===================================================================
RCS file: /cvsroot/htoolkit/port/src/cbits/GTK/ToolBar.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** ToolBar.c 26 Aug 2003 20:53:14 -0000 1.9
--- ToolBar.c 31 Aug 2003 12:56:26 -0000 1.10
***************
*** 40,43 ****
--- 40,48 ----
}
+ int osGetToolBarButtonCount(WindowHandle toolbar)
+ {
+ return gtk_toolbar_get_n_items(GTK_TOOLBAR(toolbar));
+ }
+
void tool_button_clicked(GtkWidget *widget, gpointer user_data)
{
|
|
From: <kr_...@us...> - 2003-08-31 12:56:29
|
Update of /cvsroot/htoolkit/port/src/Port
In directory sc8-pr-cvs1:/tmp/cvs-serv3025/port/src/Port
Modified Files:
Controls.hs ToolBar.hs
Log Message:
Implementation for Countable type class
Index: Controls.hs
===================================================================
RCS file: /cvsroot/htoolkit/port/src/Port/Controls.hs,v
retrieving revision 1.20
retrieving revision 1.21
diff -C2 -d -r1.20 -r1.21
*** Controls.hs 30 Aug 2003 22:57:46 -0000 1.20
--- Controls.hs 31 Aug 2003 12:56:25 -0000 1.21
***************
*** 93,96 ****
--- 93,97 ----
, getNotebookLabelsPosition, setNotebookLabelsPosition
, getNotebookSelection, setNotebookSelection
+ , getNotebookPageCount
-- * NotebookPage
, insertNotebookPage
***************
*** 481,484 ****
--- 482,487 ----
= osSetNotebookSelection hwnd (toCInt i)
foreign import ccall osSetNotebookSelection :: WindowHandle -> CInt -> IO ()
+
+ foreign import ccall "osGetNotebookPageCount" getNotebookPageCount :: WindowHandle -> IO Int
insertNotebookPage :: WindowHandle -> Maybe Int -> IO WindowHandle
Index: ToolBar.hs
===================================================================
RCS file: /cvsroot/htoolkit/port/src/Port/ToolBar.hs,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** ToolBar.hs 23 Aug 2003 11:05:58 -0000 1.5
--- ToolBar.hs 31 Aug 2003 12:56:26 -0000 1.6
***************
*** 17,20 ****
--- 17,21 ----
createToolBar
, destroyToolBar
+ , getToolBarButtonCount
, insertToolButton
***************
*** 48,51 ****
--- 49,54 ----
foreign import ccall "osDestroyToolBar" destroyToolBar :: WindowHandle -> IO ()
+
+ foreign import ccall "osGetToolBarButtonCount" getToolBarButtonCount :: WindowHandle -> IO Int
insertToolButton :: WindowHandle -> Maybe Int -> IO ToolHandle
|
|
From: <kr_...@us...> - 2003-08-31 12:56:29
|
Update of /cvsroot/htoolkit/gio/src/Graphics/UI/GIO
In directory sc8-pr-cvs1:/tmp/cvs-serv3025/gio/src/Graphics/UI/GIO
Modified Files:
Attributes.hs Controls.hs Menu.hs ToolBar.hs
Log Message:
Implementation for Countable type class
Index: Attributes.hs
===================================================================
RCS file: /cvsroot/htoolkit/gio/src/Graphics/UI/GIO/Attributes.hs,v
retrieving revision 1.17
retrieving revision 1.18
diff -C2 -d -r1.17 -r1.18
*** Attributes.hs 23 Aug 2003 00:04:47 -0000 1.17
--- Attributes.hs 31 Aug 2003 12:56:25 -0000 1.18
***************
*** 83,86 ****
--- 83,87 ----
-- ** Selection
, Checked, checked
+ , Countable, count
, CommandItems, items, appendItem, insertItem, removeItem, removeAllItems
, SingleSelect, selected
***************
*** 304,309 ****
checked :: Attr w Bool
-- | Widgets that have selectable items, like popup controls.
! class CommandItems w where
items :: Attr w [(String,IO ())]
appendItem :: w -> (String,IO ()) -> IO ()
--- 305,316 ----
checked :: Attr w Bool
+ -- | Countable widgets are these which contains countable finite set
+ -- of child widgets or items.
+ class Countable w where
+ count :: Attr w Int -- ^ The attribute is read-only and returns the
+ -- count of items in the widget.
+
-- | Widgets that have selectable items, like popup controls.
! class Countable w => CommandItems w where
items :: Attr w [(String,IO ())]
appendItem :: w -> (String,IO ()) -> IO ()
***************
*** 311,321 ****
removeItem :: w -> Int -> IO ()
removeAllItems :: w -> IO ()
!
! -- | Widgets that have a single selection (like radio control groups).
! class SingleSelect w where
selected :: Attr w Int
! -- | Widgets with a multiple selection (like check box groups).
! class MultiSelect w where
selection :: Attr w [Int]
--- 318,328 ----
removeItem :: w -> Int -> IO ()
removeAllItems :: w -> IO ()
!
! -- | Widgets that have a single selection (like popup control).
! class Countable w => SingleSelect w where
selected :: Attr w Int
! -- | Widgets with a multiple selection (like multi selection list box).
! class Countable w => MultiSelect w where
selection :: Attr w [Int]
Index: Controls.hs
===================================================================
RCS file: /cvsroot/htoolkit/gio/src/Graphics/UI/GIO/Controls.hs,v
retrieving revision 1.29
retrieving revision 1.30
diff -C2 -d -r1.29 -r1.30
*** Controls.hs 30 Aug 2003 22:57:46 -0000 1.29
--- Controls.hs 31 Aug 2003 12:56:25 -0000 1.30
***************
*** 270,273 ****
--- 270,275 ----
when (i>=0 && i < length xs) (snd (xs!!i)) -- invoke appropiate handler
+ instance Countable Popup where
+ count = readAttr "count" (fmap length . getVar . pitems)
instance CommandItems Popup where
***************
*** 346,349 ****
--- 348,354 ----
when (i>=0 && i < length xs) (snd (xs!!i)) -- invoke appropiate handler
+ instance Countable ListBox where
+ count = readAttr "count" (fmap length . getVar . lbitems)
+
instance CommandItems ListBox where
items
***************
*** 716,719 ****
--- 721,727 ----
labelsPosition :: Attr Notebook PositionType
labelsPosition = newStdAttr nbhandle Port.getNotebookLabelsPosition Port.setNotebookLabelsPosition
+
+ instance Countable Notebook where
+ count = readAttr "count" (Port.getNotebookPageCount . nbhandle)
instance SingleSelect Notebook where
Index: Menu.hs
===================================================================
RCS file: /cvsroot/htoolkit/gio/src/Graphics/UI/GIO/Menu.hs,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -d -r1.14 -r1.15
*** Menu.hs 23 Aug 2003 00:04:47 -0000 1.14
--- Menu.hs 31 Aug 2003 12:56:25 -0000 1.15
***************
*** 17,21 ****
module Graphics.UI.GIO.Menu
( -- * Menus
! Menu, mainMenu, menuAt, menu, itemCount
, popupMenu, trackPopupMenu
-- * Menu items
--- 17,21 ----
module Graphics.UI.GIO.Menu
( -- * Menus
! Menu, mainMenu, menuAt, menu
, popupMenu, trackPopupMenu
-- * Menu items
***************
*** 98,105 ****
title = newStdAttr hmenu Lib.getMenuLabel Lib.setMenuLabel
! -- | The 'itemCount' attribute is readonly and returns the number of items in the
! -- popup or sub menu.
! itemCount :: Attr Menu Int
! itemCount = readAttr "itemsCount" (Lib.getMenuItemCount . hmenu)
instance Positioned Menu where
--- 98,103 ----
title = newStdAttr hmenu Lib.getMenuLabel Lib.setMenuLabel
! instance Countable Menu where
! count = readAttr "count" (Lib.getMenuItemCount . hmenu)
instance Positioned Menu where
Index: ToolBar.hs
===================================================================
RCS file: /cvsroot/htoolkit/gio/src/Graphics/UI/GIO/ToolBar.hs,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** ToolBar.hs 23 Aug 2003 11:43:02 -0000 1.6
--- ToolBar.hs 31 Aug 2003 12:56:25 -0000 1.7
***************
*** 45,48 ****
--- 45,50 ----
destroy = newStdEvent htoolbar Lib.getWindowDestroyHandler Lib.setWindowDestroyHandler Lib.setWindowDestroyDefHandler
+ instance Countable ToolBar where
+ count = readAttr "count" (Lib.getToolBarButtonCount . htoolbar)
--------------------------------------------------------------------
|
|
From: <kr_...@us...> - 2003-08-31 11:48:31
|
Update of /cvsroot/htoolkit/gio/src/Graphics/UI/GIO
In directory sc8-pr-cvs1:/tmp/cvs-serv22424/src/Graphics/UI/GIO
Modified Files:
Events.hs Window.hs
Log Message:
Split TopLevel class to Activity and Resizeable classes
Index: Events.hs
===================================================================
RCS file: /cvsroot/htoolkit/gio/src/Graphics/UI/GIO/Events.hs,v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -d -r1.16 -r1.17
*** Events.hs 23 Aug 2003 00:04:47 -0000 1.16
--- Events.hs 31 Aug 2003 11:48:26 -0000 1.17
***************
*** 73,78 ****
, mouse, keyboard, contextMenu
! -- ** TopLevel
! , TopLevel, activate, deactivate, resize, resizeable
-- ** Scrollable
--- 73,81 ----
, mouse, keyboard, contextMenu
! -- ** Activity
! , Activity, activate, deactivate, isactive
!
! -- ** Resizeable
! , Resizeable, resize, resizeable
-- ** Scrollable
***************
*** 150,157 ****
! -- | A top level widget is a widget which doesn't have parents.
! class TopLevel w where
! activate :: Event w (IO ())
! deactivate :: Event w (IO ())
resize :: Event w (Size -> IO ())
--- 153,158 ----
! -- | All widgets which the user can dynamicaly resize are members of Resizeable class.
! class Resizeable w where
resize :: Event w (Size -> IO ())
***************
*** 160,163 ****
--- 161,169 ----
resizeable :: Attr w Bool
+ -- | All widgets which can be activated\/deactivated are members of Activity class.
+ class Activity w where
+ activate :: Event w (IO ())
+ deactivate :: Event w (IO ())
+ isactive :: Attr w Bool
class Scrollable w where
Index: Window.hs
===================================================================
RCS file: /cvsroot/htoolkit/gio/src/Graphics/UI/GIO/Window.hs,v
retrieving revision 1.26
retrieving revision 1.27
diff -C2 -d -r1.26 -r1.27
*** Window.hs 24 Aug 2003 21:07:48 -0000 1.26
--- Window.hs 31 Aug 2003 11:48:26 -0000 1.27
***************
*** 138,144 ****
contextMenu = newStdEvent hwindow Lib.getWindowContextMenuHandler Lib.setWindowContextMenuHandler Lib.setWindowContextMenuDefHandler
! instance TopLevel Window where
activate = newStdEvent hwindow Lib.getWindowActivateHandler Lib.setWindowActivateHandler Lib.setWindowActivateDefHandler
deactivate= newStdEvent hwindow Lib.getWindowDeactivateHandler Lib.setWindowDeactivateHandler Lib.setWindowDeactivateDefHandler
resize = newStdEvent hwindow Lib.getWindowResizeHandler Lib.setWindowResizeHandler Lib.setWindowResizeDefHandler
resizeable
--- 138,151 ----
contextMenu = newStdEvent hwindow Lib.getWindowContextMenuHandler Lib.setWindowContextMenuHandler Lib.setWindowContextMenuDefHandler
! instance Activity Window where
activate = newStdEvent hwindow Lib.getWindowActivateHandler Lib.setWindowActivateHandler Lib.setWindowActivateDefHandler
deactivate= newStdEvent hwindow Lib.getWindowDeactivateHandler Lib.setWindowDeactivateHandler Lib.setWindowDeactivateDefHandler
+ isactive = readAttr "isactive" (\w -> do
+ handles <- Lib.getAllWindowHandles
+ case handles of
+ [] -> return False
+ (x:xs) -> return (hwindow w == head handles))
+
+ instance Resizeable Window where
resize = newStdEvent hwindow Lib.getWindowResizeHandler Lib.setWindowResizeHandler Lib.setWindowResizeDefHandler
resizeable
|
|
From: <kr_...@us...> - 2003-08-31 11:30:22
|
Update of /cvsroot/htoolkit/port In directory sc8-pr-cvs1:/tmp/cvs-serv18925 Modified Files: makefile Log Message: Prevent building of GSTLIB is the SmallTalk build is disabled Index: makefile =================================================================== RCS file: /cvsroot/htoolkit/port/makefile,v retrieving revision 1.38 retrieving revision 1.39 diff -C2 -d -r1.38 -r1.39 *** makefile 31 Aug 2003 10:29:45 -0000 1.38 --- makefile 31 Aug 2003 11:30:18 -0000 1.39 *************** *** 138,142 **** all: release doc ! release: $(HSLIB) $(GSTLIB) install: $(HSLIB) $(PKG) --- 138,150 ---- all: release doc ! TARGETLIBS= ! ifeq "$(GHCDISABLED)" "NO" ! TARGETLIBS += $(HSLIB) ! endif ! ifeq "$(GSTDISABLED)" "NO" ! TARGETLIBS += $(GSTLIB) ! endif ! ! release: $(TARGETLIBS) install: $(HSLIB) $(PKG) |
|
From: <kr_...@us...> - 2003-08-31 10:29:49
|
Update of /cvsroot/htoolkit/port
In directory sc8-pr-cvs1:/tmp/cvs-serv11313
Modified Files:
config.mk.in configure.ac makefile
Log Message:
Initial support for SmallTalk
Index: config.mk.in
===================================================================
RCS file: /cvsroot/htoolkit/port/config.mk.in,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** config.mk.in 30 Aug 2003 22:59:42 -0000 1.1
--- config.mk.in 31 Aug 2003 10:29:45 -0000 1.2
***************
*** 1,25 ****
! CC = @CC@
! CINCFLAGS = @CINCFLAGS@
! CCOPTIONS = @CCOPTIONS@
! HC = @HC@
! HCPKG = @HCPKG@
! HDOC = @HDOC@
! HDOCHTML = @HDOCHTML@
! HDOCLIBS = @HDOCLIBS@
! HDOCBASE = @HDOCLIBS@/base/base.haddock
! AR = @AR@
! LIBDIR = @LIBDIR@
! GUILIB = @TARGET@
! CLIBS = @CLIBOPTS@
! TOPDIR = @CURDIR@
! CP=cp
! MV=mv
! CD=cd
! RM=rm -f
! MKDIR=mkdir -p
! RMDIR=rmdir
! EXE = @EXE@
! DLL = @DLL@
! USERNAME=@SSHUSER@
!
! DEBUG = @DEBUG@
--- 1,29 ----
! CC = @CC@
! CINCFLAGS = @CINCFLAGS@
! CCOPTIONS = @CCOPTIONS@
! HC = @HC@
! GST = @GST@
! HCPKG = @HCPKG@
! HDOC = @HDOC@
! HDOCHTML = @HDOCHTML@
! HDOCLIBS = @HDOCLIBS@
! HDOCBASE = @HDOCLIBS@/base/base.haddock
! AR = @AR@
! LD = @LD@
! LIBDIR = @LIBDIR@
! GUILIB = @TARGET@
! CLIBS = @CLIBOPTS@
! TOPDIR = @CURDIR@
! CP=cp
! MV=mv
! CD=cd
! RM=rm -f
! MKDIR=mkdir -p
! RMDIR=rmdir
! EXE = @EXE@
! DLL = @DLL@
! USERNAME=@SSHUSER@
!
! DEBUG = @DEBUG@
! GSTDISABLED = @GSTDISABLED@
! GHCDISABLED = @GHCDISABLED@
Index: configure.ac
===================================================================
RCS file: /cvsroot/htoolkit/port/configure.ac,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** configure.ac 30 Aug 2003 23:58:01 -0000 1.1
--- configure.ac 31 Aug 2003 10:29:45 -0000 1.2
***************
*** 7,10 ****
--- 7,56 ----
dnl ***********************************************
+ dnl Enable/Disable SmallTalk
+ dnl ***********************************************
+ AC_ARG_ENABLE(gst,
+ [ --disable-gst
+ Disable building of Port library for GNU SmallTalk.
+ ],
+ [GSTDISABLED=YES],
+ [GSTDISABLED=NO]
+ )
+ AC_SUBST(GSTDISABLED)
+
+ dnl ***********************************************
+ dnl Enable/Disable Haskell
+ dnl ***********************************************
+ AC_ARG_ENABLE(ghc,
+ [ --disable-ghc
+ Disable building of Port library for Glasgow Haskell.
+ ],
+ [GHCDISABLED=YES],
+ [GHCDISABLED=NO]
+ )
+ AC_SUBST(GHCDISABLED)
+
+ dnl ***********************************************
+ dnl GST
+ dnl ***********************************************
+
+ AC_PATH_PROG(GST,gst)
+ if test "$GST" = ""; then
+ GSTDISABLED=YES
+ fi;
+
+ AC_SUBST(GST)
+
+ dnl ***********************************************
+ dnl LIBTOOL
+ dnl ***********************************************
+
+ AC_PATH_PROG(LIBTOOL,libtool)
+ if test "$LIBTOOL" = "" && test "$GSTDISABLED" = "NO"; then
+ AC_MSG_ERROR([libtool is required to build Port for GNU SmallTalk.])
+ fi;
+
+ AC_SUBST(LIBTOOL)
+
+ dnl ***********************************************
dnl GCC
dnl ***********************************************
***************
*** 23,29 ****
--- 69,100 ----
fi;
+ if test "$GSTDISABLED" = "NO"; then
+ CC="$LIBTOOL --mode=compile $CC"
+ fi
+
AC_SUBST(CC)
dnl ***********************************************
+ dnl LD
+ dnl ***********************************************
+
+ AC_ARG_WITH(ld,
+ [ --with-ld=<ld command>
+ Use a different command instead of 'ld' for linker.
+ ],
+ [LD="$withval"],
+ [AC_PATH_PROG(LD,ld)]
+ )
+
+ if test "$GSTDISABLED" = "NO"; then
+ if test "$LD" = ""; then
+ AC_MSG_ERROR([LD is required to build Port for GNU SmallTalk.])
+ fi;
+ LD="$LIBTOOL --mode=link $LD"
+ fi
+
+ AC_SUBST(LD)
+
+ dnl ***********************************************
dnl GHC
dnl ***********************************************
***************
*** 36,55 ****
)
- dnl ** Must have GHC to build Port
if test "$HC" = ""; then
! AC_MSG_ERROR([GHC is required to build Port.])
fi;
! # check ghc version
! version="`$HC --numeric-version`"
! case $version in
! 6.*) ;;
! *) echo "warning:"
echo " unable to recognise the ghc version ($version ?)"
exit 2;;
! esac
! LIBDIR="`$HC --print-libdir`"
! AC_MSG_RESULT([ghc library directory... $LIBDIR])
AC_SUBST(HC)
--- 107,127 ----
)
if test "$HC" = ""; then
! GHCDISABLED=YES
fi;
! if test "$GHCDISABLED" = "NO"; then
! # check ghc version
! version="`$HC --numeric-version`"
! case $version in
! 6.*) ;;
! *) echo "warning:"
echo " unable to recognise the ghc version ($version ?)"
exit 2;;
! esac
! LIBDIR="`$HC --print-libdir`"
! AC_MSG_RESULT([ghc library directory... $LIBDIR])
! fi;
AC_SUBST(HC)
***************
*** 67,81 ****
)
! dnl ** Must have ghc-pkg to install Port
! if test "$HCPKG" = ""; then
! AC_MSG_ERROR([ghc-pkg tool is required to install Port.])
! fi;
! hcpkglocal=""
! if test -z "$hcpkglocal"; then
! HCPKG=$HCPKG
! else
! HCPKG=$HCPKG -f $hcpkglocal
! fi
AC_SUBST(HCPKG)
--- 139,155 ----
)
! if test "$GHCDISABLED" = "NO"; then
! dnl ** Must have ghc-pkg to install Port
! if test "$HCPKG" = ""; then
! AC_MSG_ERROR([ghc-pkg tool is required to install Port.])
! fi;
! hcpkglocal=""
! if test -z "$hcpkglocal"; then
! HCPKG=$HCPKG
! else
! HCPKG=$HCPKG -f $hcpkglocal
! fi
! fi;
AC_SUBST(HCPKG)
***************
*** 92,125 ****
)
! if test "$HDOC" = ""; then
! AC_MSG_RESULT([Warning: You will not be able to build the documentation.])
! hdocfound="no"
! HDOC=echo
! else
! hdocfound="yes"
! fi;
! HDOCLIBS=""
! HDOCHTML=""
! # find haddock/html library and base.haddock
! if test $hdocfound = yes; then
! hdocdir="`echo $HDOC | sed -e 's|/bin/haddock||' -e 's|.exe||'`"
! hdocdir="`echo $hdocdir | sed -e 's%^/cygdrive/\(.\)/%\1:/%'`"
! HDOCHTML="$hdocdir"
! HDOCLIBS="$hdocdir/doc/html"
! if test -d "$HDOCLIBS"; then
! AC_MSG_RESULT([ghc documentation directory... $HDOCLIBS])
! else
! AC_MSG_RESULT([Warning: could not find ghc documentation directory at $HDOCLIBS])
! HDOCLIBS=""
! fi
! if test -f "$HDOCLIBS/base/base.haddock"; then
! AC_MSG_RESULT([base.haddock found])
! else
! AC_MSG_RESULT([Warning: could not find base.haddock, in $HDOCLIBS/base/base.haddock])
! HDOCLIBS=""
fi
fi
--- 166,201 ----
)
! if test "$GHCDISABLED" = "NO"; then
! if test "$HDOC" = ""; then
! AC_MSG_RESULT([Warning: You will not be able to build the documentation.])
! hdocfound="no"
! HDOC=echo
! else
! hdocfound="yes"
! fi;
! HDOCLIBS=""
! HDOCHTML=""
! # find haddock/html library and base.haddock
! if test $hdocfound = yes; then
! hdocdir="`echo $HDOC | sed -e 's|/bin/haddock||' -e 's|.exe||'`"
! hdocdir="`echo $hdocdir | sed -e 's%^/cygdrive/\(.\)/%\1:/%'`"
! HDOCHTML="$hdocdir"
! HDOCLIBS="$hdocdir/doc/html"
! if test -d "$HDOCLIBS"; then
! AC_MSG_RESULT([ghc documentation directory... $HDOCLIBS])
! else
! AC_MSG_RESULT([Warning: could not find ghc documentation directory at $HDOCLIBS])
! HDOCLIBS=""
! fi
! if test -f "$HDOCLIBS/base/base.haddock"; then
! AC_MSG_RESULT([base.haddock found])
! else
! AC_MSG_RESULT([Warning: could not find base.haddock, in $HDOCLIBS/base/base.haddock])
! HDOCLIBS=""
! fi
fi
fi
***************
*** 287,291 ****
mkdir -p build/cbits build/cbits/$TARGET
echo " - build/Graphics/UI/Port"
! mkdir -p build build/Graphics build/Graphics/UI build/Graphics/UI/Port
dnl ***********************************************
--- 363,367 ----
mkdir -p build/cbits build/cbits/$TARGET
echo " - build/Graphics/UI/Port"
! mkdir -p build build/Graphics build/Graphics/UI build/Graphics/UI/Port
dnl ***********************************************
Index: makefile
===================================================================
RCS file: /cvsroot/htoolkit/port/makefile,v
retrieving revision 1.37
retrieving revision 1.38
diff -C2 -d -r1.37 -r1.38
*** makefile 30 Aug 2003 22:59:42 -0000 1.37
--- makefile 31 Aug 2003 10:29:45 -0000 1.38
***************
*** 44,47 ****
--- 44,48 ----
STUBS = Port/Handlers.hs
+ GSTSTUBS = GST/Handlers.c
CSRCS = Window.c Util.c Bitmap.c Button.c CheckBox.c EditBox.c \
***************
*** 112,128 ****
# main, object files, dependencies and hi files
! MAINLIB = $(BUILDDIR)/libHS$(MAIN).a
MAINOBJ = HS$(MAIN).o
HOBJS = $(patsubst %.hs,$(HOUTDIR)/%.o, $(HSRCS))
! HDEPS = $(patsubst %.hs,$(HOUTDIR)/%.d, $(HSRCS))
! COBJS = $(patsubst %.c,$(COUTDIR)/%.c.o, $(CSRCS))
! CDEPS = $(patsubst %.c,$(COUTDIR)/%.c.d, $(CSRCS))
STUBOBJS = $(patsubst %.hs,$(HOUTDIR)/%.o, $(STUBS))
STUBINCS = $(patsubst %.hs,$(HOUTDIR)/%_stub.h, $(STUBS))
STUBSTUBOBJS= $(patsubst %.hs,$(HOUTDIR)/%_stub.o, $(STUBS))
!
#--------------------------------------------------------------------------
--- 113,131 ----
# main, object files, dependencies and hi files
! HSLIB = $(BUILDDIR)/libHS$(MAIN).a
! GSTLIB = $(BUILDDIR)/libGST$(MAIN).so
MAINOBJ = HS$(MAIN).o
HOBJS = $(patsubst %.hs,$(HOUTDIR)/%.o, $(HSRCS))
! HDEPS = $(patsubst %.hs,$(HOUTDIR)/%.d, $(HSRCS))
! COBJS = $(patsubst %.c,$(COUTDIR)/%.c.o, $(CSRCS))
! CLOBJS = $(patsubst %.c,$(COUTDIR)/%.c.lo, $(CSRCS))
! CDEPS = $(patsubst %.c,$(COUTDIR)/%.c.d, $(CSRCS))
STUBOBJS = $(patsubst %.hs,$(HOUTDIR)/%.o, $(STUBS))
STUBINCS = $(patsubst %.hs,$(HOUTDIR)/%_stub.h, $(STUBS))
STUBSTUBOBJS= $(patsubst %.hs,$(HOUTDIR)/%_stub.o, $(STUBS))
! GSTSTUBOBJS = $(patsubst %.c,$(COUTDIR)/%_stub.o, $(GSTSTUBS))
#--------------------------------------------------------------------------
***************
*** 131,141 ****
# The main targets
! .PHONY: all release
all: release doc
! release: $(MAINLIB)
! install: $(MAINLIB) $(PKG)
install -d $(LIBDIR)/imports/Graphics/UI/Port
install -d $(LIBDIR)/include/port
--- 134,144 ----
# The main targets
! .PHONY: all release
all: release doc
! release: $(HSLIB) $(GSTLIB)
! install: $(HSLIB) $(PKG)
install -d $(LIBDIR)/imports/Graphics/UI/Port
install -d $(LIBDIR)/include/port
***************
*** 144,148 ****
install -m 644 $(HOUTDIR)/*.hi $(LIBDIR)/imports/Graphics/UI
install -m 644 $(HOUTDIR)/Port/*.hi $(LIBDIR)/imports/Graphics/UI/Port
! install -m 644 $(MAINLIB) $(LIBDIR)
install -m 644 src/include/HsPort.h $(LIBDIR)/include
install -m 644 src/include/*.h $(LIBDIR)/include/port
--- 147,151 ----
install -m 644 $(HOUTDIR)/*.hi $(LIBDIR)/imports/Graphics/UI
install -m 644 $(HOUTDIR)/Port/*.hi $(LIBDIR)/imports/Graphics/UI/Port
! install -m 644 $(HSLIB) $(LIBDIR)
install -m 644 src/include/HsPort.h $(LIBDIR)/include
install -m 644 src/include/*.h $(LIBDIR)/include/port
***************
*** 152,159 ****
install -m 644 doc/*.html doc/*.css doc/*.gif doc/*.haddock $(LIBDIR)/doc/html/port
! $(MAINLIB): $(HOBJS) $(COBJS) $(STUBSTUBOBJS)
! $(RM) $(MAINLIB)
! $(AR) -r $@ $^
# create an object file from source files. Note that we also generate
--- 155,164 ----
install -m 644 doc/*.html doc/*.css doc/*.gif doc/*.haddock $(LIBDIR)/doc/html/port
! $(HSLIB): $(HOBJS) $(COBJS) $(STUBSTUBOBJS)
! $(RM) $(HSLIB)
! $(AR) -r $@ $^
+ $(GSTLIB) : $(CLOBJS) $(GSTSTUBOBJS)
+ $(LD) $^ -o $@ $(CLIBS)
# create an object file from source files. Note that we also generate
***************
*** 161,165 ****
# by sed to prepend the proper directory to the target and to move it
# into the proper directory (debug or release). The way dependency files
! # are handled was 'discovered' by Tom Tromey, and described by Paul Smith,
# see: "http://www.paulandlesley.org/gmake/autodep.html"
.SUFFIXES: .hs .hi .o .c
--- 166,170 ----
# by sed to prepend the proper directory to the target and to move it
# into the proper directory (debug or release). The way dependency files
! # are handled was 'discovered' by Tom Tromey, and described by Paul Smith,
# see: "http://www.paulandlesley.org/gmake/autodep.html"
.SUFFIXES: .hs .hi .o .c
***************
*** 168,174 ****
$(HC) -o $@ -package-name port -ohi $(BUILDDIR)/Graphics/UI/$(*D)/$(*F).hi -odir $(HOUTDIR)/$(*D) -c $< $(HC-OPTIONS) $($(*F)_OPTIONS) -i$(BUILDDIR) $(INCDIRS)
@# move stub files
! @-if test -f $(<D)/$(*F)_stub.h; then $(MV) $(<D)/$(*F)_stub.[ch] $(HOUTDIR)/$(*D); fi
@# create dependency file
! @$(HC) $< $(HC-OPTIONS) -M -optdep-f -optdep$(*F).d -i$(BUILDDIR)
@sed -e 's|$(subst .hs,,$<)\.o|$(HOUTDIR)/$*\.o|' $(*F).d > $(HOUTDIR)/$*.d
@rm $(*F).d
--- 173,179 ----
$(HC) -o $@ -package-name port -ohi $(BUILDDIR)/Graphics/UI/$(*D)/$(*F).hi -odir $(HOUTDIR)/$(*D) -c $< $(HC-OPTIONS) $($(*F)_OPTIONS) -i$(BUILDDIR) $(INCDIRS)
@# move stub files
! @-if test -f $(<D)/$(*F)_stub.h; then $(MV) $(<D)/$(*F)_stub.[ch] $(HOUTDIR)/$(*D); fi
@# create dependency file
! @$(HC) $< $(HC-OPTIONS) -M -optdep-f -optdep$(*F).d -i$(BUILDDIR)
@sed -e 's|$(subst .hs,,$<)\.o|$(HOUTDIR)/$*\.o|' $(*F).d > $(HOUTDIR)/$*.d
@rm $(*F).d
***************
*** 182,185 ****
--- 187,193 ----
@#@mv $(*F).d $(COUTDIR)/$(*F).c.d
+ $(GSTSTUBOBJS) : $(COUTDIR)/%.o: %.c
+ $(CC) -o $@ -c $< $(CC-OPTIONS) -MD $(INCDIRS)
+
#--------------------------------------------------------------------------
# Options specific to particular modules
***************
*** 220,224 ****
# extra commands: clean up all directories and show linecounts.
clean:
! $(RM) $(MAINLIB)
$(RM) $(DOCDIR)/*.html $(DOCDIR)/*.gif $(DOCDIR)/*.css $(DOCDIR)/*.haddock
$(RM) $(HOUTDIR)/*.*
--- 228,232 ----
# extra commands: clean up all directories and show linecounts.
clean:
! $(RM) $(HSLIB)
$(RM) $(DOCDIR)/*.html $(DOCDIR)/*.gif $(DOCDIR)/*.css $(DOCDIR)/*.haddock
$(RM) $(HOUTDIR)/*.*
|