# configure.ac -- Process this file with autoconf to produce configure.
+# For WIN32 cross-compilation:
+# ./configure --host=i586-mingw32msvc
+
dnl Initialization stuff.
AC_INIT(hvclock, 1.1.2)
AC_CONFIG_AUX_DIR([build-aux])
dnl Basic warning CFLAGS values
WARNINGCFLAGS="-Wall -Wextra -Wformat -Wformat-security"
-dnl Trying to locate the X window system's includes and libraries, and sets the
-dnl variables x_includes and x_libraries to their locations. Also adds the
-dnl required include flags to X_CFLAGS and required linking flags to X_LIBS.
-AC_PATH_XTRA
-CFLAGS="${CFLAGS} ${X_CFLAGS}"
-LIBS="${LIBS} ${X_PRE_LIBS} ${X_LIBS} ${X_EXTRA_LIBS}"
-
-dnl Checking for X11 library.
-AC_CHECK_LIB(X11, XOpenDisplay, LIBS="${LIBS} -lX11",
- echo "Can't find X11 library" ; exit 1, "${X_LIBS}")
+case "${host}" in
+ i[[3456789]]86-pc-mingw32*) WIN32="yes" ;;
+ *cygwin*) WIN32="yes" ;;
+ *) WIN32="no" ;;
+esac
+AM_CONDITIONAL([WIN32], test "$WIN32" = "yes")
dnl --with-gtk3 option
with_gtk3=no
#include "clock.h"
#include "hvclock.h"
#include "dockapp.h"
-#include "clock-mask.xpm"
-#include "calendar-mask.xpm"
/* Constants */
#define CLOCK_MODE 0
#endif
if (hvclock_mode == CLOCK_MODE) {
- dockapp_set_mask(clock, clock_mask_xpm);
draw_clock_background(clock, cr);
draw_clock_hands(clock, cr);
} else {
- dockapp_set_mask(clock, calendar_mask_xpm);
draw_calendar(clock, cr);
}
#include <ctype.h>
#include <stdarg.h>
#include <gtk/gtk.h>
-#include <gdk/gdkx.h>
+#ifdef WIN32
+# include <gdk/gdkwin32.h>
+#else
+# include <gdk/gdkx.h>
+#endif /* WIN32 */
#include "common.h"
#include "clock.h"
#include "hvclock.h"
#include "dockapp.h"
+#ifndef WIN32
#define GTK_WITHDRAWN_HACK 1
+#endif /* WIN32 */
/* Width and height in pixels of Window Maker icons. */
#define ICON_SIZE 64
gtk_init(&argc, &argv);
dockwin = dockapp_win_init(GTK_WINDOW_TOPLEVEL);
+
+#ifdef WIN32
+ iconwin = dockapp_win_init(GTK_WINDOW_TOPLEVEL);
+#else
iconwin = dockapp_win_init(GTK_WINDOW_POPUP);
+#endif /* WIN32 */
gtk_window_set_default_size(GTK_WINDOW(dockwin), ICON_SIZE, ICON_SIZE);
g_signal_connect(dockwin, "destroy", G_CALLBACK(gtk_main_quit), NULL);