Move gamma method spec structs to redshift.h
This commit is contained in:
@@ -25,6 +25,9 @@
|
||||
#include <xcb/xcb.h>
|
||||
#include <xcb/randr.h>
|
||||
|
||||
#include "redshift.h"
|
||||
|
||||
|
||||
typedef struct {
|
||||
xcb_randr_crtc_t crtc;
|
||||
unsigned int ramp_size;
|
||||
@@ -45,4 +48,5 @@ void randr_free(randr_state_t *state);
|
||||
void randr_restore(randr_state_t *state);
|
||||
int randr_set_temperature(randr_state_t *state, int temp, float gamma[3]);
|
||||
|
||||
|
||||
#endif /* ! _REDSHIFT_RANDR_H */
|
||||
|
||||
+1
-14
@@ -80,6 +80,7 @@ typedef union {
|
||||
#endif
|
||||
} gamma_state_t;
|
||||
|
||||
|
||||
/* Enum of gamma adjustment methods */
|
||||
typedef enum {
|
||||
GAMMA_METHOD_RANDR,
|
||||
@@ -88,20 +89,6 @@ typedef enum {
|
||||
GAMMA_METHOD_MAX
|
||||
} gamma_method_t;
|
||||
|
||||
typedef int gamma_method_init_func(void *state, int screen_num, int crtc_num);
|
||||
typedef void gamma_method_free_func(void *state);
|
||||
typedef void gamma_method_restore_func(void *state);
|
||||
typedef int gamma_method_set_temperature_func(void *state, int temp,
|
||||
float gamma[3]);
|
||||
|
||||
typedef struct {
|
||||
char *name;
|
||||
gamma_method_init_func *init;
|
||||
gamma_method_free_func *free;
|
||||
gamma_method_restore_func *restore;
|
||||
gamma_method_set_temperature_func *set_temperature;
|
||||
} gamma_method_spec_t;
|
||||
|
||||
|
||||
/* Gamma adjustment method structs */
|
||||
static const gamma_method_spec_t gamma_methods[] = {
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
/* redshift.h -- Main program header
|
||||
This file is part of Redshift.
|
||||
|
||||
Redshift 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 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Redshift 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 Redshift. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Copyright (c) 2010 Jon Lund Steffensen <jonlst@gmail.com>
|
||||
*/
|
||||
|
||||
#ifndef _REDSHIFT_REDSHIFT_H
|
||||
#define _REDSHIFT_REDSHIFT_H
|
||||
|
||||
|
||||
typedef int gamma_method_init_func(void *state, int screen_num, int crtc_num);
|
||||
typedef void gamma_method_free_func(void *state);
|
||||
typedef void gamma_method_restore_func(void *state);
|
||||
typedef int gamma_method_set_temperature_func(void *state, int temp,
|
||||
float gamma[3]);
|
||||
|
||||
typedef struct {
|
||||
char *name;
|
||||
gamma_method_init_func *init;
|
||||
gamma_method_free_func *free;
|
||||
gamma_method_restore_func *restore;
|
||||
gamma_method_set_temperature_func *set_temperature;
|
||||
} gamma_method_spec_t;
|
||||
|
||||
|
||||
#endif /* ! _REDSHIFT_REDSHIFT_H */
|
||||
@@ -36,4 +36,5 @@ void vidmode_free(vidmode_state_t *state);
|
||||
void vidmode_restore(vidmode_state_t *state);
|
||||
int vidmode_set_temperature(vidmode_state_t *state, int temp, float gamma[3]);
|
||||
|
||||
|
||||
#endif /* ! _REDSHIFT_VIDMODE_H */
|
||||
|
||||
@@ -34,4 +34,5 @@ void w32gdi_free(w32gdi_state_t *state);
|
||||
void w32gdi_restore(w32gdi_state_t *state);
|
||||
int w32gdi_set_temperature(w32gdi_state_t *state, int temp, float gamma[3]);
|
||||
|
||||
|
||||
#endif /* ! _REDSHIFT_W32GDI_H */
|
||||
|
||||
Reference in New Issue
Block a user