Ticket #3632: refactoring of widget flags.

Initial commit: rename functions:
  * widget_default_set_options_callback -> widget_default_set_options
  * input_set_options_callback -> input_set_options

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
Andrew Borodin 2016-04-10 10:14:18 +03:00
parent 5251045950
commit 619480c68b
3 changed files with 6 additions and 6 deletions

View File

@ -977,11 +977,11 @@ input_mouse_callback (Widget * w, mouse_msg_t msg, mouse_event_t * event)
* @param enable TRUE if specified options should be added, FALSE if options should be removed
*/
static void
input_set_options_callback (Widget * w, widget_options_t options, gboolean enable)
input_set_options (Widget * w, widget_options_t options, gboolean enable)
{
WInput *in = INPUT (w);
widget_default_set_options_callback (w, options, enable);
widget_default_set_options (w, options, enable);
if (in->label != NULL)
widget_set_options (WIDGET (in->label), options, enable);
}
@ -1011,7 +1011,7 @@ input_new (int y, int x, const int *colors, int width, const char *def_text,
w = WIDGET (in);
widget_init (w, y, x, 1, width, input_callback, input_mouse_callback);
w->options |= W_IS_INPUT;
w->set_options = input_set_options_callback;
w->set_options = input_set_options;
in->color = colors;
in->first = TRUE;

View File

@ -147,7 +147,7 @@ widget_init (Widget * w, int y, int x, int lines, int cols,
w->pos_flags = WPOS_KEEP_DEFAULT;
w->callback = callback;
w->mouse_callback = mouse_callback;
w->set_options = widget_default_set_options_callback;
w->set_options = widget_default_set_options;
w->owner = NULL;
w->mouse.forced_capture = FALSE;
w->mouse.capture = FALSE;
@ -195,7 +195,7 @@ widget_default_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm
* @param enable TRUE if specified options should be added, FALSE if options should be removed
*/
void
widget_default_set_options_callback (Widget * w, widget_options_t options, gboolean enable)
widget_default_set_options (Widget * w, widget_options_t options, gboolean enable)
{
if (enable)
w->options |= options;

View File

@ -153,7 +153,7 @@ void widget_init (Widget * w, int y, int x, int lines, int cols,
/* Default callback for widgets */
cb_ret_t widget_default_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm,
void *data);
void widget_default_set_options_callback (Widget * w, widget_options_t options, gboolean enable);
void widget_default_set_options (Widget * w, widget_options_t options, gboolean enable);
void widget_set_options (Widget * w, widget_options_t options, gboolean enable);
void widget_set_size (Widget * widget, int y, int x, int lines, int cols);
/* select color for widget in dependance of state */