aboutsummaryrefslogtreecommitdiff
path: root/generic
diff options
context:
space:
mode:
Diffstat (limited to 'generic')
-rw-r--r--generic/tkZinc.c46
1 files changed, 37 insertions, 9 deletions
diff --git a/generic/tkZinc.c b/generic/tkZinc.c
index 8f2bd99..f84f03d 100644
--- a/generic/tkZinc.c
+++ b/generic/tkZinc.c
@@ -153,23 +153,23 @@ static Tcl_Obj *ZnImagePrint _ANSI_ARGS_((ClientData client_data, Tk_Window tkwi
char *widget_rec, int offset,
Tcl_FreeProc **free_proc));
static Tk_CustomOption reliefOption = {
- ZnReliefParse,
- ZnReliefPrint,
+ (Tk_OptionParseProc *) ZnReliefParse,
+ (Tk_OptionPrintProc *) ZnReliefPrint,
NULL
};
static Tk_CustomOption gradientOption = {
- ZnGradientParse,
- ZnGradientPrint,
+ (Tk_OptionParseProc *) ZnGradientParse,
+ (Tk_OptionPrintProc *) ZnGradientPrint,
NULL
};
static Tk_CustomOption imageOption = {
- ZnImageParse,
- ZnImagePrint,
+ (Tk_OptionParseProc *) ZnImageParse,
+ (Tk_OptionPrintProc *) ZnImagePrint,
NULL
};
static Tk_CustomOption bitmapOption = {
- ZnBitmapParse,
- ZnImagePrint,
+ (Tk_OptionParseProc *) ZnBitmapParse,
+ (Tk_OptionPrintProc *) ZnImagePrint,
NULL
};
@@ -342,7 +342,11 @@ ZnReliefParse(ClientData client_data,
{
ReliefStyle *relief_ptr = (ReliefStyle *) (widget_rec + offset);
ReliefStyle relief;
+#ifdef PTK
char *value = Tcl_GetString(ovalue);
+#else
+ char *value = (char *) ovalue;
+#endif
int result = ZN_OK;
if (value != NULL) {
@@ -362,7 +366,11 @@ ZnReliefPrint(ClientData client_data,
Tcl_FreeProc **free_proc)
{
ReliefStyle relief = *(ReliefStyle *) (widget_rec + offset);
+#ifdef PTK
return NewStringObj(ZnNameOfRelief(relief));
+#else
+ return (Tcl_Obj *) ZnNameOfRelief(relief);
+#endif
}
@@ -385,7 +393,11 @@ ZnGradientParse(ClientData client_data,
{
ZnGradient **grad_ptr = (ZnGradient **) (widget_rec + offset);
ZnGradient *grad, *prev_grad;
+#ifdef PTK
char *value = Tcl_GetString(ovalue);
+#else
+ char *value = (char *) ovalue;
+#endif
prev_grad = *grad_ptr;
if ((value != NULL) && (*value != '\0')) {
@@ -409,7 +421,11 @@ ZnGradientPrint(ClientData client_data,
Tcl_FreeProc **free_proc)
{
ZnGradient *gradient = *(ZnGradient **) (widget_rec + offset);
+#ifdef PTK
return NewStringObj(ZnNameOfGradient(gradient));
+#else
+ return (Tcl_Obj *) ZnNameOfGradient(gradient);
+#endif
}
@@ -433,7 +449,11 @@ ZnBitmapParse(ClientData client_data,
{
ZnImage *image_ptr = (ZnImage *) (widget_rec + offset);
ZnImage image, prev_image;
+#ifdef PTK
char *value = Tcl_GetString(ovalue);
+#else
+ char *value = (char *) ovalue;
+#endif
WidgetInfo *wi = (WidgetInfo*) widget_rec;
prev_image = *image_ptr;
@@ -464,7 +484,11 @@ ZnImageParse(ClientData client_data,
{
ZnImage *image_ptr = (ZnImage *) (widget_rec + offset);
ZnImage image, prev_image;
+#ifdef PTK
char *value = Tcl_GetString(ovalue);
+#else
+ char *value = (char *) ovalue;
+#endif
WidgetInfo *wi = (WidgetInfo*) widget_rec;
prev_image = *image_ptr;
@@ -493,7 +517,11 @@ ZnImagePrint(ClientData client_data,
Tcl_FreeProc **free_proc)
{
ZnImage image = *(ZnImage *) (widget_rec + offset);
+#ifdef PTK
return NewStringObj(image?ZnNameOfImage(image):"");
+#else
+ return (Tcl_Obj *) (image?ZnNameOfImage(image):"");
+#endif
}
@@ -596,8 +624,8 @@ ZincObjCmd(ClientData client_data, /* Main window associated with
wi->interp = interp;
wi->dpy = Tk_Display(tkwin);
wi->screen = Tk_Screen(tkwin);
-#ifdef GLX
wi->has_glx = False;
+#ifdef GLX
if (XQueryExtension(wi->dpy, "GLX", &major_op, &first_evt, &first_err)) {
if (glXQueryExtension(wi->dpy, &first_err, &first_evt)) {
int minor_op;