Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > media > contrib-release > by-pkgid > 1bbf51ece72e40a5f40ad48678e7c5a5 > files > 363

libgnome32-devel-1.4.2-22mdv2009.1.i586.rpm

<HTML
><HEAD
><TITLE
>gnome-triggers</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.74b"><LINK
REL="HOME"
TITLE="Gnome Library Reference Manual"
HREF="book1.html"><LINK
REL="UP"
TITLE="Gnome Library"
HREF="libgnome.html"><LINK
REL="PREVIOUS"
TITLE="gnome-sound"
HREF="gnome-gnome-sound.html"><LINK
REL="NEXT"
TITLE="gnome-url"
HREF="gnome-gnome-url.html"></HEAD
><BODY
CLASS="REFENTRY"
BGCOLOR="#FFFFFF"
TEXT="#000000"
LINK="#0000FF"
VLINK="#840084"
ALINK="#0000FF"
><DIV
CLASS="NAVHEADER"
><TABLE
WIDTH="100%"
BORDER="0"
BGCOLOR="#000000"
CELLPADDING="1"
CELLSPACING="0"
><TR
><TH
COLSPAN="4"
ALIGN="center"
><FONT
COLOR="#FFFFFF"
SIZE="5"
>Gnome Library Reference Manual</FONT
></TH
></TR
><TR
><TD
WIDTH="25%"
BGCOLOR="#C00000"
ALIGN="left"
><A
HREF="gnome-gnome-sound.html"
><FONT
COLOR="#FFFFFF"
SIZE="3"
><B
>&#60;&#60;&#60; Previous Page</B
></FONT
></A
></TD
><TD
WIDTH="25%"
BGCOLOR="#0000C0"
ALIGN="center"
><FONT
COLOR="#FFFFFF"
SIZE="3"
><B
><A
HREF="book1.html"
><FONT
COLOR="#FFFFFF"
SIZE="3"
><B
>Home</B
></FONT
></A
></B
></FONT
></TD
><TD
WIDTH="25%"
BGCOLOR="#00C000"
ALIGN="center"
><FONT
COLOR="#FFFFFF"
SIZE="3"
><B
><A
HREF="libgnome.html"
><FONT
COLOR="#FFFFFF"
SIZE="3"
><B
>Up</B
></FONT
></A
></B
></FONT
></TD
><TD
WIDTH="25%"
BGCOLOR="#C00000"
ALIGN="right"
><A
HREF="gnome-gnome-url.html"
><FONT
COLOR="#FFFFFF"
SIZE="3"
><B
>Next Page &#62;&#62;&#62;</B
></FONT
></A
></TD
></TR
></TABLE
></DIV
><H1
><A
NAME="GNOME-GNOME-TRIGGERS"
>gnome-triggers</A
></H1
><DIV
CLASS="REFNAMEDIV"
><A
NAME="AEN4141"
></A
><H2
>Name</H2
>gnome-triggers&nbsp;--&nbsp;Hierarchical signal mechanism for application events.</DIV
><DIV
CLASS="REFSYNOPSISDIV"
><A
NAME="AEN4144"
></A
><H2
>Synopsis</H2
><TABLE
BORDER="0"
BGCOLOR="#D6E8FF"
WIDTH="100%"
CELLPADDING="6"
><TR
><TD
><PRE
CLASS="SYNOPSIS"
>&#13;#include &lt;gnome.h&gt;


enum        <A
HREF="gnome-gnome-triggers.html#GNOMETRIGGERTYPE"
>GnomeTriggerType</A
>;
void        (<A
HREF="gnome-gnome-triggers.html#GNOMETRIGGERACTIONFUNCTION"
>*GnomeTriggerActionFunction</A
>)   (char *msg,
                                             char *level,
                                             char *supinfo[]);
struct      <A
HREF="gnome-gnome-triggers.html#GNOMETRIGGER"
>GnomeTrigger</A
>;
void        <A
HREF="gnome-gnome-triggers.html#GNOME-TRIGGERS-INIT"
>gnome_triggers_init</A
>             (void);
<GTKDOCLINK
HREF="GINT"
>gint</GTKDOCLINK
>        <A
HREF="gnome-gnome-triggers.html#GNOME-TRIGGERS-READFILE"
>gnome_triggers_readfile</A
>         (const char *infilename);
void        <A
HREF="gnome-gnome-triggers.html#GNOME-TRIGGERS-ADD-TRIGGER"
>gnome_triggers_add_trigger</A
>      (<A
HREF="gnome-gnome-triggers.html#GNOMETRIGGER"
>GnomeTrigger</A
> *nt,
                                             ...);
void        <A
HREF="gnome-gnome-triggers.html#GNOME-TRIGGERS-VADD-TRIGGER"
>gnome_triggers_vadd_trigger</A
>     (<A
HREF="gnome-gnome-triggers.html#GNOMETRIGGER"
>GnomeTrigger</A
> *nt,
                                             char *supinfo[]);
void        <A
HREF="gnome-gnome-triggers.html#GNOME-TRIGGERS-DO"
>gnome_triggers_do</A
>               (const char *msg,
                                             const char *level,
                                             ...);
void        <A
HREF="gnome-gnome-triggers.html#GNOME-TRIGGERS-VDO"
>gnome_triggers_vdo</A
>              (const char *msg,
                                             const char *level,
                                             const char *supinfo[]);</PRE
></TD
></TR
></TABLE
></DIV
><DIV
CLASS="REFSECT1"
><A
NAME="AEN4159"
></A
><H2
>Description</H2
><P
>The GNOME triggers API was intended to provide a general way for the
application to tell GNOME about "interesting events".  Most of it is
presently deprecated - at the present time, the application writer
should only use gnome_triggers_do and gnome_triggers_vdo for the purpose
of firing application sound events (in conjunction with .soundlist files).</P
><P
>Please see the "GNOME configuration files" white paper for more information
on .soundlist files.</P
></DIV
><DIV
CLASS="REFSECT1"
><A
NAME="AEN4163"
></A
><H2
>Details</H2
><DIV
CLASS="REFSECT2"
><A
NAME="AEN4165"
></A
><H3
><A
NAME="GNOMETRIGGERTYPE"
></A
>enum GnomeTriggerType</H3
><TABLE
BORDER="0"
BGCOLOR="#D6E8FF"
WIDTH="100%"
CELLPADDING="6"
><TR
><TD
><PRE
CLASS="PROGRAMLISTING"
>typedef enum {
	GTRIG_NONE,
	GTRIG_FUNCTION,
	GTRIG_COMMAND,
	GTRIG_MEDIAPLAY
}  GnomeTriggerType;</PRE
></TD
></TR
></TABLE
><P
>Deprecated.</P
></DIV
><HR><DIV
CLASS="REFSECT2"
><A
NAME="AEN4170"
></A
><H3
><A
NAME="GNOMETRIGGERACTIONFUNCTION"
></A
>GnomeTriggerActionFunction ()</H3
><TABLE
BORDER="0"
BGCOLOR="#D6E8FF"
WIDTH="100%"
CELLPADDING="6"
><TR
><TD
><PRE
CLASS="PROGRAMLISTING"
>void        (*GnomeTriggerActionFunction)   (char *msg,
                                             char *level,
                                             char *supinfo[]);</PRE
></TD
></TR
></TABLE
><P
>Deprecated.</P
><DIV
CLASS="INFORMALTABLE"
><A
NAME="AEN4175"
></A
><P
></P
><TABLE
BORDER="0"
WIDTH="100%"
BGCOLOR="#FFD0D0"
CELLSPACING="0"
CELLPADDING="4"
CLASS="CALSTABLE"
><TBODY
><TR
><TD
WIDTH="20%"
ALIGN="RIGHT"
VALIGN="TOP"
><TT
CLASS="PARAMETER"
><I
>msg</I
></TT
>&nbsp;:</TD
><TD
WIDTH="80%"
ALIGN="LEFT"
VALIGN="TOP"
>&nbsp;</TD
></TR
><TR
><TD
WIDTH="20%"
ALIGN="RIGHT"
VALIGN="TOP"
><TT
CLASS="PARAMETER"
><I
>level</I
></TT
>&nbsp;:</TD
><TD
WIDTH="80%"
ALIGN="LEFT"
VALIGN="TOP"
>&nbsp;</TD
></TR
><TR
><TD
WIDTH="20%"
ALIGN="RIGHT"
VALIGN="TOP"
><TT
CLASS="PARAMETER"
><I
>supinfo</I
></TT
>&nbsp;:</TD
><TD
WIDTH="80%"
ALIGN="LEFT"
VALIGN="TOP"
>&nbsp;</TD
></TR
></TBODY
></TABLE
><P
></P
></DIV
></DIV
><HR><DIV
CLASS="REFSECT2"
><A
NAME="AEN4192"
></A
><H3
><A
NAME="GNOMETRIGGER"
></A
>struct GnomeTrigger</H3
><TABLE
BORDER="0"
BGCOLOR="#D6E8FF"
WIDTH="100%"
CELLPADDING="6"
><TR
><TD
><PRE
CLASS="PROGRAMLISTING"
>struct GnomeTrigger {
	GnomeTriggerType type;
	union {
		/*
		 * These will be passed the same info as
		 * gnome_triggers_do got
		 */
		GnomeTriggerActionFunction function;
		gchar *command;
		struct {
			gchar *file;
			int cache_id;
		} media;
	} u;
        gchar *level;
};</PRE
></TD
></TR
></TABLE
><P
>Deprecated.</P
></DIV
><HR><DIV
CLASS="REFSECT2"
><A
NAME="AEN4197"
></A
><H3
><A
NAME="GNOME-TRIGGERS-INIT"
></A
>gnome_triggers_init ()</H3
><TABLE
BORDER="0"
BGCOLOR="#D6E8FF"
WIDTH="100%"
CELLPADDING="6"
><TR
><TD
><PRE
CLASS="PROGRAMLISTING"
>void        gnome_triggers_init             (void);</PRE
></TD
></TR
></TABLE
><P
>Deprecated.</P
></DIV
><HR><DIV
CLASS="REFSECT2"
><A
NAME="AEN4202"
></A
><H3
><A
NAME="GNOME-TRIGGERS-READFILE"
></A
>gnome_triggers_readfile ()</H3
><TABLE
BORDER="0"
BGCOLOR="#D6E8FF"
WIDTH="100%"
CELLPADDING="6"
><TR
><TD
><PRE
CLASS="PROGRAMLISTING"
><GTKDOCLINK
HREF="GINT"
>gint</GTKDOCLINK
>        gnome_triggers_readfile         (const char *infilename);</PRE
></TD
></TR
></TABLE
><P
>The file should be of the format:</P
><P
>level section type params</P
><P
>Where 'level' indicates the message severity at which this trigger
should be activated, 'section' is a colon-separated list indicating
which part of the "message classification tree" this trigger will
be activated for, 'type' is either "command" (run the command
specified in 'params') or 'play' (play the esd sound sample named
'params').</P
><P
>Deprecated.</P
><DIV
CLASS="INFORMALTABLE"
><A
NAME="AEN4211"
></A
><P
></P
><TABLE
BORDER="0"
WIDTH="100%"
BGCOLOR="#FFD0D0"
CELLSPACING="0"
CELLPADDING="4"
CLASS="CALSTABLE"
><TBODY
><TR
><TD
WIDTH="20%"
ALIGN="RIGHT"
VALIGN="TOP"
><TT
CLASS="PARAMETER"
><I
>infilename</I
></TT
>&nbsp;:</TD
><TD
WIDTH="80%"
ALIGN="LEFT"
VALIGN="TOP"
> A file listing triggers to install in the currently
running program.</TD
></TR
><TR
><TD
WIDTH="20%"
ALIGN="RIGHT"
VALIGN="TOP"
><SPAN
CLASS="emphasis"
><I
CLASS="EMPHASIS"
>Returns</I
></SPAN
> :</TD
><TD
WIDTH="80%"
ALIGN="LEFT"
VALIGN="TOP"
>0 on success.  1 otherwise.&#13;</TD
></TR
></TBODY
></TABLE
><P
></P
></DIV
></DIV
><HR><DIV
CLASS="REFSECT2"
><A
NAME="AEN4224"
></A
><H3
><A
NAME="GNOME-TRIGGERS-ADD-TRIGGER"
></A
>gnome_triggers_add_trigger ()</H3
><TABLE
BORDER="0"
BGCOLOR="#D6E8FF"
WIDTH="100%"
CELLPADDING="6"
><TR
><TD
><PRE
CLASS="PROGRAMLISTING"
>void        gnome_triggers_add_trigger      (<A
HREF="gnome-gnome-triggers.html#GNOMETRIGGER"
>GnomeTrigger</A
> *nt,
                                             ...);</PRE
></TD
></TR
></TABLE
><P
>Similar to <A
HREF="gnome-gnome-triggers.html#GNOME-TRIGGERS-READFILE"
>gnome_triggers_readfile</A
>(), but gets the trigger information
from the file 'nt' structure and the varargs, instead of from a file.</P
><P
>Deprecated.</P
><DIV
CLASS="INFORMALTABLE"
><A
NAME="AEN4232"
></A
><P
></P
><TABLE
BORDER="0"
WIDTH="100%"
BGCOLOR="#FFD0D0"
CELLSPACING="0"
CELLPADDING="4"
CLASS="CALSTABLE"
><TBODY
><TR
><TD
WIDTH="20%"
ALIGN="RIGHT"
VALIGN="TOP"
><TT
CLASS="PARAMETER"
><I
>nt</I
></TT
>&nbsp;:</TD
><TD
WIDTH="80%"
ALIGN="LEFT"
VALIGN="TOP"
> Information on the new trigger to be added.</TD
></TR
><TR
><TD
WIDTH="20%"
ALIGN="RIGHT"
VALIGN="TOP"
><TT
CLASS="PARAMETER"
><I
>...</I
></TT
>&nbsp;:</TD
><TD
WIDTH="80%"
ALIGN="LEFT"
VALIGN="TOP"
> the 'section' to add the trigger under (see <A
HREF="gnome-gnome-triggers.html#GNOME-TRIGGERS-READFILE"
>gnome_triggers_readfile</A
>())</TD
></TR
></TBODY
></TABLE
><P
></P
></DIV
></DIV
><HR><DIV
CLASS="REFSECT2"
><A
NAME="AEN4246"
></A
><H3
><A
NAME="GNOME-TRIGGERS-VADD-TRIGGER"
></A
>gnome_triggers_vadd_trigger ()</H3
><TABLE
BORDER="0"
BGCOLOR="#D6E8FF"
WIDTH="100%"
CELLPADDING="6"
><TR
><TD
><PRE
CLASS="PROGRAMLISTING"
>void        gnome_triggers_vadd_trigger     (<A
HREF="gnome-gnome-triggers.html#GNOMETRIGGER"
>GnomeTrigger</A
> *nt,
                                             char *supinfo[]);</PRE
></TD
></TR
></TABLE
><P
>Similar to <A
HREF="gnome-gnome-triggers.html#GNOME-TRIGGERS-READFILE"
>gnome_triggers_readfile</A
>(), but gets the trigger information
from the file 'nt' structure and 'supinfo', instead of from a file.</P
><P
>Deprecated.</P
><DIV
CLASS="INFORMALTABLE"
><A
NAME="AEN4254"
></A
><P
></P
><TABLE
BORDER="0"
WIDTH="100%"
BGCOLOR="#FFD0D0"
CELLSPACING="0"
CELLPADDING="4"
CLASS="CALSTABLE"
><TBODY
><TR
><TD
WIDTH="20%"
ALIGN="RIGHT"
VALIGN="TOP"
><TT
CLASS="PARAMETER"
><I
>nt</I
></TT
>&nbsp;:</TD
><TD
WIDTH="80%"
ALIGN="LEFT"
VALIGN="TOP"
> Information on the new trigger to be added.</TD
></TR
><TR
><TD
WIDTH="20%"
ALIGN="RIGHT"
VALIGN="TOP"
><TT
CLASS="PARAMETER"
><I
>supinfo</I
></TT
>&nbsp;:</TD
><TD
WIDTH="80%"
ALIGN="LEFT"
VALIGN="TOP"
> the 'section' to add the trigger under (see <A
HREF="gnome-gnome-triggers.html#GNOME-TRIGGERS-READFILE"
>gnome_triggers_readfile</A
>())</TD
></TR
></TBODY
></TABLE
><P
></P
></DIV
></DIV
><HR><DIV
CLASS="REFSECT2"
><A
NAME="AEN4268"
></A
><H3
><A
NAME="GNOME-TRIGGERS-DO"
></A
>gnome_triggers_do ()</H3
><TABLE
BORDER="0"
BGCOLOR="#D6E8FF"
WIDTH="100%"
CELLPADDING="6"
><TR
><TD
><PRE
CLASS="PROGRAMLISTING"
>void        gnome_triggers_do               (const char *msg,
                                             const char *level,
                                             ...);</PRE
></TD
></TR
></TABLE
><P
>Notifies GNOME about an event happening, so GNOME can do cool things.</P
><P
>This function tells the GNOME framework that an event has occurred inside 
the application that GNOME might be interested in.
Currently this is just used to trigger user-configurable sound events.</P
><DIV
CLASS="INFORMALTABLE"
><A
NAME="AEN4274"
></A
><P
></P
><TABLE
BORDER="0"
WIDTH="100%"
BGCOLOR="#FFD0D0"
CELLSPACING="0"
CELLPADDING="4"
CLASS="CALSTABLE"
><TBODY
><TR
><TD
WIDTH="20%"
ALIGN="RIGHT"
VALIGN="TOP"
><TT
CLASS="PARAMETER"
><I
>msg</I
></TT
>&nbsp;:</TD
><TD
WIDTH="80%"
ALIGN="LEFT"
VALIGN="TOP"
> The human-readable message describing the event. (Can be NULL).</TD
></TR
><TR
><TD
WIDTH="20%"
ALIGN="RIGHT"
VALIGN="TOP"
><TT
CLASS="PARAMETER"
><I
>level</I
></TT
>&nbsp;:</TD
><TD
WIDTH="80%"
ALIGN="LEFT"
VALIGN="TOP"
> The level of severity of the event, or NULL.</TD
></TR
><TR
><TD
WIDTH="20%"
ALIGN="RIGHT"
VALIGN="TOP"
><TT
CLASS="PARAMETER"
><I
>...</I
></TT
>&nbsp;:</TD
><TD
WIDTH="80%"
ALIGN="LEFT"
VALIGN="TOP"
> The classification of the event.</TD
></TR
></TBODY
></TABLE
><P
></P
></DIV
></DIV
><HR><DIV
CLASS="REFSECT2"
><A
NAME="AEN4291"
></A
><H3
><A
NAME="GNOME-TRIGGERS-VDO"
></A
>gnome_triggers_vdo ()</H3
><TABLE
BORDER="0"
BGCOLOR="#D6E8FF"
WIDTH="100%"
CELLPADDING="6"
><TR
><TD
><PRE
CLASS="PROGRAMLISTING"
>void        gnome_triggers_vdo              (const char *msg,
                                             const char *level,
                                             const char *supinfo[]);</PRE
></TD
></TR
></TABLE
><P
>Notifies GNOME about an event happening, so GNOME can do cool things.</P
><P
>This function is the same as gnome_triggers_do, except the supinfo is
passed as an array of strings, rather than as a variable number of
arguments.</P
><DIV
CLASS="INFORMALTABLE"
><A
NAME="AEN4297"
></A
><P
></P
><TABLE
BORDER="0"
WIDTH="100%"
BGCOLOR="#FFD0D0"
CELLSPACING="0"
CELLPADDING="4"
CLASS="CALSTABLE"
><TBODY
><TR
><TD
WIDTH="20%"
ALIGN="RIGHT"
VALIGN="TOP"
><TT
CLASS="PARAMETER"
><I
>msg</I
></TT
>&nbsp;:</TD
><TD
WIDTH="80%"
ALIGN="LEFT"
VALIGN="TOP"
> The human-readable message describing the event. (Can be NULL).</TD
></TR
><TR
><TD
WIDTH="20%"
ALIGN="RIGHT"
VALIGN="TOP"
><TT
CLASS="PARAMETER"
><I
>level</I
></TT
>&nbsp;:</TD
><TD
WIDTH="80%"
ALIGN="LEFT"
VALIGN="TOP"
> The level of severity of the event, or NULL.</TD
></TR
><TR
><TD
WIDTH="20%"
ALIGN="RIGHT"
VALIGN="TOP"
><TT
CLASS="PARAMETER"
><I
>supinfo</I
></TT
>&nbsp;:</TD
><TD
WIDTH="80%"
ALIGN="LEFT"
VALIGN="TOP"
> The classification of the event (NULL terminated array).</TD
></TR
></TBODY
></TABLE
><P
></P
></DIV
></DIV
></DIV
><DIV
CLASS="NAVFOOTER"
><BR
CLEAR="all"><BR><TABLE
WIDTH="100%"
BORDER="0"
BGCOLOR="#000000"
CELLPADDING="1"
CELLSPACING="0"
><TR
><TD
WIDTH="25%"
BGCOLOR="#C00000"
ALIGN="left"
><A
HREF="gnome-gnome-sound.html"
><FONT
COLOR="#FFFFFF"
SIZE="3"
><B
>&#60;&#60;&#60; Previous Page</B
></FONT
></A
></TD
><TD
WIDTH="25%"
BGCOLOR="#0000C0"
ALIGN="center"
><FONT
COLOR="#FFFFFF"
SIZE="3"
><B
><A
HREF="book1.html"
><FONT
COLOR="#FFFFFF"
SIZE="3"
><B
>Home</B
></FONT
></A
></B
></FONT
></TD
><TD
WIDTH="25%"
BGCOLOR="#00C000"
ALIGN="center"
><FONT
COLOR="#FFFFFF"
SIZE="3"
><B
><A
HREF="libgnome.html"
><FONT
COLOR="#FFFFFF"
SIZE="3"
><B
>Up</B
></FONT
></A
></B
></FONT
></TD
><TD
WIDTH="25%"
BGCOLOR="#C00000"
ALIGN="right"
><A
HREF="gnome-gnome-url.html"
><FONT
COLOR="#FFFFFF"
SIZE="3"
><B
>Next Page &#62;&#62;&#62;</B
></FONT
></A
></TD
></TR
><TR
><TD
COLSPAN="2"
ALIGN="left"
><FONT
COLOR="#FFFFFF"
SIZE="3"
><B
>gnome-sound</B
></FONT
></TD
><TD
COLSPAN="2"
ALIGN="right"
><FONT
COLOR="#FFFFFF"
SIZE="3"
><B
>gnome-url</B
></FONT
></TD
></TR
></TABLE
></DIV
></BODY
></HTML
>