This file is indexed.

/usr/include/paragui/pgwidgetdnd.h is in libparagui1.1-dev 1.1.8-3.1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
/*
    ParaGUI - crossplatform widgetset
    Copyright (C) 2000,2001,2002  Alexander Pipelka
 
    This library is free software; you can redistribute it and/or
    modify it under the terms of the GNU Library General Public
    License as published by the Free Software Foundation; either
    version 2 of the License, or (at your option) any later version.
 
    This library 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
    Library General Public License for more details.
 
    You should have received a copy of the GNU Library General Public
    License along with this library; if not, write to the Free
    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 
    Alexander Pipelka
    pipelka@teleweb.at
 
    Last Update:      $Author: braindead $
    Update Date:      $Date: 2003/12/02 15:27:58 $
    Source File:      $Source: /cvsroot/paragui/paragui/include/pgwidgetdnd.h,v $
    CVS/RCS Revision: $Revision: 1.3.2.1 $
    Status:           $State: Exp $
*/

#ifndef PG_WIDGETDND_H
#define PG_WIDGETDND_H

#include "pgwidget.h"

/**
	@author Alexander Pipelka
 
	@short Drag and drop handler.
 
	All classes that would ever require drag and drop functionality
	(esentially all widgets) derive from this (eventually). Handles both the
	sending and receiving of all DnD events.
*/

class DECLSPEC PG_WidgetDnD : public PG_Widget  {
public:

	/**
	*/
	PG_WidgetDnD(PG_Widget* parent, int dndID, const PG_Rect& r);

	/**
	*/
	PG_WidgetDnD(PG_Widget* parent, int dndID, const PG_Rect& r, bool bCreateSurface);

	/**
	*/
	~PG_WidgetDnD();

	/**  */
	bool GetDrop();

	/**  */
	bool GetDrag();

	/**  */
	void RemoveObjectDnD(PG_WidgetDnD* obj);

	/**  */
	void SetDrop(bool drop);

	/**  */
	void SetDrag(bool drag);

	/**  */
	void updateDragArea(PG_Point pt, SDL_Surface* image);

	/**  */
	void drawDragArea(PG_Point pt, SDL_Surface* image);

protected: // Protected methods

	/**  */
	PG_WidgetDnD* FindDropTarget(PG_Point pt);

	/**  */
	bool eventMouseButtonDown(const SDL_MouseButtonEvent* button);

	/**  */
	bool eventMouseMotion(const SDL_MouseMotionEvent* motion);

	/**  */
	bool eventMouseButtonUp(const SDL_MouseButtonEvent* button);

	/**  */
	virtual bool AcceptDrop(PG_WidgetDnD* source, int dndID);

	/**  */
	virtual bool eventDragStart();

	/**  */
	virtual bool eventDragDrop(PG_WidgetDnD* source, int dndID);

	/**  */
	virtual bool eventDragCancel();

	/**  */
	virtual SDL_Surface* eventQueryDragImage();

	/**  */
	virtual SDL_Surface* eventQueryDropImage(SDL_Surface* dragimage = NULL);

	PG_WidgetDnD* dnd_next;
	static PG_WidgetDnD* dnd_objectlist;

private:

	/**  */
	void cacheDragArea(PG_Point p);

	/**  */
	void restoreDragArea(PG_Point p);

	/**  */
	void CheckCursorPos(int& x, int& y);

	/**  */
	void slideDragImage(PG_Point start, PG_Point end, int steps, SDL_Surface* image);

	bool		CanDrag;
	bool		CanDrop;
	bool		Draging;
	PG_Point dragPointStart;
	PG_Point dragPointOld;
	PG_Point dragPointCurrent;
	SDL_Surface* dragimage;
	SDL_Surface* dragimagecache;

private: // disable the copy operators

	PG_WidgetDnD(const PG_WidgetDnD&);
	PG_WidgetDnD& operator=(const PG_WidgetDnD&);

};

#endif // PG_WIDGETDND_H