Commit Graph

19 Commits

Author SHA1 Message Date
Tor Lillqvist
5ac61d3eee Include the build directory.
2000-07-25  Tor Lillqvist  <tml@iki.fi>

	* Makefile.am: Include the build directory.

	* configure.in: Generate build/Makefile and build/win32/Makefile.

	* config.h.win32: Add USE_GMODULE and USE_MMX for gdk-pixbuf.

	* gdk/gdk.def
	* gtk/gtk.def: Updates.

	* gdk/makefile.mingw.in: Define GDK_COMPILATION. Link with
	PANGOWIN32_LIBS and gdk_pixbuf.

	* gdk/win32: Compiles, but no doubt doesn't work at all.

	* gdk/win32/makefile.mingw.in: Define GDK_COMPILATION.

	* gdk/win32/gdkinput.c: New file, temporarily.

	* gdk/win32/gdkinput-win32.h: New file

	* gdk/win32/gdkinputprivate.h: Remove.

	* gtk/gtkrc.[ch] (gtk_win32_get_installation_directory): Renamed and
	made externally visible.
2000-07-25 17:31:05 +00:00
Tor Lillqvist
4658795817 More work on the Win32 backend. More files compile now. 2000-07-23 21:43:23 +00:00
Tor Lillqvist
acc8e78c2d Fix typo. I had deleted a ! operator by mistake, which caused
2000-05-07  Tor Lillqvist  <tml@iki.fi>

* gdk/win32/gdkevents-win32.c (gdk_event_translate): Fix typo. I
had deleted a ! operator by mistake, which caused
GDK_SELECTION_CLEAR events never to be generated, which caused
only the first copy to the clipboard from an gtkeditable to
actually cause a copy to the Windows clipboard.

2000-05-06  Tor Lillqvist  <tml@iki.fi>

* gdk/win32/gdkdnd-win32.c: Enable shortcut resolution for gcc
compilation, too. Current mingw gcc distributions include the
necessary headers. Also the necessary IIDs are now in mingw
headers/libraries, and own definitions unnecessary.

More hacking on OLE2 DND, still doesn't work though, and thus
ifdeffed out.

* gdk/win32/gdkwindow-win32.c: Remove gdk_window_clear() from
here, too.
2000-05-07 19:45:27 +00:00
Tor Lillqvist
1f149b3a8d Large changes to the Win32 backend, partially made necessary by the
2000-05-02  Tor Lillqvist  <tml@iki.fi>

Large changes to the Win32 backend, partially made necessary by
the changes to the backend-independent internal
structures. Attempts to implement similar backing store stuff as
on X11. The current (CVS) version of the Win32 backend is *not* as
stable as it was before the no-flicker branch was merged. A
zipfile with that version is available from
http://www.gimp.org/win32/. That should be use by "production"
code until this CVS version is usable. (But note, the Win32
backend has never been claimed to be "production quality".)

* README.win32: Add the above comment about versions.

* gdk/gdkwindow.c: Don't use backing store for now on Win32.

* gdk/gdk.def: Update.

* gdk/gdkfont.h: Declare temporary Win32-only functions. Will
presumably be replaced by some more better mechanism as 1.4 gets
closer to release shape.

* gdk/makefile.{cygwin,msc}: Update.

* gdk/win32/*.c: Correct inclusions of the backend-specific and
internal headers. Change code according to changes in these. Use
gdk_drawable_*, not gdk_window_* where necessary.

* gdk/win32/gdkdnd-win32.c: Use MISC selector for GDK_NOTE, not
our old DND.

* gdk/win32/gdkdrawable-win32.c (gdk_win32_draw_text): Don't try
to interpret single characters as UTF-8. Thanks to Hans Breuer.
Use correct function name in warning messages.

* gdk/win32/gdkevents-win32.c: Use correct parameter lists for the
GSourceFuncs gdk_event_prepare and gdk_event_check.
(gdk_event_get_graphics_expose): Do implement, use
PeekMessage. Thanks to Hans Breuer.
(event_mask_string): Debugging function to print an GdkEventMask.
(gdk_pointer_grab): Use it.

* gdk/win32/gdkfont-win32.c: The Unicode subrange that the
(old) book I used claimed was Hangul actually is CJK Unified
Ideographs Extension A. Also, Hangul Syllables were missing.
Improve logging.

* gdk/win32/gdkgc-win32.c: Largish changes.

* gdk/win32/gdkim-win32.c (gdk_set_locale): Use
g_win32_getlocale() from GLib, and not setlocale() to get current
locale name.

* gdk/win32/gdkprivate-win32.h
* gdk/win32/gdkwin32.h: Move stuff from gdkprivate-win32.h to
gdkwin32.h, similarily as in the X11 backend.

* gdk/win32/gdkwindow-win32.c (gdk_propagate_shapes): Bugfix,
assignment was used instead of equals in if test. Thanks to Hans
Breuer.

* gdk/win32/makefile.{cygwin,msc}
* gtk/makefile.{cygwin,msc}: Updates. Better kludge to get the
path to the Win32 headers that works also with the mingw compiler.

* gtk/gtkstyle.c: Include <string.h>.
2000-05-01 22:06:49 +00:00
Tor Lillqvist
ec1e8f1f5d Internal GDK error reporting changes: (gdk_win32_gdi_failed) New function
2000-03-07  Tor Lillqvist  <tml@iki.fi>

* gdk/win32/gdkmain-win32.c: Internal GDK error reporting changes:
(gdk_win32_gdi_failed) New function for reporting errors from GDI,
for which it is no use to call GetLastError on Win9x.
(gdk_other_api_failed) New function, for
general error reporting without calling GetLastError.
(gdk_win32_api_failed) OTOH, this function always calls
GetLastError. (gdk_win32_last_error_string) Remove this function,
GLib has the equivalent now.

* gdk/win32/gdkprivate-win32.h: Declare the above, and macros to
call them with function name, file name and line number in the
arguments.

* gdk/win32/*.c: Use the new macros for reporting errors from GDI
functions.

* gtk/gtk.def: Add some missing entry points.

* gtk/gtkcompat.h.in: Define gtk_paned_gutter_size and
gtk_paned_set_gutter_size, which don't exist any longer, as void.

Fixes by Hans Breuer:

* gdk/makefile.msc: Update for debugging.

* gdk/win32/gdkgc-win32.c (gdk_win32_gc_set_dashes): Fake
implementation, just use the PS_DASH, PS_DOT, PS_DASHDOT or
PS_DASHDOTDOT or PS_DASH styles depending on the number of entries
in the dash_list.

* gdk/win32/gdkwin32.h (GDK_FONT_XFONT): New macro, similar as in
the x11 backend.

* gdk/win32/gdkprivate-win32.h (IS_WIN_NT): New macro.

* gtk/testgtk.c: Include config.h, guard inclusion of unistd.h.
2000-03-08 06:18:41 +00:00
Tor Lillqvist
ff99eb7cc1 Add an extra parameter so that we don't have to do unnecessary settings to
2000-02-13  Tor Lillqvist  <tml@iki.fi>

* gdk/win32/gdkgc-win32.c (gdk_gc_predraw): Add an extra parameter
so that we don't have to do unnecessary settings to the HDC.

* gdk/win32/gdkdrawable-win32.c
* gdk/win32/gdkimage-win32.c: Corresponding changes to the calls of
gdk_gc_predraw.

* gdk/win32/gdkdrawable-win32.c: Special-casing for GdkGCs where
the fill style is GDK_OPAQUE_STIPPLED. In those cases we construct
GDI paths, call WidenPath to get the outline of the stroken path,
and then fill the outline (with the brush that was built from the
stipple).

* gdk/win32/gdkgc-win32.c: Factor out common code from
_gdk_win32_gc_new and gdk_win32_gc_set_values into
gdk_win32_gc_values_to_win32values.

* gdk/win32/gdkmain-win32.c (gdk_win32_last_error_string,
gdk_win32_api_failed): New functions for error logging.

* gdk/win32/gdkprivate-win32.h: Declare them, and a macro
WIN32_API_FAILED to call them, passing function or file name and
line number.

* gdk/win32/*.c: Use the WIN32_API_FAILED macro.

* gdk/win32/gdkprivate-win32.h: Store just the pixel values from
GdkColor for foreground and background in GdkGCWin32Data.

* gdk/makefile.cygwin: Link in the resource object separately.

* gdk/win32/rc/gdk.rc
* gtk/gtk.rc (New file)
* gdk/win32/makefile.cygwin
* gtk/makefile.cygwin: Update build number in DLLs automatically,
as in GLib.
2000-02-13 14:52:47 +00:00
Tor Lillqvist
0f5c8e857c New function. Guesstimate what Unicode subranges a font covers based on
1999-12-06  Tor Lillqvist  <tml@iki.fi>

* gdk/win32/gdkfont-win32.c (check_unicode_subranges): New
function. Guesstimate what Unicode subranges a font covers based
on the codepages. Windows tells us it covers. This will hopefully
help those Windows versions or fonts that don't give us any useful
Unicode subrange information with GetTextCharsetInfo. Call this
function in gdk_font_load_internal.

* gdk/win32/{gdkdnd,gdkimage,gdkpixmap,gdkprivate}-win32.c: Misc
minor changes.
1999-12-05 23:26:46 +00:00
Tor Lillqvist
8e06c4d7f4 Further hacking. Now actually compiles. Haven't tried yet whether
actually does anything useful... Time for bed.
1999-11-20 01:22:57 +00:00
Tor Lillqvist
eec6970fe2 Intermediate commit. I go to bed now. 1999-11-17 00:45:37 +00:00
Tor Lillqvist
638ebcee70 re-adding for manual rename of repository files. 1999-11-11 22:12:27 +00:00
Tor Lillqvist
84477de7fc Just renamed the Win32 backend files to *-win32. 1999-11-10 00:04:17 +00:00
Tor Lillqvist
f527b8909f Don't define HAVE_DIMM_H if MSC, as you have to get the Platform SDK to
1999-11-04  Tor Lillqvist  <tml@iki.fi>

* config.h.win32: Don't define HAVE_DIMM_H if MSC, as you have to
get the Platform SDK to get <dimm.h>.

* gdk/win32/gdkevents.c: More event handling fixes and
simplification. Never generate motion events with is_hint true. We
used to do that on bogus grounds earlier. Windows sends
WM_MOUSEMOVE messages on button events even if the mouse hasn't
moved, ignore these.

* gdk/win32/gdkfont.c: Load all fonts as (pretended) fontsets.

* gdk/win32/gdkglobals.c
* gdk/win32/gdkprivate.h: Define a typedef for the pointer to
the TrackMouseEvent function, and use it.

* gdk/win32/gdkwindow.c: Terminate widechar string with a zero
char before calling WideCharToMultiByte in order to get a string
for the window title.

* gdk/win32/gdkdnd.c: Some more random hacking, ifdeffed out.

* gdk/win32/gdk.def: Remove obsolete functions.

* gdk/win32/makefile.{cygwin,msc}: Remove gdkcompat.{o,obj}. Add
/nodefaultlib and /defaultlib switches.

* gtk/gtkrc.c: s/gwin_getlocale/g_win32_getlocale/.
1999-11-04 23:42:51 +00:00
Tor Lillqvist
00c5e83871 Add new keysyms from X11R6.4 (including EuroSign).
1999-10-31  Tor Lillqvist  <tml@iki.fi>

* gdk/gdkkeysyms.h: Add new keysyms from X11R6.4 (including
EuroSign).

* gdk/gdktypes.h: Add note about wchar_t not necessarily being the
same type as GdkWChar, especially on Win32.

* gdk/win32/*.c: Change gdk_root_parent to be a pointer.

* gdk/win32/*.c: Assume all strings are UTF-8. Convert to Unicode
before passing to Windows GDI for drawing etc. Convert to the
system default codepage before passing to Windows as window
titles.

* gdk/win32/gdkprivate.h: Add more fields to GdkWindowPrivate to
support changing input locale on the fly.

* gdk/win32/gdkevent.c: Support input language (keyboard locale)
on-the-fly changes. Convert incoming characters from the current
codepage to Unicode (and then to a UTF-8 multi-byte string) based
on the current input language. Use keysym<->Unicode mapping tables
and functions borrowed from xterm sources.

Support IMEs (Input Method Editors) for CJK languages. On non-CJK
editions of Win9x, use the ActiveX-based Active IMM (Input Method
Manager) if available. IMEs and the Active IMM are available under
the disguise of Chinese, Korean and Japanese support for IE and
Outlook Express from "Windows Update" for Win98. On Win2k, the CJK
support is present in all editions (as long as you install it).

Call DispatchMessage from gdk_events_queue() (and thus
gdk_WindowProc()), instead of duplicating the code in
gdk_WindowProc().

Reworked the grab handling and propagation code, factored out
duplicated code snippets into separate functions. Other cleanups,
too.

* gdk/win32/surrogate-dimm.h: Provide just the bits we need from
the <dimm.h> header describing the Active IMM.

* gdk/win32/gdkfont.c: Pretend to support fontsets, but so far
just do the same as for "single" fonts.

* gdk/win32/gdk.c: Call CoInitialize() (COM initialisation) from
gdk_init_check, and CoUninitialize() from gdk_exit_func. Handle
the new keysyms from gdkkeysyms.h.

* gtk/gtkfontsel.c (Win32): Load the font for the preview as a
fontset, so that gtkentry uses wide characters.

* gtk/gtkrc.c (Win32): Get the locale with gwin_getlocale(). Call
GTk+'s system directory "gtk+", not "gtk".
1999-10-31 21:35:39 +00:00
Tor Lillqvist
d23e3848a9 Corresponding changes as in X11 backend.
1999-10-05  Tor Lillqvist  <tml@iki.fi>

* gdk/win32/*.[ch]: Corresponding changes as in X11 backend.

* gdk/win32/gdkcompat.c: New file, actually provide an
implementation for the deprecated functions. (Just temporarily.)

* gtk/gtkfilesel.c: Fix an #ifdef syntax botch.

* gtk/makefile.{cygwin,msc}: Update gdk_headers.

* gdk/win32/gdk.def gtk/gtk.def: Updates.
1999-10-05 19:04:48 +00:00
Tor Lillqvist
c50941c82d Change GDK_WINDOWING_WIN32 usage to #ifdef also here.
1999-10-03  Tor Lillqvist  <tml@iki.fi>

* gdk/gdkimage.h gdk/gdkpixmap.h: Change GDK_WINDOWING_WIN32 usage
to #ifdef also here.

* gdk/win32/*.h gdk/win32/*.c: Make corresponding changes as those
Owen did to the X11 backend.

* gdk/win32/gdkdraw.c (gdk_draw_pixmap): Fix it again, don't use
ScrollWindowEx when blitting inside a window, it can't be correct
in the general case.

* gdk/win32/gdkevents.c: Don't handle WM_SIZING, handling
WM_GETMINMAXINFO is easier.

* gdk/win32/gdkimage.c (gdk_image_new): Create new image with
depth equal to the bitspixel value, not the visual's depth.

* gdk/win32/gdkvisual.c (gdk_visual_init): Set the visual's depth
to 24 even if the bitspixel value is 32.

* gdk/gdkrgb.c (gdk_rgb_select_conv): After the above change, no
need to check for depth==32 when bpp==32, depth will always be 24.
1999-10-02 22:42:58 +00:00
Tor Lillqvist
a6afd23c5b Mention using GNU gettext. Enable NLS stuff. Use GNU gettext. Minor header
* README.win32: Mention using GNU gettext.
	* config.h.win32: Enable NLS stuff.
	* gtk/makefile.msc: Use GNU gettext.
	* gdk/win32/gdkdnd.c: Minor header reorg.
	* gdk/win32/{gdkevents,gdkwindow}.c: No semantic changes, mainly
	cosmetics.
	* gtk/gtkrc.c (Win32): Make get_gtk_sysconf_directory() public.
	* gtk/gtkmain.c (Win32): Use it in bindtextdomain() call.
1999-06-14 21:43:53 +00:00
Tor Lillqvist
1c84483f3e Support added for building using a GNU toolchain on Win32,
gcc -mno-cygwin (egcs-1.1.2) on cygwin-b20.1.

	* gdk/win32/makefile.cygwin gtk/makefile.cygwin: New files.
	* config.h.win32: Changes for gcc.
	* gdk/gdkrectangle.c: Include gdk.h as <gdk/gdk.h>.
	* gdk/gdkcolor.c: config.h.win32 already defines strcasecmp.
	* gdk/win32/gdkconfig.h: Only the MS compiler has wctype.h.
	* gdk/win32/gdkdnd.c: Protect (unused) OLE2 stuff better.
	Protect shl stuff unavaiilable with mingw32 headers.
	* gdk/win32/gdkevents.c: Fix typo.
	* gdk/win32/gdkglobals.c: Use GDKVAR here also for gcc.
	* gdk/win32/gdkim.c: Use OEM code page for multibyte chars. (?)
	* gdk/win32/gdkinput.c: Use __try __except only with the MS compiler.
	* gdk/win32/gdkprivate.h: Make up for some stuff missing from
	the mingw32 headers.
	* gdk/win32/makefile.msc: Use latest Wintab kit and glib.
	* gtk/gtkfilesel.c: Include <glib.h> early, to get stat->_stat
	definition on Win32. Test for NATIVE_WIN32, not _MSC_VER.
	* gtk/gtkfontsel.c: Protect CHARSET redefinition on Win32.
	Test for NATIVE_WIN32, not _MSC_VER.
	* gtk/gtkmain.c: No use warning about developer version on Win32,
	there aren't any non-developer versions anyhow.
	* gtk/gtkrc.c: Test for NATIVE_WIN32, not _MSC_VER.
	* gtk/makefile.msc: Use pthread from another directory. Minor other
	changes.
1999-04-25 21:55:05 +00:00
Tor Lillqvist
d142187b38 Fixes to the win32 backend to actually be able to compile within a
directory hierarchy like this, with common gdk.h and gdktypes.h
for all backends. gdkrectangles.c and gdkrgb.c is copied before
compilation from the x11 backed (which still is in .., but
eventually will be in ..\x11).
1999-03-17 20:12:47 +00:00
Tor Lillqvist
9f3b82e178 Win32 version of GDK source files and resource files (cursors and icons). 1999-03-05 19:53:56 +00:00