URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Subversion Repositories openrisc
[/] [openrisc/] [trunk/] [rtos/] [ecos-2.0/] [packages/] [services/] [gfx/] [mw/] [v2_0/] [doc/] [nano-X/] [html/] [nano-x-general.html] - Rev 174
Compare with Previous | Blame | View Log
<HTML ><HEAD ><TITLE >general</TITLE ><META NAME="GENERATOR" CONTENT="Modular DocBook HTML Stylesheet Version 1.33"><LINK REL="HOME" TITLE="Nano-X API Reference Manual" HREF="index.html"><LINK REL="UP" TITLE="libnano-X" HREF="libnano-x.html"><LINK REL="PREVIOUS" TITLE="libnano-X" HREF="libnano-x.html"><LINK REL="NEXT" TITLE="window" HREF="nano-x-window.html"></HEAD ><BODY BGCOLOR="#FFFFFF" TEXT="#000000" ><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" >Nano-X API Reference Manual</FONT ></TH ></TR ><TR ><TD WIDTH="25%" BGCOLOR="#C00000" ALIGN="left" ><A HREF="libnano-x.html" ><FONT COLOR="#FFFFFF" SIZE="3" ><B ><<< Previous Page</B ></FONT ></A ></TD ><TD WIDTH="25%" BGCOLOR="#0000C0" ALIGN="center" ><FONT COLOR="#FFFFFF" SIZE="3" ><B ><A HREF="index.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="libnano-x.html" ><FONT COLOR="#FFFFFF" SIZE="3" ><B >Up</B ></FONT ></A ></B ></FONT ></TD ><TD WIDTH="25%" BGCOLOR="#C00000" ALIGN="right" ><A HREF="nano-x-window.html" ><FONT COLOR="#FFFFFF" SIZE="3" ><B >Next Page >>></B ></FONT ></A ></TD ></TR ></TABLE ></DIV ><H1 >general</H1 ><DIV CLASS="REFNAMEDIV" ><A NAME="AEN11" ></A ><H2 >Name</H2 >general — </DIV ><DIV CLASS="REFSYNOPSISDIV" ><A NAME="AEN14" ></A ><H2 >Synopsis</H2 ><TABLE BORDER="0" BGCOLOR="#D6E8FF" WIDTH="100%" CELLPADDING="6" ><TR ><TD ><PRE CLASS="SYNOPSIS" > void <A HREF="nano-x-general.html#GRFLUSH" >GrFlush</A > (void); int <A HREF="nano-x-general.html#GROPEN" >GrOpen</A > (void); void <A HREF="nano-x-general.html#GRCLOSE" >GrClose</A > (void); void <A HREF="nano-x-general.html#GRMAINLOOP" >GrMainLoop</A > (<GTKDOCLINK HREF="GR-FNCALLBACKEVENT-CAPS" >GR_FNCALLBACKEVENT</GTKDOCLINK > fncb); void <A HREF="nano-x-general.html#GRGETSCREENINFO" >GrGetScreenInfo</A > (<GTKDOCLINK HREF="GR-SCREEN-INFO-CAPS" >GR_SCREEN_INFO</GTKDOCLINK > *sip); <GTKDOCLINK HREF="GR-FNCALLBACKEVENT-CAPS" >GR_FNCALLBACKEVENT</GTKDOCLINK > <A HREF="nano-x-general.html#GRSETERRORHANDLER" >GrSetErrorHandler</A > (<GTKDOCLINK HREF="GR-FNCALLBACKEVENT-CAPS" >GR_FNCALLBACKEVENT</GTKDOCLINK > fncb); void <A HREF="nano-x-general.html#GRDEFAULTERRORHANDLER" >GrDefaultErrorHandler</A > (<GTKDOCLINK HREF="GR-EVENT-CAPS" >GR_EVENT</GTKDOCLINK > *ep);</PRE ></TD ></TR ></TABLE ></DIV ><DIV CLASS="REFSECT1" ><A NAME="AEN29" ></A ><H2 >Description</H2 ><P ></P ></DIV ><DIV CLASS="REFSECT1" ><A NAME="AEN32" ></A ><H2 >Details</H2 ><DIV CLASS="REFSECT2" ><A NAME="AEN34" ></A ><H3 ><A NAME="GRFLUSH" ></A >GrFlush ()</H3 ><TABLE BORDER="0" BGCOLOR="#D6E8FF" WIDTH="100%" CELLPADDING="6" ><TR ><TD ><PRE CLASS="PROGRAMLISTING" >void GrFlush (void);</PRE ></TD ></TR ></TABLE ><P >Flush the message buffer of any messages it may contain.</P ><P ></P ></DIV ><HR><DIV CLASS="REFSECT2" ><A NAME="AEN40" ></A ><H3 ><A NAME="GROPEN" ></A >GrOpen ()</H3 ><TABLE BORDER="0" BGCOLOR="#D6E8FF" WIDTH="100%" CELLPADDING="6" ><TR ><TD ><PRE CLASS="PROGRAMLISTING" >int GrOpen (void);</PRE ></TD ></TR ></TABLE ><P >Open a connection to the graphics server.</P ><P ></P ><DIV CLASS="INFORMALTABLE" ><P ></P ><TABLE BORDER="0" WIDTH="100%" BGCOLOR="#FFD0D0" CELLSPACING="0" CELLPADDING="4" CLASS="CALSTABLE" ><TR ><TD WIDTH="20%" ALIGN="RIGHT" VALIGN="TOP" ><I CLASS="EMPHASIS" >Returns</I > :</TD ><TD WIDTH="80%" ALIGN="LEFT" VALIGN="TOP" > the fd of the connection to the server or -1 on failure</TD ></TR ></TABLE ><P ></P ></DIV ></DIV ><HR><DIV CLASS="REFSECT2" ><A NAME="AEN55" ></A ><H3 ><A NAME="GRCLOSE" ></A >GrClose ()</H3 ><TABLE BORDER="0" BGCOLOR="#D6E8FF" WIDTH="100%" CELLPADDING="6" ><TR ><TD ><PRE CLASS="PROGRAMLISTING" >void GrClose (void);</PRE ></TD ></TR ></TABLE ><P >Close the graphics device, flushing any waiting messages.</P ><P ></P ></DIV ><HR><DIV CLASS="REFSECT2" ><A NAME="AEN61" ></A ><H3 ><A NAME="GRMAINLOOP" ></A >GrMainLoop ()</H3 ><TABLE BORDER="0" BGCOLOR="#D6E8FF" WIDTH="100%" CELLPADDING="6" ><TR ><TD ><PRE CLASS="PROGRAMLISTING" >void GrMainLoop (<GTKDOCLINK HREF="GR-FNCALLBACKEVENT-CAPS" >GR_FNCALLBACKEVENT</GTKDOCLINK > fncb);</PRE ></TD ></TR ></TABLE ><P >A convenience function which calls the specified callback function whenever an event arrives or there is data to be read on a file descriptor previously specified by <A HREF="nano-x-misc.html#GRREGISTERINPUT" >GrRegisterInput</A >(). Currently never returns.</P ><P ></P ><DIV CLASS="INFORMALTABLE" ><P ></P ><TABLE BORDER="0" WIDTH="100%" BGCOLOR="#FFD0D0" CELLSPACING="0" CELLPADDING="4" CLASS="CALSTABLE" ><TR ><TD WIDTH="20%" ALIGN="RIGHT" VALIGN="TOP" ><TT CLASS="PARAMETER" ><I >fncb</I ></TT > :</TD ><TD WIDTH="80%" ALIGN="LEFT" VALIGN="TOP" > </TD ></TR ></TABLE ><P ></P ></DIV ></DIV ><HR><DIV CLASS="REFSECT2" ><A NAME="AEN78" ></A ><H3 ><A NAME="GRGETSCREENINFO" ></A >GrGetScreenInfo ()</H3 ><TABLE BORDER="0" BGCOLOR="#D6E8FF" WIDTH="100%" CELLPADDING="6" ><TR ><TD ><PRE CLASS="PROGRAMLISTING" >void GrGetScreenInfo (<GTKDOCLINK HREF="GR-SCREEN-INFO-CAPS" >GR_SCREEN_INFO</GTKDOCLINK > *sip);</PRE ></TD ></TR ></TABLE ><P >Fills in the specified GR_SCREEN_INFO structure.</P ><P ></P ><DIV CLASS="INFORMALTABLE" ><P ></P ><TABLE BORDER="0" WIDTH="100%" BGCOLOR="#FFD0D0" CELLSPACING="0" CELLPADDING="4" CLASS="CALSTABLE" ><TR ><TD WIDTH="20%" ALIGN="RIGHT" VALIGN="TOP" ><TT CLASS="PARAMETER" ><I >sip</I ></TT > :</TD ><TD WIDTH="80%" ALIGN="LEFT" VALIGN="TOP" > pointer to a GR_SCREEN_INFO structure</TD ></TR ></TABLE ><P ></P ></DIV ></DIV ><HR><DIV CLASS="REFSECT2" ><A NAME="AEN94" ></A ><H3 ><A NAME="GRSETERRORHANDLER" ></A >GrSetErrorHandler ()</H3 ><TABLE BORDER="0" BGCOLOR="#D6E8FF" WIDTH="100%" CELLPADDING="6" ><TR ><TD ><PRE CLASS="PROGRAMLISTING" ><GTKDOCLINK HREF="GR-FNCALLBACKEVENT-CAPS" >GR_FNCALLBACKEVENT</GTKDOCLINK > GrSetErrorHandler (<GTKDOCLINK HREF="GR-FNCALLBACKEVENT-CAPS" >GR_FNCALLBACKEVENT</GTKDOCLINK > fncb);</PRE ></TD ></TR ></TABLE ><P >Sets an error handling routine that will be called on any errors from the server (assuming the client has asked to receive them). If zero is used as the argument, errors will be returned as regular events instead.</P ><P ></P ><DIV CLASS="INFORMALTABLE" ><P ></P ><TABLE BORDER="0" WIDTH="100%" BGCOLOR="#FFD0D0" CELLSPACING="0" CELLPADDING="4" CLASS="CALSTABLE" ><TR ><TD WIDTH="20%" ALIGN="RIGHT" VALIGN="TOP" ><TT CLASS="PARAMETER" ><I >fncb</I ></TT > :</TD ><TD WIDTH="80%" ALIGN="LEFT" VALIGN="TOP" > the function to call to handle error events</TD ></TR ><TR ><TD WIDTH="20%" ALIGN="RIGHT" VALIGN="TOP" ><I CLASS="EMPHASIS" >Returns</I > :</TD ><TD WIDTH="80%" ALIGN="LEFT" VALIGN="TOP" > the address of the previous error handler</TD ></TR ></TABLE ><P ></P ></DIV ></DIV ><HR><DIV CLASS="REFSECT2" ><A NAME="AEN115" ></A ><H3 ><A NAME="GRDEFAULTERRORHANDLER" ></A >GrDefaultErrorHandler ()</H3 ><TABLE BORDER="0" BGCOLOR="#D6E8FF" WIDTH="100%" CELLPADDING="6" ><TR ><TD ><PRE CLASS="PROGRAMLISTING" >void GrDefaultErrorHandler (<GTKDOCLINK HREF="GR-EVENT-CAPS" >GR_EVENT</GTKDOCLINK > *ep);</PRE ></TD ></TR ></TABLE ><P >The default error handler which is called when the server reports an error event and the client hasn't set up a handler of it's own.</P ><P >Generates a human readable error message on stderr describing what error occurred and what function it occured in, then exits.</P ><P ></P ><DIV CLASS="INFORMALTABLE" ><P ></P ><TABLE BORDER="0" WIDTH="100%" BGCOLOR="#FFD0D0" CELLSPACING="0" CELLPADDING="4" CLASS="CALSTABLE" ><TR ><TD WIDTH="20%" ALIGN="RIGHT" VALIGN="TOP" ><TT CLASS="PARAMETER" ><I >ep</I ></TT > :</TD ><TD WIDTH="80%" ALIGN="LEFT" VALIGN="TOP" > the error event structure</TD ></TR ></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="libnano-x.html" ><FONT COLOR="#FFFFFF" SIZE="3" ><B ><<< Previous Page</B ></FONT ></A ></TD ><TD WIDTH="25%" BGCOLOR="#0000C0" ALIGN="center" ><FONT COLOR="#FFFFFF" SIZE="3" ><B ><A HREF="index.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="libnano-x.html" ><FONT COLOR="#FFFFFF" SIZE="3" ><B >Up</B ></FONT ></A ></B ></FONT ></TD ><TD WIDTH="25%" BGCOLOR="#C00000" ALIGN="right" ><A HREF="nano-x-window.html" ><FONT COLOR="#FFFFFF" SIZE="3" ><B >Next Page >>></B ></FONT ></A ></TD ></TR ><TR ><TD COLSPAN="2" ALIGN="left" ><FONT COLOR="#FFFFFF" SIZE="3" ><B >libnano-X</B ></FONT ></TD ><TD COLSPAN="2" ALIGN="right" ><FONT COLOR="#FFFFFF" SIZE="3" ><B >window</B ></FONT ></TD ></TR ></TABLE ></DIV ></BODY ></HTML >