projects
/
chise
/
xemacs-chise.git-
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Reformatted.
[chise/xemacs-chise.git-]
/
src
/
balloon_help.c
diff --git
a/src/balloon_help.c
b/src/balloon_help.c
index
b73a711
..
5001c7d
100644
(file)
--- a/
src/balloon_help.c
+++ b/
src/balloon_help.c
@@
-32,8
+32,8
@@
Boston, MA 02111-1307, USA. */
#include <config.h>
#include <string.h>
#include <config.h>
#include <string.h>
-#include <stdio.h>
#include <stdlib.h>
#include <stdlib.h>
+#include <stdio.h>
#include <assert.h>
#include <X11/Xlib.h>
#include <assert.h>
#include <X11/Xlib.h>
@@
-44,7
+44,7
@@
Boston, MA 02111-1307, USA. */
#include "balloon_help.h"
#include "balloon_help.h"
-#ifndef WINDOWSNT
+#ifndef max
#define max(x,y) (x>y?x:y)
#endif
#define max(x,y) (x>y?x:y)
#endif
@@
-83,11
+83,9
@@
static Pixmap b_mask;
static int b_maskWidth, b_maskHeight;
static GC b_maskGC;
static int b_maskWidth, b_maskHeight;
static GC b_maskGC;
-static CONST char* b_text;
+static const char* b_text;
static int b_width, b_height;
static int b_width, b_height;
-static int b_lastX, b_lastY;
-
static XtIntervalId b_timer;
static unsigned long b_delay;
static XtIntervalId b_timer;
static unsigned long b_delay;
@@
-216,7
+214,7
@@
grow_pixmap_mask (int width, int height)
============================================================================*/
static void
============================================================================*/
static void
-text_extent (XFontStruct* fontStruct, CONST char* text, int len,
+text_extent (XFontStruct* fontStruct, const char* text, int len,
int* width, int* height)
{
XCharStruct extent;
int* width, int* height)
{
XCharStruct extent;
@@
-229,13
+227,13
@@
text_extent (XFontStruct* fontStruct, CONST char* text, int len,
}
static void
}
static void
-get_text_size (Display* dpy, XFontStruct* fontStruct, CONST char* text,
+get_text_size (Display* dpy, XFontStruct* fontStruct, const char* text,
int* max_width, int* max_height)
{
int width;
int height;
int* max_width, int* max_height)
{
int width;
int height;
- CONST char* start;
- CONST char* end;
+ const char* start;
+ const char* end;
*max_width = *max_height = 0;
*max_width = *max_height = 0;
@@
-259,10
+257,10
@@
get_text_size (Display* dpy, XFontStruct* fontStruct, CONST char* text,
static void
draw_text (Display* dpy, Window win, GC gc, XFontStruct* fontStruct,
static void
draw_text (Display* dpy, Window win, GC gc, XFontStruct* fontStruct,
- int x, int y, CONST char* text)
+ int x, int y, const char* text)
{
{
- CONST char* start;
- CONST char* end;
+ const char* start;
+ const char* end;
int font_height;
y += fontStruct->ascent;
int font_height;
y += fontStruct->ascent;
@@
-364,11
+362,8
@@
show_help (XtPointer data, XtIntervalId* id)
/* make sure it is still ok with offset */
shape = get_shape (shape, x, y, b_width, b_height, b_screenWidth, b_screenHeight);
/* make sure it is still ok with offset */
shape = get_shape (shape, x, y, b_width, b_height, b_screenWidth, b_screenHeight);
- b_lastX = x;
- b_lastY = y;
b_lastShape = shape;
b_lastShape = shape;
-
make_mask (shape, x, y, b_width, b_height);
XShapeCombineMask (b_dpy, b_win, ShapeBounding, 0, 0, b_mask, ShapeSet);
make_mask (shape, x, y, b_width, b_height);
XShapeCombineMask (b_dpy, b_win, ShapeBounding, 0, 0, b_mask, ShapeSet);
@@
-543,7
+538,7
@@
balloon_help_set_delay (unsigned long milliseconds)
}
void
}
void
-balloon_help_show (CONST char* text)
+balloon_help_show (const char* text)
{
assert (b_dpy != NULL);
{
assert (b_dpy != NULL);
@@
-598,9
+593,6
@@
balloon_help_move_to_pointer (void)
if (shape == b_lastShape)
{
if (shape == b_lastShape)
{
- b_lastX = x;
- b_lastY = y;
-
XMoveWindow (b_dpy, b_win,
shape & SHAPE_CONE_LEFT ? x : x - b_width,
shape & SHAPE_CONE_TOP ? y : y - b_height);
XMoveWindow (b_dpy, b_win,
shape & SHAPE_CONE_LEFT ? x : x - b_width,
shape & SHAPE_CONE_TOP ? y : y - b_height);