comparison touchTest/Iphone Test/touchTestIPhone2/touchTestIPhone/include/SDL_power.h @ 4677:31607094315c

Added Iphone project. Iphone multi-touch is now functional.
author jimtla
date Sat, 31 Jul 2010 01:24:50 +0400
parents
children
comparison
equal deleted inserted replaced
4676:99b4560b7aa1 4677:31607094315c
1 /*
2 SDL - Simple DirectMedia Layer
3 Copyright (C) 1997-2010 Sam Lantinga
4
5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
9
10 This library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
14
15 You should have received a copy of the GNU Lesser General Public
16 License along with this library; if not, write to the Free Software
17 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
18
19 Sam Lantinga
20 slouken@libsdl.org
21 */
22
23 #ifndef _SDL_power_h
24 #define _SDL_power_h
25
26 /**
27 * \file SDL_power.h
28 *
29 * Header for the SDL power management routines.
30 */
31
32 #include "SDL_stdinc.h"
33
34 #include "begin_code.h"
35 /* Set up for C function definitions, even when using C++ */
36 #ifdef __cplusplus
37 /* *INDENT-OFF* */
38 extern "C" {
39 /* *INDENT-ON* */
40 #endif
41
42 /**
43 * \brief The basic state for the system's power supply.
44 */
45 typedef enum
46 {
47 SDL_POWERSTATE_UNKNOWN, /**< cannot determine power status */
48 SDL_POWERSTATE_ON_BATTERY, /**< Not plugged in, running on the battery */
49 SDL_POWERSTATE_NO_BATTERY, /**< Plugged in, no battery available */
50 SDL_POWERSTATE_CHARGING, /**< Plugged in, charging battery */
51 SDL_POWERSTATE_CHARGED /**< Plugged in, battery charged */
52 } SDL_PowerState;
53
54
55 /**
56 * \brief Get the current power supply details.
57 *
58 * \param secs Seconds of battery life left. You can pass a NULL here if
59 * you don't care. Will return -1 if we can't determine a
60 * value, or we're not running on a battery.
61 *
62 * \param pct Percentage of battery life left, between 0 and 100. You can
63 * pass a NULL here if you don't care. Will return -1 if we
64 * can't determine a value, or we're not running on a battery.
65 *
66 * \return The state of the battery (if any).
67 */
68 extern DECLSPEC SDL_PowerState SDLCALL SDL_GetPowerInfo(int *secs, int *pct);
69
70 /* Ends C function definitions when using C++ */
71 #ifdef __cplusplus
72 /* *INDENT-OFF* */
73 }
74 /* *INDENT-ON* */
75 #endif
76 #include "close_code.h"
77
78 #endif /* _SDL_power_h */
79
80 /* vi: set ts=4 sw=4 expandtab: */