/usr/include/omhacks/screen.h is in libomhacks-dev 0.16-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 | #ifndef OMHACKS_SCREEN_H
#define OMHACKS_SCREEN_H
/*
* omhacks - Various useful utility functions for the FreeRunner
*
* Copyright (C) 2009 Enrico Zini <enrico@enricozini.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
/*
* Read screen brightness.
*
* If the result is negative, then an error happened.
*/
int om_screen_brightness_get();
/*
* Read the maximum allowed brightness value
*
* If the result is negative, then an error happened.
*/
int om_screen_brightness_get_max();
/* Set screen brightness */
int om_screen_brightness_set(int val);
/*
* Set screen brightness and read the old value
*
* If the result is negative, then an error happened.
*/
int om_screen_brightness_swap(int val);
/*
* Open the touchscreen input device.
*
* The result is a file descriptor that can be closed with a normal close()
*/
int om_touchscreen_open();
/*
* Lock the touchscreen input device
*/
int om_touchscreen_lock(int fd);
/*
* Unlock the touchscreen input device
*/
int om_touchscreen_unlock(int fd);
/*
* Return the power status of the display
*
* Returns 1 if on, 0 if off and a negative value in case of problems.
*/
int om_screen_power_get();
/*
* Turn on/off the display.
*
* If value is true, turn on the screen. Else, turn it off.
*
* Note that Xorg and fso-frameworkd do not know how to read the power
* status of the screen (frameworkd reads it on startup only). If Xorg
* turns the screen and after that you turn the screen off with
* omhacks then touching the screen won't turn the screen on (Xorg
* thinks the screen is still on and does not bother to try to power
* it on).
*/
int om_screen_power_set(int val);
/*
* Read current screen resolution
*
* Possible values are "normal" for 640x480 and "qvga-normal" for
* 320x240. Return value is NULL on error.
*/
const char *om_screen_resolution_get();
/*
* Set screen resolution
*
* Argument should be pointer to string describing the resolution. see
* om_screen_resolution_get() for list of options.
*
* If the result is negative, then an error happened.
*/
int om_screen_resolution_set(const char *val);
/*
* Read timings of memory bus between the CPU and the glamo graphics
* chip. Read "man om" for more information.
*
* Return value is either "4-4-4" or "2-4-2" on success and NULL on
* failure.
*/
const char* om_screen_glamo_bus_timings_get();
/*
* Set timings of the memory bus between the CPU and the glamo
* graphics chip. Read "man om" for more information.
*
* The argument must be a string listed in om_screen_glamo_timings_get
* above.
*
* If the result is negative, then an error happened.
*/
int om_screen_glamo_bus_timings_set(const char* val);
#endif
|