Commit 6760faeb authored by Matthias Clasen's avatar Matthias Clasen Committed by Matthias Clasen
Browse files

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)
parent 4e3d7dd0
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
......
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
......
......@@ -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
......
......@@ -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"
......@@ -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
......
......@@ -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);
......
......@@ -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));
}
......@@ -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));
}
......@@ -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"
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment