2002-01-09 Tor Lillqvist <tml@iki.fi>
* gdk/win32/gdkevents-win32.c (event_mask_string, print_event,
print_event_state): Use nifty macros.
(print_event_mask): Remove, use event_mask_string().
* gdk/win32/gdkselection-win32.c (gdk_text_property_to_text_list,
gdk_free_text_list, gdk_string_to_compound_text,
gdk_free_compound_text): Implement trivially, always as
single-element text list or single-component compound text.
2002-01-09 Tor Lillqvist <tml@iki.fi>
* gdk/win32/gdkselection-win32.c (gdk_selection_convert): Fix
non-ASCII paste from the clipboard: Try getting the same formats
from the Windows clipboard that gdk_property_change() puts there:
CF_UNICODETEXT, UTF8_STRING or CF_TEXT+CF_LOCALE.
2002-01-09 Tor Lillqvist <tml@iki.fi>
* gdk/win32/gdkselection-win32.c (gdk_selection_owner_set)
* gdk/win32/gdkselection-win32.c (gdk_selection_owner_get): Do
support PRIMARY. Seems to work fine after all (intra-app).
2002-01-09 Tor Lillqvist <tml@iki.fi>
* gdk/win32/gdkglobals-win32.c: New global variables
compound_text_atom, cf_rtf and cf_utf8_string.
* gdk/win32/gdkprivate-win32.h: Declare them.
* gdk/win32/gdkmain-win32.c: Initialise them.
* gdk/win32/gdkproperty-win32.c
* gdk/win32/gdkselection-win32.c: Use them.
2002-01-09 Tor Lillqvist <tml@iki.fi>
* gdk/win32/gdkselection-win32.c (gdk_selection_owner_set,
gdk_selection_send_notify, generate_selection_notify): Don't use
SendMessage to generate events for the same app, instead use
gdk_event_put().
* gdk/win32/gdkevents-win32.c (gdk_event_translate):
Correspondingly, for the messages that shouldn't come in any
longer, assert if one does. Will remove the
gdk_selection_*_msg variables and handling code completely
after a while.
2002-01-09 Tor Lillqvist <tml@iki.fi>
* gdk/win32/gdkim-win32.c (gdk_nwchar_ts_to_mbs): New function,
converts from a wchar_t string to UTF-8.
* gdk/win32/gdkprivate-win32.h: Declare it.
* gdk/win32/gdkevents-win32.c (build_keypress_event): Use it.
2002-01-08 Tor Lillqvist <tml@iki.fi>
Solve the Unicode issue with copying text to the Windows
clipboard. (Still need to add code for pasting from the
clipboard. That will be easy, but I'm tired now.)
* gdk/win32/gdkproperty-win32.c (gdk_property_change): When
storing text on the clipboard, handle non-ASCII text
correctly. The logic is as follows:
If we have only ASCII characters, use CF_TEXT.
Else, if we are on NT, use CF_UNICODETEXT.
Else (we are on Win9x), if all the characters are present in the
code page of some installed locale, use CF_TEXT and also set
CF_LOCALE to that locale.
Else (still on Win9x) store as RTF. We use a very simple RTF
string, just the text, no fonts or other crap, with the non-ASCII
characters as Unicode \uN keywords. Additionally, also store the
UTF-8 string as such, under the format "UTF8_STRING", so that GDK
can also paste from the Clipboard what it has copied there. (Thus
no need to implement any RTF parser.)
(find_common_locale): New function, implements the search for a
locale for case 3 above.
(gdk_property_delete): Don't declare gdk_selection_property_delete()
here.
* gdk/win32/gdkprivate-win32.h: Declare
gdk_selection_property_delete() here instead.
* gdk/win32/gdkselection-win32.c: Remove some unnecessary logging.
2002-01-06 Tor Lillqvist <tml@iki.fi>
Some bug fixes and cleanup of selection and DND functionality. Now
cut&paste inside an application works again. Removed attempts at
supporting the X11 PRIMARY selection -style cut&paste, can't be
made to work correctly anyway, and is "non-Windowsish".
There are still things that need to be fixed regarding the
clipboard and DND:
- Unicode issues. We currently bluntly store UTF-8 text as
CF_TEXT, and expect CF_TEXT to be UTF-8. This is very wrong, just
try to copy-paste non-ASCII text between a GTK+ app and Notepad,
for instance. Instead we should use CF_UNICODETEXT if we are on
NT. If on 9x, when storing into the clipboard, check if the string
can be represented in a single code page, and in that case use
that. Also, store CF_LOCALE data in the clipboard to (indirectly)
indicate that code page.
Problem: How to elegantly check what code page, if any, contains
all the Unicode characters in a string? What if there is no such
code page, don't store anything then?
Problem: In order to store CF_LOCALE data, how does one find a
language that uses the code page in question? Build a reverse
mapping table once, use that?
- Handling of non-text data in the clipboard. Not that I think
any relevant GTK+ application even tries to handle much else
than text on the clipboard?
- Need to add Archaeopteryx Software's OLE2 DND support.
* gdk/win32/gdkdnd-win32.c: Plug memory leaks, the
gdk_drag_context_ref() was called unnecessarily in a couple of
places, meaning drag contexts were never freed.
(gdk_drop_reply): For WIN32_DROPFILES drops, free the temporarily
stored file list.
* gdk/win32/gdkproperty-win32.c
* gdk/win32/gdkselection-win32.c: Now we don't try to support the
X11 PRIMARY selection -style cut&paste at all, it won't fit anyway
in the Windows cut&paste model. Only support CLIPBOARD style
cut&paste, which matches nicely with Windows Clipboard.
Clear up the use of the sel_prop_table. Now it is used only for
storing the GDK_SELECTION "properties".
The file names dropped with WM_DROPFILES -style DND is stored
temporarily (between the drop and the target picking them up) in a
separate place.
Have a separate hash table to map selection atoms to owner
windows. This used to be quite mixed up.
(sel_prop_store): Now static.
(gdk_win32_dropfiles_store): New function, to store the dropped
file list for the drop target to possibly fetch, and clear it
afterwards, from gdk_drop_reply().
(gdk_selection_owner_get): Much simplified now.
* gdkprivate-win32.h: Declare gdk_win32_dropfiles_store.
* gdkglobals-win32.c
* gdkmain-win32.c: gdk_selection_property is a GdkAtom, not
ATOM. Declare also text_uri_list_atom globally, initialise.
* gdkwindow-win32.c: Some lint cleanup (ambiguous else, unused
variables).
2001-12-28 Tor Lillqvist <tml@iki.fi>
* gdk/win32/gdkfont-win32.c: Use G_N_ELEMENTS().
(unicode_classify): Don't fail with an assertion on encountering
an unclassified character, but punt and return U_BASIC_LATIN.
2001-12-23 Tor Lillqvist <tml@iki.fi>
* gdk/win32/*.c: Lint cleanup.
Changes contributed by Archaeopteryx Software: This is the
first batch of their changes. Will commit more later.
* gdk/gdk.def: Add gdk_add_client_message_filter.
* gdk/gdkgc.c (gdk_gc_unref): Plug memory leak: g_free() the gc
after calling the destroy function.
* gdk/win32/*.c: Add more checks for failed GDI calls. If a call
fails, don't use bogus values.
* gdk/win32/gdkcursor-win32.c (_gdk_win32_data_to_wcursor): Plug
memory leak: g_free() the AND and XOR bitmaps after use.
(_gdk_cursor_destroy): Set the current cursor to none if we are
destroying it.
* gdk/win32/gdkevents-win32.c: Remove superfluous duplicate
definition of client_filters.
* gdk/win32/gdkwindow-win32.c (gdk_win32_window_destroy): If the
window has a cursor, and it is the current cursor, before
destroying it set the current cursor to none.
(gdk_window_foreign_new): If the window id is 0, return NULL.
(gdk_window_clear_area): Report ReleaseDC failure.
(gdk_window_set_cursor): Also here, set current cursor to none if
destroying the current cursor.
(gdk_window_get_pointer): Revamp logic.
2001-11-14 Tor Lillqvist <tml@iki.fi>
* gdk/gdkdrawable.h
* gdk/gdkdraw.c: Change gdk_drawable_get_data to return the data,
like in HEAD.
* gdk/gdkdnd.h
* gdk/win32/gdkdnd-win32.c: Implement GDK_DRAG_PROTO_LOCAL
(backport from HEAD).
* gdk/win32/gdkselection-win32.c: Also here some backported
changes for GDK_DRAG_PROTO_LOCAL.
2001-11-10 Tor Lillqvist <tml@iki.fi>
* gdk/win32/gdkgc-win32.c: Decrease size of pen and DC cache to 3
(from 5). Otherwise we get "ReleaseDC failed" errors on Win9x.
2001-11-08 Tor Lillqvist <tml@iki.fi>
* README.win32: Add headers. Add section about ActiveIMM.
* configure.in: Add --with-ie55 flag to specify the location of
the "IE55 libs and headers" package downloadable from Microsoft,
which contains, among other things, the Active IMM header dimm.h
and UUID library uuid.lib. Use test -f instead of AC_CHECK_FILE.
Require GLib 1.3.10.
* acconfig.h: Add HAVE_DIMM_H.
* config.h.win32: Add comment regarding dimm.h.
* gdk/Makefile.am
* gdk/win32/Makefile.am: Handle the uuid library from the IE55 lib.
* gdk/win32/gdkevents-win32.c: Conditionalize ActiveIMM stuff.
* gdk/win32/surrogate-dimm.h: Remove, use real dimm.h instead (if
available).
* gdk/win32/libie55uuid.la: New file, handwritten libtool wrapper
for uuid.lib. (Does it really have to be this hard to use an
existing library with libtool? Probably I am missing something.)
2001-11-06 Tor Lillqvist <tml@iki.fi>
* gtk+-zip.sh: Separate runtime and developer packages.
The following seems to fix Bug#60620:
* gdk/win32/gdkprivate-win32.h (struct _GdkWindowWin32Data): Add
owner thread id.
* gdk/win32/gdkwindow-win32.c (gdk_window_clear_area): Instead of
calling sending WM_ERASEBKGND to the window, call the window
procedure directly. Clean out the #if 0 cruft.
* gdk/win32/gdkdrawable-win32.c (gdk_win32_draw_drawable): If the
window is owned by another thread, don't call UpdateWindow(), but
post WM_PAINT to the thread.
2001-10-30 Tor Lillqvist <tml@iki.fi>
* gtk+-1.3-win32-production.pc.in
* gdk-1.3-win32-production.pc.in: Should not use @prefix@ elsewhere
than in definition of the 'prefix' variable. @exec_prefix@,
@libdir@ and @includedir@ are defined by configure to include
'${prefix}' (literally like that), so everything will work as
if by magic.
2001-10-28 Tor Lillqvist <tml@iki.fi>
* gdk-1.3-win32-production.pc.in (Cflags): Use correct
path to platform-dependent includes: ${libdir}/gtk+/include.
2001-10-28 Tor Lillqvist <tml@iki.fi>
* Makefile.am (SUBDIRS): Exclude docs, quick hack as there is no
texi2html on Cygwin (?).
* gdk/win32/Makefile.am (libgdk_win32_la_SOURCES): There is no
gdkdrawable-win32.h, gdkinput-win32.h, gdkpixmap-win32.h or
gdkwindow-win32.h.
* gdk/win32/Makefile.am
* gdk/win32/rc/Makefile.am: (files): New target.
* gdk/win32/rc/Makefile.am (EXTRA_DIST): There is no gdk.rc.in any
longer.
* README.win32: Updates.
* gtk+-zip.sh: New file.
2001-10-28 Tor Lillqvist <tml@iki.fi>
* configure.in: Check also $CC for -fnative-struct before adding
it, to avoid (harmless) duplication.
* gdk/gdkconfig.h.win32: Use configure-generated version.
* gdk/win32/gdkfont-win32.c (gdk_font_load_internal): Recognize
also the tcvn and tis620.2533 registries as indicating Vietnamese
and Thai charsets respectively. Also recognize "windows" or
"microsoft" registry with "vietnamese" or "thai" encoding.
* gtk/gtkrc.zh_TW.Big5: Delete, no need for encoding as part of
the locale name on Win32, as GTK uses Unicode.
* gtk/gtkrc.zh_TW: Add this instead.
* gtk/Makefile.am: Corresponding change.
* gtk/Makefile.am (install-data-local): Cannot use symbolic links
for gtkrc files. The non-cygwin gtk dll doesn't understand Cygwin
symbolic links.
* gtk/gtkrc.zh_CN: Look for the SimHei font. Otherwise we get a
match in Tahoma or somesuch, which claims to support the
GB2312_CHARSET, even if it doesn't.
2001-10-25 Tor Lillqvist <tml@iki.fi>
* gdk-1.3-win32-production.pc.in: Use just @prefix@.
(Cflags): Add libdir/gtk+.
* gtk+-1.3-win32-production.pc.in: Use just @prefix@.
2001-10-24 Tor Lillqvist <tml@iki.fi>
* gdk/win32/gdkcolor-win32.c (compare_xcolor_entries): Use
g_strcasecmp.
* {gdk,gtk}/makefile.{mingw,msc}.in
* gdk/win32/makefile.msc: Use the stuff from
build/win32. Fix typos and errors.
* config.h.win32: Define HAVE_DIRENT_H as mingw has it, and with
MSVC we use the same implementation, in build/win32/dirent.
2001-10-23 Tor Lillqvist <tml@iki.fi>
* gtk/gtkprivate.h
* gtk/gtkmain.c
* gtk/gtkrc.c: As G_HARDCODED_PATH_WRAPPER didn't make it into GLib
after all, write out its expansion when defining the _gtk_get_*
functions.
2001-10-23 Tor Lillqvist <tml@iki.fi>
* gtk-config.in: Remove.
* gdk-1.3-win32-production.pc.in
* gtk+-1.3-win32-production.pc.in: New files, use pkg-config.
* gdk/win32/libwntab32x.la: New file, handwritten libtool archive
for the Wintab library when available.
* Makefile.am: Install the pkgconfig files.
* config.h.win32
* acconfig.h: Add HAVE_WINTAB_H.
* acinclude.m4: Copy from HEAD.
* configure.in: Enable Win32 (mingw) builds. Test for Wintab API
(header and library). Changes to be more like the HEAD version.
* ltconfig
* ltmain.sh: Remove, not needed by libtool 1.4c, which I use for this.
* gdk/Makefile.am
* gdk/win32/Makefile.am
* gtk/Makefile.am: Changes for Win32 (mingw) builds. Install MS
and mingw import libraries.
* gtk/Makefile.am: Don't pass -release to libtool in
gtk/Makefile.am. This keeps DLL name simpler.
* {gdk,gtk}/makefile.{mingw,msc}: Remove.
* {gdk,gtk}/makefile.{mingw,msc}.in: Add these instead. Generate
same name DLLs as libtool does (libgdk-0.dll and
libgtk-0.dll). Import libraries are just libgdk.la and
libgtk.la.
* gdk/win32/*.c: Lint cleanups.
* gtk/gtkmain.c
* gtk/gtkrc.c: Use the G_WIN32_DLLMAIN_FOR_DLL_NAME and
G_HARDCODED_PATH_WRAPPER macros to get DLL name at runtime, and
determine installation subdirectories.
2001-03-08 Tor Lillqvist <tml@iki.fi>
* gdk\win32\Makefile.am (EXTRA_DIST): Remove the rc/*.cur files
that have been removed; add the new xcursors.h and bdfcursor.c
files.
2001-02-25 Tor Lillqvist <tml@iki.fi>
* gdk/win32/gdkevents-win32.c (gdk_pointer_grab): Set grabbing
cursor here. When mouse is captured, no WM_SETCURSOR messages are
sent. Copy the cursor before setting.
(print_event): Print out more details of crossing and focus change
events.
(synthesize_enter_or_leave_event, etc): Also pass the
GdkCrossingMode. Set focus field correctly.
(synthesize_leave_app_events): New function, to generate the
GDK_NOTIFY_NONLINEAR and GDK_NOTIFY_NONLINEAR_VIRTUAL leave events
when the pointer has moved to another app.
(gdk_event_translate): Use it for WM_NCMOUSEMOVE.
Handle WM_CAPTURECHANGED messages, for which we now generate
GDK_CROSSING_UNGRAB leave notifications, and destroy the grabbing
cursor.
At first I thought of handling WM_ACTIVATE messages about
deactivated windows to generate (normal) leave notifications, but
that is wrong (ifdeffed out).
Keep track of focus window.
* gdk/win32/gdkdrawable-win32.c (gdk_win32_draw_drawable): Correct
function name in GDK_NOTE call.
* gtk/gtkmenushell.c (gtk_menu_shell_leave_notify): If we think we
have the pointer grabbed, but get a GDK_CROSSING_UNGRAB leave
notification, deactivate. This happens on Windows when switching
apps. This now fixes menus being left active when switching apps.
By jpe@archaeopteryx.com:
* gtk/makefile.msc: Get gmodule library from right place.
* gtk/gtktable.c (gtk_table_attach): Backported fix from gtk+
1.2.something.
2001-02-23 Tor Lillqvist <tml@iki.fi>
* gdk/win32/bdfcursor.c: New file. A program that generates
xcursors.h. Thanks to Stefan Ondrejicka.
* gdk/win32/xcursors.h: New file, contains the X cursor font in a
compact format.
* gdk/win32/gdkcursor-win32.c (_gdk_win32_data_to_wcursor): New
function, uses xcursors.h.
(gdk_cursor_new): Use _gdk_win32_data_to_wcursor to generate
cursor from inline data instead of using LoadCursor() to generate
it from a resource.
* gdk/win32/gdkevents-win32.c (gdk_event_translate): At button up
event, must check the Windows message for mouse button state, as
the GDK event state might not have been built if it is
undelivered. Remove one goto.
* gdk/win32/gdkwindow-win32.c (gdk_window_set_cursor): Call
SetCursor() if the current cursor as returned by GetCursor() is
the window's previous cursor. The ChildWindowFromPoint() test
apparently didn't work correctly.
* gdk/win32/rc/*.cur: Remove.
* gdk/win32/rc/gdk.rc: Remove cursors.
2001-02-23 Tor Lillqvist <tml@iki.fi>
* gdk/gdk.def
* gdk/win32/gdkim-win32.c: Add gdk_ic_attr_{destroy,new}.
* gdk/win32/gdkimage-win32.c: Cache pens and HDCs. Many new
functions.
2001-02-23 Tor Lillqvist <tml@iki.fi>
From now on, changes to the Win32 production branch go into CVS
right away. This is the last batch of changes accumulated for some
time (since the 2000-12-26 snapshot).
* README.win32: Update.
* gdk/gdk.def: Add gdk_ic_attr_{destroy,new}.
* gdk/gdkdraw.c (gdk_drawable_unref): Remove silly leftover
debugging printout.
* gdk/win32/gdkfont-win32.c
* gtk/gtkfilesel.c
* gtk/gtkcalendat.c: Adapt to new API for
g_{filename,locale}_{from,to}_utf8.
* gdk/win32/gdkevents-win32.c (synthesize_crossing_events): New
implementaion that more closely mimics the events that an X server
would generate. Especially, properly generate GDK_NOTIFY_VIRTUAL and
GDK_NOTIFY_NONLINEAR_VIRTUAL crossing events. This makes buttons
with nested preview widgets, for instance, more responsive when
you move the mouse quickly into them.
(gdk_event_translate): Set send_event to the value of
InSendMessage (). This doesn't really mean the same as X11's
send_event flag, but is close enough, says jpe@archaeopteryx.com
* gdk/win32/gdkvisual-win32.c (gdk_visual_init): If the
environment variable GDK_WIN32_ENABLE_BROKEN_PSEUDOCOLOR_VISUAL is
set, do attempt to run on a palettized display.
* gtk/gtkmain.c (gtk_init_check): Use
g_win32_get_package_installation_subdirectory().
* gtk/gtkrc.c (get_gtk_sysconf_directory): Remove
(get_themes_directory): Use
g_win32_get_package_installation_subdirectory().
(gtk_rc_add_initial_default_files): Use
g_win32_get_package_installation_directory().
Optimisations by jpe@archaeopteryx.com:
* gdk/win32/gdkevents-win32.c: Implement better mouse
capturing. Do use SetCapture().
(find_window_for_pointer_event): New function.
(gdk_event_translate): Use it when handling mouse events.
* gdk/win32/gdkevents-win32.c (gdk_win32_erase_background): New
function, break out code from gdk_event_translate.
* gdk/win32/gdkdrawable-win32.c (struct gdk_draw_text_arg): Add a
total_len field.
(gdk_draw_text_handler): Don't call SelectObject() unless the font
would change. Don't call the slow GetTextExtentPoint32W() unless
necessary (when printing string in parts).
(gdk_win32_draw_text): Initialise total_len.
(gdk_win32_draw_drawable): Use new GC functions.
(gdk_win32_draw_segments): Use PatBlt() instead of LineTo() when
possible (solid single-pixel pen, R2_COPYPEN rop). It is claimed
to be much faster.
* gdk/win32/gdkfont-win32.c: Don't unnecessarily select and
unselect fonts in the global DC.
(gdk_text_width): Shortcut for strings of length one.
* gdk/win32/gdkgc-win32.c
* gdk/win32/gdkpixmap-win32.c: Cache pens and HDCs. Many new
functions.
* gdk/win32/gdkwindow-win32.c: Eliminate redraws when input-only
windows are shown and hidden. Don't call SetForegroundWindow() on
non-toplevel windows.
* gtk/gtklabel.c (gtk_label_finalize_lines): On Win32, draw
underlines at the font's descent - 1 under the baseline.
2000-12-26 Tor Lillqvist <tml@iki.fi>
Changes from the gtk+-src-20001226.zip snapshot:
* config.h.win32: Remove alloca stuff, handled in GLib.
* gdk/win32/gdkdrawable-win32.c (gdk_win32_draw_rectangle): Remove
some old ifdeffed-out code. Add a start on an implementation of
GDK_STIPPLED rectangles (incomplete, probably bogus, ifdeffed
out).
(gdk_win32_draw_polygon): Remove unused variable and dead code.
(gdk_win32_draw_segments): Ditto.
(gdk_win32_id): Remove.
(gdk_win32_print_dc_attributes): New debugging function.
* gdk/win32/gdkevents-win32.c: Adapt to new GLib main loop API.
Add support for the alternative wheel mouse protocol
(MSH_MOUSEWHEEL messages). Fix y coordinate bug in WM_MOUSEWHEEL
handler.
* gdk/win32/gdkfont-win32.c
* gtk/gtkfilesel.c: Adapt to new API for g_filename_{from,to}_utf8.
* gdk/win32/gdkgc-win32.c (gdk_win32_gc_values_to_win32values):
Enhance debuggint output.
(BitmapToRegion): Fix memory leak. Thanks to Andreas Kemnade.
(gdk_win32_cap_style_to_string,gdk_win32_fill_style_to_string,
gdk_win32_function_to_string,gdk_win32_join_style_to_string,
gdk_win32_line_style_to_string): New debugging functions.
* gdk/win32/gdkprivate-win32.h: Declare above new functions.
* gdk/win32/gdkvisual-win32.c (gdk_visual_init): Bail out if
palettized display mode. It has never worked correctly anyway.
* gtk/gtk.def: Updates.
* gtk/gtkcalendar.c (gtk_calendar_init): Convert day and month
names from current codepage to UTF-8.
2000-10-23 Tor Lillqvist <tml@iki.fi>
Changes from the gtk+-src-20001023.zip snapshot:
* gdk/win32/gdkcursor-win32.c (gdk_cursor_new_from_pixmap): Handle
also the case fg==white and bg==black (but still not randomly
coloured cursors). Thanks to Wolfgang Sourdeau.
* gdk/win32/gdkwindow-win32.c (gdk_window_clear_area): Use
SendMessage(), not SendNotifyMessage().
* gtk/gtk.def: Updates.
2000-10-07 Tor Lillqvist <tml@iki.fi>
Changes from the gtk+-src-20001007.zip snapshot:
* README.win32: Update.
* gdk\win32\gdkevents-win32.c: gdk_event_prepare() and
gdk_event_check() functions need an extra user_data parameter.
(inner_window_proc,gdk_WindowProc): Better debugging output.
(gdk_events_init): Don't register the g-pipe-readable message any
longer.
(gdk_event_translate): Handle more VK_OEM virtual keycodes. Bugfixes
for non-US keyboards.
(gdk_events_queue): Don't check for g_pipe_readable message.
* gdk\win32\gdkfont-win32.c (gdk_font_load_internal): Try to use
only TrueType fonts, and antialiasing.
* gdk\win32\gdkprivate-win32.h (VK_OEM_COMMA..VK_OEM_8): Define
here in case missing from headers.
* gdk\win32\gdkwindow-win32.c (gdk_window_clear_area): Some
testing coee, but ifdeffed out. Use SendNotifyMessage().
(gdk_window_set_cursor): Message if DestroyCursor() fails.
* gtk\makefile.cygwin
* gtk\gtk.def: Updates.
* gtk\gtkfilesel.c: Handle file names that are in the system
codepage when passed to/from the C library, converting back and
forth to the UTF-8 that GTK+ uses as necessary.
* gtk\gtkmain.h
* gtk\gtkmain.c (gtk_init_abi_check,gtk_init_check_abi_check):
(Win32) New functions. Calling gtk_init() and gtk_init_check()
from user code #defined to actually go to these wrappers that
first check if the compiler's idea of sizeof(GtkWindow) is the
same as when gtk was compiled. This catches not using gcc's
-fnative-struct switch.
2001-02-22 Tor Lillqvist <tml@iki.fi>
Started a CVS branch for the GTK+ in production use on
Windows. First the changes up to the gtk+-src-20000722.zip
snapshot:
2000-07-22 Tor Lillqvist <tml@iki.fi>
* gdk/gdkdraw.c (gdk_drawable_unref): One silly line of debugging
output.
* gdk/gdkfont.h: Declare new functions gdk_font_list_new(),
gdk_font_list_free(), gdk_font_full_name_get,
gdk_font_full_name_free(). Temporary hack only in Win32 branch.
* gdk/gdk.def
* gtk/gtk.def: Updates.
* gdk/makefile.cygwin
* gdk/win32/makefile.cygwin
* gtk/makefile.cygwin: Use factored-out common stuff from the
build module.
* gdk/win32/gdkcolor-win32.c (gdk_colormap_alloc1): Typo.
(gdk_win32_color_to_string): Rename, and compile only if
G_ENABLE_DEBUG.
* gdk/win32/gdkcursor-win32.c: Rename a few cursors in a desperate
attempt to fix some strange bug (?).
(gdk_cursor_new): Use LoadImage() instead of LoadCursor().
(_gdk_cursor_destroy): Use DestroyCursor() instead of
DestroyIcon().
* gdk/win32/gdkdnd-win32.c: Remove unneeded IID definitions.
(resolve_link): Compile also with gcc.
* gdk/win32/gdkdrawable-win32.c (gdk_win32_drawable_destroy): Add
g_assert_not_reached(), should not be called.
(gdk_win32_draw_arc): Don't try to draw too narrow arcs.
(gdk_win32_draw_segments,gdk_win32_draw_lines,gdk_win32_draw_lines):
Draw end pixel separately also for zero width pens.
(gdk_win32_id): New function.
* gdk/win32/gdkevents-win32.c: More debugging output enabled. Many
changes, for instance:
(gdk_WindowProc): Use a GdkEventPrivate variable, not GdkEvent.
(event_mask_string,decode_key_lparam,gdk_win32_message_name): New
debugging functions.
(build_key_event_state): Ifdefify out never reached code.
(build_keypress_event): Set GDK_CONTROL_MASK when appropriate.
(gdk_event_translate): Fix to enable input of chars with
Alt+numpad digits.
* gdk/win32/gdkfont-win32.c: Fix Unicode subrange table to match
reality.
(check_unicode_subranges): Guess more subranges in some cases.
* gdk/win32/gdkgc-win32.c (_gdk_win32_gc_new): Use 0 and 1 as
default fg and bg, not black and white. Use PS_ENDCAP_FLAT and
PS_JOIN_MITER pen style.
(predraw_set_foreground): Don't use zero width pens.
(gdk_gc_predraw): Better check whether to call SetROP2().
(gdk_win32_hdc_get,gdk_win32_hdc_release): New functions, wrappers
for gdk_gc_predraw() and gdk_gc_postdraw().
* gdk/win32/gdkim-win32.c (gdk_set_locale): Use g_win32_getlocale().
* gdk/win32/gdkimage-win32.c (gdk_image_new): Use the visual's
depth, not the bitspixel value.
* gdk/win32/gdkprivate-win32.h (STRICT): Guard against
redefinition.
(WM_MOUSEWHEEL..WM_AFXLAST): Define in case headers don't.
(gdk_win32_color_to_string,gdk_win32_message_name): Declare.
* gdk/win32/gdkproperty-win32.c
* gdk/win32/gdkselection-win32.c: Use DND debugging output
selector, not MISC.
* gdk/win32/gdkvisual-win32.c (gdk_visual_lookup,gdkx_visual_get):
Remove these unneeded functions.
* gdk/win32/gdkwin32.h: Wrap in extern "C" for C++. Update with
new function prototypes.
* gdk/win32/gdkwindow-win32.c (gdk_win32_window_destroy): More
debugging output. Destroy window's cursor here.
(RegisterGdkClass): Use gdk_ProgInstance instead of calling
GetModuleHandle(NULL).
(gdk_window_internal_destroy): Set destroyed flag before calling
DestroyWindow(), as that will call the window procedure, which
will call the GDK event generating mechanism. If I remember
correctly, this fixed a serious resource leak.
(gdk_window_set_cursor): Use NULL cursor if none is wanted, not an
arrow. Destroy old cursor. Copy the cursor before calling
SetCursor(), as it is normal to destroy the GdkCursor while it is
set in a window.
(gdk_propagate_shapes): Fix = vs. == bug.
* gdk/win32/makefile.msc (gdk.res): Define BUILDNUMBER as zero.
* gdk/win32/rc/gdk.rc: Rename the same two cursors here as in
gdkcursor-win32.c.
* gtk/gtkaccellabel.c (gtk_accel_label_class_init): Set
latin1_to_char FALSE on Win32 where we use UTF-8.
* gtk/gtkclist.c (gtk_clist_motion): Set x and y in all cases.
* gtk/gtklist.c (gtk_list_motion_notify): Ditto.
* gtk/gtkdnd.c (gtk_drag_set_default_icon): Unref correct object.
* gtk/gtkfontsel.c: Rewritten to use the temporary new GDK font
functions. Only in this branch.
* gtk/gtkhscrollbar.c (gtk_hscrollbar_calc_slider_size): Strange
hack to fix some bug, don't remember why, don't know if actually
needed any longer: hide and show slider.
* gtk/gtkvscrollbar.c (gtk_vscrollbar_calc_slider_size): Ditto
* gtk/gtkrc.{el,eo,he,hy,ru,tr,uk}: Specify font size in
decipoints instead of pixels.
* gtk/gtkrc.c (get_gtk_sysconf_directory): (Win32) Get GTK+
installation directory from Windows Registry.
* gtk/gtksignal.c: Export a couple of variables from DLL.
2000-12-15 Tor Lillqvist <tml@iki.fi>
* gdk/makefile.{mingw.in,msc} (gdk_OBJECTS): Add gdkkeys.
* gtk/gtk.def
* gdk/gdk.def: Update.
* gdk/win32/gdkmain-win32.c
* gdk/win32/gdkkeys-win32.c: New file. Move some functions from
gdkmain-win32.c here.
* gdk/win32/makefile.mingw.in (all): No need to make
gdk-win32res.o here, the makefile one step up will call us to make
it.
* gdk/win32/makefile.{mingw.in,msc} (gdk_win32_OBJECTS): Add
gdkkeys-win32.
* gdk/win32/gdkcolor-win32.c: Silence gcc -Wall.
* gdk/win32/gdkevents-win32.c (gdk_events_init): Remove leftover
call to g_source_add().
* gdk/win32/gdkgc-win32.c (BitmapToRegion): Plug memory
leak. Thanks to Andreas Kemnade.
2000-12-13 Havoc Pennington <hp@pobox.com>
* gtk/gtktextbtree.h: Put _ in front of every function in this
header file
* gtk/gtktext*.[hc]: update to reflect renamed btree functions