aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/xnest/Args.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2009-06-28 22:07:26 +0000
committermarha <marha@users.sourceforge.net>2009-06-28 22:07:26 +0000
commit3562e78743202e43aec8727005182a2558117eca (patch)
tree8f9113a77d12470c5c851a2a8e4cb02e89df7d43 /xorg-server/hw/xnest/Args.c
downloadvcxsrv-3562e78743202e43aec8727005182a2558117eca.tar.gz
vcxsrv-3562e78743202e43aec8727005182a2558117eca.tar.bz2
vcxsrv-3562e78743202e43aec8727005182a2558117eca.zip
Checked in the following released items:
xkeyboard-config-1.4.tar.gz ttf-bitstream-vera-1.10.tar.gz font-alias-1.0.1.tar.gz font-sun-misc-1.0.0.tar.gz font-sun-misc-1.0.0.tar.gz font-sony-misc-1.0.0.tar.gz font-schumacher-misc-1.0.0.tar.gz font-mutt-misc-1.0.0.tar.gz font-misc-misc-1.0.0.tar.gz font-misc-meltho-1.0.0.tar.gz font-micro-misc-1.0.0.tar.gz font-jis-misc-1.0.0.tar.gz font-isas-misc-1.0.0.tar.gz font-dec-misc-1.0.0.tar.gz font-daewoo-misc-1.0.0.tar.gz font-cursor-misc-1.0.0.tar.gz font-arabic-misc-1.0.0.tar.gz font-winitzki-cyrillic-1.0.0.tar.gz font-misc-cyrillic-1.0.0.tar.gz font-cronyx-cyrillic-1.0.0.tar.gz font-screen-cyrillic-1.0.1.tar.gz font-xfree86-type1-1.0.1.tar.gz font-adobe-utopia-type1-1.0.1.tar.gz font-ibm-type1-1.0.0.tar.gz font-bitstream-type1-1.0.0.tar.gz font-bitstream-speedo-1.0.0.tar.gz font-bh-ttf-1.0.0.tar.gz font-bh-type1-1.0.0.tar.gz font-bitstream-100dpi-1.0.0.tar.gz font-bh-lucidatypewriter-100dpi-1.0.0.tar.gz font-bh-100dpi-1.0.0.tar.gz font-adobe-utopia-100dpi-1.0.1.tar.gz font-adobe-100dpi-1.0.0.tar.gz font-util-1.0.1.tar.gz font-bitstream-75dpi-1.0.0.tar.gz font-bh-lucidatypewriter-75dpi-1.0.0.tar.gz font-adobe-utopia-75dpi-1.0.1.tar.gz font-bh-75dpi-1.0.0.tar.gz bdftopcf-1.0.1.tar.gz font-adobe-75dpi-1.0.0.tar.gz mkfontscale-1.0.6.tar.gz openssl-0.9.8k.tar.gz bigreqsproto-1.0.2.tar.gz xtrans-1.2.2.tar.gz resourceproto-1.0.2.tar.gz inputproto-1.4.4.tar.gz compositeproto-0.4.tar.gz damageproto-1.1.0.tar.gz zlib-1.2.3.tar.gz xkbcomp-1.0.5.tar.gz freetype-2.3.9.tar.gz pthreads-w32-2-8-0-release.tar.gz pixman-0.12.0.tar.gz kbproto-1.0.3.tar.gz evieext-1.0.2.tar.gz fixesproto-4.0.tar.gz recordproto-1.13.2.tar.gz randrproto-1.2.2.tar.gz scrnsaverproto-1.1.0.tar.gz renderproto-0.9.3.tar.gz xcmiscproto-1.1.2.tar.gz fontsproto-2.0.2.tar.gz xextproto-7.0.3.tar.gz xproto-7.0.14.tar.gz libXdmcp-1.0.2.tar.gz libxkbfile-1.0.5.tar.gz libfontenc-1.0.4.tar.gz libXfont-1.3.4.tar.gz libX11-1.1.5.tar.gz libXau-1.0.4.tar.gz libxcb-1.1.tar.gz xorg-server-1.5.3.tar.gz
Diffstat (limited to 'xorg-server/hw/xnest/Args.c')
-rw-r--r--xorg-server/hw/xnest/Args.c205
1 files changed, 205 insertions, 0 deletions
diff --git a/xorg-server/hw/xnest/Args.c b/xorg-server/hw/xnest/Args.c
new file mode 100644
index 000000000..f061f9e80
--- /dev/null
+++ b/xorg-server/hw/xnest/Args.c
@@ -0,0 +1,205 @@
+/*
+
+Copyright 1993 by Davor Matic
+
+Permission to use, copy, modify, distribute, and sell this software
+and its documentation for any purpose is hereby granted without fee,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation. Davor Matic makes no representations about
+the suitability of this software for any purpose. It is provided "as
+is" without express or implied warranty.
+
+*/
+
+#ifdef HAVE_XNEST_CONFIG_H
+#include <xnest-config.h>
+#endif
+
+#include <X11/X.h>
+#include <X11/Xproto.h>
+#include "screenint.h"
+#include "input.h"
+#include "misc.h"
+#include "scrnintstr.h"
+#include "servermd.h"
+
+#include "Xnest.h"
+
+#include "Display.h"
+#include "Args.h"
+
+char *xnestDisplayName = NULL;
+Bool xnestSynchronize = False;
+Bool xnestFullGeneration = False;
+int xnestDefaultClass;
+Bool xnestUserDefaultClass = False;
+int xnestDefaultDepth;
+Bool xnestUserDefaultDepth = False;
+Bool xnestSoftwareScreenSaver = False;
+int xnestX;
+int xnestY;
+unsigned int xnestWidth;
+unsigned int xnestHeight;
+int xnestUserGeometry = 0;
+int xnestBorderWidth;
+Bool xnestUserBorderWidth = False;
+char *xnestWindowName = NULL;
+int xnestNumScreens = 0;
+Bool xnestDoDirectColormaps = False;
+Window xnestParentWindow = 0;
+
+/* ddxInitGlobals - called by |InitGlobals| from os/util.c */
+void ddxInitGlobals(void)
+{
+#ifdef COMPOSITE
+ /* XXX terrible hack */
+ extern Bool noCompositeExtension;
+ noCompositeExtension = TRUE;
+#endif
+
+#ifdef XKB
+ extern Bool noXkbExtension;
+ noXkbExtension = TRUE;
+#endif
+}
+
+int
+ddxProcessArgument (int argc, char *argv[], int i)
+{
+ if (!strcmp(argv[i], "-display")) {
+ if (++i < argc) {
+ xnestDisplayName = argv[i];
+ return 2;
+ }
+ return 0;
+ }
+ if (!strcmp(argv[i], "-sync")) {
+ xnestSynchronize = True;
+ return 1;
+ }
+ if (!strcmp(argv[i], "-full")) {
+ xnestFullGeneration = True;
+ return 1;
+ }
+ if (!strcmp(argv[i], "-class")) {
+ if (++i < argc) {
+ if (!strcmp(argv[i], "StaticGray")) {
+ xnestDefaultClass = StaticGray;
+ xnestUserDefaultClass = True;
+ return 2;
+ }
+ else if (!strcmp(argv[i], "GrayScale")) {
+ xnestDefaultClass = GrayScale;
+ xnestUserDefaultClass = True;
+ return 2;
+ }
+ else if (!strcmp(argv[i], "StaticColor")) {
+ xnestDefaultClass = StaticColor;
+ xnestUserDefaultClass = True;
+ return 2;
+ }
+ else if (!strcmp(argv[i], "PseudoColor")) {
+ xnestDefaultClass = PseudoColor;
+ xnestUserDefaultClass = True;
+ return 2;
+ }
+ else if (!strcmp(argv[i], "TrueColor")) {
+ xnestDefaultClass = TrueColor;
+ xnestUserDefaultClass = True;
+ return 2;
+ }
+ else if (!strcmp(argv[i], "DirectColor")) {
+ xnestDefaultClass = DirectColor;
+ xnestUserDefaultClass = True;
+ return 2;
+ }
+ }
+ return 0;
+ }
+ if (!strcmp(argv[i], "-cc")) {
+ if (++i < argc && sscanf(argv[i], "%i", &xnestDefaultClass) == 1) {
+ if (xnestDefaultClass >= 0 && xnestDefaultClass <= 5) {
+ xnestUserDefaultClass = True;
+ /* lex the OS layer process it as well, so return 0 */
+ }
+ }
+ return 0;
+ }
+ if (!strcmp(argv[i], "-depth")) {
+ if (++i < argc && sscanf(argv[i], "%i", &xnestDefaultDepth) == 1) {
+ if (xnestDefaultDepth > 0) {
+ xnestUserDefaultDepth = True;
+ return 2;
+ }
+ }
+ return 0;
+ }
+ if (!strcmp(argv[i], "-sss")) {
+ xnestSoftwareScreenSaver = True;
+ return 1;
+ }
+ if (!strcmp(argv[i], "-geometry")) {
+ if (++i < argc) {
+ xnestUserGeometry = XParseGeometry(argv[i],
+ &xnestX, &xnestY,
+ &xnestWidth, &xnestHeight);
+ if (xnestUserGeometry) return 2;
+ }
+ return 0;
+ }
+ if (!strcmp(argv[i], "-bw")) {
+ if (++i < argc && sscanf(argv[i], "%i", &xnestBorderWidth) == 1) {
+ if (xnestBorderWidth >= 0) {
+ xnestUserBorderWidth = True;
+ return 2;
+ }
+ }
+ return 0;
+ }
+ if (!strcmp(argv[i], "-name")) {
+ if (++i < argc) {
+ xnestWindowName = argv[i];
+ return 2;
+ }
+ return 0;
+ }
+ if (!strcmp(argv[i], "-scrns")) {
+ if (++i < argc && sscanf(argv[i], "%i", &xnestNumScreens) == 1) {
+ if (xnestNumScreens > 0) {
+ if (xnestNumScreens > MAXSCREENS) {
+ ErrorF("Maximum number of screens is %d.\n", MAXSCREENS);
+ xnestNumScreens = MAXSCREENS;
+ }
+ return 2;
+ }
+ }
+ return 0;
+ }
+ if (!strcmp(argv[i], "-install")) {
+ xnestDoDirectColormaps = True;
+ return 1;
+ }
+ if (!strcmp(argv[i], "-parent")) {
+ if (++i < argc) {
+ xnestParentWindow = (XID) strtol (argv[i], (char**)NULL, 0);
+ return 2;
+ }
+ }
+ return 0;
+}
+
+void ddxUseMsg()
+{
+ ErrorF("-display string display name of the real server\n");
+ ErrorF("-sync sinchronize with the real server\n");
+ ErrorF("-full utilize full regeneration\n");
+ ErrorF("-class string default visual class\n");
+ ErrorF("-depth int default depth\n");
+ ErrorF("-sss use software screen saver\n");
+ ErrorF("-geometry WxH+X+Y window size and position\n");
+ ErrorF("-bw int window border width\n");
+ ErrorF("-name string window name\n");
+ ErrorF("-scrns int number of screens to generate\n");
+ ErrorF("-install instal colormaps directly\n");
+}