diff options
author | Alexander Larsson <alexl@redhat.com> | 2006-04-21 15:09:32 +0000 |
---|---|---|
committer | Alexander Larsson <alexl@src.gnome.org> | 2006-04-21 15:09:32 +0000 |
commit | 27f746fbd0e56872a8d3b4bfff2588ad0b7cd7c4 (patch) | |
tree | dcf0769596bd36a76b7dcea7eed46b378a634f72 /gdk/win32 | |
parent | ea32742b93348e1ce47cd92a26afe5317b37dd73 (diff) | |
download | gtk+-27f746fbd0e56872a8d3b4bfff2588ad0b7cd7c4.tar.gz |
Merge the gtk-printing branch. For more detailed ChangeLog entries, see
2006-04-21 Alexander Larsson <alexl@redhat.com>
Merge the gtk-printing branch.
For more detailed ChangeLog entries, see the branch.
* .cvsignore:
* Makefile.am:
* configure.in:
* docs/tools/widgets.c:
* gtk+-unix-print-2.0.pc.in:
* gtk/Makefile.am:
* gtk/gen-paper-names.c:
* gtk/gtk.h:
* gtk/gtk.symbols:
* gtk/gtkenums.h:
* gtk/gtkiconfactory.c:
* gtk/gtkmarshalers.list:
* gtk/gtkpagesetup.[ch]:
* gtk/gtkpagesetupunixdialog.[ch]:
* gtk/gtkpapersize.[ch]:
* gtk/gtkprint-win32.[ch]:
* gtk/gtkprintbackend.[ch]:
* gtk/gtkprintcontext.[ch]:
* gtk/gtkprinter-private.h:
* gtk/gtkprinter.[ch]:
* gtk/gtkprinteroption.[ch]:
* gtk/gtkprinteroptionset.[ch]:
* gtk/gtkprinteroptionwidget.[ch]:
* gtk/gtkprintjob.[ch]:
* gtk/gtkprintoperation-private.h:
* gtk/gtkprintoperation-unix.c:
* gtk/gtkprintoperation-win32.c:
* gtk/gtkprintoperation.[ch]:
* gtk/gtkprintsettings.[ch]:
* gtk/gtkprintunixdialog.[ch]:
* gtk/paper_names.c:
* gtk/paper_names_offsets.c:
Platform independent printing API and implementations
for unix and windows.
* gtk/gtkstock.h:
* gtk/stock-icons/24/gtk-orientation-landscape.png:
* gtk/stock-icons/24/gtk-orientation-portrait.png:
* gtk/stock-icons/24/gtk-orientation-reverse-landscape.png:
Add stock icons for page orientation.
* modules/Makefile.am:
* modules/printbackends/Makefile.am:
* modules/printbackends/cups/Makefile.am:
* modules/printbackends/cups/gtkcupsutils.[ch]:
* modules/printbackends/cups/gtkprintbackendcups.[ch]:
* modules/printbackends/cups/gtkprintercups.[ch]:
Cups printing backend for unix.
* modules/printbackends/lpr/Makefile.am:
* modules/printbackends/lpr/gtkprintbackendlpr.[ch]:
lpr printing backend for unix.
* modules/printbackends/pdf/Makefile.am:
* modules/printbackends/pdf/gtkprintbackendpdf.[ch]:
print-to-pdf printing backend for unix.
* tests/.cvsignore:
* tests/Makefile.am:
* tests/print-editor.c:
Test application for printing.
* gdk/gdk.symbols:
* gdk/win32/gdkevents-win32.c:
* gdk/win32/gdkwin32.h:
Add gdk_win32_set_modal_dialog_libgtk_only so that we can pump the
mainloop while displaying a win32 common dialog.
* gdk/directfb/Makefile.am:
Whitespace cleanup.
Diffstat (limited to 'gdk/win32')
-rw-r--r-- | gdk/win32/gdkevents-win32.c | 25 | ||||
-rw-r--r-- | gdk/win32/gdkwin32.h | 1 |
2 files changed, 23 insertions, 3 deletions
diff --git a/gdk/win32/gdkevents-win32.c b/gdk/win32/gdkevents-win32.c index f241943cb9..3683bc3a57 100644 --- a/gdk/win32/gdkevents-win32.c +++ b/gdk/win32/gdkevents-win32.c @@ -144,6 +144,9 @@ static gint current_root_x, current_root_y; static UINT msh_mousewheel; static UINT client_message; +static UINT got_gdk_events_message; +static HWND modal_win32_dialog = NULL; + #ifdef HAVE_DIMM_H static IActiveIMMApp *active_imm_app = NULL; static IActiveIMMMessagePumpOwner *active_imm_msgpump_owner = NULL; @@ -281,6 +284,9 @@ inner_window_procedure (HWND hwnd, /* If gdk_event_translate() returns TRUE, we return ret_val from * the window procedure. */ + if (modal_win32_dialog) + PostMessage (modal_win32_dialog, got_gdk_events_message, + (WPARAM) 1, 0); return ret_val; } else @@ -379,6 +385,7 @@ _gdk_events_init (void) msh_mousewheel = RegisterWindowMessage ("MSWHEEL_ROLLMSG"); client_message = RegisterWindowMessage ("GDK_WIN32_CLIENT_MESSAGE"); + got_gdk_events_message = RegisterWindowMessage ("GDK_WIN32_GOT_EVENTS"); #if 0 /* Check if we have some input locale identifier loaded that uses a @@ -463,7 +470,8 @@ gdk_events_pending (void) { MSG msg; return (_gdk_event_queue_find_first (_gdk_display) || - PeekMessage (&msg, NULL, 0, 0, PM_NOREMOVE)); + (modal_win32_dialog == NULL && + PeekMessage (&msg, NULL, 0, 0, PM_NOREMOVE))); } GdkEvent* @@ -3516,6 +3524,9 @@ _gdk_events_queue (GdkDisplay *display) { MSG msg; + if (modal_win32_dialog != NULL) + return; + while (!_gdk_event_queue_find_first (display) && PeekMessage (&msg, NULL, 0, 0, PM_REMOVE)) { @@ -3536,7 +3547,8 @@ gdk_event_prepare (GSource *source, *timeout = -1; retval = (_gdk_event_queue_find_first (_gdk_display) != NULL || - PeekMessage (&msg, NULL, 0, 0, PM_NOREMOVE)); + (modal_win32_dialog == NULL && + PeekMessage (&msg, NULL, 0, 0, PM_NOREMOVE))); GDK_THREADS_LEAVE (); @@ -3553,7 +3565,8 @@ gdk_event_check (GSource *source) if (event_poll_fd.revents & G_IO_IN) retval = (_gdk_event_queue_find_first (_gdk_display) != NULL || - PeekMessage (&msg, NULL, 0, 0, PM_NOREMOVE)); + (modal_win32_dialog == NULL && + PeekMessage (&msg, NULL, 0, 0, PM_NOREMOVE))); else retval = FALSE; @@ -3587,6 +3600,12 @@ gdk_event_dispatch (GSource *source, return TRUE; } +void +gdk_win32_set_modal_dialog_libgtk_only (HWND window) +{ + modal_win32_dialog = window; +} + static void check_for_too_much_data (GdkEvent *event) { diff --git a/gdk/win32/gdkwin32.h b/gdk/win32/gdkwin32.h index 37e6cbc762..1e79ce94cb 100644 --- a/gdk/win32/gdkwin32.h +++ b/gdk/win32/gdkwin32.h @@ -87,6 +87,7 @@ void gdk_win32_selection_add_targets (GdkWindow *owner, /* For internal GTK use only */ GdkPixbuf * gdk_win32_icon_to_pixbuf_libgtk_only (HICON hicon); HICON gdk_win32_pixbuf_to_hicon_libgtk_only (GdkPixbuf *pixbuf); +void gdk_win32_set_modal_dialog_libgtk_only (HWND window); G_END_DECLS |