Commit Graph

385 Commits

Author SHA1 Message Date
Tor Lillqvist
4658795817 More work on the Win32 backend. More files compile now. 2000-07-23 21:43:23 +00:00
Tor Lillqvist
a1260f864d Handle also WM_SYSCHAR, and other changes to get handling of Alt+nnn or
2000-07-04  Tor Lillqvist  <tml@iki.fi>

* gdk/win32/gdkevents-win32.c (gdk_event_translate): Handle also
WM_SYSCHAR, and other changes to get handling of Alt+nnn or
Alt+0nnn on the numpad (used to enter characters by numeric code
from current DOS or ANSI codepage) working correctly, as in other
Windows apps.

* gdk/win32/gdkcursor-win32.c (gdk_cursor_new_from_pixmap): Use
same argument validity tests as in X11 version.
(_gdk_cursor_destroy): Use DestroyCursor, not DestroyIcon.

* gdk/win32/gdkwin32.h: Add also WM_MOUSEWHEEL and CopyCursor
definitions in case missing from headers.

* gdk/win32/gdkwindow-win32.c (gdk_win32_window_destroy): ALso
destroy the window-specific cursor.
(RegisterGdkClass): Use the global gdk_ProgInstance instead of
calling GetModuleHandle(NULL).
(gdk_window_set_cursor): Reworked to always copy the passed cursor
with CopyCursor before setting it. It is OK for the caller to
destroy the GdkCursor (and thus also the Windows cursor) after
calling this function. Also, destroy any previous cursor for this
window.

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

* gdk/win32/gdkevents-win32.c (gdk_WindowProc): The local "event"
variable should be of type GdkEventPrivate.
2000-07-04 06:12:54 +00:00
Tor Lillqvist
8596f7edc5 Plug same refcount leaks as in the X11 backend.
2000-05-17  Tor Lillqvist  <tml@iki.fi>

* gdk/win32/gdkevents-win32.c (gdk_event_translate): Plug same
refcount leaks as in the X11 backend.

* gdk/win32/gdkgc-win32.c (gdk_win32_gc_set_values): Logging
cosmetics.

* gdk/win32/gdkwindow-win32.c: Similar changes as in X11
backend. Add _gdk_windowing_window_destroy().

* gtk/gtkcolorsel.c: Include correct backend-specific header.
Don't use XColor unless on X11. (No GDK_VISUAL_STATIC_COLOR
either, but these probably do exist on nanox?)

* gtk/gtkhsv.c: Use G_PI (fresh from <glib.h>) instead of M_PI
which isn't necessarily defined by <math.h>.

* gtk/gtkobject.c (gtk_object_init): Don't go up the class
ancestry past GtkObject.

* gtk/gtktypeutils.h: Mark GTK_TYPE_IDENTIFIER for export/import
from DLL on Win32.

* gtk/gtk.def: Update corresponding to recent changes.

* gtk/makefile.{cygwin,msc}: Updates.
2000-05-16 21:27:10 +00:00
Tor Lillqvist
cab7ca49d5 Define more message types missing from mingw headers.
2000-05-13  Tor Lillqvist  <tml@iki.fi>

* gdk/win32/gdkwin32.h: Define more message types missing from
mingw headers.

* gdk/win32/gdkevents-win32.c (gdk_event_translate): On WM_DESTROY
call gdk_window_destroy_notify(). It was never called. This
probably meant that the GdkWindow was never freed. Thanks Owen for
noticing (!).

* gdk/win32/gdkwindow-win32.c (gdk_window_internal_destroy): Mark
window as destroyed before calling DestroyWindow(). DestroyWindow()
causes a call to the window procedure (gdk_WindowProc), which
calls gdk_event_translate(), which calls
gdk_window_destroy_notify(), which gets confused unless the window
is set as destroyed.

* gdk/win32/gdkcolor-win32.c (gdk_win32_color_to_string): Rename
this function to indicate it's win32 only. Put inside #ifdef
G_ENABLE_DEBUG.

* gdk/win32/gdkevents-win32.c (gdk_win32_message_name): New
debugging function. (gdk_event_translate:) Add a default branch
that uses the above function to print debug messages with all
Windows messages symbolically.

* gdk/win32/gdkprivate-win32.h: Declare it, and
gdk_win32_color_to_string, but only if G_ENABLE_DEBUG.
2000-05-12 22:29:31 +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
0cc2a00dc9 Remove the #ifndef USE_DISPATCHMESSAGE sections, we do want to use
2000-03-17  Tor Lillqvist  <tml@iki.fi>

* gdk/win32/gdkevents-win32.c: Remove the #ifndef
USE_DISPATCHMESSAGE sections, we do want to use DispatchMessage.

* gdk/win32/gdkfont-win32.c
* gdk/win32/gdkproperty-win32.c
* gdk/win32/gdkselection-win32.c
* gdk/win32/gdkwindow-win32.c: Add const to some arguments that are
now declared such.
2000-03-16 21:58:35 +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
5a4e1abbfc Store just pixel value of background colour.
2000-03-04  Tor Lillqvist  <tml@iki.fi>

* gdk/win32/gdkprivate-win32.h (struct _GdkWindowWin32Data): Store
just pixel value of background colour.

* gdk/win32/gdkgc-win32.c (gdk_colormap_color): New function
containing code snippet previously duplicated in a couple of
places.

* gdk/win32/gdkdrawable-win32.c (gdk_win32_draw_points): Use
gdk_colormap_color.

* gdk/win32/gdkevents-win32.c (gdk_event_translate): Generate
GDK_SCROLL events for WM_MOUSEWHEEL messages. Don't generate
events for autorepeated Shift, Control and Alt keys. Use
gdk_colormap_color.

* gdk/win32/gdkwindow-win32.c (gdk_window_set_cursor): If the
pointer is inside the window the cursor of which we are setting,
call SetCursor immediately.

* gdk/win32/makefile.cygwin
* gtk/makefile.cygwin: If we don't have the build number stamp
file, use zero.

* gtk/gtkcompat.h.in: Define gtk_paned_gutter_size and
gtk_paned_set_gutter_size as empty.

* gtk/gtk.def: Remove gtk_paned_set_gutter_size.
2000-03-03 23:21:51 +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
e57b1afa2b Use g_filename_to_utf8 to convert the font names Windows gives us from
2000-02-04  Tor Lillqvist  <tml@iki.fi>

* gdk/win32/gdkfont-win32.c (logfont_to_xlfd): Use
g_filename_to_utf8 to convert the font names Windows gives us from
whatever is the default codepage to UTF-8.
(gdk_font_load_internal) Use g_filename_from_utf8 for conversion
in the other direction.

* gdk/win32/gdkgc-win32.c (gdk_win32_gc_set_values): Fix cut&paste
error in debugging output.

2000-02-02  Tor Lillqvist  <tml@iki.fi>

* gdk/win32/gdkwindow-win32.c (gdk_window_clear): Pass zero width
and height parameters to gdk_window_clear_area(). Not minus one.

2000-02-01  Tor Lillqvist  <tml@iki.fi>

* gtk/gtkfilesel.c: Use the g_filename_to_utf8 and
g_filename_from_utf8 functions (which were added a moment ago to
GLib). Some cleanups: Use gbooleans. Use GStrings instead of fixed
size buffers.

* gtk/gtkfilesel.h: Add comment about
gtk_file_selection_get_filename returning the filename in the C
runtime's encoding.

* README.win32
* gdk/gdk.def
* gdk/makefile.{cygwin,msc}
* gtk/gtk.def: Updates.

* gdk/gdkcursor-win32.c: Initialise refcount.
2000-02-03 01:19:03 +00:00
Tor Lillqvist
cf51b4790e The correct semantics (to mimic the X11 backend, which just calls
2000-01-19  Tor Lillqvist  <tml@iki.fi>

* gdk/win32/gdkwindow-win32.c (gdk_window_clear_area): The correct
semantics (to mimic the X11 backend, which just calls XClearArea)
is to check for zero width (and height), and in that case use the
window's width minus x (height minus y). This fixes for instance
some redraw problems with gtkclist, which were easily noticeable
in the gtk file selection widget.

(gdk_window_new): Don't set WS_EX_TOPMOST for dialog
windows.
2000-01-18 22:03:59 +00:00
Tor Lillqvist
605c562ffb gdk/win32/gdkprivate-win32.h gdk/win32/gdkevents-win32.c
1999-12-30  Tor Lillqvist  <tml@iki.fi>

* gdk/win32/gdkprivate-win32.h
* gdk/win32/gdkevents-win32.c
* gdk/win32/gdkinput-win32.c
* gdk/win32/gdkwindow-win32.c: Remove the superfluous
extension_events field in the GdkWindowWin32Data struct. Use only
the extension_events field in GdkWindowPrivate. Previously one was
set, and the other one tested, which broke tablet functionality.
1999-12-30 00:07:48 +00:00
Tor Lillqvist
9c00803e19 Must mark also gdk_error_warnings and gdk_error_code as GDKVAR, as they
1999-12-11  Tor Lillqvist  <tml@iki.fi>

* gdk/gdkprivate.h: Must mark also gdk_error_warnings and
gdk_error_code as GDKVAR, as they are referred outside GDK.

* gdk/win32/gdkinput-win32.c: Remove debugging leftover.

* gdk/win32/gdkwindow-win32.c (gdk_window_new): Assure title is
non-NULL.

* gtk/gtkdnd.c
* gtk/gtklayout.c
* gtk/gtkplug.c
* gtk/gtkselection.c
* gtk/gtksocket.c
* gtk/gtkwindow.c: Include x11/gdkx.h *or* win32/gdkwin32.c as
appropriate. There must be a cleaner way to handle this?

* gtk/gtkrc.c: Must include windows.h on Win32.

* gtk/testgtk.c: No need to include gdkx.h.

* gtk/makefile.cygwin: Correct invokation of genmarshal.pl.
1999-12-11 23:04:55 +00:00
Tor Lillqvist
143002cac5 Remove, as this is a file generated by configure (or copied from
1999-11-21  Tor Lillqvist  <tml@iki.fi>

* gdk/gdkconfig.h: Remove, as this is a file generated by configure
(or copied from gdkconfig.h.win32 on Win32, sigh).

* gdk/gdkprivate.h: Mark gdk_parent_root for export from DLL.

* gdk/gdkgc.c (gdk_gc_alloc): Remove duplicated line.
1999-11-21 22:56:37 +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
4c84db87d9 A few includes added for the picky MSVC compiler. 1999-10-02 22:53:45 +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
cf451eb447 Fix from Simon Kelley: Set expose_count in GdkEventExposes correctly.
* gdk/win32/gdkevents.c (gdk_event_translate): Fix from Simon
Kelley: Set expose_count in GdkEventExposes correctly.

* gdk/win32/gdkwindow.c: Remove dead code (#ifdef
MULTIPLE_WINDOW_CLASSES).

* gdk/win32/gdkdraw.c (gdk_draw_line): Workaround from Hans Breuer
for bug in NT, apparently NT *does* draw the end pixel, too, in
LineTo with a one-pixel pen, so we don't have to do it ourselves.
1999-08-23 18:53:11 +00:00
Tor Lillqvist
b52072a7f8 Improvements by Hans Breuer:
* gdk/win32/gdkwindow.c (RegisterGdkClass): New function

	* gdk/win32/gdkwindow.c (gdk_window_new): Use it. Don't set the
	CS_?REDRAW flags as they cause lots of (late) redraws when "show
	window contents while dragging" is turned on. Allocate at least
	one unique class for every GdkWindowType. If support for single
	window-specific icons is ever needed (eg. Dialog specific), every
	such window should get its own class.
1999-08-21 00:41:24 +00:00
Tor Lillqvist
0775c02e08 A couple of minor fixes, not worth any ChangeLog entry (?). 1999-08-06 19:13:08 +00:00
Tor Lillqvist
51046a9fbf README.win32 Add HAVE_WINTAB. Undefine it if bulding without the Wintab
* README.win32
	* config.h.win32: Add HAVE_WINTAB. Undefine it if bulding without
 	the Wintab SDK.

	* gdk/win32/gdkinput.c: Hack some more. Still doesn't quite work
 	OK, but getting closer. Guard against bogus tilt data from Wacom
 	ArtPad II with the 3.40 driver. Add ifdefs for HAVE_WINTAB to
 	enable easier building without Wintab.

	* gdk/win32/gdkinput.h
	* gdk/win32/gdkevents.c
	* gdk/win32/gdkwindow.c: Minor changes related related to above.

	* gdk/win32/gdkvisual.c: Simplify a lot, remove leftovers from X11
 	code. As we have just one visual on Win32, no sense to have it in a
 	table, and no need for the hash table.
1999-07-25 20:02:21 +00:00
Tor Lillqvist
e3c310e538 Less logging verbiage.
* gdk/win32/gdkdraw.c (gdk_draw_pixmap): Less logging verbiage.

	* gdk/win32/gdkevents.c: Fix long-standing bug in key
 	events. The key.string wasn't zero-terminated, still we strdup'ed
 	it in gdk_event_copy(). Synthesize crossing events for button
 	events before possible propagation.

	* gdk/win32/gdkwindow.c: Log gdk_window_set_title.

	* gdk/win32/makefile.cygwin
	* gtk/makefile.cygwin: Use new DLL naming style for the
 	GCC-compiled ones.

	* gdk/win32/makefile.msc
	* gtk/makefile.msc: Cosmetics mostly.

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

	* gtk/gtksocket.c: Add dummy gtk_socket_get_type() for Win32.
1999-07-12 23:12:39 +00:00
Tor Lillqvist
c9b2958b6c Don't draw anything if width or height is zero. Don't print a warning if
* gdk/win32/gdkdraw.c (gdk_draw_arc): Don't draw anything if width
 	or height is zero. Don't print a warning if Pie or Arc fails, they
	always fail (?) for very narrow ellipses.

	* gdk/win32/gdkdraw.c (gdk_draw_pixmap): Call InvalidateRgn for
 	the part or the destination window corresponding to source area
 	outside of the source drawable's boundary.

	* gdk/win32/gdkdraw.c (gdk_draw_lines, gdk_draw_polygon): Don't do
 	anything if less than two points.

	* gdk/win32/gdkselection.c (gdk_selection_owner_get): Always
 	return NULL. Gtk cut-and-paste inside a single program works
 	better this way. (It always gets the clipboard contents from
 	Windows, not from its own copy, which is cleared anyway. I can't
 	say I fully understand what happens... Emulating the X selection
 	and property stuff is a bit of a mess.)

	* gdk/win32/gdkevents.c
	* gdk/win32/gdkproperty.c: A bít more verbose logging.

	* gdk/win32/gdkregion.c: Fix some memory leaks (temporary regions
 	that never got deleted). Revamp gdk_region_shrink.

	* gdk/win32/gdkregion.c: Fix memory leak, delete temporary regions
 	after use.

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

	* gtk/gtkrc.c: Strip trailing directory separator from pixmap path
 	component.
1999-07-10 00:26:54 +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
16d002d074 AdjustWindowRectEx2 renamed to SafeAdjustWindowRectEx. Don't override all
* gdk/win32/gdkwindow.c: AdjustWindowRectEx2 renamed to
 	SafeAdjustWindowRectEx. Don't override all calls to
 	AdjustWindowRectEx by it, but use it only in two places: When
 	creating a new top-level window and when moving a top-level
 	window.

	Use screen coordinate rectangle, not client rectangle, in
 	gdk_window_move. Thus SafeAdjustWindowRectEx will do its job only
 	when we try to place a window so that the decoration (mainly,
 	title bar) isn't visible.

	These changes fix the bug that showed up for instance as the
 	GIMP's saved top-level windows moving right and down (by an amount
 	equal to the window decoration) for each session. This bug showed
 	up also in testgtk's "Saved Position".

	gdk_window_resize also redone a bit.
1999-05-30 02:15:33 +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
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