Closed
Bug 14642
Opened 27 years ago
Closed 27 years ago
gtk widget test fails
Categories
(Core :: XUL, defect, P3)
Tracking
()
VERIFIED
INVALID
People
(Reporter: jgracer, Assigned: jgracer)
Details
After compiling the shared libraries and exports etc., I've build the widget
program in widget/tests/widget, and nothing is displayed to the screen. After
the message gdk_add_input or something, there is nothing else till I kill it.
Look at the "little" test program below:
#include <stdio.h>
#include <stdlib.h>
#include "nsIWidget.h"
#include "nsIFactory.h"
#include "nsIComponentManager.h"
#include "nsIServiceManager.h"
#include "nsIEventQueueService.h"
#include "nsIEventQueue.h"
#include "nsGfxCIID.h"
#include "nsWidgetsCID.h"
#include "nsIWidget.h"
#include "nsIButton.h"
#include "nsICheckButton.h"
#include "nsIRadioButton.h"
#include "nsIScrollbar.h"
#include "nsITextWidget.h"
#include "nsITextAreaWidget.h"
#include "nsGUIEvent.h"
#include "nsIEnumerator.h"
#include "nsString.h"
#include "nsRect.h"
#include "nsIRenderingContext.h"
#include "nsIListBox.h"
#include "nsIComboBox.h"
#include "nsIFileWidget.h"
#include "nsIDeviceContext.h"
#include "nsFont.h"
#include "nsIComponentManager.h"
#include "nsWidgetsCID.h"
#include "nsIAppShell.h"
#include "nsWidgetSupport.h"
nsIWidget *window = 0;
char * gFailedMsg = 0;
static const nsIID kCWindowCID = {
0x2d96b3d0, 0xc051, 0x11d1, {
0xa8, 0x27, 0x00, 0x40, 0x95, 0x9a, 0x28, 0xc9 }
};
static const nsIID kCAppShellCID = {
0x2d96b3df, 0xc051, 0x11d1, {
0xa8, 0x27, 0x00, 0x40, 0x95, 0x9a, 0x28, 0xc9 }
};
static const nsIID kIWidgetIID = {
0x18032ad5, 0xb265, 0x11d1, {
0xaa, 0x2a, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0 }
};
static const nsIID kIAppShellIID = {
0xa0757c31, 0xeeac, 0x11d1, {
0x9e, 0xc1, 0x0, 0xaa, 0x0, 0x2f, 0xb8, 0x21 }
};
static NS_DEFINE_IID(kCToolkitCID, NS_TOOLKIT_CID);
nsresult main(int argc, char **argv) {
char str[256];
int i;
nsEventStatus HandleEvent(nsGUIEvent *);
nsComponentManager::RegisterComponentLib(
kCWindowCID, 0, 0, "/work/gnu/mozilla/dist/lib/libwidget_gtk.sl", 0,
0);
nsComponentManager::RegisterComponentLib(
kCAppShellCID, 0, 0, "/work/gnu/mozilla/dist/lib/libwidget_gtk.sl",
0, 0);
nsComponentManager::RegisterComponentLib(
kCToolkitCID, 0, 0, "/work/gnu/mozilla/dist/lib/libwidget_gtk.sl",
0, 0);
nsIAppShell *appShell;
nsComponentManager::CreateInstance(kCAppShellCID, 0, kIAppShellIID,
(void**)&appShell);
NS_ASSERTION(appShell, "Can't create appShell!");
appShell->Create(&argc, argv);
nsRect rect(100, 100, 600, 700);
nsComponentManager::CreateInstance(kCWindowCID, 0, kIWidgetIID,
(void**)&window);
NS_ASSERTION(window, "Can't create window!");
window->Create((nsIWidget*) 0, rect, HandleEvent, (nsIDeviceContext *)
0, appShell);
window->SetTitle("top-level window");
printf("Showing window\n");
window->Show(1);
printf("Running appshell\n");
return(appShell->Run());
}
nsEventStatus HandleEvent(nsGUIEvent *aEvent) {
printf("An event occurred\n");
return nsEventStatus_eIgnore;
}
This is an extraction that gives the same hanging result. The sample gtk
"helloworld" program distributed with the libraries uses the same commands as in
the various source and displays a window. Any ideas? The older version of
mozilla 5 from several weeks ago gave me the window and buttons and everything
else...
Updated•27 years ago
|
Assignee: trudelle → jgracer
Comment 2•27 years ago
|
||
I think the test programs aren't up-to-date, and aren't guaranteed to work
everywhere. If you'd like to use it on HPUX, you're welcome to fix it.
reassigning.
BTW, this is mostly an HTML Forms Control test.
| Assignee | ||
Updated•27 years ago
|
Status: NEW → RESOLVED
Closed: 27 years ago
Resolution: --- → INVALID
Updated•27 years ago
|
Status: RESOLVED → VERIFIED
Comment 3•27 years ago
|
||
Based on trudelle's comments, marking as verified invalid.
| Comment hidden (collapsed) |
You need to log in
before you can comment on or make changes to this bug.
Description
•