X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=winboard%2Fwsnap.h;h=7cc428d8e644accaec3b2c3552f776ad22dad1e9;hb=0efdc4c5ef60cf4c15e9dddf3658d2115e4d5d93;hp=818144ad37d01b5b1ba901f2ab85b240cff41340;hpb=93077be9f3009b8eb6ad64067f31d000aaf284c3;p=xboard.git diff --git a/winboard/wsnap.h b/winboard/wsnap.h index 818144a..7cc428d 100644 --- a/winboard/wsnap.h +++ b/winboard/wsnap.h @@ -1,43 +1,43 @@ -/* - * Smart "snapping" for window moving and sizing - * - * Author: Alessandro Scotti (Dec 2005) - * - * ------------------------------------------------------------------------ - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * ------------------------------------------------------------------------ - */ -#ifndef WSNAP_H_ -#define WSNAP_H_ - -#include - -#define MAX_SNAP_POINTS 12 - -#define SNAP_DISTANCE 4 - -typedef struct { - int x_grid[ MAX_SNAP_POINTS ]; - int x_grid_len; - int y_grid[ MAX_SNAP_POINTS ]; - int y_grid_len; -} SnapData; - -LRESULT OnEnterSizeMove( SnapData * snapData, HWND hWnd, WPARAM wParam, LPARAM lParam ); -LRESULT OnMoving( SnapData * snapData, HWND hWnd, WPARAM wParam, LPARAM lParam ); -LRESULT OnSizing( SnapData * snapData, HWND hWnd, WPARAM wParam, LPARAM lParam ); -LRESULT OnExitSizeMove( SnapData * snapData, HWND hWnd, WPARAM wParam, LPARAM lParam ); - -#endif // WSNAP_H_ +/* + * Smart "snapping" for window moving and sizing + * + * Author: Alessandro Scotti (Dec 2005) + * + * ------------------------------------------------------------------------ + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * ------------------------------------------------------------------------ + */ +#ifndef WSNAP_H_ +#define WSNAP_H_ + +#include + +#define MAX_SNAP_POINTS 12 + +#define SNAP_DISTANCE 4 + +typedef struct { + int x_grid[ MAX_SNAP_POINTS ]; + int x_grid_len; + int y_grid[ MAX_SNAP_POINTS ]; + int y_grid_len; +} SnapData; + +LRESULT OnEnterSizeMove( SnapData * snapData, HWND hWnd, WPARAM wParam, LPARAM lParam ); +LRESULT OnMoving( SnapData * snapData, HWND hWnd, WPARAM wParam, LPARAM lParam ); +LRESULT OnSizing( SnapData * snapData, HWND hWnd, WPARAM wParam, LPARAM lParam ); +LRESULT OnExitSizeMove( SnapData * snapData, HWND hWnd, WPARAM wParam, LPARAM lParam ); + +#endif // WSNAP_H_