Commit 3aa18aae authored by Neil Turton's avatar Neil Turton
Browse files

Version Spin_merge taken

parent c02e8226
......@@ -721,17 +721,17 @@ static os_error *Dialogue_Starting (task_r r, wimp_w main_w,
/*Returns are watched so we can update the steppables from the values
in their respective icons.*/
(error = callback_register (cmyk->list, &Return, colour, 4,
wimp_KEY_PRESSED, main_w, cmyk->first_i + cmyk_CMYK_CPERCENT,
wimp_KEY_RETURN)) != NULL ||
wimp_KEY_PRESSED, wimp_KEY_RETURN, main_w,
cmyk->first_i + cmyk_CMYK_CPERCENT)) != NULL ||
(error = callback_register (cmyk->list, &Return, colour, 4,
wimp_KEY_PRESSED, main_w, cmyk->first_i + cmyk_CMYK_MPERCENT,
wimp_KEY_RETURN)) != NULL ||
wimp_KEY_PRESSED, wimp_KEY_RETURN,
main_w, cmyk->first_i + cmyk_CMYK_MPERCENT)) != NULL ||
(error = callback_register (cmyk->list, &Return, colour, 4,
wimp_KEY_PRESSED, main_w, cmyk->first_i + cmyk_CMYK_YPERCENT,
wimp_KEY_RETURN)) != NULL ||
wimp_KEY_PRESSED, wimp_KEY_RETURN,
main_w, cmyk->first_i + cmyk_CMYK_YPERCENT)) != NULL ||
(error = callback_register (cmyk->list, &Return, colour, 4,
wimp_KEY_PRESSED, main_w, cmyk->first_i + cmyk_CMYK_KPERCENT,
wimp_KEY_RETURN)) != NULL ||
wimp_KEY_PRESSED, wimp_KEY_RETURN,
main_w, cmyk->first_i + cmyk_CMYK_KPERCENT)) != NULL ||
/*Other keypresses are passed on.*/
(error = callback_register (cmyk->list, &Pass, colour, 1,
......@@ -753,8 +753,8 @@ static os_error *Dialogue_Starting (task_r r, wimp_w main_w,
/*Clicks on all the desktop colour icons.*/
for (c = 0; c < 16; c++)
if ((error = callback_register (cmyk->list, &Desktop, colour, 5,
wimp_MOUSE_CLICK, main_w, cmyk->first_i + Desktop_Colours [c],
wimp_CLICK_SELECT, NONE)) != NULL)
wimp_MOUSE_CLICK, wimp_CLICK_SELECT, NONE,
main_w, cmyk->first_i + Desktop_Colours [c])) != NULL)
goto finish;
if (colour_out != NULL) *colour_out = colour;
......
......@@ -39,7 +39,7 @@
#include "riscos.h"
#include "task.h"
#include "trace.h"
#include "window.h"
#include "win.h"
/*Local*/
#include "colourpicker.h"
......@@ -1070,22 +1070,22 @@ static os_error *New (colourpicker_dialogue *dialogue,
/*Click SELECT or ADJUST on None.*/
(error = callback_register (list, &None, l, 5, wimp_MOUSE_CLICK,
l->main_w, dialogue_PICKER_NONE, wimp_CLICK_SELECT, NONE)) !=
wimp_CLICK_SELECT, NONE, l->main_w, dialogue_PICKER_NONE)) !=
NULL ||
(error = callback_register (list, &None, l, 5, wimp_MOUSE_CLICK,
l->main_w, dialogue_PICKER_NONE, wimp_CLICK_ADJUST, NONE)) !=
wimp_CLICK_ADJUST, NONE, l->main_w, dialogue_PICKER_NONE)) !=
NULL ||
/*Click SELECT on the model icons.*/
(error = callback_register (list, &Model, l, 5,
wimp_MOUSE_CLICK, l->main_w, dialogue_PICKER_RGB,
wimp_CLICK_SELECT, NONE)) != NULL ||
wimp_MOUSE_CLICK, wimp_CLICK_SELECT, NONE,
l->main_w, dialogue_PICKER_RGB)) != NULL ||
(error = callback_register (list, &Model, l, 5,
wimp_MOUSE_CLICK, l->main_w, dialogue_PICKER_CMYK,
wimp_CLICK_SELECT, NONE)) != NULL ||
wimp_MOUSE_CLICK, wimp_CLICK_SELECT, NONE,
l->main_w, dialogue_PICKER_CMYK)) != NULL ||
(error = callback_register (list, &Model, l, 5,
wimp_MOUSE_CLICK, l->main_w, dialogue_PICKER_HSV,
wimp_CLICK_SELECT, NONE)) != NULL ||
wimp_MOUSE_CLICK, wimp_CLICK_SELECT, NONE,
l->main_w, dialogue_PICKER_HSV)) != NULL ||
/*Respond to help request events.*/
(error = callback_register (list, &Help, l, 3,
......@@ -1119,22 +1119,22 @@ static os_error *New (colourpicker_dialogue *dialogue,
if
( /*Click SELECT on OK*/
(error = callback_register (list, &Choice, l, 5, wimp_MOUSE_CLICK,
l->main_w, dialogue_PICKER_OK, wimp_CLICK_SELECT, NONE)) !=
wimp_CLICK_SELECT, NONE, l->main_w, dialogue_PICKER_OK)) !=
NULL ||
/*Click ADJUST on OK.*/
(error = callback_register (list, &Choice, l, 5, wimp_MOUSE_CLICK,
l->main_w, dialogue_PICKER_OK, wimp_CLICK_ADJUST, NONE)) !=
wimp_CLICK_ADJUST, NONE, l->main_w, dialogue_PICKER_OK)) !=
NULL ||
/*Click ADJUST on Cancel.*/
(error = callback_register (list, &Reset, l, 5, wimp_MOUSE_CLICK,
l->main_w, dialogue_PICKER_CANCEL, wimp_CLICK_ADJUST, NONE))
wimp_CLICK_ADJUST, NONE, l->main_w, dialogue_PICKER_CANCEL))
!= NULL ||
/*Press Return (invoked only via ColourPickerModelSWI_ProcessKey).*/
(error = callback_register (list, &Choice, l, 4, wimp_KEY_PRESSED,
l->main_w, wimp_ICON_WINDOW, wimp_KEY_RETURN)) != NULL
wimp_KEY_RETURN, l->main_w, wimp_ICON_WINDOW)) != NULL
)
goto finish;
......@@ -1152,20 +1152,20 @@ static os_error *New (colourpicker_dialogue *dialogue,
/*And also when it is dismissed.*/
(error = callback_register (list, &Dismiss, l, 5,
wimp_MOUSE_CLICK, l->main_w, dialogue_PICKER_OK,
wimp_CLICK_SELECT, NONE)) != NULL ||
wimp_MOUSE_CLICK, wimp_CLICK_SELECT, NONE,
l->main_w, dialogue_PICKER_OK)) != NULL ||
(error = callback_register (list, &Dismiss, l, 5,
wimp_MOUSE_CLICK, l->main_w, dialogue_PICKER_CANCEL,
wimp_CLICK_SELECT, NONE)) != NULL ||
wimp_MOUSE_CLICK, wimp_CLICK_SELECT, NONE,
l->main_w, dialogue_PICKER_CANCEL)) != NULL ||
(error = callback_register (list, &Dismiss, l, 4,
wimp_KEY_PRESSED, l->main_w, wimp_ICON_WINDOW,
wimp_KEY_RETURN)) != NULL ||
wimp_KEY_PRESSED, wimp_KEY_RETURN,
l->main_w, wimp_ICON_WINDOW)) != NULL ||
(error = callback_register (list, &Dismiss, l, 4,
wimp_KEY_PRESSED, l->main_w, wimp_ICON_WINDOW,
wimp_KEY_ESCAPE)) != NULL
wimp_KEY_PRESSED, wimp_KEY_ESCAPE,
l->main_w, wimp_ICON_WINDOW)) != NULL
)
goto finish;
}
......@@ -1175,23 +1175,23 @@ static os_error *New (colourpicker_dialogue *dialogue,
if
( /*Click SELECT on OK.*/
(error = callback_register (list, &Close, l, 5,
wimp_MOUSE_CLICK, l->main_w, dialogue_PICKER_OK,
wimp_CLICK_SELECT, NONE)) != NULL ||
wimp_MOUSE_CLICK, wimp_CLICK_SELECT, NONE,
l->main_w, dialogue_PICKER_OK)) != NULL ||
/*Click SELECT on Cancel.*/
(error = callback_register (list, &Close, l, 5,
wimp_MOUSE_CLICK, l->main_w, dialogue_PICKER_CANCEL,
wimp_CLICK_SELECT, NONE)) != NULL ||
wimp_MOUSE_CLICK, wimp_CLICK_SELECT, NONE,
l->main_w, dialogue_PICKER_CANCEL)) != NULL ||
/*Press Return (invoked via ColourPickerModelSWI_ProcessKey).*/
(error = callback_register (list, &Close, l, 4,
wimp_KEY_PRESSED, l->main_w, wimp_ICON_WINDOW,
wimp_KEY_RETURN)) != NULL ||
wimp_KEY_PRESSED, wimp_KEY_RETURN,
l->main_w, wimp_ICON_WINDOW)) != NULL ||
/*Press Escape (ditto).*/
(error = callback_register (list, &Close, l, 4,
wimp_KEY_PRESSED, l->main_w, wimp_ICON_WINDOW,
wimp_KEY_ESCAPE)) != NULL
wimp_KEY_PRESSED, wimp_KEY_ESCAPE,
l->main_w, wimp_ICON_WINDOW)) != NULL
)
goto finish;
} }
......@@ -1759,7 +1759,7 @@ os_error *dialogue_update (bits flags, colourpicker_d d,
goto finish;
}
if ((error = window_set_title (l->main_w, title)) != NULL)
if ((error = win_set_title (l->main_w, title)) != NULL)
goto finish;
}
#endif
......@@ -2040,7 +2040,7 @@ break2:;
the key was pressed.*/
if ((error = callback (task_list (l->parent->r), l, &unclaimed, 4,
wimp_KEY_PRESSED, l->main_w, wimp_ICON_WINDOW, c)) != NULL)
wimp_KEY_PRESSED, c, l->main_w, wimp_ICON_WINDOW)) != NULL)
goto finish;
if (unclaimed)
......
......@@ -1600,24 +1600,24 @@ static os_error *Dialogue_Starting (task_r r, wimp_w main_w,
/*Clicks on the slice icons.*/
(error = callback_register (hsv->list, &Slice, colour, 5,
wimp_MOUSE_CLICK, main_w, first_i + hsv_HSV_HUESLICE,
wimp_CLICK_SELECT, NONE)) != NULL ||
wimp_MOUSE_CLICK, wimp_CLICK_SELECT, NONE,
main_w, first_i + hsv_HSV_HUESLICE)) != NULL ||
(error = callback_register (hsv->list, &Slice, colour, 5,
wimp_MOUSE_CLICK, main_w, first_i + hsv_HSV_SATURATIONSLICE,
wimp_CLICK_SELECT, NONE)) != NULL ||
wimp_MOUSE_CLICK, wimp_CLICK_SELECT, NONE,
main_w, first_i + hsv_HSV_SATURATIONSLICE)) != NULL ||
(error = callback_register (hsv->list, &Slice, colour, 5,
wimp_MOUSE_CLICK, main_w, first_i + hsv_HSV_VALUESLICE,
wimp_CLICK_SELECT, NONE)) != NULL ||
wimp_MOUSE_CLICK, wimp_CLICK_SELECT, NONE,
main_w, first_i + hsv_HSV_VALUESLICE)) != NULL ||
/*Click on the slice itself gives a 2-way selection.*/
(error = callback_register (hsv->list, &Two_Way, colour, 5,
wimp_MOUSE_CLICK, main_w, first_i + hsv_HSV_SLICE,
wimp_CLICK_SELECT, NONE)) != NULL ||
wimp_MOUSE_CLICK, wimp_CLICK_SELECT, NONE,
main_w, first_i + hsv_HSV_SLICE)) != NULL ||
/*Drag starts a drag. JRC 9th Dec 1994*/
(error = callback_register (hsv->list, &Start_Drag, colour, 5,
wimp_MOUSE_CLICK, main_w, first_i + hsv_HSV_SLICE,
wimp_DRAG_SELECT, NONE)) != NULL ||
wimp_MOUSE_CLICK, wimp_DRAG_SELECT, NONE,
main_w, first_i + hsv_HSV_SLICE)) != NULL ||
(error = callback_register (hsv->list, &Dragging, colour, 1,
wimp_NULL_REASON_CODE)) != NULL ||
(error = callback_register (hsv->list, &End_Drag, colour, 1,
......@@ -1626,14 +1626,14 @@ static os_error *Dialogue_Starting (task_r r, wimp_w main_w,
/*Returns are watched so we can update the steppables from the values
in their respective icons.*/
(error = callback_register (hsv->list, &Return, colour, 4,
wimp_KEY_PRESSED, main_w, first_i + hsv_HSV_HUEDEGREES,
wimp_KEY_RETURN)) != NULL ||
wimp_KEY_PRESSED, wimp_KEY_RETURN,
main_w, first_i + hsv_HSV_HUEDEGREES)) != NULL ||
(error = callback_register (hsv->list, &Return, colour, 4,
wimp_KEY_PRESSED, main_w, first_i +
hsv_HSV_SATURATIONPERCENT, wimp_KEY_RETURN)) != NULL ||
wimp_KEY_PRESSED, wimp_KEY_RETURN, main_w,
first_i + hsv_HSV_SATURATIONPERCENT)) != NULL ||
(error = callback_register (hsv->list, &Return, colour, 4,
wimp_KEY_PRESSED, main_w, first_i + hsv_HSV_VALUEPERCENT,
wimp_KEY_RETURN)) != NULL ||
wimp_KEY_PRESSED, wimp_KEY_RETURN,
main_w, first_i + hsv_HSV_VALUEPERCENT)) != NULL ||
/*Other keypresses are passed on.*/
(error = callback_register (hsv->list, &Pass, colour, 1,
......@@ -1655,8 +1655,8 @@ static os_error *Dialogue_Starting (task_r r, wimp_w main_w,
/*Clicks on all the desktop colour icons.*/
for (c = 0; c < 16; c++)
if ((error = callback_register (hsv->list, &Desktop, colour, 5,
wimp_MOUSE_CLICK, main_w, first_i + Desktop_Colours [c],
wimp_CLICK_SELECT, NONE)) != NULL)
wimp_MOUSE_CLICK, wimp_CLICK_SELECT, NONE,
main_w, first_i + Desktop_Colours [c])) != NULL)
goto finish;
if (colour_out != NULL) *colour_out = colour;
......
......@@ -1513,24 +1513,24 @@ static os_error *Dialogue_Starting (task_r r, wimp_w main_w,
/*Clicks on the slice icons.*/
(error = callback_register (rgb->list, &Slice, colour, 5,
wimp_MOUSE_CLICK, main_w, first_i + rgb_RGB_REDSLICE,
wimp_CLICK_SELECT, NONE)) != NULL ||
wimp_MOUSE_CLICK, wimp_CLICK_SELECT, NONE,
main_w, first_i + rgb_RGB_REDSLICE)) != NULL ||
(error = callback_register (rgb->list, &Slice, colour, 5,
wimp_MOUSE_CLICK, main_w, first_i + rgb_RGB_GREENSLICE,
wimp_CLICK_SELECT, NONE)) != NULL ||
wimp_MOUSE_CLICK, wimp_CLICK_SELECT, NONE,
main_w, first_i + rgb_RGB_GREENSLICE)) != NULL ||
(error = callback_register (rgb->list, &Slice, colour, 5,
wimp_MOUSE_CLICK, main_w, first_i + rgb_RGB_BLUESLICE,
wimp_CLICK_SELECT, NONE)) != NULL ||
wimp_MOUSE_CLICK, wimp_CLICK_SELECT, NONE,
main_w, first_i + rgb_RGB_BLUESLICE)) != NULL ||
/*Click on the slice itself gives a 2-way selection.*/
(error = callback_register (rgb->list, &Two_Way, colour, 5,
wimp_MOUSE_CLICK, main_w, first_i + rgb_RGB_SLICE,
wimp_CLICK_SELECT, NONE)) != NULL ||
wimp_MOUSE_CLICK, wimp_CLICK_SELECT, NONE,
main_w, first_i + rgb_RGB_SLICE)) != NULL ||
/*Drag starts a drag. JRC 9th Dec 1994*/
(error = callback_register (rgb->list, &Start_Drag, colour, 5,
wimp_MOUSE_CLICK, main_w, first_i + rgb_RGB_SLICE,
wimp_DRAG_SELECT, NONE)) != NULL ||
wimp_MOUSE_CLICK, wimp_DRAG_SELECT, NONE,
main_w, first_i + rgb_RGB_SLICE)) != NULL ||
(error = callback_register (rgb->list, &Dragging, colour, 1,
wimp_NULL_REASON_CODE)) != NULL ||
(error = callback_register (rgb->list, &End_Drag, colour, 1,
......@@ -1539,14 +1539,14 @@ static os_error *Dialogue_Starting (task_r r, wimp_w main_w,
/*Returns are watched so we can update the steppables from the values
in their respective icons.*/
(error = callback_register (rgb->list, &Return, colour, 4,
wimp_KEY_PRESSED, main_w, first_i + rgb_RGB_REDPERCENT,
wimp_KEY_RETURN)) != NULL ||
wimp_KEY_PRESSED, wimp_KEY_RETURN,
main_w, first_i + rgb_RGB_REDPERCENT)) != NULL ||
(error = callback_register (rgb->list, &Return, colour, 4,
wimp_KEY_PRESSED, main_w, first_i + rgb_RGB_GREENPERCENT,
wimp_KEY_RETURN)) != NULL ||
wimp_KEY_PRESSED, wimp_KEY_RETURN,
main_w, first_i + rgb_RGB_GREENPERCENT)) != NULL ||
(error = callback_register (rgb->list, &Return, colour, 4,
wimp_KEY_PRESSED, main_w, first_i + rgb_RGB_BLUEPERCENT,
wimp_KEY_RETURN)) != NULL ||
wimp_KEY_PRESSED, wimp_KEY_RETURN,
main_w, first_i + rgb_RGB_BLUEPERCENT)) != NULL ||
/*Other keypresses are passed on.*/
(error = callback_register (rgb->list, &Pass, colour, 1,
......@@ -1568,8 +1568,8 @@ static os_error *Dialogue_Starting (task_r r, wimp_w main_w,
/*Clicks on all the desktop colour icons.*/
for (c = 0; c < 16; c++)
if ((error = callback_register (rgb->list, &Desktop, colour, 5,
wimp_MOUSE_CLICK, main_w, first_i + Desktop_Colours [c],
wimp_CLICK_SELECT, NONE)) != NULL)
wimp_MOUSE_CLICK, wimp_CLICK_SELECT, NONE,
main_w, first_i + Desktop_Colours [c])) != NULL)
goto finish;
if (colour_out != NULL) *colour_out = colour;
......
......@@ -14,7 +14,7 @@
;
title-string: ColourPicker
help-string: Colour_Picker 0.36
help-string: Colour_Picker 0.38
swi-chunk-base-number: 0x47700
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment