aboutsummaryrefslogtreecommitdiffstats
path: root/src/gamma-w32gdi.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gamma-w32gdi.c')
-rw-r--r--src/gamma-w32gdi.c22
1 files changed, 6 insertions, 16 deletions
diff --git a/src/gamma-w32gdi.c b/src/gamma-w32gdi.c
index e216a23..533365d 100644
--- a/src/gamma-w32gdi.c
+++ b/src/gamma-w32gdi.c
@@ -33,15 +33,15 @@ struct gamma_state {
static int
-w32gdi_init(struct gamma_state **state)
+w32gdi_create(struct gamma_state **state_out)
{
- *state = emalloc(sizeof(**state));
- (*state)->saved_ramps = NULL;
+ *state_out = emalloc(sizeof(**state_out));
+ (*state_out)->saved_ramps = NULL;
return 0;
}
static int
-w32gdi_start(struct gamma_state *state, program_mode_t mode)
+w32gdi_start(struct gamma_state *state)
{
HDC hDC;
int cmcap;
@@ -133,8 +133,7 @@ done:
}
static int
-w32gdi_set_temperature(
- struct gamma_state *state, const colour_setting_t *setting, int preserve)
+w32gdi_apply(struct gamma_state *state, const colour_setting_t *setting, int preserve)
{
WORD *gamma_ramps, *gamma_r, *gamma_b, *gamma_g, value;
HDC hDC;
@@ -192,13 +191,4 @@ done:
}
-const struct gamma_method w32gdi_gamma_method = {
- "wingdi", 1,
- &w32gdi_init,
- &w32gdi_start,
- &w32gdi_free,
- &w32gdi_print_help,
- &w32gdi_set_option,
- &w32gdi_restore,
- &w32gdi_set_temperature
-};
+const struct gamma_method w32gdi_gamma_method = GAMMA_METHOD_INIT("winfdi", 1, w32gdi);