2005-02-24 Owen Taylor <otaylor@redhat.com>
* gdk/gdkwindow.c: Use cairo_set_device_offset().
* gdk/win32/gdkdrawable-win32.[ch] gdk/win32/gdkwindow-win32.c
gdk/win32/gdkpixmap-win32.c:
Add_gdk_win32_drawable_acquire/release_dc() to get a DC for the
drawable. Add _gdk_drawable_win32_finish() to clean up resources
when a drawable is destroyed.
* gdk/win32/gdkgc-win32.c gdk/win32/gdkdrawable-win32.c
(blit_from_pixmap) gdk/win32/gdkprivate-win32.h : Use
acquire/release_dc when getting a DC to use with a GC or for
blitting from a pixmap.
* gdk/win32/gdkdrawable-win32.[ch]: Implement ref_cairo_surface()
* gdk/win32/gdkpango-win32.c gdk/win32/gdkdrawable-win32.c Makefile.am:
Remove gdk_screen_get_pango_context(), draw_glyph[_transformed]
implementations.
* gdk/win32/gdkdrawable-win32.c: Remove
gdk_draw_rectangle_alpha_libgtk_only()
2002-02-17 Tor Lillqvist <tml@iki.fi>
* gdk/win32/*.c: Massive changes. Too many to list here, but I'll
try a summary:
1) Unify GdkPixmap and GdkImage implementation: For each
GdkPixmap, allocate a GdkImage, and vice versa.
GdkPixmapImplWin32Data has a pointer to the GdkImage.
GdkImage::windowing_data is a pointer to the GdkPixmap.
This simplifies many pixmap and image related functions a lot, and
reduces duplicated code snippets. For instance, there is only one
place in gdk/win32 where CreateDIBSection() is called, in the
function _gdk_win32_new_pixmap(). Converting a bitmap (GdkPixmap)
to a Windows region is almost trivial, with the bitmap bits being
readily accessible in the associated GdkImage.
All blitting between GdkPixmaps, GdkWindows and GdkImages goes
through handled the _gdk_win32_blit() function, which calls
different functions to handle the cases of blitting from pixmaps,
inside windows (scrolling), or from windows, which all require
somewhat different handling.
2) Support 256-color mode. This has long been very broken, now it
works more or less OK. Keep the logical palette for each colormap
as small as possible while allocating and freeing colors. Select
and realize the logical palette associated with a GdkColormap into
a DC before drawing or blitting.
When the display is in 256-color mode, make it possible for the
user to override the size of the palette(s) used with either the
GDK_WIN32_MAX_COLORS environment variable, or a -max-colors
command line option. It is possible to reduce the palette size all
the way down to using just the 16 static colors (which causes the
system visual to be of type GDK_VISUAL_STATIC_COLOR. This could
possibly be useful if one desperately wants to avoid color
flashing. (Note that in order for this to work properly, an as of
yet not commited fix to gdkrgb.c is needed.)
Handle the palette messages. On WM_PALETTECHANGED, call
UpdateColors() for the given window hierarchy. Do this only if a
window in some other top-level window hierarchy caused the palette
change (realized a palette). Do this max five times in a row (an
arbitrarily chosen limit), though, otherwise redraw by generating
expose events. On WM_QUERYNEWPALETTE, cause a redraw of the whole
window hierarchy by generating GDK_EXPOSE events.
3) Code cleanup in general. For instance, remove the "emulated"
X11 structs ColormapStruct, Visual and XStandardColormap. Use the
new GDK_DEBUG_* flags for debugging output in the relevant source
files. Remove the unused colormap hash table in gdkcolor-win32.c
4) Plug some resource leaks.
2002-02-14 Tor Lillqvist <tml@iki.fi>
* gdk/win32/gdkdnd-win32.c (gdk_dropfiles_filter): Use
g_filename_to_uri() to actually create legal URIs in the
text/uri-list data.
2001-10-29 Tor Lillqvist <tml@iki.fi>
* gdk/win32/libwntab32x.la: New file, hand-written wrapper for the
Wintab library.
* gdk/win32/gdkwin32.h
* gdk/win32/gdkprivate-win32.h: Reorganise to match corresponding
X11 headers better, and to enable gdkwin32.h to be installed and
included from applications, but not the *-win32.h headers.
* gdk/win32/*.c: Corresponding small changes, simplifications of
#includes.
* gdk/win32/gdkregion-win32.c: Remove.
* gdk/win32/gdkevents-win32.c (print_event): Add GDK_SETTING.
* gdk/win32/gdkfont-win32.c
* gdk/win32/gdkgeometry-win32.c: Remove unused variables.
* gdk/win32/gdkproperty-win32.c (gdk_atom_intern): Don't insert
GDK_NONE values into hash table.
Changes for autoconfiscated build on Win32, and addition of Win32
backend to the related files:
* gdk/win32/Makefile.am: Actually enable building the win32
objects here, not just list all files in EXTRA_DIST. Link in the
compiled resource file from rc/gdk-win32res.lo. If HAVE_WINTAB,
copy the Wintab library into the .libs directory.
* gdk/win32/gdkwindow-win32.c (RegisterGdkClass): Don't assume the
name of the GDK DLL when fetching the icon. Use the HMODULE saved
in gdk_dll_hinstance by DllMain.
* gdk/win32/rc/Makefile.am: Build gdk-win32res.lo using the
build/win32/lt-compile-resource script.
* gdk/win32/rc/gdk.rc.in
* gtk/gtk-win32.rc.in: Use the DLL name that libtool would use.
2000-07-23 Tor Lillqvist <tml@iki.fi>
More work on GDK for Win32. Still in an intermediate state.
* gdk/makefile.cygwin
* gdk/win32/makefile.cygwin: Removed.
* gdk/makefile.mingw.in
* gdk/win32/makefile.mingw.in: New files.
* gdk/Makefile.am
* gdk/win32/Makefile.am: Generate and distribute them.
* gdk/win32/gdkwindow-win32.h
* gdk/win32/gdkdrawable-win32.h
* gdk/win32/gdkpixmap-win32.h: New files.
* gdk/win32/gdkcolor-win32.c
* gdk/win32/gdkcursor-win32.c
* gdk/win32/gdkgc-win32.c
* gdk/win32/gdkimage-win32.c
* gdk/win32/gdkprivate-win32.h
* gdk/win32/gdkwin32.h: Update data structures. Cosmetics:
don't use fields and variables called xcursor, xid, etc (leftovers
from the X11 backend).