diff options
author | Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> | 2004-09-15 16:33:20 +0000 |
---|---|---|
committer | Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> | 2004-09-15 16:33:20 +0000 |
commit | fcde358d5e3b62bcf1d5e488e8021db8340eef5f (patch) | |
tree | e81bef03406f545055335b8935ea098fa2638697 /src/XawInit.c | |
parent | 3144e91fef63aaefc2690bbd639f4c457d05fc42 (diff) | |
download | xorg-lib-libXaw-fcde358d5e3b62bcf1d5e488e8021db8340eef5f.tar.gz |
Pull XORG-6_8_0 to CYGWIN branchCYGWIN-6_8_1-MERGECYGWIN-6_8_0-MERGE
Diffstat (limited to 'src/XawInit.c')
-rw-r--r-- | src/XawInit.c | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/src/XawInit.c b/src/XawInit.c index 4d9e1f5..589ba13 100644 --- a/src/XawInit.c +++ b/src/XawInit.c @@ -2,6 +2,7 @@ * $Xorg: XawInit.c,v 1.4 2001/02/09 02:03:47 xorgcvs Exp $ * Copyright 1989, 1998 The Open Group +Copyright 2003-2004 Roland Mainz <roland.mainz@nrubsig.org> Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted without fee, provided that @@ -37,6 +38,8 @@ in this Software without prior written authorization from The Open Group. #include <X11/Intrinsic.h> #include <X11/Vendor.h> #include <X11/Xaw/XawInit.h> +#include <X11/IntrinsicP.h> +#include <X11/StringDefs.h> #include "Private.h" void @@ -53,3 +56,42 @@ XawInitializeWidgetSet(void) XtInitializeWidgetClass(vendorShellWidgetClass); } } + +/* XawOpenApplication() - mainly identical to XtOpenApplication() but + * takes a |Display *| and |Screen *| as arguments, too... */ +Widget XawOpenApplication(XtAppContext *app_context_return, + Display *dpy, + Screen *screen, + String application_name, + String application_class, + WidgetClass widget_class, + int *argc, + String *argv) +{ + Widget toplevel; + Cardinal n; + Arg args[2]; + + XtToolkitInitialize(); + *app_context_return = XtCreateApplicationContext(); + if( *app_context_return == NULL ) + return NULL; + + XtDisplayInitialize(*app_context_return, dpy, + application_name, application_class, + NULL, 0, + argc, argv); + + n = 0; + if (screen) { + XtSetArg(args[n], XtNscreen, screen); n++; + } + toplevel = XtAppCreateShell(application_name, + application_class, + widget_class, + dpy, + args, n); + + return toplevel; +} + |