Sophie

Sophie

distrib > Fedora > 14 > x86_64 > media > updates > by-pkgid > 8ffe23af9b6e2265bcac8526648e8186 > files > 127

alleggl-devel-0.4.3-8.fc14.i686.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>AllegroGL: Allegro-compatible GUI routines</title>
<link href="alleggl.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.5.2 -->
<div class="tabs">
  <ul>
    <li><a href="main.html"><span>Main&nbsp;Page</span></a></li>
    <li><a href="modules.html"><span>Modules</span></a></li>
    <li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
    <li><a href="files.html"><span>Files</span></a></li>
    <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
  </ul>
</div>
<h1>Allegro-compatible GUI routines</h1>AllegroGL GUI wrappers.  
<a href="#_details">More...</a><h2>Functions</h2>
<ul>
<li>int <a class="el" href="group__gui.html#g30c12b20a701f84f994ebcbea14afc99">algl_do_dialog</a> (DIALOG *dialog, int focus_obj)
<dl class="el"><dd class="mdescRight">AllegroGL-friendly version of do_dialog.  <a href="#g30c12b20a701f84f994ebcbea14afc99"></a><br></dl><li>int <a class="el" href="group__gui.html#g4c6641a5fe463ca062b90bcc3bb5677d">algl_popup_dialog</a> (DIALOG *dialog, int focus_obj)
<dl class="el"><dd class="mdescRight">AllegroGL-friendly version of popup_dialog.  <a href="#g4c6641a5fe463ca062b90bcc3bb5677d"></a><br></dl><li>void <a class="el" href="group__gui.html#g4418d38b8585ab443ba7f41a476765c6">algl_draw_mouse</a> (void)
<dl class="el"><dd class="mdescRight">Draws a mouse pointer on the screen.  <a href="#g4418d38b8585ab443ba7f41a476765c6"></a><br></dl><li>void <a class="el" href="group__gui.html#g428394c0ae4d4a1e96fe2b27fb13f745">algl_set_mouse_drawer</a> (void(*user_draw_mouse)(void))
<dl class="el"><dd class="mdescRight">Sets (or clears) a user mouse drawing callback.  <a href="#g428394c0ae4d4a1e96fe2b27fb13f745"></a><br></dl><li>int <a class="el" href="group__gui.html#gd6be783b911635769fcb54d188a77107">algl_alert</a> (AL_CONST char *s1, AL_CONST char *s2, AL_CONST char *s3, AL_CONST char *b1, AL_CONST char *b2, int c1, int c2)
<dl class="el"><dd class="mdescRight">AllegroGL-friendly version of Allegro's alert.  <a href="#gd6be783b911635769fcb54d188a77107"></a><br></dl><li>int <a class="el" href="group__gui.html#gdc8b61d7a682b7be11f0f1cc864b30be">algl_alert3</a> (AL_CONST char *s1, AL_CONST char *s2, AL_CONST char *s3, AL_CONST char *b1, AL_CONST char *b2, AL_CONST char *b3, int c1, int c2, int c3)
<dl class="el"><dd class="mdescRight">AllegroGL-friendly version of Allegro's alert3.  <a href="#gdc8b61d7a682b7be11f0f1cc864b30be"></a><br></dl><li>int <a class="el" href="group__gui.html#ge41d96ae1ebefffdf60391e632915fd3">d_algl_viewport_proc</a> (int msg, DIALOG *d, int c)
<dl class="el"><dd class="mdescRight">Creates a viewport object where OpenGL commands can be performed.  <a href="#ge41d96ae1ebefffdf60391e632915fd3"></a><br></dl></ul>
<hr><a name="_details"></a><h2>Detailed Description</h2>
AllegroGL GUI wrappers. 
<p>
Due to several specificities of OpenGL, some of the Allegro's GUI routines can not be used "as is". Indeed they are not designed to natively support double-buffered graphics mode. Hence AllegroGL provides wrapper routines of do_dialog, alert and so on...<p>
AllegroGL GUI routines internally call <a class="el" href="group__allegro.html#g7ea7ffd9b72d0d0722cbf982b729efdb" title="Prepares for Allegro drawing to the screen.">allegro_gl_set_allegro_mode()</a> and its counterpart <a class="el" href="group__allegro.html#g00fbbee541046767114bf9746ceb6f8b" title="Restores previous OpenGL settings.">allegro_gl_unset_allegro_mode()</a>. So the default drawing mode in the GUI routines is the "2D Allegro mode" and functions like line() or rect() can safely be called.<p>
Additionnaly AllegroGL provides a new GUI object <a class="el" href="group__gui.html#ge41d96ae1ebefffdf60391e632915fd3" title="Creates a viewport object where OpenGL commands can be performed.">d_algl_viewport_proc()</a> which allows to have a 3D viewport that can safely coexist with other "classical" 2D GUI objects : no need to call <a class="el" href="group__allegro.html#g7ea7ffd9b72d0d0722cbf982b729efdb" title="Prepares for Allegro drawing to the screen.">allegro_gl_set_allegro_mode()</a> or to save the current state of OpenGL. <hr><h2>Function Documentation</h2>
<a class="anchor" name="g30c12b20a701f84f994ebcbea14afc99"></a><!-- doxytag: member="alleggl.h::algl_do_dialog" ref="g30c12b20a701f84f994ebcbea14afc99" args="(DIALOG *dialog, int focus_obj)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int algl_do_dialog           </td>
          <td>(</td>
          <td class="paramtype">DIALOG *&nbsp;</td>
          <td class="paramname"> <em>dialog</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>focus_obj</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
AllegroGL-friendly version of do_dialog. 
<p>
This behaves exactly like do_dialog but forces a screen clear, rerender, and flip, after each iteration of update_dialog.<p>
User gui components can do OpenGL or Allegro rendering to draw themselves. They should take care not to alter any OpenGL state (or be aware that this will affect other components). For the main render, they will be called in order, but this is not guarranteed at other times -- they may be called out of order; however the results will never be visible, so just don't crash.<p>
Before drawing the final (in-order) pass, the color and depth buffers will be cleared -- set your clear color to black or green or whatever you like. You can overdraw it with an object of course.<p>
Further notes: This routine uses <a class="el" href="group__allegro.html#g7ea7ffd9b72d0d0722cbf982b729efdb" title="Prepares for Allegro drawing to the screen.">allegro_gl_set_allegro_mode()</a>, so your GUI components can use <a class="el" href="group__allegro.html#g00fbbee541046767114bf9746ceb6f8b" title="Restores previous OpenGL settings.">allegro_gl_unset_allegro_mode()</a> to restore the old state while they draw themselves, provided that they use <a class="el" href="group__allegro.html#g7ea7ffd9b72d0d0722cbf982b729efdb" title="Prepares for Allegro drawing to the screen.">allegro_gl_set_allegro_mode()</a> again afterwards.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>dialog</em>&nbsp;</td><td>an array of dialog objects terminated by one with a NULL dialog procedure. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>focus_obj</em>&nbsp;</td><td>index of the object on which the focus is set (-1 if you don't want anything to have the focus</td></tr>
  </table>
</dl>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="group__gui.html#g4418d38b8585ab443ba7f41a476765c6" title="Draws a mouse pointer on the screen.">algl_draw_mouse</a> </dd></dl>

<p>
Definition at line <a class="el" href="gui_8c-source.html#l00058">58</a> of file <a class="el" href="gui_8c-source.html">gui.c</a>.
<p>
References <a class="el" href="glvtable_8c-source.html#l02394">allegro_gl_set_allegro_mode()</a>, and <a class="el" href="glvtable_8c-source.html#l02463">allegro_gl_unset_allegro_mode()</a>.
</div>
</div><p>
<a class="anchor" name="g4c6641a5fe463ca062b90bcc3bb5677d"></a><!-- doxytag: member="alleggl.h::algl_popup_dialog" ref="g4c6641a5fe463ca062b90bcc3bb5677d" args="(DIALOG *dialog, int focus_obj)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int algl_popup_dialog           </td>
          <td>(</td>
          <td class="paramtype">DIALOG *&nbsp;</td>
          <td class="paramname"> <em>dialog</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>focus_obj</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
AllegroGL-friendly version of popup_dialog. 
<p>
This routine is likely to be very slow. It has to take a copy of the screen on entry, then where <a class="el" href="group__gui.html#g30c12b20a701f84f994ebcbea14afc99" title="AllegroGL-friendly version of do_dialog.">algl_do_dialog()</a> would just clear the screen, this routine has to blit that copy back again after clearing. This is the only way to do overlays without knowing what type of flipping is going on.<p>
Also, note that we don't save the depth buffer or anything like that so don't go around thinking that algl_popup_dialog won't affect anything when it's gone.<p>
So, unless you need overlays, it's recommended that you just use <a class="el" href="group__gui.html#g30c12b20a701f84f994ebcbea14afc99" title="AllegroGL-friendly version of do_dialog.">algl_do_dialog()</a>, and if you do need overlays, it's recommended that you just use <a class="el" href="group__gui.html#g30c12b20a701f84f994ebcbea14afc99" title="AllegroGL-friendly version of do_dialog.">algl_do_dialog()</a> and redraw the thing you're overlaying yourself. If you're lazy or that's impossible, use this routine...<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>dialog</em>&nbsp;</td><td>an array of dialog objects terminated by one with a NULL dialog procedure. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>focus_obj</em>&nbsp;</td><td>index of the object on which the focus is set (-1 if you don't want anything to have the focus</td></tr>
  </table>
</dl>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="group__gui.html#g30c12b20a701f84f994ebcbea14afc99" title="AllegroGL-friendly version of do_dialog.">algl_do_dialog</a>, <a class="el" href="group__gui.html#g4418d38b8585ab443ba7f41a476765c6" title="Draws a mouse pointer on the screen.">algl_draw_mouse</a> </dd></dl>

<p>
Definition at line <a class="el" href="gui_8c-source.html#l00111">111</a> of file <a class="el" href="gui_8c-source.html">gui.c</a>.
<p>
References <a class="el" href="gui_8c-source.html#l00187">algl_draw_mouse()</a>, <a class="el" href="alleggl_8c-source.html#l00951">allegro_gl_flip()</a>, <a class="el" href="glvtable_8c-source.html#l02394">allegro_gl_set_allegro_mode()</a>, and <a class="el" href="glvtable_8c-source.html#l02463">allegro_gl_unset_allegro_mode()</a>.
<p>
Referenced by <a class="el" href="gui_8c-source.html#l00329">algl_alert3()</a>.
</div>
</div><p>
<a class="anchor" name="g4418d38b8585ab443ba7f41a476765c6"></a><!-- doxytag: member="alleggl.h::algl_draw_mouse" ref="g4418d38b8585ab443ba7f41a476765c6" args="(void)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void algl_draw_mouse           </td>
          <td>(</td>
          <td class="paramtype">void&nbsp;</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Draws a mouse pointer on the screen. 
<p>
This function draws a mouse pointer on the screen. By default, it displays Allegro's standard black arrow cursor. However the settings of the cursor can be altered by Allegro's functions for mouse cursor management like show_mouse, set_mouse_sprite, scare_mouse, and so on... As a consequence, it should be stressed that if show_mouse(NULL) is called then <a class="el" href="group__gui.html#g4418d38b8585ab443ba7f41a476765c6" title="Draws a mouse pointer on the screen.">algl_draw_mouse()</a> won't draw anything.<p>
Unlike Allegro, AllegroGL does not manage the mouse cursor with an interrupt routine, hence <a class="el" href="group__gui.html#g4418d38b8585ab443ba7f41a476765c6" title="Draws a mouse pointer on the screen.">algl_draw_mouse()</a> must be regularly called in order to display the mouse cursor (ideally it should be the last function called before <a class="el" href="group__core.html#gf5aad043e99b766393fa4a7ec034a0f1" title="Flips the front and back framebuffers.">allegro_gl_flip()</a>). However if you use <a class="el" href="group__gui.html#g30c12b20a701f84f994ebcbea14afc99" title="AllegroGL-friendly version of do_dialog.">algl_do_dialog()</a> then you do not need to make explicit calls to <a class="el" href="group__gui.html#g4418d38b8585ab443ba7f41a476765c6" title="Draws a mouse pointer on the screen.">algl_draw_mouse()</a> since <a class="el" href="group__gui.html#g30c12b20a701f84f994ebcbea14afc99" title="AllegroGL-friendly version of do_dialog.">algl_do_dialog()</a> takes care of that for you.<p>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="group__gui.html#g428394c0ae4d4a1e96fe2b27fb13f745" title="Sets (or clears) a user mouse drawing callback.">algl_set_mouse_drawer</a> </dd></dl>

<p>
Definition at line <a class="el" href="gui_8c-source.html#l00187">187</a> of file <a class="el" href="gui_8c-source.html">gui.c</a>.
<p>
References <a class="el" href="gui_8c-source.html#l00164">__algl_user_draw_mouse</a>.
<p>
Referenced by <a class="el" href="gui_8c-source.html#l00111">algl_popup_dialog()</a>, and <a class="el" href="gui_8c-source.html#l00477">d_algl_viewport_proc()</a>.
</div>
</div><p>
<a class="anchor" name="g428394c0ae4d4a1e96fe2b27fb13f745"></a><!-- doxytag: member="alleggl.h::algl_set_mouse_drawer" ref="g428394c0ae4d4a1e96fe2b27fb13f745" args="(void(*user_draw_mouse)(void))" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void algl_set_mouse_drawer           </td>
          <td>(</td>
          <td class="paramtype">void(*)(void)&nbsp;</td>
          <td class="paramname"> <em>user_draw_mouse</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Sets (or clears) a user mouse drawing callback. 
<p>
This function allows to use a user-defined routine to display the mouse cursor. This allows nice effects like a spinning cube or any fancy thing you can think of to be used as a mouse cursor.<p>
When a user mouse drawing callback is enabled, set_mouse_sprite has no effect. However show_mouse and scare_mouse are still enabled.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>user_draw_mouse</em>&nbsp;</td><td>user routine that displays the mouse cursor (NULL if you want to get back to the standard behaviour)</td></tr>
  </table>
</dl>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="group__gui.html#g4418d38b8585ab443ba7f41a476765c6" title="Draws a mouse pointer on the screen.">algl_draw_mouse</a> </dd></dl>

<p>
Definition at line <a class="el" href="gui_8c-source.html#l00284">284</a> of file <a class="el" href="gui_8c-source.html">gui.c</a>.
<p>
References <a class="el" href="gui_8c-source.html#l00164">__algl_user_draw_mouse</a>.
</div>
</div><p>
<a class="anchor" name="gd6be783b911635769fcb54d188a77107"></a><!-- doxytag: member="alleggl.h::algl_alert" ref="gd6be783b911635769fcb54d188a77107" args="(AL_CONST char *s1, AL_CONST char *s2, AL_CONST char *s3, AL_CONST char *b1, AL_CONST char *b2, int c1, int c2)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int algl_alert           </td>
          <td>(</td>
          <td class="paramtype">AL_CONST char *&nbsp;</td>
          <td class="paramname"> <em>s1</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">AL_CONST char *&nbsp;</td>
          <td class="paramname"> <em>s2</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">AL_CONST char *&nbsp;</td>
          <td class="paramname"> <em>s3</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">AL_CONST char *&nbsp;</td>
          <td class="paramname"> <em>b1</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">AL_CONST char *&nbsp;</td>
          <td class="paramname"> <em>b2</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>c1</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>c2</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
AllegroGL-friendly version of Allegro's alert. 
<p>
Displays a simple alert box, containing three lines of text (s1-s3), and with either one or two buttons. The text for these buttons is passed in b1 and b2 (b2 may be null), and the keyboard shortcuts in c1 and c2. Returns 1 or 2 depending on which button was selected. 
<p>
Definition at line <a class="el" href="gui_8c-source.html#l00449">449</a> of file <a class="el" href="gui_8c-source.html">gui.c</a>.
<p>
References <a class="el" href="gui_8c-source.html#l00329">algl_alert3()</a>.
</div>
</div><p>
<a class="anchor" name="gdc8b61d7a682b7be11f0f1cc864b30be"></a><!-- doxytag: member="alleggl.h::algl_alert3" ref="gdc8b61d7a682b7be11f0f1cc864b30be" args="(AL_CONST char *s1, AL_CONST char *s2, AL_CONST char *s3, AL_CONST char *b1, AL_CONST char *b2, AL_CONST char *b3, int c1, int c2, int c3)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int algl_alert3           </td>
          <td>(</td>
          <td class="paramtype">AL_CONST char *&nbsp;</td>
          <td class="paramname"> <em>s1</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">AL_CONST char *&nbsp;</td>
          <td class="paramname"> <em>s2</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">AL_CONST char *&nbsp;</td>
          <td class="paramname"> <em>s3</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">AL_CONST char *&nbsp;</td>
          <td class="paramname"> <em>b1</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">AL_CONST char *&nbsp;</td>
          <td class="paramname"> <em>b2</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">AL_CONST char *&nbsp;</td>
          <td class="paramname"> <em>b3</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>c1</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>c2</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>c3</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
AllegroGL-friendly version of Allegro's alert3. 
<p>
Displays a simple alert box, containing three lines of text (s1-s3), and with either one, two, or three buttons. The text for these buttons is passed in b1, b2, and b3 (NULL for buttons which are not used), and the keyboard shortcuts in c1 and c2. Returns 1, 2, or 3 depending on which button was selected. 
<p>
Definition at line <a class="el" href="gui_8c-source.html#l00329">329</a> of file <a class="el" href="gui_8c-source.html">gui.c</a>.
<p>
References <a class="el" href="gui_8c-source.html#l00313">A_B1</a>, <a class="el" href="gui_8c-source.html#l00314">A_B2</a>, <a class="el" href="gui_8c-source.html#l00315">A_B3</a>, <a class="el" href="gui_8c-source.html#l00310">A_S1</a>, <a class="el" href="gui_8c-source.html#l00311">A_S2</a>, <a class="el" href="gui_8c-source.html#l00312">A_S3</a>, and <a class="el" href="gui_8c-source.html#l00111">algl_popup_dialog()</a>.
<p>
Referenced by <a class="el" href="gui_8c-source.html#l00449">algl_alert()</a>.
</div>
</div><p>
<a class="anchor" name="ge41d96ae1ebefffdf60391e632915fd3"></a><!-- doxytag: member="alleggl.h::d_algl_viewport_proc" ref="ge41d96ae1ebefffdf60391e632915fd3" args="(int msg, DIALOG *d, int c)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int d_algl_viewport_proc           </td>
          <td>(</td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>msg</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">DIALOG *&nbsp;</td>
          <td class="paramname"> <em>d</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>c</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Creates a viewport object where OpenGL commands can be performed. 
<p>
The viewport and the scissor are updated so that this GUI object behaves somewhat like a window. The dp field of the DIALOG object points to a callback function : int (*callback)(BITMAP* viewport, int msg, int c) where: viewport is a sub-bitmap of the screen limited to the area of the DIALOG object. msg and c are the values that come from the GUI manager. The callback function must return a sensible value to the GUI manager like D_O_K if everything went right or D_EXIT to close the dialog. 
<p>
Definition at line <a class="el" href="gui_8c-source.html#l00477">477</a> of file <a class="el" href="gui_8c-source.html">gui.c</a>.
<p>
References <a class="el" href="gui_8c-source.html#l00187">algl_draw_mouse()</a>, <a class="el" href="alleggl_8c-source.html#l00951">allegro_gl_flip()</a>, <a class="el" href="glvtable_8c-source.html#l02394">allegro_gl_set_allegro_mode()</a>, and <a class="el" href="glvtable_8c-source.html#l02463">allegro_gl_unset_allegro_mode()</a>.
</div>
</div><p>
<hr size="1"><address style="text-align: right;"><small>Generated on Mon Nov 12 11:05:32 2007 for AllegroGL by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.2 </small></address>
</body>
</html>