summaryrefslogtreecommitdiff
path: root/CutPaste.c
diff options
context:
space:
mode:
authorKaleb Keithley <kaleb@freedesktop.org>2003-11-17 19:03:47 +0000
committerKaleb Keithley <kaleb@freedesktop.org>2003-11-17 19:03:47 +0000
commit3e9f89c7239ae0cf1599277cc879a03cdf33b7c8 (patch)
tree602d4a70b9731fe873a020e8adcdd0b7923a805c /CutPaste.c
parent0bd1f9d8ccaf46397745779f5964f3b843186896 (diff)
merge XFree86 4.3.0.1 to -CURRENT
Diffstat (limited to 'CutPaste.c')
-rw-r--r--CutPaste.c52
1 files changed, 18 insertions, 34 deletions
diff --git a/CutPaste.c b/CutPaste.c
index 7b20fcc..3a2a30f 100644
--- a/CutPaste.c
+++ b/CutPaste.c
@@ -26,6 +26,7 @@ other dealings in this Software without prior written authorization
from The Open Group.
*/
+/* $XFree86: xc/programs/bitmap/CutPaste.c,v 1.5 2002/02/18 21:43:17 herrb Exp $ */
/*
* Author: Davor Matic, MIT X Consortium
@@ -39,9 +40,6 @@ from The Open Group.
#include <stdio.h>
#include <math.h>
-#ifndef abs
-#define abs(x) (((x) > 0) ? (x) : -(x))
-#endif
#define min(x, y) (((x) < (y)) ? (x) : (y))
#define max(x, y) (((x) > (y)) ? (x) : (y))
@@ -53,12 +51,9 @@ extern Boolean DEBUG;
*****************************************************************************/
/* ARGSUSED */
-Boolean ConvertSelection(w, selection, target, type, val_ret, length, format)
- Widget w;
- Atom *selection, *target, *type;
- XtPointer *val_ret;
- unsigned long *length;
- int *format;
+static Boolean
+ConvertSelection(Widget w, Atom *selection, Atom *target, Atom *type,
+ XtPointer *val_ret, unsigned long *length, int *format)
{
XPointer *value = (XPointer *)val_ret;
BitmapWidget BW = (BitmapWidget) w;
@@ -111,9 +106,8 @@ Boolean ConvertSelection(w, selection, target, type, val_ret, length, format)
}
/* ARGSUSED */
-void LoseSelection(w, selection)
- Widget w;
- Atom *selection;
+static void
+LoseSelection(Widget w, Atom selection)
{
BitmapWidget BW = (BitmapWidget) w;
@@ -125,9 +119,8 @@ void LoseSelection(w, selection)
}
/* ARGSUSED */
-void SelectionDone(w, selection, target)
- Widget w;
- Atom *selection, *target;
+static void
+SelectionDone(Widget w, Atom *selection, Atom *target)
{
/* Done Automatically ?!?
@@ -139,30 +132,24 @@ void SelectionDone(w, selection, target)
*/
}
-void BWGrabSelection(w, btime)
- Widget w;
- Time btime;
+void
+BWGrabSelection(Widget w, Time btime)
{
BitmapWidget BW = (BitmapWidget) w;
BW->bitmap.selection.own = XtOwnSelection(w, XA_PRIMARY, btime,
ConvertSelection,
- LoseSelection,
+ (XtLoseSelectionProc)LoseSelection,
SelectionDone);
if (DEBUG && BW->bitmap.selection.own)
fprintf(stderr, "Own the selection\n");
}
-XImage *GetImage();
/* ARGSUSED */
-void SelectionCallback(w, cldat, selection, type, val, length, format)
- Widget w;
- XtPointer cldat;
- Atom *selection, *type;
- XtPointer val;
- unsigned long *length;
- int *format;
+static void
+SelectionCallback(Widget w, XtPointer cldat, Atom *selection, Atom *type,
+ XtPointer val, unsigned long *length, int *format)
{
XPointer value = (XPointer)val;
BitmapWidget BW = (BitmapWidget) w;
@@ -186,10 +173,8 @@ void SelectionCallback(w, cldat, selection, type, val, length, format)
BW->bitmap.selection.limbo = FALSE;
}
-void BWRequestSelection(w, btime, wait)
- Widget w;
- Time btime;
- Boolean wait;
+void
+BWRequestSelection(Widget w, Time btime, Boolean wait)
{
BitmapWidget BW = (BitmapWidget) w;
@@ -212,9 +197,8 @@ void BWRequestSelection(w, btime, wait)
/* ARGSUSED */
/* Returns true if there is a transferable selection */
-Boolean BWQuerySelection(w, btime)
- Widget w;
- Time btime;
+Boolean
+BWQuerySelection(Widget w, Time btime)
{
/* To be written. XA_TARGETS to be used. So far undefined ?!? */