/* shared data for the image read/parse logic */
static short hexTable[256]; /* conversion value */
-static int initialized = FALSE; /* easier to fill in at run time */
+static int hex_initialized = FALSE; /* easier to fill in at run time */
/*
* Table index for the hex values. Initialized once, first time.
hexTable['}'] = -1; hexTable['\n'] = -1;
hexTable['\t'] = -1;
- initialized = TRUE;
+ hex_initialized = TRUE;
}
/*
#define Xmalloc(size) malloc(size)
/* first time initialization */
- if (initialized == FALSE) initHexTable();
+ if (hex_initialized == FALSE) initHexTable();
/* error cleanup and return macro */
#define RETURN(code) { if (data) free (data); return code; }
for (j=0; j<old_width; j++)
{
- int byte = offset[j];
+ int bite = offset[j];
new_offset[j] = ~ (unsigned char)
- ((flip_table[byte & 0xf] << 4) + flip_table[byte >> 4]);
+ ((flip_table[bite & 0xf] << 4) + flip_table[bite >> 4]);
}
}
break;
default:
- abort ();
+ ABORT ();
}
}
#ifdef __cplusplus
extern "C" {
#endif
+#ifndef __STDC__ /* Needed to avoid prototype warnings */
+#define __STDC__
+#endif
#include <compface.h>
#ifdef __cplusplus
}
0, 0, 0, 0,
SWP_NOZORDER | SWP_NOSIZE | SWP_NOMOVE
| SWP_SHOWWINDOW | SWP_NOCOPYBITS | SWP_NOACTIVATE);
+
+ /* Doing this once does not seem to be enough, for instance when
+ mapping the search dialog this gets called four times. If we
+ only set on the first time through then the subwindow never
+ gets focus as intended. However, doing this everytime doesn't
+ seem so bad, after all we only need to redo this after the
+ focus changes - and if that happens resetting the initial
+ focus doesn't seem so bad. */
+ if (IMAGE_INSTANCE_WANTS_INITIAL_FOCUS (p))
+ SetFocus (WIDGET_INSTANCE_MSWINDOWS_HANDLE (p));
#endif
}
}
}
}
+/* Account for some of the limitations with widget images. */
+static int
+mswindows_widget_border_width (void)
+{
+ return DEFAULT_WIDGET_BORDER_WIDTH;
+}
+
/* register widgets into our hashtable so that we can cope with the
callbacks. The hashtable is weak so deregistration is handled
automatically */
SendMessage (wnd, WM_SETFONT,
(WPARAM) mswindows_widget_hfont (ii, domain),
MAKELPARAM (TRUE, 0));
-#if 0
- /* #### doesn't work. need to investigate more closely. */
- if (IMAGE_INSTANCE_WANTS_INITIAL_FOCUS (ii))
- SetFocus (wnd);
-#endif
}
/* Instantiate a native layout widget. */
default_face_font_info (domain, 0, 0, &height, 0, 0);
GET_LIST_LENGTH (items, len);
- height = (height + WIDGET_BORDER_HEIGHT * 2 ) * len;
+ height = (height + DEFAULT_WIDGET_BORDER_WIDTH * 2 ) * len;
IMAGE_INSTANCE_HEIGHT (ii) = height;
/* Now create the widget. */
CONSOLE_HAS_METHOD (mswindows, image_instance_hash);
CONSOLE_HAS_METHOD (mswindows, init_image_instance_from_eimage);
CONSOLE_HAS_METHOD (mswindows, locate_pixmap_file);
+ CONSOLE_HAS_METHOD (mswindows, widget_border_width);
/* image methods - printer */
CONSOLE_INHERITS_METHOD (msprinter, mswindows, print_image_instance);