Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
* Re: linux/alpha problems (libXt, XmGetTearOffControl() )
@ 1998-02-17 13:21 Uncle George
  0 siblings, 0 replies; only message in thread
From: Uncle George @ 1998-02-17 13:21 UTC (permalink / raw)


This is a multi-part message in MIME format.
--------------35D6B230EBBA446C03692095
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

I noticed that there is a build prob between ( redhat 5.0 ) libXt & lesstif.
the parameters for _XtWaitForSomething() are different.
The XFree build of libXt has the logical parameters of WaitFor as char ( if u
resolve the typedef ), whereas in lesstif it has them defined as int. I think
for the alpha the boolean ( Boolean & _XtBoolean) should be int, as it is more
efficient, ergo the Xt pkg should be rebuilt for the alpha. This problem is
indicative of a build prob for the alpha box. the flags NeedWidePrototypes &
NeedFunctionPrototypes should be a part of the alpha build for XFREE.
any comments?

    -ALSO-

XmTearOffControl() doe not appear to be working, i keep getting a null pointer
back.
I used the test/xm/tearoff/test1.c, and have modified it ( see attachment ) to
simulate my problem.
According to java ( src code ) , and the motif documentation i should have
gotten the widget of the tear-off-control.
so whats wrong?!

Alexander V. Lukyanov wrote:

> Hello,
>
> I have some problems with _MOTIF_WM_HINTS on linux/alpha platform.
> It seems there is somewhere wrong int/pointer/long conversion, so it can be
> seen on alpha, but not on 32bit machines.
>
>    Alexander.

--------------35D6B230EBBA446C03692095
Content-Type: text/plain; charset=us-ascii; name="a.c"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline; filename="a.c"

/** test6 -- a menu bar with two pulldown menu, all made of widgets
**/

#include <Xm/Xm.h>
#include <Xm/RowColumn.h>
#include <Xm/PushB.h>
#include <Xm/PushBG.h>
#include <Xm/CascadeB.h>
#include <Xm/Separator.h>
#include <stdio.h>

void Callback(Widget w, XtPointer client, XtPointer call)
{
    printf("* Widget = %s - %s\n", XtName(w), (char *)client);
}

int
main(int argd, char **argv)
{
    XtAppContext theApp;
    Widget toplevel, rc;
    Widget cascade1;
    Widget pane1;
    Widget w;
    int			argc;
    Pixel		bg;
    Arg			args[10];
    Widget		tearOff;

    toplevel = XtVaAppInitialize(&theApp, "test1", NULL, 0,
				 &argd, argv, NULL, NULL);

    rc = XmCreateMenuBar(toplevel, "menubar", NULL, 0);

    XtVaGetValues(toplevel, XmNbackground, &bg, NULL);

    argc = 0;
    XtSetArg(args[argc], XmNbackground, bg); argc++;
	XtSetArg(args[argc], XmNtearOffModel, XmTEAR_OFF_ENABLED); argc++;

    pane1 = XmCreatePulldownMenu(rc, "pane1", args, argc);

    tearOff = XmGetTearOffControl(pane1);
    cascade1 = XtVaCreateManagedWidget("cascade1", xmCascadeButtonWidgetClass, rc,
		XmNsubMenuId, pane1,
	NULL);
    tearOff = XmGetTearOffControl(pane1);

    w = XtVaCreateManagedWidget("button 1", xmPushButtonWidgetClass, pane1, NULL);
    tearOff = XmGetTearOffControl(pane1);
    XtAddCallback(w, XmNactivateCallback, Callback, "Activate");
    XtAddCallback(w, XmNarmCallback, Callback, "Arm");
    XtAddCallback(w, XmNdisarmCallback, Callback, "Disarm");

    w = XtVaCreateManagedWidget("button 2", xmPushButtonWidgetClass, pane1, NULL);
    tearOff = XmGetTearOffControl(pane1);
    XtAddCallback(w, XmNactivateCallback, Callback, "Activate");
    XtAddCallback(w, XmNarmCallback, Callback, "Arm");
    XtAddCallback(w, XmNdisarmCallback, Callback, "Disarm");

    w = XtVaCreateManagedWidget("button 2", xmSeparatorWidgetClass, pane1, NULL);
    tearOff = XmGetTearOffControl(pane1);

    w = XtVaCreateManagedWidget("gadget 3", xmPushButtonGadgetClass, pane1, NULL);
    XtAddCallback(w, XmNactivateCallback, Callback, "Activate");
    XtAddCallback(w, XmNarmCallback, Callback, "Arm");
    XtAddCallback(w, XmNdisarmCallback, Callback, "Disarm");
    tearOff = XmGetTearOffControl(pane1);

    XtManageChild(rc);
    tearOff = XmGetTearOffControl(pane1);
    XtRealizeWidget(toplevel);
    tearOff = XmGetTearOffControl(pane1);
    XtAppMainLoop(theApp);    
    tearOff = XmGetTearOffControl(pane1);
    exit(0);
}

--------------35D6B230EBBA446C03692095--

-- 
To unsubscribe: send e-mail to axp-list-request@redhat.com with
'unsubscribe' as the subject.  Do not send it to axp-list@redhat.com

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~1998-02-17 13:21 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1998-02-17 13:21 linux/alpha problems (libXt, XmGetTearOffControl() ) Uncle George

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox