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-05-01 20:35:35
|
Update of /cvsroot/htoolkit/port/src/cbits/Win32 In directory sc8-pr-cvs1:/tmp/cvs-serv6482/src/cbits/Win32 Modified Files: Window.c Log Message: bugfix Index: Window.c =================================================================== RCS file: /cvsroot/htoolkit/port/src/cbits/Win32/Window.c,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** Window.c 28 Apr 2003 08:41:23 -0000 1.28 --- Window.c 1 May 2003 20:35:28 -0000 1.29 *************** *** 806,810 **** gInKey = FALSE; gCurChar = 0; ! handleDialoghDeactivate(hWnd); } else --- 806,810 ---- gInKey = FALSE; gCurChar = 0; ! handleDialogDeactivate(hWnd); } else |
|
From: <kr_...@us...> - 2003-05-01 20:27:42
|
Update of /cvsroot/htoolkit/port/src/cbits/Win32 In directory sc8-pr-cvs1:/tmp/cvs-serv3205/src/cbits/Win32 Modified Files: FileDialog.c FontDialog.c ColorDialog.c Log Message: include "CommonDialogs.h" Index: FileDialog.c =================================================================== RCS file: /cvsroot/htoolkit/port/src/cbits/Win32/FileDialog.c,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** FileDialog.c 26 Apr 2003 20:56:34 -0000 1.5 --- FileDialog.c 1 May 2003 20:27:38 -0000 1.6 *************** *** 1,3 **** ! #include "FileDialog.h" #include "Internals.h" --- 1,3 ---- ! #include "CommonDialogs.h" #include "Internals.h" Index: FontDialog.c =================================================================== RCS file: /cvsroot/htoolkit/port/src/cbits/Win32/FontDialog.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** FontDialog.c 26 Apr 2003 20:56:34 -0000 1.3 --- FontDialog.c 1 May 2003 20:27:39 -0000 1.4 *************** *** 1,3 **** ! #include "FontDialog.h" #include "Internals.h" --- 1,3 ---- ! #include "CommonDialogs.h" #include "Internals.h" Index: ColorDialog.c =================================================================== RCS file: /cvsroot/htoolkit/port/src/cbits/Win32/ColorDialog.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** ColorDialog.c 26 Apr 2003 20:56:34 -0000 1.3 --- ColorDialog.c 1 May 2003 20:27:39 -0000 1.4 *************** *** 1,3 **** ! #include "ColorDialog.h" #include "Internals.h" --- 1,3 ---- ! #include "CommonDialogs.h" #include "Internals.h" |
|
From: <kr_...@us...> - 2003-05-01 19:35:41
|
Update of /cvsroot/htoolkit/port/src/cbits/GTK
In directory sc8-pr-cvs1:/tmp/cvs-serv12134/port/src/cbits/GTK
Modified Files:
Frame.c Internals.h Util.c Window.c
Log Message:
Added proper initialization for libgnome. Unfortunately the initialization requires that the application name should be constant during program execution. That means that the modified 'start' function should have two additional arguments: the application name and the application version (the latest is also required from libgnome for proper initialization).
Index: Frame.c
===================================================================
RCS file: /cvsroot/htoolkit/port/src/cbits/GTK/Frame.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** Frame.c 26 Apr 2003 21:39:20 -0000 1.7
--- Frame.c 1 May 2003 19:35:36 -0000 1.8
***************
*** 6,9 ****
--- 6,10 ----
char *gAppName = NULL;
+ char *gAppVersion = NULL;
GtkWidget *gFrameWidget = NULL;
GtkWidget *gClientWidget = NULL;
***************
*** 298,301 ****
--- 299,303 ----
/* Create the window. */
gFrameWidget = gtk_window_new (GTK_WINDOW_TOPLEVEL);
+ gtk_window_set_title(GTK_WINDOW(gFrameWidget), gAppName);
gtk_signal_connect (GTK_OBJECT(gFrameWidget), "delete-event",
GTK_SIGNAL_FUNC(frame_delete_handler),
***************
*** 324,337 ****
gtk_widget_show_all(gFrameWidget);
- }
-
- char *osGetProcessTitle()
- {
- return gAppName;
- }
-
- void osSetProcessTitle(char *szAppName)
- {
- gAppName = strdup(szAppName);
- updateFrameTitle();
}
--- 326,328 ----
Index: Internals.h
===================================================================
RCS file: /cvsroot/htoolkit/port/src/cbits/GTK/Internals.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** Internals.h 23 Apr 2003 21:58:11 -0000 1.1
--- Internals.h 1 May 2003 19:35:36 -0000 1.2
***************
*** 8,12 ****
extern int gDocumentInterface;
! extern char *gAppName, *gWindowName;
extern GtkWidget *gFrameWidget;
extern GtkWidget *gClientWidget;
--- 8,12 ----
extern int gDocumentInterface;
! extern char *gAppName, *gAppVersion, *gWindowName;
extern GtkWidget *gFrameWidget;
extern GtkWidget *gClientWidget;
***************
*** 18,23 ****
void createMDIFrame();
void createSDIFrame();
-
- void updateFrameTitle();
extern void rfree(void *ptr);
--- 18,21 ----
Index: Util.c
===================================================================
RCS file: /cvsroot/htoolkit/port/src/cbits/GTK/Util.c,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -d -r1.15 -r1.16
*** Util.c 9 Apr 2003 17:17:42 -0000 1.15
--- Util.c 1 May 2003 19:35:36 -0000 1.16
***************
*** 26,30 ****
}
! void osInit(int DocumentInterface)
{
if (!bInitialized)
--- 26,30 ----
}
! void osInit(char *appName, char *appVersion, int DocumentInterface)
{
if (!bInitialized)
***************
*** 35,45 ****
gtk_set_locale();
getProgArgv(&margc, &margv);
! gtk_init(&margc,&margv);
! setProgArgv(margc, margv);
bInitialized = TRUE;
gDocumentInterface = DocumentInterface;
-
- gAppName = NULL;
gFrameWidget = NULL;
gClientWidget = NULL;
--- 35,45 ----
gtk_set_locale();
getProgArgv(&margc, &margv);
! gnome_program_init(appName, appVersion, LIBGNOMEUI_MODULE,
! margc, margv, GNOME_PARAM_POPT_TABLE, GNOME_PARAM_NONE);
bInitialized = TRUE;
+ gAppName = strdup(appName);
+ gAppVersion = strdup(appVersion);
gDocumentInterface = DocumentInterface;
gFrameWidget = NULL;
gClientWidget = NULL;
***************
*** 112,159 ****
return s;
};
-
- void updateFrameTitle()
- {
- char *title;
-
- if (gAppName && *gAppName)
- {
- if (gDocumentInterface == 2)
- {
- int index;
- GtkWidget *label;
-
- index = gtk_notebook_get_current_page(GTK_NOTEBOOK(gClientWidget));
-
- if (index > 0)
- {
- label = gtk_notebook_get_tab_label(GTK_NOTEBOOK(gClientWidget),gtk_notebook_get_nth_page(GTK_NOTEBOOK(gClientWidget),index));
- gWindowName = gtk_label_get_text(GTK_LABEL(label));
- }
- else
- {
- gWindowName = NULL;
- }
- }
-
- if (gWindowName && *gWindowName)
- {
- title = rmalloc(strlen(gAppName)+strlen(gWindowName)+6);
-
- if (title)
- {
- strcpy(title, gAppName);
- strcat(title, " - [");
- strcat(title, gWindowName);
- strcat(title, "]");
- gtk_window_set_title(GTK_WINDOW(gFrameWidget), title);
- }
-
- rfree(title);
- }
- else
- gtk_window_set_title(GTK_WINDOW(gFrameWidget), gAppName);
- }
- else
- gtk_window_set_title(GTK_WINDOW(gFrameWidget), gWindowName);
- }
--- 112,113 ----
Index: Window.c
===================================================================
RCS file: /cvsroot/htoolkit/port/src/cbits/GTK/Window.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -d -r1.16 -r1.17
*** Window.c 27 Apr 2003 18:19:14 -0000 1.16
--- Window.c 1 May 2003 19:35:36 -0000 1.17
***************
*** 525,529 ****
{
gWindowName = strdup(title);
! updateFrameTitle();
}
}
--- 525,551 ----
{
gWindowName = strdup(title);
!
! if (gAppName && *gAppName)
! {
! if (gWindowName && *gWindowName)
! {
! title = rmalloc(strlen(gAppName)+strlen(gWindowName)+6);
!
! if (title)
! {
! strcpy(title, gAppName);
! strcat(title, " - [");
! strcat(title, gWindowName);
! strcat(title, "]");
! gtk_window_set_title(GTK_WINDOW(gFrameWidget), title);
! }
!
! rfree(title);
! }
! else
! gtk_window_set_title(GTK_WINDOW(gFrameWidget), gAppName);
! }
! else
! gtk_window_set_title(GTK_WINDOW(gFrameWidget), gWindowName);
}
}
|
|
From: <kr_...@us...> - 2003-05-01 19:35:41
|
Update of /cvsroot/htoolkit/gio/src/Graphics/UI/GIO
In directory sc8-pr-cvs1:/tmp/cvs-serv12134/gio/src/Graphics/UI/GIO
Modified Files:
Process.hs
Log Message:
Added proper initialization for libgnome. Unfortunately the initialization requires that the application name should be constant during program execution. That means that the modified 'start' function should have two additional arguments: the application name and the application version (the latest is also required from libgnome for proper initialization).
Index: Process.hs
===================================================================
RCS file: /cvsroot/htoolkit/gio/src/Graphics/UI/GIO/Process.hs,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** Process.hs 14 Apr 2003 17:57:32 -0000 1.2
--- Process.hs 1 May 2003 19:35:37 -0000 1.3
***************
*** 37,49 ****
destroyWidget p = halt
destroy = newEvent (const Lib.getProcessDestroyHandler) (const Lib.setProcessDestroyHandler) (const Lib.setProcessDestroyDefHandler)
-
- instance Titled Process where
- title = newAttr (const Lib.getProcessTitle) (const Lib.setProcessTitle)
-- | Start the event loop.
! start :: DocumentInterface -> [Prop Process] -> IO a -> IO ()
! start di props io
= do curdir <- getCurrentDirectory
! Lib.start di ((set pc props >> io) `catch` \err -> quit >> ioError err)
setCurrentDirectory curdir
--- 37,51 ----
destroyWidget p = halt
destroy = newEvent (const Lib.getProcessDestroyHandler) (const Lib.setProcessDestroyHandler) (const Lib.setProcessDestroyDefHandler)
-- | Start the event loop.
! start :: String -- ^ Application name
! -> String -- ^ Application version
! -> DocumentInterface -- ^ Document interface type for application
! -> [Prop Process] -- ^ Properties
! -> IO a -- ^ Startup action
! -> IO ()
! start appName appVersion di props io
= do curdir <- getCurrentDirectory
! Lib.start appName appVersion di ((set pc props >> io) `catch` \err -> quit >> ioError err)
setCurrentDirectory curdir
|
|
From: <kr_...@us...> - 2003-05-01 19:35:40
|
Update of /cvsroot/htoolkit/port/src/include In directory sc8-pr-cvs1:/tmp/cvs-serv12134/port/src/include Modified Files: Types.h Log Message: Added proper initialization for libgnome. Unfortunately the initialization requires that the application name should be constant during program execution. That means that the modified 'start' function should have two additional arguments: the application name and the application version (the latest is also required from libgnome for proper initialization). Index: Types.h =================================================================== RCS file: /cvsroot/htoolkit/port/src/include/Types.h,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** Types.h 23 Apr 2003 21:48:57 -0000 1.9 --- Types.h 1 May 2003 19:35:36 -0000 1.10 *************** *** 65,68 **** --- 65,69 ---- #include <pango/pango.h> #include <pango/pangox.h> + #include <gnome.h> typedef GtkWidget *WindowHandle; *************** *** 127,135 **** #endif ! extern void osInit(int DocumentInterface); extern void osStart(); extern void osQuit(); - extern char *osGetProcessTitle(); - extern void osSetProcessTitle(char *CString); #endif --- 128,134 ---- #endif ! extern void osInit(char *appName, char *appVersion, int DocumentInterface); extern void osStart(); extern void osQuit(); #endif |
|
From: <kr_...@us...> - 2003-05-01 19:35:39
|
Update of /cvsroot/htoolkit/port/src/Port In directory sc8-pr-cvs1:/tmp/cvs-serv12134/port/src/Port Modified Files: Process.hs Log Message: Added proper initialization for libgnome. Unfortunately the initialization requires that the application name should be constant during program execution. That means that the modified 'start' function should have two additional arguments: the application name and the application version (the latest is also required from libgnome for proper initialization). Index: Process.hs =================================================================== RCS file: /cvsroot/htoolkit/port/src/Port/Process.hs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Process.hs 30 Mar 2003 18:49:07 -0000 1.1 --- Process.hs 1 May 2003 19:35:35 -0000 1.2 *************** *** 12,16 **** module Graphics.UI.Port.Process ( start, quit, halt - , getProcessTitle, setProcessTitle ) where --- 12,15 ---- *************** *** 24,35 **** -- | Start the event loop. Runs until 'quit' is called. ! start :: DocumentInterface -> IO a -> IO a ! start di io = do ! osInit (toCDocumentInterface di) setProcessDismissHandler (quit >> return ()) r <- io osStart return r ! -- | 'quit' exits the main event loop, closes any windows and menus, destroys all timers -- and unregisters any event handlers. This function is automatically called when all --- 23,40 ---- -- | Start the event loop. Runs until 'quit' is called. ! start :: String -- ^ Application name ! -> String -- ^ Application version ! -> DocumentInterface -- ^ Document interface type for application ! -> IO a -- ^ Startup action ! -> IO a ! start name version di io = do ! (withCString name $ \cname -> ! withCString version $ \cversion -> ! osInit cname cversion (toCDocumentInterface di)) setProcessDismissHandler (quit >> return ()) r <- io osStart return r ! -- | 'quit' exits the main event loop, closes any windows and menus, destroys all timers -- and unregisters any event handlers. This function is automatically called when all *************** *** 43,47 **** performGC -- to release any foreign objects return r ! -- | 'quit' exits the main event loop, closes any windows and menus, destroys all timers -- and unregisters any event handlers. This function is automatically called when all --- 48,52 ---- performGC -- to release any foreign objects return r ! -- | 'quit' exits the main event loop, closes any windows and menus, destroys all timers -- and unregisters any event handlers. This function is automatically called when all *************** *** 54,64 **** performGC -- to release any foreign objects ! foreign import ccall "osInit" osInit :: CInt -> IO () foreign import ccall "osStart" osStart :: IO () foreign import ccall osQuit :: IO () - - getProcessTitle = osGetProcessTitle >>= peekCString - foreign import ccall osGetProcessTitle :: IO CString - - setProcessTitle appName = withCString appName osSetProcessTitle - foreign import ccall osSetProcessTitle :: CString -> IO () --- 59,63 ---- performGC -- to release any foreign objects ! foreign import ccall "osInit" osInit :: CString -> CString -> CInt -> IO () foreign import ccall "osStart" osStart :: IO () foreign import ccall osQuit :: IO () |
|
From: <kr_...@us...> - 2003-05-01 17:12:45
|
Update of /cvsroot/htoolkit/port/src/cbits/GTK In directory sc8-pr-cvs1:/tmp/cvs-serv29869/src/cbits/GTK Modified Files: FileDialog.c Log Message: typecast Index: FileDialog.c =================================================================== RCS file: /cvsroot/htoolkit/port/src/cbits/GTK/FileDialog.c,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** FileDialog.c 27 Apr 2003 17:51:40 -0000 1.7 --- FileDialog.c 1 May 2003 17:12:42 -0000 1.8 *************** *** 192,196 **** gtk_window_set_transient_for(GTK_WINDOW(file_selector), GTK_WINDOW(owner)); ! gtk_file_selection_set_filename(file_selector, nameptr); for (;;) --- 192,196 ---- gtk_window_set_transient_for(GTK_WINDOW(file_selector), GTK_WINDOW(owner)); ! gtk_file_selection_set_filename(GTK_FILE_SELECTION(file_selector), nameptr); for (;;) |
|
From: <kr_...@us...> - 2003-04-28 11:22:54
|
Update of /cvsroot/htoolkit/port
In directory sc8-pr-cvs1:/tmp/cvs-serv17136
Modified Files:
configure
Log Message:
Add gnome and gnomeui libraries to port
Index: configure
===================================================================
RCS file: /cvsroot/htoolkit/port/configure,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** configure 2 Apr 2003 17:43:35 -0000 1.10
--- configure 28 Apr 2003 11:22:51 -0000 1.11
***************
*** 291,296 ****
GTK*) if sh ./config.search pkg-config; then
echo "pkg-config found"
! clibs=`pkg-config pango gtk+-2.0 --libs`
! cincflags=`pkg-config pango gtk+-2.0 --cflags`
else
echo "error:"
--- 291,296 ----
GTK*) if sh ./config.search pkg-config; then
echo "pkg-config found"
! clibs=`pkg-config pango gtk+-2.0 libgnome-2.0 libgnomeui-2.0 --libs`
! cincflags=`pkg-config pango gtk+-2.0 libgnome-2.0 libgnomeui-2.0 --cflags`
else
echo "error:"
***************
*** 298,302 ****
echo " please check your GTK documentation"
exit 2
! fi;;
*) echo "warning:"
echo " unknown gui-library specified: $target"
--- 298,302 ----
echo " please check your GTK documentation"
exit 2
! fi;;
*) echo "warning:"
echo " unknown gui-library specified: $target"
***************
*** 312,315 ****
--- 312,316 ----
extralibs=""
extralibdirs=""
+ clibopts=""
for lib in $clibs; do
case $lib in
***************
*** 318,327 ****
else
extralibs="$extralibs\" `echo $lib | sed -e 's|-l|,\"|'`"
! fi;;
-L*) if test -z "$extralibdirs"; then
extralibdirs="`echo $lib | sed -e 's|-L|, \"|'`"
else
extralibdirs="$extralibdirs\" `echo $lib | sed -e 's|-L|,\"|'`"
! fi;;
esac
done
--- 319,332 ----
else
extralibs="$extralibs\" `echo $lib | sed -e 's|-l|,\"|'`"
! fi
! clibopts="$clibopts $lib"
! ;;
-L*) if test -z "$extralibdirs"; then
extralibdirs="`echo $lib | sed -e 's|-L|, \"|'`"
else
extralibdirs="$extralibdirs\" `echo $lib | sed -e 's|-L|,\"|'`"
! fi
! clibopts="$clibopts $lib"
! ;;
esac
done
***************
*** 342,348 ****
--- 347,355 ----
# expects $cincflags to be in the form: -Idir1 -Idir2 ...
incdirs=\"$curdir/src/include\"
+ incopts=""
for flag in $cincflags; do
case $flag in
-I*) incdirs="$incdirs`echo $flag | sed -e 's|-I|, \"|'`\""
+ incopts="$incopts $flag"
esac
done
***************
*** 372,376 ****
echo "# generated by configure" > config/config.mk
echo "CC=$cc $ccoptions" >> config/config.mk
! echo "CINCFLAGS=$cincflags" >> config/config.mk
echo "HC=$hc" >> config/config.mk
--- 379,383 ----
echo "# generated by configure" > config/config.mk
echo "CC=$cc $ccoptions" >> config/config.mk
! echo "CINCFLAGS=$incopts" >> config/config.mk
echo "HC=$hc" >> config/config.mk
***************
*** 383,387 ****
echo "FFIDIR=$ffidir" >> config/config.mk
echo "GUILIB=$target" >> config/config.mk
! echo "CLIBS=$clibs" >> config/config.mk
echo "" >> config/config.mk
echo "HDOC=$hdoc" >> config/config.mk
--- 390,394 ----
echo "FFIDIR=$ffidir" >> config/config.mk
echo "GUILIB=$target" >> config/config.mk
! echo "CLIBS=$clibopts" >> config/config.mk
echo "" >> config/config.mk
echo "HDOC=$hdoc" >> config/config.mk
|
|
From: <kr_...@us...> - 2003-04-28 08:41:27
|
Update of /cvsroot/htoolkit/port/src/cbits/Win32
In directory sc8-pr-cvs1:/tmp/cvs-serv14931/port/src/cbits/Win32
Modified Files:
Window.c
Log Message:
bugfix
Index: Window.c
===================================================================
RCS file: /cvsroot/htoolkit/port/src/cbits/Win32/Window.c,v
retrieving revision 1.27
retrieving revision 1.28
diff -C2 -d -r1.27 -r1.28
*** Window.c 27 Apr 2003 18:19:14 -0000 1.27
--- Window.c 28 Apr 2003 08:41:23 -0000 1.28
***************
*** 806,814 ****
gInKey = FALSE;
gCurChar = 0;
! handleWindowDeactivate(hWnd);
}
else
{
! handleWindowActivate(hWnd);
}
break;
--- 806,814 ----
gInKey = FALSE;
gCurChar = 0;
! handleDialoghDeactivate(hWnd);
}
else
{
! handleDialogActivate(hWnd);
}
break;
|
|
From: <kr_...@us...> - 2003-04-27 18:19:18
|
Update of /cvsroot/htoolkit/port/src/cbits/Win32
In directory sc8-pr-cvs1:/tmp/cvs-serv13973/port/src/cbits/Win32
Modified Files:
Window.c
Log Message:
Proper event handling for dialogs
Index: Window.c
===================================================================
RCS file: /cvsroot/htoolkit/port/src/cbits/Win32/Window.c,v
retrieving revision 1.26
retrieving revision 1.27
diff -C2 -d -r1.26 -r1.27
*** Window.c 26 Apr 2003 20:03:08 -0000 1.26
--- Window.c 27 Apr 2003 18:19:14 -0000 1.27
***************
*** 1,1404 ****
! #define _WIN32_IE 0x0400
!
! #include "Window.h"
! #include "Internals.h"
! #include "Handlers_stub.h"
! #include <windowsx.h>
!
! typedef struct
! {
! POINT Origin;
[...2794 lines suppressed...]
! RECT rect;
! GetWindowRect(ctrl,&rect);
! res[0] = rect.left;
! res[1] = rect.top;
! res[2] = rect.right;
! res[3] = rect.bottom;
! }
!
! void osSetWindowResizeable(WindowHandle hwnd, int resizeable )
! {
! RECT rect;
! LONG style = GetWindowLong(hwnd, GWL_STYLE );
! if (resizeable) style |= WS_THICKFRAME;
! else style &= ~WS_THICKFRAME;
! SetWindowLong(hwnd, GWL_STYLE, style );
!
! GetClientRect(hwnd,&rect);
! handleWindowResize(hwnd,rect.right-rect.left,rect.bottom-rect.top);
! handleWindowReLayout(hwnd);
! }
|
|
From: <kr_...@us...> - 2003-04-27 18:19:17
|
Update of /cvsroot/htoolkit/port/src/cbits/GTK
In directory sc8-pr-cvs1:/tmp/cvs-serv13973/port/src/cbits/GTK
Modified Files:
Window.c
Log Message:
Proper event handling for dialogs
Index: Window.c
===================================================================
RCS file: /cvsroot/htoolkit/port/src/cbits/GTK/Window.c,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -d -r1.15 -r1.16
*** Window.c 26 Apr 2003 20:03:06 -0000 1.15
--- Window.c 27 Apr 2003 18:19:14 -0000 1.16
***************
*** 320,323 ****
--- 320,405 ----
}
+ static gboolean dialog_key_press_handler(GtkWidget *widget, GdkEventKey *event, gpointer user_data)
+ {
+ int c;
+ int modifiers = 0;
+
+ widget = GTK_BIN(widget)->child;
+
+ if (event->state & GDK_SHIFT_MASK) modifiers |= shiftBIT;
+ if (event->state & GDK_CONTROL_MASK) modifiers |= ctrlBIT;
+ if (event->state & GDK_MOD1_MASK) modifiers |= altBIT;
+
+ if (event->length > 0)
+ {
+ c = event->string[0];
+ if (modifiers & altBIT) c += 256;
+ }
+ else
+ c = CheckVirtualKeyCode(event->keyval);
+
+ if (!c) return gtk_false();
+
+ if (gInKey)
+
+ {
+ if (gCurChar == c)
+ handleWindowKeyboard(widget, evKeyStillDown, gCurChar, modifiers);
+ else
+ {
+ handleWindowKeyboard(widget, evKeyUp, gCurChar, modifiers);
+ gCurChar = c;
+ handleWindowKeyboard(widget, evKeyDown, gCurChar, modifiers);
+ }
+ }
+ else
+ {
+ gCurChar = c;
+ handleWindowKeyboard(widget, evKeyDown, gCurChar, modifiers);
+ gInKey = TRUE;
+ }
+
+ return gtk_false();
+ };
+
+ static gboolean dialog_key_release_handler(GtkWidget *widget, GdkEventKey *event, gpointer user_data)
+ {
+ if (gInKey)
+ {
+ int modifiers = 0;
+
+ widget = GTK_BIN(widget)->child;
+
+ if (event->state & GDK_SHIFT_MASK) modifiers |= shiftBIT;
+ if (event->state & GDK_CONTROL_MASK) modifiers |= ctrlBIT;
+ if (event->state & GDK_MOD1_MASK) modifiers |= altBIT;
+
+ handleWindowKeyboard(widget, evKeyUp, gCurChar, modifiers);
+ gInKey = FALSE;
+ gCurChar = 0;
+ }
+
+ return gtk_false();
+ };
+
+ static void dialog_focus_in_handler(GtkWidget *widget, GdkEventFocus *event, gpointer user_data)
+ {
+ handleDialogActivate(GTK_BIN(widget)->child);
+ }
+
+ static void dialog_focus_out_handler(GtkWidget *widget, GdkEventFocus *event, gpointer user_data)
+ {
+ if (gInKey)
+ {
+ handleWindowKeyboard(GTK_BIN(widget)->child, evKeyUp, gCurChar, 0);
+
+ gInKey = FALSE;
+ gCurChar = 0;
+ }
+
+ handleDialogDeactivate(GTK_BIN(widget)->child);
+ }
+
+
WindowHandle osCreateDialog(WindowHandle parent)
***************
*** 331,336 ****
frame = gtk_window_new (GTK_WINDOW_TOPLEVEL);
! gtk_window_set_transient_for(frame, gtk_widget_get_toplevel(parent));
! gtk_window_set_destroy_with_parent(frame, gtk_true());
sw = create_generic_window();
--- 413,432 ----
frame = gtk_window_new (GTK_WINDOW_TOPLEVEL);
! gtk_window_set_transient_for(GTK_WINDOW(frame), GTK_WINDOW(gtk_widget_get_toplevel(parent)));
! gtk_window_set_destroy_with_parent(GTK_WINDOW(frame), gtk_true());
!
!
! gtk_signal_connect (GTK_OBJECT(frame), "key-press-event",
! GTK_SIGNAL_FUNC(dialog_key_press_handler),
! NULL);
! gtk_signal_connect (GTK_OBJECT(frame), "key-release-event",
! GTK_SIGNAL_FUNC(dialog_key_release_handler),
! NULL);
! gtk_signal_connect (GTK_OBJECT(frame), "focus-in-event",
! GTK_SIGNAL_FUNC(dialog_focus_in_handler),
! NULL);
! gtk_signal_connect (GTK_OBJECT(frame), "focus-out-event",
! GTK_SIGNAL_FUNC(dialog_focus_out_handler),
! NULL);
sw = create_generic_window();
|
|
From: <kr_...@us...> - 2003-04-27 18:19:17
|
Update of /cvsroot/htoolkit/port/src/Port
In directory sc8-pr-cvs1:/tmp/cvs-serv13973/port/src/Port
Modified Files:
Handlers.hs Window.hs
Log Message:
Proper event handling for dialogs
Index: Handlers.hs
===================================================================
RCS file: /cvsroot/htoolkit/port/src/Port/Handlers.hs,v
retrieving revision 1.21
retrieving revision 1.22
diff -C2 -d -r1.21 -r1.22
*** Handlers.hs 23 Apr 2003 21:48:49 -0000 1.21
--- Handlers.hs 27 Apr 2003 18:19:13 -0000 1.22
***************
*** 278,282 ****
-- WindowDeactivate
-----------------------------------------------------------------------------------------
!
{-# NOINLINE handlersWindowDeactivate #-}
handlersWindowDeactivate :: MVar (PtrMap WindowHandle (IO ()))
--- 278,282 ----
-- WindowDeactivate
-----------------------------------------------------------------------------------------
!
{-# NOINLINE handlersWindowDeactivate #-}
handlersWindowDeactivate :: MVar (PtrMap WindowHandle (IO ()))
***************
*** 289,295 ****
setWindowDeactivateDefHandler :: WindowHandle -> IO ()
! setWindowDeactivateDefHandler hwnd
= setDefHandler hwnd handlersWindowDeactivate
!
getWindowDeactivateHandler :: WindowHandle -> IO (IO ())
getWindowDeactivateHandler hwnd
--- 289,295 ----
setWindowDeactivateDefHandler :: WindowHandle -> IO ()
! setWindowDeactivateDefHandler hwnd
= setDefHandler hwnd handlersWindowDeactivate
!
getWindowDeactivateHandler :: WindowHandle -> IO (IO ())
getWindowDeactivateHandler hwnd
***************
*** 300,307 ****
= invokeHandler hwnd handlersWindowDeactivate id
-----------------------------------------------------------------------------------------
-- WindowActivate
-----------------------------------------------------------------------------------------
!
{-# NOINLINE handlersWindowActivate #-}
handlersWindowActivate :: MVar (PtrMap WindowHandle (IO ()))
--- 300,311 ----
= invokeHandler hwnd handlersWindowDeactivate id
+ handleDialogDeactivate :: WindowHandle -> IO ()
+ handleDialogDeactivate hwnd
+ = invokeHandler hwnd handlersWindowDeactivate id
+
-----------------------------------------------------------------------------------------
-- WindowActivate
-----------------------------------------------------------------------------------------
!
{-# NOINLINE handlersWindowActivate #-}
handlersWindowActivate :: MVar (PtrMap WindowHandle (IO ()))
***************
*** 314,320 ****
setWindowActivateDefHandler :: WindowHandle -> IO ()
! setWindowActivateDefHandler hwnd
= setDefHandler hwnd handlersWindowActivate
!
getWindowActivateHandler :: WindowHandle -> IO (IO ())
getWindowActivateHandler hwnd
--- 318,324 ----
setWindowActivateDefHandler :: WindowHandle -> IO ()
! setWindowActivateDefHandler hwnd
= setDefHandler hwnd handlersWindowActivate
!
getWindowActivateHandler :: WindowHandle -> IO (IO ())
getWindowActivateHandler hwnd
***************
*** 327,330 ****
--- 331,338 ----
invokeHandler hwnd handlersWindowActivate id
+ handleDialogActivate :: WindowHandle -> IO ()
+ handleDialogActivate hwnd =
+ invokeHandler hwnd handlersWindowActivate id
+
-----------------------------------------------------------------------------------------
-- WindowPaint
***************
*** 342,348 ****
setWindowPaintDefHandler :: WindowHandle -> IO ()
! setWindowPaintDefHandler hwnd
= setDefHandler hwnd handlersWindowPaint
!
getWindowPaintHandler :: WindowHandle -> IO (CanvasHandle -> Rect -> IO ())
getWindowPaintHandler hwnd
--- 350,356 ----
setWindowPaintDefHandler :: WindowHandle -> IO ()
! setWindowPaintDefHandler hwnd
= setDefHandler hwnd handlersWindowPaint
!
getWindowPaintHandler :: WindowHandle -> IO (CanvasHandle -> Rect -> IO ())
getWindowPaintHandler hwnd
***************
*** 699,704 ****
foreign export ccall handleWindowMouse :: WindowHandle -> CInt -> CInt -> CInt -> CWord -> IO ()
foreign export ccall handleWindowKeyboard :: WindowHandle -> CInt -> CInt -> CWord -> IO ()
! foreign export ccall handleWindowDeactivate :: WindowHandle -> IO ()
! foreign export ccall handleWindowActivate :: WindowHandle -> IO ()
foreign export ccall handleWindowContextMenu :: WindowHandle -> CInt -> CInt -> CWord -> IO ()
foreign export ccall handleControlCommand :: WindowHandle -> IO ()
--- 707,714 ----
foreign export ccall handleWindowMouse :: WindowHandle -> CInt -> CInt -> CInt -> CWord -> IO ()
foreign export ccall handleWindowKeyboard :: WindowHandle -> CInt -> CInt -> CWord -> IO ()
! foreign export ccall handleWindowDeactivate :: WindowHandle -> IO ()
! foreign export ccall handleWindowActivate :: WindowHandle -> IO ()
! foreign export ccall handleDialogDeactivate :: WindowHandle -> IO ()
! foreign export ccall handleDialogActivate :: WindowHandle -> IO ()
foreign export ccall handleWindowContextMenu :: WindowHandle -> CInt -> CInt -> CWord -> IO ()
foreign export ccall handleControlCommand :: WindowHandle -> IO ()
***************
*** 709,711 ****
foreign export ccall handleTimerDestroy :: TimerHandle -> IO ()
foreign export ccall handleProcessDismiss :: IO ()
! foreign export ccall handleProcessDestroy :: IO ()
\ No newline at end of file
--- 719,721 ----
foreign export ccall handleTimerDestroy :: TimerHandle -> IO ()
foreign export ccall handleProcessDismiss :: IO ()
! foreign export ccall handleProcessDestroy :: IO ()
Index: Window.hs
===================================================================
RCS file: /cvsroot/htoolkit/port/src/Port/Window.hs,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** Window.hs 26 Apr 2003 20:03:06 -0000 1.9
--- Window.hs 27 Apr 2003 18:19:13 -0000 1.10
***************
*** 100,105 ****
createDialog hparent = do
hwnd <- osCreateDialog hparent
! registerWindow hwnd
! setWindowPaintHandler hwnd onpaint
setWindowDismissHandler hwnd (destroyWindow hwnd)
return hwnd
--- 100,104 ----
createDialog hparent = do
hwnd <- osCreateDialog hparent
! setWindowPaintHandler hwnd onpaint
setWindowDismissHandler hwnd (destroyWindow hwnd)
return hwnd
|
|
From: <kr_...@us...> - 2003-04-27 17:51:43
|
Update of /cvsroot/htoolkit/port/src/cbits/GTK
In directory sc8-pr-cvs1:/tmp/cvs-serv2611/port/src/cbits/GTK
Modified Files:
ColorDialog.c FileDialog.c FontDialog.c
Log Message:
bugfixes
Index: ColorDialog.c
===================================================================
RCS file: /cvsroot/htoolkit/port/src/cbits/GTK/ColorDialog.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** ColorDialog.c 30 Mar 2003 18:42:41 -0000 1.3
--- ColorDialog.c 27 Apr 2003 17:51:40 -0000 1.4
***************
*** 1,22 ****
! #include "ColorDialog.h"
#include "Internals.h"
!
! BOOL osRunColorDialog(unsigned int *color)
! {
gint result;
! GdkColor c;
! GtkWidget *color_dialog;
!
! color_dialog = gtk_color_selection_dialog_new("Color");
! gtk_window_set_transient_for(GTK_WINDOW(color_dialog), GTK_WINDOW(gFrameWidget));
!
! result = gtk_dialog_run(GTK_DIALOG(color_dialog));
! gtk_color_selection_get_current_color(GTK_COLOR_SELECTION(GTK_COLOR_SELECTION_DIALOG(color_dialog)->colorsel), &c);
! gtk_widget_destroy (color_dialog);
!
! if (result != GTK_RESPONSE_OK)
! return FALSE;
!
! *color = (c.red/257) | (c.green/257 << 8) | (c.blue/257 << 16);
! return TRUE;
}
--- 1,27 ----
! #include "CommonDialogs.h"
#include "Internals.h"
!
! BOOL osRunColorDialog(unsigned int *color, WindowHandle owner)
! {
gint result;
! GdkColor c;
! GtkWidget *color_dialog;
!
! color_dialog = gtk_color_selection_dialog_new("Color");
!
! if (owner)
! owner = gtk_widget_get_toplevel(owner);
! else
! owner = gFrameWidget;
! gtk_window_set_transient_for(GTK_WINDOW(color_dialog), GTK_WINDOW(owner));
!
! result = gtk_dialog_run(GTK_DIALOG(color_dialog));
! gtk_color_selection_get_current_color(GTK_COLOR_SELECTION(GTK_COLOR_SELECTION_DIALOG(color_dialog)->colorsel), &c);
! gtk_widget_destroy (color_dialog);
!
! if (result != GTK_RESPONSE_OK)
! return FALSE;
!
! *color = (c.red/257) | (c.green/257 << 8) | (c.blue/257 << 16);
! return TRUE;
}
Index: FileDialog.c
===================================================================
RCS file: /cvsroot/htoolkit/port/src/cbits/GTK/FileDialog.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** FileDialog.c 26 Apr 2003 20:56:33 -0000 1.6
--- FileDialog.c 27 Apr 2003 17:51:40 -0000 1.7
***************
*** 1,3 ****
! #include "FileDialog.h"
#include "Internals.h"
--- 1,3 ----
! #include "CommonDialogs.h"
#include "Internals.h"
Index: FontDialog.c
===================================================================
RCS file: /cvsroot/htoolkit/port/src/cbits/GTK/FontDialog.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** FontDialog.c 30 Mar 2003 18:42:41 -0000 1.4
--- FontDialog.c 27 Apr 2003 17:51:40 -0000 1.5
***************
*** 1,11 ****
! #include "FontDialog.h"
#include "Internals.h"
! BOOL osRunFontDialog(char **fname, int *fsize, int *fweight, int *fstyle, BOOL *funderline, BOOL *fstrikeout)
{
GtkWidget *font_dialog;
font_dialog = gtk_font_selection_dialog_new("Font");
! gtk_window_set_transient_for(GTK_WINDOW(font_dialog), GTK_WINDOW(gFrameWidget));
if (gtk_dialog_run(GTK_DIALOG(font_dialog)) == GTK_RESPONSE_OK)
--- 1,16 ----
! #include "CommonDialogs.h"
#include "Internals.h"
! BOOL osRunFontDialog(char **fname, int *fsize, int *fweight, int *fstyle, BOOL *funderline, BOOL *fstrikeout, WindowHandle owner)
{
GtkWidget *font_dialog;
font_dialog = gtk_font_selection_dialog_new("Font");
!
! if (owner)
! owner = gtk_widget_get_toplevel(owner);
! else
! owner = gFrameWidget;
! gtk_window_set_transient_for(GTK_WINDOW(font_dialog), GTK_WINDOW(owner));
if (gtk_dialog_run(GTK_DIALOG(font_dialog)) == GTK_RESPONSE_OK)
|
|
From: <kr_...@us...> - 2003-04-26 21:39:24
|
Update of /cvsroot/htoolkit/port/src/cbits/GTK
In directory sc8-pr-cvs1:/tmp/cvs-serv19641/src/cbits/GTK
Modified Files:
Frame.c
Log Message:
bugfix
Index: Frame.c
===================================================================
RCS file: /cvsroot/htoolkit/port/src/cbits/GTK/Frame.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** Frame.c 23 Apr 2003 21:48:52 -0000 1.6
--- Frame.c 26 Apr 2003 21:39:20 -0000 1.7
***************
*** 13,17 ****
{
GtkWidget *window = gtk_notebook_get_nth_page(GTK_NOTEBOOK(client), gtk_notebook_get_current_page(GTK_NOTEBOOK(client)));
! handleWindowDismiss(window);
}
--- 13,17 ----
{
GtkWidget *window = gtk_notebook_get_nth_page(GTK_NOTEBOOK(client), gtk_notebook_get_current_page(GTK_NOTEBOOK(client)));
! if (window) handleWindowDismiss(window);
}
***************
*** 110,113 ****
--- 110,116 ----
widget = gtk_notebook_get_nth_page(GTK_NOTEBOOK(gClientWidget), gtk_notebook_get_current_page(GTK_NOTEBOOK(gClientWidget)));
+ if (!widget)
+ return gtk_false();
+
if (event->state & GDK_SHIFT_MASK) modifiers |= shiftBIT;
if (event->state & GDK_CONTROL_MASK) modifiers |= ctrlBIT;
***************
*** 157,160 ****
--- 160,166 ----
widget = gtk_notebook_get_nth_page(GTK_NOTEBOOK(gClientWidget), gtk_notebook_get_current_page(GTK_NOTEBOOK(gClientWidget)));
+ if (!widget)
+ return gtk_false();
+
if (event->state & GDK_SHIFT_MASK) modifiers |= shiftBIT;
if (event->state & GDK_CONTROL_MASK) modifiers |= ctrlBIT;
***************
*** 171,188 ****
static void sdiframe_focus_in_handler(GtkWidget *widget, GdkEventFocus *event, gpointer user_data)
{
! handleWindowActivate(gClientWidget);
}
static void sdiframe_focus_out_handler(GtkWidget *widget, GdkEventFocus *event, gpointer user_data)
{
! if (gInKey)
{
! handleWindowKeyboard(gClientWidget, evKeyUp, gCurChar, 0);
! gInKey = FALSE;
! gCurChar = 0;
! }
! handleWindowDeactivate(gClientWidget);
}
--- 177,198 ----
static void sdiframe_focus_in_handler(GtkWidget *widget, GdkEventFocus *event, gpointer user_data)
{
! if (gClientWidget)
! handleWindowActivate(gClientWidget);
}
static void sdiframe_focus_out_handler(GtkWidget *widget, GdkEventFocus *event, gpointer user_data)
{
! if (gClientWidget)
{
! if (gInKey)
! {
! handleWindowKeyboard(gClientWidget, evKeyUp, gCurChar, 0);
! gInKey = FALSE;
! gCurChar = 0;
! }
! handleWindowDeactivate(gClientWidget);
! }
}
|
|
From: <kr_...@us...> - 2003-04-26 21:05:48
|
Update of /cvsroot/htoolkit/gio/src/examples/simple
In directory sc8-pr-cvs1:/tmp/cvs-serv7023/gio/src/examples/simple
Modified Files:
BitmapViewer.hs
Log Message:
Update example after changes in CommonDialog API
Index: BitmapViewer.hs
===================================================================
RCS file: /cvsroot/htoolkit/gio/src/examples/simple/BitmapViewer.hs,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** BitmapViewer.hs 26 Apr 2003 10:00:50 -0000 1.5
--- BitmapViewer.hs 26 Apr 2003 21:05:44 -0000 1.6
***************
*** 22,26 ****
cmdopen mclose
= do codes <- getAvailableCodecs
! fnames <- runInputFilesDialog "Open" (codecsToFilesFilter codes)
mapM_ (openBitmapWindow mclose) fnames
--- 22,26 ----
cmdopen mclose
= do codes <- getAvailableCodecs
! fnames <- runInputFilesDialog "Open" (codecsToFilesFilter codes) Nothing
mapM_ (openBitmapWindow mclose) fnames
|
|
From: <kr_...@us...> - 2003-04-26 21:02:46
|
Update of /cvsroot/htoolkit/port/src/Port
In directory sc8-pr-cvs1:/tmp/cvs-serv5719/Port
Modified Files:
CommonDialogs.hs
Log Message:
Create CommonDialogs.h
Index: CommonDialogs.hs
===================================================================
RCS file: /cvsroot/htoolkit/port/src/Port/CommonDialogs.hs,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** CommonDialogs.hs 26 Apr 2003 20:56:33 -0000 1.2
--- CommonDialogs.hs 26 Apr 2003 21:02:13 -0000 1.3
***************
*** 1,3 ****
! {-# OPTIONS -fglasgow-exts -#include FileDialog.h -#include ColorDialog.h -#include FontDialog.h #-}
-----------------------------------------------------------------------------------------
{-| Module : CommonDialogs
--- 1,3 ----
! {-# OPTIONS -fglasgow-exts -#include CommonDialogs.h #-}
-----------------------------------------------------------------------------------------
{-| Module : CommonDialogs
|
|
From: <kr_...@us...> - 2003-04-26 21:02:20
|
Update of /cvsroot/htoolkit/port/src/include In directory sc8-pr-cvs1:/tmp/cvs-serv5719/include Modified Files: HsPort.h Added Files: CommonDialogs.h Removed Files: ColorDialog.h FileDialog.h FontDialog.h Log Message: Create CommonDialogs.h --- NEW FILE: CommonDialogs.h --- #ifndef COMMONDIALOGS_H #define COMMONDIALOGS_H #include "Types.h" char *osSelectDirectory(char *title, WindowHandle owner); char *osSelectInputFile(char *title, char *filter, WindowHandle owner); char *osSelectInputFiles(char *title, char *filter, WindowHandle owner); char *osSelectOutputFile(char *title, char *filter, char *nameptr, WindowHandle owner); BOOL osRunColorDialog(unsigned int *color, WindowHandle owner); BOOL osRunFontDialog(char **fname, int *fsize, int *fweight, int *fstyle, BOOL *funderline, BOOL *fstrikeout, WindowHandle owner); #endif Index: HsPort.h =================================================================== RCS file: /cvsroot/htoolkit/port/src/include/HsPort.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** HsPort.h 17 Mar 2003 11:04:40 -0000 1.3 --- HsPort.h 26 Apr 2003 21:02:17 -0000 1.4 *************** *** 15,20 **** #include "Canvas.h" #include "Bitmap.h" ! #include "FileDialog.h" ! #include "ColorDialog.h" ! #include "FontDialog.h" #include "Message.h" --- 15,18 ---- #include "Canvas.h" #include "Bitmap.h" ! #include "CommonDialogs.h" #include "Message.h" --- ColorDialog.h DELETED --- --- FileDialog.h DELETED --- --- FontDialog.h DELETED --- |
|
From: <kr_...@us...> - 2003-04-26 20:56:37
|
Update of /cvsroot/htoolkit/gio/src/Graphics/UI/GIO
In directory sc8-pr-cvs1:/tmp/cvs-serv3345/gio/src/Graphics/UI/GIO
Modified Files:
CommonDialogs.hs
Log Message:
Add owner window as parameter for each function in CommonDialog
Index: CommonDialogs.hs
===================================================================
RCS file: /cvsroot/htoolkit/gio/src/Graphics/UI/GIO/CommonDialogs.hs,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** CommonDialogs.hs 26 Apr 2003 10:00:49 -0000 1.2
--- CommonDialogs.hs 26 Apr 2003 20:56:34 -0000 1.3
***************
*** 22,25 ****
--- 22,27 ----
import Graphics.UI.GIO.Types
+ import Graphics.UI.GIO.Attributes
+ import Graphics.UI.GIO.Window
import qualified Graphics.UI.Port as Lib
***************
*** 33,38 ****
-- filter name and the second element is a list of
-- wildcards (example [(\"Haskell script\", [\"*.hs\", \"*.lhs\"])])
-> IO (Maybe FilePath) -- ^ The full qualified path to the selected file
! runInputFileDialog = Lib.runInputFileDialog
-- | Run a dialog to select an input file. Returns 'Nothing' when cancelled.
--- 35,41 ----
-- filter name and the second element is a list of
-- wildcards (example [(\"Haskell script\", [\"*.hs\", \"*.lhs\"])])
+ -> Maybe Window -- ^ The owner window
-> IO (Maybe FilePath) -- ^ The full qualified path to the selected file
! runInputFileDialog title filter mb_parent = Lib.runInputFileDialog title filter (getWHandle mb_parent)
-- | Run a dialog to select an input file. Returns 'Nothing' when cancelled.
***************
*** 42,47 ****
-- filter name and the second element is a list of
-- wildcards (example [(\"Haskell script\", [\"*.hs\", \"*.lhs\"])])
-> IO [FilePath] -- ^ The list of full qualified paths for the selected files
! runInputFilesDialog = Lib.runInputFilesDialog
-- | Run a dialog to select an output file. Returns 'Nothing' when cancelled.
--- 45,51 ----
-- filter name and the second element is a list of
-- wildcards (example [(\"Haskell script\", [\"*.hs\", \"*.lhs\"])])
+ -> Maybe Window -- ^ The owner window
-> IO [FilePath] -- ^ The list of full qualified paths for the selected files
! runInputFilesDialog title filter mb_parent = Lib.runInputFilesDialog title filter (getWHandle mb_parent)
-- | Run a dialog to select an output file. Returns 'Nothing' when cancelled.
***************
*** 52,68 ****
-- wildcards (example [(\"Haskell script\", [\"*.hs\", \"*.lhs\"])])
-> FilePath -- ^ The default file name
-> IO (Maybe FilePath) -- ^ The full qualified path to the selected file
! runOutputFileDialog = Lib.runOutputFileDialog
-- | Runs a dialog to select a directory. Returns 'Nothing' when cancelled.
runDirectoryDialog :: String -- ^ The dialog title
-> IO (Maybe FilePath) -- ^ The full qualified path to the selected directory
! runDirectoryDialog = Lib.runDirectoryDialog
-- | Run a dialog to select a font. Returns 'Nothing' when cancelled.
! runFontDialog :: IO (Maybe FontDef)
! runFontDialog = Lib.runFontDialog
-- | Run a dialog to select a color. Returns 'Nothing' when cancelled.
! runColorDialog :: IO (Maybe Color)
! runColorDialog = Lib.runColorDialog
\ No newline at end of file
--- 56,79 ----
-- wildcards (example [(\"Haskell script\", [\"*.hs\", \"*.lhs\"])])
-> FilePath -- ^ The default file name
+ -> Maybe Window -- ^ The owner window
-> IO (Maybe FilePath) -- ^ The full qualified path to the selected file
! runOutputFileDialog title filter fname mb_parent = Lib.runOutputFileDialog title filter fname (getWHandle mb_parent)
-- | Runs a dialog to select a directory. Returns 'Nothing' when cancelled.
runDirectoryDialog :: String -- ^ The dialog title
+ -> Maybe Window -- ^ The owner window
-> IO (Maybe FilePath) -- ^ The full qualified path to the selected directory
! runDirectoryDialog title mb_parent = Lib.runDirectoryDialog title (getWHandle mb_parent)
-- | Run a dialog to select a font. Returns 'Nothing' when cancelled.
! runFontDialog :: Maybe Window -- ^ The owner window
! -> IO (Maybe FontDef)
! runFontDialog mb_parent = Lib.runFontDialog (getWHandle mb_parent)
-- | Run a dialog to select a color. Returns 'Nothing' when cancelled.
! runColorDialog :: Maybe Window -- ^ The owner window
! -> IO (Maybe Color)
! runColorDialog mb_parent = Lib.runColorDialog (getWHandle mb_parent)
!
!
! getWHandle = maybe Lib.nullHandle hwindow
|
|
From: <kr_...@us...> - 2003-04-26 20:56:37
|
Update of /cvsroot/htoolkit/port/src/include In directory sc8-pr-cvs1:/tmp/cvs-serv3345/port/src/include Modified Files: ColorDialog.h FileDialog.h FontDialog.h Log Message: Add owner window as parameter for each function in CommonDialog Index: ColorDialog.h =================================================================== RCS file: /cvsroot/htoolkit/port/src/include/ColorDialog.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ColorDialog.h 14 Mar 2003 18:38:43 -0000 1.1 --- ColorDialog.h 26 Apr 2003 20:56:34 -0000 1.2 *************** *** 4,8 **** #include "Types.h" ! BOOL osRunColorDialog(unsigned int *color); #endif --- 4,8 ---- #include "Types.h" ! BOOL osRunColorDialog(unsigned int *color, WindowHandle owner); #endif Index: FileDialog.h =================================================================== RCS file: /cvsroot/htoolkit/port/src/include/FileDialog.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** FileDialog.h 26 Apr 2003 10:00:49 -0000 1.2 --- FileDialog.h 26 Apr 2003 20:56:34 -0000 1.3 *************** *** 4,11 **** #include "Types.h" ! char *osSelectDirectory(char *title); ! char *osSelectInputFile(char *title, char *filter); ! char *osSelectInputFiles(char *title, char *filter); ! char *osSelectOutputFile(char *title, char *filter, char *nameptr); #endif --- 4,11 ---- #include "Types.h" ! char *osSelectDirectory(char *title, WindowHandle owner); ! char *osSelectInputFile(char *title, char *filter, WindowHandle owner); ! char *osSelectInputFiles(char *title, char *filter, WindowHandle owner); ! char *osSelectOutputFile(char *title, char *filter, char *nameptr, WindowHandle owner); #endif Index: FontDialog.h =================================================================== RCS file: /cvsroot/htoolkit/port/src/include/FontDialog.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** FontDialog.h 16 Mar 2003 23:48:14 -0000 1.1 --- FontDialog.h 26 Apr 2003 20:56:34 -0000 1.2 *************** *** 4,8 **** #include "Types.h" ! BOOL osRunFontDialog(char **fname, int *fsize, int *fweight, int *fstyle, BOOL *funderline, BOOL *fstrikeout); #endif --- 4,8 ---- #include "Types.h" ! BOOL osRunFontDialog(char **fname, int *fsize, int *fweight, int *fstyle, BOOL *funderline, BOOL *fstrikeout, WindowHandle owner); #endif |
|
From: <kr_...@us...> - 2003-04-26 20:56:37
|
Update of /cvsroot/htoolkit/port/src/cbits/Win32
In directory sc8-pr-cvs1:/tmp/cvs-serv3345/port/src/cbits/Win32
Modified Files:
ColorDialog.c FileDialog.c FontDialog.c
Log Message:
Add owner window as parameter for each function in CommonDialog
Index: ColorDialog.c
===================================================================
RCS file: /cvsroot/htoolkit/port/src/cbits/Win32/ColorDialog.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** ColorDialog.c 29 Mar 2003 08:12:18 -0000 1.2
--- ColorDialog.c 26 Apr 2003 20:56:34 -0000 1.3
***************
*** 5,14 ****
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
! BOOL osRunColorDialog(unsigned int *color)
{
CHOOSECOLOR cc;
cc.lStructSize = sizeof(cc);
! cc.hwndOwner = ghWndFrame;
cc.hInstance = NULL;
cc.rgbResult = 0;
--- 5,14 ----
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
! BOOL osRunColorDialog(unsigned int *color, WindowHandle owner)
{
CHOOSECOLOR cc;
cc.lStructSize = sizeof(cc);
! cc.hwndOwner = owner ? owner : ghWndFrame;
cc.hInstance = NULL;
cc.rgbResult = 0;
Index: FileDialog.c
===================================================================
RCS file: /cvsroot/htoolkit/port/src/cbits/Win32/FileDialog.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** FileDialog.c 26 Apr 2003 10:00:48 -0000 1.4
--- FileDialog.c 26 Apr 2003 20:56:34 -0000 1.5
***************
*** 18,22 ****
}
! char *osSelectDirectory(char *title)
{
char buffer[MAX_PATH];
--- 18,22 ----
}
! char *osSelectDirectory(char *title, WindowHandle owner)
{
char buffer[MAX_PATH];
***************
*** 25,29 ****
char *s = NULL;
! bi.hwndOwner = ghWndFrame;
bi.pidlRoot = NULL;
bi.pszDisplayName = buffer;
--- 25,29 ----
char *s = NULL;
! bi.hwndOwner = owner ? owner : ghWndFrame;
bi.pidlRoot = NULL;
bi.pszDisplayName = buffer;
***************
*** 47,57 ****
}
! char *osSelectInputFile(char *title, char *filter)
{
OPENFILENAME ofn;
ofn.lStructSize = sizeof (OPENFILENAME);
!
! ofn.hwndOwner = ghWndFrame;
ofn.hInstance = NULL;
ofn.lpstrFilter = filter;
--- 47,56 ----
}
! char *osSelectInputFile(char *title, char *filter, WindowHandle owner)
{
OPENFILENAME ofn;
ofn.lStructSize = sizeof (OPENFILENAME);
! ofn.hwndOwner = owner ? owner : ghWndFrame;
ofn.hInstance = NULL;
ofn.lpstrFilter = filter;
***************
*** 83,87 ****
}
! char *osSelectInputFiles(char *title, char *filter)
{
char *buffer;
--- 82,86 ----
}
! char *osSelectInputFiles(char *title, char *filter, WindowHandle owner)
{
char *buffer;
***************
*** 93,97 ****
ofn.lStructSize = sizeof (OPENFILENAME);
! ofn.hwndOwner = ghWndFrame;
ofn.hInstance = NULL;
ofn.lpstrFilter = filter;
--- 92,96 ----
ofn.lStructSize = sizeof (OPENFILENAME);
! ofn.hwndOwner = owner ? owner : ghWndFrame;
ofn.hInstance = NULL;
ofn.lpstrFilter = filter;
***************
*** 159,163 ****
}
! char *osSelectOutputFile(char *title, char *filter, char *nameptr)
{
OPENFILENAME ofn;
--- 158,162 ----
}
! char *osSelectOutputFile(char *title, char *filter, char *nameptr, WindowHandle owner)
{
OPENFILENAME ofn;
***************
*** 167,171 ****
ofn.lStructSize = sizeof (OPENFILENAME);
! ofn.hwndOwner = ghWndFrame;
ofn.lpstrFilter = filter;
ofn.lpstrCustomFilter = NULL;
--- 166,170 ----
ofn.lStructSize = sizeof (OPENFILENAME);
! ofn.hwndOwner = owner ? owner : ghWndFrame;
ofn.lpstrFilter = filter;
ofn.lpstrCustomFilter = NULL;
Index: FontDialog.c
===================================================================
RCS file: /cvsroot/htoolkit/port/src/cbits/Win32/FontDialog.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** FontDialog.c 29 Mar 2003 08:12:18 -0000 1.2
--- FontDialog.c 26 Apr 2003 20:56:34 -0000 1.3
***************
*** 2,6 ****
#include "Internals.h"
! BOOL osRunFontDialog(char **fname, int *fsize, int *fweight, int *fstyle, BOOL *funderline, BOOL *fstrikeout)
{
CHOOSEFONT cf;
--- 2,6 ----
#include "Internals.h"
! BOOL osRunFontDialog(char **fname, int *fsize, int *fweight, int *fstyle, BOOL *funderline, BOOL *fstrikeout, WindowHandle owner)
{
CHOOSEFONT cf;
***************
*** 8,12 ****
cf.lStructSize = sizeof(cf);
! cf.hwndOwner = ghWndFrame;
cf.hDC = NULL;
cf.lpLogFont = &lf;
--- 8,12 ----
cf.lStructSize = sizeof(cf);
! cf.hwndOwner = owner ? owner : ghWndFrame;
cf.hDC = NULL;
cf.lpLogFont = &lf;
|
|
From: <kr_...@us...> - 2003-04-26 20:56:37
|
Update of /cvsroot/htoolkit/port/src/cbits/GTK
In directory sc8-pr-cvs1:/tmp/cvs-serv3345/port/src/cbits/GTK
Modified Files:
FileDialog.c
Log Message:
Add owner window as parameter for each function in CommonDialog
Index: FileDialog.c
===================================================================
RCS file: /cvsroot/htoolkit/port/src/cbits/GTK/FileDialog.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** FileDialog.c 26 Apr 2003 10:00:47 -0000 1.5
--- FileDialog.c 26 Apr 2003 20:56:33 -0000 1.6
***************
*** 2,9 ****
#include "Internals.h"
! char *osSelectDirectory(char *title)
{
GtkWidget *file_selector = gtk_file_selection_new(title);
! gtk_window_set_transient_for(GTK_WINDOW(file_selector), GTK_WINDOW(gFrameWidget));
for (;;)
--- 2,14 ----
#include "Internals.h"
! char *osSelectDirectory(char *title, WindowHandle owner)
{
GtkWidget *file_selector = gtk_file_selection_new(title);
!
! if (owner)
! owner = gtk_widget_get_toplevel(owner);
! else
! owner = gFrameWidget;
! gtk_window_set_transient_for(GTK_WINDOW(file_selector), GTK_WINDOW(owner));
for (;;)
***************
*** 39,46 ****
}
! char *osSelectInputFile(char *title, char *filter)
{
GtkWidget *file_selector = gtk_file_selection_new(title);
! gtk_window_set_transient_for(GTK_WINDOW(file_selector), GTK_WINDOW(gFrameWidget));
for (;;)
--- 44,56 ----
}
! char *osSelectInputFile(char *title, char *filter, WindowHandle owner)
{
GtkWidget *file_selector = gtk_file_selection_new(title);
!
! if (owner)
! owner = gtk_widget_get_toplevel(owner);
! else
! owner = gFrameWidget;
! gtk_window_set_transient_for(GTK_WINDOW(file_selector), GTK_WINDOW(owner));
for (;;)
***************
*** 90,97 ****
}
! char *osSelectInputFiles(char *title, char *filter)
{
GtkWidget *file_selector = gtk_file_selection_new(title);
! gtk_window_set_transient_for(GTK_WINDOW(file_selector), GTK_WINDOW(gFrameWidget));
gtk_file_selection_set_select_multiple(GTK_FILE_SELECTION(file_selector), gtk_true());
--- 100,112 ----
}
! char *osSelectInputFiles(char *title, char *filter, WindowHandle owner)
{
GtkWidget *file_selector = gtk_file_selection_new(title);
!
! if (owner)
! owner = gtk_widget_get_toplevel(owner);
! else
! owner = gFrameWidget;
! gtk_window_set_transient_for(GTK_WINDOW(file_selector), GTK_WINDOW(owner));
gtk_file_selection_set_select_multiple(GTK_FILE_SELECTION(file_selector), gtk_true());
***************
*** 167,174 ****
}
! char *osSelectOutputFile(char *title, char *filter, char *nameptr)
{
GtkWidget *file_selector = gtk_file_selection_new(title);
! gtk_window_set_transient_for(GTK_WINDOW(file_selector), GTK_WINDOW(gFrameWidget));
gtk_file_selection_set_filename(file_selector, nameptr);
--- 182,194 ----
}
! char *osSelectOutputFile(char *title, char *filter, char *nameptr, WindowHandle owner)
{
GtkWidget *file_selector = gtk_file_selection_new(title);
!
! if (owner)
! owner = gtk_widget_get_toplevel(owner);
! else
! owner = gFrameWidget;
! gtk_window_set_transient_for(GTK_WINDOW(file_selector), GTK_WINDOW(owner));
gtk_file_selection_set_filename(file_selector, nameptr);
|
|
From: <kr_...@us...> - 2003-04-26 20:56:36
|
Update of /cvsroot/htoolkit/port/src/Port
In directory sc8-pr-cvs1:/tmp/cvs-serv3345/port/src/Port
Modified Files:
CommonDialogs.hs
Log Message:
Add owner window as parameter for each function in CommonDialog
Index: CommonDialogs.hs
===================================================================
RCS file: /cvsroot/htoolkit/port/src/Port/CommonDialogs.hs,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** CommonDialogs.hs 26 Apr 2003 20:19:31 -0000 1.1
--- CommonDialogs.hs 26 Apr 2003 20:56:33 -0000 1.2
***************
*** 30,67 ****
-- | Run a dialog to select an input file. Returns 'Nothing' when cancelled.
! runInputFileDialog :: String -> [(String,[String])] -> IO (Maybe FilePath)
! runInputFileDialog title filter
= withCString title $ \ctitle ->
withCFilter filter $ \cfilter ->
! do cin <- osSelectInputFile ctitle cfilter
maybeCString cin
! foreign import ccall osSelectInputFile :: CString -> Ptr CChar -> IO CString
-- | Run a dialog to select multiple input files. Returns empty list when canceled.
! runInputFilesDialog :: String -> [(String,[String])] -> IO [FilePath]
! runInputFilesDialog title filter
= withCString title $ \ctitle ->
withCFilter filter $ \cfilter ->
! do cin <- osSelectInputFiles ctitle cfilter
peekCStrings cin
! foreign import ccall osSelectInputFiles :: CString -> Ptr CChar -> IO (Ptr CChar)
-- | Run a dialog to select an output file. Takes both a dialog title and a
-- suggested filename as arguments. Returns 'Nothing' when cancelled.
! runOutputFileDialog :: String -> [(String,[String])] -> FilePath -> IO (Maybe FilePath)
! runOutputFileDialog title filter fname
= withCString title $ \ctitle ->
withCString fname $ \cname ->
withCFilter filter $ \cfilter ->
! do cout <- osSelectOutputFile ctitle cfilter cname
maybeCString cout
! foreign import ccall osSelectOutputFile :: CString -> Ptr CChar -> CString -> IO CString
-- | Runs a dialog to select a directory. Returns 'Nothing' when cancelled.
! runDirectoryDialog :: String -> IO (Maybe FilePath)
! runDirectoryDialog title
! = do cdir <- withCString title osSelectDirectory
maybeCString cdir
! foreign import ccall osSelectDirectory :: CString -> IO CString
maybeCString :: CString -> IO (Maybe String)
--- 30,68 ----
-- | Run a dialog to select an input file. Returns 'Nothing' when cancelled.
! runInputFileDialog :: String -> [(String,[String])] -> WindowHandle -> IO (Maybe FilePath)
! runInputFileDialog title filter owner
= withCString title $ \ctitle ->
withCFilter filter $ \cfilter ->
! do cin <- osSelectInputFile ctitle cfilter owner
maybeCString cin
! foreign import ccall osSelectInputFile :: CString -> Ptr CChar -> WindowHandle -> IO CString
-- | Run a dialog to select multiple input files. Returns empty list when canceled.
! runInputFilesDialog :: String -> [(String,[String])] -> WindowHandle -> IO [FilePath]
! runInputFilesDialog title filter owner
= withCString title $ \ctitle ->
withCFilter filter $ \cfilter ->
! do cin <- osSelectInputFiles ctitle cfilter owner
peekCStrings cin
! foreign import ccall osSelectInputFiles :: CString -> Ptr CChar -> WindowHandle -> IO (Ptr CChar)
-- | Run a dialog to select an output file. Takes both a dialog title and a
-- suggested filename as arguments. Returns 'Nothing' when cancelled.
! runOutputFileDialog :: String -> [(String,[String])] -> FilePath -> WindowHandle -> IO (Maybe FilePath)
! runOutputFileDialog title filter fname owner
= withCString title $ \ctitle ->
withCString fname $ \cname ->
withCFilter filter $ \cfilter ->
! do cout <- osSelectOutputFile ctitle cfilter cname owner
maybeCString cout
! foreign import ccall osSelectOutputFile :: CString -> Ptr CChar -> CString -> WindowHandle -> IO CString
-- | Runs a dialog to select a directory. Returns 'Nothing' when cancelled.
! runDirectoryDialog :: String -> WindowHandle -> IO (Maybe FilePath)
! runDirectoryDialog title owner
! = withCString title $ \ctitle ->
! do cdir <- osSelectDirectory ctitle owner
maybeCString cdir
! foreign import ccall osSelectDirectory :: CString -> WindowHandle -> IO CString
maybeCString :: CString -> IO (Maybe String)
***************
*** 101,107 ****
-- | Run a dialog to select a color. Returns 'Nothing' when cancelled.
! runColorDialog :: IO (Maybe Color)
! runColorDialog = alloca $ \cref -> do
! res <- osRunColorDialog cref
if res
then do
--- 102,108 ----
-- | Run a dialog to select a color. Returns 'Nothing' when cancelled.
! runColorDialog :: WindowHandle -> IO (Maybe Color)
! runColorDialog owner = alloca $ \cref -> do
! res <- osRunColorDialog cref owner
if res
then do
***************
*** 109,113 ****
return (Just (fromCColor c))
else return Nothing
! foreign import ccall osRunColorDialog :: Ptr CColor -> IO Bool
-----------------------------------------------------------------------------------------
--- 110,114 ----
return (Just (fromCColor c))
else return Nothing
! foreign import ccall osRunColorDialog :: Ptr CColor -> WindowHandle -> IO Bool
-----------------------------------------------------------------------------------------
***************
*** 116,121 ****
-- | Run a dialog to select a font. Returns 'Nothing' when cancelled.
! runFontDialog :: IO (Maybe FontDef)
! runFontDialog =
alloca $ \fnameref ->
alloca $ \fsizeref ->
--- 117,122 ----
-- | Run a dialog to select a font. Returns 'Nothing' when cancelled.
! runFontDialog :: WindowHandle -> IO (Maybe FontDef)
! runFontDialog owner =
alloca $ \fnameref ->
alloca $ \fsizeref ->
***************
*** 124,130 ****
alloca $ \funderlineref ->
alloca $ \fstrikeoutref -> do
! print 1
! res <- osRunFontDialog fnameref fsizeref fweightref fstyleref funderlineref fstrikeoutref
! print 2
if res
then do
--- 125,129 ----
alloca $ \funderlineref ->
alloca $ \fstrikeoutref -> do
! res <- osRunFontDialog fnameref fsizeref fweightref fstyleref funderlineref fstrikeoutref owner
if res
then do
***************
*** 139,142 ****
return (Just fontdef)
else return Nothing
! foreign import ccall osRunFontDialog :: Ptr CString -> Ptr CInt -> Ptr CInt -> Ptr CInt -> Ptr CBool -> Ptr CBool -> IO Bool
--- 138,141 ----
return (Just fontdef)
else return Nothing
! foreign import ccall osRunFontDialog :: Ptr CString -> Ptr CInt -> Ptr CInt -> Ptr CInt -> Ptr CBool -> Ptr CBool -> WindowHandle -> IO Bool
|
|
From: <kr_...@us...> - 2003-04-26 20:56:36
|
Update of /cvsroot/htoolkit/port/src
In directory sc8-pr-cvs1:/tmp/cvs-serv3345/port/src
Modified Files:
Port.hs
Log Message:
Add owner window as parameter for each function in CommonDialog
Index: Port.hs
===================================================================
RCS file: /cvsroot/htoolkit/port/src/Port.hs,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -d -r1.14 -r1.15
*** Port.hs 30 Mar 2003 18:49:07 -0000 1.14
--- Port.hs 26 Apr 2003 20:56:33 -0000 1.15
***************
*** 17,23 ****
module Graphics.UI.Port.Menu
, module Graphics.UI.Port.Window
! , module Graphics.UI.Port.FileDialog
! , module Graphics.UI.Port.ColorDialog
! , module Graphics.UI.Port.FontDialog
, module Graphics.UI.Port.Message
--- 17,21 ----
module Graphics.UI.Port.Menu
, module Graphics.UI.Port.Window
! , module Graphics.UI.Port.CommonDialogs
, module Graphics.UI.Port.Message
***************
*** 33,57 ****
, module Graphics.UI.Port.Timer
-- ** Fundamental
, module Graphics.UI.Port.Handlers
, module Graphics.UI.Port.Types
-
- -- * Process
- , module Graphics.UI.Port.Process
) where
! import Graphics.UI.Port.Handlers
! import Graphics.UI.Port.Bitmap
! import Graphics.UI.Port.Font
! import Graphics.UI.Port.Canvas
import Graphics.UI.Port.Controls
! import Graphics.UI.Port.Message
! import Graphics.UI.Port.FileDialog
! import Graphics.UI.Port.ColorDialog
! import Graphics.UI.Port.FontDialog
! import Graphics.UI.Port.Window
! import Graphics.UI.Port.Menu
import Graphics.UI.Port.Timer
--- 31,52 ----
, module Graphics.UI.Port.Timer
+ -- * Process
+ , module Graphics.UI.Port.Process
+
-- ** Fundamental
, module Graphics.UI.Port.Handlers
, module Graphics.UI.Port.Types
) where
! import Graphics.UI.Port.Menu
! import Graphics.UI.Port.Window
! import Graphics.UI.Port.CommonDialogs
! import Graphics.UI.Port.Message
import Graphics.UI.Port.Controls
! import Graphics.UI.Port.Canvas
! import Graphics.UI.Port.Font
! import Graphics.UI.Port.Bitmap
import Graphics.UI.Port.Timer
***************
*** 59,62 ****
--- 54,58 ----
import Graphics.UI.Port.Process
+ import Graphics.UI.Port.Handlers
import Graphics.UI.Port.Types hiding
( CColor, fromCColor, toCColor
|
|
From: <kr_...@us...> - 2003-04-26 20:56:36
|
Update of /cvsroot/htoolkit/port In directory sc8-pr-cvs1:/tmp/cvs-serv3345/port Modified Files: makefile Log Message: Add owner window as parameter for each function in CommonDialog Index: makefile =================================================================== RCS file: /cvsroot/htoolkit/port/makefile,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** makefile 23 Apr 2003 21:48:48 -0000 1.18 --- makefile 26 Apr 2003 20:56:33 -0000 1.19 *************** *** 38,42 **** Port/Bitmap.hs Port/Font.hs Port/Canvas.hs \ Port/Controls.hs \ ! Port/FileDialog.hs Port/ColorDialog.hs Port/FontDialog.hs \ Port/Menu.hs Port/Window.hs \ Port/Timer.hs Port/Process.hs \ --- 38,42 ---- Port/Bitmap.hs Port/Font.hs Port/Canvas.hs \ Port/Controls.hs \ ! Port/CommonDialogs.hs \ Port/Menu.hs Port/Window.hs \ Port/Timer.hs Port/Process.hs \ |
|
From: <kr_...@us...> - 2003-04-26 20:54:04
|
Update of /cvsroot/htoolkit/gio/src/Graphics/UI/GIO
In directory sc8-pr-cvs1:/tmp/cvs-serv2509/src/Graphics/UI/GIO
Modified Files:
Window.hs Controls.hs
Log Message:
Remove windowHandle attribute. Use exported hwindow function instead
Index: Window.hs
===================================================================
RCS file: /cvsroot/htoolkit/gio/src/Graphics/UI/GIO/Window.hs,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -d -r1.13 -r1.14
*** Window.hs 26 Apr 2003 20:03:05 -0000 1.13
--- Window.hs 26 Apr 2003 20:54:00 -0000 1.14
***************
*** 15,19 ****
, dialog, runDialog
-- * Internal
! , windowHandle
) where
--- 15,19 ----
, dialog, runDialog
-- * Internal
! , hwindow
) where
***************
*** 119,128 ****
title = newAttr (\w -> Lib.getWindowTitle (hwindow w))
(\w x -> Lib.setWindowTitle (hwindow w) x)
-
- -- | The window handle
- windowHandle :: Attr Window WindowHandle
- windowHandle
- = readAttr "windowHandle" (\w -> return (hwindow w))
-
-- | The view domain of the window. If it is larger than the current view size, scroll bars
--- 119,122 ----
Index: Controls.hs
===================================================================
RCS file: /cvsroot/htoolkit/gio/src/Graphics/UI/GIO/Controls.hs,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** Controls.hs 27 Mar 2003 13:36:20 -0000 1.9
--- Controls.hs 26 Apr 2003 20:54:00 -0000 1.10
***************
*** 45,52 ****
label :: [Prop Label] -> Window -> IO Label
label props w
! = do lab <- do hwnd <- get w windowHandle
! hlab <- Port.createLabel hwnd
lfont <- newVar Port.defaultFont
! return (Label hlab hwnd lfont)
set lab props
return lab
--- 45,51 ----
label :: [Prop Label] -> Window -> IO Label
label props w
! = do lab <- do hlab <- Port.createLabel (hwindow w)
lfont <- newVar Port.defaultFont
! return (Label hlab (hwindow w) lfont)
set lab props
return lab
***************
*** 82,89 ****
button :: [Prop Button] -> Window -> IO Button
button props w
! = do but <- do hwnd <- get w windowHandle
! hbut <- Port.createButton hwnd
bfont <- newVar Port.defaultFont
! return (Button hbut hwnd bfont)
set but props
return but
--- 81,87 ----
button :: [Prop Button] -> Window -> IO Button
button props w
! = do but <- do hbut <- Port.createButton (hwindow w)
bfont <- newVar Port.defaultFont
! return (Button hbut (hwindow w) bfont)
set but props
return but
***************
*** 124,131 ****
entry :: [Prop Entry] -> Window -> IO Entry
entry props w
! = do e <- do hwnd <- get w windowHandle
! hentry <- Port.createEdit hwnd
efont <- newVar Port.defaultFont
! return (Entry hentry hwnd efont)
set e props
return e
--- 122,128 ----
entry :: [Prop Entry] -> Window -> IO Entry
entry props w
! = do e <- do hentry <- Port.createEdit (hwindow w)
efont <- newVar Port.defaultFont
! return (Entry hentry (hwindow w) efont)
set e props
return e
***************
*** 171,178 ****
popup :: [Prop Popup] -> Window -> IO Popup
popup props w
! = do p <- do hwnd <- get w windowHandle
! hpop <- Port.createPopUp hwnd
pitems <- newVar []
! return (Popup hpop hwnd pitems)
set p [on command =: popupCommand p]
set p props
--- 168,174 ----
popup :: [Prop Popup] -> Window -> IO Popup
popup props w
! = do p <- do hpop <- Port.createPopUp (hwindow w)
pitems <- newVar []
! return (Popup hpop (hwindow w) pitems)
set p [on command =: popupCommand p]
set p props
***************
*** 235,241 ****
checkGroup items props w
= do cg <- do cs <- mapM (\(txt,c,cmd) -> check txt [checked =: c, on command =:: checkCommand cmd] w) items
- hwnd <- get w windowHandle
cglayout <- newVar vertical
! return (CheckGroup cs hwnd cglayout)
set cg props
cs <- get cg selection
--- 231,236 ----
checkGroup items props w
= do cg <- do cs <- mapM (\(txt,c,cmd) -> check txt [checked =: c, on command =:: checkCommand cmd] w) items
cglayout <- newVar vertical
! return (CheckGroup cs (hwindow w) cglayout)
set cg props
cs <- get cg selection
***************
*** 290,297 ****
radioGroup items props w
= do rg <- do rs <- mapM (\(first,(txt,cmd)) -> radioEx first txt [] w) (zip (True:repeat False) items)
- hwnd <- get w windowHandle
glayout <- newVar vertical
gselect <- newVar 0
! return (RadioGroup rs (map snd items) hwnd gselect glayout)
mapM_ (select rg) (zip [0..] (radios rg))
set rg [selected =: 0]
--- 285,291 ----
radioGroup items props w
= do rg <- do rs <- mapM (\(first,(txt,cmd)) -> radioEx first txt [] w) (zip (True:repeat False) items)
glayout <- newVar vertical
gselect <- newVar 0
! return (RadioGroup rs (map snd items) (hwindow w) gselect glayout)
mapM_ (select rg) (zip [0..] (radios rg))
set rg [selected =: 0]
***************
*** 345,351 ****
check :: String -> [Prop Check] -> Window -> IO Check
check txt props w
! = do c <- do hwnd <- get w windowHandle
! hcheck <- Port.createCheckBox hwnd txt
! return (Check hcheck hwnd)
set c props
return c
--- 339,344 ----
check :: String -> [Prop Check] -> Window -> IO Check
check txt props w
! = do c <- do hcheck <- Port.createCheckBox (hwindow w) txt
! return (Check hcheck (hwindow w))
set c props
return c
***************
*** 387,393 ****
radioEx :: Bool -> String -> [Prop Radio] -> Window -> IO Radio
radioEx first txt props w
! = do r <- do hwnd <- get w windowHandle
! hradio <- Port.createRadioBox hwnd first txt
! return (Radio hradio hwnd)
set r props
return r
--- 380,385 ----
radioEx :: Bool -> String -> [Prop Radio] -> Window -> IO Radio
radioEx first txt props w
! = do r <- do hradio <- Port.createRadioBox (hwindow w) first txt
! return (Radio hradio (hwindow w))
set r props
return r
***************
*** 438,444 ****
hslider :: [Prop Slider] -> Window -> IO Slider
hslider props w
! = do r <- do hwnd <- get w windowHandle
! shandle <- Port.createHorzSlider hwnd
! return (Slider shandle hwnd)
set r props
return r
--- 430,435 ----
hslider :: [Prop Slider] -> Window -> IO Slider
hslider props w
! = do r <- do shandle <- Port.createHorzSlider (hwindow w)
! return (Slider shandle (hwindow w))
set r props
return r
***************
*** 447,453 ****
vslider :: [Prop Slider] -> Window -> IO Slider
vslider props w
! = do r <- do hwnd <- get w windowHandle
! shandle <- Port.createVertSlider hwnd
! return (Slider shandle hwnd)
set r props
return r
--- 438,443 ----
vslider :: [Prop Slider] -> Window -> IO Slider
vslider props w
! = do r <- do shandle <- Port.createVertSlider (hwindow w)
! return (Slider shandle (hwindow w))
set r props
return r
***************
*** 485,493 ****
hProgressBar :: Bool -> [Prop ProgressBar] -> Window -> IO ProgressBar
hProgressBar smooth props w
! = do r <- do hwnd <- get w windowHandle
! pbhandle <- Port.createHorzProgressBar hwnd smooth
pbrange <- newVar (0,100)
Port.setProgressBarFraction pbhandle 0 100 0
! return (ProgressBar pbhandle hwnd pbrange)
set r props
return r
--- 475,482 ----
hProgressBar :: Bool -> [Prop ProgressBar] -> Window -> IO ProgressBar
hProgressBar smooth props w
! = do r <- do pbhandle <- Port.createHorzProgressBar (hwindow w) smooth
pbrange <- newVar (0,100)
Port.setProgressBarFraction pbhandle 0 100 0
! return (ProgressBar pbhandle (hwindow w) pbrange)
set r props
return r
***************
*** 497,505 ****
vProgressBar :: Bool -> [Prop ProgressBar] -> Window -> IO ProgressBar
vProgressBar smooth props w
! = do r <- do hwnd <- get w windowHandle
! pbhandle <- Port.createVertProgressBar hwnd smooth
pbrange <- newVar (0,100)
Port.setProgressBarFraction pbhandle 0 100 0
! return (ProgressBar pbhandle hwnd pbrange)
set r props
return r
--- 486,493 ----
vProgressBar :: Bool -> [Prop ProgressBar] -> Window -> IO ProgressBar
vProgressBar smooth props w
! = do r <- do pbhandle <- Port.createVertProgressBar (hwindow w) smooth
pbrange <- newVar (0,100)
Port.setProgressBarFraction pbhandle 0 100 0
! return (ProgressBar pbhandle (hwindow w) pbrange)
set r props
return r
|