Add a function to beep on a window. For X11, implement this with XkbBell.

2006-08-29  Matthias Clasen  <mclasen@redhat.com>

	* gdk/gdkwindow.h:
	* gdk/gdk.symbols:
	* gdk/directfb/gdkwindow-directfb.c (gdk_window_beep):
	* gdk/win32/gdkwindow-win32.c (gdk_window_beep):
	* gdk/quartz/gdkwindow-quartz.c (gdk_window_beep):
	* gdk/x11/gdkwindow-x11.c (gdk_window_beep): Add a function
	to beep on a window. For X11, implement this with
	XkbBell.  (#353455, Mariano Suárez-Alvarez)
This commit is contained in:
Matthias Clasen 2006-08-30 03:30:43 +00:00 committed by Matthias Clasen
parent 4e3d7dd088
commit 6760faeb4b
9 changed files with 64 additions and 0 deletions

View File

@ -1,3 +1,14 @@
2006-08-29 Matthias Clasen <mclasen@redhat.com>
* gdk/gdkwindow.h:
* gdk/gdk.symbols:
* gdk/directfb/gdkwindow-directfb.c (gdk_window_beep):
* gdk/win32/gdkwindow-win32.c (gdk_window_beep):
* gdk/quartz/gdkwindow-quartz.c (gdk_window_beep):
* gdk/x11/gdkwindow-x11.c (gdk_window_beep): Add a function
to beep on a window. For X11, implement this with
XkbBell. (#353455, Mariano Suárez-Alvarez)
2006-08-29 Tor Lillqvist <tml@novell.com>
Remove support for Windows 9x/ME. GTK+ hasn't worked on Win9x

View File

@ -1,3 +1,7 @@
2006-08-29 Matthias Clasen <mclasen@redhat.com>
* gdk/gdk-sections.txt: Add gdk_window_beep
2006-08-25 Matthias Clasen <mclasen@redhat.com>
* gtk/question_index.sgml: Rewrite the answer for

View File

@ -665,6 +665,7 @@ gdk_window_register_dnd
gdk_window_begin_resize_drag
gdk_window_begin_move_drag
gdk_window_constrain_size
gdk_window_beep
<SUBSECTION>
gdk_window_begin_paint_rect

View File

@ -2990,6 +2990,12 @@ gdk_window_impl_directfb_paintable_init (GdkPaintableIface *iface)
iface->process_updates = gdk_window_impl_directfb_process_updates;
}
void
gdk_window_beep (GdkWindow *window)
{
gdk_display_beep (GDK_WINDOW_DISPLAY (window));
}
#define __GDK_WINDOW_X11_C__
#include "gdkaliasdef.c"

View File

@ -738,6 +738,7 @@ gdk_window_set_focus_on_map
gdk_window_set_icon_list
gdk_window_set_icon
gdk_window_set_icon_name
gdk_window_beep
gdk_window_iconify
gdk_window_deiconify
gdk_window_stick

View File

@ -552,6 +552,7 @@ void gdk_window_set_functions (GdkWindow *window,
GList * gdk_window_get_toplevels (void);
#endif
void gdk_window_beep (GdkWindow *window);
void gdk_window_iconify (GdkWindow *window);
void gdk_window_deiconify (GdkWindow *window);
void gdk_window_stick (GdkWindow *window);

View File

@ -1993,3 +1993,9 @@ gdk_window_destroy_notify (GdkWindow *window)
* -[GdkQuartzView dealloc], although I suspect that currently they leak
* anyway. */
}
void
gdk_window_beep (GdkWindow *window)
{
gdk_display_beep (GDK_WINDOW_DISPLAY (window));
}

View File

@ -3397,3 +3397,9 @@ gdk_window_configure_finished (GdkWindow *window)
{
g_return_if_fail (GDK_IS_WINDOW (window));
}
void
gdk_window_beep (GdkWindow *window)
{
gdk_display_beep (GDK_WINDOW_DISPLAY (window));
}

View File

@ -29,6 +29,11 @@
#include <X11/Xlib.h>
#include <X11/Xutil.h>
#include <X11/Xatom.h>
#ifdef HAVE_XKB
#include <X11/XKBlib.h>
#endif
#include <netinet/in.h>
#include <unistd.h>
@ -6311,5 +6316,28 @@ gdk_window_configure_finished (GdkWindow *window)
#endif
}
/**
* gdk_window_beep:
* @window: a toplevel #GdkWindow
*
* Emits a short beep associated to @window in the appropriate
* display, if supported. Otherwise, emits a short beep on
* the display just as gdk_display_beep().
*
* Since: 2.12
**/
void
gdk_window_beep (GdkWindow *window)
{
#ifdef HAVE_XKB
XkbBell (GDK_WINDOW_XDISPLAY (window),
GDK_WINDOW_XID (window),
0,
None);
#else
gdk_display_beep (GDK_WINDOW_DISPLAY (window));
#endif
}
#define __GDK_WINDOW_X11_C__
#include "gdkaliasdef.c"