Commit Graph

110 Commits

Author SHA1 Message Date
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
b1c28ea656 Add more font private data.
1999-10-21  Tor Lillqvist  <tml@iki.fi>

* gdk/win32/gdkprivate.h: Add more font private data.

* gdk/win32/gdkfont.c
* gdk/win32/gdkdraw.c: Revamped handling of multi-byte charset
fonts and strings. Now works much better. You still have to
have a correct font selected, though. No fontset emulation yet.
1999-10-20 22:58:37 +00:00
Tor Lillqvist
018d098240 Don't use TextOutW for GDK_FONT_FONT fonts (which is all we have for now,
1999-10-14  Tor Lillqvist  <tml@iki.fi>

* gdk/win32/gdkdraw.c (gdk_draw_text_wc): Don't use TextOutW for
GDK_FONT_FONT fonts (which is all we have for now, we don't
emulate fontsets). The X11 version uses plain XDrawString in that
case, too. The string passed to gdk_draw_text_wc seems to be in
fact (at least, when used by gtkentry and gtktext) either in a
single-byte charset, or a DBCS. Not Unicode.

This fixes the problem in gtkfontsel, where even if you had
selected a font with a non-Latin1 charset (windows-greek, for
instance), the preview still used Latin-1 glyphs.

* gdk/win32/gdkfont.c (gdk_text_width_wc): Similar change. Don't
use GetTextExtentPoint32W, use GetTextExtentPoint32A.
(gdk_font_load): Recognize the demibold etc weights, even if we
don't have the corresponding constants in the headers.
(gdk_font_hash_insert): Use same hash mechanism as in the X11
version. Should save font resources a bit, when we don't have
multiple HFONTs for the same font.

* gdk/win32/gdkprivate.h: Add the names field as in the X11
version.
1999-10-13 21:46:33 +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
aafd722b21 Win32: Philippe Colantoni <colanton@aris.ss.uci.edu> suggests a way to get
1999-08-27  Tor Lillqvist  <tml@iki.fi>

Win32: Philippe Colantoni <colanton@aris.ss.uci.edu> suggests a
way to get window contents continually refreshed while resizing. I
didn't like the effects myself, so it's not on by default.

* gdk/win32/gdkprivate.h: New flag variable
gdk_event_func_from_window_proc, FALSE by default.

* gdk/win32/gdk.c (gdk_init_check): Set above flag if the
environment variable GDK_EVENT_FUNC_FROM_WINDOW_PROC is set, or we
are passed --gdk-event-func-from-window-proc.

* gdk/win32/gdkevents.c (gdk_WindowProc): If above flag is set,
and we have am event_func, call it instead of enqueing the event.
1999-08-26 22:22:03 +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
91ed4f809f Some bug fixes and improvements to the Win32 GDK. 1999-03-07 22:25:54 +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