zenilib: zenilib/jni/external/sdl/src/power/SDL_power.c File Reference

zenilib 0.5.3.0

- Main Page
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Typedefs | Functions | Variables
SDL_power.c File Reference
`#include "SDL_config.h"`
`#include "SDL_power.h"`

Go to the source code of this file.

## Typedefs

typedef SDL_bool(* | SDL_GetPowerInfo_Impl )(SDL_PowerState *state, int *seconds, int *percent)

## Functions

SDL_PowerState | SDL_GetPowerInfo (int *seconds, int *percent)
| Get the current power supply details. More...
SDL_bool | SDL_GetPowerInfo_Android (SDL_PowerState *, int *, int *)
SDL_bool | SDL_GetPowerInfo_BeOS (SDL_PowerState *, int *, int *)
SDL_bool | SDL_GetPowerInfo_Linux_proc_acpi (SDL_PowerState *, int *, int *)
SDL_bool | SDL_GetPowerInfo_Linux_proc_apm (SDL_PowerState *, int *, int *)
SDL_bool | SDL_GetPowerInfo_MacOSX (SDL_PowerState *, int *, int *)
SDL_bool | SDL_GetPowerInfo_PSP (SDL_PowerState *, int *, int *)
SDL_bool | SDL_GetPowerInfo_UIKit (SDL_PowerState *, int *, int *)
SDL_bool | SDL_GetPowerInfo_Windows (SDL_PowerState *, int *, int *)

## Variables

static SDL_GetPowerInfo_Impl | implementations []

## Typedef Documentation

typedef SDL_bool(* SDL_GetPowerInfo_Impl)(SDL_PowerState *state, int *seconds, int *percent)

Definition at line 29 of file SDL_power.c.

## Function Documentation

SDL_PowerState SDL_GetPowerInfo | ( | int * | secs,
|  | int * | pct
| ) |  |

Get the current power supply details.

Parameters

  secs | Seconds of battery life left. You can pass a NULL here if you don't care. Will return -1 if we can't determine a value, or we're not running on a battery.
  pct | Percentage of battery life left, between 0 and 100. You can pass a NULL here if you don't care. Will return -1 if we can't determine a value, or we're not running on a battery.

Returns
  The state of the battery (if any).

Definition at line 88 of file SDL_power.c.

References i, implementations, NULL, and SDL_POWERSTATE_UNKNOWN.

SDL_bool SDL_GetPowerInfo_Android | ( | SDL_PowerState * | ,
|  | int * | ,
|  | int * |
| ) |  |

SDL_bool SDL_GetPowerInfo_BeOS | ( | SDL_PowerState * | ,
|  | int * | ,
|  | int * |
| ) |  |

SDL_bool SDL_GetPowerInfo_Linux_proc_acpi | ( | SDL_PowerState * | ,
|  | int * | ,
|  | int * |
| ) |  |

SDL_bool SDL_GetPowerInfo_Linux_proc_apm | ( | SDL_PowerState * | ,
|  | int * | ,
|  | int * |
| ) |  |

SDL_bool SDL_GetPowerInfo_MacOSX | ( | SDL_PowerState * | ,
|  | int * | ,
|  | int * |
| ) |  |

SDL_bool SDL_GetPowerInfo_PSP | ( | SDL_PowerState * | ,
|  | int * | ,
|  | int * |
| ) |  |

SDL_bool SDL_GetPowerInfo_UIKit | ( | SDL_PowerState * | ,
|  | int * | ,
|  | int * |
| ) |  |

SDL_bool SDL_GetPowerInfo_Windows | ( | SDL_PowerState * | ,
|  | int * | ,
|  | int * |
| ) |  |

## Variable Documentation

SDL_GetPowerInfo_Impl implementations[]

static

Initial value:
= {
}

Definition at line 56 of file SDL_power.c.

Referenced by SDL_GetPowerInfo().