Blame gtkdoc/html/libcanberra-canberra-gtk.html

Packit 3ae693
Packit 3ae693
<html>
Packit 3ae693
<head>
Packit 3ae693
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
Packit 3ae693
<title>canberra-gtk</title>
Packit 3ae693
<meta name="generator" content="DocBook XSL Stylesheets V1.77.1">
Packit 3ae693
<link rel="home" href="index.html" title="libcanberra Reference Manual">
Packit 3ae693
<link rel="up" href="ch01.html" title="libcanberra">
Packit 3ae693
<link rel="prev" href="libcanberra-canberra.html" title="canberra">
Packit 3ae693
<meta name="generator" content="GTK-Doc V1.18 (XML mode)">
Packit 3ae693
<link rel="stylesheet" href="style.css" type="text/css">
Packit 3ae693
</head>
Packit 3ae693
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
Packit 3ae693
Packit 3ae693
Packit 3ae693
Prev
Packit 3ae693
Up
Packit 3ae693
Home
Packit 3ae693
libcanberra Reference Manual
Packit 3ae693
 
Packit 3ae693
Packit 3ae693
Packit 3ae693
Top
Packit 3ae693
                   | 
Packit 3ae693
                  Description
Packit 3ae693
Packit 3ae693
Packit 3ae693
Packit 3ae693
Packit 3ae693
Packit 3ae693
Packit 3ae693

canberra-gtk

Packit 3ae693

canberra-gtk — Gtk+ libcanberra Bindings

Packit 3ae693
Packit 3ae693
Packit 3ae693
Packit 3ae693
Packit 3ae693

Synopsis

Packit 3ae693
ca_context *        ca_gtk_context_get                  (void);
Packit 3ae693
int                 ca_gtk_proplist_set_for_widget      (ca_proplist *p,
Packit 3ae693
                                                         GtkWidget *w);
Packit 3ae693
int                 ca_gtk_play_for_widget              (GtkWidget *w,
Packit 3ae693
                                                         uint32_t id,
Packit 3ae693
                                                         ...);
Packit 3ae693
int                 ca_gtk_proplist_set_for_event       (ca_proplist *p,
Packit 3ae693
                                                         GdkEvent *e);
Packit 3ae693
int                 ca_gtk_play_for_event               (GdkEvent *e,
Packit 3ae693
                                                         uint32_t id,
Packit 3ae693
                                                         ...);
Packit 3ae693
void                ca_gtk_widget_disable_sounds        (GtkWidget *w,
Packit 3ae693
                                                         gboolean enable);
Packit 3ae693
Packit 3ae693
Packit 3ae693
Packit 3ae693

Description

Packit 3ae693

Packit 3ae693
libcanberra-gtk provides a few functions that simplify libcanberra
Packit 3ae693
usage from Gtk+ programs. It maintains a single ca_context object
Packit 3ae693
per GdkScreen that is made accessible via
Packit 3ae693
ca_gtk_context_get_for_screen(), with a shortcut ca_gtk_context_get()
Packit 3ae693
to get the context for the default screen. More importantly, it provides
Packit 3ae693
a few functions
Packit 3ae693
to compile event sound property lists based on GtkWidget objects or
Packit 3ae693
GdkEvent events.
Packit 3ae693

Packit 3ae693
Packit 3ae693
Packit 3ae693

Details

Packit 3ae693
Packit 3ae693

ca_gtk_context_get ()

Packit 3ae693
ca_context *        ca_gtk_context_get                  (void);
Packit 3ae693

Packit 3ae693
Gets the single ca_context object for the default screen. See
Packit 3ae693
ca_gtk_context_get_for_screen().
Packit 3ae693

Packit 3ae693
Packit 3ae693
Packit 3ae693
Packit 3ae693
Packit 3ae693
Packit 3ae693
Packit 3ae693

Returns :

Packit 3ae693
a ca_context object. The object is owned by libcanberra-gtk
Packit 3ae693
and must not be destroyed
Packit 3ae693
Packit 3ae693
Packit 3ae693
Packit 3ae693

Packit 3ae693
Packit 3ae693

ca_gtk_proplist_set_for_widget ()

Packit 3ae693
int                 ca_gtk_proplist_set_for_widget      (ca_proplist *p,
Packit 3ae693
                                                         GtkWidget *w);
Packit 3ae693

Packit 3ae693
Fill in a ca_proplist object for a sound event that shall originate
Packit 3ae693
from the specified Gtk Widget. This will fill in properties like
Packit 3ae693
CA_PROP_WINDOW_NAME or CA_PROP_WINDOW_X11_DISPLAY for you.
Packit 3ae693

Packit 3ae693
Packit 3ae693
Packit 3ae693
Packit 3ae693
Packit 3ae693
Packit 3ae693
Packit 3ae693
Packit 3ae693

p :

Packit 3ae693
The proplist to store these sound event properties in
Packit 3ae693
Packit 3ae693
Packit 3ae693

w :

Packit 3ae693
The Gtk widget to base these sound event properties on
Packit 3ae693
Packit 3ae693
Packit 3ae693

Returns :

Packit 3ae693
0 on success, negative error code on error.
Packit 3ae693
Packit 3ae693
Packit 3ae693
Packit 3ae693
Packit 3ae693

Packit 3ae693
Packit 3ae693

ca_gtk_play_for_widget ()

Packit 3ae693
int                 ca_gtk_play_for_widget              (GtkWidget *w,
Packit 3ae693
                                                         uint32_t id,
Packit 3ae693
                                                         ...);
Packit 3ae693

Packit 3ae693
Play a sound event for the specified widget. This will internally
Packit 3ae693
call ca_gtk_proplist_set_for_widget() and then merge them with the
Packit 3ae693
properties passed in via the NULL terminated argument
Packit 3ae693
list. Finally, it will call ca_context_play_full() to actually play
Packit 3ae693
the event sound.
Packit 3ae693

Packit 3ae693
Packit 3ae693
Packit 3ae693
Packit 3ae693
Packit 3ae693
Packit 3ae693
Packit 3ae693
Packit 3ae693

w :

Packit 3ae693
The Gtk widget to base these sound event properties on
Packit 3ae693
Packit 3ae693
Packit 3ae693

id :

Packit 3ae693
The event id that can later be used to cancel this event sound
Packit 3ae693
using ca_context_cancel(). This can be any integer and shall be
Packit 3ae693
chosen be the client program. It is a good idea to pass 0 here if
Packit 3ae693
cancelling the sound later is not needed. If the same id is passed
Packit 3ae693
to multiple sounds they can be canceled with a single
Packit 3ae693
ca_context_cancel() call.
Packit 3ae693
Packit 3ae693
Packit 3ae693

... :

Packit 3ae693
additional event properties as pairs of strings, terminated by NULL.
Packit 3ae693
Packit 3ae693
Packit 3ae693

Returns :

Packit 3ae693
0 on success, negative error code on error.
Packit 3ae693
Packit 3ae693
Packit 3ae693
Packit 3ae693
Packit 3ae693

Packit 3ae693
Packit 3ae693

ca_gtk_proplist_set_for_event ()

Packit 3ae693
int                 ca_gtk_proplist_set_for_event       (ca_proplist *p,
Packit 3ae693
                                                         GdkEvent *e);
Packit 3ae693

Packit 3ae693
Fill in a ca_proplist object for a sound event that is being
Packit 3ae693
triggered by the specified Gdk Event. This will fill in properties
Packit 3ae693
like CA_PROP_EVENT_MOUSE_X or CA_PROP_EVENT_MOUSE_BUTTON for
Packit 3ae693
you. This will internally also cal ca_gtk_proplist_set_for_widget()
Packit 3ae693
on the widget this event belongs to.
Packit 3ae693

Packit 3ae693
Packit 3ae693
Packit 3ae693
Packit 3ae693
Packit 3ae693
Packit 3ae693
Packit 3ae693
Packit 3ae693

p :

Packit 3ae693
The proplist to store these sound event properties in
Packit 3ae693
Packit 3ae693
Packit 3ae693

e :

Packit 3ae693
The Gdk event to base these sound event properties on
Packit 3ae693
Packit 3ae693
Packit 3ae693

Returns :

Packit 3ae693
0 on success, negative error code on error.
Packit 3ae693
Packit 3ae693
Packit 3ae693
Packit 3ae693
Packit 3ae693

Packit 3ae693
Packit 3ae693

ca_gtk_play_for_event ()

Packit 3ae693
int                 ca_gtk_play_for_event               (GdkEvent *e,
Packit 3ae693
                                                         uint32_t id,
Packit 3ae693
                                                         ...);
Packit 3ae693

Packit 3ae693
Play a sound event for the specified event. This will internally
Packit 3ae693
call ca_gtk_proplist_set_for_event() and then merge them with the
Packit 3ae693
properties passed in via the NULL terminated argument
Packit 3ae693
list. Finally, it will call ca_context_play_full() to actually play
Packit 3ae693
the event sound.
Packit 3ae693

Packit 3ae693
Packit 3ae693
Packit 3ae693
Packit 3ae693
Packit 3ae693
Packit 3ae693
Packit 3ae693
Packit 3ae693

e :

Packit 3ae693
The Gdk event to base these sound event properties on
Packit 3ae693
Packit 3ae693
Packit 3ae693

id :

Packit 3ae693
The event id that can later be used to cancel this event sound
Packit 3ae693
using ca_context_cancel(). This can be any integer and shall be
Packit 3ae693
chosen be the client program. It is a good idea to pass 0 here if
Packit 3ae693
cancelling the sound later is not needed. If the same id is passed
Packit 3ae693
to multiple sounds they can be canceled with a single
Packit 3ae693
ca_context_cancel() call.
Packit 3ae693
Packit 3ae693
Packit 3ae693

... :

Packit 3ae693
additional event properties as pairs of strings, terminated by NULL.
Packit 3ae693
Packit 3ae693
Packit 3ae693

Returns :

Packit 3ae693
0 on success, negative error code on error.
Packit 3ae693
Packit 3ae693
Packit 3ae693
Packit 3ae693
Packit 3ae693

Packit 3ae693
Packit 3ae693

ca_gtk_widget_disable_sounds ()

Packit 3ae693
void                ca_gtk_widget_disable_sounds        (GtkWidget *w,
Packit 3ae693
                                                         gboolean enable);
Packit 3ae693

Packit 3ae693
By default sound events are automatically generated for all kinds
Packit 3ae693
of input events. Use this function to disable this. This is
Packit 3ae693
intended to be used for widgets which directly generate sound
Packit 3ae693
events.
Packit 3ae693

Packit 3ae693
Packit 3ae693
Packit 3ae693
Packit 3ae693
Packit 3ae693
Packit 3ae693
Packit 3ae693
Packit 3ae693

w :

Packit 3ae693
The Gtk widget to disable automatic event sounds for.
Packit 3ae693
Packit 3ae693
Packit 3ae693

enable :

Packit 3ae693
Boolean specifying whether sound events shall be enabled or disabled for this widget.
Packit 3ae693
Packit 3ae693
Packit 3ae693
Packit 3ae693
Packit 3ae693
Packit 3ae693
Packit 3ae693
Packit 3ae693

Packit 3ae693
          Generated by GTK-Doc V1.18
Packit 3ae693
</body>
Packit 3ae693
</html>