Thu Jan 30 16:01:29 2003 Owen Taylor <otaylor@redhat.com>
* gdk/gdkrgb.c (gdk_rgb_try_colormap): Remove the
attempt-to-allocate then free code. To handle multiple
people allocating colors at the same time, we need
to just go ahead and try. (#102213, Shivram U)
Wed Jan 29 17:02:41 2003 Owen Taylor <otaylor@redhat.com>
* gdk/gdkkeyuni.c (get_decimal_char): Make the
translation of GDK_KP_Decimal dependent on LC_NUMERIC.
(#101225)
Wed Jan 22 14:18:46 2003 Manish Singh <yosh@gimp.org>
* gdk/x11/gdkevents-x11.c (translate_key_event): add a "return" at
the end of the function, so there is a statement following the "out"
label in all cases (fixes#101961)
2003-01-19 Tor Lillqvist <tml@iki.fi>
Merge from stable:
Fix for #103614 and some other problems with GtkFileSelection on
Windows:
* gtk/fnmatch.c (get_char): Need to use g_unichar_tolower(), not
g_ascii_tolower(). Windows file names are case-insensitive for all
Unicode letters.
* gtk/gtkfilesel.c: Instead of checking for G_OS_WIN32 or
G_WITH_CYGWIN, check G_PLATFORM_WIN32. Move inclusion of gtkintl.h
earlier, as it includes config.h unconditionally, and gtkprivate.h
redefines GTK_LOCALEDIR.
(struct _CompletionDirSent): Ifdef out the fields not used on
Windows.
(compare_utf8_filenames, compare_sys_filenames): Need different
comparison implementation for UTF-8 file names and system locale
file names on Win32. Cannot simply use g_ascii_strcasecmp(), but
need to casefold all Unicode letters.
(cmpl_completion_matches, open_dir, correct_parent): Ifdef out
variables not used on Win32 to avoid warnings about unused
variables.
(open_ref_dir): Use g_path_skip_root() to skip past potential
drive letter in front of the leading (back)slash.
(open_new_dir): Ifdef out use of CompletionDirSent fields not
there on Win32.
(correct_parent): Bypass inode check also on Cygwin.
Fix bug noticed by Alex Shaduri: Tooltips and other
GDK_WINDOW_TEMP windows were activated. This looked very odd, and
was a regression from earlier versions.
* gdk/win32/gdkwindow-win32.c (show_window_internal): Fine-tune
behaviour. Don't ever activate GDK_WINDOW_TEMP windows.
(gdk_window_move, gdk_window_resize): Add debug logging.
* gdk/win32/gdkevents-win32.c (gdk_event_translate): When we get a
WM_SIZE message for a non-visible (withdrawn) window, don't clear
the GDK_WINDOW_STATE_WITHDRAWN bit. The window is still withdrawn
even if its size changes.
2003-01-12 Tor Lillqvist <tml@iki.fi>
Merge from stable:
* gtk/gtkmain.c: Move inclusion of config.h and gtkintl.h earlier,
as gtkprivate.h redefines GTK_LOCALEDIR on Win32, for run-time
lookup.
* gdk/Makefile.am (libgdk_win32_2_0_la_DEPENDENCIES): Depend on
gdk.def.
* gdk/gdk.def
* gtk/gtk.def: Add some missing entries. Thanks to Kenichi SUTO.
* gtk-zip.sh.in (DEVZIP): Add bin/{gtk-query-immodules-2.0,
gtk-demo}.exe and share/gtk-2.0.
* gdk/win32/gdkwindow-win32.c (gdk_window_set_skip_taskbar_hint):
Implement by setting or clearing the WS_EX_TOOLWINDOW extended
window style.
(gdk_window_set_type_hint): Add all cases to the switch (not all
do anything, though). Handle GDK_WINDOW_TYPE_HINT_TOOLBAR by
calling gdk_window_set_skip_taskbar_hint(). This means that GTK
won't know that the skip_taskbar hint is on for the window, is
this bad?
Wed Jan 8 18:43:03 2003 Manish Singh <yosh@gimp.org>
* gdk/x11/gdkdisplay-x11.c: #include <stdlib.h> for putenv,
<string.h> for strlen.
* gdk/x11/gdkscreen-x11.c: #include <stdlib.h> for getenv,
<string.h> for strrchr.
* tests/testgtk.c (create_saved_position): "x" and "y" properties
for widgets no longer exist, use gtk_window_move instead.
* test/testtextbuffer.c (check_get_set_text): cast strlen to
int for g_error.
2003-01-05 Tor Lillqvist <tml@iki.fi>
* gtk-zip.sh.in: Use correct DLL and import library names, with
GTK_API_VERSION in name, not GTK_MAJOR_VERSION.GTK_MINOR_VERSION.
(DEVZIP): Add gdk-pixbuf-query-loaders.exe.
* configure.in: Improve check for dimm.h.
* configure.in: Set SOEXT to 'so' on Unix, 'dll' on Win32. Used in
gdk-pixbuf/Makefile.am.
* gdk-pixbuf/makefile.mingw.in
* gdk-pixbuf/pixops/makefile.mingw.in
* gdk/makefile.mingw.in
* gdk/win32/makefile.mingw.in
* gtk/makefile.mingw.in: Remove. Not maintained anyway.
* gdk-pixbuf/Makefile.am
* gdk-pixbuf/pixops/Makefile.am
* gdk/Makefile.am
* gdk/win32/Makefile.am
* gtk/Makefile.am
* configure.in: Remove makefile.mingw{,.in} from here, too.
* README.win32: Updates. Don't mention the now removed
makefile.mingw files.
* gdk/gdk.def
* gtk/gtk.def: Add a couple of missing entries.
* gdk/gdkkeynames.c: Include <string.h> for strcmp() and memcpy().
* gdk/win32/gdkevents-win32.c: Move dimm.h header clash workaround
earlier.
* gdk/win32/rc/Makefile.am: Add hack to help
build/win32/lt-compile-resource decide which kind of libtool
object file to produce.
2002-12-21 Tor Lillqvist <tml@iki.fi>
* gdk/win32/gdkwindow-win32.c (gdk_window_new): Move the code that
sets the window style and extended window style, and adjusts the
width and height to take the window decorations into account
earlier. The adjusted width and height used to be ignored. Remove
the local x, y, width and height variables, no need to further
confuse the code by having local copies. (Partial fix, I hope, for
#101588)
(gdk_window_move): When moving top-level windows, take title bar
and border width into account, offsetting the coordinates before
calling SetWindowPos().
(gdk_window_set_decorations, gdk_window_set_functions):
Reimplement, taking into account the peculiar semantics of
GDK_DECOR_ALL and GDK_FUNC_ALL. (#79036)
(gdk_window_get_decorations): Implement. (#98981)
(gdk_window_set_type_hint): When setting
GDK_WINDOW_TYPE_HINT_MENU, call gdk_window_set_decorations().
(#79036)
* gdk/gdk.def: Add gdk_window_get_decorations. (#98981)
Thu Dec 19 11:42:00 2002 Owen Taylor <otaylor@redhat.com>
* gdk/x11/gdkevents-x11.c (gdk_event_translate): Call
the filters on the window where the event is received,
not on the window the event is "about". (#101512,
Bolian Yin.)
2002-12-17 Tor Lillqvist <tml@iki.fi>
* gdk/win32/gdkglobals-win32.c: Minor cosmetics.
Implement two missing functions (#101369)
* gdk/win32/gdkevents-win32.c
(gdk_display_add_client_message_filter): Implement by calling
gdk_add_client_message_filter(), no separate displays on Windows,
at least not yet.
* gdk/win32/gdkgc-win32.c (gdk_gc_get_screen): Implement by
returning the only screen so far, _gdk_screen.
Sat Dec 14 22:18:45 2002 Owen Taylor <otaylor@redhat.com>
* gdk/x11/gdkwindow-x11.c (gdk_window_get_frame_extents):
Fix a bug with checking the private flag on the wrong
window; improve the answer on failure a bit; push
an error trap around the X operations. (#100933)
Fri Dec 13 23:58:06 2002 Owen Taylor <otaylor@redhat.com>
* gdk/gdkscreen.c (gdk_screen_get_monitor_at_point)
* gdk/gdkscreen.c (gdk_screen_get_monitor_at_window):
Provide a useful fallback on failure - return a monitor
close to the point or window. (#79991)
* gtk/gtkmenu.c (gtk_menu_position): Remove a now
unneeded check for failure of
gdk_screen_get_monitor_at_point()
2002-12-11 Tor Lillqvist <tml@iki.fi>
* gdk/win32/gdkpixmap-win32.c (gdk_pixmap_new,
gdk_bitmap_create_from_data, gdk_pixmap_create_from_data)
* gdk/win32/gdkprivate-win32.h
* gdk/win32/gdkimage-win32.c (_gdk_win32_setup_pixmap_image):
Functions now take a GdkDrawable instead of GdkWindow parameter,
like in X11 and linux-fb backends (#100780)
* gdk/win32/gdkwindow-win32.c (get_default_title): Do use
g_get_application_name() (I now have a fresh enough GLib).
Tue Dec 10 15:46:01 PST 2002 Manish Singh <yosh@gimp.org>
* gdk/x11/gdkwindow-x11.c (set_initial_hints):
gdk_x11_get_xatom_by_name_for_display takes a GdkDisplay *,
not an XDisplay * (obvious typo fix for the previous commit)
* gdk/x11/gdkwindow-x11.c (set_initial_hints): Delete EWMH
properties if no private->state flags are set. (#66754)
* gtk/gtkwidget.c (gtk_widget_class_find_style_property):
* gtk/gtkcontainer.c (gtk_container_class_find_child_property):
Doc typo fixes.
* gtk/tmpl/gtktextview.sgml: Add docs.
* gtk/tree_widget.sgml: Fix some links.
* gtk/tmpl/gtkwindow.sgml: Add docs.
* gtk/tmpl/gtkeditable.sgml: Document GtkEditable as an interface,
not as an abstract base class.
* gtk/gtk-docs.sgml: Move GtkEditable from "Abstract Base Classes"
to "Numeric/Text Data Entry".
Tue Dec 10 14:37:41 2002 Owen Taylor <otaylor@redhat.com>
* gdk/x11/gdkevents-x11.c (gdk_event_translate)
gdk/x11/gdkwindow-x11.h: Separate out tracking of the X server
focus window from tracking our idea of what the focus window is,
because the PointerRoot code needs to know the real pointer
window. (Mostly accidentally committed a bit earlier.)
Mon Dec 9 18:50:31 2002 Owen Taylor <otaylor@redhat.com>
* gdk/x11/gdkinput-x11.c (_gdk_input_common_find_events):
Remove selection for DeviceButtonRelease, we no longer need
it now that gxi is gone. (#32617, reported by Garry
Osgood)
Tue Dec 10 00:49:35 2002 Kristian Rietveld <kris@gtk.org>
* gdk/gdkpixmap.h (gdk_pixmap_new), (gdk_bitmap_create_from_data),
(gdk_pixmap_create_from_xpm), (gdk_pixmap_colormap_create_from_xpm),
(gdk_pixmap_create_from_xpm_d),
(gdk_pixmap_colormap_create_from_xpm_d): update to allow a
GdkDrawable instead of a GdkWindow.
* gdk/gdkpixmap.c (gdk_pixmap_colormap_create_from_xpm),
(gdk_pixmap_create_from_xpm), (gdk_pixmap_colormap_create_from_xpm_d),
(gdk_pixmap_create_from_xpm_d): update to allow a GdkDrawable
instead of a GdkWindow.
* gdk/linux-fb/gdkpixmap-fb.c (gdk_pixmap_new),
(gdk_bitmap_create_from_data), (gdk_pixmap_create_from_data): update
to allow a GdkDrawable instead of a GdkWindow.
* gdk/x11/gdkpixmap-x11.c (gdk_pixmap_new),
(gdk_bitmap_create_from_data), (gdk_pixmap_create_from_data): likewise
Mon Dec 9 10:44:59 2002 Owen Taylor <otaylor@redhat.com>
* gdk/x11/gdkcolor-x11.c (gdk_colormap_alloc_colors_private):
Fix a bug in one of my earlier changes. (From Naofumi Yasufuku,
#100023)
Sun Dec 8 21:43:31 2002 Owen Taylor <otaylor@redhat.com>
* gdk/x11/gdkcolor-x11.c: Fix spacing in a bunch of
for (i=0; i<ncolors; i++).
* gdk/x11/gdkcolor-x11.c: Various g_return_if_fail()
cleanup.
Sun Dec 8 21:29:10 2002 Owen Taylor <otaylor@redhat.com>
* gdk/x11/gdkcolor-x11.c (gdk_colormap_alloc1): Fix
a lost refcount in the case where we get a duplicate
back from the X server.
* gdk/x11/gdkcolor-x11.c (gdk_colormap_alloc_colors_writeable):
Set success[] for all colors when allocation of colors
cells via XAllocColorCells succeeds.
* gdk/x11/gdkcolor-x11.c (gdk_colormap_alloc_colors_private):
Don't match against colors cells allocated writeable.
Sun Dec 8 21:22:46 2002 Owen Taylor <otaylor@redhat.com>
* gdk/x11/gdkcolor-x11.c (gdk_colormap_alloc_colors_private):
When allocating non-writeable colors, fill in the flags
field of the XColor, and insert the returned color into
our color hash. (#100023, Naofumi Yasufuku)
* gdk/x11/gdkcolor-x11.c (gdk_colormap_free_colors):
Fix a typo (my fault) that slipped in in the last patch.
Sun Dec 8 20:32:23 2002 Owen Taylor <otaylor@redhat.com>
More fixes for GdkColormapX11 (#100023, Naofumi Yasufuku)
* gdk/x11/gdkcolor-x11.c (gdk_colors_free)
(gdk_colormap_free_colors): Don't call XFreeColors() for
private colorsmaps.
* gdk/x11/gdkcolor-x11.c (gdk_colormap_alloc_colors_writeable,
gdk_colormap_colors_private, gdk_colormap_alloc_colors_shared):
Fix return values to return number remaining not number
allocated.
* gdk/x11/gdkcolor-x11.c (gdk_colormap_alloc_colors_shared,
gdk_colormap_alloc_colors_private): Clean up some a stray
initializations.
Sun Dec 8 20:19:22 2002 Owen Taylor <otaylor@redhat.com>
Fixes for GdkColormapX11 (#100023, Naofumi Yasufuku)
* gdk/x11/gdkcolor-x11.c (gdk_x11_colormap_foreign_new):
Fix typo that caused us to always return the system
colormap.
* gdk/x11/gdkcolor-x11.c (gdk_colormap_new): When allocating
a private colormap and copying the system palette
to prevent flashing, handle colormap->size greater than
system_colormap->size.
* gdk/x11/gdkcolor-x11.c (gdk_x11_colormap_get_xdisplay):
Get rid of the last remains of private->xdisplay
in favor of using private->screen.
2002-12-09 Tor Lillqvist <tml@iki.fi>
Merge from stable:
* gdk/win32/gdkdrawable-win32.c (generic_draw): Don't leak
stipple_gc. More checks for errors. Use correct ternary ROP when
blitting the foreground into the tile pixmap onto those pixels
where the stipple is set. (I didn't notice that I had used the
wrong one, as it didn't matter on Win2k, where DIB sections
apparently are zeroed upon creation. But on Win98 they have random
initial contents. Thanks to Hans Breuer for reporting this.)
(gdk_win32_draw_rectangle, gdk_win32_draw_arc,
gdk_win32_draw_polygon): Don't pass the LINE_ATTRIBUTES bits to
generic_draw() if drawing a filled figure.
* gdk/win32/gdkmain-win32.c (_gdk_win32_print_dc): Minor cosmetics.
(_gdk_win32_gcvalues_mask_to_string): Initialize buffer as empty.
(_gdk_win32_window_state_to_string): New debugging output helper
function.
* gdk/win32/gdkevents-win32.c: Minor debugging output changes.
(gdk_event_translate): Ignore the WM_SHOWWINDOW/SW_OTHERUNZOOM or
SW_OTHERZOOM messages. Do not generate a GDK_UNMAP event for
WM_SIZE/SIZE_MINIMIZED messages, they do not really corrspond to
unmapping on X11. Set window state correctly for all three of
SIZE_{MINIMIZED,MAXIMIZED,RESTORED}. A maximized and then iconified
("minimized" in Windows terminology) window still has the
"maximized" property, i.e. when deiconified, it will reappear as
maximized. (#10557)
* gdk/win32/gdkprivate-win32.h: Declare new function.
(WIN32_API_FAILED, WIN32_GDI_FAILED, OTHER_API_FAILED): Don't use
__PRETTY_FUNCTION__ if __GNUC__ >= 3, to avoid warning message.
* gdk/win32/gdkwindow-win32.c (show_window_internal): Handle more
situations. Add parameter to tell whether deiconifying. Code
reorg: Return early when appropriate instead of using nested if
statements. If just deiconifying without raising, restore active
window. (#10557)
(gdk_window_hide, gdk_window_withdraw, gdk_window_iconify,
gdk_window_deiconify, gdk_window_maximize, gdk_window_unmaximize,
gdk_window_focus): Use _gdk_win32_window_state_to_string() in
debugging output.
(gdk_window_iconify): Restore active window after calling
ShowWindow(). Otherwise the "next" window gets activated.
(gdk_window_stick, gdk_window_unstick): Don't output any warnings.
(gdk_window_set_transient_for): Rewrite. Just call SetWindowLong()
with GWL_HWNDPARENT, which despite its name sets the *owner*
window, which should be exactly what we want. The PSDK
documentation is said to be misleading. testgtk's modal window
test now works much better. (#50586)
Fri Dec 6 17:50:57 2002 Owen Taylor <otaylor@redhat.com>
* gdk/gdkpixmap.c (PACKED_COLOR): Fix incorrect
masks in PACKED_COLOR definition. (#99795,
John Finlay)
Wed Dec 4 14:31:46 2002 Owen Taylor <otaylor@redhat.com>
* gdk/x11/gdkdnd-x11.c: Always look up and create the
Motif drag window as a child of the root window of screen 0
rather than the default screen. (#100362, Erwann Chenede)
* gdk/x11/gdkdnd-x11.c (motif_read_initiator_info):
Return FALSE, not GDK_FILTER_REMOVE on failure; this
isn't a filter function.
* gdk/x11/gdkselection-x11.c gtk/gtkselection.c: Add
some g_return_if_fail() to catch selection == None more
gracefully than an X error.
Tue Dec 3 17:47:24 2002 Owen Taylor <otaylor@redhat.com>
* gdk/x11/gdkgeometry-x11.c (gdk_window_guffaw_scroll): Fix wrong
sign for queued translation. (Found by Chris Blizzard,
#100274)
Mon Nov 25 17:44:09 2002 Owen Taylor <otaylor@redhat.com>
Fixes from #98358, Havoc Pennington.
* gdk/{x11,win32,linux-fb}/gdkcolor-*.c (gdk_colormap_finalize):
Free the private structure.
* gdk/x11,win32,linxu-fb}/gdkscreen-*.c (gdk_screen_set_default_colormap):
gdk/x11/gdkwindow-x11.c (_gdk_windowing_window_init):
Keep a ref to the default colormap.
* gdk/x11/gdkscreen-x11.c (gdk_screen_x11_dispose): Unref
the default colormap.
* gdk/x11/gdkwindow-x11.c (gdk_window_impl_x11_set_colormap):
Handle the CMAP == NULL case even when the window is
destroyed.
* gdk/x11/gdkwindow-x11.c (_gdk_windowing_window_init):
Add a missing ref for the system colormap.
2002-11-25 Tor Lillqvist <tml@iki.fi>
* gdk/win32/gdkevents-win32.c (print_event_state,
print_window_state, print_event): Enclose in #ifdef
G_ENABLE_DEBUG, as they use functions only available with
G_ENABLE_DEBUG, and are called only when G_ENABLE_DEBUG. (#99494,
Arnaud Charlet)
Mon Nov 25 16:58:27 2002 Owen Taylor <otaylor@redhat.com>
* gdk/x11/gdkwindow-x11.c: Use _NET_WM_WINDOW_TYPE_SPLASH,
not TYPE_SPLASHSCREEN. (#99482, Gregory Merchan)
2002-11-24 Tor Lillqvist <tml@iki.fi>
Merge from stable:
Implement tiles and stipples for all drawing methids (except the
deprecated draw_text() and draw_text_wc()).
* gdk/win32/gdkdrawable-win32.c: Remove the already ifdeffed-out
code that didn't use generic_draw().
(generic_draw): When drawing into the mask (for tiled/stippled
fill styles), copy the line attributes from the actual GC. Also
ask for text drawing setup if needed. Use differently set up HDCs
in the normal and tiled/stippled cases.
(draw_lines, gdk_win32_draw_lines, draw_polygon,
gdk_win32_draw_polygon, draw_segments, gdk_win32_draw_segments,
draw_arc, gdk_win32_draw_arc): Use generic_draw(), thus
implementing tiled and stippled fill styles for lines, polygons,
segments, and args.
(gdk_win32_draw_points): Use Rectangle() instead of
SetPixel(). Rectangle() uses the function (raster op) set for the
HDC, SetPixel() doesn't.
(widen_bounds): New function, refactoring.
* gdk/win32/gdkgc-win32.c: Remove ifdeffed-out code.
(predraw_set_foreground, gdk_win32_hdc_get): Some code moved
around. Call SetROP2() only if necessary. Call SetTextColor() only
if GDK_GC_FOREGROUND flag present. Don't handle
GDK_OPAQUE_STIPPLED here, has been superseded by the code in
generic_draw(). Always create a solid brush.
Remove background color handling from here. The background color
of a GdkGC is supposed to affect only GDK_OPAQUE_STIPPLED fill
style, which it is already handled in generic_draw(), and
GDK_LINE_DOUBLE_DASH lines, which aren't implemented properly
anyway. Calling SetBkColor() is unnecessary as we always use
TRANSPARENT text output.
(gdk_win32_hdc_get, gdk_win32_hdc_release): Add doc comments, as
these are public functions.
* gdk/win32/gdkevents-win32.c (synthesize_expose_events): Don't
synthesize expose events for GDK_INPUT_ONLY windows.
(gdk_event_translate): On WM_SIZE, call
gdk_synthesize_window_state() if window was iconified, restored or
maximized. (#98983, Arnaud Charlet)
* gtk+/gdk/win32/gdkwindow-win32.c
(gdk_window_get_frame_extents): Fix typo in setting y. (#98983,
Arnaud Charlet)
* gdk/x11/gdkcursor-x11.c (gdk_cursor_new_from_pixmap):
Remove period from title of example in docs.
* gdk/tmpl/x_interaction.sgml:
* gdk/tmpl/pango_interaction.sgml:
* gdk/tmpl/input_devices.sgml:
* gdk/tmpl/input.sgml:
* gdk/tmpl/threads.sgml:
* gdk/tmpl/properties.sgml:
* gdk/tmpl/dnd.sgml:
* gdk/tmpl/selections.sgml:
* gdk/tmpl/keys.sgml:
* gdk/tmpl/event_structs.sgml:
* gdk/tmpl/events.sgml:
* gdk/tmpl/windows.sgml:
* gdk/tmpl/cursors.sgml:
* gdk/tmpl/fonts.sgml:
* gdk/tmpl/colors.sgml:
* gdk/tmpl/pixbufs.sgml:
* gdk/tmpl/images.sgml:
* gdk/tmpl/pixmaps.sgml:
* gdk/tmpl/drawing.sgml:
* gdk/tmpl/regions.sgml:
* gdk/tmpl/gdkdisplaymanager.sgml:
* gdk/tmpl/gdkscreen.sgml:
* gdk/tmpl/gdkdisplay.sgml:
* gdk/tmpl/general.sgml:
Add missing short descriptions, standardize them to start with
a capital and end without a period. Also remove periods from
titles of examples.
Sun Nov 17 13:45:08 2002 Manish Singh <yosh@gimp.org>
* gdk/Makefile.am: add -DGDK_DISABLE_DEPRECATED
* gdk/gdk.c (gdk_exit): remove obsolete comment
* gdk/gdk.h: declare gdk_input_add_full if GTK_COMPILATION for
gtk_input_add_full
* gdk/gdkcolor.c (gdk_color_white, gdk_color_black): use
gdk_colormap_alloc_color instead of gdk_color_alloc
* gdk/gdkcolor.h: declare gdk_colormap_change if GDK_COMPILATION for
gdk_colors_store. Also, gdk_colors_{alloc,free} for
gdk_rgb_try_colormap
* gdk/gdkdrawable.h: declare gdk_draw_string if GTK_COMPILATION for
gtk_default_draw_string. Also, gdk_draw_text and gdk_draw_text_wc
if GDK_COMPILATION for the respective gdk_window_ and gdk_pixmap_
functions.
* gdk/gdkfont.c: #undef GDK_DISABLE_DEPRECATED, completely compat
code here
* gdk/gdkfont.h: allow the GdkFont structure and a few gdk_font_
functions for compat code in GDK_COMPILATION and GTK_COMPILATION.
* gdk/gdkrgb.c (gdk_rgb_cmap_fail, gdk_rgb_try_colormap): use
gdk_colormap_free_colors instead of gdk_colors_free.
* gdk/gdkrgb.c (gdk_draw_rgb_image_core): no need to set fg/bg
for own_gc, unused.
* gdk/gdkwindow.h: declare gdk_window_get_deskrelative_origin if
GTK_COMPILATION for gtk_handle_box_button_changed.
* gdk/x11/Makefile.am: add -DGDK_DISABLE_DEPRECATED, renmae
-DINSIDE_GDK_X11 to -DGDK_COMPILATION
* gdk/x11/gdkcolor-x11.c: remove duplicate doc string for
gdk_colormap_alloc_colors.
* gdk/x11/gdkfont-x11.c: #undef GDK_DISABLE_DEPRECATED, completely
compat code here
* gdk/x11/gdkx.h: use GDK_COMPILATION instead of INSIDE_GDK_X11,
allow a few gdk_x11_font_ functions if GDK_COMPILATION for compat
code
* gtk/Makefile.am: add -DGDK_DISABLE_DEPRECATED
* gtk/gtkclist.c
* gtk/gtkctree.c
* gtk/gtkpixmap.c
* gtk/gtkpreview.c
* gtk/gtktext.c: #undef GDK_DISABLE_DEPRECATED, deprecated widget
* gtk/gtkhandlebox.c (gtk_handle_box_motion): use
gdk_window_set_geometry_hints instead of gdk_window_set_hints.
* gtk/gtkmain.c (gtk_exit): call exit directly
* gtktipsquery.c (gtk_tips_query_real_start_query)
* gtk/gtktreeitem.c (gtk_tree_item_add_pixmaps): remove some
deprecated GDK usage.
2002-11-16 Tor Lillqvist <tml@iki.fi>
* gdk/gdk.def: Add missing entries, needed by gtk.
* gdk/win32/gdkcolor-win32.c (gdk_screen_get_system_colormap):
Remove g_return_val_if_fail call. This function is called from
gdk_display_open() with the _gdk_screen it just created, but when
gdk_screen_get_default() still returns NULL.
* gdk/win32/gdkdisplay-win32.c
* gdk/win32/gdkscreen-win32.c: Make more like the linux-fb
versions. For instance, don't call
gdk_display_manager_set_default_display() from gdk_display_open().
* gdk/win32/gdkglobals-win32.c: Move _gdk_display, _gdk_screen and
_gdk_parent_root here.
* gdk/win32/gdkinput.c (gdk_display_list_devices): New function.
* gdk/win32/gdkmain-win32.c (gdk_get_display): New function.
* gdk/win32/gdkvisual-win32.c (gdk_screen_get_system_visual):
Don't require that the screen parameter is non-NULL. It can be,
and the linux-fb version doesn't check either.
* gdk/win32/gdkwindow-win32.c (gdk_window_set_skip_taskbar_hint,
gdk_window_set_skip_pager_hint, gdk_window_fullscreen,
gdk_window_unfullscreen): Implement as no-ops.
2002-11-15 Tor Lillqvist <tml@iki.fi>
* gdk/gdk.def: Reflect recent renamings and removals of functions.
Merge from stable:
Start implementing all fill styles (i.e. tiled, stippled, and
opaque stippled in addition to the plain solid style) in the Win32
backend in an elegant and generic way. For now only did the
draw_rectangle() and draw_glyphs() methods. The rest will
follow. Previously some of the drawing methods implemented opaque
stippling, but not tiles or non-opaque stippling.
Seems to work fine, now the check marks show up in check buttons,
the stippled background and stippled text in gtk-demo's Text
Widget look as they should, and GtkText's line wrap arrow shows
correctly instead of an ugly rectangle. [This refers to the stable
branch, haven't actually checked HEAD.]
The implementation does do a lot of pixmap handling and blitting
back and forth, especially on Win9x. But performance is hopefully
not an issue. I don't think many applications do a lot of tiled or
stippled drawing.
* gdk/win32/gdkprivate-win32.h: Define a new macro, GDI_CALL, that
calls a GDI function and prints a warning if it failed. Also
API_CALL for non-GDI calls. Cleans all the the if (!BlaBla())
WIN32_GDI_FAILED ("BlaBla") snippets, these can now be written
GDI_CALL (BlaBla, ()). Declare new functions.
* gdk/win32/gdkdrawable-win32.c: Use GDI_CALL macro in lots of places.
(generic_draw): New function that handles all the blitting
necessary to implement tiles and stipples. A function that
actually draws stuff is passed as a parameter to
generic_draw(). If the fill style is solid, it is called
directly, to draw on the destination drawable. Otherwise it is
called to draw on a temporary mask bitmap, which then is used in
blitting operations. The tiles and/or stipples are rendered into
another temporary pixmap. If MaskBlt() is available (on NT/2k/XP),
it is used, otherwise a sequence of BitBlt() is used to do the
final composition onto the destination drawable.
(draw_tiles_lowlevel, draw_tiles): Some renaming and code
reorg. Use BitBlt() to blit each tile, not gdk_draw_drawable().
(rop2_to_rop3): New function, does binary->ternary rop mapping.
(blit_from_pixmap, blit_inside_window, blit_from_window): Use
rop2_to_rop3(). Previously used SRCCOPY always...
(draw_rectangle, gdk_win32_draw_rectangle, draw_glyphs,
gdk_win32_draw_glyphs): Split functionality into two functions,
with generic_draw() doing its magic inbetween.
* gdk/win32/gdkevents-win32.c: Remove the TrackMouseEvent code, it
was ifdeffed out and wouldn't have done anything even if
enabled. Remove the GDK_EVENT_FUNC_FROM_WINDOW_PROC code, didn't
have any effect any more anyway after all the changes GTK+ has
gone through in the last years. Remove some #if 0 code.
* gdk/win32/gdkgc-win32.c (gdk_gc_copy): Set the copy's hdc field
to NULL in case a GC is copied while it has a Windows DC active.
* gdk/win32/gdkprivate-win32.h
* gdk/win32/gdkglobals-win32.c: Remove gdk_event_func_from_window_proc.
* gdk/win32/gdkmain-win32.c: Remove -event-func-from-window-proc
option. If there is a PRETEND_WIN9X envvar, set windows_version as
if on Win9x.
* gdk/win32/gdkpixmap-win32.c (_gdk_win32_pixmap_new,
gdk_pixmap_new): Combine these two, _gdk_win32_pixmap_new() wasn't
used or exported. Make a bit more like the X11 version. Hopefully
I didn't break the fragile palettized display ("pseudocolor")
code.
* gdk/win32/gdkgc-win32.c: Various debugging output improvements.
(predraw_set_foreground): Check whether
tile/stipple origins are valid when calling SetBrushOrgEx().
(gdk_win32_hdc_get): Ifdef out code that tries to handle the
stipple by converting it into a region, and combining the clip
region with that. A stipple shouldn't work like that, it should
replicate in x and y directions. Stipples are now handled by
generic_draw() in gdkdrawable-win32.c.
* gdk/win32/gdkmain-win32.c: (gdk_win32_gcvalues_mask_to_string,
gdk_win32_rop2_to_string): New debugging functions.
(gdk_win32_print_dc): Print also DC's rop2 and text color.
Fri Nov 8 18:04:16 2002 Owen Taylor <otaylor@redhat.com>
* gdk/{linux-fb,win32,11}/Makefile.am: Try a different
hack to force gdkenumtypes.h to be updated before
building the subdir, last hack caused contents
to be rebuilt on every make.