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-08-31 08:09:03
|
Update of /cvsroot/htoolkit/port
In directory sc8-pr-cvs1:/tmp/cvs-serv28152
Modified Files:
configure
Log Message:
Implement osSetNotebookPageBitmap function for GNOME
Index: configure
===================================================================
RCS file: /cvsroot/htoolkit/port/configure,v
retrieving revision 1.18
retrieving revision 1.19
diff -C2 -d -r1.18 -r1.19
*** configure 13 Aug 2003 20:20:08 -0000 1.18
--- configure 31 Aug 2003 08:09:00 -0000 1.19
***************
*** 1,318 ****
! #!/bin/sh
- #------------------------------------------------------------------------
- # Port: the portable haskell GUI abstraction.
#
! # Daan Leijen & Krasimir Angelov
! #------------------------------------------------------------------------
! # $Id$
[...3354 lines suppressed...]
! ac_config_status_args=
! test "$silent" = yes &&
! ac_config_status_args="$ac_config_status_args --quiet"
! exec 5>/dev/null
! $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
! exec 5>>config.log
! # Use ||, not &&, to avoid exiting from the if with $? = 1, which
! # would make configure fail if this is the last instruction.
! $ac_cs_success || { (exit 1); exit 1; }
! fi
!
!
! echo "creating output directories:"
! echo " - build/cbits/$TARGET"
! mkdir -p build/cbits build/cbits/$TARGET
! echo " - build/Graphics/UI/Port"
! mkdir -p build build/Graphics build/Graphics/UI build/Graphics/UI/Port
echo "done -- type 'make' to build the package."
|
|
From: <kr_...@us...> - 2003-08-31 08:09:03
|
Update of /cvsroot/htoolkit/port/src/cbits/GTK
In directory sc8-pr-cvs1:/tmp/cvs-serv28152/src/cbits/GTK
Modified Files:
Notebook.c
Log Message:
Implement osSetNotebookPageBitmap function for GNOME
Index: Notebook.c
===================================================================
RCS file: /cvsroot/htoolkit/port/src/cbits/GTK/Notebook.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** Notebook.c 25 Aug 2003 23:20:52 -0000 1.1
--- Notebook.c 31 Aug 2003 08:09:00 -0000 1.2
***************
*** 89,92 ****
--- 89,93 ----
WindowHandle osInsertNotebookPage(WindowHandle notebook, int pos)
{
+ GtkWidget *hbox;
GtkWidget *page = gtk_scrolled_window_new (NULL, NULL);
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW(page),
***************
*** 98,105 ****
gtk_widget_show_all(page);
if (pos < 0)
! gtk_notebook_append_page(GTK_NOTEBOOK(notebook),page,gtk_label_new(""));
else
! gtk_notebook_insert_page(GTK_NOTEBOOK(notebook),page,gtk_label_new(""),pos);
return page;
}
--- 99,110 ----
gtk_widget_show_all(page);
+ hbox = gtk_hbox_new(FALSE, 1);
+ gtk_box_pack_end(GTK_BOX(hbox), gtk_label_new(""), TRUE, TRUE, 0);
+ gtk_widget_show_all(hbox);
+
if (pos < 0)
! gtk_notebook_append_page(GTK_NOTEBOOK(notebook),page,hbox);
else
! gtk_notebook_insert_page(GTK_NOTEBOOK(notebook),page,hbox,pos);
return page;
}
***************
*** 107,118 ****
char *osGetNotebookPageTitle(WindowHandle page)
{
! GtkWidget *label = gtk_notebook_get_tab_label(GTK_NOTEBOOK(gtk_widget_get_parent(page)),page);
! return strdup(gtk_label_get_text(GTK_LABEL(label)));
};
void osSetNotebookPageTitle(WindowHandle page, char *txt)
{
! GtkWidget *label = gtk_notebook_get_tab_label(GTK_NOTEBOOK(gtk_widget_get_parent(page)),page);
! return gtk_label_set_text(GTK_LABEL(label), txt);
};
--- 112,135 ----
char *osGetNotebookPageTitle(WindowHandle page)
{
! GList *children;
! GtkWidget *notebook, *tab_label;
!
! notebook = gtk_widget_get_parent(page);
! tab_label = gtk_notebook_get_tab_label(GTK_NOTEBOOK(notebook),page);
! children = gtk_container_get_children(GTK_CONTAINER(tab_label));
!
! return strdup(gtk_label_get_text(GTK_LABEL(g_list_last(children)->data)));
};
void osSetNotebookPageTitle(WindowHandle page, char *txt)
{
! GList *children;
! GtkWidget *notebook, *tab_label;
!
! notebook = gtk_widget_get_parent(page);
! tab_label = gtk_notebook_get_tab_label(GTK_NOTEBOOK(notebook),page);
! children = gtk_container_get_children(GTK_CONTAINER(tab_label));
!
! return gtk_label_set_text(GTK_LABEL(g_list_last(children)->data), txt);
};
***************
*** 131,133 ****
--- 148,184 ----
res[0] = page->allocation.width-4;
res[1] = page->allocation.height-4;
+ }
+
+ void osSetNotebookPageBitmap(WindowHandle page, BitmapHandle bitmap)
+ {
+ GList *children;
+ GtkWidget *notebook, *tab_label, *image;
+
+ notebook = GTK_NOTEBOOK(gtk_widget_get_parent(page));
+ tab_label = gtk_notebook_get_tab_label(notebook,page);
+ children = gtk_container_get_children(GTK_CONTAINER(tab_label));
+
+ if (bitmap)
+ {
+ if (g_list_length(children) == 1)
+ {
+ image = gtk_image_new();
+ gtk_box_pack_start(GTK_BOX(tab_label), image, TRUE, TRUE, 0);
+ gtk_widget_show(image);
+ }
+ else
+ {
+ image = GTK_WIDGET(g_list_first(children)->data);
+ }
+
+ gtk_image_set_from_pixbuf(image, bitmap->pixbuf);
+ }
+ else
+ {
+ if (g_list_length(children) == 2)
+ {
+ image = GTK_WIDGET(g_list_first(children)->data);
+ gtk_container_remove(GTK_CONTAINER(tab_label), image);
+ }
+ }
}
|
|
From: <kr_...@us...> - 2003-08-30 23:58:05
|
Update of /cvsroot/htoolkit/port
In directory sc8-pr-cvs1:/tmp/cvs-serv6256
Added Files:
configure.ac
Removed Files:
configure.in
Log Message:
Rename configure.in to configure.ac
--- NEW FILE: configure.ac ---
AC_INIT([HToolkit],[1.0],[ka2...@ya...],[htoolkit])
AC_CONFIG_FILES([config.mk:config.mk.in port.pkg:port.pkg.in])
AC_CONFIG_HEADERS([src/include/config.h:config.h.in])
AC_CANONICAL_SYSTEM
dnl ***********************************************
dnl GCC
dnl ***********************************************
AC_ARG_WITH(gcc,
[ --with-gcc=<gcc command>
Use a different command instead of 'gcc' for the GNU C compiler.
],
[CC="$withval"],
[AC_PATH_PROG(CC,gcc)]
)
dnl ** Must have GCC to build Port
if test "$CC" = ""; then
AC_MSG_ERROR([GCC is required to build Port.])
fi;
AC_SUBST(CC)
dnl ***********************************************
dnl GHC
dnl ***********************************************
AC_ARG_WITH(ghc,
[ --with-ghc=<ghc command>
Use a different command instead of 'ghc' for the Haskell compiler.
],
[HC="$withval"],
[AC_PATH_PROG(HC,ghc)]
)
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)
AC_SUBST(LIBDIR)
dnl ***********************************************
dnl ghc-pkg
dnl ***********************************************
AC_ARG_WITH(pkg,
[ --with-pkg=<ghc-pkg command>
Use a different command instead of 'ghc-pkg' for the package compiler.
],
[HCPKG="$withval"],
[AC_PATH_PROG(HCPKG,ghc-pkg)]
)
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)
dnl ***********************************************
dnl haddock
dnl ***********************************************
AC_ARG_WITH(haddock,
[ --with-haddock=<haddock command>
Use a different command instead of 'ghc-pkg' for the Haskell documentation tool.
],
[HDOC="$withval"],
[AC_PATH_PROG(HDOC,haddock)]
)
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
AC_SUBST(HDOC)
AC_SUBST(HDOCHTML)
AC_SUBST(HDOCLIBS)
dnl ***********************************************
dnl SSHUSER
dnl ***********************************************
AC_ARG_WITH(sshuser,
[ --with-sshuser=<user name>
Use a different user name for SSH access to HToolkit website.
],
[SSHUSER="$withval"],
[SSHUSER=$USERNAME]
)
AC_MSG_RESULT([user name for ssh... $SSHUSER])
AC_SUBST(SSHUSER)
dnl ***********************************************
dnl AR
dnl ***********************************************
AC_PATH_PROG(AR,ar)
if test "$AR" = ""; then
AC_MSG_ERROR([ar is required to build Port.])
fi;
AC_SUBST(AR)
dnl ***********************************************
dnl Enable/Disable DEBUG
dnl ***********************************************
AC_ARG_ENABLE(debug,
[ --enable-debug
Enable/Disable debuging.
],
[DEBUG=YES
AC_DEFINE(DEBUG)],
[DEBUG=NO]
)
AC_SUBST(DEBUG)
# check host
CCOPTIONS=""
EXE=""
DLL=".so"
case $ac_cv_target_alias in
*-*-cygwin*)
CCOPTIONS="-Wall -mno-cygwin"
EXE=".exe"
DLL=".dll"
TARGET="WIN32"
AC_DEFINE(WIN32_TARGET);;
*-*-mingw*|gcc*,*-*-windows*)
EXE=".exe"
DLL=".dll"
TARGET="WIN32"
AC_DEFINE(WIN32_TARGET);;
*)
TARGET="GTK"
AC_DEFINE(GTK_TARGET);;
esac
AC_MSG_RESULT([gui library... $TARGET])
clibs=""
cincflags=""
case "$TARGET" in
WIN32*) clibs="-luser32 -lgdi32 -lkernel32 -lcomctl32 -lcomdlg32 -lshell32 -lwinmm -lwinspool -lole32 -ladvapi32";;
GTK*) AC_PATH_PROG(PKGCONFIG,pkg-config)
if test "$PKGCONFIG" = ""; then
AC_MSG_ERROR([you need to have the 'pkg-config' tool in your PATH
please check your GTK documentation])
fi;
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`;;
*) echo "warning:"
echo " unknown gui-library specified: $TARGET"
echo " use the -gui option to specify another gui-library"
echo " for example: ./configure -gui WIN32"
exit 2;;
esac
# get current directory
CURDIR="`echo $(pwd) | sed -e 's%^/cygdrive/\(.\)/%\1:/%'`"
AC_SUBST(TARGET)
AC_SUBST(CCOPTIONS)
AC_SUBST(EXE)
AC_SUBST(DLL)
AC_SUBST(CURDIR)
dnl ***********************************************
dnl EXTRALIBS, EXTRALIBDIRS
dnl ***********************************************
# create list of extra c libraries needed, comma seperated and quoted.
# expects $clibs to be in the form: -llib1 -llib2 ... -L/dir/foo -L/bar
# note: $EXTRALIBDIRS always starts with a ','
EXTRALIBS=""
EXTRALIBDIRS=""
CLIBOPTS=""
for lib in $clibs; do
case $lib in
-l*) if test -z "$EXTRALIBS"; then
EXTRALIBS="`echo $lib | sed -e 's|-l|\"|'`"
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
# append a final double-quote
if test ! -z "$EXTRALIBS"; then
EXTRALIBS="$EXTRALIBS\""
fi
if test ! -z "$EXTRALIBDIRS"; then
EXTRALIBDIRS="$EXTRALIBDIRS\""
fi
AC_SUBST(EXTRALIBS)
AC_SUBST(EXTRALIBDIRS)
AC_SUBST(CLIBOPTS)
dnl ***********************************************
dnl CINCFLAGS, INCDIRS
dnl ***********************************************
# create list of extra include directories needed, comma seperated and quoted.
# expects $cincflags to be in the form: -Idir1 -Idir2 ...
INCDIRS="\"$LIBDIR/include\""
incopts=""
for flag in $cincflags; do
case $flag in
-I*) INCDIRS="$INCDIRS`echo $flag | sed -e 's|-I|, \"|'`\""
incopts="$incopts $flag"
esac
done
CINCFLAGS="$incopts -I$LIBDIR/include"
AC_SUBST(CINCFLAGS)
AC_SUBST(INCDIRS)
dnl ***********************************************
dnl Create directories and output files
dnl ***********************************************
AC_OUTPUT
echo "creating output directories:"
echo " - build/cbits/$TARGET"
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 ***********************************************
dnl Done
dnl ***********************************************
echo "done -- type 'make' to build the package."
--- configure.in DELETED ---
|
|
From: <kr_...@us...> - 2003-08-30 22:59:46
|
Update of /cvsroot/htoolkit/port
In directory sc8-pr-cvs1:/tmp/cvs-serv28848
Modified Files:
makefile
Added Files:
config.h.in config.mk.in configure.in install-sh port.pkg.in
Log Message:
New configuration script. Autoconf generated
--- NEW FILE: config.h.in ---
#undef WIN32_TARGET
#undef GTK_TARGET
#undef DEBUG
--- NEW FILE: config.mk.in ---
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@
--- NEW FILE: configure.in ---
AC_INIT([HToolkit],[1.0],[ka2...@ya...],[htoolkit])
AC_CONFIG_FILES([config.mk:config.mk.in port.pkg:port.pkg.in])
AC_CONFIG_HEADERS([src/include/config.h:config.h.in])
AC_CANONICAL_SYSTEM
dnl ***********************************************
dnl GCC
dnl ***********************************************
AC_ARG_WITH(gcc,
[ --with-gcc=<gcc command>
Use a different command instead of 'gcc' for the GNU C compiler.
],
[CC="$withval"],
[AC_PATH_PROG(CC,gcc)]
)
dnl ** Must have GCC to build Port
if test "$CC" = ""; then
AC_MSG_ERROR([GCC is required to build Port.])
fi;
AC_SUBST(CC)
dnl ***********************************************
dnl GHC
dnl ***********************************************
AC_ARG_WITH(ghc,
[ --with-ghc=<ghc command>
Use a different command instead of 'ghc' for the Haskell compiler.
],
[HC="$withval"],
[AC_PATH_PROG(HC,ghc)]
)
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)
AC_SUBST(LIBDIR)
dnl ***********************************************
dnl ghc-pkg
dnl ***********************************************
AC_ARG_WITH(pkg,
[ --with-pkg=<ghc-pkg command>
Use a different command instead of 'ghc-pkg' for the package compiler.
],
[HCPKG="$withval"],
[AC_PATH_PROG(HCPKG,ghc-pkg)]
)
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)
dnl ***********************************************
dnl haddock
dnl ***********************************************
AC_ARG_WITH(haddock,
[ --with-haddock=<haddock command>
Use a different command instead of 'ghc-pkg' for the Haskell documentation tool.
],
[HDOC="$withval"],
[AC_PATH_PROG(HDOC,haddock)]
)
if test "$HDOC" = ""; then
AC_MSG_RESULT([Warning: You will not be able to build the documentation.])
hdocfound="no"
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
AC_SUBST(HDOC)
AC_SUBST(HDOCHTML)
AC_SUBST(HDOCLIBS)
dnl ***********************************************
dnl SSHUSER
dnl ***********************************************
AC_ARG_WITH(sshuser,
[ --with-sshuser=<user name>
Use a different user name for SSH access to HToolkit website.
],
[SSHUSER="$withval"],
[SSHUSER=$USERNAME]
)
AC_MSG_RESULT([user name for ssh... $SSHUSER])
AC_SUBST(SSHUSER)
dnl ***********************************************
dnl AR
dnl ***********************************************
AC_PATH_PROG(AR,ar)
if test "$AR" = ""; then
AC_MSG_ERROR([ar is required to build Port.])
fi;
AC_SUBST(AR)
dnl ***********************************************
dnl Enable/Disable DEBUG
dnl ***********************************************
AC_ARG_ENABLE(debug,
[ --enable-debug
Enable/Disable debuging.
],
[DEBUG=YES
AC_DEFINE(DEBUG)],
[DEBUG=NO]
)
AC_SUBST(DEBUG)
# check host
CCOPTIONS=""
EXE=""
DLL=".so"
case $ac_cv_target_alias in
*-*-cygwin*)
CCOPTIONS="-Wall -mno-cygwin"
EXE=".exe"
DLL=".dll"
TARGET="WIN32"
AC_DEFINE(WIN32_TARGET);;
*-*-mingw*|gcc*,*-*-windows*)
EXE=".exe"
DLL=".dll"
TARGET="WIN32"
AC_DEFINE(WIN32_TARGET);;
*)
TARGET="GTK"
AC_DEFINE(GTK_TARGET);;
esac
AC_MSG_RESULT([gui library... $TARGET])
clibs=""
cincflags=""
case "$TARGET" in
WIN32*) clibs="-luser32 -lgdi32 -lkernel32 -lcomctl32 -lcomdlg32 -lshell32 -lwinmm -lwinspool -lole32 -ladvapi32";;
GTK*) AC_PATH_PROG(PKGCONFIG,pkg-config)
if test "$PKGCONFIG" = ""; then
AC_MSG_ERROR([you need to have the 'pkg-config' tool in your PATH
please check your GTK documentation])
fi;
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`;;
*) echo "warning:"
echo " unknown gui-library specified: $TARGET"
echo " use the -gui option to specify another gui-library"
echo " for example: ./configure -gui WIN32"
exit 2;;
esac
# get current directory
CURDIR="`echo $(pwd) | sed -e 's%^/cygdrive/\(.\)/%\1:/%'`"
AC_SUBST(TARGET)
AC_SUBST(CCOPTIONS)
AC_SUBST(EXE)
AC_SUBST(DLL)
AC_SUBST(CURDIR)
dnl ***********************************************
dnl EXTRALIBS, EXTRALIBDIRS
dnl ***********************************************
# create list of extra c libraries needed, comma seperated and quoted.
# expects $clibs to be in the form: -llib1 -llib2 ... -L/dir/foo -L/bar
# note: $EXTRALIBDIRS always starts with a ','
EXTRALIBS=""
EXTRALIBDIRS=""
CLIBOPTS=""
for lib in $clibs; do
case $lib in
-l*) if test -z "$EXTRALIBS"; then
EXTRALIBS="`echo $lib | sed -e 's|-l|\"|'`"
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
# append a final double-quote
if test ! -z "$EXTRALIBS"; then
EXTRALIBS="$EXTRALIBS\""
fi
if test ! -z "$EXTRALIBDIRS"; then
EXTRALIBDIRS="$EXTRALIBDIRS\""
fi
AC_SUBST(EXTRALIBS)
AC_SUBST(EXTRALIBDIRS)
AC_SUBST(CLIBOPTS)
dnl ***********************************************
dnl CINCFLAGS, INCDIRS
dnl ***********************************************
# create list of extra include directories needed, comma seperated and quoted.
# expects $cincflags to be in the form: -Idir1 -Idir2 ...
echo $cincflags
INCDIRS=""
incopts=""
for flag in $cincflags; do
case $flag in
-I*) INCDIRS="$INCDIRS`echo $flag | sed -e 's|-I|, \"|'`\""
incopts="$incopts $flag"
esac
done
CINCFLAGS="$incopts -I$LIBDIR/include"
AC_SUBST(CINCFLAGS)
AC_SUBST(INCDIRS)
dnl ***********************************************
dnl Create directories and output files
dnl ***********************************************
AC_OUTPUT
echo "creating output directories:"
echo " - build/cbits/$TARGET"
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 ***********************************************
dnl Done
dnl ***********************************************
echo "done -- type 'make' to build the package."
--- NEW FILE: install-sh ---
#!/bin/sh
#
# install - install a program, script, or datafile
# This comes from X11R5.
#
# Calling this script install-sh is preferred over install.sh, to prevent
# `make' implicit rules from creating a file called install from it
# when there is no Makefile.
#
# This script is compatible with the BSD install script, but was written
# from scratch.
#
# set DOITPROG to echo to test this script
# Don't use :- since 4.3BSD and earlier shells don't like it.
doit="${DOITPROG-}"
# put in absolute paths if you don't have them in your path; or use env. vars.
mvprog="${MVPROG-mv}"
cpprog="${CPPROG-cp}"
chmodprog="${CHMODPROG-chmod}"
chownprog="${CHOWNPROG-chown}"
chgrpprog="${CHGRPPROG-chgrp}"
stripprog="${STRIPPROG-strip}"
rmprog="${RMPROG-rm}"
mkdirprog="${MKDIRPROG-mkdir}"
tranformbasename=""
transform_arg=""
instcmd="$mvprog"
chmodcmd="$chmodprog 0755"
chowncmd=""
chgrpcmd=""
stripcmd=""
rmcmd="$rmprog -f"
mvcmd="$mvprog"
src=""
dst=""
dir_arg=""
while [ x"$1" != x ]; do
case $1 in
-c) instcmd="$cpprog"
shift
continue;;
-d) dir_arg=true
shift
continue;;
-m) chmodcmd="$chmodprog $2"
shift
shift
continue;;
-o) chowncmd="$chownprog $2"
shift
shift
continue;;
-g) chgrpcmd="$chgrpprog $2"
shift
shift
continue;;
-s) stripcmd="$stripprog"
shift
continue;;
-t=*) transformarg=`echo $1 | sed 's/-t=//'`
shift
continue;;
-b=*) transformbasename=`echo $1 | sed 's/-b=//'`
shift
continue;;
*) if [ x"$src" = x ]
then
src=$1
else
# this colon is to work around a 386BSD /bin/sh bug
:
dst=$1
fi
shift
continue;;
esac
done
if [ x"$src" = x ]
then
echo "install: no input file specified"
exit 1
else
true
fi
if [ x"$dir_arg" != x ]; then
dst=$src
src=""
if [ -d $dst ]; then
instcmd=:
else
instcmd=mkdir
fi
else
# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
# might cause directories to be created, which would be especially bad
# if $src (and thus $dsttmp) contains '*'.
if [ -f $src -o -d $src ]
then
true
else
echo "install: $src does not exist"
exit 1
fi
if [ x"$dst" = x ]
then
echo "install: no destination specified"
exit 1
else
true
fi
# If destination is a directory, append the input filename; if your system
# does not like double slashes in filenames, you may need to add some logic
if [ -d $dst ]
then
dst="$dst"/`basename $src`
else
true
fi
fi
## this sed command emulates the dirname command
dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
# Make sure that the destination directory exists.
# this part is taken from Noah Friedman's mkinstalldirs script
# Skip lots of stat calls in the usual case.
if [ ! -d "$dstdir" ]; then
defaultIFS='
'
IFS="${IFS-${defaultIFS}}"
oIFS="${IFS}"
# Some sh's can't handle IFS=/ for some reason.
IFS='%'
set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'`
IFS="${oIFS}"
pathcomp=''
while [ $# -ne 0 ] ; do
pathcomp="${pathcomp}${1}"
shift
if [ ! -d "${pathcomp}" ] ;
then
$mkdirprog "${pathcomp}"
else
true
fi
pathcomp="${pathcomp}/"
done
fi
if [ x"$dir_arg" != x ]
then
$doit $instcmd $dst &&
if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi &&
if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi &&
if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi &&
if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi
else
# If we're going to rename the final executable, determine the name now.
if [ x"$transformarg" = x ]
then
dstfile=`basename $dst`
else
dstfile=`basename $dst $transformbasename |
sed $transformarg`$transformbasename
fi
# don't allow the sed command to completely eliminate the filename
if [ x"$dstfile" = x ]
then
dstfile=`basename $dst`
else
true
fi
# Make a temp file name in the proper directory.
dsttmp=$dstdir/#inst.$$#
# Move or copy the file name to the temp name
$doit $instcmd $src $dsttmp &&
trap "rm -f ${dsttmp}" 0 &&
# and set any options; do chmod last to preserve setuid bits
# If any of these fail, we abort the whole thing. If we want to
# ignore errors from any of these, just make sure not to ignore
# errors from the above "$doit $instcmd $src $dsttmp" command.
if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi &&
if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi &&
if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi &&
if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi &&
# Now rename the file to the real destination.
$doit $rmcmd -f $dstdir/$dstfile &&
$doit $mvcmd $dsttmp $dstdir/$dstfile
fi &&
exit 0
--- NEW FILE: port.pkg.in ---
Package
{ name="port"
, auto=True
, import_dirs=["$libdir/imports"]
, library_dirs=["@LIBDIR@" @EXTRALIBDIRS@]
, hs_libraries=["HSport"]
, extra_libraries=[@EXTRALIBS@]
, package_deps=[]
, include_dirs = [@INCDIRS@]
, c_includes = ["HsPort.h"]
}
Index: makefile
===================================================================
RCS file: /cvsroot/htoolkit/port/makefile,v
retrieving revision 1.36
retrieving revision 1.37
diff -C2 -d -r1.36 -r1.37
*** makefile 27 Aug 2003 08:22:12 -0000 1.36
--- makefile 30 Aug 2003 22:59:42 -0000 1.37
***************
*** 19,23 ****
# system dependent stuff
! -include config/config.mk
#--------------------------------------------------------------------------
--- 19,23 ----
# system dependent stuff
! -include config.mk
#--------------------------------------------------------------------------
***************
*** 57,61 ****
# package description
! PKG = config/$(MAIN).pkg
#--------------------------------------------------------------------------
--- 57,61 ----
# package description
! PKG = $(MAIN).pkg
#--------------------------------------------------------------------------
***************
*** 87,91 ****
HC-OPTIONS = -O2
! CC-OPTIONS = -O2
ifdef HDOCHTML
--- 87,91 ----
HC-OPTIONS = -O2
! CC-OPTIONS = -O2 -Wall $(CCOPTIONS)
ifdef HDOCHTML
|
|
From: <kr_...@us...> - 2003-08-30 22:57:50
|
Update of /cvsroot/htoolkit/port/src/include In directory sc8-pr-cvs1:/tmp/cvs-serv28624/port/src/include Modified Files: Notebook.h Log Message: Add support for icons in Notebook Index: Notebook.h =================================================================== RCS file: /cvsroot/htoolkit/port/src/include/Notebook.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Notebook.h 24 Aug 2003 13:57:34 -0000 1.1 --- Notebook.h 30 Aug 2003 22:57:47 -0000 1.2 *************** *** 16,19 **** --- 16,20 ---- void osDestroyNotebookPage(WindowHandle window); void osGetNotebookPageSize(WindowHandle window, int *res); + void osSetNotebookPageBitmap(WindowHandle window, BitmapHandle bitmap); #endif |
|
From: <kr_...@us...> - 2003-08-30 22:57:50
|
Update of /cvsroot/htoolkit/port/src/cbits/Win32
In directory sc8-pr-cvs1:/tmp/cvs-serv28624/port/src/cbits/Win32
Modified Files:
Notebook.c
Log Message:
Add support for icons in Notebook
Index: Notebook.c
===================================================================
RCS file: /cvsroot/htoolkit/port/src/cbits/Win32/Notebook.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** Notebook.c 24 Aug 2003 14:39:00 -0000 1.2
--- Notebook.c 30 Aug 2003 22:57:46 -0000 1.3
***************
*** 30,33 ****
--- 30,35 ----
LRESULT CALLBACK HNotebookFunction(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
+ LRESULT lResult;
+
switch (uMsg)
{
***************
*** 65,69 ****
}
! return CallWindowProc(DefTabCtrlProc, hWnd, uMsg, wParam, lParam);
}
--- 67,84 ----
}
! lResult = CallWindowProc(DefTabCtrlProc, hWnd, uMsg, wParam, lParam);
!
! switch (uMsg)
! {
! case WM_CREATE:
! if (lResult >= 0)
! {
! HIMAGELIST hImageList = ImageList_Create(15, 15, ILC_COLOR, 0, 1);
! SendMessage(hWnd, TCM_SETIMAGELIST, 0, (LPARAM) hImageList);
! }
! break;
! }
!
! return lResult;
}
***************
*** 251,253 ****
res[0] = rect.right-rect.left;
res[1] = rect.bottom-rect.top;
! }
\ No newline at end of file
--- 266,333 ----
res[0] = rect.right-rect.left;
res[1] = rect.bottom-rect.top;
! }
!
! void osSetNotebookPageBitmap(WindowHandle window, BitmapHandle bitmap)
! {
! TCITEM item;
! int i, nPos, nImage, nCount;
! HWND hNotebook = GetParent(window);
!
! // find the page position and an index of the old bitmap
! nPos = -1;
! nImage = -1;
! nCount = SendMessage(hNotebook, TCM_GETITEMCOUNT, 0, 0);
! for (i = 0; i < nCount; i++)
! {
! item.mask = TCIF_PARAM | TCIF_IMAGE;
! SendMessage(hNotebook, TCM_GETITEM, i, (LPARAM) &item);
!
! if (((HWND) item.lParam) == window)
! {
! nPos = i;
! nImage = item.iImage;
! break;
! }
! }
!
! // return if the page is not found
! if (nPos < 0)
! return;
!
! if (nImage > 0)
! {
! // remove old bitmap
!
! BOOL bUsed = FALSE;
! for (i = 0; i < nCount; i++)
! {
! item.mask = TCIF_PARAM | TCIF_IMAGE;
! SendMessage(hNotebook, TCM_GETITEM, i, (LPARAM) &item);
!
! if (((HWND) item.lParam) != window && item.iImage == nImage)
! {
! bUsed = TRUE;
! break;
! }
! }
!
! if (!bUsed)
! SendMessage(hNotebook, TCM_REMOVEIMAGE, nImage, 0);
! }
!
! // set new bitmap
! if (bitmap)
! {
! 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);
! }
|
|
From: <kr_...@us...> - 2003-08-30 22:57:50
|
Update of /cvsroot/htoolkit/port/src/Port
In directory sc8-pr-cvs1:/tmp/cvs-serv28624/port/src/Port
Modified Files:
Controls.hs Handlers.hs
Log Message:
Add support for icons in Notebook
Index: Controls.hs
===================================================================
RCS file: /cvsroot/htoolkit/port/src/Port/Controls.hs,v
retrieving revision 1.19
retrieving revision 1.20
diff -C2 -d -r1.19 -r1.20
*** Controls.hs 24 Aug 2003 13:57:34 -0000 1.19
--- Controls.hs 30 Aug 2003 22:57:46 -0000 1.20
***************
*** 95,99 ****
-- * NotebookPage
, insertNotebookPage
! , getNotebookPageTitle, setNotebookPageTitle
, getNotebookPagePos
, destroyNotebookPage
--- 95,100 ----
-- * NotebookPage
, insertNotebookPage
! , getNotebookPageTitle, setNotebookPageTitle
! , getNotebookPageBitmap, setNotebookPageBitmap
, getNotebookPagePos
, destroyNotebookPage
***************
*** 103,109 ****
import Foreign
import Foreign.C
import Graphics.UI.Port.Types
import Graphics.UI.Port.Handlers -- just for haddock
! import Data.Maybe(fromMaybe)
-----------------------------------------------------------------------------------------
--- 104,112 ----
import Foreign
import Foreign.C
+ import Control.Concurrent.MVar
+ import Data.Maybe(fromMaybe)
import Graphics.UI.Port.Types
import Graphics.UI.Port.Handlers -- just for haddock
! import Graphics.UI.Port.PtrMap as PtrMap
-----------------------------------------------------------------------------------------
***************
*** 500,501 ****
--- 503,520 ----
getNotebookPageSize hwnd = withCSizeResult (osGetNotebookPageSize hwnd)
foreign import ccall osGetNotebookPageSize :: WindowHandle -> Ptr CInt -> IO ()
+
+ setNotebookPageBitmap :: WindowHandle -> Maybe Bitmap -> IO ()
+ setNotebookPageBitmap hwnd (Just bmp) = do
+ map <- takeMVar windowBitmaps
+ withCBitmap bmp (osSetNotebookPageBitmap hwnd)
+ putMVar windowBitmaps (insert hwnd bmp map)
+ setNotebookPageBitmap hwnd Nothing = do
+ map <- takeMVar windowBitmaps
+ osSetNotebookPageBitmap hwnd nullPtr
+ putMVar windowBitmaps (delete hwnd map)
+ foreign import ccall osSetNotebookPageBitmap :: WindowHandle -> BitmapHandle -> IO ()
+
+ getNotebookPageBitmap :: WindowHandle -> IO (Maybe Bitmap)
+ getNotebookPageBitmap hwnd = do
+ map <- readMVar windowBitmaps
+ return (PtrMap.lookup hwnd map)
Index: Handlers.hs
===================================================================
RCS file: /cvsroot/htoolkit/port/src/Port/Handlers.hs,v
retrieving revision 1.28
retrieving revision 1.29
diff -C2 -d -r1.28 -r1.29
*** Handlers.hs 25 Aug 2003 17:35:49 -0000 1.28
--- Handlers.hs 30 Aug 2003 22:57:46 -0000 1.29
***************
*** 60,71 ****
,setMenuUpdateHandler, setMenuUpdateDefHandler, getMenuUpdateHandler
,setMenuDestroyHandler, setMenuDestroyDefHandler, getMenuDestroyHandler
! -- ** Internals
! ,menuBitmaps
!
-- * ToolBar events
,setToolCommandHandler, setToolCommandDefHandler, getToolCommandHandler
,setToolDestroyHandler, setToolDestroyDefHandler, getToolDestroyHandler
-- ** Internals
! ,toolBitmaps
) where
--- 60,70 ----
,setMenuUpdateHandler, setMenuUpdateDefHandler, getMenuUpdateHandler
,setMenuDestroyHandler, setMenuDestroyDefHandler, getMenuDestroyHandler
!
-- * ToolBar events
,setToolCommandHandler, setToolCommandDefHandler, getToolCommandHandler
,setToolDestroyHandler, setToolDestroyDefHandler, getToolDestroyHandler
+
-- ** Internals
! ,toolBitmaps, menuBitmaps, windowBitmaps
) where
***************
*** 167,170 ****
--- 166,173 ----
= unsafePerformIO (newMVar empty)
+ {-# NOINLINE windowBitmaps #-}
+ windowBitmaps :: MVar (PtrMap WindowHandle Bitmap)
+ windowBitmaps = unsafePerformIO (newMVar empty)
+
setWindowDestroyHandler :: WindowHandle -> IO () -> IO ()
setWindowDestroyHandler hwnd handler
***************
*** 189,192 ****
--- 192,197 ----
Nothing -> return ()
Just io -> safeio io
+ map <- takeMVar windowBitmaps
+ putMVar windowBitmaps (delete hwnd map)
unregisterWindow hwnd
|
|
From: <kr_...@us...> - 2003-08-30 22:57:50
|
Update of /cvsroot/htoolkit/gio/src/Graphics/UI/GIO
In directory sc8-pr-cvs1:/tmp/cvs-serv28624/gio/src/Graphics/UI/GIO
Modified Files:
Controls.hs
Log Message:
Add support for icons in Notebook
Index: Controls.hs
===================================================================
RCS file: /cvsroot/htoolkit/gio/src/Graphics/UI/GIO/Controls.hs,v
retrieving revision 1.28
retrieving revision 1.29
diff -C2 -d -r1.28 -r1.29
*** Controls.hs 26 Aug 2003 21:23:52 -0000 1.28
--- Controls.hs 30 Aug 2003 22:57:46 -0000 1.29
***************
*** 790,791 ****
--- 790,794 ----
destroyWidget w = Port.destroyNotebookPage (pghandle w)
destroy = newStdEvent pghandle Port.getWindowDestroyHandler Port.setWindowDestroyHandler Port.setWindowDestroyDefHandler
+
+ instance HasIcon NotebookPage where
+ icon = newStdAttr pghandle Port.getNotebookPageBitmap Port.setNotebookPageBitmap
|
|
From: <kr_...@us...> - 2003-08-27 08:27:49
|
Update of /cvsroot/htoolkit/port/src/cbits/Win32 In directory sc8-pr-cvs1:/tmp/cvs-serv25575/src/cbits/Win32 Modified Files: AboutDialog.c Log Message: Add explicit cast in order to make GCC happy Index: AboutDialog.c =================================================================== RCS file: /cvsroot/htoolkit/port/src/cbits/Win32/AboutDialog.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** AboutDialog.c 23 Jul 2003 16:25:21 -0000 1.2 --- AboutDialog.c 27 Aug 2003 08:27:46 -0000 1.3 *************** *** 405,409 **** psh.pszCaption = "Details"; psh.nPages = nPageIndex; ! psh.ppsp = &psp; PropertySheet(&psh); --- 405,409 ---- psh.pszCaption = "Details"; psh.nPages = nPageIndex; ! psh.ppsp = (LPCPROPSHEETPAGE) &psp; PropertySheet(&psh); |
|
From: <kr_...@us...> - 2003-08-27 08:22:16
|
Update of /cvsroot/htoolkit/port/src/cbits/Win32 In directory sc8-pr-cvs1:/tmp/cvs-serv24830/src/cbits/Win32 Modified Files: ColorDialog.c DockBar.c DockBar.h Window.c Log Message: Add extra new lines Index: ColorDialog.c =================================================================== RCS file: /cvsroot/htoolkit/port/src/cbits/Win32/ColorDialog.c,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** ColorDialog.c 1 May 2003 20:27:39 -0000 1.4 --- ColorDialog.c 27 Aug 2003 08:22:13 -0000 1.5 *************** *** 24,26 **** *color = cc.rgbResult; return TRUE; ! } \ No newline at end of file --- 24,26 ---- *color = cc.rgbResult; return TRUE; ! } Index: DockBar.c =================================================================== RCS file: /cvsroot/htoolkit/port/src/cbits/Win32/DockBar.c,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** DockBar.c 17 Aug 2003 18:15:08 -0000 1.5 --- DockBar.c 27 Aug 2003 08:22:13 -0000 1.6 *************** *** 337,339 **** DestroyWindow(hDockBar); } ! } \ No newline at end of file --- 337,339 ---- DestroyWindow(hDockBar); } ! } Index: DockBar.h =================================================================== RCS file: /cvsroot/htoolkit/port/src/cbits/Win32/DockBar.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** DockBar.h 15 Aug 2003 20:48:21 -0000 1.2 --- DockBar.h 27 Aug 2003 08:22:13 -0000 1.3 *************** *** 10,12 **** void GetToolBarSize(HWND hToolBar, SIZE *pSize); ! #endif \ No newline at end of file --- 10,12 ---- void GetToolBarSize(HWND hToolBar, SIZE *pSize); ! #endif Index: Window.c =================================================================== RCS file: /cvsroot/htoolkit/port/src/cbits/Win32/Window.c,v retrieving revision 1.45 retrieving revision 1.46 diff -C2 -d -r1.45 -r1.46 *** Window.c 25 Aug 2003 17:35:50 -0000 1.45 --- Window.c 27 Aug 2003 08:22:13 -0000 1.46 *************** *** 1350,1352 **** } } ! } \ No newline at end of file --- 1350,1352 ---- } } ! } |
|
From: <kr_...@us...> - 2003-08-27 08:22:16
|
Update of /cvsroot/htoolkit/port In directory sc8-pr-cvs1:/tmp/cvs-serv24830 Modified Files: makefile Log Message: Add extra new lines Index: makefile =================================================================== RCS file: /cvsroot/htoolkit/port/makefile,v retrieving revision 1.35 retrieving revision 1.36 diff -C2 -d -r1.35 -r1.36 *** makefile 24 Aug 2003 13:57:33 -0000 1.35 --- makefile 27 Aug 2003 08:22:12 -0000 1.36 *************** *** 179,183 **** $(COBJS): $(COUTDIR)/%.c.o: %.c $(CC) -o $@ -c $< $(CC-OPTIONS) -MD $(INCDIRS) ! @mv $(*F).d $(COUTDIR)/$(*F).c.d #-------------------------------------------------------------------------- --- 179,184 ---- $(COBJS): $(COUTDIR)/%.c.o: %.c $(CC) -o $@ -c $< $(CC-OPTIONS) -MD $(INCDIRS) ! @#move dependendcy files only needed for gcc 2.xx ! @#@mv $(*F).d $(COUTDIR)/$(*F).c.d #-------------------------------------------------------------------------- |
|
From: <kr_...@us...> - 2003-08-27 08:16:57
|
Update of /cvsroot/htoolkit/port/src/cbits/Win32
In directory sc8-pr-cvs1:/tmp/cvs-serv23828/src/cbits/Win32
Modified Files:
Frame.c Util.c
Log Message:
Remove unused variables
Index: Frame.c
===================================================================
RCS file: /cvsroot/htoolkit/port/src/cbits/Win32/Frame.c,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -d -r1.15 -r1.16
*** Frame.c 24 Aug 2003 14:39:00 -0000 1.15
--- Frame.c 27 Aug 2003 08:16:53 -0000 1.16
***************
*** 46,50 ****
{
int nLen;
- LOGFONT lf;
pData = (FrameData *) malloc(sizeof(FrameData));
--- 46,49 ----
Index: Util.c
===================================================================
RCS file: /cvsroot/htoolkit/port/src/cbits/Win32/Util.c,v
retrieving revision 1.22
retrieving revision 1.23
diff -C2 -d -r1.22 -r1.23
*** Util.c 25 Aug 2003 17:28:31 -0000 1.22
--- Util.c 27 Aug 2003 08:16:53 -0000 1.23
***************
*** 217,221 ****
{
HWND hParent;
- FrameData *pFrameData = (FrameData *) GetWindowLong(ghWndFrame,GWL_USERDATA);
if (!hWnd)
--- 217,220 ----
|
|
From: <kr_...@us...> - 2003-08-26 21:24:51
|
Update of /cvsroot/htoolkit/port/src/cbits/Win32
In directory sc8-pr-cvs1:/tmp/cvs-serv5400/port/src/cbits/Win32
Modified Files:
PopUp.c
Log Message:
bugfix
Index: PopUp.c
===================================================================
RCS file: /cvsroot/htoolkit/port/src/cbits/Win32/PopUp.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** PopUp.c 24 Aug 2003 21:07:48 -0000 1.5
--- PopUp.c 26 Aug 2003 21:23:52 -0000 1.6
***************
*** 1,82 ****
! #include "PopUp.h"
! #include "Internals.h"
! #include "Handlers_stub.h"
!
! WindowHandle osCreatePopUp(WindowHandle window)
! {
! HWND hPopUp;
!
! hPopUp = CreateWindow(
! "COMBOBOX",
! NULL,
! WS_CHILD | WS_VISIBLE | CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP,
! 0,0,0,0,
! window,
! NULL,
! ghModule,
! NULL
! );
! return checkWindow(hPopUp, "POPUP");
! };
!
! void osAppendPopUpItem(WindowHandle popup, char *title)
! {
! SendMessage(popup, CB_ADDSTRING, 0, (LPARAM) title);
! osForceContainerReLayout(popup);
! };
!
! void osInsertPopUpItem(WindowHandle popup, int index, char *title)
! {
! SendMessage(popup, CB_INSERTSTRING, index, (LPARAM) title);
! osForceContainerReLayout(popup);
! };
!
! void osRemovePopUpItem(WindowHandle popup, int index)
! {
! SendMessage(popup, CB_DELETESTRING, index, 0);
! osForceContainerReLayout(popup);
! };
!
! void osRemoveAllPopUpItems(WindowHandle popup)
! {
! SendMessage(popup, CB_RESETCONTENT,0,0);
! osForceContainerReLayout(popup);
! };
!
! void osGetPopUpReqSize(WindowHandle popup, int *res)
! {
! SIZE sz;
! int i,nCount, nLen, width;
! char *buffer;
! HDC hDC = GetDC(popup);
!
! width = 10;
! nCount = SendMessage(popup,CB_GETCOUNT,0,0);
! for (i = 0; i < nCount; i++)
! {
! nLen = SendMessage(popup,CB_GETLBTEXTLEN,i,0);
! buffer = (char *) rmalloc(nLen+1);
! nLen = SendMessage(popup,CB_GETLBTEXT,i,(LPARAM)buffer);
!
! GetTextExtentPoint32(hDC, buffer, nLen, &sz);
!
! rfree(buffer);
!
! if (width < sz.cx) width = sz.cx;
! }
!
! ReleaseDC(popup, hDC);
!
! res[0] = width + GetSystemMetrics(SM_CXVSCROLL);
! res[1] = 20;
! };
!
! int osGetPopUpSelection(WindowHandle popup)
! {
! return SendMessage(popup, CB_GETCURSEL, 0, 0);
! };
!
! void osSetPopUpSelection(WindowHandle popup, int index)
! {
! SendMessage(popup, CB_SETCURSEL, index, 0);
! };
--- 1,83 ----
! #include "PopUp.h"
! #include "Internals.h"
! #include "Handlers_stub.h"
!
! WindowHandle osCreatePopUp(WindowHandle window)
! {
! HWND hPopUp;
!
! hPopUp = CreateWindow(
! "COMBOBOX",
! NULL,
! WS_CHILD | WS_VISIBLE | CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP,
! 0,0,0,0,
! window,
! NULL,
! ghModule,
! NULL
! );
! return checkWindow(hPopUp, "POPUP");
! };
!
! void osAppendPopUpItem(WindowHandle popup, char *title)
! {
! SendMessage(popup, CB_ADDSTRING, 0, (LPARAM) title);
! osForceContainerReLayout(popup);
! };
!
! void osInsertPopUpItem(WindowHandle popup, int index, char *title)
! {
! SendMessage(popup, CB_INSERTSTRING, index, (LPARAM) title);
! osForceContainerReLayout(popup);
! };
!
! void osRemovePopUpItem(WindowHandle popup, int index)
! {
! SendMessage(popup, CB_DELETESTRING, index, 0);
! osForceContainerReLayout(popup);
! };
!
! void osRemoveAllPopUpItems(WindowHandle popup)
! {
! SendMessage(popup, CB_RESETCONTENT,0,0);
! osForceContainerReLayout(popup);
! };
!
! void osGetPopUpReqSize(WindowHandle popup, int *res)
! {
! SIZE sz;
! int i,nCount, nLen, width;
! char *buffer;
! HDC hDC = GetDC(popup);
!
! width = 10;
! nCount = SendMessage(popup,CB_GETCOUNT,0,0);
! for (i = 0; i < nCount; i++)
! {
! nLen = SendMessage(popup,CB_GETLBTEXTLEN,i,0);
! buffer = (char *) rmalloc(nLen+1);
! nLen = SendMessage(popup,CB_GETLBTEXT,i,(LPARAM)buffer);
!
! GetTextExtentPoint32(hDC, buffer, nLen, &sz);
!
! rfree(buffer);
!
! if (width < sz.cx) width = sz.cx;
! }
!
! ReleaseDC(popup, hDC);
!
! res[0] = width + GetSystemMetrics(SM_CXVSCROLL);
! res[1] = 20;
! };
!
! int osGetPopUpSelection(WindowHandle popup)
! {
! return SendMessage(popup, CB_GETCURSEL, 0, 0);
! };
!
! void osSetPopUpSelection(WindowHandle popup, int index)
! {
! SendMessage(popup, CB_SETCURSEL, index, 0);
! handleControlCommand(popup);
! };
|
|
From: <kr_...@us...> - 2003-08-26 21:24:51
|
Update of /cvsroot/htoolkit/gio/src/Graphics/UI/GIO
In directory sc8-pr-cvs1:/tmp/cvs-serv5400/gio/src/Graphics/UI/GIO
Modified Files:
Controls.hs
Log Message:
bugfix
Index: Controls.hs
===================================================================
RCS file: /cvsroot/htoolkit/gio/src/Graphics/UI/GIO/Controls.hs,v
retrieving revision 1.27
retrieving revision 1.28
diff -C2 -d -r1.27 -r1.28
*** Controls.hs 24 Aug 2003 21:07:48 -0000 1.27
--- Controls.hs 26 Aug 2003 21:23:52 -0000 1.28
***************
*** 33,37 ****
-- ** Popup
! -- | A popup control consists of a list box combined with a label control.
-- The list box portion of the control drop down only when the user selects
-- the drop-down arrow next to the control. The currently selected item in the
--- 33,37 ----
-- ** Popup
! -- | A popup control consists of a list box combined with a label control.
-- The list box portion of the control drop down only when the user selects
-- the drop-down arrow next to the control. The currently selected item in the
***************
*** 300,307 ****
instance SingleSelect Popup where
! selected
! = newAttr (\w -> Port.getPopUpSelection (phandle w))
! (\w i -> do Port.setPopUpSelection (phandle w) i
! popupCommand w) -- pretend an event
instance Dimensions Popup where
--- 300,304 ----
instance SingleSelect Popup where
! selected = newStdAttr phandle Port.getPopUpSelection Port.setPopUpSelection
instance Dimensions Popup where
|
|
From: <kr_...@us...> - 2003-08-26 20:53:24
|
Update of /cvsroot/htoolkit/port/src/cbits/GTK
In directory sc8-pr-cvs1:/tmp/cvs-serv31693/src/cbits/GTK
Modified Files:
ToolBar.c
Log Message:
consistent behaviour between Windows and GNOME
Index: ToolBar.c
===================================================================
RCS file: /cvsroot/htoolkit/port/src/cbits/GTK/ToolBar.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** ToolBar.c 23 Aug 2003 11:05:59 -0000 1.8
--- ToolBar.c 26 Aug 2003 20:53:14 -0000 1.9
***************
*** 88,91 ****
--- 88,92 ----
{
GtkToolItem *item = gtk_radio_tool_button_new(NULL);
+ GTK_TOGGLE_BUTTON (GTK_TOOL_BUTTON(item)->button)->active = FALSE;
gtk_signal_connect (GTK_OBJECT(GTK_TOOL_BUTTON(item)->button), "clicked",
|
|
From: <kr_...@us...> - 2003-08-26 20:01:04
|
Update of /cvsroot/htoolkit/port/src/cbits/Win32
In directory sc8-pr-cvs1:/tmp/cvs-serv21238/src/cbits/Win32
Modified Files:
RadioBox.c
Log Message:
Consistent behaviour for RadioBox under Windows & GNOME
Index: RadioBox.c
===================================================================
RCS file: /cvsroot/htoolkit/port/src/cbits/Win32/RadioBox.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** RadioBox.c 24 Aug 2003 21:07:48 -0000 1.8
--- RadioBox.c 26 Aug 2003 20:00:55 -0000 1.9
***************
*** 1,120 ****
! #include "RadioBox.h"
! #include "Internals.h"
! #include "Handlers_stub.h"
!
! WindowHandle osCreateRadioBox(WindowHandle window)
! {
! HWND hRadioBox;
!
! hRadioBox = CreateWindow(
! "BUTTON",
! NULL,
! WS_CHILD | WS_VISIBLE | BS_AUTORADIOBUTTON | WS_TABSTOP,
! 0,0,0,0,
! window,
! NULL,
! ghModule,
! NULL
! );
! SetWindowLong(hRadioBox, GWL_USERDATA, (LONG) hRadioBox);
! return checkWindow(hRadioBox, "RADIOBOX");
! };
!
! void osGetRadioBoxReqSize(WindowHandle radiobox, int *res)
! {
! SIZE sz;
! TEXTMETRIC tm;
! HFONT hOldFont;
! HDC hDC = GetDC(radiobox);
! int nLen = GetWindowTextLength(radiobox);
! char *buffer = (char *) rmalloc(nLen+1);
! nLen = GetWindowText(radiobox, buffer, nLen+1);
!
! hOldFont = SelectObject(hDC, (HFONT) SendMessage(radiobox, WM_GETFONT, 0, 0));
!
! GetTextExtentPoint32(hDC, buffer, nLen, &sz);
! GetTextMetrics(hDC, &tm);
!
! SelectObject(hDC, hOldFont);
!
! rfree(buffer);
! ReleaseDC(radiobox, hDC);
!
! res[0] = sz.cx + 32;
! res[1] = tm.tmHeight+tm.tmDescent;
! };
!
! char *osGetRadioBoxText(WindowHandle radiobox)
! {
! int nLen = GetWindowTextLength(radiobox);
! char *buffer = (char *) rmalloc(nLen+1);
! GetWindowText(radiobox, buffer, nLen+1);
! return buffer;
! };
!
! void osSetRadioBoxText(WindowHandle radiobox, char *txt)
! {
! SetWindowText(radiobox, txt);
! osForceContainerReLayout(radiobox);
! };
!
! BOOL osGetRadioBoxState(WindowHandle radiobox)
! {
! return SendMessage(radiobox,BM_GETCHECK,0,0) == BST_CHECKED;
! };
!
! void osSetRadioBoxState(WindowHandle radiobox, BOOL state)
! {
! HWND hNextCtrl;
!
! if (state)
! {
! SendMessage(radiobox,BM_SETCHECK,BST_CHECKED,0);
!
! hNextCtrl = radiobox;
! for (;;)
! {
! hNextCtrl = (WindowHandle) GetWindowLong(hNextCtrl, GWL_USERDATA);
! if (hNextCtrl == radiobox) break;
!
! SendMessage(hNextCtrl,BM_SETCHECK,BST_UNCHECKED,0);
! }
! }
! else
! SendMessage(radiobox,BM_SETCHECK,BST_UNCHECKED,0);
! };
!
! void osSetRadioBoxGroup(WindowHandle *handles)
! {
! WindowHandle first, next, child, handle, *phandle;
!
! if (!(handles && *handles))
! return;
!
! phandle=handles;
! for (;;)
! {
! handle = *phandle;
!
! first = (WindowHandle) GetWindowLong(handle, GWL_USERDATA);
! child = first;
! for (;;)
! {
! next = (WindowHandle) GetWindowLong(child, GWL_USERDATA);
! if (next == handle) break;
! child = next;
! }
! SetWindowLong(child, GWL_USERDATA, (LONG) first);
!
! SendMessage(handle,BM_SETCHECK,(handle == *handles) ? BST_CHECKED : BST_UNCHECKED,0);
!
! phandle++;
! if (*phandle)
! SetWindowLong(handle, GWL_USERDATA, (LONG) *phandle);
! else
! {
! SetWindowLong(handle, GWL_USERDATA, (LONG) *handles);
! break;
! }
! }
! };
--- 1,149 ----
! #include "RadioBox.h"
! #include "Internals.h"
! #include "Handlers_stub.h"
!
! WindowHandle osCreateRadioBox(WindowHandle window)
! {
! HWND hRadioBox;
!
! hRadioBox = CreateWindow(
! "BUTTON",
! NULL,
! WS_CHILD | WS_VISIBLE | BS_AUTORADIOBUTTON | WS_TABSTOP,
! 0,0,0,0,
! window,
! NULL,
! ghModule,
! NULL
! );
! SetWindowLong(hRadioBox, GWL_USERDATA, (LONG) hRadioBox);
! return checkWindow(hRadioBox, "RADIOBOX");
! };
!
! void osGetRadioBoxReqSize(WindowHandle radiobox, int *res)
! {
! SIZE sz;
! TEXTMETRIC tm;
! HFONT hOldFont;
! HDC hDC = GetDC(radiobox);
! int nLen = GetWindowTextLength(radiobox);
! char *buffer = (char *) rmalloc(nLen+1);
! nLen = GetWindowText(radiobox, buffer, nLen+1);
!
! hOldFont = SelectObject(hDC, (HFONT) SendMessage(radiobox, WM_GETFONT, 0, 0));
!
! GetTextExtentPoint32(hDC, buffer, nLen, &sz);
! GetTextMetrics(hDC, &tm);
!
! SelectObject(hDC, hOldFont);
!
! rfree(buffer);
! ReleaseDC(radiobox, hDC);
!
! res[0] = sz.cx + 32;
! res[1] = tm.tmHeight+tm.tmDescent;
! };
!
! char *osGetRadioBoxText(WindowHandle radiobox)
! {
! int nLen = GetWindowTextLength(radiobox);
! char *buffer = (char *) rmalloc(nLen+1);
! GetWindowText(radiobox, buffer, nLen+1);
! return buffer;
! };
!
! void osSetRadioBoxText(WindowHandle radiobox, char *txt)
! {
! SetWindowText(radiobox, txt);
! osForceContainerReLayout(radiobox);
! };
!
! BOOL osGetRadioBoxState(WindowHandle radiobox)
! {
! return SendMessage(radiobox,BM_GETCHECK,0,0) == BST_CHECKED;
! };
!
! void osSetRadioBoxState(WindowHandle radiobox, BOOL state)
! {
! HWND hNextCtrl;
!
! if (state)
! {
! if (SendMessage(radiobox,BM_GETCHECK,0,0) == BST_UNCHECKED)
! {
! SendMessage(radiobox,BM_SETCHECK,BST_CHECKED,0);
! handleControlCommand(radiobox);
! }
!
! hNextCtrl = radiobox;
! for (;;)
! {
! hNextCtrl = (WindowHandle) GetWindowLong(hNextCtrl, GWL_USERDATA);
! if (hNextCtrl == radiobox) break;
!
! if (SendMessage(hNextCtrl,BM_GETCHECK,0,0) == BST_CHECKED)
! {
! SendMessage(hNextCtrl,BM_SETCHECK,BST_UNCHECKED,0);
! handleControlCommand(hNextCtrl);
! }
! }
! }
! else
! {
! if (SendMessage(radiobox,BM_GETCHECK,0,0) == BST_CHECKED)
! {
! SendMessage(radiobox,BM_SETCHECK,BST_UNCHECKED,0);
! handleControlCommand(radiobox);
! }
! }
! };
!
! void osSetRadioBoxGroup(WindowHandle *handles)
! {
! WindowHandle first, next, child, handle, *phandle;
!
! if (!(handles && *handles))
! return;
!
! phandle=handles;
! for (;;)
! {
! handle = *phandle;
!
! first = (WindowHandle) GetWindowLong(handle, GWL_USERDATA);
! child = first;
! for (;;)
! {
! next = (WindowHandle) GetWindowLong(child, GWL_USERDATA);
! if (next == handle) break;
! child = next;
! }
! SetWindowLong(child, GWL_USERDATA, (LONG) first);
!
! if (SendMessage(handle,BM_GETCHECK,0,0) == BST_CHECKED)
! {
! if (handle != *handles)
! {
! SendMessage(handle,BM_SETCHECK,BST_UNCHECKED,0);
! handleControlCommand(handle);
! }
! }
! else
! {
! if (handle == *handles)
! {
! SendMessage(handle,BM_SETCHECK,BST_CHECKED,0);
! handleControlCommand(handle);
! }
! }
!
! phandle++;
! if (*phandle)
! SetWindowLong(handle, GWL_USERDATA, (LONG) *phandle);
! else
! {
! SetWindowLong(handle, GWL_USERDATA, (LONG) *handles);
! break;
! }
! }
! };
|
|
From: <kr_...@us...> - 2003-08-26 20:01:01
|
Update of /cvsroot/htoolkit/port/src/cbits/GTK In directory sc8-pr-cvs1:/tmp/cvs-serv21238/src/cbits/GTK Modified Files: RadioBox.c Log Message: Consistent behaviour for RadioBox under Windows & GNOME Index: RadioBox.c =================================================================== RCS file: /cvsroot/htoolkit/port/src/cbits/GTK/RadioBox.c,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** RadioBox.c 24 Aug 2003 21:07:48 -0000 1.7 --- RadioBox.c 26 Aug 2003 20:00:55 -0000 1.8 *************** *** 8,11 **** --- 8,12 ---- radio_btn = gtk_radio_button_new_with_mnemonic (NULL, ""); + GTK_TOGGLE_BUTTON (radio_btn)->active = FALSE; gtk_fixed_put(GTK_FIXED(GTK_BIN(GTK_BIN(window)->child)->child), radio_btn, 0, 0); |
|
From: <kr_...@us...> - 2003-08-26 16:37:52
|
Update of /cvsroot/htoolkit/port/src/cbits/Win32 In directory sc8-pr-cvs1:/tmp/cvs-serv28015/src/cbits/Win32 Modified Files: Util.c Log Message: The RtsAPI is not realy required here and now it is removed Index: Util.c =================================================================== RCS file: /cvsroot/htoolkit/port/src/cbits/Win32/Util.c,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** Util.c 24 Aug 2003 20:42:54 -0000 1.21 --- Util.c 25 Aug 2003 17:28:31 -0000 1.22 *************** *** 1,3 **** - #include "RtsAPI.h" #include "Types.h" #include "Window.h" --- 1,2 ---- |
|
From: <kr_...@us...> - 2003-08-26 15:11:57
|
Update of /cvsroot/htoolkit/port/src/Port
In directory sc8-pr-cvs1:/tmp/cvs-serv29596/src/Port
Modified Files:
Handlers.hs
Log Message:
Merge DialogActivate and DialogDeactivateEvents to WindowActivate and DialogActivate
Index: Handlers.hs
===================================================================
RCS file: /cvsroot/htoolkit/port/src/Port/Handlers.hs,v
retrieving revision 1.27
retrieving revision 1.28
diff -C2 -d -r1.27 -r1.28
*** Handlers.hs 24 Aug 2003 21:07:48 -0000 1.27
--- Handlers.hs 25 Aug 2003 17:35:49 -0000 1.28
***************
*** 10,27 ****
Portability : portable
! Event handlers are registered with @registerXXX@ for a particular widget.
Allthough event handlers can be unregistered explicitly, all registered widget
handlers will be automatically unregistered when a widget is destroyed.
- Menu command handlers are unregistered automatically if the menu itself
- has been associated with a particular window, via the 'registerWindowMenu' function.
-
- If an event handler is registered with a 'nullHandle', the handler will be called
- on every occurrence of that event (after the handler for the specific widget has
- been called).
-
When 'quit' is called, it will close all windows, unregister all event handlers
! and destroy all timers. 'quit' is called automatically when the last window
! is destroyed.
-}
-----------------------------------------------------------------------------------------
--- 10,19 ----
Portability : portable
! Event handlers are registered with @setXXXHandler@ for a particular widget.
Allthough event handlers can be unregistered explicitly, all registered widget
handlers will be automatically unregistered when a widget is destroyed.
When 'quit' is called, it will close all windows, unregister all event handlers
! and destroy all timers.
-}
-----------------------------------------------------------------------------------------
***************
*** 101,107 ****
Just x -> safeio (f x)
Nothing -> return ()
- case lookup nullHandle map of -- always invoke null-handler
- Just x -> safeio (f x)
- Nothing -> return ()
setHandler :: Ptr a -> b -> MVar (PtrMap a b) -> IO ()
--- 93,96 ----
***************
*** 152,157 ****
-- | 'registerWindow' should be called by all top-level window creation functions.
! -- The windows are automatically unregistered when destroyed. The registration is used to
! -- implement the automatic quit when all top-level windows are closed.
registerWindow :: WindowHandle -> IO ()
registerWindow hwnd
--- 141,145 ----
-- | 'registerWindow' should be called by all top-level window creation functions.
! -- The windows are automatically unregistered when destroyed.
registerWindow :: WindowHandle -> IO ()
registerWindow hwnd
***************
*** 307,314 ****
= invokeHandler hwnd handlersWindowDeactivate id
- handleDialogDeactivate :: WindowHandle -> IO ()
- handleDialogDeactivate hwnd
- = invokeHandler hwnd handlersWindowDeactivate id
-
-----------------------------------------------------------------------------------------
-- WindowActivate
--- 295,298 ----
***************
*** 338,345 ****
invokeHandler hwnd handlersWindowActivate id
- handleDialogActivate :: WindowHandle -> IO ()
- handleDialogActivate hwnd =
- invokeHandler hwnd handlersWindowActivate id
-
-----------------------------------------------------------------------------------------
-- WindowPaint
--- 322,325 ----
***************
*** 783,788 ****
foreign export ccall handleWindowActivate :: WindowHandle -> IO ()
foreign export ccall handleContainerReLayout :: 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 ()
--- 763,766 ----
|
|
From: <kr_...@us...> - 2003-08-26 13:43:40
|
Update of /cvsroot/htoolkit/port/src/cbits/Win32
In directory sc8-pr-cvs1:/tmp/cvs-serv29596/src/cbits/Win32
Modified Files:
Window.c
Log Message:
Merge DialogActivate and DialogDeactivateEvents to WindowActivate and DialogActivate
Index: Window.c
===================================================================
RCS file: /cvsroot/htoolkit/port/src/cbits/Win32/Window.c,v
retrieving revision 1.44
retrieving revision 1.45
diff -C2 -d -r1.44 -r1.45
*** Window.c 24 Aug 2003 21:07:48 -0000 1.44
--- Window.c 25 Aug 2003 17:35:50 -0000 1.45
***************
*** 669,677 ****
gInKey = FALSE;
gCurChar = 0;
! handleDialogDeactivate(hWnd);
}
else
{
! handleDialogActivate(hWnd);
}
break;
--- 669,677 ----
gInKey = FALSE;
gCurChar = 0;
! handleWindowDeactivate(hWnd);
}
else
{
! handleWindowActivate(hWnd);
}
break;
|
|
From: <kr_...@us...> - 2003-08-26 11:02:21
|
Update of /cvsroot/htoolkit/port/src/cbits/GTK
In directory sc8-pr-cvs1:/tmp/cvs-serv29596/src/cbits/GTK
Modified Files:
Window.c
Log Message:
Merge DialogActivate and DialogDeactivateEvents to WindowActivate and DialogActivate
Index: Window.c
===================================================================
RCS file: /cvsroot/htoolkit/port/src/cbits/GTK/Window.c,v
retrieving revision 1.27
retrieving revision 1.28
diff -C2 -d -r1.27 -r1.28
*** Window.c 24 Aug 2003 21:07:48 -0000 1.27
--- Window.c 25 Aug 2003 17:35:50 -0000 1.28
***************
*** 347,351 ****
static void dialog_focus_in_handler(GtkWidget *widget, GdkEventFocus *event, gpointer user_data)
{
! handleDialogActivate(GTK_BIN(widget)->child);
}
--- 347,351 ----
static void dialog_focus_in_handler(GtkWidget *widget, GdkEventFocus *event, gpointer user_data)
{
! handleWindowActivate(GTK_BIN(widget)->child);
}
***************
*** 360,364 ****
}
! handleDialogDeactivate(GTK_BIN(widget)->child);
}
--- 360,364 ----
}
! handleWindowDeactivate(GTK_BIN(widget)->child);
}
|
|
From: <kr_...@us...> - 2003-08-25 23:21:05
|
Update of /cvsroot/htoolkit/port/src/cbits/GTK
In directory sc8-pr-cvs1:/tmp/cvs-serv26178
Added Files:
Notebook.c
Log Message:
Notebook for GNOME
--- NEW FILE: Notebook.c ---
#include "Notebook.h"
#include "Internals.h"
#include "Handlers_stub.h"
WindowHandle osCreateNotebook(WindowHandle window)
{
GtkWidget *notebook;
notebook = gtk_notebook_new();
gtk_notebook_set_scrollable(GTK_NOTEBOOK(notebook), gtk_true());
gtk_notebook_popup_enable(GTK_NOTEBOOK(notebook));
gtk_fixed_put(GTK_FIXED(GTK_BIN(GTK_BIN(window)->child)->child), notebook, 0, 0);
gtk_widget_show(notebook);
return notebook;
};
void osGetNotebookReqSize(WindowHandle notebook, int *res)
{
int w,h;
GtkRequisition requisition;
int i, count;
GtkWidget *label;
w = 0; h = 0;
count = gtk_notebook_get_n_pages(GTK_NOTEBOOK(notebook));
for (i = 0; i < count; i++)
{
label = gtk_notebook_get_tab_label(GTK_NOTEBOOK(notebook),
gtk_notebook_get_nth_page(GTK_NOTEBOOK(notebook), i));
gtk_widget_size_request(label, &requisition);
switch (gtk_notebook_get_tab_pos(GTK_NOTEBOOK(notebook)))
{
case GTK_POS_LEFT:
case GTK_POS_RIGHT:
if (w < requisition.width) w = requisition.width;
break;
case GTK_POS_TOP:
case GTK_POS_BOTTOM:
if (h < requisition.height) h = requisition.height;
break;
}
}
res[0] = w+12;
res[1] = h+6;
}
void osSetNotebookLabelsPosition(WindowHandle notebook, PositionType position)
{
switch (position)
{
case PosLeft: gtk_notebook_set_tab_pos(GTK_NOTEBOOK(notebook), GTK_POS_LEFT); break;
case PosTop: gtk_notebook_set_tab_pos(GTK_NOTEBOOK(notebook), GTK_POS_TOP); break;
case PosRight: gtk_notebook_set_tab_pos(GTK_NOTEBOOK(notebook), GTK_POS_RIGHT); break;
case PosBottom: gtk_notebook_set_tab_pos(GTK_NOTEBOOK(notebook), GTK_POS_BOTTOM); break;
}
}
PositionType osGetNotebookLabelsPosition(WindowHandle notebook)
{
switch (gtk_notebook_get_tab_pos(GTK_NOTEBOOK(notebook)))
{
case GTK_POS_LEFT: return PosLeft;
case GTK_POS_TOP: return PosTop;
case GTK_POS_RIGHT: return PosRight;
case GTK_POS_BOTTOM: return PosBottom;
}
return 0;
}
int osGetNotebookSelection(WindowHandle notebook)
{
return gtk_notebook_get_current_page(GTK_NOTEBOOK(notebook));
};
void osSetNotebookSelection(WindowHandle notebook, int index)
{
gtk_notebook_set_current_page(GTK_NOTEBOOK(notebook), index);
};
static void notebook_page_size_allocate_handler(GtkWidget *widget, GtkAllocation *allocation, gpointer user_data)
{
handleContainerReLayout(widget);
};
WindowHandle osInsertNotebookPage(WindowHandle notebook, int pos)
{
GtkWidget *page = gtk_scrolled_window_new (NULL, NULL);
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW(page),
GTK_POLICY_NEVER, GTK_POLICY_NEVER);
gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW(page), gtk_fixed_new());
gtk_signal_connect (GTK_OBJECT(page), "size-allocate",
GTK_SIGNAL_FUNC(notebook_page_size_allocate_handler),
NULL);
gtk_widget_show_all(page);
if (pos < 0)
gtk_notebook_append_page(GTK_NOTEBOOK(notebook),page,gtk_label_new(""));
else
gtk_notebook_insert_page(GTK_NOTEBOOK(notebook),page,gtk_label_new(""),pos);
return page;
}
char *osGetNotebookPageTitle(WindowHandle page)
{
GtkWidget *label = gtk_notebook_get_tab_label(GTK_NOTEBOOK(gtk_widget_get_parent(page)),page);
return strdup(gtk_label_get_text(GTK_LABEL(label)));
};
void osSetNotebookPageTitle(WindowHandle page, char *txt)
{
GtkWidget *label = gtk_notebook_get_tab_label(GTK_NOTEBOOK(gtk_widget_get_parent(page)),page);
return gtk_label_set_text(GTK_LABEL(label), txt);
};
int osGetNotebookPagePos(WindowHandle page)
{
return gtk_notebook_page_num(GTK_NOTEBOOK(gtk_widget_get_parent(page)), page);
}
void osDestroyNotebookPage(WindowHandle page)
{
gtk_widget_destroy(page);
}
void osGetNotebookPageSize(WindowHandle page, int *res)
{
res[0] = page->allocation.width-4;
res[1] = page->allocation.height-4;
}
|
|
From: <kr_...@us...> - 2003-08-25 20:41:13
|
Update of /cvsroot/htoolkit/port/src/cbits/Win32
In directory sc8-pr-cvs1:/tmp/cvs-serv29626/src/cbits/Win32
Modified Files:
Font.c
Log Message:
In this commit are implemented functions osGetTextColor, osGetWindowColor,
osGetDialogColor. The osDefaultFontDef function now returns the default
font for gnome application. The osDefaultFontDef and similar functions now
returns new allocated string which is deallocated from Haskell world.
Index: Font.c
===================================================================
RCS file: /cvsroot/htoolkit/port/src/cbits/Win32/Font.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** Font.c 25 Aug 2003 20:07:53 -0000 1.3
--- Font.c 25 Aug 2003 20:41:08 -0000 1.4
***************
*** 286,296 ****
void osDefaultFontDef(char **face, int *size, int *weight, int *style)
{
! static LOGFONT lf;
GetObject(GetStockObject(DEFAULT_GUI_FONT), sizeof(LOGFONT), &lf);
! *face = lf.lfFaceName;
*size = -lf.lfHeight;
*weight = lf.lfWeight;
!
*style = 0;
if (lf.lfItalic) *style |= FONT_ITALIC;
--- 286,296 ----
void osDefaultFontDef(char **face, int *size, int *weight, int *style)
{
! LOGFONT lf;
GetObject(GetStockObject(DEFAULT_GUI_FONT), sizeof(LOGFONT), &lf);
! *face = strdup(lf.lfFaceName);
*size = -lf.lfHeight;
*weight = lf.lfWeight;
!
*style = 0;
if (lf.lfItalic) *style |= FONT_ITALIC;
***************
*** 301,305 ****
void osSerifFontDef(char **face, int *size, int *weight, int *style)
{
! *face = "Times New Roman";
*size = 10;
*weight = 400;
--- 301,305 ----
void osSerifFontDef(char **face, int *size, int *weight, int *style)
{
! *face = strdup("Times New Roman");
*size = 10;
*weight = 400;
***************
*** 309,313 ****
void osSansSerifFontDef(char **face, int *size, int *weight, int *style)
{
! *face = "Arial";
*size = 10;
*weight = 400;
--- 309,313 ----
void osSansSerifFontDef(char **face, int *size, int *weight, int *style)
{
! *face = strdup("Arial");
*size = 10;
*weight = 400;
***************
*** 317,321 ****
void osSmallFontDef(char **face, int *size, int *weight, int *style)
{
! *face = "Small Fonts";
*size = 7;
*weight = 400;
--- 317,321 ----
void osSmallFontDef(char **face, int *size, int *weight, int *style)
{
! *face = strdup("Small Fonts");
*size = 7;
*weight = 400;
***************
*** 325,329 ****
void osNonProportionalFontDef(char **face, int *size, int *weight, int *style)
{
! *face = "Courier New";
*size = 10;
*weight = 400;
--- 325,329 ----
void osNonProportionalFontDef(char **face, int *size, int *weight, int *style)
{
! *face = strdup("Courier New");
*size = 10;
*weight = 400;
***************
*** 333,337 ****
void osSymbolFontDef(char **face, int *size, int *weight, int *style)
{
! *face = "Symbol";
*size = 10;
*weight = 400;
--- 333,337 ----
void osSymbolFontDef(char **face, int *size, int *weight, int *style)
{
! *face = strdup("Symbol");
*size = 10;
*weight = 400;
|
|
From: <kr_...@us...> - 2003-08-25 20:41:12
|
Update of /cvsroot/htoolkit/port/src/cbits/GTK
In directory sc8-pr-cvs1:/tmp/cvs-serv29626/src/cbits/GTK
Modified Files:
Canvas.c Font.c
Log Message:
In this commit are implemented functions osGetTextColor, osGetWindowColor,
osGetDialogColor. The osDefaultFontDef function now returns the default
font for gnome application. The osDefaultFontDef and similar functions now
returns new allocated string which is deallocated from Haskell world.
Index: Canvas.c
===================================================================
RCS file: /cvsroot/htoolkit/port/src/cbits/GTK/Canvas.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -d -r1.13 -r1.14
*** Canvas.c 24 Aug 2003 19:02:45 -0000 1.13
--- Canvas.c 25 Aug 2003 20:41:08 -0000 1.14
***************
*** 681,682 ****
--- 681,711 ----
*dv = 1;
} /* osGetScaleFactor */
+
+ unsigned int gdk_color_to_rgb(GdkColor color)
+ {
+ return (color.red/257) | ((color.green/257) << 8) | ((color.blue/257) << 16);
+ }
+
+ unsigned int osGetDialogColor()
+ {
+ GtkStyle *style = gtk_style_new();
+ int rgb = gdk_color_to_rgb(style->bg[GTK_STATE_NORMAL]);
+ gtk_style_unref(style);
+ return rgb;
+ }
+
+ unsigned int osGetWindowColor()
+ {
+ GtkStyle *style = gtk_style_new();
+ int rgb = gdk_color_to_rgb(style->base[GTK_STATE_NORMAL]);
+ gtk_style_unref(style);
+ return rgb;
+ }
+
+ unsigned int osGetTextColor()
+ {
+ GtkStyle *style = gtk_style_new();
+ int rgb = gdk_color_to_rgb(style->fg[GTK_STATE_NORMAL]);
+ gtk_style_unref(style);
+ return rgb;
+ }
Index: Font.c
===================================================================
RCS file: /cvsroot/htoolkit/port/src/cbits/GTK/Font.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** Font.c 24 Aug 2003 19:02:45 -0000 1.5
--- Font.c 25 Aug 2003 20:41:08 -0000 1.6
***************
*** 72,79 ****
switch (pango_font_description_get_style(desc))
{
! case PANGO_STYLE_NORMAL: *(p++) = 0; break;
! case PANGO_STYLE_OBLIQUE: *(p++) = 1; break;
! case PANGO_STYLE_ITALIC: *(p++) = 2; break;
! default: *(p++) = -1; break;
}
*(p++) = 0;
--- 72,79 ----
switch (pango_font_description_get_style(desc))
{
! case PANGO_STYLE_NORMAL: *(p++) = FONT_NORMAL; break;
! case PANGO_STYLE_OBLIQUE: *(p++) = FONT_ITALIC; break;
! case PANGO_STYLE_ITALIC: *(p++) = FONT_OBLIQUE; break;
! default: *(p++) = FONT_NORMAL; break;
}
*(p++) = 0;
***************
*** 199,211 ****
void osDefaultFontDef(char **face, int *size, int *weight, int *style)
{
! *face = "helvetica";
! *size = 12;
! *weight = 500;
! *style = 0;
}
void osSerifFontDef(char **face, int *size, int *weight, int *style)
{
! *face = "times";
*size = 10;
*weight = 400;
--- 199,220 ----
void osDefaultFontDef(char **face, int *size, int *weight, int *style)
{
! GtkStyle *gtkstyle = gtk_style_new();
! *face = strdup(pango_font_description_get_family (gtkstyle->font_desc));
! *size = pango_font_description_get_size (gtkstyle->font_desc)/PANGO_SCALE;
! *weight = pango_font_description_get_weight(gtkstyle->font_desc);
!
! switch (pango_font_description_get_style(gtkstyle->font_desc))
! {
! case PANGO_STYLE_NORMAL: *style = FONT_NORMAL; break;
! case PANGO_STYLE_OBLIQUE: *style = FONT_ITALIC; break;
! case PANGO_STYLE_ITALIC: *style = FONT_OBLIQUE; break;
! default: *style = FONT_NORMAL; break;
! }
! gtk_style_unref(gtkstyle);
}
void osSerifFontDef(char **face, int *size, int *weight, int *style)
{
! *face = strdup("times");
*size = 10;
*weight = 400;
***************
*** 215,219 ****
void osSansSerifFontDef(char **face, int *size, int *weight, int *style)
{
! *face = "helvetica";
*size = 10;
*weight = 500;
--- 224,228 ----
void osSansSerifFontDef(char **face, int *size, int *weight, int *style)
{
! *face = strdup("Sans");
*size = 10;
*weight = 500;
***************
*** 223,227 ****
void osSmallFontDef(char **face, int *size, int *weight, int *style)
{
! *face = "helvetica";
*size = 7;
*weight = 500;
--- 232,236 ----
void osSmallFontDef(char **face, int *size, int *weight, int *style)
{
! *face = strdup("helvetica");
*size = 7;
*weight = 500;
***************
*** 231,235 ****
void osNonProportionalFontDef(char **face, int *size, int *weight, int *style)
{
! *face = "fixed";
*size = 10;
*weight = 400;
--- 240,244 ----
void osNonProportionalFontDef(char **face, int *size, int *weight, int *style)
{
! *face = strdup("fixed");
*size = 10;
*weight = 400;
***************
*** 239,243 ****
void osSymbolFontDef(char **face, int *size, int *weight, int *style)
{
! *face = "symbol";
*size = 10;
*weight = 400;
--- 248,252 ----
void osSymbolFontDef(char **face, int *size, int *weight, int *style)
{
! *face = strdup("symbol");
*size = 10;
*weight = 400;
|
|
From: <kr_...@us...> - 2003-08-25 20:41:12
|
Update of /cvsroot/htoolkit/port/src/Port
In directory sc8-pr-cvs1:/tmp/cvs-serv29626/src/Port
Modified Files:
Types.hs
Log Message:
In this commit are implemented functions osGetTextColor, osGetWindowColor,
osGetDialogColor. The osDefaultFontDef function now returns the default
font for gnome application. The osDefaultFontDef and similar functions now
returns new allocated string which is deallocated from Haskell world.
Index: Types.hs
===================================================================
RCS file: /cvsroot/htoolkit/port/src/Port/Types.hs,v
retrieving revision 1.32
retrieving revision 1.33
diff -C2 -d -r1.32 -r1.33
*** Types.hs 24 Aug 2003 19:02:45 -0000 1.32
--- Types.hs 25 Aug 2003 20:41:08 -0000 1.33
***************
*** 984,988 ****
poke pcstrikeout 0
f pcstr pcsize pcweight pcstyle pcunderline pcstrikeout
! cname <- peek pcstr
csize <- peek pcsize
cweight <- peek pcweight
--- 984,988 ----
poke pcstrikeout 0
f pcstr pcsize pcweight pcstyle pcunderline pcstrikeout
! cname <- peek pcstr
csize <- peek pcsize
cweight <- peek pcweight
***************
*** 990,994 ****
cunderline <- peek pcunderline
cstrikeout <- peek pcstrikeout
! fromCFontDef cname csize cweight cstyle cunderline cstrikeout
fromCFontDef :: CString -> CInt -> CInt -> CInt -> CBool -> CBool -> IO FontDef
--- 990,996 ----
cunderline <- peek pcunderline
cstrikeout <- peek pcstrikeout
! fontDef <- fromCFontDef cname csize cweight cstyle cunderline cstrikeout
! free cname
! return fontDef
fromCFontDef :: CString -> CInt -> CInt -> CInt -> CBool -> CBool -> IO FontDef
|