static void p_resize_motion(WWindow *wwin, XMotionEvent *ev, int dx, int dy) { WMoveresMode *mode=moveres_mode((WRegion*)wwin); if(mode!=NULL){ moveresmode_delta_resize(mode, p_dx1mul*dx, p_dx2mul*dx, p_dy1mul*dy, p_dy2mul*dy, NULL); } }
/*EXTL_DOC * Move resize mode target one step: * * \begin{tabular}{rl} * \hline * \var{horizmul}/\var{vertmul} & effect \\\hline * -1 & Move left/up \\ * 0 & No effect \\ * 1 & Move right/down \\ * \end{tabular} */ EXTL_EXPORT_MEMBER void moveresmode_move(WMoveresMode *mode, int horizmul, int vertmul) { int accel_mode=0, dummy=0; if(!setup_resize_timer(mode)) return; accel_mode=1+3*limit_and_encode_mode(&horizmul, &vertmul, &dummy, &dummy); moveresmode_accel(mode, &horizmul, &vertmul, accel_mode); moveresmode_delta_resize(mode, horizmul, horizmul, vertmul, vertmul, NULL); }
/*EXTL_DOC * Shrink or grow resize mode target one step in each direction. * Acceptable values for the parameters \var{left}, \var{right}, \var{top} * and \var{bottom} are as follows: -1: shrink along, * 0: do not change, 1: grow along corresponding border. */ EXTL_EXPORT_MEMBER void moveresmode_resize(WMoveresMode *mode, int left, int right, int top, int bottom) { int wu=0, hu=0; int accel_mode=0; if(!setup_resize_timer(mode)) return; accel_mode=3*limit_and_encode_mode(&left, &right, &top, &bottom); resize_units(mode, &wu, &hu); moveresmode_accel(mode, &wu, &hu, accel_mode); moveresmode_delta_resize(mode, -left*wu, right*wu, -top*hu, bottom*hu, NULL); }