summaryrefslogtreecommitdiff
path: root/ULabel.c
diff options
context:
space:
mode:
Diffstat (limited to 'ULabel.c')
-rw-r--r--ULabel.c92
1 files changed, 33 insertions, 59 deletions
diff --git a/ULabel.c b/ULabel.c
index 56d5ca0..ef9ecd2 100644
--- a/ULabel.c
+++ b/ULabel.c
@@ -109,13 +109,16 @@ static XtResource resources[] = {
};
#undef offset
-static void Initialize();
-static void Resize();
-static void Redisplay();
-static Boolean SetValues();
-static void ClassInitialize();
-static void Destroy();
-static XtGeometryResult QueryGeometry();
+static void Initialize(Widget request, Widget new,
+ ArgList args, Cardinal *num_args);
+static void Resize(Widget w);
+static void Redisplay(Widget gw, XEvent *event, Region region);
+static Boolean SetValues(Widget current, Widget request, Widget new,
+ ArgList args, Cardinal *num_args);
+static void ClassInitialize(void);
+static void Destroy(Widget w);
+static XtGeometryResult QueryGeometry(Widget w, XtWidgetGeometry *intended,
+ XtWidgetGeometry *preferred);
UCSLabelClassRec ucsLabelClassRec = {
{
@@ -169,7 +172,7 @@ WidgetClass ucsLabelWidgetClass = (WidgetClass)&ucsLabelClassRec;
*
****************************************************************/
-static void ClassInitialize()
+static void ClassInitialize(void)
{
XawInitializeWidgetSet();
XtAddConverter( XtRString, XtRJustify, XmuCvtStringToJustify,
@@ -187,10 +190,7 @@ static int buf2blen = 0;
#define TXT16 char
-static int _XawLabelWidth16(fs, str, n)
- XFontStruct *fs;
- char *str;
- int n;
+static int _XawLabelWidth16(XFontStruct *fs, char *str, int n)
{
int i;
XChar2b *ptr;
@@ -206,13 +206,8 @@ static int _XawLabelWidth16(fs, str, n)
return XTextWidth16(fs, buf2b, n);
}
-static void _XawLabelDraw16(dpy, d, gc, x, y, str, n)
- Display *dpy;
- Drawable d;
- GC gc;
- int x, y;
- char *str;
- int n;
+static void _XawLabelDraw16(Display *dpy, Drawable d, GC gc,
+ int x, int y, char *str, int n)
{
int i;
XChar2b *ptr;
@@ -233,13 +228,8 @@ static void _XawLabelDraw16(dpy, d, gc, x, y, str, n)
#endif /* WORD64 */
-static void _XawLabelDrawUCS(dpy, d, gc, x, y, str, n)
- Display *dpy;
- Drawable d;
- GC gc;
- int x, y;
- char *str;
- int n;
+static void _XawLabelDrawUCS(Display *dpy, Drawable d, GC gc,
+ int x, int y, char *str, int n)
{
char *ep;
unsigned short codepoint;
@@ -320,8 +310,7 @@ static int _XawLabelWidthUCS(
* Calculate width and height of displayed text in pixels
*/
-static void SetTextWidthAndHeight(lw)
- UCSLabelWidget lw;
+static void SetTextWidthAndHeight(UCSLabelWidget lw)
{
XFontStruct *fs = lw->label.font;
@@ -431,8 +420,7 @@ static void SetTextWidthAndHeight(lw)
}
}
-static void GetnormalGC(lw)
- UCSLabelWidget lw;
+static void GetnormalGC(UCSLabelWidget lw)
{
XGCValues values;
@@ -454,8 +442,7 @@ static void GetnormalGC(lw)
&values);
}
-static void GetgrayGC(lw)
- UCSLabelWidget lw;
+static void GetgrayGC(UCSLabelWidget lw)
{
XGCValues values;
@@ -485,8 +472,7 @@ static void GetgrayGC(lw)
&values);
}
-static void compute_bitmap_offsets (lw)
- UCSLabelWidget lw;
+static void compute_bitmap_offsets(UCSLabelWidget lw)
{
/*
* bitmap will be eventually be displayed at
@@ -502,8 +488,7 @@ static void compute_bitmap_offsets (lw)
}
-static void set_bitmap_info (lw)
- UCSLabelWidget lw;
+static void set_bitmap_info(UCSLabelWidget lw)
{
Window root;
int x, y;
@@ -521,10 +506,8 @@ static void set_bitmap_info (lw)
/* ARGSUSED */
-static void Initialize(request, new, args, num_args)
- Widget request, new;
- ArgList args;
- Cardinal *num_args;
+static void
+Initialize(Widget request, Widget new, ArgList args, Cardinal *num_args)
{
UCSLabelWidget lw = (UCSLabelWidget) new;
@@ -560,10 +543,7 @@ static void Initialize(request, new, args, num_args)
*/
/* ARGSUSED */
-static void Redisplay(gw, event, region)
- Widget gw;
- XEvent *event;
- Region region;
+static void Redisplay(Widget gw, XEvent *event, Region region)
{
UCSLabelWidget w = (UCSLabelWidget) gw;
GC gc;
@@ -676,10 +656,8 @@ static void Redisplay(gw, event, region)
#endif /* notdef */
}
-static void _Reposition(lw, width, height, dx, dy)
- UCSLabelWidget lw;
- Dimension width, height;
- Position *dx, *dy;
+static void _Reposition(UCSLabelWidget lw, Dimension width, Dimension height,
+ Position *dx, Position *dy)
{
Position newPos;
Position leftedge = lw->label.internal_width + LEFT_OFFSET(lw);
@@ -710,8 +688,7 @@ static void _Reposition(lw, width, height, dx, dy)
return;
}
-static void Resize(w)
- Widget w;
+static void Resize(Widget w)
{
UCSLabelWidget lw = (UCSLabelWidget)w;
Position dx, dy;
@@ -729,10 +706,9 @@ static void Resize(w)
#define HEIGHT 2
#define NUM_CHECKS 3
-static Boolean SetValues(current, request, new, args, num_args)
- Widget current, request, new;
- ArgList args;
- Cardinal *num_args;
+static Boolean
+SetValues(Widget current, Widget request, Widget new,
+ ArgList args, Cardinal *num_args)
{
UCSLabelWidget curlw = (UCSLabelWidget) current;
UCSLabelWidget reqlw = (UCSLabelWidget) request;
@@ -827,8 +803,7 @@ static Boolean SetValues(current, request, new, args, num_args)
XtIsSensitive(current) != XtIsSensitive(new);
}
-static void Destroy(w)
- Widget w;
+static void Destroy(Widget w)
{
UCSLabelWidget lw = (UCSLabelWidget)w;
@@ -840,9 +815,8 @@ static void Destroy(w)
}
-static XtGeometryResult QueryGeometry(w, intended, preferred)
- Widget w;
- XtWidgetGeometry *intended, *preferred;
+static XtGeometryResult
+QueryGeometry(Widget w, XtWidgetGeometry *intended, XtWidgetGeometry *preferred)
{
UCSLabelWidget lw = (UCSLabelWidget)w;