18,6 → 18,7 |
|
int win_font; |
|
static window_t Window; |
|
static pos_t old_pos; |
|
35,18 → 36,33 |
|
void adjust_frame(window_t *win); |
|
//#include "timer.h" |
ctrl_t *win_get_child(window_t *win, int x, int y) |
{ |
ctrl_t *child = NULL; |
|
#include "control.inc" |
//#include "io.inc" |
#include "timer.inc" |
if( win ) |
{ |
if(pt_in_rect(&win->client, x, y)) |
{ |
ctrl_t *tmp = (ctrl_t*)win->child.next; |
|
//#include "button.inc" |
//#include "scroller.inc" |
while( &tmp->link != &win->child ) |
{ |
if(pt_in_rect(&tmp->rc, x, y)) |
{ |
child = get_child(tmp, x, y); |
return child == NULL ? tmp : child; |
}; |
tmp = (ctrl_t*)tmp->link.next; |
}; |
} |
else child = (ctrl_t*)(&win->frame); |
}; |
return child; |
}; |
|
static window_t Window; |
|
|
|
void init_frame(window_t *win); |
|
window_t *create_window(char *caption, int style, int x, int y, |