X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=winboard%2Fwsnap.h;h=0b5b1172b1027369f1f4fd971eea97750be4bad7;hb=HEAD;hp=5fb226e82fcdf02412469ed84ea5b1f5c6108a9e;hpb=2380bd9a886c088ba6040d99932c20cdf080fbbb;p=xboard.git diff --git a/winboard/wsnap.h b/winboard/wsnap.h index 5fb226e..0b5b117 100644 --- a/winboard/wsnap.h +++ b/winboard/wsnap.h @@ -1,43 +1,46 @@ -/* - * wsnap.h -- Smart "snapping" for window moving and sizing - * - * Author: Alessandro Scotti - * - * ------------------------------------------------------------------------ - * 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) + * + * Copyright 2005 Alessandro Scotti + * + * ------------------------------------------------------------------------ + * GNU XBoard 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 3 of the License, or (at + * your option) any later version. + * + * GNU XBoard 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, see http://www.gnu.org/licenses/. * + * + *------------------------------------------------------------------------ + ** See the file ChangeLog for a revision history. */ + +#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_