Sophie

Sophie

distrib > Mandriva > 2008.1 > i586 > by-pkgid > 44bd5d625680eebe550891a3ff0d6d21 > files > 120

libSDLmm0.1-devel-0.1.8-12mdv2008.0.i586.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>sdlmm_display.h Source File</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body bgcolor="#ffffff">
<!-- Generated by Doxygen 1.2.8.1 -->
<center>
<a class="qindex" href="index.html">Main Page</a> &nbsp; <a class="qindex" href="namespaces.html">Namespace List</a> &nbsp; <a class="qindex" href="hierarchy.html">Class Hierarchy</a> &nbsp; <a class="qindex" href="annotated.html">Compound List</a> &nbsp; <a class="qindex" href="files.html">File List</a> &nbsp; <a class="qindex" href="namespacemembers.html">Namespace Members</a> &nbsp; <a class="qindex" href="functions.html">Compound Members</a> &nbsp; <a class="qindex" href="globals.html">File Members</a> &nbsp; <a class="qindex" href="pages.html">Related Pages</a> &nbsp; </center>
<hr><h1>sdlmm_display.h</h1><a href="sdlmm__display_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre>00001 <font class="comment">/*</font>
00002 <font class="comment"> * SDmm - a C++ wrapper for SDL and related libraries</font>
00003 <font class="comment"> * Copyright © 2001 David Hedbor &lt;david@hedbor.org&gt;</font>
00004 <font class="comment"> * </font>
00005 <font class="comment"> * This program is free software; you can redistribute it and/or</font>
00006 <font class="comment"> * modify it under the terms of the GNU General Public License as</font>
00007 <font class="comment"> * published by the Free Software Foundation; either version 2 of the</font>
00008 <font class="comment"> * License, or (at your option) any later version.</font>
00009 <font class="comment"> * </font>
00010 <font class="comment"> * This program is distributed in the hope that it will be useful, but</font>
00011 <font class="comment"> * WITHOUT ANY WARRANTY; without even the implied warranty of</font>
00012 <font class="comment"> * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU</font>
00013 <font class="comment"> * General Public License for more details.</font>
00014 <font class="comment"> * </font>
00015 <font class="comment"> * You should have received a copy of the GNU General Public License</font>
00016 <font class="comment"> * along with this program; if not, write to the Free Software</font>
00017 <font class="comment"> * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.</font>
00018 <font class="comment"> *</font>
00019 <font class="comment"> */</font>
00020 
00021 
00022 <font class="preprocessor">#ifndef SDLMM_DISPLAY_H</font>
00023 <font class="preprocessor"></font><font class="preprocessor">#define SDLMM_DISPLAY_H</font>
00024 <font class="preprocessor"></font>
00025 <font class="preprocessor">#include "<a class="code" href="sdlmm__basesurface_8h.html">sdlmm_basesurface.h</a>"</font>
00026 
00027 <font class="keyword">namespace </font>SDLmm {
00029 
<a name="l00039"></a><a class="code" href="classSDLmm_1_1Display.html">00039</a>   <font class="keyword">class </font>Display : <font class="keyword">public</font> BaseSurface {
00040   <font class="keyword">protected</font>:
00042     Display&amp; <a class="code" href="classSDLmm_1_1Display.html#b0">operator= </a>(Display&amp;);
00043     <a class="code" href="classSDLmm_1_1Display.html#b2">Display</a>(Display&amp;);
00044     
<a name="l00045"></a><a class="code" href="classSDLmm_1_1Display.html#b2">00045</a>     <a class="code" href="classSDLmm_1_1Display.html#b2">Display</a>() : BaseSurface(NULL)  {  } 
00046 
00047   <font class="keyword">public</font>:    
<a name="l00048"></a><a class="code" href="classSDLmm_1_1Display.html#a0">00048</a>     <a class="code" href="classSDLmm_1_1Display.html#a0">~Display</a>()<font class="keyword"> </font>{
00049       me = 0; <font class="comment">// Or it will be destroyed by the BaseSurface destructor...</font>
00050     } 
00051 
00053     <font class="keyword">static</font> Display&amp; <a class="code" href="classSDLmm_1_1Display.html#d0">GetDisplay</a>();
00054 
00056 
00057 
00058 
00069     <font class="keywordtype">void</font> <a class="code" href="classSDLmm_1_1Display.html#a1">UpdateRect</a>(Sint32 x = 0, Sint32 y = 0, Sint32 w = 0, Sint32 h = 0);
00070 
00072 
<a name="l00079"></a><a class="code" href="classSDLmm_1_1Display.html#a2">00079</a>     <font class="keywordtype">void</font> <a class="code" href="classSDLmm_1_1Display.html#a2">Update</a>()<font class="keyword"> </font>{ <a class="code" href="classSDLmm_1_1Display.html#a1">UpdateRect</a>(); }
00080 
00082 
00088     <font class="keywordtype">void</font> <a class="code" href="classSDLmm_1_1Display.html#a1">UpdateRect</a>(<a class="code" href="structSDL__Rect.html">SDL_Rect</a>&amp; rect);
00089 
00091 
00108     <font class="keywordtype">void</font> <a class="code" href="classSDLmm_1_1Display.html#a4">UpdateRects</a>(<font class="keywordtype">int</font> numrects, <a class="code" href="structSDL__Rect.html">SDL_Rect</a> *rects);
00109 
00111 
<a name="l00125"></a><a class="code" href="classSDLmm_1_1Display.html#a5">00125</a>     <font class="keywordtype">bool</font> <a class="code" href="classSDLmm_1_1Display.html#a5">Flip</a>()<font class="keyword"> </font>{ <font class="keywordflow">return</font> SDL_Flip(me) == 0; }
00127    
00130 
00139     <font class="keywordtype">bool</font> <a class="code" href="classSDLmm_1_1Display.html#a6">SetVideoMode</a>(<font class="keywordtype">int</font> w, <font class="keywordtype">int</font> h, <font class="keywordtype">int</font> bpp = 0, Uint32 flags = 0);
00140 
00142 
00143 
00144 
00147     <font class="keyword">static</font> <font class="keywordtype">bool</font> <a class="code" href="classSDLmm_1_1Display.html#d1">Init</a>();
00148 
00150     <font class="keyword">static</font> <font class="keywordtype">void</font> <a class="code" href="classSDLmm_1_1Display.html#d2">Quit</a>();
00151     
00153 
00170     <font class="keyword">static</font> <font class="keywordtype">int</font> <a class="code" href="classSDLmm_1_1Display.html#d3">VideoModeOK</a>(<font class="keywordtype">int</font> w, <font class="keywordtype">int</font> h, <font class="keywordtype">int</font> bpp, Uint32 flags);
00171 
00174 
00191     <font class="keyword">static</font> <a class="code" href="structSDL__Rect.html">SDL_Rect</a> **<a class="code" href="classSDLmm_1_1Display.html#d4">ListModes</a>(SDL_PixelFormat *format = 0, Uint32 flags = 0);
00193 
00194 
00196 
00197 
00198 
00202     <font class="keywordtype">void</font> <a class="code" href="classSDLmm_1_1Display.html#a7">SetCaption</a>(<font class="keyword">const</font> <font class="keywordtype">char</font> *title, <font class="keyword">const</font> <font class="keywordtype">char</font> *icon);
00203 
00205 
00209     <font class="keywordtype">void</font> <a class="code" href="classSDLmm_1_1Display.html#a7">SetCaption</a>(<font class="keyword">const</font> std::string&amp; title, <font class="keyword">const</font> std::string&amp; icon);
00211 
00215     <font class="keywordtype">void</font> <a class="code" href="classSDLmm_1_1Display.html#a9">GetCaption</a>(<font class="keywordtype">char</font> **title, <font class="keywordtype">char</font> **icon);
00216 
00218 
00222     <font class="keywordtype">void</font> <a class="code" href="classSDLmm_1_1Display.html#a9">GetCaption</a>(std::string &amp;title, std::string &amp;icon);
00223 
00225 
00234     <font class="keywordtype">void</font> <a class="code" href="classSDLmm_1_1Display.html#a11">SetIcon</a>(BaseSurface&amp; icon, Uint8 *mask = 0);
00235       
00237 
00249     <font class="keywordtype">bool</font> <a class="code" href="classSDLmm_1_1Display.html#a12">Iconify</a>();
00250 
00252 
00259     <font class="keywordtype">bool</font> <a class="code" href="classSDLmm_1_1Display.html#a13">ToggleFullScreen</a>();
00260 
00262 
00280     SDL_GrabMode <a class="code" href="classSDLmm_1_1Display.html#a14">GrabInput</a>(SDL_GrabMode mode);
00282 
00283     <font class="comment">// Documented in BaseSurface. Just return true since the display is always</font>
00284     <font class="comment">// in the display format. Naturally. :-)</font>
<a name="l00285"></a><a class="code" href="classSDLmm_1_1Display.html#a15">00285</a>     <font class="keywordtype">bool</font> <a class="code" href="classSDLmm_1_1Display.html#a15">SetDisplayFormat</a>()<font class="keyword"> </font>{ <font class="keywordflow">return</font> <font class="keyword">true</font>; }
<a name="l00286"></a><a class="code" href="classSDLmm_1_1Display.html#a16">00286</a>     <font class="keywordtype">bool</font> <a class="code" href="classSDLmm_1_1Display.html#a16">SetDisplayFormatAlpha</a>()<font class="keyword"> </font>{ <font class="keywordflow">return</font> <font class="keyword">true</font>; }    
00287   };
00288 }
00289 
00290 <font class="preprocessor">#endif // SDLMM_DISPLAY_H</font>
00291 <font class="preprocessor"></font>
</pre></div><hr>
<table cellspacing=10 cellpadding=0 border=0 width=100%>
<tr valign=middle><td><font size=-1>Documentation automatically generated by <a
href="http://www.stack.nl/~dimitri/doxygen/"><img border=0 align=center src="doxygen.gif" alt="doxygen"></a> written by <a href="mailto:dimitri@stack.nl">Dimitri van Heesch</a>.</font></td>
<td align=right><font size=-1>Project hosted at <br><a href="http://sourceforge.net"><img align=middle src="http://sourceforge.net/sflogo.php?group_id=25445&type=1" width="88" height="31" border="0"  alt="Hosted by SourceForge"></a></font></td></tr></table>