mirror of
https://github.com/oliverschmidt/contiki.git
synced 2025-02-22 06:29:01 +00:00
CTK_WINDOW_CLOSE support is enhanced.
CTK_CONF_HYPERLINK is introduced. Both are for the memory sake.
This commit is contained in:
parent
9f753bf737
commit
2f121a1609
@ -44,7 +44,7 @@
|
|||||||
*
|
*
|
||||||
* This file is part of the Contiki operating system.
|
* This file is part of the Contiki operating system.
|
||||||
*
|
*
|
||||||
* $Id: ctk.c,v 1.8 2007/11/18 01:46:53 oliverschmidt Exp $
|
* $Id: ctk.c,v 1.9 2007/11/28 10:13:57 matsutsuka Exp $
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -390,6 +390,7 @@ ctk_window_open(CC_REGISTER_ARG struct ctk_window *w)
|
|||||||
void
|
void
|
||||||
ctk_window_close(struct ctk_window *w)
|
ctk_window_close(struct ctk_window *w)
|
||||||
{
|
{
|
||||||
|
#if CTK_CONF_WINDOWCLOSE
|
||||||
static struct ctk_window *w2;
|
static struct ctk_window *w2;
|
||||||
|
|
||||||
if(w == NULL) {
|
if(w == NULL) {
|
||||||
@ -429,6 +430,7 @@ ctk_window_close(struct ctk_window *w)
|
|||||||
make_desktopmenu();
|
make_desktopmenu();
|
||||||
#endif /* CTK_CONF_MENUS */
|
#endif /* CTK_CONF_MENUS */
|
||||||
redraw |= REDRAW_ALL;
|
redraw |= REDRAW_ALL;
|
||||||
|
#endif /* CTK_CONF_WINDOWCLOSE */
|
||||||
}
|
}
|
||||||
/*---------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------*/
|
||||||
/**
|
/**
|
||||||
@ -963,9 +965,12 @@ select_widget(struct ctk_widget *focus)
|
|||||||
/* The operation changed the focus, so we emit a "hover" signal
|
/* The operation changed the focus, so we emit a "hover" signal
|
||||||
for those widgets that support it. */
|
for those widgets that support it. */
|
||||||
|
|
||||||
|
#if CTK_CONF_HYPERLINK
|
||||||
if(window->focused->type == CTK_WIDGET_HYPERLINK) {
|
if(window->focused->type == CTK_WIDGET_HYPERLINK) {
|
||||||
process_post(window->owner, ctk_signal_hyperlink_hover, window->focused);
|
process_post(window->owner, ctk_signal_hyperlink_hover, window->focused);
|
||||||
} else if(window->focused->type == CTK_WIDGET_BUTTON) {
|
} else
|
||||||
|
#endif /* CTK_CONF_HYPERLINK */
|
||||||
|
if(window->focused->type == CTK_WIDGET_BUTTON) {
|
||||||
process_post(window->owner, ctk_signal_button_hover, window->focused);
|
process_post(window->owner, ctk_signal_button_hover, window->focused);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1132,8 +1137,10 @@ activate(CC_REGISTER_ARG struct ctk_widget *w)
|
|||||||
process_post(w->window->owner, ctk_signal_widget_activate, w);
|
process_post(w->window->owner, ctk_signal_widget_activate, w);
|
||||||
}
|
}
|
||||||
#endif /* CTK_CONF_ICONS */
|
#endif /* CTK_CONF_ICONS */
|
||||||
|
#if CTK_CONF_HYPERLINK
|
||||||
} else if(w->type == CTK_WIDGET_HYPERLINK) {
|
} else if(w->type == CTK_WIDGET_HYPERLINK) {
|
||||||
process_post(PROCESS_BROADCAST, ctk_signal_hyperlink_activate, w);
|
process_post(PROCESS_BROADCAST, ctk_signal_hyperlink_activate, w);
|
||||||
|
#endif /* CTK_CONF_HYPERLINK */
|
||||||
} else if(w->type == CTK_WIDGET_TEXTENTRY) {
|
} else if(w->type == CTK_WIDGET_TEXTENTRY) {
|
||||||
if(w->widget.textentry.state == CTK_TEXTENTRY_NORMAL) {
|
if(w->widget.textentry.state == CTK_TEXTENTRY_NORMAL) {
|
||||||
w->widget.textentry.state = CTK_TEXTENTRY_EDIT;
|
w->widget.textentry.state = CTK_TEXTENTRY_EDIT;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user