Compare commits
15 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 79d6346057 | |||
| 7ef740e03d | |||
| 1dcb67c8f3 | |||
| bddd4ca943 | |||
| 797d345446 | |||
| c8a2382b65 | |||
| ab1deac87f | |||
| d0f73034cf | |||
| 97f2c2b7bb | |||
| 9bf3a0be0c | |||
| 37cfb7d74b | |||
| 95a9052d56 | |||
| ff99eb7cc1 | |||
| ef03cb5287 | |||
| 196d48435e |
@@ -1,3 +1,146 @@
|
||||
2000-02-19 Anders Carlsson <andersca@gnu.org>
|
||||
|
||||
* gtk/gtkrange.c (gtk_range_scroll_event): Return TRUE
|
||||
to prevent the scroll event to be propagated upwards.
|
||||
|
||||
Fri Feb 18 14:37:29 2000 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gdk/x11/gdkwindow-x11.c (gdk_event_mask_table): Remove
|
||||
OwnerGrabButtonMask from button entries for
|
||||
GDK_BUTTON_PRESS / GDK_BUTTON_RELEASE.
|
||||
|
||||
* gtk/gtklayout.c (gtk_layout_realize): Always add GDK_SCROLL
|
||||
to the event mask (which will result in button/press release
|
||||
being added to the event mask on Unix) so scrolling works
|
||||
for layouts in scroll windows.
|
||||
|
||||
* gdk/gdkevents.h (enum): Fix up GDK_ALL_EVENTS_MASK.
|
||||
|
||||
Patch from Anders Carlsson <andersca@gnu.org> to add
|
||||
a scroll event.
|
||||
|
||||
* gtk/testgtk.c (scroll_test_scroll): Added an example of mouse wheel
|
||||
scrolling to the "Test Scrolling" part of testgtk.
|
||||
|
||||
* gtk/gtkwidget.h (struct _GtkWidgetClass): Added scroll_event signal.
|
||||
|
||||
* gtk/gtkwidget.c: Added "scroll_event" GTK+ signal and matched
|
||||
it against GDK_SCROLL.
|
||||
|
||||
* gtk/gtkrange.c (gtk_range_scroll_event): Updated to use the new
|
||||
way of mouse wheel scrolling.
|
||||
|
||||
* gtk/gtkscrolledwindow.c (gtk_scrolled_window_scroll_event): Likewise.
|
||||
|
||||
* gtk/gtkspinbutton.c (gtk_spin_button_scroll): Likewise.
|
||||
|
||||
* gtk/gtkmain.c: Removed previous mouse wheel hack.
|
||||
|
||||
* gdk/x11/gdkwindow-x11.c (gdk_event_mask_table): Added entry in
|
||||
gdk_event_mask_table.
|
||||
|
||||
* gdk/x11/gdkevents-x11.c (gdk_event_translate): Added
|
||||
GdkEventScroll handler.
|
||||
|
||||
* gdk/gdkevents.h: Added GdkEventScroll structure.
|
||||
|
||||
Thu Feb 17 17:10:12 2000 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gt{h,k,}vpaned.[ch]: Add patch from Jonathan Blandford
|
||||
and Anders Carlsson to change the Paned widgets so that they
|
||||
can be dragged from anywhere along the length. Also change
|
||||
the way that this is drawn to make this apparent.
|
||||
|
||||
* gtk/gtkoptionmenu.c (gtk_option_menu_get_history): Apply patch
|
||||
from George Lebl to check that option_menu->menu is present
|
||||
before getting history.
|
||||
|
||||
2000-02-14 Tor Lillqvist <tml@iki.fi>
|
||||
|
||||
* gdk/gdkdraw.c (gdk_draw_segments): Move the test for no segments
|
||||
before the assertion for non-NULL segment list.
|
||||
|
||||
* gdk/win32/gdkgc-win32.c: (gdk_win32_gc_values_to_win32values):
|
||||
Seems that pattern brushes *must* be 8x8 pixels! At least on my
|
||||
machine, but it might be display driver dependent. Sigh, so make
|
||||
sure the stipple is that size. Does Windows suck or what?
|
||||
|
||||
* gdk/win32/gdkdrawable-win32.c: Improve error handling in a few
|
||||
places.
|
||||
|
||||
2000-02-13 Havoc Pennington <hp@pobox.com>
|
||||
|
||||
* gdk/x11/gdkcursor-x11.c (gdk_cursor_new_from_pixmap): init
|
||||
refcount to 1
|
||||
(gdk_cursor_new): init refcount to 1
|
||||
|
||||
* gdk/win32/gdkcursor-win32.c (gdk_cursor_new): init refcount to 1
|
||||
|
||||
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. Use correct colour for
|
||||
SetBkColor() (Until now the code actually used a random colour in
|
||||
the call to SetBkColor()... but that didn't show up as not many
|
||||
GDI APIs use the background colour. Pattern (opaque stippled)
|
||||
brushes do.)
|
||||
|
||||
* 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 define 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.
|
||||
|
||||
Sun Feb 13 08:54:45 2000 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gdk/gdkcursor.h (struct _GdkCursor): s/refcount/ref_count/.
|
||||
* gdk/x11/gdkcursor-x11.c (gdk_cursor_new_from_pixmap):
|
||||
* gdk/x11/gdkcursor-x11.c (_gdk_cursor_destroy):
|
||||
* gdk/gdkcursor.c (gdk_cursor_ref): insert assertments for the
|
||||
parameters given and cursor->ref_count. coding style fixups.
|
||||
|
||||
* gtk/gtksocket.c (gtk_socket_class_init): parent class is GtkContainer,
|
||||
not GtkWidget.
|
||||
|
||||
* gtk/*.h: applied patch from Mathieu Lacage <lacage@email.enst.fr> to
|
||||
fix up widget macros and add _GET_CLASS() variant.
|
||||
|
||||
* gtk/*.c: some GtkType fixups.
|
||||
|
||||
2000-02-09 Tor Lillqvist <tml@iki.fi>
|
||||
|
||||
* gdk/win32/gdkproperty-win32.c
|
||||
* gdk/x11/gdkproperty-x11.c: The assertions for GDK_IS_WINDOW
|
||||
were reversed.
|
||||
|
||||
2000-02-04 Tor Lillqvist <tml@iki.fi>
|
||||
|
||||
* gdk/win32/gdkfont-win32.c (logfont_to_xlfd): Use
|
||||
|
||||
@@ -1,3 +1,146 @@
|
||||
2000-02-19 Anders Carlsson <andersca@gnu.org>
|
||||
|
||||
* gtk/gtkrange.c (gtk_range_scroll_event): Return TRUE
|
||||
to prevent the scroll event to be propagated upwards.
|
||||
|
||||
Fri Feb 18 14:37:29 2000 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gdk/x11/gdkwindow-x11.c (gdk_event_mask_table): Remove
|
||||
OwnerGrabButtonMask from button entries for
|
||||
GDK_BUTTON_PRESS / GDK_BUTTON_RELEASE.
|
||||
|
||||
* gtk/gtklayout.c (gtk_layout_realize): Always add GDK_SCROLL
|
||||
to the event mask (which will result in button/press release
|
||||
being added to the event mask on Unix) so scrolling works
|
||||
for layouts in scroll windows.
|
||||
|
||||
* gdk/gdkevents.h (enum): Fix up GDK_ALL_EVENTS_MASK.
|
||||
|
||||
Patch from Anders Carlsson <andersca@gnu.org> to add
|
||||
a scroll event.
|
||||
|
||||
* gtk/testgtk.c (scroll_test_scroll): Added an example of mouse wheel
|
||||
scrolling to the "Test Scrolling" part of testgtk.
|
||||
|
||||
* gtk/gtkwidget.h (struct _GtkWidgetClass): Added scroll_event signal.
|
||||
|
||||
* gtk/gtkwidget.c: Added "scroll_event" GTK+ signal and matched
|
||||
it against GDK_SCROLL.
|
||||
|
||||
* gtk/gtkrange.c (gtk_range_scroll_event): Updated to use the new
|
||||
way of mouse wheel scrolling.
|
||||
|
||||
* gtk/gtkscrolledwindow.c (gtk_scrolled_window_scroll_event): Likewise.
|
||||
|
||||
* gtk/gtkspinbutton.c (gtk_spin_button_scroll): Likewise.
|
||||
|
||||
* gtk/gtkmain.c: Removed previous mouse wheel hack.
|
||||
|
||||
* gdk/x11/gdkwindow-x11.c (gdk_event_mask_table): Added entry in
|
||||
gdk_event_mask_table.
|
||||
|
||||
* gdk/x11/gdkevents-x11.c (gdk_event_translate): Added
|
||||
GdkEventScroll handler.
|
||||
|
||||
* gdk/gdkevents.h: Added GdkEventScroll structure.
|
||||
|
||||
Thu Feb 17 17:10:12 2000 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gt{h,k,}vpaned.[ch]: Add patch from Jonathan Blandford
|
||||
and Anders Carlsson to change the Paned widgets so that they
|
||||
can be dragged from anywhere along the length. Also change
|
||||
the way that this is drawn to make this apparent.
|
||||
|
||||
* gtk/gtkoptionmenu.c (gtk_option_menu_get_history): Apply patch
|
||||
from George Lebl to check that option_menu->menu is present
|
||||
before getting history.
|
||||
|
||||
2000-02-14 Tor Lillqvist <tml@iki.fi>
|
||||
|
||||
* gdk/gdkdraw.c (gdk_draw_segments): Move the test for no segments
|
||||
before the assertion for non-NULL segment list.
|
||||
|
||||
* gdk/win32/gdkgc-win32.c: (gdk_win32_gc_values_to_win32values):
|
||||
Seems that pattern brushes *must* be 8x8 pixels! At least on my
|
||||
machine, but it might be display driver dependent. Sigh, so make
|
||||
sure the stipple is that size. Does Windows suck or what?
|
||||
|
||||
* gdk/win32/gdkdrawable-win32.c: Improve error handling in a few
|
||||
places.
|
||||
|
||||
2000-02-13 Havoc Pennington <hp@pobox.com>
|
||||
|
||||
* gdk/x11/gdkcursor-x11.c (gdk_cursor_new_from_pixmap): init
|
||||
refcount to 1
|
||||
(gdk_cursor_new): init refcount to 1
|
||||
|
||||
* gdk/win32/gdkcursor-win32.c (gdk_cursor_new): init refcount to 1
|
||||
|
||||
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. Use correct colour for
|
||||
SetBkColor() (Until now the code actually used a random colour in
|
||||
the call to SetBkColor()... but that didn't show up as not many
|
||||
GDI APIs use the background colour. Pattern (opaque stippled)
|
||||
brushes do.)
|
||||
|
||||
* 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 define 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.
|
||||
|
||||
Sun Feb 13 08:54:45 2000 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gdk/gdkcursor.h (struct _GdkCursor): s/refcount/ref_count/.
|
||||
* gdk/x11/gdkcursor-x11.c (gdk_cursor_new_from_pixmap):
|
||||
* gdk/x11/gdkcursor-x11.c (_gdk_cursor_destroy):
|
||||
* gdk/gdkcursor.c (gdk_cursor_ref): insert assertments for the
|
||||
parameters given and cursor->ref_count. coding style fixups.
|
||||
|
||||
* gtk/gtksocket.c (gtk_socket_class_init): parent class is GtkContainer,
|
||||
not GtkWidget.
|
||||
|
||||
* gtk/*.h: applied patch from Mathieu Lacage <lacage@email.enst.fr> to
|
||||
fix up widget macros and add _GET_CLASS() variant.
|
||||
|
||||
* gtk/*.c: some GtkType fixups.
|
||||
|
||||
2000-02-09 Tor Lillqvist <tml@iki.fi>
|
||||
|
||||
* gdk/win32/gdkproperty-win32.c
|
||||
* gdk/x11/gdkproperty-x11.c: The assertions for GDK_IS_WINDOW
|
||||
were reversed.
|
||||
|
||||
2000-02-04 Tor Lillqvist <tml@iki.fi>
|
||||
|
||||
* gdk/win32/gdkfont-win32.c (logfont_to_xlfd): Use
|
||||
|
||||
@@ -1,3 +1,146 @@
|
||||
2000-02-19 Anders Carlsson <andersca@gnu.org>
|
||||
|
||||
* gtk/gtkrange.c (gtk_range_scroll_event): Return TRUE
|
||||
to prevent the scroll event to be propagated upwards.
|
||||
|
||||
Fri Feb 18 14:37:29 2000 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gdk/x11/gdkwindow-x11.c (gdk_event_mask_table): Remove
|
||||
OwnerGrabButtonMask from button entries for
|
||||
GDK_BUTTON_PRESS / GDK_BUTTON_RELEASE.
|
||||
|
||||
* gtk/gtklayout.c (gtk_layout_realize): Always add GDK_SCROLL
|
||||
to the event mask (which will result in button/press release
|
||||
being added to the event mask on Unix) so scrolling works
|
||||
for layouts in scroll windows.
|
||||
|
||||
* gdk/gdkevents.h (enum): Fix up GDK_ALL_EVENTS_MASK.
|
||||
|
||||
Patch from Anders Carlsson <andersca@gnu.org> to add
|
||||
a scroll event.
|
||||
|
||||
* gtk/testgtk.c (scroll_test_scroll): Added an example of mouse wheel
|
||||
scrolling to the "Test Scrolling" part of testgtk.
|
||||
|
||||
* gtk/gtkwidget.h (struct _GtkWidgetClass): Added scroll_event signal.
|
||||
|
||||
* gtk/gtkwidget.c: Added "scroll_event" GTK+ signal and matched
|
||||
it against GDK_SCROLL.
|
||||
|
||||
* gtk/gtkrange.c (gtk_range_scroll_event): Updated to use the new
|
||||
way of mouse wheel scrolling.
|
||||
|
||||
* gtk/gtkscrolledwindow.c (gtk_scrolled_window_scroll_event): Likewise.
|
||||
|
||||
* gtk/gtkspinbutton.c (gtk_spin_button_scroll): Likewise.
|
||||
|
||||
* gtk/gtkmain.c: Removed previous mouse wheel hack.
|
||||
|
||||
* gdk/x11/gdkwindow-x11.c (gdk_event_mask_table): Added entry in
|
||||
gdk_event_mask_table.
|
||||
|
||||
* gdk/x11/gdkevents-x11.c (gdk_event_translate): Added
|
||||
GdkEventScroll handler.
|
||||
|
||||
* gdk/gdkevents.h: Added GdkEventScroll structure.
|
||||
|
||||
Thu Feb 17 17:10:12 2000 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gt{h,k,}vpaned.[ch]: Add patch from Jonathan Blandford
|
||||
and Anders Carlsson to change the Paned widgets so that they
|
||||
can be dragged from anywhere along the length. Also change
|
||||
the way that this is drawn to make this apparent.
|
||||
|
||||
* gtk/gtkoptionmenu.c (gtk_option_menu_get_history): Apply patch
|
||||
from George Lebl to check that option_menu->menu is present
|
||||
before getting history.
|
||||
|
||||
2000-02-14 Tor Lillqvist <tml@iki.fi>
|
||||
|
||||
* gdk/gdkdraw.c (gdk_draw_segments): Move the test for no segments
|
||||
before the assertion for non-NULL segment list.
|
||||
|
||||
* gdk/win32/gdkgc-win32.c: (gdk_win32_gc_values_to_win32values):
|
||||
Seems that pattern brushes *must* be 8x8 pixels! At least on my
|
||||
machine, but it might be display driver dependent. Sigh, so make
|
||||
sure the stipple is that size. Does Windows suck or what?
|
||||
|
||||
* gdk/win32/gdkdrawable-win32.c: Improve error handling in a few
|
||||
places.
|
||||
|
||||
2000-02-13 Havoc Pennington <hp@pobox.com>
|
||||
|
||||
* gdk/x11/gdkcursor-x11.c (gdk_cursor_new_from_pixmap): init
|
||||
refcount to 1
|
||||
(gdk_cursor_new): init refcount to 1
|
||||
|
||||
* gdk/win32/gdkcursor-win32.c (gdk_cursor_new): init refcount to 1
|
||||
|
||||
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. Use correct colour for
|
||||
SetBkColor() (Until now the code actually used a random colour in
|
||||
the call to SetBkColor()... but that didn't show up as not many
|
||||
GDI APIs use the background colour. Pattern (opaque stippled)
|
||||
brushes do.)
|
||||
|
||||
* 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 define 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.
|
||||
|
||||
Sun Feb 13 08:54:45 2000 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gdk/gdkcursor.h (struct _GdkCursor): s/refcount/ref_count/.
|
||||
* gdk/x11/gdkcursor-x11.c (gdk_cursor_new_from_pixmap):
|
||||
* gdk/x11/gdkcursor-x11.c (_gdk_cursor_destroy):
|
||||
* gdk/gdkcursor.c (gdk_cursor_ref): insert assertments for the
|
||||
parameters given and cursor->ref_count. coding style fixups.
|
||||
|
||||
* gtk/gtksocket.c (gtk_socket_class_init): parent class is GtkContainer,
|
||||
not GtkWidget.
|
||||
|
||||
* gtk/*.h: applied patch from Mathieu Lacage <lacage@email.enst.fr> to
|
||||
fix up widget macros and add _GET_CLASS() variant.
|
||||
|
||||
* gtk/*.c: some GtkType fixups.
|
||||
|
||||
2000-02-09 Tor Lillqvist <tml@iki.fi>
|
||||
|
||||
* gdk/win32/gdkproperty-win32.c
|
||||
* gdk/x11/gdkproperty-x11.c: The assertions for GDK_IS_WINDOW
|
||||
were reversed.
|
||||
|
||||
2000-02-04 Tor Lillqvist <tml@iki.fi>
|
||||
|
||||
* gdk/win32/gdkfont-win32.c (logfont_to_xlfd): Use
|
||||
|
||||
@@ -1,3 +1,146 @@
|
||||
2000-02-19 Anders Carlsson <andersca@gnu.org>
|
||||
|
||||
* gtk/gtkrange.c (gtk_range_scroll_event): Return TRUE
|
||||
to prevent the scroll event to be propagated upwards.
|
||||
|
||||
Fri Feb 18 14:37:29 2000 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gdk/x11/gdkwindow-x11.c (gdk_event_mask_table): Remove
|
||||
OwnerGrabButtonMask from button entries for
|
||||
GDK_BUTTON_PRESS / GDK_BUTTON_RELEASE.
|
||||
|
||||
* gtk/gtklayout.c (gtk_layout_realize): Always add GDK_SCROLL
|
||||
to the event mask (which will result in button/press release
|
||||
being added to the event mask on Unix) so scrolling works
|
||||
for layouts in scroll windows.
|
||||
|
||||
* gdk/gdkevents.h (enum): Fix up GDK_ALL_EVENTS_MASK.
|
||||
|
||||
Patch from Anders Carlsson <andersca@gnu.org> to add
|
||||
a scroll event.
|
||||
|
||||
* gtk/testgtk.c (scroll_test_scroll): Added an example of mouse wheel
|
||||
scrolling to the "Test Scrolling" part of testgtk.
|
||||
|
||||
* gtk/gtkwidget.h (struct _GtkWidgetClass): Added scroll_event signal.
|
||||
|
||||
* gtk/gtkwidget.c: Added "scroll_event" GTK+ signal and matched
|
||||
it against GDK_SCROLL.
|
||||
|
||||
* gtk/gtkrange.c (gtk_range_scroll_event): Updated to use the new
|
||||
way of mouse wheel scrolling.
|
||||
|
||||
* gtk/gtkscrolledwindow.c (gtk_scrolled_window_scroll_event): Likewise.
|
||||
|
||||
* gtk/gtkspinbutton.c (gtk_spin_button_scroll): Likewise.
|
||||
|
||||
* gtk/gtkmain.c: Removed previous mouse wheel hack.
|
||||
|
||||
* gdk/x11/gdkwindow-x11.c (gdk_event_mask_table): Added entry in
|
||||
gdk_event_mask_table.
|
||||
|
||||
* gdk/x11/gdkevents-x11.c (gdk_event_translate): Added
|
||||
GdkEventScroll handler.
|
||||
|
||||
* gdk/gdkevents.h: Added GdkEventScroll structure.
|
||||
|
||||
Thu Feb 17 17:10:12 2000 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gt{h,k,}vpaned.[ch]: Add patch from Jonathan Blandford
|
||||
and Anders Carlsson to change the Paned widgets so that they
|
||||
can be dragged from anywhere along the length. Also change
|
||||
the way that this is drawn to make this apparent.
|
||||
|
||||
* gtk/gtkoptionmenu.c (gtk_option_menu_get_history): Apply patch
|
||||
from George Lebl to check that option_menu->menu is present
|
||||
before getting history.
|
||||
|
||||
2000-02-14 Tor Lillqvist <tml@iki.fi>
|
||||
|
||||
* gdk/gdkdraw.c (gdk_draw_segments): Move the test for no segments
|
||||
before the assertion for non-NULL segment list.
|
||||
|
||||
* gdk/win32/gdkgc-win32.c: (gdk_win32_gc_values_to_win32values):
|
||||
Seems that pattern brushes *must* be 8x8 pixels! At least on my
|
||||
machine, but it might be display driver dependent. Sigh, so make
|
||||
sure the stipple is that size. Does Windows suck or what?
|
||||
|
||||
* gdk/win32/gdkdrawable-win32.c: Improve error handling in a few
|
||||
places.
|
||||
|
||||
2000-02-13 Havoc Pennington <hp@pobox.com>
|
||||
|
||||
* gdk/x11/gdkcursor-x11.c (gdk_cursor_new_from_pixmap): init
|
||||
refcount to 1
|
||||
(gdk_cursor_new): init refcount to 1
|
||||
|
||||
* gdk/win32/gdkcursor-win32.c (gdk_cursor_new): init refcount to 1
|
||||
|
||||
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. Use correct colour for
|
||||
SetBkColor() (Until now the code actually used a random colour in
|
||||
the call to SetBkColor()... but that didn't show up as not many
|
||||
GDI APIs use the background colour. Pattern (opaque stippled)
|
||||
brushes do.)
|
||||
|
||||
* 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 define 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.
|
||||
|
||||
Sun Feb 13 08:54:45 2000 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gdk/gdkcursor.h (struct _GdkCursor): s/refcount/ref_count/.
|
||||
* gdk/x11/gdkcursor-x11.c (gdk_cursor_new_from_pixmap):
|
||||
* gdk/x11/gdkcursor-x11.c (_gdk_cursor_destroy):
|
||||
* gdk/gdkcursor.c (gdk_cursor_ref): insert assertments for the
|
||||
parameters given and cursor->ref_count. coding style fixups.
|
||||
|
||||
* gtk/gtksocket.c (gtk_socket_class_init): parent class is GtkContainer,
|
||||
not GtkWidget.
|
||||
|
||||
* gtk/*.h: applied patch from Mathieu Lacage <lacage@email.enst.fr> to
|
||||
fix up widget macros and add _GET_CLASS() variant.
|
||||
|
||||
* gtk/*.c: some GtkType fixups.
|
||||
|
||||
2000-02-09 Tor Lillqvist <tml@iki.fi>
|
||||
|
||||
* gdk/win32/gdkproperty-win32.c
|
||||
* gdk/x11/gdkproperty-x11.c: The assertions for GDK_IS_WINDOW
|
||||
were reversed.
|
||||
|
||||
2000-02-04 Tor Lillqvist <tml@iki.fi>
|
||||
|
||||
* gdk/win32/gdkfont-win32.c (logfont_to_xlfd): Use
|
||||
|
||||
@@ -1,3 +1,146 @@
|
||||
2000-02-19 Anders Carlsson <andersca@gnu.org>
|
||||
|
||||
* gtk/gtkrange.c (gtk_range_scroll_event): Return TRUE
|
||||
to prevent the scroll event to be propagated upwards.
|
||||
|
||||
Fri Feb 18 14:37:29 2000 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gdk/x11/gdkwindow-x11.c (gdk_event_mask_table): Remove
|
||||
OwnerGrabButtonMask from button entries for
|
||||
GDK_BUTTON_PRESS / GDK_BUTTON_RELEASE.
|
||||
|
||||
* gtk/gtklayout.c (gtk_layout_realize): Always add GDK_SCROLL
|
||||
to the event mask (which will result in button/press release
|
||||
being added to the event mask on Unix) so scrolling works
|
||||
for layouts in scroll windows.
|
||||
|
||||
* gdk/gdkevents.h (enum): Fix up GDK_ALL_EVENTS_MASK.
|
||||
|
||||
Patch from Anders Carlsson <andersca@gnu.org> to add
|
||||
a scroll event.
|
||||
|
||||
* gtk/testgtk.c (scroll_test_scroll): Added an example of mouse wheel
|
||||
scrolling to the "Test Scrolling" part of testgtk.
|
||||
|
||||
* gtk/gtkwidget.h (struct _GtkWidgetClass): Added scroll_event signal.
|
||||
|
||||
* gtk/gtkwidget.c: Added "scroll_event" GTK+ signal and matched
|
||||
it against GDK_SCROLL.
|
||||
|
||||
* gtk/gtkrange.c (gtk_range_scroll_event): Updated to use the new
|
||||
way of mouse wheel scrolling.
|
||||
|
||||
* gtk/gtkscrolledwindow.c (gtk_scrolled_window_scroll_event): Likewise.
|
||||
|
||||
* gtk/gtkspinbutton.c (gtk_spin_button_scroll): Likewise.
|
||||
|
||||
* gtk/gtkmain.c: Removed previous mouse wheel hack.
|
||||
|
||||
* gdk/x11/gdkwindow-x11.c (gdk_event_mask_table): Added entry in
|
||||
gdk_event_mask_table.
|
||||
|
||||
* gdk/x11/gdkevents-x11.c (gdk_event_translate): Added
|
||||
GdkEventScroll handler.
|
||||
|
||||
* gdk/gdkevents.h: Added GdkEventScroll structure.
|
||||
|
||||
Thu Feb 17 17:10:12 2000 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gt{h,k,}vpaned.[ch]: Add patch from Jonathan Blandford
|
||||
and Anders Carlsson to change the Paned widgets so that they
|
||||
can be dragged from anywhere along the length. Also change
|
||||
the way that this is drawn to make this apparent.
|
||||
|
||||
* gtk/gtkoptionmenu.c (gtk_option_menu_get_history): Apply patch
|
||||
from George Lebl to check that option_menu->menu is present
|
||||
before getting history.
|
||||
|
||||
2000-02-14 Tor Lillqvist <tml@iki.fi>
|
||||
|
||||
* gdk/gdkdraw.c (gdk_draw_segments): Move the test for no segments
|
||||
before the assertion for non-NULL segment list.
|
||||
|
||||
* gdk/win32/gdkgc-win32.c: (gdk_win32_gc_values_to_win32values):
|
||||
Seems that pattern brushes *must* be 8x8 pixels! At least on my
|
||||
machine, but it might be display driver dependent. Sigh, so make
|
||||
sure the stipple is that size. Does Windows suck or what?
|
||||
|
||||
* gdk/win32/gdkdrawable-win32.c: Improve error handling in a few
|
||||
places.
|
||||
|
||||
2000-02-13 Havoc Pennington <hp@pobox.com>
|
||||
|
||||
* gdk/x11/gdkcursor-x11.c (gdk_cursor_new_from_pixmap): init
|
||||
refcount to 1
|
||||
(gdk_cursor_new): init refcount to 1
|
||||
|
||||
* gdk/win32/gdkcursor-win32.c (gdk_cursor_new): init refcount to 1
|
||||
|
||||
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. Use correct colour for
|
||||
SetBkColor() (Until now the code actually used a random colour in
|
||||
the call to SetBkColor()... but that didn't show up as not many
|
||||
GDI APIs use the background colour. Pattern (opaque stippled)
|
||||
brushes do.)
|
||||
|
||||
* 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 define 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.
|
||||
|
||||
Sun Feb 13 08:54:45 2000 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gdk/gdkcursor.h (struct _GdkCursor): s/refcount/ref_count/.
|
||||
* gdk/x11/gdkcursor-x11.c (gdk_cursor_new_from_pixmap):
|
||||
* gdk/x11/gdkcursor-x11.c (_gdk_cursor_destroy):
|
||||
* gdk/gdkcursor.c (gdk_cursor_ref): insert assertments for the
|
||||
parameters given and cursor->ref_count. coding style fixups.
|
||||
|
||||
* gtk/gtksocket.c (gtk_socket_class_init): parent class is GtkContainer,
|
||||
not GtkWidget.
|
||||
|
||||
* gtk/*.h: applied patch from Mathieu Lacage <lacage@email.enst.fr> to
|
||||
fix up widget macros and add _GET_CLASS() variant.
|
||||
|
||||
* gtk/*.c: some GtkType fixups.
|
||||
|
||||
2000-02-09 Tor Lillqvist <tml@iki.fi>
|
||||
|
||||
* gdk/win32/gdkproperty-win32.c
|
||||
* gdk/x11/gdkproperty-x11.c: The assertions for GDK_IS_WINDOW
|
||||
were reversed.
|
||||
|
||||
2000-02-04 Tor Lillqvist <tml@iki.fi>
|
||||
|
||||
* gdk/win32/gdkfont-win32.c (logfont_to_xlfd): Use
|
||||
|
||||
@@ -1,3 +1,146 @@
|
||||
2000-02-19 Anders Carlsson <andersca@gnu.org>
|
||||
|
||||
* gtk/gtkrange.c (gtk_range_scroll_event): Return TRUE
|
||||
to prevent the scroll event to be propagated upwards.
|
||||
|
||||
Fri Feb 18 14:37:29 2000 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gdk/x11/gdkwindow-x11.c (gdk_event_mask_table): Remove
|
||||
OwnerGrabButtonMask from button entries for
|
||||
GDK_BUTTON_PRESS / GDK_BUTTON_RELEASE.
|
||||
|
||||
* gtk/gtklayout.c (gtk_layout_realize): Always add GDK_SCROLL
|
||||
to the event mask (which will result in button/press release
|
||||
being added to the event mask on Unix) so scrolling works
|
||||
for layouts in scroll windows.
|
||||
|
||||
* gdk/gdkevents.h (enum): Fix up GDK_ALL_EVENTS_MASK.
|
||||
|
||||
Patch from Anders Carlsson <andersca@gnu.org> to add
|
||||
a scroll event.
|
||||
|
||||
* gtk/testgtk.c (scroll_test_scroll): Added an example of mouse wheel
|
||||
scrolling to the "Test Scrolling" part of testgtk.
|
||||
|
||||
* gtk/gtkwidget.h (struct _GtkWidgetClass): Added scroll_event signal.
|
||||
|
||||
* gtk/gtkwidget.c: Added "scroll_event" GTK+ signal and matched
|
||||
it against GDK_SCROLL.
|
||||
|
||||
* gtk/gtkrange.c (gtk_range_scroll_event): Updated to use the new
|
||||
way of mouse wheel scrolling.
|
||||
|
||||
* gtk/gtkscrolledwindow.c (gtk_scrolled_window_scroll_event): Likewise.
|
||||
|
||||
* gtk/gtkspinbutton.c (gtk_spin_button_scroll): Likewise.
|
||||
|
||||
* gtk/gtkmain.c: Removed previous mouse wheel hack.
|
||||
|
||||
* gdk/x11/gdkwindow-x11.c (gdk_event_mask_table): Added entry in
|
||||
gdk_event_mask_table.
|
||||
|
||||
* gdk/x11/gdkevents-x11.c (gdk_event_translate): Added
|
||||
GdkEventScroll handler.
|
||||
|
||||
* gdk/gdkevents.h: Added GdkEventScroll structure.
|
||||
|
||||
Thu Feb 17 17:10:12 2000 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gt{h,k,}vpaned.[ch]: Add patch from Jonathan Blandford
|
||||
and Anders Carlsson to change the Paned widgets so that they
|
||||
can be dragged from anywhere along the length. Also change
|
||||
the way that this is drawn to make this apparent.
|
||||
|
||||
* gtk/gtkoptionmenu.c (gtk_option_menu_get_history): Apply patch
|
||||
from George Lebl to check that option_menu->menu is present
|
||||
before getting history.
|
||||
|
||||
2000-02-14 Tor Lillqvist <tml@iki.fi>
|
||||
|
||||
* gdk/gdkdraw.c (gdk_draw_segments): Move the test for no segments
|
||||
before the assertion for non-NULL segment list.
|
||||
|
||||
* gdk/win32/gdkgc-win32.c: (gdk_win32_gc_values_to_win32values):
|
||||
Seems that pattern brushes *must* be 8x8 pixels! At least on my
|
||||
machine, but it might be display driver dependent. Sigh, so make
|
||||
sure the stipple is that size. Does Windows suck or what?
|
||||
|
||||
* gdk/win32/gdkdrawable-win32.c: Improve error handling in a few
|
||||
places.
|
||||
|
||||
2000-02-13 Havoc Pennington <hp@pobox.com>
|
||||
|
||||
* gdk/x11/gdkcursor-x11.c (gdk_cursor_new_from_pixmap): init
|
||||
refcount to 1
|
||||
(gdk_cursor_new): init refcount to 1
|
||||
|
||||
* gdk/win32/gdkcursor-win32.c (gdk_cursor_new): init refcount to 1
|
||||
|
||||
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. Use correct colour for
|
||||
SetBkColor() (Until now the code actually used a random colour in
|
||||
the call to SetBkColor()... but that didn't show up as not many
|
||||
GDI APIs use the background colour. Pattern (opaque stippled)
|
||||
brushes do.)
|
||||
|
||||
* 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 define 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.
|
||||
|
||||
Sun Feb 13 08:54:45 2000 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gdk/gdkcursor.h (struct _GdkCursor): s/refcount/ref_count/.
|
||||
* gdk/x11/gdkcursor-x11.c (gdk_cursor_new_from_pixmap):
|
||||
* gdk/x11/gdkcursor-x11.c (_gdk_cursor_destroy):
|
||||
* gdk/gdkcursor.c (gdk_cursor_ref): insert assertments for the
|
||||
parameters given and cursor->ref_count. coding style fixups.
|
||||
|
||||
* gtk/gtksocket.c (gtk_socket_class_init): parent class is GtkContainer,
|
||||
not GtkWidget.
|
||||
|
||||
* gtk/*.h: applied patch from Mathieu Lacage <lacage@email.enst.fr> to
|
||||
fix up widget macros and add _GET_CLASS() variant.
|
||||
|
||||
* gtk/*.c: some GtkType fixups.
|
||||
|
||||
2000-02-09 Tor Lillqvist <tml@iki.fi>
|
||||
|
||||
* gdk/win32/gdkproperty-win32.c
|
||||
* gdk/x11/gdkproperty-x11.c: The assertions for GDK_IS_WINDOW
|
||||
were reversed.
|
||||
|
||||
2000-02-04 Tor Lillqvist <tml@iki.fi>
|
||||
|
||||
* gdk/win32/gdkfont-win32.c (logfont_to_xlfd): Use
|
||||
|
||||
@@ -1,3 +1,146 @@
|
||||
2000-02-19 Anders Carlsson <andersca@gnu.org>
|
||||
|
||||
* gtk/gtkrange.c (gtk_range_scroll_event): Return TRUE
|
||||
to prevent the scroll event to be propagated upwards.
|
||||
|
||||
Fri Feb 18 14:37:29 2000 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gdk/x11/gdkwindow-x11.c (gdk_event_mask_table): Remove
|
||||
OwnerGrabButtonMask from button entries for
|
||||
GDK_BUTTON_PRESS / GDK_BUTTON_RELEASE.
|
||||
|
||||
* gtk/gtklayout.c (gtk_layout_realize): Always add GDK_SCROLL
|
||||
to the event mask (which will result in button/press release
|
||||
being added to the event mask on Unix) so scrolling works
|
||||
for layouts in scroll windows.
|
||||
|
||||
* gdk/gdkevents.h (enum): Fix up GDK_ALL_EVENTS_MASK.
|
||||
|
||||
Patch from Anders Carlsson <andersca@gnu.org> to add
|
||||
a scroll event.
|
||||
|
||||
* gtk/testgtk.c (scroll_test_scroll): Added an example of mouse wheel
|
||||
scrolling to the "Test Scrolling" part of testgtk.
|
||||
|
||||
* gtk/gtkwidget.h (struct _GtkWidgetClass): Added scroll_event signal.
|
||||
|
||||
* gtk/gtkwidget.c: Added "scroll_event" GTK+ signal and matched
|
||||
it against GDK_SCROLL.
|
||||
|
||||
* gtk/gtkrange.c (gtk_range_scroll_event): Updated to use the new
|
||||
way of mouse wheel scrolling.
|
||||
|
||||
* gtk/gtkscrolledwindow.c (gtk_scrolled_window_scroll_event): Likewise.
|
||||
|
||||
* gtk/gtkspinbutton.c (gtk_spin_button_scroll): Likewise.
|
||||
|
||||
* gtk/gtkmain.c: Removed previous mouse wheel hack.
|
||||
|
||||
* gdk/x11/gdkwindow-x11.c (gdk_event_mask_table): Added entry in
|
||||
gdk_event_mask_table.
|
||||
|
||||
* gdk/x11/gdkevents-x11.c (gdk_event_translate): Added
|
||||
GdkEventScroll handler.
|
||||
|
||||
* gdk/gdkevents.h: Added GdkEventScroll structure.
|
||||
|
||||
Thu Feb 17 17:10:12 2000 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gt{h,k,}vpaned.[ch]: Add patch from Jonathan Blandford
|
||||
and Anders Carlsson to change the Paned widgets so that they
|
||||
can be dragged from anywhere along the length. Also change
|
||||
the way that this is drawn to make this apparent.
|
||||
|
||||
* gtk/gtkoptionmenu.c (gtk_option_menu_get_history): Apply patch
|
||||
from George Lebl to check that option_menu->menu is present
|
||||
before getting history.
|
||||
|
||||
2000-02-14 Tor Lillqvist <tml@iki.fi>
|
||||
|
||||
* gdk/gdkdraw.c (gdk_draw_segments): Move the test for no segments
|
||||
before the assertion for non-NULL segment list.
|
||||
|
||||
* gdk/win32/gdkgc-win32.c: (gdk_win32_gc_values_to_win32values):
|
||||
Seems that pattern brushes *must* be 8x8 pixels! At least on my
|
||||
machine, but it might be display driver dependent. Sigh, so make
|
||||
sure the stipple is that size. Does Windows suck or what?
|
||||
|
||||
* gdk/win32/gdkdrawable-win32.c: Improve error handling in a few
|
||||
places.
|
||||
|
||||
2000-02-13 Havoc Pennington <hp@pobox.com>
|
||||
|
||||
* gdk/x11/gdkcursor-x11.c (gdk_cursor_new_from_pixmap): init
|
||||
refcount to 1
|
||||
(gdk_cursor_new): init refcount to 1
|
||||
|
||||
* gdk/win32/gdkcursor-win32.c (gdk_cursor_new): init refcount to 1
|
||||
|
||||
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. Use correct colour for
|
||||
SetBkColor() (Until now the code actually used a random colour in
|
||||
the call to SetBkColor()... but that didn't show up as not many
|
||||
GDI APIs use the background colour. Pattern (opaque stippled)
|
||||
brushes do.)
|
||||
|
||||
* 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 define 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.
|
||||
|
||||
Sun Feb 13 08:54:45 2000 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gdk/gdkcursor.h (struct _GdkCursor): s/refcount/ref_count/.
|
||||
* gdk/x11/gdkcursor-x11.c (gdk_cursor_new_from_pixmap):
|
||||
* gdk/x11/gdkcursor-x11.c (_gdk_cursor_destroy):
|
||||
* gdk/gdkcursor.c (gdk_cursor_ref): insert assertments for the
|
||||
parameters given and cursor->ref_count. coding style fixups.
|
||||
|
||||
* gtk/gtksocket.c (gtk_socket_class_init): parent class is GtkContainer,
|
||||
not GtkWidget.
|
||||
|
||||
* gtk/*.h: applied patch from Mathieu Lacage <lacage@email.enst.fr> to
|
||||
fix up widget macros and add _GET_CLASS() variant.
|
||||
|
||||
* gtk/*.c: some GtkType fixups.
|
||||
|
||||
2000-02-09 Tor Lillqvist <tml@iki.fi>
|
||||
|
||||
* gdk/win32/gdkproperty-win32.c
|
||||
* gdk/x11/gdkproperty-x11.c: The assertions for GDK_IS_WINDOW
|
||||
were reversed.
|
||||
|
||||
2000-02-04 Tor Lillqvist <tml@iki.fi>
|
||||
|
||||
* gdk/win32/gdkfont-win32.c (logfont_to_xlfd): Use
|
||||
|
||||
+1
-1
@@ -529,7 +529,7 @@ main (int argc, char **argv)
|
||||
if (argc == 1) {
|
||||
const gchar*** xpmp;
|
||||
|
||||
pixbuf = gdk_pixbuf_new_from_data ((guchar *) default_image, ART_PIX_RGB, FALSE,
|
||||
pixbuf = gdk_pixbuf_new_from_data (default_image, ART_PIX_RGB, FALSE,
|
||||
DEFAULT_WIDTH, DEFAULT_HEIGHT, DEFAULT_WIDTH * 3,
|
||||
NULL, NULL);
|
||||
new_testrgb_window (pixbuf, NULL);
|
||||
|
||||
@@ -9,3 +9,13 @@ Incompatible Changes from GTK+-1.2 to GTK+-1.4:
|
||||
match what we do for glib, and other similar cases.
|
||||
|
||||
- The detail arguments in the GtkStyleClass structure are now 'const gchar *'.
|
||||
|
||||
- gtk_paned_set_gutter_size() has been removed, since the small handle tab
|
||||
has been changed to include the entire area previously occupied by
|
||||
the gutter.
|
||||
|
||||
- GDK no longer selects OwnerGrabButtonMask for button presses. This means
|
||||
that the automatic grab that occurs when the user presses a button
|
||||
will have owner_events = FALSE, so all events are redirected to the
|
||||
grab window, even events that would normally go to other windows of the
|
||||
window's owner.
|
||||
@@ -38,7 +38,12 @@ gdk_pixbuf_doc_DATA = \
|
||||
gdk-pixbuf-decl.txt \
|
||||
gdk-pixbuf-sections.txt
|
||||
|
||||
EXTRA_DIST = $(gdk_pixbuf_doc_DATA)
|
||||
content_files = \
|
||||
compiling.sgml
|
||||
|
||||
EXTRA_DIST = \
|
||||
$(gdk_pixbuf_doc_DATA) \
|
||||
$(content_files)
|
||||
|
||||
if ENABLE_GTK_DOC
|
||||
gdk-pixbuf.html: html/book1.html
|
||||
@@ -47,7 +52,7 @@ else
|
||||
gdk-pixbuf.html:
|
||||
endif
|
||||
|
||||
html/book1.html: sgml/gdk-pixbuf-doc.bottom
|
||||
html/book1.html: sgml/gdk-pixbuf-doc.bottom $(content_files)
|
||||
$(MAKE) html
|
||||
|
||||
sgml/gdk-pixbuf-doc.bottom: $(tmpl_sources)
|
||||
|
||||
@@ -0,0 +1,103 @@
|
||||
<appendix id="compiling">
|
||||
<title>Compiling the gdk-pixbuf library</title>
|
||||
|
||||
<para>
|
||||
This appendix describes the special options you can use while
|
||||
compiling the gdk-pixbuf library.
|
||||
</para>
|
||||
|
||||
<sect1 id="building">
|
||||
<title>Building the Library</title>
|
||||
<para>
|
||||
The gdk-pixbuf library uses the standard GNU build system,
|
||||
using <productname>autoconf</productname> for package
|
||||
configuration and resolving portability issues,
|
||||
<productname>automake</productname> for building makefiles
|
||||
that comply with the GNU Coding Standards, and
|
||||
<productname>libtool</productname> for building shared
|
||||
libraries on multiple platforms. The normal sequence for
|
||||
compiling and installing the gdk-pixbuf library is thus:
|
||||
|
||||
<literallayout>
|
||||
<userinput>./configure</userinput>
|
||||
<userinput>make</userinput>
|
||||
<userinput>make install</userinput>
|
||||
</literallayout>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
The standard options provided by <productname>GNU
|
||||
autoconf</productname> may be passed to the
|
||||
<command>configure</command> script. Please see the
|
||||
<productname>autoconf</productname> documentation or run
|
||||
<command>./configure --help</command> for information about
|
||||
the standard options.
|
||||
</para>
|
||||
</sect1>
|
||||
|
||||
<sect1 id="extra-configuration-options">
|
||||
<title>Extra Configuration Options</title>
|
||||
|
||||
<para>
|
||||
In addition to the normal options, the
|
||||
<command>configure</command> script in the gdk-pixbuf library
|
||||
supports these additional arguments:
|
||||
|
||||
<cmdsynopsis>
|
||||
<command>configure</command>
|
||||
|
||||
<group>
|
||||
<arg>--disable-modules</arg>
|
||||
<arg>--enable-modules</arg>
|
||||
</group>
|
||||
|
||||
<group>
|
||||
<arg>--disable-gtk-doc</arg>
|
||||
<arg>--enable-gtk-doc</arg>
|
||||
</group>
|
||||
</cmdsynopsis>
|
||||
</para>
|
||||
|
||||
<formalpara>
|
||||
<title><systemitem>--disable-modules</systemitem> and
|
||||
<systemitem>--enable-modules</systemitem></title>
|
||||
|
||||
<para>
|
||||
Normally gdk-pixbuf will try to build the image file format
|
||||
loaders as little shared libraries that are loaded on
|
||||
demand. The <systemitem>--disable-modules</systemitem>
|
||||
argument indicates that they should all be built statically
|
||||
into the gdk-pixbuf library instead. This is useful for
|
||||
people who need to produce statically-linked binaries. If
|
||||
neither <systemitem>--disable-modules</systemitem> nor
|
||||
<systemitem>--enable-modules</systemitem> is specified, then
|
||||
the <command>configure</command> script will try to
|
||||
auto-detect whether shared modules work on your system.
|
||||
</para>
|
||||
</formalpara>
|
||||
|
||||
<formalpara>
|
||||
<title><systemitem>--disable-gtk-doc</systemitem> and
|
||||
<systemitem>--enable-gtk-doc</systemitem></title>
|
||||
|
||||
<para>
|
||||
By default the <command>configure</command> script will try
|
||||
to auto-detect whether the
|
||||
<productname>gtk-doc</productname> package is installed. If
|
||||
it is, then it will use it to extract and build the
|
||||
documentation for the gdk-pixbuf library. These options can
|
||||
be used to explicitly control whether gtk-doc should be used
|
||||
or not. If it is not used, the distributed, pre-generated
|
||||
HTML files will be installed instead of building them on
|
||||
your machine.
|
||||
</para>
|
||||
</formalpara>
|
||||
</sect1>
|
||||
</appendix>
|
||||
|
||||
<!--
|
||||
Local variables:
|
||||
mode: sgml
|
||||
sgml-parent-document: ("gdk-pixbuf.sgml" "book" "book" "")
|
||||
End:
|
||||
-->
|
||||
@@ -10,6 +10,7 @@
|
||||
<!entity gdk-pixbuf-animation SYSTEM "sgml/animation.sgml">
|
||||
<!entity GdkPixbufLoader SYSTEM "sgml/gdk-pixbuf-loader.sgml">
|
||||
<!entity GnomeCanvasPixbuf SYSTEM "sgml/gnome-canvas-pixbuf.sgml">
|
||||
<!entity Compiling SYSTEM "compiling.sgml">
|
||||
]>
|
||||
|
||||
<book>
|
||||
@@ -57,4 +58,6 @@
|
||||
&GdkPixbufLoader;
|
||||
&GnomeCanvasPixbuf;
|
||||
</reference>
|
||||
|
||||
&Compiling;
|
||||
</book>
|
||||
|
||||
@@ -9,3 +9,4 @@ testpixbuf
|
||||
testpixbuf-drawable
|
||||
testpixbuf-scale
|
||||
testanimation
|
||||
gdk-pixbuf-features.h
|
||||
|
||||
@@ -1,3 +1,117 @@
|
||||
2000-02-21 Federico Mena Quintero <federico@helixcode.com>
|
||||
|
||||
* configure.in (GDK_PIXBUF_MINOR): Bumped version number to 0.6.0.
|
||||
|
||||
* doc/compiling.sgml: New appendix documenting the gdk-pixbuf
|
||||
library's particular options to configure.in.
|
||||
|
||||
* doc/gdk-pixbuf.sgml: Include compiling.sgml appendix via an
|
||||
entity.
|
||||
|
||||
* doc/Makefile.am (gdk-pixbuf.html): Added compiling.sgml.
|
||||
|
||||
* gdk-pixbuf/io-ico.c (gdk_pixbuf__ico_image_load_increment):
|
||||
Fixed typo in prototype name.
|
||||
|
||||
* configure.in: Changed duplicated AC_MSG_CHECKING message to
|
||||
something more meaningful; now it is "checking whether dynamic
|
||||
modules work".
|
||||
|
||||
* gdk-pixbuf/pixops/Makefile.am (noinst_PROGRAMS): Do not install
|
||||
the timescale program.
|
||||
|
||||
Integrated Miguel de Icaza's <miguel@gnu.org> patch for optionally
|
||||
creating a single static library with all the image format modules
|
||||
in it.
|
||||
|
||||
2000-02-20 Miguel de Icaza <miguel@gnu.org>
|
||||
|
||||
* gdk-pixbuf/io-xpm.c (gdk_pixbuf__xpm_image_load): Add prefix.
|
||||
(gdk_pixbuf__xpm_image_load_xpm_data): Add prefix.
|
||||
|
||||
* gdk-pixbuf/io-tiff.c (gdk_pixbuf__tiff_image_load_real): Add prefix.
|
||||
(gdk_pixbuf__tiff_image_stop_load): Add prefix.
|
||||
(gdk_pixbuf__tiff_image_load_increment): Add prefix.
|
||||
(gdk_pixbuf__tiff_image_load): Add prefix.
|
||||
(gdk_pixbuf__tiff_image_stop_load): Update invocation.
|
||||
(gdk_pixbuf__tiff_image_begin_load): Add prefix.
|
||||
|
||||
* gdk-pixbuf/io-ras.c (gdk_pixbuf__ras_image_load): Add prefix.
|
||||
(gdk_pixbuf__ras_image_load): Updated invocation.
|
||||
(gdk_pixbuf__ras_image_begin_load): Add prefix.
|
||||
(gdk_pixbuf__ras_image_stop_load): Add prefix.
|
||||
(gdk_pixbuf__ras_image_load_increment): Add prefix.
|
||||
|
||||
* gdk-pixbuf/io-pnm.c (gdk_pixbuf__pnm_image_begin_load): Add prefix.
|
||||
(gdk_pixbuf__pnm_image_stop_load): Add prefix.
|
||||
(gdk_pixbuf__pnm_image_load_increment): Add prefix
|
||||
(gdk_pixbuf__pnm_image_load): Add prefix.
|
||||
|
||||
* gdk-pixbuf/io-jpeg.c (gdk_pixbuf__jpeg_image_load): Add prefix.
|
||||
(gdk_pixbuf__jpeg_image_load_increment): Add prefix.
|
||||
(gdk_pixbuf__jpeg_image_begin_load): Add prefix.
|
||||
(gdk_pixbuf__jpeg_image_stop_load): Add prefix.
|
||||
|
||||
* gdk-pixbuf/io-ico.c (gdk_pixbuf__ico_image_load): Add prefix.
|
||||
(gdk_pixbuf__ico_image_load): update invocation.
|
||||
(gdk_pixbuf__ico_image_load_increment): Add prefix.
|
||||
(gdk_pixbuf__ico_image_load): update invocation.
|
||||
(gdk_pixbuf__ico_image_begin_load): Add prefix.
|
||||
(gdk_pixbuf__ico_image_load): update invocation.
|
||||
(gdk_pixbuf__ico_image_stop_load): Add prefix.
|
||||
|
||||
* gdk-pixbuf/io-gif.c (gdk_pixbuf__gif_image_load_animation): Add prefix.
|
||||
(gdk_pixbuf__gif_image_load): Add prefix.
|
||||
(gdk_pixbuf__gif_image_begin_load): Add prefix.
|
||||
(gdk_pixbuf__gif_image_load_increment): Add prefix.
|
||||
(gdk_pixbuf__gif_image_load_animation): Add prefix.
|
||||
(gdk_pixbuf__gif_image_stop_load): Add prefix.
|
||||
|
||||
* gdk-pixbuf/io-bmp.c (gdk_pixbuf__bmp_image_load): Add prefix.
|
||||
(gdk_pixbuf__bmp_image_load): Rename function called.
|
||||
(gdk_pixbuf__bmp_image_load_increment): Add prefix
|
||||
|
||||
* gdk-pixbuf/io-png.c (gdk_pixbuf__png_image_load): Add prefix.
|
||||
(gdk_pixbuf__png_image_begin_load): Add prefix.
|
||||
(gdk_pixbuf__png_image_stop_load): Add prefix.
|
||||
(gdk_pixbuf__png_image_load_increment): Add prefix.
|
||||
|
||||
* gdk-pixbuf/gdk-pixbuf-io.c (file_formats): Make this static.
|
||||
(gdk_pixbuf_load_module): Load the shared library entry points
|
||||
using a "gdk_pixbuf__$module_name" prefix.
|
||||
(pixbuf_module_symbol): Wrapper routine that uses the module
|
||||
prefix for the modules to load the information.
|
||||
|
||||
* configure.in (GDK_PIXBUF_VERSION): New option --disable-modules
|
||||
lets the user specify that gdk-pixbuf should link all image loader
|
||||
code into the library instaed of creating shared library modules.
|
||||
|
||||
(dynworks): Renamed the automake conditional DYNAMIC_MODULES_WORK
|
||||
to BUILD_DYNAMIC_MODULES.
|
||||
|
||||
2000-02-19 Jonathan Blandford <jrb@redhat.com>
|
||||
|
||||
* gdk-pixbuf/io-gif.c (new_context): fix case where initial
|
||||
colormap entry is Transparent.
|
||||
|
||||
2000-02-19 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gdk-pixbuf/pixops/pixops.c (scale_pixel): Fix error in
|
||||
scale factors for non-alpha case.
|
||||
|
||||
2000-02-14 Mark Crichton <crichton@gimp.org>
|
||||
|
||||
* gdk-pixbuf/io-xpm.c (xpm_extract_color): Added check for "g" color type.
|
||||
Imlib/libXpm handle this, but we didn't.
|
||||
|
||||
2000-02-14 Darin Adler <darin@eazel.com>
|
||||
|
||||
* gdk-pixbuf/testpixbuf.c: Remove now-unnecessary cast.
|
||||
* .cvsignore: gdk-pixbuf/.cvsignore: More to ignore.
|
||||
|
||||
2000-02-14 Elliot Lee <sopwith@redhat.com>
|
||||
* gdk-pixbuf/gdk-pixbuf.h, gdk-pixbuf/gdk-pixbuf-data.c: Make passed-in argument 'const'.
|
||||
|
||||
2000-02-04 Michael Meeks <mmeeks@gnu.org>
|
||||
|
||||
* gdk-pixbuf/io-gif.c (struct _GifContext): add x,y_offset.
|
||||
|
||||
+113
-90
@@ -19,96 +19,6 @@ libgnomecanvaspixbuf_la_LDFLAGS = $(EXTRA_GNOME_LIBS)
|
||||
|
||||
libexecdir = $(libdir)/gdk-pixbuf/loaders
|
||||
|
||||
if HAVE_PNG
|
||||
PNG_LIB = libpixbuf-png.la
|
||||
endif
|
||||
|
||||
if HAVE_JPEG
|
||||
JPEG_LIB = libpixbuf-jpeg.la
|
||||
endif
|
||||
|
||||
GIF_LIB = libpixbuf-gif.la
|
||||
|
||||
ICO_LIB = libpixbuf-ico.la
|
||||
|
||||
RAS_LIB = libpixbuf-ras.la
|
||||
|
||||
if HAVE_TIFF
|
||||
TIFF_LIB = libpixbuf-tiff.la
|
||||
endif
|
||||
|
||||
XPM_LIB = libpixbuf-xpm.la
|
||||
|
||||
PNM_LIB = libpixbuf-pnm.la
|
||||
|
||||
BMP_LIB = libpixbuf-bmp.la
|
||||
|
||||
libexec_LTLIBRARIES = \
|
||||
$(PNG_LIB) \
|
||||
$(JPEG_LIB) \
|
||||
$(GIF_LIB) \
|
||||
$(ICO_LIB) \
|
||||
$(RAS_LIB) \
|
||||
$(XPM_LIB) \
|
||||
$(TIFF_LIB) \
|
||||
$(PNM_LIB) \
|
||||
$(BMP_LIB)
|
||||
|
||||
noinst_PROGRAMS = testpixbuf testpixbuf-drawable testanimation testpixbuf-scale
|
||||
|
||||
DEPS = libgdk_pixbuf.la
|
||||
INCLUDES = -I$(top_srcdir) -I$(top_builddir) \
|
||||
-I$(top_srcdir)/gdk-pixbuf \
|
||||
-I$(top_builddir)/gdk-pixbuf \
|
||||
$(GLIB_CFLAGS) $(LIBART_CFLAGS) $(GTK_CFLAGS)
|
||||
AM_CPPFLAGS = "-DPIXBUF_LIBDIR=\"$(libexecdir)\""
|
||||
|
||||
LDADDS = libgdk_pixbuf.la $(LIBART_LIBS) $(GLIB_LIBS) $(GTK_LIBS)
|
||||
|
||||
if INSIDE_GNOME_LIBS
|
||||
testpixbuf_LDADD = $(LDADDS) $(LIBART_LIBS) -lgmodule
|
||||
testpixbuf_drawable_LDADD = $(LDADDS)
|
||||
testpixbuf_scale_LDADD = $(LDADDS)
|
||||
testanimation_LDADD = $(LDADDS) $(LIBART_LIBS) -lgmodule
|
||||
else
|
||||
testpixbuf_LDADD = $(LDADDS) $(LIBART_LIBS) $(GNOME_LIBS) -lgmodule
|
||||
testpixbuf_drawable_LDADD = $(LDADDS) $(GNOME_LIBS)
|
||||
testpixbuf_scale_LDADD = $(LDADDS) $(GNOME_LIBS)
|
||||
testanimation_LDADD = $(LDADDS) $(LIBART_LIBS) $(GNOME_LIBS) -lgmodule
|
||||
endif
|
||||
|
||||
|
||||
GDK_PIXBUF_LIBS = $(LIBART_LIBS) $(GLIB_LIBS) $(GTK_LIBS)
|
||||
|
||||
#
|
||||
# The GdkPixBuf library
|
||||
#
|
||||
|
||||
libgdk_pixbufincludedir = $(includedir)/gdk-pixbuf
|
||||
|
||||
libgdk_pixbuf_la_SOURCES = \
|
||||
gdk-pixbuf.c \
|
||||
gdk-pixbuf-animation.c \
|
||||
gdk-pixbuf-data.c \
|
||||
gdk-pixbuf-drawable.c \
|
||||
gdk-pixbuf-io.c \
|
||||
gdk-pixbuf-loader.c \
|
||||
gdk-pixbuf-render.c \
|
||||
gdk-pixbuf-scale.c \
|
||||
gdk-pixbuf-util.c
|
||||
|
||||
libgdk_pixbuf_la_LDFLAGS = -version-info 1:0:0 $(LIBART_LIBS) $(GLIB_LIBS) $(GTK_LIBS)
|
||||
libgdk_pixbuf_la_LIBADD = pixops/libpixops.la
|
||||
|
||||
libgdk_pixbufinclude_HEADERS = \
|
||||
gdk-pixbuf.h \
|
||||
gdk-pixbuf-loader.h \
|
||||
gdk-pixbuf-features.h \
|
||||
$(CANVAS_PIXBUF_HEADERFILES)
|
||||
|
||||
noinst_HEADERS = \
|
||||
gdk-pixbuf-io.h
|
||||
|
||||
#
|
||||
# The PNG plugin.
|
||||
#
|
||||
@@ -171,3 +81,116 @@ libpixbuf_pnm_la_LIBADD =
|
||||
libpixbuf_bmp_la_SOURCES = io-bmp.c
|
||||
libpixbuf_bmp_la_LDFLAGS = -avoid-version -module
|
||||
libpixbuf_bmp_la_LIBADD =
|
||||
|
||||
if HAVE_PNG
|
||||
PNG_LIB = libpixbuf-png.la
|
||||
endif
|
||||
|
||||
if HAVE_JPEG
|
||||
JPEG_LIB = libpixbuf-jpeg.la
|
||||
endif
|
||||
|
||||
GIF_LIB = libpixbuf-gif.la
|
||||
|
||||
ICO_LIB = libpixbuf-ico.la
|
||||
|
||||
RAS_LIB = libpixbuf-ras.la
|
||||
|
||||
if HAVE_TIFF
|
||||
TIFF_LIB = libpixbuf-tiff.la
|
||||
endif
|
||||
|
||||
XPM_LIB = libpixbuf-xpm.la
|
||||
|
||||
PNM_LIB = libpixbuf-pnm.la
|
||||
|
||||
BMP_LIB = libpixbuf-bmp.la
|
||||
|
||||
if BUILD_DYNAMIC_MODULES
|
||||
|
||||
libexec_LTLIBRARIES = \
|
||||
$(PNG_LIB) \
|
||||
$(JPEG_LIB) \
|
||||
$(GIF_LIB) \
|
||||
$(ICO_LIB) \
|
||||
$(RAS_LIB) \
|
||||
$(XPM_LIB) \
|
||||
$(TIFF_LIB) \
|
||||
$(PNM_LIB) \
|
||||
$(BMP_LIB)
|
||||
|
||||
|
||||
extra_sources =
|
||||
|
||||
else
|
||||
libexec_LTLIBRARIES =
|
||||
|
||||
extra_sources = $(libpixbuf_png_la_SOURCES) \
|
||||
$(libpixbuf_jpeg_la_SOURCES) \
|
||||
$(libpixbuf_xpm_la_SOURCES) \
|
||||
$(libpixbuf_gif_la_SOURCES) \
|
||||
$(libpixbuf_ico_la_SOURCES) \
|
||||
$(libpixbuf_ras_la_SOURCES) \
|
||||
$(libpixbuf_tiff_la_SOURCES) \
|
||||
$(libpixbuf_pnm_la_SOURCES) \
|
||||
$(libpixbuf_bmp_la_SOURCES)
|
||||
|
||||
builtin_libraries =
|
||||
endif
|
||||
|
||||
noinst_PROGRAMS = testpixbuf testpixbuf-drawable testanimation testpixbuf-scale
|
||||
|
||||
DEPS = libgdk_pixbuf.la
|
||||
INCLUDES = -I$(top_srcdir) -I$(top_builddir) \
|
||||
-I$(top_srcdir)/gdk-pixbuf \
|
||||
-I$(top_builddir)/gdk-pixbuf \
|
||||
$(GLIB_CFLAGS) $(LIBART_CFLAGS) $(GTK_CFLAGS)
|
||||
AM_CPPFLAGS = "-DPIXBUF_LIBDIR=\"$(libexecdir)\""
|
||||
|
||||
LDADDS = libgdk_pixbuf.la $(LIBART_LIBS) $(GLIB_LIBS) $(GTK_LIBS) $(STATIC_LIB_DEPS)
|
||||
|
||||
if INSIDE_GNOME_LIBS
|
||||
testpixbuf_LDADD = $(LDADDS) $(LIBART_LIBS) -lgmodule
|
||||
testpixbuf_drawable_LDADD = $(LDADDS)
|
||||
testpixbuf_scale_LDADD = $(LDADDS)
|
||||
testanimation_LDADD = $(LDADDS) $(LIBART_LIBS) -lgmodule
|
||||
else
|
||||
testpixbuf_LDADD = $(LDADDS) $(LIBART_LIBS) $(GNOME_LIBS) -lgmodule
|
||||
testpixbuf_drawable_LDADD = $(LDADDS) $(GNOME_LIBS)
|
||||
testpixbuf_scale_LDADD = $(LDADDS) $(GNOME_LIBS)
|
||||
testanimation_LDADD = $(LDADDS) $(LIBART_LIBS) $(GNOME_LIBS) -lgmodule
|
||||
endif
|
||||
|
||||
|
||||
GDK_PIXBUF_LIBS = $(LIBART_LIBS) $(GLIB_LIBS) $(GTK_LIBS)
|
||||
|
||||
#
|
||||
# The GdkPixBuf library
|
||||
#
|
||||
|
||||
libgdk_pixbufincludedir = $(includedir)/gdk-pixbuf
|
||||
|
||||
libgdk_pixbuf_la_SOURCES = \
|
||||
gdk-pixbuf.c \
|
||||
gdk-pixbuf-animation.c \
|
||||
gdk-pixbuf-data.c \
|
||||
gdk-pixbuf-drawable.c \
|
||||
gdk-pixbuf-io.c \
|
||||
gdk-pixbuf-loader.c \
|
||||
gdk-pixbuf-render.c \
|
||||
gdk-pixbuf-scale.c \
|
||||
gdk-pixbuf-util.c \
|
||||
$(extra_sources)
|
||||
|
||||
libgdk_pixbuf_la_LDFLAGS = -version-info 1:0:0 $(LIBART_LIBS) $(GLIB_LIBS) $(GTK_LIBS)
|
||||
libgdk_pixbuf_la_LIBADD = pixops/libpixops.la
|
||||
|
||||
libgdk_pixbufinclude_HEADERS = \
|
||||
gdk-pixbuf.h \
|
||||
gdk-pixbuf-loader.h \
|
||||
gdk-pixbuf-features.h \
|
||||
$(CANVAS_PIXBUF_HEADERFILES)
|
||||
|
||||
noinst_HEADERS = \
|
||||
gdk-pixbuf-io.h
|
||||
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
* 1.
|
||||
**/
|
||||
GdkPixbuf *
|
||||
gdk_pixbuf_new_from_data (guchar *data, ArtPixFormat format, gboolean has_alpha,
|
||||
gdk_pixbuf_new_from_data (const guchar *data, ArtPixFormat format, gboolean has_alpha,
|
||||
int width, int height, int rowstride,
|
||||
ArtDestroyNotify dfunc, gpointer dfunc_data)
|
||||
{
|
||||
@@ -57,10 +57,10 @@ gdk_pixbuf_new_from_data (guchar *data, ArtPixFormat format, gboolean has_alpha,
|
||||
g_return_val_if_fail (height > 0, NULL);
|
||||
|
||||
if (has_alpha)
|
||||
art_pixbuf = art_pixbuf_new_rgba_dnotify (data, width, height, rowstride,
|
||||
art_pixbuf = art_pixbuf_new_rgba_dnotify ((art_u8 *)data, width, height, rowstride,
|
||||
dfunc_data, dfunc);
|
||||
else
|
||||
art_pixbuf = art_pixbuf_new_rgb_dnotify (data, width, height, rowstride,
|
||||
art_pixbuf = art_pixbuf_new_rgb_dnotify ((art_u8 *)data, width, height, rowstride,
|
||||
dfunc_data, dfunc);
|
||||
|
||||
g_assert (art_pixbuf != NULL);
|
||||
|
||||
+150
-10
@@ -166,8 +166,7 @@ pixbuf_check_bmp (guchar *buffer, int size)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
GdkPixbufModule file_formats [] = {
|
||||
static GdkPixbufModule file_formats [] = {
|
||||
{ "png", pixbuf_check_png, NULL, NULL, NULL, NULL, NULL, NULL },
|
||||
{ "jpeg", pixbuf_check_jpeg, NULL, NULL, NULL, NULL, NULL, NULL },
|
||||
{ "tiff", pixbuf_check_tiff, NULL, NULL, NULL, NULL, NULL, NULL },
|
||||
@@ -181,6 +180,18 @@ GdkPixbufModule file_formats [] = {
|
||||
{ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL }
|
||||
};
|
||||
|
||||
#ifdef USE_GMODULE
|
||||
static gboolean
|
||||
pixbuf_module_symbol (GModule *module, const char *module_name, const char *symbol_name, gpointer *symbol)
|
||||
{
|
||||
char *full_symbol_name = g_strconcat ("gdk_pixbuf__", module_name, "_", symbol_name, NULL);
|
||||
gboolean return_value;
|
||||
|
||||
return_value = g_module_symbol (module, full_symbol_name, symbol);
|
||||
g_free (full_symbol_name);
|
||||
|
||||
return return_value;
|
||||
}
|
||||
|
||||
/* actually load the image handler - gdk_pixbuf_get_module only get a */
|
||||
/* reference to the module to load, it doesn't actually load it */
|
||||
@@ -192,10 +203,13 @@ gdk_pixbuf_load_module (GdkPixbufModule *image_module)
|
||||
char *path;
|
||||
GModule *module;
|
||||
gpointer load_sym;
|
||||
|
||||
char *name;
|
||||
|
||||
g_return_if_fail (image_module->module == NULL);
|
||||
|
||||
module_name = g_strconcat ("pixbuf-", image_module->module_name, NULL);
|
||||
name = image_module->module_name;
|
||||
|
||||
module_name = g_strconcat ("pixbuf-", name, NULL);
|
||||
path = g_module_build_path (PIXBUF_LIBDIR, module_name);
|
||||
|
||||
module = g_module_open (path, G_MODULE_BIND_LAZY);
|
||||
@@ -220,24 +234,150 @@ gdk_pixbuf_load_module (GdkPixbufModule *image_module)
|
||||
|
||||
image_module->module = module;
|
||||
|
||||
if (g_module_symbol (module, "image_load", &load_sym))
|
||||
if (pixbuf_module_symbol (module, name, "image_load", &load_sym))
|
||||
image_module->load = load_sym;
|
||||
|
||||
if (g_module_symbol (module, "image_load_xpm_data", &load_sym))
|
||||
if (pixbuf_module_symbol (module, name, "image_load_xpm_data", &load_sym))
|
||||
image_module->load_xpm_data = load_sym;
|
||||
|
||||
if (g_module_symbol (module, "image_begin_load", &load_sym))
|
||||
if (pixbuf_module_symbol (module, name, "image_begin_load", &load_sym))
|
||||
image_module->begin_load = load_sym;
|
||||
|
||||
if (g_module_symbol (module, "image_stop_load", &load_sym))
|
||||
if (pixbuf_module_symbol (module, name, "image_stop_load", &load_sym))
|
||||
image_module->stop_load = load_sym;
|
||||
|
||||
if (g_module_symbol (module, "image_load_increment", &load_sym))
|
||||
if (pixbuf_module_symbol (module, name, "image_load_increment", &load_sym))
|
||||
image_module->load_increment = load_sym;
|
||||
|
||||
if (g_module_symbol (module, "image_load_animation", &load_sym))
|
||||
if (pixbuf_module_symbol (module, name, "image_load_animation", &load_sym))
|
||||
image_module->load_animation = load_sym;
|
||||
}
|
||||
#else
|
||||
|
||||
#define mname(type,fn) gdk_pixbuf__ ## type ## _image_ ##fn
|
||||
#define m_load(type) extern GdkPixbuf * mname(type,load) (FILE *f);
|
||||
#define m_load_xpm_data(type) extern GdkPixbuf * mname(type,load_xpm_data) (const char **data);
|
||||
#define m_begin_load(type) \
|
||||
extern gpointer mname(type,begin_load) (ModulePreparedNotifyFunc prepare_func, \
|
||||
ModuleUpdatedNotifyFunc update_func, \
|
||||
ModuleFrameDoneNotifyFunc frame_done_func,\
|
||||
ModuleAnimationDoneNotifyFunc anim_done_func,\
|
||||
gpointer user_data);
|
||||
#define m_stop_load(type) extern void mname(type,stop_load) (gpointer context);
|
||||
#define m_load_increment(type) extern gboolean mname(type,load_increment) (gpointer context, const guchar *buf, guint size);
|
||||
#define m_load_animation(type) extern GdkPixbufAnimation * mname(type,load_animation) (FILE *f);
|
||||
|
||||
m_load (png);
|
||||
m_begin_load (png);
|
||||
m_load_increment (png);
|
||||
m_stop_load (png);
|
||||
m_load (bmp);
|
||||
m_begin_load (bmp);
|
||||
m_load_increment (bmp);
|
||||
m_stop_load (bmp);
|
||||
m_load (gif);
|
||||
m_begin_load (gif);
|
||||
m_load_increment (gif);
|
||||
m_stop_load (gif);
|
||||
m_load_animation (gif);
|
||||
m_load (ico);
|
||||
m_begin_load (ico);
|
||||
m_load_increment (ico);
|
||||
m_stop_load (ico);
|
||||
m_load (jpeg);
|
||||
m_begin_load (jpeg);
|
||||
m_load_increment (jpeg);
|
||||
m_stop_load (jpeg);
|
||||
m_load (pnm);
|
||||
m_begin_load (pnm);
|
||||
m_load_increment (pnm);
|
||||
m_stop_load (pnm);
|
||||
m_load (ras);
|
||||
m_begin_load (ras);
|
||||
m_load_increment (ras);
|
||||
m_stop_load (ras);
|
||||
m_load (tiff);
|
||||
m_begin_load (tiff);
|
||||
m_load_increment (tiff);
|
||||
m_stop_load (tiff);
|
||||
m_load (xpm);
|
||||
m_load_xpm_data (xpm);
|
||||
|
||||
void
|
||||
gdk_pixbuf_load_module (GdkPixbufModule *image_module)
|
||||
{
|
||||
image_module->module = (void *) 1;
|
||||
|
||||
if (strcmp (image_module->module_name, "png") == 0){
|
||||
image_module->load = mname (png,load);
|
||||
image_module->begin_load = mname (png,begin_load);
|
||||
image_module->load_increment = mname (png,load_increment);
|
||||
image_module->stop_load = mname (png,stop_load);
|
||||
return;
|
||||
}
|
||||
|
||||
if (strcmp (image_module->module_name, "bmp") == 0){
|
||||
image_module->load = mname (bmp,load);
|
||||
image_module->begin_load = mname (bmp,begin_load);
|
||||
image_module->load_increment = mname (bmp,load_increment);
|
||||
image_module->stop_load = mname (bmp,stop_load);
|
||||
return;
|
||||
}
|
||||
|
||||
if (strcmp (image_module->module_name, "gif") == 0){
|
||||
image_module->load = mname (gif,load);
|
||||
image_module->begin_load = mname (gif,begin_load);
|
||||
image_module->load_increment = mname (gif,load_increment);
|
||||
image_module->stop_load = mname (gif,stop_load);
|
||||
image_module->load_animation = mname (gif,load_animation);
|
||||
return;
|
||||
}
|
||||
|
||||
if (strcmp (image_module->module_name, "ico") == 0){
|
||||
image_module->load = mname (ico,load);
|
||||
image_module->begin_load = mname (ico,begin_load);
|
||||
image_module->load_increment = mname (ico,load_increment);
|
||||
image_module->stop_load = mname (ico,stop_load);
|
||||
return;
|
||||
}
|
||||
|
||||
if (strcmp (image_module->module_name, "jpeg") == 0){
|
||||
image_module->load = mname (jpeg,load);
|
||||
image_module->begin_load = mname (jpeg,begin_load);
|
||||
image_module->load_increment = mname (jpeg,load_increment);
|
||||
image_module->stop_load = mname (jpeg,stop_load);
|
||||
return;
|
||||
}
|
||||
if (strcmp (image_module->module_name, "pnm") == 0){
|
||||
image_module->load = mname (pnm,load);
|
||||
image_module->begin_load = mname (pnm,begin_load);
|
||||
image_module->load_increment = mname (pnm,load_increment);
|
||||
image_module->stop_load = mname (pnm,stop_load);
|
||||
return;
|
||||
}
|
||||
if (strcmp (image_module->module_name, "ras") == 0){
|
||||
image_module->load = mname (ras,load);
|
||||
image_module->begin_load = mname (ras,begin_load);
|
||||
image_module->load_increment = mname (ras,load_increment);
|
||||
image_module->stop_load = mname (ras,stop_load);
|
||||
return;
|
||||
}
|
||||
if (strcmp (image_module->module_name, "tiff") == 0){
|
||||
image_module->load = mname (tiff,load);
|
||||
image_module->begin_load = mname (tiff,begin_load);
|
||||
image_module->load_increment = mname (tiff,load_increment);
|
||||
image_module->stop_load = mname (tiff,stop_load);
|
||||
return;
|
||||
}
|
||||
if (strcmp (image_module->module_name, "xpm") == 0){
|
||||
image_module->load = mname (xpm,load);
|
||||
image_module->load_xpm_data = mname (xpm,load_xpm_data);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -111,7 +111,7 @@ GdkPixbuf *gdk_pixbuf_new (ArtPixFormat format, gboolean has_alpha, int bits_per
|
||||
|
||||
GdkPixbuf *gdk_pixbuf_new_from_file (const char *filename);
|
||||
|
||||
GdkPixbuf *gdk_pixbuf_new_from_data (guchar *data,
|
||||
GdkPixbuf *gdk_pixbuf_new_from_data (const guchar *data,
|
||||
ArtPixFormat format,
|
||||
gboolean has_alpha,
|
||||
int width, int height,
|
||||
|
||||
+19
-18
@@ -172,19 +172,20 @@ struct bmp_progressive_state {
|
||||
};
|
||||
|
||||
gpointer
|
||||
image_begin_load(ModulePreparedNotifyFunc prepared_func,
|
||||
ModuleUpdatedNotifyFunc updated_func,
|
||||
ModuleFrameDoneNotifyFunc frame_done_func,
|
||||
ModuleAnimationDoneNotifyFunc anim_done_func,
|
||||
gpointer user_data);
|
||||
void image_stop_load(gpointer data);
|
||||
gboolean image_load_increment(gpointer data, guchar * buf, guint size);
|
||||
gdk_pixbuf__bmp_image_begin_load(ModulePreparedNotifyFunc prepared_func,
|
||||
ModuleUpdatedNotifyFunc updated_func,
|
||||
ModuleFrameDoneNotifyFunc frame_done_func,
|
||||
ModuleAnimationDoneNotifyFunc anim_done_func,
|
||||
gpointer user_data);
|
||||
|
||||
void gdk_pixbuf__bmp_image_stop_load(gpointer data);
|
||||
gboolean gdk_pixbuf__bmp_image_load_increment(gpointer data, guchar * buf, guint size);
|
||||
|
||||
|
||||
|
||||
/* Shared library entry point --> This should be removed when
|
||||
generic_image_load enters gdk-pixbuf-io. */
|
||||
GdkPixbuf *image_load(FILE * f)
|
||||
GdkPixbuf *gdk_pixbuf__bmp_image_load(FILE * f)
|
||||
{
|
||||
guchar *membuf;
|
||||
size_t length;
|
||||
@@ -192,7 +193,7 @@ GdkPixbuf *image_load(FILE * f)
|
||||
|
||||
GdkPixbuf *pb;
|
||||
|
||||
State = image_begin_load(NULL, NULL, NULL, NULL, NULL);
|
||||
State = gdk_pixbuf__bmp_image_begin_load(NULL, NULL, NULL, NULL, NULL);
|
||||
membuf = g_malloc(4096);
|
||||
|
||||
g_assert(membuf != NULL);
|
||||
@@ -201,7 +202,7 @@ GdkPixbuf *image_load(FILE * f)
|
||||
while (feof(f) == 0) {
|
||||
length = fread(membuf, 1, 4096, f);
|
||||
if (length > 0)
|
||||
(void) image_load_increment(State, membuf, length);
|
||||
(void) gdk_pixbuf__bmp_image_load_increment(State, membuf, length);
|
||||
|
||||
}
|
||||
g_free(membuf);
|
||||
@@ -210,7 +211,7 @@ GdkPixbuf *image_load(FILE * f)
|
||||
|
||||
pb = State->pixbuf;
|
||||
|
||||
image_stop_load(State);
|
||||
gdk_pixbuf__bmp_image_stop_load(State);
|
||||
return pb;
|
||||
}
|
||||
|
||||
@@ -305,11 +306,11 @@ static void DecodeHeader(unsigned char *BFH, unsigned char *BIH,
|
||||
*/
|
||||
|
||||
gpointer
|
||||
image_begin_load(ModulePreparedNotifyFunc prepared_func,
|
||||
ModuleUpdatedNotifyFunc updated_func,
|
||||
ModuleFrameDoneNotifyFunc frame_done_func,
|
||||
ModuleAnimationDoneNotifyFunc anim_done_func,
|
||||
gpointer user_data)
|
||||
gdk_pixbuf__bmp_image_begin_load(ModulePreparedNotifyFunc prepared_func,
|
||||
ModuleUpdatedNotifyFunc updated_func,
|
||||
ModuleFrameDoneNotifyFunc frame_done_func,
|
||||
ModuleAnimationDoneNotifyFunc anim_done_func,
|
||||
gpointer user_data)
|
||||
{
|
||||
struct bmp_progressive_state *context;
|
||||
|
||||
@@ -347,7 +348,7 @@ image_begin_load(ModulePreparedNotifyFunc prepared_func,
|
||||
*
|
||||
* free context, unref gdk_pixbuf
|
||||
*/
|
||||
void image_stop_load(gpointer data)
|
||||
void gdk_pixbuf__bmp_image_stop_load(gpointer data)
|
||||
{
|
||||
struct bmp_progressive_state *context =
|
||||
(struct bmp_progressive_state *) data;
|
||||
@@ -658,7 +659,7 @@ void DoCompressedByte(struct bmp_progressive_state *context, guchar ** buf,
|
||||
*
|
||||
* append image data onto inrecrementally built output image
|
||||
*/
|
||||
gboolean image_load_increment(gpointer data, guchar * buf, guint size)
|
||||
gboolean gdk_pixbuf__bmp_image_load_increment(gpointer data, guchar * buf, guint size)
|
||||
{
|
||||
struct bmp_progressive_state *context =
|
||||
(struct bmp_progressive_state *) data;
|
||||
|
||||
+13
-13
@@ -354,7 +354,7 @@ gif_get_extension (GifContext *context)
|
||||
if ((context->block_buf[0] & 0x1) != 0) {
|
||||
context->gif89.transparent = context->block_buf[3];
|
||||
} else {
|
||||
context->gif89.transparent = FALSE;
|
||||
context->gif89.transparent = -1;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -607,7 +607,7 @@ gif_fill_in_pixels (GifContext *context, guchar *dest, gint offset, guchar v)
|
||||
{
|
||||
guchar *pixel = NULL;
|
||||
|
||||
if (context->gif89.transparent) {
|
||||
if (context->gif89.transparent != -1) {
|
||||
pixel = dest + (context->draw_ypos + offset) * gdk_pixbuf_get_rowstride (context->pixbuf) + context->draw_xpos * 4;
|
||||
*pixel = context->color_map [0][(guchar) v];
|
||||
*(pixel+1) = context->color_map [1][(guchar) v];
|
||||
@@ -667,7 +667,7 @@ gif_get_lzw (GifContext *context)
|
||||
|
||||
if (context->pixbuf == NULL) {
|
||||
context->pixbuf = gdk_pixbuf_new (ART_PIX_RGB,
|
||||
context->gif89.transparent,
|
||||
context->gif89.transparent != -1,
|
||||
8,
|
||||
context->width,
|
||||
context->height);
|
||||
@@ -714,7 +714,7 @@ gif_get_lzw (GifContext *context)
|
||||
}
|
||||
bound_flag = TRUE;
|
||||
|
||||
if (context->gif89.transparent) {
|
||||
if (context->gif89.transparent != -1) {
|
||||
temp = dest + context->draw_ypos * gdk_pixbuf_get_rowstride (context->pixbuf) + context->draw_xpos * 4;
|
||||
*temp = context->color_map [0][(guchar) v];
|
||||
*(temp+1) = context->color_map [1][(guchar) v];
|
||||
@@ -1084,7 +1084,7 @@ new_context (void)
|
||||
}
|
||||
/* Shared library entry point */
|
||||
GdkPixbuf *
|
||||
image_load (FILE *file)
|
||||
gdk_pixbuf__gif_image_load (FILE *file)
|
||||
{
|
||||
GifContext *context;
|
||||
|
||||
@@ -1099,11 +1099,11 @@ image_load (FILE *file)
|
||||
}
|
||||
|
||||
gpointer
|
||||
image_begin_load (ModulePreparedNotifyFunc prepare_func,
|
||||
ModuleUpdatedNotifyFunc update_func,
|
||||
ModuleFrameDoneNotifyFunc frame_done_func,
|
||||
ModuleAnimationDoneNotifyFunc anim_done_func,
|
||||
gpointer user_data)
|
||||
gdk_pixbuf__gif_image_begin_load (ModulePreparedNotifyFunc prepare_func,
|
||||
ModuleUpdatedNotifyFunc update_func,
|
||||
ModuleFrameDoneNotifyFunc frame_done_func,
|
||||
ModuleAnimationDoneNotifyFunc anim_done_func,
|
||||
gpointer user_data)
|
||||
{
|
||||
GifContext *context;
|
||||
|
||||
@@ -1121,7 +1121,7 @@ image_begin_load (ModulePreparedNotifyFunc prepare_func,
|
||||
}
|
||||
|
||||
void
|
||||
image_stop_load (gpointer data)
|
||||
gdk_pixbuf__gif_image_stop_load (gpointer data)
|
||||
{
|
||||
GifContext *context = (GifContext *) data;
|
||||
|
||||
@@ -1136,7 +1136,7 @@ image_stop_load (gpointer data)
|
||||
}
|
||||
|
||||
gboolean
|
||||
image_load_increment (gpointer data, guchar *buf, guint size)
|
||||
gdk_pixbuf__gif_image_load_increment (gpointer data, guchar *buf, guint size)
|
||||
{
|
||||
gint retval;
|
||||
GifContext *context = (GifContext *) data;
|
||||
@@ -1194,7 +1194,7 @@ image_load_increment (gpointer data, guchar *buf, guint size)
|
||||
}
|
||||
|
||||
GdkPixbufAnimation *
|
||||
image_load_animation (FILE *file)
|
||||
gdk_pixbuf__gif_image_load_animation (FILE *file)
|
||||
{
|
||||
GifContext *context;
|
||||
|
||||
|
||||
+20
-19
@@ -153,19 +153,20 @@ struct ico_progressive_state {
|
||||
};
|
||||
|
||||
gpointer
|
||||
image_begin_load(ModulePreparedNotifyFunc prepared_func,
|
||||
ModuleUpdatedNotifyFunc updated_func,
|
||||
ModuleFrameDoneNotifyFunc frame_done_func,
|
||||
ModuleAnimationDoneNotifyFunc anim_done_func,
|
||||
gpointer user_data);
|
||||
void image_stop_load(gpointer data);
|
||||
gboolean image_load_increment(gpointer data, guchar * buf, guint size);
|
||||
gdk_pixbuf__ico_image_begin_load(ModulePreparedNotifyFunc prepared_func,
|
||||
ModuleUpdatedNotifyFunc updated_func,
|
||||
ModuleFrameDoneNotifyFunc frame_done_func,
|
||||
ModuleAnimationDoneNotifyFunc anim_done_func,
|
||||
gpointer user_data);
|
||||
void gdk_pixbuf__ico_image_stop_load(gpointer data);
|
||||
gboolean gdk_pixbuf__ico_image_load_increment(gpointer data, guchar * buf, guint size);
|
||||
|
||||
|
||||
|
||||
/* Shared library entry point --> Can go when generic_image_load
|
||||
enters gdk-pixbuf-io */
|
||||
GdkPixbuf *image_load(FILE * f)
|
||||
GdkPixbuf *
|
||||
gdk_pixbuf__ico_image_load(FILE * f)
|
||||
{
|
||||
guchar *membuf;
|
||||
size_t length;
|
||||
@@ -173,16 +174,15 @@ GdkPixbuf *image_load(FILE * f)
|
||||
|
||||
GdkPixbuf *pb;
|
||||
|
||||
State = image_begin_load(NULL, NULL, NULL, NULL, NULL);
|
||||
State = gdk_pixbuf__ico_image_begin_load(NULL, NULL, NULL, NULL, NULL);
|
||||
membuf = g_malloc(4096);
|
||||
|
||||
g_assert(membuf != NULL);
|
||||
|
||||
|
||||
while (feof(f) == 0) {
|
||||
length = fread(membuf, 1, 4096, f);
|
||||
if (length > 0)
|
||||
(void)image_load_increment(State, membuf, length);
|
||||
gdk_pixbuf__ico_image_load_increment(State, membuf, length);
|
||||
|
||||
}
|
||||
g_free(membuf);
|
||||
@@ -191,7 +191,7 @@ GdkPixbuf *image_load(FILE * f)
|
||||
|
||||
pb = State->pixbuf;
|
||||
|
||||
image_stop_load(State);
|
||||
gdk_pixbuf__ico_image_stop_load(State);
|
||||
return pb;
|
||||
}
|
||||
|
||||
@@ -365,11 +365,11 @@ static void DecodeHeader(guchar *Data, gint Bytes,
|
||||
*/
|
||||
|
||||
gpointer
|
||||
image_begin_load(ModulePreparedNotifyFunc prepared_func,
|
||||
ModuleUpdatedNotifyFunc updated_func,
|
||||
ModuleFrameDoneNotifyFunc frame_done_func,
|
||||
ModuleAnimationDoneNotifyFunc anim_done_func,
|
||||
gpointer user_data)
|
||||
gdk_pixbuf__ico_image_begin_load(ModulePreparedNotifyFunc prepared_func,
|
||||
ModuleUpdatedNotifyFunc updated_func,
|
||||
ModuleFrameDoneNotifyFunc frame_done_func,
|
||||
ModuleAnimationDoneNotifyFunc anim_done_func,
|
||||
gpointer user_data)
|
||||
{
|
||||
struct ico_progressive_state *context;
|
||||
|
||||
@@ -405,7 +405,7 @@ image_begin_load(ModulePreparedNotifyFunc prepared_func,
|
||||
*
|
||||
* free context, unref gdk_pixbuf
|
||||
*/
|
||||
void image_stop_load(gpointer data)
|
||||
void gdk_pixbuf__ico_image_stop_load(gpointer data)
|
||||
{
|
||||
struct ico_progressive_state *context =
|
||||
(struct ico_progressive_state *) data;
|
||||
@@ -631,7 +631,8 @@ static void OneLine(struct ico_progressive_state *context)
|
||||
*
|
||||
* append image data onto inrecrementally built output image
|
||||
*/
|
||||
gboolean image_load_increment(gpointer data, guchar * buf, guint size)
|
||||
gboolean
|
||||
gdk_pixbuf__ico_image_load_increment(gpointer data, guchar * buf, guint size)
|
||||
{
|
||||
struct ico_progressive_state *context =
|
||||
(struct ico_progressive_state *) data;
|
||||
|
||||
+16
-16
@@ -87,14 +87,14 @@ typedef struct {
|
||||
struct error_handler_data jerr;
|
||||
} JpegProgContext;
|
||||
|
||||
GdkPixbuf *image_load (FILE *f);
|
||||
gpointer image_begin_load (ModulePreparedNotifyFunc func,
|
||||
ModuleUpdatedNotifyFunc func2,
|
||||
ModuleFrameDoneNotifyFunc func3,
|
||||
ModuleAnimationDoneNotifyFunc func4,
|
||||
gpointer user_data);
|
||||
void image_stop_load (gpointer context);
|
||||
gboolean image_load_increment(gpointer context, guchar *buf, guint size);
|
||||
GdkPixbuf *gdk_pixbuf__jpeg_image_load (FILE *f);
|
||||
gpointer gdk_pixbuf__jpeg_image_begin_load (ModulePreparedNotifyFunc func,
|
||||
ModuleUpdatedNotifyFunc func2,
|
||||
ModuleFrameDoneNotifyFunc func3,
|
||||
ModuleAnimationDoneNotifyFunc func4,
|
||||
gpointer user_data);
|
||||
void gdk_pixbuf__jpeg_image_stop_load (gpointer context);
|
||||
gboolean gdk_pixbuf__jpeg_image_load_increment(gpointer context, guchar *buf, guint size);
|
||||
|
||||
|
||||
static void
|
||||
@@ -151,7 +151,7 @@ explode_gray_into_buf (struct jpeg_decompress_struct *cinfo,
|
||||
|
||||
/* Shared library entry point */
|
||||
GdkPixbuf *
|
||||
image_load (FILE *f)
|
||||
gdk_pixbuf__jpeg_image_load (FILE *f)
|
||||
{
|
||||
gint w, h, i;
|
||||
guchar *pixels = NULL;
|
||||
@@ -275,11 +275,11 @@ skip_input_data (j_decompress_ptr cinfo, long num_bytes)
|
||||
*/
|
||||
|
||||
gpointer
|
||||
image_begin_load (ModulePreparedNotifyFunc prepared_func,
|
||||
ModuleUpdatedNotifyFunc updated_func,
|
||||
ModuleFrameDoneNotifyFunc frame_func,
|
||||
ModuleAnimationDoneNotifyFunc anim_done_func,
|
||||
gpointer user_data)
|
||||
gdk_pixbuf__jpeg_image_begin_load (ModulePreparedNotifyFunc prepared_func,
|
||||
ModuleUpdatedNotifyFunc updated_func,
|
||||
ModuleFrameDoneNotifyFunc frame_func,
|
||||
ModuleAnimationDoneNotifyFunc anim_done_func,
|
||||
gpointer user_data)
|
||||
{
|
||||
JpegProgContext *context;
|
||||
my_source_mgr *src;
|
||||
@@ -319,7 +319,7 @@ image_begin_load (ModulePreparedNotifyFunc prepared_func,
|
||||
* free context, unref gdk_pixbuf
|
||||
*/
|
||||
void
|
||||
image_stop_load (gpointer data)
|
||||
gdk_pixbuf__jpeg_image_stop_load (gpointer data)
|
||||
{
|
||||
JpegProgContext *context = (JpegProgContext *) data;
|
||||
|
||||
@@ -351,7 +351,7 @@ image_stop_load (gpointer data)
|
||||
* append image data onto inrecrementally built output image
|
||||
*/
|
||||
gboolean
|
||||
image_load_increment (gpointer data, guchar *buf, guint size)
|
||||
gdk_pixbuf__jpeg_image_load_increment (gpointer data, guchar *buf, guint size)
|
||||
{
|
||||
JpegProgContext *context = (JpegProgContext *)data;
|
||||
struct jpeg_decompress_struct *cinfo;
|
||||
|
||||
+8
-8
@@ -148,7 +148,7 @@ free_buffer (gpointer user_data, gpointer data)
|
||||
|
||||
/* Shared library entry point */
|
||||
GdkPixbuf *
|
||||
image_load (FILE *f)
|
||||
gdk_pixbuf__png_image_load (FILE *f)
|
||||
{
|
||||
png_structp png_ptr;
|
||||
png_infop info_ptr, end_info;
|
||||
@@ -274,11 +274,11 @@ struct _LoadContext {
|
||||
};
|
||||
|
||||
gpointer
|
||||
image_begin_load (ModulePreparedNotifyFunc prepare_func,
|
||||
ModuleUpdatedNotifyFunc update_func,
|
||||
ModuleFrameDoneNotifyFunc frame_done_func,
|
||||
ModuleAnimationDoneNotifyFunc anim_done_func,
|
||||
gpointer user_data)
|
||||
gdk_pixbuf__png_image_begin_load (ModulePreparedNotifyFunc prepare_func,
|
||||
ModuleUpdatedNotifyFunc update_func,
|
||||
ModuleFrameDoneNotifyFunc frame_done_func,
|
||||
ModuleAnimationDoneNotifyFunc anim_done_func,
|
||||
gpointer user_data)
|
||||
{
|
||||
LoadContext* lc;
|
||||
|
||||
@@ -329,7 +329,7 @@ image_begin_load (ModulePreparedNotifyFunc prepare_func,
|
||||
}
|
||||
|
||||
void
|
||||
image_stop_load (gpointer context)
|
||||
gdk_pixbuf__png_image_stop_load (gpointer context)
|
||||
{
|
||||
LoadContext* lc = context;
|
||||
|
||||
@@ -342,7 +342,7 @@ image_stop_load (gpointer context)
|
||||
}
|
||||
|
||||
gboolean
|
||||
image_load_increment(gpointer context, guchar *buf, guint size)
|
||||
gdk_pixbuf__png_image_load_increment(gpointer context, guchar *buf, guint size)
|
||||
{
|
||||
LoadContext* lc = context;
|
||||
|
||||
|
||||
+16
-16
@@ -75,14 +75,14 @@ typedef struct {
|
||||
gboolean got_header; /* have we loaded jpeg header? */
|
||||
} PnmLoaderContext;
|
||||
|
||||
GdkPixbuf *image_load (FILE *f);
|
||||
gpointer image_begin_load (ModulePreparedNotifyFunc func,
|
||||
ModuleUpdatedNotifyFunc func2,
|
||||
ModuleFrameDoneNotifyFunc frame_done_func,
|
||||
ModuleAnimationDoneNotifyFunc anim_done_func,
|
||||
gpointer user_data);
|
||||
void image_stop_load (gpointer context);
|
||||
gboolean image_load_increment(gpointer context, guchar *buf, guint size);
|
||||
GdkPixbuf *gdk_pixbuf__pnm_image_load (FILE *f);
|
||||
gpointer gdk_pixbuf__pnm_image_begin_load (ModulePreparedNotifyFunc func,
|
||||
ModuleUpdatedNotifyFunc func2,
|
||||
ModuleFrameDoneNotifyFunc frame_done_func,
|
||||
ModuleAnimationDoneNotifyFunc anim_done_func,
|
||||
gpointer user_data);
|
||||
void gdk_pixbuf__pnm_image_stop_load (gpointer context);
|
||||
gboolean gdk_pixbuf__pnm_image_load_increment(gpointer context, guchar *buf, guint size);
|
||||
|
||||
static void explode_bitmap_into_buf (PnmLoaderContext *context);
|
||||
static void explode_gray_into_buf (PnmLoaderContext *context);
|
||||
@@ -580,7 +580,7 @@ pnm_read_scanline (PnmLoaderContext *context)
|
||||
|
||||
/* Shared library entry point */
|
||||
GdkPixbuf *
|
||||
image_load (FILE *f)
|
||||
gdk_pixbuf__pnm_image_load (FILE *f)
|
||||
{
|
||||
gint nbytes;
|
||||
gint rc;
|
||||
@@ -688,11 +688,11 @@ image_load (FILE *f)
|
||||
*/
|
||||
|
||||
gpointer
|
||||
image_begin_load (ModulePreparedNotifyFunc prepared_func,
|
||||
ModuleUpdatedNotifyFunc updated_func,
|
||||
ModuleFrameDoneNotifyFunc frame_done_func,
|
||||
ModuleAnimationDoneNotifyFunc anim_done_func,
|
||||
gpointer user_data)
|
||||
gdk_pixbuf__pnm_image_begin_load (ModulePreparedNotifyFunc prepared_func,
|
||||
ModuleUpdatedNotifyFunc updated_func,
|
||||
ModuleFrameDoneNotifyFunc frame_done_func,
|
||||
ModuleAnimationDoneNotifyFunc anim_done_func,
|
||||
gpointer user_data)
|
||||
{
|
||||
PnmLoaderContext *context;
|
||||
|
||||
@@ -717,7 +717,7 @@ image_begin_load (ModulePreparedNotifyFunc prepared_func,
|
||||
* free context, unref gdk_pixbuf
|
||||
*/
|
||||
void
|
||||
image_stop_load (gpointer data)
|
||||
gdk_pixbuf__pnm_image_stop_load (gpointer data)
|
||||
{
|
||||
PnmLoaderContext *context = (PnmLoaderContext *) data;
|
||||
|
||||
@@ -740,7 +740,7 @@ image_stop_load (gpointer data)
|
||||
* append image data onto inrecrementally built output image
|
||||
*/
|
||||
gboolean
|
||||
image_load_increment (gpointer data, guchar *buf, guint size)
|
||||
gdk_pixbuf__pnm_image_load_increment (gpointer data, guchar *buf, guint size)
|
||||
{
|
||||
PnmLoaderContext *context = (PnmLoaderContext *)data;
|
||||
PnmIOBuffer *inbuf;
|
||||
|
||||
+20
-18
@@ -93,18 +93,18 @@ struct ras_progressive_state {
|
||||
};
|
||||
|
||||
gpointer
|
||||
image_begin_load(ModulePreparedNotifyFunc prepared_func,
|
||||
ModuleUpdatedNotifyFunc updated_func,
|
||||
ModuleFrameDoneNotifyFunc frame_done_func,
|
||||
ModuleAnimationDoneNotifyFunc anim_done_func,
|
||||
gpointer user_data);
|
||||
void image_stop_load(gpointer data);
|
||||
gboolean image_load_increment(gpointer data, guchar * buf, guint size);
|
||||
gdk_pixbuf__ras_image_begin_load(ModulePreparedNotifyFunc prepared_func,
|
||||
ModuleUpdatedNotifyFunc updated_func,
|
||||
ModuleFrameDoneNotifyFunc frame_done_func,
|
||||
ModuleAnimationDoneNotifyFunc anim_done_func,
|
||||
gpointer user_data);
|
||||
void gdk_pixbuf__ras_image_stop_load(gpointer data);
|
||||
gboolean gdk_pixbuf__ras_image_load_increment(gpointer data, guchar * buf, guint size);
|
||||
|
||||
|
||||
|
||||
/* Shared library entry point */
|
||||
GdkPixbuf *image_load(FILE * f)
|
||||
GdkPixbuf *gdk_pixbuf__ras_image_load(FILE * f)
|
||||
{
|
||||
guchar *membuf;
|
||||
size_t length;
|
||||
@@ -112,7 +112,7 @@ GdkPixbuf *image_load(FILE * f)
|
||||
|
||||
GdkPixbuf *pb;
|
||||
|
||||
State = image_begin_load(NULL, NULL, NULL, NULL, NULL);
|
||||
State = gdk_pixbuf__ras_image_begin_load(NULL, NULL, NULL, NULL, NULL);
|
||||
|
||||
membuf = g_malloc(4096);
|
||||
|
||||
@@ -120,7 +120,7 @@ GdkPixbuf *image_load(FILE * f)
|
||||
|
||||
while (feof(f) == 0) {
|
||||
length = fread(membuf, 1, 4096, f);
|
||||
(void)image_load_increment(State, membuf, length);
|
||||
(void)gdk_pixbuf__ras_image_load_increment(State, membuf, length);
|
||||
}
|
||||
g_free(membuf);
|
||||
if (State->pixbuf != NULL)
|
||||
@@ -128,7 +128,7 @@ GdkPixbuf *image_load(FILE * f)
|
||||
|
||||
pb = State->pixbuf;
|
||||
|
||||
image_stop_load(State);
|
||||
gdk_pixbuf__ras_image_stop_load(State);
|
||||
return pb;
|
||||
}
|
||||
|
||||
@@ -208,11 +208,11 @@ static void RAS2State(struct rasterfile *RAS,
|
||||
*/
|
||||
|
||||
gpointer
|
||||
image_begin_load(ModulePreparedNotifyFunc prepared_func,
|
||||
ModuleUpdatedNotifyFunc updated_func,
|
||||
ModuleFrameDoneNotifyFunc frame_done_func,
|
||||
ModuleAnimationDoneNotifyFunc anim_done_func,
|
||||
gpointer user_data)
|
||||
gdk_pixbuf__ras_image_begin_load(ModulePreparedNotifyFunc prepared_func,
|
||||
ModuleUpdatedNotifyFunc updated_func,
|
||||
ModuleFrameDoneNotifyFunc frame_done_func,
|
||||
ModuleAnimationDoneNotifyFunc anim_done_func,
|
||||
gpointer user_data)
|
||||
{
|
||||
struct ras_progressive_state *context;
|
||||
|
||||
@@ -247,7 +247,8 @@ image_begin_load(ModulePreparedNotifyFunc prepared_func,
|
||||
*
|
||||
* free context, unref gdk_pixbuf
|
||||
*/
|
||||
void image_stop_load(gpointer data)
|
||||
void
|
||||
gdk_pixbuf__ras_image_stop_load(gpointer data)
|
||||
{
|
||||
struct ras_progressive_state *context =
|
||||
(struct ras_progressive_state *) data;
|
||||
@@ -386,7 +387,8 @@ static void OneLine(struct ras_progressive_state *context)
|
||||
*
|
||||
* append image data onto inrecrementally built output image
|
||||
*/
|
||||
gboolean image_load_increment(gpointer data, guchar * buf, guint size)
|
||||
gboolean
|
||||
gdk_pixbuf__ras_image_load_increment(gpointer data, guchar * buf, guint size)
|
||||
{
|
||||
struct ras_progressive_state *context =
|
||||
(struct ras_progressive_state *) data;
|
||||
|
||||
+11
-11
@@ -50,7 +50,7 @@ struct _TiffData
|
||||
|
||||
|
||||
GdkPixbuf *
|
||||
image_load_real (FILE *f, TiffData *context)
|
||||
gdk_pixbuf__tiff_image_load_real (FILE *f, TiffData *context)
|
||||
{
|
||||
TIFF *tiff;
|
||||
guchar *pixels = NULL;
|
||||
@@ -123,9 +123,9 @@ image_load_real (FILE *f, TiffData *context)
|
||||
/* Static loader */
|
||||
|
||||
GdkPixbuf *
|
||||
image_load (FILE *f)
|
||||
gdk_pixbuf__tiff_image_load (FILE *f)
|
||||
{
|
||||
return image_load_real (f, NULL);
|
||||
return gdk_pixbuf__tiff_image_load_real (f, NULL);
|
||||
}
|
||||
|
||||
|
||||
@@ -138,11 +138,11 @@ image_load (FILE *f)
|
||||
|
||||
|
||||
gpointer
|
||||
image_begin_load (ModulePreparedNotifyFunc prepare_func,
|
||||
ModuleUpdatedNotifyFunc update_func,
|
||||
ModuleFrameDoneNotifyFunc frame_done_func,
|
||||
ModuleAnimationDoneNotifyFunc anim_done_func,
|
||||
gpointer user_data)
|
||||
gdk_pixbuf__tiff_image_begin_load (ModulePreparedNotifyFunc prepare_func,
|
||||
ModuleUpdatedNotifyFunc update_func,
|
||||
ModuleFrameDoneNotifyFunc frame_done_func,
|
||||
ModuleAnimationDoneNotifyFunc anim_done_func,
|
||||
gpointer user_data)
|
||||
{
|
||||
TiffData *context;
|
||||
gint fd;
|
||||
@@ -169,7 +169,7 @@ image_begin_load (ModulePreparedNotifyFunc prepare_func,
|
||||
}
|
||||
|
||||
void
|
||||
image_stop_load (gpointer data)
|
||||
gdk_pixbuf__tiff_image_stop_load (gpointer data)
|
||||
{
|
||||
TiffData *context = (TiffData*) data;
|
||||
|
||||
@@ -178,7 +178,7 @@ image_stop_load (gpointer data)
|
||||
fflush (context->file);
|
||||
rewind (context->file);
|
||||
if (context->all_okay)
|
||||
image_load_real (context->file, context);
|
||||
gdk_pixbuf__tiff_image_load_real (context->file, context);
|
||||
|
||||
fclose (context->file);
|
||||
unlink (context->tempname);
|
||||
@@ -186,7 +186,7 @@ image_stop_load (gpointer data)
|
||||
}
|
||||
|
||||
gboolean
|
||||
image_load_increment (gpointer data, guchar *buf, guint size)
|
||||
gdk_pixbuf__tiff_image_load_increment (gpointer data, guchar *buf, guint size)
|
||||
{
|
||||
TiffData *context = (TiffData *) data;
|
||||
|
||||
|
||||
+3
-3
@@ -195,7 +195,7 @@ xpm_extract_color (const gchar *buffer)
|
||||
|
||||
counter = 0;
|
||||
while (ptr == NULL) {
|
||||
if (buffer[counter] == 'c') {
|
||||
if ((buffer[counter] == 'c') || (buffer[counter] == 'g')) {
|
||||
ch = buffer[counter + 1];
|
||||
if (ch == 0x20 || ch == 0x09)
|
||||
ptr = &buffer[counter + 1];
|
||||
@@ -436,7 +436,7 @@ pixbuf_create_from_xpm (const gchar * (*get_buf) (enum buf_op op, gpointer handl
|
||||
|
||||
/* Shared library entry point for file loading */
|
||||
GdkPixbuf *
|
||||
image_load (FILE *f)
|
||||
gdk_pixbuf__xpm_image_load (FILE *f)
|
||||
{
|
||||
GdkPixbuf *pixbuf;
|
||||
struct file_handle h;
|
||||
@@ -451,7 +451,7 @@ image_load (FILE *f)
|
||||
|
||||
/* Shared library entry point for memory loading */
|
||||
GdkPixbuf *
|
||||
image_load_xpm_data (const gchar **data)
|
||||
gdk_pixbuf__xpm_image_load_xpm_data (const gchar **data)
|
||||
{
|
||||
GdkPixbuf *pixbuf;
|
||||
struct mem_handle h;
|
||||
|
||||
@@ -2,7 +2,7 @@ noinst_LTLIBRARIES = libpixops.la
|
||||
|
||||
INCLUDES = $(GLIB_CFLAGS) $(LIBART_CFLAGS)
|
||||
|
||||
bin_PROGRAMS = timescale
|
||||
noinst_PROGRAMS = timescale
|
||||
|
||||
timescale_SOURCES = timescale.c
|
||||
timescale_LDADD = libpixops.la $(GLIB_LIBS) -lm
|
||||
|
||||
@@ -672,9 +672,9 @@ scale_pixel (art_u8 *dest, int dest_x, int dest_channels, int dest_has_alpha,
|
||||
}
|
||||
else
|
||||
{
|
||||
dest[0] = r >> 16;
|
||||
dest[1] = g >> 16;
|
||||
dest[2] = b >> 16;
|
||||
dest[0] = (r + 0xffffff) >> 24;
|
||||
dest[1] = (g + 0xffffff) >> 24;
|
||||
dest[2] = (b + 0xffffff) >> 24;
|
||||
|
||||
if (dest_has_alpha)
|
||||
dest[3] = 0xff;
|
||||
@@ -755,9 +755,9 @@ scale_line (int *weights, int n_x, int n_y,
|
||||
}
|
||||
}
|
||||
|
||||
dest[0] = r >> 16;
|
||||
dest[1] = g >> 16;
|
||||
dest[2] = b >> 16;
|
||||
dest[0] = (r + 0xffff) >> 16;
|
||||
dest[1] = (g + 0xffff) >> 16;
|
||||
dest[2] = (b + 0xffff) >> 16;
|
||||
|
||||
if (dest_has_alpha)
|
||||
dest[3] = 0xff;
|
||||
|
||||
@@ -86,18 +86,18 @@ gint gdk_input_add (gint source,
|
||||
gpointer data);
|
||||
void gdk_input_remove (gint tag);
|
||||
|
||||
gint gdk_pointer_grab (GdkWindow * window,
|
||||
gint gdk_pointer_grab (GdkWindow *window,
|
||||
gint owner_events,
|
||||
GdkEventMask event_mask,
|
||||
GdkWindow * confine_to,
|
||||
GdkCursor * cursor,
|
||||
GdkWindow *confine_to,
|
||||
GdkCursor *cursor,
|
||||
guint32 time);
|
||||
void gdk_pointer_ungrab (guint32 time);
|
||||
|
||||
gint gdk_keyboard_grab (GdkWindow * window,
|
||||
gint owner_events,
|
||||
guint32 time);
|
||||
void gdk_keyboard_ungrab (guint32 time);
|
||||
gint gdk_keyboard_grab (GdkWindow *window,
|
||||
gint owner_events,
|
||||
guint32 time);
|
||||
void gdk_keyboard_ungrab (guint32 time);
|
||||
|
||||
gint gdk_pointer_is_grabbed (void);
|
||||
|
||||
|
||||
+8
-5
@@ -30,7 +30,10 @@
|
||||
GdkCursor*
|
||||
gdk_cursor_ref (GdkCursor *cursor)
|
||||
{
|
||||
cursor->refcount += 1;
|
||||
g_return_val_if_fail (cursor != NULL, NULL);
|
||||
g_return_val_if_fail (cursor->ref_count > 0, NULL);
|
||||
|
||||
cursor->ref_count += 1;
|
||||
|
||||
return cursor;
|
||||
}
|
||||
@@ -39,11 +42,11 @@ void
|
||||
gdk_cursor_unref (GdkCursor *cursor)
|
||||
{
|
||||
g_return_if_fail (cursor != NULL);
|
||||
g_return_if_fail (cursor->refcount > 0);
|
||||
g_return_if_fail (cursor->ref_count > 0);
|
||||
|
||||
cursor->refcount -= 1;
|
||||
cursor->ref_count -= 1;
|
||||
|
||||
if (cursor->refcount == 0)
|
||||
_gdk_cursor_destroy(cursor);
|
||||
if (cursor->ref_count == 0)
|
||||
_gdk_cursor_destroy (cursor);
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -19,12 +19,12 @@ typedef enum
|
||||
struct _GdkCursor
|
||||
{
|
||||
GdkCursorType type;
|
||||
guint refcount;
|
||||
guint ref_count;
|
||||
};
|
||||
|
||||
/* Cursors
|
||||
*/
|
||||
GdkCursor* gdk_cursor_new (GdkCursorType cursor_type);
|
||||
GdkCursor* gdk_cursor_new (GdkCursorType cursor_type);
|
||||
GdkCursor* gdk_cursor_new_from_pixmap (GdkPixmap *source,
|
||||
GdkPixmap *mask,
|
||||
GdkColor *fg,
|
||||
|
||||
+4
-3
@@ -396,13 +396,14 @@ gdk_draw_segments (GdkDrawable *drawable,
|
||||
gint nsegs)
|
||||
{
|
||||
g_return_if_fail (drawable != NULL);
|
||||
g_return_if_fail (segs != NULL);
|
||||
g_return_if_fail (gc != NULL);
|
||||
g_return_if_fail (nsegs >= 0);
|
||||
|
||||
if (nsegs == 0)
|
||||
return;
|
||||
|
||||
g_return_if_fail (segs != NULL);
|
||||
g_return_if_fail (gc != NULL);
|
||||
g_return_if_fail (nsegs >= 0);
|
||||
|
||||
if (GDK_DRAWABLE_DESTROYED (drawable))
|
||||
return;
|
||||
|
||||
|
||||
@@ -410,6 +410,7 @@ gdk_event_get_time (GdkEvent *event)
|
||||
case GDK_2BUTTON_PRESS:
|
||||
case GDK_3BUTTON_PRESS:
|
||||
case GDK_BUTTON_RELEASE:
|
||||
case GDK_SCROLL:
|
||||
return event->button.time;
|
||||
case GDK_KEY_PRESS:
|
||||
case GDK_KEY_RELEASE:
|
||||
|
||||
+35
-3
@@ -17,6 +17,7 @@ typedef struct _GdkEventNoExpose GdkEventNoExpose;
|
||||
typedef struct _GdkEventVisibility GdkEventVisibility;
|
||||
typedef struct _GdkEventMotion GdkEventMotion;
|
||||
typedef struct _GdkEventButton GdkEventButton;
|
||||
typedef struct _GdkEventScroll GdkEventScroll;
|
||||
typedef struct _GdkEventKey GdkEventKey;
|
||||
typedef struct _GdkEventFocus GdkEventFocus;
|
||||
typedef struct _GdkEventCrossing GdkEventCrossing;
|
||||
@@ -69,6 +70,7 @@ typedef GdkFilterReturn (*GdkFilterFunc) (GdkXEvent *xevent,
|
||||
* Map: A window has been mapped. (It is now visible on the screen).
|
||||
* Unmap: A window has been unmapped. (It is no longer visible on
|
||||
* the screen).
|
||||
* Scroll: A mouse wheel was scrolled either up or down.
|
||||
*/
|
||||
typedef enum
|
||||
{
|
||||
@@ -103,7 +105,8 @@ typedef enum
|
||||
GDK_DROP_FINISHED = 27,
|
||||
GDK_CLIENT_EVENT = 28,
|
||||
GDK_VISIBILITY_NOTIFY = 29,
|
||||
GDK_NO_EXPOSE = 30
|
||||
GDK_NO_EXPOSE = 30,
|
||||
GDK_SCROLL = 31
|
||||
} GdkEventType;
|
||||
|
||||
/* Event masks. (Used to select what types of events a window
|
||||
@@ -131,15 +134,25 @@ typedef enum
|
||||
GDK_PROXIMITY_IN_MASK = 1 << 18,
|
||||
GDK_PROXIMITY_OUT_MASK = 1 << 19,
|
||||
GDK_SUBSTRUCTURE_MASK = 1 << 20,
|
||||
GDK_ALL_EVENTS_MASK = 0x0FFFFF
|
||||
GDK_SCROLL_MASK = 1 << 21,
|
||||
GDK_ALL_EVENTS_MASK = 0x3FFFFE
|
||||
} GdkEventMask;
|
||||
|
||||
typedef enum {
|
||||
typedef enum
|
||||
{
|
||||
GDK_VISIBILITY_UNOBSCURED,
|
||||
GDK_VISIBILITY_PARTIAL,
|
||||
GDK_VISIBILITY_FULLY_OBSCURED
|
||||
} GdkVisibilityState;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
GDK_SCROLL_UP,
|
||||
GDK_SCROLL_DOWN,
|
||||
GDK_SCROLL_LEFT,
|
||||
GDK_SCROLL_RIGHT
|
||||
} GdkScrollDirection;
|
||||
|
||||
/* Types of enter/leave notifications.
|
||||
* Ancestor:
|
||||
* Virtual:
|
||||
@@ -244,6 +257,24 @@ struct _GdkEventButton
|
||||
gdouble x_root, y_root;
|
||||
};
|
||||
|
||||
struct _GdkEventScroll
|
||||
{
|
||||
GdkEventType type;
|
||||
GdkWindow *window;
|
||||
gint8 send_event;
|
||||
guint32 time;
|
||||
gdouble x;
|
||||
gdouble y;
|
||||
gdouble pressure;
|
||||
gdouble xtilt;
|
||||
gdouble ytilt;
|
||||
guint state;
|
||||
GdkScrollDirection direction;
|
||||
GdkInputSource source;
|
||||
guint32 deviceid;
|
||||
gdouble x_root, y_root;
|
||||
};
|
||||
|
||||
struct _GdkEventKey
|
||||
{
|
||||
GdkEventType type;
|
||||
@@ -361,6 +392,7 @@ union _GdkEvent
|
||||
GdkEventVisibility visibility;
|
||||
GdkEventMotion motion;
|
||||
GdkEventButton button;
|
||||
GdkEventScroll scroll;
|
||||
GdkEventKey key;
|
||||
GdkEventCrossing crossing;
|
||||
GdkEventFocus focus_change;
|
||||
|
||||
+1
-1
@@ -48,7 +48,7 @@ gdk_OBJECTS = \
|
||||
gdkconfig.h : gdkconfig.h.win32
|
||||
$(CP) gdkconfig.h.win32 gdkconfig.h
|
||||
|
||||
gdk-$(GTK_VER).dll : $(gdk_OBJECTS) gdk.def win32/libgdk-win32.a
|
||||
gdk-$(GTK_VER).dll : $(gdk_OBJECTS) gdk.def win32/libgdk-win32.a win32/gdk-win32res.o
|
||||
$(GLIB)/build-dll gdk $(GTK_VER) gdk.def $(gdk_OBJECTS) -L win32 -lgdk-win32 -lwntab32x -L $(GLIB) -lglib-$(GLIB_VER) -lgdi32 -luser32 -limm32 -lshell32 -lole32 -luuid $(LDFLAGS) win32/gdk-win32res.o
|
||||
|
||||
.SUFFIXES: .c .o .i
|
||||
|
||||
+11
-13
@@ -87,8 +87,7 @@ alloc_color_cells(Colormap colormap,
|
||||
#ifdef SOME_STRANGE_BUG
|
||||
if (!ResizePalette (colormap->palette, colormap->size + nmore))
|
||||
{
|
||||
g_warning ("alloc_color_cells: ResizePalette to %d failed",
|
||||
colormap->size + nmore);
|
||||
WIN32_API_FAILED ("ResizePalette")
|
||||
return FALSE;
|
||||
}
|
||||
g_print("alloc_color_cells: %#x to %d\n",
|
||||
@@ -205,7 +204,7 @@ alloc_color(Colormap colormap,
|
||||
/* It was a free'd entry anyway, so we can use it, and
|
||||
set it to the correct color. */
|
||||
if (SetPaletteEntries (colormap->palette, index, 1, &entry) == 0)
|
||||
g_warning ("alloc_color: SetPaletteEntries #1 failed");
|
||||
WIN32_API_FAILED ("SetPaletteEntries #1");
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -218,7 +217,7 @@ alloc_color(Colormap colormap,
|
||||
/* A free slot, use it. */
|
||||
if (SetPaletteEntries (colormap->palette,
|
||||
index, 1, &entry) == 0)
|
||||
g_warning ("alloc_color: SetPaletteEntries #2 failed");
|
||||
WIN32_API_FAILED ("SetPaletteEntries #2");
|
||||
index = i;
|
||||
break;
|
||||
}
|
||||
@@ -238,10 +237,9 @@ alloc_color(Colormap colormap,
|
||||
index = colormap->size;
|
||||
colormap->size++;
|
||||
if (!ResizePalette (colormap->palette, colormap->size))
|
||||
g_warning ("alloc_color: ResizePalette to %d failed",
|
||||
colormap->size);
|
||||
WIN32_API_FAILED ("ResizePalette");
|
||||
if (SetPaletteEntries (colormap->palette, index, 1, &entry) == 0)
|
||||
g_warning ("alloc_color: SetPaletteEntries #3 failed");
|
||||
WIN32_API_FAILED ("SetPaletteEntries #3");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -329,7 +327,7 @@ free_colors (Colormap colormap,
|
||||
if (SetPaletteEntries (colormap->palette, lowestpixel,
|
||||
highestpixel - lowestpixel + 1,
|
||||
entries + lowestpixel) == 0)
|
||||
g_warning ("free_colors: SetPaletteEntries failed");
|
||||
WIN32_API_FAILED ("SetPaletteEntries");
|
||||
#endif
|
||||
colormap->stale = TRUE;
|
||||
#if 0
|
||||
@@ -1553,7 +1551,7 @@ gdk_colormap_change (GdkColormap *colormap,
|
||||
|
||||
if (SetPaletteEntries (private->xcolormap->palette,
|
||||
0, ncolors, palette) == 0)
|
||||
g_warning ("gdk_colormap_change: SetPaletteEntries failed");
|
||||
WIN32_API_FAILED ("SetPaletteEntries");
|
||||
private->xcolormap->stale = TRUE;
|
||||
break;
|
||||
|
||||
@@ -1860,7 +1858,7 @@ gdk_colormap_alloc_colors_private (GdkColormap *colormap,
|
||||
|
||||
if (SetPaletteEntries (private->xcolormap->palette,
|
||||
0, nstore, store) == 0)
|
||||
g_warning ("gdk_colormap_alloc_colors_private: SetPaletteEntries failed");
|
||||
WIN32_API_FAILED ("SetPaletteEntries");
|
||||
private->xcolormap->stale = TRUE;
|
||||
|
||||
g_free (store);
|
||||
@@ -2118,7 +2116,7 @@ gdk_color_change (GdkColormap *colormap,
|
||||
|
||||
if (SetPaletteEntries (private->xcolormap->palette,
|
||||
color->pixel, 1, &xcolor) == 0)
|
||||
g_warning ("gdk_color_change: SetPaletteEntries failed");
|
||||
WIN32_API_FAILED ("SetPaletteEntries");
|
||||
private->xcolormap->stale = TRUE;
|
||||
|
||||
return TRUE;
|
||||
@@ -2215,12 +2213,12 @@ gdk_colormap_cmp (Colormap *a,
|
||||
return (*a == *b);
|
||||
}
|
||||
|
||||
char *
|
||||
gchar *
|
||||
gdk_color_to_string (const GdkColor *color)
|
||||
{
|
||||
static char buf[100];
|
||||
|
||||
sprintf (buf, "(%.04x,%.04x,%.04x): %.06x",
|
||||
sprintf (buf, "(%.04x,%.04x,%.04x):%.06x",
|
||||
color->red, color->green, color->blue, color->pixel);
|
||||
|
||||
return buf;
|
||||
|
||||
@@ -117,7 +117,7 @@ gdk_cursor_new (GdkCursorType cursor_type)
|
||||
{
|
||||
xcursor = LoadCursor (gdk_DLLInstance, cursors[i].name);
|
||||
if (xcursor == NULL)
|
||||
g_warning ("gdk_cursor_new: LoadCursor failed");
|
||||
WIN32_API_FAILED ("LoadCursor");
|
||||
GDK_NOTE (MISC, g_print ("gdk_cursor_new: %#x %d\n",
|
||||
xcursor, cursor_type));
|
||||
}
|
||||
@@ -132,7 +132,7 @@ gdk_cursor_new (GdkCursorType cursor_type)
|
||||
private->xcursor = xcursor;
|
||||
cursor = (GdkCursor*) private;
|
||||
cursor->type = cursor_type;
|
||||
cursor->refcount = 1;
|
||||
cursor->ref_count = 1;
|
||||
|
||||
return cursor;
|
||||
}
|
||||
@@ -251,7 +251,8 @@ gdk_cursor_new_from_pixmap (GdkPixmap *source,
|
||||
private->xcursor = xcursor;
|
||||
cursor = (GdkCursor*) private;
|
||||
cursor->type = GDK_CURSOR_IS_PIXMAP;
|
||||
|
||||
cursor->ref_count = 1;
|
||||
|
||||
return cursor;
|
||||
}
|
||||
|
||||
@@ -268,7 +269,7 @@ _gdk_cursor_destroy (GdkCursor *cursor)
|
||||
|
||||
if (cursor->type == GDK_CURSOR_IS_PIXMAP)
|
||||
if (!DestroyIcon (private->xcursor))
|
||||
g_warning ("_gdk_cursor_destroy: DestroyIcon failed");
|
||||
WIN32_API_FAILED ("DestroyIcon");
|
||||
|
||||
g_free (private);
|
||||
}
|
||||
|
||||
@@ -934,7 +934,7 @@ gdk_window_register_dnd (GdkWindow *window)
|
||||
context = target_context_new ();
|
||||
hres = CoLockObjectExternal ((IUnknown *) &context->idt, TRUE, FALSE);
|
||||
if (!SUCCEEDED (hres))
|
||||
g_warning ("gdk_window_register_dnd: CoLockObjectExternal failed");
|
||||
WIN32_API_FAILED ("CoLockObjectExternal");
|
||||
else
|
||||
{
|
||||
hres = RegisterDragDrop (GDK_DRAWABLE_XID (window), &context->idt);
|
||||
@@ -944,7 +944,7 @@ gdk_window_register_dnd (GdkWindow *window)
|
||||
CoLockObjectExternal ((IUnknown *) &context->idt, FALSE, FALSE);
|
||||
}
|
||||
else if (!SUCCEEDED (hres))
|
||||
g_warning ("gdk_window_register_dnd: RegisterDragDrop failed");
|
||||
WIN32_API_FAILED ("RegisterDragDrop");
|
||||
else
|
||||
{
|
||||
gdk_window_add_filter (window, gdk_destroy_filter, &context->idt);
|
||||
|
||||
+224
-95
@@ -163,8 +163,8 @@ gdk_drawable_set_colormap (GdkDrawable *drawable,
|
||||
drawable_private->colormap = colormap;
|
||||
gdk_colormap_ref (drawable_private->colormap);
|
||||
|
||||
if (GDK_IS_WINDOW (drawable) &&
|
||||
drawable_private->window_type != GDK_WINDOW_TOPLEVEL)
|
||||
if (GDK_IS_WINDOW (drawable)
|
||||
&& drawable_private->window_type != GDK_WINDOW_TOPLEVEL)
|
||||
gdk_window_add_colormap_windows (drawable);
|
||||
}
|
||||
}
|
||||
@@ -186,20 +186,23 @@ gdk_win32_draw_rectangle (GdkDrawable *drawable,
|
||||
gint width,
|
||||
gint height)
|
||||
{
|
||||
GdkGCPrivate *gc_private;
|
||||
GdkGCPrivate *gc_private = (GdkGCPrivate*) gc;
|
||||
GdkGCWin32Data *gc_data = GDK_GC_WIN32DATA (gc_private);
|
||||
HDC hdc;
|
||||
HGDIOBJ oldpen, oldbrush;
|
||||
HBRUSH hbr = NULL;
|
||||
POINT pts[4];
|
||||
gboolean ok = TRUE;
|
||||
|
||||
gc_private = (GdkGCPrivate*) gc;
|
||||
|
||||
hdc = gdk_gc_predraw (drawable, gc_private);
|
||||
|
||||
GDK_NOTE (MISC, g_print ("gdk_draw_rectangle: %#x (%d) %s%dx%d@+%d+%d\n",
|
||||
GDK_NOTE (MISC, g_print ("gdk_win32_draw_rectangle: %#x (%d) %s%dx%d@+%d+%d\n",
|
||||
GDK_DRAWABLE_XID (drawable),
|
||||
gc_private,
|
||||
(filled ? "fill " : ""),
|
||||
width, height, x, y));
|
||||
|
||||
hdc = gdk_gc_predraw (drawable, gc_private,
|
||||
GDK_GC_FOREGROUND|GDK_GC_BACKGROUND);
|
||||
|
||||
#if 0
|
||||
{
|
||||
HBRUSH hbr = GetCurrentObject (hdc, OBJ_BRUSH);
|
||||
@@ -219,20 +222,64 @@ gdk_win32_draw_rectangle (GdkDrawable *drawable,
|
||||
}
|
||||
#endif
|
||||
|
||||
if (filled)
|
||||
oldpen = SelectObject (hdc, GetStockObject (NULL_PEN));
|
||||
else
|
||||
oldbrush = SelectObject (hdc, GetStockObject (HOLLOW_BRUSH));
|
||||
|
||||
if (!Rectangle (hdc, x, y, x+width+1, y+height+1))
|
||||
g_warning ("gdk_draw_rectangle: Rectangle failed");
|
||||
|
||||
if (filled)
|
||||
SelectObject (hdc, oldpen);
|
||||
else
|
||||
SelectObject (hdc, oldbrush);
|
||||
if (gc_data->fill_style == GDK_OPAQUE_STIPPLED)
|
||||
{
|
||||
if (!BeginPath (hdc))
|
||||
WIN32_API_FAILED ("BeginPath"), ok = FALSE;
|
||||
|
||||
gdk_gc_postdraw (drawable, gc_private);
|
||||
/* Win9x doesn't support Rectangle calls in a path,
|
||||
* thus use Polyline.
|
||||
*/
|
||||
|
||||
pts[0].x = x;
|
||||
pts[0].y = y;
|
||||
pts[1].x = x + width + 1;
|
||||
pts[1].y = y;
|
||||
pts[2].x = x + width + 1;
|
||||
pts[2].y = y + height + 1;
|
||||
pts[3].x = x;
|
||||
pts[3].y = y + height + 1;
|
||||
|
||||
if (ok)
|
||||
MoveToEx (hdc, x, y, NULL);
|
||||
|
||||
if (ok && !Polyline (hdc, pts, 4))
|
||||
WIN32_API_FAILED ("Polyline"), ok = FALSE;
|
||||
|
||||
if (ok && !CloseFigure (hdc))
|
||||
WIN32_API_FAILED ("CloseFigure"), ok = FALSE;
|
||||
|
||||
if (ok && !EndPath (hdc))
|
||||
WIN32_API_FAILED ("EndPath"), ok = FALSE;
|
||||
|
||||
if (ok && !filled)
|
||||
if (!WidenPath (hdc))
|
||||
WIN32_API_FAILED ("WidenPath"), ok = FALSE;
|
||||
|
||||
if (ok && !FillPath (hdc))
|
||||
WIN32_API_FAILED ("FillPath"), ok = FALSE;
|
||||
|
||||
if (hbr != NULL)
|
||||
if (!DeleteObject (hbr))
|
||||
WIN32_API_FAILED ("DeleteObject");
|
||||
}
|
||||
else
|
||||
{
|
||||
if (filled)
|
||||
oldpen = SelectObject (hdc, GetStockObject (NULL_PEN));
|
||||
else
|
||||
oldbrush = SelectObject (hdc, GetStockObject (HOLLOW_BRUSH));
|
||||
|
||||
if (!Rectangle (hdc, x, y, x+width+1, y+height+1))
|
||||
WIN32_API_FAILED ("Rectangle");
|
||||
|
||||
if (filled)
|
||||
SelectObject (hdc, oldpen);
|
||||
else
|
||||
SelectObject (hdc, oldbrush);
|
||||
}
|
||||
|
||||
gdk_gc_postdraw (drawable, gc_private, GDK_GC_FOREGROUND|GDK_GC_BACKGROUND);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -258,7 +305,8 @@ gdk_win32_draw_arc (GdkDrawable *drawable,
|
||||
|
||||
if (width != 0 && height != 0 && angle2 != 0)
|
||||
{
|
||||
hdc = gdk_gc_predraw (drawable, gc_private);
|
||||
hdc = gdk_gc_predraw (drawable, gc_private,
|
||||
GDK_GC_FOREGROUND|GDK_GC_BACKGROUND);
|
||||
|
||||
if (angle2 >= 360*64)
|
||||
{
|
||||
@@ -280,6 +328,8 @@ gdk_win32_draw_arc (GdkDrawable *drawable,
|
||||
nYStartArc = y + height/2 + -100. * sin((angle1+angle2)/64.*2.*G_PI/360.);
|
||||
}
|
||||
|
||||
/* GDK_OPAQUE_STIPPLED arcs not implemented. */
|
||||
|
||||
if (filled)
|
||||
{
|
||||
GDK_NOTE (MISC, g_print ("...Pie(hdc,%d,%d,%d,%d,%d,%d,%d,%d)\n",
|
||||
@@ -298,7 +348,8 @@ gdk_win32_draw_arc (GdkDrawable *drawable,
|
||||
Arc (hdc, x, y, x+width, y+height,
|
||||
nXStartArc, nYStartArc, nXEndArc, nYEndArc);
|
||||
}
|
||||
gdk_gc_postdraw (drawable, gc_private);
|
||||
gdk_gc_postdraw (drawable, gc_private,
|
||||
GDK_GC_FOREGROUND|GDK_GC_BACKGROUND);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -309,22 +360,24 @@ gdk_win32_draw_polygon (GdkDrawable *drawable,
|
||||
GdkPoint *points,
|
||||
gint npoints)
|
||||
{
|
||||
GdkGCPrivate *gc_private;
|
||||
GdkGCPrivate *gc_private = (GdkGCPrivate*) gc;
|
||||
GdkGCWin32Data *gc_data = GDK_GC_WIN32DATA (gc_private);
|
||||
HDC hdc;
|
||||
HBRUSH hbr = NULL;
|
||||
POINT *pts;
|
||||
gboolean ok = TRUE;
|
||||
int i;
|
||||
|
||||
gc_private = (GdkGCPrivate*) gc;
|
||||
|
||||
GDK_NOTE (MISC, g_print ("gdk_draw_polygon: %#x (%d) %d\n",
|
||||
GDK_NOTE (MISC, g_print ("gdk_win32_draw_polygon: %#x (%d) %d\n",
|
||||
GDK_DRAWABLE_XID (drawable), gc_private,
|
||||
npoints));
|
||||
|
||||
if (npoints < 2)
|
||||
return;
|
||||
|
||||
hdc = gdk_gc_predraw (drawable, gc_private);
|
||||
pts = g_malloc ((npoints+1) * sizeof (POINT));
|
||||
hdc = gdk_gc_predraw (drawable, gc_private,
|
||||
GDK_GC_FOREGROUND|GDK_GC_BACKGROUND);
|
||||
pts = g_new (POINT, npoints+1);
|
||||
|
||||
for (i = 0; i < npoints; i++)
|
||||
{
|
||||
@@ -332,25 +385,59 @@ gdk_win32_draw_polygon (GdkDrawable *drawable,
|
||||
pts[i].y = points[i].y;
|
||||
}
|
||||
|
||||
if ((points[0].x != points[npoints-1].x) ||
|
||||
(points[0].y != points[npoints-1].y))
|
||||
if (gc_data->fill_style == GDK_OPAQUE_STIPPLED)
|
||||
{
|
||||
pts[npoints].x = points[0].x;
|
||||
pts[npoints].y = points[0].y;
|
||||
npoints++;
|
||||
}
|
||||
if (filled)
|
||||
{
|
||||
if (!Polygon (hdc, pts, npoints))
|
||||
g_warning ("gdk_draw_polygon: Polygon failed");
|
||||
if (!BeginPath (hdc))
|
||||
WIN32_API_FAILED ("BeginPath"), ok = FALSE;
|
||||
|
||||
MoveToEx (hdc, points[0].x, points[0].y, NULL);
|
||||
|
||||
if (pts[0].x == pts[npoints-1].x && pts[0].y == pts[npoints-1].y)
|
||||
npoints--;
|
||||
|
||||
if (ok && !Polyline (hdc, pts, 4))
|
||||
WIN32_API_FAILED ("Polyline"), ok = FALSE;
|
||||
|
||||
if (ok && !CloseFigure (hdc))
|
||||
WIN32_API_FAILED ("CloseFigure"), ok = FALSE;
|
||||
|
||||
if (ok && !EndPath (hdc))
|
||||
WIN32_API_FAILED ("EndPath"), ok = FALSE;
|
||||
|
||||
if (ok && !filled)
|
||||
if (!WidenPath (hdc))
|
||||
WIN32_API_FAILED ("WidenPath"), ok = FALSE;
|
||||
|
||||
if (ok && !FillPath (hdc))
|
||||
WIN32_API_FAILED ("FillPath"), ok = FALSE;
|
||||
|
||||
if (hbr != NULL)
|
||||
if (!DeleteObject (hbr))
|
||||
WIN32_API_FAILED ("DeleteObject");
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!Polyline (hdc, pts, npoints))
|
||||
g_warning ("gdk_draw_polygon: Polyline failed");
|
||||
if (points[0].x != points[npoints-1].x
|
||||
|| points[0].y != points[npoints-1].y)
|
||||
{
|
||||
pts[npoints].x = points[0].x;
|
||||
pts[npoints].y = points[0].y;
|
||||
npoints++;
|
||||
}
|
||||
|
||||
if (filled)
|
||||
{
|
||||
if (!Polygon (hdc, pts, npoints))
|
||||
WIN32_API_FAILED ("Polygon");
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!Polyline (hdc, pts, npoints))
|
||||
WIN32_API_FAILED ("Polyline");
|
||||
}
|
||||
}
|
||||
g_free (pts);
|
||||
gdk_gc_postdraw (drawable, gc_private);
|
||||
gdk_gc_postdraw (drawable, gc_private, GDK_GC_FOREGROUND|GDK_GC_BACKGROUND);
|
||||
}
|
||||
|
||||
typedef struct
|
||||
@@ -374,12 +461,12 @@ gdk_draw_text_handler (GdkWin32SingleFont *singlefont,
|
||||
|
||||
if ((oldfont = SelectObject (argp->hdc, singlefont->xfont)) == NULL)
|
||||
{
|
||||
g_warning ("gdk_draw_text_handler: SelectObject failed");
|
||||
WIN32_API_FAILED ("SelectObject");
|
||||
return;
|
||||
}
|
||||
|
||||
if (!TextOutW (argp->hdc, argp->x, argp->y, wcstr, wclen))
|
||||
g_warning ("gdk_draw_text_handler: TextOutW failed");
|
||||
WIN32_API_FAILED ("TextOutW");
|
||||
GetTextExtentPoint32W (argp->hdc, wcstr, wclen, &size);
|
||||
argp->x += size.cx;
|
||||
|
||||
@@ -413,7 +500,8 @@ gdk_win32_draw_text (GdkDrawable *drawable,
|
||||
|
||||
arg.x = x;
|
||||
arg.y = y;
|
||||
arg.hdc = gdk_gc_predraw (drawable, gc_private);
|
||||
arg.hdc = gdk_gc_predraw (drawable, gc_private,
|
||||
GDK_GC_FOREGROUND|GDK_GC_FONT);
|
||||
|
||||
GDK_NOTE (MISC, g_print ("gdk_draw_text: %#x (%d,%d) \"%.*s\" (len %d)\n",
|
||||
GDK_DRAWABLE_XID (drawable),
|
||||
@@ -430,7 +518,7 @@ gdk_win32_draw_text (GdkDrawable *drawable,
|
||||
|
||||
g_free (wcstr);
|
||||
|
||||
gdk_gc_postdraw (drawable, gc_private);
|
||||
gdk_gc_postdraw (drawable, gc_private, GDK_GC_FOREGROUND|GDK_GC_FONT);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -460,7 +548,8 @@ gdk_win32_draw_text_wc (GdkDrawable *drawable,
|
||||
|
||||
arg.x = x;
|
||||
arg.y = y;
|
||||
arg.hdc = gdk_gc_predraw (drawable, gc_private);
|
||||
arg.hdc = gdk_gc_predraw (drawable, gc_private,
|
||||
GDK_GC_FOREGROUND|GDK_GC_FONT);
|
||||
|
||||
GDK_NOTE (MISC, g_print ("gdk_draw_text_wc: %#x (%d,%d) len: %d\n",
|
||||
GDK_DRAWABLE_XID (drawable),
|
||||
@@ -481,7 +570,7 @@ gdk_win32_draw_text_wc (GdkDrawable *drawable,
|
||||
if (sizeof (wchar_t) != sizeof (GdkWChar))
|
||||
g_free (wcstr);
|
||||
|
||||
gdk_gc_postdraw (drawable, gc_private);
|
||||
gdk_gc_postdraw (drawable, gc_private, GDK_GC_FOREGROUND|GDK_GC_FONT);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -514,7 +603,7 @@ gdk_win32_draw_drawable (GdkDrawable *drawable,
|
||||
width, height, xsrc, ysrc,
|
||||
GDK_DRAWABLE_XID (drawable), xdest, ydest));
|
||||
|
||||
hdc = gdk_gc_predraw (drawable, gc_private);
|
||||
hdc = gdk_gc_predraw (drawable, gc_private, 0);
|
||||
|
||||
src_rgn = CreateRectRgn (0, 0, src_private->width + 1, src_private->height + 1);
|
||||
draw_rgn = CreateRectRgn (xsrc, ysrc, xsrc + width + 1, ysrc + height + 1);
|
||||
@@ -573,20 +662,20 @@ gdk_win32_draw_drawable (GdkDrawable *drawable,
|
||||
if (src_private->window_type == GDK_DRAWABLE_PIXMAP)
|
||||
{
|
||||
if ((srcdc = CreateCompatibleDC (hdc)) == NULL)
|
||||
g_warning ("gdk_draw_pixmap: CreateCompatibleDC failed");
|
||||
WIN32_API_FAILED ("CreateCompatibleDC");
|
||||
|
||||
if ((hgdiobj = SelectObject (srcdc, GDK_DRAWABLE_XID (src))) == NULL)
|
||||
g_warning ("gdk_draw_pixmap: SelectObject #1 failed");
|
||||
WIN32_API_FAILED ("SelectObject #1");
|
||||
|
||||
if (!BitBlt (hdc, xdest, ydest, width, height,
|
||||
srcdc, xsrc, ysrc, SRCCOPY))
|
||||
g_warning ("gdk_draw_pixmap: BitBlt failed");
|
||||
WIN32_API_FAILED ("BitBlt");
|
||||
|
||||
if ((SelectObject (srcdc, hgdiobj) == NULL))
|
||||
g_warning ("gdk_draw_pixmap: SelectObject #2 failed");
|
||||
WIN32_API_FAILED ("SelectObject #2");
|
||||
|
||||
if (!DeleteDC (srcdc))
|
||||
g_warning ("gdk_draw_pixmap: DeleteDC failed");
|
||||
WIN32_API_FAILED ("DeleteDC");
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -611,24 +700,24 @@ gdk_win32_draw_drawable (GdkDrawable *drawable,
|
||||
if (!ScrollDC (hdc, xdest - xsrc, ydest - ysrc,
|
||||
&scrollRect, &clipRect,
|
||||
updateRgn, NULL))
|
||||
g_warning ("gdk_draw_pixmap: ScrollDC failed");
|
||||
WIN32_API_FAILED ("ScrollDC");
|
||||
if (!InvalidateRgn (GDK_DRAWABLE_XID (drawable), updateRgn, FALSE))
|
||||
g_warning ("gdk_draw_pixmap: InvalidateRgn failed");
|
||||
WIN32_API_FAILED ("InvalidateRgn");
|
||||
if (!UpdateWindow (GDK_DRAWABLE_XID (drawable)))
|
||||
g_warning ("gdk_draw_pixmap: UpdateWindow failed");
|
||||
WIN32_API_FAILED ("UpdateWindow");
|
||||
}
|
||||
else
|
||||
{
|
||||
if ((srcdc = GetDC (GDK_DRAWABLE_XID (src))) == NULL)
|
||||
g_warning ("gdk_draw_pixmap: GetDC failed");
|
||||
WIN32_API_FAILED ("GetDC");
|
||||
|
||||
if (!BitBlt (hdc, xdest, ydest, width, height,
|
||||
srcdc, xsrc, ysrc, SRCCOPY))
|
||||
g_warning ("gdk_draw_pixmap: BitBlt failed");
|
||||
WIN32_API_FAILED ("BitBlt");
|
||||
ReleaseDC (GDK_DRAWABLE_XID (src), srcdc);
|
||||
}
|
||||
}
|
||||
gdk_gc_postdraw (drawable, gc_private);
|
||||
gdk_gc_postdraw (drawable, gc_private, 0);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -637,28 +726,26 @@ gdk_win32_draw_points (GdkDrawable *drawable,
|
||||
GdkPoint *points,
|
||||
gint npoints)
|
||||
{
|
||||
GdkGCPrivate *gc_private;
|
||||
GdkGCPrivate *gc_private = (GdkGCPrivate*) gc;
|
||||
GdkGCWin32Data *gc_data = GDK_GC_WIN32DATA (gc_private);
|
||||
HDC hdc;
|
||||
COLORREF fg;
|
||||
int i;
|
||||
|
||||
gc_private = (GdkGCPrivate*) gc;
|
||||
|
||||
hdc = gdk_gc_predraw (drawable, gc_private);
|
||||
|
||||
GDK_NOTE (MISC, g_print ("gdk_draw_points: %#x destdc: (%d) %#x "
|
||||
"npoints: %d\n",
|
||||
GDK_DRAWABLE_XID (drawable),
|
||||
gc_private, hdc,
|
||||
npoints));
|
||||
|
||||
hdc = gdk_gc_predraw (drawable, gc_private, GDK_GC_FOREGROUND);
|
||||
fg = GetTextColor (hdc);
|
||||
|
||||
for (i = 0; i < npoints; i++)
|
||||
{
|
||||
if (!MoveToEx (hdc, points[i].x, points[i].y, NULL))
|
||||
g_warning ("gdk_draw_points: MoveToEx failed");
|
||||
if (!LineTo (hdc, points[i].x + 1, points[i].y))
|
||||
g_warning ("gdk_draw_points: LineTo failed");
|
||||
SetPixel (hdc, points[i].x, points[i].y, fg);
|
||||
}
|
||||
gdk_gc_postdraw (drawable, gc_private);
|
||||
gdk_gc_postdraw (drawable, gc_private, GDK_GC_FOREGROUND);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -667,27 +754,69 @@ gdk_win32_draw_segments (GdkDrawable *drawable,
|
||||
GdkSegment *segs,
|
||||
gint nsegs)
|
||||
{
|
||||
GdkGCPrivate *gc_private;
|
||||
GdkGCPrivate *gc_private = (GdkGCPrivate*) gc;
|
||||
GdkGCWin32Data *gc_data = GDK_GC_WIN32DATA (gc_private);
|
||||
HDC hdc;
|
||||
HBRUSH hbr = NULL;
|
||||
gboolean ok = TRUE;
|
||||
int i;
|
||||
|
||||
gc_private = (GdkGCPrivate*) gc;
|
||||
GDK_NOTE (MISC, g_print ("gdk_win32_draw_segments: %#x destdc: (%d) %#x "
|
||||
"nsegs: %d\n",
|
||||
GDK_DRAWABLE_XID (drawable),
|
||||
gc_private, hdc,
|
||||
nsegs));
|
||||
|
||||
hdc = gdk_gc_predraw (drawable, gc_private);
|
||||
hdc = gdk_gc_predraw (drawable, gc_private,
|
||||
GDK_GC_FOREGROUND|GDK_GC_BACKGROUND);
|
||||
|
||||
for (i = 0; i < nsegs; i++)
|
||||
if (gc_data->fill_style == GDK_OPAQUE_STIPPLED)
|
||||
{
|
||||
if (!MoveToEx (hdc, segs[i].x1, segs[i].y1, NULL))
|
||||
g_warning ("gdk_draw_segments: MoveToEx failed");
|
||||
if (!LineTo (hdc, segs[i].x2, segs[i].y2))
|
||||
g_warning ("gdk_draw_segments: LineTo #1 failed");
|
||||
if (!BeginPath (hdc))
|
||||
WIN32_API_FAILED ("BeginPath"), ok = FALSE;
|
||||
|
||||
/* Draw end pixel */
|
||||
if (GDK_GC_WIN32DATA (gc)->pen_width == 1)
|
||||
if (!LineTo (hdc, segs[i].x2 + 1, segs[i].y2))
|
||||
g_warning ("gdk_draw_segments: LineTo #2 failed");
|
||||
for (i = 0; i < nsegs; i++)
|
||||
{
|
||||
if (ok && !MoveToEx (hdc, segs[i].x1, segs[i].y1, NULL))
|
||||
WIN32_API_FAILED ("MoveToEx"), ok = FALSE;
|
||||
if (ok && !LineTo (hdc, segs[i].x2, segs[i].y2))
|
||||
WIN32_API_FAILED ("LineTo #1"), ok = FALSE;
|
||||
|
||||
/* Draw end pixel */
|
||||
if (ok && gc_data->pen_width == 1)
|
||||
if (!LineTo (hdc, segs[i].x2 + 1, segs[i].y2))
|
||||
WIN32_API_FAILED ("LineTo #2"), ok = FALSE;
|
||||
}
|
||||
|
||||
if (ok && !EndPath (hdc))
|
||||
WIN32_API_FAILED ("EndPath"), ok = FALSE;
|
||||
|
||||
if (ok && !WidenPath (hdc))
|
||||
WIN32_API_FAILED ("WidenPath"), ok = FALSE;
|
||||
|
||||
if (ok && !FillPath (hdc))
|
||||
WIN32_API_FAILED ("FillPath"), ok = FALSE;
|
||||
|
||||
if (hbr != NULL)
|
||||
if (!DeleteObject (hbr))
|
||||
WIN32_API_FAILED ("DeleteObject");
|
||||
}
|
||||
gdk_gc_postdraw (drawable, gc_private);
|
||||
else
|
||||
{
|
||||
for (i = 0; i < nsegs; i++)
|
||||
{
|
||||
if (!MoveToEx (hdc, segs[i].x1, segs[i].y1, NULL))
|
||||
WIN32_API_FAILED ("MoveToEx");
|
||||
if (!LineTo (hdc, segs[i].x2, segs[i].y2))
|
||||
WIN32_API_FAILED ("LineTo #1");
|
||||
|
||||
/* Draw end pixel */
|
||||
if (gc_data->pen_width == 1)
|
||||
if (!LineTo (hdc, segs[i].x2 + 1, segs[i].y2))
|
||||
WIN32_API_FAILED ("LineTo #2");
|
||||
}
|
||||
}
|
||||
gdk_gc_postdraw (drawable, gc_private, GDK_GC_FOREGROUND|GDK_GC_BACKGROUND);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -696,7 +825,8 @@ gdk_win32_draw_lines (GdkDrawable *drawable,
|
||||
GdkPoint *points,
|
||||
gint npoints)
|
||||
{
|
||||
GdkGCPrivate *gc_private;
|
||||
GdkGCPrivate *gc_private = (GdkGCPrivate*) gc;
|
||||
GdkGCWin32Data *gc_data = GDK_GC_WIN32DATA (gc_private);
|
||||
HDC hdc;
|
||||
POINT *pts;
|
||||
int i;
|
||||
@@ -704,11 +834,10 @@ gdk_win32_draw_lines (GdkDrawable *drawable,
|
||||
if (npoints < 2)
|
||||
return;
|
||||
|
||||
gc_private = (GdkGCPrivate*) gc;
|
||||
|
||||
hdc = gdk_gc_predraw (drawable, gc_private);
|
||||
hdc = gdk_gc_predraw (drawable, gc_private,
|
||||
GDK_GC_FOREGROUND|GDK_GC_BACKGROUND);
|
||||
#if 1
|
||||
pts = g_malloc (npoints * sizeof (POINT));
|
||||
pts = g_new (POINT, npoints);
|
||||
|
||||
for (i = 0; i < npoints; i++)
|
||||
{
|
||||
@@ -717,31 +846,31 @@ gdk_win32_draw_lines (GdkDrawable *drawable,
|
||||
}
|
||||
|
||||
if (!Polyline (hdc, pts, npoints))
|
||||
g_warning ("gdk_draw_lines: Polyline(,,%d) failed", npoints);
|
||||
WIN32_API_FAILED ("Polyline");
|
||||
|
||||
g_free (pts);
|
||||
|
||||
/* Draw end pixel */
|
||||
if (GDK_GC_WIN32DATA (gc)->pen_width == 1)
|
||||
if (gc_data->pen_width == 1)
|
||||
{
|
||||
MoveToEx (hdc, points[npoints-1].x, points[npoints-1].y, NULL);
|
||||
if (!LineTo (hdc, points[npoints-1].x + 1, points[npoints-1].y))
|
||||
g_warning ("gdk_draw_lines: LineTo failed");
|
||||
WIN32_API_FAILED ("LineTo");
|
||||
}
|
||||
#else
|
||||
MoveToEx (hdc, points[0].x, points[0].y, NULL);
|
||||
for (i = 1; i < npoints; i++)
|
||||
if (!LineTo (hdc, points[i].x, points[i].y))
|
||||
g_warning ("gdk_draw_lines: LineTo #1 failed");
|
||||
WIN32_API_FAILED ("LineTo #1");
|
||||
|
||||
/* Draw end pixel */
|
||||
/* LineTo doesn't draw the last point, so if we have a pen width of 1,
|
||||
* we draw the end pixel separately... With wider pens we don't care.
|
||||
* //HB: But the NT developers don't read their API documentation ...
|
||||
*/
|
||||
if (GDK_GC_WIN32DATA (gc)->pen_width == 1 && windows_version > 0x80000000)
|
||||
if (gc_data->pen_width == 1 && windows_version > 0x80000000)
|
||||
if (!LineTo (hdc, points[npoints-1].x + 1, points[npoints-1].y))
|
||||
g_warning ("gdk_draw_lines: LineTo #2 failed");
|
||||
WIN32_API_FAILED ("LineTo #2");
|
||||
#endif
|
||||
gdk_gc_postdraw (drawable, gc_private);
|
||||
gdk_gc_postdraw (drawable, gc_private, GDK_GC_FOREGROUND|GDK_GC_BACKGROUND);
|
||||
}
|
||||
|
||||
@@ -3692,9 +3692,9 @@ gdk_event_translate (GdkEvent *event,
|
||||
|
||||
if (SelectPalette (hdc, colormap_private->xcolormap->palette,
|
||||
FALSE) == NULL)
|
||||
g_warning ("WM_ERASEBKGND: SelectPalette failed");
|
||||
WIN32_API_FAILED ("SelectPalette");
|
||||
if ((k = RealizePalette (hdc)) == GDI_ERROR)
|
||||
g_warning ("WM_ERASEBKGND: RealizePalette failed");
|
||||
WIN32_API_FAILED ("RealizePalette");
|
||||
#if 0
|
||||
g_print ("WM_ERASEBKGND: selected %#x, realized %d colors\n",
|
||||
colormap_private->xcolormap->palette, k);
|
||||
@@ -3740,7 +3740,7 @@ gdk_event_translate (GdkEvent *event,
|
||||
g_print ("...CreateSolidBrush (%.08x) = %.08x\n", bg, hbr);
|
||||
#endif
|
||||
if (!FillRect (hdc, &rect, hbr))
|
||||
g_warning ("WM_ERASEBKGND: FillRect failed");
|
||||
WIN32_API_FAILED ("FillRect");
|
||||
DeleteObject (hbr);
|
||||
}
|
||||
else if (GDK_WINDOW_WIN32DATA(window)->bg_type == GDK_WIN32_BG_PIXMAP)
|
||||
@@ -3755,7 +3755,7 @@ gdk_event_translate (GdkEvent *event,
|
||||
GDK_NOTE (EVENTS, g_print ("...small pixmap, using brush\n"));
|
||||
hbr = CreatePatternBrush (GDK_DRAWABLE_XID (pixmap));
|
||||
if (!FillRect (hdc, &rect, hbr))
|
||||
g_warning ("WM_ERASEBKGND: FillRect failed");
|
||||
WIN32_API_FAILED ("FillRect");
|
||||
DeleteObject (hbr);
|
||||
}
|
||||
else
|
||||
@@ -3771,12 +3771,12 @@ gdk_event_translate (GdkEvent *event,
|
||||
|
||||
if (!(bgdc = CreateCompatibleDC (hdc)))
|
||||
{
|
||||
g_warning ("WM_ERASEBKGND: CreateCompatibleDC failed");
|
||||
WIN32_API_FAILED ("CreateCompatibleDC");
|
||||
break;
|
||||
}
|
||||
if (!(oldbitmap = SelectObject (bgdc, GDK_DRAWABLE_XID (pixmap))))
|
||||
{
|
||||
g_warning ("WM_ERASEBKGND: SelectObject failed");
|
||||
WIN32_API_FAILED ("SelectObject");
|
||||
DeleteDC (bgdc);
|
||||
break;
|
||||
}
|
||||
@@ -3793,7 +3793,7 @@ gdk_event_translate (GdkEvent *event,
|
||||
pixmap_private->width, pixmap_private->height,
|
||||
bgdc, 0, 0, SRCCOPY))
|
||||
{
|
||||
g_warning ("WM_ERASEBKGND: BitBlt failed");
|
||||
WIN32_API_FAILED (" BitBlt");
|
||||
goto loopexit;
|
||||
}
|
||||
}
|
||||
@@ -3812,7 +3812,7 @@ gdk_event_translate (GdkEvent *event,
|
||||
hbr = GetStockObject (BLACK_BRUSH);
|
||||
GetClipBox (hdc, &rect);
|
||||
if (!FillRect (hdc, &rect, hbr))
|
||||
g_warning ("WM_ERASEBKGND: FillRect failed");
|
||||
WIN32_API_FAILED ("FillRect");
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -4073,7 +4073,7 @@ gdk_event_translate (GdkEvent *event,
|
||||
strcpy (ptr, "Huhhaa");
|
||||
GlobalUnlock (hdata);
|
||||
if (!SetClipboardData (CF_TEXT, hdata))
|
||||
g_print ("SetClipboardData failed: %d\n", GetLastError ());
|
||||
WIN32_API_FAILED ("SetClipboardData");
|
||||
}
|
||||
*ret_valp = 0;
|
||||
*ret_val_flagp = TRUE;
|
||||
|
||||
@@ -282,7 +282,7 @@ gdk_font_full_name_get (GdkFont *font)
|
||||
|
||||
if (GetObject (singlefont->xfont, sizeof (LOGFONT), &logfont) == 0)
|
||||
{
|
||||
g_warning ("gdk_font_full_name_get: GetObject failed");
|
||||
WIN32_API_FAILED ("GetObject");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -1771,7 +1771,7 @@ gdk_text_size_handler (GdkWin32SingleFont *singlefont,
|
||||
|
||||
if ((oldfont = SelectObject (gdk_DC, singlefont->xfont)) == NULL)
|
||||
{
|
||||
g_warning ("gdk_text_size_handler: SelectObject failed");
|
||||
WIN32_API_FAILED ("SelectObject");
|
||||
return;
|
||||
}
|
||||
GetTextExtentPoint32W (gdk_DC, wcstr, wclen, &this_size);
|
||||
|
||||
+533
-570
File diff suppressed because it is too large
Load Diff
+22
-24
@@ -243,7 +243,7 @@ gdk_image_new_with_depth (GdkImageType type,
|
||||
|
||||
if (private->ximage == NULL)
|
||||
{
|
||||
g_warning ("gdk_image_new_with_depth: CreateDIBSection failed");
|
||||
WIN32_API_FAILED ("CreateDIBSection");
|
||||
g_free (image);
|
||||
return NULL;
|
||||
}
|
||||
@@ -349,13 +349,13 @@ gdk_image_get (GdkWindow *window,
|
||||
{
|
||||
if ((hdc = CreateCompatibleDC (NULL)) == NULL)
|
||||
{
|
||||
g_warning ("gdk_image_get: CreateCompatibleDC #1 failed");
|
||||
WIN32_API_FAILED ("CreateCompatibleDC #1");
|
||||
g_free (image);
|
||||
return NULL;
|
||||
}
|
||||
if ((oldbitmap1 = SelectObject (hdc, GDK_DRAWABLE_XID (window))) == NULL)
|
||||
{
|
||||
g_warning ("gdk_image_get: SelectObject #1 failed");
|
||||
WIN32_API_FAILED ("SelectObject #1");
|
||||
DeleteDC (hdc);
|
||||
g_free (image);
|
||||
return NULL;
|
||||
@@ -378,7 +378,7 @@ gdk_image_get (GdkWindow *window,
|
||||
{
|
||||
if ((hdc = GetDC (GDK_DRAWABLE_XID (window))) == NULL)
|
||||
{
|
||||
g_warning ("gdk_image_get: GetDC failed");
|
||||
WIN32_API_FAILED ("GetDC");
|
||||
g_free (image);
|
||||
return NULL;
|
||||
}
|
||||
@@ -395,7 +395,7 @@ gdk_image_get (GdkWindow *window,
|
||||
|
||||
if ((memdc = CreateCompatibleDC (hdc)) == NULL)
|
||||
{
|
||||
g_warning ("gdk_image_get: CreateCompatibleDC #2 failed");
|
||||
WIN32_API_FAILED ("CreateCompatibleDC #2");
|
||||
if (GDK_DRAWABLE_TYPE (window) == GDK_DRAWABLE_PIXMAP)
|
||||
{
|
||||
SelectObject (hdc, oldbitmap1);
|
||||
@@ -443,7 +443,7 @@ gdk_image_get (GdkWindow *window,
|
||||
CreateDIBSection (hdc, (BITMAPINFO *) &bmi, iUsage,
|
||||
&image->mem, NULL, 0)) == NULL)
|
||||
{
|
||||
g_warning ("gdk_image_get: CreateDIBSection failed");
|
||||
WIN32_API_FAILED ("CreateDIBSection");
|
||||
DeleteDC (memdc);
|
||||
if (GDK_DRAWABLE_TYPE (window) == GDK_DRAWABLE_PIXMAP)
|
||||
{
|
||||
@@ -460,7 +460,7 @@ gdk_image_get (GdkWindow *window,
|
||||
|
||||
if ((oldbitmap2 = SelectObject (memdc, private->ximage)) == NULL)
|
||||
{
|
||||
g_warning ("gdk_image_get: SelectObject #2 failed");
|
||||
WIN32_API_FAILED ("SelectObject #2");
|
||||
DeleteObject (private->ximage);
|
||||
DeleteDC (memdc);
|
||||
if (GDK_DRAWABLE_TYPE (window) == GDK_DRAWABLE_PIXMAP)
|
||||
@@ -478,7 +478,7 @@ gdk_image_get (GdkWindow *window,
|
||||
|
||||
if (!BitBlt (memdc, 0, 0, width, height, hdc, x, y, SRCCOPY))
|
||||
{
|
||||
g_warning ("gdk_image_get: BitBlt failed");
|
||||
WIN32_API_FAILED ("BitBlt");
|
||||
SelectObject (memdc, oldbitmap2);
|
||||
DeleteObject (private->ximage);
|
||||
DeleteDC (memdc);
|
||||
@@ -496,10 +496,10 @@ gdk_image_get (GdkWindow *window,
|
||||
}
|
||||
|
||||
if (SelectObject (memdc, oldbitmap2) == NULL)
|
||||
g_warning ("gdk_image_get: SelectObject #3 failed");
|
||||
WIN32_API_FAILED ("SelectObject #3");
|
||||
|
||||
if (!DeleteDC (memdc))
|
||||
g_warning ("gdk_image_get: DeleteDC failed");
|
||||
WIN32_API_FAILED ("DeleteDC");
|
||||
|
||||
if (GDK_DRAWABLE_TYPE (window) == GDK_DRAWABLE_PIXMAP)
|
||||
{
|
||||
@@ -643,7 +643,7 @@ gdk_win32_image_destroy (GdkImage *image)
|
||||
|
||||
case GDK_IMAGE_SHARED:
|
||||
if (!DeleteObject (private->ximage))
|
||||
g_warning ("gdk_win32_image_destroy: DeleteObject failed");
|
||||
WIN32_API_FAILED ("DeleteObject");
|
||||
break;
|
||||
|
||||
default:
|
||||
@@ -680,9 +680,7 @@ gdk_image_put (GdkImage *image,
|
||||
drawable_private = (GdkDrawablePrivate *) drawable;
|
||||
gc_private = (GdkGCPrivate *) gc;
|
||||
|
||||
/* The image can in fact be "shared", so don't test */
|
||||
|
||||
hdc = gdk_gc_predraw (drawable, gc_private);
|
||||
hdc = gdk_gc_predraw (drawable, gc_private, 0);
|
||||
colormap_private = (GdkColormapPrivateWin32 *) drawable_private->colormap;
|
||||
if (colormap_private && colormap_private->xcolormap->rc_palette)
|
||||
{
|
||||
@@ -704,7 +702,7 @@ gdk_image_put (GdkImage *image,
|
||||
if (GetObject (image_private->ximage, sizeof (DIBSECTION),
|
||||
&ds) != sizeof (DIBSECTION))
|
||||
{
|
||||
g_warning ("gdk_image_put: GetObject failed");
|
||||
WIN32_API_FAILED ("GetObject");
|
||||
}
|
||||
#if 0
|
||||
g_print("xdest = %d, ydest = %d, xsrc = %d, ysrc = %d, width = %d, height = %d\n",
|
||||
@@ -727,7 +725,7 @@ gdk_image_put (GdkImage *image,
|
||||
ds.dsBm.bmBits,
|
||||
(CONST BITMAPINFO *) &bmi,
|
||||
DIB_PAL_COLORS) == 0)
|
||||
g_warning ("SetDIBitsToDevice failed");
|
||||
WIN32_API_FAILED ("SetDIBitsToDevice");
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -736,26 +734,26 @@ gdk_image_put (GdkImage *image,
|
||||
|
||||
if ((memdc = CreateCompatibleDC (hdc)) == NULL)
|
||||
{
|
||||
g_warning ("gdk_image_put: CreateCompatibleDC failed");
|
||||
gdk_gc_postdraw (drawable, gc_private);
|
||||
WIN32_API_FAILED ("CreateCompatibleDC");
|
||||
gdk_gc_postdraw (drawable, gc_private, 0);
|
||||
return;
|
||||
}
|
||||
|
||||
if ((oldbitmap = SelectObject (memdc, image_private->ximage)) == NULL)
|
||||
{
|
||||
g_warning ("gdk_image_put: SelectObject #1 failed");
|
||||
gdk_gc_postdraw (drawable, gc_private);
|
||||
WIN32_API_FAILED ("SelectObject #1");
|
||||
gdk_gc_postdraw (drawable, gc_private, 0);
|
||||
return;
|
||||
}
|
||||
if (!BitBlt (hdc, xdest, ydest, width, height,
|
||||
memdc, xsrc, ysrc, SRCCOPY))
|
||||
g_warning ("gdk_image_put: BitBlt failed");
|
||||
WIN32_API_FAILED ("BitBlt");
|
||||
|
||||
if (SelectObject (memdc, oldbitmap) == NULL)
|
||||
g_warning ("gdk_image_put_normal: SelectObject #2 failed");
|
||||
WIN32_API_FAILED ("SelectObject #2");
|
||||
|
||||
if (!DeleteDC (memdc))
|
||||
g_warning ("gdk_image_put: DeleteDC failed");
|
||||
WIN32_API_FAILED ("DeleteDC");
|
||||
}
|
||||
gdk_gc_postdraw (drawable, gc_private);
|
||||
gdk_gc_postdraw (drawable, gc_private, 0);
|
||||
}
|
||||
|
||||
@@ -54,9 +54,6 @@ GdkArgDesc _gdk_windowing_args[] = {
|
||||
{ NULL }
|
||||
};
|
||||
|
||||
/* Private variable declarations
|
||||
*/
|
||||
|
||||
int __stdcall
|
||||
DllMain(HINSTANCE hinstDLL,
|
||||
DWORD dwReason,
|
||||
@@ -103,6 +100,31 @@ _gdk_windowing_init_check (int argc,
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
gchar *
|
||||
gdk_win32_last_error_string (void)
|
||||
{
|
||||
static gchar error[100];
|
||||
int nbytes;
|
||||
|
||||
if ((nbytes = FormatMessage (FORMAT_MESSAGE_FROM_SYSTEM, NULL, GetLastError (),
|
||||
0, error, sizeof (error), NULL)) == 0)
|
||||
strcat (error, "Unknown error");
|
||||
|
||||
if (nbytes > 2 && error[nbytes-1] == '\n' && error[nbytes-2] == '\r')
|
||||
error[nbytes-2] = '\0';
|
||||
|
||||
return error;
|
||||
}
|
||||
|
||||
void
|
||||
gdk_win32_api_failed (const gchar *where,
|
||||
gint line,
|
||||
const gchar *api)
|
||||
{
|
||||
g_warning ("%s:%d: %s failed: %s", where, line, api,
|
||||
gdk_win32_last_error_string ());
|
||||
}
|
||||
|
||||
void
|
||||
gdk_set_use_xshm (gint use_xshm)
|
||||
{
|
||||
|
||||
@@ -58,7 +58,7 @@ gdk_win32_pixmap_destroy (GdkPixmap *pixmap)
|
||||
GDK_DRAWABLE_XID (pixmap)));
|
||||
|
||||
if (!DeleteObject (GDK_DRAWABLE_XID (pixmap)))
|
||||
g_warning ("gdk_win32_pixmap_destroy: DeleteObject failed");
|
||||
WIN32_API_FAILED ("DeleteObject");
|
||||
|
||||
gdk_xid_table_remove (GDK_DRAWABLE_XID (pixmap));
|
||||
|
||||
@@ -137,7 +137,7 @@ gdk_pixmap_new (GdkWindow *window,
|
||||
|
||||
if ((hdc = GetDC (GDK_DRAWABLE_XID (window))) == NULL)
|
||||
{
|
||||
g_warning ("gdk_pixmap_new: GetDC failed");
|
||||
WIN32_API_FAILED ("GetDC");
|
||||
g_free (private);
|
||||
return NULL;
|
||||
}
|
||||
@@ -207,7 +207,7 @@ gdk_pixmap_new (GdkWindow *window,
|
||||
CreateDIBSection (hdc, (BITMAPINFO *) &bmi,
|
||||
iUsage, (PVOID *) &bits, NULL, 0)) == NULL)
|
||||
{
|
||||
g_warning ("gdk_pixmap_new: CreateDIBSection failed: %d", GetLastError ());
|
||||
WIN32_API_FAILED ("CreateDIBSection");
|
||||
ReleaseDC (GDK_DRAWABLE_XID (window), hdc);
|
||||
g_free (pixmap);
|
||||
return NULL;
|
||||
@@ -334,6 +334,7 @@ gdk_bitmap_create_from_data (GdkWindow *window,
|
||||
for (i = 0; i < height; i++)
|
||||
for (j = 0; j < bpl; j++)
|
||||
bits[i*aligned_bpl + j] = mirror[(guchar) data[i*bpl + j]];
|
||||
|
||||
GDK_DRAWABLE_WIN32DATA (pixmap)->xid =
|
||||
CreateBitmap (width, height, 1, 1, bits);
|
||||
|
||||
|
||||
@@ -153,8 +153,8 @@ struct _GdkGCWin32Data
|
||||
*/
|
||||
HDC xgc;
|
||||
GdkGCValuesMask values_mask;
|
||||
GdkColor foreground;
|
||||
GdkColor background;
|
||||
gulong foreground; /* Pixel values from GdkColor, */
|
||||
gulong background; /* not Win32 COLORREFs */
|
||||
GdkFont *font;
|
||||
gint rop2;
|
||||
GdkFill fill_style;
|
||||
@@ -278,9 +278,11 @@ GdkGC * _gdk_win32_gc_new (GdkDrawable *drawable,
|
||||
GdkGCValues *values,
|
||||
GdkGCValuesMask values_mask);
|
||||
HDC gdk_gc_predraw (GdkDrawable *drawable,
|
||||
GdkGCPrivate *gc_private);
|
||||
GdkGCPrivate *gc_private,
|
||||
GdkGCValuesMask usage);
|
||||
void gdk_gc_postdraw (GdkDrawable *drawable,
|
||||
GdkGCPrivate *gc_private);
|
||||
GdkGCPrivate *gc_private,
|
||||
GdkGCValuesMask usage);
|
||||
HRGN BitmapToRegion (HBITMAP hBmp);
|
||||
|
||||
void gdk_sel_prop_store (GdkWindow *owner,
|
||||
@@ -307,8 +309,17 @@ void gdk_wchar_text_handle (GdkFont *font,
|
||||
void *),
|
||||
void *arg);
|
||||
|
||||
char *gdk_color_to_string (const GdkColor *);
|
||||
|
||||
gchar *gdk_color_to_string (const GdkColor *);
|
||||
gchar *gdk_win32_last_error_string (void);
|
||||
void gdk_win32_api_failed (const gchar *where,
|
||||
gint line,
|
||||
const gchar *api);
|
||||
#ifdef __GNUC__
|
||||
#define WIN32_API_FAILED(api) gdk_win32_api_failed (__PRETTY_FUNCTION__, __LINE__, api)
|
||||
#else
|
||||
#define WIN32_API_FAILED(api) gdk_win32_api_failed (__FILE__, __LINE__, api)
|
||||
#endif
|
||||
|
||||
extern LRESULT CALLBACK gdk_WindowProc (HWND, UINT, WPARAM, LPARAM);
|
||||
|
||||
extern GdkDrawableClass _gdk_win32_drawable_class;
|
||||
|
||||
@@ -120,7 +120,7 @@ gdk_property_get (GdkWindow *window,
|
||||
guchar **data)
|
||||
{
|
||||
g_return_val_if_fail (window != NULL, FALSE);
|
||||
g_return_val_if_fail (!GDK_IS_WINDOW (window), FALSE);
|
||||
g_return_val_if_fail (GDK_IS_WINDOW (window), FALSE);
|
||||
|
||||
if (GDK_DRAWABLE_DESTROYED (window))
|
||||
return FALSE;
|
||||
@@ -145,7 +145,7 @@ gdk_property_change (GdkWindow *window,
|
||||
guchar *ptr;
|
||||
|
||||
g_return_if_fail (window != NULL);
|
||||
g_return_if_fail (!GDK_IS_WINDOW (window));
|
||||
g_return_if_fail (GDK_IS_WINDOW (window));
|
||||
|
||||
if (GDK_DRAWABLE_DESTROYED (window))
|
||||
return;
|
||||
@@ -179,7 +179,7 @@ gdk_property_change (GdkWindow *window,
|
||||
GDK_DRAWABLE_XID (window)));
|
||||
if (!OpenClipboard (GDK_DRAWABLE_XID (window)))
|
||||
{
|
||||
g_warning ("gdk_property_change: OpenClipboard failed");
|
||||
WIN32_API_FAILED ("OpenClipboard");
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
@@ -198,15 +198,11 @@ gdk_property_change (GdkWindow *window,
|
||||
GDK_NOTE (MISC, g_print ("...SetClipboardData(CF_TEXT, %#x)\n",
|
||||
hdata));
|
||||
if (!SetClipboardData(CF_TEXT, hdata))
|
||||
g_warning ("gdk_property_change: SetClipboardData failed: %d",
|
||||
GetLastError ());
|
||||
WIN32_API_FAILED ("SetClipboardData");
|
||||
#if 1
|
||||
GDK_NOTE (MISC, g_print ("...CloseClipboard()\n"));
|
||||
if (!CloseClipboard ())
|
||||
{
|
||||
g_warning ("gdk_property_change: CloseClipboard failed");
|
||||
return;
|
||||
}
|
||||
WIN32_API_FAILED ("CloseClipboard");
|
||||
#endif
|
||||
}
|
||||
else
|
||||
@@ -221,7 +217,7 @@ gdk_property_delete (GdkWindow *window,
|
||||
extern void gdk_selection_property_delete (GdkWindow *);
|
||||
|
||||
g_return_if_fail (window != NULL);
|
||||
g_return_if_fail (!GDK_IS_WINDOW (window));
|
||||
g_return_if_fail (GDK_IS_WINDOW (window));
|
||||
|
||||
GDK_NOTE (MISC,
|
||||
(prop_name = gdk_atom_name (property),
|
||||
|
||||
@@ -101,13 +101,13 @@ gdk_selection_owner_set (GdkWindow *owner,
|
||||
GDK_NOTE (MISC, g_print ("...OpenClipboard(%#x)\n", xwindow));
|
||||
if (!OpenClipboard (xwindow))
|
||||
{
|
||||
g_warning ("gdk_selection_owner_set: OpenClipboard failed");
|
||||
WIN32_API_FAILED ("OpenClipboard");
|
||||
return FALSE;
|
||||
}
|
||||
GDK_NOTE (MISC, g_print ("...EmptyClipboard()\n"));
|
||||
if (!EmptyClipboard ())
|
||||
{
|
||||
g_warning ("gdk_selection_owner_set: EmptyClipboard failed");
|
||||
WIN32_API_FAILED ("EmptyClipboard");
|
||||
CloseClipboard ();
|
||||
return FALSE;
|
||||
}
|
||||
@@ -119,7 +119,7 @@ gdk_selection_owner_set (GdkWindow *owner,
|
||||
GDK_NOTE (MISC, g_print ("...CloseClipboard()\n"));
|
||||
if (!CloseClipboard ())
|
||||
{
|
||||
g_warning ("gdk_selection_owner_set: CloseClipboard failed");
|
||||
WIN32_API_FAILED ("CloseClipboard");
|
||||
return FALSE;
|
||||
}
|
||||
if (owner != NULL)
|
||||
@@ -198,7 +198,7 @@ gdk_selection_convert (GdkWindow *requestor,
|
||||
GDK_DRAWABLE_XID (requestor)));
|
||||
if (!OpenClipboard (GDK_DRAWABLE_XID (requestor)))
|
||||
{
|
||||
g_warning ("gdk_selection_convert: OpenClipboard failed");
|
||||
WIN32_API_FAILED ("OpenClipboard");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
+34
-27
@@ -51,7 +51,10 @@ SafeAdjustWindowRectEx (RECT* lpRect,
|
||||
DWORD dwExStyle)
|
||||
{
|
||||
if (!AdjustWindowRectEx(lpRect, dwStyle, bMenu, dwExStyle))
|
||||
return FALSE;
|
||||
{
|
||||
WIN32_API_FAILED ("AdjustWindowRectEx");
|
||||
return FALSE;
|
||||
}
|
||||
if (lpRect->left < 0)
|
||||
{
|
||||
lpRect->right -= lpRect->left;
|
||||
@@ -253,6 +256,11 @@ RegisterGdkClass (GdkDrawableType wtype)
|
||||
break;
|
||||
}
|
||||
|
||||
if (klass == 0)
|
||||
{
|
||||
WIN32_API_FAILED ("RegisterClassEx");
|
||||
g_error ("That is a fatal error");
|
||||
}
|
||||
return klass;
|
||||
}
|
||||
|
||||
@@ -382,8 +390,6 @@ gdk_window_new (GdkWindow *parent,
|
||||
}
|
||||
|
||||
klass = RegisterGdkClass (private->drawable.window_type);
|
||||
if (!klass)
|
||||
g_error ("RegisterClassEx failed");
|
||||
|
||||
if (private->drawable.window_type != GDK_WINDOW_CHILD)
|
||||
{
|
||||
@@ -401,8 +407,7 @@ gdk_window_new (GdkWindow *parent,
|
||||
rect.right = rect.left + private->drawable.width;
|
||||
rect.bottom = rect.top + private->drawable.height;
|
||||
|
||||
if (!SafeAdjustWindowRectEx (&rect, dwStyle, FALSE, dwExStyle))
|
||||
g_warning ("gdk_window_new: AdjustWindowRectEx failed");
|
||||
SafeAdjustWindowRectEx (&rect, dwStyle, FALSE, dwExStyle);
|
||||
|
||||
if (x != CW_USEDEFAULT)
|
||||
{
|
||||
@@ -439,7 +444,7 @@ gdk_window_new (GdkWindow *parent,
|
||||
NULL);
|
||||
|
||||
GDK_NOTE (MISC,
|
||||
g_print ("gdk_window_create: %s %s %dx%d@+%d+%d %#x = %#x\n"
|
||||
g_print ("gdk_window_new: %s %s %dx%d@+%d+%d %#x = %#x\n"
|
||||
"...locale %#x codepage %d\n",
|
||||
(private->drawable.window_type == GDK_WINDOW_TOPLEVEL ? "TOPLEVEL" :
|
||||
(private->drawable.window_type == GDK_WINDOW_CHILD ? "CHILD" :
|
||||
@@ -458,7 +463,7 @@ gdk_window_new (GdkWindow *parent,
|
||||
|
||||
if (GDK_DRAWABLE_XID (window) == NULL)
|
||||
{
|
||||
g_warning ("gdk_window_create: CreateWindowEx failed");
|
||||
WIN32_API_FAILED ("CreateWindowEx");
|
||||
g_free (GDK_DRAWABLE_WIN32DATA (window));
|
||||
g_free (private);
|
||||
return NULL;
|
||||
@@ -782,8 +787,7 @@ gdk_window_move (GdkWindow *window,
|
||||
|
||||
dwStyle = GetWindowLong (GDK_DRAWABLE_XID (window), GWL_STYLE);
|
||||
dwExStyle = GetWindowLong (GDK_DRAWABLE_XID (window), GWL_EXSTYLE);
|
||||
if (!SafeAdjustWindowRectEx (&rect, dwStyle, FALSE, dwExStyle))
|
||||
g_warning ("gdk_window_move: AdjustWindowRectEx failed");
|
||||
SafeAdjustWindowRectEx (&rect, dwStyle, FALSE, dwExStyle);
|
||||
|
||||
x = rect.left;
|
||||
y = rect.top;
|
||||
@@ -800,7 +804,7 @@ gdk_window_move (GdkWindow *window,
|
||||
if (!MoveWindow (GDK_DRAWABLE_XID (window),
|
||||
x, y, rect.right - rect.left, rect.bottom - rect.top,
|
||||
TRUE))
|
||||
g_warning ("gdk_window_move: MoveWindow failed");
|
||||
WIN32_API_FAILED ("MoveWindow");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -848,7 +852,7 @@ gdk_window_resize (GdkWindow *window,
|
||||
dwStyle = GetWindowLong (GDK_DRAWABLE_XID (window), GWL_STYLE);
|
||||
dwExStyle = GetWindowLong (GDK_DRAWABLE_XID (window), GWL_EXSTYLE);
|
||||
if (!AdjustWindowRectEx (&rect, dwStyle, FALSE, dwExStyle))
|
||||
g_warning ("gdk_window_resize: AdjustWindowRectEx failed");
|
||||
WIN32_API_FAILED ("AdjustWindowRectEx");
|
||||
|
||||
x = rect.left;
|
||||
y = rect.top;
|
||||
@@ -871,7 +875,7 @@ gdk_window_resize (GdkWindow *window,
|
||||
if (!MoveWindow (GDK_DRAWABLE_XID (window),
|
||||
x, y, width, height,
|
||||
TRUE))
|
||||
g_warning ("gdk_window_resize: MoveWindow failed");
|
||||
WIN32_API_FAILED ("MoveWindow");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -909,7 +913,7 @@ gdk_window_move_resize (GdkWindow *window,
|
||||
dwStyle = GetWindowLong (GDK_DRAWABLE_XID (window), GWL_STYLE);
|
||||
dwExStyle = GetWindowLong (GDK_DRAWABLE_XID (window), GWL_EXSTYLE);
|
||||
if (!AdjustWindowRectEx (&rect, dwStyle, FALSE, dwExStyle))
|
||||
g_warning ("gdk_window_move_resize: AdjustWindowRectEx failed");
|
||||
WIN32_API_FAILED ("AdjustWindowRectEx");
|
||||
|
||||
if (private->drawable.window_type == GDK_WINDOW_CHILD)
|
||||
{
|
||||
@@ -926,7 +930,7 @@ gdk_window_move_resize (GdkWindow *window,
|
||||
rect.left, rect.top,
|
||||
rect.right - rect.left, rect.bottom - rect.top,
|
||||
TRUE))
|
||||
g_warning ("gdk_window_move_resize: MoveWindow failed");
|
||||
WIN32_API_FAILED ("MoveWindow");
|
||||
|
||||
if (private->guffaw_gravity)
|
||||
{
|
||||
@@ -972,14 +976,14 @@ gdk_window_reparent (GdkWindow *window,
|
||||
GDK_DRAWABLE_XID (new_parent)));
|
||||
if (!SetParent (GDK_DRAWABLE_XID (window),
|
||||
GDK_DRAWABLE_XID (new_parent)))
|
||||
g_warning ("gdk_window_reparent: SetParent failed");
|
||||
WIN32_API_FAILED ("SetParent");
|
||||
|
||||
if (!MoveWindow (GDK_DRAWABLE_XID (window),
|
||||
x, y,
|
||||
window_private->drawable.width,
|
||||
window_private->drawable.height,
|
||||
TRUE))
|
||||
g_warning ("gdk_window_reparent: MoveWindow failed");
|
||||
WIN32_API_FAILED ("MoveWindow");
|
||||
}
|
||||
|
||||
window_private->parent = new_parent;
|
||||
@@ -1056,7 +1060,7 @@ gdk_window_clear_area_e (GdkWindow *window,
|
||||
rect.top = y;
|
||||
rect.bottom = y + height;
|
||||
if (!InvalidateRect (GDK_DRAWABLE_XID (window), &rect, TRUE))
|
||||
g_warning ("gdk_window_clear_area_e: InvalidateRect failed");
|
||||
WIN32_API_FAILED ("InvalidateRect");
|
||||
UpdateWindow (GDK_DRAWABLE_XID (window));
|
||||
}
|
||||
}
|
||||
@@ -1073,7 +1077,7 @@ gdk_window_raise (GdkWindow *window)
|
||||
GDK_DRAWABLE_XID (window)));
|
||||
|
||||
if (!BringWindowToTop (GDK_DRAWABLE_XID (window)))
|
||||
g_warning ("gdk_window_raise: BringWindowToTop failed");
|
||||
WIN32_API_FAILED ("BringWindowToTop");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1090,7 +1094,7 @@ gdk_window_lower (GdkWindow *window)
|
||||
|
||||
if (!SetWindowPos (GDK_DRAWABLE_XID (window), HWND_BOTTOM, 0, 0, 0, 0,
|
||||
SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOSIZE))
|
||||
g_warning ("gdk_window_lower: SetWindowPos failed");
|
||||
WIN32_API_FAILED ("SetWindowPos");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1128,7 +1132,7 @@ gdk_window_set_hints (GdkWindow *window,
|
||||
{
|
||||
if (flags & GDK_HINT_POS)
|
||||
if (!GetWindowPlacement (GDK_DRAWABLE_XID (window), &size_hints))
|
||||
g_warning ("gdk_window_set_hints: GetWindowPlacement failed");
|
||||
WIN32_API_FAILED ("GetWindowPlacement");
|
||||
else
|
||||
{
|
||||
GDK_NOTE (MISC, g_print ("...rcNormalPosition:"
|
||||
@@ -1165,7 +1169,7 @@ gdk_window_set_hints (GdkWindow *window,
|
||||
size_hints.rcNormalPosition.right,
|
||||
size_hints.rcNormalPosition.bottom));
|
||||
if (!SetWindowPlacement (GDK_DRAWABLE_XID (window), &size_hints))
|
||||
g_warning ("gdk_window_set_hints: SetWindowPlacement failed");
|
||||
WIN32_API_FAILED ("SetWindowPlacement");
|
||||
GDK_WINDOW_WIN32DATA (window)->hint_x = rect.left;
|
||||
GDK_WINDOW_WIN32DATA (window)->hint_y = rect.top;
|
||||
}
|
||||
@@ -1294,7 +1298,7 @@ gdk_window_set_geometry_hints (GdkWindow *window,
|
||||
&& geometry->base_width > 0
|
||||
&& geometry->base_height > 0)
|
||||
if (!GetWindowPlacement (GDK_DRAWABLE_XID (window), &size_hints))
|
||||
g_warning ("gdk_window_set_hints: GetWindowPlacement failed");
|
||||
WIN32_API_FAILED ("GetWindowPlacement");
|
||||
else
|
||||
{
|
||||
GDK_NOTE (MISC, g_print ("gdk_window_set_geometry_hints:"
|
||||
@@ -1313,7 +1317,7 @@ gdk_window_set_geometry_hints (GdkWindow *window,
|
||||
size_hints.rcNormalPosition.right,
|
||||
size_hints.rcNormalPosition.bottom));
|
||||
if (!SetWindowPlacement (GDK_DRAWABLE_XID (window), &size_hints))
|
||||
g_warning ("gdk_window_set_hints: SetWindowPlacement failed");
|
||||
WIN32_API_FAILED ("SetWindowPlacement");
|
||||
}
|
||||
|
||||
if (geom_mask & GDK_HINT_RESIZE_INC)
|
||||
@@ -1355,7 +1359,7 @@ gdk_window_set_title (GdkWindow *window,
|
||||
mbstr, 3*titlelen, NULL, NULL);
|
||||
|
||||
if (!SetWindowText (GDK_DRAWABLE_XID (window), mbstr))
|
||||
g_warning ("gdk_window_set_title: SetWindowText failed");
|
||||
WIN32_API_FAILED ("SetWindowText");
|
||||
|
||||
g_free (mbstr);
|
||||
g_free (wcstr);
|
||||
@@ -1497,7 +1501,7 @@ gdk_window_get_geometry (GdkWindow *window,
|
||||
RECT rect;
|
||||
|
||||
if (!GetClientRect (GDK_DRAWABLE_XID (window), &rect))
|
||||
g_warning ("gdk_window_get_geometry: GetClientRect failed");
|
||||
WIN32_API_FAILED ("GetClientRect");
|
||||
|
||||
if (x)
|
||||
*x = rect.left;
|
||||
@@ -1824,7 +1828,10 @@ gdk_window_set_icon (GdkWindow *window,
|
||||
if (GDK_DRAWABLE_DESTROYED (window))
|
||||
return;
|
||||
|
||||
g_warning ("gdk_window_set_icon not implemented");
|
||||
/* Nothing to do, really. As we share window classes between windows
|
||||
* we can't have window-specific icons, sorry. Don't print any warning
|
||||
* either.
|
||||
*/
|
||||
}
|
||||
|
||||
void
|
||||
@@ -1838,7 +1845,7 @@ gdk_window_set_icon_name (GdkWindow *window,
|
||||
return;
|
||||
|
||||
if (!SetWindowText (GDK_DRAWABLE_XID (window), name))
|
||||
g_warning ("gdk_window_set_icon_name: SetWindowText failed");
|
||||
WIN32_API_FAILED ("SetWindowText");
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
@@ -13,9 +13,6 @@ OPTIMIZE = -g -O
|
||||
|
||||
CC = gcc -mno-cygwin -mpentium -fnative-struct
|
||||
|
||||
CP = cp
|
||||
LD = ld
|
||||
|
||||
GLIB_VER=1.3
|
||||
GTK_VER=1.3
|
||||
|
||||
@@ -52,13 +49,23 @@ gdk_win32_OBJECTS = \
|
||||
gdkwindow-win32.o
|
||||
|
||||
../../config.h : ../../config.h.win32
|
||||
$(CP) ../../config.h.win32 ../../config.h
|
||||
cp ../../config.h.win32 ../../config.h
|
||||
|
||||
../gdkconfig.h : ../gdkconfig.h.win32
|
||||
$(CP) ../gdkconfig.h.win32 ../gdkconfig.h
|
||||
cp ../gdkconfig.h.win32 ../gdkconfig.h
|
||||
|
||||
gdk-win32res.o : rc/gdk.rc
|
||||
windres --include-dir rc rc/gdk.rc gdk-win32res.o
|
||||
# Kludge to get the path to the win32 headers
|
||||
WIN32APIHEADERS = $(shell echo "\#include <winver.h>" | $(CC) -M -E - | tail -1 | sed -e 's!/winver.h!!')
|
||||
|
||||
gdk-win32res.o : rc/gdk.rc gdk-build.tmp
|
||||
m4 -DBUILDNUMBER=`cat gdk-build.tmp` <rc/gdk.rc >gdk-win32res.rc
|
||||
windres --include-dir rc --include-dir $(WIN32APIHEADERS) gdk-win32res.rc gdk-win32res.o
|
||||
rm gdk-build.tmp gdk-win32res.rc
|
||||
|
||||
# Magic to bump the build number
|
||||
gdk-build.tmp :
|
||||
bash -c "read number && echo $$[number+1]" <gdk-build.stamp >gdk-build.tmp
|
||||
cp gdk-build.tmp gdk-build.stamp
|
||||
|
||||
libgdk-win32.a : $(gdk_win32_OBJECTS)
|
||||
-rm -f $@
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
#include <winver.h>
|
||||
|
||||
GTK_ICON ICON "gtk.ico"
|
||||
X_cursor CURSOR DISCARDABLE "cursor00.cur"
|
||||
arrow CURSOR DISCARDABLE "cursor02.cur"
|
||||
@@ -76,3 +78,32 @@ umbrella CURSOR DISCARDABLE "cursor92.cur"
|
||||
ur_angle CURSOR DISCARDABLE "cursor94.cur"
|
||||
xterm CURSOR DISCARDABLE "cursor98.cur"
|
||||
watch CURSOR DISCARDABLE "cursor96.cur"
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION 1,3,0,BUILDNUMBER
|
||||
PRODUCTVERSION 1,3,0,0
|
||||
FILEFLAGSMASK 0
|
||||
FILEFLAGS 0
|
||||
FILEOS VOS__WINDOWS32
|
||||
FILETYPE VFT_DLL
|
||||
FILESUBTYPE VFT2_UNKNOWN
|
||||
BEGIN
|
||||
BLOCK "StringFileInfo"
|
||||
BEGIN
|
||||
BLOCK "040904B0"
|
||||
BEGIN
|
||||
VALUE "CompanyName", "The GTk+ developer community"
|
||||
VALUE "FileDescription", "GIMP Drawing Kit"
|
||||
VALUE "FileVersion", "1.3.0.BUILDNUMBER"
|
||||
VALUE "InternalName", "gdk-1.3"
|
||||
VALUE "LegalCopyright", "Copyright © 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald. Modified by the GTK+ Team and others 1997-2000."
|
||||
VALUE "OriginalFilename", "gdk-1.3.dll"
|
||||
VALUE "ProductName", "GTk+"
|
||||
VALUE "ProductVersion", "1.3.0"
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
BEGIN
|
||||
VALUE "Translation", 0x409, 1200
|
||||
END
|
||||
END
|
||||
|
||||
+16
-4
@@ -43,19 +43,29 @@ gdk_cursor_new (GdkCursorType cursor_type)
|
||||
private->xcursor = xcursor;
|
||||
cursor = (GdkCursor*) private;
|
||||
cursor->type = cursor_type;
|
||||
|
||||
cursor->ref_count = 1;
|
||||
|
||||
return cursor;
|
||||
}
|
||||
|
||||
GdkCursor*
|
||||
gdk_cursor_new_from_pixmap (GdkPixmap *source, GdkPixmap *mask, GdkColor *fg, GdkColor *bg, gint x, gint y)
|
||||
gdk_cursor_new_from_pixmap (GdkPixmap *source,
|
||||
GdkPixmap *mask,
|
||||
GdkColor *fg,
|
||||
GdkColor *bg,
|
||||
gint x,
|
||||
gint y)
|
||||
{
|
||||
GdkCursorPrivate *private;
|
||||
GdkCursor *cursor;
|
||||
Pixmap source_pixmap, mask_pixmap;
|
||||
Cursor xcursor;
|
||||
XColor xfg, xbg;
|
||||
|
||||
|
||||
g_return_val_if_fail (source != NULL, NULL);
|
||||
g_return_val_if_fail (fg != NULL, NULL);
|
||||
g_return_val_if_fail (bg != NULL, NULL);
|
||||
|
||||
source_pixmap = GDK_DRAWABLE_XID (source);
|
||||
mask_pixmap = GDK_DRAWABLE_XID (mask);
|
||||
|
||||
@@ -74,7 +84,8 @@ gdk_cursor_new_from_pixmap (GdkPixmap *source, GdkPixmap *mask, GdkColor *fg, Gd
|
||||
private->xcursor = xcursor;
|
||||
cursor = (GdkCursor *) private;
|
||||
cursor->type = GDK_CURSOR_IS_PIXMAP;
|
||||
|
||||
cursor->ref_count = 1;
|
||||
|
||||
return cursor;
|
||||
}
|
||||
|
||||
@@ -84,6 +95,7 @@ _gdk_cursor_destroy (GdkCursor *cursor)
|
||||
GdkCursorPrivate *private;
|
||||
|
||||
g_return_if_fail (cursor != NULL);
|
||||
g_return_if_fail (cursor->ref_count == 0);
|
||||
|
||||
private = (GdkCursorPrivate *) cursor;
|
||||
XFreeCursor (private->xdisplay, private->xcursor);
|
||||
|
||||
+46
-16
@@ -700,23 +700,46 @@ gdk_event_translate (GdkEvent *event,
|
||||
break;
|
||||
}
|
||||
|
||||
event->button.type = GDK_BUTTON_PRESS;
|
||||
event->button.window = window;
|
||||
event->button.time = xevent->xbutton.time;
|
||||
event->button.x = xevent->xbutton.x;
|
||||
event->button.y = xevent->xbutton.y;
|
||||
event->button.x_root = (gfloat)xevent->xbutton.x_root;
|
||||
event->button.y_root = (gfloat)xevent->xbutton.y_root;
|
||||
event->button.pressure = 0.5;
|
||||
event->button.xtilt = 0;
|
||||
event->button.ytilt = 0;
|
||||
event->button.state = (GdkModifierType) xevent->xbutton.state;
|
||||
event->button.button = xevent->xbutton.button;
|
||||
event->button.source = GDK_SOURCE_MOUSE;
|
||||
event->button.deviceid = GDK_CORE_POINTER;
|
||||
/* If we get a ButtonPress event where the button is 4 or 5,
|
||||
it's a Scroll event */
|
||||
if (xevent->xbutton.button == 4 || xevent->xbutton.button == 5)
|
||||
{
|
||||
event->scroll.type = GDK_SCROLL;
|
||||
event->scroll.direction = (xevent->xbutton.button == 4) ?
|
||||
GDK_SCROLL_UP : GDK_SCROLL_DOWN;
|
||||
event->scroll.window = window;
|
||||
event->scroll.time = xevent->xbutton.x;
|
||||
event->scroll.x = xevent->xbutton.x;
|
||||
event->scroll.y = xevent->xbutton.y;
|
||||
event->scroll.x_root = (gfloat)xevent->xbutton.x_root;
|
||||
event->scroll.y_root = (gfloat)xevent->xbutton.y_root;
|
||||
event->scroll.pressure = 0.5;
|
||||
event->scroll.xtilt = 0;
|
||||
event->scroll.ytilt = 0;
|
||||
event->scroll.state = (GdkModifierType) xevent->xbutton.state;
|
||||
event->scroll.source = GDK_SOURCE_MOUSE;
|
||||
event->scroll.deviceid = GDK_CORE_POINTER;
|
||||
}
|
||||
else
|
||||
{
|
||||
event->button.type = GDK_BUTTON_PRESS;
|
||||
event->button.window = window;
|
||||
event->button.time = xevent->xbutton.time;
|
||||
event->button.x = xevent->xbutton.x;
|
||||
event->button.y = xevent->xbutton.y;
|
||||
event->button.x_root = (gfloat)xevent->xbutton.x_root;
|
||||
event->button.y_root = (gfloat)xevent->xbutton.y_root;
|
||||
event->button.pressure = 0.5;
|
||||
event->button.xtilt = 0;
|
||||
event->button.ytilt = 0;
|
||||
event->button.state = (GdkModifierType) xevent->xbutton.state;
|
||||
event->button.button = xevent->xbutton.button;
|
||||
event->button.source = GDK_SOURCE_MOUSE;
|
||||
event->button.deviceid = GDK_CORE_POINTER;
|
||||
|
||||
gdk_event_button_generate (event);
|
||||
}
|
||||
|
||||
gdk_event_button_generate (event);
|
||||
|
||||
break;
|
||||
|
||||
case ButtonRelease:
|
||||
@@ -736,6 +759,13 @@ gdk_event_translate (GdkEvent *event,
|
||||
break;
|
||||
}
|
||||
|
||||
/* We treat button presses as scroll wheel events, so ignore the release */
|
||||
if (xevent->xbutton.button == 4 || xevent->xbutton.button == 5)
|
||||
{
|
||||
return_val = FALSE;
|
||||
break;
|
||||
}
|
||||
|
||||
event->button.type = GDK_BUTTON_RELEASE;
|
||||
event->button.window = window;
|
||||
event->button.time = xevent->xbutton.time;
|
||||
|
||||
@@ -113,7 +113,7 @@ gdk_property_get (GdkWindow *window,
|
||||
guchar *ret_data;
|
||||
|
||||
g_return_val_if_fail (window != NULL, FALSE);
|
||||
g_return_val_if_fail (!GDK_IS_WINDOW (window), FALSE);
|
||||
g_return_val_if_fail (GDK_IS_WINDOW (window), FALSE);
|
||||
|
||||
if (window)
|
||||
{
|
||||
@@ -202,7 +202,7 @@ gdk_property_change (GdkWindow *window,
|
||||
Window xwindow;
|
||||
|
||||
g_return_if_fail (window != NULL);
|
||||
g_return_if_fail (!GDK_IS_WINDOW (window));
|
||||
g_return_if_fail (GDK_IS_WINDOW (window));
|
||||
|
||||
if (window)
|
||||
{
|
||||
@@ -230,7 +230,7 @@ gdk_property_delete (GdkWindow *window,
|
||||
Window xwindow;
|
||||
|
||||
g_return_if_fail (window != NULL);
|
||||
g_return_if_fail (!GDK_IS_WINDOW (window));
|
||||
g_return_if_fail (GDK_IS_WINDOW (window));
|
||||
|
||||
if (window)
|
||||
{
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
#include <X11/extensions/shape.h>
|
||||
#endif
|
||||
|
||||
const int gdk_event_mask_table[20] =
|
||||
const int gdk_event_mask_table[21] =
|
||||
{
|
||||
ExposureMask,
|
||||
PointerMotionMask,
|
||||
@@ -55,8 +55,8 @@ const int gdk_event_mask_table[20] =
|
||||
Button1MotionMask,
|
||||
Button2MotionMask,
|
||||
Button3MotionMask,
|
||||
ButtonPressMask | OwnerGrabButtonMask,
|
||||
ButtonReleaseMask | OwnerGrabButtonMask,
|
||||
ButtonPressMask,
|
||||
ButtonReleaseMask,
|
||||
KeyPressMask,
|
||||
KeyReleaseMask,
|
||||
EnterWindowMask,
|
||||
@@ -67,7 +67,8 @@ const int gdk_event_mask_table[20] =
|
||||
VisibilityChangeMask,
|
||||
0, /* PROXIMITY_IN */
|
||||
0, /* PROXIMTY_OUT */
|
||||
SubstructureNotifyMask
|
||||
SubstructureNotifyMask,
|
||||
ButtonPressMask /* SCROLL; on X mouse wheel events is treated as mouse button 4/5 */
|
||||
};
|
||||
const int gdk_nevent_masks = sizeof (gdk_event_mask_table) / sizeof (int);
|
||||
|
||||
|
||||
+30
@@ -0,0 +1,30 @@
|
||||
#include <winver.h>
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION 1,3,0,BUILDNUMBER
|
||||
PRODUCTVERSION 1,3,0,0
|
||||
FILEFLAGSMASK 0
|
||||
FILEFLAGS 0
|
||||
FILEOS VOS__WINDOWS32
|
||||
FILETYPE VFT_DLL
|
||||
FILESUBTYPE VFT2_UNKNOWN
|
||||
BEGIN
|
||||
BLOCK "StringFileInfo"
|
||||
BEGIN
|
||||
BLOCK "040904B0"
|
||||
BEGIN
|
||||
VALUE "CompanyName", "The GTk+ developer community"
|
||||
VALUE "FileDescription", "GIMP Toolkit"
|
||||
VALUE "FileVersion", "1.3.0.BUILDNUMBER"
|
||||
VALUE "InternalName", "gtk-1.3"
|
||||
VALUE "LegalCopyright", "Copyright © 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald. Modified by the GTK+ Team and others 1997-2000."
|
||||
VALUE "OriginalFilename", "gtk-1.3.dll"
|
||||
VALUE "ProductName", "GTk+"
|
||||
VALUE "ProductVersion", "1.3.0"
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
BEGIN
|
||||
VALUE "Translation", 0x409, 1200
|
||||
END
|
||||
END
|
||||
+2
-2
@@ -78,7 +78,7 @@ gtk_accel_label_get_type (void)
|
||||
(GtkClassInitFunc) NULL,
|
||||
};
|
||||
|
||||
accel_label_type = gtk_type_unique (gtk_label_get_type (), &accel_label_info);
|
||||
accel_label_type = gtk_type_unique (GTK_TYPE_LABEL, &accel_label_info);
|
||||
}
|
||||
|
||||
return accel_label_type;
|
||||
@@ -98,7 +98,7 @@ gtk_accel_label_class_init (GtkAccelLabelClass *class)
|
||||
misc_class = (GtkMiscClass*) class;
|
||||
label_class = (GtkLabelClass*) class;
|
||||
|
||||
parent_class = gtk_type_class (gtk_label_get_type ());
|
||||
parent_class = gtk_type_class (GTK_TYPE_LABEL);
|
||||
|
||||
gtk_object_add_arg_type ("GtkAccelLabel::accel_widget", GTK_TYPE_WIDGET, GTK_ARG_READWRITE, ARG_ACCEL_WIDGET);
|
||||
|
||||
|
||||
@@ -44,6 +44,7 @@ extern "C" {
|
||||
#define GTK_ACCEL_LABEL_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_ACCEL_LABEL, GtkAccelLabelClass))
|
||||
#define GTK_IS_ACCEL_LABEL(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_ACCEL_LABEL))
|
||||
#define GTK_IS_ACCEL_LABEL_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_ACCEL_LABEL))
|
||||
#define GTK_ACCEL_LABEL_GET_CLASS(obj) (GTK_CHECK_GET_CLASS ((obj), GTK_TYPE_ACCEL_LABEL, GtkAccelLabelClass))
|
||||
|
||||
|
||||
typedef struct _GtkAccelLabel GtkAccelLabel;
|
||||
|
||||
@@ -42,6 +42,7 @@ extern "C" {
|
||||
#define GTK_ADJUSTMENT_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_ADJUSTMENT, GtkAdjustmentClass))
|
||||
#define GTK_IS_ADJUSTMENT(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_ADJUSTMENT))
|
||||
#define GTK_IS_ADJUSTMENT_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_ADJUSTMENT))
|
||||
#define GTK_ADJUSTMENT_GET_CLASS(obj) (GTK_CHECK_GET_CLASS ((obj), GTK_TYPE_ADJUSTMENT, GtkAdjustmentClass))
|
||||
|
||||
|
||||
typedef struct _GtkAdjustment GtkAdjustment;
|
||||
|
||||
@@ -42,6 +42,7 @@ extern "C" {
|
||||
#define GTK_ALIGNMENT_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_ALIGNMENT, GtkAlignmentClass))
|
||||
#define GTK_IS_ALIGNMENT(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_ALIGNMENT))
|
||||
#define GTK_IS_ALIGNMENT_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_ALIGNMENT))
|
||||
#define GTK_ALIGNMENT_GET_CLASS(obj) (GTK_CHECK_GET_CLASS ((obj), GTK_TYPE_ALIGNMENT, GtkAlignmentClass))
|
||||
|
||||
|
||||
typedef struct _GtkAlignment GtkAlignment;
|
||||
|
||||
@@ -42,6 +42,7 @@ extern "C" {
|
||||
#define GTK_ARROW_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_ARROW, GtkArrowClass))
|
||||
#define GTK_IS_ARROW(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_ARROW))
|
||||
#define GTK_IS_ARROW_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_ARROW))
|
||||
#define GTK_ARROW_GET_CLASS(obj) (GTK_CHECK_GET_CLASS ((obj), GTK_TYPE_ARROW, GtkArrowClass))
|
||||
|
||||
|
||||
typedef struct _GtkArrow GtkArrow;
|
||||
|
||||
@@ -42,7 +42,7 @@ extern "C" {
|
||||
#define GTK_ASPECT_FRAME_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_ASPECT_FRAME, GtkAspectFrameClass))
|
||||
#define GTK_IS_ASPECT_FRAME(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_ASPECT_FRAME))
|
||||
#define GTK_IS_ASPECT_FRAME_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_ASPECT_FRAME))
|
||||
|
||||
#define GTK_ASPECT_FRAME_GET_CLASS(obj) (GTK_CHECK_GET_CLASS ((obj), GTK_TYPE_ASPECT_FRAME, GtkAspectFrameClass))
|
||||
|
||||
|
||||
typedef struct _GtkAspectFrame GtkAspectFrame;
|
||||
|
||||
+6
-5
@@ -35,11 +35,12 @@ extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
|
||||
#define GTK_TYPE_BUTTON_BOX (gtk_button_box_get_type ())
|
||||
#define GTK_BUTTON_BOX(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_BUTTON_BOX, GtkButtonBox))
|
||||
#define GTK_BUTTON_BOX_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_BUTTON_BOX, GtkButtonBoxClass))
|
||||
#define GTK_IS_BUTTON_BOX(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_BUTTON_BOX))
|
||||
#define GTK_IS_BUTTON_BOX_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_BUTTON_BOX))
|
||||
#define GTK_TYPE_BUTTON_BOX (gtk_button_box_get_type ())
|
||||
#define GTK_BUTTON_BOX(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_BUTTON_BOX, GtkButtonBox))
|
||||
#define GTK_BUTTON_BOX_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_BUTTON_BOX, GtkButtonBoxClass))
|
||||
#define GTK_IS_BUTTON_BOX(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_BUTTON_BOX))
|
||||
#define GTK_IS_BUTTON_BOX_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_BUTTON_BOX))
|
||||
#define GTK_BUTTON_BOX_GET_CLASS(obj) (GTK_CHECK_GET_CLASS ((obj), GTK_TYPE_BUTTON_BOX, GtkButtonBoxClass))
|
||||
|
||||
|
||||
#define GTK_BUTTONBOX_DEFAULT -1
|
||||
|
||||
@@ -42,6 +42,7 @@ extern "C" {
|
||||
#define GTK_BIN_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_BIN, GtkBinClass))
|
||||
#define GTK_IS_BIN(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_BIN))
|
||||
#define GTK_IS_BIN_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_BIN))
|
||||
#define GTK_BIN_GET_CLASS(obj) (GTK_CHECK_GET_CLASS ((obj), GTK_TYPE_BIN, GtkBinClass))
|
||||
|
||||
|
||||
typedef struct _GtkBin GtkBin;
|
||||
|
||||
+6
-5
@@ -37,11 +37,12 @@ extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
|
||||
#define GTK_TYPE_BOX (gtk_box_get_type ())
|
||||
#define GTK_BOX(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_BOX, GtkBox))
|
||||
#define GTK_BOX_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_BOX, GtkBoxClass))
|
||||
#define GTK_IS_BOX(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_BOX))
|
||||
#define GTK_IS_BOX_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_BOX))
|
||||
#define GTK_TYPE_BOX (gtk_box_get_type ())
|
||||
#define GTK_BOX(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_BOX, GtkBox))
|
||||
#define GTK_BOX_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_BOX, GtkBoxClass))
|
||||
#define GTK_IS_BOX(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_BOX))
|
||||
#define GTK_IS_BOX_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_BOX))
|
||||
#define GTK_BOX_GET_CLASS(obj) (GTK_CHECK_GET_CLASS ((obj), GTK_TYPE_BOX, GtkBoxClass))
|
||||
|
||||
|
||||
typedef struct _GtkBox GtkBox;
|
||||
|
||||
+6
-5
@@ -37,11 +37,12 @@
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#define GTK_TYPE_BUTTON (gtk_button_get_type ())
|
||||
#define GTK_BUTTON(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_BUTTON, GtkButton))
|
||||
#define GTK_BUTTON_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_BUTTON, GtkButtonClass))
|
||||
#define GTK_IS_BUTTON(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_BUTTON))
|
||||
#define GTK_IS_BUTTON_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_BUTTON))
|
||||
#define GTK_TYPE_BUTTON (gtk_button_get_type ())
|
||||
#define GTK_BUTTON(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_BUTTON, GtkButton))
|
||||
#define GTK_BUTTON_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_BUTTON, GtkButtonClass))
|
||||
#define GTK_IS_BUTTON(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_BUTTON))
|
||||
#define GTK_IS_BUTTON_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_BUTTON))
|
||||
#define GTK_BUTTON_GET_CLASS(obj) (GTK_CHECK_GET_CLASS ((obj), GTK_TYPE_BUTTON, GtkButtonClass))
|
||||
|
||||
|
||||
typedef struct _GtkButton GtkButton;
|
||||
|
||||
+6
-5
@@ -39,11 +39,12 @@ extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
|
||||
#define GTK_TYPE_CALENDAR (gtk_calendar_get_type ())
|
||||
#define GTK_CALENDAR(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_CALENDAR, GtkCalendar))
|
||||
#define GTK_CALENDAR_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_CALENDAR, GtkCalendarClass))
|
||||
#define GTK_IS_CALENDAR(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_CALENDAR))
|
||||
#define GTK_IS_CALENDAR_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_CALENDAR))
|
||||
#define GTK_TYPE_CALENDAR (gtk_calendar_get_type ())
|
||||
#define GTK_CALENDAR(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_CALENDAR, GtkCalendar))
|
||||
#define GTK_CALENDAR_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_CALENDAR, GtkCalendarClass))
|
||||
#define GTK_IS_CALENDAR(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_CALENDAR))
|
||||
#define GTK_IS_CALENDAR_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_CALENDAR))
|
||||
#define GTK_CALENDAR_GET_CLASS(obj) (GTK_CHECK_GET_CLASS ((obj), GTK_TYPE_CALENDAR, GtkCalendarClass))
|
||||
|
||||
|
||||
typedef struct _GtkCalendar GtkCalendar;
|
||||
|
||||
@@ -42,6 +42,7 @@ extern "C" {
|
||||
#define GTK_CHECK_BUTTON_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_CHECK_BUTTON, GtkCheckButtonClass))
|
||||
#define GTK_IS_CHECK_BUTTON(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_CHECK_BUTTON))
|
||||
#define GTK_IS_CHECK_BUTTON_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_CHECK_BUTTON))
|
||||
#define GTK_CHECK_BUTTON_GET_CLASS(obj) (GTK_CHECK_GET_CLASS ((obj), GTK_TYPE_CHECK_BUTTON, GtkCheckButtonClass))
|
||||
|
||||
|
||||
typedef struct _GtkCheckButton GtkCheckButton;
|
||||
|
||||
@@ -37,11 +37,12 @@ extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
|
||||
#define GTK_TYPE_CHECK_MENU_ITEM (gtk_check_menu_item_get_type ())
|
||||
#define GTK_CHECK_MENU_ITEM(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_CHECK_MENU_ITEM, GtkCheckMenuItem))
|
||||
#define GTK_TYPE_CHECK_MENU_ITEM (gtk_check_menu_item_get_type ())
|
||||
#define GTK_CHECK_MENU_ITEM(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_CHECK_MENU_ITEM, GtkCheckMenuItem))
|
||||
#define GTK_CHECK_MENU_ITEM_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_CHECK_MENU_ITEM, GtkCheckMenuItemClass))
|
||||
#define GTK_IS_CHECK_MENU_ITEM(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_CHECK_MENU_ITEM))
|
||||
#define GTK_IS_CHECK_MENU_ITEM(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_CHECK_MENU_ITEM))
|
||||
#define GTK_IS_CHECK_MENU_ITEM_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_CHECK_MENU_ITEM))
|
||||
#define GTK_CHECK_MENU_ITEM_GET_CLASS(obj) (GTK_CHECK_GET_CLASS ((obj), GTK_TYPE_CHECK_MENU_ITEM, GtkCheckMenuItemClass))
|
||||
|
||||
|
||||
typedef struct _GtkCheckMenuItem GtkCheckMenuItem;
|
||||
|
||||
@@ -87,6 +87,8 @@ typedef enum
|
||||
#define GTK_CLIST_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_CLIST, GtkCListClass))
|
||||
#define GTK_IS_CLIST(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_CLIST))
|
||||
#define GTK_IS_CLIST_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_CLIST))
|
||||
#define GTK_CLIST_GET_CLASS(obj) (GTK_CHECK_GET_CLASS ((obj), GTK_TYPE_CLIST, GtkCListClass))
|
||||
|
||||
|
||||
#define GTK_CLIST_FLAGS(clist) (GTK_CLIST (clist)->flags)
|
||||
#define GTK_CLIST_SET_FLAG(clist,flag) (GTK_CLIST_FLAGS (clist) |= (GTK_ ## flag))
|
||||
|
||||
@@ -55,12 +55,15 @@ extern "C" {
|
||||
#define GTK_COLOR_SELECTION_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_COLOR_SELECTION, GtkColorSelectionClass))
|
||||
#define GTK_IS_COLOR_SELECTION(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_COLOR_SELECTION))
|
||||
#define GTK_IS_COLOR_SELECTION_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_COLOR_SELECTION))
|
||||
#define GTK_COLOR_SELECTION_GET_CLASS(obj) (GTK_CHECK_GET_CLASS ((obj), GTK_TYPE_COLOR_SELECTION, GtkColorSelectionClass))
|
||||
|
||||
|
||||
#define GTK_TYPE_COLOR_SELECTION_DIALOG (gtk_color_selection_dialog_get_type ())
|
||||
#define GTK_COLOR_SELECTION_DIALOG(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_COLOR_SELECTION_DIALOG, GtkColorSelectionDialog))
|
||||
#define GTK_COLOR_SELECTION_DIALOG_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_COLOR_SELECTION_DIALOG, GtkColorSelectionDialogClass))
|
||||
#define GTK_IS_COLOR_SELECTION_DIALOG(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_COLOR_SELECTION_DIALOG))
|
||||
#define GTK_IS_COLOR_SELECTION_DIALOG_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_COLOR_SELECTION_DIALOG))
|
||||
#define GTK_COLOR_SELECTION_DIALOG_GET_CLASS(obj) (GTK_CHECK_GET_CLASS ((obj), GTK_TYPE_COLOR_SELECTION_DIALOG, GtkColorSelectionDialogClass))
|
||||
|
||||
typedef struct _GtkColorSelection GtkColorSelection;
|
||||
typedef struct _GtkColorSelectionClass GtkColorSelectionClass;
|
||||
|
||||
+4
-4
@@ -100,7 +100,7 @@ gtk_combo_class_init (GtkComboClass * klass)
|
||||
GtkObjectClass *oclass;
|
||||
GtkWidgetClass *widget_class;
|
||||
|
||||
parent_class = gtk_type_class (gtk_hbox_get_type ());
|
||||
parent_class = gtk_type_class (GTK_TYPE_HBOX);
|
||||
oclass = (GtkObjectClass *) klass;
|
||||
widget_class = (GtkWidgetClass *) klass;
|
||||
|
||||
@@ -757,15 +757,15 @@ gtk_combo_get_type (void)
|
||||
/* reserved_2 */ NULL,
|
||||
(GtkClassInitFunc) NULL,
|
||||
};
|
||||
combo_type = gtk_type_unique (gtk_hbox_get_type (), &combo_info);
|
||||
combo_type = gtk_type_unique (GTK_TYPE_HBOX, &combo_info);
|
||||
}
|
||||
return combo_type;
|
||||
}
|
||||
|
||||
GtkWidget *
|
||||
GtkWidget*
|
||||
gtk_combo_new (void)
|
||||
{
|
||||
return GTK_WIDGET (gtk_type_new (gtk_combo_get_type ()));
|
||||
return GTK_WIDGET (gtk_type_new (GTK_TYPE_COMBO));
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
+9
-5
@@ -34,11 +34,15 @@
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#define GTK_COMBO(obj) GTK_CHECK_CAST (obj, gtk_combo_get_type (), GtkCombo)
|
||||
#define GTK_COMBO_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, gtk_combo_get_type (), GtkComboClass)
|
||||
#define GTK_IS_COMBO(obj) GTK_CHECK_TYPE (obj, gtk_combo_get_type ())
|
||||
#define GTK_TYPE_COMBO (gtk_combo_get_type ())
|
||||
#define GTK_COMBO(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_COMBO, GtkCombo))
|
||||
#define GTK_COMBO_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_COMBO, GtkComboClass))
|
||||
#define GTK_IS_COMBO(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_COMBO))
|
||||
#define GTK_IS_COMBO_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_COMBO))
|
||||
#define GTK_COMBO_GET_CLASS(obj) (GTK_CHECK_GET_CLASS ((obj), GTK_TYPE_COMBO, GtkComboClass))
|
||||
|
||||
typedef struct _GtkCombo GtkCombo;
|
||||
|
||||
typedef struct _GtkCombo GtkCombo;
|
||||
typedef struct _GtkComboClass GtkComboClass;
|
||||
|
||||
/* you should access only the entry and list fields directly */
|
||||
@@ -69,7 +73,7 @@ struct _GtkComboClass {
|
||||
|
||||
GtkType gtk_combo_get_type (void);
|
||||
|
||||
GtkWidget *gtk_combo_new (void);
|
||||
GtkWidget* gtk_combo_new (void);
|
||||
/* the text in the entry must be or not be in the list */
|
||||
void gtk_combo_set_value_in_list (GtkCombo* combo,
|
||||
gint val,
|
||||
|
||||
+4
-3
@@ -39,11 +39,12 @@ extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
|
||||
#define GTK_TYPE_CONTAINER (gtk_container_get_type ())
|
||||
#define GTK_CONTAINER(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_CONTAINER, GtkContainer))
|
||||
#define GTK_TYPE_CONTAINER (gtk_container_get_type ())
|
||||
#define GTK_CONTAINER(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_CONTAINER, GtkContainer))
|
||||
#define GTK_CONTAINER_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_CONTAINER, GtkContainerClass))
|
||||
#define GTK_IS_CONTAINER(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_CONTAINER))
|
||||
#define GTK_IS_CONTAINER(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_CONTAINER))
|
||||
#define GTK_IS_CONTAINER_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_CONTAINER))
|
||||
#define GTK_CONTAINER_GET_CLASS(obj) (GTK_CHECK_GET_CLASS ((obj), GTK_TYPE_CONTAINER, GtkContainerClass))
|
||||
|
||||
#define GTK_IS_RESIZE_CONTAINER(widget) (GTK_IS_CONTAINER (widget) && ((GtkContainer*) (widget))->resize_mode != GTK_RESIZE_PARENT)
|
||||
|
||||
|
||||
@@ -42,6 +42,7 @@ extern "C" {
|
||||
#define GTK_CTREE_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_CTREE, GtkCTreeClass))
|
||||
#define GTK_IS_CTREE(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_CTREE))
|
||||
#define GTK_IS_CTREE_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_CTREE))
|
||||
#define GTK_CTREE_GET_CLASS(obj) (GTK_CHECK_GET_CLASS ((obj), GTK_TYPE_CTREE, GtkCTreeClass))
|
||||
|
||||
#define GTK_CTREE_ROW(_node_) ((GtkCTreeRow *)(((GList *)(_node_))->data))
|
||||
#define GTK_CTREE_NODE(_node_) ((GtkCTreeNode *)((_node_)))
|
||||
|
||||
@@ -41,6 +41,7 @@ extern "C" {
|
||||
#define GTK_CURVE_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_CURVE, GtkCurveClass))
|
||||
#define GTK_IS_CURVE(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_CURVE))
|
||||
#define GTK_IS_CURVE_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_CURVE))
|
||||
#define GTK_CURVE_GET_CLASS(obj) (GTK_CHECK_GET_CLASS ((obj), GTK_TYPE_CURVE, GtkCurveClass))
|
||||
|
||||
|
||||
typedef struct _GtkCurve GtkCurve;
|
||||
|
||||
+5
-5
@@ -37,12 +37,12 @@ extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
|
||||
#define GTK_TYPE_DATA (gtk_data_get_type ())
|
||||
#define GTK_DATA(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_DATA, GtkData))
|
||||
#define GTK_DATA_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_DATA, GtkDataClass))
|
||||
#define GTK_IS_DATA(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_DATA))
|
||||
#define GTK_TYPE_DATA (gtk_data_get_type ())
|
||||
#define GTK_DATA(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_DATA, GtkData))
|
||||
#define GTK_DATA_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_DATA, GtkDataClass))
|
||||
#define GTK_IS_DATA(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_DATA))
|
||||
#define GTK_IS_DATA_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_DATA))
|
||||
|
||||
#define GTK_DATA_GET_CLASS(obj) (GTK_CHECK_GET_CLASS ((obj), GTK_TYPE_DATA, GtkDataClass))
|
||||
|
||||
|
||||
typedef struct _GtkData GtkData;
|
||||
|
||||
@@ -42,6 +42,7 @@ extern "C" {
|
||||
#define GTK_DIALOG_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_DIALOG, GtkDialogClass))
|
||||
#define GTK_IS_DIALOG(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_DIALOG))
|
||||
#define GTK_IS_DIALOG_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_DIALOG))
|
||||
#define GTK_DIALOG_GET_CLASS(obj) (GTK_CHECK_GET_CLASS ((obj), GTK_TYPE_DIALOG, GtkDialogClass))
|
||||
|
||||
|
||||
typedef struct _GtkDialog GtkDialog;
|
||||
|
||||
@@ -42,6 +42,7 @@ extern "C" {
|
||||
#define GTK_DRAWING_AREA_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_DRAWING_AREA, GtkDrawingAreaClass))
|
||||
#define GTK_IS_DRAWING_AREA(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_DRAWING_AREA))
|
||||
#define GTK_IS_DRAWING_AREA_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_DRAWING_AREA))
|
||||
#define GTK_DRAWING_AREA_GET_CLASS(obj) (GTK_CHECK_GET_CLASS ((obj), GTK_TYPE_DRAWING_AREA, GtkDrawingAreaClass))
|
||||
|
||||
|
||||
typedef struct _GtkDrawingArea GtkDrawingArea;
|
||||
|
||||
@@ -42,6 +42,7 @@ extern "C" {
|
||||
#define GTK_EDITABLE_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_EDITABLE, GtkEditableClass))
|
||||
#define GTK_IS_EDITABLE(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_EDITABLE))
|
||||
#define GTK_IS_EDITABLE_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_EDITABLE))
|
||||
#define GTK_EDITABLE_GET_CLASS(obj) (GTK_CHECK_GET_CLASS ((obj), GTK_TYPE_EDITABLE, GtkEditableClass))
|
||||
|
||||
|
||||
typedef struct _GtkEditable GtkEditable;
|
||||
|
||||
@@ -42,6 +42,7 @@ extern "C" {
|
||||
#define GTK_ENTRY_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_ENTRY, GtkEntryClass))
|
||||
#define GTK_IS_ENTRY(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_ENTRY))
|
||||
#define GTK_IS_ENTRY_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_ENTRY))
|
||||
#define GTK_ENTRY_GET_CLASS(obj) (GTK_CHECK_GET_CLASS ((obj), GTK_TYPE_ENTRY, GtkEntryClass))
|
||||
|
||||
|
||||
typedef struct _GtkEntry GtkEntry;
|
||||
|
||||
+6
-5
@@ -37,11 +37,12 @@ extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
|
||||
#define GTK_TYPE_EVENT_BOX (gtk_event_box_get_type ())
|
||||
#define GTK_EVENT_BOX(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_EVENT_BOX, GtkEventBox))
|
||||
#define GTK_EVENT_BOX_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_EVENT_BOX, GtkEventBoxClass))
|
||||
#define GTK_IS_EVENT_BOX(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_EVENT_BOX))
|
||||
#define GTK_IS_EVENT_BOX_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_EVENT_BOX))
|
||||
#define GTK_TYPE_EVENT_BOX (gtk_event_box_get_type ())
|
||||
#define GTK_EVENT_BOX(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_EVENT_BOX, GtkEventBox))
|
||||
#define GTK_EVENT_BOX_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_EVENT_BOX, GtkEventBoxClass))
|
||||
#define GTK_IS_EVENT_BOX(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_EVENT_BOX))
|
||||
#define GTK_IS_EVENT_BOX_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_EVENT_BOX))
|
||||
#define GTK_EVENT_BOX_GET_CLASS(obj) (GTK_CHECK_GET_CLASS ((obj), GTK_TYPE_EVENT_BOX, GtkEventBoxClass))
|
||||
|
||||
|
||||
typedef struct _GtkEventBox GtkEventBox;
|
||||
|
||||
+1
-3
@@ -2123,14 +2123,12 @@ open_new_dir(gchar* dir_name, struct stat* sbuf, gboolean stat_subdirs)
|
||||
{
|
||||
CompletionDirSent* sent;
|
||||
DIR* directory;
|
||||
gchar *buffer_ptr;
|
||||
struct dirent *dirent_ptr;
|
||||
gint entry_count = 0;
|
||||
gint i;
|
||||
struct stat ent_sbuf;
|
||||
GString *path;
|
||||
gchar *xdir, *xname;
|
||||
int entry_len;
|
||||
gchar *xdir;
|
||||
|
||||
sent = g_new(CompletionDirSent, 1);
|
||||
sent->mtime = sbuf->st_mtime;
|
||||
|
||||
@@ -42,6 +42,7 @@ extern "C" {
|
||||
#define GTK_FILE_SELECTION_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_FILE_SELECTION, GtkFileSelectionClass))
|
||||
#define GTK_IS_FILE_SELECTION(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_FILE_SELECTION))
|
||||
#define GTK_IS_FILE_SELECTION_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_FILE_SELECTION))
|
||||
#define GTK_FILE_SELECTION_GET_CLASS(obj) (GTK_CHECK_GET_CLASS ((obj), GTK_TYPE_FILE_SELECTION, GtkFileSelectionClass))
|
||||
|
||||
|
||||
typedef struct _GtkFileSelection GtkFileSelection;
|
||||
|
||||
@@ -42,6 +42,7 @@ extern "C" {
|
||||
#define GTK_FIXED_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_FIXED, GtkFixedClass))
|
||||
#define GTK_IS_FIXED(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_FIXED))
|
||||
#define GTK_IS_FIXED_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_FIXED))
|
||||
#define GTK_FIXED_GET_CLASS(obj) (GTK_CHECK_GET_CLASS ((obj), GTK_TYPE_FIXED, GtkFixedClass))
|
||||
|
||||
|
||||
typedef struct _GtkFixed GtkFixed;
|
||||
|
||||
+12
-8
@@ -41,17 +41,21 @@
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#define GTK_TYPE_FONT_SELECTION (gtk_font_selection_get_type ())
|
||||
#define GTK_FONT_SELECTION(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_FONT_SELECTION, GtkFontSelection))
|
||||
#define GTK_FONT_SELECTION_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_FONT_SELECTION, GtkFontSelectionClass))
|
||||
#define GTK_IS_FONT_SELECTION(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_FONT_SELECTION))
|
||||
#define GTK_TYPE_FONT_SELECTION (gtk_font_selection_get_type ())
|
||||
#define GTK_FONT_SELECTION(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_FONT_SELECTION, GtkFontSelection))
|
||||
#define GTK_FONT_SELECTION_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_FONT_SELECTION, GtkFontSelectionClass))
|
||||
#define GTK_IS_FONT_SELECTION(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_FONT_SELECTION))
|
||||
#define GTK_IS_FONT_SELECTION_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_FONT_SELECTION))
|
||||
#define GTK_FONT_SELECTION_GET_CLASS(obj) (GTK_CHECK_GET_CLASS ((obj), GTK_TYPE_FONT_SELECTION, GtkFontSelectionClass))
|
||||
|
||||
#define GTK_TYPE_FONT_SELECTION_DIALOG (gtk_font_selection_dialog_get_type ())
|
||||
#define GTK_FONT_SELECTION_DIALOG(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_FONT_SELECTION_DIALOG, GtkFontSelectionDialog))
|
||||
#define GTK_FONT_SELECTION_DIALOG_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_FONT_SELECTION_DIALOG, GtkFontSelectionDialogClass))
|
||||
#define GTK_IS_FONT_SELECTION_DIALOG(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_FONT_SELECTION_DIALOG))
|
||||
|
||||
#define GTK_TYPE_FONT_SELECTION_DIALOG (gtk_font_selection_dialog_get_type ())
|
||||
#define GTK_FONT_SELECTION_DIALOG(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_FONT_SELECTION_DIALOG, GtkFontSelectionDialog))
|
||||
#define GTK_FONT_SELECTION_DIALOG_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_FONT_SELECTION_DIALOG, GtkFontSelectionDialogClass))
|
||||
#define GTK_IS_FONT_SELECTION_DIALOG(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_FONT_SELECTION_DIALOG))
|
||||
#define GTK_IS_FONT_SELECTION_DIALOG_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_FONT_SELECTION_DIALOG))
|
||||
#define GTK_FONT_SELECTION_DIALOG_GET_CLASS(obj) (GTK_CHECK_GET_CLASS ((obj), GTK_TYPE_FONT_SELECTION_DIALOG, GtkFontSelectionDialogClass))
|
||||
|
||||
|
||||
typedef struct _GtkFontSelection GtkFontSelection;
|
||||
typedef struct _GtkFontSelectionClass GtkFontSelectionClass;
|
||||
|
||||
@@ -42,6 +42,7 @@ extern "C" {
|
||||
#define GTK_FRAME_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_FRAME, GtkFrameClass))
|
||||
#define GTK_IS_FRAME(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_FRAME))
|
||||
#define GTK_IS_FRAME_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_FRAME))
|
||||
#define GTK_FRAME_GET_CLASS(obj) (GTK_CHECK_GET_CLASS ((obj), GTK_TYPE_FRAME, GtkFrameClass))
|
||||
|
||||
|
||||
typedef struct _GtkFrame GtkFrame;
|
||||
|
||||
+5
-6
@@ -215,7 +215,7 @@ GtkType
|
||||
gtk_gamma_curve_get_type (void)
|
||||
{
|
||||
static GtkType gamma_curve_type = 0;
|
||||
|
||||
|
||||
if (!gamma_curve_type)
|
||||
{
|
||||
static const GtkTypeInfo gamma_curve_info =
|
||||
@@ -229,9 +229,8 @@ gtk_gamma_curve_get_type (void)
|
||||
/* reserved_2 */ NULL,
|
||||
(GtkClassInitFunc) NULL,
|
||||
};
|
||||
|
||||
gamma_curve_type =
|
||||
gtk_type_unique (gtk_vbox_get_type (), &gamma_curve_info);
|
||||
|
||||
gamma_curve_type = gtk_type_unique (GTK_TYPE_VBOX, &gamma_curve_info);
|
||||
}
|
||||
return gamma_curve_type;
|
||||
}
|
||||
@@ -241,7 +240,7 @@ gtk_gamma_curve_class_init (GtkGammaCurveClass *class)
|
||||
{
|
||||
GtkObjectClass *object_class;
|
||||
|
||||
parent_class = gtk_type_class (gtk_vbox_get_type ());
|
||||
parent_class = gtk_type_class (GTK_TYPE_VBOX);
|
||||
|
||||
object_class = (GtkObjectClass *) class;
|
||||
object_class->destroy = gtk_gamma_curve_destroy;
|
||||
@@ -458,7 +457,7 @@ curve_type_changed_callback (GtkWidget *w, gpointer data)
|
||||
GtkWidget*
|
||||
gtk_gamma_curve_new (void)
|
||||
{
|
||||
return gtk_type_new (gtk_gamma_curve_get_type ());
|
||||
return gtk_type_new (GTK_TYPE_GAMMA_CURVE);
|
||||
}
|
||||
|
||||
static void
|
||||
|
||||
+6
-6
@@ -37,12 +37,12 @@ extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
|
||||
#define GTK_TYPE_GAMMA_CURVE (gtk_gamma_curve_get_type ())
|
||||
#define GTK_GAMMA_CURVE(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_GAMMA_CURVE, GtkGammaCurve))
|
||||
#define GTK_GAMMA_CURVE_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_GAMMA_CURVE, GtkGammaCurveClass))
|
||||
#define GTK_IS_GAMMA_CURVE(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_GAMMA_CURVE))
|
||||
#define GTK_IS_GAMMA_CURVE_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_GAMMA_CURVE))
|
||||
|
||||
#define GTK_TYPE_GAMMA_CURVE (gtk_gamma_curve_get_type ())
|
||||
#define GTK_GAMMA_CURVE(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_GAMMA_CURVE, GtkGammaCurve))
|
||||
#define GTK_GAMMA_CURVE_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_GAMMA_CURVE, GtkGammaCurveClass))
|
||||
#define GTK_IS_GAMMA_CURVE(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_GAMMA_CURVE))
|
||||
#define GTK_IS_GAMMA_CURVE_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_GAMMA_CURVE))
|
||||
#define GTK_GAMMA_CURVE_GET_CLASS(obj) (GTK_CHECK_GET_CLASS ((obj), GTK_TYPE_GAMMA_CURVE, GtkGammaCurveClass))
|
||||
|
||||
typedef struct _GtkGammaCurve GtkGammaCurve;
|
||||
typedef struct _GtkGammaCurveClass GtkGammaCurveClass;
|
||||
|
||||
@@ -48,6 +48,7 @@ extern "C" {
|
||||
#define GTK_HANDLE_BOX_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_HANDLE_BOX, GtkHandleBoxClass))
|
||||
#define GTK_IS_HANDLE_BOX(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_HANDLE_BOX))
|
||||
#define GTK_IS_HANDLE_BOX_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_HANDLE_BOX))
|
||||
#define GTK_HANDLE_BOX_GET_CLASS(obj) (GTK_CHECK_GET_CLASS ((obj), GTK_TYPE_HANDLE_BOX, GtkHandleBoxClass))
|
||||
|
||||
|
||||
typedef struct _GtkHandleBox GtkHandleBox;
|
||||
|
||||
+4
-4
@@ -37,10 +37,10 @@ static void gtk_hbutton_box_size_allocate (GtkWidget *widget,
|
||||
static gint default_spacing = 30;
|
||||
static gint default_layout_style = GTK_BUTTONBOX_EDGE;
|
||||
|
||||
guint
|
||||
GtkType
|
||||
gtk_hbutton_box_get_type (void)
|
||||
{
|
||||
static guint hbutton_box_type = 0;
|
||||
static GtkType hbutton_box_type = 0;
|
||||
|
||||
if (!hbutton_box_type)
|
||||
{
|
||||
@@ -56,7 +56,7 @@ gtk_hbutton_box_get_type (void)
|
||||
(GtkClassInitFunc) NULL,
|
||||
};
|
||||
|
||||
hbutton_box_type = gtk_type_unique (gtk_button_box_get_type (), &hbutton_box_info);
|
||||
hbutton_box_type = gtk_type_unique (GTK_TYPE_BUTTON_BOX, &hbutton_box_info);
|
||||
}
|
||||
|
||||
return hbutton_box_type;
|
||||
@@ -84,7 +84,7 @@ gtk_hbutton_box_new (void)
|
||||
{
|
||||
GtkHButtonBox *hbutton_box;
|
||||
|
||||
hbutton_box = gtk_type_new (gtk_hbutton_box_get_type ());
|
||||
hbutton_box = gtk_type_new (GTK_TYPE_HBUTTON_BOX);
|
||||
|
||||
return GTK_WIDGET (hbutton_box);
|
||||
}
|
||||
|
||||
+8
-5
@@ -36,9 +36,12 @@ extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
|
||||
#define GTK_HBUTTON_BOX(obj) GTK_CHECK_CAST (obj, gtk_hbutton_box_get_type (), GtkHButtonBox)
|
||||
#define GTK_HBUTTON_BOX_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, gtk_hbutton_box_get_type (), GtkHButtonBoxClass)
|
||||
#define GTK_IS_HBUTTON_BOX(obj) GTK_CHECK_TYPE (obj, gtk_hbutton_box_get_type ())
|
||||
#define GTK_TYPE_HBUTTON_BOX (gtk_hbutton_box_get_type ())
|
||||
#define GTK_HBUTTON_BOX(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_HBUTTON_BOX, GtkHButtonBox))
|
||||
#define GTK_HBUTTON_BOX_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_HBUTTON_BOX, GtkHButtonBoxClass))
|
||||
#define GTK_IS_HBUTTON_BOX(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_HBUTTON_BOX))
|
||||
#define GTK_IS_HBUTTON_BOX_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_HBUTTON_BOX))
|
||||
#define GTK_HBUTTON_BOX_GET_CLASS(obj) (GTK_CHECK_GET_CLASS ((obj), GTK_TYPE_HBUTTON_BOX, GtkHButtonBoxClass))
|
||||
|
||||
|
||||
typedef struct _GtkHButtonBox GtkHButtonBox;
|
||||
@@ -55,8 +58,8 @@ struct _GtkHButtonBoxClass
|
||||
};
|
||||
|
||||
|
||||
guint gtk_hbutton_box_get_type (void);
|
||||
GtkWidget *gtk_hbutton_box_new (void);
|
||||
GtkType gtk_hbutton_box_get_type (void);
|
||||
GtkWidget* gtk_hbutton_box_new (void);
|
||||
|
||||
/* buttons can be added by gtk_container_add() */
|
||||
|
||||
|
||||
+5
-4
@@ -37,11 +37,12 @@ extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
|
||||
#define GTK_TYPE_HBOX (gtk_hbox_get_type ())
|
||||
#define GTK_HBOX(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_HBOX, GtkHBox))
|
||||
#define GTK_HBOX_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_HBOX, GtkHBoxClass))
|
||||
#define GTK_IS_HBOX(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_HBOX))
|
||||
#define GTK_TYPE_HBOX (gtk_hbox_get_type ())
|
||||
#define GTK_HBOX(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_HBOX, GtkHBox))
|
||||
#define GTK_HBOX_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_HBOX, GtkHBoxClass))
|
||||
#define GTK_IS_HBOX(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_HBOX))
|
||||
#define GTK_IS_HBOX_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_HBOX))
|
||||
#define GTK_HBOX_GET_CLASS(obj) (GTK_CHECK_GET_CLASS ((obj), GTK_TYPE_HBOX, GtkHBoxClass))
|
||||
|
||||
|
||||
typedef struct _GtkHBox GtkHBox;
|
||||
|
||||
+166
-127
@@ -1,3 +1,4 @@
|
||||
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
|
||||
/* GTK - The GIMP Toolkit
|
||||
* Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
|
||||
*
|
||||
@@ -25,24 +26,22 @@
|
||||
*/
|
||||
|
||||
#include "gtkhpaned.h"
|
||||
#include "gtkmain.h"
|
||||
#include "gtksignal.h"
|
||||
|
||||
static void gtk_hpaned_class_init (GtkHPanedClass *klass);
|
||||
static void gtk_hpaned_init (GtkHPaned *hpaned);
|
||||
static void gtk_hpaned_size_request (GtkWidget *widget,
|
||||
GtkRequisition *requisition);
|
||||
static void gtk_hpaned_size_allocate (GtkWidget *widget,
|
||||
GtkAllocation *allocation);
|
||||
static void gtk_hpaned_draw (GtkWidget *widget,
|
||||
GdkRectangle *area);
|
||||
static void gtk_hpaned_xor_line (GtkPaned *paned);
|
||||
static gint gtk_hpaned_button_press (GtkWidget *widget,
|
||||
GdkEventButton *event);
|
||||
static gint gtk_hpaned_button_release (GtkWidget *widget,
|
||||
GdkEventButton *event);
|
||||
static gint gtk_hpaned_motion (GtkWidget *widget,
|
||||
GdkEventMotion *event);
|
||||
static void gtk_hpaned_class_init (GtkHPanedClass *klass);
|
||||
static void gtk_hpaned_init (GtkHPaned *hpaned);
|
||||
static void gtk_hpaned_size_request (GtkWidget *widget,
|
||||
GtkRequisition *requisition);
|
||||
static void gtk_hpaned_size_allocate (GtkWidget *widget,
|
||||
GtkAllocation *allocation);
|
||||
static void gtk_hpaned_draw (GtkWidget *widget,
|
||||
GdkRectangle *area);
|
||||
static void gtk_hpaned_xor_line (GtkPaned *paned);
|
||||
static gboolean gtk_hpaned_button_press (GtkWidget *widget,
|
||||
GdkEventButton *event);
|
||||
static gboolean gtk_hpaned_button_release (GtkWidget *widget,
|
||||
GdkEventButton *event);
|
||||
static gboolean gtk_hpaned_motion (GtkWidget *widget,
|
||||
GdkEventMotion *event);
|
||||
|
||||
GtkType
|
||||
gtk_hpaned_get_type (void)
|
||||
@@ -59,11 +58,11 @@ gtk_hpaned_get_type (void)
|
||||
(GtkClassInitFunc) gtk_hpaned_class_init,
|
||||
(GtkObjectInitFunc) gtk_hpaned_init,
|
||||
/* reserved_1 */ NULL,
|
||||
/* reserved_2 */ NULL,
|
||||
(GtkClassInitFunc) NULL,
|
||||
/* reserved_2 */ NULL,
|
||||
(GtkClassInitFunc) NULL,
|
||||
};
|
||||
|
||||
hpaned_type = gtk_type_unique (gtk_paned_get_type (), &hpaned_info);
|
||||
hpaned_type = gtk_type_unique (GTK_TYPE_PANED, &hpaned_info);
|
||||
}
|
||||
|
||||
return hpaned_type;
|
||||
@@ -74,7 +73,7 @@ gtk_hpaned_class_init (GtkHPanedClass *class)
|
||||
{
|
||||
GtkWidgetClass *widget_class;
|
||||
|
||||
widget_class = (GtkWidgetClass*) class;
|
||||
widget_class = (GtkWidgetClass *) class;
|
||||
|
||||
widget_class->size_request = gtk_hpaned_size_request;
|
||||
widget_class->size_allocate = gtk_hpaned_size_allocate;
|
||||
@@ -87,14 +86,22 @@ gtk_hpaned_class_init (GtkHPanedClass *class)
|
||||
static void
|
||||
gtk_hpaned_init (GtkHPaned *hpaned)
|
||||
{
|
||||
GtkPaned *paned;
|
||||
|
||||
g_return_if_fail (hpaned != NULL);
|
||||
g_return_if_fail (GTK_IS_PANED (hpaned));
|
||||
|
||||
paned = GTK_PANED (hpaned);
|
||||
|
||||
paned->cursor_type = GDK_SB_H_DOUBLE_ARROW;
|
||||
}
|
||||
|
||||
GtkWidget*
|
||||
GtkWidget *
|
||||
gtk_hpaned_new (void)
|
||||
{
|
||||
GtkHPaned *hpaned;
|
||||
|
||||
hpaned = gtk_type_new (gtk_hpaned_get_type ());
|
||||
hpaned = gtk_type_new (GTK_TYPE_HPANED);
|
||||
|
||||
return GTK_WIDGET (hpaned);
|
||||
}
|
||||
@@ -130,7 +137,7 @@ gtk_hpaned_size_request (GtkWidget *widget,
|
||||
requisition->width += child_requisition.width;
|
||||
}
|
||||
|
||||
requisition->width += GTK_CONTAINER (paned)->border_width * 2 + paned->gutter_size;
|
||||
requisition->width += GTK_CONTAINER (paned)->border_width * 2 + paned->handle_size;
|
||||
requisition->height += GTK_CONTAINER (paned)->border_width * 2;
|
||||
}
|
||||
|
||||
@@ -143,7 +150,6 @@ gtk_hpaned_size_allocate (GtkWidget *widget,
|
||||
GtkRequisition child2_requisition;
|
||||
GtkAllocation child1_allocation;
|
||||
GtkAllocation child2_allocation;
|
||||
GdkRectangle old_groove_rectangle;
|
||||
guint16 border_width;
|
||||
|
||||
g_return_if_fail (widget != NULL);
|
||||
@@ -164,72 +170,52 @@ gtk_hpaned_size_allocate (GtkWidget *widget,
|
||||
gtk_widget_get_child_requisition (paned->child2, &child2_requisition);
|
||||
else
|
||||
child2_requisition.width = 0;
|
||||
|
||||
|
||||
gtk_paned_compute_position (paned,
|
||||
widget->allocation.width
|
||||
- paned->gutter_size
|
||||
- paned->handle_size
|
||||
- 2 * border_width,
|
||||
child1_requisition.width,
|
||||
child2_requisition.width);
|
||||
|
||||
|
||||
/* Move the handle before the children so we don't get extra expose events */
|
||||
|
||||
paned->handle_xpos = paned->child1_size + border_width + paned->gutter_size / 2 - paned->handle_size / 2;
|
||||
paned->handle_ypos = allocation->height - border_width - 2*paned->handle_size;
|
||||
paned->handle_xpos = paned->child1_size + border_width;
|
||||
paned->handle_ypos = 0;
|
||||
paned->handle_width = paned->handle_size;
|
||||
paned->handle_height = widget->allocation.height;
|
||||
|
||||
if (GTK_WIDGET_REALIZED (widget))
|
||||
{
|
||||
gdk_window_move_resize (widget->window,
|
||||
allocation->x, allocation->y,
|
||||
allocation->width, allocation->height);
|
||||
|
||||
gdk_window_move (paned->handle, paned->handle_xpos, paned->handle_ypos);
|
||||
allocation->width,
|
||||
allocation->height);
|
||||
|
||||
gdk_window_move_resize (paned->handle,
|
||||
paned->handle_xpos,
|
||||
paned->handle_ypos,
|
||||
paned->handle_size,
|
||||
paned->handle_height);
|
||||
}
|
||||
|
||||
child1_allocation.height = child2_allocation.height = MAX (1, (gint)allocation->height - border_width * 2);
|
||||
child1_allocation.height = child2_allocation.height = MAX (1, (gint) allocation->height - border_width * 2);
|
||||
child1_allocation.width = paned->child1_size;
|
||||
child1_allocation.x = border_width;
|
||||
child1_allocation.y = child2_allocation.y = border_width;
|
||||
|
||||
old_groove_rectangle = paned->groove_rectangle;
|
||||
|
||||
paned->groove_rectangle.x = child1_allocation.x
|
||||
+ child1_allocation.width + paned->gutter_size / 2 - 1;
|
||||
paned->groove_rectangle.y = 0;
|
||||
paned->groove_rectangle.width = 2;
|
||||
paned->groove_rectangle.height = allocation->height;
|
||||
|
||||
if (GTK_WIDGET_DRAWABLE (widget) &&
|
||||
((paned->groove_rectangle.x != old_groove_rectangle.x) ||
|
||||
(paned->groove_rectangle.y != old_groove_rectangle.y) ||
|
||||
(paned->groove_rectangle.width != old_groove_rectangle.width) ||
|
||||
(paned->groove_rectangle.height != old_groove_rectangle.height)))
|
||||
{
|
||||
gtk_widget_queue_clear_area (widget,
|
||||
old_groove_rectangle.x,
|
||||
old_groove_rectangle.y,
|
||||
old_groove_rectangle.width,
|
||||
old_groove_rectangle.height);
|
||||
gtk_widget_queue_draw_area (widget,
|
||||
paned->groove_rectangle.x,
|
||||
paned->groove_rectangle.y,
|
||||
paned->groove_rectangle.width,
|
||||
paned->groove_rectangle.height);
|
||||
}
|
||||
|
||||
child2_allocation.x = paned->groove_rectangle.x + paned->gutter_size / 2 + 1;
|
||||
child2_allocation.width = MAX (1, (gint)allocation->width
|
||||
- child2_allocation.x - border_width);
|
||||
|
||||
child2_allocation.x = child1_allocation.x + child1_allocation.width + paned->handle_width;
|
||||
child2_allocation.width = MAX (1, (gint) allocation->width - child2_allocation.x - border_width);
|
||||
|
||||
/* Now allocate the childen, making sure, when resizing not to
|
||||
* overlap the windows */
|
||||
if (GTK_WIDGET_MAPPED(widget) &&
|
||||
if (GTK_WIDGET_MAPPED (widget) &&
|
||||
paned->child1 && GTK_WIDGET_VISIBLE (paned->child1) &&
|
||||
paned->child1->allocation.width < child1_allocation.width)
|
||||
{
|
||||
if (paned->child2 && GTK_WIDGET_VISIBLE (paned->child2))
|
||||
gtk_widget_size_allocate (paned->child2, &child2_allocation);
|
||||
gtk_widget_size_allocate (paned->child1, &child1_allocation);
|
||||
gtk_widget_size_allocate (paned->child1, &child1_allocation);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -242,7 +228,7 @@ gtk_hpaned_size_allocate (GtkWidget *widget,
|
||||
|
||||
static void
|
||||
gtk_hpaned_draw (GtkWidget *widget,
|
||||
GdkRectangle *area)
|
||||
GdkRectangle *area)
|
||||
{
|
||||
GtkPaned *paned;
|
||||
GdkRectangle handle_area, child_area;
|
||||
@@ -251,52 +237,97 @@ gtk_hpaned_draw (GtkWidget *widget,
|
||||
g_return_if_fail (widget != NULL);
|
||||
g_return_if_fail (GTK_IS_PANED (widget));
|
||||
|
||||
if (GTK_WIDGET_VISIBLE (widget) && GTK_WIDGET_MAPPED (widget))
|
||||
if (GTK_WIDGET_VISIBLE (widget) && GTK_WIDGET_MAPPED (widget))
|
||||
{
|
||||
gint width, height;
|
||||
|
||||
paned = GTK_PANED (widget);
|
||||
border_width = GTK_CONTAINER (paned)->border_width;
|
||||
|
||||
gdk_window_clear_area (widget->window,
|
||||
area->x, area->y, area->width, area->height);
|
||||
area->x, area->y, area->width,
|
||||
area->height);
|
||||
|
||||
/* Redraw the handle
|
||||
*/
|
||||
gdk_window_get_size (paned->handle, &width, &height);
|
||||
|
||||
handle_area.x = paned->handle_xpos;
|
||||
handle_area.y = paned->handle_ypos;
|
||||
handle_area.width = width;
|
||||
handle_area.height = height;
|
||||
handle_area.width = paned->handle_size;
|
||||
handle_area.height = paned->handle_height;
|
||||
|
||||
if (gdk_rectangle_intersect (&handle_area, area, &child_area))
|
||||
{
|
||||
child_area.x -= handle_area.x;
|
||||
child_area.y -= handle_area.y;
|
||||
gtk_paint_box (widget->style, paned->handle,
|
||||
GTK_WIDGET_STATE(widget),
|
||||
GTK_SHADOW_OUT,
|
||||
&child_area, widget, "paned",
|
||||
0, 0,
|
||||
width, height);
|
||||
if (widget->allocation.height > 2)
|
||||
{
|
||||
gdk_draw_point (paned->handle,
|
||||
widget->style->fg_gc[GTK_STATE_NORMAL],
|
||||
paned->handle_size/2,
|
||||
paned->handle_height/2);
|
||||
gdk_draw_point (paned->handle,
|
||||
widget->style->bg_gc[GTK_STATE_PRELIGHT],
|
||||
paned->handle_size/2 - 1,
|
||||
paned->handle_height/2 - 1);
|
||||
}
|
||||
if (widget->allocation.height > 11)
|
||||
{
|
||||
gdk_draw_point (paned->handle,
|
||||
widget->style->fg_gc[GTK_STATE_NORMAL],
|
||||
paned->handle_size/2,
|
||||
paned->handle_height/2 + 5);
|
||||
gdk_draw_point (paned->handle,
|
||||
widget->style->bg_gc[GTK_STATE_PRELIGHT],
|
||||
paned->handle_size/2 - 1,
|
||||
paned->handle_height/2 + 4);
|
||||
gdk_draw_point (paned->handle,
|
||||
widget->style->fg_gc[GTK_STATE_NORMAL],
|
||||
paned->handle_size/2,
|
||||
paned->handle_height/2 - 5);
|
||||
gdk_draw_point (paned->handle,
|
||||
widget->style->bg_gc[GTK_STATE_PRELIGHT],
|
||||
paned->handle_size/2 - 1,
|
||||
paned->handle_height/2 - 6);
|
||||
}
|
||||
if (widget->allocation.height > 20)
|
||||
{
|
||||
gdk_draw_point (paned->handle,
|
||||
widget->style->fg_gc[GTK_STATE_NORMAL],
|
||||
paned->handle_size/2,
|
||||
paned->handle_height/2 - 10);
|
||||
gdk_draw_point (paned->handle,
|
||||
widget->style->bg_gc[GTK_STATE_PRELIGHT],
|
||||
paned->handle_size/2 - 1,
|
||||
paned->handle_height/2 - 11);
|
||||
gdk_draw_point (paned->handle,
|
||||
widget->style->fg_gc[GTK_STATE_NORMAL],
|
||||
paned->handle_size/2,
|
||||
paned->handle_height/2 + 10);
|
||||
gdk_draw_point (paned->handle,
|
||||
widget->style->bg_gc[GTK_STATE_PRELIGHT],
|
||||
paned->handle_size/2 - 1,
|
||||
paned->handle_height/2 + 9);
|
||||
}
|
||||
if (widget->allocation.height > 30)
|
||||
{
|
||||
gdk_draw_point (paned->handle,
|
||||
widget->style->fg_gc[GTK_STATE_NORMAL],
|
||||
paned->handle_size/2,
|
||||
paned->handle_height/2 - 15);
|
||||
gdk_draw_point (paned->handle,
|
||||
widget->style->bg_gc[GTK_STATE_PRELIGHT],
|
||||
paned->handle_size/2 - 1,
|
||||
paned->handle_height/2 - 16);
|
||||
gdk_draw_point (paned->handle,
|
||||
widget->style->fg_gc[GTK_STATE_NORMAL],
|
||||
paned->handle_size/2,
|
||||
paned->handle_height/2 + 15);
|
||||
gdk_draw_point (paned->handle,
|
||||
widget->style->bg_gc[GTK_STATE_PRELIGHT],
|
||||
paned->handle_size/2 - 1,
|
||||
paned->handle_height/2 + 14);
|
||||
}
|
||||
}
|
||||
|
||||
/* Redraw the groove
|
||||
*/
|
||||
gtk_paint_vline(widget->style, widget->window, GTK_STATE_NORMAL,
|
||||
area, widget, "hpaned",
|
||||
0, widget->allocation.height - 1,
|
||||
border_width + paned->child1_size + paned->gutter_size / 2 - 1);
|
||||
/* Redraw the children
|
||||
*/
|
||||
if (paned->child1 &&
|
||||
gtk_widget_intersect (paned->child1, area, &child_area))
|
||||
gtk_widget_draw (paned->child1, &child_area);
|
||||
if (paned->child2 &&
|
||||
gtk_widget_intersect (paned->child2, area, &child_area))
|
||||
gtk_widget_draw (paned->child2, &child_area);
|
||||
|
||||
if (paned->child1 && gtk_widget_intersect (paned->child1, area, &child_area))
|
||||
gtk_widget_draw(paned->child1, &child_area);
|
||||
if (paned->child2 && gtk_widget_intersect(paned->child2, area, &child_area))
|
||||
gtk_widget_draw(paned->child2, &child_area);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -315,12 +346,14 @@ gtk_hpaned_xor_line (GtkPaned *paned)
|
||||
values.subwindow_mode = GDK_INCLUDE_INFERIORS;
|
||||
paned->xor_gc = gdk_gc_new_with_values (widget->window,
|
||||
&values,
|
||||
GDK_GC_FUNCTION |
|
||||
GDK_GC_SUBWINDOW);
|
||||
GDK_GC_FUNCTION | GDK_GC_SUBWINDOW);
|
||||
}
|
||||
|
||||
gdk_gc_set_line_attributes (paned->xor_gc, 2, GDK_LINE_SOLID,
|
||||
GDK_CAP_NOT_LAST, GDK_JOIN_BEVEL);
|
||||
|
||||
xpos = paned->child1_size
|
||||
+ GTK_CONTAINER (paned)->border_width + paned->gutter_size / 2;
|
||||
+ GTK_CONTAINER (paned)->border_width + paned->handle_size / 2;
|
||||
|
||||
gdk_draw_line (widget->window, paned->xor_gc,
|
||||
xpos,
|
||||
@@ -329,44 +362,49 @@ gtk_hpaned_xor_line (GtkPaned *paned)
|
||||
widget->allocation.height - 1);
|
||||
}
|
||||
|
||||
static gint
|
||||
gtk_hpaned_button_press (GtkWidget *widget, GdkEventButton *event)
|
||||
static gboolean
|
||||
gtk_hpaned_button_press (GtkWidget *widget,
|
||||
GdkEventButton *event)
|
||||
{
|
||||
GtkPaned *paned;
|
||||
|
||||
g_return_val_if_fail (widget != NULL,FALSE);
|
||||
g_return_val_if_fail (GTK_IS_PANED (widget),FALSE);
|
||||
g_return_val_if_fail (widget != NULL, FALSE);
|
||||
g_return_val_if_fail (GTK_IS_PANED (widget), FALSE);
|
||||
|
||||
paned = GTK_PANED (widget);
|
||||
|
||||
if (!paned->in_drag &&
|
||||
(event->window == paned->handle) && (event->button == 1))
|
||||
event->window == paned->handle && event->button == 1)
|
||||
{
|
||||
paned->in_drag = TRUE;
|
||||
/* We need a server grab here, not gtk_grab_add(), since
|
||||
* we don't want to pass events on to the widget's children */
|
||||
gdk_pointer_grab (paned->handle, FALSE,
|
||||
GDK_POINTER_MOTION_HINT_MASK
|
||||
| GDK_BUTTON1_MOTION_MASK
|
||||
| GDK_BUTTON_RELEASE_MASK,
|
||||
NULL, NULL, event->time);
|
||||
gdk_pointer_grab(paned->handle, FALSE,
|
||||
GDK_POINTER_MOTION_HINT_MASK
|
||||
| GDK_BUTTON1_MOTION_MASK
|
||||
| GDK_BUTTON_RELEASE_MASK,
|
||||
NULL, NULL, event->time);
|
||||
paned->child1_size += event->x - paned->handle_size / 2;
|
||||
paned->child1_size = CLAMP (paned->child1_size, 0,
|
||||
widget->allocation.width - paned->gutter_size
|
||||
- 2 * GTK_CONTAINER (paned)->border_width);
|
||||
widget->allocation.width
|
||||
- paned->handle_size
|
||||
- 2 * GTK_CONTAINER (paned)->border_width);
|
||||
gtk_hpaned_xor_line (paned);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static gint
|
||||
gtk_hpaned_button_release (GtkWidget *widget, GdkEventButton *event)
|
||||
static gboolean
|
||||
gtk_hpaned_button_release (GtkWidget *widget,
|
||||
GdkEventButton *event)
|
||||
{
|
||||
GtkPaned *paned;
|
||||
|
||||
g_return_val_if_fail (widget != NULL,FALSE);
|
||||
g_return_val_if_fail (GTK_IS_PANED (widget),FALSE);
|
||||
g_return_val_if_fail (widget != NULL, FALSE);
|
||||
g_return_val_if_fail (GTK_IS_PANED (widget), FALSE);
|
||||
|
||||
paned = GTK_PANED (widget);
|
||||
|
||||
@@ -377,13 +415,16 @@ gtk_hpaned_button_release (GtkWidget *widget, GdkEventButton *event)
|
||||
paned->position_set = TRUE;
|
||||
gdk_pointer_ungrab (event->time);
|
||||
gtk_widget_queue_resize (GTK_WIDGET (paned));
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static gint
|
||||
gtk_hpaned_motion (GtkWidget *widget, GdkEventMotion *event)
|
||||
static gboolean
|
||||
gtk_hpaned_motion (GtkWidget *widget,
|
||||
GdkEventMotion *event)
|
||||
{
|
||||
GtkPaned *paned;
|
||||
gint x;
|
||||
@@ -400,12 +441,10 @@ gtk_hpaned_motion (GtkWidget *widget, GdkEventMotion *event)
|
||||
|
||||
if (paned->in_drag)
|
||||
{
|
||||
gint size = x - GTK_CONTAINER (paned)->border_width - paned->gutter_size/2;
|
||||
|
||||
gint size = x - GTK_CONTAINER (paned)->border_width - paned->handle_size / 2;
|
||||
|
||||
gtk_hpaned_xor_line (paned);
|
||||
paned->child1_size = CLAMP (size,
|
||||
paned->min_position,
|
||||
paned->max_position);
|
||||
paned->child1_size = CLAMP (size, paned->min_position, paned->max_position);
|
||||
gtk_hpaned_xor_line (paned);
|
||||
}
|
||||
|
||||
|
||||
+10
-14
@@ -18,7 +18,7 @@
|
||||
*/
|
||||
|
||||
/*
|
||||
* Modified by the GTK+ Team and others 1997-1999. See the AUTHORS
|
||||
* Modified by the GTK+ Team and others 1997-2000. See the AUTHORS
|
||||
* file for a list of people on the GTK+ Team. See the ChangeLog
|
||||
* files for a list of changes. These files are distributed with
|
||||
* GTK+ at ftp://ftp.gtk.org/pub/gtk/.
|
||||
@@ -27,23 +27,22 @@
|
||||
#ifndef __GTK_HPANED_H__
|
||||
#define __GTK_HPANED_H__
|
||||
|
||||
|
||||
#include <gdk/gdk.h>
|
||||
#include <gtk/gtkpaned.h>
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
|
||||
#define GTK_HPANED(obj) GTK_CHECK_CAST (obj, gtk_hpaned_get_type (), GtkHPaned)
|
||||
#define GTK_HPANED_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, gtk_hpaned_get_type (), GtkHPanedClass)
|
||||
#define GTK_IS_HPANED(obj) GTK_CHECK_TYPE (obj, gtk_hpaned_get_type ())
|
||||
#define GTK_TYPE_HPANED (gtk_hpaned_get_type ())
|
||||
#define GTK_HPANED(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_HPANED, GtkHPaned))
|
||||
#define GTK_HPANED_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_HPANED, GtkHPanedClass))
|
||||
#define GTK_IS_HPANED(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_HPANED))
|
||||
#define GTK_IS_HPANED_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_HPANED))
|
||||
#define GTK_HPANED_GET_CLASS(obj) (GTK_CHECK_GET_CLASS ((obj), GTK_TYPE_HPANED, GtkHPanedClass))
|
||||
|
||||
|
||||
typedef struct _GtkHPaned GtkHPaned;
|
||||
typedef struct _GtkHPanedClass GtkHPanedClass;
|
||||
typedef struct _GtkHPaned GtkHPaned;
|
||||
typedef struct _GtkHPanedClass GtkHPanedClass;
|
||||
|
||||
struct _GtkHPaned
|
||||
{
|
||||
@@ -55,14 +54,11 @@ struct _GtkHPanedClass
|
||||
GtkPanedClass parent_class;
|
||||
};
|
||||
|
||||
|
||||
GtkType gtk_hpaned_get_type (void);
|
||||
GtkWidget* gtk_hpaned_new (void);
|
||||
|
||||
GtkWidget *gtk_hpaned_new (void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
|
||||
#endif /* __GTK_HPANED_H__ */
|
||||
|
||||
+2
-2
@@ -65,7 +65,7 @@ gtk_hruler_get_type (void)
|
||||
(GtkClassInitFunc) NULL,
|
||||
};
|
||||
|
||||
hruler_type = gtk_type_unique (gtk_ruler_get_type (), &hruler_info);
|
||||
hruler_type = gtk_type_unique (GTK_TYPE_RULER, &hruler_info);
|
||||
}
|
||||
|
||||
return hruler_type;
|
||||
@@ -100,7 +100,7 @@ gtk_hruler_init (GtkHRuler *hruler)
|
||||
GtkWidget*
|
||||
gtk_hruler_new (void)
|
||||
{
|
||||
return GTK_WIDGET (gtk_type_new (gtk_hruler_get_type ()));
|
||||
return GTK_WIDGET (gtk_type_new (GTK_TYPE_HRULER));
|
||||
}
|
||||
|
||||
static gint
|
||||
|
||||
+6
-3
@@ -37,9 +37,12 @@ extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
|
||||
#define GTK_HRULER(obj) GTK_CHECK_CAST (obj, gtk_hruler_get_type (), GtkHRuler)
|
||||
#define GTK_HRULER_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, gtk_hruler_get_type (), GtkHRulerClass)
|
||||
#define GTK_IS_HRULER(obj) GTK_CHECK_TYPE (obj, gtk_hruler_get_type ())
|
||||
#define GTK_TYPE_HRULER (gtk_hruler_get_type ())
|
||||
#define GTK_HRULER(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_HRULER, GtkHRuler))
|
||||
#define GTK_HRULER_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_HRULER, GtkHRulerClass))
|
||||
#define GTK_IS_HRULER(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_HRULER))
|
||||
#define GTK_IS_HRULER_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_HRULER))
|
||||
#define GTK_HRULER_GET_CLASS(obj) (GTK_CHECK_GET_CLASS ((obj), GTK_TYPE_HRULER, GtkHRulerClass))
|
||||
|
||||
|
||||
typedef struct _GtkHRuler GtkHRuler;
|
||||
|
||||
+1
-1
@@ -42,7 +42,7 @@ extern "C" {
|
||||
#define GTK_HSCALE_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_HSCALE, GtkHScaleClass))
|
||||
#define GTK_IS_HSCALE(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_HSCALE))
|
||||
#define GTK_IS_HSCALE_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_HSCALE))
|
||||
|
||||
#define GTK_HSCALE_GET_CLASS(obj) (GTK_CHECK_GET_CLASS ((obj), GTK_TYPE_HSCALE, GtkHScaleClass))
|
||||
|
||||
|
||||
typedef struct _GtkHScale GtkHScale;
|
||||
|
||||
@@ -42,6 +42,7 @@ extern "C" {
|
||||
#define GTK_HSCROLLBAR_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_HSCROLLBAR, GtkHScrollbarClass))
|
||||
#define GTK_IS_HSCROLLBAR(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_HSCROLLBAR))
|
||||
#define GTK_IS_HSCROLLBAR_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_HSCROLLBAR))
|
||||
#define GTK_HSCROLLBAR_GET_CLASS(obj) (GTK_CHECK_GET_CLASS ((obj), GTK_TYPE_HSCROLLBAR, GtkHScrollbarClass))
|
||||
|
||||
|
||||
typedef struct _GtkHScrollbar GtkHScrollbar;
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user